You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
212 KiB
JavaScript
45 lines
212 KiB
JavaScript
|
9 months ago
|
"use strict";
|
||
|
|
/*
|
||
|
|
* ATTENTION: An "eval-source-map" devtool has been used.
|
||
|
|
* This devtool is neither made for production nor for readable output files.
|
||
|
|
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||
|
|
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||
|
|
* or disable the default devtool with "devtool: false".
|
||
|
|
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||
|
|
*/
|
||
|
|
exports.id = "vendor-chunks/uvu";
|
||
|
|
exports.ids = ["vendor-chunks/uvu"];
|
||
|
|
exports.modules = {
|
||
|
|
|
||
|
|
/***/ "(ssr)/./node_modules/uvu/assert/index.mjs":
|
||
|
|
/*!*******************************************!*\
|
||
|
|
!*** ./node_modules/uvu/assert/index.mjs ***!
|
||
|
|
\*******************************************/
|
||
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
||
|
|
|
||
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Assertion: () => (/* binding */ Assertion),\n/* harmony export */ equal: () => (/* binding */ equal),\n/* harmony export */ fixture: () => (/* binding */ fixture),\n/* harmony export */ instance: () => (/* binding */ instance),\n/* harmony export */ is: () => (/* binding */ is),\n/* harmony export */ match: () => (/* binding */ match),\n/* harmony export */ not: () => (/* binding */ not),\n/* harmony export */ ok: () => (/* binding */ ok),\n/* harmony export */ snapshot: () => (/* binding */ snapshot),\n/* harmony export */ throws: () => (/* binding */ throws),\n/* harmony export */ type: () => (/* binding */ type),\n/* harmony export */ unreachable: () => (/* binding */ unreachable)\n/* harmony export */ });\n/* harmony import */ var dequal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dequal */ \"(ssr)/./node_modules/dequal/dist/index.mjs\");\n/* harmony import */ var uvu_diff__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uvu/diff */ \"(ssr)/./node_modules/uvu/diff/index.mjs\");\n\n\nfunction dedent(str) {\n str = str.replace(/\\r?\\n/g, \"\\n\");\n let arr = str.match(/^[ \\t]*(?=\\S)/gm);\n let i = 0, min = 1 / 0, len = (arr || []).length;\n for(; i < len; i++)min = Math.min(min, arr[i].length);\n return len && min ? str.replace(new RegExp(`^[ \\\\t]{${min}}`, \"gm\"), \"\") : str;\n}\nclass Assertion extends Error {\n constructor(opts = {}){\n super(opts.message);\n this.name = \"Assertion\";\n this.code = \"ERR_ASSERTION\";\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.details = opts.details || false;\n this.generated = !!opts.generated;\n this.operator = opts.operator;\n this.expects = opts.expects;\n this.actual = opts.actual;\n }\n}\nfunction assert(bool, actual, expects, operator, detailer, backup, msg) {\n if (bool) return;\n let message = msg || backup;\n if (msg instanceof Error) throw msg;\n let details = detailer && detailer(actual, expects);\n throw new Assertion({\n actual,\n expects,\n operator,\n message,\n details,\n generated: !msg\n });\n}\nfunction ok(val, msg) {\n assert(!!val, false, true, \"ok\", false, \"Expected value to be truthy\", msg);\n}\nfunction is(val, exp, msg) {\n assert(val === exp, val, exp, \"is\", uvu_diff__WEBPACK_IMPORTED_MODULE_1__.compare, \"Expected values to be strictly equal:\", msg);\n}\nfunction equal(val, exp, msg) {\n assert((0,dequal__WEBPACK_IMPORTED_MODULE_0__.dequal)(val, exp), val, exp, \"equal\", uvu_diff__WEBPACK_IMPORTED_MODULE_1__.compare, \"Expected values to be deeply equal:\", msg);\n}\nfunction unreachable(msg) {\n assert(false, true, false, \"unreachable\", false, \"Expected not to be reached!\", msg);\n}\nfunction type(val, exp, msg) {\n let tmp = typeof val;\n assert(tmp === exp, tmp, exp, \"type\", false, `Expected \"${tmp}\" to be \"${exp}\"`, msg);\n}\nfunction instance(val, exp, msg) {\n let name = \"`\" + (exp.name || exp.constructor.name) + \"`\";\n assert(val instanceof exp, val, exp, \"instance\", false, `Expected value to be an instance of ${name}`, msg);\n}\nfunction match(val, exp, msg) {\n if (typeof exp === \"string\") {\n assert(val.includes(exp), val, exp, \"match\", false, `Expected value to include \"${exp}\" substring`, msg);\n } else {\n assert(exp.test(val), val, exp, \"match\", false, `Expected value to match \\`${String(exp)}\\` pattern`, msg);\n }\n}\nfunction snapshot(val, exp, msg) {\n val = dedent(val);\n exp = dedent(exp);\n assert(val === exp, val, exp, \"snapshot\", uvu_diff__WEBPACK_IMPORTED_MODULE_1__.lines, \"Expected value to match snapshot:\", msg);\n}\nconst lineNums = (x, y)=>(0,uvu_diff__WEBPACK_IMPORTED_MODULE_1__.lines)(x, y, 1);\nfunction fixture(val, exp, msg) {\n val =
|
||
|
|
|
||
|
|
/***/ }),
|
||
|
|
|
||
|
|
/***/ "(ssr)/./node_modules/uvu/diff/index.mjs":
|
||
|
|
/*!*****************************************!*\
|
||
|
|
!*** ./node_modules/uvu/diff/index.mjs ***!
|
||
|
|
\*****************************************/
|
||
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
||
|
|
|
||
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ arrays: () => (/* binding */ arrays),\n/* harmony export */ chars: () => (/* binding */ chars),\n/* harmony export */ circular: () => (/* binding */ circular),\n/* harmony export */ compare: () => (/* binding */ compare),\n/* harmony export */ direct: () => (/* binding */ direct),\n/* harmony export */ lines: () => (/* binding */ lines),\n/* harmony export */ sort: () => (/* binding */ sort),\n/* harmony export */ stringify: () => (/* binding */ stringify)\n/* harmony export */ });\n/* harmony import */ var kleur__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! kleur */ \"(ssr)/./node_modules/kleur/index.mjs\");\n/* harmony import */ var diff__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diff */ \"(ssr)/./node_modules/uvu/node_modules/diff/lib/index.mjs\");\n\n\nconst colors = {\n \"--\": kleur__WEBPACK_IMPORTED_MODULE_0__[\"default\"].red,\n \"\\xb7\\xb7\": kleur__WEBPACK_IMPORTED_MODULE_0__[\"default\"].grey,\n \"++\": kleur__WEBPACK_IMPORTED_MODULE_0__[\"default\"].green\n};\nconst TITLE = kleur__WEBPACK_IMPORTED_MODULE_0__[\"default\"].dim().italic;\nconst TAB = kleur__WEBPACK_IMPORTED_MODULE_0__[\"default\"].dim(\"→\"), SPACE = kleur__WEBPACK_IMPORTED_MODULE_0__[\"default\"].dim(\"\\xb7\"), NL = kleur__WEBPACK_IMPORTED_MODULE_0__[\"default\"].dim(\"↵\");\nconst LOG = (sym, str)=>colors[sym](sym + PRETTY(str)) + \"\\n\";\nconst LINE = (num, x)=>kleur__WEBPACK_IMPORTED_MODULE_0__[\"default\"].dim(\"L\" + String(num).padStart(x, \"0\") + \" \");\nconst PRETTY = (str)=>str.replace(/[ ]/g, SPACE).replace(/\\t/g, TAB).replace(/(\\r?\\n)/g, NL);\nfunction line(obj, prev, pad) {\n let char = obj.removed ? \"--\" : obj.added ? \"++\" : \"\\xb7\\xb7\";\n let arr = obj.value.replace(/\\r?\\n$/, \"\").split(\"\\n\");\n let i = 0, tmp, out = \"\";\n if (obj.added) out += colors[char]().underline(TITLE(\"Expected:\")) + \"\\n\";\n else if (obj.removed) out += colors[char]().underline(TITLE(\"Actual:\")) + \"\\n\";\n for(; i < arr.length; i++){\n tmp = arr[i];\n if (tmp != null) {\n if (prev) out += LINE(prev + i, pad);\n out += LOG(char, tmp || \"\\n\");\n }\n }\n return out;\n}\n// TODO: want better diffing\n//~> complex items bail outright\nfunction arrays(input, expect) {\n let arr = diff__WEBPACK_IMPORTED_MODULE_1__.diffArrays(input, expect);\n let i = 0, j = 0, k = 0, tmp, val, char, isObj, str;\n let out = LOG(\"\\xb7\\xb7\", \"[\");\n for(; i < arr.length; i++){\n char = (tmp = arr[i]).removed ? \"--\" : tmp.added ? \"++\" : \"\\xb7\\xb7\";\n if (tmp.added) {\n out += colors[char]().underline(TITLE(\"Expected:\")) + \"\\n\";\n } else if (tmp.removed) {\n out += colors[char]().underline(TITLE(\"Actual:\")) + \"\\n\";\n }\n for(j = 0; j < tmp.value.length; j++){\n isObj = tmp.value[j] && typeof tmp.value[j] === \"object\";\n val = stringify(tmp.value[j]).split(/\\r?\\n/g);\n for(k = 0; k < val.length;){\n str = \" \" + val[k++] + (isObj ? \"\" : \",\");\n if (isObj && k === val.length && j + 1 < tmp.value.length) str += \",\";\n out += LOG(char, str);\n }\n }\n }\n return out + LOG(\"\\xb7\\xb7\", \"]\");\n}\nfunction lines(input, expect, linenum = 0) {\n let i = 0, tmp, output = \"\";\n let arr = diff__WEBPACK_IMPORTED_MODULE_1__.diffLines(input, expect);\n let pad = String(expect.split(/\\r?\\n/g).length - linenum).length;\n for(; i < arr.length; i++){\n output += line(tmp = arr[i], linenum, pad);\n if (linenum && !tmp.removed) linenum += tmp.count;\n }\n return output;\n}\nfunction chars(input, expect) {\n let arr = diff__WEBPACK_IMPORTED_MODULE_1__.diffChars(input, expect);\n let i = 0, output = \"\", tmp;\n let l1 = input.length;\n let l2 = expect.length;\n l
|
||
|
|
|
||
|
|
/***/ }),
|
||
|
|
|
||
|
|
/***/ "(ssr)/./node_modules/uvu/node_modules/diff/lib/index.mjs":
|
||
|
|
/*!**********************************************************!*\
|
||
|
|
!*** ./node_modules/uvu/node_modules/diff/lib/index.mjs ***!
|
||
|
|
\**********************************************************/
|
||
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
||
|
|
|
||
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Diff: () => (/* binding */ Diff),\n/* harmony export */ applyPatch: () => (/* binding */ applyPatch),\n/* harmony export */ applyPatches: () => (/* binding */ applyPatches),\n/* harmony export */ canonicalize: () => (/* binding */ canonicalize),\n/* harmony export */ convertChangesToDMP: () => (/* binding */ convertChangesToDMP),\n/* harmony export */ convertChangesToXML: () => (/* binding */ convertChangesToXML),\n/* harmony export */ createPatch: () => (/* binding */ createPatch),\n/* harmony export */ createTwoFilesPatch: () => (/* binding */ createTwoFilesPatch),\n/* harmony export */ diffArrays: () => (/* binding */ diffArrays),\n/* harmony export */ diffChars: () => (/* binding */ diffChars),\n/* harmony export */ diffCss: () => (/* binding */ diffCss),\n/* harmony export */ diffJson: () => (/* binding */ diffJson),\n/* harmony export */ diffLines: () => (/* binding */ diffLines),\n/* harmony export */ diffSentences: () => (/* binding */ diffSentences),\n/* harmony export */ diffTrimmedLines: () => (/* binding */ diffTrimmedLines),\n/* harmony export */ diffWords: () => (/* binding */ diffWords),\n/* harmony export */ diffWordsWithSpace: () => (/* binding */ diffWordsWithSpace),\n/* harmony export */ merge: () => (/* binding */ merge),\n/* harmony export */ parsePatch: () => (/* binding */ parsePatch),\n/* harmony export */ structuredPatch: () => (/* binding */ structuredPatch)\n/* harmony export */ });\nfunction Diff() {}\nDiff.prototype = {\n diff: function diff(oldString, newString) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var callback = options.callback;\n if (typeof options === \"function\") {\n callback = options;\n options = {};\n }\n this.options = options;\n var self = this;\n function done(value) {\n if (callback) {\n setTimeout(function() {\n callback(undefined, value);\n }, 0);\n return true;\n } else {\n return value;\n }\n } // Allow subclasses to massage the input prior to running\n oldString = this.castInput(oldString);\n newString = this.castInput(newString);\n oldString = this.removeEmpty(this.tokenize(oldString));\n newString = this.removeEmpty(this.tokenize(newString));\n var newLen = newString.length, oldLen = oldString.length;\n var editLength = 1;\n var maxEditLength = newLen + oldLen;\n if (options.maxEditLength) {\n maxEditLength = Math.min(maxEditLength, options.maxEditLength);\n }\n var bestPath = [\n {\n newPos: -1,\n components: []\n }\n ]; // Seed editLength = 0, i.e. the content starts with the same values\n var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);\n if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n // Identity per the equality and tokenizer\n return done([\n {\n value: this.join(newString),\n count: newString.length\n }\n ]);\n } // Main worker method. checks all permutations of a given edit length for acceptance.\n function execEditLength() {\n for(var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2){\n var basePath = void 0;\n var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;\n if (addPath) {\n // No one else is going to attempt to use this value, clear it\n bestPath[diagonalPath - 1] = undefined;\n }\n var canA
|
||
|
|
|
||
|
|
/***/ })
|
||
|
|
|
||
|
|
};
|
||
|
|
;
|