diff --git a/build/tsup.config.ts b/build/tsup.config.ts index 512866f8..fdbf1814 100644 --- a/build/tsup.config.ts +++ b/build/tsup.config.ts @@ -37,7 +37,7 @@ ${ if (!dev) { plugins.push( budgetPlugin(pkg.psv.budget), - scssBundlePlugin(), + // scssBundlePlugin(), assetsPlugin({ 'LICENSE': license(), '.npmrc': npmrc(), diff --git a/packages/compass-plugin/src/style.scss b/packages/compass-plugin/src/style.scss index a23c9836..763b04ab 100644 --- a/packages/compass-plugin/src/style.scss +++ b/packages/compass-plugin/src/style.scss @@ -1,4 +1,4 @@ -@import '../../shared/vars'; +@use '../../shared/vars'; $psv-compass-margin: 10px !default; diff --git a/packages/core/src/styles/index.scss b/packages/core/src/styles/index.scss index 81e6e3f0..b91da5a7 100644 --- a/packages/core/src/styles/index.scss +++ b/packages/core/src/styles/index.scss @@ -1,12 +1,9 @@ -@use 'sass:list'; -@use 'sass:map'; -@use 'sass:math'; -@import '../../../shared/vars'; -@import 'viewer'; -@import 'loader'; -@import 'navbar'; -@import 'zoom-range'; -@import 'notification'; -@import 'overlay'; -@import 'panel'; -@import 'tooltip'; +@use 'viewer'; +@use 'loader'; +@use 'navbar'; +@use 'zoom-range'; +@use 'notification'; +@use 'overlay'; +@use 'panel'; +@use 'tooltip'; +@forward '../../../shared/vars'; diff --git a/packages/core/src/styles/loader.scss b/packages/core/src/styles/loader.scss index 357ddb3c..2d2135f3 100644 --- a/packages/core/src/styles/loader.scss +++ b/packages/core/src/styles/loader.scss @@ -1,3 +1,5 @@ +@use '../../../shared/vars' as psv; + .psv-loader-container { display: flex; align-items: center; @@ -7,20 +9,20 @@ left: 0; width: 100%; height: 100%; - z-index: $psv-loader-zindex; + z-index: psv.$loader-zindex; } .psv-loader { - --psv-loader-border: #{$psv-loader-border}; - --psv-loader-tickness: #{$psv-loader-tickness}; + --psv-loader-border: #{psv.$loader-border}; + --psv-loader-tickness: #{psv.$loader-tickness}; position: relative; display: flex; justify-content: center; align-items: center; - color: $psv-loader-color; - width: $psv-loader-width; - height: $psv-loader-width; + color: psv.$loader-color; + width: psv.$loader-width; + height: psv.$loader-width; &-canvas { position: absolute; @@ -28,12 +30,12 @@ left: 0; width: 100%; height: 100%; - color: $psv-loader-bg-color; + color: psv.$loader-bg-color; z-index: -1; } &-text { - font: $psv-loader-font; + font: psv.$loader-font; text-align: center; } } diff --git a/packages/core/src/styles/navbar.scss b/packages/core/src/styles/navbar.scss index 96fc611e..32e7bd01 100644 --- a/packages/core/src/styles/navbar.scss +++ b/packages/core/src/styles/navbar.scss @@ -1,14 +1,17 @@ +@use 'sass:list'; +@use '../../../shared/vars' as psv; + .psv-navbar { display: flex; position: absolute; - z-index: $psv-navbar-zindex; - bottom: -$psv-navbar-height; + z-index: psv.$navbar-zindex; + bottom: -#{psv.$navbar-height}; left: 0; width: 100%; - height: $psv-navbar-height; - background: $psv-navbar-background; + height: psv.$navbar-height; + background: psv.$navbar-background; transition: bottom ease-in-out 0.1s; - font: $psv-caption-font; + font: psv.$caption-font; cursor: default; &--open { @@ -23,47 +26,47 @@ .psv-button { flex: 0 0 auto; - padding: $psv-buttons-padding; + padding: psv.$buttons-padding; position: relative; cursor: pointer; - height: $psv-buttons-height; - width: $psv-buttons-height; - background: $psv-buttons-background; - color: $psv-buttons-color; + height: psv.$buttons-height; + width: psv.$buttons-height; + background: psv.$buttons-background; + color: psv.$buttons-color; &--active { - background: $psv-buttons-active-background; + background: psv.$buttons-active-background; } &--disabled { pointer-events: none; - opacity: $psv-buttons-disabled-opacity; + opacity: psv.$buttons-disabled-opacity; } &-svg { width: 100%; transform: scale(1); - transition: transform $psv-buttons-hover-scale-delay ease; + transition: transform psv.$buttons-hover-scale-delay ease; vertical-align: initial; } } .psv-button:not(.psv-button--disabled):focus-visible { - outline: $psv-element-focus-outline; - outline-offset: -#{list.nth($psv-element-focus-outline, 1)}; + outline: psv.$element-focus-outline; + outline-offset: -#{list.nth(psv.$element-focus-outline, 1)}; } .psv-container:not(.psv--is-touch) .psv-button--hover-scale:not(.psv-button--disabled):hover .psv-button-svg { - transform: scale($psv-buttons-hover-scale); + transform: scale(psv.$buttons-hover-scale); } .psv-move-button + .psv-move-button { - margin-left: -$psv-buttons-padding; + margin-left: -#{psv.$buttons-padding}; } .psv-custom-button { width: auto; - min-width: $psv-buttons-height; + min-width: psv.$buttons-height; &--no-padding { padding: 0; @@ -73,7 +76,7 @@ .psv-caption { flex: 1 1 100%; - color: $psv-caption-text-color; + color: psv.$caption-text-color; overflow: hidden; text-align: center; cursor: unset; @@ -83,7 +86,7 @@ &-content { display: inline-block; - padding: $psv-buttons-padding; + padding: psv.$buttons-padding; white-space: nowrap; } } diff --git a/packages/core/src/styles/notification.scss b/packages/core/src/styles/notification.scss index c3adacfa..b309ed95 100644 --- a/packages/core/src/styles/notification.scss +++ b/packages/core/src/styles/notification.scss @@ -1,7 +1,9 @@ +@use '../../../shared/vars' as psv; + .psv-notification { position: absolute; - z-index: $psv-notification-zindex; - bottom: $psv-notification-position-from; + z-index: psv.$notification-zindex; + bottom: psv.$notification-position-from; display: flex; justify-content: center; box-sizing: border-box; @@ -10,19 +12,19 @@ opacity: 0; transition-property: opacity, bottom; transition-timing-function: ease-in-out; - transition-duration: $psv-notification-animate-delay; + transition-duration: psv.$notification-animate-delay; &-content { max-width: 50em; - background: $psv-notification-background; - border-radius: $psv-notification-radius; - padding: $psv-notification-padding; - font: $psv-notification-font; - color: $psv-notification-text-color; + background: psv.$notification-background; + border-radius: psv.$notification-radius; + padding: psv.$notification-padding; + font: psv.$notification-font; + color: psv.$notification-text-color; } &--visible { opacity: 100; - bottom: $psv-notification-position-to; + bottom: psv.$notification-position-to; } } diff --git a/packages/core/src/styles/overlay.scss b/packages/core/src/styles/overlay.scss index eedb1c70..968cb2a7 100644 --- a/packages/core/src/styles/overlay.scss +++ b/packages/core/src/styles/overlay.scss @@ -1,39 +1,42 @@ +@use 'sass:map'; +@use '../../../shared/vars' as psv; + .psv-overlay { display: flex; flex-direction: column; align-items: center; justify-content: center; position: absolute; - z-index: $psv-overlay-zindex; + z-index: psv.$overlay-zindex; inset: 0; - background: $psv-main-background; - opacity: $psv-overlay-opacity; + background: psv.$main-background; + opacity: psv.$overlay-opacity; cursor: default; &-image { width: 100%; text-align: center; - color: $psv-overlay-icon-color; + color: psv.$overlay-icon-color; svg { - width: map.get($psv-overlay-image-size, portrait); + width: map.get(psv.$overlay-image-size, portrait); @container psv-container (orientation: landscape) { - width: map.get($psv-overlay-image-size, landscape); + width: map.get(psv.$overlay-image-size, landscape); } } } &-title { - color: $psv-overlay-title-color; + color: psv.$overlay-title-color; margin-top: 1em; - font: $psv-overlay-title-font; + font: psv.$overlay-title-font; text-align: center; } &-text { - color: $psv-overlay-text-color; - font: $psv-overlay-text-font; + color: psv.$overlay-text-color; + font: psv.$overlay-text-font; opacity: 0.8; text-align: center; } diff --git a/packages/core/src/styles/panel.scss b/packages/core/src/styles/panel.scss index 1b76feb6..3f83770e 100644 --- a/packages/core/src/styles/panel.scss +++ b/packages/core/src/styles/panel.scss @@ -1,3 +1,7 @@ +@use 'sass:math'; +@use 'sass:list'; +@use '../../../shared/vars' as psv; + @function make-dot-shadow($color, $w, $h) { $val: 1px 0 $color; $x: 3; @@ -18,22 +22,22 @@ .psv-panel { position: absolute; - z-index: $psv-panel-zindex; + z-index: psv.$panel-zindex; right: 0; height: 100%; - width: $psv-panel-width; - max-width: calc(100% - #{$psv-panel-resizer-width}); - background: $psv-panel-background; + width: psv.$panel-width; + max-width: calc(100% - #{psv.$panel-resizer-width}); + background: psv.$panel-background; transform: translate3d(100%, 0, 0); opacity: 0; transition-property: opacity, transform; transition-timing-function: ease-in-out; - transition-duration: $psv-panel-animate-delay; + transition-duration: psv.$panel-animate-delay; cursor: default; - margin-left: $psv-panel-resizer-width; + margin-left: psv.$panel-resizer-width; .psv--has-navbar & { - height: calc(100% - #{$psv-navbar-height}); + height: calc(100% - #{psv.$navbar-height}); } &-close-button { @@ -41,20 +45,20 @@ position: absolute; top: -1px; right: 0; - width: math.div($psv-panel-close-button-size, 5) * 3; - height: math.div($psv-panel-close-button-size, 5) * 3; - padding: math.div($psv-panel-close-button-size, 5); + width: math.div(psv.$panel-close-button-size, 5) * 3; + height: math.div(psv.$panel-close-button-size, 5) * 3; + padding: math.div(psv.$panel-close-button-size, 5); background: transparent; - color: $psv-panel-close-button-color; - transition: background $psv-panel-close-button-animate-delay ease-in-out; + color: psv.$panel-close-button-color; + transition: background psv.$panel-close-button-animate-delay ease-in-out; cursor: pointer; svg { - transition: transform $psv-panel-close-button-animate-delay ease-in-out; + transition: transform psv.$panel-close-button-animate-delay ease-in-out; } &:hover { - background: $psv-panel-close-button-background; + background: psv.$panel-close-button-background; svg { transform: scale(-1); @@ -66,27 +70,27 @@ display: none; position: absolute; top: 0; - left: -$psv-panel-resizer-width; - width: $psv-panel-resizer-width; + left: -#{psv.$panel-resizer-width}; + width: psv.$panel-resizer-width; height: 100%; - background-color: $psv-panel-resizer-background; + background-color: psv.$panel-resizer-background; cursor: col-resize; - $psv-panel-resizer-grip-width: $psv-panel-resizer-width - 4px; + $panel-resizer-grip-width: psv.$panel-resizer-width - 4px; - @if $psv-panel-resizer-grip-width > 0 { + @if $panel-resizer-grip-width > 0 { &::before { content: ''; position: absolute; top: 50%; - left: ($psv-panel-resizer-width - $psv-panel-resizer-grip-width) * 0.5 - 1px; - margin-top: (-$psv-panel-resizer-grip-height * 0.5); + left: #{psv.$panel-resizer-width - $panel-resizer-grip-width * 0.5 - 1px}; + margin-top: -#{psv.$panel-resizer-grip-height * 0.5}; width: 1px; height: 1px; box-shadow: make-dot-shadow( - $psv-panel-resizer-grip-color, - $psv-panel-resizer-grip-width, - $psv-panel-resizer-grip-height + psv.$panel-resizer-grip-color, + $panel-resizer-grip-width, + psv.$panel-resizer-grip-height ); background: transparent; } @@ -97,12 +101,12 @@ width: 100%; height: 100%; box-sizing: border-box; - color: $psv-panel-text-color; - font: $psv-panel-font; + color: psv.$panel-text-color; + font: psv.$panel-font; overflow: auto; &:not(&--no-margin) { - padding: $psv-panel-padding; + padding: psv.$panel-padding; } &--no-interaction { @@ -122,7 +126,7 @@ } } - @container psv-container (max-width: #{$psv-panel-width}) { + @container psv-container (max-width: #{psv.$panel-width}) { width: 100% !important; max-width: none; @@ -141,14 +145,14 @@ flex: none; display: flex; align-items: center; - font: $psv-panel-title-font; - margin: $psv-panel-title-margin $psv-panel-title-margin * 0.5; + font: psv.$panel-title-font; + margin: psv.$panel-title-margin psv.$panel-title-margin * 0.5; /* stylelint-disable-next-line no-descending-specificity */ svg { - width: $psv-panel-title-icon-size; - height: $psv-panel-title-icon-size; - margin-right: $psv-panel-title-margin * 0.5; + width: psv.$panel-title-icon-size; + height: psv.$panel-title-icon-size; + margin-right: psv.$panel-title-margin * 0.5; } } @@ -161,8 +165,8 @@ } &-item { - min-height: $psv-panel-menu-item-height; - padding: $psv-panel-menu-item-padding; + min-height: psv.$panel-menu-item-height; + padding: psv.$panel-menu-item-padding; cursor: pointer; display: flex; align-items: center; @@ -170,15 +174,15 @@ transition: background 0.1s ease-in-out; &--active { - outline: $psv-panel-menu-item-active-outline solid currentcolor; - outline-offset: -$psv-panel-menu-item-active-outline; + outline: psv.$panel-menu-item-active-outline solid currentcolor; + outline-offset: -#{psv.$panel-menu-item-active-outline}; } &-icon { flex: none; - height: $psv-panel-menu-item-height; - width: $psv-panel-menu-item-height; - margin-right: #{list.nth($psv-panel-menu-item-padding, 1)}; + height: psv.$panel-menu-item-height; + width: psv.$panel-menu-item-height; + margin-right: #{list.nth(psv.$panel-menu-item-padding, 1)}; img { max-width: 100%; @@ -193,28 +197,28 @@ } &:focus-visible { - outline: $psv-element-focus-outline; - outline-offset: -#{list.nth($psv-element-focus-outline, 1)}; + outline: psv.$element-focus-outline; + outline-offset: -#{list.nth(psv.$element-focus-outline, 1)}; } } &--stripped &-item { &:hover { - background: $psv-panel-menu-hover-background; + background: psv.$panel-menu-hover-background; } &:nth-child(odd), &:nth-child(odd)::before { - background: $psv-panel-menu-odd-background; + background: psv.$panel-menu-odd-background; } &:nth-child(even), &:nth-child(even)::before { - background: $psv-panel-menu-even-background; + background: psv.$panel-menu-even-background; } } } .psv-container:not(.psv--is-touch) .psv-panel-menu-item:hover { - background: $psv-panel-menu-hover-background; + background: psv.$panel-menu-hover-background; } diff --git a/packages/core/src/styles/tooltip.scss b/packages/core/src/styles/tooltip.scss index 0452ea51..ba5e8b5b 100644 --- a/packages/core/src/styles/tooltip.scss +++ b/packages/core/src/styles/tooltip.scss @@ -1,104 +1,106 @@ +@use '../../../shared/vars' as psv; + .psv-tooltip { position: absolute; - z-index: $psv-tooltip-zindex; + z-index: psv.$tooltip-zindex; box-sizing: border-box; - max-width: $psv-tooltip-max-width; - background: $psv-tooltip-background; - border-radius: $psv-tooltip-radius; + max-width: psv.$tooltip-max-width; + background: psv.$tooltip-background; + border-radius: psv.$tooltip-radius; opacity: 0; transition-property: opacity, transform; transition-timing-function: ease-in-out; - transition-duration: $psv-tooltip-animate-delay; + transition-duration: psv.$tooltip-animate-delay; cursor: default; &-content { - color: $psv-tooltip-text-color; - font: $psv-tooltip-font; - text-shadow: $psv-tooltip-text-shadow; - padding: $psv-tooltip-padding; + color: psv.$tooltip-text-color; + font: psv.$tooltip-font; + text-shadow: psv.$tooltip-text-shadow; + padding: psv.$tooltip-padding; } &-arrow { position: absolute; height: 0; width: 0; - border: $psv-tooltip-arrow-size solid transparent; + border: psv.$tooltip-arrow-size solid transparent; } &--top-left, &--top-center, &--top-right { - transform: translate3d(0, $psv-tooltip-animate-offset, 0); + transform: translate3d(0, psv.$tooltip-animate-offset, 0); .psv-tooltip-arrow { - border-top-color: $psv-tooltip-background; + border-top-color: psv.$tooltip-background; } } &--bottom-left, &--bottom-center, &--bottom-right { - transform: translate3d(0, -$psv-tooltip-animate-offset, 0); + transform: translate3d(0, -#{psv.$tooltip-animate-offset}, 0); .psv-tooltip-arrow { - border-bottom-color: $psv-tooltip-background; + border-bottom-color: psv.$tooltip-background; } } &--left-top, &--center-left, &--left-bottom { - transform: translate3d($psv-tooltip-animate-offset, 0, 0); + transform: translate3d(psv.$tooltip-animate-offset, 0, 0); .psv-tooltip-arrow { - border-left-color: $psv-tooltip-background; + border-left-color: psv.$tooltip-background; } } &--right-top, &--center-right, &--right-bottom { - transform: translate3d(-$psv-tooltip-animate-offset, 0, 0); + transform: translate3d(-#{psv.$tooltip-animate-offset}, 0, 0); .psv-tooltip-arrow { - border-right-color: $psv-tooltip-background; + border-right-color: psv.$tooltip-background; } } &--left-top, &--top-left { - box-shadow: #{-$psv-tooltip-shadow-offset} #{-$psv-tooltip-shadow-offset} 0 $psv-tooltip-shadow-color; + box-shadow: -#{psv.$tooltip-shadow-offset} -#{psv.$tooltip-shadow-offset} 0 psv.$tooltip-shadow-color; } &--top-center { - box-shadow: 0 #{-$psv-tooltip-shadow-offset} 0 $psv-tooltip-shadow-color; + box-shadow: 0 -#{psv.$tooltip-shadow-offset} 0 psv.$tooltip-shadow-color; } &--right-top, &--top-right { - box-shadow: $psv-tooltip-shadow-offset #{-$psv-tooltip-shadow-offset} 0 $psv-tooltip-shadow-color; + box-shadow: psv.$tooltip-shadow-offset -#{psv.$tooltip-shadow-offset} 0 psv.$tooltip-shadow-color; } &--left-bottom, &--bottom-left { - box-shadow: #{-$psv-tooltip-shadow-offset} $psv-tooltip-shadow-offset 0 $psv-tooltip-shadow-color; + box-shadow: -#{psv.$tooltip-shadow-offset} psv.$tooltip-shadow-offset 0 psv.$tooltip-shadow-color; } &--bottom-center { - box-shadow: 0 $psv-tooltip-shadow-offset 0 $psv-tooltip-shadow-color; + box-shadow: 0 psv.$tooltip-shadow-offset 0 psv.$tooltip-shadow-color; } &--right-bottom, &--bottom-right { - box-shadow: $psv-tooltip-shadow-offset $psv-tooltip-shadow-offset 0 $psv-tooltip-shadow-color; + box-shadow: psv.$tooltip-shadow-offset psv.$tooltip-shadow-offset 0 psv.$tooltip-shadow-color; } &--center-left { - box-shadow: #{-$psv-tooltip-shadow-offset} 0 0 $psv-tooltip-shadow-color; + box-shadow: -#{psv.$tooltip-shadow-offset} 0 0 psv.$tooltip-shadow-color; } &--center-right { - box-shadow: $psv-tooltip-shadow-offset 0 0 $psv-tooltip-shadow-color; + box-shadow: psv.$tooltip-shadow-offset 0 0 psv.$tooltip-shadow-color; } &--visible { diff --git a/packages/core/src/styles/viewer.scss b/packages/core/src/styles/viewer.scss index 5d585962..8675d5dd 100644 --- a/packages/core/src/styles/viewer.scss +++ b/packages/core/src/styles/viewer.scss @@ -1,3 +1,5 @@ +@use '../../../shared/vars' as psv; + .psv-container { --psv-core-loaded: true; @@ -8,7 +10,7 @@ margin: 0; padding: 0; position: relative; - background: $psv-main-background; + background: psv.$main-background; overflow: hidden; * { @@ -20,7 +22,7 @@ position: absolute; top: 0; left: 0; - z-index: $psv-canvas-zindex; + z-index: psv.$canvas-zindex; transition: opacity linear 100ms; } diff --git a/packages/core/src/styles/zoom-range.scss b/packages/core/src/styles/zoom-range.scss index 10088b78..a0ca60bf 100644 --- a/packages/core/src/styles/zoom-range.scss +++ b/packages/core/src/styles/zoom-range.scss @@ -1,34 +1,36 @@ +@use '../../../shared/vars' as psv; + .psv-zoom-range { &.psv-button { - width: $psv-zoom-range-width; - height: $psv-zoom-range-tickness; - margin: $psv-buttons-padding 0; - padding: #{($psv-buttons-height - $psv-zoom-range-tickness) * 0.5} 0; - max-width: $psv-zoom-range-media-min-width; // trick for JS access + width: psv.$zoom-range-width; + height: psv.$zoom-range-tickness; + margin: psv.$buttons-padding 0; + padding: #{(psv.$buttons-height - psv.$zoom-range-tickness) * 0.5} 0; + max-width: psv.$zoom-range-media-min-width; // trick for JS access } &-line { position: relative; - width: $psv-zoom-range-width; - height: $psv-zoom-range-tickness; - background: $psv-buttons-color; + width: psv.$zoom-range-width; + height: psv.$zoom-range-tickness; + background: psv.$buttons-color; transition: all 0.3s ease; } &-handle { position: absolute; border-radius: 50%; - top: #{($psv-zoom-range-tickness - $psv-zoom-range-diameter) * 0.5}; - width: $psv-zoom-range-diameter; - height: $psv-zoom-range-diameter; - background: $psv-buttons-color; + top: #{(psv.$zoom-range-tickness - psv.$zoom-range-diameter) * 0.5}; + width: psv.$zoom-range-diameter; + height: psv.$zoom-range-diameter; + background: psv.$buttons-color; transform: scale(1); transition: transform 0.3s ease; } &:not(.psv-button--disabled):hover { .psv-zoom-range-line { - box-shadow: 0 0 2px $psv-buttons-color; + box-shadow: 0 0 2px psv.$buttons-color; } .psv-zoom-range-handle { diff --git a/packages/gallery-plugin/src/style.scss b/packages/gallery-plugin/src/style.scss index 0d09ec98..5734ef39 100644 --- a/packages/gallery-plugin/src/style.scss +++ b/packages/gallery-plugin/src/style.scss @@ -1,4 +1,4 @@ -@import '../../shared/vars'; +@forward '../../shared/vars'; $psv-gallery-padding: 15px !default; $psv-gallery-border: 1px solid $psv-caption-text-color !default; diff --git a/packages/map-plugin/src/style.scss b/packages/map-plugin/src/style.scss index ba22eb0d..45432e5b 100644 --- a/packages/map-plugin/src/style.scss +++ b/packages/map-plugin/src/style.scss @@ -1,5 +1,5 @@ @use 'sass:math'; -@import '../../shared/vars'; +@use '../../shared/vars'; $psv-map-margin: 10px !default; $psv-map-radius: 8px !default; diff --git a/packages/markers-plugin/src/style.scss b/packages/markers-plugin/src/style.scss index 8cf26f05..5e046f4f 100644 --- a/packages/markers-plugin/src/style.scss +++ b/packages/markers-plugin/src/style.scss @@ -1,4 +1,4 @@ -@import '../../shared/vars'; +@use '../../shared/vars'; .psv-container { --psv-markers-plugin-loaded: true; diff --git a/packages/plan-plugin/src/style.scss b/packages/plan-plugin/src/style.scss index 9c5a049e..f9b70028 100644 --- a/packages/plan-plugin/src/style.scss +++ b/packages/plan-plugin/src/style.scss @@ -1,5 +1,5 @@ @use 'sass:math'; -@import '../../shared/vars'; +@use'../../shared/vars'; $psv-plan-margin: 10px !default; $psv-plan-radius: 8px !default; diff --git a/packages/settings-plugin/src/style.scss b/packages/settings-plugin/src/style.scss index 9cc3653c..ce30fd61 100644 --- a/packages/settings-plugin/src/style.scss +++ b/packages/settings-plugin/src/style.scss @@ -1,5 +1,5 @@ @use 'sass:list'; -@import '../../shared/vars'; +@use '../../shared/vars'; $psv-settings-margin: 10px !default; $psv-settings-font: $psv-caption-font !default; diff --git a/packages/shared/_vars.scss b/packages/shared/_vars.scss index 92f9c0b9..7b4d9126 100644 --- a/packages/shared/_vars.scss +++ b/packages/shared/_vars.scss @@ -1,119 +1,119 @@ // *** MAIN *** -$psv-main-background-stops: #fff 0%, +$main-background-stops: #fff 0%, #fdfdfd 16%, #fbfbfb 33%, #f8f8f8 49%, #efefef 66%, #dfdfdf 82%, #bfbfbf 100% !default; -$psv-main-background: radial-gradient($psv-main-background-stops) !default; -$psv-element-focus-outline: 2px solid #007cff !default; +$main-background: radial-gradient($main-background-stops) !default; +$element-focus-outline: 2px solid #007cff !default; // *** LOADER *** -$psv-loader-bg-color: rgba(61, 61, 61, 0.5) !default; -$psv-loader-color: rgba(255, 255, 255, 0.7) !default; -$psv-loader-width: 150px !default; -$psv-loader-tickness: 10px !default; -$psv-loader-border: 3px !default; -$psv-loader-font: 600 16px sans-serif !default; +$loader-bg-color: rgba(61, 61, 61, 0.5) !default; +$loader-color: rgba(255, 255, 255, 0.7) !default; +$loader-width: 150px !default; +$loader-tickness: 10px !default; +$loader-border: 3px !default; +$loader-font: 600 16px sans-serif !default; // *** NAVBAR *** -$psv-navbar-height: 40px !default; -$psv-navbar-background: rgba(61, 61, 61, 0.5) !default; +$navbar-height: 40px !default; +$navbar-background: rgba(61, 61, 61, 0.5) !default; -$psv-caption-font: 16px sans-serif !default; -$psv-caption-text-color: rgba(255, 255, 255, 0.7) !default; +$caption-font: 16px sans-serif !default; +$caption-text-color: rgba(255, 255, 255, 0.7) !default; -$psv-buttons-height: 20px !default; -$psv-buttons-padding: (($psv-navbar-height - $psv-buttons-height) * 0.5) !default; -$psv-buttons-background: transparent !default; -$psv-buttons-active-background: rgba(255, 255, 255, 0.2) !default; -$psv-buttons-color: rgba(255, 255, 255, 0.7) !default; -$psv-buttons-disabled-opacity: 0.5 !default; +$buttons-height: 20px !default; +$buttons-padding: (($navbar-height - $buttons-height) * 0.5) !default; +$buttons-background: transparent !default; +$buttons-active-background: rgba(255, 255, 255, 0.2) !default; +$buttons-color: rgba(255, 255, 255, 0.7) !default; +$buttons-disabled-opacity: 0.5 !default; -$psv-buttons-hover-scale: 1.2 !default; -$psv-buttons-hover-scale-delay: 200ms !default; +$buttons-hover-scale: 1.2 !default; +$buttons-hover-scale-delay: 200ms !default; -$psv-zoom-range-width: 80px !default; -$psv-zoom-range-tickness: 1px !default; -$psv-zoom-range-diameter: 7px !default; -$psv-zoom-range-media-min-width: 600px !default; +$zoom-range-width: 80px !default; +$zoom-range-tickness: 1px !default; +$zoom-range-diameter: 7px !default; +$zoom-range-media-min-width: 600px !default; // *** TOOLTIP *** -$psv-tooltip-background: rgba(61, 61, 61, 0.8) !default; -$psv-tooltip-animate-offset: 5px !default; -$psv-tooltip-animate-delay: 100ms !default; -$psv-tooltip-radius: 4px !default; -$psv-tooltip-padding: 0.5em 1em !default; -$psv-tooltip-arrow-size: 7px !default; -$psv-tooltip-max-width: 200px !default; +$tooltip-background: rgba(61, 61, 61, 0.8) !default; +$tooltip-animate-offset: 5px !default; +$tooltip-animate-delay: 100ms !default; +$tooltip-radius: 4px !default; +$tooltip-padding: 0.5em 1em !default; +$tooltip-arrow-size: 7px !default; +$tooltip-max-width: 200px !default; -$psv-tooltip-text-color: rgb(255, 255, 255) !default; -$psv-tooltip-font: 14px sans-serif !default; -$psv-tooltip-text-shadow: 0 1px #000 !default; +$tooltip-text-color: rgb(255, 255, 255) !default; +$tooltip-font: 14px sans-serif !default; +$tooltip-text-shadow: 0 1px #000 !default; -$psv-tooltip-shadow-color: rgba(90, 90, 90, 0.7) !default; -$psv-tooltip-shadow-offset: 3px !default; // the shadow is always at the opposite side of the arrow +$tooltip-shadow-color: rgba(90, 90, 90, 0.7) !default; +$tooltip-shadow-offset: 3px !default; // the shadow is always at the opposite side of the arrow // *** PANEL *** -$psv-panel-background: rgba(10, 10, 10, 0.7) !default; -$psv-panel-text-color: rgb(220, 220, 220) !default; -$psv-panel-font: 16px sans-serif !default; -$psv-panel-width: 400px !default; -$psv-panel-padding: 1em !default; -$psv-panel-animate-delay: 100ms !default; - -$psv-panel-resizer-width: 9px !default; // must be odd -$psv-panel-resizer-background: rgba(0, 0, 0, 0.9) !default; -$psv-panel-resizer-grip-color: #fff !default; -$psv-panel-resizer-grip-height: 29px !default; // must be odd -$psv-panel-close-button-size: 32px !default; -$psv-panel-close-button-background: $psv-panel-resizer-background !default; -$psv-panel-close-button-color: #fff !default; -$psv-panel-close-button-animate-delay: 300ms !default; - -$psv-panel-title-font: 24px sans-serif !default; -$psv-panel-title-icon-size: 24px !default; -$psv-panel-title-margin: 24px !default; - -$psv-panel-menu-item-height: 1.5em !default; -$psv-panel-menu-item-padding: 0.5em 1em !default; -$psv-panel-menu-item-active-outline: 1px !default; -$psv-panel-menu-odd-background: rgba(255, 255, 255, 0.1) !default; -$psv-panel-menu-even-background: transparent !default; -$psv-panel-menu-hover-background: rgba(255, 255, 255, 0.2) !default; +$panel-background: rgba(10, 10, 10, 0.7) !default; +$panel-text-color: rgb(220, 220, 220) !default; +$panel-font: 16px sans-serif !default; +$panel-width: 400px !default; +$panel-padding: 1em !default; +$panel-animate-delay: 100ms !default; + +$panel-resizer-width: 9px !default; // must be odd +$panel-resizer-background: rgba(0, 0, 0, 0.9) !default; +$panel-resizer-grip-color: #fff !default; +$panel-resizer-grip-height: 29px !default; // must be odd +$panel-close-button-size: 32px !default; +$panel-close-button-background: $panel-resizer-background !default; +$panel-close-button-color: #fff !default; +$panel-close-button-animate-delay: 300ms !default; + +$panel-title-font: 24px sans-serif !default; +$panel-title-icon-size: 24px !default; +$panel-title-margin: 24px !default; + +$panel-menu-item-height: 1.5em !default; +$panel-menu-item-padding: 0.5em 1em !default; +$panel-menu-item-active-outline: 1px !default; +$panel-menu-odd-background: rgba(255, 255, 255, 0.1) !default; +$panel-menu-even-background: transparent !default; +$panel-menu-hover-background: rgba(255, 255, 255, 0.2) !default; // *** NOTIFICATION *** -$psv-notification-position-from: -$psv-navbar-height !default; -$psv-notification-position-to: $psv-navbar-height * 2 !default; -$psv-notification-animate-delay: 200ms !default; -$psv-notification-background: $psv-tooltip-background !default; -$psv-notification-radius: $psv-tooltip-radius !default; -$psv-notification-padding: $psv-tooltip-padding !default; -$psv-notification-font: $psv-tooltip-font !default; -$psv-notification-text-color: $psv-tooltip-text-color !default; +$notification-position-from: -$navbar-height !default; +$notification-position-to: $navbar-height * 2 !default; +$notification-animate-delay: 200ms !default; +$notification-background: $tooltip-background !default; +$notification-radius: $tooltip-radius !default; +$notification-padding: $tooltip-padding !default; +$notification-font: $tooltip-font !default; +$notification-text-color: $tooltip-text-color !default; // *** OVERLAY *** -$psv-overlay-opacity: 0.8 !default; -$psv-overlay-icon-color: rgb(48, 48, 48) !default; -$psv-overlay-title-font: 30px sans-serif !default; -$psv-overlay-title-color: black !default; -$psv-overlay-text-font: 20px sans-serif !default; -$psv-overlay-text-color: rgba(0, 0, 0, 0.8) !default; -$psv-overlay-image-size: ( +$overlay-opacity: 0.8 !default; +$overlay-icon-color: rgb(48, 48, 48) !default; +$overlay-title-font: 30px sans-serif !default; +$overlay-title-color: black !default; +$overlay-text-font: 20px sans-serif !default; +$overlay-text-color: rgba(0, 0, 0, 0.8) !default; +$overlay-image-size: ( portrait: 50%, landscape: 33%, ) !default; // *** Z-INDEXES *** -$psv-canvas-zindex: 0 !default; -$psv-hud-zindex: 10 !default; -$psv-polygon-marker-zindex: 20 !default; -$psv-marker-zindex: 30 !default; -$psv-ui-zindex: 40 !default; -$psv-tooltip-zindex: 50 !default; -$psv-loader-zindex: 80 !default; -$psv-panel-zindex: 90 !default; -$psv-navbar-zindex: 90 !default; -$psv-notification-zindex: 100 !default; -$psv-overlay-zindex: 110 !default; +$canvas-zindex: 0 !default; +$hud-zindex: 10 !default; +$polygon-marker-zindex: 20 !default; +$marker-zindex: 30 !default; +$ui-zindex: 40 !default; +$tooltip-zindex: 50 !default; +$loader-zindex: 80 !default; +$panel-zindex: 90 !default; +$navbar-zindex: 90 !default; +$notification-zindex: 100 !default; +$overlay-zindex: 110 !default; diff --git a/packages/video-plugin/src/style.scss b/packages/video-plugin/src/style.scss index e8228f97..512ca322 100644 --- a/packages/video-plugin/src/style.scss +++ b/packages/video-plugin/src/style.scss @@ -1,5 +1,5 @@ @use 'sass:map'; -@import '../../shared/vars'; +@use '../../shared/vars'; $psv-progressbar-height: 3px !default; $psv-progressbar-height-active: 5px !default; diff --git a/packages/virtual-tour-plugin/src/style.scss b/packages/virtual-tour-plugin/src/style.scss index aafed504..8550cad3 100644 --- a/packages/virtual-tour-plugin/src/style.scss +++ b/packages/virtual-tour-plugin/src/style.scss @@ -1,5 +1,5 @@ @use 'sass:list'; -@import '../../shared/vars'; +@use '../../shared/vars'; $psv-virtual-tour-link-button-color: rgba(255, 255, 255, 0.8) !default; $psv-virtual-tour-link-button-ring: rgb(97, 170, 242) !default; diff --git a/packages/visible-range-plugin/tsup.config.bundled_3xw7lo3c0vh.mjs b/packages/visible-range-plugin/tsup.config.bundled_3xw7lo3c0vh.mjs new file mode 100644 index 00000000..77b865f3 --- /dev/null +++ b/packages/visible-range-plugin/tsup.config.bundled_3xw7lo3c0vh.mjs @@ -0,0 +1,251 @@ +// ../../build/tsup.config.ts +import { sassPlugin } from "esbuild-sass-plugin"; +import { defineConfig } from "tsup"; + +// ../../build/plugins/esbuild-plugin-assets.ts +import { mkdir, writeFile } from "fs/promises"; +import path from "path"; +import prettyBytes from "pretty-bytes"; +function assetsPlugin(files) { + return { + name: "assets", + setup(build) { + if (build.initialOptions.format !== "esm") { + return; + } + build.onEnd(() => { + const outdir = build.initialOptions.outdir; + return mkdir(path.resolve(outdir), { recursive: true }).then( + () => Promise.all( + Object.entries(files).map(([filename, contentOrPromise]) => { + const outpath = outdir + "/" + filename; + return Promise.resolve(contentOrPromise).then((content) => { + console.log("ASSET", outpath, prettyBytes(content.length)); + return writeFile(outpath, content); + }); + }) + ) + ).then(() => void 0); + }); + } + }; +} + +// ../../build/plugins/esbuild-plugin-budget.ts +import chalk from "chalk"; +function budgetPlugin(budget) { + if (!budget || !budget.endsWith("kb")) { + throw new Error("Missing/invalid budget"); + } + const maxsize = 1024 * parseInt(budget, 10); + return { + name: "budget", + setup(build) { + build.onEnd((result) => { + ["index.cjs", "index.module.js"].forEach((filename) => { + const file = result.outputFiles.find((f) => f.path.endsWith(filename)); + if (file) { + if (file.contents.length > maxsize) { + const size = Math.round(file.contents.length / 1024); + throw chalk.red(`File ${filename} exceeds budget of ${budget}, current size: ${size}kb`); + } + } + }); + }); + } + }; +} + +// ../../build/plugins/esbuild-plugin-map-fix.ts +import { basename } from "path"; +function mapFixPlugin() { + return { + name: "mapFix", + setup(build) { + build.onEnd((result) => { + ["index.css.map", "index.cjs.map", "index.module.js.map"].forEach((filename) => { + const mapFile = result.outputFiles.find((f) => f.path.endsWith(filename)); + if (!mapFile) { + return; + } + console.log("MAP", `Fix ${basename(mapFile.path)}`); + const content = JSON.parse(mapFile.text); + content.sources = content.sources.map((src) => { + return src.replace("../src", "src").replace("../../shared", "../shared").replace("../../../node_modules", "../node_modules"); + }); + mapFile.contents = Buffer.from(JSON.stringify(content)); + }); + }); + } + }; +} + +// ../../build/templates/license.ts +import { readFile } from "fs/promises"; +import path2 from "path"; +var __injected_dirname__ = "/home/damiensorel@sglk.local/mistic/Photo-Sphere-Viewer/build/templates"; +var license = () => readFile(path2.join(__injected_dirname__, "../../LICENSE"), { encoding: "utf8" }); + +// ../../build/templates/npmrc.ts +var npmrc = () => `@photo-sphere-viewer:registry=https://registry.npmjs.org +//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN} +`; + +// ../../build/templates/package.ts +import _ from "lodash"; +import sortPackageJson, { sortOrder } from "sort-package-json"; +sortOrder.splice(sortOrder.indexOf("style") + 1, 0, "sass"); +var packageJson = (pkg) => { + const content = { + ...pkg, + main: "index.cjs", + module: "index.module.js", + types: "index.d.ts", + exports: { + ".": { + import: "./index.module.js", + require: "./index.cjs" + } + }, + license: "MIT", + repository: { + type: "git", + url: "git://github.com/mistic100/Photo-Sphere-Viewer.git" + }, + author: { + name: `Damien 'Mistic' Sorel`, + email: "contact@git.strangeplanet.fr", + homepage: "https://www.strangeplanet.fr" + }, + keywords: ["photosphere", "panorama", "threejs", ...pkg.keywords || []], + dependencies: _.pickBy(pkg.dependencies, (val, key) => !key.startsWith("@photo-sphere-viewer")), + peerDependencies: _.pickBy(pkg.dependencies, (val, key) => key.startsWith("@photo-sphere-viewer")) + }; + if (pkg.psv.style) { + content.style = "index.css"; + content.sass = "index.scss"; + } + if (pkg.name === "@photo-sphere-viewer/core") { + content.contributors = [ + { + name: "J\xE9r\xE9my Heleine", + email: "jeremy.heleine@gmail.com", + homepage: "https://jeremyheleine.me" + } + ]; + } + delete content.devDependencies; + delete content.psv; + delete content.scripts; + return JSON.stringify(sortPackageJson(content), null, 2); +}; + +// ../../build/templates/readme.ts +var readme = (pkg) => `# ${pkg.psv.title} + +[![NPM version](https://img.shields.io/npm/v/${pkg.name}?logo=npm)](https://www.npmjs.com/package/${pkg.name}) +[![NPM Downloads](https://img.shields.io/npm/dm/${pkg.name}?color=f86036&label=npm&logo=npm)](https://www.npmjs.com/package/${pkg.name}) +[![jsDelivr Hits](https://img.shields.io/jsdelivr/npm/hm/${pkg.name}?color=%23f86036&logo=jsdelivr)](https://www.jsdelivr.com/package/npm/${pkg.name}) + +${pkg.description} + +## Documentation + +${pkg.homepage} + +## License + +This library is available under the MIT license. +`; + +// ../../build/tsup.config.ts +function createConfig(pkg) { + const banner = `/*! + * ${pkg.psv.title} ${pkg.version} +${pkg.name === "@photo-sphere-viewer/core" ? " * @copyright 2014-2015 J\xE9r\xE9my Heleine\n" : ""} * @copyright 2015-${(/* @__PURE__ */ new Date()).getFullYear()} Damien "Mistic" Sorel + * @licence MIT (https://opensource.org/licenses/MIT) + */`; + return defineConfig((options) => { + const e2e = options.env?.E2E; + const dev = e2e || options.watch; + const plugins = [ + sassPlugin() + ]; + if (!e2e) { + plugins.push( + mapFixPlugin() + ); + } + if (!dev) { + plugins.push( + budgetPlugin(pkg.psv.budget), + // scssBundlePlugin(), + assetsPlugin({ + "LICENSE": license(), + ".npmrc": npmrc(), + "README.md": readme(pkg), + "package.json": packageJson(pkg) + }) + ); + } + return { + entryPoints: [pkg.main], + outDir: "dist", + clean: true, + format: dev ? ["esm"] : ["esm", "cjs"], + outExtension: ({ format }) => ({ + js: { cjs: ".cjs", esm: ".module.js", iife: ".js" }[format] + }), + dts: !dev, + sourcemap: true, + external: ["three"], + noExternal: [/three\/examples\/.*/], + target: "es2021", + define: { + PKG_VERSION: `'${pkg.version}'` + }, + loader: { + ".svg": "text", + ".glsl": "text" + }, + banner: { + js: banner, + css: banner + }, + esbuildPlugins: plugins + }; + }); +} + +// package.json +var package_default = { + name: "@photo-sphere-viewer/visible-range-plugin", + version: "0.0.0", + description: "Photo Sphere Viewer plugin to lock the visible angles.", + homepage: "https://photo-sphere-viewer.js.org/plugins/visible-range.html", + license: "MIT", + main: "./src/index.ts", + types: "./src/index.ts", + dependencies: { + "@photo-sphere-viewer/core": "0.0.0" + }, + scripts: { + build: "tsup", + watch: "tsup --watch", + instrument: "nyc instrument dist/index.module.js .", + lint: "tsc --noEmit && eslint . --fix", + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" + }, + psv: { + title: "Photo Sphere Viewer / Visible Range Plugin", + budget: "20kb" + } +}; + +// tsup.config.ts +var tsup_config_default = createConfig(package_default); +export { + tsup_config_default as default +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vYnVpbGQvdHN1cC5jb25maWcudHMiLCAiLi4vLi4vYnVpbGQvcGx1Z2lucy9lc2J1aWxkLXBsdWdpbi1hc3NldHMudHMiLCAiLi4vLi4vYnVpbG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Oi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvTUlUKVxuICovYDtcblxuICAgIHJldHVybiBkZWZpbmVDb25maWcoKG9wdGlvbnMpID0+IHtcbiAgICAgICAgY29uc3QgZTJlID0gb3B0aW9ucy5lbnY/LkUyRTtcbiAgICAgICAgY29uc3QgZGV2ID0gZTJlIHx8IG9wdGlvbnMud2F0Y2g7XG5cbiAgICAgICAgY29uc3QgcGx1Z2luczogUGx1Z2luW10gPSBbXG4gICAgICAgICAgICBzYXNzUGx1Z2luKCksXG4gICAgICAgIF07XG5cbiAgICAgICAgaWYgKCFlMmUpIHtcbiAgICAgICAgICAgIHBsdWdpbnMucHVzaChcbiAgICAgICAgICAgICAgICBtYXBGaXhQbHVnaW4oKSxcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWRldikge1xuICAgICAgICAgICAgcGx1Z2lucy5wdXNoKFxuICAgICAgICAgICAgICAgIGJ1ZGdldFBsdWdpbihwa2cucHN2LmJ1ZGdldCksXG4gICAgICAgICAgICAgICAgLy8gc2Nzc0J1bmRsZVBsdWdpbigpLFxuICAgICAgICAgICAgICAgIGFzc2V0c1BsdWdpbih7XG4gICAgICAgICAgICAgICAgICAgICdMSUNFTlNFJzogbGljZW5zZSgpLFxuICAgICAgICAgICAgICAgICAgICAnLm5wbXJjJzogbnBtcmMoKSxcbiAgICAgICAgICAgICAgICAgICAgJ1JFQURNRS5tZCc6IHJlYWRtZShwa2cpLFxuICAgICAgICAgICAgICAgICAgICAncGFja2FnZS5qc29uJzogcGFja2FnZUpzb24ocGtnKSxcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZW50cnlQb2ludHM6IFtwa2cubWFpbl0sXG4gICAgICAgICAgICBvdXREaXI6ICdkaXN0JyxcbiAgICAgICAgICAgIGNsZWFuOiB0cnVlLFxuICAgICAgICAgICAgZm9ybWF0OiBkZXYgPyBbJ2VzbSddIDogWydlc20nLCAnY2pzJ10sXG4gICAgICAgICAgICBvdXRFeHRlbnNpb246ICh7IGZvcm1hdCB9KSA9PiAoe1xuICAgICAgICAgICAgICAgIGpzOiB7IGNqczogJy5janMnLCBlc206ICcubW9kdWxlLmpzJywgaWlmZTogJy5qcycgfVtmb3JtYXRdLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBkdHM6ICFkZXYsXG4gICAgICAgICAgICBzb3VyY2VtYXA6IHRydWUsXG4gICAgICAgICAgICBleHRlcm5hbDogWyd0aHJlZSddLFxuICAgICAgICAgICAgbm9FeHRlcm5hbDogWy90aHJlZVxcL2V4YW1wbGVzXFwvLiovXSxcbiAgICAgICAgICAgIHRhcmdldDogJ2VzMjAyMScsXG4gICAgICAgICAgICBkZWZpbmU6IHtcbiAgICAgICAgICAgICAgICBQS0dfVkVSU0lPTjogYCcke3BrZy52ZXJzaW9ufSdgLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGxvYWRlcjoge1xuICAgICAgICAgICAgICAgICcuc3ZnJzogJ3RleHQnLFxuICAgICAgICAgICAgICAgICcuZ2xzbCc6ICd0ZXh0JyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBiYW5uZXI6IHtcbiAgICAgICAgICAgICAgICBqczogYmFubmVyLFxuICAgICAgICAgICAgICAgIGNzczogYmFubmVyLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGVzYnVpbGRQbHVnaW5zOiBwbHVnaW5zLFxuICAgICAgICB9O1xuICAgIH0pO1xufVxuIiwgImNvbnN0IF9faW5qZWN0ZWRfZmlsZW5hbWVfXyA9IFwiL2hvbWUvZGFtaWVuc29yZWxAc2dsay5sb2NhbC9taXN0aWMvUGhvdG8tU3BoZXJlLVZpZXdlci9idWlsZC9wbHVnaW5zL2VzYnVpbGQtcGx1Z2luLWFzc2V0cy50c1wiO2NvbnN0IF9faW5qZWN0ZWRfZGlybmFtZV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mUob3V0ZGlyKSwgeyByZWN1cnNpdmU6IHRydWUgfSlcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oKCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIFByb21pc2UuYWxsKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGZpbGVzKS5tYXAoKFtmaWxlbmFtZSwgY29udGVudE9yUHJvbWlzZV0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3V0cGF0aCA9IG91dGRpciArICcvJyArIGZpbGVuYW1lO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKGNvbnRlbnRPclByb21pc2UpLnRoZW4oKGNvbnRlbnQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdBU1NFVCcsIG91dHBhdGgsIHByZXR0eUJ5dGVzKGNvbnRlbnQubGVuZ3RoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gd3JpdGVGaWxlKG91dHBhdGgsIGNvbnRlbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4gdW5kZWZpbmVkKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgIH07XG59XG4iLCAiY29uc3QgX19pbmplY3RlZF9maWxlbmFtZV9fID0gXCIvaG9tZS9kYW1pZW5zb3JlbEBzZ2xrLmxvY2FsL21pc3RpYy9QaG90by1TcGhlcmUtVmlld2VyL2J1aWxkL3BsdWdpbnMvZXNidWlsZC1wbHVnaW4tYnVkZ2V0LnRzXCI7Y29uc3QgX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nVpbGQnO1xuaW1wb3J0IHsgYmFzZW5hbWUgfSBmcm9tICdwYXRoJztcblxuLyoqXG4gKiBBbHRlcnMgdGhlIHBhdGhzIGluIG1hcHNcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIG1hcEZpeFBsdWdpbigpOiBQbHVnaW4ge1xuICAgIHJldHVybiB7XG4gICAgICAgIG5hbWU6ICdtYXBGaXgnLFxuICAgICAgICBzZXR1cChidWlsZCkge1xuICAgICAgICAgICAgYnVpbGQub25FbmQoKHJlc3VsdCkgPT4ge1xuICAgICAgICAgICAgICAgIFsnaW5kZXguY3NzLm1hcCcsICdpbmRleC5janMubWFwJywgJ2luZGV4Lm1vZHVsZS5qcy5tYXAnXS5mb3JFYWNoKChmaWxlbmFtZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtYXBGaWxlID0gcmVzdWx0Lm91dHB1dEZpbGVzLmZpbmQoZiA9PiBmLnBhdGguZW5kc1dpdGgoZmlsZW5hbWUpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFtYXBGaWxlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnTUFQJywgYEZpeCAke2Jhc2VuYW1lKG1hcEZpbGUucGF0aCl9YCk7XG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29udGVudCA9IEpTT04ucGFyc2UobWFwRmlsZS50ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgY29udGVudC5zb3VyY2VzID0gY29udGVudC5zb3VyY2VzLm1hcCgoc3JjOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzcmNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgnLi4vc3JjJywgJ3NyYycpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoJy4uLy4uL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QuZnInLFxuICAgICAgICB9LFxuICAgICAgICBrZXl3b3JkczogWydwaG90b3NwaGVyZScsICdwYW5vcmFtYScsICd0aHJlZWpzJywgLi4uKHBrZy5rZXl3b3JkcyB8fCBbXSldLFxuICAgICAgICBkZXBlbmRlbmNpZXM6IF8ucGlja0J5KHBrZy5kZXBlbmRlbmNpZXMsICh2YWwsIGtleSkgPT4gIWtleS5zdGFydHNXaXRoKCdAcGhvdG8tc3BoZXJlLXZpZXdlcicpKSxcbiAgICAgICAgcGVlckRlcGVuZGVuY2llczogXy5waWNrQnkocGtnLmRlcGVuZGVuY2llcywgKHZhbCwga2V5KSA9PiBrZXkuc3RhcnRzV2l0aCgnQHBob3RvLXNwaGVyZS12aWV3ZXInKSksXG4gICAgfTtcblxuICAgIGlmIChwa2cucHN2LnN0eWxlKSB7XG4gICAgICAgIGNvbnRlbnQuc3R5bGUgPSAnaW5kZXguY3NzJztcbiAgICAgICAgY29udGVudC5zYXNzID0gJ2luZGV4LnNjc3MnO1xuICAgIH1cblxuICAgIGlmIChwa2cubmFtZSA9PT0gJ0BwaG90by1zcGhlcmUtdmlld2VyL2NvcmUnKSB7XG4gICAgICAgIGNvbnRlbnQuY29udHJpYnV0b3JzID0gW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIG5hbWU6ICdKXHUwMEU5clx1MDBFOW15IEhlbGVpbmUnLFxuICAgICAgICAgICAgICAgIGVtYWlsOiAnamVyZW15LmhlbGVpbmVAZ21haWwuY29tJyxcbiAgICAgICAgICAgICAgICBob21lcGFnZTogJ2h0dHBzOi8vamVyZW15aGVsZWluZS5tZScsXG4gICAgICAgICAgICB9LFxuICAgICAgICBdO1xuICAgIH1cblxuICAgIGRlbGV0ZSBjb250ZW50LmRldkRlcGVuZGVuY2llcztcbiAgICBkZWxldGUgY29udGVudC5wc3Y7XG4gICAgZGVsZXRlIGNvbnRlbnQuc2NyaXB0cztcblxuICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShzb3J0UGF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