UNPKG

@douyinfe/semi-ui

Version:

A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.

1,743 lines (1,590 loc) 6.59 MB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-dom")); else if(typeof define === 'function' && define.amd) define(["react", "react-dom"], factory); else if(typeof exports === 'object') exports["SemiUI"] = factory(require("react"), require("react-dom")); else root["SemiUI"] = factory(root["React"], root["ReactDOM"]); })(self, (__WEBPACK_EXTERNAL_MODULE_neV8__, __WEBPACK_EXTERNAL_MODULE_sw63__) => { return /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "yBkX": /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const XHTMLEntities = __webpack_require__("43tb"); const hexNumber = /^[\da-fA-F]+$/; const decimalNumber = /^\d+$/; // The map to `acorn-jsx` tokens from `acorn` namespace objects. const acornJsxMap = new WeakMap(); // Get the original tokens for the given `acorn` namespace object. function getJsxTokens(acorn) { acorn = acorn.Parser.acorn || acorn; let acornJsx = acornJsxMap.get(acorn); if (!acornJsx) { const tt = acorn.tokTypes; const TokContext = acorn.TokContext; const TokenType = acorn.TokenType; const tc_oTag = new TokContext('<tag', false); const tc_cTag = new TokContext('</tag', false); const tc_expr = new TokContext('<tag>...</tag>', true, true); const tokContexts = { tc_oTag: tc_oTag, tc_cTag: tc_cTag, tc_expr: tc_expr }; const tokTypes = { jsxName: new TokenType('jsxName'), jsxText: new TokenType('jsxText', {beforeExpr: true}), jsxTagStart: new TokenType('jsxTagStart', {startsExpr: true}), jsxTagEnd: new TokenType('jsxTagEnd') }; tokTypes.jsxTagStart.updateContext = function() { this.context.push(tc_expr); // treat as beginning of JSX expression this.context.push(tc_oTag); // start opening tag context this.exprAllowed = false; }; tokTypes.jsxTagEnd.updateContext = function(prevType) { let out = this.context.pop(); if (out === tc_oTag && prevType === tt.slash || out === tc_cTag) { this.context.pop(); this.exprAllowed = this.curContext() === tc_expr; } else { this.exprAllowed = true; } }; acornJsx = { tokContexts: tokContexts, tokTypes: tokTypes }; acornJsxMap.set(acorn, acornJsx); } return acornJsx; } // Transforms JSX element name to string. function getQualifiedJSXName(object) { if (!object) return object; if (object.type === 'JSXIdentifier') return object.name; if (object.type === 'JSXNamespacedName') return object.namespace.name + ':' + object.name.name; if (object.type === 'JSXMemberExpression') return getQualifiedJSXName(object.object) + '.' + getQualifiedJSXName(object.property); } module.exports = function(options) { options = options || {}; return function(Parser) { return plugin({ allowNamespaces: options.allowNamespaces !== false, allowNamespacedObjects: !!options.allowNamespacedObjects }, Parser); }; }; // This is `tokTypes` of the peer dep. // This can be different instances from the actual `tokTypes` this plugin uses. Object.defineProperty(module.exports, "tokTypes", ({ get: function get_tokTypes() { return getJsxTokens(__webpack_require__("88MF")).tokTypes; }, configurable: true, enumerable: true })); function plugin(options, Parser) { const acorn = Parser.acorn || __webpack_require__("88MF"); const acornJsx = getJsxTokens(acorn); const tt = acorn.tokTypes; const tok = acornJsx.tokTypes; const tokContexts = acorn.tokContexts; const tc_oTag = acornJsx.tokContexts.tc_oTag; const tc_cTag = acornJsx.tokContexts.tc_cTag; const tc_expr = acornJsx.tokContexts.tc_expr; const isNewLine = acorn.isNewLine; const isIdentifierStart = acorn.isIdentifierStart; const isIdentifierChar = acorn.isIdentifierChar; return class extends Parser { // Expose actual `tokTypes` and `tokContexts` to other plugins. static get acornJsx() { return acornJsx; } // Reads inline JSX contents token. jsx_readToken() { let out = '', chunkStart = this.pos; for (;;) { if (this.pos >= this.input.length) this.raise(this.start, 'Unterminated JSX contents'); let ch = this.input.charCodeAt(this.pos); switch (ch) { case 60: // '<' case 123: // '{' if (this.pos === this.start) { if (ch === 60 && this.exprAllowed) { ++this.pos; return this.finishToken(tok.jsxTagStart); } return this.getTokenFromCode(ch); } out += this.input.slice(chunkStart, this.pos); return this.finishToken(tok.jsxText, out); case 38: // '&' out += this.input.slice(chunkStart, this.pos); out += this.jsx_readEntity(); chunkStart = this.pos; break; case 62: // '>' case 125: // '}' this.raise( this.pos, "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (ch === 62 ? "&gt;" : "&rbrace;") + "` or " + "`{\"" + this.input[this.pos] + "\"}" + "`?" ); default: if (isNewLine(ch)) { out += this.input.slice(chunkStart, this.pos); out += this.jsx_readNewLine(true); chunkStart = this.pos; } else { ++this.pos; } } } } jsx_readNewLine(normalizeCRLF) { let ch = this.input.charCodeAt(this.pos); let out; ++this.pos; if (ch === 13 && this.input.charCodeAt(this.pos) === 10) { ++this.pos; out = normalizeCRLF ? '\n' : '\r\n'; } else { out = String.fromCharCode(ch); } if (this.options.locations) { ++this.curLine; this.lineStart = this.pos; } return out; } jsx_readString(quote) { let out = '', chunkStart = ++this.pos; for (;;) { if (this.pos >= this.input.length) this.raise(this.start, 'Unterminated string constant'); let ch = this.input.charCodeAt(this.pos); if (ch === quote) break; if (ch === 38) { // '&' out += this.input.slice(chunkStart, this.pos); out += this.jsx_readEntity(); chunkStart = this.pos; } else if (isNewLine(ch)) { out += this.input.slice(chunkStart, this.pos); out += this.jsx_readNewLine(false); chunkStart = this.pos; } else { ++this.pos; } } out += this.input.slice(chunkStart, this.pos++); return this.finishToken(tt.string, out); } jsx_readEntity() { let str = '', count = 0, entity; let ch = this.input[this.pos]; if (ch !== '&') this.raise(this.pos, 'Entity must start with an ampersand'); let startPos = ++this.pos; while (this.pos < this.input.length && count++ < 10) { ch = this.input[this.pos++]; if (ch === ';') { if (str[0] === '#') { if (str[1] === 'x') { str = str.substr(2); if (hexNumber.test(str)) entity = String.fromCharCode(parseInt(str, 16)); } else { str = str.substr(1); if (decimalNumber.test(str)) entity = String.fromCharCode(parseInt(str, 10)); } } else { entity = XHTMLEntities[str]; } break; } str += ch; } if (!entity) { this.pos = startPos; return '&'; } return entity; } // Read a JSX identifier (valid tag or attribute name). // // Optimized version since JSX identifiers can't contain // escape characters and so can be read as single slice. // Also assumes that first character was already checked // by isIdentifierStart in readToken. jsx_readWord() { let ch, start = this.pos; do { ch = this.input.charCodeAt(++this.pos); } while (isIdentifierChar(ch) || ch === 45); // '-' return this.finishToken(tok.jsxName, this.input.slice(start, this.pos)); } // Parse next token as JSX identifier jsx_parseIdentifier() { let node = this.startNode(); if (this.type === tok.jsxName) node.name = this.value; else if (this.type.keyword) node.name = this.type.keyword; else this.unexpected(); this.next(); return this.finishNode(node, 'JSXIdentifier'); } // Parse namespaced identifier. jsx_parseNamespacedName() { let startPos = this.start, startLoc = this.startLoc; let name = this.jsx_parseIdentifier(); if (!options.allowNamespaces || !this.eat(tt.colon)) return name; var node = this.startNodeAt(startPos, startLoc); node.namespace = name; node.name = this.jsx_parseIdentifier(); return this.finishNode(node, 'JSXNamespacedName'); } // Parses element name in any form - namespaced, member // or single identifier. jsx_parseElementName() { if (this.type === tok.jsxTagEnd) return ''; let startPos = this.start, startLoc = this.startLoc; let node = this.jsx_parseNamespacedName(); if (this.type === tt.dot && node.type === 'JSXNamespacedName' && !options.allowNamespacedObjects) { this.unexpected(); } while (this.eat(tt.dot)) { let newNode = this.startNodeAt(startPos, startLoc); newNode.object = node; newNode.property = this.jsx_parseIdentifier(); node = this.finishNode(newNode, 'JSXMemberExpression'); } return node; } // Parses any type of JSX attribute value. jsx_parseAttributeValue() { switch (this.type) { case tt.braceL: let node = this.jsx_parseExpressionContainer(); if (node.expression.type === 'JSXEmptyExpression') this.raise(node.start, 'JSX attributes must only be assigned a non-empty expression'); return node; case tok.jsxTagStart: case tt.string: return this.parseExprAtom(); default: this.raise(this.start, 'JSX value should be either an expression or a quoted JSX text'); } } // JSXEmptyExpression is unique type since it doesn't actually parse anything, // and so it should start at the end of last read token (left brace) and finish // at the beginning of the next one (right brace). jsx_parseEmptyExpression() { let node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc); return this.finishNodeAt(node, 'JSXEmptyExpression', this.start, this.startLoc); } // Parses JSX expression enclosed into curly brackets. jsx_parseExpressionContainer() { let node = this.startNode(); this.next(); node.expression = this.type === tt.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression(); this.expect(tt.braceR); return this.finishNode(node, 'JSXExpressionContainer'); } // Parses following JSX attribute name-value pair. jsx_parseAttribute() { let node = this.startNode(); if (this.eat(tt.braceL)) { this.expect(tt.ellipsis); node.argument = this.parseMaybeAssign(); this.expect(tt.braceR); return this.finishNode(node, 'JSXSpreadAttribute'); } node.name = this.jsx_parseNamespacedName(); node.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null; return this.finishNode(node, 'JSXAttribute'); } // Parses JSX opening tag starting after '<'. jsx_parseOpeningElementAt(startPos, startLoc) { let node = this.startNodeAt(startPos, startLoc); node.attributes = []; let nodeName = this.jsx_parseElementName(); if (nodeName) node.name = nodeName; while (this.type !== tt.slash && this.type !== tok.jsxTagEnd) node.attributes.push(this.jsx_parseAttribute()); node.selfClosing = this.eat(tt.slash); this.expect(tok.jsxTagEnd); return this.finishNode(node, nodeName ? 'JSXOpeningElement' : 'JSXOpeningFragment'); } // Parses JSX closing tag starting after '</'. jsx_parseClosingElementAt(startPos, startLoc) { let node = this.startNodeAt(startPos, startLoc); let nodeName = this.jsx_parseElementName(); if (nodeName) node.name = nodeName; this.expect(tok.jsxTagEnd); return this.finishNode(node, nodeName ? 'JSXClosingElement' : 'JSXClosingFragment'); } // Parses entire JSX element, including it's opening tag // (starting after '<'), attributes, contents and closing tag. jsx_parseElementAt(startPos, startLoc) { let node = this.startNodeAt(startPos, startLoc); let children = []; let openingElement = this.jsx_parseOpeningElementAt(startPos, startLoc); let closingElement = null; if (!openingElement.selfClosing) { contents: for (;;) { switch (this.type) { case tok.jsxTagStart: startPos = this.start; startLoc = this.startLoc; this.next(); if (this.eat(tt.slash)) { closingElement = this.jsx_parseClosingElementAt(startPos, startLoc); break contents; } children.push(this.jsx_parseElementAt(startPos, startLoc)); break; case tok.jsxText: children.push(this.parseExprAtom()); break; case tt.braceL: children.push(this.jsx_parseExpressionContainer()); break; default: this.unexpected(); } } if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { this.raise( closingElement.start, 'Expected corresponding JSX closing tag for <' + getQualifiedJSXName(openingElement.name) + '>'); } } let fragmentOrElement = openingElement.name ? 'Element' : 'Fragment'; node['opening' + fragmentOrElement] = openingElement; node['closing' + fragmentOrElement] = closingElement; node.children = children; if (this.type === tt.relational && this.value === "<") { this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"); } return this.finishNode(node, 'JSX' + fragmentOrElement); } // Parse JSX text jsx_parseText() { let node = this.parseLiteral(this.value); node.type = "JSXText"; return node; } // Parses entire JSX element from current position. jsx_parseElement() { let startPos = this.start, startLoc = this.startLoc; this.next(); return this.jsx_parseElementAt(startPos, startLoc); } parseExprAtom(refShortHandDefaultPos) { if (this.type === tok.jsxText) return this.jsx_parseText(); else if (this.type === tok.jsxTagStart) return this.jsx_parseElement(); else return super.parseExprAtom(refShortHandDefaultPos); } readToken(code) { let context = this.curContext(); if (context === tc_expr) return this.jsx_readToken(); if (context === tc_oTag || context === tc_cTag) { if (isIdentifierStart(code)) return this.jsx_readWord(); if (code == 62) { ++this.pos; return this.finishToken(tok.jsxTagEnd); } if ((code === 34 || code === 39) && context == tc_oTag) return this.jsx_readString(code); } if (code === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) { ++this.pos; return this.finishToken(tok.jsxTagStart); } return super.readToken(code); } updateContext(prevType) { if (this.type == tt.braceL) { var curContext = this.curContext(); if (curContext == tc_oTag) this.context.push(tokContexts.b_expr); else if (curContext == tc_expr) this.context.push(tokContexts.b_tmpl); else super.updateContext(prevType); this.exprAllowed = true; } else if (this.type === tt.slash && prevType === tok.jsxTagStart) { this.context.length -= 2; // do not consider JSX expr -> JSX open tag -> ... anymore this.context.push(tc_cTag); // reconsider as closing tag context this.exprAllowed = false; } else { return super.updateContext(prevType); } } }; } /***/ }), /***/ "43tb": /***/ ((module) => { module.exports = { quot: '\u0022', amp: '&', apos: '\u0027', lt: '<', gt: '>', nbsp: '\u00A0', iexcl: '\u00A1', cent: '\u00A2', pound: '\u00A3', curren: '\u00A4', yen: '\u00A5', brvbar: '\u00A6', sect: '\u00A7', uml: '\u00A8', copy: '\u00A9', ordf: '\u00AA', laquo: '\u00AB', not: '\u00AC', shy: '\u00AD', reg: '\u00AE', macr: '\u00AF', deg: '\u00B0', plusmn: '\u00B1', sup2: '\u00B2', sup3: '\u00B3', acute: '\u00B4', micro: '\u00B5', para: '\u00B6', middot: '\u00B7', cedil: '\u00B8', sup1: '\u00B9', ordm: '\u00BA', raquo: '\u00BB', frac14: '\u00BC', frac12: '\u00BD', frac34: '\u00BE', iquest: '\u00BF', Agrave: '\u00C0', Aacute: '\u00C1', Acirc: '\u00C2', Atilde: '\u00C3', Auml: '\u00C4', Aring: '\u00C5', AElig: '\u00C6', Ccedil: '\u00C7', Egrave: '\u00C8', Eacute: '\u00C9', Ecirc: '\u00CA', Euml: '\u00CB', Igrave: '\u00CC', Iacute: '\u00CD', Icirc: '\u00CE', Iuml: '\u00CF', ETH: '\u00D0', Ntilde: '\u00D1', Ograve: '\u00D2', Oacute: '\u00D3', Ocirc: '\u00D4', Otilde: '\u00D5', Ouml: '\u00D6', times: '\u00D7', Oslash: '\u00D8', Ugrave: '\u00D9', Uacute: '\u00DA', Ucirc: '\u00DB', Uuml: '\u00DC', Yacute: '\u00DD', THORN: '\u00DE', szlig: '\u00DF', agrave: '\u00E0', aacute: '\u00E1', acirc: '\u00E2', atilde: '\u00E3', auml: '\u00E4', aring: '\u00E5', aelig: '\u00E6', ccedil: '\u00E7', egrave: '\u00E8', eacute: '\u00E9', ecirc: '\u00EA', euml: '\u00EB', igrave: '\u00EC', iacute: '\u00ED', icirc: '\u00EE', iuml: '\u00EF', eth: '\u00F0', ntilde: '\u00F1', ograve: '\u00F2', oacute: '\u00F3', ocirc: '\u00F4', otilde: '\u00F5', ouml: '\u00F6', divide: '\u00F7', oslash: '\u00F8', ugrave: '\u00F9', uacute: '\u00FA', ucirc: '\u00FB', uuml: '\u00FC', yacute: '\u00FD', thorn: '\u00FE', yuml: '\u00FF', OElig: '\u0152', oelig: '\u0153', Scaron: '\u0160', scaron: '\u0161', Yuml: '\u0178', fnof: '\u0192', circ: '\u02C6', tilde: '\u02DC', Alpha: '\u0391', Beta: '\u0392', Gamma: '\u0393', Delta: '\u0394', Epsilon: '\u0395', Zeta: '\u0396', Eta: '\u0397', Theta: '\u0398', Iota: '\u0399', Kappa: '\u039A', Lambda: '\u039B', Mu: '\u039C', Nu: '\u039D', Xi: '\u039E', Omicron: '\u039F', Pi: '\u03A0', Rho: '\u03A1', Sigma: '\u03A3', Tau: '\u03A4', Upsilon: '\u03A5', Phi: '\u03A6', Chi: '\u03A7', Psi: '\u03A8', Omega: '\u03A9', alpha: '\u03B1', beta: '\u03B2', gamma: '\u03B3', delta: '\u03B4', epsilon: '\u03B5', zeta: '\u03B6', eta: '\u03B7', theta: '\u03B8', iota: '\u03B9', kappa: '\u03BA', lambda: '\u03BB', mu: '\u03BC', nu: '\u03BD', xi: '\u03BE', omicron: '\u03BF', pi: '\u03C0', rho: '\u03C1', sigmaf: '\u03C2', sigma: '\u03C3', tau: '\u03C4', upsilon: '\u03C5', phi: '\u03C6', chi: '\u03C7', psi: '\u03C8', omega: '\u03C9', thetasym: '\u03D1', upsih: '\u03D2', piv: '\u03D6', ensp: '\u2002', emsp: '\u2003', thinsp: '\u2009', zwnj: '\u200C', zwj: '\u200D', lrm: '\u200E', rlm: '\u200F', ndash: '\u2013', mdash: '\u2014', lsquo: '\u2018', rsquo: '\u2019', sbquo: '\u201A', ldquo: '\u201C', rdquo: '\u201D', bdquo: '\u201E', dagger: '\u2020', Dagger: '\u2021', bull: '\u2022', hellip: '\u2026', permil: '\u2030', prime: '\u2032', Prime: '\u2033', lsaquo: '\u2039', rsaquo: '\u203A', oline: '\u203E', frasl: '\u2044', euro: '\u20AC', image: '\u2111', weierp: '\u2118', real: '\u211C', trade: '\u2122', alefsym: '\u2135', larr: '\u2190', uarr: '\u2191', rarr: '\u2192', darr: '\u2193', harr: '\u2194', crarr: '\u21B5', lArr: '\u21D0', uArr: '\u21D1', rArr: '\u21D2', dArr: '\u21D3', hArr: '\u21D4', forall: '\u2200', part: '\u2202', exist: '\u2203', empty: '\u2205', nabla: '\u2207', isin: '\u2208', notin: '\u2209', ni: '\u220B', prod: '\u220F', sum: '\u2211', minus: '\u2212', lowast: '\u2217', radic: '\u221A', prop: '\u221D', infin: '\u221E', ang: '\u2220', and: '\u2227', or: '\u2228', cap: '\u2229', cup: '\u222A', 'int': '\u222B', there4: '\u2234', sim: '\u223C', cong: '\u2245', asymp: '\u2248', ne: '\u2260', equiv: '\u2261', le: '\u2264', ge: '\u2265', sub: '\u2282', sup: '\u2283', nsub: '\u2284', sube: '\u2286', supe: '\u2287', oplus: '\u2295', otimes: '\u2297', perp: '\u22A5', sdot: '\u22C5', lceil: '\u2308', rceil: '\u2309', lfloor: '\u230A', rfloor: '\u230B', lang: '\u2329', rang: '\u232A', loz: '\u25CA', spades: '\u2660', clubs: '\u2663', hearts: '\u2665', diams: '\u2666' }; /***/ }), /***/ "9Tt7": /***/ ((module) => { /** * https://github.com/gre/bezier-easing * BezierEasing - use bezier curve for transition easing function * by Gaëtan Renaudeau 2014 - 2015 – MIT License */ // These values are established by empiricism with tests (tradeoff: performance VS precision) var NEWTON_ITERATIONS = 4; var NEWTON_MIN_SLOPE = 0.001; var SUBDIVISION_PRECISION = 0.0000001; var SUBDIVISION_MAX_ITERATIONS = 10; var kSplineTableSize = 11; var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0); var float32ArraySupported = typeof Float32Array === 'function'; function A (aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; } function B (aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; } function C (aA1) { return 3.0 * aA1; } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2. function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2. function getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); } function binarySubdivide (aX, aA, aB, mX1, mX2) { var currentX, currentT, i = 0; do { currentT = aA + (aB - aA) / 2.0; currentX = calcBezier(currentT, mX1, mX2) - aX; if (currentX > 0.0) { aB = currentT; } else { aA = currentT; } } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); return currentT; } function newtonRaphsonIterate (aX, aGuessT, mX1, mX2) { for (var i = 0; i < NEWTON_ITERATIONS; ++i) { var currentSlope = getSlope(aGuessT, mX1, mX2); if (currentSlope === 0.0) { return aGuessT; } var currentX = calcBezier(aGuessT, mX1, mX2) - aX; aGuessT -= currentX / currentSlope; } return aGuessT; } function LinearEasing (x) { return x; } module.exports = function bezier (mX1, mY1, mX2, mY2) { if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) { throw new Error('bezier x values must be in [0, 1] range'); } if (mX1 === mY1 && mX2 === mY2) { return LinearEasing; } // Precompute samples table var sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); for (var i = 0; i < kSplineTableSize; ++i) { sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2); } function getTForX (aX) { var intervalStart = 0.0; var currentSample = 1; var lastSample = kSplineTableSize - 1; for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) { intervalStart += kSampleStepSize; } --currentSample; // Interpolate to provide an initial guess for t var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]); var guessForT = intervalStart + dist * kSampleStepSize; var initialSlope = getSlope(guessForT, mX1, mX2); if (initialSlope >= NEWTON_MIN_SLOPE) { return newtonRaphsonIterate(aX, guessForT, mX1, mX2); } else if (initialSlope === 0.0) { return guessForT; } else { return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2); } } return function BezierEasing (x) { // Because JavaScript number are imprecise, we should guarantee the extremes are right. if (x === 0) { return 0; } if (x === 1) { return 1; } return calcBezier(getTForX(x), mY1, mY2); }; }; /***/ }), /***/ "7O4Y": /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ clsx: () => (/* binding */ clsx), /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clsx); /***/ }), /***/ "HDX/": /***/ ((module) => { "use strict"; const copyTextToClipboard = (input, {target = document.body} = {}) => { const element = document.createElement('textarea'); const previouslyFocusedElement = document.activeElement; element.value = input; // Prevent keyboard from showing on mobile element.setAttribute('readonly', ''); element.style.contain = 'strict'; element.style.position = 'absolute'; element.style.left = '-9999px'; element.style.fontSize = '12pt'; // Prevent zooming on iOS const selection = document.getSelection(); let originalRange = false; if (selection.rangeCount > 0) { originalRange = selection.getRangeAt(0); } target.append(element); element.select(); // Explicit selection workaround for iOS element.selectionStart = 0; element.selectionEnd = input.length; let isSuccess = false; try { isSuccess = document.execCommand('copy'); } catch (_) {} element.remove(); if (originalRange) { selection.removeAllRanges(); selection.addRange(originalRange); } // Get the focus back on the previously focused element, if any if (previouslyFocusedElement) { previouslyFocusedElement.focus(); } return isSuccess; }; module.exports = copyTextToClipboard; // TODO: Remove this for the next major release module.exports["default"] = copyTextToClipboard; /***/ }), /***/ "pnws": /***/ ((module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = addLeadingZeros; function addLeadingZeros(number, targetLength) { var sign = number < 0 ? '-' : ''; var output = Math.abs(number).toString(); while (output.length < targetLength) { output = '0' + output; } return sign + output; } module.exports = exports.default; /***/ }), /***/ "t+Lu": /***/ ((module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = assign; function assign(target, object) { if (target == null) { throw new TypeError('assign requires that input parameter not be null or undefined'); } for (var property in object) { if (Object.prototype.hasOwnProperty.call(object, property)) { ; target[property] = object[property]; } } return target; } module.exports = exports.default; /***/ }), /***/ "/urY": /***/ ((module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = (__webpack_require__("nw+9")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = cloneObject; var _index = _interopRequireDefault(__webpack_require__("t+Lu")); function cloneObject(object) { return (0, _index.default)({}, object); } module.exports = exports.default; /***/ }), /***/ "H/a7": /***/ ((module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = (__webpack_require__("nw+9")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _index = _interopRequireDefault(__webpack_require__("OboX")); var _default = _index.default; exports["default"] = _default; module.exports = exports.default; /***/ }), /***/ "7BF+": /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getDefaultOptions = getDefaultOptions; exports.setDefaultOptions = setDefaultOptions; var defaultOptions = {}; function getDefaultOptions() { return defaultOptions; } function setDefaultOptions(newOptions) { defaultOptions = newOptions; } /***/ }), /***/ "hw2v": /***/ ((module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = (__webpack_require__("nw+9")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _index = _interopRequireDefault(__webpack_require__("ww8C")); var _index2 = _interopRequireDefault(__webpack_require__("vnVX")); var _index3 = _interopRequireDefault(__webpack_require__("cQI/")); var _index4 = _interopRequireDefault(__webpack_require__("xV2z")); var _index5 = _interopRequireDefault(__webpack_require__("DKl7")); var _index6 = _interopRequireDefault(__webpack_require__("pnws")); var _index7 = _interopRequireDefault(__webpack_require__("+yel")); var dayPeriodEnum = { am: 'am', pm: 'pm', midnight: 'midnight', noon: 'noon', morning: 'morning', afternoon: 'afternoon', evening: 'evening', night: 'night' }; /* * | | Unit | | Unit | * |-----|--------------------------------|-----|--------------------------------| * | a | AM, PM | A* | Milliseconds in day | * | b | AM, PM, noon, midnight | B | Flexible day period | * | c | Stand-alone local day of week | C* | Localized hour w/ day period | * | d | Day of month | D | Day of year | * | e | Local day of week | E | Day of week | * | f | | F* | Day of week in month | * | g* | Modified Julian day | G | Era | * | h | Hour [1-12] | H | Hour [0-23] | * | i! | ISO day of week | I! | ISO week of year | * | j* | Localized hour w/ day period | J* | Localized hour w/o day period | * | k | Hour [1-24] | K | Hour [0-11] | * | l* | (deprecated) | L | Stand-alone month | * | m | Minute | M | Month | * | n | | N | | * | o! | Ordinal number modifier | O | Timezone (GMT) | * | p! | Long localized time | P! | Long localized date | * | q | Stand-alone quarter | Q | Quarter | * | r* | Related Gregorian year | R! | ISO week-numbering year | * | s | Second | S | Fraction of second | * | t! | Seconds timestamp | T! | Milliseconds timestamp | * | u | Extended year | U* | Cyclic year | * | v* | Timezone (generic non-locat.) | V* | Timezone (location) | * | w | Local week of year | W* | Week of month | * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) | * | y | Year (abs) | Y | Local week-numbering year | * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) | * * Letters marked by * are not implemented but reserved by Unicode standard. * * Letters marked by ! are non-standard, but implemented by date-fns: * - `o` modifies the previous token to turn it into an ordinal (see `format` docs) * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days, * i.e. 7 for Sunday, 1 for Monday, etc. * - `I` is ISO week of year, as opposed to `w` which is local week of year. * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year. * `R` is supposed to be used in conjunction with `I` and `i` * for universal ISO week-numbering date, whereas * `Y` is supposed to be used in conjunction with `w` and `e` * for week-numbering date specific to the locale. * - `P` is long localized date format * - `p` is long localized time format */ var formatters = { // Era G: function G(date, token, localize) { var era = date.getUTCFullYear() > 0 ? 1 : 0; switch (token) { // AD, BC case 'G': case 'GG': case 'GGG': return localize.era(era, { width: 'abbreviated' }); // A, B case 'GGGGG': return localize.era(era, { width: 'narrow' }); // Anno Domini, Before Christ case 'GGGG': default: return localize.era(era, { width: 'wide' }); } }, // Year y: function y(date, token, localize) { // Ordinal number if (token === 'yo') { var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript) var year = signedYear > 0 ? signedYear : 1 - signedYear; return localize.ordinalNumber(year, { unit: 'year' }); } return _index7.default.y(date, token); }, // Local week-numbering year Y: function Y(date, token, localize, options) { var signedWeekYear = (0, _index5.default)(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript) var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year if (token === 'YY') { var twoDigitYear = weekYear % 100; return (0, _index6.default)(twoDigitYear, 2); } // Ordinal number if (token === 'Yo') { return localize.ordinalNumber(weekYear, { unit: 'year' }); } // Padding return (0, _index6.default)(weekYear, token.length); }, // ISO week-numbering year R: function R(date, token) { var isoWeekYear = (0, _index3.default)(date); // Padding return (0, _index6.default)(isoWeekYear, token.length); }, // Extended year. This is a single number designating the year of this calendar system. // The main difference between `y` and `u` localizers are B.C. years: // | Year | `y` | `u` | // |------|-----|-----| // | AC 1 | 1 | 1 | // | BC 1 | 1 | 0 | // | BC 2 | 2 | -1 | // Also `yy` always returns the last two digits of a year, // while `uu` pads single digit years to 2 characters and returns other years unchanged. u: function u(date, token) { var year = date.getUTCFullYear(); return (0, _index6.default)(year, token.length); }, // Quarter Q: function Q(date, token, localize) { var quarter = Math.ceil((date.getUTCMonth() + 1) / 3); switch (token) { // 1, 2, 3, 4 case 'Q': return String(quarter); // 01, 02, 03, 04 case 'QQ': return (0, _index6.default)(quarter, 2); // 1st, 2nd, 3rd, 4th case 'Qo': return localize.ordinalNumber(quarter, { unit: 'quarter' }); // Q1, Q2, Q3, Q4 case 'QQQ': return localize.quarter(quarter, { width: 'abbreviated', context: 'formatting' }); // 1, 2, 3, 4 (narrow quarter; could be not numerical) case 'QQQQQ': return localize.quarter(quarter, { width: 'narrow', context: 'formatting' }); // 1st quarter, 2nd quarter, ... case 'QQQQ': default: return localize.quarter(quarter, { width: 'wide', context: 'formatting' }); } }, // Stand-alone quarter q: function q(date, token, localize) { var quarter = Math.ceil((date.getUTCMonth() + 1) / 3); switch (token) { // 1, 2, 3, 4 case 'q': return String(quarter); // 01, 02, 03, 04 case 'qq': return (0, _index6.default)(quarter, 2); // 1st, 2nd, 3rd, 4th case 'qo': return localize.ordinalNumber(quarter, { unit: 'quarter' }); // Q1, Q2, Q3, Q4 case 'qqq': return localize.quarter(quarter, { width: 'abbreviated', context: 'standalone' }); // 1, 2, 3, 4 (narrow quarter; could be not numerical) case 'qqqqq': return localize.quarter(quarter, { width: 'narrow', context: 'standalone' }); // 1st quarter, 2nd quarter, ... case 'qqqq': default: return localize.quarter(quarter, { width: 'wide', context: 'standalone' }); } }, // Month M: function M(date, token, localize) { var month = date.getUTCMonth(); switch (token) { case 'M': case 'MM': return _index7.default.M(date, token); // 1st, 2nd, ..., 12th case 'Mo': return localize.ordinalNumber(month + 1, { unit: 'month' }); // Jan, Feb, ..., Dec case 'MMM': return localize.month(month, { width: 'abbreviated', context: 'formatting' }); // J, F, ..., D case 'MMMMM': return localize.month(month, { width: 'narrow', context: 'formatting' }); // January, February, ..., December case 'MMMM': default: return localize.month(month, { width: 'wide', context: 'formatting' }); } }, // Stand-alone month L: function L(date, token, localize) { var month = date.getUTCMonth(); switch (token) { // 1, 2, ..., 12 case 'L': return String(month + 1); // 01, 02, ..., 12 case 'LL': return (0, _index6.default)(month + 1, 2); // 1st, 2nd, ..., 12th case 'Lo': return localize.ordinalNumber(month + 1, { unit: 'month' }); // Jan, Feb, ..., Dec case 'LLL': return localize.month(month, { width: 'abbreviated', context: 'standalone' }); // J, F, ..., D case 'LLLLL': return localize.month(month, { width: 'narrow', context: 'standalone' }); // January, February, ..., December case 'LLLL': default: return localize.month(month, { width: 'wide', context: 'standalone' }); } }, // Local week of year w: function w(date, token, localize, options) { var week = (0, _index4.default)(date, options); if (token === 'wo') { return localize.ordinalNumber(week, { unit: 'week' }); } return (0, _index6.default)(week, token.length); }, // ISO week of year I: function I(date, token, localize) { var isoWeek = (0, _index2.default)(date); if (token === 'Io') { return localize.ordinalNumber(isoWeek, { unit: 'week' }); } return (0, _index6.default)(isoWeek, token.length); }, // Day of the month d: function d(date, token, localize) { if (token === 'do') { return localize.ordinalNumber(date.getUTCDate(), { unit: 'date' }); } return _index7.default.d(date, token); }, // Day of year D: function D(date, token, localize) { var dayOfYear = (0, _index.default)(date); if (token === 'Do') { return localize.ordinalNumber(dayOfYear, { unit: 'dayOfYear' }); } return (0, _index6.default)(dayOfYear, token.length); }, // Day of week E: function E(date, token, localize) { var dayOfWeek = date.getUTCDay(); switch (token) { // Tue case 'E': case 'EE': case 'EEE': return localize.day(dayOfWeek, { width: 'abbreviated', context: 'formatting' }); // T case 'EEEEE': return localize.day(dayOfWeek, { width: 'narrow', context: 'formatting' }); // Tu case 'EEEEEE': return localize.day(dayOfWeek, { width: 'short', context: 'formatting' }); // Tuesday case 'EEEE': default: return localize.day(dayOfWeek, { width: 'wide', context: 'formatting' }); } }, // Local day of week e: function e(date, token, localize, options) { var dayOfWeek = date.getUTCDay(); var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7; switch (token) { // Numerical value (Nth day of week with current locale or weekStartsOn) case 'e': return String(localDayOfWeek); // Padded numerical value case 'ee': return (0, _index6.default)(localDayOfWeek, 2); // 1st, 2nd, ..., 7th case 'eo': return localize.ordinalNumber(localDayOfWeek, { unit: 'day' }); case 'eee': return localize.day(dayOfWeek, { width: 'abbreviated', context: 'formatting' }); // T case 'eeeee': return localize.day(dayOfWeek, { width: 'narrow', context: 'formatting' }); // Tu case 'eeeeee': return localize.day(dayOfWeek, { width: 'short', context: 'formatting' }); // Tuesday case 'eeee': default: return localize.day(dayOfWeek, { width: 'wide', context: 'formatting' }); } }, // Stand-alone local day of week c: function c(date, token, localize, options) { var dayOfWeek = date.getUTCDay(); var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7; switch (token) { // Numerical value (same as in `e`) case 'c': return String(localDayOfWeek); // Padded numerical value case 'cc': return (0, _index6.default)(localDayOfWeek, token.length); // 1st, 2nd, ..., 7th case 'co': return localize.ordinalNumber(localDayOfWeek, { unit: 'day' }); case 'ccc': return localize.day(dayOfWeek, { width: 'abbreviated', context: 'standalone' }); // T case 'ccccc': return localize.day(dayOfWeek, { width: 'narrow', context: 'standalone' }); // Tu case 'cccccc': return localize.day(dayOfWeek, { width: 'short', context: 'standalone' }); // Tuesday case 'cccc': default: return localize.day(dayOfWeek, { width: 'wide', context: 'standalone' }); } }, // ISO day of week i: function i(date, token, localize) { var dayOfWeek = date.getUTCDay(); var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek; switch (token) { // 2 case 'i': return String(isoDayOfWeek); // 02 case 'ii': return (0, _index6.default)(isoDayOfWeek, token.length); // 2nd case 'io': return localize.ordinalNumber(isoDayOfWeek, { unit: 'day' }); // Tue case 'iii': return localize.day(dayOfWeek, { width: 'abbreviated', context: 'formatting' }); // T case 'iiiii': return localize.day(dayOfWeek, { width: 'narrow', context: 'formatting' }); // Tu case 'iiiiii': return localize.day(dayOfWeek, { width: 'short', context: 'formatting' }); // Tuesday case 'iiii': default: return localize.day(dayOfWeek, { width: 'wide', context: 'formatting' }); } }, // AM or PM a: function a(date, token, localize) { var hours = date.getUTCHours(); var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am'; switch (token) { case 'a': case 'aa': return localize.dayPeriod(dayPeriodEnumValue, { width: 'abbreviated', context: 'formatting' }); case 'aaa': return localize.dayPeriod(dayPeriodEnumValue, { width: 'abbreviated', context: 'formatting' }).toLowerCase(); case 'aaaaa': return localize.dayPeriod(dayPeriodEnumValue, { width: 'narrow', context: 'formatting' }); case 'aaaa': default: return localize.dayPeriod(dayPeriodEnumValue, { width: 'wide', context: 'formatting' }); } }, // AM, PM, midnight, noon b: function b(date, token, localize) { var hours = date.getUTCHours(); var dayPeriodEnumValue; if (hours === 12) { dayPeriodEnumValue = dayPeriodEnum.noon; } else if (hours === 0) { dayPeriodEnumValue = dayPeriodEnum.midnight; } else { dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am'; } switch (token) { case 'b': case 'bb': return localize.dayPeriod(dayPeriodEnumValue, { width: 'abbreviated', context: 'formatting' }); case 'bbb': return localize.dayPeriod(dayPeriodEnumValue, { width: 'abbreviated', context: 'formatting' }).toLowerCase(); case 'bbbbb': return localize.dayPeriod(dayPeriodEnumValue, { width: 'narrow', context: 'formatting' }); case 'bbbb': default: return localize.dayPeriod(dayPeriodEnumValue, { width: 'wide', context: 'formatting' }); } }, // in the morning, in the afternoon, in the evening, at night B: function B(date, token, localize) { var hours = date.getUTCHours(); var dayPeriodEnumValue; if (hours >= 17) { dayPeriodEnumValue = dayPeriodEnum.evening; } else if (hours >= 12) { dayPeriodEnumValue = dayPeriodEnum.afternoon; } else if (hours >= 4) { dayPeriodEnumValue = dayPeriodEnum.morning; } else { dayPeriodEnumValue = dayPeriodEnum.night; } switch (token) { case 'B': case 'BB': case 'BBB': return localize.dayPeriod(dayPeriodEnumValue, { width: 'abbreviated', context: 'formatting' }); case 'BBBBB': return localize.dayPeriod(dayPeriodEnumValue, { width: 'narrow', context: 'formatting' }); case 'BBBB': default: return localize.dayPeriod(dayPeriodEnumValue, { width: 'wide', context: 'formatting' }); } }, // Hour [1-12] h: function h(date, token, localize) { if (token === 'ho') { var hours = date.getUTCHours() % 12; if (hours === 0) hours = 12; return localize.ordinalNumber(hours, { unit: 'hour' }); } return _index7.default.h(date, token); }, // Hour [0-23] H: function H(date, token, localize) { if (token === 'Ho') { return localize.ordinalNumber(date.getUTCHours(), { unit: 'hour' }); } return _index7.default.H(date, token); }, // Hour [0-11] K: function K(date, token, localize) { var hours = date.getUTCHours() % 12; if (token === 'Ko') { return localize.ordinalNumber(hours, { unit: 'hour' }); } return (0, _index6.default)(hours, token.length); }, // Hour [1-24] k: function k(date, token, localize) { var hours = date.getUTCHours(); if (hours === 0) hours = 24; if (token === 'ko') { return localize.ordinalNumber(hours, { unit: 'hour' }); } return (0, _index6.default)(hours, token.length); }, // Minute m: function m(date, token, localize) { if (token === 'mo') { return localize.ordinalNumber(date.getUTCMinutes(), { unit: 'minute' }); } return _index7.default.m(date, token); }, // Second s: function s(date, token, localize) { if (token === 'so') { return localize.ordinalNumber(date.getUTCSeconds(), { unit: 'second' }); } return _index7.default.s(date, token); }, // Fraction of second S: function S(date, token) { return _index7.default.S(date, token); }, // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) X: function X(date, token, _localize, options) { var originalDate = options._originalDate || date; var timezoneOffset = originalDate.getTimezoneOffset(); if (timezoneOffset === 0) { return 'Z'; } switch (token) { // Hours and optional minutes case 'X': return formatTimezoneWithOptionalMinutes(timezoneOffset); // Hours, minutes and optional seconds without `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `XX` case 'XXXX': case 'XX': // Hours and minutes without `:` delimiter return formatTimezone(timezoneOffset); // Hours, minutes and optional seconds with `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has th