<commit_before>export default [
	"config",
	"hs.layout.service",
	"hs.layermanager.service",
	'$window',
	function(config, layoutService, LayMan, $window) {
		return {
			template: require("components/layermanager/partials/basemap-gallery.html"),

			controller: [
				"$scope",
				function($scope) {
					$scope.LayMan = LayMan;
					$scope.changeBaseLayerVisibility = LayMan.changeBaseLayerVisibility;
					$scope.data = LayMan.data;
					$scope.toggleMiniMenu = function(layer) {
						if (layer.galleryMiniMenu) {
							layer.galleryMiniMenu = !layer.galleryMiniMenu;
						} else {
							layer.galleryMiniMenu = true;
						}
					};

					$scope.galleryStyle = function() {
						if (!layoutService.sidebarRight || (layoutService.layoutElement.clientWidth <= 767 && $window.innerWidth <= 767)) {
							return { right: "15px" };
						} else {
							return { right: layoutService.panelSpaceWidth() + 20 + "px" };
						}
					};

					$scope.fitsInContainer = () => {
						return (
							(LayMan.data.baselayers.length + 1) * 150 <
							layoutService.layoutElement.clientWidth - layoutService.panelSpaceWidth() - 450
						);
					};
					$scope.setGreyscale = function(layer) {
						let layerContainer = document.querySelector(".ol-unselectable > div:first-child");
						if (layerContainer.classList.contains("hs-grayscale")) {
							layerContainer.classList.remove("hs-grayscale");
							layer.grayscale = false;
						} else {
							layerContainer.classList.add("hs-grayscale");
							layer.grayscale = true;
						}
					};
				},
			],
		};
	},
];<commit_msg>Lint basemap gallery directive<commit_after>export default [
  'config',
  'hs.layout.service',
  'hs.layermanager.service',
  '$window',
  function(config, layoutService, LayMan, $window) {
    return {
      template: require('./partials/basemap-gallery.html'),

      controller: [
        '$scope',
        function($scope) {
          $scope.LayMan = LayMan;
          $scope.changeBaseLayerVisibility = LayMan.changeBaseLayerVisibility;
          $scope.data = LayMan.data;
          $scope.toggleMiniMenu = function(layer) {
            if (layer.galleryMiniMenu) {
              layer.galleryMiniMenu = !layer.galleryMiniMenu;
            } else {
              layer.galleryMiniMenu = true;
            }
          };

          $scope.galleryStyle = function() {
            if (!layoutService.sidebarRight || (layoutService.layoutElement.clientWidth <= 767 && $window.innerWidth <= 767)) {
              return {right: '15px'};
            } else {
              return {right: layoutService.panelSpaceWidth() + 20 + 'px'};
            }
          };

          $scope.fitsInContainer = () => {
            return (
              (LayMan.data.baselayers.length + 1) * 150 <
							layoutService.layoutElement.clientWidth - layoutService.panelSpaceWidth() - 450
            );
          };
          $scope.setGreyscale = function(layer) {
            const layerContainer = document.querySelector('.ol-unselectable > div:first-child');
            if (layerContainer.classList.contains('hs-grayscale')) {
              layerContainer.classList.remove('hs-grayscale');
              layer.grayscale = false;
            } else {
              layerContainer.classList.add('hs-grayscale');
              layer.grayscale = true;
            }
          };
        }
      ]
    };
  }
];
{'fraction_non_alphanumeric': 0.13347144125480911, 'fraction_numerical': 0.010062148564664102, 'mean_word_length': 2.2282712511938874, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3432508', 'n_tokens_mistral': 1224, 'n_tokens_neox': 983, 'n_words': 145}