@cardstack/boxel-cli 0.2.0 → 0.3.0-unstable.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-types/base/-private.d.ts +1 -0
- package/bundled-types/base/address.d.ts +17 -0
- package/bundled-types/base/ai-app-generator.d.ts +14 -0
- package/bundled-types/base/amount-with-currency.d.ts +10 -0
- package/bundled-types/base/avif-image-def.d.ts +12 -0
- package/bundled-types/base/avif-meta-extractor.d.ts +4 -0
- package/bundled-types/base/base64-image.d.ts +25 -0
- package/bundled-types/base/big-integer.d.ts +12 -0
- package/bundled-types/base/boolean.d.ts +14 -0
- package/bundled-types/base/brand-functional-palette.d.ts +16 -0
- package/bundled-types/base/brand-guide.d.ts +26 -0
- package/bundled-types/base/brand-logo.d.ts +29 -0
- package/bundled-types/base/card-api.d.ts +513 -0
- package/bundled-types/base/card-serialization.d.ts +47 -0
- package/bundled-types/base/cards-grid.d.ts +10 -0
- package/bundled-types/base/code-ref.d.ts +14 -0
- package/bundled-types/base/codemirror-editor.d.ts +135 -0
- package/bundled-types/base/color-field/components/advanced-color-picker.d.ts +66 -0
- package/bundled-types/base/color-field/components/color-picker-field.d.ts +22 -0
- package/bundled-types/base/color-field/components/color-wheel-picker.d.ts +44 -0
- package/bundled-types/base/color-field/components/contrast-checker-addon.d.ts +14 -0
- package/bundled-types/base/color-field/components/recent-colors-addon.d.ts +19 -0
- package/bundled-types/base/color-field/components/slider-picker.d.ts +40 -0
- package/bundled-types/base/color-field/components/swatches-picker.d.ts +5 -0
- package/bundled-types/base/color-field/modifiers/setup-element-modifier.d.ts +10 -0
- package/bundled-types/base/color-field/util/color-field-signature.d.ts +9 -0
- package/bundled-types/base/color-field/util/color-utils.d.ts +96 -0
- package/bundled-types/base/color-field/util/css-color-parsers.d.ts +11 -0
- package/bundled-types/base/color.d.ts +10 -0
- package/bundled-types/base/command.d.ts +593 -0
- package/bundled-types/base/commands/search-card-result.d.ts +36 -0
- package/bundled-types/base/components/age.d.ts +22 -0
- package/bundled-types/base/components/business-days.d.ts +16 -0
- package/bundled-types/base/components/card-list.d.ts +25 -0
- package/bundled-types/base/components/cards-grid-layout.d.ts +58 -0
- package/bundled-types/base/components/countdown.d.ts +31 -0
- package/bundled-types/base/components/expiration-warning.d.ts +24 -0
- package/bundled-types/base/components/time-ago.d.ts +24 -0
- package/bundled-types/base/components/time-slots.d.ts +20 -0
- package/bundled-types/base/components/timeline.d.ts +22 -0
- package/bundled-types/base/contains-many-component.d.ts +7 -0
- package/bundled-types/base/coordinate.d.ts +7 -0
- package/bundled-types/base/country.d.ts +23 -0
- package/bundled-types/base/css-value.d.ts +6 -0
- package/bundled-types/base/csv-file-def.d.ts +29 -0
- package/bundled-types/base/currency.d.ts +16 -0
- package/bundled-types/base/date/day.d.ts +9 -0
- package/bundled-types/base/date/month-day.d.ts +10 -0
- package/bundled-types/base/date/month-year.d.ts +9 -0
- package/bundled-types/base/date/month.d.ts +9 -0
- package/bundled-types/base/date/quarter.d.ts +10 -0
- package/bundled-types/base/date/week.d.ts +9 -0
- package/bundled-types/base/date/year.d.ts +9 -0
- package/bundled-types/base/date-range-field.d.ts +12 -0
- package/bundled-types/base/date.d.ts +12 -0
- package/bundled-types/base/datetime-stamp.d.ts +7 -0
- package/bundled-types/base/datetime.d.ts +12 -0
- package/bundled-types/base/default-templates/atom.d.ts +10 -0
- package/bundled-types/base/default-templates/card-info.d.ts +32 -0
- package/bundled-types/base/default-templates/embedded.d.ts +11 -0
- package/bundled-types/base/default-templates/field-edit.d.ts +10 -0
- package/bundled-types/base/default-templates/file-def-edit.d.ts +8 -0
- package/bundled-types/base/default-templates/fitted.d.ts +12 -0
- package/bundled-types/base/default-templates/head.d.ts +13 -0
- package/bundled-types/base/default-templates/image-def-atom.d.ts +8 -0
- package/bundled-types/base/default-templates/image-def-embedded.d.ts +8 -0
- package/bundled-types/base/default-templates/image-def-fitted.d.ts +8 -0
- package/bundled-types/base/default-templates/image-def-isolated.d.ts +8 -0
- package/bundled-types/base/default-templates/isolated-and-edit.d.ts +15 -0
- package/bundled-types/base/default-templates/markdown-fallback.d.ts +19 -0
- package/bundled-types/base/default-templates/markdown.d.ts +60 -0
- package/bundled-types/base/default-templates/missing-template.d.ts +13 -0
- package/bundled-types/base/default-templates/theme-dashboard.d.ts +126 -0
- package/bundled-types/base/detailed-style-reference.d.ts +48 -0
- package/bundled-types/base/email.d.ts +10 -0
- package/bundled-types/base/enum.d.ts +30 -0
- package/bundled-types/base/ethereum-address.d.ts +13 -0
- package/bundled-types/base/field-component.d.ts +65 -0
- package/bundled-types/base/field-support.d.ts +55 -0
- package/bundled-types/base/file-api.d.ts +2 -0
- package/bundled-types/base/file-menu-items.d.ts +4 -0
- package/bundled-types/base/gif-image-def.d.ts +12 -0
- package/bundled-types/base/gif-meta-extractor.d.ts +4 -0
- package/bundled-types/base/gts-file-def.d.ts +7 -0
- package/bundled-types/base/helpers/country.d.ts +3198 -0
- package/bundled-types/base/helpers/sanitized-html.d.ts +2 -0
- package/bundled-types/base/helpers/set-background-image.d.ts +2 -0
- package/bundled-types/base/image-file-def.d.ts +1 -0
- package/bundled-types/base/image.d.ts +8 -0
- package/bundled-types/base/index.d.ts +1 -0
- package/bundled-types/base/join-the-community.d.ts +14 -0
- package/bundled-types/base/jpg-image-def.d.ts +12 -0
- package/bundled-types/base/jpg-meta-extractor.d.ts +4 -0
- package/bundled-types/base/json-file-def.d.ts +23 -0
- package/bundled-types/base/links-to-editor.d.ts +22 -0
- package/bundled-types/base/links-to-many-component.d.ts +7 -0
- package/bundled-types/base/llm-model.d.ts +6 -0
- package/bundled-types/base/markdown-file-def.d.ts +25 -0
- package/bundled-types/base/markdown-helpers.d.ts +26 -0
- package/bundled-types/base/markdown.d.ts +1 -0
- package/bundled-types/base/matrix-event.d.ts +400 -0
- package/bundled-types/base/menu-items.d.ts +21 -0
- package/bundled-types/base/number/components/badge-counter.d.ts +32 -0
- package/bundled-types/base/number/components/badge-metric.d.ts +34 -0
- package/bundled-types/base/number/components/badge-notification.d.ts +38 -0
- package/bundled-types/base/number/components/gauge.d.ts +45 -0
- package/bundled-types/base/number/components/number-input.d.ts +27 -0
- package/bundled-types/base/number/components/progress-bar.d.ts +44 -0
- package/bundled-types/base/number/components/progress-circle.d.ts +41 -0
- package/bundled-types/base/number/components/score.d.ts +41 -0
- package/bundled-types/base/number/components/stat.d.ts +38 -0
- package/bundled-types/base/number/util/index.d.ts +29 -0
- package/bundled-types/base/number.d.ts +52 -0
- package/bundled-types/base/percentage.d.ts +9 -0
- package/bundled-types/base/phone-number.d.ts +25 -0
- package/bundled-types/base/png-image-def.d.ts +12 -0
- package/bundled-types/base/png-meta-extractor.d.ts +4 -0
- package/bundled-types/base/positioned-card.d.ts +7 -0
- package/bundled-types/base/query-field-support.d.ts +6 -0
- package/bundled-types/base/realm-config.d.ts +16 -0
- package/bundled-types/base/realm.d.ts +7 -0
- package/bundled-types/base/resources/command-data.d.ts +43 -0
- package/bundled-types/base/response-field.d.ts +6 -0
- package/bundled-types/base/rich-markdown.d.ts +30 -0
- package/bundled-types/base/shared-state.d.ts +1 -0
- package/bundled-types/base/skill-plus.d.ts +79 -0
- package/bundled-types/base/skill-reference.d.ts +12 -0
- package/bundled-types/base/skill-set.d.ts +18 -0
- package/bundled-types/base/skill.d.ts +21 -0
- package/bundled-types/base/spec.d.ts +108 -0
- package/bundled-types/base/string.d.ts +2 -0
- package/bundled-types/base/structured-theme-variables.d.ts +85 -0
- package/bundled-types/base/structured-theme.d.ts +32 -0
- package/bundled-types/base/style-reference.d.ts +14 -0
- package/bundled-types/base/svg-image-def.d.ts +12 -0
- package/bundled-types/base/svg-meta-extractor.d.ts +12 -0
- package/bundled-types/base/system-card.d.ts +17 -0
- package/bundled-types/base/tag.d.ts +15 -0
- package/bundled-types/base/text-area.d.ts +2 -0
- package/bundled-types/base/text-file-def.d.ts +23 -0
- package/bundled-types/base/text-input-validator.d.ts +13 -0
- package/bundled-types/base/theme.d.ts +2 -0
- package/bundled-types/base/time/duration.d.ts +14 -0
- package/bundled-types/base/time/relative-time.d.ts +10 -0
- package/bundled-types/base/time/time-range.d.ts +11 -0
- package/bundled-types/base/time.d.ts +9 -0
- package/bundled-types/base/ts-file-def.d.ts +26 -0
- package/bundled-types/base/ts-highlight.d.ts +1 -0
- package/bundled-types/base/types/@cardstack/boxel-host/index.d.ts +5 -0
- package/bundled-types/base/types/ember-css-url/index.d.ts +15 -0
- package/bundled-types/base/typography.d.ts +14 -0
- package/bundled-types/base/url.d.ts +13 -0
- package/bundled-types/base/watched-array.d.ts +7 -0
- package/bundled-types/base/webp-image-def.d.ts +12 -0
- package/bundled-types/base/webp-meta-extractor.d.ts +4 -0
- package/bundled-types/base/website.d.ts +8 -0
- package/bundled-types/base/welcome-to-boxel.d.ts +22 -0
- package/bundled-types/boxel-ui/components/accordion/index.gts +50 -0
- package/bundled-types/boxel-ui/components/accordion/item/index.gts +156 -0
- package/bundled-types/boxel-ui/components/accordion/usage.gts +157 -0
- package/bundled-types/boxel-ui/components/add-button/index.gts +46 -0
- package/bundled-types/boxel-ui/components/add-button/usage.gts +54 -0
- package/bundled-types/boxel-ui/components/alert/index.gts +151 -0
- package/bundled-types/boxel-ui/components/alert/usage.gts +66 -0
- package/bundled-types/boxel-ui/components/avatar/index.gts +79 -0
- package/bundled-types/boxel-ui/components/avatar/usage.gts +96 -0
- package/bundled-types/boxel-ui/components/basic-fitted/index.gts +340 -0
- package/bundled-types/boxel-ui/components/basic-fitted/usage.gts +223 -0
- package/bundled-types/boxel-ui/components/button/index.gts +416 -0
- package/bundled-types/boxel-ui/components/button/usage.gts +334 -0
- package/bundled-types/boxel-ui/components/card-container/index.gts +251 -0
- package/bundled-types/boxel-ui/components/card-container/usage.gts +53 -0
- package/bundled-types/boxel-ui/components/card-header/index.gts +473 -0
- package/bundled-types/boxel-ui/components/card-header/usage.gts +295 -0
- package/bundled-types/boxel-ui/components/circle-spinner/index.gts +42 -0
- package/bundled-types/boxel-ui/components/circle-spinner/usage.gts +48 -0
- package/bundled-types/boxel-ui/components/color-palette/index.gts +134 -0
- package/bundled-types/boxel-ui/components/color-palette/usage.gts +69 -0
- package/bundled-types/boxel-ui/components/color-picker/index.gts +125 -0
- package/bundled-types/boxel-ui/components/color-picker/usage.gts +56 -0
- package/bundled-types/boxel-ui/components/container/index.gts +67 -0
- package/bundled-types/boxel-ui/components/container/usage.gts +59 -0
- package/bundled-types/boxel-ui/components/context-button/index.gts +184 -0
- package/bundled-types/boxel-ui/components/context-button/usage.gts +125 -0
- package/bundled-types/boxel-ui/components/copy-button/index.gts +79 -0
- package/bundled-types/boxel-ui/components/copy-button/usage.gts +25 -0
- package/bundled-types/boxel-ui/components/date-range-picker/index.gts +211 -0
- package/bundled-types/boxel-ui/components/date-range-picker/setup.gts +11 -0
- package/bundled-types/boxel-ui/components/date-range-picker/usage.gts +52 -0
- package/bundled-types/boxel-ui/components/drag-and-drop/index.gts +256 -0
- package/bundled-types/boxel-ui/components/drag-and-drop/usage.gts +142 -0
- package/bundled-types/boxel-ui/components/dropdown/index.gts +478 -0
- package/bundled-types/boxel-ui/components/dropdown/trigger/index.gts +70 -0
- package/bundled-types/boxel-ui/components/dropdown/trigger/usage.gts +54 -0
- package/bundled-types/boxel-ui/components/dropdown/usage.gts +119 -0
- package/bundled-types/boxel-ui/components/email-input/index.gts +111 -0
- package/bundled-types/boxel-ui/components/email-input/usage.gts +75 -0
- package/bundled-types/boxel-ui/components/entity-icon-display/index.gts +144 -0
- package/bundled-types/boxel-ui/components/entity-icon-display/usage.gts +54 -0
- package/bundled-types/boxel-ui/components/entity-thumbnail-display/index.gts +148 -0
- package/bundled-types/boxel-ui/components/entity-thumbnail-display/usage.gts +76 -0
- package/bundled-types/boxel-ui/components/field-container/index.gts +150 -0
- package/bundled-types/boxel-ui/components/field-container/usage.gts +188 -0
- package/bundled-types/boxel-ui/components/filter-list/index.gts +255 -0
- package/bundled-types/boxel-ui/components/filter-list/usage.gts +153 -0
- package/bundled-types/boxel-ui/components/fitted-card-container/index.gts +66 -0
- package/bundled-types/boxel-ui/components/fitted-card-container/usage.gts +81 -0
- package/bundled-types/boxel-ui/components/grid-container/grid-item-container/index.gts +37 -0
- package/bundled-types/boxel-ui/components/grid-container/index.gts +116 -0
- package/bundled-types/boxel-ui/components/grid-container/usage.gts +105 -0
- package/bundled-types/boxel-ui/components/header/index.gts +101 -0
- package/bundled-types/boxel-ui/components/header/usage.gts +116 -0
- package/bundled-types/boxel-ui/components/icon-button/index.gts +148 -0
- package/bundled-types/boxel-ui/components/icon-button/usage.gts +249 -0
- package/bundled-types/boxel-ui/components/input/index.gts +560 -0
- package/bundled-types/boxel-ui/components/input/usage.gts +449 -0
- package/bundled-types/boxel-ui/components/input-group/accessories/index.gts +191 -0
- package/bundled-types/boxel-ui/components/input-group/controls/index.gts +54 -0
- package/bundled-types/boxel-ui/components/input-group/index.gts +347 -0
- package/bundled-types/boxel-ui/components/input-group/usage.gts +437 -0
- package/bundled-types/boxel-ui/components/kanban/card.gts +89 -0
- package/bundled-types/boxel-ui/components/kanban/column-header.gts +151 -0
- package/bundled-types/boxel-ui/components/kanban/drag.gts +1007 -0
- package/bundled-types/boxel-ui/components/kanban/engine.ts +247 -0
- package/bundled-types/boxel-ui/components/kanban/ghost.gts +64 -0
- package/bundled-types/boxel-ui/components/kanban/index.gts +16 -0
- package/bundled-types/boxel-ui/components/kanban/modifiers.gts +42 -0
- package/bundled-types/boxel-ui/components/kanban/plane-inner.gts +525 -0
- package/bundled-types/boxel-ui/components/kanban/plane.gts +163 -0
- package/bundled-types/boxel-ui/components/kanban/usage.gts +392 -0
- package/bundled-types/boxel-ui/components/label/index.gts +64 -0
- package/bundled-types/boxel-ui/components/loading-indicator/index.gts +78 -0
- package/bundled-types/boxel-ui/components/loading-indicator/usage.gts +72 -0
- package/bundled-types/boxel-ui/components/menu/index.gts +267 -0
- package/bundled-types/boxel-ui/components/menu/usage.gts +100 -0
- package/bundled-types/boxel-ui/components/message/index.gts +146 -0
- package/bundled-types/boxel-ui/components/message/usage.gts +263 -0
- package/bundled-types/boxel-ui/components/modal/index.gts +159 -0
- package/bundled-types/boxel-ui/components/modal/usage.gts +206 -0
- package/bundled-types/boxel-ui/components/multi-select/after-options.gts +59 -0
- package/bundled-types/boxel-ui/components/multi-select/index.gts +230 -0
- package/bundled-types/boxel-ui/components/multi-select/selected-item.gts +91 -0
- package/bundled-types/boxel-ui/components/multi-select/trigger.gts +190 -0
- package/bundled-types/boxel-ui/components/multi-select/usage.gts +420 -0
- package/bundled-types/boxel-ui/components/phone-input/index.gts +149 -0
- package/bundled-types/boxel-ui/components/phone-input/usage.gts +73 -0
- package/bundled-types/boxel-ui/components/picker/before-options-with-search.gts +340 -0
- package/bundled-types/boxel-ui/components/picker/index.gts +427 -0
- package/bundled-types/boxel-ui/components/picker/option-row.gts +270 -0
- package/bundled-types/boxel-ui/components/picker/selected-item.gts +171 -0
- package/bundled-types/boxel-ui/components/picker/trigger-labeled.gts +216 -0
- package/bundled-types/boxel-ui/components/picker/usage.gts +179 -0
- package/bundled-types/boxel-ui/components/pill/index.gts +231 -0
- package/bundled-types/boxel-ui/components/pill/usage.gts +230 -0
- package/bundled-types/boxel-ui/components/progress-bar/index.gts +124 -0
- package/bundled-types/boxel-ui/components/progress-bar/usage.gts +131 -0
- package/bundled-types/boxel-ui/components/progress-radial/index.gts +95 -0
- package/bundled-types/boxel-ui/components/progress-radial/usage.gts +79 -0
- package/bundled-types/boxel-ui/components/radio-input/index.gts +143 -0
- package/bundled-types/boxel-ui/components/radio-input/item.gts +210 -0
- package/bundled-types/boxel-ui/components/radio-input/usage.gts +303 -0
- package/bundled-types/boxel-ui/components/realm-icon/index.gts +129 -0
- package/bundled-types/boxel-ui/components/realm-icon/usage.gts +62 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/handle.gts +180 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/index.gts +341 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/panel.gts +86 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/usage.gts +350 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/adjust-layout-by-delta.ts +231 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/assert.ts +10 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/calculate-delta-percentage.ts +41 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/calculate-unsafe-default-layout.ts +53 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/compare-layouts.ts +12 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/const.ts +6 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/determine-pivot-indices.ts +15 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/dom/get-panel-element.ts +10 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/dom/get-panel-elements-for-group.ts +8 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/dom/get-panel-group-element.ts +21 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/dom/get-resize-handle-element-index.ts +14 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/dom/get-resize-handle-element.ts +12 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/dom/get-resize-handle-elements-for-group.ts +10 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/fuzzy-layouts-equal.ts +22 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/fuzzy-numbers.ts +21 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/get-resize-event-coordinates.ts +8 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/get-resize-event-cursor-position.ts +10 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/panel-resize-handle-registry.ts +446 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/resize-panel.ts +35 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/types.ts +23 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/validate-panel-group-layout.ts +86 -0
- package/bundled-types/boxel-ui/components/select/index.gts +882 -0
- package/bundled-types/boxel-ui/components/select/trigger.gts +132 -0
- package/bundled-types/boxel-ui/components/select/usage.gts +353 -0
- package/bundled-types/boxel-ui/components/skeleton-placeholder/index.gts +89 -0
- package/bundled-types/boxel-ui/components/skeleton-placeholder/usage.gts +102 -0
- package/bundled-types/boxel-ui/components/sort-dropdown/index.gts +91 -0
- package/bundled-types/boxel-ui/components/sort-dropdown/usage.gts +77 -0
- package/bundled-types/boxel-ui/components/swatch/index.gts +81 -0
- package/bundled-types/boxel-ui/components/swatch/usage.gts +57 -0
- package/bundled-types/boxel-ui/components/switch/index.gts +95 -0
- package/bundled-types/boxel-ui/components/switch/usage.gts +79 -0
- package/bundled-types/boxel-ui/components/tabbed-header/index.gts +141 -0
- package/bundled-types/boxel-ui/components/tabbed-header/usage.gts +103 -0
- package/bundled-types/boxel-ui/components/tag/index.gts +50 -0
- package/bundled-types/boxel-ui/components/tag/usage.gts +89 -0
- package/bundled-types/boxel-ui/components/tag-list/index.gts +85 -0
- package/bundled-types/boxel-ui/components/tag-list/usage.gts +129 -0
- package/bundled-types/boxel-ui/components/tooltip/index.gts +306 -0
- package/bundled-types/boxel-ui/components/tooltip/usage.gts +168 -0
- package/bundled-types/boxel-ui/components/view-selector/index.gts +166 -0
- package/bundled-types/boxel-ui/components/view-selector/usage.gts +149 -0
- package/bundled-types/boxel-ui/components.ts +169 -0
- package/bundled-types/boxel-ui/helpers/add-class-to-svg.ts +8 -0
- package/bundled-types/boxel-ui/helpers/clipboard.ts +21 -0
- package/bundled-types/boxel-ui/helpers/cn.ts +12 -0
- package/bundled-types/boxel-ui/helpers/color-tools.ts +331 -0
- package/bundled-types/boxel-ui/helpers/compact.ts +3 -0
- package/bundled-types/boxel-ui/helpers/contrast-color.ts +32 -0
- package/bundled-types/boxel-ui/helpers/css-var.ts +41 -0
- package/bundled-types/boxel-ui/helpers/currency-format.ts +25 -0
- package/bundled-types/boxel-ui/helpers/dayjs-format.ts +27 -0
- package/bundled-types/boxel-ui/helpers/deterministic-color-from-string.ts +45 -0
- package/bundled-types/boxel-ui/helpers/element.ts +16 -0
- package/bundled-types/boxel-ui/helpers/extract-css-variables.ts +126 -0
- package/bundled-types/boxel-ui/helpers/format-age.ts +72 -0
- package/bundled-types/boxel-ui/helpers/format-countdown.ts +110 -0
- package/bundled-types/boxel-ui/helpers/format-currency.ts +95 -0
- package/bundled-types/boxel-ui/helpers/format-date-time.ts +567 -0
- package/bundled-types/boxel-ui/helpers/format-duration.ts +143 -0
- package/bundled-types/boxel-ui/helpers/format-file-size.ts +49 -0
- package/bundled-types/boxel-ui/helpers/format-list.ts +73 -0
- package/bundled-types/boxel-ui/helpers/format-names.ts +103 -0
- package/bundled-types/boxel-ui/helpers/format-number.ts +140 -0
- package/bundled-types/boxel-ui/helpers/format-ordinal.ts +115 -0
- package/bundled-types/boxel-ui/helpers/format-period.ts +188 -0
- package/bundled-types/boxel-ui/helpers/format-relative-time.ts +789 -0
- package/bundled-types/boxel-ui/helpers/generate-css-variables.ts +47 -0
- package/bundled-types/boxel-ui/helpers/markdown-escape.ts +36 -0
- package/bundled-types/boxel-ui/helpers/math-helpers.ts +18 -0
- package/bundled-types/boxel-ui/helpers/menu-divider.ts +15 -0
- package/bundled-types/boxel-ui/helpers/menu-item.ts +76 -0
- package/bundled-types/boxel-ui/helpers/optional.ts +7 -0
- package/bundled-types/boxel-ui/helpers/pick.ts +11 -0
- package/bundled-types/boxel-ui/helpers/sanitize-html.ts +45 -0
- package/bundled-types/boxel-ui/helpers/string.ts +15 -0
- package/bundled-types/boxel-ui/helpers/theme-css.ts +148 -0
- package/bundled-types/boxel-ui/helpers/truth-helpers.ts +48 -0
- package/bundled-types/boxel-ui/helpers/validate-email-format.ts +138 -0
- package/bundled-types/boxel-ui/helpers/validate-phone-format.ts +201 -0
- package/bundled-types/boxel-ui/helpers.ts +134 -0
- package/bundled-types/boxel-ui/icons/ai-bw.gts +22 -0
- package/bundled-types/boxel-ui/icons/arrow-left.gts +25 -0
- package/bundled-types/boxel-ui/icons/arrow-right.gts +28 -0
- package/bundled-types/boxel-ui/icons/arrow-top-left.gts +22 -0
- package/bundled-types/boxel-ui/icons/arrow-up.gts +25 -0
- package/bundled-types/boxel-ui/icons/atom.gts +26 -0
- package/bundled-types/boxel-ui/icons/boxel-icon-with-text.gts +29 -0
- package/bundled-types/boxel-ui/icons/boxel-icon.gts +34 -0
- package/bundled-types/boxel-ui/icons/card-definition.gts +26 -0
- package/bundled-types/boxel-ui/icons/card-instance.gts +26 -0
- package/bundled-types/boxel-ui/icons/card.gts +24 -0
- package/bundled-types/boxel-ui/icons/cardbot-lg.gts +24 -0
- package/bundled-types/boxel-ui/icons/caret-down.gts +23 -0
- package/bundled-types/boxel-ui/icons/caret-up.gts +23 -0
- package/bundled-types/boxel-ui/icons/check-mark.gts +23 -0
- package/bundled-types/boxel-ui/icons/chevron-right.gts +23 -0
- package/bundled-types/boxel-ui/icons/copy.gts +28 -0
- package/bundled-types/boxel-ui/icons/diagonal-arrow-left-up.gts +21 -0
- package/bundled-types/boxel-ui/icons/download.gts +19 -0
- package/bundled-types/boxel-ui/icons/dropdown-arrow-down.gts +20 -0
- package/bundled-types/boxel-ui/icons/dropdown-arrow-filled.gts +19 -0
- package/bundled-types/boxel-ui/icons/dropdown-arrow-up.gts +20 -0
- package/bundled-types/boxel-ui/icons/edit.gts +14 -0
- package/bundled-types/boxel-ui/icons/embedded.gts +34 -0
- package/bundled-types/boxel-ui/icons/exclamation-circle.gts +26 -0
- package/bundled-types/boxel-ui/icons/exclamation.gts +20 -0
- package/bundled-types/boxel-ui/icons/eye.gts +19 -0
- package/bundled-types/boxel-ui/icons/failure-bordered.gts +26 -0
- package/bundled-types/boxel-ui/icons/field.gts +26 -0
- package/bundled-types/boxel-ui/icons/file-alert.gts +28 -0
- package/bundled-types/boxel-ui/icons/file.gts +27 -0
- package/bundled-types/boxel-ui/icons/fitted.gts +42 -0
- package/bundled-types/boxel-ui/icons/folder.gts +26 -0
- package/bundled-types/boxel-ui/icons/form.gts +38 -0
- package/bundled-types/boxel-ui/icons/four-lines.gts +21 -0
- package/bundled-types/boxel-ui/icons/grid-3x3.gts +26 -0
- package/bundled-types/boxel-ui/icons/group.gts +22 -0
- package/bundled-types/boxel-ui/icons/head.gts +28 -0
- package/bundled-types/boxel-ui/icons/highlight-icon.gts +46 -0
- package/bundled-types/boxel-ui/icons/icon-circle-selected.gts +25 -0
- package/bundled-types/boxel-ui/icons/icon-circle.gts +25 -0
- package/bundled-types/boxel-ui/icons/icon-code.gts +22 -0
- package/bundled-types/boxel-ui/icons/icon-funnel.gts +23 -0
- package/bundled-types/boxel-ui/icons/icon-globe.gts +19 -0
- package/bundled-types/boxel-ui/icons/icon-grid.gts +68 -0
- package/bundled-types/boxel-ui/icons/icon-hexagon.gts +22 -0
- package/bundled-types/boxel-ui/icons/icon-inherit.gts +19 -0
- package/bundled-types/boxel-ui/icons/icon-link.gts +20 -0
- package/bundled-types/boxel-ui/icons/icon-list.gts +40 -0
- package/bundled-types/boxel-ui/icons/icon-minus-circle.gts +26 -0
- package/bundled-types/boxel-ui/icons/icon-pencil-crossed-out.gts +33 -0
- package/bundled-types/boxel-ui/icons/icon-pencil-not-crossed-out.gts +21 -0
- package/bundled-types/boxel-ui/icons/icon-pencil.gts +23 -0
- package/bundled-types/boxel-ui/icons/icon-plus-circle.gts +31 -0
- package/bundled-types/boxel-ui/icons/icon-plus-thin.gts +19 -0
- package/bundled-types/boxel-ui/icons/icon-plus.gts +20 -0
- package/bundled-types/boxel-ui/icons/icon-search-thick.gts +27 -0
- package/bundled-types/boxel-ui/icons/icon-search.gts +25 -0
- package/bundled-types/boxel-ui/icons/icon-table.gts +44 -0
- package/bundled-types/boxel-ui/icons/icon-trash.gts +24 -0
- package/bundled-types/boxel-ui/icons/icon-turn-down-right.gts +18 -0
- package/bundled-types/boxel-ui/icons/icon-x.gts +21 -0
- package/bundled-types/boxel-ui/icons/image-placeholder.gts +30 -0
- package/bundled-types/boxel-ui/icons/isolated.gts +20 -0
- package/bundled-types/boxel-ui/icons/loading-indicator.gts +26 -0
- package/bundled-types/boxel-ui/icons/lock.gts +23 -0
- package/bundled-types/boxel-ui/icons/markdown.gts +19 -0
- package/bundled-types/boxel-ui/icons/profile.gts +23 -0
- package/bundled-types/boxel-ui/icons/publish-site-icon.gts +25 -0
- package/bundled-types/boxel-ui/icons/rows-4.gts +26 -0
- package/bundled-types/boxel-ui/icons/select-all.gts +25 -0
- package/bundled-types/boxel-ui/icons/send.gts +21 -0
- package/bundled-types/boxel-ui/icons/sparkle.gts +21 -0
- package/bundled-types/boxel-ui/icons/star-filled.gts +25 -0
- package/bundled-types/boxel-ui/icons/star-half-fill.gts +27 -0
- package/bundled-types/boxel-ui/icons/star.gts +25 -0
- package/bundled-types/boxel-ui/icons/success-bordered.gts +30 -0
- package/bundled-types/boxel-ui/icons/three-dots-horizontal.gts +21 -0
- package/bundled-types/boxel-ui/icons/triangle-left.gts +23 -0
- package/bundled-types/boxel-ui/icons/triangle-right.gts +23 -0
- package/bundled-types/boxel-ui/icons/types.ts +10 -0
- package/bundled-types/boxel-ui/icons/upload.gts +20 -0
- package/bundled-types/boxel-ui/icons/warning.gts +19 -0
- package/bundled-types/boxel-ui/icons.gts +249 -0
- package/bundled-types/boxel-ui/modifiers/auto-focus.ts +7 -0
- package/bundled-types/boxel-ui/modifiers/set-css-var.ts +24 -0
- package/bundled-types/boxel-ui/modifiers.ts +14 -0
- package/bundled-types/boxel-ui/types/@cardstack/boxel-ui/index.d.ts +3 -0
- package/bundled-types/boxel-ui/types/ember-css-url/index.d.ts +15 -0
- package/bundled-types/boxel-ui/types/ember-draggable-modifiers/index.d.ts +109 -0
- package/bundled-types/boxel-ui/types/ember-draggable-modifiers/utils.d.ts +7 -0
- package/bundled-types/boxel-ui/types/ember-focus-trap/index.d.ts +20 -0
- package/bundled-types/boxel-ui/types/ember-power-calendar/components/index.d.ts +9 -0
- package/bundled-types/boxel-ui/types/ember-resize-modifier/index.d.ts +14 -0
- package/bundled-types/boxel-ui/types/ember-set-body-class/index.d.ts +12 -0
- package/bundled-types/boxel-ui/types/ember-sortable/index.d.ts +52 -0
- package/bundled-types/boxel-ui/types/global.d.ts +7 -0
- package/bundled-types/boxel-ui/usage.ts +112 -0
- package/bundled-types/boxel-ui/utils/date-utils.ts +192 -0
- package/bundled-types/boxel-ui/utils/fitted-formats.ts +161 -0
- package/bundled-types/host-app/app.ts +22 -0
- package/bundled-types/host-app/commands/add-field-to-card-definition.ts +74 -0
- package/bundled-types/host-app/commands/ai-assistant.ts +203 -0
- package/bundled-types/host-app/commands/apply-markdown-edit.ts +203 -0
- package/bundled-types/host-app/commands/apply-search-replace-block.ts +225 -0
- package/bundled-types/host-app/commands/ask-ai.ts +66 -0
- package/bundled-types/host-app/commands/authed-fetch.ts +53 -0
- package/bundled-types/host-app/commands/bot-requests/create-listing-pr-request.ts +77 -0
- package/bundled-types/host-app/commands/bot-requests/send-bot-trigger-event.ts +53 -0
- package/bundled-types/host-app/commands/can-read-realm.ts +34 -0
- package/bundled-types/host-app/commands/cancel-indexing-job.ts +29 -0
- package/bundled-types/host-app/commands/check-correctness.ts +309 -0
- package/bundled-types/host-app/commands/copy-and-edit.ts +311 -0
- package/bundled-types/host-app/commands/copy-card-as-markdown.ts +41 -0
- package/bundled-types/host-app/commands/copy-card-to-stack.ts +70 -0
- package/bundled-types/host-app/commands/copy-card.ts +67 -0
- package/bundled-types/host-app/commands/copy-file-to-realm.ts +82 -0
- package/bundled-types/host-app/commands/copy-source.ts +46 -0
- package/bundled-types/host-app/commands/create-ai-assistant-room.ts +144 -0
- package/bundled-types/host-app/commands/create-and-open-submission-workflow-card.ts +30 -0
- package/bundled-types/host-app/commands/create-specs.ts +422 -0
- package/bundled-types/host-app/commands/create-submission-workflow.ts +172 -0
- package/bundled-types/host-app/commands/evaluate-module.ts +119 -0
- package/bundled-types/host-app/commands/execute-atomic-operations.ts +44 -0
- package/bundled-types/host-app/commands/fetch-card-json.ts +33 -0
- package/bundled-types/host-app/commands/full-reindex-realm.ts +30 -0
- package/bundled-types/host-app/commands/generate-example-cards.ts +298 -0
- package/bundled-types/host-app/commands/generate-readme-spec.ts +116 -0
- package/bundled-types/host-app/commands/generate-theme-example.ts +147 -0
- package/bundled-types/host-app/commands/generate-thumbnail.ts +247 -0
- package/bundled-types/host-app/commands/get-all-realm-metas.ts +38 -0
- package/bundled-types/host-app/commands/get-available-realm-identifiers.ts +29 -0
- package/bundled-types/host-app/commands/get-card-type-schema.ts +59 -0
- package/bundled-types/host-app/commands/get-card.ts +34 -0
- package/bundled-types/host-app/commands/get-catalog-realm-identifiers.ts +29 -0
- package/bundled-types/host-app/commands/get-default-writable-realm.ts +28 -0
- package/bundled-types/host-app/commands/get-events-from-room.ts +70 -0
- package/bundled-types/host-app/commands/get-realm-of-resource-identifier.ts +37 -0
- package/bundled-types/host-app/commands/get-user-system-card.ts +38 -0
- package/bundled-types/host-app/commands/index.ts +590 -0
- package/bundled-types/host-app/commands/instantiate-card.ts +185 -0
- package/bundled-types/host-app/commands/invalidate-realm-identifiers.ts +33 -0
- package/bundled-types/host-app/commands/invite-user-to-room.ts +34 -0
- package/bundled-types/host-app/commands/lint-and-fix.ts +60 -0
- package/bundled-types/host-app/commands/listing-action-build.ts +79 -0
- package/bundled-types/host-app/commands/listing-action-init.ts +106 -0
- package/bundled-types/host-app/commands/listing-create.ts +632 -0
- package/bundled-types/host-app/commands/listing-generate-example.ts +83 -0
- package/bundled-types/host-app/commands/listing-install.ts +227 -0
- package/bundled-types/host-app/commands/listing-remix.ts +150 -0
- package/bundled-types/host-app/commands/listing-update-specs.ts +116 -0
- package/bundled-types/host-app/commands/listing-use.ts +97 -0
- package/bundled-types/host-app/commands/one-shot-llm-request.ts +209 -0
- package/bundled-types/host-app/commands/open-ai-assistant-room.ts +38 -0
- package/bundled-types/host-app/commands/open-create-listing-modal.ts +52 -0
- package/bundled-types/host-app/commands/open-in-interact-mode.ts +36 -0
- package/bundled-types/host-app/commands/open-workspace.ts +38 -0
- package/bundled-types/host-app/commands/patch-card-instance.ts +108 -0
- package/bundled-types/host-app/commands/patch-code.ts +243 -0
- package/bundled-types/host-app/commands/patch-fields.ts +304 -0
- package/bundled-types/host-app/commands/patch-theme.ts +52 -0
- package/bundled-types/host-app/commands/persist-module-inspector-view.ts +41 -0
- package/bundled-types/host-app/commands/populate-with-sample-data.ts +84 -0
- package/bundled-types/host-app/commands/preview-format.ts +52 -0
- package/bundled-types/host-app/commands/read-binary-file.ts +62 -0
- package/bundled-types/host-app/commands/read-card-for-ai-assistant.ts +50 -0
- package/bundled-types/host-app/commands/read-file-for-ai-assistant.ts +46 -0
- package/bundled-types/host-app/commands/read-source.ts +46 -0
- package/bundled-types/host-app/commands/read-text-file.ts +44 -0
- package/bundled-types/host-app/commands/register-bot.ts +42 -0
- package/bundled-types/host-app/commands/reindex-realm.ts +30 -0
- package/bundled-types/host-app/commands/retry-submission-workflow.ts +119 -0
- package/bundled-types/host-app/commands/sanitize-module-list.ts +83 -0
- package/bundled-types/host-app/commands/save-card.ts +44 -0
- package/bundled-types/host-app/commands/screenshot-card.ts +148 -0
- package/bundled-types/host-app/commands/search-and-choose.ts +180 -0
- package/bundled-types/host-app/commands/search-cards.ts +102 -0
- package/bundled-types/host-app/commands/search-google-images.ts +100 -0
- package/bundled-types/host-app/commands/send-ai-assistant-message.ts +122 -0
- package/bundled-types/host-app/commands/send-request-via-proxy.ts +70 -0
- package/bundled-types/host-app/commands/serialize-card.ts +45 -0
- package/bundled-types/host-app/commands/set-active-llm.ts +39 -0
- package/bundled-types/host-app/commands/set-user-system-card.ts +29 -0
- package/bundled-types/host-app/commands/show-card.ts +102 -0
- package/bundled-types/host-app/commands/show-file.ts +39 -0
- package/bundled-types/host-app/commands/store-add.ts +37 -0
- package/bundled-types/host-app/commands/summarize-session.ts +82 -0
- package/bundled-types/host-app/commands/switch-submode.ts +112 -0
- package/bundled-types/host-app/commands/sync-openrouter-models.ts +373 -0
- package/bundled-types/host-app/commands/transform-cards.ts +59 -0
- package/bundled-types/host-app/commands/unregister-bot.ts +29 -0
- package/bundled-types/host-app/commands/update-code-path-with-selection.ts +45 -0
- package/bundled-types/host-app/commands/update-playground-selection.ts +37 -0
- package/bundled-types/host-app/commands/update-room-skills.ts +231 -0
- package/bundled-types/host-app/commands/utils.ts +178 -0
- package/bundled-types/host-app/commands/validate-realm.ts +40 -0
- package/bundled-types/host-app/commands/write-binary-file.ts +142 -0
- package/bundled-types/host-app/commands/write-text-file.ts +104 -0
- package/bundled-types/host-app/components/.gitkeep +0 -0
- package/bundled-types/host-app/components/ai-assistant/action-bar.gts +188 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-button-active-bg.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-button-active-bg@2x.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-button-active-bg@3x.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon-animated.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon-bw.png +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon-bw@2x.png +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon-bw@3x.png +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon@2x.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon@3x.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/apply-button/index.gts +226 -0
- package/bundled-types/host-app/components/ai-assistant/apply-button/usage.gts +81 -0
- package/bundled-types/host-app/components/ai-assistant/attached-file-dropdown-menu.gts +179 -0
- package/bundled-types/host-app/components/ai-assistant/attachment-picker/attach-button.gts +176 -0
- package/bundled-types/host-app/components/ai-assistant/attachment-picker/attached-items.gts +271 -0
- package/bundled-types/host-app/components/ai-assistant/attachment-picker/index.gts +144 -0
- package/bundled-types/host-app/components/ai-assistant/attachment-picker/usage.gts +127 -0
- package/bundled-types/host-app/components/ai-assistant/button.gts +60 -0
- package/bundled-types/host-app/components/ai-assistant/chat-input/index.gts +203 -0
- package/bundled-types/host-app/components/ai-assistant/chat-input/usage.gts +68 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/actions.gts +58 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/apply-code-patch-button.gts +66 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/command-header.gts +115 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/diff-editor-header.gts +209 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/index.gts +228 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/patch-footer.gts +32 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/view-code-button.gts +73 -0
- package/bundled-types/host-app/components/ai-assistant/focus-pill/index.gts +60 -0
- package/bundled-types/host-app/components/ai-assistant/focus-pill/usage.gts +45 -0
- package/bundled-types/host-app/components/ai-assistant/llm-mode-toggle.gts +113 -0
- package/bundled-types/host-app/components/ai-assistant/llm-select.gts +158 -0
- package/bundled-types/host-app/components/ai-assistant/message/aibot-message.gts +374 -0
- package/bundled-types/host-app/components/ai-assistant/message/attachments.gts +153 -0
- package/bundled-types/host-app/components/ai-assistant/message/index.gts +678 -0
- package/bundled-types/host-app/components/ai-assistant/message/meta.gts +66 -0
- package/bundled-types/host-app/components/ai-assistant/message/text-content.gts +32 -0
- package/bundled-types/host-app/components/ai-assistant/message/usage.gts +182 -0
- package/bundled-types/host-app/components/ai-assistant/message/user-message.gts +52 -0
- package/bundled-types/host-app/components/ai-assistant/new-session-button.gts +126 -0
- package/bundled-types/host-app/components/ai-assistant/new-session-settings.gts +180 -0
- package/bundled-types/host-app/components/ai-assistant/new-session.gts +83 -0
- package/bundled-types/host-app/components/ai-assistant/panel-popover.gts +102 -0
- package/bundled-types/host-app/components/ai-assistant/panel.gts +453 -0
- package/bundled-types/host-app/components/ai-assistant/past-session-item.gts +323 -0
- package/bundled-types/host-app/components/ai-assistant/past-sessions.gts +115 -0
- package/bundled-types/host-app/components/ai-assistant/rename-session.gts +144 -0
- package/bundled-types/host-app/components/ai-assistant/restore-file-modal.gts +105 -0
- package/bundled-types/host-app/components/ai-assistant/skill-menu/index.gts +190 -0
- package/bundled-types/host-app/components/ai-assistant/skill-menu/skill-toggle.gts +168 -0
- package/bundled-types/host-app/components/ai-assistant/skill-menu/usage.gts +48 -0
- package/bundled-types/host-app/components/ai-assistant/toast.gts +293 -0
- package/bundled-types/host-app/components/card-catalog/modal.gts +579 -0
- package/bundled-types/host-app/components/card-error.gts +41 -0
- package/bundled-types/host-app/components/card-instance-picker/index.gts +54 -0
- package/bundled-types/host-app/components/card-pill.gts +189 -0
- package/bundled-types/host-app/components/card-prerender.gts +880 -0
- package/bundled-types/host-app/components/card-renderer.gts +84 -0
- package/bundled-types/host-app/components/card-search/constants.ts +76 -0
- package/bundled-types/host-app/components/card-search/item-button.gts +243 -0
- package/bundled-types/host-app/components/card-search/panel.gts +150 -0
- package/bundled-types/host-app/components/card-search/search-bar.gts +218 -0
- package/bundled-types/host-app/components/card-search/search-content.gts +604 -0
- package/bundled-types/host-app/components/card-search/search-result-header.gts +165 -0
- package/bundled-types/host-app/components/card-search/search-result-section.gts +545 -0
- package/bundled-types/host-app/components/card-search/section-header.gts +117 -0
- package/bundled-types/host-app/components/editor/directory.gts +308 -0
- package/bundled-types/host-app/components/editor/file-tree.gts +69 -0
- package/bundled-types/host-app/components/editor/import-module.gts +27 -0
- package/bundled-types/host-app/components/editor/indexed-file-tree.gts +572 -0
- package/bundled-types/host-app/components/editor/recent-files.gts +141 -0
- package/bundled-types/host-app/components/file-pill.gts +206 -0
- package/bundled-types/host-app/components/head-format-preview.gts +781 -0
- package/bundled-types/host-app/components/host-mode/breadcrumb-item.gts +150 -0
- package/bundled-types/host-app/components/host-mode/breadcrumbs.gts +131 -0
- package/bundled-types/host-app/components/host-mode/card.gts +199 -0
- package/bundled-types/host-app/components/host-mode/content.gts +195 -0
- package/bundled-types/host-app/components/host-mode/stack-item.gts +310 -0
- package/bundled-types/host-app/components/host-mode/stack.gts +91 -0
- package/bundled-types/host-app/components/matrix/auth-container.gts +66 -0
- package/bundled-types/host-app/components/matrix/auth.gts +73 -0
- package/bundled-types/host-app/components/matrix/forgot-password.gts +487 -0
- package/bundled-types/host-app/components/matrix/login.gts +241 -0
- package/bundled-types/host-app/components/matrix/register-user.gts +843 -0
- package/bundled-types/host-app/components/matrix/room-message-command.gts +330 -0
- package/bundled-types/host-app/components/matrix/room-message.gts +261 -0
- package/bundled-types/host-app/components/matrix/room.gts +1872 -0
- package/bundled-types/host-app/components/matrix/user-profile.gts +99 -0
- package/bundled-types/host-app/components/modal-container.gts +171 -0
- package/bundled-types/host-app/components/operator-mode/binary-file-info.gts +77 -0
- package/bundled-types/host-app/components/operator-mode/card-adoption-chain.gts +99 -0
- package/bundled-types/host-app/components/operator-mode/card-error-detail.gts +87 -0
- package/bundled-types/host-app/components/operator-mode/card-error.gts +177 -0
- package/bundled-types/host-app/components/operator-mode/card-schema-editor.gts +616 -0
- package/bundled-types/host-app/components/operator-mode/card-url-bar.gts +197 -0
- package/bundled-types/host-app/components/operator-mode/choose-file-modal.gts +562 -0
- package/bundled-types/host-app/components/operator-mode/choose-subscription-plan-modal.gts +517 -0
- package/bundled-types/host-app/components/operator-mode/code-editor.gts +736 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/editor-indicator.gts +128 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/format-chooser.gts +589 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/inner-container.gts +162 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/left-panel-toggle.gts +267 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/module-inspector.gts +836 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/field-chooser-modal.gts +97 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/instance-chooser-dropdown.gts +346 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/playground-background.png +0 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/playground-panel.gts +1274 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/playground-preview.gts +155 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/playground.gts +98 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/spec-search.gts +70 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/schema-editor.gts +205 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/spec-preview-badge.gts +72 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/spec-preview.gts +432 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/toggle-button.gts +72 -0
- package/bundled-types/host-app/components/operator-mode/code-submode.gts +1030 -0
- package/bundled-types/host-app/components/operator-mode/container.gts +270 -0
- package/bundled-types/host-app/components/operator-mode/context-menu-button.gts +95 -0
- package/bundled-types/host-app/components/operator-mode/copy-button.gts +277 -0
- package/bundled-types/host-app/components/operator-mode/create-file-modal.gts +1087 -0
- package/bundled-types/host-app/components/operator-mode/create-listing-modal.gts +513 -0
- package/bundled-types/host-app/components/operator-mode/definition-container/base.gts +222 -0
- package/bundled-types/host-app/components/operator-mode/definition-container/clickable.gts +59 -0
- package/bundled-types/host-app/components/operator-mode/definition-container/divider.gts +48 -0
- package/bundled-types/host-app/components/operator-mode/definition-container/index.gts +108 -0
- package/bundled-types/host-app/components/operator-mode/delete-modal.gts +123 -0
- package/bundled-types/host-app/components/operator-mode/detail-panel-selector.gts +320 -0
- package/bundled-types/host-app/components/operator-mode/detail-panel.gts +834 -0
- package/bundled-types/host-app/components/operator-mode/edit-field-modal.gts +450 -0
- package/bundled-types/host-app/components/operator-mode/error-display.gts +590 -0
- package/bundled-types/host-app/components/operator-mode/host-submode/open-site-popover.gts +127 -0
- package/bundled-types/host-app/components/operator-mode/host-submode/publishing-realm-popover.gts +159 -0
- package/bundled-types/host-app/components/operator-mode/host-submode.gts +373 -0
- package/bundled-types/host-app/components/operator-mode/interact-submode/neighbor-stack-trigger.gts +116 -0
- package/bundled-types/host-app/components/operator-mode/interact-submode.gts +1021 -0
- package/bundled-types/host-app/components/operator-mode/new-file-button.gts +187 -0
- package/bundled-types/host-app/components/operator-mode/operator-mode-overlays.gts +511 -0
- package/bundled-types/host-app/components/operator-mode/overlays.gts +342 -0
- package/bundled-types/host-app/components/operator-mode/preview-panel/fitted-format-gallery.gts +127 -0
- package/bundled-types/host-app/components/operator-mode/preview-panel/index.gts +443 -0
- package/bundled-types/host-app/components/operator-mode/preview-panel/markdown-preview.gts +175 -0
- package/bundled-types/host-app/components/operator-mode/preview-panel/metadata-panel.gts +214 -0
- package/bundled-types/host-app/components/operator-mode/preview-panel/rendered-markdown.gts +718 -0
- package/bundled-types/host-app/components/operator-mode/private-dependency-violation.gts +70 -0
- package/bundled-types/host-app/components/operator-mode/profile/profile-email.gts +686 -0
- package/bundled-types/host-app/components/operator-mode/profile/profile-settings-modal.gts +454 -0
- package/bundled-types/host-app/components/operator-mode/profile/profile-subscription.gts +170 -0
- package/bundled-types/host-app/components/operator-mode/profile-info-popover.gts +263 -0
- package/bundled-types/host-app/components/operator-mode/publish-realm-modal.gts +1529 -0
- package/bundled-types/host-app/components/operator-mode/remove-field-modal.gts +135 -0
- package/bundled-types/host-app/components/operator-mode/send-error-to-ai-assistant.gts +195 -0
- package/bundled-types/host-app/components/operator-mode/stack-item.gts +1341 -0
- package/bundled-types/host-app/components/operator-mode/stack.gts +191 -0
- package/bundled-types/host-app/components/operator-mode/submode-layout.gts +781 -0
- package/bundled-types/host-app/components/operator-mode/syntax-error-display.gts +72 -0
- package/bundled-types/host-app/components/operator-mode/workspace-chooser/add-workspace.gts +282 -0
- package/bundled-types/host-app/components/operator-mode/workspace-chooser/index.gts +299 -0
- package/bundled-types/host-app/components/operator-mode/workspace-chooser/item-container.gts +50 -0
- package/bundled-types/host-app/components/operator-mode/workspace-chooser/workspace-loading-indicator.gts +50 -0
- package/bundled-types/host-app/components/operator-mode/workspace-chooser/workspace.gts +1079 -0
- package/bundled-types/host-app/components/pill-menu/index.gts +281 -0
- package/bundled-types/host-app/components/pill-menu/usage.gts +64 -0
- package/bundled-types/host-app/components/prerendered-card-search.gts +274 -0
- package/bundled-types/host-app/components/realm-dropdown.gts +209 -0
- package/bundled-types/host-app/components/realm-picker/index.gts +142 -0
- package/bundled-types/host-app/components/search-sheet/index.gts +426 -0
- package/bundled-types/host-app/components/search-sheet/usage.gts +99 -0
- package/bundled-types/host-app/components/submode-switcher.gts +260 -0
- package/bundled-types/host-app/components/type-picker/index.gts +111 -0
- package/bundled-types/host-app/components/with-known-realms-loaded.gts +47 -0
- package/bundled-types/host-app/components/with-loaded-realm.gts +39 -0
- package/bundled-types/host-app/components/with-subscription-data.gts +247 -0
- package/bundled-types/host-app/config/environment.ts +66 -0
- package/bundled-types/host-app/deprecation-workflow.js +30 -0
- package/bundled-types/host-app/lib/browser-queue.ts +198 -0
- package/bundled-types/host-app/lib/codemirror-context.ts +1081 -0
- package/bundled-types/host-app/lib/command-definitions.ts +41 -0
- package/bundled-types/host-app/lib/download-realm.ts +9 -0
- package/bundled-types/host-app/lib/example-card-helpers.ts +99 -0
- package/bundled-types/host-app/lib/externals.ts +247 -0
- package/bundled-types/host-app/lib/field-path-parser.ts +520 -0
- package/bundled-types/host-app/lib/file-def-manager.ts +712 -0
- package/bundled-types/host-app/lib/file-upload-state.ts +6 -0
- package/bundled-types/host-app/lib/formatted-message/utils.ts +272 -0
- package/bundled-types/host-app/lib/gc-card-store.ts +1084 -0
- package/bundled-types/host-app/lib/host-base-command.ts +29 -0
- package/bundled-types/host-app/lib/html-component.ts +144 -0
- package/bundled-types/host-app/lib/html-to-markdown.ts +96 -0
- package/bundled-types/host-app/lib/isolated-render.gts +90 -0
- package/bundled-types/host-app/lib/known-file-meta-urls.ts +17 -0
- package/bundled-types/host-app/lib/limited-set.ts +68 -0
- package/bundled-types/host-app/lib/matrix-classes/member.ts +28 -0
- package/bundled-types/host-app/lib/matrix-classes/message-builder.ts +444 -0
- package/bundled-types/host-app/lib/matrix-classes/message-code-patch-result.ts +44 -0
- package/bundled-types/host-app/lib/matrix-classes/message-command.ts +109 -0
- package/bundled-types/host-app/lib/matrix-classes/message.ts +239 -0
- package/bundled-types/host-app/lib/matrix-classes/room.ts +174 -0
- package/bundled-types/host-app/lib/matrix-utils.ts +114 -0
- package/bundled-types/host-app/lib/mutex.ts +62 -0
- package/bundled-types/host-app/lib/prerender-fetch-headers.ts +46 -0
- package/bundled-types/host-app/lib/prerender-util.ts +31 -0
- package/bundled-types/host-app/lib/public-path.ts +1 -0
- package/bundled-types/host-app/lib/random-name.ts +26 -0
- package/bundled-types/host-app/lib/realm-utils.ts +45 -0
- package/bundled-types/host-app/lib/search-cache-key.ts +33 -0
- package/bundled-types/host-app/lib/search-in-flight-key.ts +28 -0
- package/bundled-types/host-app/lib/search-replace-block-parsing.ts +101 -0
- package/bundled-types/host-app/lib/setup-globals.ts +15 -0
- package/bundled-types/host-app/lib/sqlite-adapter.ts +510 -0
- package/bundled-types/host-app/lib/stack-item.ts +164 -0
- package/bundled-types/host-app/lib/utils.ts +84 -0
- package/bundled-types/host-app/lib/window-error-handler.ts +132 -0
- package/bundled-types/host-app/router.ts +31 -0
- package/bundled-types/host-app/services/ai-assistant-panel-service.ts +850 -0
- package/bundled-types/host-app/services/billing-service.ts +208 -0
- package/bundled-types/host-app/services/card-service.ts +373 -0
- package/bundled-types/host-app/services/card-type-service.ts +226 -0
- package/bundled-types/host-app/services/code-semantics-service.ts +297 -0
- package/bundled-types/host-app/services/command-service.ts +975 -0
- package/bundled-types/host-app/services/environment-service.ts +26 -0
- package/bundled-types/host-app/services/error-display.ts +42 -0
- package/bundled-types/host-app/services/file-upload.ts +212 -0
- package/bundled-types/host-app/services/host-mode-service.ts +381 -0
- package/bundled-types/host-app/services/host-mode-state-service.ts +160 -0
- package/bundled-types/host-app/services/loader-service.ts +148 -0
- package/bundled-types/host-app/services/local-indexer.ts +68 -0
- package/bundled-types/host-app/services/local-persistence-service.ts +296 -0
- package/bundled-types/host-app/services/logger-service.ts +13 -0
- package/bundled-types/host-app/services/matrix-sdk-loader.ts +346 -0
- package/bundled-types/host-app/services/matrix-service.ts +2287 -0
- package/bundled-types/host-app/services/message-service.ts +84 -0
- package/bundled-types/host-app/services/module-contents-service.ts +333 -0
- package/bundled-types/host-app/services/monaco-service.ts +333 -0
- package/bundled-types/host-app/services/network.ts +101 -0
- package/bundled-types/host-app/services/operator-mode-state-service.ts +1591 -0
- package/bundled-types/host-app/services/playground-panel-service.ts +236 -0
- package/bundled-types/host-app/services/queue.ts +30 -0
- package/bundled-types/host-app/services/realm-info-service.ts +37 -0
- package/bundled-types/host-app/services/realm-server.ts +1209 -0
- package/bundled-types/host-app/services/realm.ts +1413 -0
- package/bundled-types/host-app/services/recent-cards-service.ts +174 -0
- package/bundled-types/host-app/services/recent-files-service.ts +224 -0
- package/bundled-types/host-app/services/render-error-state.ts +55 -0
- package/bundled-types/host-app/services/render-service.ts +362 -0
- package/bundled-types/host-app/services/render-store.ts +27 -0
- package/bundled-types/host-app/services/reset.ts +19 -0
- package/bundled-types/host-app/services/scroll-position-service.ts +81 -0
- package/bundled-types/host-app/services/spec-panel-service.ts +107 -0
- package/bundled-types/host-app/services/store.ts +2540 -0
- package/bundled-types/host-app/utils/assert-never.ts +3 -0
- package/bundled-types/host-app/utils/auth-error-guard.ts +183 -0
- package/bundled-types/host-app/utils/auth-service-worker-registration.ts +123 -0
- package/bundled-types/host-app/utils/card-search/query-builder.ts +169 -0
- package/bundled-types/host-app/utils/card-search/section-pagination.ts +57 -0
- package/bundled-types/host-app/utils/card-search/sections.ts +240 -0
- package/bundled-types/host-app/utils/card-search/type-filter.ts +124 -0
- package/bundled-types/host-app/utils/card-search/types.ts +11 -0
- package/bundled-types/host-app/utils/card-search/url.ts +23 -0
- package/bundled-types/host-app/utils/clipboard.ts +23 -0
- package/bundled-types/host-app/utils/editor/boxel-formatter.ts +65 -0
- package/bundled-types/host-app/utils/editor/editor-language.ts +88 -0
- package/bundled-types/host-app/utils/editor/monaco-test-waiter.ts +302 -0
- package/bundled-types/host-app/utils/file-def-attributes-extractor.ts +438 -0
- package/bundled-types/host-app/utils/file-name.ts +38 -0
- package/bundled-types/host-app/utils/id-from-card-or-url.ts +11 -0
- package/bundled-types/host-app/utils/lint-formatting.ts +57 -0
- package/bundled-types/host-app/utils/local-storage-keys.ts +28 -0
- package/bundled-types/host-app/utils/normalized-dir-path.ts +3 -0
- package/bundled-types/host-app/utils/prettify-messages.ts +21 -0
- package/bundled-types/host-app/utils/prettify-prompts.ts +21 -0
- package/bundled-types/host-app/utils/realm-index-boilerplate.ts +27 -0
- package/bundled-types/host-app/utils/register-boxel-transition.ts +17 -0
- package/bundled-types/host-app/utils/render-desync-detector.ts +362 -0
- package/bundled-types/host-app/utils/render-error.ts +455 -0
- package/bundled-types/host-app/utils/render-timer-stub.ts +249 -0
- package/bundled-types/host-app/utils/run-while-active.ts +14 -0
- package/bundled-types/host-app/utils/schema-editor.ts +25 -0
- package/bundled-types/host-app/utils/text-suggestion.ts +82 -0
- package/bundled-types/host-app/utils/titleize.ts +10 -0
- package/bundled-types/host-app/utils/uuid.ts +13 -0
- package/bundled-types/host-tests/helpers/adapter.ts +464 -0
- package/bundled-types/host-tests/helpers/base-realm.ts +464 -0
- package/bundled-types/host-tests/helpers/cards/view-card-demo.ts +119 -0
- package/bundled-types/host-tests/helpers/field-test-helpers.gts +54 -0
- package/bundled-types/host-tests/helpers/image-fixture.ts +3 -0
- package/bundled-types/host-tests/helpers/index.gts +2099 -0
- package/bundled-types/host-tests/helpers/indexer.ts +293 -0
- package/bundled-types/host-tests/helpers/interact-submode-setup.gts +551 -0
- package/bundled-types/host-tests/helpers/mock-matrix/_client.ts +1042 -0
- package/bundled-types/host-tests/helpers/mock-matrix/_sdk.ts +71 -0
- package/bundled-types/host-tests/helpers/mock-matrix/_server-state.ts +343 -0
- package/bundled-types/host-tests/helpers/mock-matrix/_sliding-sync.ts +140 -0
- package/bundled-types/host-tests/helpers/mock-matrix/_utils.ts +146 -0
- package/bundled-types/host-tests/helpers/mock-matrix.ts +200 -0
- package/bundled-types/host-tests/helpers/operator-mode-parameters-match.ts +71 -0
- package/bundled-types/host-tests/helpers/operator-mode-state.ts +18 -0
- package/bundled-types/host-tests/helpers/percy-snapshot.ts +228 -0
- package/bundled-types/host-tests/helpers/playground.ts +130 -0
- package/bundled-types/host-tests/helpers/realm-server-mock/index.ts +100 -0
- package/bundled-types/host-tests/helpers/realm-server-mock/routes.ts +617 -0
- package/bundled-types/host-tests/helpers/realm-server-mock/types.ts +24 -0
- package/bundled-types/host-tests/helpers/recent-files-cards.ts +86 -0
- package/bundled-types/host-tests/helpers/render-component.ts +40 -0
- package/bundled-types/host-tests/helpers/setup-qunit.js +164 -0
- package/bundled-types/host-tests/helpers/setup.ts +349 -0
- package/bundled-types/host-tests/helpers/shard-warmup.ts +72 -0
- package/bundled-types/host-tests/helpers/stream.ts +60 -0
- package/bundled-types/host-tests/helpers/test-auth.ts +27 -0
- package/bundled-types/host-tests/helpers/test-realm-registry.ts +23 -0
- package/bundled-types/host-tests/helpers/test-realm-service-worker.ts +92 -0
- package/bundled-types/host-tests/helpers/uncaught-exceptions.ts +16 -0
- package/bundled-types/host-tests/helpers/visit-operator-mode.ts +39 -0
- package/bundled-types/host-types/@cardstack/host/index.d.ts +3 -0
- package/bundled-types/host-types/@joplin/turndown-plugin-gfm/index.d.ts +15 -0
- package/bundled-types/host-types/@sqlite.org/sqlite-wasm/index.d.ts +122 -0
- package/bundled-types/host-types/ember-click-outside/modifiers/on-click-outside.ts +16 -0
- package/bundled-types/host-types/ember-concurrency/helpers/perform.d.ts +3 -0
- package/bundled-types/host-types/ember-css-url/index.d.ts +15 -0
- package/bundled-types/host-types/ember-data/types/registries/model.d.ts +6 -0
- package/bundled-types/host-types/ember-elsewhere/from-elsewhere.d.ts +12 -0
- package/bundled-types/host-types/ember-elsewhere/to-elsewhere.d.ts +16 -0
- package/bundled-types/host-types/ember-focus-trap/index.d.ts +4 -0
- package/bundled-types/host-types/ember-keyboard/modifiers/on-key.d.ts +15 -0
- package/bundled-types/host-types/index.d.ts +6 -0
- package/bundled-types/local-types/eslint-js.d.ts +5 -0
- package/bundled-types/local-types/index.d.ts +115 -0
- package/bundled-types/local-types/marked-gfm-heading-id.d.ts +12 -0
- package/bundled-types/local-types/matrix-js-sdk/index.d.ts +11 -0
- package/bundled-types/local-types/package.json +13 -0
- package/bundled-types/shims/boxel-cli-shims.d.ts +10 -0
- package/dist/index.js +100 -100
- package/package.json +13 -7
- package/src/commands/parse.ts +277 -34
package/dist/index.js
CHANGED
|
@@ -1,130 +1,130 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
3
|
-
`);let r;for(;(r=
|
|
4
|
-
`),s=s.replace(/\\r/g,"\r")),e[n]=s}return e}function Kp(i){i=i||{};let e=Hn(i);i.path=e;let t=H.configDotenv(i);if(!t.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);throw o.code="MISSING_DATA",o}let r=Gn(i).split(","),n=r.length,s;for(let o=0;o<n;o++)try{let a=r[o].trim(),c=Zp(t,a);s=H.decrypt(c.ciphertext,c.key);break}catch(a){if(o+1>=n)throw a}return H.parse(s)}function Qp(i){console.log(`[dotenv@${Li}][WARN] ${i}`)}function et(i){console.log(`[dotenv@${Li}][DEBUG] ${i}`)}function qn(i){console.log(`[dotenv@${Li}] ${i}`)}function Gn(i){return i&&i.DOTENV_KEY&&i.DOTENV_KEY.length>0?i.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function Zp(i,e){let t;try{t=new URL(e)}catch(a){if(a.code==="ERR_INVALID_URL"){let c=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw c.code="INVALID_DOTENV_KEY",c}throw a}let r=t.password;if(!r){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let n=t.searchParams.get("environment");if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let s=`DOTENV_VAULT_${n.toUpperCase()}`,o=i.parsed[s];if(!o){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:o,key:r}}function Hn(i){let e=null;if(i&&i.path&&i.path.length>0)if(Array.isArray(i.path))for(let t of i.path)Ai.existsSync(t)&&(e=t.endsWith(".vault")?t:`${t}.vault`);else e=i.path.endsWith(".vault")?i.path:`${i.path}.vault`;else e=$t.resolve(process.cwd(),".env.vault");return Ai.existsSync(e)?e:null}function Dn(i){return i[0]==="~"?$t.join(Bp.homedir(),i.slice(1)):i}function eu(i){let e=!!(i&&i.debug),t=i&&"quiet"in i?i.quiet:!0;(e||!t)&&qn("Loading env from encrypted .env.vault");let r=H._parseVault(i),n=process.env;return i&&i.processEnv!=null&&(n=i.processEnv),H.populate(n,r,i),{parsed:r}}function tu(i){let e=$t.resolve(process.cwd(),".env"),t="utf8",r=!!(i&&i.debug),n=i&&"quiet"in i?i.quiet:!0;i&&i.encoding?t=i.encoding:r&&et("No encoding is specified. UTF-8 is used by default");let s=[e];if(i&&i.path)if(!Array.isArray(i.path))s=[Dn(i.path)];else{s=[];for(let l of i.path)s.push(Dn(l))}let o,a={};for(let l of s)try{let p=H.parse(Ai.readFileSync(l,{encoding:t}));H.populate(a,p,i)}catch(p){r&&et(`Failed to load ${l} ${p.message}`),o=p}let c=process.env;if(i&&i.processEnv!=null&&(c=i.processEnv),H.populate(c,a,i),r||!n){let l=Object.keys(a).length,p=[];for(let u of s)try{let d=$t.relative(process.cwd(),u);p.push(d)}catch(d){r&&et(`Failed to load ${u} ${d.message}`),o=d}qn(`injecting env (${l}) from ${p.join(",")}`)}return o?{parsed:a,error:o}:{parsed:a}}function iu(i){if(Gn(i).length===0)return H.configDotenv(i);let e=Hn(i);return e?H._configVault(i):(Qp(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),H.configDotenv(i))}function ru(i,e){let t=Buffer.from(e.slice(-64),"hex"),r=Buffer.from(i,"base64"),n=r.subarray(0,12),s=r.subarray(-16);r=r.subarray(12,-16);try{let o=zp.createDecipheriv("aes-256-gcm",t,n);return o.setAuthTag(s),`${o.update(r)}${o.final()}`}catch(o){let a=o instanceof RangeError,c=o.message==="Invalid key length",l=o.message==="Unsupported state or unable to authenticate data";if(a||c){let p=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw p.code="INVALID_DOTENV_KEY",p}else if(l){let p=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw p.code="DECRYPTION_FAILED",p}else throw o}}function nu(i,e,t={}){let r=!!(t&&t.debug),n=!!(t&&t.override);if(typeof e!="object"){let s=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw s.code="OBJECT_REQUIRED",s}for(let s of Object.keys(e))Object.prototype.hasOwnProperty.call(i,s)?(n===!0&&(i[s]=e[s]),r&&et(n===!0?`"${s}" is already defined and WAS overwritten`:`"${s}" is already defined and was NOT overwritten`)):i[s]=e[s]}var H={configDotenv:tu,_configVault:eu,_parseVault:Kp,config:iu,decrypt:ru,parse:Xp,populate:nu};we.exports.configDotenv=H.configDotenv;we.exports._configVault=H._configVault;we.exports._parseVault=H._parseVault;we.exports.config=H.config;we.exports.decrypt=H.decrypt;we.exports.parse=H.parse;we.exports.populate=H.populate;we.exports=H});var Bn=v((ky,Vn)=>{var Ae={};process.env.DOTENV_CONFIG_ENCODING!=null&&(Ae.encoding=process.env.DOTENV_CONFIG_ENCODING);process.env.DOTENV_CONFIG_PATH!=null&&(Ae.path=process.env.DOTENV_CONFIG_PATH);process.env.DOTENV_CONFIG_QUIET!=null&&(Ae.quiet=process.env.DOTENV_CONFIG_QUIET);process.env.DOTENV_CONFIG_DEBUG!=null&&(Ae.debug=process.env.DOTENV_CONFIG_DEBUG);process.env.DOTENV_CONFIG_OVERRIDE!=null&&(Ae.override=process.env.DOTENV_CONFIG_OVERRIDE);process.env.DOTENV_CONFIG_DOTENV_KEY!=null&&(Ae.DOTENV_KEY=process.env.DOTENV_CONFIG_DOTENV_KEY);Vn.exports=Ae});var Yn=v((Sy,zn)=>{var su=/^dotenv_config_(encoding|path|quiet|debug|override|DOTENV_KEY)=(.+)$/;zn.exports=function(e){let t=e.reduce(function(r,n){let s=n.match(su);return s&&(r[s[1]]=s[2]),r},{});return"quiet"in t||(t.quiet="true"),t}});var tt=v(Mi=>{var kt=class extends Error{constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},ji=class extends kt{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Mi.CommanderError=kt;Mi.InvalidArgumentError=ji});var St=v(Ni=>{var{InvalidArgumentError:ou}=tt(),Ii=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new ou(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,r):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function au(i){let e=i.name()+(i.variadic===!0?"...":"");return i.required?"<"+e+">":"["+e+"]"}Ni.Argument=Ii;Ni.humanReadableArgName=au});var Di=v(Ui=>{var{humanReadableArgName:cu}=St(),Fi=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(n=>!n._hidden),r=e._getHelpCommand();return r&&!r._hidden&&t.push(r),this.sortSubcommands&&t.sort((n,s)=>n.name().localeCompare(s.name())),t}compareOptions(e,t){let r=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return r(e).localeCompare(r(t))}visibleOptions(e){let t=e.options.filter(n=>!n.hidden),r=e._getHelpOption();if(r&&!r.hidden){let n=r.short&&e._findOption(r.short),s=r.long&&e._findOption(r.long);!n&&!s?t.push(r):r.long&&!s?t.push(e.createOption(r.long,r.description)):r.short&&!n&&t.push(e.createOption(r.short,r.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let r=e.parent;r;r=r.parent){let n=r.options.filter(s=>!s.hidden);t.push(...n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(r=>cu(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let r="";for(let n=e.parent;n;n=n.parent)r=n.name()+" "+r;return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatHelp(e,t){let r=t.padWidth(e,t),n=t.helpWidth??80;function s(u,d){return t.formatItem(u,r,d,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],a=t.commandDescription(e);a.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(a),n),""]));let c=t.visibleArguments(e).map(u=>s(t.styleArgumentTerm(t.argumentTerm(u)),t.styleArgumentDescription(t.argumentDescription(u))));c.length>0&&(o=o.concat([t.styleTitle("Arguments:"),...c,""]));let l=t.visibleOptions(e).map(u=>s(t.styleOptionTerm(t.optionTerm(u)),t.styleOptionDescription(t.optionDescription(u))));if(l.length>0&&(o=o.concat([t.styleTitle("Options:"),...l,""])),t.showGlobalOptions){let u=t.visibleGlobalOptions(e).map(d=>s(t.styleOptionTerm(t.optionTerm(d)),t.styleOptionDescription(t.optionDescription(d))));u.length>0&&(o=o.concat([t.styleTitle("Global Options:"),...u,""]))}let p=t.visibleCommands(e).map(u=>s(t.styleSubcommandTerm(t.subcommandTerm(u)),t.styleSubcommandDescription(t.subcommandDescription(u))));return p.length>0&&(o=o.concat([t.styleTitle("Commands:"),...p,""])),o.join(`
|
|
5
|
-
`)}displayWidth(e){return
|
|
2
|
+
"use strict";var qp=Object.create;var Un=Object.defineProperty;var Hp=Object.getOwnPropertyDescriptor;var Wp=Object.getOwnPropertyNames;var Gp=Object.getPrototypeOf,Vp=Object.prototype.hasOwnProperty;var v=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var Bp=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Wp(e))!Vp.call(i,n)&&n!==t&&Un(i,n,{get:()=>e[n],enumerable:!(r=Hp(e,n))||r.enumerable});return i};var P=(i,e,t)=>(t=i!=null?qp(Gp(i)):{},Bp(e||!i||!i.__esModule?Un(t,"default",{value:i,enumerable:!0}):t,i));var Dn=v((Ly,zp)=>{zp.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Vn=v((jy,Ee)=>{var Mi=require("fs"),_t=require("path"),Yp=require("os"),Jp=require("crypto"),Xp=Dn(),Ii=Xp.version,Kp=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Qp(i){let e={},t=i.toString();t=t.replace(/\r\n?/mg,`
|
|
3
|
+
`);let r;for(;(r=Kp.exec(t))!=null;){let n=r[1],s=r[2]||"";s=s.trim();let o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(s=s.replace(/\\n/g,`
|
|
4
|
+
`),s=s.replace(/\\r/g,"\r")),e[n]=s}return e}function Zp(i){i=i||{};let e=Gn(i);i.path=e;let t=G.configDotenv(i);if(!t.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);throw o.code="MISSING_DATA",o}let r=Wn(i).split(","),n=r.length,s;for(let o=0;o<n;o++)try{let a=r[o].trim(),c=tu(t,a);s=G.decrypt(c.ciphertext,c.key);break}catch(a){if(o+1>=n)throw a}return G.parse(s)}function eu(i){console.log(`[dotenv@${Ii}][WARN] ${i}`)}function rt(i){console.log(`[dotenv@${Ii}][DEBUG] ${i}`)}function Hn(i){console.log(`[dotenv@${Ii}] ${i}`)}function Wn(i){return i&&i.DOTENV_KEY&&i.DOTENV_KEY.length>0?i.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function tu(i,e){let t;try{t=new URL(e)}catch(a){if(a.code==="ERR_INVALID_URL"){let c=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw c.code="INVALID_DOTENV_KEY",c}throw a}let r=t.password;if(!r){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let n=t.searchParams.get("environment");if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let s=`DOTENV_VAULT_${n.toUpperCase()}`,o=i.parsed[s];if(!o){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:o,key:r}}function Gn(i){let e=null;if(i&&i.path&&i.path.length>0)if(Array.isArray(i.path))for(let t of i.path)Mi.existsSync(t)&&(e=t.endsWith(".vault")?t:`${t}.vault`);else e=i.path.endsWith(".vault")?i.path:`${i.path}.vault`;else e=_t.resolve(process.cwd(),".env.vault");return Mi.existsSync(e)?e:null}function qn(i){return i[0]==="~"?_t.join(Yp.homedir(),i.slice(1)):i}function iu(i){let e=!!(i&&i.debug),t=i&&"quiet"in i?i.quiet:!0;(e||!t)&&Hn("Loading env from encrypted .env.vault");let r=G._parseVault(i),n=process.env;return i&&i.processEnv!=null&&(n=i.processEnv),G.populate(n,r,i),{parsed:r}}function ru(i){let e=_t.resolve(process.cwd(),".env"),t="utf8",r=!!(i&&i.debug),n=i&&"quiet"in i?i.quiet:!0;i&&i.encoding?t=i.encoding:r&&rt("No encoding is specified. UTF-8 is used by default");let s=[e];if(i&&i.path)if(!Array.isArray(i.path))s=[qn(i.path)];else{s=[];for(let l of i.path)s.push(qn(l))}let o,a={};for(let l of s)try{let p=G.parse(Mi.readFileSync(l,{encoding:t}));G.populate(a,p,i)}catch(p){r&&rt(`Failed to load ${l} ${p.message}`),o=p}let c=process.env;if(i&&i.processEnv!=null&&(c=i.processEnv),G.populate(c,a,i),r||!n){let l=Object.keys(a).length,p=[];for(let u of s)try{let f=_t.relative(process.cwd(),u);p.push(f)}catch(f){r&&rt(`Failed to load ${u} ${f.message}`),o=f}Hn(`injecting env (${l}) from ${p.join(",")}`)}return o?{parsed:a,error:o}:{parsed:a}}function nu(i){if(Wn(i).length===0)return G.configDotenv(i);let e=Gn(i);return e?G._configVault(i):(eu(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),G.configDotenv(i))}function su(i,e){let t=Buffer.from(e.slice(-64),"hex"),r=Buffer.from(i,"base64"),n=r.subarray(0,12),s=r.subarray(-16);r=r.subarray(12,-16);try{let o=Jp.createDecipheriv("aes-256-gcm",t,n);return o.setAuthTag(s),`${o.update(r)}${o.final()}`}catch(o){let a=o instanceof RangeError,c=o.message==="Invalid key length",l=o.message==="Unsupported state or unable to authenticate data";if(a||c){let p=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw p.code="INVALID_DOTENV_KEY",p}else if(l){let p=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw p.code="DECRYPTION_FAILED",p}else throw o}}function ou(i,e,t={}){let r=!!(t&&t.debug),n=!!(t&&t.override);if(typeof e!="object"){let s=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw s.code="OBJECT_REQUIRED",s}for(let s of Object.keys(e))Object.prototype.hasOwnProperty.call(i,s)?(n===!0&&(i[s]=e[s]),r&&rt(n===!0?`"${s}" is already defined and WAS overwritten`:`"${s}" is already defined and was NOT overwritten`)):i[s]=e[s]}var G={configDotenv:ru,_configVault:iu,_parseVault:Zp,config:nu,decrypt:su,parse:Qp,populate:ou};Ee.exports.configDotenv=G.configDotenv;Ee.exports._configVault=G._configVault;Ee.exports._parseVault=G._parseVault;Ee.exports.config=G.config;Ee.exports.decrypt=G.decrypt;Ee.exports.parse=G.parse;Ee.exports.populate=G.populate;Ee.exports=G});var zn=v((My,Bn)=>{var Le={};process.env.DOTENV_CONFIG_ENCODING!=null&&(Le.encoding=process.env.DOTENV_CONFIG_ENCODING);process.env.DOTENV_CONFIG_PATH!=null&&(Le.path=process.env.DOTENV_CONFIG_PATH);process.env.DOTENV_CONFIG_QUIET!=null&&(Le.quiet=process.env.DOTENV_CONFIG_QUIET);process.env.DOTENV_CONFIG_DEBUG!=null&&(Le.debug=process.env.DOTENV_CONFIG_DEBUG);process.env.DOTENV_CONFIG_OVERRIDE!=null&&(Le.override=process.env.DOTENV_CONFIG_OVERRIDE);process.env.DOTENV_CONFIG_DOTENV_KEY!=null&&(Le.DOTENV_KEY=process.env.DOTENV_CONFIG_DOTENV_KEY);Bn.exports=Le});var Jn=v((Iy,Yn)=>{var au=/^dotenv_config_(encoding|path|quiet|debug|override|DOTENV_KEY)=(.+)$/;Yn.exports=function(e){let t=e.reduce(function(r,n){let s=n.match(au);return s&&(r[s[1]]=s[2]),r},{});return"quiet"in t||(t.quiet="true"),t}});var nt=v(Fi=>{var Ct=class extends Error{constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},Ni=class extends Ct{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Fi.CommanderError=Ct;Fi.InvalidArgumentError=Ni});var Tt=v(Di=>{var{InvalidArgumentError:cu}=nt(),Ui=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new cu(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,r):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function lu(i){let e=i.name()+(i.variadic===!0?"...":"");return i.required?"<"+e+">":"["+e+"]"}Di.Argument=Ui;Di.humanReadableArgName=lu});var Wi=v(Hi=>{var{humanReadableArgName:pu}=Tt(),qi=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(n=>!n._hidden),r=e._getHelpCommand();return r&&!r._hidden&&t.push(r),this.sortSubcommands&&t.sort((n,s)=>n.name().localeCompare(s.name())),t}compareOptions(e,t){let r=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return r(e).localeCompare(r(t))}visibleOptions(e){let t=e.options.filter(n=>!n.hidden),r=e._getHelpOption();if(r&&!r.hidden){let n=r.short&&e._findOption(r.short),s=r.long&&e._findOption(r.long);!n&&!s?t.push(r):r.long&&!s?t.push(e.createOption(r.long,r.description)):r.short&&!n&&t.push(e.createOption(r.short,r.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let r=e.parent;r;r=r.parent){let n=r.options.filter(s=>!s.hidden);t.push(...n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(r=>pu(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let r="";for(let n=e.parent;n;n=n.parent)r=n.name()+" "+r;return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatHelp(e,t){let r=t.padWidth(e,t),n=t.helpWidth??80;function s(u,f){return t.formatItem(u,r,f,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],a=t.commandDescription(e);a.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(a),n),""]));let c=t.visibleArguments(e).map(u=>s(t.styleArgumentTerm(t.argumentTerm(u)),t.styleArgumentDescription(t.argumentDescription(u))));c.length>0&&(o=o.concat([t.styleTitle("Arguments:"),...c,""]));let l=t.visibleOptions(e).map(u=>s(t.styleOptionTerm(t.optionTerm(u)),t.styleOptionDescription(t.optionDescription(u))));if(l.length>0&&(o=o.concat([t.styleTitle("Options:"),...l,""])),t.showGlobalOptions){let u=t.visibleGlobalOptions(e).map(f=>s(t.styleOptionTerm(t.optionTerm(f)),t.styleOptionDescription(t.optionDescription(f))));u.length>0&&(o=o.concat([t.styleTitle("Global Options:"),...u,""]))}let p=t.visibleCommands(e).map(u=>s(t.styleSubcommandTerm(t.subcommandTerm(u)),t.styleSubcommandDescription(t.subcommandDescription(u))));return p.length>0&&(o=o.concat([t.styleTitle("Commands:"),...p,""])),o.join(`
|
|
5
|
+
`)}displayWidth(e){return Xn(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,r,n){let o=" ".repeat(2);if(!r)return o+e;let a=e.padEnd(t+e.length-n.displayWidth(e)),c=2,p=(this.helpWidth??80)-t-c-2,u;return p<this.minWidthToWrap||n.preformatted(r)?u=r:u=n.boxWrap(r,p).replace(/\n/g,`
|
|
6
6
|
`+" ".repeat(t+c)),o+a+" ".repeat(c)+u.replace(/\n/g,`
|
|
7
|
-
${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,s=[];return r.forEach(o=>{let a=o.match(n);if(a===null){s.push("");return}let c=[a.shift()],l=this.displayWidth(c[0]);a.forEach(p=>{let u=this.displayWidth(p);if(l+u<=t){c.push(p),l+=u;return}s.push(c.join(""));let
|
|
8
|
-
`)}};function
|
|
7
|
+
${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,s=[];return r.forEach(o=>{let a=o.match(n);if(a===null){s.push("");return}let c=[a.shift()],l=this.displayWidth(c[0]);a.forEach(p=>{let u=this.displayWidth(p);if(l+u<=t){c.push(p),l+=u;return}s.push(c.join(""));let f=p.trimStart();c=[f],l=this.displayWidth(f)}),s.push(c.join(""))}),s.join(`
|
|
8
|
+
`)}};function Xn(i){let e=/\x1b\[\d*(;\d*)*m/g;return i.replace(e,"")}Hi.Help=qi;Hi.stripColor=Xn});var zi=v(Bi=>{var{InvalidArgumentError:uu}=nt(),Gi=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=mu(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new uu(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,r):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Kn(this.name().replace(/^no-/,"")):Kn(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Vi=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,t){let r=t.attributeName();if(!this.dualOptions.has(r))return!0;let n=this.negativeOptions.get(r).presetArg,s=n!==void 0?n:!1;return t.negate===(s===e)}};function Kn(i){return i.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function mu(i){let e,t,r=/^-[^-]$/,n=/^--[^-]/,s=i.split(/[ |,]+/).concat("guard");if(r.test(s[0])&&(e=s.shift()),n.test(s[0])&&(t=s.shift()),!e&&r.test(s[0])&&(e=s.shift()),!e&&n.test(s[0])&&(e=t,t=s.shift()),s[0].startsWith("-")){let o=s[0],a=`option creation failed due to '${o}' in option flags '${i}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
|
|
9
9
|
- a short flag is a single dash and a single character
|
|
10
10
|
- either use a single dash and a single character (for a short flag)
|
|
11
11
|
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(o)?new Error(`${a}
|
|
12
12
|
- too many short flags`):n.test(o)?new Error(`${a}
|
|
13
13
|
- too many long flags`):new Error(`${a}
|
|
14
|
-
- unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${i}'.`);return{shortFlag:e,longFlag:t}}
|
|
14
|
+
- unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${i}'.`);return{shortFlag:e,longFlag:t}}Bi.Option=Gi;Bi.DualOptions=Vi});var Zn=v(Qn=>{function du(i,e){if(Math.abs(i.length-e.length)>3)return Math.max(i.length,e.length);let t=[];for(let r=0;r<=i.length;r++)t[r]=[r];for(let r=0;r<=e.length;r++)t[0][r]=r;for(let r=1;r<=e.length;r++)for(let n=1;n<=i.length;n++){let s=1;i[n-1]===e[r-1]?s=0:s=1,t[n][r]=Math.min(t[n-1][r]+1,t[n][r-1]+1,t[n-1][r-1]+s),n>1&&r>1&&i[n-1]===e[r-2]&&i[n-2]===e[r-1]&&(t[n][r]=Math.min(t[n][r],t[n-2][r-2]+1))}return t[i.length][e.length]}function fu(i,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=i.startsWith("--");t&&(i=i.slice(2),e=e.map(o=>o.slice(2)));let r=[],n=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=du(i,o),c=Math.max(i.length,o.length);(c-a)/c>s&&(a<n?(n=a,r=[o]):a===n&&r.push(o))}),r.sort((o,a)=>o.localeCompare(a)),t&&(r=r.map(o=>`--${o}`)),r.length>1?`
|
|
15
15
|
(Did you mean one of ${r.join(", ")}?)`:r.length===1?`
|
|
16
|
-
(Did you mean ${r[0]}?)`:""}
|
|
17
|
-
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new
|
|
18
|
-
Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,r){this._exitCallback&&this._exitCallback(new
|
|
19
|
-
- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=n=>[n.name()].concat(n.aliases()),r=t(e).find(n=>this._findCommand(n));if(r){let n=t(this._findCommand(r)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),r=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let n=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let c=this.getOptionValue(r);s!==null&&e.parseArg?s=this._callParseArg(e,s,c,o):s!==null&&e.variadic&&(s=e._concatValue(s,c)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(r,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;n(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;n(s,o,"env")}),this}_optionEx(e,t,r,n,s){if(typeof t=="object"&&t instanceof
|
|
20
|
-
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,r){if(
|
|
16
|
+
(Did you mean ${r[0]}?)`:""}Qn.suggestSimilar=fu});var rs=v(Qi=>{var hu=require("node:events").EventEmitter,Yi=require("node:child_process"),Re=require("node:path"),Ot=require("node:fs"),M=require("node:process"),{Argument:gu,humanReadableArgName:xu}=Tt(),{CommanderError:Ji}=nt(),{Help:vu,stripColor:bu}=Wi(),{Option:es,DualOptions:yu}=zi(),{suggestSimilar:ts}=Zn(),Xi=class i extends hu{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>M.stdout.write(t),writeErr:t=>M.stderr.write(t),outputError:(t,r)=>r(t),getOutHelpWidth:()=>M.stdout.isTTY?M.stdout.columns:void 0,getErrHelpWidth:()=>M.stderr.isTTY?M.stderr.columns:void 0,getOutHasColors:()=>Ki()??(M.stdout.isTTY&&M.stdout.hasColors?.()),getErrHasColors:()=>Ki()??(M.stderr.isTTY&&M.stderr.hasColors?.()),stripColor:t=>bu(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,r){let n=t,s=r;typeof n=="object"&&n!==null&&(s=n,n=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),c=this.createCommand(o);return n&&(c.description(n),c._executableHandler=!0),s.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(s.noHelp||s.hidden),c._executableFile=s.executableFile||null,a&&c.arguments(a),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),n?this:c}createCommand(e){return new i(e)}createHelp(){return Object.assign(new vu,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
17
|
+
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new gu(e,t)}argument(e,t,r,n){let s=this.createArgument(e,t);return typeof r=="function"?s.default(n).argParser(r):s.default(r),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,r,n]=e.match(/([^ ]+) *(.*)/),s=t??"display help for command",o=this.createCommand(r);return o.helpOption(!1),n&&o.arguments(n),s&&o.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
18
|
+
Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,r){this._exitCallback&&this._exitCallback(new Ji(e,t,r)),M.exit(e)}action(e){let t=r=>{let n=this.registeredArguments.length,s=r.slice(0,n);return this._storeOptionsAsProperties?s[n]=this:s[n]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new es(e,t)}_callParseArg(e,t,r,n){try{return e.parseArg(t,r)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${n} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'
|
|
19
|
+
- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=n=>[n.name()].concat(n.aliases()),r=t(e).find(n=>this._findCommand(n));if(r){let n=t(this._findCommand(r)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),r=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let n=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let c=this.getOptionValue(r);s!==null&&e.parseArg?s=this._callParseArg(e,s,c,o):s!==null&&e.variadic&&(s=e._concatValue(s,c)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(r,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;n(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;n(s,o,"env")}),this}_optionEx(e,t,r,n,s){if(typeof t=="object"&&t instanceof es)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,r);if(o.makeOptionMandatory(!!e.mandatory),typeof n=="function")o.default(s).argParser(n);else if(n instanceof RegExp){let a=n;n=(c,l)=>{let p=a.exec(c);return p?p[0]:l},o.default(s).argParser(n)}else o.default(n);return this.addOption(o)}option(e,t,r,n){return this._optionEx({},e,t,r,n)}requiredOption(e,t,r,n){return this._optionEx({mandatory:!0},e,t,r,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,r){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(t=r.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){M.versions?.electron&&(t.from="electron");let n=M.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(t.from="eval")}e===void 0&&(e=M.argv),this.rawArgs=e.slice();let r;switch(t.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":M.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return this._parseCommand([],r),this}async parseAsync(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return await this._parseCommand([],r),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
20
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,r){if(Ot.existsSync(e))return;let n=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${e}' does not exist
|
|
21
21
|
- if '${r}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
22
22
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
23
|
-
- ${n}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let r=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function s(p,u){let
|
|
23
|
+
- ${n}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let r=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function s(p,u){let f=Re.resolve(p,u);if(Ot.existsSync(f))return f;if(n.includes(Re.extname(u)))return;let d=n.find(h=>Ot.existsSync(`${f}${h}`));if(d)return`${f}${d}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let p;try{p=Ot.realpathSync(this._scriptPath)}catch{p=this._scriptPath}a=Re.resolve(Re.dirname(p),a)}if(a){let p=s(a,o);if(!p&&!e._executableFile&&this._scriptPath){let u=Re.basename(this._scriptPath,Re.extname(this._scriptPath));u!==this._name&&(p=s(a,`${u}-${e._name}`))}o=p||o}r=n.includes(Re.extname(o));let c;M.platform!=="win32"?r?(t.unshift(o),t=is(M.execArgv).concat(t),c=Yi.spawn(M.argv[0],t,{stdio:"inherit"})):c=Yi.spawn(o,t,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),t.unshift(o),t=is(M.execArgv).concat(t),c=Yi.spawn(M.execPath,t,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(u=>{M.on(u,()=>{c.killed===!1&&c.exitCode===null&&c.kill(u)})});let l=this._exitCallback;c.on("close",p=>{p=p??1,l?l(new Ji(p,"commander.executeSubCommandAsync","(close)")):M.exit(p)}),c.on("error",p=>{if(p.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(p.code==="EACCES")throw new Error(`'${o}' not executable`);if(!l)M.exit(1);else{let u=new Ji(1,"commander.executeSubCommandAsync","(error)");u.nestedError=p,l(u)}}),this.runningCommand=c}_dispatchSubcommand(e,t,r){let n=this._findCommand(e);n||this.help({error:!0}),n._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,n,"preSubcommand"),s=this._chainOrCall(s,()=>{if(n._executableHandler)this._executeSubCommand(n,t.concat(r));else return n._parseCommand(t,r)}),s}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,n,s)=>{let o=n;if(n!==null&&r.parseArg){let a=`error: command-argument value '${n}' is invalid for argument '${r.name()}'.`;o=this._callParseArg(r,n,s,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((r,n)=>{let s=r.defaultValue;r.variadic?n<this.args.length?(s=this.args.slice(n),r.parseArg&&(s=s.reduce((o,a)=>e(r,a,o),r.defaultValue))):s===void 0&&(s=[]):n<this.args.length&&(s=this.args[n],r.parseArg&&(s=e(r,s,r.defaultValue))),t[n]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let r=e,n=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(o=>{n.push({hookedCommand:s,callback:o})})}),t==="postAction"&&n.reverse(),n.forEach(s=>{r=this._chainOrCall(r,()=>s.callback(s.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,t,r){let n=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(s=>{n=this._chainOrCall(n,()=>s(this,t))}),n}_parseCommand(e,t){let r=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),t=r.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))n(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(r=>{let n=r.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(r=>r.conflictsWith.length>0).forEach(r=>{let n=e.find(s=>r.conflictsWith.includes(s.attributeName()));n&&this._conflictingOption(r,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],r=[],n=t,s=e.slice();function o(c){return c.length>1&&c[0]==="-"}let a=null;for(;s.length;){let c=s.shift();if(c==="--"){n===r&&n.push(c),n.push(...s);break}if(a&&!o(c)){this.emit(`option:${a.name()}`,c);continue}if(a=null,o(c)){let l=this._findOption(c);if(l){if(l.required){let p=s.shift();p===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,p)}else if(l.optional){let p=null;s.length>0&&!o(s[0])&&(p=s.shift()),this.emit(`option:${l.name()}`,p)}else this.emit(`option:${l.name()}`);a=l.variadic?l:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let l=this._findOption(`-${c[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,c.slice(2)):(this.emit(`option:${l.name()}`),s.unshift(`-${c.slice(2)}`));continue}}if(/^--[^=]+=/.test(c)){let l=c.indexOf("="),p=this._findOption(c.slice(0,l));if(p&&(p.required||p.optional)){this.emit(`option:${p.name()}`,c.slice(l+1));continue}}if(o(c)&&(n=r),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&r.length===0){if(this._findCommand(c)){t.push(c),s.length>0&&r.push(...s);break}else if(this._getHelpCommand()&&c===this._getHelpCommand().name()){t.push(c),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){r.push(c),s.length>0&&r.push(...s);break}}if(this._passThroughOptions){n.push(c),s.length>0&&n.push(...s);break}n.push(c)}return{operands:t,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let r=0;r<t;r++){let n=this.options[r].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
|
|
24
24
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
25
25
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
26
|
-
`),this.outputHelp({error:!0}));let r=t||{},n=r.exitCode||1,s=r.code||"commander.error";this._exit(n,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in
|
|
27
|
-
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let r=this.parent?._findCommand(e);if(r){let n=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(r=>
|
|
26
|
+
`),this.outputHelp({error:!0}));let r=t||{},n=r.exitCode||1,s=r.code||"commander.error";this._exit(n,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in M.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,M.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new yu(this.options),t=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&t(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(n=>!t(n)).forEach(n=>{this.setOptionValueWithSource(n,r.implied[n],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let r=o=>{let a=o.attributeName(),c=this.getOptionValue(a),l=this.options.find(u=>u.negate&&a===u.attributeName()),p=this.options.find(u=>!u.negate&&a===u.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:p||o},n=o=>{let a=r(o),c=a.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);n=n.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=ts(e,n)}let r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,r=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${r} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(s=>{n.push(s.name()),s.alias()&&n.push(s.alias())}),t=ts(e,n)}let r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",r=r||"output the version number";let n=this.createOption(t,r);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
27
|
+
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let r=this.parent?._findCommand(e);if(r){let n=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(r=>xu(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=Re.basename(e,Re.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),r=this._getOutputContext(e);t.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let n=t.formatHelp(this,t);return r.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(e){e=e||{};let t=!!e.error,r,n,s;return t?(r=a=>this._outputConfiguration.writeErr(a),n=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(r=a=>this._outputConfiguration.writeOut(a),n=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(n||(a=this._outputConfiguration.stripColor(a)),r(a)),hasColors:n,helpWidth:s}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let r=this._getOutputContext(e),n={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let s=this.helpInformation({error:r.error});if(t&&(s=t(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",n))}helpOption(e,t){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=Number(M.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
28
28
|
Expecting one of '${r.join("', '")}'`);let n=`${e}Help`;return this.on(n,s=>{let o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
|
|
29
|
-
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function
|
|
29
|
+
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function is(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,r="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?n=s[3]:r=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],r=s[3],n=s[4]),t&&n!=="0"?`${t}=${r}:${parseInt(n)+1}`:e})}function Ki(){if(M.env.NO_COLOR||M.env.FORCE_COLOR==="0"||M.env.FORCE_COLOR==="false")return!1;if(M.env.FORCE_COLOR||M.env.CLICOLOR_FORCE!==void 0)return!0}Qi.Command=Xi;Qi.useColor=Ki});var Pt=v(oe=>{var{Argument:ns}=Tt(),{Command:Zi}=rs(),{CommanderError:wu,InvalidArgumentError:ss}=nt(),{Help:Eu}=Wi(),{Option:os}=zi();oe.program=new Zi;oe.createCommand=i=>new Zi(i);oe.createOption=(i,e)=>new os(i,e);oe.createArgument=(i,e)=>new ns(i,e);oe.Command=Zi;oe.Option=os;oe.Argument=ns;oe.Help=Eu;oe.CommanderError=wu;oe.InvalidArgumentError=ss;oe.InvalidOptionArgumentError=ss});var He=v((er,cs)=>{var At=require("buffer"),ge=At.Buffer;function as(i,e){for(var t in i)e[t]=i[t]}ge.from&&ge.alloc&&ge.allocUnsafe&&ge.allocUnsafeSlow?cs.exports=At:(as(At,er),er.Buffer=je);function je(i,e,t){return ge(i,e,t)}je.prototype=Object.create(ge.prototype);as(ge,je);je.from=function(i,e,t){if(typeof i=="number")throw new TypeError("Argument must not be a number");return ge(i,e,t)};je.alloc=function(i,e,t){if(typeof i!="number")throw new TypeError("Argument must be a number");var r=ge(i);return e!==void 0?typeof t=="string"?r.fill(e,t):r.fill(e):r.fill(0),r};je.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return ge(i)};je.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return At.SlowBuffer(i)}});var tr=v((Gy,ls)=>{var Lt=He().Buffer,Ru=require("stream"),$u=require("util");function jt(i){if(this.buffer=null,this.writable=!0,this.readable=!0,!i)return this.buffer=Lt.alloc(0),this;if(typeof i.pipe=="function")return this.buffer=Lt.alloc(0),i.pipe(this),this;if(i.length||typeof i=="object")return this.buffer=i,this.writable=!1,process.nextTick(function(){this.emit("end",i),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof i+")")}$u.inherits(jt,Ru);jt.prototype.write=function(e){this.buffer=Lt.concat([this.buffer,Lt.from(e)]),this.emit("data",e)};jt.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1};ls.exports=jt});var us=v((Vy,ps)=>{"use strict";function ir(i){var e=(i/8|0)+(i%8===0?0:1);return e}var ku={ES256:ir(256),ES384:ir(384),ES512:ir(521)};function Su(i){var e=ku[i];if(e)return e;throw new Error('Unknown algorithm "'+i+'"')}ps.exports=Su});var vs=v((By,xs)=>{"use strict";var Mt=He().Buffer,ds=us(),It=128,fs=0,_u=32,Cu=16,Tu=2,hs=Cu|_u|fs<<6,Nt=Tu|fs<<6;function Ou(i){return i.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function gs(i){if(Mt.isBuffer(i))return i;if(typeof i=="string")return Mt.from(i,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}function Pu(i,e){i=gs(i);var t=ds(e),r=t+1,n=i.length,s=0;if(i[s++]!==hs)throw new Error('Could not find expected "seq"');var o=i[s++];if(o===(It|1)&&(o=i[s++]),n-s<o)throw new Error('"seq" specified length of "'+o+'", only "'+(n-s)+'" remaining');if(i[s++]!==Nt)throw new Error('Could not find expected "int" for "r"');var a=i[s++];if(n-s-2<a)throw new Error('"r" specified length of "'+a+'", only "'+(n-s-2)+'" available');if(r<a)throw new Error('"r" specified length of "'+a+'", max of "'+r+'" is acceptable');var c=s;if(s+=a,i[s++]!==Nt)throw new Error('Could not find expected "int" for "s"');var l=i[s++];if(n-s!==l)throw new Error('"s" specified length of "'+l+'", expected "'+(n-s)+'"');if(r<l)throw new Error('"s" specified length of "'+l+'", max of "'+r+'" is acceptable');var p=s;if(s+=l,s!==n)throw new Error('Expected to consume entire buffer, but "'+(n-s)+'" bytes remain');var u=t-a,f=t-l,d=Mt.allocUnsafe(u+a+f+l);for(s=0;s<u;++s)d[s]=0;i.copy(d,s,c+Math.max(-u,0),c+a),s=t;for(var h=s;s<h+f;++s)d[s]=0;return i.copy(d,s,p+Math.max(-f,0),p+l),d=d.toString("base64"),d=Ou(d),d}function ms(i,e,t){for(var r=0;e+r<t&&i[e+r]===0;)++r;var n=i[e+r]>=It;return n&&--r,r}function Au(i,e){i=gs(i);var t=ds(e),r=i.length;if(r!==t*2)throw new TypeError('"'+e+'" signatures must be "'+t*2+'" bytes, saw "'+r+'"');var n=ms(i,0,t),s=ms(i,t,i.length),o=t-n,a=t-s,c=2+o+1+1+a,l=c<It,p=Mt.allocUnsafe((l?2:3)+c),u=0;return p[u++]=hs,l?p[u++]=c:(p[u++]=It|1,p[u++]=c&255),p[u++]=Nt,p[u++]=o,n<0?(p[u++]=0,u+=i.copy(p,u,0,t)):u+=i.copy(p,u,n,t),p[u++]=Nt,p[u++]=a,s<0?(p[u++]=0,i.copy(p,u,t)):i.copy(p,u,t+s),p}xs.exports={derToJose:Pu,joseToDer:Au}});var ys=v((zy,bs)=>{"use strict";var st=require("buffer").Buffer,rr=require("buffer").SlowBuffer;bs.exports=Ft;function Ft(i,e){if(!st.isBuffer(i)||!st.isBuffer(e)||i.length!==e.length)return!1;for(var t=0,r=0;r<i.length;r++)t|=i[r]^e[r];return t===0}Ft.install=function(){st.prototype.equal=rr.prototype.equal=function(e){return Ft(this,e)}};var Lu=st.prototype.equal,ju=rr.prototype.equal;Ft.restore=function(){st.prototype.equal=Lu,rr.prototype.equal=ju}});var ar=v((Yy,Ts)=>{var Ge=He().Buffer,ae=require("crypto"),Es=vs(),ws=require("util"),Mu=`"%s" is not a valid algorithm.
|
|
30
30
|
Supported algorithms are:
|
|
31
|
-
"HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,rt="secret must be a string or buffer",qe="key must be a string or a buffer",ju="key must be a string, a buffer or an object",ir=typeof se.createPublicKey=="function";ir&&(qe+=" or a KeyObject",rt+="or a KeyObject");function Es(i){if(!Ge.isBuffer(i)&&typeof i!="string"&&(!ir||typeof i!="object"||typeof i.type!="string"||typeof i.asymmetricKeyType!="string"||typeof i.export!="function"))throw pe(qe)}function Rs(i){if(!Ge.isBuffer(i)&&typeof i!="string"&&typeof i!="object")throw pe(ju)}function Mu(i){if(!Ge.isBuffer(i)){if(typeof i=="string")return i;if(!ir||typeof i!="object"||i.type!=="secret"||typeof i.export!="function")throw pe(rt)}}function rr(i){return i.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function $s(i){i=i.toString();var e=4-i.length%4;if(e!==4)for(var t=0;t<e;++t)i+="=";return i.replace(/\-/g,"+").replace(/_/g,"/")}function pe(i){var e=[].slice.call(arguments,1),t=ys.format.bind(ys,i).apply(null,e);return new TypeError(t)}function Iu(i){return Ge.isBuffer(i)||typeof i=="string"}function nt(i){return Iu(i)||(i=JSON.stringify(i)),i}function ks(i){return function(t,r){Mu(r),t=nt(t);var n=se.createHmac("sha"+i,r),s=(n.update(t),n.digest("base64"));return rr(s)}}var tr,Nu="timingSafeEqual"in se?function(e,t){return e.byteLength!==t.byteLength?!1:se.timingSafeEqual(e,t)}:function(e,t){return tr||(tr=bs()),tr(e,t)};function Fu(i){return function(t,r,n){var s=ks(i)(t,n);return Nu(Ge.from(r),Ge.from(s))}}function Ss(i){return function(t,r){Rs(r),t=nt(t);var n=se.createSign("RSA-SHA"+i),s=(n.update(t),n.sign(r,"base64"));return rr(s)}}function _s(i){return function(t,r,n){Es(n),t=nt(t),r=$s(r);var s=se.createVerify("RSA-SHA"+i);return s.update(t),s.verify(n,r,"base64")}}function Uu(i){return function(t,r){Rs(r),t=nt(t);var n=se.createSign("RSA-SHA"+i),s=(n.update(t),n.sign({key:r,padding:se.constants.RSA_PKCS1_PSS_PADDING,saltLength:se.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return rr(s)}}function Du(i){return function(t,r,n){Es(n),t=nt(t),r=$s(r);var s=se.createVerify("RSA-SHA"+i);return s.update(t),s.verify({key:n,padding:se.constants.RSA_PKCS1_PSS_PADDING,saltLength:se.constants.RSA_PSS_SALTLEN_DIGEST},r,"base64")}}function qu(i){var e=Ss(i);return function(){var r=e.apply(null,arguments);return r=ws.derToJose(r,"ES"+i),r}}function Gu(i){var e=_s(i);return function(r,n,s){n=ws.joseToDer(n,"ES"+i).toString("base64");var o=e(r,n,s);return o}}function Hu(){return function(){return""}}function Wu(){return function(e,t){return t===""}}Cs.exports=function(e){var t={hs:ks,rs:Ss,ps:Uu,es:qu,none:Hu},r={hs:Fu,rs:_s,ps:Du,es:Gu,none:Wu},n=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!n)throw pe(Lu,e);var s=(n[1]||n[3]).toLowerCase(),o=n[2];return{sign:t[s](o),verify:r[s](o)}}});var sr=v((Uy,Os)=>{var Vu=require("buffer").Buffer;Os.exports=function(e){return typeof e=="string"?e:typeof e=="number"||Vu.isBuffer(e)?e.toString():JSON.stringify(e)}});var Ms=v((Dy,js)=>{var Bu=De().Buffer,Ts=Qi(),zu=nr(),Yu=require("stream"),Ps=sr(),or=require("util");function As(i,e){return Bu.from(i,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Ju(i,e,t){t=t||"utf8";var r=As(Ps(i),"binary"),n=As(Ps(e),t);return or.format("%s.%s",r,n)}function Ls(i){var e=i.header,t=i.payload,r=i.secret||i.privateKey,n=i.encoding,s=zu(e.alg),o=Ju(e,t,n),a=s.sign(o,r);return or.format("%s.%s",o,a)}function It(i){var e=i.secret;if(e=e??i.privateKey,e=e??i.key,/^hs/i.test(i.header.alg)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var t=new Ts(e);this.readable=!0,this.header=i.header,this.encoding=i.encoding,this.secret=this.privateKey=this.key=t,this.payload=new Ts(i.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}or.inherits(It,Yu);It.prototype.sign=function(){try{var e=Ls({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(t){this.readable=!1,this.emit("error",t),this.emit("close")}};It.sign=Ls;js.exports=It});var Vs=v((qy,Ws)=>{var Ns=De().Buffer,Is=Qi(),Xu=nr(),Ku=require("stream"),Fs=sr(),Qu=require("util"),Zu=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function em(i){return Object.prototype.toString.call(i)==="[object Object]"}function tm(i){if(em(i))return i;try{return JSON.parse(i)}catch{return}}function Us(i){var e=i.split(".",1)[0];return tm(Ns.from(e,"base64").toString("binary"))}function im(i){return i.split(".",2).join(".")}function Ds(i){return i.split(".")[2]}function rm(i,e){e=e||"utf8";var t=i.split(".")[1];return Ns.from(t,"base64").toString(e)}function qs(i){return Zu.test(i)&&!!Us(i)}function Gs(i,e,t){if(!e){var r=new Error("Missing algorithm parameter for jws.verify");throw r.code="MISSING_ALGORITHM",r}i=Fs(i);var n=Ds(i),s=im(i),o=Xu(e);return o.verify(s,n,t)}function Hs(i,e){if(e=e||{},i=Fs(i),!qs(i))return null;var t=Us(i);if(!t)return null;var r=rm(i);return(t.typ==="JWT"||e.json)&&(r=JSON.parse(r,e.encoding)),{header:t,payload:r,signature:Ds(i)}}function He(i){i=i||{};var e=i.secret;if(e=e??i.publicKey,e=e??i.key,/^hs/i.test(i.algorithm)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var t=new Is(e);this.readable=!0,this.algorithm=i.algorithm,this.encoding=i.encoding,this.secret=this.publicKey=this.key=t,this.signature=new Is(i.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}Qu.inherits(He,Ku);He.prototype.verify=function(){try{var e=Gs(this.signature.buffer,this.algorithm,this.key.buffer),t=Hs(this.signature.buffer,this.encoding);return this.emit("done",e,t),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(r){this.readable=!1,this.emit("error",r),this.emit("close")}};He.decode=Hs;He.isValid=qs;He.verify=Gs;Ws.exports=He});var Ft=v(ke=>{var Bs=Ms(),Nt=Vs(),nm=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];ke.ALGORITHMS=nm;ke.sign=Bs.sign;ke.verify=Nt.verify;ke.decode=Nt.decode;ke.isValid=Nt.isValid;ke.createSign=function(e){return new Bs(e)};ke.createVerify=function(e){return new Nt(e)}});var ar=v((Hy,zs)=>{var sm=Ft();zs.exports=function(i,e){e=e||{};var t=sm.decode(i,e);if(!t)return null;var r=t.payload;if(typeof r=="string")try{var n=JSON.parse(r);n!==null&&typeof n=="object"&&(r=n)}catch{}return e.complete===!0?{header:t.header,payload:r,signature:t.signature}:r}});var st=v((Wy,Ys)=>{var Ut=function(i,e){Error.call(this,i),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=i,e&&(this.inner=e)};Ut.prototype=Object.create(Error.prototype);Ut.prototype.constructor=Ut;Ys.exports=Ut});var cr=v((Vy,Xs)=>{var Js=st(),Dt=function(i,e){Js.call(this,i),this.name="NotBeforeError",this.date=e};Dt.prototype=Object.create(Js.prototype);Dt.prototype.constructor=Dt;Xs.exports=Dt});var lr=v((By,Qs)=>{var Ks=st(),qt=function(i,e){Ks.call(this,i),this.name="TokenExpiredError",this.expiredAt=e};qt.prototype=Object.create(Ks.prototype);qt.prototype.constructor=qt;Qs.exports=qt});var eo=v((zy,Zs)=>{var We=1e3,Ve=We*60,Be=Ve*60,je=Be*24,om=je*7,am=je*365.25;Zs.exports=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return cm(i);if(t==="number"&&isFinite(i))return e.long?pm(i):lm(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function cm(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*am;case"weeks":case"week":case"w":return t*om;case"days":case"day":case"d":return t*je;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Be;case"minutes":case"minute":case"mins":case"min":case"m":return t*Ve;case"seconds":case"second":case"secs":case"sec":case"s":return t*We;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function lm(i){var e=Math.abs(i);return e>=je?Math.round(i/je)+"d":e>=Be?Math.round(i/Be)+"h":e>=Ve?Math.round(i/Ve)+"m":e>=We?Math.round(i/We)+"s":i+"ms"}function pm(i){var e=Math.abs(i);return e>=je?Gt(i,e,je,"day"):e>=Be?Gt(i,e,Be,"hour"):e>=Ve?Gt(i,e,Ve,"minute"):e>=We?Gt(i,e,We,"second"):i+" ms"}function Gt(i,e,t,r){var n=e>=t*1.5;return Math.round(i/t)+" "+r+(n?"s":"")}});var pr=v((Yy,to)=>{var um=eo();to.exports=function(i,e){var t=e||Math.floor(Date.now()/1e3);if(typeof i=="string"){var r=um(i);return typeof r>"u"?void 0:Math.floor(t+r/1e3)}else return typeof i=="number"?t+i:void 0}});var ze=v((Jy,io)=>{"use strict";var mm="2.0.0",dm=Number.MAX_SAFE_INTEGER||9007199254740991,fm=16,hm=250,gm=["major","premajor","minor","preminor","patch","prepatch","prerelease"];io.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:fm,MAX_SAFE_BUILD_LENGTH:hm,MAX_SAFE_INTEGER:dm,RELEASE_TYPES:gm,SEMVER_SPEC_VERSION:mm,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var ot=v((Xy,ro)=>{"use strict";var xm=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};ro.exports=xm});var Ye=v((ge,no)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ur,MAX_SAFE_BUILD_LENGTH:vm,MAX_LENGTH:bm}=ze(),ym=ot();ge=no.exports={};var wm=ge.re=[],Em=ge.safeRe=[],b=ge.src=[],Rm=ge.safeSrc=[],y=ge.t={},$m=0,mr="[a-zA-Z0-9-]",km=[["\\s",1],["\\d",bm],[mr,vm]],Sm=i=>{for(let[e,t]of km)i=i.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return i},S=(i,e,t)=>{let r=Sm(e),n=$m++;ym(i,n,e),y[i]=n,b[n]=e,Rm[n]=r,wm[n]=new RegExp(e,t?"g":void 0),Em[n]=new RegExp(r,t?"g":void 0)};S("NUMERICIDENTIFIER","0|[1-9]\\d*");S("NUMERICIDENTIFIERLOOSE","\\d+");S("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${mr}*`);S("MAINVERSION",`(${b[y.NUMERICIDENTIFIER]})\\.(${b[y.NUMERICIDENTIFIER]})\\.(${b[y.NUMERICIDENTIFIER]})`);S("MAINVERSIONLOOSE",`(${b[y.NUMERICIDENTIFIERLOOSE]})\\.(${b[y.NUMERICIDENTIFIERLOOSE]})\\.(${b[y.NUMERICIDENTIFIERLOOSE]})`);S("PRERELEASEIDENTIFIER",`(?:${b[y.NONNUMERICIDENTIFIER]}|${b[y.NUMERICIDENTIFIER]})`);S("PRERELEASEIDENTIFIERLOOSE",`(?:${b[y.NONNUMERICIDENTIFIER]}|${b[y.NUMERICIDENTIFIERLOOSE]})`);S("PRERELEASE",`(?:-(${b[y.PRERELEASEIDENTIFIER]}(?:\\.${b[y.PRERELEASEIDENTIFIER]})*))`);S("PRERELEASELOOSE",`(?:-?(${b[y.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${b[y.PRERELEASEIDENTIFIERLOOSE]})*))`);S("BUILDIDENTIFIER",`${mr}+`);S("BUILD",`(?:\\+(${b[y.BUILDIDENTIFIER]}(?:\\.${b[y.BUILDIDENTIFIER]})*))`);S("FULLPLAIN",`v?${b[y.MAINVERSION]}${b[y.PRERELEASE]}?${b[y.BUILD]}?`);S("FULL",`^${b[y.FULLPLAIN]}$`);S("LOOSEPLAIN",`[v=\\s]*${b[y.MAINVERSIONLOOSE]}${b[y.PRERELEASELOOSE]}?${b[y.BUILD]}?`);S("LOOSE",`^${b[y.LOOSEPLAIN]}$`);S("GTLT","((?:<|>)?=?)");S("XRANGEIDENTIFIERLOOSE",`${b[y.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);S("XRANGEIDENTIFIER",`${b[y.NUMERICIDENTIFIER]}|x|X|\\*`);S("XRANGEPLAIN",`[v=\\s]*(${b[y.XRANGEIDENTIFIER]})(?:\\.(${b[y.XRANGEIDENTIFIER]})(?:\\.(${b[y.XRANGEIDENTIFIER]})(?:${b[y.PRERELEASE]})?${b[y.BUILD]}?)?)?`);S("XRANGEPLAINLOOSE",`[v=\\s]*(${b[y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[y.XRANGEIDENTIFIERLOOSE]})(?:${b[y.PRERELEASELOOSE]})?${b[y.BUILD]}?)?)?`);S("XRANGE",`^${b[y.GTLT]}\\s*${b[y.XRANGEPLAIN]}$`);S("XRANGELOOSE",`^${b[y.GTLT]}\\s*${b[y.XRANGEPLAINLOOSE]}$`);S("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ur}})(?:\\.(\\d{1,${ur}}))?(?:\\.(\\d{1,${ur}}))?`);S("COERCE",`${b[y.COERCEPLAIN]}(?:$|[^\\d])`);S("COERCEFULL",b[y.COERCEPLAIN]+`(?:${b[y.PRERELEASE]})?(?:${b[y.BUILD]})?(?:$|[^\\d])`);S("COERCERTL",b[y.COERCE],!0);S("COERCERTLFULL",b[y.COERCEFULL],!0);S("LONETILDE","(?:~>?)");S("TILDETRIM",`(\\s*)${b[y.LONETILDE]}\\s+`,!0);ge.tildeTrimReplace="$1~";S("TILDE",`^${b[y.LONETILDE]}${b[y.XRANGEPLAIN]}$`);S("TILDELOOSE",`^${b[y.LONETILDE]}${b[y.XRANGEPLAINLOOSE]}$`);S("LONECARET","(?:\\^)");S("CARETTRIM",`(\\s*)${b[y.LONECARET]}\\s+`,!0);ge.caretTrimReplace="$1^";S("CARET",`^${b[y.LONECARET]}${b[y.XRANGEPLAIN]}$`);S("CARETLOOSE",`^${b[y.LONECARET]}${b[y.XRANGEPLAINLOOSE]}$`);S("COMPARATORLOOSE",`^${b[y.GTLT]}\\s*(${b[y.LOOSEPLAIN]})$|^$`);S("COMPARATOR",`^${b[y.GTLT]}\\s*(${b[y.FULLPLAIN]})$|^$`);S("COMPARATORTRIM",`(\\s*)${b[y.GTLT]}\\s*(${b[y.LOOSEPLAIN]}|${b[y.XRANGEPLAIN]})`,!0);ge.comparatorTrimReplace="$1$2$3";S("HYPHENRANGE",`^\\s*(${b[y.XRANGEPLAIN]})\\s+-\\s+(${b[y.XRANGEPLAIN]})\\s*$`);S("HYPHENRANGELOOSE",`^\\s*(${b[y.XRANGEPLAINLOOSE]})\\s+-\\s+(${b[y.XRANGEPLAINLOOSE]})\\s*$`);S("STAR","(<|>)?=?\\s*\\*");S("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");S("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ht=v((Ky,so)=>{"use strict";var _m=Object.freeze({loose:!0}),Cm=Object.freeze({}),Om=i=>i?typeof i!="object"?_m:i:Cm;so.exports=Om});var dr=v((Qy,co)=>{"use strict";var oo=/^[0-9]+$/,ao=(i,e)=>{if(typeof i=="number"&&typeof e=="number")return i===e?0:i<e?-1:1;let t=oo.test(i),r=oo.test(e);return t&&r&&(i=+i,e=+e),i===e?0:t&&!r?-1:r&&!t?1:i<e?-1:1},Tm=(i,e)=>ao(e,i);co.exports={compareIdentifiers:ao,rcompareIdentifiers:Tm}});var z=v((Zy,po)=>{"use strict";var Wt=ot(),{MAX_LENGTH:lo,MAX_SAFE_INTEGER:Vt}=ze(),{safeRe:Bt,t:zt}=Ye(),Pm=Ht(),{compareIdentifiers:fr}=dr(),hr=class i{constructor(e,t){if(t=Pm(t),e instanceof i){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>lo)throw new TypeError(`version is longer than ${lo} characters`);Wt("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?Bt[zt.LOOSE]:Bt[zt.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Vt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Vt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Vt||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s<Vt)return s}return n}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Wt("SemVer.compare",this.version,this.options,e),!(e instanceof i)){if(typeof e=="string"&&e===this.version)return 0;e=new i(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof i||(e=new i(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof i||(e=new i(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],n=e.prerelease[t];if(Wt("prerelease compare",t,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r===n)continue;return fr(r,n)}while(++t)}compareBuild(e){e instanceof i||(e=new i(e,this.options));let t=0;do{let r=this.build[t],n=e.build[t];if(Wt("build compare",t,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r===n)continue;return fr(r,n)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let n=`-${t}`.match(this.options.loose?Bt[zt.PRERELEASELOOSE]:Bt[zt.PRERELEASE]);if(!n||n[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let s=[t,n];r===!1&&(s=[t]),fr(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};po.exports=hr});var Se=v((ew,mo)=>{"use strict";var uo=z(),Am=(i,e,t=!1)=>{if(i instanceof uo)return i;try{return new uo(i,e)}catch(r){if(!t)return null;throw r}};mo.exports=Am});var ho=v((tw,fo)=>{"use strict";var Lm=Se(),jm=(i,e)=>{let t=Lm(i,e);return t?t.version:null};fo.exports=jm});var xo=v((iw,go)=>{"use strict";var Mm=Se(),Im=(i,e)=>{let t=Mm(i.trim().replace(/^[=v]+/,""),e);return t?t.version:null};go.exports=Im});var yo=v((rw,bo)=>{"use strict";var vo=z(),Nm=(i,e,t,r,n)=>{typeof t=="string"&&(n=r,r=t,t=void 0);try{return new vo(i instanceof vo?i.version:i,t).inc(e,r,n).version}catch{return null}};bo.exports=Nm});var Ro=v((nw,Eo)=>{"use strict";var wo=Se(),Fm=(i,e)=>{let t=wo(i,null,!0),r=wo(e,null,!0),n=t.compare(r);if(n===0)return null;let s=n>0,o=s?t:r,a=s?r:t,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let p=c?"pre":"";return t.major!==r.major?p+"major":t.minor!==r.minor?p+"minor":t.patch!==r.patch?p+"patch":"prerelease"};Eo.exports=Fm});var ko=v((sw,$o)=>{"use strict";var Um=z(),Dm=(i,e)=>new Um(i,e).major;$o.exports=Dm});var _o=v((ow,So)=>{"use strict";var qm=z(),Gm=(i,e)=>new qm(i,e).minor;So.exports=Gm});var Oo=v((aw,Co)=>{"use strict";var Hm=z(),Wm=(i,e)=>new Hm(i,e).patch;Co.exports=Wm});var Po=v((cw,To)=>{"use strict";var Vm=Se(),Bm=(i,e)=>{let t=Vm(i,e);return t&&t.prerelease.length?t.prerelease:null};To.exports=Bm});var oe=v((lw,Lo)=>{"use strict";var Ao=z(),zm=(i,e,t)=>new Ao(i,t).compare(new Ao(e,t));Lo.exports=zm});var Mo=v((pw,jo)=>{"use strict";var Ym=oe(),Jm=(i,e,t)=>Ym(e,i,t);jo.exports=Jm});var No=v((uw,Io)=>{"use strict";var Xm=oe(),Km=(i,e)=>Xm(i,e,!0);Io.exports=Km});var Yt=v((mw,Uo)=>{"use strict";var Fo=z(),Qm=(i,e,t)=>{let r=new Fo(i,t),n=new Fo(e,t);return r.compare(n)||r.compareBuild(n)};Uo.exports=Qm});var qo=v((dw,Do)=>{"use strict";var Zm=Yt(),ed=(i,e)=>i.sort((t,r)=>Zm(t,r,e));Do.exports=ed});var Ho=v((fw,Go)=>{"use strict";var td=Yt(),id=(i,e)=>i.sort((t,r)=>td(r,t,e));Go.exports=id});var at=v((hw,Wo)=>{"use strict";var rd=oe(),nd=(i,e,t)=>rd(i,e,t)>0;Wo.exports=nd});var Jt=v((gw,Vo)=>{"use strict";var sd=oe(),od=(i,e,t)=>sd(i,e,t)<0;Vo.exports=od});var gr=v((xw,Bo)=>{"use strict";var ad=oe(),cd=(i,e,t)=>ad(i,e,t)===0;Bo.exports=cd});var xr=v((vw,zo)=>{"use strict";var ld=oe(),pd=(i,e,t)=>ld(i,e,t)!==0;zo.exports=pd});var Xt=v((bw,Yo)=>{"use strict";var ud=oe(),md=(i,e,t)=>ud(i,e,t)>=0;Yo.exports=md});var Kt=v((yw,Jo)=>{"use strict";var dd=oe(),fd=(i,e,t)=>dd(i,e,t)<=0;Jo.exports=fd});var vr=v((ww,Xo)=>{"use strict";var hd=gr(),gd=xr(),xd=at(),vd=Xt(),bd=Jt(),yd=Kt(),wd=(i,e,t,r)=>{switch(e){case"===":return typeof i=="object"&&(i=i.version),typeof t=="object"&&(t=t.version),i===t;case"!==":return typeof i=="object"&&(i=i.version),typeof t=="object"&&(t=t.version),i!==t;case"":case"=":case"==":return hd(i,t,r);case"!=":return gd(i,t,r);case">":return xd(i,t,r);case">=":return vd(i,t,r);case"<":return bd(i,t,r);case"<=":return yd(i,t,r);default:throw new TypeError(`Invalid operator: ${e}`)}};Xo.exports=wd});var Qo=v((Ew,Ko)=>{"use strict";var Ed=z(),Rd=Se(),{safeRe:Qt,t:Zt}=Ye(),$d=(i,e)=>{if(i instanceof Ed)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;e=e||{};let t=null;if(!e.rtl)t=i.match(e.includePrerelease?Qt[Zt.COERCEFULL]:Qt[Zt.COERCE]);else{let c=e.includePrerelease?Qt[Zt.COERCERTLFULL]:Qt[Zt.COERCERTL],l;for(;(l=c.exec(i))&&(!t||t.index+t[0].length!==i.length);)(!t||l.index+l[0].length!==t.index+t[0].length)&&(t=l),c.lastIndex=l.index+l[1].length+l[2].length;c.lastIndex=-1}if(t===null)return null;let r=t[2],n=t[3]||"0",s=t[4]||"0",o=e.includePrerelease&&t[5]?`-${t[5]}`:"",a=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Rd(`${r}.${n}.${s}${o}${a}`,e)};Ko.exports=$d});var ea=v((Rw,Zo)=>{"use strict";var kd=Se(),Sd=ze(),_d=z(),Cd=(i,e,t)=>{if(!Sd.RELEASE_TYPES.includes(e))return null;let r=Od(i,t);return r&&Td(r,e)},Od=(i,e)=>{let t=i instanceof _d?i.version:i;return kd(t,e)},Td=(i,e)=>{if(Pd(e))return i.version;switch(i.prerelease=[],e){case"major":i.minor=0,i.patch=0;break;case"minor":i.patch=0;break}return i.format()},Pd=i=>i.startsWith("pre");Zo.exports=Cd});var ia=v(($w,ta)=>{"use strict";var br=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,t)}return this}};ta.exports=br});var ae=v((kw,oa)=>{"use strict";var Ad=/\s+/g,yr=class i{constructor(e,t){if(t=jd(t),e instanceof i)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new i(e.raw,t);if(e instanceof wr)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(Ad," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(n=>!na(n[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&qd(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let r=0;r<t.length;r++)r>0&&(this.formatted+=" "),this.formatted+=t[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&Ud)|(this.options.loose&&Dd))+":"+e,n=ra.get(r);if(n)return n;let s=this.options.loose,o=s?K[J.HYPHENRANGELOOSE]:K[J.HYPHENRANGE];e=e.replace(o,Kd(this.options.includePrerelease)),N("hyphen replace",e),e=e.replace(K[J.COMPARATORTRIM],Id),N("comparator trim",e),e=e.replace(K[J.TILDETRIM],Nd),N("tilde trim",e),e=e.replace(K[J.CARETTRIM],Fd),N("caret trim",e);let a=e.split(" ").map(u=>Gd(u,this.options)).join(" ").split(/\s+/).map(u=>Xd(u,this.options));s&&(a=a.filter(u=>(N("loose invalid filter",u,this.options),!!u.match(K[J.COMPARATORLOOSE])))),N("range list",a);let c=new Map,l=a.map(u=>new wr(u,this.options));for(let u of l){if(na(u))return[u];c.set(u.value,u)}c.size>1&&c.has("")&&c.delete("");let p=[...c.values()];return ra.set(r,p),p}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Range is required");return this.set.some(r=>sa(r,t)&&e.set.some(n=>sa(n,t)&&r.every(s=>n.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Md(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(Qd(this.set[t],e,this.options))return!0;return!1}};oa.exports=yr;var Ld=ia(),ra=new Ld,jd=Ht(),wr=ct(),N=ot(),Md=z(),{safeRe:K,t:J,comparatorTrimReplace:Id,tildeTrimReplace:Nd,caretTrimReplace:Fd}=Ye(),{FLAG_INCLUDE_PRERELEASE:Ud,FLAG_LOOSE:Dd}=ze(),na=i=>i.value==="<0.0.0-0",qd=i=>i.value==="",sa=(i,e)=>{let t=!0,r=i.slice(),n=r.pop();for(;t&&r.length;)t=r.every(s=>n.intersects(s,e)),n=r.pop();return t},Gd=(i,e)=>(i=i.replace(K[J.BUILD],""),N("comp",i,e),i=Vd(i,e),N("caret",i),i=Hd(i,e),N("tildes",i),i=zd(i,e),N("xrange",i),i=Jd(i,e),N("stars",i),i),Q=i=>!i||i.toLowerCase()==="x"||i==="*",Hd=(i,e)=>i.trim().split(/\s+/).map(t=>Wd(t,e)).join(" "),Wd=(i,e)=>{let t=e.loose?K[J.TILDELOOSE]:K[J.TILDE];return i.replace(t,(r,n,s,o,a)=>{N("tilde",i,r,n,s,o,a);let c;return Q(n)?c="":Q(s)?c=`>=${n}.0.0 <${+n+1}.0.0-0`:Q(o)?c=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(N("replaceTilde pr",a),c=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):c=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,N("tilde return",c),c})},Vd=(i,e)=>i.trim().split(/\s+/).map(t=>Bd(t,e)).join(" "),Bd=(i,e)=>{N("caret",i,e);let t=e.loose?K[J.CARETLOOSE]:K[J.CARET],r=e.includePrerelease?"-0":"";return i.replace(t,(n,s,o,a,c)=>{N("caret",i,n,s,o,a,c);let l;return Q(s)?l="":Q(o)?l=`>=${s}.0.0${r} <${+s+1}.0.0-0`:Q(a)?s==="0"?l=`>=${s}.${o}.0${r} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${r} <${+s+1}.0.0-0`:c?(N("replaceCaret pr",c),s==="0"?o==="0"?l=`>=${s}.${o}.${a}-${c} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a}-${c} <${+s+1}.0.0-0`):(N("no pr"),s==="0"?o==="0"?l=`>=${s}.${o}.${a}${r} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a}${r} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),N("caret return",l),l})},zd=(i,e)=>(N("replaceXRanges",i,e),i.split(/\s+/).map(t=>Yd(t,e)).join(" ")),Yd=(i,e)=>{i=i.trim();let t=e.loose?K[J.XRANGELOOSE]:K[J.XRANGE];return i.replace(t,(r,n,s,o,a,c)=>{N("xRange",i,r,n,s,o,a,c);let l=Q(s),p=l||Q(o),u=p||Q(a),d=u;return n==="="&&d&&(n=""),c=e.includePrerelease?"-0":"",l?n===">"||n==="<"?r="<0.0.0-0":r="*":n&&d?(p&&(o=0),a=0,n===">"?(n=">=",p?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",p?s=+s+1:o=+o+1),n==="<"&&(c="-0"),r=`${n+s}.${o}.${a}${c}`):p?r=`>=${s}.0.0${c} <${+s+1}.0.0-0`:u&&(r=`>=${s}.${o}.0${c} <${s}.${+o+1}.0-0`),N("xRange return",r),r})},Jd=(i,e)=>(N("replaceStars",i,e),i.trim().replace(K[J.STAR],"")),Xd=(i,e)=>(N("replaceGTE0",i,e),i.trim().replace(K[e.includePrerelease?J.GTE0PRE:J.GTE0],"")),Kd=i=>(e,t,r,n,s,o,a,c,l,p,u,d)=>(Q(r)?t="":Q(n)?t=`>=${r}.0.0${i?"-0":""}`:Q(s)?t=`>=${r}.${n}.0${i?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${i?"-0":""}`,Q(l)?c="":Q(p)?c=`<${+l+1}.0.0-0`:Q(u)?c=`<${l}.${+p+1}.0-0`:d?c=`<=${l}.${p}.${u}-${d}`:i?c=`<${l}.${p}.${+u+1}-0`:c=`<=${c}`,`${t} ${c}`.trim()),Qd=(i,e,t)=>{for(let r=0;r<i.length;r++)if(!i[r].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let r=0;r<i.length;r++)if(N(i[r].semver),i[r].semver!==wr.ANY&&i[r].semver.prerelease.length>0){let n=i[r].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var ct=v((Sw,ma)=>{"use strict";var lt=Symbol("SemVer ANY"),$r=class i{static get ANY(){return lt}constructor(e,t){if(t=aa(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Rr("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===lt?this.value="":this.value=this.operator+this.semver.version,Rr("comp",this)}parse(e){let t=this.options.loose?ca[la.COMPARATORLOOSE]:ca[la.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new pa(r[2],this.options.loose):this.semver=lt}toString(){return this.value}test(e){if(Rr("Comparator.test",e,this.options.loose),this.semver===lt||e===lt)return!0;if(typeof e=="string")try{e=new pa(e,this.options)}catch{return!1}return Er(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ua(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new ua(this.value,t).test(e.semver):(t=aa(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Er(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Er(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};ma.exports=$r;var aa=Ht(),{safeRe:ca,t:la}=Ye(),Er=vr(),Rr=ot(),pa=z(),ua=ae()});var pt=v((_w,da)=>{"use strict";var Zd=ae(),ef=(i,e,t)=>{try{e=new Zd(e,t)}catch{return!1}return e.test(i)};da.exports=ef});var ha=v((Cw,fa)=>{"use strict";var tf=ae(),rf=(i,e)=>new tf(i,e).set.map(t=>t.map(r=>r.value).join(" ").trim().split(" "));fa.exports=rf});var xa=v((Ow,ga)=>{"use strict";var nf=z(),sf=ae(),of=(i,e,t)=>{let r=null,n=null,s=null;try{s=new sf(e,t)}catch{return null}return i.forEach(o=>{s.test(o)&&(!r||n.compare(o)===-1)&&(r=o,n=new nf(r,t))}),r};ga.exports=of});var ba=v((Tw,va)=>{"use strict";var af=z(),cf=ae(),lf=(i,e,t)=>{let r=null,n=null,s=null;try{s=new cf(e,t)}catch{return null}return i.forEach(o=>{s.test(o)&&(!r||n.compare(o)===1)&&(r=o,n=new af(r,t))}),r};va.exports=lf});var Ea=v((Pw,wa)=>{"use strict";var kr=z(),pf=ae(),ya=at(),uf=(i,e)=>{i=new pf(i,e);let t=new kr("0.0.0");if(i.test(t)||(t=new kr("0.0.0-0"),i.test(t)))return t;t=null;for(let r=0;r<i.set.length;++r){let n=i.set[r],s=null;n.forEach(o=>{let a=new kr(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||ya(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||ya(t,s))&&(t=s)}return t&&i.test(t)?t:null};wa.exports=uf});var $a=v((Aw,Ra)=>{"use strict";var mf=ae(),df=(i,e)=>{try{return new mf(i,e).range||"*"}catch{return null}};Ra.exports=df});var ei=v((Lw,Ca)=>{"use strict";var ff=z(),_a=ct(),{ANY:hf}=_a,gf=ae(),xf=pt(),ka=at(),Sa=Jt(),vf=Kt(),bf=Xt(),yf=(i,e,t,r)=>{i=new ff(i,r),e=new gf(e,r);let n,s,o,a,c;switch(t){case">":n=ka,s=vf,o=Sa,a=">",c=">=";break;case"<":n=Sa,s=bf,o=ka,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(xf(i,e,r))return!1;for(let l=0;l<e.set.length;++l){let p=e.set[l],u=null,d=null;if(p.forEach(f=>{f.semver===hf&&(f=new _a(">=0.0.0")),u=u||f,d=d||f,n(f.semver,u.semver,r)?u=f:o(f.semver,d.semver,r)&&(d=f)}),u.operator===a||u.operator===c||(!d.operator||d.operator===a)&&s(i,d.semver))return!1;if(d.operator===c&&o(i,d.semver))return!1}return!0};Ca.exports=yf});var Ta=v((jw,Oa)=>{"use strict";var wf=ei(),Ef=(i,e,t)=>wf(i,e,">",t);Oa.exports=Ef});var Aa=v((Mw,Pa)=>{"use strict";var Rf=ei(),$f=(i,e,t)=>Rf(i,e,"<",t);Pa.exports=$f});var Ma=v((Iw,ja)=>{"use strict";var La=ae(),kf=(i,e,t)=>(i=new La(i,t),e=new La(e,t),i.intersects(e,t));ja.exports=kf});var Na=v((Nw,Ia)=>{"use strict";var Sf=pt(),_f=oe();Ia.exports=(i,e,t)=>{let r=[],n=null,s=null,o=i.sort((p,u)=>_f(p,u,t));for(let p of o)Sf(p,e,t)?(s=p,n||(n=p)):(s&&r.push([n,s]),s=null,n=null);n&&r.push([n,null]);let a=[];for(let[p,u]of r)p===u?a.push(p):!u&&p===o[0]?a.push("*"):u?p===o[0]?a.push(`<=${u}`):a.push(`${p} - ${u}`):a.push(`>=${p}`);let c=a.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return c.length<l.length?c:e}});var Ha=v((Fw,Ga)=>{"use strict";var Fa=ae(),_r=ct(),{ANY:Sr}=_r,ut=pt(),Cr=oe(),Cf=(i,e,t={})=>{if(i===e)return!0;i=new Fa(i,t),e=new Fa(e,t);let r=!1;e:for(let n of i.set){for(let s of e.set){let o=Tf(n,s,t);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},Of=[new _r(">=0.0.0-0")],Ua=[new _r(">=0.0.0")],Tf=(i,e,t)=>{if(i===e)return!0;if(i.length===1&&i[0].semver===Sr){if(e.length===1&&e[0].semver===Sr)return!0;t.includePrerelease?i=Of:i=Ua}if(e.length===1&&e[0].semver===Sr){if(t.includePrerelease)return!0;e=Ua}let r=new Set,n,s;for(let f of i)f.operator===">"||f.operator===">="?n=Da(n,f,t):f.operator==="<"||f.operator==="<="?s=qa(s,f,t):r.add(f.semver);if(r.size>1)return null;let o;if(n&&s){if(o=Cr(n.semver,s.semver,t),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let f of r){if(n&&!ut(f,String(n),t)||s&&!ut(f,String(s),t))return null;for(let x of e)if(!ut(f,String(x),t))return!1;return!0}let a,c,l,p,u=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,d=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;u&&u.prerelease.length===1&&s.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(let f of e){if(p=p||f.operator===">"||f.operator===">=",l=l||f.operator==="<"||f.operator==="<=",n){if(d&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===d.major&&f.semver.minor===d.minor&&f.semver.patch===d.patch&&(d=!1),f.operator===">"||f.operator===">="){if(a=Da(n,f,t),a===f&&a!==n)return!1}else if(n.operator===">="&&!ut(n.semver,String(f),t))return!1}if(s){if(u&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===u.major&&f.semver.minor===u.minor&&f.semver.patch===u.patch&&(u=!1),f.operator==="<"||f.operator==="<="){if(c=qa(s,f,t),c===f&&c!==s)return!1}else if(s.operator==="<="&&!ut(s.semver,String(f),t))return!1}if(!f.operator&&(s||n)&&o!==0)return!1}return!(n&&l&&!s&&o!==0||s&&p&&!n&&o!==0||d||u)},Da=(i,e,t)=>{if(!i)return e;let r=Cr(i.semver,e.semver,t);return r>0?i:r<0||e.operator===">"&&i.operator===">="?e:i},qa=(i,e,t)=>{if(!i)return e;let r=Cr(i.semver,e.semver,t);return r<0?i:r>0||e.operator==="<"&&i.operator==="<="?e:i};Ga.exports=Cf});var ti=v((Uw,Ba)=>{"use strict";var Or=Ye(),Wa=ze(),Pf=z(),Va=dr(),Af=Se(),Lf=ho(),jf=xo(),Mf=yo(),If=Ro(),Nf=ko(),Ff=_o(),Uf=Oo(),Df=Po(),qf=oe(),Gf=Mo(),Hf=No(),Wf=Yt(),Vf=qo(),Bf=Ho(),zf=at(),Yf=Jt(),Jf=gr(),Xf=xr(),Kf=Xt(),Qf=Kt(),Zf=vr(),eh=Qo(),th=ea(),ih=ct(),rh=ae(),nh=pt(),sh=ha(),oh=xa(),ah=ba(),ch=Ea(),lh=$a(),ph=ei(),uh=Ta(),mh=Aa(),dh=Ma(),fh=Na(),hh=Ha();Ba.exports={parse:Af,valid:Lf,clean:jf,inc:Mf,diff:If,major:Nf,minor:Ff,patch:Uf,prerelease:Df,compare:qf,rcompare:Gf,compareLoose:Hf,compareBuild:Wf,sort:Vf,rsort:Bf,gt:zf,lt:Yf,eq:Jf,neq:Xf,gte:Kf,lte:Qf,cmp:Zf,coerce:eh,truncate:th,Comparator:ih,Range:rh,satisfies:nh,toComparators:sh,maxSatisfying:oh,minSatisfying:ah,minVersion:ch,validRange:lh,outside:ph,gtr:uh,ltr:mh,intersects:dh,simplifyRange:fh,subset:hh,SemVer:Pf,re:Or.re,src:Or.src,tokens:Or.t,SEMVER_SPEC_VERSION:Wa.SEMVER_SPEC_VERSION,RELEASE_TYPES:Wa.RELEASE_TYPES,compareIdentifiers:Va.compareIdentifiers,rcompareIdentifiers:Va.rcompareIdentifiers}});var Ya=v((Dw,za)=>{var gh=ti();za.exports=gh.satisfies(process.version,">=15.7.0")});var Xa=v((qw,Ja)=>{var xh=ti();Ja.exports=xh.satisfies(process.version,">=16.9.0")});var Tr=v((Gw,Ka)=>{var vh=Ya(),bh=Xa(),yh={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},wh={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};Ka.exports=function(i,e){if(!i||!e)return;let t=e.asymmetricKeyType;if(!t)return;let r=yh[t];if(!r)throw new Error(`Unknown key type "${t}".`);if(!r.includes(i))throw new Error(`"alg" parameter for "${t}" key type must be one of: ${r.join(", ")}.`);if(vh)switch(t){case"ec":let n=e.asymmetricKeyDetails.namedCurve,s=wh[i];if(n!==s)throw new Error(`"alg" parameter "${i}" requires curve "${s}".`);break;case"rsa-pss":if(bh){let o=parseInt(i.slice(-3),10),{hashAlgorithm:a,mgf1HashAlgorithm:c,saltLength:l}=e.asymmetricKeyDetails;if(a!==`sha${o}`||c!==a)throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${i}.`);if(l!==void 0&&l>o>>3)throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${i}.`)}break}}});var Pr=v((Hw,Qa)=>{var Eh=ti();Qa.exports=Eh.satisfies(process.version,"^6.12.0 || >=8.0.0")});var tc=v((Ww,ec)=>{var I=st(),Rh=cr(),Za=lr(),$h=ar(),kh=pr(),Sh=Tr(),_h=Pr(),Ch=Ft(),{KeyObject:Oh,createSecretKey:Th,createPublicKey:Ph}=require("crypto"),Ar=["RS256","RS384","RS512"],Ah=["ES256","ES384","ES512"],Lr=["RS256","RS384","RS512"],Lh=["HS256","HS384","HS512"];_h&&(Ar.splice(Ar.length,0,"PS256","PS384","PS512"),Lr.splice(Lr.length,0,"PS256","PS384","PS512"));ec.exports=function(i,e,t,r){typeof t=="function"&&!r&&(r=t,t={}),t||(t={}),t=Object.assign({},t);let n;if(r?n=r:n=function(p,u){if(p)throw p;return u},t.clockTimestamp&&typeof t.clockTimestamp!="number")return n(new I("clockTimestamp must be a number"));if(t.nonce!==void 0&&(typeof t.nonce!="string"||t.nonce.trim()===""))return n(new I("nonce must be a non-empty string"));if(t.allowInvalidAsymmetricKeyTypes!==void 0&&typeof t.allowInvalidAsymmetricKeyTypes!="boolean")return n(new I("allowInvalidAsymmetricKeyTypes must be a boolean"));let s=t.clockTimestamp||Math.floor(Date.now()/1e3);if(!i)return n(new I("jwt must be provided"));if(typeof i!="string")return n(new I("jwt must be a string"));let o=i.split(".");if(o.length!==3)return n(new I("jwt malformed"));let a;try{a=$h(i,{complete:!0})}catch(p){return n(p)}if(!a)return n(new I("invalid token"));let c=a.header,l;if(typeof e=="function"){if(!r)return n(new I("verify must be called asynchronous if secret or public key is provided as a callback"));l=e}else l=function(p,u){return u(null,e)};return l(c,function(p,u){if(p)return n(new I("error in secret or public key callback: "+p.message));let d=o[2].trim()!=="";if(!d&&u)return n(new I("jwt signature is required"));if(d&&!u)return n(new I("secret or public key must be provided"));if(!d&&!t.algorithms)return n(new I('please specify "none" in "algorithms" to verify unsigned tokens'));if(u!=null&&!(u instanceof Oh))try{u=Ph(u)}catch{try{u=Th(typeof u=="string"?Buffer.from(u):u)}catch{return n(new I("secretOrPublicKey is not valid key material"))}}if(t.algorithms||(u.type==="secret"?t.algorithms=Lh:["rsa","rsa-pss"].includes(u.asymmetricKeyType)?t.algorithms=Lr:u.asymmetricKeyType==="ec"?t.algorithms=Ah:t.algorithms=Ar),t.algorithms.indexOf(a.header.alg)===-1)return n(new I("invalid algorithm"));if(c.alg.startsWith("HS")&&u.type!=="secret")return n(new I(`secretOrPublicKey must be a symmetric key when using ${c.alg}`));if(/^(?:RS|PS|ES)/.test(c.alg)&&u.type!=="public")return n(new I(`secretOrPublicKey must be an asymmetric key when using ${c.alg}`));if(!t.allowInvalidAsymmetricKeyTypes)try{Sh(c.alg,u)}catch(w){return n(w)}let f;try{f=Ch.verify(i,a.header.alg,u)}catch(w){return n(w)}if(!f)return n(new I("invalid signature"));let x=a.payload;if(typeof x.nbf<"u"&&!t.ignoreNotBefore){if(typeof x.nbf!="number")return n(new I("invalid nbf value"));if(x.nbf>s+(t.clockTolerance||0))return n(new Rh("jwt not active",new Date(x.nbf*1e3)))}if(typeof x.exp<"u"&&!t.ignoreExpiration){if(typeof x.exp!="number")return n(new I("invalid exp value"));if(s>=x.exp+(t.clockTolerance||0))return n(new Za("jwt expired",new Date(x.exp*1e3)))}if(t.audience){let w=Array.isArray(t.audience)?t.audience:[t.audience];if(!(Array.isArray(x.aud)?x.aud:[x.aud]).some(function(E){return w.some(function($){return $ instanceof RegExp?$.test(E):$===E})}))return n(new I("jwt audience invalid. expected: "+w.join(" or ")))}if(t.issuer&&(typeof t.issuer=="string"&&x.iss!==t.issuer||Array.isArray(t.issuer)&&t.issuer.indexOf(x.iss)===-1))return n(new I("jwt issuer invalid. expected: "+t.issuer));if(t.subject&&x.sub!==t.subject)return n(new I("jwt subject invalid. expected: "+t.subject));if(t.jwtid&&x.jti!==t.jwtid)return n(new I("jwt jwtid invalid. expected: "+t.jwtid));if(t.nonce&&x.nonce!==t.nonce)return n(new I("jwt nonce invalid. expected: "+t.nonce));if(t.maxAge){if(typeof x.iat!="number")return n(new I("iat required when maxAge is specified"));let w=kh(t.maxAge,x.iat);if(typeof w>"u")return n(new I('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(s>=w+(t.clockTolerance||0))return n(new Za("maxAge exceeded",new Date(w*1e3)))}if(t.complete===!0){let w=a.signature;return n(null,{header:c,payload:x,signature:w})}return n(null,x)})}});var ac=v((Vw,oc)=>{var ic=1/0,nc=9007199254740991,jh=17976931348623157e292,rc=NaN,Mh="[object Arguments]",Ih="[object Function]",Nh="[object GeneratorFunction]",Fh="[object String]",Uh="[object Symbol]",Dh=/^\s+|\s+$/g,qh=/^[-+]0x[0-9a-f]+$/i,Gh=/^0b[01]+$/i,Hh=/^0o[0-7]+$/i,Wh=/^(?:0|[1-9]\d*)$/,Vh=parseInt;function Bh(i,e){for(var t=-1,r=i?i.length:0,n=Array(r);++t<r;)n[t]=e(i[t],t,i);return n}function zh(i,e,t,r){for(var n=i.length,s=t+(r?1:-1);r?s--:++s<n;)if(e(i[s],s,i))return s;return-1}function Yh(i,e,t){if(e!==e)return zh(i,Jh,t);for(var r=t-1,n=i.length;++r<n;)if(i[r]===e)return r;return-1}function Jh(i){return i!==i}function Xh(i,e){for(var t=-1,r=Array(i);++t<i;)r[t]=e(t);return r}function Kh(i,e){return Bh(e,function(t){return i[t]})}function Qh(i,e){return function(t){return i(e(t))}}var ii=Object.prototype,Mr=ii.hasOwnProperty,ri=ii.toString,Zh=ii.propertyIsEnumerable,eg=Qh(Object.keys,Object),tg=Math.max;function ig(i,e){var t=sc(i)||ag(i)?Xh(i.length,String):[],r=t.length,n=!!r;for(var s in i)(e||Mr.call(i,s))&&!(n&&(s=="length"||ng(s,r)))&&t.push(s);return t}function rg(i){if(!sg(i))return eg(i);var e=[];for(var t in Object(i))Mr.call(i,t)&&t!="constructor"&&e.push(t);return e}function ng(i,e){return e=e??nc,!!e&&(typeof i=="number"||Wh.test(i))&&i>-1&&i%1==0&&i<e}function sg(i){var e=i&&i.constructor,t=typeof e=="function"&&e.prototype||ii;return i===t}function og(i,e,t,r){i=Ir(i)?i:xg(i),t=t&&!r?fg(t):0;var n=i.length;return t<0&&(t=tg(n+t,0)),ug(i)?t<=n&&i.indexOf(e,t)>-1:!!n&&Yh(i,e,t)>-1}function ag(i){return cg(i)&&Mr.call(i,"callee")&&(!Zh.call(i,"callee")||ri.call(i)==Mh)}var sc=Array.isArray;function Ir(i){return i!=null&&pg(i.length)&&!lg(i)}function cg(i){return Nr(i)&&Ir(i)}function lg(i){var e=jr(i)?ri.call(i):"";return e==Ih||e==Nh}function pg(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=nc}function jr(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function Nr(i){return!!i&&typeof i=="object"}function ug(i){return typeof i=="string"||!sc(i)&&Nr(i)&&ri.call(i)==Fh}function mg(i){return typeof i=="symbol"||Nr(i)&&ri.call(i)==Uh}function dg(i){if(!i)return i===0?i:0;if(i=hg(i),i===ic||i===-ic){var e=i<0?-1:1;return e*jh}return i===i?i:0}function fg(i){var e=dg(i),t=e%1;return e===e?t?e-t:e:0}function hg(i){if(typeof i=="number")return i;if(mg(i))return rc;if(jr(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=jr(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace(Dh,"");var t=Gh.test(i);return t||Hh.test(i)?Vh(i.slice(2),t?2:8):qh.test(i)?rc:+i}function gg(i){return Ir(i)?ig(i):rg(i)}function xg(i){return i?Kh(i,gg(i)):[]}oc.exports=og});var lc=v((Bw,cc)=>{var vg="[object Boolean]",bg=Object.prototype,yg=bg.toString;function wg(i){return i===!0||i===!1||Eg(i)&&yg.call(i)==vg}function Eg(i){return!!i&&typeof i=="object"}cc.exports=wg});var fc=v((zw,dc)=>{var pc=1/0,Rg=17976931348623157e292,uc=NaN,$g="[object Symbol]",kg=/^\s+|\s+$/g,Sg=/^[-+]0x[0-9a-f]+$/i,_g=/^0b[01]+$/i,Cg=/^0o[0-7]+$/i,Og=parseInt,Tg=Object.prototype,Pg=Tg.toString;function Ag(i){return typeof i=="number"&&i==Ig(i)}function mc(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function Lg(i){return!!i&&typeof i=="object"}function jg(i){return typeof i=="symbol"||Lg(i)&&Pg.call(i)==$g}function Mg(i){if(!i)return i===0?i:0;if(i=Ng(i),i===pc||i===-pc){var e=i<0?-1:1;return e*Rg}return i===i?i:0}function Ig(i){var e=Mg(i),t=e%1;return e===e?t?e-t:e:0}function Ng(i){if(typeof i=="number")return i;if(jg(i))return uc;if(mc(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=mc(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace(kg,"");var t=_g.test(i);return t||Cg.test(i)?Og(i.slice(2),t?2:8):Sg.test(i)?uc:+i}dc.exports=Ag});var gc=v((Yw,hc)=>{var Fg="[object Number]",Ug=Object.prototype,Dg=Ug.toString;function qg(i){return!!i&&typeof i=="object"}function Gg(i){return typeof i=="number"||qg(i)&&Dg.call(i)==Fg}hc.exports=Gg});var yc=v((Jw,bc)=>{var Hg="[object Object]";function Wg(i){var e=!1;if(i!=null&&typeof i.toString!="function")try{e=!!(i+"")}catch{}return e}function Vg(i,e){return function(t){return i(e(t))}}var Bg=Function.prototype,xc=Object.prototype,vc=Bg.toString,zg=xc.hasOwnProperty,Yg=vc.call(Object),Jg=xc.toString,Xg=Vg(Object.getPrototypeOf,Object);function Kg(i){return!!i&&typeof i=="object"}function Qg(i){if(!Kg(i)||Jg.call(i)!=Hg||Wg(i))return!1;var e=Xg(i);if(e===null)return!0;var t=zg.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&vc.call(t)==Yg}bc.exports=Qg});var Ec=v((Xw,wc)=>{var Zg="[object String]",ex=Object.prototype,tx=ex.toString,ix=Array.isArray;function rx(i){return!!i&&typeof i=="object"}function nx(i){return typeof i=="string"||!ix(i)&&rx(i)&&tx.call(i)==Zg}wc.exports=nx});var _c=v((Kw,Sc)=>{var sx="Expected a function",Rc=1/0,ox=17976931348623157e292,$c=NaN,ax="[object Symbol]",cx=/^\s+|\s+$/g,lx=/^[-+]0x[0-9a-f]+$/i,px=/^0b[01]+$/i,ux=/^0o[0-7]+$/i,mx=parseInt,dx=Object.prototype,fx=dx.toString;function hx(i,e){var t;if(typeof e!="function")throw new TypeError(sx);return i=yx(i),function(){return--i>0&&(t=e.apply(this,arguments)),i<=1&&(e=void 0),t}}function gx(i){return hx(2,i)}function kc(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function xx(i){return!!i&&typeof i=="object"}function vx(i){return typeof i=="symbol"||xx(i)&&fx.call(i)==ax}function bx(i){if(!i)return i===0?i:0;if(i=wx(i),i===Rc||i===-Rc){var e=i<0?-1:1;return e*ox}return i===i?i:0}function yx(i){var e=bx(i),t=e%1;return e===e?t?e-t:e:0}function wx(i){if(typeof i=="number")return i;if(vx(i))return $c;if(kc(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=kc(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace(cx,"");var t=px.test(i);return t||ux.test(i)?mx(i.slice(2),t?2:8):lx.test(i)?$c:+i}Sc.exports=gx});var Ic=v((Qw,Mc)=>{var Cc=pr(),Ex=Pr(),Rx=Tr(),Oc=Ft(),$x=ac(),ni=lc(),Tc=fc(),Fr=gc(),Ac=yc(),_e=Ec(),kx=_c(),{KeyObject:Sx,createSecretKey:_x,createPrivateKey:Cx}=require("crypto"),Lc=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];Ex&&Lc.splice(3,0,"PS256","PS384","PS512");var Ox={expiresIn:{isValid:function(i){return Tc(i)||_e(i)&&i},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(i){return Tc(i)||_e(i)&&i},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(i){return _e(i)||Array.isArray(i)},message:'"audience" must be a string or array'},algorithm:{isValid:$x.bind(null,Lc),message:'"algorithm" must be a valid string enum value'},header:{isValid:Ac,message:'"header" must be an object'},encoding:{isValid:_e,message:'"encoding" must be a string'},issuer:{isValid:_e,message:'"issuer" must be a string'},subject:{isValid:_e,message:'"subject" must be a string'},jwtid:{isValid:_e,message:'"jwtid" must be a string'},noTimestamp:{isValid:ni,message:'"noTimestamp" must be a boolean'},keyid:{isValid:_e,message:'"keyid" must be a string'},mutatePayload:{isValid:ni,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:ni,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:ni,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},Tx={iat:{isValid:Fr,message:'"iat" should be a number of seconds'},exp:{isValid:Fr,message:'"exp" should be a number of seconds'},nbf:{isValid:Fr,message:'"nbf" should be a number of seconds'}};function jc(i,e,t,r){if(!Ac(t))throw new Error('Expected "'+r+'" to be a plain object.');Object.keys(t).forEach(function(n){let s=i[n];if(!s){if(!e)throw new Error('"'+n+'" is not allowed in "'+r+'"');return}if(!s.isValid(t[n]))throw new Error(s.message)})}function Px(i){return jc(Ox,!1,i,"options")}function Ax(i){return jc(Tx,!0,i,"payload")}var Pc={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},Lx=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];Mc.exports=function(i,e,t,r){typeof t=="function"?(r=t,t={}):t=t||{};let n=typeof i=="object"&&!Buffer.isBuffer(i),s=Object.assign({alg:t.algorithm||"HS256",typ:n?"JWT":void 0,kid:t.keyid},t.header);function o(l){if(r)return r(l);throw l}if(!e&&t.algorithm!=="none")return o(new Error("secretOrPrivateKey must have a value"));if(e!=null&&!(e instanceof Sx))try{e=Cx(e)}catch{try{e=_x(typeof e=="string"?Buffer.from(e):e)}catch{return o(new Error("secretOrPrivateKey is not valid key material"))}}if(s.alg.startsWith("HS")&&e.type!=="secret")return o(new Error(`secretOrPrivateKey must be a symmetric key when using ${s.alg}`));if(/^(?:RS|PS|ES)/.test(s.alg)){if(e.type!=="private")return o(new Error(`secretOrPrivateKey must be an asymmetric key when using ${s.alg}`));if(!t.allowInsecureKeySizes&&!s.alg.startsWith("ES")&&e.asymmetricKeyDetails!==void 0&&e.asymmetricKeyDetails.modulusLength<2048)return o(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`))}if(typeof i>"u")return o(new Error("payload is required"));if(n){try{Ax(i)}catch(l){return o(l)}t.mutatePayload||(i=Object.assign({},i))}else{let l=Lx.filter(function(p){return typeof t[p]<"u"});if(l.length>0)return o(new Error("invalid "+l.join(",")+" option for "+typeof i+" payload"))}if(typeof i.exp<"u"&&typeof t.expiresIn<"u")return o(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(typeof i.nbf<"u"&&typeof t.notBefore<"u")return o(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{Px(t)}catch(l){return o(l)}if(!t.allowInvalidAsymmetricKeyTypes)try{Rx(s.alg,e)}catch(l){return o(l)}let a=i.iat||Math.floor(Date.now()/1e3);if(t.noTimestamp?delete i.iat:n&&(i.iat=a),typeof t.notBefore<"u"){try{i.nbf=Cc(t.notBefore,a)}catch(l){return o(l)}if(typeof i.nbf>"u")return o(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(typeof t.expiresIn<"u"&&typeof i=="object"){try{i.exp=Cc(t.expiresIn,a)}catch(l){return o(l)}if(typeof i.exp>"u")return o(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(Pc).forEach(function(l){let p=Pc[l];if(typeof t[l]<"u"){if(typeof i[p]<"u")return o(new Error('Bad "options.'+l+'" option. The payload already has an "'+p+'" property.'));i[p]=t[l]}});let c=t.encoding||"utf8";if(typeof r=="function")r=r&&kx(r),Oc.createSign({header:s,privateKey:e,payload:i,encoding:c}).once("error",r).once("done",function(l){if(!t.allowInsecureKeySizes&&/^(?:RS|PS)/.test(s.alg)&&l.length<256)return r(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`));r(null,l)});else{let l=Oc.sign({header:s,payload:i,secret:e,encoding:c});if(!t.allowInsecureKeySizes&&/^(?:RS|PS)/.test(s.alg)&&l.length<256)throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`);return l}}});var Ur=v((Zw,Nc)=>{Nc.exports={decode:ar(),verify:tc(),sign:Ic(),JsonWebTokenError:st(),NotBeforeError:cr(),TokenExpiredError:lr()}});var Zc=v((SE,cv)=>{cv.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"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:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,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:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"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:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"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:!0,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:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"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:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,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:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,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:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"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:!0},"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:!1,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:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,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:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"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:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,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:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,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:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"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:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"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:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"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:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,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:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,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:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"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:!1,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:!0,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:!0},"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:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,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:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,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:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"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:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,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:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"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:!0},"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:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,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:!0,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:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"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:!0},"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:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"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:!0},"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:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"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:!0,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:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"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:!0},"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:!0},"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:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"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:!0},"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:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"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:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"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:!1},"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:!1},"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:!1},"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:!0},"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:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"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:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"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:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"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:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"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:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,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:!1},"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:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"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:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"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:!0},"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:!0},"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:!0,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:!1,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:!0,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:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,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:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,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:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"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:!1,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:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"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:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,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:!0},"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:!1,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:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,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:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"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:!0,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:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"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:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"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:!0},"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:!0},"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:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"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:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"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:!0,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:!0},"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:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"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:!0},"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:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,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:!0,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:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,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:!0,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:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"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:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"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:!0,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:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"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:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"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:!0},"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:!0,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:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"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:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,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:!1,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:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,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:!1},"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:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,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:!0,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:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,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:!1},"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:!0,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:!1,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:!1,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:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,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:!0,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:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"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:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,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:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,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:!1,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:!1,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:!1},"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:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,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:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,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:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,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:!1,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:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,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:!1},"image/png":{source:"iana",compressible:!1,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:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,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:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,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:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,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:!1},"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:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,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:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,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:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,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:!0},"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:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"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:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"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:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,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:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,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:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,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:!0,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:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,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:!0,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:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,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:!0,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:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,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:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,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:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,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:!1,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:!0},"x-shader/x-vertex":{compressible:!0}}});var tl=v((_E,el)=>{el.exports=Zc()});var nl=v(ie=>{"use strict";var mi=tl(),lv=require("path").extname,il=/^\s*([^;\s]*)(?:;|\s|$)/,pv=/^text\//i;ie.charset=rl;ie.charsets={lookup:rl};ie.contentType=uv;ie.extension=mv;ie.extensions=Object.create(null);ie.lookup=dv;ie.types=Object.create(null);fv(ie.extensions,ie.types);function rl(i){if(!i||typeof i!="string")return!1;var e=il.exec(i),t=e&&mi[e[1].toLowerCase()];return t&&t.charset?t.charset:e&&pv.test(e[1])?"UTF-8":!1}function uv(i){if(!i||typeof i!="string")return!1;var e=i.indexOf("/")===-1?ie.lookup(i):i;if(!e)return!1;if(e.indexOf("charset")===-1){var t=ie.charset(e);t&&(e+="; charset="+t.toLowerCase())}return e}function mv(i){if(!i||typeof i!="string")return!1;var e=il.exec(i),t=e&&ie.extensions[e[1].toLowerCase()];return!t||!t.length?!1:t[0]}function dv(i){if(!i||typeof i!="string")return!1;var e=lv("x."+i).toLowerCase().substr(1);return e&&ie.types[e]||!1}function fv(i,e){var t=["nginx","apache",void 0,"iana"];Object.keys(mi).forEach(function(n){var s=mi[n],o=s.extensions;if(!(!o||!o.length)){i[n]=o;for(var a=0;a<o.length;a++){var c=o[a];if(e[c]){var l=t.indexOf(mi[e[c]].source),p=t.indexOf(s.source);if(e[c]!=="application/octet-stream"&&(l>p||l===p&&e[c].substr(0,12)==="application/"))continue}e[c]=n}}})}});var Pl=v((IR,Tl)=>{function Rl(i){return Array.isArray(i)?i:[i]}var cn="",$l=" ",on="\\",Uv=/^\s+$/,Dv=/(?:[^\\]|^)\\$/,qv=/^\\!/,Gv=/^\\#/,Hv=/\r?\n/g,Wv=/^\.*\/|^\.+$/,an="/",_l="node-ignore";typeof Symbol<"u"&&(_l=Symbol.for("node-ignore"));var kl=_l,Vv=(i,e,t)=>Object.defineProperty(i,e,{value:t}),Bv=/([0-z])-([0-z])/g,Cl=()=>!1,zv=i=>i.replace(Bv,(e,t,r)=>t.charCodeAt(0)<=r.charCodeAt(0)?e:cn),Yv=i=>{let{length:e}=i;return i.slice(0,e-e%2)},Jv=[[/^\uFEFF/,()=>cn],[/((?:\\\\)*?)(\\?\s+)$/,(i,e,t)=>e+(t.indexOf("\\")===0?$l:cn)],[/(\\+?)\s/g,(i,e)=>{let{length:t}=e;return e.slice(0,t-t%2)+$l}],[/[\\$.|*+(){^]/g,i=>`\\${i}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(i,e,t)=>e+6<t.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(i,e,t)=>{let r=t.replace(/\\\*/g,"[^\\/]*");return e+r}],[/\\\\\\(?=[$.|*+(){^])/g,()=>on],[/\\\\/g,()=>on],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(i,e,t,r,n)=>e===on?`\\[${t}${Yv(r)}${n}`:n==="]"&&r.length%2===0?`[${zv(t)}${r}]`:"[]"],[/(?:[^*])$/,i=>/\/$/.test(i)?`${i}$`:`${i}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(i,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`]],Sl=Object.create(null),Xv=(i,e)=>{let t=Sl[i];return t||(t=Jv.reduce((r,[n,s])=>r.replace(n,s.bind(i)),i),Sl[i]=t),e?new RegExp(t,"i"):new RegExp(t)},un=i=>typeof i=="string",Kv=i=>i&&un(i)&&!Uv.test(i)&&!Dv.test(i)&&i.indexOf("#")!==0,Qv=i=>i.split(Hv),ln=class{constructor(e,t,r,n){this.origin=e,this.pattern=t,this.negative=r,this.regex=n}},Zv=(i,e)=>{let t=i,r=!1;i.indexOf("!")===0&&(r=!0,i=i.substr(1)),i=i.replace(qv,"!").replace(Gv,"#");let n=Xv(i,e);return new ln(t,i,r,n)},eb=(i,e)=>{throw new e(i)},$e=(i,e,t)=>un(i)?i?$e.isNotRelative(i)?t(`path should be a \`path.relative()\`d string, but got "${e}"`,RangeError):!0:t("path must not be empty",TypeError):t(`path must be a string, but got \`${e}\``,TypeError),Ol=i=>Wv.test(i);$e.isNotRelative=Ol;$e.convert=i=>i;var pn=class{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:r=!1}={}){Vv(this,kl,!0),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=r,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[kl]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(Kv(e)){let t=Zv(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,Rl(un(e)?Qv(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let r=!1,n=!1;return this._rules.forEach(s=>{let{negative:o}=s;if(n===o&&r!==n||o&&!r&&!n&&!t)return;s.regex.test(e)&&(r=!o,n=o)}),{ignored:r,unignored:n}}_test(e,t,r,n){let s=e&&$e.convert(e);return $e(s,e,this._allowRelativePaths?Cl:eb),this._t(s,t,r,n)}_t(e,t,r,n){if(e in t)return t[e];if(n||(n=e.split(an)),n.pop(),!n.length)return t[e]=this._testOne(e,r);let s=this._t(n.join(an)+an,t,r,n);return t[e]=s.ignored?s:this._testOne(e,r)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return Rl(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},bi=i=>new pn(i),tb=i=>$e(i&&$e.convert(i),i,Cl);bi.isPathValid=tb;bi.default=bi;Tl.exports=bi;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let i=t=>/^\\\\\?\\/.test(t)||/["<>|\u0000-\u001F]+/u.test(t)?t:t.replace(/\\/g,"/");$e.convert=i;let e=/^[a-z]:\//i;$e.isNotRelative=t=>e.test(t)||Ol(t)}});(function(){Wn().config(Object.assign({},Bn(),Yn()(process.argv)))})();var Ip=require("fs"),Np=require("path");var jp=T(Ct());var ue=T(require("fs")),Br=T(require("path")),Hc=T(require("os")),Wc=T(Ur());var jx=process.stdout.isTTY===!0&&!process.env.NO_COLOR,Ce=i=>jx?i:"",R=Ce("\x1B[32m"),A=Ce("\x1B[33m"),_=Ce("\x1B[36m"),ce=Ce("\x1B[35m"),h=Ce("\x1B[31m"),g=Ce("\x1B[2m"),ee=Ce("\x1B[1m"),m=Ce("\x1B[0m");var Fc="app.boxel.realms";var Mx={"anthropic/claude-3.5-sonnet":"Anthropic: Claude 3.5 Sonnet","anthropic/claude-3.7-sonnet":"Anthropic: Claude 3.7 Sonnet","anthropic/claude-3.7-sonnet:thinking":"Anthropic: Claude 3.7 Sonnet (thinking)","anthropic/claude-haiku-4.5":"Anthropic: Claude Haiku 4.5","anthropic/claude-sonnet-4":"Anthropic: Claude Sonnet 4","anthropic/claude-sonnet-4.5":"Anthropic: Claude Sonnet 4.5","anthropic/claude-sonnet-4.6":"Anthropic: Claude Sonnet 4.6","anthropic/claude-opus-4.1":"Anthropic: Claude Opus 4.1","deepseek/deepseek-chat-v3-0324":"DeepSeek: DeepSeek V3 0324","google/gemini-2.5-pro":"Google: Gemini 2.5 Pro","google/gemini-2.5-flash-lite":"Google: Gemini 2.5 Flash Lite","google/gemini-2.5-flash":"Google: Gemini 2.5 Flash","meta-llama/llama-3.2-3b-instruct":"Meta: Llama 3.2 3B Instruct","openai/gpt-4.1-nano":"OpenAI: GPT-4.1 Nano","openai/gpt-4.1-mini":"OpenAI: GPT-4.1 Mini","openai/gpt-4.1":"OpenAI: GPT-4.1","openai/gpt-4o":"OpenAI: GPT-4o","openai/gpt-4o-mini":"OpenAI: GPT-4o-mini","openai/gpt-5-nano":"OpenAI: GPT-5 Nano","openai/gpt-5-mini":"OpenAI: GPT-5 Mini","openai/gpt-5":"OpenAI: GPT-5","openai/gpt-oss-20b":"OpenAI: GPT OSS 20B"},tE=Object.keys(Mx);function k(i){return i.endsWith("/")?i:`${i}/`}var Re=class extends Error{status;constructor(e,t){super(t),this.name="MatrixAuthError",this.status=e}};async function Uc(i,e,t){let r=await fetch(new URL("_matrix/client/v3/login",i).href,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:{type:"m.id.user",user:e},password:t,type:"m.login.password"})}),n=await r.json();if(!r.ok)throw new Error(`Matrix login failed: ${r.status} ${JSON.stringify(n)}`);return{accessToken:n.access_token,deviceId:n.device_id,userId:n.user_id,matrixUrl:i}}async function Ix(i){let e=await fetch(new URL(`_matrix/client/v3/user/${encodeURIComponent(i.userId)}/openid/request_token`,i.matrixUrl).href,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i.accessToken}`},body:"{}"});if(!e.ok){let t=await e.text();throw e.status===401||e.status===403?new Re(e.status,`OpenID token request failed: ${e.status} ${t}`):new Error(`OpenID token request failed: ${e.status} ${t}`)}return await e.json()}async function Dr(i,e){let t=await Ix(i),r=`${e.replace(/\/$/,"")}/_server-session`,n=await fetch(r,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let o=await n.text();throw new Error(`Realm server session failed: ${n.status} ${o}`)}let s=n.headers.get("Authorization");if(!s)throw new Error("Realm server session response did not include an Authorization header");return s}async function qr(i,e){let t=`${i.replace(/\/$/,"")}/_realm-auth`,r=await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:e}});if(!r.ok){let n=await r.text();throw new Error(`Realm auth lookup failed: ${r.status} ${n}`)}return await r.json()}function Gr(i){return new URL(`_matrix/client/v3/user/${encodeURIComponent(i.userId)}/account_data/${Fc}`,i.matrixUrl).href}async function si(i){let e;try{e=await fetch(Gr(i),{headers:{Authorization:`Bearer ${i.accessToken}`}})}catch{return[]}if(e.status===401||e.status===403){let t=await e.text();throw new Re(e.status,`Matrix account_data fetch failed: ${e.status} ${t}`)}if(!e.ok)return[];try{let t=await e.json();return Array.isArray(t.realms)?[...t.realms]:[]}catch{return[]}}async function Dc(i,e){let t=await si(i);if(!t.includes(e)){t.push(e);let r=await fetch(Gr(i),{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i.accessToken}`},body:JSON.stringify({realms:t})});if(!r.ok){let n=await r.text();throw r.status===401||r.status===403?new Re(r.status,`Failed to update Matrix account data: ${r.status} ${n}`):new Error(`Failed to update Matrix account data: ${r.status} ${n}`)}}}async function qc(i,e){let t=k(e),r=await si(i),n=r.filter(o=>k(o)!==t);if(n.length===r.length)return!1;let s=await fetch(Gr(i),{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i.accessToken}`},body:JSON.stringify({realms:n})});if(!s.ok){let o=await s.text();throw s.status===401||s.status===403?new Re(s.status,`Failed to update Matrix account data: ${s.status} ${o}`):new Error(`Failed to update Matrix account data: ${s.status} ${o}`)}return!0}var Hr=T(require("readline")),Gc=require("stream");function te(i){let e=Hr.createInterface({input:process.stdin,output:process.stdout});return new Promise(t=>{e.question(i,r=>{e.close(),t(r.trim())})})}function mt(i){let e=new Gc.Writable({write:(r,n,s)=>s()}),t=Hr.createInterface({input:process.stdin,output:e,terminal:!0});return new Promise((r,n)=>{let s=process.stdin,o=s.readableFlowing;s.isTTY&&s.setRawMode(!0);let a=()=>{s.removeListener("data",c),s.isTTY&&s.setRawMode(!1),t.close(),o||s.pause()},c=p=>{try{let u=p.toString().split("\x1B[200~").join("").split("\x1B[201~").join("");for(let d of u)if(d===`
|
|
32
|
-
`||
|
|
33
|
-
`),r(l);return}else
|
|
34
|
-
${
|
|
35
|
-
${
|
|
36
|
-
${
|
|
37
|
-
Available profiles:`),await
|
|
38
|
-
${
|
|
39
|
-
${
|
|
40
|
-
${
|
|
41
|
-
`);for(let r of e){let n=i.getProfile(r),s=r===t,o=
|
|
42
|
-
Choice [1/2/3/4]: `);if(i==="4"){let e=await
|
|
43
|
-
${
|
|
44
|
-
`);let t,r,n;if(e)console.log(`${
|
|
45
|
-
Enter your Boxel username (without @ or domain)`),console.log(`${
|
|
46
|
-
${
|
|
47
|
-
${R}\u2713${m} Profile created: ${
|
|
48
|
-
Available profiles:`);for(let s of t)console.log(` ${s}`);process.exit(1)}else if(n.length===1)r=n[0];else{console.error(`${
|
|
49
|
-
Matching profiles:`);for(let s of n)console.log(` ${s}`);process.exit(1)}}i.switchProfile(r)?console.log(`${R}\u2713${m} Switched to ${
|
|
50
|
-
${
|
|
51
|
-
`);let e=process.env.MATRIX_URL,t=process.env.MATRIX_USERNAME,r=process.env.MATRIX_PASSWORD,n=process.env.REALM_SERVER_URL;if(!e||!t||!r||!n){console.log(`${
|
|
52
|
-
Required variables: MATRIX_URL, MATRIX_USERNAME, MATRIX_PASSWORD, REALM_SERVER_URL`);return}let s=await i.migrateFromEnv();s?s.created?(console.log(`${R}\u2713${m} Created profile: ${
|
|
53
|
-
${
|
|
54
|
-
${
|
|
55
|
-
`)},warn(...i){process.stderr.write(i.map(
|
|
56
|
-
`)},error(...i){process.stderr.write(i.map(
|
|
57
|
-
`)},output(...i){process.stdout.write(i.map(
|
|
58
|
-
`)}};function
|
|
59
|
-
\u26A0\uFE0F Detected local realm directories at legacy local paths:`);let t=
|
|
31
|
+
"HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,ot="secret must be a string or buffer",We="key must be a string or a buffer",Iu="key must be a string, a buffer or an object",sr=typeof ae.createPublicKey=="function";sr&&(We+=" or a KeyObject",ot+="or a KeyObject");function Rs(i){if(!Ge.isBuffer(i)&&typeof i!="string"&&(!sr||typeof i!="object"||typeof i.type!="string"||typeof i.asymmetricKeyType!="string"||typeof i.export!="function"))throw me(We)}function $s(i){if(!Ge.isBuffer(i)&&typeof i!="string"&&typeof i!="object")throw me(Iu)}function Nu(i){if(!Ge.isBuffer(i)){if(typeof i=="string")return i;if(!sr||typeof i!="object"||i.type!=="secret"||typeof i.export!="function")throw me(ot)}}function or(i){return i.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function ks(i){i=i.toString();var e=4-i.length%4;if(e!==4)for(var t=0;t<e;++t)i+="=";return i.replace(/\-/g,"+").replace(/_/g,"/")}function me(i){var e=[].slice.call(arguments,1),t=ws.format.bind(ws,i).apply(null,e);return new TypeError(t)}function Fu(i){return Ge.isBuffer(i)||typeof i=="string"}function at(i){return Fu(i)||(i=JSON.stringify(i)),i}function Ss(i){return function(t,r){Nu(r),t=at(t);var n=ae.createHmac("sha"+i,r),s=(n.update(t),n.digest("base64"));return or(s)}}var nr,Uu="timingSafeEqual"in ae?function(e,t){return e.byteLength!==t.byteLength?!1:ae.timingSafeEqual(e,t)}:function(e,t){return nr||(nr=ys()),nr(e,t)};function Du(i){return function(t,r,n){var s=Ss(i)(t,n);return Uu(Ge.from(r),Ge.from(s))}}function _s(i){return function(t,r){$s(r),t=at(t);var n=ae.createSign("RSA-SHA"+i),s=(n.update(t),n.sign(r,"base64"));return or(s)}}function Cs(i){return function(t,r,n){Rs(n),t=at(t),r=ks(r);var s=ae.createVerify("RSA-SHA"+i);return s.update(t),s.verify(n,r,"base64")}}function qu(i){return function(t,r){$s(r),t=at(t);var n=ae.createSign("RSA-SHA"+i),s=(n.update(t),n.sign({key:r,padding:ae.constants.RSA_PKCS1_PSS_PADDING,saltLength:ae.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return or(s)}}function Hu(i){return function(t,r,n){Rs(n),t=at(t),r=ks(r);var s=ae.createVerify("RSA-SHA"+i);return s.update(t),s.verify({key:n,padding:ae.constants.RSA_PKCS1_PSS_PADDING,saltLength:ae.constants.RSA_PSS_SALTLEN_DIGEST},r,"base64")}}function Wu(i){var e=_s(i);return function(){var r=e.apply(null,arguments);return r=Es.derToJose(r,"ES"+i),r}}function Gu(i){var e=Cs(i);return function(r,n,s){n=Es.joseToDer(n,"ES"+i).toString("base64");var o=e(r,n,s);return o}}function Vu(){return function(){return""}}function Bu(){return function(e,t){return t===""}}Ts.exports=function(e){var t={hs:Ss,rs:_s,ps:qu,es:Wu,none:Vu},r={hs:Du,rs:Cs,ps:Hu,es:Gu,none:Bu},n=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!n)throw me(Mu,e);var s=(n[1]||n[3]).toLowerCase(),o=n[2];return{sign:t[s](o),verify:r[s](o)}}});var cr=v((Jy,Os)=>{var zu=require("buffer").Buffer;Os.exports=function(e){return typeof e=="string"?e:typeof e=="number"||zu.isBuffer(e)?e.toString():JSON.stringify(e)}});var Is=v((Xy,Ms)=>{var Yu=He().Buffer,Ps=tr(),Ju=ar(),Xu=require("stream"),As=cr(),lr=require("util");function Ls(i,e){return Yu.from(i,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Ku(i,e,t){t=t||"utf8";var r=Ls(As(i),"binary"),n=Ls(As(e),t);return lr.format("%s.%s",r,n)}function js(i){var e=i.header,t=i.payload,r=i.secret||i.privateKey,n=i.encoding,s=Ju(e.alg),o=Ku(e,t,n),a=s.sign(o,r);return lr.format("%s.%s",o,a)}function Ut(i){var e=i.secret;if(e=e??i.privateKey,e=e??i.key,/^hs/i.test(i.header.alg)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var t=new Ps(e);this.readable=!0,this.header=i.header,this.encoding=i.encoding,this.secret=this.privateKey=this.key=t,this.payload=new Ps(i.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}lr.inherits(Ut,Xu);Ut.prototype.sign=function(){try{var e=js({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(t){this.readable=!1,this.emit("error",t),this.emit("close")}};Ut.sign=js;Ms.exports=Ut});var Bs=v((Ky,Vs)=>{var Fs=He().Buffer,Ns=tr(),Qu=ar(),Zu=require("stream"),Us=cr(),em=require("util"),tm=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function im(i){return Object.prototype.toString.call(i)==="[object Object]"}function rm(i){if(im(i))return i;try{return JSON.parse(i)}catch{return}}function Ds(i){var e=i.split(".",1)[0];return rm(Fs.from(e,"base64").toString("binary"))}function nm(i){return i.split(".",2).join(".")}function qs(i){return i.split(".")[2]}function sm(i,e){e=e||"utf8";var t=i.split(".")[1];return Fs.from(t,"base64").toString(e)}function Hs(i){return tm.test(i)&&!!Ds(i)}function Ws(i,e,t){if(!e){var r=new Error("Missing algorithm parameter for jws.verify");throw r.code="MISSING_ALGORITHM",r}i=Us(i);var n=qs(i),s=nm(i),o=Qu(e);return o.verify(s,n,t)}function Gs(i,e){if(e=e||{},i=Us(i),!Hs(i))return null;var t=Ds(i);if(!t)return null;var r=sm(i);return(t.typ==="JWT"||e.json)&&(r=JSON.parse(r,e.encoding)),{header:t,payload:r,signature:qs(i)}}function Ve(i){i=i||{};var e=i.secret;if(e=e??i.publicKey,e=e??i.key,/^hs/i.test(i.algorithm)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var t=new Ns(e);this.readable=!0,this.algorithm=i.algorithm,this.encoding=i.encoding,this.secret=this.publicKey=this.key=t,this.signature=new Ns(i.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}em.inherits(Ve,Zu);Ve.prototype.verify=function(){try{var e=Ws(this.signature.buffer,this.algorithm,this.key.buffer),t=Gs(this.signature.buffer,this.encoding);return this.emit("done",e,t),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(r){this.readable=!1,this.emit("error",r),this.emit("close")}};Ve.decode=Gs;Ve.isValid=Hs;Ve.verify=Ws;Vs.exports=Ve});var qt=v(Se=>{var zs=Is(),Dt=Bs(),om=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];Se.ALGORITHMS=om;Se.sign=zs.sign;Se.verify=Dt.verify;Se.decode=Dt.decode;Se.isValid=Dt.isValid;Se.createSign=function(e){return new zs(e)};Se.createVerify=function(e){return new Dt(e)}});var pr=v((Zy,Ys)=>{var am=qt();Ys.exports=function(i,e){e=e||{};var t=am.decode(i,e);if(!t)return null;var r=t.payload;if(typeof r=="string")try{var n=JSON.parse(r);n!==null&&typeof n=="object"&&(r=n)}catch{}return e.complete===!0?{header:t.header,payload:r,signature:t.signature}:r}});var ct=v((ew,Js)=>{var Ht=function(i,e){Error.call(this,i),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=i,e&&(this.inner=e)};Ht.prototype=Object.create(Error.prototype);Ht.prototype.constructor=Ht;Js.exports=Ht});var ur=v((tw,Ks)=>{var Xs=ct(),Wt=function(i,e){Xs.call(this,i),this.name="NotBeforeError",this.date=e};Wt.prototype=Object.create(Xs.prototype);Wt.prototype.constructor=Wt;Ks.exports=Wt});var mr=v((iw,Zs)=>{var Qs=ct(),Gt=function(i,e){Qs.call(this,i),this.name="TokenExpiredError",this.expiredAt=e};Gt.prototype=Object.create(Qs.prototype);Gt.prototype.constructor=Gt;Zs.exports=Gt});var to=v((rw,eo)=>{var Be=1e3,ze=Be*60,Ye=ze*60,Me=Ye*24,cm=Me*7,lm=Me*365.25;eo.exports=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return pm(i);if(t==="number"&&isFinite(i))return e.long?mm(i):um(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function pm(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*lm;case"weeks":case"week":case"w":return t*cm;case"days":case"day":case"d":return t*Me;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Ye;case"minutes":case"minute":case"mins":case"min":case"m":return t*ze;case"seconds":case"second":case"secs":case"sec":case"s":return t*Be;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function um(i){var e=Math.abs(i);return e>=Me?Math.round(i/Me)+"d":e>=Ye?Math.round(i/Ye)+"h":e>=ze?Math.round(i/ze)+"m":e>=Be?Math.round(i/Be)+"s":i+"ms"}function mm(i){var e=Math.abs(i);return e>=Me?Vt(i,e,Me,"day"):e>=Ye?Vt(i,e,Ye,"hour"):e>=ze?Vt(i,e,ze,"minute"):e>=Be?Vt(i,e,Be,"second"):i+" ms"}function Vt(i,e,t,r){var n=e>=t*1.5;return Math.round(i/t)+" "+r+(n?"s":"")}});var dr=v((nw,io)=>{var dm=to();io.exports=function(i,e){var t=e||Math.floor(Date.now()/1e3);if(typeof i=="string"){var r=dm(i);return typeof r>"u"?void 0:Math.floor(t+r/1e3)}else return typeof i=="number"?t+i:void 0}});var Je=v((sw,ro)=>{"use strict";var fm="2.0.0",hm=Number.MAX_SAFE_INTEGER||9007199254740991,gm=16,xm=250,vm=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ro.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:gm,MAX_SAFE_BUILD_LENGTH:xm,MAX_SAFE_INTEGER:hm,RELEASE_TYPES:vm,SEMVER_SPEC_VERSION:fm,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var lt=v((ow,no)=>{"use strict";var bm=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};no.exports=bm});var Xe=v((xe,so)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:fr,MAX_SAFE_BUILD_LENGTH:ym,MAX_LENGTH:wm}=Je(),Em=lt();xe=so.exports={};var Rm=xe.re=[],$m=xe.safeRe=[],y=xe.src=[],km=xe.safeSrc=[],w=xe.t={},Sm=0,hr="[a-zA-Z0-9-]",_m=[["\\s",1],["\\d",wm],[hr,ym]],Cm=i=>{for(let[e,t]of _m)i=i.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return i},S=(i,e,t)=>{let r=Cm(e),n=Sm++;Em(i,n,e),w[i]=n,y[n]=e,km[n]=r,Rm[n]=new RegExp(e,t?"g":void 0),$m[n]=new RegExp(r,t?"g":void 0)};S("NUMERICIDENTIFIER","0|[1-9]\\d*");S("NUMERICIDENTIFIERLOOSE","\\d+");S("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${hr}*`);S("MAINVERSION",`(${y[w.NUMERICIDENTIFIER]})\\.(${y[w.NUMERICIDENTIFIER]})\\.(${y[w.NUMERICIDENTIFIER]})`);S("MAINVERSIONLOOSE",`(${y[w.NUMERICIDENTIFIERLOOSE]})\\.(${y[w.NUMERICIDENTIFIERLOOSE]})\\.(${y[w.NUMERICIDENTIFIERLOOSE]})`);S("PRERELEASEIDENTIFIER",`(?:${y[w.NONNUMERICIDENTIFIER]}|${y[w.NUMERICIDENTIFIER]})`);S("PRERELEASEIDENTIFIERLOOSE",`(?:${y[w.NONNUMERICIDENTIFIER]}|${y[w.NUMERICIDENTIFIERLOOSE]})`);S("PRERELEASE",`(?:-(${y[w.PRERELEASEIDENTIFIER]}(?:\\.${y[w.PRERELEASEIDENTIFIER]})*))`);S("PRERELEASELOOSE",`(?:-?(${y[w.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${y[w.PRERELEASEIDENTIFIERLOOSE]})*))`);S("BUILDIDENTIFIER",`${hr}+`);S("BUILD",`(?:\\+(${y[w.BUILDIDENTIFIER]}(?:\\.${y[w.BUILDIDENTIFIER]})*))`);S("FULLPLAIN",`v?${y[w.MAINVERSION]}${y[w.PRERELEASE]}?${y[w.BUILD]}?`);S("FULL",`^${y[w.FULLPLAIN]}$`);S("LOOSEPLAIN",`[v=\\s]*${y[w.MAINVERSIONLOOSE]}${y[w.PRERELEASELOOSE]}?${y[w.BUILD]}?`);S("LOOSE",`^${y[w.LOOSEPLAIN]}$`);S("GTLT","((?:<|>)?=?)");S("XRANGEIDENTIFIERLOOSE",`${y[w.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);S("XRANGEIDENTIFIER",`${y[w.NUMERICIDENTIFIER]}|x|X|\\*`);S("XRANGEPLAIN",`[v=\\s]*(${y[w.XRANGEIDENTIFIER]})(?:\\.(${y[w.XRANGEIDENTIFIER]})(?:\\.(${y[w.XRANGEIDENTIFIER]})(?:${y[w.PRERELEASE]})?${y[w.BUILD]}?)?)?`);S("XRANGEPLAINLOOSE",`[v=\\s]*(${y[w.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[w.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[w.XRANGEIDENTIFIERLOOSE]})(?:${y[w.PRERELEASELOOSE]})?${y[w.BUILD]}?)?)?`);S("XRANGE",`^${y[w.GTLT]}\\s*${y[w.XRANGEPLAIN]}$`);S("XRANGELOOSE",`^${y[w.GTLT]}\\s*${y[w.XRANGEPLAINLOOSE]}$`);S("COERCEPLAIN",`(^|[^\\d])(\\d{1,${fr}})(?:\\.(\\d{1,${fr}}))?(?:\\.(\\d{1,${fr}}))?`);S("COERCE",`${y[w.COERCEPLAIN]}(?:$|[^\\d])`);S("COERCEFULL",y[w.COERCEPLAIN]+`(?:${y[w.PRERELEASE]})?(?:${y[w.BUILD]})?(?:$|[^\\d])`);S("COERCERTL",y[w.COERCE],!0);S("COERCERTLFULL",y[w.COERCEFULL],!0);S("LONETILDE","(?:~>?)");S("TILDETRIM",`(\\s*)${y[w.LONETILDE]}\\s+`,!0);xe.tildeTrimReplace="$1~";S("TILDE",`^${y[w.LONETILDE]}${y[w.XRANGEPLAIN]}$`);S("TILDELOOSE",`^${y[w.LONETILDE]}${y[w.XRANGEPLAINLOOSE]}$`);S("LONECARET","(?:\\^)");S("CARETTRIM",`(\\s*)${y[w.LONECARET]}\\s+`,!0);xe.caretTrimReplace="$1^";S("CARET",`^${y[w.LONECARET]}${y[w.XRANGEPLAIN]}$`);S("CARETLOOSE",`^${y[w.LONECARET]}${y[w.XRANGEPLAINLOOSE]}$`);S("COMPARATORLOOSE",`^${y[w.GTLT]}\\s*(${y[w.LOOSEPLAIN]})$|^$`);S("COMPARATOR",`^${y[w.GTLT]}\\s*(${y[w.FULLPLAIN]})$|^$`);S("COMPARATORTRIM",`(\\s*)${y[w.GTLT]}\\s*(${y[w.LOOSEPLAIN]}|${y[w.XRANGEPLAIN]})`,!0);xe.comparatorTrimReplace="$1$2$3";S("HYPHENRANGE",`^\\s*(${y[w.XRANGEPLAIN]})\\s+-\\s+(${y[w.XRANGEPLAIN]})\\s*$`);S("HYPHENRANGELOOSE",`^\\s*(${y[w.XRANGEPLAINLOOSE]})\\s+-\\s+(${y[w.XRANGEPLAINLOOSE]})\\s*$`);S("STAR","(<|>)?=?\\s*\\*");S("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");S("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Bt=v((aw,oo)=>{"use strict";var Tm=Object.freeze({loose:!0}),Om=Object.freeze({}),Pm=i=>i?typeof i!="object"?Tm:i:Om;oo.exports=Pm});var gr=v((cw,lo)=>{"use strict";var ao=/^[0-9]+$/,co=(i,e)=>{if(typeof i=="number"&&typeof e=="number")return i===e?0:i<e?-1:1;let t=ao.test(i),r=ao.test(e);return t&&r&&(i=+i,e=+e),i===e?0:t&&!r?-1:r&&!t?1:i<e?-1:1},Am=(i,e)=>co(e,i);lo.exports={compareIdentifiers:co,rcompareIdentifiers:Am}});var J=v((lw,uo)=>{"use strict";var zt=lt(),{MAX_LENGTH:po,MAX_SAFE_INTEGER:Yt}=Je(),{safeRe:Jt,t:Xt}=Xe(),Lm=Bt(),{compareIdentifiers:xr}=gr(),vr=class i{constructor(e,t){if(t=Lm(t),e instanceof i){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>po)throw new TypeError(`version is longer than ${po} characters`);zt("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?Jt[Xt.LOOSE]:Jt[Xt.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Yt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Yt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Yt||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s<Yt)return s}return n}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(zt("SemVer.compare",this.version,this.options,e),!(e instanceof i)){if(typeof e=="string"&&e===this.version)return 0;e=new i(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof i||(e=new i(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof i||(e=new i(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],n=e.prerelease[t];if(zt("prerelease compare",t,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r===n)continue;return xr(r,n)}while(++t)}compareBuild(e){e instanceof i||(e=new i(e,this.options));let t=0;do{let r=this.build[t],n=e.build[t];if(zt("build compare",t,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r===n)continue;return xr(r,n)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let n=`-${t}`.match(this.options.loose?Jt[Xt.PRERELEASELOOSE]:Jt[Xt.PRERELEASE]);if(!n||n[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let s=[t,n];r===!1&&(s=[t]),xr(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};uo.exports=vr});var _e=v((pw,fo)=>{"use strict";var mo=J(),jm=(i,e,t=!1)=>{if(i instanceof mo)return i;try{return new mo(i,e)}catch(r){if(!t)return null;throw r}};fo.exports=jm});var go=v((uw,ho)=>{"use strict";var Mm=_e(),Im=(i,e)=>{let t=Mm(i,e);return t?t.version:null};ho.exports=Im});var vo=v((mw,xo)=>{"use strict";var Nm=_e(),Fm=(i,e)=>{let t=Nm(i.trim().replace(/^[=v]+/,""),e);return t?t.version:null};xo.exports=Fm});var wo=v((dw,yo)=>{"use strict";var bo=J(),Um=(i,e,t,r,n)=>{typeof t=="string"&&(n=r,r=t,t=void 0);try{return new bo(i instanceof bo?i.version:i,t).inc(e,r,n).version}catch{return null}};yo.exports=Um});var $o=v((fw,Ro)=>{"use strict";var Eo=_e(),Dm=(i,e)=>{let t=Eo(i,null,!0),r=Eo(e,null,!0),n=t.compare(r);if(n===0)return null;let s=n>0,o=s?t:r,a=s?r:t,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let p=c?"pre":"";return t.major!==r.major?p+"major":t.minor!==r.minor?p+"minor":t.patch!==r.patch?p+"patch":"prerelease"};Ro.exports=Dm});var So=v((hw,ko)=>{"use strict";var qm=J(),Hm=(i,e)=>new qm(i,e).major;ko.exports=Hm});var Co=v((gw,_o)=>{"use strict";var Wm=J(),Gm=(i,e)=>new Wm(i,e).minor;_o.exports=Gm});var Oo=v((xw,To)=>{"use strict";var Vm=J(),Bm=(i,e)=>new Vm(i,e).patch;To.exports=Bm});var Ao=v((vw,Po)=>{"use strict";var zm=_e(),Ym=(i,e)=>{let t=zm(i,e);return t&&t.prerelease.length?t.prerelease:null};Po.exports=Ym});var ce=v((bw,jo)=>{"use strict";var Lo=J(),Jm=(i,e,t)=>new Lo(i,t).compare(new Lo(e,t));jo.exports=Jm});var Io=v((yw,Mo)=>{"use strict";var Xm=ce(),Km=(i,e,t)=>Xm(e,i,t);Mo.exports=Km});var Fo=v((ww,No)=>{"use strict";var Qm=ce(),Zm=(i,e)=>Qm(i,e,!0);No.exports=Zm});var Kt=v((Ew,Do)=>{"use strict";var Uo=J(),ed=(i,e,t)=>{let r=new Uo(i,t),n=new Uo(e,t);return r.compare(n)||r.compareBuild(n)};Do.exports=ed});var Ho=v((Rw,qo)=>{"use strict";var td=Kt(),id=(i,e)=>i.sort((t,r)=>td(t,r,e));qo.exports=id});var Go=v(($w,Wo)=>{"use strict";var rd=Kt(),nd=(i,e)=>i.sort((t,r)=>rd(r,t,e));Wo.exports=nd});var pt=v((kw,Vo)=>{"use strict";var sd=ce(),od=(i,e,t)=>sd(i,e,t)>0;Vo.exports=od});var Qt=v((Sw,Bo)=>{"use strict";var ad=ce(),cd=(i,e,t)=>ad(i,e,t)<0;Bo.exports=cd});var br=v((_w,zo)=>{"use strict";var ld=ce(),pd=(i,e,t)=>ld(i,e,t)===0;zo.exports=pd});var yr=v((Cw,Yo)=>{"use strict";var ud=ce(),md=(i,e,t)=>ud(i,e,t)!==0;Yo.exports=md});var Zt=v((Tw,Jo)=>{"use strict";var dd=ce(),fd=(i,e,t)=>dd(i,e,t)>=0;Jo.exports=fd});var ei=v((Ow,Xo)=>{"use strict";var hd=ce(),gd=(i,e,t)=>hd(i,e,t)<=0;Xo.exports=gd});var wr=v((Pw,Ko)=>{"use strict";var xd=br(),vd=yr(),bd=pt(),yd=Zt(),wd=Qt(),Ed=ei(),Rd=(i,e,t,r)=>{switch(e){case"===":return typeof i=="object"&&(i=i.version),typeof t=="object"&&(t=t.version),i===t;case"!==":return typeof i=="object"&&(i=i.version),typeof t=="object"&&(t=t.version),i!==t;case"":case"=":case"==":return xd(i,t,r);case"!=":return vd(i,t,r);case">":return bd(i,t,r);case">=":return yd(i,t,r);case"<":return wd(i,t,r);case"<=":return Ed(i,t,r);default:throw new TypeError(`Invalid operator: ${e}`)}};Ko.exports=Rd});var Zo=v((Aw,Qo)=>{"use strict";var $d=J(),kd=_e(),{safeRe:ti,t:ii}=Xe(),Sd=(i,e)=>{if(i instanceof $d)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;e=e||{};let t=null;if(!e.rtl)t=i.match(e.includePrerelease?ti[ii.COERCEFULL]:ti[ii.COERCE]);else{let c=e.includePrerelease?ti[ii.COERCERTLFULL]:ti[ii.COERCERTL],l;for(;(l=c.exec(i))&&(!t||t.index+t[0].length!==i.length);)(!t||l.index+l[0].length!==t.index+t[0].length)&&(t=l),c.lastIndex=l.index+l[1].length+l[2].length;c.lastIndex=-1}if(t===null)return null;let r=t[2],n=t[3]||"0",s=t[4]||"0",o=e.includePrerelease&&t[5]?`-${t[5]}`:"",a=e.includePrerelease&&t[6]?`+${t[6]}`:"";return kd(`${r}.${n}.${s}${o}${a}`,e)};Qo.exports=Sd});var ta=v((Lw,ea)=>{"use strict";var _d=_e(),Cd=Je(),Td=J(),Od=(i,e,t)=>{if(!Cd.RELEASE_TYPES.includes(e))return null;let r=Pd(i,t);return r&&Ad(r,e)},Pd=(i,e)=>{let t=i instanceof Td?i.version:i;return _d(t,e)},Ad=(i,e)=>{if(Ld(e))return i.version;switch(i.prerelease=[],e){case"major":i.minor=0,i.patch=0;break;case"minor":i.patch=0;break}return i.format()},Ld=i=>i.startsWith("pre");ea.exports=Od});var ra=v((jw,ia)=>{"use strict";var Er=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,t)}return this}};ia.exports=Er});var le=v((Mw,aa)=>{"use strict";var jd=/\s+/g,Rr=class i{constructor(e,t){if(t=Id(t),e instanceof i)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new i(e.raw,t);if(e instanceof $r)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(jd," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(n=>!sa(n[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Wd(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let r=0;r<t.length;r++)r>0&&(this.formatted+=" "),this.formatted+=t[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&qd)|(this.options.loose&&Hd))+":"+e,n=na.get(r);if(n)return n;let s=this.options.loose,o=s?Q[X.HYPHENRANGELOOSE]:Q[X.HYPHENRANGE];e=e.replace(o,Zd(this.options.includePrerelease)),F("hyphen replace",e),e=e.replace(Q[X.COMPARATORTRIM],Fd),F("comparator trim",e),e=e.replace(Q[X.TILDETRIM],Ud),F("tilde trim",e),e=e.replace(Q[X.CARETTRIM],Dd),F("caret trim",e);let a=e.split(" ").map(u=>Gd(u,this.options)).join(" ").split(/\s+/).map(u=>Qd(u,this.options));s&&(a=a.filter(u=>(F("loose invalid filter",u,this.options),!!u.match(Q[X.COMPARATORLOOSE])))),F("range list",a);let c=new Map,l=a.map(u=>new $r(u,this.options));for(let u of l){if(sa(u))return[u];c.set(u.value,u)}c.size>1&&c.has("")&&c.delete("");let p=[...c.values()];return na.set(r,p),p}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Range is required");return this.set.some(r=>oa(r,t)&&e.set.some(n=>oa(n,t)&&r.every(s=>n.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Nd(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(ef(this.set[t],e,this.options))return!0;return!1}};aa.exports=Rr;var Md=ra(),na=new Md,Id=Bt(),$r=ut(),F=lt(),Nd=J(),{safeRe:Q,t:X,comparatorTrimReplace:Fd,tildeTrimReplace:Ud,caretTrimReplace:Dd}=Xe(),{FLAG_INCLUDE_PRERELEASE:qd,FLAG_LOOSE:Hd}=Je(),sa=i=>i.value==="<0.0.0-0",Wd=i=>i.value==="",oa=(i,e)=>{let t=!0,r=i.slice(),n=r.pop();for(;t&&r.length;)t=r.every(s=>n.intersects(s,e)),n=r.pop();return t},Gd=(i,e)=>(i=i.replace(Q[X.BUILD],""),F("comp",i,e),i=zd(i,e),F("caret",i),i=Vd(i,e),F("tildes",i),i=Jd(i,e),F("xrange",i),i=Kd(i,e),F("stars",i),i),Z=i=>!i||i.toLowerCase()==="x"||i==="*",Vd=(i,e)=>i.trim().split(/\s+/).map(t=>Bd(t,e)).join(" "),Bd=(i,e)=>{let t=e.loose?Q[X.TILDELOOSE]:Q[X.TILDE];return i.replace(t,(r,n,s,o,a)=>{F("tilde",i,r,n,s,o,a);let c;return Z(n)?c="":Z(s)?c=`>=${n}.0.0 <${+n+1}.0.0-0`:Z(o)?c=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(F("replaceTilde pr",a),c=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):c=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,F("tilde return",c),c})},zd=(i,e)=>i.trim().split(/\s+/).map(t=>Yd(t,e)).join(" "),Yd=(i,e)=>{F("caret",i,e);let t=e.loose?Q[X.CARETLOOSE]:Q[X.CARET],r=e.includePrerelease?"-0":"";return i.replace(t,(n,s,o,a,c)=>{F("caret",i,n,s,o,a,c);let l;return Z(s)?l="":Z(o)?l=`>=${s}.0.0${r} <${+s+1}.0.0-0`:Z(a)?s==="0"?l=`>=${s}.${o}.0${r} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${r} <${+s+1}.0.0-0`:c?(F("replaceCaret pr",c),s==="0"?o==="0"?l=`>=${s}.${o}.${a}-${c} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a}-${c} <${+s+1}.0.0-0`):(F("no pr"),s==="0"?o==="0"?l=`>=${s}.${o}.${a}${r} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a}${r} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),F("caret return",l),l})},Jd=(i,e)=>(F("replaceXRanges",i,e),i.split(/\s+/).map(t=>Xd(t,e)).join(" ")),Xd=(i,e)=>{i=i.trim();let t=e.loose?Q[X.XRANGELOOSE]:Q[X.XRANGE];return i.replace(t,(r,n,s,o,a,c)=>{F("xRange",i,r,n,s,o,a,c);let l=Z(s),p=l||Z(o),u=p||Z(a),f=u;return n==="="&&f&&(n=""),c=e.includePrerelease?"-0":"",l?n===">"||n==="<"?r="<0.0.0-0":r="*":n&&f?(p&&(o=0),a=0,n===">"?(n=">=",p?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",p?s=+s+1:o=+o+1),n==="<"&&(c="-0"),r=`${n+s}.${o}.${a}${c}`):p?r=`>=${s}.0.0${c} <${+s+1}.0.0-0`:u&&(r=`>=${s}.${o}.0${c} <${s}.${+o+1}.0-0`),F("xRange return",r),r})},Kd=(i,e)=>(F("replaceStars",i,e),i.trim().replace(Q[X.STAR],"")),Qd=(i,e)=>(F("replaceGTE0",i,e),i.trim().replace(Q[e.includePrerelease?X.GTE0PRE:X.GTE0],"")),Zd=i=>(e,t,r,n,s,o,a,c,l,p,u,f)=>(Z(r)?t="":Z(n)?t=`>=${r}.0.0${i?"-0":""}`:Z(s)?t=`>=${r}.${n}.0${i?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${i?"-0":""}`,Z(l)?c="":Z(p)?c=`<${+l+1}.0.0-0`:Z(u)?c=`<${l}.${+p+1}.0-0`:f?c=`<=${l}.${p}.${u}-${f}`:i?c=`<${l}.${p}.${+u+1}-0`:c=`<=${c}`,`${t} ${c}`.trim()),ef=(i,e,t)=>{for(let r=0;r<i.length;r++)if(!i[r].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let r=0;r<i.length;r++)if(F(i[r].semver),i[r].semver!==$r.ANY&&i[r].semver.prerelease.length>0){let n=i[r].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var ut=v((Iw,da)=>{"use strict";var mt=Symbol("SemVer ANY"),_r=class i{static get ANY(){return mt}constructor(e,t){if(t=ca(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Sr("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===mt?this.value="":this.value=this.operator+this.semver.version,Sr("comp",this)}parse(e){let t=this.options.loose?la[pa.COMPARATORLOOSE]:la[pa.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new ua(r[2],this.options.loose):this.semver=mt}toString(){return this.value}test(e){if(Sr("Comparator.test",e,this.options.loose),this.semver===mt||e===mt)return!0;if(typeof e=="string")try{e=new ua(e,this.options)}catch{return!1}return kr(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ma(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new ma(this.value,t).test(e.semver):(t=ca(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||kr(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||kr(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};da.exports=_r;var ca=Bt(),{safeRe:la,t:pa}=Xe(),kr=wr(),Sr=lt(),ua=J(),ma=le()});var dt=v((Nw,fa)=>{"use strict";var tf=le(),rf=(i,e,t)=>{try{e=new tf(e,t)}catch{return!1}return e.test(i)};fa.exports=rf});var ga=v((Fw,ha)=>{"use strict";var nf=le(),sf=(i,e)=>new nf(i,e).set.map(t=>t.map(r=>r.value).join(" ").trim().split(" "));ha.exports=sf});var va=v((Uw,xa)=>{"use strict";var of=J(),af=le(),cf=(i,e,t)=>{let r=null,n=null,s=null;try{s=new af(e,t)}catch{return null}return i.forEach(o=>{s.test(o)&&(!r||n.compare(o)===-1)&&(r=o,n=new of(r,t))}),r};xa.exports=cf});var ya=v((Dw,ba)=>{"use strict";var lf=J(),pf=le(),uf=(i,e,t)=>{let r=null,n=null,s=null;try{s=new pf(e,t)}catch{return null}return i.forEach(o=>{s.test(o)&&(!r||n.compare(o)===1)&&(r=o,n=new lf(r,t))}),r};ba.exports=uf});var Ra=v((qw,Ea)=>{"use strict";var Cr=J(),mf=le(),wa=pt(),df=(i,e)=>{i=new mf(i,e);let t=new Cr("0.0.0");if(i.test(t)||(t=new Cr("0.0.0-0"),i.test(t)))return t;t=null;for(let r=0;r<i.set.length;++r){let n=i.set[r],s=null;n.forEach(o=>{let a=new Cr(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||wa(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||wa(t,s))&&(t=s)}return t&&i.test(t)?t:null};Ea.exports=df});var ka=v((Hw,$a)=>{"use strict";var ff=le(),hf=(i,e)=>{try{return new ff(i,e).range||"*"}catch{return null}};$a.exports=hf});var ri=v((Ww,Ta)=>{"use strict";var gf=J(),Ca=ut(),{ANY:xf}=Ca,vf=le(),bf=dt(),Sa=pt(),_a=Qt(),yf=ei(),wf=Zt(),Ef=(i,e,t,r)=>{i=new gf(i,r),e=new vf(e,r);let n,s,o,a,c;switch(t){case">":n=Sa,s=yf,o=_a,a=">",c=">=";break;case"<":n=_a,s=wf,o=Sa,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(bf(i,e,r))return!1;for(let l=0;l<e.set.length;++l){let p=e.set[l],u=null,f=null;if(p.forEach(d=>{d.semver===xf&&(d=new Ca(">=0.0.0")),u=u||d,f=f||d,n(d.semver,u.semver,r)?u=d:o(d.semver,f.semver,r)&&(f=d)}),u.operator===a||u.operator===c||(!f.operator||f.operator===a)&&s(i,f.semver))return!1;if(f.operator===c&&o(i,f.semver))return!1}return!0};Ta.exports=Ef});var Pa=v((Gw,Oa)=>{"use strict";var Rf=ri(),$f=(i,e,t)=>Rf(i,e,">",t);Oa.exports=$f});var La=v((Vw,Aa)=>{"use strict";var kf=ri(),Sf=(i,e,t)=>kf(i,e,"<",t);Aa.exports=Sf});var Ia=v((Bw,Ma)=>{"use strict";var ja=le(),_f=(i,e,t)=>(i=new ja(i,t),e=new ja(e,t),i.intersects(e,t));Ma.exports=_f});var Fa=v((zw,Na)=>{"use strict";var Cf=dt(),Tf=ce();Na.exports=(i,e,t)=>{let r=[],n=null,s=null,o=i.sort((p,u)=>Tf(p,u,t));for(let p of o)Cf(p,e,t)?(s=p,n||(n=p)):(s&&r.push([n,s]),s=null,n=null);n&&r.push([n,null]);let a=[];for(let[p,u]of r)p===u?a.push(p):!u&&p===o[0]?a.push("*"):u?p===o[0]?a.push(`<=${u}`):a.push(`${p} - ${u}`):a.push(`>=${p}`);let c=a.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return c.length<l.length?c:e}});var Ga=v((Yw,Wa)=>{"use strict";var Ua=le(),Or=ut(),{ANY:Tr}=Or,ft=dt(),Pr=ce(),Of=(i,e,t={})=>{if(i===e)return!0;i=new Ua(i,t),e=new Ua(e,t);let r=!1;e:for(let n of i.set){for(let s of e.set){let o=Af(n,s,t);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},Pf=[new Or(">=0.0.0-0")],Da=[new Or(">=0.0.0")],Af=(i,e,t)=>{if(i===e)return!0;if(i.length===1&&i[0].semver===Tr){if(e.length===1&&e[0].semver===Tr)return!0;t.includePrerelease?i=Pf:i=Da}if(e.length===1&&e[0].semver===Tr){if(t.includePrerelease)return!0;e=Da}let r=new Set,n,s;for(let d of i)d.operator===">"||d.operator===">="?n=qa(n,d,t):d.operator==="<"||d.operator==="<="?s=Ha(s,d,t):r.add(d.semver);if(r.size>1)return null;let o;if(n&&s){if(o=Pr(n.semver,s.semver,t),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let d of r){if(n&&!ft(d,String(n),t)||s&&!ft(d,String(s),t))return null;for(let h of e)if(!ft(d,String(h),t))return!1;return!0}let a,c,l,p,u=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;u&&u.prerelease.length===1&&s.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(let d of e){if(p=p||d.operator===">"||d.operator===">=",l=l||d.operator==="<"||d.operator==="<=",n){if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),d.operator===">"||d.operator===">="){if(a=qa(n,d,t),a===d&&a!==n)return!1}else if(n.operator===">="&&!ft(n.semver,String(d),t))return!1}if(s){if(u&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===u.major&&d.semver.minor===u.minor&&d.semver.patch===u.patch&&(u=!1),d.operator==="<"||d.operator==="<="){if(c=Ha(s,d,t),c===d&&c!==s)return!1}else if(s.operator==="<="&&!ft(s.semver,String(d),t))return!1}if(!d.operator&&(s||n)&&o!==0)return!1}return!(n&&l&&!s&&o!==0||s&&p&&!n&&o!==0||f||u)},qa=(i,e,t)=>{if(!i)return e;let r=Pr(i.semver,e.semver,t);return r>0?i:r<0||e.operator===">"&&i.operator===">="?e:i},Ha=(i,e,t)=>{if(!i)return e;let r=Pr(i.semver,e.semver,t);return r<0?i:r>0||e.operator==="<"&&i.operator==="<="?e:i};Wa.exports=Of});var ni=v((Jw,za)=>{"use strict";var Ar=Xe(),Va=Je(),Lf=J(),Ba=gr(),jf=_e(),Mf=go(),If=vo(),Nf=wo(),Ff=$o(),Uf=So(),Df=Co(),qf=Oo(),Hf=Ao(),Wf=ce(),Gf=Io(),Vf=Fo(),Bf=Kt(),zf=Ho(),Yf=Go(),Jf=pt(),Xf=Qt(),Kf=br(),Qf=yr(),Zf=Zt(),eh=ei(),th=wr(),ih=Zo(),rh=ta(),nh=ut(),sh=le(),oh=dt(),ah=ga(),ch=va(),lh=ya(),ph=Ra(),uh=ka(),mh=ri(),dh=Pa(),fh=La(),hh=Ia(),gh=Fa(),xh=Ga();za.exports={parse:jf,valid:Mf,clean:If,inc:Nf,diff:Ff,major:Uf,minor:Df,patch:qf,prerelease:Hf,compare:Wf,rcompare:Gf,compareLoose:Vf,compareBuild:Bf,sort:zf,rsort:Yf,gt:Jf,lt:Xf,eq:Kf,neq:Qf,gte:Zf,lte:eh,cmp:th,coerce:ih,truncate:rh,Comparator:nh,Range:sh,satisfies:oh,toComparators:ah,maxSatisfying:ch,minSatisfying:lh,minVersion:ph,validRange:uh,outside:mh,gtr:dh,ltr:fh,intersects:hh,simplifyRange:gh,subset:xh,SemVer:Lf,re:Ar.re,src:Ar.src,tokens:Ar.t,SEMVER_SPEC_VERSION:Va.SEMVER_SPEC_VERSION,RELEASE_TYPES:Va.RELEASE_TYPES,compareIdentifiers:Ba.compareIdentifiers,rcompareIdentifiers:Ba.rcompareIdentifiers}});var Ja=v((Xw,Ya)=>{var vh=ni();Ya.exports=vh.satisfies(process.version,">=15.7.0")});var Ka=v((Kw,Xa)=>{var bh=ni();Xa.exports=bh.satisfies(process.version,">=16.9.0")});var Lr=v((Qw,Qa)=>{var yh=Ja(),wh=Ka(),Eh={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},Rh={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};Qa.exports=function(i,e){if(!i||!e)return;let t=e.asymmetricKeyType;if(!t)return;let r=Eh[t];if(!r)throw new Error(`Unknown key type "${t}".`);if(!r.includes(i))throw new Error(`"alg" parameter for "${t}" key type must be one of: ${r.join(", ")}.`);if(yh)switch(t){case"ec":let n=e.asymmetricKeyDetails.namedCurve,s=Rh[i];if(n!==s)throw new Error(`"alg" parameter "${i}" requires curve "${s}".`);break;case"rsa-pss":if(wh){let o=parseInt(i.slice(-3),10),{hashAlgorithm:a,mgf1HashAlgorithm:c,saltLength:l}=e.asymmetricKeyDetails;if(a!==`sha${o}`||c!==a)throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${i}.`);if(l!==void 0&&l>o>>3)throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${i}.`)}break}}});var jr=v((Zw,Za)=>{var $h=ni();Za.exports=$h.satisfies(process.version,"^6.12.0 || >=8.0.0")});var ic=v((eE,tc)=>{var N=ct(),kh=ur(),ec=mr(),Sh=pr(),_h=dr(),Ch=Lr(),Th=jr(),Oh=qt(),{KeyObject:Ph,createSecretKey:Ah,createPublicKey:Lh}=require("crypto"),Mr=["RS256","RS384","RS512"],jh=["ES256","ES384","ES512"],Ir=["RS256","RS384","RS512"],Mh=["HS256","HS384","HS512"];Th&&(Mr.splice(Mr.length,0,"PS256","PS384","PS512"),Ir.splice(Ir.length,0,"PS256","PS384","PS512"));tc.exports=function(i,e,t,r){typeof t=="function"&&!r&&(r=t,t={}),t||(t={}),t=Object.assign({},t);let n;if(r?n=r:n=function(p,u){if(p)throw p;return u},t.clockTimestamp&&typeof t.clockTimestamp!="number")return n(new N("clockTimestamp must be a number"));if(t.nonce!==void 0&&(typeof t.nonce!="string"||t.nonce.trim()===""))return n(new N("nonce must be a non-empty string"));if(t.allowInvalidAsymmetricKeyTypes!==void 0&&typeof t.allowInvalidAsymmetricKeyTypes!="boolean")return n(new N("allowInvalidAsymmetricKeyTypes must be a boolean"));let s=t.clockTimestamp||Math.floor(Date.now()/1e3);if(!i)return n(new N("jwt must be provided"));if(typeof i!="string")return n(new N("jwt must be a string"));let o=i.split(".");if(o.length!==3)return n(new N("jwt malformed"));let a;try{a=Sh(i,{complete:!0})}catch(p){return n(p)}if(!a)return n(new N("invalid token"));let c=a.header,l;if(typeof e=="function"){if(!r)return n(new N("verify must be called asynchronous if secret or public key is provided as a callback"));l=e}else l=function(p,u){return u(null,e)};return l(c,function(p,u){if(p)return n(new N("error in secret or public key callback: "+p.message));let f=o[2].trim()!=="";if(!f&&u)return n(new N("jwt signature is required"));if(f&&!u)return n(new N("secret or public key must be provided"));if(!f&&!t.algorithms)return n(new N('please specify "none" in "algorithms" to verify unsigned tokens'));if(u!=null&&!(u instanceof Ph))try{u=Lh(u)}catch{try{u=Ah(typeof u=="string"?Buffer.from(u):u)}catch{return n(new N("secretOrPublicKey is not valid key material"))}}if(t.algorithms||(u.type==="secret"?t.algorithms=Mh:["rsa","rsa-pss"].includes(u.asymmetricKeyType)?t.algorithms=Ir:u.asymmetricKeyType==="ec"?t.algorithms=jh:t.algorithms=Mr),t.algorithms.indexOf(a.header.alg)===-1)return n(new N("invalid algorithm"));if(c.alg.startsWith("HS")&&u.type!=="secret")return n(new N(`secretOrPublicKey must be a symmetric key when using ${c.alg}`));if(/^(?:RS|PS|ES)/.test(c.alg)&&u.type!=="public")return n(new N(`secretOrPublicKey must be an asymmetric key when using ${c.alg}`));if(!t.allowInvalidAsymmetricKeyTypes)try{Ch(c.alg,u)}catch(b){return n(b)}let d;try{d=Oh.verify(i,a.header.alg,u)}catch(b){return n(b)}if(!d)return n(new N("invalid signature"));let h=a.payload;if(typeof h.nbf<"u"&&!t.ignoreNotBefore){if(typeof h.nbf!="number")return n(new N("invalid nbf value"));if(h.nbf>s+(t.clockTolerance||0))return n(new kh("jwt not active",new Date(h.nbf*1e3)))}if(typeof h.exp<"u"&&!t.ignoreExpiration){if(typeof h.exp!="number")return n(new N("invalid exp value"));if(s>=h.exp+(t.clockTolerance||0))return n(new ec("jwt expired",new Date(h.exp*1e3)))}if(t.audience){let b=Array.isArray(t.audience)?t.audience:[t.audience];if(!(Array.isArray(h.aud)?h.aud:[h.aud]).some(function(E){return b.some(function($){return $ instanceof RegExp?$.test(E):$===E})}))return n(new N("jwt audience invalid. expected: "+b.join(" or ")))}if(t.issuer&&(typeof t.issuer=="string"&&h.iss!==t.issuer||Array.isArray(t.issuer)&&t.issuer.indexOf(h.iss)===-1))return n(new N("jwt issuer invalid. expected: "+t.issuer));if(t.subject&&h.sub!==t.subject)return n(new N("jwt subject invalid. expected: "+t.subject));if(t.jwtid&&h.jti!==t.jwtid)return n(new N("jwt jwtid invalid. expected: "+t.jwtid));if(t.nonce&&h.nonce!==t.nonce)return n(new N("jwt nonce invalid. expected: "+t.nonce));if(t.maxAge){if(typeof h.iat!="number")return n(new N("iat required when maxAge is specified"));let b=_h(t.maxAge,h.iat);if(typeof b>"u")return n(new N('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(s>=b+(t.clockTolerance||0))return n(new ec("maxAge exceeded",new Date(b*1e3)))}if(t.complete===!0){let b=a.signature;return n(null,{header:c,payload:h,signature:b})}return n(null,h)})}});var cc=v((tE,ac)=>{var rc=1/0,sc=9007199254740991,Ih=17976931348623157e292,nc=NaN,Nh="[object Arguments]",Fh="[object Function]",Uh="[object GeneratorFunction]",Dh="[object String]",qh="[object Symbol]",Hh=/^\s+|\s+$/g,Wh=/^[-+]0x[0-9a-f]+$/i,Gh=/^0b[01]+$/i,Vh=/^0o[0-7]+$/i,Bh=/^(?:0|[1-9]\d*)$/,zh=parseInt;function Yh(i,e){for(var t=-1,r=i?i.length:0,n=Array(r);++t<r;)n[t]=e(i[t],t,i);return n}function Jh(i,e,t,r){for(var n=i.length,s=t+(r?1:-1);r?s--:++s<n;)if(e(i[s],s,i))return s;return-1}function Xh(i,e,t){if(e!==e)return Jh(i,Kh,t);for(var r=t-1,n=i.length;++r<n;)if(i[r]===e)return r;return-1}function Kh(i){return i!==i}function Qh(i,e){for(var t=-1,r=Array(i);++t<i;)r[t]=e(t);return r}function Zh(i,e){return Yh(e,function(t){return i[t]})}function eg(i,e){return function(t){return i(e(t))}}var si=Object.prototype,Fr=si.hasOwnProperty,oi=si.toString,tg=si.propertyIsEnumerable,ig=eg(Object.keys,Object),rg=Math.max;function ng(i,e){var t=oc(i)||lg(i)?Qh(i.length,String):[],r=t.length,n=!!r;for(var s in i)(e||Fr.call(i,s))&&!(n&&(s=="length"||og(s,r)))&&t.push(s);return t}function sg(i){if(!ag(i))return ig(i);var e=[];for(var t in Object(i))Fr.call(i,t)&&t!="constructor"&&e.push(t);return e}function og(i,e){return e=e??sc,!!e&&(typeof i=="number"||Bh.test(i))&&i>-1&&i%1==0&&i<e}function ag(i){var e=i&&i.constructor,t=typeof e=="function"&&e.prototype||si;return i===t}function cg(i,e,t,r){i=Ur(i)?i:bg(i),t=t&&!r?gg(t):0;var n=i.length;return t<0&&(t=rg(n+t,0)),dg(i)?t<=n&&i.indexOf(e,t)>-1:!!n&&Xh(i,e,t)>-1}function lg(i){return pg(i)&&Fr.call(i,"callee")&&(!tg.call(i,"callee")||oi.call(i)==Nh)}var oc=Array.isArray;function Ur(i){return i!=null&&mg(i.length)&&!ug(i)}function pg(i){return Dr(i)&&Ur(i)}function ug(i){var e=Nr(i)?oi.call(i):"";return e==Fh||e==Uh}function mg(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=sc}function Nr(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function Dr(i){return!!i&&typeof i=="object"}function dg(i){return typeof i=="string"||!oc(i)&&Dr(i)&&oi.call(i)==Dh}function fg(i){return typeof i=="symbol"||Dr(i)&&oi.call(i)==qh}function hg(i){if(!i)return i===0?i:0;if(i=xg(i),i===rc||i===-rc){var e=i<0?-1:1;return e*Ih}return i===i?i:0}function gg(i){var e=hg(i),t=e%1;return e===e?t?e-t:e:0}function xg(i){if(typeof i=="number")return i;if(fg(i))return nc;if(Nr(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=Nr(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace(Hh,"");var t=Gh.test(i);return t||Vh.test(i)?zh(i.slice(2),t?2:8):Wh.test(i)?nc:+i}function vg(i){return Ur(i)?ng(i):sg(i)}function bg(i){return i?Zh(i,vg(i)):[]}ac.exports=cg});var pc=v((iE,lc)=>{var yg="[object Boolean]",wg=Object.prototype,Eg=wg.toString;function Rg(i){return i===!0||i===!1||$g(i)&&Eg.call(i)==yg}function $g(i){return!!i&&typeof i=="object"}lc.exports=Rg});var hc=v((rE,fc)=>{var uc=1/0,kg=17976931348623157e292,mc=NaN,Sg="[object Symbol]",_g=/^\s+|\s+$/g,Cg=/^[-+]0x[0-9a-f]+$/i,Tg=/^0b[01]+$/i,Og=/^0o[0-7]+$/i,Pg=parseInt,Ag=Object.prototype,Lg=Ag.toString;function jg(i){return typeof i=="number"&&i==Fg(i)}function dc(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function Mg(i){return!!i&&typeof i=="object"}function Ig(i){return typeof i=="symbol"||Mg(i)&&Lg.call(i)==Sg}function Ng(i){if(!i)return i===0?i:0;if(i=Ug(i),i===uc||i===-uc){var e=i<0?-1:1;return e*kg}return i===i?i:0}function Fg(i){var e=Ng(i),t=e%1;return e===e?t?e-t:e:0}function Ug(i){if(typeof i=="number")return i;if(Ig(i))return mc;if(dc(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=dc(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace(_g,"");var t=Tg.test(i);return t||Og.test(i)?Pg(i.slice(2),t?2:8):Cg.test(i)?mc:+i}fc.exports=jg});var xc=v((nE,gc)=>{var Dg="[object Number]",qg=Object.prototype,Hg=qg.toString;function Wg(i){return!!i&&typeof i=="object"}function Gg(i){return typeof i=="number"||Wg(i)&&Hg.call(i)==Dg}gc.exports=Gg});var wc=v((sE,yc)=>{var Vg="[object Object]";function Bg(i){var e=!1;if(i!=null&&typeof i.toString!="function")try{e=!!(i+"")}catch{}return e}function zg(i,e){return function(t){return i(e(t))}}var Yg=Function.prototype,vc=Object.prototype,bc=Yg.toString,Jg=vc.hasOwnProperty,Xg=bc.call(Object),Kg=vc.toString,Qg=zg(Object.getPrototypeOf,Object);function Zg(i){return!!i&&typeof i=="object"}function ex(i){if(!Zg(i)||Kg.call(i)!=Vg||Bg(i))return!1;var e=Qg(i);if(e===null)return!0;var t=Jg.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&bc.call(t)==Xg}yc.exports=ex});var Rc=v((oE,Ec)=>{var tx="[object String]",ix=Object.prototype,rx=ix.toString,nx=Array.isArray;function sx(i){return!!i&&typeof i=="object"}function ox(i){return typeof i=="string"||!nx(i)&&sx(i)&&rx.call(i)==tx}Ec.exports=ox});var Cc=v((aE,_c)=>{var ax="Expected a function",$c=1/0,cx=17976931348623157e292,kc=NaN,lx="[object Symbol]",px=/^\s+|\s+$/g,ux=/^[-+]0x[0-9a-f]+$/i,mx=/^0b[01]+$/i,dx=/^0o[0-7]+$/i,fx=parseInt,hx=Object.prototype,gx=hx.toString;function xx(i,e){var t;if(typeof e!="function")throw new TypeError(ax);return i=Ex(i),function(){return--i>0&&(t=e.apply(this,arguments)),i<=1&&(e=void 0),t}}function vx(i){return xx(2,i)}function Sc(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function bx(i){return!!i&&typeof i=="object"}function yx(i){return typeof i=="symbol"||bx(i)&&gx.call(i)==lx}function wx(i){if(!i)return i===0?i:0;if(i=Rx(i),i===$c||i===-$c){var e=i<0?-1:1;return e*cx}return i===i?i:0}function Ex(i){var e=wx(i),t=e%1;return e===e?t?e-t:e:0}function Rx(i){if(typeof i=="number")return i;if(yx(i))return kc;if(Sc(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=Sc(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace(px,"");var t=mx.test(i);return t||dx.test(i)?fx(i.slice(2),t?2:8):ux.test(i)?kc:+i}_c.exports=vx});var Nc=v((cE,Ic)=>{var Tc=dr(),$x=jr(),kx=Lr(),Oc=qt(),Sx=cc(),ai=pc(),Pc=hc(),qr=xc(),Lc=wc(),Ce=Rc(),_x=Cc(),{KeyObject:Cx,createSecretKey:Tx,createPrivateKey:Ox}=require("crypto"),jc=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];$x&&jc.splice(3,0,"PS256","PS384","PS512");var Px={expiresIn:{isValid:function(i){return Pc(i)||Ce(i)&&i},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(i){return Pc(i)||Ce(i)&&i},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(i){return Ce(i)||Array.isArray(i)},message:'"audience" must be a string or array'},algorithm:{isValid:Sx.bind(null,jc),message:'"algorithm" must be a valid string enum value'},header:{isValid:Lc,message:'"header" must be an object'},encoding:{isValid:Ce,message:'"encoding" must be a string'},issuer:{isValid:Ce,message:'"issuer" must be a string'},subject:{isValid:Ce,message:'"subject" must be a string'},jwtid:{isValid:Ce,message:'"jwtid" must be a string'},noTimestamp:{isValid:ai,message:'"noTimestamp" must be a boolean'},keyid:{isValid:Ce,message:'"keyid" must be a string'},mutatePayload:{isValid:ai,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:ai,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:ai,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},Ax={iat:{isValid:qr,message:'"iat" should be a number of seconds'},exp:{isValid:qr,message:'"exp" should be a number of seconds'},nbf:{isValid:qr,message:'"nbf" should be a number of seconds'}};function Mc(i,e,t,r){if(!Lc(t))throw new Error('Expected "'+r+'" to be a plain object.');Object.keys(t).forEach(function(n){let s=i[n];if(!s){if(!e)throw new Error('"'+n+'" is not allowed in "'+r+'"');return}if(!s.isValid(t[n]))throw new Error(s.message)})}function Lx(i){return Mc(Px,!1,i,"options")}function jx(i){return Mc(Ax,!0,i,"payload")}var Ac={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},Mx=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];Ic.exports=function(i,e,t,r){typeof t=="function"?(r=t,t={}):t=t||{};let n=typeof i=="object"&&!Buffer.isBuffer(i),s=Object.assign({alg:t.algorithm||"HS256",typ:n?"JWT":void 0,kid:t.keyid},t.header);function o(l){if(r)return r(l);throw l}if(!e&&t.algorithm!=="none")return o(new Error("secretOrPrivateKey must have a value"));if(e!=null&&!(e instanceof Cx))try{e=Ox(e)}catch{try{e=Tx(typeof e=="string"?Buffer.from(e):e)}catch{return o(new Error("secretOrPrivateKey is not valid key material"))}}if(s.alg.startsWith("HS")&&e.type!=="secret")return o(new Error(`secretOrPrivateKey must be a symmetric key when using ${s.alg}`));if(/^(?:RS|PS|ES)/.test(s.alg)){if(e.type!=="private")return o(new Error(`secretOrPrivateKey must be an asymmetric key when using ${s.alg}`));if(!t.allowInsecureKeySizes&&!s.alg.startsWith("ES")&&e.asymmetricKeyDetails!==void 0&&e.asymmetricKeyDetails.modulusLength<2048)return o(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`))}if(typeof i>"u")return o(new Error("payload is required"));if(n){try{jx(i)}catch(l){return o(l)}t.mutatePayload||(i=Object.assign({},i))}else{let l=Mx.filter(function(p){return typeof t[p]<"u"});if(l.length>0)return o(new Error("invalid "+l.join(",")+" option for "+typeof i+" payload"))}if(typeof i.exp<"u"&&typeof t.expiresIn<"u")return o(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(typeof i.nbf<"u"&&typeof t.notBefore<"u")return o(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{Lx(t)}catch(l){return o(l)}if(!t.allowInvalidAsymmetricKeyTypes)try{kx(s.alg,e)}catch(l){return o(l)}let a=i.iat||Math.floor(Date.now()/1e3);if(t.noTimestamp?delete i.iat:n&&(i.iat=a),typeof t.notBefore<"u"){try{i.nbf=Tc(t.notBefore,a)}catch(l){return o(l)}if(typeof i.nbf>"u")return o(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(typeof t.expiresIn<"u"&&typeof i=="object"){try{i.exp=Tc(t.expiresIn,a)}catch(l){return o(l)}if(typeof i.exp>"u")return o(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(Ac).forEach(function(l){let p=Ac[l];if(typeof t[l]<"u"){if(typeof i[p]<"u")return o(new Error('Bad "options.'+l+'" option. The payload already has an "'+p+'" property.'));i[p]=t[l]}});let c=t.encoding||"utf8";if(typeof r=="function")r=r&&_x(r),Oc.createSign({header:s,privateKey:e,payload:i,encoding:c}).once("error",r).once("done",function(l){if(!t.allowInsecureKeySizes&&/^(?:RS|PS)/.test(s.alg)&&l.length<256)return r(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`));r(null,l)});else{let l=Oc.sign({header:s,payload:i,secret:e,encoding:c});if(!t.allowInsecureKeySizes&&/^(?:RS|PS)/.test(s.alg)&&l.length<256)throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`);return l}}});var Hr=v((lE,Fc)=>{Fc.exports={decode:pr(),verify:ic(),sign:Nc(),JsonWebTokenError:ct(),NotBeforeError:ur(),TokenExpiredError:mr()}});var el=v((IE,pv)=>{pv.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"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:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,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:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"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:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"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:!0,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:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"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:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,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:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,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:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"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:!0},"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:!1,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:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,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:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"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:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,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:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,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:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"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:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"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:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"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:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,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:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,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:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"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:!1,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:!0,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:!0},"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:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,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:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,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:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"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:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,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:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"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:!0},"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:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,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:!0,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:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"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:!0},"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:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"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:!0},"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:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"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:!0,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:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"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:!0},"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:!0},"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:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"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:!0},"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:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"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:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"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:!1},"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:!1},"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:!1},"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:!0},"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:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"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:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"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:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"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:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"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:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,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:!1},"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:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"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:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"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:!0},"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:!0},"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:!0,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:!1,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:!0,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:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,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:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,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:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"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:!1,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:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"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:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,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:!0},"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:!1,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:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,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:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"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:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"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:!0,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:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"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:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"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:!0},"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:!0},"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:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"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:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"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:!0,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:!0},"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:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"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:!0},"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:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,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:!0,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:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,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:!0,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:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"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:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"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:!0,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:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"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:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"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:!0},"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:!0,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:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"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:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,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:!1,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:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,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:!1},"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:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,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:!0,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:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,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:!1},"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:!0,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:!1,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:!1,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:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,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:!0,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:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"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:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,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:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,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:!1,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:!1,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:!1},"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:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,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:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,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:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,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:!1,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:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,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:!1},"image/png":{source:"iana",compressible:!1,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:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,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:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,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:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,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:!1},"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:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,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:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,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:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,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:!0},"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:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"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:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"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:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,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:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,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:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,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:!0,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:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,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:!0,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:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,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:!0,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:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,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:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,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:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,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:!1,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:!0},"x-shader/x-vertex":{compressible:!0}}});var il=v((NE,tl)=>{tl.exports=el()});var sl=v(ne=>{"use strict";var hi=il(),uv=require("path").extname,rl=/^\s*([^;\s]*)(?:;|\s|$)/,mv=/^text\//i;ne.charset=nl;ne.charsets={lookup:nl};ne.contentType=dv;ne.extension=fv;ne.extensions=Object.create(null);ne.lookup=hv;ne.types=Object.create(null);gv(ne.extensions,ne.types);function nl(i){if(!i||typeof i!="string")return!1;var e=rl.exec(i),t=e&&hi[e[1].toLowerCase()];return t&&t.charset?t.charset:e&&mv.test(e[1])?"UTF-8":!1}function dv(i){if(!i||typeof i!="string")return!1;var e=i.indexOf("/")===-1?ne.lookup(i):i;if(!e)return!1;if(e.indexOf("charset")===-1){var t=ne.charset(e);t&&(e+="; charset="+t.toLowerCase())}return e}function fv(i){if(!i||typeof i!="string")return!1;var e=rl.exec(i),t=e&&ne.extensions[e[1].toLowerCase()];return!t||!t.length?!1:t[0]}function hv(i){if(!i||typeof i!="string")return!1;var e=uv("x."+i).toLowerCase().substr(1);return e&&ne.types[e]||!1}function gv(i,e){var t=["nginx","apache",void 0,"iana"];Object.keys(hi).forEach(function(n){var s=hi[n],o=s.extensions;if(!(!o||!o.length)){i[n]=o;for(var a=0;a<o.length;a++){var c=o[a];if(e[c]){var l=t.indexOf(hi[e[c]].source),p=t.indexOf(s.source);if(e[c]!=="application/octet-stream"&&(l>p||l===p&&e[c].substr(0,12)==="application/"))continue}e[c]=n}}})}});var Ll=v((BR,Al)=>{function kl(i){return Array.isArray(i)?i:[i]}var ln="",Sl=" ",an="\\",Jv=/^\s+$/,Xv=/(?:[^\\]|^)\\$/,Kv=/^\\!/,Qv=/^\\#/,Zv=/\r?\n/g,eb=/^\.*\/|^\.+$/,cn="/",Tl="node-ignore";typeof Symbol<"u"&&(Tl=Symbol.for("node-ignore"));var _l=Tl,tb=(i,e,t)=>Object.defineProperty(i,e,{value:t}),ib=/([0-z])-([0-z])/g,Ol=()=>!1,rb=i=>i.replace(ib,(e,t,r)=>t.charCodeAt(0)<=r.charCodeAt(0)?e:ln),nb=i=>{let{length:e}=i;return i.slice(0,e-e%2)},sb=[[/^\uFEFF/,()=>ln],[/((?:\\\\)*?)(\\?\s+)$/,(i,e,t)=>e+(t.indexOf("\\")===0?Sl:ln)],[/(\\+?)\s/g,(i,e)=>{let{length:t}=e;return e.slice(0,t-t%2)+Sl}],[/[\\$.|*+(){^]/g,i=>`\\${i}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(i,e,t)=>e+6<t.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(i,e,t)=>{let r=t.replace(/\\\*/g,"[^\\/]*");return e+r}],[/\\\\\\(?=[$.|*+(){^])/g,()=>an],[/\\\\/g,()=>an],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(i,e,t,r,n)=>e===an?`\\[${t}${nb(r)}${n}`:n==="]"&&r.length%2===0?`[${rb(t)}${r}]`:"[]"],[/(?:[^*])$/,i=>/\/$/.test(i)?`${i}$`:`${i}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(i,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`]],Cl=Object.create(null),ob=(i,e)=>{let t=Cl[i];return t||(t=sb.reduce((r,[n,s])=>r.replace(n,s.bind(i)),i),Cl[i]=t),e?new RegExp(t,"i"):new RegExp(t)},mn=i=>typeof i=="string",ab=i=>i&&mn(i)&&!Jv.test(i)&&!Xv.test(i)&&i.indexOf("#")!==0,cb=i=>i.split(Zv),pn=class{constructor(e,t,r,n){this.origin=e,this.pattern=t,this.negative=r,this.regex=n}},lb=(i,e)=>{let t=i,r=!1;i.indexOf("!")===0&&(r=!0,i=i.substr(1)),i=i.replace(Kv,"!").replace(Qv,"#");let n=ob(i,e);return new pn(t,i,r,n)},pb=(i,e)=>{throw new e(i)},ke=(i,e,t)=>mn(i)?i?ke.isNotRelative(i)?t(`path should be a \`path.relative()\`d string, but got "${e}"`,RangeError):!0:t("path must not be empty",TypeError):t(`path must be a string, but got \`${e}\``,TypeError),Pl=i=>eb.test(i);ke.isNotRelative=Pl;ke.convert=i=>i;var un=class{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:r=!1}={}){tb(this,_l,!0),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=r,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[_l]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(ab(e)){let t=lb(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,kl(mn(e)?cb(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let r=!1,n=!1;return this._rules.forEach(s=>{let{negative:o}=s;if(n===o&&r!==n||o&&!r&&!n&&!t)return;s.regex.test(e)&&(r=!o,n=o)}),{ignored:r,unignored:n}}_test(e,t,r,n){let s=e&&ke.convert(e);return ke(s,e,this._allowRelativePaths?Ol:pb),this._t(s,t,r,n)}_t(e,t,r,n){if(e in t)return t[e];if(n||(n=e.split(cn)),n.pop(),!n.length)return t[e]=this._testOne(e,r);let s=this._t(n.join(cn)+cn,t,r,n);return t[e]=s.ignored?s:this._testOne(e,r)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return kl(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},Ei=i=>new un(i),ub=i=>ke(i&&ke.convert(i),i,Ol);Ei.isPathValid=ub;Ei.default=Ei;Al.exports=Ei;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let i=t=>/^\\\\\?\\/.test(t)||/["<>|\u0000-\u001F]+/u.test(t)?t:t.replace(/\\/g,"/");ke.convert=i;let e=/^[a-z]:\//i;ke.isNotRelative=t=>e.test(t)||Pl(t)}});(function(){Vn().config(Object.assign({},zn(),Jn()(process.argv)))})();var Fp=require("fs"),Up=require("path");var Ip=P(Pt());var de=P(require("fs")),Jr=P(require("path")),Gc=P(require("os")),Vc=P(Hr());var Ix=process.stdout.isTTY===!0&&!process.env.NO_COLOR,Te=i=>Ix?i:"",R=Te("\x1B[32m"),L=Te("\x1B[33m"),_=Te("\x1B[36m"),pe=Te("\x1B[35m"),g=Te("\x1B[31m"),x=Te("\x1B[2m"),ie=Te("\x1B[1m"),m=Te("\x1B[0m");var Uc="app.boxel.realms";var Nx={"anthropic/claude-3.5-sonnet":"Anthropic: Claude 3.5 Sonnet","anthropic/claude-3.7-sonnet":"Anthropic: Claude 3.7 Sonnet","anthropic/claude-3.7-sonnet:thinking":"Anthropic: Claude 3.7 Sonnet (thinking)","anthropic/claude-haiku-4.5":"Anthropic: Claude Haiku 4.5","anthropic/claude-sonnet-4":"Anthropic: Claude Sonnet 4","anthropic/claude-sonnet-4.5":"Anthropic: Claude Sonnet 4.5","anthropic/claude-sonnet-4.6":"Anthropic: Claude Sonnet 4.6","anthropic/claude-opus-4.1":"Anthropic: Claude Opus 4.1","deepseek/deepseek-chat-v3-0324":"DeepSeek: DeepSeek V3 0324","google/gemini-2.5-pro":"Google: Gemini 2.5 Pro","google/gemini-2.5-flash-lite":"Google: Gemini 2.5 Flash Lite","google/gemini-2.5-flash":"Google: Gemini 2.5 Flash","meta-llama/llama-3.2-3b-instruct":"Meta: Llama 3.2 3B Instruct","openai/gpt-4.1-nano":"OpenAI: GPT-4.1 Nano","openai/gpt-4.1-mini":"OpenAI: GPT-4.1 Mini","openai/gpt-4.1":"OpenAI: GPT-4.1","openai/gpt-4o":"OpenAI: GPT-4o","openai/gpt-4o-mini":"OpenAI: GPT-4o-mini","openai/gpt-5-nano":"OpenAI: GPT-5 Nano","openai/gpt-5-mini":"OpenAI: GPT-5 Mini","openai/gpt-5":"OpenAI: GPT-5","openai/gpt-oss-20b":"OpenAI: GPT OSS 20B"},uE=Object.keys(Nx);function k(i){return i.endsWith("/")?i:`${i}/`}var $e=class extends Error{status;constructor(e,t){super(t),this.name="MatrixAuthError",this.status=e}};async function Dc(i,e,t){let r=await fetch(new URL("_matrix/client/v3/login",i).href,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:{type:"m.id.user",user:e},password:t,type:"m.login.password"})}),n=await r.json();if(!r.ok)throw new Error(`Matrix login failed: ${r.status} ${JSON.stringify(n)}`);return{accessToken:n.access_token,deviceId:n.device_id,userId:n.user_id,matrixUrl:i}}async function Fx(i){let e=await fetch(new URL(`_matrix/client/v3/user/${encodeURIComponent(i.userId)}/openid/request_token`,i.matrixUrl).href,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i.accessToken}`},body:"{}"});if(!e.ok){let t=await e.text();throw e.status===401||e.status===403?new $e(e.status,`OpenID token request failed: ${e.status} ${t}`):new Error(`OpenID token request failed: ${e.status} ${t}`)}return await e.json()}async function Wr(i,e){let t=await Fx(i),r=`${e.replace(/\/$/,"")}/_server-session`,n=await fetch(r,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let o=await n.text();throw new Error(`Realm server session failed: ${n.status} ${o}`)}let s=n.headers.get("Authorization");if(!s)throw new Error("Realm server session response did not include an Authorization header");return s}async function Gr(i,e){let t=`${i.replace(/\/$/,"")}/_realm-auth`,r=await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:e}});if(!r.ok){let n=await r.text();throw new Error(`Realm auth lookup failed: ${r.status} ${n}`)}return await r.json()}function Vr(i){return new URL(`_matrix/client/v3/user/${encodeURIComponent(i.userId)}/account_data/${Uc}`,i.matrixUrl).href}async function ci(i){let e;try{e=await fetch(Vr(i),{headers:{Authorization:`Bearer ${i.accessToken}`}})}catch{return[]}if(e.status===401||e.status===403){let t=await e.text();throw new $e(e.status,`Matrix account_data fetch failed: ${e.status} ${t}`)}if(!e.ok)return[];try{let t=await e.json();return Array.isArray(t.realms)?[...t.realms]:[]}catch{return[]}}async function qc(i,e){let t=await ci(i);if(!t.includes(e)){t.push(e);let r=await fetch(Vr(i),{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i.accessToken}`},body:JSON.stringify({realms:t})});if(!r.ok){let n=await r.text();throw r.status===401||r.status===403?new $e(r.status,`Failed to update Matrix account data: ${r.status} ${n}`):new Error(`Failed to update Matrix account data: ${r.status} ${n}`)}}}async function Hc(i,e){let t=k(e),r=await ci(i),n=r.filter(o=>k(o)!==t);if(n.length===r.length)return!1;let s=await fetch(Vr(i),{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i.accessToken}`},body:JSON.stringify({realms:n})});if(!s.ok){let o=await s.text();throw s.status===401||s.status===403?new $e(s.status,`Failed to update Matrix account data: ${s.status} ${o}`):new Error(`Failed to update Matrix account data: ${s.status} ${o}`)}return!0}var Br=P(require("readline")),Wc=require("stream");function re(i){let e=Br.createInterface({input:process.stdin,output:process.stdout});return new Promise(t=>{e.question(i,r=>{e.close(),t(r.trim())})})}function ht(i){let e=new Wc.Writable({write:(r,n,s)=>s()}),t=Br.createInterface({input:process.stdin,output:e,terminal:!0});return new Promise((r,n)=>{let s=process.stdin,o=s.readableFlowing;s.isTTY&&s.setRawMode(!0);let a=()=>{s.removeListener("data",c),s.isTTY&&s.setRawMode(!1),t.close(),o||s.pause()},c=p=>{try{let u=p.toString().split("\x1B[200~").join("").split("\x1B[201~").join("");for(let f of u)if(f===`
|
|
32
|
+
`||f==="\r"){a(),process.stdout.write(`
|
|
33
|
+
`),r(l);return}else f===""?(a(),process.exit()):f==="\x7F"||f==="\b"?l.length>0&&(l=l.slice(0,-1),process.stdout.write("\b \b")):f>=" "&&(l+=f,process.stdout.write("*"))}catch(u){a(),n(u)}},l="";try{process.stdout.write(i),s.on("data",c),s.resume()}catch(p){a(),n(p)}})}async function ve(i){let e=process.env.BOXEL_REALM_SECRET_SEED;if(e)return e;if(i){if(!process.stdin.isTTY)throw new Error("Cannot prompt for realm secret seed: stdin is not a TTY. Set BOXEL_REALM_SECRET_SEED in the environment instead.");return ht("Realm secret seed: ")}}var Ux=Jr.join(Gc.homedir(),".boxel-cli"),Dx="profiles.json",qx=86400;function Hx(i,e=qx){let t=i.replace(/^Bearer\s+/i,""),r=Vc.default.decode(t);if(!r?.exp)return!0;let n=Math.floor(Date.now()/1e3);return r.exp-n<e}var A="No active profile. Run `boxel profile add` to create one.";function li(i){return i.endsWith(":stack.cards")?"staging":i.endsWith(":boxel.ai")?"production":i.endsWith(":localhost")?"local":"unknown"}function gt(i){let e=i.match(/^@([^:]+):/);return e?e[1]:i}function pi(i){let e=i.match(/:([^:]+)$/);return e?e[1]:"unknown"}function fe(i){let e=gt(i),t=pi(i);return`${x}[${m}${_}${e}${m} ${x}\xB7${m} ${pe}${t}${m}${x}]${m}`}var Yr=class{config;configDir;profilesFile;matrixLoginFn;promptPasswordFn;isTtyFn;constructor(e,t){this.configDir=e||Ux,this.profilesFile=Jr.join(this.configDir,Dx),this.config=this.loadConfig(),this.matrixLoginFn=t?.matrixLogin??Dc,this.promptPasswordFn=t?.promptPassword??ht,this.isTtyFn=t?.isTty??(()=>!!process.stdin.isTTY)}ensureConfigDir(){de.existsSync(this.configDir)||de.mkdirSync(this.configDir,{recursive:!0})}loadConfig(){let e={profiles:{},activeProfile:null};if(de.existsSync(this.profilesFile))try{let t=de.readFileSync(this.profilesFile,"utf-8"),r=JSON.parse(t);if(r&&typeof r=="object"&&!Array.isArray(r)){let n=r,s=n.profiles&&typeof n.profiles=="object"&&!Array.isArray(n.profiles)?n.profiles:null,o=n.activeProfile===null||typeof n.activeProfile=="string"?n.activeProfile:null;if(s)return{profiles:s,activeProfile:o}}}catch{}return e}saveConfig(){this.ensureConfigDir(),de.writeFileSync(this.profilesFile,JSON.stringify(this.config,null,2),{mode:384});try{de.chmodSync(this.profilesFile,384)}catch{}}listProfiles(){return Object.keys(this.config.profiles)}getProfile(e){return this.config.profiles[e]}getActiveProfileId(){return this.config.activeProfile}getActiveProfile(){let e=this.config.activeProfile;if(!e)return null;let t=this.config.profiles[e];return t?{id:e,profile:t}:null}resolveProfileSlots(e,t,r,n){let s=li(e),o=gt(e);if(s==="unknown"&&(!r||!n))throw new Error(`Unknown domain in Matrix ID "${e}". You must provide explicit --matrix-url and --realm-server-url for non-standard domains.`);let a,c;s==="production"?(a="https://matrix.boxel.ai",c="https://app.boxel.ai/"):s==="local"?(a="http://localhost:8008",c="http://localhost:4201/"):(a="https://matrix-staging.stack.cards",c="https://realms-staging.stack.cards/");let l=pi(e);return{matrixUrl:r||a,realmServerUrl:n||c,displayName:t||`${o} \xB7 ${l}`,username:o}}async addProfileWithAuth(e,t,r,n){let s=this.resolveProfileSlots(e,r,t.matrixUrl,n),o=this.config.profiles[e],a=!!o&&(o.matrixUrl!==s.matrixUrl||o.realmServerUrl!==s.realmServerUrl),c={displayName:s.displayName,matrixUrl:s.matrixUrl,realmServerUrl:s.realmServerUrl,matrixAccessToken:t.accessToken,matrixUserId:t.userId,matrixDeviceId:t.deviceId,realmTokens:a?void 0:o?.realmTokens,realmServerToken:a?void 0:o?.realmServerToken};this.config.profiles[e]=c,this.config.activeProfile||(this.config.activeProfile=e),this.saveConfig()}async addProfile(e,t,r,n,s){let o=this.config.profiles[e],a=this.resolveProfileSlots(e,r??o?.displayName,n??o?.matrixUrl,s??o?.realmServerUrl),c=await this.matrixLoginFn(a.matrixUrl,a.username,t);if(c.userId!==e)throw new Error(`Matrix returned userId "${c.userId}" but profile was added as "${e}". Check the Matrix ID and try again.`);await this.addProfileWithAuth(e,c,a.displayName,a.realmServerUrl)}async removeProfile(e){if(!this.config.profiles[e])return!1;if(delete this.config.profiles[e],this.config.activeProfile===e){let t=Object.keys(this.config.profiles);this.config.activeProfile=t.length>0?t[0]:null}return this.saveConfig(),!0}switchProfile(e){return this.config.profiles[e]?(this.config.activeProfile=e,this.saveConfig(),!0):!1}updateDisplayName(e,t){return this.config.profiles[e]?(this.config.profiles[e].displayName=t,this.saveConfig(),!0):!1}updateUrls(e,t){let r=this.config.profiles[e];if(!r)return!1;let n=!1;return t.matrixUrl&&t.matrixUrl!==r.matrixUrl&&(r.matrixUrl=t.matrixUrl,n=!0),t.realmServerUrl&&t.realmServerUrl!==r.realmServerUrl&&(r.realmServerUrl=t.realmServerUrl,n=!0),n&&(r.realmTokens=void 0,r.realmServerToken=void 0,this.saveConfig()),n}setRealmToken(e,t){let r=this.getActiveProfile();r&&(r.profile.realmTokens||(r.profile.realmTokens={}),r.profile.realmTokens[e]=t,this.saveConfig())}getRealmToken(e){return this.getActiveProfile()?.profile.realmTokens?.[e]}setRealmServerToken(e){let t=this.getActiveProfile();t&&(t.profile.realmServerToken=e,this.saveConfig())}getRealmServerToken(){return this.getActiveProfile()?.profile.realmServerToken}getStoredMatrixAuth(e){let t=e??this.config.activeProfile??void 0,r=t?this.config.profiles[t]:void 0;if(!t||!r)throw new Error(A);if(!r.matrixAccessToken)throw new Error(`Profile "${t}" has no stored Matrix access token. Run \`boxel profile add\` to re-authenticate.`);return{accessToken:r.matrixAccessToken,userId:r.matrixUserId,deviceId:r.matrixDeviceId,matrixUrl:r.matrixUrl}}async reAuthenticate(e){let t=e??this.config.activeProfile??void 0,r=t?this.config.profiles[t]:void 0;if(!t||!r)throw new Error(A);if(!this.isTtyFn())throw new Error(`Stored Matrix token for "${t}" is no longer valid. Run \`boxel profile add -u ${t} -p <password>\` to re-authenticate.`);console.log(`
|
|
34
|
+
${L}Stored Matrix session for ${fe(t)} has expired.${m}`);let n=await this.promptPasswordFn(`Password for ${t}: `);if(!n)throw new Error("Re-authentication cancelled: password is required.");let s=gt(t),o=await this.matrixLoginFn(r.matrixUrl,s,n);return await this.addProfileWithAuth(t,o,r.displayName,r.realmServerUrl),this.getStoredMatrixAuth(t)}async fetchRealmServerTokenWithReauth(){let e=this.getStoredMatrixAuth(),r=this.getActiveProfile().profile.realmServerUrl.replace(/\/$/,"");try{let n=await Wr(e,r);return this.setRealmServerToken(n),n}catch(n){if(!(n instanceof $e))throw n;let s=await this.reAuthenticate(),o=await Wr(s,r);return this.setRealmServerToken(o),o}}async getOrRefreshServerToken(){let e=this.getRealmServerToken();return e&&!Hx(e)?e:this.fetchRealmServerTokenWithReauth()}async refreshServerToken(){return this.fetchRealmServerTokenWithReauth()}findRealmTokenForUrl(e){let r=this.getActiveProfile()?.profile.realmTokens;if(r){for(let[n,s]of Object.entries(r))if(e.startsWith(n)&&s)return s}}async fetchAndStoreAllRealmTokens(){let e=await this.getOrRefreshServerToken(),r=this.getActiveProfile().profile.realmServerUrl.replace(/\/$/,""),n=await Gr(r,e);for(let[s,o]of Object.entries(n))this.setRealmToken(s,o)}async getRealmTokenForUrl(e){let t=this.findRealmTokenForUrl(e);if(t)return t;try{await this.fetchAndStoreAllRealmTokens()}catch{return}return this.findRealmTokenForUrl(e)}buildHeaders(e,t,r){let n=e instanceof Request?new Headers(e.headers):new Headers,s=new Headers(t?.headers);for(let[o,a]of s)n.set(o,a);return n.has("Authorization")||n.set("Authorization",r),n}async authedRealmFetch(e,t){let r=e instanceof Request?e.url:e instanceof URL?e.href:e,n=await this.getRealmTokenForUrl(r);if(n){let c=this.buildHeaders(e,t,n),l=await fetch(e,{...t,headers:c});if(l.status!==401)return l}let s=this.getActiveProfile();if(s&&(s.profile.realmTokens={},s.profile.realmServerToken=void 0,this.saveConfig()),await this.fetchAndStoreAllRealmTokens(),n=this.findRealmTokenForUrl(r),!n)throw new Error(`No realm token available for ${r}. The realm may not be accessible.`);let o=this.buildHeaders(e,t,n);return await fetch(e,{...t,headers:o})}async authedRealmServerFetch(e,t){let r=await this.getOrRefreshServerToken(),n=this.buildHeaders(e,t,r),s=await fetch(e,{...t,headers:n});return s.status===401&&(r=await this.refreshServerToken(),n=this.buildHeaders(e,t,r),s=await fetch(e,{...t,headers:n})),s}async fetchAndStoreRealmToken(e,t){let n=this.getActiveProfile().profile.realmServerUrl.replace(/\/$/,""),o=(await Gr(n,t))[e];return o&&this.setRealmToken(e,o),o}async withMatrixAuthRecovery(e){try{return await e(this.getStoredMatrixAuth())}catch(t){if(!(t instanceof $e))throw t;let r=await this.reAuthenticate();return e(r)}}async addToUserRealms(e){await this.withMatrixAuthRecovery(t=>qc(t,e))}async removeFromUserRealms(e){return this.withMatrixAuthRecovery(t=>Hc(t,e))}async getUserRealms(){return this.withMatrixAuthRecovery(e=>ci(e))}async migrateFromEnv(){let e=process.env.MATRIX_URL,t=process.env.MATRIX_USERNAME,r=process.env.MATRIX_PASSWORD,n=process.env.REALM_SERVER_URL;if(!e||!t||!r||!n)return null;let o=e.includes("boxel.ai")?"boxel.ai":"stack.cards",a=`@${t}:${o}`,c=!this.config.profiles[a];return await this.addProfile(a,r,void 0,e,n),{profileId:a,created:c}}printStatus(){let e=this.getActiveProfile();e?(console.log(`
|
|
35
|
+
${ie}Active Profile:${m} ${fe(e.id)}`),console.log(` ${x}Display Name:${m} ${e.profile.displayName}`),console.log(` ${x}Matrix URL:${m} ${e.profile.matrixUrl}`),console.log(` ${x}Realm Server:${m} ${e.profile.realmServerUrl}`)):(console.log(`
|
|
36
|
+
${L}No active profile and no environment variables set.${m}`),console.log(`Run ${_}boxel profile add${m} to create a profile.`))}},zr=null;function C(){return zr||(zr=new Yr),zr}var Xr={staging:{domain:"stack.cards",matrixUrl:"https://matrix-staging.stack.cards",realmServerUrl:"https://realms-staging.stack.cards/"},production:{domain:"boxel.ai",matrixUrl:"https://matrix.boxel.ai",realmServerUrl:"https://app.boxel.ai/"},local:{domain:"localhost",matrixUrl:"http://localhost:8008",realmServerUrl:"http://localhost:4201/"}};function ui(i,e){let t=i.trim(),r;try{r=new URL(t)}catch{console.error(`${g}Error:${m} ${e} "${i}" is not a valid URL.`),process.exit(1)}return r.protocol!=="http:"&&r.protocol!=="https:"&&(console.error(`${g}Error:${m} ${e} "${i}" must use http:// or https://.`),process.exit(1)),t}function Wx(i){return i.toLowerCase().replace(/\//g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}function Bc(){let i=process.env.BOXEL_ENVIRONMENT;if(!i||!i.trim())return null;let e=Wx(i);return e||(console.error(`${g}Error:${m} BOXEL_ENVIRONMENT="${i}" contains no slug characters (expected letters, digits, or "-").`),process.exit(1)),{domain:`${e}.localhost`,matrixUrl:`http://matrix.${e}.localhost`,realmServerUrl:`http://realm-server.${e}.localhost/`}}async function Yc(i,e,t){let r=C();switch(i){case"list":await zc(r);break;case"add":{let n=t?.password||process.env.BOXEL_PASSWORD;if(t?.user&&n){let s=t.matrixUrl?ui(t.matrixUrl,"--matrix-url"):void 0,o=t.realmServerUrl?ui(t.realmServerUrl,"--realm-server-url"):void 0,p=!(li(t.user)!=="unknown")&&(!s||!o)?Bc():null;p&&console.log(`${x}Using BOXEL_ENVIRONMENT=${process.env.BOXEL_ENVIRONMENT}${m}`),await Yx(r,t.user,n,t.name,s??p?.matrixUrl,o??p?.realmServerUrl)}else await Vx(r,Bc());break}case"switch":e||(console.error(`${g}Error:${m} Please specify a profile to switch to.`),console.log("Usage: boxel profile switch <profile-id>"),console.log(`
|
|
37
|
+
Available profiles:`),await zc(r),process.exit(1)),await Bx(r,e);break;case"remove":e||(console.error(`${g}Error:${m} Please specify a profile to remove.`),process.exit(1)),await zx(r,e);break;case"migrate":await Jx(r);break;default:r.printStatus(),console.log(`
|
|
38
|
+
${x}Commands:${m}`),console.log(` ${_}boxel profile list${m} List all profiles`),console.log(` ${_}boxel profile add${m} Add a new profile`),console.log(` ${_}boxel profile switch${m} Switch active profile`),console.log(` ${_}boxel profile remove${m} Remove a profile`),console.log(` ${_}boxel profile migrate${m} Import from .env file`)}}async function zc(i){let e=i.listProfiles(),t=i.getActiveProfileId();if(e.length===0){console.log(`
|
|
39
|
+
${L}No profiles configured.${m}`),console.log(`Run ${_}boxel profile add${m} to create one.`);return}console.log(`
|
|
40
|
+
${ie}Saved Profiles:${m}
|
|
41
|
+
`);for(let r of e){let n=i.getProfile(r),s=r===t,o=li(r),a=s?`${R}\u2605${m} `:" ",c=pi(r),l=o==="production"?pe:_;console.log(`${a}${ie}${r}${m}`),console.log(` ${x}Name:${m} ${n.displayName}`),console.log(` ${x}Environment:${m} ${l}${c}${m}`),console.log(` ${x}Realm Server:${m} ${n.realmServerUrl}`),console.log("")}t&&console.log(`${x}\u2605 = active profile${m}`)}async function Gx(){console.log("Which environment?"),console.log(` ${_}1${m}) Staging (realms-staging.stack.cards)`),console.log(` ${pe}2${m}) Production (app.boxel.ai)`),console.log(` ${R}3${m}) Local (localhost:4201)`),console.log(` ${L}4${m}) Custom (enter your own URLs)`);let i=await re(`
|
|
42
|
+
Choice [1/2/3/4]: `);if(i==="4"){let e=await re("Matrix server URL: ");e||(console.error(`${g}Error:${m} Matrix server URL is required.`),process.exit(1));let t=ui(e,"Matrix server URL"),r=await re("Realm server URL: ");r||(console.error(`${g}Error:${m} Realm server URL is required.`),process.exit(1));let n=ui(r,"Realm server URL"),s=new URL(t).hostname||"custom";return{domain:await re(`Domain for Matrix ID [${s}]: `)||s,matrixUrl:t,realmServerUrl:n}}return i==="3"?{...Xr.local}:i==="2"?{...Xr.production}:{...Xr.staging}}async function Vx(i,e){console.log(`
|
|
43
|
+
${ie}Add New Profile${m}
|
|
44
|
+
`);let t,r,n;if(e)console.log(`${x}Using BOXEL_ENVIRONMENT=${process.env.BOXEL_ENVIRONMENT}${m}`),t=e.domain,r=e.matrixUrl,n=e.realmServerUrl;else{let u=await Gx();t=u.domain,r=u.matrixUrl,n=u.realmServerUrl}console.log(`
|
|
45
|
+
Enter your Boxel username (without @ or domain)`),console.log(`${x}Example: ctse, aallen90${m}`);let s=await re("Username: ");s||(console.error(`${g}Error:${m} Username is required.`),process.exit(1));let o=`@${s}:${t}`;if(i.getProfile(o)&&(console.log(`
|
|
46
|
+
${L}Profile ${o} already exists.${m}`),(await re("Overwrite? [y/N]: ")).toLowerCase()!=="y")){console.log("Cancelled.");return}let a=await ht("Password: ");a||(console.error(`${g}Error:${m} Password is required.`),process.exit(1));let c=`${s} \xB7 ${t}`,p=await re(`Display name [${c}]: `)||c;await i.addProfile(o,a,p,r,n),console.log(`
|
|
47
|
+
${R}\u2713${m} Profile created: ${fe(o)}`),i.getActiveProfileId()===o?console.log(`${x}This profile is now active.${m}`):(await re("Switch to this profile now? [Y/n]: ")).toLowerCase()!=="n"&&(i.switchProfile(o),console.log(`${R}\u2713${m} Switched to ${fe(o)}`))}async function Bx(i,e){let t=i.listProfiles(),r=e;if(!t.includes(e)){let n=t.filter(s=>{let o=gt(s);return s.includes(e)||o===e});if(n.length===0){console.error(`${g}Error:${m} Profile not found: ${e}`),console.log(`
|
|
48
|
+
Available profiles:`);for(let s of t)console.log(` ${s}`);process.exit(1)}else if(n.length===1)r=n[0];else{console.error(`${g}Error:${m} Ambiguous profile: ${e}`),console.log(`
|
|
49
|
+
Matching profiles:`);for(let s of n)console.log(` ${s}`);process.exit(1)}}i.switchProfile(r)?console.log(`${R}\u2713${m} Switched to ${fe(r)}`):(console.error(`${g}Error:${m} Failed to switch profile.`),process.exit(1))}async function zx(i,e){if(i.getProfile(e)||(console.error(`${g}Error:${m} Profile not found: ${e}`),process.exit(1)),(await re(`Remove profile ${e}? [y/N]: `)).toLowerCase()!=="y"){console.log("Cancelled.");return}if(await i.removeProfile(e)){console.log(`${R}\u2713${m} Profile removed.`);let n=i.getActiveProfileId();n&&console.log(`Active profile is now: ${fe(n)}`)}else console.error(`${g}Error:${m} Failed to remove profile.`),process.exit(1)}async function Yx(i,e,t,r,n,s){(!e.startsWith("@")||!e.includes(":"))&&(console.error(`${g}Error:${m} Invalid Matrix ID format. Expected @user:domain`),process.exit(1));let o=!!i.getProfile(e);try{await i.addProfile(e,t,r,n,s)}catch(c){console.error(`${g}Error:${m} ${c instanceof Error?c.message:String(c)}`),process.exit(1)}if(o){(n||s)&&i.updateUrls(e,{matrixUrl:n,realmServerUrl:s})&&console.log(`${x}Updated server URLs and cleared cached realm tokens.${m}`),console.log(`${R}\u2713${m} Profile updated: ${fe(e)}`);return}console.log(`${R}\u2713${m} Profile created: ${fe(e)}`),i.getActiveProfileId()!==e&&console.log(`${x}Use 'boxel profile switch ${e}' to switch to this profile.${m}`)}async function Jx(i){console.log(`
|
|
50
|
+
${ie}Migrate from .env${m}
|
|
51
|
+
`);let e=process.env.MATRIX_URL,t=process.env.MATRIX_USERNAME,r=process.env.MATRIX_PASSWORD,n=process.env.REALM_SERVER_URL;if(!e||!t||!r||!n){console.log(`${L}No complete credentials found in environment variables.${m}`),console.log(`
|
|
52
|
+
Required variables: MATRIX_URL, MATRIX_USERNAME, MATRIX_PASSWORD, REALM_SERVER_URL`);return}let s=await i.migrateFromEnv();s?s.created?(console.log(`${R}\u2713${m} Created profile: ${fe(s.profileId)}`),console.log(`
|
|
53
|
+
${x}You can now remove credentials from .env if desired.${m}`)):(console.log(`${R}\u2713${m} Refreshed profile: ${fe(s.profileId)}`),console.log(`
|
|
54
|
+
${x}Use 'boxel profile add -u ${s.profileId} -p <password>' to update other fields.${m}`)):console.log(`${L}Migration failed.${m}`)}var he=P(require("fs")),Ie=P(require("path"));var Ke=P(require("fs")),V=P(require("path"));var xt=!1,Xx=console.log.bind(console),Kx=console.info.bind(console),Qx=console.debug.bind(console);function di(i){if(i!==xt)if(xt=i,xt){let e=()=>{};console.log=e,console.info=e,console.debug=e}else console.log=Xx,console.info=Kx,console.debug=Qx}function Jc(){return xt}var I={info(...i){xt||process.stderr.write(i.map(mi).join(" ")+`
|
|
55
|
+
`)},warn(...i){process.stderr.write(i.map(mi).join(" ")+`
|
|
56
|
+
`)},error(...i){process.stderr.write(i.map(mi).join(" ")+`
|
|
57
|
+
`)},output(...i){process.stdout.write(i.map(mi).join(" ")+`
|
|
58
|
+
`)}};function mi(i){if(typeof i=="string")return i;if(i instanceof Error)return i.stack??i.message;try{return JSON.stringify(i)}catch{return String(i)}}var Xc=!1,Zx=new Set([".git","node_modules","dist",".boxel-history",".claude"]);function ev(i){return Zx.has(i)}function tv(i){return i==="stack.cards"||i.endsWith(".stack.cards")?"stack.cards":i==="boxel.ai"||i.endsWith(".boxel.ai")?"boxel.ai":i}function Kr(i){if(!i)return!1;let e;try{e=decodeURIComponent(i)}catch{return!1}return!(e==="."||e===".."||e.includes("/")||e.includes("\\")||e.includes("\0"))}function iv(i){let e;try{e=new URL(i)}catch{return null}let t=tv(e.hostname);if(!Kr(t))return null;let r=e.pathname.replace(/^\/|\/$/g,"").split("/").filter(Boolean),n=r[0]??"unknown-owner",s=r[1]??r[0]??"workspace";return!Kr(n)||!Kr(s)?null:V.join(t,n,s)}function rv(i,e){let t=iv(i);return t===null?null:V.resolve(e,t)}function nv(i){let e;try{e=Ke.readFileSync(i,"utf-8")}catch{return null}let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!="object"||t===null)return null;let r=t.realmUrl;return typeof r!="string"||r===""?null:{realmUrl:r}}function Kc(i,e){let t=V.join(i,".boxel-sync.json");Ke.existsSync(t)&&e.push(t)}function fi(i){try{return Ke.readdirSync(i,{withFileTypes:!0}).filter(e=>e.isDirectory()&&!ev(e.name)).map(e=>V.join(i,e.name))}catch{return[]}}function sv(i){let e=[],t=V.resolve(i);for(let r of fi(t))Kc(r,e);for(let r of fi(t))for(let n of fi(r))for(let s of fi(n))Kc(s,e);return e}function ov(i,e){let t=V.relative(i,e);return t===""?!0:t.startsWith("..")?!1:!V.isAbsolute(t)}function Qr(i){let e=V.resolve(i),t=sv(e),r=new Set,n=[];for(let s of t){if(r.has(s))continue;r.add(s);let o=nv(s);if(!o)continue;let a=rv(o.realmUrl,e);if(a===null||!ov(e,a))continue;let c=V.dirname(s);V.resolve(c)!==V.resolve(a)&&n.push({manifestPath:s,currentDir:c,expectedDir:a,realmUrl:o.realmUrl})}return n}function Qc(i){if(Xc||process.env.BOXEL_DISABLE_PATH_WARNING==="1"||Jc())return;let e=Qr(i);if(e.length===0)return;Xc=!0,console.warn(`
|
|
59
|
+
\u26A0\uFE0F Detected local realm directories at legacy local paths:`);let t=V.resolve(i);for(let r of e.slice(0,5)){let n=V.relative(t,r.currentDir)||".",s=V.relative(t,r.expectedDir)||".";console.warn(` - ${n} -> ${s}`)}e.length>5&&console.warn(` ...and ${e.length-5} more`),console.warn(`
|
|
60
60
|
Run to preview:`),console.warn(" boxel consolidate-workspaces . --dry-run"),console.warn("Then apply:"),console.warn(` boxel consolidate-workspaces .
|
|
61
|
-
`)}function
|
|
62
|
-
`);let n=0,s=0;for(let o of r){let a=
|
|
61
|
+
`)}function av(i){he.existsSync(i)||he.mkdirSync(i,{recursive:!0})}function cv(i,e){try{he.renameSync(i,e)}catch(t){let r=t;if(r.code!=="EXDEV")throw r;he.cpSync(i,e,{recursive:!0}),he.rmSync(i,{recursive:!0,force:!0})}}async function lv(i,e){let t=Ie.resolve(i||"."),r=Qr(t);if(r.length===0){console.log(`No misplaced local realm paths found under ${t}`);return}console.log(`Found ${r.length} misplaced local realm path(s):
|
|
62
|
+
`);let n=0,s=0;for(let o of r){let a=Ie.relative(t,o.currentDir)||".",c=Ie.relative(t,o.expectedDir)||".";if(console.log(`- ${a} -> ${c}`),!e.dryRun){if(he.existsSync(o.expectedDir)){console.warn(" Skipping: target path already exists"),s+=1;continue}av(Ie.dirname(o.expectedDir));try{cv(o.currentDir,o.expectedDir),n+=1}catch(l){let p=l instanceof Error?l.message:String(l);console.warn(` Skipping: failed to move (${p})`),s+=1}}}if(e.dryRun){console.log(`
|
|
63
63
|
[DRY RUN] No directories moved.`);return}console.log(`
|
|
64
|
-
Moved ${n} director${n===1?"y":"ies"}.`),s>0&&console.log(`Skipped ${s} due to existing target paths or move failures.`)}function
|
|
65
|
-
`)}async function
|
|
66
|
-
${
|
|
67
|
-
${
|
|
68
|
-
${
|
|
69
|
-
${
|
|
70
|
-
`)){let
|
|
71
|
-
${
|
|
72
|
-
${g}${r.errorCount} error(s) across ${r.filesWithErrors} of ${r.filesChecked} file(s)${m}`),r.errorCount>0&&process.exit(1)})}async function Pv(i,e,t){let r=t?.profileManager??C();if(!r.getActiveProfile())throw new Error("No active profile. Run `boxel profile add` to create one.");let s=new URL(e,k(i)).href,o;try{o=await r.authedRealmFetch(s,{method:"GET",headers:{Accept:"*/*"}})}catch(c){return{ok:!1,error:c instanceof Error?c.message:String(c)}}if(!o.ok){let c=await o.text().catch(()=>"(no body)");return{ok:!1,status:o.status,error:`HTTP ${o.status}: ${c.slice(0,300)}`}}let a=await o.text();return{ok:!0,status:o.status,content:a}}function xl(i){i.command("read-transpiled").description("Debugging tool ONLY for investigating runtime errors in .gts modules you've written. Use when an eval or instantiate error reports a line/column number \u2014 those line numbers refer to the transpiled output, not your .gts source, so fetching the transpiled output is how you locate the offending source construct. Never use the transpiled output as a reference for how to write code: do not copy its patterns (setComponentTemplate, precompileTemplate, wire-format templates, base64 CSS imports) into source. Always write idiomatic Ember / <template>-tag / CardDef source.").argument("<path>","Realm-relative module path. The .gts extension is optional \u2014 the realm accepts either form.").requiredOption("--realm <realm-url>","The realm URL to fetch from").option("--json","Output raw JSON response").action(async(e,t)=>{let r;try{r=await Pv(t.realm,e)}catch(n){console.error(`${h}Error:${m} ${n instanceof Error?n.message:String(n)}`),process.exit(1)}t.json?j.output(JSON.stringify(r,null,2)):r.ok?j.output(r.content??""):(console.error(`${g}Status:${m} ${r.status??"(no status)"}`),console.error(`${h}Error:${m} ${r.error}`)),r.ok||process.exit(1)})}async function Av(i,e){let t=e?.profileManager??C();if(!t.getActiveProfile())return{ok:!1,error:P};let n=e?.cancelPending??!1,s=`${k(i)}_cancel-indexing-job`;try{let o=await t.authedRealmFetch(s,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({cancelPending:n})});if(!o.ok){let a=await o.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${o.status}: ${a.slice(0,300)}`}}return{ok:!0}}catch(o){return{ok:!1,error:o instanceof Error?o.message:String(o)}}}function vl(i){i.command("cancel-indexing").description("Cancel running indexing jobs for a realm (use --cancel-pending to also cancel queued jobs)").requiredOption("--realm <realm-url>","URL of the realm to cancel indexing for").option("--cancel-pending","Also cancel queued/pending indexing jobs (default: cancel running only)").option("--json","Output raw JSON response").action(async e=>{let t=await Av(e.realm,{cancelPending:e.cancelPending});if(e.json)j.output(JSON.stringify(t,null,2)),t.ok||process.exit(1);else if(t.ok){let r=e.cancelPending?"running and pending":"running";console.log(`${R}Cancelled ${r} indexing jobs for ${e.realm}${m}`)}else console.error(`${h}Error:${m} ${t.error}`),process.exit(1)})}var Lv=Object.freeze({a:"https://boxel-images.boxel.ai/icons/Letter-a.png",b:"https://boxel-images.boxel.ai/icons/Letter-b.png",c:"https://boxel-images.boxel.ai/icons/Letter-c.png",d:"https://boxel-images.boxel.ai/icons/Letter-d.png",e:"https://boxel-images.boxel.ai/icons/Letter-e.png",f:"https://boxel-images.boxel.ai/icons/Letter-f.png",g:"https://boxel-images.boxel.ai/icons/Letter-g.png",h:"https://boxel-images.boxel.ai/icons/Letter-h.png",i:"https://boxel-images.boxel.ai/icons/Letter-i.png",j:"https://boxel-images.boxel.ai/icons/Letter-j.png",k:"https://boxel-images.boxel.ai/icons/Letter-k.png",l:"https://boxel-images.boxel.ai/icons/Letter-l.png",m:"https://boxel-images.boxel.ai/icons/Letter-m.png",n:"https://boxel-images.boxel.ai/icons/Letter-n.png",o:"https://boxel-images.boxel.ai/icons/Letter-o.png",p:"https://boxel-images.boxel.ai/icons/Letter-p.png",q:"https://boxel-images.boxel.ai/icons/Letter-q.png",r:"https://boxel-images.boxel.ai/icons/Letter-r.png",s:"https://boxel-images.boxel.ai/icons/Letter-s.png",t:"https://boxel-images.boxel.ai/icons/Letter-t.png",u:"https://boxel-images.boxel.ai/icons/Letter-u.png",v:"https://boxel-images.boxel.ai/icons/Letter-v.png",w:"https://boxel-images.boxel.ai/icons/Letter-w.png",x:"https://boxel-images.boxel.ai/icons/Letter-x.png",y:"https://boxel-images.boxel.ai/icons/Letter-y.png",z:"https://boxel-images.boxel.ai/icons/letter-z.png"}),bl=Object.freeze(["https://boxel-images.boxel.ai/background-images/4k-arabic-teal.jpg","https://boxel-images.boxel.ai/background-images/4k-arrow-weave.jpg","https://boxel-images.boxel.ai/background-images/4k-atmosphere-curvature.jpg","https://boxel-images.boxel.ai/background-images/4k-brushed-slabs.jpg","https://boxel-images.boxel.ai/background-images/4k-coral-reefs.jpg","https://boxel-images.boxel.ai/background-images/4k-crescent-lake.jpg","https://boxel-images.boxel.ai/background-images/4k-curvilinear-stairs.jpg","https://boxel-images.boxel.ai/background-images/4k-desert-dunes.jpg","https://boxel-images.boxel.ai/background-images/4k-doodle-board.jpg","https://boxel-images.boxel.ai/background-images/4k-fallen-leaves.jpg","https://boxel-images.boxel.ai/background-images/4k-flowing-mesh.jpg","https://boxel-images.boxel.ai/background-images/4k-glass-reflection.jpg","https://boxel-images.boxel.ai/background-images/4k-glow-cells.jpg","https://boxel-images.boxel.ai/background-images/4k-granite-peaks.jpg","https://boxel-images.boxel.ai/background-images/4k-green-wormhole.jpg","https://boxel-images.boxel.ai/background-images/4k-joshua-dawn.jpg","https://boxel-images.boxel.ai/background-images/4k-lava-river.jpg","https://boxel-images.boxel.ai/background-images/4k-leaves-moss.jpg","https://boxel-images.boxel.ai/background-images/4k-light-streaks.jpg","https://boxel-images.boxel.ai/background-images/4k-lowres-glitch.jpg","https://boxel-images.boxel.ai/background-images/4k-marble-shimmer.jpg","https://boxel-images.boxel.ai/background-images/4k-metallic-leather.jpg","https://boxel-images.boxel.ai/background-images/4k-microscopic-crystals.jpg","https://boxel-images.boxel.ai/background-images/4k-moon-face.jpg","https://boxel-images.boxel.ai/background-images/4k-mountain-runway.jpg","https://boxel-images.boxel.ai/background-images/4k-origami-flock.jpg","https://boxel-images.boxel.ai/background-images/4k-paint-swirl.jpg","https://boxel-images.boxel.ai/background-images/4k-pastel-triangles.jpg","https://boxel-images.boxel.ai/background-images/4k-perforated-sheet.jpg","https://boxel-images.boxel.ai/background-images/4k-plastic-ripples.jpg","https://boxel-images.boxel.ai/background-images/4k-powder-puff.jpg","https://boxel-images.boxel.ai/background-images/4k-radiant-crystal.jpg","https://boxel-images.boxel.ai/background-images/4k-redrock-canyon.jpg","https://boxel-images.boxel.ai/background-images/4k-rock-portal.jpg","https://boxel-images.boxel.ai/background-images/4k-rolling-hills.jpg","https://boxel-images.boxel.ai/background-images/4k-sand-stone.jpg","https://boxel-images.boxel.ai/background-images/4k-silver-fur.jpg","https://boxel-images.boxel.ai/background-images/4k-spa-pool.jpg","https://boxel-images.boxel.ai/background-images/4k-stained-glass.jpg","https://boxel-images.boxel.ai/background-images/4k-stone-veins.jpg","https://boxel-images.boxel.ai/background-images/4k-tangerine-plains.jpg","https://boxel-images.boxel.ai/background-images/4k-techno-floor.jpg","https://boxel-images.boxel.ai/background-images/4k-thick-frost.jpg","https://boxel-images.boxel.ai/background-images/4k-water-surface.jpg","https://boxel-images.boxel.ai/background-images/4k-watercolor-splashes.jpg","https://boxel-images.boxel.ai/background-images/4k-wildflower-field.jpg","https://boxel-images.boxel.ai/background-images/4k-wood-grain.jpg"]);function sn(i){if(!i)return;let e=i.toLowerCase().replace(/[^a-z0-9]/g,"").replace(/^[0-9]+/,"");return Lv[e.charAt(0)]}function yl(){let i=Math.floor(Math.random()*bl.length);return bl[i]}var jv=/^[a-z0-9-]+$/;function El(i){i.command("create").description("Create a new realm on the realm server").argument("<realm-name>","realm name (lowercase, numbers, hyphens only)").argument("<display-name>","display name for the realm").option("--background <url>","background image URL").option("--icon <url>","icon image URL").action(async(e,t,r)=>{await Nv(e,t,r)})}async function Mv(i,e,t={}){let r=t.profileManager??C(),n=r.getActiveProfile();if(!n)throw new Error("No active profile. Run `boxel profile add` to create one.");let s=n.profile.realmServerUrl.replace(/\/$/,""),o={endpoint:i,name:e,backgroundURL:t.background??yl(),iconURL:t.icon??sn(e)??sn(i)},a=await r.authedRealmServerFetch(`${s}/_create-realm`,{method:"POST",headers:{"Content-Type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"realm",attributes:o}})});if(!a.ok){let d;try{d=await a.text()}catch{d="server returned a non-serialized object body"}if(d.includes("[object Object]")&&(d="server returned a non-serialized object body"),d.includes("already exists")){let f=Fv(d,s,i),x=await wl(r,f);try{await r.addToUserRealms(f)}catch{}return{realmUrl:f,created:!1,realmToken:x}}throw new Error(`Realm server returned ${a.status}: ${d}`)}let l=(await a.json())?.data?.id;if(typeof l!="string"||l.trim()==="")throw new Error(`Realm server response did not include a realm URL (data.id) for "${i}".`);let p=k(l),u=await wl(r,p);try{await r.addToUserRealms(p)}catch{}return t.waitForReady&&u&&await Iv(p,u),{realmUrl:p,created:!0,realmToken:u}}async function wl(i,e){try{let t=await i.getOrRefreshServerToken();return await i.fetchAndStoreRealmToken(e,t)}catch{return}}async function Iv(i,e){let t=new URL("_readiness-check",i).href,r=15e3,n=250,s=Date.now(),o;for(;Date.now()-s<r;){try{let a=await fetch(t,{headers:{Accept:"application/vnd.api+json",Authorization:e}});if(a.ok)return;o=`HTTP ${a.status}`}catch(a){o=a instanceof Error?a.message:String(a)}await new Promise(a=>setTimeout(a,n))}throw new Error(`Timed out waiting for realm ${i} to become ready${o?`: ${o}`:""}`)}async function Nv(i,e,t){jv.test(i)||(console.error("Error: realm name must contain only lowercase letters, numbers, and hyphens"),process.exit(1));try{let r=await Mv(i,e,t),n=r.created?"created":"already exists";console.log(`${R}Realm ${n}:${m} ${_}${r.realmUrl}${m}`)}catch(r){console.error(`Error: ${r instanceof Error?r.message:String(r)}`),process.exit(1)}}function Fv(i,e,t){let r=i.match(/'(https?:\/\/[^']+)'/);if(r)return k(r[1]);throw new Error(`Could not determine realm URL from server error response for endpoint "${t}" on "${e}". The response did not include an explicit realm URL.`)}var yt=T(require("fs"));var Nl=require("child_process"),X=T(require("fs/promises")),B=T(require("path"));var D=T(require("fs/promises")),V=T(require("path")),hn=T(Pl());var mn=class{value;next;constructor(e){this.value=e}},bt=class{#e;#t;#i;constructor(){this.clear()}enqueue(e){let t=new mn(e);this.#e?(this.#t.next=t,this.#t=t):(this.#e=t,this.#t=t),this.#i++}dequeue(){let e=this.#e;if(e)return this.#e=this.#e.next,this.#i--,this.#e||(this.#t=void 0),e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#i=0}get size(){return this.#i}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}*drain(){for(;this.#e;)yield this.dequeue()}};function dn(i){let e=!1;if(typeof i=="object"&&({concurrency:i,rejectOnClear:e=!1}=i),Al(i),typeof e!="boolean")throw new TypeError("Expected `rejectOnClear` to be a boolean");let t=new bt,r=0,n=()=>{r<i&&t.size>0&&(r++,t.dequeue().run())},s=()=>{r--,n()},o=async(l,p,u)=>{let d=(async()=>l(...u))();p(d);try{await d}catch{}s()},a=(l,p,u,d)=>{let f={reject:u};new Promise(x=>{f.run=x,t.enqueue(f)}).then(o.bind(void 0,l,p,d)),r<i&&n()},c=(l,...p)=>new Promise((u,d)=>{a(l,u,d,p)});return Object.defineProperties(c,{activeCount:{get:()=>r},pendingCount:{get:()=>t.size},clearQueue:{value(){if(!e){t.clear();return}let l=AbortSignal.abort().reason;for(;t.size>0;)t.dequeue().reject(l)}},concurrency:{get:()=>i,set(l){Al(l),i=l,queueMicrotask(()=>{for(;r<i&&t.size>0;)n()})}},map:{async value(l,p){let u=Array.from(l,(d,f)=>this(p,d,f));return Promise.all(u)}}}),c}function Al(i){if(!((Number.isInteger(i)||i===Number.POSITIVE_INFINITY)&&i>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up")}var ib=hn.default.default||hn.default,rb=new Set([".realm.json"]),fn=1e4,nb=3e3;function F(i){let e=i.replace(/\\/g,"/").replace(/^\/+/,"");return rb.has(e)}async function Ll(i){try{return await D.access(i),!0}catch{return!1}}function jl(i){try{return decodeURIComponent(i)}catch{return i}}async function Ml(i,e){let t=await i.text().catch(()=>""),r=`Failed to upload ${e}: ${i.status} ${i.statusText}${t?` \u2014 ${t.slice(0,200)}`:""}`,n=new Error(r);throw n.status=i.status,n.body=t,n}var Ke={CardSource:"application/vnd.card+source",DirectoryListing:"application/vnd.api+json",Mtimes:"application/vnd.api+json",OctetStream:"application/octet-stream"},sb=10,Il=new Set(["node_modules"]),le=class{constructor(e,t){this.options=e;this.authenticator=t;this.normalizedRealmUrl=this.normalizeRealmUrl(e.realmUrl)}normalizedRealmUrl;ignoreCache=new Map;remoteLimit=dn(sb);normalizeRealmUrl(e){try{let t=new URL(e),r=t.pathname;return(r.split("/").filter(Boolean).pop()||"").includes(".")?console.warn(`Warning: "${e}" looks like a file URL, not a realm URL.
|
|
64
|
+
Moved ${n} director${n===1?"y":"ies"}.`),s>0&&console.log(`Skipped ${s} due to existing target paths or move failures.`)}function Zc(i){i.command("consolidate-workspaces").description("Move local realm mirror directories into the canonical <root>/<domain>/<owner>/<realm> layout").argument("[root-dir]","Root directory to scan (default: current directory)").option("--dry-run","Preview without moving anything").action(async(e,t)=>{await lv(e,t)})}function vt(i){if(i.trim()==="")return"Path must be a non-empty realm-relative file path.";if(/^[a-z][a-z0-9+.-]*:/i.test(i))return`Path "${i}" must be realm-relative \u2014 absolute URLs (with a scheme) are not accepted.`;if(i.startsWith("/"))return`Path "${i}" must be realm-relative \u2014 paths starting with "/" are not accepted.`;if(i.includes("\\"))return`Path "${i}" must not contain backslash characters.`;let e;try{e=decodeURIComponent(i)}catch{return`Path "${i}" contains an invalid percent-encoded escape.`}return e.split("/").some(r=>r==="..")?`Path "${i}" must not contain ".." segments \u2014 the path must stay inside the target realm.`:null}var gi=require("fs");var Zr=require("fs");var al=P(sl()),ol="application/octet-stream",xv={".gts":"text/typescript+glimmer",".ts":"text/typescript"};function vv(i){let e=i.lastIndexOf(".");if(e===-1)return ol;let t=i.slice(e).toLowerCase(),r=xv[t];if(r)return r;let n=(0,al.lookup)(i);return n||ol}function be(i){let e=vv(i);return e==="image/svg+xml"?!1:e.startsWith("image/")||e.startsWith("font/")||e==="application/pdf"||e==="application/vnd.ms-fontobject"}async function bt(i,e,t,r){let n=r?.profileManager??C();if(!n.getActiveProfile())return{ok:!1,error:A};let o=new URL(e,k(i)).href,a=typeof t!="string",c=be(e);if(c!==a)return{ok:!1,error:`Path ${e} is ${c?"binary":"text"} by extension but content is ${a?"bytes":"a string"}. Refusing to write to avoid silent corruption.`};try{let l=await n.authedRealmFetch(o,{method:"POST",headers:a?{"Content-Type":"application/octet-stream"}:{Accept:"application/vnd.card+source","Content-Type":"application/vnd.card+source"},body:t});if(!l.ok){let p=await l.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${l.status}: ${p.slice(0,300)}`}}return{ok:!0}}catch(l){return{ok:!1,error:l instanceof Error?l.message:String(l)}}}function Qe(i){process.stderr.write(i+`
|
|
65
|
+
`)}async function bv(){let i=[];for await(let e of process.stdin)i.push(e);return Buffer.concat(i).toString("utf-8")}function cl(i){i.command("write").description("Write a file to a realm (reads content from STDIN or --file)").argument("<path>","Realm-relative file path (e.g., hello.gts, Cards/my-card.json)").requiredOption("--realm <realm-url>","The realm URL to write to").option("--file <filepath>","Read content from a local file instead of STDIN").option("--json","Output raw JSON response").action(async(e,t)=>{let r;if(t.file){let s=be(t.file),o=be(e);s!==o&&(Qe(`${g}Error:${m} source file ${t.file} is ${s?"binary":"text"} but destination path ${e} is ${o?"binary":"text"}. Refusing to write to avoid silent corruption \u2014 rename the destination to match.`),process.exit(1));try{r=s?(0,Zr.readFileSync)(t.file):(0,Zr.readFileSync)(t.file,"utf-8")}catch(a){Qe(`${g}Error:${m} Could not read file: ${a instanceof Error?a.message:String(a)}`),process.exit(1)}}else process.stdin.isTTY&&Qe(`${x}Reading from STDIN. Type or paste content, then press Enter followed by Ctrl+D to finish.${m}`),r=await bv(),Qe(`${x}Received ${r.length} bytes. Writing to realm...${m}`);let n;try{n=await bt(t.realm,e,r)}catch(s){Qe(`${g}Error:${m} ${s instanceof Error?s.message:String(s)}`),process.exit(1)}t.json?I.output(JSON.stringify(n,null,2)):n.ok?console.log(`${R}Written:${m} ${e} ${x}\u2192${m} ${t.realm}`):Qe(`${g}Error:${m} ${n.error}`),n.ok||process.exit(1)})}async function en(i,e,t,r){let n=r?.profileManager??C();if(!n.getActiveProfile())return{ok:!1,error:A};let o=`${k(i)}_lint`;try{let a=await n.authedRealmFetch(o,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/vnd.card+source","X-Filename":t,"X-HTTP-Method-Override":"QUERY"},body:e});if(!a.ok){let l=await a.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${a.status}: ${l.slice(0,300)}`}}let c=await a.json();return{ok:!0,fixed:c.fixed,output:c.output,messages:c.messages}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}function ll(i){i.command("lint").description("Lint a file in a realm using the realm lint endpoint").argument("<path>","Realm-relative file path to lint (e.g., my-card.gts)").requiredOption("--realm <realm-url>","The realm URL to lint against").option("--file <local-filepath>","Read source from a local file instead of fetching from the realm").option("--json","Output raw JSON response").option("--fix","Write auto-fixed output back to the source").action(async(e,t)=>{let r=C();r.getActiveProfile()||(console.error(`${g}Error:${m} ${A}`),process.exit(1));let s;if(t.file)try{s=(0,gi.readFileSync)(t.file,"utf-8")}catch(p){console.error(`${g}Error:${m} Could not read local file: ${p instanceof Error?p.message:String(p)}`),process.exit(1)}else{let p=new URL(e,k(t.realm)).href;try{let u=await r.authedRealmFetch(p,{method:"GET",headers:{Accept:"application/vnd.card+source"}});if(!u.ok){let f=await u.text().catch(()=>"(no body)");console.error(`${g}Error:${m} Could not read file from realm: HTTP ${u.status}: ${f.slice(0,300)}`),process.exit(1)}s=await u.text()}catch(u){console.error(`${g}Error:${m} ${u instanceof Error?u.message:String(u)}`),process.exit(1)}}let o;try{o=await en(t.realm,s,e,{profileManager:r})}catch(p){console.error(`${g}Error:${m} ${p instanceof Error?p.message:String(p)}`),process.exit(1)}if(t.json){I.output(JSON.stringify(o,null,2)),o.ok||process.exit(1);return}if(o.ok||(console.error(`${g}Error:${m} ${o.error}`),process.exit(1)),t.fix&&o.fixed&&o.output)if(t.file)(0,gi.writeFileSync)(t.file,o.output,"utf-8"),console.log(`${R}Fixed:${m} ${t.file}`);else{let p=await bt(t.realm,e,o.output,{profileManager:r});p.ok||(console.error(`${g}Error:${m} Could not write fixed file: ${p.error}`),process.exit(1)),console.log(`${R}Fixed:${m} ${e} ${x}\u2192${m} ${t.realm}`)}let a=o.messages??[],c=a.filter(p=>p.severity===2),l=a.filter(p=>p.severity===1);if(a.length===0){console.log(`${x}No lint issues found.${m}`);return}for(let p of a){let u=p.severity===2?g:L,f=p.severity===2?"error":"warning",d=p.ruleId?` (${p.ruleId})`:"";console.log(`${u}${f}${m} ${p.line}:${p.column} ${p.message}${x}${d}${m}`)}console.log(`
|
|
66
|
+
${x}${c.length} error(s), ${l.length} warning(s)${m}`),c.length>0&&process.exit(1)})}async function Fe(i,e){let t=e?.profileManager??C();if(!t.getActiveProfile())return{filenames:[],error:A};let n=k(i),s=`${n}_mtimes`;try{let o=await t.authedRealmFetch(s,{method:"GET",headers:{Accept:"application/vnd.api+json"}});if(!o.ok){let p=await o.text().catch(()=>"(no body)");return{filenames:[],error:`_mtimes returned HTTP ${o.status}: ${p.slice(0,300)}`}}let a=await o.json(),c=a?.data?.attributes?.mtimes??a,l=[];for(let p of Object.keys(c)){if(!p.startsWith(n))continue;let u=p.slice(n.length);!u||u.endsWith("/")||l.push(u)}return{filenames:l.sort()}}catch(o){return{filenames:[],error:o instanceof Error?o.message:String(o)}}}function pl(i){i.command("list").alias("ls").description("List all files in a realm").requiredOption("--realm <realm-url>","The realm URL to list files from").option("--json","Output raw JSON response").action(async e=>{let t;try{t=await Fe(e.realm)}catch(r){console.error(`${g}Error:${m} ${r instanceof Error?r.message:String(r)}`),process.exit(1)}if(e.json)I.output(JSON.stringify(t,null,2)),t.error&&process.exit(1);else if(t.error)console.error(`${g}Error:${m} ${t.error}`),process.exit(1);else{for(let r of t.filenames)console.log(`${x}${r}${m}`);console.log(`
|
|
67
|
+
${x}${t.filenames.length} file(s)${m}`)}})}var tn=[".gts",".gjs",".ts",".js"];async function yv(i,e){let t=e?.profileManager??C();if(!t.getActiveProfile())return xi(A);let n=k(i),s=Date.now(),o;if(e?.path){let u=e.path,f=vt(u);if(f)return xi(f);if(!tn.some(d=>u.endsWith(d)))return xi(`Path "${u}" is not lintable \u2014 must end with one of ${tn.join(", ")}`);o=[u]}else{let u=await Fe(n,{profileManager:t});if(u.error)return xi(`Failed to list realm files: ${u.error}`);o=u.filenames.filter(f=>tn.some(d=>f.endsWith(d)))}if(o.length===0)return{status:"passed",filesChecked:0,filesWithErrors:0,errorCount:0,warningCount:0,durationMs:Date.now()-s,lintableFiles:[],violations:[]};let a=[],c=0,l=0,p=0;for(let u of o){let f;try{let b=new URL(u,n).href,j=await t.authedRealmFetch(b,{method:"GET",headers:{Accept:"application/vnd.card+source"}});if(!j.ok){let te=await j.text().catch(()=>"(no body)");rn(u,`HTTP ${j.status}: ${te.slice(0,300)}`,a),c+=1,l+=1;continue}f=await j.text()}catch(b){rn(u,b instanceof Error?b.message:String(b),a),c+=1,l+=1;continue}let d=await en(n,f,u,{profileManager:t});if(!d.ok){rn(u,d.error??"lint failed",a),c+=1,l+=1;continue}let h=!1;for(let b of d.messages??[]){let j=b.severity===2?"error":"warning";a.push({rule:b.ruleId,file:u,line:b.line,column:b.column,message:b.message,severity:j}),j==="error"?(l+=1,h=!0):p+=1}h&&(c+=1)}return{status:l===0?"passed":"failed",filesChecked:o.length,filesWithErrors:c,errorCount:l,warningCount:p,durationMs:Date.now()-s,lintableFiles:o,violations:a}}function rn(i,e,t){t.push({rule:"lint-error",file:i,line:0,column:0,message:e,severity:"error"})}function xi(i){return{status:"error",filesChecked:0,filesWithErrors:0,errorCount:0,warningCount:0,durationMs:0,lintableFiles:[],violations:[],errorMessage:i}}function ul(i){i.command("lint").description("Lint every lintable (.gts/.gjs/.ts/.js) file in a realm via the realm lint endpoint. Pass a realm-relative path to lint a single file.").argument("[path]","Optional realm-relative file path. When omitted, lints every lintable file in the realm.").requiredOption("--realm <realm-url>","The realm URL to lint against").option("--json","Output structured JSON result").action(async(e,t)=>{let r;try{r=await yv(t.realm,e?{path:e}:{})}catch(s){console.error(`${g}Error:${m} ${s instanceof Error?s.message:String(s)}`),process.exit(1)}if(t.json){I.output(JSON.stringify(r,null,2)),r.status!=="passed"&&process.exit(1);return}if(r.errorMessage&&(console.error(`${g}Error:${m} ${r.errorMessage}`),process.exit(1)),r.violations.length===0){console.log(`${x}No lint issues found (${r.filesChecked} file(s) checked).${m}`);return}let n;for(let s of r.violations){s.file!==n&&(n=s.file,console.log(`
|
|
68
|
+
${x}${s.file}${m}`));let o=s.severity==="error"?g:L,a=s.rule?` (${s.rule})`:"";console.log(` ${o}${s.severity}${m} ${s.line}:${s.column} ${s.message}${x}${a}${m}`)}console.log(`
|
|
69
|
+
${x}${r.errorCount} error(s), ${r.warningCount} warning(s) across ${r.filesChecked} file(s)${m}`),r.errorCount>0&&process.exit(1)})}var hl=require("node:child_process"),B=require("node:fs"),gl=require("node:os"),T=require("node:path");var vi=require("node:fs"),bi=require("node:path");function yt(i){let e=i;for(;;){let t=(0,bi.join)(e,"package.json");if((0,vi.existsSync)(t))try{if(JSON.parse((0,vi.readFileSync)(t,"utf8"))?.name==="@cardstack/boxel-cli")return e}catch{}let r=(0,bi.dirname)(e);if(r===e)throw new Error("Could not locate the @cardstack/boxel-cli package root walking up from "+i);e=r}}async function nn(i,e,t){let r=t?.profileManager??C(),n=r.getActiveProfile();if(!n)return{ok:!1,error:A};let o=`${n.profile.realmServerUrl.replace(/\/$/,"")}/_federated-search`,a=(Array.isArray(i)?i:[i]).map(k);try{let c=await r.authedRealmServerFetch(o,{method:"QUERY",headers:{Accept:"application/vnd.card+json","Content-Type":"application/json"},body:JSON.stringify({realms:a,...e})});if(!c.ok){let p=await c.text();return{ok:!1,status:c.status,error:`HTTP ${c.status}: ${p.slice(0,300)}`}}let l=await c.json();return{ok:!0,status:c.status,data:l.data}}catch(c){return{ok:!1,status:0,error:c instanceof Error?c.message:String(c)}}}function ml(i){i.command("search").description("Federated search across realms using a JSON query").requiredOption("--realm <realm-url>","Realm URL to search (repeatable)",(e,t)=>(t.push(e),t),[]).requiredOption("--query <json>","JSON query object (as a string)").option("--json","Output raw JSON response").action(async e=>{e.realm.length===0&&(console.error(`${g}Error:${m} At least one --realm is required`),process.exit(1));let t;try{let n=JSON.parse(e.query);(typeof n!="object"||n===null||Array.isArray(n))&&(console.error(`${g}Error:${m} --query must be a JSON object, got ${Array.isArray(n)?"array":typeof n}`),process.exit(1)),t=n}catch(n){console.error(`${g}Error:${m} Invalid JSON in --query: ${n instanceof Error?n.message:String(n)}`),process.exit(1);return}let r;try{r=await nn(e.realm,t)}catch(n){console.error(`${g}Error:${m} ${n instanceof Error?n.message:String(n)}`),process.exit(1);return}e.json?I.output(JSON.stringify(r,null,2)):r.ok?I.output(JSON.stringify(r.data??[],null,2)):(console.error(`${x}Status:${m} ${r.status??"(no status)"}`),console.error(`${g}Error:${m} ${r.error}`)),r.ok||process.exit(1)})}var wv={module:"https://cardstack.com/base/spec",name:"Spec"},yi=[".gts",".gjs",".ts"],wt=".json",wi=yt(__dirname),Ue=(0,T.resolve)(wi,".."),ee=(()=>{let i=(0,T.join)(wi,"bundled-types");if((0,B.existsSync)((0,T.join)(i,"base")))return i})(),Ev=ee?(0,T.join)(ee,"base"):(0,T.join)(Ue,"base"),dl=ee?(0,T.join)(ee,"host-app"):(0,T.join)(Ue,"host","app"),Rv=ee?(0,T.join)(ee,"host-tests"):(0,T.join)(Ue,"host","tests"),$v=ee?(0,T.join)(ee,"host-types"):(0,T.join)(Ue,"host","types"),kv=ee?(0,T.join)(ee,"boxel-ui"):(0,T.join)(Ue,"boxel-ui","addon","src"),Sv=ee?(0,T.join)(ee,"local-types"):(0,T.join)(Ue,"local-types"),fl=ee?(0,T.join)(ee,"shims"):void 0,_v=ee?(0,T.join)(wi,"node_modules"):(0,T.join)(Ue,"host","node_modules"),sn;async function Cv(i,e,t={}){let r=t.totalWaitMs??3e4,n=t.pollMs??250,s=Date.now()+r,o=await i();for(;e(o)&&Date.now()<s;)await new Promise(a=>setTimeout(a,n)),o=await i();return o}async function Tv(i,e){let t=!i,r=e?.workspace??(t?process.cwd():void 0);if(t&&r&&!Dv(r))return Ze(`workspace directory not found: ${r}`);let n=e?.profileManager??C();if(!t&&!n.getActiveProfile())return Ze(A);let s=i?k(i):"",o=Date.now(),a=[],c=[];if(e?.path){let d=e.path,h=vt(d);if(h)return Ze(h);if(yi.some(b=>d.endsWith(b)))a=[d];else if(d.endsWith(wt))c=[d];else return Ze(`Path "${d}" is not parseable \u2014 must end with one of ${yi.join(", ")}, or ${wt}`)}else if(t)try{a=Nv(r),c=Fv(r)}catch(d){return Ze(`Failed to walk workspace ${r}: ${d instanceof Error?d.message:String(d)}`)}else try{[a,c]=await Promise.all([Ov(s,n),Pv(s,n)])}catch(d){return Ze(`Failed to discover parseable files: ${d instanceof Error?d.message:String(d)}`)}let l=[...a,...c];if(l.length===0)return{status:"passed",filesChecked:0,filesWithErrors:0,errorCount:0,durationMs:Date.now()-o,parseableFiles:[],errors:[]};let p=d=>t?Uv(r,d):Lv(s,d,n),u=[],f=new Set;if(a.length>0){let d=[];for(let h of a){let b=await p(h);if(!b.ok){u.push({file:h,line:0,column:0,message:`Could not read ${h}: ${b.error}`}),f.add(h);continue}d.push({path:h,content:b.content})}if(d.length>0)try{let h=await jv(d);for(let b of h)u.push(b),f.add(b.file)}catch(h){let b=d[0].path;u.push({file:b,line:0,column:0,message:`Glint check failed: ${h instanceof Error?h.message:String(h)}`}),f.add(b)}}for(let d of c){let h=await p(d);if(!h.ok){u.push({file:d,line:0,column:0,message:`Could not read ${d}: ${h.error}`}),f.add(d);continue}let b=Mv(d,h.content);for(let j of b)u.push(j),f.add(j.file)}return{status:u.length===0?"passed":"failed",filesChecked:l.length,filesWithErrors:f.size,errorCount:u.length,durationMs:Date.now()-o,parseableFiles:l,errors:u}}async function Ov(i,e){let t=`${i}_mtimes`,r=await e.authedRealmFetch(t,{method:"GET",headers:{Accept:"application/vnd.api+json"}});if(!r.ok){let a=await r.text().catch(()=>"(no body)");throw new Error(`_mtimes returned HTTP ${r.status}: ${a.slice(0,300)}`)}let n=await r.json(),s=n?.data?.attributes?.mtimes??n,o=[];for(let a of Object.keys(s)){if(!a.startsWith(i))continue;let c=a.slice(i.length);!c||c.endsWith("/")||yi.some(l=>c.endsWith(l))&&o.push(c)}return o.sort()}async function Pv(i,e){let t=await Cv(()=>nn(i,{filter:{type:wv}},{profileManager:e}),s=>s.ok&&(s.data?.length??0)===0);if(!t.ok)return[];let r=[];for(let s of t.data??[]){let o=s.id;if(!o)continue;let a=s.attributes;if(!a||a.specType==="field")continue;let l=s.relationships,p=Av(l),u=new URL(o,i).href,f=[];for(let d of p){let h=new URL(d,u).href;h.startsWith(i)&&f.push(h.slice(i.length))}r.push({specId:o,exampleUrls:f})}let n=[];for(let s of r)for(let o of s.exampleUrls){let a=o.endsWith(wt)?o:`${o}${wt}`;n.includes(a)||n.push(a)}return n.sort()}function Av(i){if(!i)return[];let e=[];for(let t=0;;t++){let r=i[`linkedExamples.${t}`];if(!r?.links?.self)break;e.push(r.links.self)}if(e.length===0){let t=i.linkedExamples;t?.links?.self&&e.push(t.links.self)}return e}async function Lv(i,e,t){try{let r=new URL(e,i).href,n=await t.authedRealmFetch(r,{method:"GET",headers:{Accept:"application/vnd.card+source"}});if(!n.ok){let s=await n.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${n.status}: ${s.slice(0,300)}`}}return{ok:!0,content:await n.text()}}catch(r){return{ok:!1,error:r instanceof Error?r.message:String(r)}}}async function jv(i){let e=(0,B.mkdtempSync)((0,T.join)((0,gl.tmpdir)(),"boxel-parse-"));try{for(let l of i){let p=vt(l.path);if(p)throw new Error(p);let u=(0,T.join)(e,l.path),f=(0,T.resolve)(u);if(!f.startsWith(e+"/"))throw new Error(`Path "${l.path}" resolves outside the parse workspace and was rejected.`);(0,B.mkdirSync)((0,T.dirname)(f),{recursive:!0}),(0,B.writeFileSync)(f,l.content,"utf8")}if(!sn){let l={compilerOptions:{target:"es2022",allowJs:!0,moduleResolution:"bundler",allowSyntheticDefaultImports:!0,noEmit:!0,baseUrl:".",module:"es2022",strict:!0,experimentalDecorators:!0,skipLibCheck:!0,noUnusedLocals:!1,noUnusedParameters:!1,types:["qunit-dom"],paths:{"https://cardstack.com/base/*":[`${Ev}/*`],"@cardstack/host/tests/*":[`${Rv}/*`],"@cardstack/host/*":[`${dl}/*`],"@cardstack/boxel-host/commands/*":[`${dl}/commands/*`],"@cardstack/boxel-ui/*":[`${kv}/*`],"*":[`${$v}/*`]}},include:["**/*.ts","**/*.gts","**/*.gjs",`${Sv}/**/*.d.ts`,...fl?[`${fl}/**/*.d.ts`]:[]],exclude:["node_modules"]};sn=JSON.stringify(l,null,2)}(0,B.writeFileSync)((0,T.join)(e,"tsconfig.json"),sn,"utf8"),(0,B.symlinkSync)(_v,(0,T.join)(e,"node_modules"));let t=require.resolve("@glint/ember-tsc",{paths:[wi]}),r=(0,T.resolve)((0,T.dirname)(t),".."),n=(0,T.join)(r,"bin","ember-tsc.js"),{output:s,exitedWithError:o}=await new Promise((l,p)=>{let u=(0,hl.execFile)(process.execPath,[n,"--noEmit","--project",(0,T.join)(e,"tsconfig.json")],{cwd:e,timeout:12e4,maxBuffer:10485760},(f,d,h)=>{if(f&&!d&&!h){p(new Error(`ember-tsc execution failed: ${f.message}`));return}if(u.killed||f?.killed){p(new Error("ember-tsc was killed (timeout or signal)"));return}l({output:d+h,exitedWithError:!!f})})}),a=[],c=0;for(let l of s.split(`
|
|
70
|
+
`)){let p=l.match(/^(.+?)\((\d+),(\d+)\):\s*error\s+(TS\d+):\s*(.+)/);if(!p)continue;c++;let[,u,f,d,h,b]=p,j=(0,T.resolve)(e,u);if(!j.startsWith(e)||h==="TS2353"&&b.includes("'scoped'"))continue;let te=j.slice(e.length+1),E=i.find($=>$.path===te);E&&a.push({file:E.path,line:parseInt(f,10),column:parseInt(d,10),message:b})}if(o&&a.length===0&&c===0){let l=s.slice(0,500).trim();a.push({file:i[0]?.path??"unknown",line:0,column:0,message:`ember-tsc exited with errors but produced no TS diagnostics. Check the tsconfig paths and node_modules symlink. Output: ${l}`})}return a}finally{try{(0,B.rmSync)(e,{recursive:!0,force:!0})}catch{}}}function Mv(i,e){let t;try{t=JSON.parse(e)}catch(r){let n=r instanceof Error?r.message:String(r);return[{file:i,line:0,column:0,message:`Invalid JSON: ${n}`}]}return typeof t!="object"||t===null||Array.isArray(t)?[{file:i,line:0,column:0,message:"Card document must be a JSON object"}]:Iv(i,t)}function Iv(i,e){let t=[],r=e.data;if(typeof r!="object"||r===null||Array.isArray(r))return t.push({file:i,line:0,column:0,message:'Card document must have a "data" object'}),t;let n=r;typeof n.type!="string"&&t.push({file:i,line:0,column:0,message:'Card document "data.type" must be a string'});let s=n.meta;if(typeof s!="object"||s===null)t.push({file:i,line:0,column:0,message:'Card document must have a "data.meta" object'});else{let o=s.adoptsFrom;typeof o!="object"||o===null?t.push({file:i,line:0,column:0,message:'Card document must have a "data.meta.adoptsFrom" object with "module" and "name"'}):(typeof o.module!="string"&&t.push({file:i,line:0,column:0,message:'"data.meta.adoptsFrom.module" must be a string'}),typeof o.name!="string"&&t.push({file:i,line:0,column:0,message:'"data.meta.adoptsFrom.name" must be a string'}))}return t}function Nv(i){let e=[];return xl(i,t=>{yi.some(r=>t.endsWith(r))&&e.push(t)}),e.sort()}function Fv(i){let e=[];return xl(i,t=>{if(!t.endsWith(wt))return;let r=t.split("/").pop();r==="tsconfig.json"||r==="package.json"||r==="realm.json"||r==="index.json"||r===".boxel-sync.json"||t.startsWith("Validations/")||e.push(t)}),e.sort()}function xl(i,e){let t=(0,T.resolve)(i),r=n=>{let s;try{s=(0,B.readdirSync)(n,{withFileTypes:!0})}catch{return}for(let o of s){let a=(0,T.join)(n,o.name);if(o.isDirectory()){if(o.name==="node_modules"||o.name===".git")continue;r(a)}else if(o.isFile()){let c=(0,T.relative)(t,a).split(T.sep).join("/");e(c)}}};r(t)}function Uv(i,e){let t=(0,T.join)(i,e),r=(0,T.resolve)(t);if(!r.startsWith((0,T.resolve)(i)+"/"))return{ok:!1,error:"path resolves outside workspace"};try{return{ok:!0,content:(0,B.readFileSync)(r,"utf8")}}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}}function Dv(i){try{return(0,B.statSync)(i).isDirectory()}catch{return!1}}function Ze(i){return{status:"error",filesChecked:0,filesWithErrors:0,errorCount:0,durationMs:0,parseableFiles:[],errors:[],errorMessage:i}}function vl(i){i.command("parse").description("Type-check .gts / .gjs / .ts files with glint, plus validate the document structure of any .json card instances. Defaults to reading from the current working directory \u2014 the factory's pre-push validator (write files locally, parse, fix, then push). Pass --realm <url> to fetch source from a realm over HTTP instead, or --workspace <dir> to point at a non-cwd directory.").argument("[path]","Optional workspace-relative (default) or realm-relative (with --realm) file path. When omitted, parses every parseable file in the workspace / realm.").option("--realm <realm-url>","Fetch source from this realm over HTTP instead of reading from the workspace.").option("--workspace <dir>","Read source from this directory (default: cwd). Ignored when --realm is set.").option("--json","Output structured JSON result").action(async(e,t)=>{let r;try{r=await Tv(t.realm,{...e?{path:e}:{},...t.workspace?{workspace:t.workspace}:{}})}catch(s){console.error(`${g}Error:${m} ${s instanceof Error?s.message:String(s)}`),process.exit(1)}if(t.json){I.output(JSON.stringify(r,null,2)),r.status!=="passed"&&process.exit(1);return}if(r.errorMessage&&(console.error(`${g}Error:${m} ${r.errorMessage}`),process.exit(1)),r.errors.length===0){console.log(`${x}No parse errors (${r.filesChecked} file(s) checked).${m}`);return}let n;for(let s of r.errors)s.file!==n&&(n=s.file,console.log(`
|
|
71
|
+
${x}${s.file}${m}`)),console.log(` ${g}error${m} ${s.line}:${s.column} ${s.message}`);console.log(`
|
|
72
|
+
${x}${r.errorCount} error(s) across ${r.filesWithErrors} of ${r.filesChecked} file(s)${m}`),r.errorCount>0&&process.exit(1)})}async function qv(i,e,t){let r=t?.profileManager??C();if(!r.getActiveProfile())throw new Error("No active profile. Run `boxel profile add` to create one.");let s=new URL(e,k(i)).href,o;try{o=await r.authedRealmFetch(s,{method:"GET",headers:{Accept:"*/*"}})}catch(c){return{ok:!1,error:c instanceof Error?c.message:String(c)}}if(!o.ok){let c=await o.text().catch(()=>"(no body)");return{ok:!1,status:o.status,error:`HTTP ${o.status}: ${c.slice(0,300)}`}}let a=await o.text();return{ok:!0,status:o.status,content:a}}function bl(i){i.command("read-transpiled").description("Debugging tool ONLY for investigating runtime errors in .gts modules you've written. Use when an eval or instantiate error reports a line/column number \u2014 those line numbers refer to the transpiled output, not your .gts source, so fetching the transpiled output is how you locate the offending source construct. Never use the transpiled output as a reference for how to write code: do not copy its patterns (setComponentTemplate, precompileTemplate, wire-format templates, base64 CSS imports) into source. Always write idiomatic Ember / <template>-tag / CardDef source.").argument("<path>","Realm-relative module path. The .gts extension is optional \u2014 the realm accepts either form.").requiredOption("--realm <realm-url>","The realm URL to fetch from").option("--json","Output raw JSON response").action(async(e,t)=>{let r;try{r=await qv(t.realm,e)}catch(n){console.error(`${g}Error:${m} ${n instanceof Error?n.message:String(n)}`),process.exit(1)}t.json?I.output(JSON.stringify(r,null,2)):r.ok?I.output(r.content??""):(console.error(`${x}Status:${m} ${r.status??"(no status)"}`),console.error(`${g}Error:${m} ${r.error}`)),r.ok||process.exit(1)})}async function Hv(i,e){let t=e?.profileManager??C();if(!t.getActiveProfile())return{ok:!1,error:A};let n=e?.cancelPending??!1,s=`${k(i)}_cancel-indexing-job`;try{let o=await t.authedRealmFetch(s,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({cancelPending:n})});if(!o.ok){let a=await o.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${o.status}: ${a.slice(0,300)}`}}return{ok:!0}}catch(o){return{ok:!1,error:o instanceof Error?o.message:String(o)}}}function yl(i){i.command("cancel-indexing").description("Cancel running indexing jobs for a realm (use --cancel-pending to also cancel queued jobs)").requiredOption("--realm <realm-url>","URL of the realm to cancel indexing for").option("--cancel-pending","Also cancel queued/pending indexing jobs (default: cancel running only)").option("--json","Output raw JSON response").action(async e=>{let t=await Hv(e.realm,{cancelPending:e.cancelPending});if(e.json)I.output(JSON.stringify(t,null,2)),t.ok||process.exit(1);else if(t.ok){let r=e.cancelPending?"running and pending":"running";console.log(`${R}Cancelled ${r} indexing jobs for ${e.realm}${m}`)}else console.error(`${g}Error:${m} ${t.error}`),process.exit(1)})}var Wv=Object.freeze({a:"https://boxel-images.boxel.ai/icons/Letter-a.png",b:"https://boxel-images.boxel.ai/icons/Letter-b.png",c:"https://boxel-images.boxel.ai/icons/Letter-c.png",d:"https://boxel-images.boxel.ai/icons/Letter-d.png",e:"https://boxel-images.boxel.ai/icons/Letter-e.png",f:"https://boxel-images.boxel.ai/icons/Letter-f.png",g:"https://boxel-images.boxel.ai/icons/Letter-g.png",h:"https://boxel-images.boxel.ai/icons/Letter-h.png",i:"https://boxel-images.boxel.ai/icons/Letter-i.png",j:"https://boxel-images.boxel.ai/icons/Letter-j.png",k:"https://boxel-images.boxel.ai/icons/Letter-k.png",l:"https://boxel-images.boxel.ai/icons/Letter-l.png",m:"https://boxel-images.boxel.ai/icons/Letter-m.png",n:"https://boxel-images.boxel.ai/icons/Letter-n.png",o:"https://boxel-images.boxel.ai/icons/Letter-o.png",p:"https://boxel-images.boxel.ai/icons/Letter-p.png",q:"https://boxel-images.boxel.ai/icons/Letter-q.png",r:"https://boxel-images.boxel.ai/icons/Letter-r.png",s:"https://boxel-images.boxel.ai/icons/Letter-s.png",t:"https://boxel-images.boxel.ai/icons/Letter-t.png",u:"https://boxel-images.boxel.ai/icons/Letter-u.png",v:"https://boxel-images.boxel.ai/icons/Letter-v.png",w:"https://boxel-images.boxel.ai/icons/Letter-w.png",x:"https://boxel-images.boxel.ai/icons/Letter-x.png",y:"https://boxel-images.boxel.ai/icons/Letter-y.png",z:"https://boxel-images.boxel.ai/icons/letter-z.png"}),wl=Object.freeze(["https://boxel-images.boxel.ai/background-images/4k-arabic-teal.jpg","https://boxel-images.boxel.ai/background-images/4k-arrow-weave.jpg","https://boxel-images.boxel.ai/background-images/4k-atmosphere-curvature.jpg","https://boxel-images.boxel.ai/background-images/4k-brushed-slabs.jpg","https://boxel-images.boxel.ai/background-images/4k-coral-reefs.jpg","https://boxel-images.boxel.ai/background-images/4k-crescent-lake.jpg","https://boxel-images.boxel.ai/background-images/4k-curvilinear-stairs.jpg","https://boxel-images.boxel.ai/background-images/4k-desert-dunes.jpg","https://boxel-images.boxel.ai/background-images/4k-doodle-board.jpg","https://boxel-images.boxel.ai/background-images/4k-fallen-leaves.jpg","https://boxel-images.boxel.ai/background-images/4k-flowing-mesh.jpg","https://boxel-images.boxel.ai/background-images/4k-glass-reflection.jpg","https://boxel-images.boxel.ai/background-images/4k-glow-cells.jpg","https://boxel-images.boxel.ai/background-images/4k-granite-peaks.jpg","https://boxel-images.boxel.ai/background-images/4k-green-wormhole.jpg","https://boxel-images.boxel.ai/background-images/4k-joshua-dawn.jpg","https://boxel-images.boxel.ai/background-images/4k-lava-river.jpg","https://boxel-images.boxel.ai/background-images/4k-leaves-moss.jpg","https://boxel-images.boxel.ai/background-images/4k-light-streaks.jpg","https://boxel-images.boxel.ai/background-images/4k-lowres-glitch.jpg","https://boxel-images.boxel.ai/background-images/4k-marble-shimmer.jpg","https://boxel-images.boxel.ai/background-images/4k-metallic-leather.jpg","https://boxel-images.boxel.ai/background-images/4k-microscopic-crystals.jpg","https://boxel-images.boxel.ai/background-images/4k-moon-face.jpg","https://boxel-images.boxel.ai/background-images/4k-mountain-runway.jpg","https://boxel-images.boxel.ai/background-images/4k-origami-flock.jpg","https://boxel-images.boxel.ai/background-images/4k-paint-swirl.jpg","https://boxel-images.boxel.ai/background-images/4k-pastel-triangles.jpg","https://boxel-images.boxel.ai/background-images/4k-perforated-sheet.jpg","https://boxel-images.boxel.ai/background-images/4k-plastic-ripples.jpg","https://boxel-images.boxel.ai/background-images/4k-powder-puff.jpg","https://boxel-images.boxel.ai/background-images/4k-radiant-crystal.jpg","https://boxel-images.boxel.ai/background-images/4k-redrock-canyon.jpg","https://boxel-images.boxel.ai/background-images/4k-rock-portal.jpg","https://boxel-images.boxel.ai/background-images/4k-rolling-hills.jpg","https://boxel-images.boxel.ai/background-images/4k-sand-stone.jpg","https://boxel-images.boxel.ai/background-images/4k-silver-fur.jpg","https://boxel-images.boxel.ai/background-images/4k-spa-pool.jpg","https://boxel-images.boxel.ai/background-images/4k-stained-glass.jpg","https://boxel-images.boxel.ai/background-images/4k-stone-veins.jpg","https://boxel-images.boxel.ai/background-images/4k-tangerine-plains.jpg","https://boxel-images.boxel.ai/background-images/4k-techno-floor.jpg","https://boxel-images.boxel.ai/background-images/4k-thick-frost.jpg","https://boxel-images.boxel.ai/background-images/4k-water-surface.jpg","https://boxel-images.boxel.ai/background-images/4k-watercolor-splashes.jpg","https://boxel-images.boxel.ai/background-images/4k-wildflower-field.jpg","https://boxel-images.boxel.ai/background-images/4k-wood-grain.jpg"]);function on(i){if(!i)return;let e=i.toLowerCase().replace(/[^a-z0-9]/g,"").replace(/^[0-9]+/,"");return Wv[e.charAt(0)]}function El(){let i=Math.floor(Math.random()*wl.length);return wl[i]}var Gv=/^[a-z0-9-]+$/;function $l(i){i.command("create").description("Create a new realm on the realm server").argument("<realm-name>","realm name (lowercase, numbers, hyphens only)").argument("<display-name>","display name for the realm").option("--background <url>","background image URL").option("--icon <url>","icon image URL").action(async(e,t,r)=>{await zv(e,t,r)})}async function Vv(i,e,t={}){let r=t.profileManager??C(),n=r.getActiveProfile();if(!n)throw new Error("No active profile. Run `boxel profile add` to create one.");let s=n.profile.realmServerUrl.replace(/\/$/,""),o={endpoint:i,name:e,backgroundURL:t.background??El(),iconURL:t.icon??on(e)??on(i)},a=await r.authedRealmServerFetch(`${s}/_create-realm`,{method:"POST",headers:{"Content-Type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"realm",attributes:o}})});if(!a.ok){let f;try{f=await a.text()}catch{f="server returned a non-serialized object body"}if(f.includes("[object Object]")&&(f="server returned a non-serialized object body"),f.includes("already exists")){let d=Yv(f,s,i),h=await Rl(r,d);try{await r.addToUserRealms(d)}catch{}return{realmUrl:d,created:!1,realmToken:h}}throw new Error(`Realm server returned ${a.status}: ${f}`)}let l=(await a.json())?.data?.id;if(typeof l!="string"||l.trim()==="")throw new Error(`Realm server response did not include a realm URL (data.id) for "${i}".`);let p=k(l),u=await Rl(r,p);try{await r.addToUserRealms(p)}catch{}return t.waitForReady&&u&&await Bv(p,u),{realmUrl:p,created:!0,realmToken:u}}async function Rl(i,e){try{let t=await i.getOrRefreshServerToken();return await i.fetchAndStoreRealmToken(e,t)}catch{return}}async function Bv(i,e){let t=new URL("_readiness-check",i).href,r=15e3,n=250,s=Date.now(),o;for(;Date.now()-s<r;){try{let a=await fetch(t,{headers:{Accept:"application/vnd.api+json",Authorization:e}});if(a.ok)return;o=`HTTP ${a.status}`}catch(a){o=a instanceof Error?a.message:String(a)}await new Promise(a=>setTimeout(a,n))}throw new Error(`Timed out waiting for realm ${i} to become ready${o?`: ${o}`:""}`)}async function zv(i,e,t){Gv.test(i)||(console.error("Error: realm name must contain only lowercase letters, numbers, and hyphens"),process.exit(1));try{let r=await Vv(i,e,t),n=r.created?"created":"already exists";console.log(`${R}Realm ${n}:${m} ${_}${r.realmUrl}${m}`)}catch(r){console.error(`Error: ${r instanceof Error?r.message:String(r)}`),process.exit(1)}}function Yv(i,e,t){let r=i.match(/'(https?:\/\/[^']+)'/);if(r)return k(r[1]);throw new Error(`Could not determine realm URL from server error response for endpoint "${t}" on "${e}". The response did not include an explicit realm URL.`)}var Rt=P(require("fs"));var Ul=require("child_process"),K=P(require("fs/promises")),Y=P(require("path"));var q=P(require("fs/promises")),z=P(require("path")),gn=P(Ll());var dn=class{value;next;constructor(e){this.value=e}},Et=class{#e;#t;#i;constructor(){this.clear()}enqueue(e){let t=new dn(e);this.#e?(this.#t.next=t,this.#t=t):(this.#e=t,this.#t=t),this.#i++}dequeue(){let e=this.#e;if(e)return this.#e=this.#e.next,this.#i--,this.#e||(this.#t=void 0),e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#i=0}get size(){return this.#i}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}*drain(){for(;this.#e;)yield this.dequeue()}};function fn(i){let e=!1;if(typeof i=="object"&&({concurrency:i,rejectOnClear:e=!1}=i),jl(i),typeof e!="boolean")throw new TypeError("Expected `rejectOnClear` to be a boolean");let t=new Et,r=0,n=()=>{r<i&&t.size>0&&(r++,t.dequeue().run())},s=()=>{r--,n()},o=async(l,p,u)=>{let f=(async()=>l(...u))();p(f);try{await f}catch{}s()},a=(l,p,u,f)=>{let d={reject:u};new Promise(h=>{d.run=h,t.enqueue(d)}).then(o.bind(void 0,l,p,f)),r<i&&n()},c=(l,...p)=>new Promise((u,f)=>{a(l,u,f,p)});return Object.defineProperties(c,{activeCount:{get:()=>r},pendingCount:{get:()=>t.size},clearQueue:{value(){if(!e){t.clear();return}let l=AbortSignal.abort().reason;for(;t.size>0;)t.dequeue().reject(l)}},concurrency:{get:()=>i,set(l){jl(l),i=l,queueMicrotask(()=>{for(;r<i&&t.size>0;)n()})}},map:{async value(l,p){let u=Array.from(l,(f,d)=>this(p,f,d));return Promise.all(u)}}}),c}function jl(i){if(!((Number.isInteger(i)||i===Number.POSITIVE_INFINITY)&&i>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up")}var mb=gn.default.default||gn.default,db=new Set([".realm.json"]),hn=1e4,fb=3e3;function U(i){let e=i.replace(/\\/g,"/").replace(/^\/+/,"");return db.has(e)}async function Ml(i){try{return await q.access(i),!0}catch{return!1}}function Il(i){try{return decodeURIComponent(i)}catch{return i}}async function Nl(i,e){let t=await i.text().catch(()=>""),r=`Failed to upload ${e}: ${i.status} ${i.statusText}${t?` \u2014 ${t.slice(0,200)}`:""}`,n=new Error(r);throw n.status=i.status,n.body=t,n}var et={CardSource:"application/vnd.card+source",DirectoryListing:"application/vnd.api+json",Mtimes:"application/vnd.api+json",OctetStream:"application/octet-stream"},hb=10,Fl=new Set(["node_modules"]),ue=class{constructor(e,t){this.options=e;this.authenticator=t;this.normalizedRealmUrl=this.normalizeRealmUrl(e.realmUrl)}normalizedRealmUrl;ignoreCache=new Map;remoteLimit=fn(hb);normalizeRealmUrl(e){try{let t=new URL(e),r=t.pathname;return(r.split("/").filter(Boolean).pop()||"").includes(".")?console.warn(`Warning: "${e}" looks like a file URL, not a realm URL.
|
|
73
73
|
Realm URLs should point to a directory (e.g., ${t.origin}${r.replace(/\/[^/]*\.[^/]*$/,"/")})`):e.endsWith("/")||console.warn(`Warning: Realm URL should end with a trailing slash.
|
|
74
|
-
Did you mean "${e}/"?`),t.href.replace(/\/+$/,"")+"/"}catch{throw new Error(`Invalid workspace URL: ${e}`)}}buildDirectoryUrl(e=""){if(!e)return this.normalizedRealmUrl;let t=e.replace(/^\/+|\/+$/g,"");return`${this.normalizedRealmUrl}${t}/`}buildFileUrl(e){let t=e.replace(/^\/+/,"");return`${this.normalizedRealmUrl}${t}`}async getRemoteFileList(e=""){let t=new Map;try{let r=this.buildDirectoryUrl(e),n=await this.remoteLimit(()=>this.authenticator.authedRealmFetch(r,{headers:{Accept:"application/vnd.api+json"}}));if(!n.ok){if(n.status===404)return t;throw n.status===401||n.status===403?new Error(`Authentication failed (${n.status}): Cannot access workspace. Check your Matrix credentials and workspace permissions.`):new Error(`Failed to get directory listing: ${n.status} ${n.statusText}`)}let s=await n.json();if(s.data&&s.data.relationships){let o=Object.entries(s.data.relationships),a=await Promise.all(o.map(([c,l])=>{let u=l.meta.kind==="file",d=e?V.posix.join(e,c):c;return u?this.shouldIgnoreRemoteFile(d)?[]:[[d,!0]]:(async()=>{let f=await this.getRemoteFileList(d);return Array.from(f.entries())})()}));for(let c of a)for(let[l,p]of c)t.set(l,p)}}catch(r){throw r instanceof Error&&(r.message.includes("Authentication failed")||r.message.includes("Cannot access workspace")||r.message.includes("401")||r.message.includes("403"))||console.error(`Error reading remote directory ${e}:`,r),r}return t}async getRemoteMtimes(){let e=new Map;try{let t=`${this.normalizedRealmUrl}_mtimes`,r=await this.authenticator.authedRealmFetch(t,{headers:{Accept:Ke.Mtimes}});if(!r.ok){if(r.status===404)return console.log("Note: _mtimes endpoint not available, will upload all files"),e;throw new Error(`Failed to get mtimes: ${r.status} ${r.statusText}`)}let n=await r.json();if(n.data?.attributes?.mtimes){let s=Object.entries(n.data.attributes.mtimes);process.env.DEBUG&&(console.log(`Remote mtimes received: ${s.length} entries`),s.length>0&&console.log(`Sample: ${s[0][0]} = ${s[0][1]}`));for(let[o,a]of s){let c=o.replace(this.normalizedRealmUrl,""),l;try{l=decodeURIComponent(c)}catch{l=c}this.shouldIgnoreRemoteFile(l)||e.set(l,a)}}else process.env.DEBUG&&console.log("No mtimes in response:",JSON.stringify(n).slice(0,200))}catch(t){console.warn("Could not fetch remote mtimes, will upload all files:",t)}return e}async getLocalFileListWithMtimes(e=""){let t=new Map,r=V.join(this.options.localDir,e),n;try{n=await D.readdir(r,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return t;throw o}let s=await Promise.all(n.map(async o=>{let a=V.join(r,o.name),c=e?V.posix.join(e,o.name):o.name;if(o.isDirectory()&&Il.has(o.name))return[];if(await this.shouldIgnoreFile(c,a))return[];if(o.isFile()){let l=await D.stat(a);return[[c,{path:a,mtime:l.mtimeMs}]]}else if(o.isDirectory()){let l=await this.getLocalFileListWithMtimes(c);return Array.from(l.entries())}return[]}));for(let o of s)for(let[a,c]of o)t.set(a,c);return t}async getLocalFileList(e=""){let t=new Map,r=V.join(this.options.localDir,e),n;try{n=await D.readdir(r,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return t;throw o}let s=await Promise.all(n.map(async o=>{let a=V.join(r,o.name),c=e?V.posix.join(e,o.name):o.name;if(o.isDirectory()&&Il.has(o.name))return[];if(await this.shouldIgnoreFile(c,a))return[];if(o.isFile())return[[c,a]];if(o.isDirectory()){let l=await this.getLocalFileList(c);return Array.from(l.entries())}return[]}));for(let o of s)for(let[a,c]of o)t.set(a,c);return t}async uploadFile(e,t){if(F(e)){console.log(` Skipped (protected): ${e}`);return}if(console.log(`Uploading: ${e}`),this.options.dryRun){console.log(`[DRY RUN] Would upload ${e}`);return}if(ve(e)){await this.uploadBinaryFile(e,t),console.log(` Uploaded: ${e}`);return}let r=await D.readFile(t,"utf8"),n=this.buildFileUrl(e),s=await this.authenticator.authedRealmFetch(n,{method:"POST",headers:{"Content-Type":"text/plain;charset=UTF-8",Accept:Ke.CardSource},body:r});s.ok||await Ml(s,e),console.log(` Uploaded: ${e}`)}async uploadBinaryFile(e,t){let r=await D.readFile(t),n=this.buildFileUrl(e),s=await this.authenticator.authedRealmFetch(n,{method:"POST",headers:{"Content-Type":Ke.OctetStream},body:r});s.ok||await Ml(s,e)}async uploadFilesAtomic(e,t){let r=Array.from(e.entries()).filter(([l])=>!F(l));if(r.length===0)return{succeeded:[]};if(this.options.dryRun){for(let[l]of r)console.log(`[DRY RUN] Would upload ${l}`);return{succeeded:[]}}let n=[],s=[];for(let l of r)ve(l[0])?s.push(l):n.push(l);let[o,a]=await Promise.all([this.uploadBinaryBatch(s),this.uploadTextAtomic(n,t)]),c=[...a.succeeded,...o.succeeded];return a.fatal?{succeeded:c,error:{status:a.fatal.status,perFile:[...a.failed,...o.failed],message:a.fatal.message}}:o.failed.length>0?{succeeded:c,error:{status:o.failed[0].status,perFile:o.failed,message:`Binary upload failed for ${o.failed.length} file(s)`}}:{succeeded:c}}async uploadBinaryBatch(e){if(e.length===0)return{succeeded:[],failed:[]};let t=await Promise.allSettled(e.map(([s,o])=>this.remoteLimit(async()=>{try{return await this.uploadBinaryFile(s,o),console.log(` Uploaded: ${s}`),{relativePath:s,ok:!0}}catch(a){let c=a,l=typeof c?.status=="number"?c.status:500,p=a instanceof Error?a.message:String(a);return{relativePath:s,ok:!1,status:l,title:p}}}))),r=[],n=[];for(let s=0;s<t.length;s++){let o=t[s];o.status==="fulfilled"?o.value.ok?r.push(o.value.relativePath):n.push({path:o.value.relativePath,status:o.value.status,title:o.value.title}):n.push({path:e[s][0],status:500,title:String(o.reason)})}return{succeeded:r,failed:n}}async uploadTextAtomic(e,t){if(e.length===0)return{succeeded:[],failed:[]};let r=await Promise.all(e.map(async([l,p])=>{let u=await D.readFile(p,"utf8");return{op:t.has(l)?"add":"update",href:this.buildFileUrl(l),data:{type:"source",attributes:{content:u},meta:{}}}})),n=this.options.waitForIndex?`${this.normalizedRealmUrl}_atomic?waitForIndex=true`:`${this.normalizedRealmUrl}_atomic`,s=await this.authenticator.authedRealmFetch(n,{method:"POST",headers:{"Content-Type":"application/vnd.api+json",Accept:"application/vnd.api+json"},body:JSON.stringify({"atomic:operations":r})}),o=new Map(e.map(([l])=>[this.buildFileUrl(l),l]));if(s.status===201){let p=((await s.json())["atomic:results"]??[]).map(u=>u.data?.id).filter(u=>typeof u=="string").map(u=>jl(u)).map(u=>o.get(u)??u);for(let u of p)console.log(` Uploaded: ${u}`);return{succeeded:p,failed:[]}}let a={};try{a=await s.json()}catch{}let c=(a.errors??[]).map(l=>{let u=(l.detail??"").match(/Resource (\S+) /),d=u?jl(u[1]):"";return{path:o.get(d)??d,status:l.status??s.status,title:l.title??"Error"}});return{succeeded:[],failed:c,fatal:{status:s.status,message:`Atomic upload failed: ${s.status} ${s.statusText}`}}}async downloadFile(e,t){if(console.log(`Downloading: ${e}`),this.options.dryRun){console.log(`[DRY RUN] Would download ${e}`);return}let r=this.buildFileUrl(e),n=await this.authenticator.authedRealmFetch(r,{headers:{Accept:Ke.CardSource}});if(!n.ok)throw new Error(`Failed to download: ${n.status} ${n.statusText}`);let s=V.dirname(t);if(await D.mkdir(s,{recursive:!0}),ve(e)){let o=Buffer.from(await n.arrayBuffer());await D.writeFile(t,o)}else{let o=await n.text();await D.writeFile(t,o,"utf8")}console.log(` Downloaded: ${e}`)}async deleteFile(e){if(F(e)){console.log(` Skipped (protected): ${e}`);return}if(console.log(`Deleting remote: ${e}`),this.options.dryRun){console.log(`[DRY RUN] Would delete ${e}`);return}let t=this.buildFileUrl(e),r=Date.now(),n;try{n=await this.authenticator.authedRealmFetch(t,{method:"DELETE",headers:{Accept:Ke.CardSource},signal:AbortSignal.timeout(fn)})}catch(o){let a=Date.now()-r;if(console.error(` Delete request failed after ${a}ms: ${e}`),o instanceof Error&&(o.name==="TimeoutError"||o.name==="AbortError")){if(await this.verifyDeleteApplied(e)===!0){console.warn(` Delete response timed out after ${fn}ms, but ${e} is already gone on the realm; continuing`);return}throw new Error(`Timed out deleting ${e} after ${fn}ms`,{cause:o})}throw o}let s=Date.now()-r;if(console.log(` Delete response for ${e}: ${n.status} ${n.statusText} (${s}ms)`),!n.ok&&n.status!==404)throw new Error(`Failed to delete: ${n.status} ${n.statusText}`);console.log(` Deleted: ${e}`)}async verifyDeleteApplied(e){let t=this.buildFileUrl(e);try{let r=await this.authenticator.authedRealmFetch(t,{headers:{Accept:Ke.CardSource},signal:AbortSignal.timeout(nb)});return console.warn(` Delete-timeout probe for ${e}: ${r.status} ${r.statusText}`),r.status===404}catch(r){return console.warn(` Delete-timeout probe failed for ${e}:`,r),"unknown"}}async deleteLocalFile(e){if(console.log(`Deleting local: ${e}`),this.options.dryRun){console.log(`[DRY RUN] Would delete local file ${e}`);return}try{await D.unlink(e),console.log(` Deleted: ${e}`)}catch(t){if(t.code!=="ENOENT")throw t}}getIgnoreInstance(e){let t=this.ignoreCache.get(e);if(t)return t;let r=(async()=>{let n=ib(),s=e,o=this.options.localDir;for(;s.startsWith(o);){let a=V.join(s,".gitignore");if(await Ll(a))try{let p=await D.readFile(a,"utf8");n.add(p)}catch(p){console.warn(`Warning: Could not read .gitignore file at ${a}:`,p)}let c=V.join(s,".boxelignore");if(await Ll(c))try{let p=await D.readFile(c,"utf8");n.add(p)}catch(p){console.warn(`Warning: Could not read .boxelignore file at ${c}:`,p)}let l=V.dirname(s);if(l===s)break;s=l}return n})();return this.ignoreCache.set(e,r),r}async shouldIgnoreFile(e,t){let r=V.basename(e);if(r===".boxel-sync.json"||r.startsWith("."))return!0;let n=V.dirname(t),s=await this.getIgnoreInstance(n),o=e.replace(/\\/g,"/");return s.ignores(o)}shouldIgnoreRemoteFile(e){return!!V.basename(e).startsWith(".")}};async function gn(i){try{return await X.access(i),!0}catch{return!1}}var q=class{workspaceDir;gitDir;constructor(e){this.workspaceDir=B.resolve(e),this.gitDir=B.join(this.workspaceDir,".boxel-history")}async init(){await gn(this.gitDir)||await X.mkdir(this.gitDir,{recursive:!0});let e=B.join(this.gitDir,".git");await gn(e)||(await this.git("init"),await this.git("config","user.email","boxel-cli@local"),await this.git("config","user.name","Boxel CLI"),await this.git("commit","--allow-empty","-m","[init] Initialize checkpoint history"))}async isInitialized(){return gn(B.join(this.gitDir,".git"))}async syncFilesToHistory(){let e=await this.getWorkspaceFiles(),t=new Set(e),r=await this.getHistoryFiles();await Promise.all(r.map(async n=>{if(!t.has(n)){let s=B.join(this.gitDir,n);try{await X.unlink(s)}catch(o){if(o.code!=="ENOENT")throw o}}})),await Promise.all(e.map(async n=>{let s=B.join(this.workspaceDir,n),o=B.join(this.gitDir,n),a=B.dirname(o);await X.mkdir(a,{recursive:!0}),await X.copyFile(s,o)}))}async getWorkspaceFiles(){let e=[],t=async(r,n="")=>{let s;try{s=await X.readdir(r,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return;throw o}await Promise.all(s.map(async o=>{if(o.name===".boxel-history"||o.name===".boxel-sync.json"||o.name==="node_modules"||o.name.startsWith("."))return;let a=n?`${n}/${o.name}`:o.name;o.isDirectory()?await t(B.join(r,o.name),a):e.push(a)}))};return await t(this.workspaceDir),e}async getHistoryFiles(){let e=[],t=async(r,n="")=>{let s;try{s=await X.readdir(r,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return;throw o}await Promise.all(s.map(async o=>{if(o.name===".git")return;let a=n?`${n}/${o.name}`:o.name;o.isDirectory()?await t(B.join(r,o.name),a):e.push(a)}))};return await t(this.gitDir),e}async detectCurrentChanges(){if(!await this.isInitialized())return(await this.getWorkspaceFiles()).map(n=>({file:n,status:"added"}));await this.syncFilesToHistory();let e=(await this.git("status","--porcelain")).replace(/\n+$/,"");if(!e)return[];let t=[];for(let r of e.split(`
|
|
74
|
+
Did you mean "${e}/"?`),t.href.replace(/\/+$/,"")+"/"}catch{throw new Error(`Invalid workspace URL: ${e}`)}}buildDirectoryUrl(e=""){if(!e)return this.normalizedRealmUrl;let t=e.replace(/^\/+|\/+$/g,"");return`${this.normalizedRealmUrl}${t}/`}buildFileUrl(e){let t=e.replace(/^\/+/,"");return`${this.normalizedRealmUrl}${t}`}async getRemoteFileList(e=""){let t=new Map;try{let r=this.buildDirectoryUrl(e),n=await this.remoteLimit(()=>this.authenticator.authedRealmFetch(r,{headers:{Accept:"application/vnd.api+json"}}));if(!n.ok){if(n.status===404)return t;throw n.status===401||n.status===403?new Error(`Authentication failed (${n.status}): Cannot access workspace. Check your Matrix credentials and workspace permissions.`):new Error(`Failed to get directory listing: ${n.status} ${n.statusText}`)}let s=await n.json();if(s.data&&s.data.relationships){let o=Object.entries(s.data.relationships),a=await Promise.all(o.map(([c,l])=>{let u=l.meta.kind==="file",f=e?z.posix.join(e,c):c;return u?this.shouldIgnoreRemoteFile(f)?[]:[[f,!0]]:(async()=>{let d=await this.getRemoteFileList(f);return Array.from(d.entries())})()}));for(let c of a)for(let[l,p]of c)t.set(l,p)}}catch(r){throw r instanceof Error&&(r.message.includes("Authentication failed")||r.message.includes("Cannot access workspace")||r.message.includes("401")||r.message.includes("403"))||console.error(`Error reading remote directory ${e}:`,r),r}return t}async getRemoteMtimes(){let e=new Map;try{let t=`${this.normalizedRealmUrl}_mtimes`,r=await this.authenticator.authedRealmFetch(t,{headers:{Accept:et.Mtimes}});if(!r.ok){if(r.status===404)return console.log("Note: _mtimes endpoint not available, will upload all files"),e;throw new Error(`Failed to get mtimes: ${r.status} ${r.statusText}`)}let n=await r.json();if(n.data?.attributes?.mtimes){let s=Object.entries(n.data.attributes.mtimes);process.env.DEBUG&&(console.log(`Remote mtimes received: ${s.length} entries`),s.length>0&&console.log(`Sample: ${s[0][0]} = ${s[0][1]}`));for(let[o,a]of s){let c=o.replace(this.normalizedRealmUrl,""),l;try{l=decodeURIComponent(c)}catch{l=c}this.shouldIgnoreRemoteFile(l)||e.set(l,a)}}else process.env.DEBUG&&console.log("No mtimes in response:",JSON.stringify(n).slice(0,200))}catch(t){console.warn("Could not fetch remote mtimes, will upload all files:",t)}return e}async getLocalFileListWithMtimes(e=""){let t=new Map,r=z.join(this.options.localDir,e),n;try{n=await q.readdir(r,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return t;throw o}let s=await Promise.all(n.map(async o=>{let a=z.join(r,o.name),c=e?z.posix.join(e,o.name):o.name;if(o.isDirectory()&&Fl.has(o.name))return[];if(await this.shouldIgnoreFile(c,a))return[];if(o.isFile()){let l=await q.stat(a);return[[c,{path:a,mtime:l.mtimeMs}]]}else if(o.isDirectory()){let l=await this.getLocalFileListWithMtimes(c);return Array.from(l.entries())}return[]}));for(let o of s)for(let[a,c]of o)t.set(a,c);return t}async getLocalFileList(e=""){let t=new Map,r=z.join(this.options.localDir,e),n;try{n=await q.readdir(r,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return t;throw o}let s=await Promise.all(n.map(async o=>{let a=z.join(r,o.name),c=e?z.posix.join(e,o.name):o.name;if(o.isDirectory()&&Fl.has(o.name))return[];if(await this.shouldIgnoreFile(c,a))return[];if(o.isFile())return[[c,a]];if(o.isDirectory()){let l=await this.getLocalFileList(c);return Array.from(l.entries())}return[]}));for(let o of s)for(let[a,c]of o)t.set(a,c);return t}async uploadFile(e,t){if(U(e)){console.log(` Skipped (protected): ${e}`);return}if(console.log(`Uploading: ${e}`),this.options.dryRun){console.log(`[DRY RUN] Would upload ${e}`);return}if(be(e)){await this.uploadBinaryFile(e,t),console.log(` Uploaded: ${e}`);return}let r=await q.readFile(t,"utf8"),n=this.buildFileUrl(e),s=await this.authenticator.authedRealmFetch(n,{method:"POST",headers:{"Content-Type":"text/plain;charset=UTF-8",Accept:et.CardSource},body:r});s.ok||await Nl(s,e),console.log(` Uploaded: ${e}`)}async uploadBinaryFile(e,t){let r=await q.readFile(t),n=this.buildFileUrl(e),s=await this.authenticator.authedRealmFetch(n,{method:"POST",headers:{"Content-Type":et.OctetStream},body:r});s.ok||await Nl(s,e)}async uploadFilesAtomic(e,t){let r=Array.from(e.entries()).filter(([l])=>!U(l));if(r.length===0)return{succeeded:[]};if(this.options.dryRun){for(let[l]of r)console.log(`[DRY RUN] Would upload ${l}`);return{succeeded:[]}}let n=[],s=[];for(let l of r)be(l[0])?s.push(l):n.push(l);let[o,a]=await Promise.all([this.uploadBinaryBatch(s),this.uploadTextAtomic(n,t)]),c=[...a.succeeded,...o.succeeded];return a.fatal?{succeeded:c,error:{status:a.fatal.status,perFile:[...a.failed,...o.failed],message:a.fatal.message}}:o.failed.length>0?{succeeded:c,error:{status:o.failed[0].status,perFile:o.failed,message:`Binary upload failed for ${o.failed.length} file(s)`}}:{succeeded:c}}async uploadBinaryBatch(e){if(e.length===0)return{succeeded:[],failed:[]};let t=await Promise.allSettled(e.map(([s,o])=>this.remoteLimit(async()=>{try{return await this.uploadBinaryFile(s,o),console.log(` Uploaded: ${s}`),{relativePath:s,ok:!0}}catch(a){let c=a,l=typeof c?.status=="number"?c.status:500,p=a instanceof Error?a.message:String(a);return{relativePath:s,ok:!1,status:l,title:p}}}))),r=[],n=[];for(let s=0;s<t.length;s++){let o=t[s];o.status==="fulfilled"?o.value.ok?r.push(o.value.relativePath):n.push({path:o.value.relativePath,status:o.value.status,title:o.value.title}):n.push({path:e[s][0],status:500,title:String(o.reason)})}return{succeeded:r,failed:n}}async uploadTextAtomic(e,t){if(e.length===0)return{succeeded:[],failed:[]};let r=await Promise.all(e.map(async([l,p])=>{let u=await q.readFile(p,"utf8");return{op:t.has(l)?"add":"update",href:this.buildFileUrl(l),data:{type:"source",attributes:{content:u},meta:{}}}})),n=this.options.waitForIndex?`${this.normalizedRealmUrl}_atomic?waitForIndex=true`:`${this.normalizedRealmUrl}_atomic`,s=await this.authenticator.authedRealmFetch(n,{method:"POST",headers:{"Content-Type":"application/vnd.api+json",Accept:"application/vnd.api+json"},body:JSON.stringify({"atomic:operations":r})}),o=new Map(e.map(([l])=>[this.buildFileUrl(l),l]));if(s.status===201){let p=((await s.json())["atomic:results"]??[]).map(u=>u.data?.id).filter(u=>typeof u=="string").map(u=>Il(u)).map(u=>o.get(u)??u);for(let u of p)console.log(` Uploaded: ${u}`);return{succeeded:p,failed:[]}}let a={};try{a=await s.json()}catch{}let c=(a.errors??[]).map(l=>{let u=(l.detail??"").match(/Resource (\S+) /),f=u?Il(u[1]):"";return{path:o.get(f)??f,status:l.status??s.status,title:l.title??"Error"}});return{succeeded:[],failed:c,fatal:{status:s.status,message:`Atomic upload failed: ${s.status} ${s.statusText}`}}}async downloadFile(e,t){if(console.log(`Downloading: ${e}`),this.options.dryRun){console.log(`[DRY RUN] Would download ${e}`);return}let r=this.buildFileUrl(e),n=await this.authenticator.authedRealmFetch(r,{headers:{Accept:et.CardSource}});if(!n.ok)throw new Error(`Failed to download: ${n.status} ${n.statusText}`);let s=z.dirname(t);if(await q.mkdir(s,{recursive:!0}),be(e)){let o=Buffer.from(await n.arrayBuffer());await q.writeFile(t,o)}else{let o=await n.text();await q.writeFile(t,o,"utf8")}console.log(` Downloaded: ${e}`)}async deleteFile(e){if(U(e)){console.log(` Skipped (protected): ${e}`);return}if(console.log(`Deleting remote: ${e}`),this.options.dryRun){console.log(`[DRY RUN] Would delete ${e}`);return}let t=this.buildFileUrl(e),r=Date.now(),n;try{n=await this.authenticator.authedRealmFetch(t,{method:"DELETE",headers:{Accept:et.CardSource},signal:AbortSignal.timeout(hn)})}catch(o){let a=Date.now()-r;if(console.error(` Delete request failed after ${a}ms: ${e}`),o instanceof Error&&(o.name==="TimeoutError"||o.name==="AbortError")){if(await this.verifyDeleteApplied(e)===!0){console.warn(` Delete response timed out after ${hn}ms, but ${e} is already gone on the realm; continuing`);return}throw new Error(`Timed out deleting ${e} after ${hn}ms`,{cause:o})}throw o}let s=Date.now()-r;if(console.log(` Delete response for ${e}: ${n.status} ${n.statusText} (${s}ms)`),!n.ok&&n.status!==404)throw new Error(`Failed to delete: ${n.status} ${n.statusText}`);console.log(` Deleted: ${e}`)}async verifyDeleteApplied(e){let t=this.buildFileUrl(e);try{let r=await this.authenticator.authedRealmFetch(t,{headers:{Accept:et.CardSource},signal:AbortSignal.timeout(fb)});return console.warn(` Delete-timeout probe for ${e}: ${r.status} ${r.statusText}`),r.status===404}catch(r){return console.warn(` Delete-timeout probe failed for ${e}:`,r),"unknown"}}async deleteLocalFile(e){if(console.log(`Deleting local: ${e}`),this.options.dryRun){console.log(`[DRY RUN] Would delete local file ${e}`);return}try{await q.unlink(e),console.log(` Deleted: ${e}`)}catch(t){if(t.code!=="ENOENT")throw t}}getIgnoreInstance(e){let t=this.ignoreCache.get(e);if(t)return t;let r=(async()=>{let n=mb(),s=e,o=this.options.localDir;for(;s.startsWith(o);){let a=z.join(s,".gitignore");if(await Ml(a))try{let p=await q.readFile(a,"utf8");n.add(p)}catch(p){console.warn(`Warning: Could not read .gitignore file at ${a}:`,p)}let c=z.join(s,".boxelignore");if(await Ml(c))try{let p=await q.readFile(c,"utf8");n.add(p)}catch(p){console.warn(`Warning: Could not read .boxelignore file at ${c}:`,p)}let l=z.dirname(s);if(l===s)break;s=l}return n})();return this.ignoreCache.set(e,r),r}async shouldIgnoreFile(e,t){let r=z.basename(e);if(r===".boxel-sync.json"||r.startsWith("."))return!0;let n=z.dirname(t),s=await this.getIgnoreInstance(n),o=e.replace(/\\/g,"/");return s.ignores(o)}shouldIgnoreRemoteFile(e){return!!z.basename(e).startsWith(".")}};async function xn(i){try{return await K.access(i),!0}catch{return!1}}var H=class{workspaceDir;gitDir;constructor(e){this.workspaceDir=Y.resolve(e),this.gitDir=Y.join(this.workspaceDir,".boxel-history")}async init(){await xn(this.gitDir)||await K.mkdir(this.gitDir,{recursive:!0});let e=Y.join(this.gitDir,".git");await xn(e)||(await this.git("init"),await this.git("config","user.email","boxel-cli@local"),await this.git("config","user.name","Boxel CLI"),await this.git("commit","--allow-empty","-m","[init] Initialize checkpoint history"))}async isInitialized(){return xn(Y.join(this.gitDir,".git"))}async syncFilesToHistory(){let e=await this.getWorkspaceFiles(),t=new Set(e),r=await this.getHistoryFiles();await Promise.all(r.map(async n=>{if(!t.has(n)){let s=Y.join(this.gitDir,n);try{await K.unlink(s)}catch(o){if(o.code!=="ENOENT")throw o}}})),await Promise.all(e.map(async n=>{let s=Y.join(this.workspaceDir,n),o=Y.join(this.gitDir,n),a=Y.dirname(o);await K.mkdir(a,{recursive:!0}),await K.copyFile(s,o)}))}async getWorkspaceFiles(){let e=[],t=async(r,n="")=>{let s;try{s=await K.readdir(r,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return;throw o}await Promise.all(s.map(async o=>{if(o.name===".boxel-history"||o.name===".boxel-sync.json"||o.name==="node_modules"||o.name.startsWith("."))return;let a=n?`${n}/${o.name}`:o.name;o.isDirectory()?await t(Y.join(r,o.name),a):e.push(a)}))};return await t(this.workspaceDir),e}async getHistoryFiles(){let e=[],t=async(r,n="")=>{let s;try{s=await K.readdir(r,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return;throw o}await Promise.all(s.map(async o=>{if(o.name===".git")return;let a=n?`${n}/${o.name}`:o.name;o.isDirectory()?await t(Y.join(r,o.name),a):e.push(a)}))};return await t(this.gitDir),e}async detectCurrentChanges(){if(!await this.isInitialized())return(await this.getWorkspaceFiles()).map(n=>({file:n,status:"added"}));await this.syncFilesToHistory();let e=(await this.git("status","--porcelain")).replace(/\n+$/,"");if(!e)return[];let t=[];for(let r of e.split(`
|
|
75
75
|
`)){if(!r)continue;let n=r.substring(0,2),s=r.substring(3);if(n.includes("R")){let o=s.indexOf(" -> ");if(o!==-1){let a=s.substring(0,o),c=s.substring(o+4);t.push({file:a,status:"deleted"}),t.push({file:c,status:"added"});continue}}n.includes("D")?t.push({file:s,status:"deleted"}):n.includes("A")||n.includes("C")||n==="??"?t.push({file:s,status:"added"}):(n.includes("M")||n.includes("U")||n.includes("T"))&&t.push({file:s,status:"modified"})}return t}async createCheckpoint(e,t,r){if(await this.isInitialized()||await this.init(),await this.syncFilesToHistory(),await this.git("add","-A"),!(await this.git("status","--porcelain")).trim())return null;let s=this.classifyChanges(t),{message:o,description:a}=r?{message:r,description:""}:this.generateCommitMessage(e,t,s),c=s?"[MAJOR]":"[minor]",l=`[${e}]`,p=`${c} ${l} ${o}${a?`
|
|
76
76
|
|
|
77
|
-
`+a:""}`;await this.git("commit","-m",p);let u=(await this.git("rev-parse","HEAD")).trim(),
|
|
77
|
+
`+a:""}`;await this.git("commit","-m",p);let u=(await this.git("rev-parse","HEAD")).trim(),f=u.substring(0,7);return{hash:u,shortHash:f,message:o,description:a,date:new Date,isMajor:s,filesChanged:t.length,insertions:0,deletions:0,source:e,isMilestone:!1}}classifyChanges(e){if(e.length>3)return!0;for(let t of e)if(t.status==="added"||t.status==="deleted"||t.file.endsWith(".gts"))return!0;return!1}generateCommitMessage(e,t,r){let n=e==="local"?"Push":e==="remote"?"Pull":"Manual";if(t.length===0)return{message:`${n}: No changes detected`,description:""};if(t.length===1){let u=t[0],f=u.status==="added"?"Add":u.status==="deleted"?"Delete":"Update";return{message:`${n}: ${f} ${u.file}`,description:""}}let s=t.filter(u=>u.status==="added"),o=t.filter(u=>u.status==="modified"),a=t.filter(u=>u.status==="deleted"),c=[];s.length>0&&c.push(`+${s.length}`),o.length>0&&c.push(`~${o.length}`),a.length>0&&c.push(`-${a.length}`);let l=`${n}: ${t.length} files (${c.join(", ")})`,p=[];return s.length>0&&(p.push("Added:"),s.forEach(u=>p.push(` + ${u.file}`))),o.length>0&&(p.push("Modified:"),o.forEach(u=>p.push(` ~ ${u.file}`))),a.length>0&&(p.push("Deleted:"),a.forEach(u=>p.push(` - ${u.file}`))),{message:l,description:p.join(`
|
|
78
78
|
`)}}async getCheckpoints(e=50){if(!await this.isInitialized())return[];let r=await this.git("log","--format=%H|%h|%s|%aI|%an",`-${e}`);if(!r.trim())return[];let n=await this.getAllMilestones(),s=r.trim().split(`
|
|
79
|
-
`).filter(o=>!(o.split("|")[2]??"").startsWith("[init]"));return Promise.all(s.map(o=>this.parseCheckpointLine(o,n)))}async parseCheckpointLine(e,t){let[r,n,s,o]=e.split("|"),a=s.includes("[MAJOR]"),c=s.includes("[local]")?"local":s.includes("[remote]")?"remote":"manual",l=s.replace(/\[(MAJOR|minor)\]\s*/i,"").replace(/\[(local|remote|manual)\]\s*/i,""),p=await this.getCommitStats(r),u=t.get(r),
|
|
79
|
+
`).filter(o=>!(o.split("|")[2]??"").startsWith("[init]"));return Promise.all(s.map(o=>this.parseCheckpointLine(o,n)))}async parseCheckpointLine(e,t){let[r,n,s,o]=e.split("|"),a=s.includes("[MAJOR]"),c=s.includes("[local]")?"local":s.includes("[remote]")?"remote":"manual",l=s.replace(/\[(MAJOR|minor)\]\s*/i,"").replace(/\[(local|remote|manual)\]\s*/i,""),p=await this.getCommitStats(r),u=t.get(r),f=!!u;return{hash:r,shortHash:n,message:l,description:"",date:new Date(o),isMajor:a,source:c,isMilestone:f,milestoneName:u,...p}}async getCommitStats(e){try{let r=(await this.git("show","--stat","--format=",e)).trim().split(`
|
|
80
80
|
`),n=r[r.length-1]||"",s=n.match(/(\d+) files? changed/),o=n.match(/(\d+) insertions?/),a=n.match(/(\d+) deletions?/);return{filesChanged:s?parseInt(s[1]):0,insertions:o?parseInt(o[1]):0,deletions:a?parseInt(a[1]):0}}catch{return{filesChanged:0,insertions:0,deletions:0}}}async getChangedFiles(e){return(await this.git("show","--name-only","--format=",e)).trim().split(`
|
|
81
|
-
`).filter(Boolean)}async getDiff(e){return this.git("show","--format=",e)}async restore(e){let t=await this.getHistoryFiles();await Promise.all(t.map(async o=>{let a=
|
|
81
|
+
`).filter(Boolean)}async getDiff(e){return this.git("show","--format=",e)}async restore(e){let t=await this.getHistoryFiles();await Promise.all(t.map(async o=>{let a=Y.join(this.gitDir,o);try{await K.unlink(a)}catch(c){if(c.code!=="ENOENT")throw c}})),await this.git("checkout",e,"--",".");let r=await this.getHistoryFiles(),n=new Set(r),s=await this.getWorkspaceFiles();await Promise.all(s.map(async o=>{if(!U(o)&&!n.has(o)){let a=Y.join(this.workspaceDir,o);try{await K.unlink(a)}catch(c){if(c.code!=="ENOENT")throw c}}})),await Promise.all(r.map(async o=>{if(U(o))return;let a=Y.join(this.gitDir,o),c=Y.join(this.workspaceDir,o),l=Y.dirname(c);await K.mkdir(l,{recursive:!0}),await K.copyFile(a,c)})),await this.git("checkout","HEAD","--",".")}async markMilestone(e,t){if(!await this.isInitialized())return null;let r;if(typeof e=="number"){let s=await this.getCheckpoints(e+1);if(e<1||e>s.length)return null;r=s[e-1].hash}else r=e;let n=`milestone/${t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9\-_.]/g,"")}`;try{return await this.git("tag","-a",n,r,"-m",`Milestone: ${t}`),{hash:r,name:t}}catch{return null}}async unmarkMilestone(e){if(!await this.isInitialized())return!1;let t;if(typeof e=="number"){let n=await this.getCheckpoints(e+1);if(e<1||e>n.length)return!1;t=n[e-1].hash}else t=e;let r=await this.getMilestoneTags(t);if(r.length===0)return!1;for(let n of r)try{await this.git("tag","-d",n)}catch{}return!0}async getMilestoneTags(e){try{return(await this.git("tag","--points-at",e)).trim().split(`
|
|
82
82
|
`).filter(r=>r.startsWith("milestone/")).filter(Boolean)}catch{return[]}}async getAllMilestones(){let e=new Map;try{let t=await this.git("tag","-l","milestone/*");for(let r of t.trim().split(`
|
|
83
83
|
`).filter(Boolean))try{let n=(await this.git("rev-list","-1",r)).trim(),s=r.replace("milestone/","").replace(/-/g," ");e.set(n,s)}catch{}}catch{}return e}async getMilestones(){if(!await this.isInitialized())return[];let e=await this.getAllMilestones();if(e.size===0)return[];let r=await this.git("log","--no-walk","--format=%H|%h|%s|%aI|%an",...e.keys());return r.trim()?Promise.all(r.trim().split(`
|
|
84
|
-
`).map(n=>this.parseCheckpointLine(n,e))):[]}git(...e){return new Promise((t,r)=>{let n=(0,
|
|
85
|
-
${
|
|
86
|
-
`);let r=String(i.length).length;i.forEach((n,s)=>{let o=s+1,a=`${
|
|
87
|
-
`)}),e&&console.log(`${
|
|
88
|
-
${
|
|
89
|
-
`);let c=await
|
|
84
|
+
`).map(n=>this.parseCheckpointLine(n,e))):[]}git(...e){return new Promise((t,r)=>{let n=(0,Ul.spawn)("git",e,{cwd:this.gitDir}),s="",o="";n.stdout.on("data",a=>{s+=a.toString("utf-8")}),n.stderr.on("data",a=>{o+=a.toString("utf-8")}),n.on("error",a=>r(a)),n.on("close",a=>{if(a!==0&&!e.includes("status")){r(new Error(`git ${e.join(" ")} failed: ${o}`));return}t(s)})})}};function Ri(i,e){let t=i.trim();if(t==="")return{kind:"none"};if(t.length===7){let n=e.filter(s=>s.shortHash===t);if(n.length===1)return{kind:"found",target:n[0]};if(n.length>1)return{kind:"ambiguous",matches:n}}if(/^\d+$/.test(t)){let n=parseInt(t,10);return n>=1&&n<=e.length?{kind:"found",target:e[n-1]}:{kind:"none"}}let r=e.filter(n=>n.hash.startsWith(t));return r.length===0?{kind:"none"}:r.length===1?{kind:"found",target:r[0]}:{kind:"ambiguous",matches:r}}var Dl=100;function $i(i){return i instanceof Error?i.message:String(i)}async function gb(i,e){if(!Rt.existsSync(i))return{ok:!1,error:`Directory not found: ${i}`};try{let t=new H(i);if(!await t.isInitialized())return{ok:!0,checkpoints:[],truncated:!1};let r=await t.getCheckpoints(e+1),n=r.length>e;return{ok:!0,checkpoints:n?r.slice(0,e):r,truncated:n}}catch(t){return{ok:!1,error:`Failed to read checkpoint history: ${$i(t)}`}}}async function xb(i,e){if(!Rt.existsSync(i))return{ok:!1,error:`Directory not found: ${i}`};let t=e.trim();if(!t)return{ok:!1,error:"--message must not be empty."};try{let r=new H(i);await r.isInitialized()||await r.init();let n=await r.detectCurrentChanges(),s=await r.createCheckpoint("manual",n,t);return s?{ok:!0,created:s}:{ok:!1,error:"No changes to checkpoint."}}catch(r){return{ok:!1,error:`Failed to create checkpoint: ${$i(r)}`}}}async function vb(i,e,t){if(!Rt.existsSync(i))return{ok:!1,error:`Directory not found: ${i}`};try{let r=new H(i);if(!await r.isInitialized())return{ok:!1,error:"No checkpoint history found for this workspace. Checkpoints are created automatically during sync operations."};let n=await r.getCheckpoints(t),s=Ri(e,n);if(s.kind==="none")return{ok:!1,error:`Checkpoint not found: ${e}. Use a number (1-${n.length}) or a commit hash.`};if(s.kind==="ambiguous"){let o=s.matches.slice(0,5).map(c=>c.shortHash).join(", "),a=s.matches.length>5?", \u2026":"";return{ok:!1,error:`Ambiguous reference: ${e} matches ${s.matches.length} checkpoints (${o}${a}). Use a longer prefix or full hash.`}}return{ok:!0,target:s.target}}catch(r){return{ok:!1,error:`Failed to read checkpoint history: ${$i(r)}`}}}async function bb(i,e){if(!Rt.existsSync(i))return{ok:!1,error:`Directory not found: ${i}`};try{let t=new H(i);return await t.isInitialized()?(await t.restore(e),{ok:!0}):{ok:!1,error:"No checkpoint history found for this workspace."}}catch(t){return{ok:!1,error:`Failed to restore checkpoint: ${$i(t)}`}}}function yb(i){return i==="local"?`${R}LOCAL${m}`:i==="remote"?`${_}SERVER${m}`:`${pe}MANUAL${m}`}function ql(i){let e=Date.now()-i.getTime(),t=Math.floor(e/6e4),r=Math.floor(t/60),n=Math.floor(r/24);return n>7?`${i.toLocaleDateString()} ${i.toLocaleTimeString()}`:n>0?`${n} day${n===1?"":"s"} ago`:r>0?`${r} hour${r===1?"":"s"} ago`:t>0?`${t} minute${t===1?"":"s"} ago`:"just now"}function wb(i,e,t){if(i.length===0){console.log("No checkpoints found.");return}console.log(`
|
|
85
|
+
${ie}Checkpoint History${m}
|
|
86
|
+
`);let r=String(i.length).length;i.forEach((n,s)=>{let o=s+1,a=`${x}${String(o).padStart(r," ")}${m}`,c=n.isMajor?`${L}[MAJOR]${m}`:`${x}[minor]${m}`,l=n.isMilestone?`${L}\u2B50${m} ${pe}[${n.milestoneName}]${m} `:"";console.log(`${a} ${L}${n.shortHash}${m} ${l}${yb(n.source)} ${c} ${n.message} ${x}(${n.filesChanged} files)${m}`),console.log(` ${x}${ql(n.date)}${m}
|
|
87
|
+
`)}),e&&console.log(`${x}Showing first ${t} checkpoints. Pass --limit <n> to see more.${m}`),console.log(`${x}Restore: boxel realm history <local-dir> -r <ref>${m}`)}function Eb(i){if(i===void 0)return Dl;if(!/^\d+$/.test(i))return null;let e=parseInt(i,10);return e>0?e:null}function De(i){console.error(`${g}Error:${m} ${i}`),process.exit(1)}function Hl(i){i.command("history").alias("hist").description("View, restore, or create local checkpoints stored under .boxel-history/").argument("<local-dir>","The local workspace directory").option("-r, --restore <ref>","Restore the workspace to a checkpoint (1-based index, short hash, or full hash)").option("-m, --message <message>","Create a manual checkpoint with the given message").option("-y, --yes","Skip the interactive confirmation prompt before --restore").option("--limit <n>",`Maximum number of checkpoints to list or consider for --restore (default: ${Dl})`).action(async(e,t)=>{t.restore!==void 0&&t.message!==void 0&&De("Only one of --restore or --message may be specified.");let r=Eb(t.limit);if(r===null&&De("--limit must be a positive integer."),t.message!==void 0){let s=await xb(e,t.message);s.ok||De(s.error),console.log(`${R}\u2713${m} Checkpoint created: ${L}${s.created.shortHash}${m} ${s.created.message}`);return}if(t.restore!==void 0){let s=await vb(e,t.restore,r);s.ok||De(s.error);let o=s.target;if(!t.yes){process.stdin.isTTY||De("--restore overwrites local files. Pass --yes to confirm in non-interactive mode."),console.log(`
|
|
88
|
+
${ie}Restoring to:${m} ${L}${o.shortHash}${m} - ${o.message}`),console.log(`${x}${ql(o.date)}${m}
|
|
89
|
+
`);let c=await re(`${L}This will overwrite current files. Continue? (y/N) ${m}`);if(!/^y/i.test(c)){console.log(`${x}Restore cancelled.${m}`);return}}let a=await bb(e,o.hash);a.ok||De(a.error),console.log(`${R}\u2713${m} Restored to ${L}${o.shortHash}${m} ${o.message}`),console.log(`${x}Run 'boxel realm sync <local-dir> <realm-url> --prefer-local' to push the restored state to the realm.${m}`);return}let n=await gb(e,r);n.ok||De(n.error),wb(n.checkpoints,n.truncated,r)})}var Rb="--all-accessible and --hidden are mutually exclusive";async function $b(i={}){if(i.allAccessible&&i.hidden)return{realms:[],error:Rb};let e=i.profileManager??C(),t=e.getActiveProfile();if(!t)return{realms:[],error:A};let r=t.profile.realmServerUrl.replace(/\/$/,""),n=await e.authedRealmServerFetch(`${r}/_realm-auth`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"}});if(!n.ok){let p=await n.text();return{realms:[],error:`Realm auth lookup failed: ${n.status} ${p}`}}let s=await n.json(),o=Object.keys(s).map(k),a;try{a=await e.getUserRealms()}catch(p){return{realms:[],error:`Failed to load UI realm list: ${p instanceof Error?p.message:String(p)}`}}let c=new Set(a.map(k)),l=o.map(p=>({url:p,hidden:!c.has(p)}));return i.allAccessible||(i.hidden?l=l.filter(p=>p.hidden):l=l.filter(p=>!p.hidden)),l.sort((p,u)=>p.url.localeCompare(u.url)),{realms:l}}function Wl(i){i.command("list").alias("ls").description("List realms accessible to the active profile").option("--json","Output JSON").option("--all-accessible","Show all accessible realms, including hidden ones").option("--hidden","Show only realms not in the user's UI realm list").action(async e=>{let t;try{t=await $b({allAccessible:e.allAccessible,hidden:e.hidden})}catch(r){console.error(`${g}Error:${m} ${r instanceof Error?r.message:String(r)}`),process.exit(1)}if(e.json){console.log(JSON.stringify(t,null,2)),t.error&&process.exit(1);return}if(t.error&&(console.error(`${g}Error:${m} ${t.error}`),process.exit(1)),t.realms.length===0){console.log(`${x}No realms found.${m}`);return}console.log(`${ie}${t.realms.length} realm(s):${m}`);for(let r of t.realms){let n=r.hidden?` ${x}(hidden)${m}`:"";console.log(` ${_}${r.url}${m}${n}`)}})}var Si=P(require("fs"));var vn=100;function _i(i){return i instanceof Error?i.message:String(i)}function kb(i){let e=Date.now()-i.getTime(),t=Math.floor(e/6e4),r=Math.floor(t/60),n=Math.floor(r/24);return n>7?`${i.toLocaleDateString()} ${i.toLocaleTimeString()}`:n>0?`${n} day${n===1?"":"s"} ago`:r>0?`${r} hour${r===1?"":"s"} ago`:t>0?`${t} minute${t===1?"":"s"} ago`:"just now"}async function Gl(i,e,t){try{let r=new H(i);if(!await r.isInitialized())return{ok:!1,error:"No checkpoint history found for this workspace. Checkpoints are created automatically during sync operations."};let n=await r.getCheckpoints(t),s=Ri(e,n);if(s.kind==="none")return{ok:!1,error:`Checkpoint not found: ${e}. Use a number (1-${n.length}) or a commit hash.`};if(s.kind==="ambiguous"){let o=s.matches.slice(0,5).map(c=>c.shortHash).join(", "),a=s.matches.length>5?", \u2026":"";return{ok:!1,error:`Ambiguous reference: ${e} matches ${s.matches.length} checkpoints (${o}${a}). Use a longer prefix or full hash.`}}return{ok:!0,target:s.target}}catch(r){return{ok:!1,error:`Failed to read checkpoints: ${_i(r)}`}}}async function Sb(i){if(!Si.existsSync(i))return{ok:!1,error:`Directory not found: ${i}`};try{let e=new H(i);return await e.isInitialized()?{ok:!0,milestones:await e.getMilestones()}:{ok:!0,milestones:[]}}catch(e){return{ok:!1,error:`Failed to read milestones: ${_i(e)}`}}}async function _b(i,e,t,r){if(!Si.existsSync(i))return{ok:!1,error:`Directory not found: ${i}`};let n=t.trim();if(!n)return{ok:!1,error:"--name must not be empty."};let s=await Gl(i,e,r);if(!s.ok)return s;try{let o=new H(i);if(!await o.markMilestone(s.target.hash,n))return{ok:!1,error:"Could not mark milestone. The checkpoint may already have one."};let l=(await o.getCheckpoints(r)).find(p=>p.hash===s.target.hash);return l?{ok:!0,marked:l}:{ok:!1,error:"Milestone created but checkpoint could not be re-read."}}catch(o){return{ok:!1,error:`Failed to mark milestone: ${_i(o)}`}}}async function Cb(i,e,t){if(!Si.existsSync(i))return{ok:!1,error:`Directory not found: ${i}`};let r=await Gl(i,e,t);if(!r.ok)return r;let n=r.target;if(!n.isMilestone)return{ok:!1,error:`Checkpoint ${n.shortHash} is not marked as a milestone.`};try{return{ok:!0,removed:await new H(i).unmarkMilestone(n.hash)}}catch(s){return{ok:!1,error:`Failed to remove milestone: ${_i(s)}`}}}async function Tb(i,e={}){if(e.mark!==void 0&&e.remove!==void 0)return{ok:!1,error:"Only one of --mark or --remove may be specified."};if(e.limit!==void 0&&(!Number.isInteger(e.limit)||e.limit<=0))return{ok:!1,error:"limit must be a positive integer."};let t=e.limit??vn;if(e.mark!==void 0){if(e.name===void 0)return{ok:!1,error:"--name is required when using --mark."};let n=await _b(i,e.mark,e.name,t);return n.ok?{ok:!0,marked:n.marked}:{ok:!1,error:n.error}}if(e.remove!==void 0){let n=await Cb(i,e.remove,t);return n.ok?{ok:!0,removed:n.removed}:{ok:!1,error:n.error}}let r=await Sb(i);return r.ok?{ok:!0,milestones:r.milestones}:{ok:!1,error:r.error}}function Ob(i,e){if(i.length===0){console.log(`
|
|
90
90
|
No milestones marked yet.
|
|
91
91
|
`),console.log(`Use ${_}boxel realm milestone <local-dir> --mark <ref> --name <name>${m} to mark a checkpoint.`),console.log(`Use ${_}boxel realm history <local-dir>${m} to see available checkpoints.
|
|
92
92
|
`);return}console.log(`
|
|
93
|
-
${
|
|
94
|
-
`);for(let t of i){let r=t.source==="local"?"\u2191":t.source==="remote"?"\u2193":"\u25CF",n=t.source==="local"?R:t.source==="remote"?_:
|
|
95
|
-
${R}\u2713${m} ${
|
|
96
|
-
Checkpoint created before deletion: ${l.shortHash}`)}let o=await Promise.all(Array.from(t.keys()).map(c=>this.remoteLimit(async()=>{try{let l=
|
|
93
|
+
${ie}Milestones${m} ${x}(${e})${m}
|
|
94
|
+
`);for(let t of i){let r=t.source==="local"?"\u2191":t.source==="remote"?"\u2193":"\u25CF",n=t.source==="local"?R:t.source==="remote"?_:pe;console.log(` ${L}\u2B50${m} ${L}${t.shortHash}${m} ${n}${r}${m} ${pe}[${t.milestoneName}]${m} ${t.message}`),console.log(` ${x}${kb(t.date)}${m}`)}console.log()}function Pb(i){if(i===void 0)return vn;if(!/^\d+$/.test(i))return null;let e=parseInt(i,10);return e>0?e:null}function ki(i){console.error(`${g}Error:${m} ${i}`),process.exit(1)}function Vl(i){i.command("milestone").description("List, mark, or remove milestones in the local .boxel-history/ checkpoint log").argument("<local-dir>","The local workspace directory").option("--mark <ref>","Mark a checkpoint as a milestone (1-based index, short hash, or full hash)").option("--name <name>","Name for the milestone (required with --mark)").option("--remove <ref>","Remove the milestone tag from a checkpoint (1-based index, short hash, or full hash)").option("--limit <n>",`Maximum number of checkpoints to consider for ref resolution (default: ${vn})`).option("--json","Output result as JSON").action(async(e,t)=>{t.mark!==void 0&&t.remove!==void 0&&ki("Only one of --mark or --remove may be specified.");let r=Pb(t.limit);r===null&&ki("--limit must be a positive integer."),t.mark!==void 0&&t.name===void 0&&ki("--name is required when using --mark.");let n=await Tb(e,{mark:t.mark,name:t.name,remove:t.remove,limit:r});if(t.json){I.output(JSON.stringify(n,null,2)),n.ok||process.exit(1);return}if(n.ok||ki(n.error),n.marked){let s=n.marked;console.log(`
|
|
95
|
+
${R}\u2713${m} ${L}\u2B50${m} Milestone created: ${pe}${s.milestoneName}${m}`),console.log(` Checkpoint: ${L}${s.shortHash}${m} ${s.message}`),console.log();return}if(n.removed!==void 0){console.log(`${R}\u2713${m} Milestone removed`);return}Ob(n.milestones,e)})}async function bn(i,e={}){let t=k(i),r=e.profileManager??C(),n=r.getActiveProfile();if(!n)return{publishedRealmURL:t,unpublished:!1,error:A};let s=n.profile.realmServerUrl.replace(/\/$/,""),o;try{o=await r.authedRealmServerFetch(`${s}/_unpublish-realm`,{method:"POST",headers:{Accept:"application/vnd.api+json","Content-Type":"application/json"},body:JSON.stringify({publishedRealmURL:t})})}catch(l){return{publishedRealmURL:t,unpublished:!1,error:`Failed to reach realm server: ${l instanceof Error?l.message:String(l)}`}}if(o.ok)return{publishedRealmURL:t,unpublished:!0};let a=await Ab(o);return o.status===404||o.status===422&&/not found/i.test(a)?e.tolerateMissing?{publishedRealmURL:t,unpublished:!1,notFound:!0}:{publishedRealmURL:t,unpublished:!1,notFound:!0,error:`Published realm ${t} is not currently published`}:{publishedRealmURL:t,unpublished:!1,error:`Realm server returned ${o.status}: ${a.slice(0,500)}`}}async function Ab(i){try{return await i.text()}catch{return"<no response body>"}}function Bl(i){i.command("unpublish").description("Unpublish a published realm by its public-facing URL").argument("<published-realm-url>","URL of the published realm to remove").option("--tolerate-missing","Exit successfully when the realm is already unpublished").action(async(e,t)=>{let r=await bn(e,{tolerateMissing:t.tolerateMissing===!0});if(r.error&&(console.error(`${g}Error:${m} ${r.error}`),process.exit(1)),r.notFound){console.log(`Already unpublished: ${_}${r.publishedRealmURL}${m}`);return}console.log(`${R}Unpublished:${m} ${_}${r.publishedRealmURL}${m}`)})}var Jl=3e5,Lb=1e3;async function jb(i,e,t={}){let r=t.profileManager??C(),n=r.getActiveProfile();if(!n)throw new Error(A);let s=k(i),o=k(e),a=n.profile.realmServerUrl.replace(/\/$/,""),c=await zl(r,a,s,o);if((c.status===400||c.status===409)&&t.republish!==!1){let f=await Yl(c);console.log(`Publish returned ${c.status} (${f.slice(0,200)}). Unpublishing and retrying.`);let d=await bn(o,{profileManager:r,tolerateMissing:!0});if(!d.unpublished&&!d.notFound)throw new Error(`Conflict on publish; unpublish-then-retry also failed: ${d.error??"unknown"}`);c=await zl(r,a,s,o)}if(c.status!==200&&c.status!==201&&c.status!==202){let f=await Yl(c);throw new Error(`Publish failed: HTTP ${c.status}: ${f.slice(0,1e3)}`)}let l=await c.json(),p=l?.data?.attributes;if(!p?.publishedRealmURL)throw new Error(`Publish response missing data.attributes.publishedRealmURL: ${JSON.stringify(l).slice(0,500)}`);let u={publishedRealmURL:k(p.publishedRealmURL),publishedRealmId:l.data.id,lastPublishedAt:p.lastPublishedAt,status:p.status};if(t.waitForReady!==!1){let f=t.timeoutMs??Jl,d;try{let h=await r.getOrRefreshServerToken();d=await r.fetchAndStoreRealmToken(u.publishedRealmURL,h)}catch{}await Mb(u.publishedRealmURL,d,f)}return u}async function zl(i,e,t,r){return i.authedRealmServerFetch(`${e}/_publish-realm`,{method:"POST",headers:{Accept:"application/vnd.api+json","Content-Type":"application/json"},body:JSON.stringify({sourceRealmURL:t,publishedRealmURL:r})})}async function Mb(i,e,t){let r=new URL("_readiness-check",i).href,n=Date.now(),s;for(;Date.now()-n<t;){try{let a={Accept:"application/vnd.api+json"};e&&(a.Authorization=e);let c=await fetch(r,{headers:a});if(c.ok)return;s=`HTTP ${c.status}`}catch(a){s=a instanceof Error?a.message:String(a)}let o=t-(Date.now()-n);if(o<=0)break;await new Promise(a=>setTimeout(a,Math.min(Lb,o)))}throw new Error(`Timed out after ${t}ms waiting for ${i} to pass readiness check${s?`: ${s}`:""}`)}async function Yl(i){try{return await i.text()}catch{return"<no response body>"}}function Ib(i){return{waitForReady:i.wait!==!1,timeoutMs:i.timeout,republish:i.republish!==!1}}function Xl(i){i.command("publish").description("Publish a source realm to a published-realm URL, polling readiness until ready").argument("<source-realm-url>","URL of the source realm to publish").argument("<published-realm-url>","Public-facing URL the published copy will serve at").option("--no-wait","Return as soon as the server accepts the publish").option("--timeout <ms>",`Readiness-poll timeout in milliseconds (default: ${Jl})`,Nb).option("--no-republish","Do not auto-unpublish + retry when the server returns 400/409").action(async(e,t,r)=>{try{let n=await jb(e,t,Ib(r));console.log(`${R}Published:${m} ${_}${n.publishedRealmURL}${m}`)}catch(n){console.error(`${g}Error:${m} ${n instanceof Error?n.message:String(n)}`),process.exit(1)}})}function Nb(i){let e=Number.parseInt(i,10);if(!Number.isFinite(e)||e<0||String(e)!==i.trim())throw new Error("--timeout must be a non-negative integer (milliseconds).");return e}var Kl=P(Hr()),Ql="realm_server";function Fb(i){let{hostname:e}=new URL(i);if(e==="localhost"||e.endsWith(".localhost"))return"localhost";let t=e.split(".");return t.length<=2?e:t.slice(-2).join(".")}function Ub(i,e=Ql){return`@${e}:${Fb(i)}`}function Db(i){return new URL(i).origin+"/"}function qb(i){try{return new URL(i).href.replace(/\/+$/,"")+"/"}catch{throw new Error(`Invalid realm URL: ${i}`)}}var Ci=class{#e;#t;#i;#n;#r=new Map;constructor(e){if(!e.seed)throw new Error("SeedAuthenticator requires a non-empty seed");this.#e=e.seed,this.#t=e.botUsername??Ql,this.#i=e.botUserId,this.#n=e.expiresIn??"7d"}buildClaims(e){let t=qb(e);return{user:this.#i??Ub(t,this.#t),realm:t,sessionRoom:void 0,permissions:[],realmServerURL:Db(t)}}mintTokenForRealm(e){let t=this.buildClaims(e),r=this.#r.get(t.realm);if(r)return r;let n=Kl.default.sign(t,this.#e,{expiresIn:this.#n});return this.#r.set(t.realm,n),n}#s(e){for(let s of this.#r.keys())if(e.startsWith(s))return s;let t=new URL(e),r=t.pathname.split("/").filter(Boolean),n=r.length>0?`/${r.slice(0,2).join("/")}/`:"/";return`${t.origin}${n}`}async authedRealmFetch(e,t){let r=e instanceof Request?e.url:e instanceof URL?e.href:e,n=this.#s(r),s=this.mintTokenForRealm(n),o=this.#o(e,t,s);return fetch(e,{...t,headers:o})}#o(e,t,r){let n=e instanceof Request?new Headers(e.headers):new Headers,s=new Headers(t?.headers);for(let[o,a]of s)n.set(o,a);return n.has("Authorization")||n.set("Authorization",r),n}registerRealmUrl(e){this.mintTokenForRealm(e)}};function ye(i){if(i.realmSecretSeed)try{let t=new Ci({seed:i.realmSecretSeed});return t.registerRealmUrl(i.realmUrl),{ok:!0,authenticator:t,mode:"seed"}}catch(t){return{ok:!1,error:t instanceof Error?t.message:String(t)}}let e=i.profileManager??C();return e.getActiveProfile()?{ok:!0,authenticator:e,mode:"profile"}:{ok:!1,error:A}}var Ti=P(require("fs/promises")),Zl=P(require("path")),yn=class extends ue{constructor(t,r){super(t,r);this.pullOptions=t}hasError=!1;downloadedFiles=[];async sync(){console.log(`Starting pull from ${this.options.realmUrl} to ${this.options.localDir}`),console.log("Testing realm access...");try{await this.getRemoteFileList("")}catch(c){throw console.error("Failed to access realm:",c),new Error("Cannot proceed with pull: Authentication or access failed. Please check your credentials and realm permissions.")}console.log("Realm access verified");let[t,r]=await Promise.all([this.getRemoteFileList(),this.getLocalFileList()]);if(console.log(`Found ${t.size} files in remote realm`),console.log(`Found ${r.size} files in local directory`),this.options.dryRun)try{await Ti.access(this.options.localDir)}catch{console.log(`[DRY RUN] Would create directory: ${this.options.localDir}`)}else await Ti.mkdir(this.options.localDir,{recursive:!0});let n=new Set;if(this.pullOptions.deleteLocal)for(let c of r.keys())t.has(c)||n.add(c);let s=new H(this.options.localDir);if(n.size>0&&!this.options.dryRun){let c=Array.from(n).map(p=>({file:p,status:"deleted"})),l=await s.createCheckpoint("remote",c,`Pre-delete checkpoint: ${n.size} files not on server`);l&&console.log(`
|
|
96
|
+
Checkpoint created before deletion: ${l.shortHash}`)}let o=await Promise.all(Array.from(t.keys()).map(c=>this.remoteLimit(async()=>{try{let l=Zl.join(this.options.localDir,c);return await this.downloadFile(c,l),c}catch(l){return this.hasError=!0,console.error(`Error downloading ${c}:`,l),null}})));this.downloadedFiles=o.filter(c=>c!==null);let a=[];if(n.size>0&&(console.log(`
|
|
97
97
|
Deleting ${n.size} local files that don't exist in realm...`),a=(await Promise.all(Array.from(n).map(async l=>{try{let p=r.get(l);return p?(await this.deleteLocalFile(p),console.log(` Deleted: ${l}`),l):null}catch(p){return this.hasError=!0,console.error(`Error deleting local file ${l}:`,p),null}}))).filter(l=>l!==null)),!this.options.dryRun&&this.downloadedFiles.length+a.length>0){let c=[...this.downloadedFiles.map(p=>({file:p,status:"modified"})),...a.map(p=>({file:p,status:"deleted"}))],l=await s.createCheckpoint("remote",c);if(l){let p=l.isMajor?"[MAJOR]":"[minor]";console.log(`
|
|
98
|
-
Checkpoint created: ${l.shortHash} ${p} ${l.message}`)}}console.log("Pull completed")}};function
|
|
99
|
-
Checkpoint created: ${d.shortHash} ${f} ${d.message}`)}}console.log("Push completed")}};function ep(i){i.command("push").description("Push local files to a Boxel realm").argument("<local-dir>","The local directory containing files to sync").argument("<realm-url>","The URL of the target realm (e.g., https://app.boxel.ai/demo/)").option("--delete","Delete remote files that do not exist locally").option("--dry-run","Show what would be done without making changes").option("--force","Upload all files, even if unchanged").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(e,t,r)=>{let n=await xe(r.realmSecretSeed===!0);await jb(e,t,{delete:r.delete,dryRun:r.dryRun,force:r.force,realmSecretSeed:n})})}async function jb(i,e,t){let r;if(t.authenticator)r=t.authenticator;else{let n=be({realmUrl:e,realmSecretSeed:t.realmSecretSeed,profileManager:t.profileManager});n.ok||(console.error(`Error: ${n.error}`),process.exit(1)),r=n.authenticator}await Qe(i)||(console.error(`Local directory does not exist: ${i}`),process.exit(1));try{let n=new En({realmUrl:e,localDir:i,deleteRemote:t.delete,dryRun:t.dryRun,force:t.force},r);await n.sync(),n.hasError?(console.log("Push did not complete successfully. View logs for details"),process.exit(2)):console.log("Push completed successfully")}catch(n){console.error("Push failed:",n),process.exit(1)}}async function tp(i){let e=k(i.realmUrl.trim()),t=i.profileManager??C(),r=t.getActiveProfile();if(!r)return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:0,nextCount:0,error:P};let n;try{n=await t.getUserRealms()}catch(d){return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:0,nextCount:0,error:`Failed to load realm list: ${d instanceof Error?d.message:String(d)}`}}let s=n.map(k),o=s.length,a=s.filter(d=>d===e).length;if(a===0)return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:o,notInList:!0,error:"Realm is not in app.boxel.realms. Nothing to remove."};let c=o-a;if(i.dryRun)return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:c};let l=r.profile.realmServerUrl.replace(/\/$/,""),p;try{p=await t.authedRealmServerFetch(`${l}/_delete-realm`,{method:"DELETE",headers:{"Content-Type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"realm",id:e}})})}catch(d){return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:o,error:`Failed to reach realm server: ${d instanceof Error?d.message:String(d)}`}}if(!p.ok){let d=await Mb(p),f=p.status===403?`You do not own this realm and cannot delete it on the server. Server returned 403: ${d}`:`Realm server returned ${p.status}: ${d}`;return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:o,error:f}}let u;try{u=await t.removeFromUserRealms(e)}catch(d){return{realmUrl:e,removed:!1,serverDeleted:!0,unlinked:!1,previousCount:o,nextCount:o,error:`Server delete succeeded, but Matrix unlink failed: ${d instanceof Error?d.message:String(d)}`}}return u?{realmUrl:e,removed:!0,serverDeleted:!0,unlinked:u,previousCount:o,nextCount:c}:{realmUrl:e,removed:!1,serverDeleted:!0,unlinked:!1,previousCount:o,nextCount:o,error:"Server delete succeeded, but Matrix account_data did not contain the URL by the time we PUT (concurrent edit?). Server-side files are gone; please refresh and check your realm list."}}async function Mb(i){try{return await i.text()}catch{return"<no response body>"}}function ip(i){i.command("remove").description("Remove a realm \u2014 deletes server-side files and unlinks it from your realm list").argument("<realm-url>","realm URL to remove").option("-y, --yes","Skip the interactive confirmation prompt").option("--dry-run","Preview the change without writing to Matrix").action(async(e,t)=>{let r=k(e.trim()),n=await tp({realmUrl:r,dryRun:!0});if(n.error&&!n.notInList&&(console.error(`${h}Error:${m} ${n.error}`),process.exit(1)),n.notInList&&(console.error(`${h}Error:${m} ${n.error}`),process.exit(1)),console.log(`Remove target: ${_}${n.realmUrl}${m}`),console.log(`${g}app.boxel.realms: ${n.previousCount} -> ${n.nextCount}${m}`),t.dryRun){console.log(`${g}[DRY RUN] No server delete or Matrix changes sent.${m}`);return}if(!t.yes){process.stdin.isTTY||(console.error(`${h}Error:${m} stdin is not a TTY. Pass --yes to confirm in non-interactive mode.`),process.exit(1));let o=await te("This will permanently delete the realm files, indexer state, and registry entry on the server. Proceed? (y/N) ");if(!/^y/i.test(o)){console.log(`${g}Cancelled.${m}`);return}}let s=await tp({realmUrl:r});(s.error||!s.removed)&&(console.error(`${h}Error:${m} ${s.error??"Removal did not complete."}`),s.serverDeleted&&!s.unlinked&&console.error(`${g}The realm is gone, but your account_data still references ${s.realmUrl}.${m}`),process.exit(1)),console.log(`${R}Removed:${m} ${_}${s.realmUrl}${m}`)})}var Ze=T(require("fs/promises")),wt=T(require("path"));function _i(i,e,t){let r=e.has(i),n=t?.files[i]!==void 0;return r&&n?e.get(i)===t.files[i]?"unchanged":"changed":r&&!n?"added":!r&&n?"deleted":"unchanged"}function Ci(i,e,t){let r=e.has(i),n=t?.remoteMtimes?.[i]!==void 0,s=t?.files[i]!==void 0,o=n||s;return r&&n?e.get(i)===t.remoteMtimes[i]?"unchanged":"changed":r&&s?"changed":r&&!o?"added":!r&&o?"deleted":"unchanged"}function rp(i,e,t){return i==="unchanged"&&e==="unchanged"?"noop":i==="changed"&&e==="unchanged"?"push":i==="unchanged"&&e==="changed"?"pull":i==="added"&&e==="unchanged"?"push":i==="unchanged"&&e==="added"?"pull":i==="changed"&&e==="changed"||i==="added"&&e==="added"||i==="changed"&&e==="added"||i==="added"&&e==="changed"?"conflict":i==="deleted"&&e==="unchanged"?t.deleteSync||t.preferLocal?"push-delete":"noop":i==="unchanged"&&e==="deleted"?t.deleteSync||t.preferRemote?"pull-delete":"noop":i==="deleted"&&e==="changed"||i==="changed"&&e==="deleted"?"conflict":i==="deleted"&&e==="deleted"?"noop":i==="added"&&e==="deleted"?"push":i==="deleted"&&e==="added"?"pull":"noop"}function np(i,e,t,r){let{localStatus:n,remoteStatus:s,relativePath:o}=i;if(!r)return null;switch(r){case"prefer-local":return n==="deleted"?"push-delete":"push";case"prefer-remote":return s==="deleted"?"pull-delete":"pull";case"prefer-newest":{if(n==="deleted"&&s==="changed")return"pull";if(n==="changed"&&s==="deleted")return"push";let a=e.get(o),c=t.get(o);return a&&c!==void 0?a.mtime>c*1e3?"push":"pull":"push"}}}var Ib=new Set(["node_modules",".git",".boxel-history",".cache",".vscode","dist","build","tmp"]),Nb=6;function Fb(i,e){return i==="unchanged"&&e==="unchanged"||i==="deleted"&&e==="deleted"?null:i==="unchanged"&&e==="added"?"new-remote":i==="unchanged"&&e==="changed"?"modified-remote":i==="unchanged"&&e==="deleted"?"deleted-remote":i==="added"&&e==="unchanged"?"new-local":i==="changed"&&e==="unchanged"?"modified-local":i==="deleted"&&e==="unchanged"?"deleted-local":i==="changed"&&e==="changed"||i==="added"&&e==="added"||i==="changed"&&e==="added"||i==="added"&&e==="changed"||i==="changed"&&e==="deleted"||i==="deleted"&&e==="changed"?"conflict":i==="added"&&e==="deleted"?"new-local":i==="deleted"&&e==="added"?"new-remote":null}var Rn=class extends le{constructor(t,r,n){super(t,n);this.statusOptions=t;this.loadedManifest=r}changes=[];pulled=[];hasError=!1;error;remoteMtimes=new Map;async sync(){let t,r;try{[t,this.remoteMtimes,r]=await Promise.all([this.getLocalFileListWithMtimes(),this.getRemoteMtimes(),this.getRemoteFileList()])}catch(a){this.hasError=!0,this.error=a instanceof Error?`Failed to fetch realm state: ${a.message}`:`Failed to fetch realm state: ${String(a)}`;return}if(r&&this.remoteMtimes.size===0&&r.size>0)for(let[a]of r)this.remoteMtimes.set(a,0);let n=new Map;for(let[a,c]of t)n.set(a,c.path);let s=new Map;await Promise.all(Array.from(n.entries()).map(async([a,c])=>{F(a)||s.set(a,await re(c))}));let o=new Set;for(let a of n.keys())o.add(a);for(let a of this.remoteMtimes.keys())o.add(a);for(let a of Object.keys(this.loadedManifest.files))o.add(a);if(this.loadedManifest.remoteMtimes)for(let a of Object.keys(this.loadedManifest.remoteMtimes))o.add(a);for(let a of o){if(F(a))continue;let c=_i(a,s,this.loadedManifest),l=Ci(a,this.remoteMtimes,this.loadedManifest),p=Fb(c,l);p!==null&&this.changes.push({file:a,status:p})}this.changes.sort((a,c)=>a.file.localeCompare(c.file)),this.statusOptions.pull&&await this.performSafePull()}async performSafePull(){let t=this.changes.filter(n=>n.status==="new-remote"||n.status==="modified-remote");if(t.length===0)return;let r=[];for(let n of t){let s=wt.join(this.options.localDir,n.file);try{await this.downloadFile(n.file,s),this.pulled.push(n.file);let o=await re(s);this.loadedManifest.files[n.file]=o;let a=this.remoteMtimes.get(n.file);a!==void 0&&(this.loadedManifest.remoteMtimes=this.loadedManifest.remoteMtimes??{},this.loadedManifest.remoteMtimes[n.file]=a)}catch(o){this.hasError=!0;let a=o instanceof Error?o.message:String(o);r.push({file:n.file,message:a}),console.error(` ${h}\u2717 ${n.file}${m} (${a})`)}}r.length>0&&(this.error=`Failed to pull ${r.length} file(s): ${r.map(n=>`${n.file} (${n.message})`).join("; ")}`),this.pulled.length>0&&await Oe(this.options.localDir,this.loadedManifest)}};async function sp(i,e){let t={localDir:i,realmUrl:"",changes:[],pulled:[],inSync:!1,hasError:!1},r=wt.join(i,".boxel-sync.json");if(!await Qe(r))return{...t,hasError:!0,error:`No .boxel-sync.json found in ${i}. Run: boxel realm sync ${i} <realm-url>`};let n=await ye(i);if(!n)return{...t,hasError:!0,error:`Malformed .boxel-sync.json in ${i}`};let s;try{s=(await Ze.stat(r)).mtimeMs}catch{}let o;if(e.authenticator)o=e.authenticator;else{let c=be({realmUrl:n.realmUrl,realmSecretSeed:e.realmSecretSeed,profileManager:e.profileManager});if(!c.ok)return{...t,realmUrl:n.realmUrl,manifestMtime:s,hasError:!0,error:c.error};o=c.authenticator}let a=new Rn({realmUrl:n.realmUrl,localDir:i,pull:e.pull},n,o);return await a.sync(),{localDir:i,realmUrl:n.realmUrl,manifestMtime:s,changes:a.changes,pulled:a.pulled.slice().sort(),inSync:!a.hasError&&a.changes.length===0,hasError:a.hasError,error:a.error}}async function Ub(i,e){let t=[];async function r(n,s){if(s>e)return;let o;try{o=await Ze.readdir(n,{withFileTypes:!0})}catch{return}if(o.some(c=>c.isFile()&&c.name===".boxel-sync.json")){t.push(n);return}for(let c of o)c.isDirectory()&&(Ib.has(c.name)||await r(wt.join(n,c.name),s+1))}return await r(i,0),t.sort(),t}async function Db(i,e){if(e.pull)return{rootDir:i,workspaces:[],hasError:!0,error:"Cannot use --pull with --all"};let t=process.env.BOXEL_STATUS_ALL_MAX_DEPTH,r=t!==void 0?Number(t):NaN,n=Number.isFinite(r)&&r>=0?r:Nb,s=await Ub(i,n),o=[],a=!1;for(let c of s){let l=wt.join(c,".boxel-sync.json"),p;try{p=await Ze.readFile(l,"utf8")}catch{o.push({localDir:c,realmUrl:"",changes:[],pulled:[],inSync:!1,hasError:!0,skipped:"no-manifest"}),a=!0;continue}let u;try{u=JSON.parse(p)}catch{u=void 0}if(!wn(u)){o.push({localDir:c,realmUrl:"",changes:[],pulled:[],inSync:!1,hasError:!0,skipped:"malformed"}),a=!0;continue}let d=await sp(c,{profileManager:e.profileManager,realmSecretSeed:e.realmSecretSeed,authenticator:e.authenticator}),f={...d};d.hasError&&(f.skipped="fetch-failed",a=!0),o.push(f)}return{rootDir:i,workspaces:o,hasError:a}}function qb(i){if(i.hasError&&i.error){console.error(`${h}Error:${m} ${i.error}`);return}if(console.log(`Realm: ${i.realmUrl}`),console.log(`Local: ${i.localDir}`),i.manifestMtime&&console.log(`${g}Manifest updated:${m} ${new Date(i.manifestMtime).toISOString()}`),console.log(""),i.changes.length===0){console.log(`${R}\u2713 In sync${m}`);return}let e={"new-remote":[],"modified-remote":[],"new-local":[],"modified-local":[],conflict:[],"deleted-local":[],"deleted-remote":[]};for(let t of i.changes)e[t.status].push(t.file);if(e["new-remote"].length>0){console.log(`${_}\u2193 New on remote (${e["new-remote"].length}):${m}`);for(let t of e["new-remote"])console.log(` + ${t}`);console.log("")}if(e["modified-remote"].length>0){console.log(`${_}\u2193 Modified on remote (${e["modified-remote"].length}):${m}`);for(let t of e["modified-remote"])console.log(` ~ ${t}`);console.log("")}if(e["new-local"].length>0){console.log(`${R}\u2191 New locally (${e["new-local"].length}):${m}`);for(let t of e["new-local"])console.log(` + ${t}`);console.log("")}if(e["modified-local"].length>0){console.log(`${R}\u2191 Modified locally (${e["modified-local"].length}):${m}`);for(let t of e["modified-local"])console.log(` ~ ${t}`);console.log("")}if(e.conflict.length>0){console.log(`${A}\u26A0 Conflicts (${e.conflict.length}):${m}`);for(let t of e.conflict)console.log(` ! ${t}`);console.log("")}if(e["deleted-local"].length>0){console.log(`${h}- Deleted locally (${e["deleted-local"].length}):${m}`);for(let t of e["deleted-local"])console.log(` - ${t}`);console.log("")}if(e["deleted-remote"].length>0){console.log(`${h}- Deleted on remote (${e["deleted-remote"].length}):${m}`);for(let t of e["deleted-remote"])console.log(` - ${t}`);console.log("")}if(i.pulled.length>0){console.log(`${_}Pulled ${i.pulled.length} file(s):${m}`);for(let t of i.pulled)console.log(` \u2713 ${t}`)}}function Gb(i){if(i.error){console.error(`${h}Error:${m} ${i.error}`);return}if(i.workspaces.length===0){console.log(`No .boxel-sync.json directories found under ${i.rootDir}.`);return}for(let e of i.workspaces){if(e.skipped){console.log(`${A}${e.localDir}${m} [${e.skipped}]`),e.error&&console.log(` ${g}${e.error}${m}`),console.log("");continue}let t={newRemote:0,modRemote:0,newLocal:0,modLocal:0,conflict:0,delLocal:0,delRemote:0};for(let r of e.changes)r.status==="new-remote"?t.newRemote++:r.status==="modified-remote"?t.modRemote++:r.status==="new-local"?t.newLocal++:r.status==="modified-local"?t.modLocal++:r.status==="conflict"?t.conflict++:r.status==="deleted-local"?t.delLocal++:r.status==="deleted-remote"&&t.delRemote++;if(console.log(`${e.localDir} ${g}${e.realmUrl}${m}`),e.inSync)console.log(` ${R}\u2713 in sync${m}`);else{let r=[];t.newRemote>0&&r.push(`${_}\u2193+${t.newRemote}${m}`),t.modRemote>0&&r.push(`${_}\u2193~${t.modRemote}${m}`),t.newLocal>0&&r.push(`${R}\u2191+${t.newLocal}${m}`),t.modLocal>0&&r.push(`${R}\u2191~${t.modLocal}${m}`),t.conflict>0&&r.push(`${A}\u26A0${t.conflict}${m}`),t.delLocal>0&&r.push(`${h}-L${t.delLocal}${m}`),t.delRemote>0&&r.push(`${h}-R${t.delRemote}${m}`),console.log(` ${r.join(" ")}`)}console.log("")}}function op(i){i.command("status").aliases(["st"]).description("Show pending changes between a local sync dir and its realm").argument("[local-dir]","Local sync directory (defaults to current working directory)").option("--pull","Download safe remote changes and update manifest").option("--all","Recursively report all .boxel-sync.json dirs under the current directory").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(e,t)=>{let r=await xe(t.realmSecretSeed===!0);if(t.all){t.pull&&(console.error(`${h}Error:${m} Cannot use --pull with --all`),process.exit(1));let s=await Db(e??process.cwd(),{all:!0,realmSecretSeed:r});Gb(s),s.hasError&&process.exit(2);return}let n=await sp(e??process.cwd(),{pull:t.pull,realmSecretSeed:r});qb(n),n.hasError&&process.exit(n.pulled.length>0?2:1)})}var kn=T(require("path"));var Sn=class extends le{constructor(t,r){super(t,r);this.syncOptions=t}hasError=!1;pushedFiles=[];pulledFiles=[];remoteDeletedFiles=[];localDeletedFiles=[];skippedConflicts=[];get conflictStrategy(){return this.syncOptions.preferLocal?"prefer-local":this.syncOptions.preferRemote?"prefer-remote":this.syncOptions.preferNewest?"prefer-newest":null}async sync(){console.log(`Starting sync between ${this.options.localDir} and ${this.options.realmUrl}`),console.log("Testing realm access...");let t;try{t=await this.getRemoteFileList("")}catch(E){throw console.error("Failed to access realm:",E),new Error("Cannot proceed with sync: Authentication or access failed. Please check your credentials and realm permissions.")}console.log("Realm access verified");let[r,n,s]=await Promise.all([this.getLocalFileListWithMtimes(),this.getRemoteMtimes(),ye(this.options.localDir)]),o=new Map;for(let[E,$]of r)o.set(E,$.path);if(n.size===0&&t&&t.size>0){console.log("Remote mtimes unavailable, falling back to file listing for remote detection");for(let[E]of t)n.set(E,0)}console.log(`Found ${o.size} local files`),console.log(`Found ${n.size} remote files`),s&&s.realmUrl!==this.normalizedRealmUrl&&console.warn(`${A}Warning:${m} Manifest realm URL (${s.realmUrl}) differs from target (${this.normalizedRealmUrl}). Treating as first sync.`);let a=s&&s.realmUrl===this.normalizedRealmUrl?s:null,c=new Map;await Promise.all(Array.from(o.entries()).map(async([E,$])=>{F(E)||c.set(E,await re($))}));let l=new Set;for(let E of o.keys())l.add(E);for(let E of n.keys())l.add(E);if(a){for(let E of Object.keys(a.files))l.add(E);if(a.remoteMtimes)for(let E of Object.keys(a.remoteMtimes))l.add(E)}let p=[];for(let E of l){if(F(E))continue;let $=_i(E,c,a),O=Ci(E,n,a),U=rp($,O,this.syncOptions);p.push({relativePath:E,localStatus:$,remoteStatus:O,action:U})}let u=[],d=[],f=[],x=[],w=[],M=0;for(let E of p)switch(E.action){case"push":u.push(E.relativePath);break;case"pull":d.push(E.relativePath);break;case"push-delete":f.push(E.relativePath);break;case"pull-delete":x.push(E.relativePath);break;case"conflict":w.push(E);break;case"noop":M++;break}for(let E of w)switch(np(E,r,n,this.conflictStrategy)){case"push":u.push(E.relativePath);break;case"pull":d.push(E.relativePath);break;case"push-delete":f.push(E.relativePath);break;case"pull-delete":x.push(E.relativePath);break;case"noop":break;default:this.skippedConflicts.push(E.relativePath);break}if(console.log(`
|
|
100
|
-
${
|
|
101
|
-
Everything is up to date`),!this.options.dryRun&&!a&&this.skippedConflicts.length===0&&await this.writeManifest(c,n);return}if(
|
|
102
|
-
Pulling ${
|
|
103
|
-
Pushing ${u.length} file(s)...`);let E=new Map;for(let
|
|
104
|
-
Deleting ${
|
|
105
|
-
Deleting ${
|
|
106
|
-
Checkpoint created: ${O.shortHash} ${
|
|
107
|
-
Sync completed`)}async writeManifest(t,r){let n={realmUrl:this.normalizedRealmUrl,files:{},remoteMtimes:{}};for(let[s,o]of t){n.files[s]=o;let a=r.get(s);a!==void 0&&a!==0&&(n.remoteMtimes[s]=a)}n.remoteMtimes&&Object.keys(n.remoteMtimes).length===0&&delete n.remoteMtimes,await Oe(this.options.localDir,n)}};function
|
|
108
|
-
`),{ok:!0,staleOverwrote:r}}async function
|
|
109
|
-
`),await
|
|
110
|
-
`)}let l=async()=>{await Promise.all(c.map(async
|
|
111
|
-
${_}\u21C5 Watch stopped${m}`),
|
|
112
|
-
`)){if(!r)continue;let n=r.trim().split(/\s+/),s=Number.parseInt(n[1]??"",10);if(!Number.isFinite(s)||t.has(s))continue;t.add(s);let o=".",a=r.match(/\bstart\s+\S+\s+(\S+)/);a&&a[1]&&!a[1].startsWith("-")&&(o=a[1]),e.push({pid:s,workspace:o})}return e}async function
|
|
113
|
-
${R}\u2713 Stopped ${i.stopped.length} process${e}${m}`)}}function
|
|
114
|
-
`}catch{}return
|
|
98
|
+
Checkpoint created: ${l.shortHash} ${p} ${l.message}`)}}console.log("Pull completed")}};function ep(i){i.command("pull").description("Pull files from a Boxel realm to a local directory").argument("<realm-url>","The URL of the source realm (e.g., https://app.boxel.ai/demo/)").argument("<local-dir>","The local directory to sync files to").option("--delete","Delete local files that do not exist in the realm").option("--dry-run","Show what would be done without making changes").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(e,t,r)=>{let n=await ve(r.realmSecretSeed===!0),s=await Hb(e,t,{delete:r.delete,dryRun:r.dryRun,realmSecretSeed:n});s.error&&(console.error(`Error: ${s.error}`),process.exit(s.files.length>0?2:1)),console.log("Pull completed successfully")})}async function Hb(i,e,t){let r;if(t.authenticator)r=t.authenticator;else{let n=ye({realmUrl:i,realmSecretSeed:t.realmSecretSeed,profileManager:t.profileManager});if(!n.ok)return{files:[],error:n.error};r=n.authenticator}try{let n=new yn({realmUrl:i,localDir:e,deleteLocal:t.delete,dryRun:t.dryRun},r);return await n.sync(),n.hasError?{files:n.downloadedFiles.sort(),error:"Pull completed with errors. Some files may not have been downloaded."}:{files:n.downloadedFiles.sort()}}catch(n){return{files:[],error:`Pull failed: ${n instanceof Error?n.message:String(n)}`}}}var qe=P(require("fs/promises")),wn=P(require("path")),tp=P(require("crypto"));function En(i){if(typeof i!="object"||i===null)return!1;let e=i;if(typeof e.realmUrl!="string"||typeof e.files!="object"||e.files===null)return!1;for(let t of Object.values(e.files))if(typeof t!="string")return!1;if(e.remoteMtimes!==void 0){if(typeof e.remoteMtimes!="object"||e.remoteMtimes===null)return!1;for(let t of Object.values(e.remoteMtimes))if(typeof t!="number")return!1}return!0}async function tt(i){try{return await qe.access(i),!0}catch{return!1}}async function se(i){let e=await qe.readFile(i);return tp.createHash("md5").update(e).digest("hex")}async function we(i){let e=wn.join(i,".boxel-sync.json"),t;try{t=await qe.readFile(e,"utf8")}catch(n){if(n.code==="ENOENT")return null;throw n}let r;try{r=JSON.parse(t)}catch{return null}return En(r)?r:(console.warn("Warning: .boxel-sync.json is malformed or has an unexpected shape; falling back to a full upload."),null)}async function Oe(i,e){let t=wn.join(i,".boxel-sync.json");await qe.writeFile(t,JSON.stringify(e,null,2))}var Wb=new Set(["index.json","realm.json"]),Rn=class extends ue{constructor(t,r){super(t,r);this.pushOptions=t}hasError=!1;async sync(){console.log(`Starting push from ${this.options.localDir} to ${this.options.realmUrl}`),console.log("Testing realm access...");let t;try{t=await this.getRemoteFileList("")}catch(p){throw console.error("Failed to access realm:",p),new Error("Cannot proceed with push: Authentication or access failed. Please check your credentials and realm permissions.")}console.log("Realm access verified");let r=await this.getLocalFileList();console.log(`Found ${r.size} files in local directory`);let n=await we(this.options.localDir),s={realmUrl:this.normalizedRealmUrl,files:{},remoteMtimes:{}},o=new Map,a=new Set;if(!this.pushOptions.force&&n!==null&&n.realmUrl===this.normalizedRealmUrl){console.log("Checking for changed files...");let p=0,[u,f]=await Promise.all([this.getRemoteMtimes(),Promise.all(Array.from(r.entries()).map(async([d,h])=>{if(U(d))return{relativePath:d,localPath:h,currentHash:"",protected:!0};let b=await se(h);return{relativePath:d,localPath:h,currentHash:b,protected:!1}}))]);for(let d of f){if(d.protected){p++;continue}let h=n.files[d.relativePath],b=n.remoteMtimes?.[d.relativePath],j=u.get(d.relativePath),te=h!==d.currentHash,E=h!==void 0&&!t.has(d.relativePath),$=b!==void 0&&j!==void 0&&j!==b;te||E||$?(o.set(d.relativePath,d.localPath),!te&&(E||$)&&a.add(d.relativePath)):(p++,s.files[d.relativePath]=d.currentHash,b!==void 0&&(s.remoteMtimes[d.relativePath]=b))}if(p>0&&console.log(`Skipping ${p} unchanged files`),a.size>0){let d=Array.from(a),h=d.slice(0,5).join(", "),b=d.length>5?", ...":"";console.warn(`Warning: ${a.size} file(s) changed on the realm since your last push; your local versions will overwrite them: ${h}${b}`)}}else{this.pushOptions.force?console.log("Force mode: uploading all files"):console.log(n?"Realm URL changed, will upload all files":"No sync manifest found, will upload all files");for(let[p,u]of r)U(p)||o.set(p,u)}let l=!1;if(o.size===0)console.log("No files to upload - everything is up to date");else{console.log(`Uploading ${o.size} file(s) via /_atomic...`);let p=new Set,u=this.pushOptions.force||!n;for(let d of o.keys())if(u)t.has(d)||p.add(d);else{let h=n.files[d]!==void 0,b=h&&!t.has(d);(!h||b)&&p.add(d)}let f=await this.uploadFilesAtomic(o,p);if(f.succeeded.length>0){let d=await Promise.all(f.succeeded.map(async h=>({rel:h,hash:await se(o.get(h))})));for(let{rel:h,hash:b}of d)s.files[h]=b}if(f.error){l=!0,this.hasError=!0,console.error(f.error.message);for(let d of f.error.perFile){let h;d.status===409?h=`${d.path} was created on the realm concurrently \u2014 run with --force to overwrite.`:d.status===404?h=`${d.path} was removed from the realm concurrently \u2014 run with --force to re-create it from your local copy.`:h=`${d.path}: ${d.title}`,console.error(` ${h}`)}}}if(this.pushOptions.deleteRemote){let p=new Set(t.keys()),u=[];for(let f of p){if(U(f)){p.delete(f);continue}Wb.has(f)&&(p.delete(f),u.push(f))}for(let f of r.keys())p.delete(f);if(u.length>0&&console.log(`Skipping ${u.length} realm-managed remote artifact(s): ${u.join(", ")}`),p.size>0){let f=Array.from(p).sort();console.log(`Deleting ${f.length} remote files that don't exist locally: ${f.join(", ")}`);for(let d of f)try{await this.deleteFile(d)}catch(h){this.hasError=!0,console.error(`Error deleting ${d}:`,h)}}}if(!this.options.dryRun&&o.size>0)try{let p=await this.getRemoteMtimes();for(let u of Object.keys(s.files)){let f=p.get(u);f!==void 0&&(s.remoteMtimes[u]=f)}}catch(p){console.warn("Could not refresh remote mtimes after upload:",p)}if(s.remoteMtimes&&Object.keys(s.remoteMtimes).length===0&&delete s.remoteMtimes,this.options.dryRun||await Oe(this.options.localDir,s),!this.options.dryRun&&o.size>0&&!l){let p=new H(this.options.localDir),u=Array.from(o.keys()).map(d=>({file:d,status:"modified"})),f=await p.createCheckpoint("local",u);if(f){let d=f.isMajor?"[MAJOR]":"[minor]";console.log(`
|
|
99
|
+
Checkpoint created: ${f.shortHash} ${d} ${f.message}`)}}console.log("Push completed")}};function ip(i){i.command("push").description("Push local files to a Boxel realm").argument("<local-dir>","The local directory containing files to sync").argument("<realm-url>","The URL of the target realm (e.g., https://app.boxel.ai/demo/)").option("--delete","Delete remote files that do not exist locally").option("--dry-run","Show what would be done without making changes").option("--force","Upload all files, even if unchanged").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(e,t,r)=>{let n=await ve(r.realmSecretSeed===!0);await Gb(e,t,{delete:r.delete,dryRun:r.dryRun,force:r.force,realmSecretSeed:n})})}async function Gb(i,e,t){let r;if(t.authenticator)r=t.authenticator;else{let n=ye({realmUrl:e,realmSecretSeed:t.realmSecretSeed,profileManager:t.profileManager});n.ok||(console.error(`Error: ${n.error}`),process.exit(1)),r=n.authenticator}await tt(i)||(console.error(`Local directory does not exist: ${i}`),process.exit(1));try{let n=new Rn({realmUrl:e,localDir:i,deleteRemote:t.delete,dryRun:t.dryRun,force:t.force},r);await n.sync(),n.hasError?(console.log("Push did not complete successfully. View logs for details"),process.exit(2)):console.log("Push completed successfully")}catch(n){console.error("Push failed:",n),process.exit(1)}}async function rp(i){let e=k(i.realmUrl.trim()),t=i.profileManager??C(),r=t.getActiveProfile();if(!r)return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:0,nextCount:0,error:A};let n;try{n=await t.getUserRealms()}catch(f){return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:0,nextCount:0,error:`Failed to load realm list: ${f instanceof Error?f.message:String(f)}`}}let s=n.map(k),o=s.length,a=s.filter(f=>f===e).length;if(a===0)return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:o,notInList:!0,error:"Realm is not in app.boxel.realms. Nothing to remove."};let c=o-a;if(i.dryRun)return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:c};let l=r.profile.realmServerUrl.replace(/\/$/,""),p;try{p=await t.authedRealmServerFetch(`${l}/_delete-realm`,{method:"DELETE",headers:{"Content-Type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"realm",id:e}})})}catch(f){return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:o,error:`Failed to reach realm server: ${f instanceof Error?f.message:String(f)}`}}if(!p.ok){let f=await Vb(p),d=p.status===403?`You do not own this realm and cannot delete it on the server. Server returned 403: ${f}`:`Realm server returned ${p.status}: ${f}`;return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:o,error:d}}let u;try{u=await t.removeFromUserRealms(e)}catch(f){return{realmUrl:e,removed:!1,serverDeleted:!0,unlinked:!1,previousCount:o,nextCount:o,error:`Server delete succeeded, but Matrix unlink failed: ${f instanceof Error?f.message:String(f)}`}}return u?{realmUrl:e,removed:!0,serverDeleted:!0,unlinked:u,previousCount:o,nextCount:c}:{realmUrl:e,removed:!1,serverDeleted:!0,unlinked:!1,previousCount:o,nextCount:o,error:"Server delete succeeded, but Matrix account_data did not contain the URL by the time we PUT (concurrent edit?). Server-side files are gone; please refresh and check your realm list."}}async function Vb(i){try{return await i.text()}catch{return"<no response body>"}}function np(i){i.command("remove").description("Remove a realm \u2014 deletes server-side files and unlinks it from your realm list").argument("<realm-url>","realm URL to remove").option("-y, --yes","Skip the interactive confirmation prompt").option("--dry-run","Preview the change without writing to Matrix").action(async(e,t)=>{let r=k(e.trim()),n=await rp({realmUrl:r,dryRun:!0});if(n.error&&!n.notInList&&(console.error(`${g}Error:${m} ${n.error}`),process.exit(1)),n.notInList&&(console.error(`${g}Error:${m} ${n.error}`),process.exit(1)),console.log(`Remove target: ${_}${n.realmUrl}${m}`),console.log(`${x}app.boxel.realms: ${n.previousCount} -> ${n.nextCount}${m}`),t.dryRun){console.log(`${x}[DRY RUN] No server delete or Matrix changes sent.${m}`);return}if(!t.yes){process.stdin.isTTY||(console.error(`${g}Error:${m} stdin is not a TTY. Pass --yes to confirm in non-interactive mode.`),process.exit(1));let o=await re("This will permanently delete the realm files, indexer state, and registry entry on the server. Proceed? (y/N) ");if(!/^y/i.test(o)){console.log(`${x}Cancelled.${m}`);return}}let s=await rp({realmUrl:r});(s.error||!s.removed)&&(console.error(`${g}Error:${m} ${s.error??"Removal did not complete."}`),s.serverDeleted&&!s.unlinked&&console.error(`${x}The realm is gone, but your account_data still references ${s.realmUrl}.${m}`),process.exit(1)),console.log(`${R}Removed:${m} ${_}${s.realmUrl}${m}`)})}var it=P(require("fs/promises")),$t=P(require("path"));function Oi(i,e,t){let r=e.has(i),n=t?.files[i]!==void 0;return r&&n?e.get(i)===t.files[i]?"unchanged":"changed":r&&!n?"added":!r&&n?"deleted":"unchanged"}function Pi(i,e,t){let r=e.has(i),n=t?.remoteMtimes?.[i]!==void 0,s=t?.files[i]!==void 0,o=n||s;return r&&n?e.get(i)===t.remoteMtimes[i]?"unchanged":"changed":r&&s?"changed":r&&!o?"added":!r&&o?"deleted":"unchanged"}function sp(i,e,t){return i==="unchanged"&&e==="unchanged"?"noop":i==="changed"&&e==="unchanged"?"push":i==="unchanged"&&e==="changed"?"pull":i==="added"&&e==="unchanged"?"push":i==="unchanged"&&e==="added"?"pull":i==="changed"&&e==="changed"||i==="added"&&e==="added"||i==="changed"&&e==="added"||i==="added"&&e==="changed"?"conflict":i==="deleted"&&e==="unchanged"?t.deleteSync||t.preferLocal?"push-delete":"noop":i==="unchanged"&&e==="deleted"?t.deleteSync||t.preferRemote?"pull-delete":"noop":i==="deleted"&&e==="changed"||i==="changed"&&e==="deleted"?"conflict":i==="deleted"&&e==="deleted"?"noop":i==="added"&&e==="deleted"?"push":i==="deleted"&&e==="added"?"pull":"noop"}function op(i,e,t,r){let{localStatus:n,remoteStatus:s,relativePath:o}=i;if(!r)return null;switch(r){case"prefer-local":return n==="deleted"?"push-delete":"push";case"prefer-remote":return s==="deleted"?"pull-delete":"pull";case"prefer-newest":{if(n==="deleted"&&s==="changed")return"pull";if(n==="changed"&&s==="deleted")return"push";let a=e.get(o),c=t.get(o);return a&&c!==void 0?a.mtime>c*1e3?"push":"pull":"push"}}}var Bb=new Set(["node_modules",".git",".boxel-history",".cache",".vscode","dist","build","tmp"]),zb=6;function Yb(i,e){return i==="unchanged"&&e==="unchanged"||i==="deleted"&&e==="deleted"?null:i==="unchanged"&&e==="added"?"new-remote":i==="unchanged"&&e==="changed"?"modified-remote":i==="unchanged"&&e==="deleted"?"deleted-remote":i==="added"&&e==="unchanged"?"new-local":i==="changed"&&e==="unchanged"?"modified-local":i==="deleted"&&e==="unchanged"?"deleted-local":i==="changed"&&e==="changed"||i==="added"&&e==="added"||i==="changed"&&e==="added"||i==="added"&&e==="changed"||i==="changed"&&e==="deleted"||i==="deleted"&&e==="changed"?"conflict":i==="added"&&e==="deleted"?"new-local":i==="deleted"&&e==="added"?"new-remote":null}var $n=class extends ue{constructor(t,r,n){super(t,n);this.statusOptions=t;this.loadedManifest=r}changes=[];pulled=[];hasError=!1;error;remoteMtimes=new Map;async sync(){let t,r;try{[t,this.remoteMtimes,r]=await Promise.all([this.getLocalFileListWithMtimes(),this.getRemoteMtimes(),this.getRemoteFileList()])}catch(a){this.hasError=!0,this.error=a instanceof Error?`Failed to fetch realm state: ${a.message}`:`Failed to fetch realm state: ${String(a)}`;return}if(r&&this.remoteMtimes.size===0&&r.size>0)for(let[a]of r)this.remoteMtimes.set(a,0);let n=new Map;for(let[a,c]of t)n.set(a,c.path);let s=new Map;await Promise.all(Array.from(n.entries()).map(async([a,c])=>{U(a)||s.set(a,await se(c))}));let o=new Set;for(let a of n.keys())o.add(a);for(let a of this.remoteMtimes.keys())o.add(a);for(let a of Object.keys(this.loadedManifest.files))o.add(a);if(this.loadedManifest.remoteMtimes)for(let a of Object.keys(this.loadedManifest.remoteMtimes))o.add(a);for(let a of o){if(U(a))continue;let c=Oi(a,s,this.loadedManifest),l=Pi(a,this.remoteMtimes,this.loadedManifest),p=Yb(c,l);p!==null&&this.changes.push({file:a,status:p})}this.changes.sort((a,c)=>a.file.localeCompare(c.file)),this.statusOptions.pull&&await this.performSafePull()}async performSafePull(){let t=this.changes.filter(n=>n.status==="new-remote"||n.status==="modified-remote");if(t.length===0)return;let r=[];for(let n of t){let s=$t.join(this.options.localDir,n.file);try{await this.downloadFile(n.file,s),this.pulled.push(n.file);let o=await se(s);this.loadedManifest.files[n.file]=o;let a=this.remoteMtimes.get(n.file);a!==void 0&&(this.loadedManifest.remoteMtimes=this.loadedManifest.remoteMtimes??{},this.loadedManifest.remoteMtimes[n.file]=a)}catch(o){this.hasError=!0;let a=o instanceof Error?o.message:String(o);r.push({file:n.file,message:a}),console.error(` ${g}\u2717 ${n.file}${m} (${a})`)}}r.length>0&&(this.error=`Failed to pull ${r.length} file(s): ${r.map(n=>`${n.file} (${n.message})`).join("; ")}`),this.pulled.length>0&&await Oe(this.options.localDir,this.loadedManifest)}};async function ap(i,e){let t={localDir:i,realmUrl:"",changes:[],pulled:[],inSync:!1,hasError:!1},r=$t.join(i,".boxel-sync.json");if(!await tt(r))return{...t,hasError:!0,error:`No .boxel-sync.json found in ${i}. Run: boxel realm sync ${i} <realm-url>`};let n=await we(i);if(!n)return{...t,hasError:!0,error:`Malformed .boxel-sync.json in ${i}`};let s;try{s=(await it.stat(r)).mtimeMs}catch{}let o;if(e.authenticator)o=e.authenticator;else{let c=ye({realmUrl:n.realmUrl,realmSecretSeed:e.realmSecretSeed,profileManager:e.profileManager});if(!c.ok)return{...t,realmUrl:n.realmUrl,manifestMtime:s,hasError:!0,error:c.error};o=c.authenticator}let a=new $n({realmUrl:n.realmUrl,localDir:i,pull:e.pull},n,o);return await a.sync(),{localDir:i,realmUrl:n.realmUrl,manifestMtime:s,changes:a.changes,pulled:a.pulled.slice().sort(),inSync:!a.hasError&&a.changes.length===0,hasError:a.hasError,error:a.error}}async function Jb(i,e){let t=[];async function r(n,s){if(s>e)return;let o;try{o=await it.readdir(n,{withFileTypes:!0})}catch{return}if(o.some(c=>c.isFile()&&c.name===".boxel-sync.json")){t.push(n);return}for(let c of o)c.isDirectory()&&(Bb.has(c.name)||await r($t.join(n,c.name),s+1))}return await r(i,0),t.sort(),t}async function Xb(i,e){if(e.pull)return{rootDir:i,workspaces:[],hasError:!0,error:"Cannot use --pull with --all"};let t=process.env.BOXEL_STATUS_ALL_MAX_DEPTH,r=t!==void 0?Number(t):NaN,n=Number.isFinite(r)&&r>=0?r:zb,s=await Jb(i,n),o=[],a=!1;for(let c of s){let l=$t.join(c,".boxel-sync.json"),p;try{p=await it.readFile(l,"utf8")}catch{o.push({localDir:c,realmUrl:"",changes:[],pulled:[],inSync:!1,hasError:!0,skipped:"no-manifest"}),a=!0;continue}let u;try{u=JSON.parse(p)}catch{u=void 0}if(!En(u)){o.push({localDir:c,realmUrl:"",changes:[],pulled:[],inSync:!1,hasError:!0,skipped:"malformed"}),a=!0;continue}let f=await ap(c,{profileManager:e.profileManager,realmSecretSeed:e.realmSecretSeed,authenticator:e.authenticator}),d={...f};f.hasError&&(d.skipped="fetch-failed",a=!0),o.push(d)}return{rootDir:i,workspaces:o,hasError:a}}function Kb(i){if(i.hasError&&i.error){console.error(`${g}Error:${m} ${i.error}`);return}if(console.log(`Realm: ${i.realmUrl}`),console.log(`Local: ${i.localDir}`),i.manifestMtime&&console.log(`${x}Manifest updated:${m} ${new Date(i.manifestMtime).toISOString()}`),console.log(""),i.changes.length===0){console.log(`${R}\u2713 In sync${m}`);return}let e={"new-remote":[],"modified-remote":[],"new-local":[],"modified-local":[],conflict:[],"deleted-local":[],"deleted-remote":[]};for(let t of i.changes)e[t.status].push(t.file);if(e["new-remote"].length>0){console.log(`${_}\u2193 New on remote (${e["new-remote"].length}):${m}`);for(let t of e["new-remote"])console.log(` + ${t}`);console.log("")}if(e["modified-remote"].length>0){console.log(`${_}\u2193 Modified on remote (${e["modified-remote"].length}):${m}`);for(let t of e["modified-remote"])console.log(` ~ ${t}`);console.log("")}if(e["new-local"].length>0){console.log(`${R}\u2191 New locally (${e["new-local"].length}):${m}`);for(let t of e["new-local"])console.log(` + ${t}`);console.log("")}if(e["modified-local"].length>0){console.log(`${R}\u2191 Modified locally (${e["modified-local"].length}):${m}`);for(let t of e["modified-local"])console.log(` ~ ${t}`);console.log("")}if(e.conflict.length>0){console.log(`${L}\u26A0 Conflicts (${e.conflict.length}):${m}`);for(let t of e.conflict)console.log(` ! ${t}`);console.log("")}if(e["deleted-local"].length>0){console.log(`${g}- Deleted locally (${e["deleted-local"].length}):${m}`);for(let t of e["deleted-local"])console.log(` - ${t}`);console.log("")}if(e["deleted-remote"].length>0){console.log(`${g}- Deleted on remote (${e["deleted-remote"].length}):${m}`);for(let t of e["deleted-remote"])console.log(` - ${t}`);console.log("")}if(i.pulled.length>0){console.log(`${_}Pulled ${i.pulled.length} file(s):${m}`);for(let t of i.pulled)console.log(` \u2713 ${t}`)}}function Qb(i){if(i.error){console.error(`${g}Error:${m} ${i.error}`);return}if(i.workspaces.length===0){console.log(`No .boxel-sync.json directories found under ${i.rootDir}.`);return}for(let e of i.workspaces){if(e.skipped){console.log(`${L}${e.localDir}${m} [${e.skipped}]`),e.error&&console.log(` ${x}${e.error}${m}`),console.log("");continue}let t={newRemote:0,modRemote:0,newLocal:0,modLocal:0,conflict:0,delLocal:0,delRemote:0};for(let r of e.changes)r.status==="new-remote"?t.newRemote++:r.status==="modified-remote"?t.modRemote++:r.status==="new-local"?t.newLocal++:r.status==="modified-local"?t.modLocal++:r.status==="conflict"?t.conflict++:r.status==="deleted-local"?t.delLocal++:r.status==="deleted-remote"&&t.delRemote++;if(console.log(`${e.localDir} ${x}${e.realmUrl}${m}`),e.inSync)console.log(` ${R}\u2713 in sync${m}`);else{let r=[];t.newRemote>0&&r.push(`${_}\u2193+${t.newRemote}${m}`),t.modRemote>0&&r.push(`${_}\u2193~${t.modRemote}${m}`),t.newLocal>0&&r.push(`${R}\u2191+${t.newLocal}${m}`),t.modLocal>0&&r.push(`${R}\u2191~${t.modLocal}${m}`),t.conflict>0&&r.push(`${L}\u26A0${t.conflict}${m}`),t.delLocal>0&&r.push(`${g}-L${t.delLocal}${m}`),t.delRemote>0&&r.push(`${g}-R${t.delRemote}${m}`),console.log(` ${r.join(" ")}`)}console.log("")}}function cp(i){i.command("status").aliases(["st"]).description("Show pending changes between a local sync dir and its realm").argument("[local-dir]","Local sync directory (defaults to current working directory)").option("--pull","Download safe remote changes and update manifest").option("--all","Recursively report all .boxel-sync.json dirs under the current directory").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(e,t)=>{let r=await ve(t.realmSecretSeed===!0);if(t.all){t.pull&&(console.error(`${g}Error:${m} Cannot use --pull with --all`),process.exit(1));let s=await Xb(e??process.cwd(),{all:!0,realmSecretSeed:r});Qb(s),s.hasError&&process.exit(2);return}let n=await ap(e??process.cwd(),{pull:t.pull,realmSecretSeed:r});Kb(n),n.hasError&&process.exit(n.pulled.length>0?2:1)})}var Sn=P(require("path"));var _n=class extends ue{constructor(t,r){super(t,r);this.syncOptions=t}hasError=!1;pushedFiles=[];pulledFiles=[];remoteDeletedFiles=[];localDeletedFiles=[];skippedConflicts=[];get conflictStrategy(){return this.syncOptions.preferLocal?"prefer-local":this.syncOptions.preferRemote?"prefer-remote":this.syncOptions.preferNewest?"prefer-newest":null}async sync(){console.log(`Starting sync between ${this.options.localDir} and ${this.options.realmUrl}`),console.log("Testing realm access...");let t;try{t=await this.getRemoteFileList("")}catch(E){throw console.error("Failed to access realm:",E),new Error("Cannot proceed with sync: Authentication or access failed. Please check your credentials and realm permissions.")}console.log("Realm access verified");let[r,n,s]=await Promise.all([this.getLocalFileListWithMtimes(),this.getRemoteMtimes(),we(this.options.localDir)]),o=new Map;for(let[E,$]of r)o.set(E,$.path);if(n.size===0&&t&&t.size>0){console.log("Remote mtimes unavailable, falling back to file listing for remote detection");for(let[E]of t)n.set(E,0)}console.log(`Found ${o.size} local files`),console.log(`Found ${n.size} remote files`),s&&s.realmUrl!==this.normalizedRealmUrl&&console.warn(`${L}Warning:${m} Manifest realm URL (${s.realmUrl}) differs from target (${this.normalizedRealmUrl}). Treating as first sync.`);let a=s&&s.realmUrl===this.normalizedRealmUrl?s:null,c=new Map;await Promise.all(Array.from(o.entries()).map(async([E,$])=>{U(E)||c.set(E,await se($))}));let l=new Set;for(let E of o.keys())l.add(E);for(let E of n.keys())l.add(E);if(a){for(let E of Object.keys(a.files))l.add(E);if(a.remoteMtimes)for(let E of Object.keys(a.remoteMtimes))l.add(E)}let p=[];for(let E of l){if(U(E))continue;let $=Oi(E,c,a),O=Pi(E,n,a),D=sp($,O,this.syncOptions);p.push({relativePath:E,localStatus:$,remoteStatus:O,action:D})}let u=[],f=[],d=[],h=[],b=[],j=0;for(let E of p)switch(E.action){case"push":u.push(E.relativePath);break;case"pull":f.push(E.relativePath);break;case"push-delete":d.push(E.relativePath);break;case"pull-delete":h.push(E.relativePath);break;case"conflict":b.push(E);break;case"noop":j++;break}for(let E of b)switch(op(E,r,n,this.conflictStrategy)){case"push":u.push(E.relativePath);break;case"pull":f.push(E.relativePath);break;case"push-delete":d.push(E.relativePath);break;case"pull-delete":h.push(E.relativePath);break;case"noop":break;default:this.skippedConflicts.push(E.relativePath);break}if(console.log(`
|
|
100
|
+
${x}Sync plan:${m}`),u.length>0&&console.log(` ${R}\u2191 Push:${m} ${u.length} file(s)`),f.length>0&&console.log(` ${_}\u2193 Pull:${m} ${f.length} file(s)`),d.length>0&&console.log(` ${g}\u2191 Delete remote:${m} ${d.length} file(s)`),h.length>0&&console.log(` ${g}\u2193 Delete local:${m} ${h.length} file(s)`),this.skippedConflicts.length>0){console.log(` ${L}\u26A0 Conflicts skipped:${m} ${this.skippedConflicts.length} file(s)`);for(let E of this.skippedConflicts)console.log(` ${E}`);console.log(` ${x}Use --prefer-local, --prefer-remote, or --prefer-newest to resolve.${m}`)}if(j>0&&console.log(` ${x}Unchanged: ${j} file(s)${m}`),u.length+f.length+d.length+h.length===0){console.log(`
|
|
101
|
+
Everything is up to date`),!this.options.dryRun&&!a&&this.skippedConflicts.length===0&&await this.writeManifest(c,n);return}if(f.length>0){console.log(`
|
|
102
|
+
Pulling ${f.length} file(s)...`);let E=await Promise.all(f.map($=>this.remoteLimit(async()=>{try{let O=Sn.join(this.options.localDir,$);return await this.downloadFile($,O),$}catch(O){return this.hasError=!0,console.error(`Error downloading ${$}:`,O),null}})));this.pulledFiles.push(...E.filter($=>$!==null))}if(u.length>0){console.log(`
|
|
103
|
+
Pushing ${u.length} file(s)...`);let E=new Map;for(let D of u){let St=o.get(D);St&&E.set(D,St)}let $=new Set;for(let D of E.keys()){let St=a?.files[D]!==void 0,Dp=n.has(D);!St&&!Dp&&$.add(D)}let O=await this.uploadFilesAtomic(E,$);if(this.pushedFiles.push(...O.succeeded),O.error){this.hasError=!0,console.error(O.error.message);for(let D of O.error.perFile)console.error(` ${D.path}: ${D.title}`)}}if(d.length>0){console.log(`
|
|
104
|
+
Deleting ${d.length} remote file(s)...`);let E=await Promise.all(d.map($=>this.remoteLimit(async()=>{try{return await this.deleteFile($),$}catch(O){return this.hasError=!0,console.error(`Error deleting remote ${$}:`,O),null}})));this.remoteDeletedFiles.push(...E.filter($=>$!==null))}if(h.length>0){console.log(`
|
|
105
|
+
Deleting ${h.length} local file(s)...`);let E=await Promise.all(h.map(async $=>{try{let O=o.get($);return O?(await this.deleteLocalFile(O),$):null}catch(O){return this.hasError=!0,console.error(`Error deleting local ${$}:`,O),null}}));this.localDeletedFiles.push(...E.filter($=>$!==null))}if(!this.options.dryRun){let E=new Map;if(a)for(let[O,D]of Object.entries(a.files))E.set(O,D);for(let[O,D]of c)E.set(O,D);for(let O of this.pushedFiles){let D=o.get(O);D&&E.set(O,await se(D))}for(let O of this.pulledFiles){let D=Sn.join(this.options.localDir,O);E.set(O,await se(D))}for(let O of this.remoteDeletedFiles)E.delete(O);for(let O of this.localDeletedFiles)E.delete(O);let $=n;if(this.pushedFiles.length>0||this.remoteDeletedFiles.length>0)try{$=await this.getRemoteMtimes()}catch{console.warn("Could not refresh remote mtimes after sync")}await this.writeManifest(E,$)}if(!this.options.dryRun){let E=[...this.pushedFiles.map($=>({file:$,status:"modified"})),...this.pulledFiles.map($=>({file:$,status:"modified"})),...this.remoteDeletedFiles.map($=>({file:$,status:"deleted"})),...this.localDeletedFiles.map($=>({file:$,status:"deleted"}))];if(E.length>0){let O=await new H(this.options.localDir).createCheckpoint("local",E);if(O){let D=O.isMajor?"[MAJOR]":"[minor]";console.log(`
|
|
106
|
+
Checkpoint created: ${O.shortHash} ${D} ${O.message}`)}}}console.log(`
|
|
107
|
+
Sync completed`)}async writeManifest(t,r){let n={realmUrl:this.normalizedRealmUrl,files:{},remoteMtimes:{}};for(let[s,o]of t){n.files[s]=o;let a=r.get(s);a!==void 0&&a!==0&&(n.remoteMtimes[s]=a)}n.remoteMtimes&&Object.keys(n.remoteMtimes).length===0&&delete n.remoteMtimes,await Oe(this.options.localDir,n)}};function lp(i){return i.command("sync").description("Bidirectional sync between a local directory and a Boxel realm").argument("<local-dir>","The local directory to sync").argument("<realm-url>","The URL of the target realm (e.g., https://app.boxel.ai/demo/)").option("--prefer-local","Resolve conflicts by keeping local version").option("--prefer-remote","Resolve conflicts by keeping remote version").option("--prefer-newest","Resolve conflicts by keeping newest version").option("--delete","Sync deletions both ways").option("--dry-run","Preview without making changes").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(t,r,n)=>{let s=await ve(n.realmSecretSeed===!0),o=await Zb(t,r,{preferLocal:n.preferLocal,preferRemote:n.preferRemote,preferNewest:n.preferNewest,delete:n.delete,dryRun:n.dryRun,realmSecretSeed:s}),a=Array.isArray(o.pushed)&&o.pushed.length>0||Array.isArray(o.pulled)&&o.pulled.length>0||Array.isArray(o.remoteDeleted)&&o.remoteDeleted.length>0||Array.isArray(o.localDeleted)&&o.localDeleted.length>0;o.error&&(console.error(`Error: ${o.error}`),process.exit(a?2:1)),console.log("Sync completed successfully")})}async function Zb(i,e,t){let r;if(t.authenticator)r=t.authenticator;else{let o=ye({realmUrl:e,realmSecretSeed:t.realmSecretSeed,profileManager:t.profileManager});if(!o.ok)return kn({error:o.error});r=o.authenticator}if([t.preferLocal,t.preferRemote,t.preferNewest].filter(Boolean).length>1)return kn({error:"Only one conflict strategy can be specified (--prefer-local, --prefer-remote, or --prefer-newest)."});if(!await tt(i))return kn({error:`Local directory does not exist: ${i}`});let s;try{s=new _n({realmUrl:e,localDir:i,preferLocal:t.preferLocal,preferRemote:t.preferRemote,preferNewest:t.preferNewest,deleteSync:t.delete,dryRun:t.dryRun,waitForIndex:t.waitForIndex},r),await s.sync()}catch(o){return{pushed:s?.pushedFiles.slice().sort()??[],pulled:s?.pulledFiles.slice().sort()??[],remoteDeleted:s?.remoteDeletedFiles.slice().sort()??[],localDeleted:s?.localDeletedFiles.slice().sort()??[],skippedConflicts:s?.skippedConflicts.slice().sort()??[],hasError:!0,error:`Sync failed: ${o instanceof Error?o.message:String(o)}`}}return{pushed:s.pushedFiles.slice().sort(),pulled:s.pulledFiles.slice().sort(),remoteDeleted:s.remoteDeletedFiles.slice().sort(),localDeleted:s.localDeletedFiles.slice().sort(),skippedConflicts:s.skippedConflicts.slice().sort(),hasError:s.hasError,error:s.hasError?ey(s):void 0}}function ey(i){return`Sync completed with errors. ${[`${i.pushedFiles.length} pushed`,`${i.pulledFiles.length} pulled`,`${i.remoteDeletedFiles.length} remote deleted`,`${i.localDeletedFiles.length} local deleted`,`${i.skippedConflicts.length} conflicts skipped`].join(", ")}.`}function kn(i){return{pushed:[],pulled:[],remoteDeleted:[],localDeleted:[],skippedConflicts:[],hasError:!0,...i}}var pp=P(Pt());function ty(i){let e=Number.parseInt(i,10);if(!Number.isFinite(e)||e<0||String(e)!==i.trim())throw new pp.InvalidArgumentError("--timeout must be a non-negative integer (milliseconds).");return e}async function iy(i,e={}){let t=e.timeoutMs??3e4;if(!Number.isFinite(t)||t<0)return{ready:!1,error:`Invalid timeoutMs: must be a finite, non-negative number (got ${e.timeoutMs}).`};let r=e.profileManager??C();if(!r.getActiveProfile())return{ready:!1,error:A};let s=`${k(i)}_readiness-check`,o=Date.now();for(;Date.now()-o<t;){try{if((await r.authedRealmFetch(s,{method:"GET",headers:{Accept:"application/vnd.api+json"}})).ok)return{ready:!0}}catch{}let a=t-(Date.now()-o);if(a<=0)break;await new Promise(c=>setTimeout(c,Math.min(1e3,a)))}return{ready:!1,error:`Realm not ready after ${t}ms: ${s}`}}function up(i){i.command("wait-for-ready").description("Poll a realm readiness-check endpoint until it responds OK or the timeout is reached").requiredOption("--realm <realm-url>","The realm URL to check").option("--timeout <ms>","Timeout in milliseconds (default: 30000)",ty).action(async e=>{let t;try{t=await iy(e.realm,{timeoutMs:e.timeout})}catch(r){console.error(`${g}Error:${m} ${r instanceof Error?r.message:String(r)}`),process.exit(1)}t.ready?console.log(`${R}Realm is ready.${m}`):(console.error(`${g}Error:${m} ${t.error??"Realm not ready"}`),process.exit(1))})}var jn=P(Pt()),wp=P(require("fs/promises")),Li=P(require("path"));var Pe=P(require("fs/promises")),mp=P(require("path")),ry=".boxel-watch.lock";function Cn(i){return mp.join(i,ry)}function Tn(i){try{return process.kill(i,0),!0}catch(e){return e?.code==="EPERM"}}async function ny(i){try{let e=await Pe.readFile(Cn(i),"utf8"),t=JSON.parse(e);return typeof t.pid!="number"||typeof t.startedAt!="string"||typeof t.realmUrl!="string"?null:t}catch{return null}}async function dp(i,e){await Pe.mkdir(i,{recursive:!0});let t=await ny(i),r=!1;if(t&&Tn(t.pid))return{ok:!1,existing:t};t&&(r=!0);let n={pid:process.pid,startedAt:new Date().toISOString(),realmUrl:e};return await Pe.writeFile(Cn(i),JSON.stringify(n,null,2)+`
|
|
108
|
+
`),{ok:!0,staleOverwrote:r}}async function Ai(i){try{await Pe.unlink(Cn(i))}catch(e){if(e?.code!=="ENOENT")throw e}}var Ae=P(require("fs/promises")),fp=P(require("os")),On=P(require("path"));function hp(){return On.join(fp.homedir(),".boxel-cli")}function gp(){return On.join(hp(),"watch-processes.json")}async function xp(){try{let i=await Ae.readFile(gp(),"utf8"),e=JSON.parse(i);return Array.isArray(e?.processes)?{processes:e.processes.filter(r=>typeof r?.pid=="number"&&typeof r?.workspace=="string"&&typeof r?.startedAt=="string")}:{processes:[]}}catch{return{processes:[]}}}async function Pn(i){await Ae.mkdir(hp(),{recursive:!0});let e=gp(),t=`${e}.${process.pid}.tmp`;await Ae.writeFile(t,JSON.stringify(i,null,2)+`
|
|
109
|
+
`),await Ae.rename(t,e)}async function vp(){let i=await xp(),e=i.processes.filter(t=>Tn(t.pid));return e.length!==i.processes.length&&await Pn({processes:e}),{processes:e}}async function bp(i){let t=(await vp()).processes.filter(r=>r.pid!==process.pid);t.push({pid:process.pid,workspace:i,startedAt:new Date().toISOString()}),await Pn({processes:t})}async function yp(){let i=await xp(),e=i.processes.filter(t=>t.pid!==process.pid);e.length!==i.processes.length&&await Pn({processes:e})}async function An(){return(await vp()).processes}var Ln=class extends ue{name;debounceMs;overwriteLocal;checkpointManager;lastKnownMtimes=new Map;pendingChanges=new Map;debounceTimer=null;isShutdown=!1;constructor(e,t,r){super({realmUrl:e.realmUrl,localDir:e.localDir},t),this.debounceMs=r.debounceMs,this.overwriteLocal=r.overwriteLocal??!1,this.checkpointManager=new H(e.localDir),this.name=cy(this.normalizedRealmUrl)}async sync(){await this.poll(),await this.flushPending()}async getRemoteMtimes(){let e=`${this.normalizedRealmUrl}_mtimes`,t=await this.authenticator.authedRealmFetch(e,{headers:{Accept:"application/vnd.api+json"}});if(!t.ok)throw new Error(`_mtimes fetch failed for ${this.normalizedRealmUrl}: ${t.status} ${t.statusText}`);let r=await t.json(),n=new Map;for(let[s,o]of Object.entries(r.data?.attributes?.mtimes??{}))n.set(s.replace(this.normalizedRealmUrl,""),o);return n}get localDir(){return this.options.localDir}get realmUrl(){return this.normalizedRealmUrl}get pendingCount(){return this.pendingChanges.size}async initialize(){await this.getRemoteMtimes(),await this.checkpointManager.isInitialized()||await this.checkpointManager.init();let e=await we(this.options.localDir);if(e&&e.realmUrl===this.normalizedRealmUrl&&e.remoteMtimes)for(let[t,r]of Object.entries(e.remoteMtimes))this.lastKnownMtimes.set(t,r)}async poll(){let e=await this.getRemoteMtimes(),t=!1;for(let[r,n]of e){if(U(r))continue;let s=this.lastKnownMtimes.get(r);s===void 0?this.recordPending(r,{status:"added",mtime:n})&&(t=!0):n>s&&this.recordPending(r,{status:"modified",mtime:n})&&(t=!0)}for(let r of this.lastKnownMtimes.keys())U(r)||e.has(r)||this.pendingChanges.get(r)?.status!=="deleted"&&(this.pendingChanges.set(r,{status:"deleted",mtime:0}),t=!0);return t}async flushPending(){if(this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.pendingChanges.size===0)return{pulled:[],deleted:[],skipped:[],checkpoint:null};let e=new Map(this.pendingChanges);this.pendingChanges.clear();let t=[],r=[],n=[],s=[],o=null;if(!this.overwriteLocal){let l=await we(this.options.localDir);l&&l.realmUrl===this.normalizedRealmUrl&&(o=l)}for(let[l,p]of e){let u=Li.join(this.options.localDir,l);if(!this.overwriteLocal&&await this.localDivergesFromManifest(u,l,o,p.status)){n.push(l);continue}if(p.status==="deleted"){try{await wp.unlink(u)}catch(f){if(f.code!=="ENOENT")throw f}r.push(l),s.push({file:l,status:"deleted"})}else await this.downloadFile(l,u),t.push(l),s.push({file:l,status:p.status})}let a=new Set(n);for(let[l,p]of e)a.has(l)||(p.status==="deleted"?this.lastKnownMtimes.delete(l):this.lastKnownMtimes.set(l,p.mtime));let c=null;return s.length>0&&(await this.persistManifest(t,r),c=await this.checkpointManager.createCheckpoint("remote",s)),{pulled:t,deleted:r,skipped:n,checkpoint:c}}async localDivergesFromManifest(e,t,r,n){let s;try{s=await se(e)}catch(a){if(a.code!=="ENOENT")throw a;return n==="deleted"?!1:r?.files[t]!==void 0}let o=r?.files[t];return o===void 0?!0:s!==o}scheduleFlush(e){this.isShutdown||(this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(async()=>{this.debounceTimer=null;try{let t=await this.flushPending();e?.(t)}catch(t){console.error(`${g}[${this.name}] Error applying changes:${m}`,t)}},this.debounceMs))}shutdown(){this.isShutdown=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}recordPending(e,t){let r=this.pendingChanges.get(e);return r&&r.mtime===t.mtime?!1:(this.pendingChanges.set(e,t),!0)}async persistManifest(e,t){let r=await we(this.options.localDir),n=r&&r.realmUrl===this.normalizedRealmUrl?r.files:null,s=n?{...n}:{};for(let c of t)delete s[c];for(let c of e){let l=Li.join(this.options.localDir,c);try{s[c]=await se(l)}catch(p){if(p.code!=="ENOENT")throw p}}let o={};for(let[c,l]of this.lastKnownMtimes)l!==0&&(o[c]=l);let a={realmUrl:this.normalizedRealmUrl,files:s};Object.keys(o).length>0&&(a.remoteMtimes=o),await Oe(this.options.localDir,a)}};async function sy(i,e={}){if(i.length===0)return{watchers:[],error:"No realms provided to watch."};let t=e.intervalMs??3e4,r=e.debounceMs??5e3,n=e.quiet??!1,s=e.overwriteLocal??!1;if(!Number.isFinite(t)||t<=0)return{watchers:[],error:"`intervalMs` must be a positive number."};if(!Number.isFinite(r)||r<0)return{watchers:[],error:"`debounceMs` must be a non-negative number."};let o;if(e.authenticator)o=e.authenticator;else{let d=ye({realmUrl:i[0].realmUrl,realmSecretSeed:e.realmSecretSeed,profileManager:e.profileManager});if(!d.ok)return{watchers:[],error:d.error};o=d.authenticator}let a=[];for(let d of i){let h=await dp(d.localDir,d.realmUrl);if(!h.ok){for(let b of a)await Ai(b);return{watchers:[],error:oy(d.localDir,h.existing)}}h.staleOverwrote&&!n&&console.log(`${x}[${ji()}] overwrote stale lock at ${d.localDir}${m}`),a.push(d.localDir)}let c=[];for(let d of i){let h=new Ln(d,o,{debounceMs:r,overwriteLocal:s});try{await h.initialize()}catch(b){for(let j of c)j.shutdown();for(let j of a)await Ai(j);return{watchers:[],error:`Failed to initialize watch on ${d.realmUrl}: ${b instanceof Error?b.message:String(b)}`}}c.push(h)}if(!n){console.log(`${_}\u21C5 Watching ${c.length} realm${c.length>1?"s":""}:${m}`);for(let d of c)console.log(` ${d.name} ${x}\u2192${m} ${d.localDir}`);console.log(` ${x}Interval: ${t/1e3}s, Debounce: ${r/1e3}s${m}`),console.log(` ${x}Press Ctrl+C to stop${m}
|
|
110
|
+
`)}let l=async()=>{await Promise.all(c.map(async d=>{try{await d.poll()&&(n||console.log(`${x}[${ji()}]${m} [${d.name}] ${L}\u26A1 ${d.pendingCount} change(s) detected${m}`),d.scheduleFlush(b=>{n||ay(d.name,b)}))}catch(h){console.error(`${g}[${d.name}] poll error:${m}`,h instanceof Error?h.message:h)}}))},p=!1,u=null,f=()=>{p||(u=setTimeout(async()=>{u=null,!p&&(await l(),f())},t))};try{await bp(i.map(d=>d.localDir).join(", "))}catch{}return await l(),f(),await new Promise(d=>{let h=null,b=null,j=async()=>{if(!p){p=!0,u!==null&&(clearTimeout(u),u=null);for(let te of c)te.shutdown();h&&process.off("SIGINT",h),b&&process.off("SIGTERM",b);for(let te of a)try{await Ai(te)}catch{}try{await yp()}catch{}d()}};if(e.signal){if(e.signal.aborted){j();return}e.signal.addEventListener("abort",()=>void j(),{once:!0})}else h=()=>{n||console.log(`
|
|
111
|
+
${_}\u21C5 Watch stopped${m}`),j()},b=h,process.on("SIGINT",h),process.on("SIGTERM",b)}),{watchers:c}}function oy(i,e){return`A boxel realm watch process is already active for ${i} (pid ${e.pid}, started ${e.startedAt}). Stop it before starting a new one, or remove ${Li.join(i,".boxel-watch.lock")} if it's stale.`}function ay(i,e){let t=e.pulled.length+e.deleted.length;if(t>0&&(console.log(`${x}[${ji()}]${m} [${i}] ${R}applied ${t} change(s)${m} (${e.pulled.length} pulled, ${e.deleted.length} deleted)`),e.checkpoint)){let r=e.checkpoint.isMajor?"[MAJOR]":"[minor]";console.log(` ${x}Checkpoint:${m} ${e.checkpoint.shortHash} ${r} ${e.checkpoint.message}`)}for(let r of e.skipped)console.log(`${x}[${ji()}]${m} [${i}] ${L}\u26A0 skipped ${r}: local diverges from sync manifest (rerun with --overwrite-local to discard, or \`boxel realm sync\` to reconcile)${m}`)}function cy(i){return i.replace(/\/$/,"").split("/").slice(-2).join("/")}function ji(){return new Date().toLocaleTimeString()}function ly(i){return e=>{let t=Number.parseFloat(e);if(!Number.isFinite(t)||t<=0)throw new jn.InvalidArgumentError(`${i} must be a positive number.`);return t}}function py(i){return e=>{let t=Number.parseFloat(e);if(!Number.isFinite(t)||t<0)throw new jn.InvalidArgumentError(`${i} must be a non-negative number.`);return t}}function Ep(i){i.command("start").description("Start watching a Boxel realm for server-side changes and pull them into a local directory").argument("<realm-url>","The URL of the realm to watch (e.g., https://app.boxel.ai/demo/)").argument("<local-dir>","The local directory to write changes into").option("-i, --interval <seconds>","Polling interval in seconds",ly("--interval"),30).option("-d, --debounce <seconds>","Seconds to wait after a burst of changes before applying them",py("--debounce"),5).option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").option("--overwrite-local","Overwrite local files when the remote changes. Default: skip + warn when the local copy diverges from the sync manifest.").action(async(e,t,r)=>{let n=await ve(r.realmSecretSeed===!0),s=await sy([{realmUrl:e,localDir:t}],{intervalMs:r.interval*1e3,debounceMs:r.debounce*1e3,realmSecretSeed:n,overwriteLocal:r.overwriteLocal===!0});s.error&&(console.error(`${g}Error:${m} ${s.error}`),process.exit(1))})}var Mn=require("child_process");var uy=200;function my(i){return new Promise(e=>setTimeout(e,i))}function Rp(i){try{if(process.platform==="win32")try{process.kill(i)}catch{(0,Mn.execSync)(`taskkill /PID ${i} /F`,{stdio:"ignore"})}else process.kill(i,"SIGINT");return{ok:!0,alreadyGone:!1}}catch(e){return e?.code==="ESRCH"?{ok:!0,alreadyGone:!0}:{ok:!1,alreadyGone:!1}}}function dy(){if(process.platform==="win32")return[];let i;try{i=(0,Mn.execSync)('ps aux | grep -E "(tsx[[:space:]].*src/index\\.ts[[:space:]]+realm[[:space:]]+watch[[:space:]]+start|[[:space:]]boxel[[:space:]]+realm[[:space:]]+watch[[:space:]]+start|node[[:space:]].*boxel[[:space:]]+realm[[:space:]]+watch[[:space:]]+start)" | grep -v grep | grep -v "[[:space:]]stop"',{encoding:"utf8"}).trim()}catch{return[]}if(!i)return[];let e=[],t=new Set;for(let r of i.split(`
|
|
112
|
+
`)){if(!r)continue;let n=r.trim().split(/\s+/),s=Number.parseInt(n[1]??"",10);if(!Number.isFinite(s)||t.has(s))continue;t.add(s);let o=".",a=r.match(/\bstart\s+\S+\s+(\S+)/);a&&a[1]&&!a[1].startsWith("-")&&(o=a[1]),e.push({pid:s,workspace:o})}return e}async function fy(){let i=[],e=[],t=new Set,r=await An();for(let n of r){if(n.pid===process.pid)continue;t.add(n.pid);let s=Rp(n.pid),o={pid:n.pid,workspace:n.workspace};s.ok?i.push(o):e.push(o)}for(let n of dy()){if(n.pid===process.pid||t.has(n.pid))continue;t.add(n.pid);let s=Rp(n.pid),o={pid:n.pid,workspace:n.workspace};s.ok?i.push(o):e.push(o)}return i.length>0&&(await my(uy),await An()),{stopped:i,failed:e}}function hy(i){if(i.stopped.length===0&&i.failed.length===0){console.log("No running watch processes found.");return}for(let e of i.stopped)console.log(` ${x}\u21C5${m} Stopped: boxel realm watch ${e.workspace} (PID ${e.pid})`);for(let e of i.failed)console.log(` ${g}\xD7${m} Failed to stop: boxel realm watch ${e.workspace} (PID ${e.pid})`);if(i.stopped.length>0){let e=i.stopped.length>1?"es":"";console.log(`
|
|
113
|
+
${R}\u2713 Stopped ${i.stopped.length} process${e}${m}`)}}function $p(i){i.command("stop").description("Stop all running boxel realm watch processes").action(async()=>{let e=await fy();hy(e)})}function kp(i){let e=i.command("watch").description("Watch a Boxel realm; subcommands manage watch processes");Ep(e),$p(e)}function Sp(i){let e=i.command("realm").description("Manage realms on the realm server");yl(e),$l(e),Hl(e),Wl(e),Vl(e),Xl(e),ep(e),ip(e),np(e);let t=lp(e);cp(t),Bl(e),up(e),kp(e)}async function gy(i,e,t){let r=t?.profileManager??C();if(!r.getActiveProfile())return{ok:!1,error:A};if(U(e))return{ok:!1,error:`Cannot delete protected file: ${e}`};let s=new URL(e,k(i)).href,o;try{o=await r.authedRealmFetch(s,{method:"DELETE",headers:{Accept:"application/vnd.card+source"}})}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}if(!o.ok){let a=await o.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${o.status}: ${a.slice(0,300)}`}}return{ok:!0}}function _p(i){i.command("delete").description("Delete a file from a realm").argument("<path>","Realm-relative file path to delete").requiredOption("--realm <realm-url>","The realm URL to delete from").option("--json","Output raw JSON response").action(async(e,t)=>{let r;try{r=await gy(t.realm,e)}catch(n){console.error(`${g}Error:${m} ${n instanceof Error?n.message:String(n)}`),process.exit(1)}t.json?I.output(JSON.stringify(r,null,2)):r.ok?console.log(`${x}Deleted:${m} ${e}`):console.error(`${g}Error:${m} ${r.error}`),r.ok||process.exit(1)})}async function In(i,e,t){let r=t?.profileManager??C();if(!r.getActiveProfile())return{ok:!1,error:A};let s=new URL(e,k(i)).href,o;try{o=await r.authedRealmFetch(s,{method:"GET",headers:{Accept:"application/vnd.card+source"}})}catch(c){return{ok:!1,error:c instanceof Error?c.message:String(c)}}if(!o.ok){let c=await o.text().catch(()=>"(no body)");return{ok:!1,status:o.status,error:`HTTP ${o.status}: ${c.slice(0,300)}`}}if(be(e)){let c=new Uint8Array(await o.arrayBuffer());return{ok:!0,status:o.status,bytes:c}}let a=await o.text();return{ok:!0,status:o.status,content:a}}function Cp(i){i.command("read").description("Read a file from a realm").argument("<path>","Realm-relative file path (e.g., hello-world.json, Cards/my-card.gts)").requiredOption("--realm <realm-url>","The realm URL to read from").option("--json","Output raw JSON response").action(async(e,t)=>{let r;try{r=await In(t.realm,e)}catch(n){console.error(`${g}Error:${m} ${n instanceof Error?n.message:String(n)}`),process.exit(1)}if(t.json){let n={ok:r.ok,status:r.status,error:r.error};r.content!==void 0&&(n.content=r.content),r.bytes!==void 0&&(n.bytesBase64=Buffer.from(r.bytes.buffer,r.bytes.byteOffset,r.bytes.byteLength).toString("base64")),I.output(JSON.stringify(n,null,2))}else r.ok?r.bytes!==void 0?process.stdout.write(r.bytes):I.output(r.content??""):(console.error(`${x}Status:${m} ${r.status??"(no status)"}`),console.error(`${g}Error:${m} ${r.error}`));r.ok||process.exit(1)})}var Nn="// touched for re-index";async function xy(i,e,t){let r=t?.profileManager??C();if(!r.getActiveProfile())return{ok:!1,touched:[],skipped:[],error:A};let s;if(t?.all){if(e.length>0)return{ok:!1,touched:[],skipped:[],error:"Cannot pass file paths together with --all"};let c=await Fe(i,{profileManager:r});if(c.error)return{ok:!1,touched:[],skipped:[],error:c.error};s=c.filenames.filter(l=>(l.endsWith(".json")||l.endsWith(".gts"))&&!U(l))}else{if(e.length===0)return{ok:!1,touched:[],skipped:[],error:"No file paths provided. Pass paths or use --all."};s=e}let o=[],a=[];for(let c of s){if(!c.endsWith(".json")&&!c.endsWith(".gts")){a.push({path:c,reason:"unsupported extension"});continue}if(U(c)){a.push({path:c,reason:"protected file"});continue}let l=await In(i,c,{profileManager:r});if(!l.ok||l.content==null){a.push({path:c,reason:l.error??"read failed"});continue}if(t?.dryRun){o.push(c);continue}let p=c.endsWith(".json")?vy(l.content):yy(l.content),u=await bt(i,c,p,{profileManager:r});if(!u.ok){a.push({path:c,reason:u.error??"write failed"});continue}o.push(c)}return{ok:a.length===0,touched:o,skipped:a}}function vy(i){try{let e=JSON.parse(i);if(e?.data)return e.data.meta={...e.data.meta??{},_touched:Date.now()},JSON.stringify(e,null,2)+`
|
|
114
|
+
`}catch{}return by(i)}function by(i){return i.endsWith(`
|
|
115
115
|
|
|
116
116
|
`)?i.slice(0,-1):i+`
|
|
117
|
-
`}function
|
|
118
|
-
${
|
|
117
|
+
`}function yy(i){let e=`
|
|
118
|
+
${Nn}
|
|
119
119
|
`;return i.endsWith(e)?i.slice(0,-e.length)+`
|
|
120
120
|
`:i.endsWith(`
|
|
121
|
-
`)?i+
|
|
121
|
+
`)?i+Nn+`
|
|
122
122
|
`:i+`
|
|
123
|
-
`+
|
|
124
|
-
`}function
|
|
125
|
-
${
|
|
126
|
-
`)}),p.on("pageerror",
|
|
127
|
-
`)}));let u=i.pm.getRealmToken(i.targetRealm);if(u){let
|
|
123
|
+
`+Nn+`
|
|
124
|
+
`}function Tp(i){i.command("touch").description("Force realm re-indexing of one or more files by making a semantically-neutral edit. --all touches every .json/.gts in the realm without confirmation; use with care.").argument("[paths...]","Realm-relative file path(s) to touch (omit when using --all)").requiredOption("--realm <realm-url>","The realm URL to touch files in").option("--all","Touch every .json and .gts file in the realm").option("--dry-run","Print files that would be touched without writing").option("--json","Output raw JSON response").action(async(e,t)=>{let r;try{r=await xy(t.realm,e,{all:t.all,dryRun:t.dryRun})}catch(n){console.error(`${g}Error:${m} ${n instanceof Error?n.message:String(n)}`),process.exit(1)}if(t.json)console.log(JSON.stringify(r,null,2));else if(r.error)console.error(`${g}Error:${m} ${r.error}`);else{let n=t.dryRun?`${x}[dry-run]${m} `:"";for(let o of r.touched)console.log(`${n}${R}touched${m} ${o}`);for(let{path:o,reason:a}of r.skipped)console.log(`${g}skipped${m} ${o} ${x}(${a})${m}`);let s=t.dryRun?"would touch":"touched";console.log(`
|
|
125
|
+
${x}${s} ${r.touched.length} file(s)${r.skipped.length>0?`, skipped ${r.skipped.length}`:""}${m}`)}r.ok||process.exit(1)})}function Op(i){let e=i.command("file").description("Read, write, and manage files in a realm");_p(e),pl(e),ll(e),Cp(e),Tp(e),cl(e)}async function wy(i,e,t){let r=t?.profileManager??C(),n=r.getActiveProfile();if(!n)throw new Error("No active profile. Run `boxel profile add` to create one.");let o=`${n.profile.realmServerUrl.replace(/\/$/,"")}/_run-command`,a={data:{type:"run-command",attributes:{realmURL:e,command:i,commandInput:t?.input??null}}},c;try{c=await r.authedRealmServerFetch(o,{method:"POST",headers:{"Content-Type":"application/vnd.api+json",Accept:"application/vnd.api+json"},body:JSON.stringify(a)})}catch(u){return{status:"error",error:`run-command fetch failed: ${u instanceof Error?u.message:String(u)}`}}if(!c.ok){let u=await c.text().catch(()=>"(no body)");return{status:"error",error:`run-command HTTP ${c.status}: ${u}`}}let l;try{l=await c.json()}catch{return{status:"error",error:`run-command response was not valid JSON (HTTP ${c.status})`}}let p=l.data?.attributes;return{status:p?.status??"error",result:p?.cardResultString??null,error:p?.error??null}}function Pp(i){i.command("run-command").description("Execute a host command on the realm server via the prerenderer").argument("<command-specifier>","Command module path (e.g. @cardstack/boxel-host/commands/get-card-type-schema/default)").requiredOption("--realm <realm-url>","The realm URL context for the command").option("--input <json>","JSON string of command input").option("--json","Output raw JSON response").action(async(e,t)=>{let r;if(t.input)try{let s=JSON.parse(t.input);(typeof s!="object"||s===null||Array.isArray(s))&&(console.error(`${g}Error:${m} --input must be a JSON object, got ${Array.isArray(s)?"array":typeof s}`),process.exit(1)),r=s}catch{console.error(`${g}Error:${m} --input is not valid JSON: ${t.input}`),process.exit(1)}let n;try{n=await wy(e,t.realm,{input:r})}catch(s){console.error(`${g}Error:${m} ${s instanceof Error?s.message:String(s)}`),process.exit(1)}if(t.json)I.output(JSON.stringify(n,null,2));else{if(console.log(`${x}Status:${m} ${Ey(n.status)}${n.status}${m}`),n.result){console.log(`${x}Result:${m}`);try{I.output(JSON.stringify(JSON.parse(n.result),null,2))}catch{I.output(n.result)}}n.error&&console.error(`${g}Error:${m} ${n.error}`)}(n.status==="error"||n.status==="unusable")&&process.exit(1)})}function Ey(i){switch(i){case"ready":return R;case"error":return g;default:return _}}var Ap=require("node:child_process"),kt=require("node:fs"),Lp=require("node:http"),W=require("node:path");async function Ry(){try{return(await import("@playwright/test")).chromium}catch(i){let e=i instanceof Error?i.message:String(i);throw new Error(`Could not load @playwright/test (${e}). \`boxel test\` is monorepo-only \u2014 install Playwright in the boxel-cli package via \`pnpm --filter @cardstack/boxel-cli install\` and run \`npx playwright install chromium\` once.`)}}async function $y(i,e){let t=e?.profileManager??C(),r=t.getActiveProfile();if(!r)return Fn(A);let n=k(i),s=k(e?.hostAppUrl??r.profile.realmServerUrl),o;try{let a=await Fe(n,{profileManager:t});if(a.error)return Fn(`Failed to discover test files: ${a.error}`);o=a.filenames.filter(c=>c.endsWith(".test.gts"))}catch(a){return Fn(`Failed to discover test files: ${a instanceof Error?a.message:String(a)}`)}if(o.length===0)return{status:"failed",passedCount:0,failedCount:0,skippedCount:0,durationMs:0,testFiles:[],failures:[],errorMessage:"No `*.test.gts` files found in the realm. Every implementation Issue must ship with at least one test file."};try{let{qunitResults:a,durationMs:c}=await ky({pm:t,targetRealm:n,hostAppUrl:s,hostDistDir:e?.hostDistDir,debug:e?.debug});return{...Oy(a),durationMs:c,testFiles:o}}catch(a){let c=a instanceof Error?a.message:String(a);return{status:"error",passedCount:0,failedCount:0,skippedCount:0,durationMs:0,testFiles:o,failures:[],errorMessage:c}}}async function ky(i){let e=Date.now(),t,r;try{let n=i.hostDistDir??(0,W.join)(Cy()??(0,W.join)((0,W.resolve)(yt(__dirname),".."),"host"),"dist");if(!jp((0,W.join)(n,"tests","index.html")))throw new Error(`Host app dist not found at ${n}. Build the host app (e.g., \`pnpm --filter @cardstack/host build\`) or set TEST_HARNESS_HOST_DIST_PACKAGE_DIR.`);let{url:s,server:o,setHtml:a}=await _y(n);r=o;let c=Sy({assetServerUrl:s,hostDistDir:n,realmProxyUrl:i.hostAppUrl});a(c),t=await(await Ry()).launch({headless:!0});let p=await t.newPage();i.debug&&(p.on("console",b=>{process.stderr.write(`[browser ${b.type()}] ${b.text()}
|
|
126
|
+
`)}),p.on("pageerror",b=>{process.stderr.write(`[browser pageerror] ${b.message}
|
|
127
|
+
`)}));let u=i.pm.getRealmToken(i.targetRealm);if(u){let b=new URL(i.targetRealm).origin;await p.route(`${b}/**`,j=>{let te={...j.request().headers(),Authorization:u};j.continue({headers:te})})}let f=encodeURIComponent(i.targetRealm),d=`${s}?liveTest=true&realmURL=${f}&hidepassed`;return await p.goto(d,{waitUntil:"domcontentloaded"}),await p.waitForFunction(()=>window.__qunitResults?.runEnd!==null,null,{timeout:3e5}),{qunitResults:await p.evaluate(()=>window.__qunitResults),durationMs:Date.now()-e}}finally{t&&await t.close().catch(()=>{}),r&&r.close()}}function Sy(i){let e=i.assetServerUrl.replace(/\/$/,""),t=i.realmProxyUrl.replace(/\/$/,""),r=(0,W.resolve)(i.hostDistDir,"tests","index.html"),n;try{n=(0,kt.readFileSync)(r,"utf8")}catch{throw new Error(`Could not read host test page at ${r}. Build the host app with test support.`)}let s=(n.match(/<meta[^>]+>/g)??[]).filter(l=>!l.includes("charset")&&!l.includes("viewport")).map(l=>{if(!l.includes("config/environment"))return l;let p=l.match(/content="([^"]+)"/);if(!p)return l;try{let u=JSON.parse(decodeURIComponent(p[1]));u.resolvedBaseRealmURL&&(u.resolvedBaseRealmURL=`${t}/base/`),u.resolvedSkillsRealmURL&&(u.resolvedSkillsRealmURL=`${t}/skills/`),u.resolvedOpenRouterRealmURL&&(u.resolvedOpenRouterRealmURL=`${t}/openrouter/`),u.realmServerURL&&(u.realmServerURL=`${t}/`);let f=encodeURIComponent(JSON.stringify(u));return l.replace(/content="[^"]+"/,`content="${f}"`)}catch{return l}}),o=(n.match(/<script[^>]*src="[^"]*"[^>]*><\/script>/g)??[]).filter(l=>!l.includes("testem.js")&&!l.includes("ember-cli-live-reload")).map(l=>l.replace(/src="\/([^"]*)"/g,`src="${e}/$1"`)),a=(n.match(/<link[^>]*rel="stylesheet"[^>]*>/g)??[]).map(l=>l.replace(/href="\/([^"]*)"/g,`href="${e}/$1"`)),c=(n.match(/<script type="module">[^]*?<\/script>/g)??[]).map(l=>l.replace(/from '\/([^']*)'/g,`from '${e}/$1'`));return`<!DOCTYPE html>
|
|
128
128
|
<html>
|
|
129
129
|
<head>
|
|
130
130
|
<meta charset="utf-8">
|
|
@@ -172,18 +172,18 @@ ${g}${s} ${r.touched.length} file(s)${r.skipped.length>0?`, skipped ${r.skipped.
|
|
|
172
172
|
${o.join(`
|
|
173
173
|
`)}
|
|
174
174
|
</body>
|
|
175
|
-
</html>`}async function
|
|
176
|
-
${
|
|
175
|
+
</html>`}async function _y(i){let e={".js":"application/javascript",".css":"text/css",".map":"application/json",".html":"text/html",".wasm":"application/wasm",".svg":"image/svg+xml",".png":"image/png",".woff2":"font/woff2",".woff":"font/woff",".ttf":"font/ttf"},t="",r=n=>{t=n};return new Promise((n,s)=>{let o=(0,Lp.createServer)((a,c)=>{let l=(a.url??"/").split("?")[0];if(l!=="/"){let p=(0,W.normalize)(l.slice(1));if(p.startsWith("..")||p.startsWith("/")){c.writeHead(403),c.end("Forbidden");return}let u=(0,W.resolve)(i,p);if(!u.startsWith((0,W.resolve)(i))){c.writeHead(403),c.end("Forbidden");return}try{let f=(0,kt.readFileSync)(u),d=u.match(/\.[^.]+$/)?.[0]??"",h=e[d]??"application/octet-stream";c.writeHead(200,{"Content-Type":h,"Access-Control-Allow-Origin":"*"}),c.end(f)}catch{c.writeHead(404),c.end("Not found")}return}c.writeHead(200,{"Content-Type":"text/html","Access-Control-Allow-Origin":"*"}),c.end(t)});o.on("error",s),o.listen(0,"127.0.0.1",()=>{let a=o.address();if(!a||typeof a=="string"){s(new Error("Failed to start test page server"));return}n({url:`http://127.0.0.1:${a.port}`,server:o,setHtml:r})})})}function jp(i){try{return(0,kt.statSync)(i).isFile()}catch{return!1}}function Cy(){let i=yt(__dirname),e=(0,W.resolve)(i,".."),t=(0,W.resolve)(e,".."),r=(0,W.join)(e,"host"),n=Ty(t),s=n&&n!==t?(0,W.resolve)(n,"packages","host"):void 0,o=[process.env.TEST_HARNESS_HOST_DIST_PACKAGE_DIR,r,s].filter(c=>!!c).map(c=>(0,W.resolve)(c)),a=new Set;for(let c of o)if(!a.has(c)&&(a.add(c),jp((0,W.join)(c,"dist","index.html"))))return c}function Ty(i){let e=(0,Ap.spawnSync)("git",["rev-parse","--path-format=absolute","--git-common-dir"],{cwd:i,encoding:"utf8",stdio:["ignore","pipe","ignore"]});if(e.status!==0)return;let t=e.stdout.trim();if(t.endsWith(`${(0,W.join)(".git")}`))return(0,W.dirname)(t)}function Oy(i){if(!i.runEnd)return{status:"error",passedCount:0,failedCount:0,skippedCount:0,failures:[],errorMessage:"QUnit did not complete \u2014 runEnd event was not received"};let e=0,t=0,r=0,n=[];for(let o of i.tests)if(o.status==="failed"){t+=1;let a=o.errors[0];n.push({testName:o.name,module:o.module||"default",message:a?.message??"Test failed",...a?.stack?{stackTrace:a.stack.slice(0,500)}:{}})}else o.status==="skipped"||o.status==="todo"?r+=1:e+=1;let s;return i.tests.length===0?s="error":t>0||e===0&&r>0?s="failed":s="passed",{status:s,passedCount:e,failedCount:t,skippedCount:r,failures:n}}function Fn(i){return{status:"error",passedCount:0,failedCount:0,skippedCount:0,durationMs:0,testFiles:[],failures:[],errorMessage:i}}function Mp(i){i.command("test").description("Run the realm's QUnit test suite (every `*.test.gts` file) in a headless Chromium driven against the host app. Monorepo-only: relies on the host app's compiled `dist/` being reachable from this CLI's location (or via TEST_HARNESS_HOST_DIST_PACKAGE_DIR).").requiredOption("--realm <realm-url>","The realm URL to test").option("--host-app-url <url>","Host app URL (compat proxy). Defaults to the active profile's realm-server URL.").option("--host-dist-dir <path>","Override the host app dist directory used to build the test page.").option("--debug","Stream browser console output to stderr").option("--json","Output structured JSON result").action(async e=>{let t;try{t=await $y(e.realm,{...e.hostAppUrl?{hostAppUrl:e.hostAppUrl}:{},...e.hostDistDir?{hostDistDir:e.hostDistDir}:{},...e.debug?{debug:!0}:{}})}catch(n){console.error(`${g}Error:${m} ${n instanceof Error?n.message:String(n)}`),process.exit(1)}if(e.json){I.output(JSON.stringify(t,null,2)),t.status!=="passed"&&process.exit(1);return}if(t.errorMessage&&console.error(`${g}Error:${m} ${t.errorMessage}`),t.testFiles.length===0){console.log(`${x}No .test.gts files found in the realm.${m}`),t.status!=="passed"&&process.exit(1);return}if(t.failures.length>0)for(let n of t.failures)console.log(`
|
|
176
|
+
${g}FAIL${m} ${x}${n.module}${m} \u203A ${n.testName}`),console.log(` ${n.message}`),n.stackTrace&&console.log(` ${x}${n.stackTrace.split(`
|
|
177
177
|
`).slice(0,3).join(`
|
|
178
|
-
`)}${m}`);let r=t.status==="passed"?R:t.status==="failed"?
|
|
179
|
-
${r}${t.status}${m} ${
|
|
178
|
+
`)}${m}`);let r=t.status==="passed"?R:t.status==="failed"?g:g;console.log(`
|
|
179
|
+
${r}${t.status}${m} ${x}\u2014${m} ${t.passedCount} passed, ${t.failedCount} failed${t.skippedCount>0?`, ${t.skippedCount} skipped`:""} ${x}(${t.durationMs}ms across ${t.testFiles.length} file(s))${m}`),t.status!=="passed"&&process.exit(1)})}function Np(i){let e=new Ip.Command;return e.name("boxel").description("CLI tools for Boxel workspace management").version(i).option("-q, --quiet","Suppress informational progress logs (info/log/debug). Errors and warnings, plus command result payloads (JSON, file contents), are still emitted. Use this when invoking the CLI from automation (e.g. the software factory test harness) to keep stdout focused on the result.").hook("preAction",t=>{(t.optsWithGlobals?.()??t.opts()).quiet&&di(!0),Qc(process.cwd())}),e.command("profile").description("Manage saved profiles for different users/environments").argument("[subcommand]","list | add | switch | remove | migrate").argument("[arg]","Profile ID (for switch/remove)").option("-u, --user <matrixId>","Matrix user ID (e.g., @user:boxel.ai)").option("-p, --password <password>","Password (for add command)").option("-n, --name <displayName>","Display name (for add command)").option("-m, --matrix-url <url>","Matrix server URL (for add command with non-standard domains)").option("-r, --realm-server-url <url>","Realm server URL (for add command with non-standard domains)").addHelpText("after",`
|
|
180
180
|
Environment variables (for 'add'):
|
|
181
181
|
BOXEL_PASSWORD Password; preferred over -p to avoid shell history.
|
|
182
182
|
BOXEL_ENVIRONMENT An env-mode slug (e.g. a branch name), interpreted
|
|
183
183
|
like scripts/env-slug.sh: URLs are derived as
|
|
184
184
|
http://matrix.<slug>.localhost and
|
|
185
185
|
http://realm-server.<slug>.localhost/. Overridden
|
|
186
|
-
by --matrix-url / --realm-server-url if provided.`).action(async(t,r,n)=>{n?.password&&console.warn('Warning: Supplying a password via -p/--password may expose it in shell history and process listings. For non-interactive usage, prefer the BOXEL_PASSWORD environment variable or use "boxel profile add" interactively.'),await
|
|
186
|
+
by --matrix-url / --realm-server-url if provided.`).action(async(t,r,n)=>{n?.password&&console.warn('Warning: Supplying a password via -p/--password may expose it in shell history and process listings. For non-interactive usage, prefer the BOXEL_PASSWORD environment variable or use "boxel profile add" interactively.'),await Yc(t,r,n)}),Op(e),ul(e),vl(e),Sp(e),Pp(e),ml(e),Mp(e),bl(e),Zc(e),e}var Py=JSON.parse((0,Fp.readFileSync)((0,Up.resolve)(__dirname,"../package.json"),"utf-8"));process.argv.includes("--quiet")&&di(!0);Np(Py.version).parse();
|
|
187
187
|
/*! Bundled license information:
|
|
188
188
|
|
|
189
189
|
safe-buffer/index.js:
|