UNPKG

antd

Version:

An enterprise-class UI design language and React components implementation

1,274 lines (1,167 loc) 4.48 MB
/*! * * antd v5.20.6 * * Copyright 2015-present, Alipay, Inc. * All rights reserved. * */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-dom"), require("dayjs")); else if(typeof define === 'function' && define.amd) define(["react", "react-dom", "dayjs"], factory); else if(typeof exports === 'object') exports["antd"] = factory(require("react"), require("react-dom"), require("dayjs")); else root["antd"] = factory(root["React"], root["ReactDOM"], root["dayjs"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__, __WEBPACK_EXTERNAL_MODULE_dayjs__) { return /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "./components sync recursive ^\\.\\/[^_][\\w-]+\\/style\\/index\\.tsx?$": /*!***************************************************************!*\ !*** ./components/ sync ^\.\/[^_][\w-]+\/style\/index\.tsx?$ ***! \***************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var map = { "./affix/style/index.ts": "./components/affix/style/index.ts", "./alert/style/index.ts": "./components/alert/style/index.ts", "./anchor/style/index.ts": "./components/anchor/style/index.ts", "./app/style/index.ts": "./components/app/style/index.ts", "./avatar/style/index.ts": "./components/avatar/style/index.ts", "./back-top/style/index.ts": "./components/back-top/style/index.ts", "./badge/style/index.ts": "./components/badge/style/index.ts", "./breadcrumb/style/index.ts": "./components/breadcrumb/style/index.ts", "./button/style/index.ts": "./components/button/style/index.ts", "./calendar/style/index.ts": "./components/calendar/style/index.ts", "./card/style/index.ts": "./components/card/style/index.ts", "./carousel/style/index.ts": "./components/carousel/style/index.ts", "./cascader/style/index.ts": "./components/cascader/style/index.ts", "./checkbox/style/index.ts": "./components/checkbox/style/index.ts", "./col/style/index.ts": "./components/col/style/index.ts", "./collapse/style/index.ts": "./components/collapse/style/index.ts", "./color-picker/style/index.ts": "./components/color-picker/style/index.ts", "./config-provider/style/index.ts": "./components/config-provider/style/index.ts", "./date-picker/style/index.ts": "./components/date-picker/style/index.ts", "./descriptions/style/index.ts": "./components/descriptions/style/index.ts", "./divider/style/index.ts": "./components/divider/style/index.ts", "./drawer/style/index.ts": "./components/drawer/style/index.ts", "./dropdown/style/index.ts": "./components/dropdown/style/index.ts", "./empty/style/index.ts": "./components/empty/style/index.ts", "./flex/style/index.ts": "./components/flex/style/index.ts", "./float-button/style/index.ts": "./components/float-button/style/index.ts", "./form/style/index.ts": "./components/form/style/index.ts", "./grid/style/index.ts": "./components/grid/style/index.ts", "./image/style/index.ts": "./components/image/style/index.ts", "./input-number/style/index.ts": "./components/input-number/style/index.ts", "./input/style/index.ts": "./components/input/style/index.ts", "./layout/style/index.ts": "./components/layout/style/index.ts", "./list/style/index.ts": "./components/list/style/index.ts", "./mentions/style/index.ts": "./components/mentions/style/index.ts", "./menu/style/index.ts": "./components/menu/style/index.ts", "./message/style/index.ts": "./components/message/style/index.ts", "./modal/style/index.ts": "./components/modal/style/index.ts", "./notification/style/index.ts": "./components/notification/style/index.ts", "./pagination/style/index.ts": "./components/pagination/style/index.ts", "./popconfirm/style/index.ts": "./components/popconfirm/style/index.ts", "./popover/style/index.ts": "./components/popover/style/index.ts", "./progress/style/index.ts": "./components/progress/style/index.ts", "./qr-code/style/index.ts": "./components/qr-code/style/index.ts", "./qrcode/style/index.ts": "./components/qrcode/style/index.ts", "./radio/style/index.ts": "./components/radio/style/index.ts", "./rate/style/index.ts": "./components/rate/style/index.ts", "./result/style/index.ts": "./components/result/style/index.ts", "./row/style/index.ts": "./components/row/style/index.ts", "./segmented/style/index.ts": "./components/segmented/style/index.ts", "./select/style/index.ts": "./components/select/style/index.ts", "./skeleton/style/index.ts": "./components/skeleton/style/index.ts", "./slider/style/index.ts": "./components/slider/style/index.ts", "./space/style/index.ts": "./components/space/style/index.ts", "./spin/style/index.ts": "./components/spin/style/index.ts", "./statistic/style/index.ts": "./components/statistic/style/index.ts", "./steps/style/index.ts": "./components/steps/style/index.ts", "./switch/style/index.ts": "./components/switch/style/index.ts", "./table/style/index.ts": "./components/table/style/index.ts", "./tabs/style/index.ts": "./components/tabs/style/index.ts", "./tag/style/index.ts": "./components/tag/style/index.ts", "./timeline/style/index.ts": "./components/timeline/style/index.ts", "./tooltip/style/index.ts": "./components/tooltip/style/index.ts", "./tour/style/index.ts": "./components/tour/style/index.ts", "./transfer/style/index.ts": "./components/transfer/style/index.ts", "./tree-select/style/index.ts": "./components/tree-select/style/index.ts", "./tree/style/index.ts": "./components/tree/style/index.ts", "./typography/style/index.ts": "./components/typography/style/index.ts", "./upload/style/index.ts": "./components/upload/style/index.ts" }; function webpackContext(req) { var id = webpackContextResolve(req); return __webpack_require__(id); } function webpackContextResolve(req) { if(!__webpack_require__.o(map, req)) { var e = new Error("Cannot find module '" + req + "'"); e.code = 'MODULE_NOT_FOUND'; throw e; } return map[req]; } webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = "./components sync recursive ^\\.\\/[^_][\\w-]+\\/style\\/index\\.tsx?$"; /***/ }), /***/ "./node_modules/@ant-design/colors/es/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/colors/es/index.js + 3 modules ***! \*****************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { blue: function() { return /* reexport */ blue; }, generate: function() { return /* reexport */ generate; }, gold: function() { return /* reexport */ gold; }, presetPalettes: function() { return /* reexport */ presetPalettes; }, presetPrimaryColors: function() { return /* reexport */ presetPrimaryColors; } }); // UNUSED EXPORTS: blueDark, cyan, cyanDark, geekblue, geekblueDark, goldDark, gray, green, greenDark, grey, greyDark, lime, limeDark, magenta, magentaDark, orange, orangeDark, presetDarkPalettes, purple, purpleDark, red, redDark, volcano, volcanoDark, yellow, yellowDark // EXTERNAL MODULE: ./node_modules/@ctrl/tinycolor/dist/module/conversion.js var conversion = __webpack_require__("./node_modules/@ctrl/tinycolor/dist/module/conversion.js"); // EXTERNAL MODULE: ./node_modules/@ctrl/tinycolor/dist/module/format-input.js var format_input = __webpack_require__("./node_modules/@ctrl/tinycolor/dist/module/format-input.js"); ;// CONCATENATED MODULE: ./node_modules/@ant-design/colors/es/generate.js var hueStep = 2; // 色相阶梯 var saturationStep = 0.16; // 饱和度阶梯,浅色部分 var saturationStep2 = 0.05; // 饱和度阶梯,深色部分 var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分 var brightnessStep2 = 0.15; // 亮度阶梯,深色部分 var lightColorCount = 5; // 浅色数量,主色上 var darkColorCount = 4; // 深色数量,主色下 // 暗色主题颜色映射关系表 var darkColorMap = [{ index: 7, opacity: 0.15 }, { index: 6, opacity: 0.25 }, { index: 5, opacity: 0.3 }, { index: 5, opacity: 0.45 }, { index: 5, opacity: 0.65 }, { index: 5, opacity: 0.85 }, { index: 4, opacity: 0.9 }, { index: 3, opacity: 0.95 }, { index: 2, opacity: 0.97 }, { index: 1, opacity: 0.98 }]; // Wrapper function ported from TinyColor.prototype.toHsv // Keep it here because of `hsv.h * 360` function toHsv(_ref) { var r = _ref.r, g = _ref.g, b = _ref.b; var hsv = (0,conversion.rgbToHsv)(r, g, b); return { h: hsv.h * 360, s: hsv.s, v: hsv.v }; } // Wrapper function ported from TinyColor.prototype.toHexString // Keep it here because of the prefix `#` function toHex(_ref2) { var r = _ref2.r, g = _ref2.g, b = _ref2.b; return "#".concat((0,conversion.rgbToHex)(r, g, b, false)); } // Wrapper function ported from TinyColor.prototype.mix, not treeshakable. // Amount in range [0, 1] // Assume color1 & color2 has no alpha, since the following src code did so. function mix(rgb1, rgb2, amount) { var p = amount / 100; var rgb = { r: (rgb2.r - rgb1.r) * p + rgb1.r, g: (rgb2.g - rgb1.g) * p + rgb1.g, b: (rgb2.b - rgb1.b) * p + rgb1.b }; return rgb; } function getHue(hsv, i, light) { var hue; // 根据色相不同,色相转向不同 if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) { hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i; } else { hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i; } if (hue < 0) { hue += 360; } else if (hue >= 360) { hue -= 360; } return hue; } function getSaturation(hsv, i, light) { // grey color don't change saturation if (hsv.h === 0 && hsv.s === 0) { return hsv.s; } var saturation; if (light) { saturation = hsv.s - saturationStep * i; } else if (i === darkColorCount) { saturation = hsv.s + saturationStep; } else { saturation = hsv.s + saturationStep2 * i; } // 边界值修正 if (saturation > 1) { saturation = 1; } // 第一格的 s 限制在 0.06-0.1 之间 if (light && i === lightColorCount && saturation > 0.1) { saturation = 0.1; } if (saturation < 0.06) { saturation = 0.06; } return Number(saturation.toFixed(2)); } function getValue(hsv, i, light) { var value; if (light) { value = hsv.v + brightnessStep1 * i; } else { value = hsv.v - brightnessStep2 * i; } if (value > 1) { value = 1; } return Number(value.toFixed(2)); } function generate(color) { var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var patterns = []; var pColor = (0,format_input.inputToRGB)(color); for (var i = lightColorCount; i > 0; i -= 1) { var hsv = toHsv(pColor); var colorString = toHex((0,format_input.inputToRGB)({ h: getHue(hsv, i, true), s: getSaturation(hsv, i, true), v: getValue(hsv, i, true) })); patterns.push(colorString); } patterns.push(toHex(pColor)); for (var _i = 1; _i <= darkColorCount; _i += 1) { var _hsv = toHsv(pColor); var _colorString = toHex((0,format_input.inputToRGB)({ h: getHue(_hsv, _i), s: getSaturation(_hsv, _i), v: getValue(_hsv, _i) })); patterns.push(_colorString); } // dark theme patterns if (opts.theme === 'dark') { return darkColorMap.map(function (_ref3) { var index = _ref3.index, opacity = _ref3.opacity; var darkColorString = toHex(mix((0,format_input.inputToRGB)(opts.backgroundColor || '#141414'), (0,format_input.inputToRGB)(patterns[index]), opacity * 100)); return darkColorString; }); } return patterns; } ;// CONCATENATED MODULE: ./node_modules/@ant-design/colors/es/presets.js // Generated by script. Do NOT modify! var presetPrimaryColors = { "red": "#F5222D", "volcano": "#FA541C", "orange": "#FA8C16", "gold": "#FAAD14", "yellow": "#FADB14", "lime": "#A0D911", "green": "#52C41A", "cyan": "#13C2C2", "blue": "#1677FF", "geekblue": "#2F54EB", "purple": "#722ED1", "magenta": "#EB2F96", "grey": "#666666" }; var red = ["#fff1f0", "#ffccc7", "#ffa39e", "#ff7875", "#ff4d4f", "#f5222d", "#cf1322", "#a8071a", "#820014", "#5c0011"]; red.primary = red[5]; var volcano = ["#fff2e8", "#ffd8bf", "#ffbb96", "#ff9c6e", "#ff7a45", "#fa541c", "#d4380d", "#ad2102", "#871400", "#610b00"]; volcano.primary = volcano[5]; var orange = ["#fff7e6", "#ffe7ba", "#ffd591", "#ffc069", "#ffa940", "#fa8c16", "#d46b08", "#ad4e00", "#873800", "#612500"]; orange.primary = orange[5]; var gold = ["#fffbe6", "#fff1b8", "#ffe58f", "#ffd666", "#ffc53d", "#faad14", "#d48806", "#ad6800", "#874d00", "#613400"]; gold.primary = gold[5]; var yellow = ["#feffe6", "#ffffb8", "#fffb8f", "#fff566", "#ffec3d", "#fadb14", "#d4b106", "#ad8b00", "#876800", "#614700"]; yellow.primary = yellow[5]; var lime = ["#fcffe6", "#f4ffb8", "#eaff8f", "#d3f261", "#bae637", "#a0d911", "#7cb305", "#5b8c00", "#3f6600", "#254000"]; lime.primary = lime[5]; var green = ["#f6ffed", "#d9f7be", "#b7eb8f", "#95de64", "#73d13d", "#52c41a", "#389e0d", "#237804", "#135200", "#092b00"]; green.primary = green[5]; var cyan = ["#e6fffb", "#b5f5ec", "#87e8de", "#5cdbd3", "#36cfc9", "#13c2c2", "#08979c", "#006d75", "#00474f", "#002329"]; cyan.primary = cyan[5]; var blue = ["#e6f4ff", "#bae0ff", "#91caff", "#69b1ff", "#4096ff", "#1677ff", "#0958d9", "#003eb3", "#002c8c", "#001d66"]; blue.primary = blue[5]; var geekblue = ["#f0f5ff", "#d6e4ff", "#adc6ff", "#85a5ff", "#597ef7", "#2f54eb", "#1d39c4", "#10239e", "#061178", "#030852"]; geekblue.primary = geekblue[5]; var purple = ["#f9f0ff", "#efdbff", "#d3adf7", "#b37feb", "#9254de", "#722ed1", "#531dab", "#391085", "#22075e", "#120338"]; purple.primary = purple[5]; var magenta = ["#fff0f6", "#ffd6e7", "#ffadd2", "#ff85c0", "#f759ab", "#eb2f96", "#c41d7f", "#9e1068", "#780650", "#520339"]; magenta.primary = magenta[5]; var grey = ["#a6a6a6", "#999999", "#8c8c8c", "#808080", "#737373", "#666666", "#404040", "#1a1a1a", "#000000", "#000000"]; grey.primary = grey[5]; var gray = grey; var presetPalettes = { red: red, volcano: volcano, orange: orange, gold: gold, yellow: yellow, lime: lime, green: green, cyan: cyan, blue: blue, geekblue: geekblue, purple: purple, magenta: magenta, grey: grey }; var redDark = ["#2a1215", "#431418", "#58181c", "#791a1f", "#a61d24", "#d32029", "#e84749", "#f37370", "#f89f9a", "#fac8c3"]; redDark.primary = redDark[5]; var volcanoDark = ["#2b1611", "#441d12", "#592716", "#7c3118", "#aa3e19", "#d84a1b", "#e87040", "#f3956a", "#f8b692", "#fad4bc"]; volcanoDark.primary = volcanoDark[5]; var orangeDark = ["#2b1d11", "#442a11", "#593815", "#7c4a15", "#aa6215", "#d87a16", "#e89a3c", "#f3b765", "#f8cf8d", "#fae3b7"]; orangeDark.primary = orangeDark[5]; var goldDark = ["#2b2111", "#443111", "#594214", "#7c5914", "#aa7714", "#d89614", "#e8b339", "#f3cc62", "#f8df8b", "#faedb5"]; goldDark.primary = goldDark[5]; var yellowDark = ["#2b2611", "#443b11", "#595014", "#7c6e14", "#aa9514", "#d8bd14", "#e8d639", "#f3ea62", "#f8f48b", "#fafab5"]; yellowDark.primary = yellowDark[5]; var limeDark = ["#1f2611", "#2e3c10", "#3e4f13", "#536d13", "#6f9412", "#8bbb11", "#a9d134", "#c9e75d", "#e4f88b", "#f0fab5"]; limeDark.primary = limeDark[5]; var greenDark = ["#162312", "#1d3712", "#274916", "#306317", "#3c8618", "#49aa19", "#6abe39", "#8fd460", "#b2e58b", "#d5f2bb"]; greenDark.primary = greenDark[5]; var cyanDark = ["#112123", "#113536", "#144848", "#146262", "#138585", "#13a8a8", "#33bcb7", "#58d1c9", "#84e2d8", "#b2f1e8"]; cyanDark.primary = cyanDark[5]; var blueDark = ["#111a2c", "#112545", "#15325b", "#15417e", "#1554ad", "#1668dc", "#3c89e8", "#65a9f3", "#8dc5f8", "#b7dcfa"]; blueDark.primary = blueDark[5]; var geekblueDark = ["#131629", "#161d40", "#1c2755", "#203175", "#263ea0", "#2b4acb", "#5273e0", "#7f9ef3", "#a8c1f8", "#d2e0fa"]; geekblueDark.primary = geekblueDark[5]; var purpleDark = ["#1a1325", "#24163a", "#301c4d", "#3e2069", "#51258f", "#642ab5", "#854eca", "#ab7ae0", "#cda8f0", "#ebd7fa"]; purpleDark.primary = purpleDark[5]; var magentaDark = ["#291321", "#40162f", "#551c3b", "#75204f", "#a02669", "#cb2b83", "#e0529c", "#f37fb7", "#f8a8cc", "#fad2e3"]; magentaDark.primary = magentaDark[5]; var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a", "#6a6a6a", "#7b7b7b", "#888888", "#969696"]; greyDark.primary = greyDark[5]; var presetDarkPalettes = { red: redDark, volcano: volcanoDark, orange: orangeDark, gold: goldDark, yellow: yellowDark, lime: limeDark, green: greenDark, cyan: cyanDark, blue: blueDark, geekblue: geekblueDark, purple: purpleDark, magenta: magentaDark, grey: greyDark }; ;// CONCATENATED MODULE: ./node_modules/@ant-design/colors/es/types.js ;// CONCATENATED MODULE: ./node_modules/@ant-design/colors/es/index.js /***/ }), /***/ "./node_modules/@ant-design/cssinjs-utils/es/index.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules ***! \*************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { genStyleUtils: function() { return /* reexport */ genStyleUtils; }, mergeToken: function() { return /* reexport */ merge; } }); // UNUSED EXPORTS: genCalc, statistic, statisticToken // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"); // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react"); var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_); // EXTERNAL MODULE: ./alias/cssinjs.js var cssinjs = __webpack_require__("./alias/cssinjs.js"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createClass.js"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js var assertThisInitialized = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js var inherits = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inherits.js"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js var createSuper = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createSuper.js"); ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/util/calc/calculator.js var AbstractCalculator = /*#__PURE__*/(0,createClass["default"])(function AbstractCalculator() { (0,classCallCheck["default"])(this, AbstractCalculator); }); /* harmony default export */ var calculator = (AbstractCalculator); ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/util/calc/CSSCalculator.js var CALC_UNIT = 'CALC_UNIT'; var regexp = new RegExp(CALC_UNIT, 'g'); function unit(value) { if (typeof value === 'number') { return "".concat(value).concat(CALC_UNIT); } return value; } var CSSCalculator = /*#__PURE__*/function (_AbstractCalculator) { (0,inherits["default"])(CSSCalculator, _AbstractCalculator); var _super = (0,createSuper["default"])(CSSCalculator); function CSSCalculator(num, unitlessCssVar) { var _this; (0,classCallCheck["default"])(this, CSSCalculator); _this = _super.call(this); (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "result", ''); (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "unitlessCssVar", void 0); (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "lowPriority", void 0); var numType = (0,esm_typeof["default"])(num); _this.unitlessCssVar = unitlessCssVar; if (num instanceof CSSCalculator) { _this.result = "(".concat(num.result, ")"); } else if (numType === 'number') { _this.result = unit(num); } else if (numType === 'string') { _this.result = num; } return _this; } (0,createClass["default"])(CSSCalculator, [{ key: "add", value: function add(num) { if (num instanceof CSSCalculator) { this.result = "".concat(this.result, " + ").concat(num.getResult()); } else if (typeof num === 'number' || typeof num === 'string') { this.result = "".concat(this.result, " + ").concat(unit(num)); } this.lowPriority = true; return this; } }, { key: "sub", value: function sub(num) { if (num instanceof CSSCalculator) { this.result = "".concat(this.result, " - ").concat(num.getResult()); } else if (typeof num === 'number' || typeof num === 'string') { this.result = "".concat(this.result, " - ").concat(unit(num)); } this.lowPriority = true; return this; } }, { key: "mul", value: function mul(num) { if (this.lowPriority) { this.result = "(".concat(this.result, ")"); } if (num instanceof CSSCalculator) { this.result = "".concat(this.result, " * ").concat(num.getResult(true)); } else if (typeof num === 'number' || typeof num === 'string') { this.result = "".concat(this.result, " * ").concat(num); } this.lowPriority = false; return this; } }, { key: "div", value: function div(num) { if (this.lowPriority) { this.result = "(".concat(this.result, ")"); } if (num instanceof CSSCalculator) { this.result = "".concat(this.result, " / ").concat(num.getResult(true)); } else if (typeof num === 'number' || typeof num === 'string') { this.result = "".concat(this.result, " / ").concat(num); } this.lowPriority = false; return this; } }, { key: "getResult", value: function getResult(force) { return this.lowPriority || force ? "(".concat(this.result, ")") : this.result; } }, { key: "equal", value: function equal(options) { var _this2 = this; var _ref = options || {}, cssUnit = _ref.unit; var mergedUnit = true; if (typeof cssUnit === 'boolean') { mergedUnit = cssUnit; } else if (Array.from(this.unitlessCssVar).some(function (cssVar) { return _this2.result.includes(cssVar); })) { mergedUnit = false; } this.result = this.result.replace(regexp, mergedUnit ? 'px' : ''); if (typeof this.lowPriority !== 'undefined') { return "calc(".concat(this.result, ")"); } return this.result; } }]); return CSSCalculator; }(calculator); ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/util/calc/NumCalculator.js var NumCalculator = /*#__PURE__*/function (_AbstractCalculator) { (0,inherits["default"])(NumCalculator, _AbstractCalculator); var _super = (0,createSuper["default"])(NumCalculator); function NumCalculator(num) { var _this; (0,classCallCheck["default"])(this, NumCalculator); _this = _super.call(this); (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "result", 0); if (num instanceof NumCalculator) { _this.result = num.result; } else if (typeof num === 'number') { _this.result = num; } return _this; } (0,createClass["default"])(NumCalculator, [{ key: "add", value: function add(num) { if (num instanceof NumCalculator) { this.result += num.result; } else if (typeof num === 'number') { this.result += num; } return this; } }, { key: "sub", value: function sub(num) { if (num instanceof NumCalculator) { this.result -= num.result; } else if (typeof num === 'number') { this.result -= num; } return this; } }, { key: "mul", value: function mul(num) { if (num instanceof NumCalculator) { this.result *= num.result; } else if (typeof num === 'number') { this.result *= num; } return this; } }, { key: "div", value: function div(num) { if (num instanceof NumCalculator) { this.result /= num.result; } else if (typeof num === 'number') { this.result /= num; } return this; } }, { key: "equal", value: function equal() { return this.result; } }]); return NumCalculator; }(calculator); ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/util/calc/index.js var genCalc = function genCalc(type, unitlessCssVar) { var Calculator = type === 'css' ? CSSCalculator : NumCalculator; return function (num) { return new Calculator(num, unitlessCssVar); }; }; /* harmony default export */ var util_calc = (genCalc); ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/util/getCompVarPrefix.js var getCompVarPrefix = function getCompVarPrefix(component, prefix) { return "".concat([prefix, component.replace(/([A-Z]+)([A-Z][a-z]+)/g, '$1-$2').replace(/([a-z])([A-Z])/g, '$1-$2')].filter(Boolean).join('-')); }; /* harmony default export */ var util_getCompVarPrefix = (getCompVarPrefix); // EXTERNAL MODULE: ./node_modules/rc-util/es/index.js var es = __webpack_require__("./node_modules/rc-util/es/index.js"); ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/util/getComponentToken.js function getComponentToken(component, token, defaultToken, options) { var customToken = (0,objectSpread2["default"])({}, token[component]); if (options !== null && options !== void 0 && options.deprecatedTokens) { var deprecatedTokens = options.deprecatedTokens; deprecatedTokens.forEach(function (_ref) { var _ref2 = (0,slicedToArray["default"])(_ref, 2), oldTokenKey = _ref2[0], newTokenKey = _ref2[1]; if (true) { (0,es.warning)(!(customToken !== null && customToken !== void 0 && customToken[oldTokenKey]), "Component Token `".concat(String(oldTokenKey), "` of ").concat(String(component), " is deprecated. Please use `").concat(String(newTokenKey), "` instead.")); } // Should wrap with `if` clause, or there will be `undefined` in object. if (customToken !== null && customToken !== void 0 && customToken[oldTokenKey] || customToken !== null && customToken !== void 0 && customToken[newTokenKey]) { var _customToken$newToken; (_customToken$newToken = customToken[newTokenKey]) !== null && _customToken$newToken !== void 0 ? _customToken$newToken : customToken[newTokenKey] = customToken === null || customToken === void 0 ? void 0 : customToken[oldTokenKey]; } }); } var mergedToken = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, defaultToken), customToken); // Remove same value as global token to minimize size Object.keys(mergedToken).forEach(function (key) { if (mergedToken[key] === token[key]) { delete mergedToken[key]; } }); return mergedToken; } ; ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/util/statistic.js var enableStatistic = true || 0; var recording = true; /** * This function will do as `Object.assign` in production. But will use Object.defineProperty:get to * pass all value access in development. To support statistic field usage with alias token. */ function merge() { for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) { objs[_key] = arguments[_key]; } /* istanbul ignore next */ if (!enableStatistic) { return Object.assign.apply(Object, [{}].concat(objs)); } recording = false; var ret = {}; objs.forEach(function (obj) { if ((0,esm_typeof["default"])(obj) !== 'object') return; var keys = Object.keys(obj); keys.forEach(function (key) { Object.defineProperty(ret, key, { configurable: true, enumerable: true, get: function get() { return obj[key]; } }); }); }); recording = true; return ret; } /** @internal Internal Usage. Not use in your production. */ var statistic = {}; /** @internal Internal Usage. Not use in your production. */ var _statistic_build_ = {}; /* istanbul ignore next */ function noop() {} /** Statistic token usage case. Should use `merge` function if you do not want spread record. */ var statisticToken = function statisticToken(token) { var tokenKeys; var proxy = token; var flush = noop; if (enableStatistic && typeof Proxy !== 'undefined') { tokenKeys = new Set(); proxy = new Proxy(token, { get: function get(obj, prop) { if (recording) { tokenKeys.add(prop); } return obj[prop]; } }); flush = function flush(componentName, componentToken) { var _statistic$componentN; statistic[componentName] = { global: Array.from(tokenKeys), component: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, (_statistic$componentN = statistic[componentName]) === null || _statistic$componentN === void 0 ? void 0 : _statistic$componentN.component), componentToken) }; }; } return { token: proxy, keys: tokenKeys, flush: flush }; }; /* harmony default export */ var util_statistic = (statisticToken); ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/util/getDefaultComponentToken.js function getDefaultComponentToken(component, token, getDefaultToken) { if (typeof getDefaultToken === 'function') { var _token$component; return getDefaultToken(merge(token, (_token$component = token[component]) !== null && _token$component !== void 0 ? _token$component : {})); } return getDefaultToken !== null && getDefaultToken !== void 0 ? getDefaultToken : {}; } ; ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/util/maxmin.js function genMaxMin(type) { if (type === 'js') { return { max: Math.max, min: Math.min }; } return { max: function max() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return "max(".concat(args.map(function (value) { return (0,cssinjs.unit)(value); }).join(','), ")"); }, min: function min() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } return "min(".concat(args.map(function (value) { return (0,cssinjs.unit)(value); }).join(','), ")"); } }; } ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/_util/hooks/useUniqueMemo.js var BEAT_LIMIT = 1000 * 60 * 10; /** * A helper class to map keys to values. * It supports both primitive keys and object keys. */ var ArrayKeyMap = /*#__PURE__*/function () { function ArrayKeyMap() { (0,classCallCheck["default"])(this, ArrayKeyMap); (0,defineProperty["default"])(this, "map", new Map()); // Use WeakMap to avoid memory leak (0,defineProperty["default"])(this, "objectIDMap", new WeakMap()); (0,defineProperty["default"])(this, "nextID", 0); (0,defineProperty["default"])(this, "lastAccessBeat", new Map()); // We will clean up the cache when reach the limit (0,defineProperty["default"])(this, "accessBeat", 0); } (0,createClass["default"])(ArrayKeyMap, [{ key: "set", value: function set(keys, value) { // New set will trigger clear this.clear(); // Set logic var compositeKey = this.getCompositeKey(keys); this.map.set(compositeKey, value); this.lastAccessBeat.set(compositeKey, Date.now()); } }, { key: "get", value: function get(keys) { var compositeKey = this.getCompositeKey(keys); var cache = this.map.get(compositeKey); this.lastAccessBeat.set(compositeKey, Date.now()); this.accessBeat += 1; return cache; } }, { key: "getCompositeKey", value: function getCompositeKey(keys) { var _this = this; var ids = keys.map(function (key) { if (key && (0,esm_typeof["default"])(key) === 'object') { return "obj_".concat(_this.getObjectID(key)); } return "".concat((0,esm_typeof["default"])(key), "_").concat(key); }); return ids.join('|'); } }, { key: "getObjectID", value: function getObjectID(obj) { if (this.objectIDMap.has(obj)) { return this.objectIDMap.get(obj); } var id = this.nextID; this.objectIDMap.set(obj, id); this.nextID += 1; return id; } }, { key: "clear", value: function clear() { var _this2 = this; if (this.accessBeat > 10000) { var now = Date.now(); this.lastAccessBeat.forEach(function (beat, key) { if (now - beat > BEAT_LIMIT) { _this2.map.delete(key); _this2.lastAccessBeat.delete(key); } }); this.accessBeat = 0; } } }]); return ArrayKeyMap; }(); var uniqueMap = new ArrayKeyMap(); /** * Like `useMemo`, but this hook result will be shared across all instances. */ function useUniqueMemo(memoFn, deps) { return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () { var cachedValue = uniqueMap.get(deps); if (cachedValue) { return cachedValue; } var newValue = memoFn(); uniqueMap.set(deps, newValue); return newValue; }, deps); } /* harmony default export */ var hooks_useUniqueMemo = (useUniqueMemo); ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/hooks/useCSP.js /** * Provide a default hook since not everyone need config this. */ var useDefaultCSP = function useDefaultCSP() { return {}; }; /* harmony default export */ var hooks_useCSP = (useDefaultCSP); ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/util/genStyleUtils.js function genStyleUtils(config) { // Dependency inversion for preparing basic config. var _config$useCSP = config.useCSP, useCSP = _config$useCSP === void 0 ? hooks_useCSP : _config$useCSP, useToken = config.useToken, usePrefix = config.usePrefix, getResetStyles = config.getResetStyles, getCommonStyle = config.getCommonStyle, getCompUnitless = config.getCompUnitless; function genStyleHooks(component, styleFn, getDefaultToken, options) { var componentName = Array.isArray(component) ? component[0] : component; function prefixToken(key) { return "".concat(String(componentName)).concat(key.slice(0, 1).toUpperCase()).concat(key.slice(1)); } // Fill unitless var originUnitless = (options === null || options === void 0 ? void 0 : options.unitless) || {}; var originCompUnitless = typeof getCompUnitless === 'function' ? getCompUnitless(component) : {}; var compUnitless = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, originCompUnitless), {}, (0,defineProperty["default"])({}, prefixToken('zIndexPopup'), true)); Object.keys(originUnitless).forEach(function (key) { compUnitless[prefixToken(key)] = originUnitless[key]; }); // Options var mergedOptions = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, options), {}, { unitless: compUnitless, prefixToken: prefixToken }); // Hooks var useStyle = genComponentStyleHook(component, styleFn, getDefaultToken, mergedOptions); var useCSSVar = genCSSVarRegister(componentName, getDefaultToken, mergedOptions); return function (prefixCls) { var rootCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : prefixCls; var _useStyle = useStyle(prefixCls, rootCls), _useStyle2 = (0,slicedToArray["default"])(_useStyle, 2), hashId = _useStyle2[1]; var _useCSSVar = useCSSVar(rootCls), _useCSSVar2 = (0,slicedToArray["default"])(_useCSSVar, 2), wrapCSSVar = _useCSSVar2[0], cssVarCls = _useCSSVar2[1]; return [wrapCSSVar, hashId, cssVarCls]; }; } function genCSSVarRegister(component, getDefaultToken, options) { var compUnitless = options.unitless, _options$injectStyle = options.injectStyle, injectStyle = _options$injectStyle === void 0 ? true : _options$injectStyle, prefixToken = options.prefixToken, ignore = options.ignore; var CSSVarRegister = function CSSVarRegister(_ref) { var rootCls = _ref.rootCls, _ref$cssVar = _ref.cssVar, cssVar = _ref$cssVar === void 0 ? {} : _ref$cssVar; var _useToken = useToken(), realToken = _useToken.realToken; (0,cssinjs.useCSSVarRegister)({ path: [component], prefix: cssVar.prefix, key: cssVar.key, unitless: compUnitless, ignore: ignore, token: realToken, scope: rootCls }, function () { var defaultToken = getDefaultComponentToken(component, realToken, getDefaultToken); var componentToken = getComponentToken(component, realToken, defaultToken, { deprecatedTokens: options === null || options === void 0 ? void 0 : options.deprecatedTokens }); Object.keys(defaultToken).forEach(function (key) { componentToken[prefixToken(key)] = componentToken[key]; delete componentToken[key]; }); return componentToken; }); return null; }; var useCSSVar = function useCSSVar(rootCls) { var _useToken2 = useToken(), cssVar = _useToken2.cssVar; return [function (node) { return injectStyle && cssVar ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(CSSVarRegister, { rootCls: rootCls, cssVar: cssVar, component: component }), node) : node; }, cssVar === null || cssVar === void 0 ? void 0 : cssVar.key]; }; return useCSSVar; } function genComponentStyleHook(componentName, styleFn, getDefaultToken) { var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var cells = Array.isArray(componentName) ? componentName : [componentName, componentName]; var _cells = (0,slicedToArray["default"])(cells, 1), component = _cells[0]; var concatComponent = cells.join('-'); // Return new style hook return function (prefixCls) { var rootCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : prefixCls; var _useToken3 = useToken(), theme = _useToken3.theme, realToken = _useToken3.realToken, hashId = _useToken3.hashId, token = _useToken3.token, cssVar = _useToken3.cssVar; var _usePrefix = usePrefix(), rootPrefixCls = _usePrefix.rootPrefixCls, iconPrefixCls = _usePrefix.iconPrefixCls; var csp = useCSP(); var type = cssVar ? 'css' : 'js'; // Use unique memo to share the result across all instances var calc = hooks_useUniqueMemo(function () { var unitlessCssVar = new Set(); if (cssVar) { Object.keys(options.unitless || {}).forEach(function (key) { // Some component proxy the AliasToken (e.g. Image) and some not (e.g. Modal) // We should both pass in `unitlessCssVar` to make sure the CSSVar can be unitless. unitlessCssVar.add((0,cssinjs.token2CSSVar)(key, cssVar.prefix)); unitlessCssVar.add((0,cssinjs.token2CSSVar)(key, util_getCompVarPrefix(component, cssVar.prefix))); }); } return util_calc(type, unitlessCssVar); }, [type, component, cssVar === null || cssVar === void 0 ? void 0 : cssVar.prefix]); var _genMaxMin = genMaxMin(type), max = _genMaxMin.max, min = _genMaxMin.min; // Shared config var sharedConfig = { theme: theme, token: token, hashId: hashId, nonce: function nonce() { return csp.nonce; }, clientOnly: options.clientOnly, layer: { name: 'antd' }, // antd is always at top of styles order: options.order || -999 }; // Generate style for all need reset tags. (0,cssinjs.useStyleRegister)((0,objectSpread2["default"])((0,objectSpread2["default"])({}, sharedConfig), {}, { clientOnly: false, path: ['Shared', rootPrefixCls] }), function () { return typeof getResetStyles === 'function' ? getResetStyles(token) : []; }); var wrapSSR = (0,cssinjs.useStyleRegister)((0,objectSpread2["default"])((0,objectSpread2["default"])({}, sharedConfig), {}, { path: [concatComponent, prefixCls, iconPrefixCls] }), function () { if (options.injectStyle === false) { return []; } var _statisticToken = util_statistic(token), proxyToken = _statisticToken.token, flush = _statisticToken.flush; var defaultComponentToken = getDefaultComponentToken(component, realToken, getDefaultToken); var componentCls = ".".concat(prefixCls); var componentToken = getComponentToken(component, realToken, defaultComponentToken, { deprecatedTokens: options.deprecatedTokens }); if (cssVar && (0,esm_typeof["default"])(defaultComponentToken) === 'object') { Object.keys(defaultComponentToken).forEach(function (key) { defaultComponentToken[key] = "var(".concat((0,cssinjs.token2CSSVar)(key, util_getCompVarPrefix(component, cssVar.prefix)), ")"); }); } var mergedToken = merge(proxyToken, { componentCls: componentCls, prefixCls: prefixCls, iconCls: ".".concat(iconPrefixCls), antCls: ".".concat(rootPrefixCls), calc: calc, // @ts-ignore max: max, // @ts-ignore min: min }, cssVar ? defaultComponentToken : componentToken); var styleInterpolation = styleFn(mergedToken, { hashId: hashId, prefixCls: prefixCls, rootPrefixCls: rootPrefixCls, iconPrefixCls: iconPrefixCls }); flush(component, componentToken); var commonStyle = typeof getCommonStyle === 'function' ? getCommonStyle(mergedToken, prefixCls, rootCls, options.resetFont) : null; return [options.resetStyle === false ? null : commonStyle, styleInterpolation]; }); return [wrapSSR, hashId]; }; } function genSubStyleComponent(componentName, styleFn, getDefaultToken) { var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var useStyle = genComponentStyleHook(componentName, styleFn, getDefaultToken, (0,objectSpread2["default"])({ resetStyle: false, // Sub Style should default after root one order: -998 }, options)); var StyledComponent = function StyledComponent(_ref2) { var prefixCls = _ref2.prefixCls, _ref2$rootCls = _ref2.rootCls, rootCls = _ref2$rootCls === void 0 ? prefixCls : _ref2$rootCls; useStyle(prefixCls, rootCls); return null; }; if (true) { StyledComponent.displayName = "SubStyle_".concat(String(Array.isArray(componentName) ? componentName.join('.') : componentName)); } return StyledComponent; } return { genStyleHooks: genStyleHooks, genSubStyleComponent: genSubStyleComponent, genComponentStyleHook: genComponentStyleHook }; } ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js /***/ }), /***/ "./node_modules/@ant-design/cssinjs/es/hooks/useHMR.js": /*!*************************************************************!*\ !*** ./node_modules/@ant-design/cssinjs/es/hooks/useHMR.js ***! \*************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* module decorator */ module = __webpack_require__.hmd(module); function useProdHMR() { return false; } var webpackHMR = false; function useDevHMR() { return webpackHMR; } /* harmony default export */ __webpack_exports__["default"] = ( false ? 0 : useDevHMR); // Webpack `module.hot.accept` do not support any deps update trigger // We have to hack handler to force mark as HRM if ( true && module && module.hot && 0) { var originWebpackHotUpdate, win; } /***/ }), /***/ "./node_modules/@ant-design/cssinjs/es/index.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/cssinjs/es/index.js + 38 modules ***! \*******************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { Keyframes: function() { return /* reexport */ Keyframes; }, NaNLinter: function() { return /* reexport */ NaNLinter; }, StyleProvider: function() { return /* reexport */ StyleProvider; }, Theme: function() { return /* reexport */ Theme; }, _experimental: function() { return /* binding */ _experimental; }, createCache: function() { return /* reexport */ createCache; }, createTheme: function() { return /* reexport */ createTheme; }, extractStyle: function() { return /* reexport */ extractStyle; }, genCalc: function() { return /* reexport */ calc; }, getComputedToken: function() { return /* reexport */ getComputedToken; }, legacyLogicalPropertiesTransformer: function() { return /* reexport */ legacyLogicalProperties; }, legacyNotSelectorLinter: function() { return /* reexport */ legacyNotSelectorLinter; }, logicalPropertiesLinter: function() { return /* reexport */ logicalPropertiesLinter; }, parentSelectorLinter: function() { return /* reexport */ parentSelectorLinter; }, px2remTransformer: function() { return /* reexport */ px2rem; }, token2CSSVar: function() { return /* reexport */ token2CSSVar; }, unit: function() { return /* reexport */ util_unit; }, useCSSVarRegister: function() { return /* reexport */ hooks_useCSSVarRegister; }, useCacheToken: function() { return /* reexport */ useCacheToken; }, useStyleRegister: function() { return /* reexport */ useStyleRegister; } }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules var toConsumableArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"); ;// CONCATENATED MODULE: ./node_modules/@emotion/hash/dist/hash.browser.esm.js /* eslint-disable */ // Inspired by https://github.com/garycourt/murmurhash-js // Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86 function murmur2(str) { // 'm' and 'r' are mixing constants generated offline. // They're not really 'magic', they just happen to work well. // const m = 0x5bd1e995; // const r = 24; // Initialize the hash var h = 0; // Mix 4 bytes at a time into the hash var k, i = 0, len = str.length; for (; len >= 4; ++i, len -= 4) { k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24; k = /* Math.imul(k, m): */ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16); k ^= /* k >>> r: */ k >>> 24; h = /* Math.imul(k, m): */ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^ /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); } // Handle the last few bytes of the input array switch (len) { case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16; case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8; case 1: h ^= str.charCode