module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "lib/leaflet/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 584);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/interopRequireDefault");

/***/ }),

/***/ 54:
/***/ (function(module, exports) {

module.exports = require("@supermap/vue-iclient-leaflet/lib/_utils/style/theme/theme.json");

/***/ }),

/***/ 584:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(0);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.dealWithTheme = dealWithTheme;
exports.getExtralColors = getExtralColors;
exports.getFunctionSerialColors = getFunctionSerialColors;
exports.getPrimarySerialColors = getPrimarySerialColors;
exports.getRootStyleSelector = getRootStyleSelector;
exports.toStyleVariable = toStyleVariable;

var _colorPalette = _interopRequireDefault(__webpack_require__(585));

var _theme = _interopRequireDefault(__webpack_require__(54));

var _util = __webpack_require__(9);

var _cssVarsPonyfill = _interopRequireDefault(__webpack_require__(586));

var lightTheme = _theme.default && _theme.default[1];
var $blue6 = '#1890ff';
var $green6 = '#52c41a';
var $glod6 = '#faad14';
var $red6 = '#f5222d';
var antdPrimaryColor = $blue6;
var antdFunctionColors = {
  infoColor: $blue6,
  successColor: $green6,
  warningColor: $glod6,
  dangerColor: $red6
};
var isBrowser = typeof window !== 'undefined';
var isNativeSupport = isBrowser && window.CSS && window.CSS.supports && window.CSS.supports('(--a: 0)');

function getPrimarySerialColors(nextThemeInfo) {
  var series = [];
  var nextThemeStyle = nextThemeInfo;
  var prevPrimaryColor;

  if (nextThemeStyle && nextThemeStyle.colorGroup && nextThemeStyle.colorGroup[0]) {
    prevPrimaryColor = nextThemeStyle.colorGroup[0];
  }

  var acceptColor = prevPrimaryColor || antdPrimaryColor;

  for (var index = 1; index <= 10; index++) {
    var nextColor = void 0;

    switch (index) {
      case 2:
        nextColor = nextThemeStyle.selectedColor || (0, _util.getColorWithOpacity)(acceptColor, 0.15);
        break;

      case 5:
        nextColor = nextThemeStyle.hoverColor || (0, _colorPalette.default)(acceptColor, index);
        break;

      case 6:
        nextColor = acceptColor;
        break;

      case 7:
        nextColor = nextThemeStyle.clickColor || (0, _colorPalette.default)(acceptColor, index);
        break;

      default:
        nextColor = (0, _colorPalette.default)(acceptColor, index);
        break;
    }

    series.push(nextColor);
  }

  return series;
}

function getFunctionSerialColors(functionColors) {
  var seriesIndex = [1, 2, 3, 4, 5, 6, 7];
  var acceptFunctionColors = functionColors || antdFunctionColors;
  var nextFunctionSerialColors = {};

  var _loop = function _loop(key) {
    if (Object.prototype.hasOwnProperty.call(antdFunctionColors, key)) {
      var color = acceptFunctionColors[key] || antdFunctionColors[key];
      nextFunctionSerialColors[key] = [];
      seriesIndex.forEach(function (item) {
        var nextColor = item === 6 ? color : (0, _colorPalette.default)(color, item);
        nextFunctionSerialColors[key].push(nextColor);
      });
    }
  };

  for (var key in acceptFunctionColors) {
    _loop(key);
  }

  return nextFunctionSerialColors;
}

function getExtralColors(themeStyleData, primarySerialColors, functionColors) {
  var tableHeaderSortActiveBg = (0, _util.getDarkenColor)(themeStyleData.backgroundLight, 3);
  var extraSerialColors = {
    textColorWithoutOpacity: (0, _util.getColorWithOpacity)(themeStyleData.textColor, 1, false),
    backgroundWithoutOpacity: (0, _util.getColorWithOpacity)(themeStyleData.background, 1, false),
    componentBackgroundWithoutOpacity: (0, _util.getColorWithOpacity)(themeStyleData.componentBackground, 1, false),
    primaryShadowColor: (0, _util.getColorWithOpacity)(primarySerialColors[4], 0.25),
    dangerShadowColor: (0, _util.getColorWithOpacity)(functionColors.dangerColor[4], 0.25),
    disabledDarkenBgColor10: (0, _util.getDarkenColor)(themeStyleData.containerDisabled, 10),
    tableHeaderSortActiveBg: tableHeaderSortActiveBg,
    tableHeaderFilterActiveBg: (0, _util.getDarkenColor)(tableHeaderSortActiveBg, 5)
  };
  return extraSerialColors;
}

function dealWithTheme(nextThemeStyle) {
  var defaultThemeStyle = nextThemeStyle.style || 'light';

  var defaultTheme = _theme.default.find(function (item) {
    return item.label === defaultThemeStyle;
  });

  var serialColorsReplacer = getPrimarySerialColors(Object.assign({
    colorGroup: defaultTheme && defaultTheme.colorGroup
  }, nextThemeStyle));
  var themeStyleData = Object.assign({}, lightTheme, defaultTheme, nextThemeStyle);
  var functionSerialColorsReplacer = getFunctionSerialColors(themeStyleData);
  var nextThemeStyleData = Object.assign({}, themeStyleData, {
    selectedColor: serialColorsReplacer[1],
    hoverColor: serialColorsReplacer[4],
    clickColor: serialColorsReplacer[6]
  });
  var nextThemeData = {
    themeStyle: nextThemeStyleData,
    primarySerialColors: serialColorsReplacer,
    functionSerialColors: functionSerialColorsReplacer,
    extraSerialColors: getExtralColors(themeStyleData, serialColorsReplacer, functionSerialColorsReplacer)
  };
  setRootStyle(nextThemeData);
  return nextThemeData;
}

function toStyleVariable(variable) {
  return "--" + variable.replace(/[A-Z]/g, '-$&').toLowerCase();
}

function getRootStyleSelector(themeStyle) {
  var _a;

  return ((_a = themeStyle.styleConfig) === null || _a === void 0 ? void 0 : _a.className) && isNativeSupport ? "." + themeStyle.styleConfig.className : ':root';
}

function setRootStyle(themeData) {
  var _a, _b;

  var themeStyle = themeData.themeStyle,
      primarySerialColors = themeData.primarySerialColors,
      functionSerialColors = themeData.functionSerialColors,
      extraSerialColors = themeData.extraSerialColors;
  var primaryColor = themeStyle.colorGroup[0];
  var variables = {
    '--antd-wave-shadow-color': primaryColor,
    '--primary-color': primaryColor
  };
  var themeInfo = Object.assign({}, themeStyle, extraSerialColors);
  var themeKeys = Object.keys(themeInfo);
  primarySerialColors.forEach(function (color, index) {
    var varKey = "--primary-" + (index + 1);
    variables[varKey] = color;
  });

  var _loop2 = function _loop2(key) {
    functionSerialColors[key].forEach(function (color, index) {
      var varKey = "--" + key.replace('Color', '') + "-" + (index + 1);
      variables[varKey] = color;
    });
  };

  for (var key in functionSerialColors) {
    _loop2(key);
  }

  themeKeys.forEach(function (key) {
    if (!['[object Object]', '[object Array]'].includes((0, _util.getDataType)(themeInfo[key]))) {
      var varKey = toStyleVariable(key);
      variables[varKey] = themeInfo[key] || 'rgba(0, 0, 0, 0)';
    }
  });
  var rootStyleSelector = getRootStyleSelector(themeStyle);
  var antdStyleId = ((_a = themeStyle.styleConfig) === null || _a === void 0 ? void 0 : _a.id) || 'sm-component-style';
  var rootStyle = rootStyleSelector + " " + JSON.stringify(variables, null, 2).replace(/(:.+),/g, '$1;').replace(/"/g, '');
  var antStyleTag = document.getElementById(antdStyleId);

  if (!antStyleTag) {
    antStyleTag = document.createElement('style');
    antStyleTag.setAttribute('id', antdStyleId);
    antStyleTag.setAttribute('type', 'text/css');
    document.head.insertBefore(antStyleTag, document.head.firstChild);
  }

  var defaultInclude = 'style#sm-component-style, link[href*=vue-iclient-mapboxgl]';
  var options = {
    include: ((_b = themeStyle.styleConfig) === null || _b === void 0 ? void 0 : _b.include) || defaultInclude,
    silent: true,
    onlyLegacy: true,
    variables: {},
    watch: false
  };

  if (!isNativeSupport) {
    options.onlyLegacy = false;
    options.watch = true;
    options.variables = variables;
  }

  (0, _cssVarsPonyfill.default)(options);
  antStyleTag.innerHTML = rootStyle;
}

/***/ }),

/***/ 585:
/***/ (function(module, exports) {

module.exports = require("@supermap/vue-iclient-leaflet/lib/_utils/style/color/colorPalette.js");

/***/ }),

/***/ 586:
/***/ (function(module, exports) {

module.exports = require("css-vars-ponyfill");

/***/ }),

/***/ 9:
/***/ (function(module, exports) {

module.exports = require("@supermap/vue-iclient-leaflet/lib/_utils/util.js");

/***/ })

/******/ });