jrs-react 1.1.29 → 1.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.es.js +107 -922
- package/build/index.js +111 -921
- package/package.json +1 -1
- package/src/index.js +3 -1
package/build/index.es.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
1
3
|
function getDefaultExportFromCjs (x) {
|
|
2
4
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3
5
|
}
|
|
@@ -3027,7 +3029,7 @@ const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
|
3027
3029
|
*
|
|
3028
3030
|
* @returns {String} The String freed of excess whitespace
|
|
3029
3031
|
*/
|
|
3030
|
-
const trim
|
|
3032
|
+
const trim = (str) => str.trim ?
|
|
3031
3033
|
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
3032
3034
|
|
|
3033
3035
|
/**
|
|
@@ -3503,7 +3505,7 @@ var utils$1 = {
|
|
|
3503
3505
|
forEach,
|
|
3504
3506
|
merge,
|
|
3505
3507
|
extend,
|
|
3506
|
-
trim
|
|
3508
|
+
trim,
|
|
3507
3509
|
stripBOM,
|
|
3508
3510
|
inherits,
|
|
3509
3511
|
toFlatObject,
|
|
@@ -6055,925 +6057,9 @@ const flexType = (type, me, payload, doElse) => {
|
|
|
6055
6057
|
return result;
|
|
6056
6058
|
};
|
|
6057
6059
|
|
|
6058
|
-
/******************************************************************************
|
|
6059
|
-
Copyright (c) Microsoft Corporation.
|
|
6060
|
-
|
|
6061
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6062
|
-
purpose with or without fee is hereby granted.
|
|
6063
|
-
|
|
6064
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
6065
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
6066
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
6067
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
6068
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
6069
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
6070
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
6071
|
-
***************************************************************************** */
|
|
6072
|
-
|
|
6073
|
-
var __assign = function() {
|
|
6074
|
-
__assign = Object.assign || function __assign(t) {
|
|
6075
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6076
|
-
s = arguments[i];
|
|
6077
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6078
|
-
}
|
|
6079
|
-
return t;
|
|
6080
|
-
};
|
|
6081
|
-
return __assign.apply(this, arguments);
|
|
6082
|
-
};
|
|
6083
|
-
|
|
6084
|
-
function __spreadArray(to, from, pack) {
|
|
6085
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
6086
|
-
if (ar || !(i in from)) {
|
|
6087
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6088
|
-
ar[i] = from[i];
|
|
6089
|
-
}
|
|
6090
|
-
}
|
|
6091
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
6092
|
-
}
|
|
6093
|
-
|
|
6094
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
6095
|
-
var e = new Error(message);
|
|
6096
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
6097
|
-
};
|
|
6098
|
-
|
|
6099
|
-
function memoize(fn) {
|
|
6100
|
-
var cache = Object.create(null);
|
|
6101
|
-
return function (arg) {
|
|
6102
|
-
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
6103
|
-
return cache[arg];
|
|
6104
|
-
};
|
|
6105
|
-
}
|
|
6106
|
-
|
|
6107
|
-
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
|
|
6108
|
-
|
|
6109
|
-
var isPropValid = /* #__PURE__ */memoize(function (prop) {
|
|
6110
|
-
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
|
|
6111
|
-
/* o */
|
|
6112
|
-
&& prop.charCodeAt(1) === 110
|
|
6113
|
-
/* n */
|
|
6114
|
-
&& prop.charCodeAt(2) < 91;
|
|
6115
|
-
}
|
|
6116
|
-
/* Z+1 */
|
|
6117
|
-
);
|
|
6118
|
-
|
|
6119
|
-
var MS = '-ms-';
|
|
6120
|
-
var MOZ = '-moz-';
|
|
6121
|
-
var WEBKIT = '-webkit-';
|
|
6122
|
-
|
|
6123
|
-
var COMMENT = 'comm';
|
|
6124
|
-
var RULESET = 'rule';
|
|
6125
|
-
var DECLARATION = 'decl';
|
|
6126
|
-
var IMPORT = '@import';
|
|
6127
|
-
var KEYFRAMES = '@keyframes';
|
|
6128
|
-
var LAYER = '@layer';
|
|
6129
|
-
|
|
6130
|
-
/**
|
|
6131
|
-
* @param {number}
|
|
6132
|
-
* @return {number}
|
|
6133
|
-
*/
|
|
6134
|
-
var abs = Math.abs;
|
|
6135
|
-
|
|
6136
|
-
/**
|
|
6137
|
-
* @param {number}
|
|
6138
|
-
* @return {string}
|
|
6139
|
-
*/
|
|
6140
|
-
var from = String.fromCharCode;
|
|
6141
|
-
|
|
6142
|
-
/**
|
|
6143
|
-
* @param {object}
|
|
6144
|
-
* @return {object}
|
|
6145
|
-
*/
|
|
6146
|
-
var assign = Object.assign;
|
|
6147
|
-
|
|
6148
|
-
/**
|
|
6149
|
-
* @param {string} value
|
|
6150
|
-
* @param {number} length
|
|
6151
|
-
* @return {number}
|
|
6152
|
-
*/
|
|
6153
|
-
function hash (value, length) {
|
|
6154
|
-
return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
|
|
6155
|
-
}
|
|
6156
|
-
|
|
6157
|
-
/**
|
|
6158
|
-
* @param {string} value
|
|
6159
|
-
* @return {string}
|
|
6160
|
-
*/
|
|
6161
|
-
function trim (value) {
|
|
6162
|
-
return value.trim()
|
|
6163
|
-
}
|
|
6164
|
-
|
|
6165
|
-
/**
|
|
6166
|
-
* @param {string} value
|
|
6167
|
-
* @param {RegExp} pattern
|
|
6168
|
-
* @return {string?}
|
|
6169
|
-
*/
|
|
6170
|
-
function match (value, pattern) {
|
|
6171
|
-
return (value = pattern.exec(value)) ? value[0] : value
|
|
6172
|
-
}
|
|
6173
|
-
|
|
6174
|
-
/**
|
|
6175
|
-
* @param {string} value
|
|
6176
|
-
* @param {(string|RegExp)} pattern
|
|
6177
|
-
* @param {string} replacement
|
|
6178
|
-
* @return {string}
|
|
6179
|
-
*/
|
|
6180
|
-
function replace (value, pattern, replacement) {
|
|
6181
|
-
return value.replace(pattern, replacement)
|
|
6182
|
-
}
|
|
6183
|
-
|
|
6184
|
-
/**
|
|
6185
|
-
* @param {string} value
|
|
6186
|
-
* @param {string} search
|
|
6187
|
-
* @param {number} position
|
|
6188
|
-
* @return {number}
|
|
6189
|
-
*/
|
|
6190
|
-
function indexof (value, search, position) {
|
|
6191
|
-
return value.indexOf(search, position)
|
|
6192
|
-
}
|
|
6193
|
-
|
|
6194
|
-
/**
|
|
6195
|
-
* @param {string} value
|
|
6196
|
-
* @param {number} index
|
|
6197
|
-
* @return {number}
|
|
6198
|
-
*/
|
|
6199
|
-
function charat (value, index) {
|
|
6200
|
-
return value.charCodeAt(index) | 0
|
|
6201
|
-
}
|
|
6202
|
-
|
|
6203
|
-
/**
|
|
6204
|
-
* @param {string} value
|
|
6205
|
-
* @param {number} begin
|
|
6206
|
-
* @param {number} end
|
|
6207
|
-
* @return {string}
|
|
6208
|
-
*/
|
|
6209
|
-
function substr (value, begin, end) {
|
|
6210
|
-
return value.slice(begin, end)
|
|
6211
|
-
}
|
|
6212
|
-
|
|
6213
|
-
/**
|
|
6214
|
-
* @param {string} value
|
|
6215
|
-
* @return {number}
|
|
6216
|
-
*/
|
|
6217
|
-
function strlen (value) {
|
|
6218
|
-
return value.length
|
|
6219
|
-
}
|
|
6220
|
-
|
|
6221
|
-
/**
|
|
6222
|
-
* @param {any[]} value
|
|
6223
|
-
* @return {number}
|
|
6224
|
-
*/
|
|
6225
|
-
function sizeof (value) {
|
|
6226
|
-
return value.length
|
|
6227
|
-
}
|
|
6228
|
-
|
|
6229
|
-
/**
|
|
6230
|
-
* @param {any} value
|
|
6231
|
-
* @param {any[]} array
|
|
6232
|
-
* @return {any}
|
|
6233
|
-
*/
|
|
6234
|
-
function append (value, array) {
|
|
6235
|
-
return array.push(value), value
|
|
6236
|
-
}
|
|
6237
|
-
|
|
6238
|
-
/**
|
|
6239
|
-
* @param {string[]} array
|
|
6240
|
-
* @param {function} callback
|
|
6241
|
-
* @return {string}
|
|
6242
|
-
*/
|
|
6243
|
-
function combine (array, callback) {
|
|
6244
|
-
return array.map(callback).join('')
|
|
6245
|
-
}
|
|
6246
|
-
|
|
6247
|
-
/**
|
|
6248
|
-
* @param {string[]} array
|
|
6249
|
-
* @param {RegExp} pattern
|
|
6250
|
-
* @return {string[]}
|
|
6251
|
-
*/
|
|
6252
|
-
function filter (array, pattern) {
|
|
6253
|
-
return array.filter(function (value) { return !match(value, pattern) })
|
|
6254
|
-
}
|
|
6255
|
-
|
|
6256
|
-
var line = 1;
|
|
6257
|
-
var column = 1;
|
|
6258
|
-
var length = 0;
|
|
6259
|
-
var position = 0;
|
|
6260
|
-
var character = 0;
|
|
6261
|
-
var characters = '';
|
|
6262
|
-
|
|
6263
|
-
/**
|
|
6264
|
-
* @param {string} value
|
|
6265
|
-
* @param {object | null} root
|
|
6266
|
-
* @param {object | null} parent
|
|
6267
|
-
* @param {string} type
|
|
6268
|
-
* @param {string[] | string} props
|
|
6269
|
-
* @param {object[] | string} children
|
|
6270
|
-
* @param {object[]} siblings
|
|
6271
|
-
* @param {number} length
|
|
6272
|
-
*/
|
|
6273
|
-
function node (value, root, parent, type, props, children, length, siblings) {
|
|
6274
|
-
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}
|
|
6275
|
-
}
|
|
6276
|
-
|
|
6277
|
-
/**
|
|
6278
|
-
* @param {object} root
|
|
6279
|
-
* @param {object} props
|
|
6280
|
-
* @return {object}
|
|
6281
|
-
*/
|
|
6282
|
-
function copy (root, props) {
|
|
6283
|
-
return assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)
|
|
6284
|
-
}
|
|
6285
|
-
|
|
6286
|
-
/**
|
|
6287
|
-
* @param {object} root
|
|
6288
|
-
*/
|
|
6289
|
-
function lift (root) {
|
|
6290
|
-
while (root.root)
|
|
6291
|
-
root = copy(root.root, {children: [root]});
|
|
6292
|
-
|
|
6293
|
-
append(root, root.siblings);
|
|
6294
|
-
}
|
|
6295
|
-
|
|
6296
|
-
/**
|
|
6297
|
-
* @return {number}
|
|
6298
|
-
*/
|
|
6299
|
-
function char () {
|
|
6300
|
-
return character
|
|
6301
|
-
}
|
|
6302
|
-
|
|
6303
|
-
/**
|
|
6304
|
-
* @return {number}
|
|
6305
|
-
*/
|
|
6306
|
-
function prev () {
|
|
6307
|
-
character = position > 0 ? charat(characters, --position) : 0;
|
|
6308
|
-
|
|
6309
|
-
if (column--, character === 10)
|
|
6310
|
-
column = 1, line--;
|
|
6311
|
-
|
|
6312
|
-
return character
|
|
6313
|
-
}
|
|
6314
|
-
|
|
6315
|
-
/**
|
|
6316
|
-
* @return {number}
|
|
6317
|
-
*/
|
|
6318
|
-
function next () {
|
|
6319
|
-
character = position < length ? charat(characters, position++) : 0;
|
|
6320
|
-
|
|
6321
|
-
if (column++, character === 10)
|
|
6322
|
-
column = 1, line++;
|
|
6323
|
-
|
|
6324
|
-
return character
|
|
6325
|
-
}
|
|
6326
|
-
|
|
6327
|
-
/**
|
|
6328
|
-
* @return {number}
|
|
6329
|
-
*/
|
|
6330
|
-
function peek () {
|
|
6331
|
-
return charat(characters, position)
|
|
6332
|
-
}
|
|
6333
|
-
|
|
6334
|
-
/**
|
|
6335
|
-
* @return {number}
|
|
6336
|
-
*/
|
|
6337
|
-
function caret () {
|
|
6338
|
-
return position
|
|
6339
|
-
}
|
|
6340
|
-
|
|
6341
|
-
/**
|
|
6342
|
-
* @param {number} begin
|
|
6343
|
-
* @param {number} end
|
|
6344
|
-
* @return {string}
|
|
6345
|
-
*/
|
|
6346
|
-
function slice (begin, end) {
|
|
6347
|
-
return substr(characters, begin, end)
|
|
6348
|
-
}
|
|
6349
|
-
|
|
6350
|
-
/**
|
|
6351
|
-
* @param {number} type
|
|
6352
|
-
* @return {number}
|
|
6353
|
-
*/
|
|
6354
|
-
function token (type) {
|
|
6355
|
-
switch (type) {
|
|
6356
|
-
// \0 \t \n \r \s whitespace token
|
|
6357
|
-
case 0: case 9: case 10: case 13: case 32:
|
|
6358
|
-
return 5
|
|
6359
|
-
// ! + , / > @ ~ isolate token
|
|
6360
|
-
case 33: case 43: case 44: case 47: case 62: case 64: case 126:
|
|
6361
|
-
// ; { } breakpoint token
|
|
6362
|
-
case 59: case 123: case 125:
|
|
6363
|
-
return 4
|
|
6364
|
-
// : accompanied token
|
|
6365
|
-
case 58:
|
|
6366
|
-
return 3
|
|
6367
|
-
// " ' ( [ opening delimit token
|
|
6368
|
-
case 34: case 39: case 40: case 91:
|
|
6369
|
-
return 2
|
|
6370
|
-
// ) ] closing delimit token
|
|
6371
|
-
case 41: case 93:
|
|
6372
|
-
return 1
|
|
6373
|
-
}
|
|
6374
|
-
|
|
6375
|
-
return 0
|
|
6376
|
-
}
|
|
6377
|
-
|
|
6378
|
-
/**
|
|
6379
|
-
* @param {string} value
|
|
6380
|
-
* @return {any[]}
|
|
6381
|
-
*/
|
|
6382
|
-
function alloc (value) {
|
|
6383
|
-
return line = column = 1, length = strlen(characters = value), position = 0, []
|
|
6384
|
-
}
|
|
6385
|
-
|
|
6386
|
-
/**
|
|
6387
|
-
* @param {any} value
|
|
6388
|
-
* @return {any}
|
|
6389
|
-
*/
|
|
6390
|
-
function dealloc (value) {
|
|
6391
|
-
return characters = '', value
|
|
6392
|
-
}
|
|
6393
|
-
|
|
6394
|
-
/**
|
|
6395
|
-
* @param {number} type
|
|
6396
|
-
* @return {string}
|
|
6397
|
-
*/
|
|
6398
|
-
function delimit (type) {
|
|
6399
|
-
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
|
|
6400
|
-
}
|
|
6401
|
-
|
|
6402
|
-
/**
|
|
6403
|
-
* @param {number} type
|
|
6404
|
-
* @return {string}
|
|
6405
|
-
*/
|
|
6406
|
-
function whitespace (type) {
|
|
6407
|
-
while (character = peek())
|
|
6408
|
-
if (character < 33)
|
|
6409
|
-
next();
|
|
6410
|
-
else
|
|
6411
|
-
break
|
|
6412
|
-
|
|
6413
|
-
return token(type) > 2 || token(character) > 3 ? '' : ' '
|
|
6414
|
-
}
|
|
6415
|
-
|
|
6416
|
-
/**
|
|
6417
|
-
* @param {number} index
|
|
6418
|
-
* @param {number} count
|
|
6419
|
-
* @return {string}
|
|
6420
|
-
*/
|
|
6421
|
-
function escaping (index, count) {
|
|
6422
|
-
while (--count && next())
|
|
6423
|
-
// not 0-9 A-F a-f
|
|
6424
|
-
if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
|
|
6425
|
-
break
|
|
6426
|
-
|
|
6427
|
-
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
|
|
6428
|
-
}
|
|
6429
|
-
|
|
6430
|
-
/**
|
|
6431
|
-
* @param {number} type
|
|
6432
|
-
* @return {number}
|
|
6433
|
-
*/
|
|
6434
|
-
function delimiter (type) {
|
|
6435
|
-
while (next())
|
|
6436
|
-
switch (character) {
|
|
6437
|
-
// ] ) " '
|
|
6438
|
-
case type:
|
|
6439
|
-
return position
|
|
6440
|
-
// " '
|
|
6441
|
-
case 34: case 39:
|
|
6442
|
-
if (type !== 34 && type !== 39)
|
|
6443
|
-
delimiter(character);
|
|
6444
|
-
break
|
|
6445
|
-
// (
|
|
6446
|
-
case 40:
|
|
6447
|
-
if (type === 41)
|
|
6448
|
-
delimiter(type);
|
|
6449
|
-
break
|
|
6450
|
-
// \
|
|
6451
|
-
case 92:
|
|
6452
|
-
next();
|
|
6453
|
-
break
|
|
6454
|
-
}
|
|
6455
|
-
|
|
6456
|
-
return position
|
|
6457
|
-
}
|
|
6458
|
-
|
|
6459
|
-
/**
|
|
6460
|
-
* @param {number} type
|
|
6461
|
-
* @param {number} index
|
|
6462
|
-
* @return {number}
|
|
6463
|
-
*/
|
|
6464
|
-
function commenter (type, index) {
|
|
6465
|
-
while (next())
|
|
6466
|
-
// //
|
|
6467
|
-
if (type + character === 47 + 10)
|
|
6468
|
-
break
|
|
6469
|
-
// /*
|
|
6470
|
-
else if (type + character === 42 + 42 && peek() === 47)
|
|
6471
|
-
break
|
|
6472
|
-
|
|
6473
|
-
return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())
|
|
6474
|
-
}
|
|
6475
|
-
|
|
6476
|
-
/**
|
|
6477
|
-
* @param {number} index
|
|
6478
|
-
* @return {string}
|
|
6479
|
-
*/
|
|
6480
|
-
function identifier (index) {
|
|
6481
|
-
while (!token(peek()))
|
|
6482
|
-
next();
|
|
6483
|
-
|
|
6484
|
-
return slice(index, position)
|
|
6485
|
-
}
|
|
6486
|
-
|
|
6487
|
-
/**
|
|
6488
|
-
* @param {string} value
|
|
6489
|
-
* @return {object[]}
|
|
6490
|
-
*/
|
|
6491
|
-
function compile (value) {
|
|
6492
|
-
return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))
|
|
6493
|
-
}
|
|
6494
|
-
|
|
6495
|
-
/**
|
|
6496
|
-
* @param {string} value
|
|
6497
|
-
* @param {object} root
|
|
6498
|
-
* @param {object?} parent
|
|
6499
|
-
* @param {string[]} rule
|
|
6500
|
-
* @param {string[]} rules
|
|
6501
|
-
* @param {string[]} rulesets
|
|
6502
|
-
* @param {number[]} pseudo
|
|
6503
|
-
* @param {number[]} points
|
|
6504
|
-
* @param {string[]} declarations
|
|
6505
|
-
* @return {object}
|
|
6506
|
-
*/
|
|
6507
|
-
function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
6508
|
-
var index = 0;
|
|
6509
|
-
var offset = 0;
|
|
6510
|
-
var length = pseudo;
|
|
6511
|
-
var atrule = 0;
|
|
6512
|
-
var property = 0;
|
|
6513
|
-
var previous = 0;
|
|
6514
|
-
var variable = 1;
|
|
6515
|
-
var scanning = 1;
|
|
6516
|
-
var ampersand = 1;
|
|
6517
|
-
var character = 0;
|
|
6518
|
-
var type = '';
|
|
6519
|
-
var props = rules;
|
|
6520
|
-
var children = rulesets;
|
|
6521
|
-
var reference = rule;
|
|
6522
|
-
var characters = type;
|
|
6523
|
-
|
|
6524
|
-
while (scanning)
|
|
6525
|
-
switch (previous = character, character = next()) {
|
|
6526
|
-
// (
|
|
6527
|
-
case 40:
|
|
6528
|
-
if (previous != 108 && charat(characters, length - 1) == 58) {
|
|
6529
|
-
if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f', abs(index ? points[index - 1] : 0)) != -1)
|
|
6530
|
-
ampersand = -1;
|
|
6531
|
-
break
|
|
6532
|
-
}
|
|
6533
|
-
// " ' [
|
|
6534
|
-
case 34: case 39: case 91:
|
|
6535
|
-
characters += delimit(character);
|
|
6536
|
-
break
|
|
6537
|
-
// \t \n \r \s
|
|
6538
|
-
case 9: case 10: case 13: case 32:
|
|
6539
|
-
characters += whitespace(previous);
|
|
6540
|
-
break
|
|
6541
|
-
// \
|
|
6542
|
-
case 92:
|
|
6543
|
-
characters += escaping(caret() - 1, 7);
|
|
6544
|
-
continue
|
|
6545
|
-
// /
|
|
6546
|
-
case 47:
|
|
6547
|
-
switch (peek()) {
|
|
6548
|
-
case 42: case 47:
|
|
6549
|
-
append(comment(commenter(next(), caret()), root, parent, declarations), declarations);
|
|
6550
|
-
break
|
|
6551
|
-
default:
|
|
6552
|
-
characters += '/';
|
|
6553
|
-
}
|
|
6554
|
-
break
|
|
6555
|
-
// {
|
|
6556
|
-
case 123 * variable:
|
|
6557
|
-
points[index++] = strlen(characters) * ampersand;
|
|
6558
|
-
// } ; \0
|
|
6559
|
-
case 125 * variable: case 59: case 0:
|
|
6560
|
-
switch (character) {
|
|
6561
|
-
// \0 }
|
|
6562
|
-
case 0: case 125: scanning = 0;
|
|
6563
|
-
// ;
|
|
6564
|
-
case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '');
|
|
6565
|
-
if (property > 0 && (strlen(characters) - length))
|
|
6566
|
-
append(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations);
|
|
6567
|
-
break
|
|
6568
|
-
// @ ;
|
|
6569
|
-
case 59: characters += ';';
|
|
6570
|
-
// { rule/at-rule
|
|
6571
|
-
default:
|
|
6572
|
-
append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets);
|
|
6573
|
-
|
|
6574
|
-
if (character === 123)
|
|
6575
|
-
if (offset === 0)
|
|
6576
|
-
parse(characters, root, reference, reference, props, rulesets, length, points, children);
|
|
6577
|
-
else
|
|
6578
|
-
switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
|
6579
|
-
// d l m s
|
|
6580
|
-
case 100: case 108: case 109: case 115:
|
|
6581
|
-
parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children);
|
|
6582
|
-
break
|
|
6583
|
-
default:
|
|
6584
|
-
parse(characters, reference, reference, reference, [''], children, 0, points, children);
|
|
6585
|
-
}
|
|
6586
|
-
}
|
|
6587
|
-
|
|
6588
|
-
index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo;
|
|
6589
|
-
break
|
|
6590
|
-
// :
|
|
6591
|
-
case 58:
|
|
6592
|
-
length = 1 + strlen(characters), property = previous;
|
|
6593
|
-
default:
|
|
6594
|
-
if (variable < 1)
|
|
6595
|
-
if (character == 123)
|
|
6596
|
-
--variable;
|
|
6597
|
-
else if (character == 125 && variable++ == 0 && prev() == 125)
|
|
6598
|
-
continue
|
|
6599
|
-
|
|
6600
|
-
switch (characters += from(character), character * variable) {
|
|
6601
|
-
// &
|
|
6602
|
-
case 38:
|
|
6603
|
-
ampersand = offset > 0 ? 1 : (characters += '\f', -1);
|
|
6604
|
-
break
|
|
6605
|
-
// ,
|
|
6606
|
-
case 44:
|
|
6607
|
-
points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1;
|
|
6608
|
-
break
|
|
6609
|
-
// @
|
|
6610
|
-
case 64:
|
|
6611
|
-
// -
|
|
6612
|
-
if (peek() === 45)
|
|
6613
|
-
characters += delimit(next());
|
|
6614
|
-
|
|
6615
|
-
atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++;
|
|
6616
|
-
break
|
|
6617
|
-
// -
|
|
6618
|
-
case 45:
|
|
6619
|
-
if (previous === 45 && strlen(characters) == 2)
|
|
6620
|
-
variable = 0;
|
|
6621
|
-
}
|
|
6622
|
-
}
|
|
6623
|
-
|
|
6624
|
-
return rulesets
|
|
6625
|
-
}
|
|
6626
|
-
|
|
6627
|
-
/**
|
|
6628
|
-
* @param {string} value
|
|
6629
|
-
* @param {object} root
|
|
6630
|
-
* @param {object?} parent
|
|
6631
|
-
* @param {number} index
|
|
6632
|
-
* @param {number} offset
|
|
6633
|
-
* @param {string[]} rules
|
|
6634
|
-
* @param {number[]} points
|
|
6635
|
-
* @param {string} type
|
|
6636
|
-
* @param {string[]} props
|
|
6637
|
-
* @param {string[]} children
|
|
6638
|
-
* @param {number} length
|
|
6639
|
-
* @param {object[]} siblings
|
|
6640
|
-
* @return {object}
|
|
6641
|
-
*/
|
|
6642
|
-
function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {
|
|
6643
|
-
var post = offset - 1;
|
|
6644
|
-
var rule = offset === 0 ? rules : [''];
|
|
6645
|
-
var size = sizeof(rule);
|
|
6646
|
-
|
|
6647
|
-
for (var i = 0, j = 0, k = 0; i < index; ++i)
|
|
6648
|
-
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
|
|
6649
|
-
if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x])))
|
|
6650
|
-
props[k++] = z;
|
|
6651
|
-
|
|
6652
|
-
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings)
|
|
6653
|
-
}
|
|
6654
|
-
|
|
6655
|
-
/**
|
|
6656
|
-
* @param {number} value
|
|
6657
|
-
* @param {object} root
|
|
6658
|
-
* @param {object?} parent
|
|
6659
|
-
* @param {object[]} siblings
|
|
6660
|
-
* @return {object}
|
|
6661
|
-
*/
|
|
6662
|
-
function comment (value, root, parent, siblings) {
|
|
6663
|
-
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings)
|
|
6664
|
-
}
|
|
6665
|
-
|
|
6666
|
-
/**
|
|
6667
|
-
* @param {string} value
|
|
6668
|
-
* @param {object} root
|
|
6669
|
-
* @param {object?} parent
|
|
6670
|
-
* @param {number} length
|
|
6671
|
-
* @param {object[]} siblings
|
|
6672
|
-
* @return {object}
|
|
6673
|
-
*/
|
|
6674
|
-
function declaration (value, root, parent, length, siblings) {
|
|
6675
|
-
return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)
|
|
6676
|
-
}
|
|
6677
|
-
|
|
6678
|
-
/**
|
|
6679
|
-
* @param {string} value
|
|
6680
|
-
* @param {number} length
|
|
6681
|
-
* @param {object[]} children
|
|
6682
|
-
* @return {string}
|
|
6683
|
-
*/
|
|
6684
|
-
function prefix (value, length, children) {
|
|
6685
|
-
switch (hash(value, length)) {
|
|
6686
|
-
// color-adjust
|
|
6687
|
-
case 5103:
|
|
6688
|
-
return WEBKIT + 'print-' + value + value
|
|
6689
|
-
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
6690
|
-
case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:
|
|
6691
|
-
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
6692
|
-
case 5572: case 6356: case 5844: case 3191: case 6645: case 3005:
|
|
6693
|
-
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
6694
|
-
case 6391: case 5879: case 5623: case 6135: case 4599: case 4855:
|
|
6695
|
-
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
6696
|
-
case 4215: case 6389: case 5109: case 5365: case 5621: case 3829:
|
|
6697
|
-
return WEBKIT + value + value
|
|
6698
|
-
// tab-size
|
|
6699
|
-
case 4789:
|
|
6700
|
-
return MOZ + value + value
|
|
6701
|
-
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
6702
|
-
case 5349: case 4246: case 4810: case 6968: case 2756:
|
|
6703
|
-
return WEBKIT + value + MOZ + value + MS + value + value
|
|
6704
|
-
// writing-mode
|
|
6705
|
-
case 5936:
|
|
6706
|
-
switch (charat(value, length + 11)) {
|
|
6707
|
-
// vertical-l(r)
|
|
6708
|
-
case 114:
|
|
6709
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value
|
|
6710
|
-
// vertical-r(l)
|
|
6711
|
-
case 108:
|
|
6712
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value
|
|
6713
|
-
// horizontal(-)tb
|
|
6714
|
-
case 45:
|
|
6715
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value
|
|
6716
|
-
// default: fallthrough to below
|
|
6717
|
-
}
|
|
6718
|
-
// flex, flex-direction, scroll-snap-type, writing-mode
|
|
6719
|
-
case 6828: case 4268: case 2903:
|
|
6720
|
-
return WEBKIT + value + MS + value + value
|
|
6721
|
-
// order
|
|
6722
|
-
case 6165:
|
|
6723
|
-
return WEBKIT + value + MS + 'flex-' + value + value
|
|
6724
|
-
// align-items
|
|
6725
|
-
case 5187:
|
|
6726
|
-
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value
|
|
6727
|
-
// align-self
|
|
6728
|
-
case 5443:
|
|
6729
|
-
return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/g, '') + (!match(value, /flex-|baseline/) ? MS + 'grid-row-' + replace(value, /flex-|-self/g, '') : '') + value
|
|
6730
|
-
// align-content
|
|
6731
|
-
case 4675:
|
|
6732
|
-
return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/g, '') + value
|
|
6733
|
-
// flex-shrink
|
|
6734
|
-
case 5548:
|
|
6735
|
-
return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value
|
|
6736
|
-
// flex-basis
|
|
6737
|
-
case 5292:
|
|
6738
|
-
return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value
|
|
6739
|
-
// flex-grow
|
|
6740
|
-
case 6060:
|
|
6741
|
-
return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value
|
|
6742
|
-
// transition
|
|
6743
|
-
case 4554:
|
|
6744
|
-
return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value
|
|
6745
|
-
// cursor
|
|
6746
|
-
case 6187:
|
|
6747
|
-
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value
|
|
6748
|
-
// background, background-image
|
|
6749
|
-
case 5495: case 3959:
|
|
6750
|
-
return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1')
|
|
6751
|
-
// justify-content
|
|
6752
|
-
case 4968:
|
|
6753
|
-
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value
|
|
6754
|
-
// justify-self
|
|
6755
|
-
case 4200:
|
|
6756
|
-
if (!match(value, /flex-|baseline/)) return MS + 'grid-column-align' + substr(value, length) + value
|
|
6757
|
-
break
|
|
6758
|
-
// grid-template-(columns|rows)
|
|
6759
|
-
case 2592: case 3360:
|
|
6760
|
-
return MS + replace(value, 'template-', '') + value
|
|
6761
|
-
// grid-(row|column)-start
|
|
6762
|
-
case 4384: case 3616:
|
|
6763
|
-
if (children && children.some(function (element, index) { return length = index, match(element.props, /grid-\w+-end/) })) {
|
|
6764
|
-
return ~indexof(value + (children = children[length].value), 'span', 0) ? value : (MS + replace(value, '-start', '') + value + MS + 'grid-row-span:' + (~indexof(children, 'span', 0) ? match(children, /\d+/) : +match(children, /\d+/) - +match(value, /\d+/)) + ';')
|
|
6765
|
-
}
|
|
6766
|
-
return MS + replace(value, '-start', '') + value
|
|
6767
|
-
// grid-(row|column)-end
|
|
6768
|
-
case 4896: case 4128:
|
|
6769
|
-
return (children && children.some(function (element) { return match(element.props, /grid-\w+-start/) })) ? value : MS + replace(replace(value, '-end', '-span'), 'span ', '') + value
|
|
6770
|
-
// (margin|padding)-inline-(start|end)
|
|
6771
|
-
case 4095: case 3583: case 4068: case 2532:
|
|
6772
|
-
return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value
|
|
6773
|
-
// (min|max)?(width|height|inline-size|block-size)
|
|
6774
|
-
case 8116: case 7059: case 5753: case 5535:
|
|
6775
|
-
case 5445: case 5701: case 4933: case 4677:
|
|
6776
|
-
case 5533: case 5789: case 5021: case 4765:
|
|
6777
|
-
// stretch, max-content, min-content, fill-available
|
|
6778
|
-
if (strlen(value) - 1 - length > 6)
|
|
6779
|
-
switch (charat(value, length + 1)) {
|
|
6780
|
-
// (m)ax-content, (m)in-content
|
|
6781
|
-
case 109:
|
|
6782
|
-
// -
|
|
6783
|
-
if (charat(value, length + 4) !== 45)
|
|
6784
|
-
break
|
|
6785
|
-
// (f)ill-available, (f)it-content
|
|
6786
|
-
case 102:
|
|
6787
|
-
return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value
|
|
6788
|
-
// (s)tretch
|
|
6789
|
-
case 115:
|
|
6790
|
-
return ~indexof(value, 'stretch', 0) ? prefix(replace(value, 'stretch', 'fill-available'), length, children) + value : value
|
|
6791
|
-
}
|
|
6792
|
-
break
|
|
6793
|
-
// grid-(column|row)
|
|
6794
|
-
case 5152: case 5920:
|
|
6795
|
-
return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function (_, a, b, c, d, e, f) { return (MS + a + ':' + b + f) + (c ? (MS + a + '-span:' + (d ? e : +e - +b)) + f : '') + value })
|
|
6796
|
-
// position: sticky
|
|
6797
|
-
case 4949:
|
|
6798
|
-
// stick(y)?
|
|
6799
|
-
if (charat(value, length + 6) === 121)
|
|
6800
|
-
return replace(value, ':', ':' + WEBKIT) + value
|
|
6801
|
-
break
|
|
6802
|
-
// display: (flex|inline-flex|grid|inline-grid)
|
|
6803
|
-
case 6444:
|
|
6804
|
-
switch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {
|
|
6805
|
-
// (inline-)?fle(x)
|
|
6806
|
-
case 120:
|
|
6807
|
-
return replace(value, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value
|
|
6808
|
-
// (inline-)?gri(d)
|
|
6809
|
-
case 100:
|
|
6810
|
-
return replace(value, ':', ':' + MS) + value
|
|
6811
|
-
}
|
|
6812
|
-
break
|
|
6813
|
-
// scroll-margin, scroll-margin-(top|right|bottom|left)
|
|
6814
|
-
case 5719: case 2647: case 2135: case 3927: case 2391:
|
|
6815
|
-
return replace(value, 'scroll-', 'scroll-snap-') + value
|
|
6816
|
-
}
|
|
6817
|
-
|
|
6818
|
-
return value
|
|
6819
|
-
}
|
|
6820
|
-
|
|
6821
|
-
/**
|
|
6822
|
-
* @param {object[]} children
|
|
6823
|
-
* @param {function} callback
|
|
6824
|
-
* @return {string}
|
|
6825
|
-
*/
|
|
6826
|
-
function serialize (children, callback) {
|
|
6827
|
-
var output = '';
|
|
6828
|
-
|
|
6829
|
-
for (var i = 0; i < children.length; i++)
|
|
6830
|
-
output += callback(children[i], i, children, callback) || '';
|
|
6831
|
-
|
|
6832
|
-
return output
|
|
6833
|
-
}
|
|
6834
|
-
|
|
6835
|
-
/**
|
|
6836
|
-
* @param {object} element
|
|
6837
|
-
* @param {number} index
|
|
6838
|
-
* @param {object[]} children
|
|
6839
|
-
* @param {function} callback
|
|
6840
|
-
* @return {string}
|
|
6841
|
-
*/
|
|
6842
|
-
function stringify (element, index, children, callback) {
|
|
6843
|
-
switch (element.type) {
|
|
6844
|
-
case LAYER: if (element.children.length) break
|
|
6845
|
-
case IMPORT: case DECLARATION: return element.return = element.return || element.value
|
|
6846
|
-
case COMMENT: return ''
|
|
6847
|
-
case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
|
|
6848
|
-
case RULESET: if (!strlen(element.value = element.props.join(','))) return ''
|
|
6849
|
-
}
|
|
6850
|
-
|
|
6851
|
-
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''
|
|
6852
|
-
}
|
|
6853
|
-
|
|
6854
|
-
/**
|
|
6855
|
-
* @param {function[]} collection
|
|
6856
|
-
* @return {function}
|
|
6857
|
-
*/
|
|
6858
|
-
function middleware (collection) {
|
|
6859
|
-
var length = sizeof(collection);
|
|
6860
|
-
|
|
6861
|
-
return function (element, index, children, callback) {
|
|
6862
|
-
var output = '';
|
|
6863
|
-
|
|
6864
|
-
for (var i = 0; i < length; i++)
|
|
6865
|
-
output += collection[i](element, index, children, callback) || '';
|
|
6866
|
-
|
|
6867
|
-
return output
|
|
6868
|
-
}
|
|
6869
|
-
}
|
|
6870
|
-
|
|
6871
|
-
/**
|
|
6872
|
-
* @param {function} callback
|
|
6873
|
-
* @return {function}
|
|
6874
|
-
*/
|
|
6875
|
-
function rulesheet (callback) {
|
|
6876
|
-
return function (element) {
|
|
6877
|
-
if (!element.root)
|
|
6878
|
-
if (element = element.return)
|
|
6879
|
-
callback(element);
|
|
6880
|
-
}
|
|
6881
|
-
}
|
|
6882
|
-
|
|
6883
|
-
/**
|
|
6884
|
-
* @param {object} element
|
|
6885
|
-
* @param {number} index
|
|
6886
|
-
* @param {object[]} children
|
|
6887
|
-
* @param {function} callback
|
|
6888
|
-
*/
|
|
6889
|
-
function prefixer (element, index, children, callback) {
|
|
6890
|
-
if (element.length > -1)
|
|
6891
|
-
if (!element.return)
|
|
6892
|
-
switch (element.type) {
|
|
6893
|
-
case DECLARATION: element.return = prefix(element.value, element.length, children);
|
|
6894
|
-
return
|
|
6895
|
-
case KEYFRAMES:
|
|
6896
|
-
return serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)
|
|
6897
|
-
case RULESET:
|
|
6898
|
-
if (element.length)
|
|
6899
|
-
return combine(children = element.props, function (value) {
|
|
6900
|
-
switch (match(value, callback = /(::plac\w+|:read-\w+)/)) {
|
|
6901
|
-
// :read-(only|write)
|
|
6902
|
-
case ':read-only': case ':read-write':
|
|
6903
|
-
lift(copy(element, {props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]}));
|
|
6904
|
-
lift(copy(element, {props: [value]}));
|
|
6905
|
-
assign(element, {props: filter(children, callback)});
|
|
6906
|
-
break
|
|
6907
|
-
// :placeholder
|
|
6908
|
-
case '::placeholder':
|
|
6909
|
-
lift(copy(element, {props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]}));
|
|
6910
|
-
lift(copy(element, {props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]}));
|
|
6911
|
-
lift(copy(element, {props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]}));
|
|
6912
|
-
lift(copy(element, {props: [value]}));
|
|
6913
|
-
assign(element, {props: filter(children, callback)});
|
|
6914
|
-
break
|
|
6915
|
-
}
|
|
6916
|
-
|
|
6917
|
-
return ''
|
|
6918
|
-
})
|
|
6919
|
-
}
|
|
6920
|
-
}
|
|
6921
|
-
|
|
6922
|
-
var unitlessKeys = {
|
|
6923
|
-
animationIterationCount: 1,
|
|
6924
|
-
aspectRatio: 1,
|
|
6925
|
-
borderImageOutset: 1,
|
|
6926
|
-
borderImageSlice: 1,
|
|
6927
|
-
borderImageWidth: 1,
|
|
6928
|
-
boxFlex: 1,
|
|
6929
|
-
boxFlexGroup: 1,
|
|
6930
|
-
boxOrdinalGroup: 1,
|
|
6931
|
-
columnCount: 1,
|
|
6932
|
-
columns: 1,
|
|
6933
|
-
flex: 1,
|
|
6934
|
-
flexGrow: 1,
|
|
6935
|
-
flexPositive: 1,
|
|
6936
|
-
flexShrink: 1,
|
|
6937
|
-
flexNegative: 1,
|
|
6938
|
-
flexOrder: 1,
|
|
6939
|
-
gridRow: 1,
|
|
6940
|
-
gridRowEnd: 1,
|
|
6941
|
-
gridRowSpan: 1,
|
|
6942
|
-
gridRowStart: 1,
|
|
6943
|
-
gridColumn: 1,
|
|
6944
|
-
gridColumnEnd: 1,
|
|
6945
|
-
gridColumnSpan: 1,
|
|
6946
|
-
gridColumnStart: 1,
|
|
6947
|
-
msGridRow: 1,
|
|
6948
|
-
msGridRowSpan: 1,
|
|
6949
|
-
msGridColumn: 1,
|
|
6950
|
-
msGridColumnSpan: 1,
|
|
6951
|
-
fontWeight: 1,
|
|
6952
|
-
lineHeight: 1,
|
|
6953
|
-
opacity: 1,
|
|
6954
|
-
order: 1,
|
|
6955
|
-
orphans: 1,
|
|
6956
|
-
tabSize: 1,
|
|
6957
|
-
widows: 1,
|
|
6958
|
-
zIndex: 1,
|
|
6959
|
-
zoom: 1,
|
|
6960
|
-
WebkitLineClamp: 1,
|
|
6961
|
-
// SVG-related properties
|
|
6962
|
-
fillOpacity: 1,
|
|
6963
|
-
floodOpacity: 1,
|
|
6964
|
-
stopOpacity: 1,
|
|
6965
|
-
strokeDasharray: 1,
|
|
6966
|
-
strokeDashoffset: 1,
|
|
6967
|
-
strokeMiterlimit: 1,
|
|
6968
|
-
strokeOpacity: 1,
|
|
6969
|
-
strokeWidth: 1
|
|
6970
|
-
};
|
|
6971
|
-
|
|
6972
|
-
var f="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",m="active",y="data-styled-version",v="6.1.15",g="/*!sc*/\n",S="undefined"!=typeof window&&"HTMLElement"in window,w=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),E=/invalid hook call/i,N=new Set,P=function(t,n){if("production"!==process.env.NODE_ENV){var o=n?' with the id of "'.concat(n,'"'):"",s="The component ".concat(t).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];E.test(t)?(a=!1,N.delete(s)):i.apply(void 0,__spreadArray([t],n,!1));},reactExports.useRef(),a&&!N.has(s)&&(console.warn(s),N.add(s));}catch(e){E.test(e.message)&&N.delete(s);}finally{console.error=i;}}},_=Object.freeze([]),C=Object.freeze({});function I(e,t,n){return void 0===n&&(n=C),e.theme!==n.theme&&e.theme||t||n.theme}var A=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),O=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,D=/(^-|-$)/g;function R(e){return e.replace(O,"-").replace(D,"")}var T=/(a)(d)/gi,k=52,j=function(e){return String.fromCharCode(e+(e>25?39:97))};function x(e){var t,n="";for(t=Math.abs(e);t>k;t=t/k|0)n=j(t%k)+n;return (j(t%k)+n).replace(T,"$1-$2")}var V,F=5381,M=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},z=function(e){return M(F,e)};function $(e){return x(z(e)>>>0)}function B(e){return "production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function L(e){return "string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var G="function"==typeof Symbol&&Symbol.for,Y=G?Symbol.for("react.memo"):60115,W=G?Symbol.for("react.forward_ref"):60112,q={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},H={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},U={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},J=((V={})[W]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V[Y]=U,V);function X(e){return ("type"in(t=e)&&t.type.$$typeof)===Y?U:"$$typeof"in e?J[e.$$typeof]:q;var t;}var Z=Object.defineProperty,K=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,ee=Object.getOwnPropertyDescriptor,te=Object.getPrototypeOf,ne=Object.prototype;function oe(e,t,n){if("string"!=typeof t){if(ne){var o=te(t);o&&o!==ne&&oe(e,o,n);}var r=K(t);Q&&(r=r.concat(Q(t)));for(var s=X(e),i=X(t),a=0;a<r.length;++a){var c=r[a];if(!(c in H||n&&n[c]||i&&c in i||s&&c in s)){var l=ee(t,c);try{Z(e,c,l);}catch(e){}}}}return e}function re(e){return "function"==typeof e}function se(e){return "object"==typeof e&&"styledComponentId"in e}function ie(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ae(e,t){if(0===e.length)return "";for(var n=e[0],o=1;o<e.length;o++)n+=t?t+e[o]:e[o];return n}function ce(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function le(e,t,n){if(void 0===n&&(n=!1),!n&&!ce(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var o=0;o<t.length;o++)e[o]=le(e[o],t[o]);else if(ce(t))for(var o in t)e[o]=le(e[o],t[o]);return e}function ue(e,t){Object.defineProperty(e,"toString",{value:t});}var pe="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],o=[],r=1,s=e.length;r<s;r+=1)o.push(e[r]);return o.forEach(function(e){n=n.replace(/%[a-z]/,e);}),n}function he(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return "production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(de.apply(void 0,__spreadArray([pe[t]],n,!1)).trim())}var fe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,r=o;e>=r;)if((r<<=1)<0)throw he(16,"".concat(e));this.groupSizes=new Uint32Array(r),this.groupSizes.set(n),this.length=r;for(var s=o;s<r;s++)this.groupSizes[s]=0;}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++);},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(var r=n;r<o;r++)this.tag.deleteRule(n);}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],o=this.indexOfGroup(e),r=o+n,s=o;s<r;s++)t+="".concat(this.tag.getRule(s)).concat(g);return t},e}(),me=1<<30,ye=new Map,ve=new Map,ge=1,Se=function(e){if(ye.has(e))return ye.get(e);for(;ve.has(ge);)ge++;var t=ge++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>me))throw he(16,"".concat(t));return ye.set(e,t),ve.set(t,e),t},we=function(e,t){ge=t+1,ye.set(e,t),ve.set(t,e);},be="style[".concat(f,"][").concat(y,'="').concat(v,'"]'),Ee=new RegExp("^".concat(f,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Ne=function(e,t,n){for(var o,r=n.split(","),s=0,i=r.length;s<i;s++)(o=r[s])&&e.registerName(t,o);},Pe=function(e,t){for(var n,o=(null!==(n=t.textContent)&&void 0!==n?n:"").split(g),r=[],s=0,i=o.length;s<i;s++){var a=o[s].trim();if(a){var c=a.match(Ee);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(we(u,l),Ne(e,u,c[3]),e.getTag().insertRules(l,r)),r.length=0;}else r.push(a);}}},_e=function(e){for(var t=document.querySelectorAll(be),n=0,o=t.length;n<o;n++){var r=t[n];r&&r.getAttribute(f)!==m&&(Pe(e,r),r.parentNode&&r.parentNode.removeChild(r));}};function Ce(){return "undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Ie=function(e){var t=document.head,n=e||t,o=document.createElement("style"),r=function(e){var t=Array.from(e.querySelectorAll("style[".concat(f,"]")));return t[t.length-1]}(n),s=void 0!==r?r.nextSibling:null;o.setAttribute(f,m),o.setAttribute(y,v);var i=Ce();return i&&o.setAttribute("nonce",i),n.insertBefore(o,s),o},Ae=function(){function e(e){this.element=Ie(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,o=t.length;n<o;n++){var r=t[n];if(r.ownerNode===e)return r}throw he(17)}(this.element),this.length=0;}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return !1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--;},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Oe=function(){function e(e){this.element=Ie(e),this.nodes=this.element.childNodes,this.length=0;}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return !1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),De=function(){function e(e){this.rules=[],this.length=0;}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--;},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Re=S,Te={isServer:!S,useCSSOMInjection:!w},ke=function(){function e(e,n,o){void 0===e&&(e=C),void 0===n&&(n={});var r=this;this.options=__assign(__assign({},Te),e),this.gs=n,this.names=new Map(o),this.server=!!e.isServer,!this.server&&S&&Re&&(Re=!1,_e(this)),ue(this,function(){return function(e){for(var t=e.getTag(),n=t.length,o="",r=function(n){var r=function(e){return ve.get(e)}(n);if(void 0===r)return "continue";var s=e.names.get(r),i=t.getGroup(n);if(void 0===s||!s.size||0===i.length)return "continue";var a="".concat(f,".g").concat(n,'[id="').concat(r,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","));}),o+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat(g);},s=0;s<n;s++)r(s);return o}(r)});}return e.registerId=function(e){return Se(e)},e.prototype.rehydrate=function(){!this.server&&S&&_e(this);},e.prototype.reconstructWithOptions=function(n,o){return void 0===o&&(o=!0),new e(__assign(__assign({},this.options),n),this.gs,o&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new De(n):t?new Ae(n):new Oe(n)}(this.options),new fe(e)));var e;},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(Se(e),this.names.has(e))this.names.get(e).add(t);else {var n=new Set;n.add(t),this.names.set(e,n);}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(Se(e),n);},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear();},e.prototype.clearRules=function(e){this.getTag().clearGroup(Se(e)),this.clearNames(e);},e.prototype.clearTag=function(){this.tag=void 0;},e}(),je=/&/g,xe=/^\s*\/\/.*$/gm;function Ve(e,t){return e.map(function(e){return "rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return "".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=Ve(e.children,t)),e})}function Fe(e){var t,n,o,r=void 0===e?C:e,s=r.options,i=void 0===s?C:s,a=r.plugins,c=void 0===a?_:a,l=function(e,o,r){return r.startsWith(n)&&r.endsWith(n)&&r.replaceAll(n,"").length>0?".".concat(t):e},u=c.slice();u.push(function(e){e.type===RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(je,n).replace(o,l));}),i.prefix&&u.push(prefixer),u.push(stringify);var p=function(e,r,s,a){void 0===r&&(r=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=r,o=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(xe,""),l=compile(s||r?"".concat(s," ").concat(r," { ").concat(c," }"):c);i.namespace&&(l=Ve(l,i.namespace));var p=[];return serialize(l,middleware(u.concat(rulesheet(function(e){return p.push(e)})))),p};return p.hash=c.length?c.reduce(function(e,t){return t.name||he(15),M(e,t.name)},F).toString():"",p}var Me=new ke,ze=Fe(),$e=React.createContext({shouldForwardProp:void 0,styleSheet:Me,stylis:ze});$e.Consumer;React.createContext(void 0);function Ge(){return reactExports.useContext($e)}var We=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ze);var o=n.name+t.hash;e.hasNameForId(n.id,o)||e.insertRules(n.id,o,t(n.rules,o,"@keyframes"));},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,ue(this,function(){throw he(12,String(n.name))});}return e.prototype.getName=function(e){return void 0===e&&(e=ze),this.name+e.hash},e}(),qe=function(e){return e>="A"&&e<="Z"};function He(e){for(var t="",n=0;n<e.length;n++){var o=e[n];if(1===n&&"-"===o&&"-"===e[0])return e;qe(o)?t+="-"+o.toLowerCase():t+=o;}return t.startsWith("ms-")?"-"+t:t}var Ue=function(e){return null==e||!1===e||""===e},Je=function(t){var n,o,r=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!Ue(i)&&(Array.isArray(i)&&i.isCss||re(i)?r.push("".concat(He(s),":"),i,";"):ce(i)?r.push.apply(r,__spreadArray(__spreadArray(["".concat(s," {")],Je(i),!1),["}"],!1)):r.push("".concat(He(s),": ").concat((n=s,null==(o=i)||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||n in unitlessKeys||n.startsWith("--")?String(o).trim():"".concat(o,"px")),";")));}return r};function Xe(e,t,n,o){if(Ue(e))return [];if(se(e))return [".".concat(e.styledComponentId)];if(re(e)){if(!re(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return [e];var r=e(t);return "production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof We||ce(r)||null===r||console.error("".concat(B(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Xe(r,t,n,o)}var s;return e instanceof We?n?(e.inject(n,o),[e.getName(o)]):[e]:ce(e)?Je(e):Array.isArray(e)?Array.prototype.concat.apply(_,e.map(function(e){return Xe(e,t,n,o)})):[e.toString()]}function Ze(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(re(n)&&!se(n))return !1}return !0}var Ke=z(v),Qe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ze(e),this.componentId=t,this.baseHash=M(Ke,t),this.baseStyle=n,ke.registerId(t);}return e.prototype.generateAndInjectStyles=function(e,t,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))o=ie(o,this.staticRulesId);else {var r=ae(Xe(this.rules,e,t,n)),s=x(M(this.baseHash,r)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(r,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i);}o=ie(o,s),this.staticRulesId=s;}else {for(var a=M(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=M(a,u));else if(u){var p=ae(Xe(u,e,t,n));a=M(a,p+l),c+=p;}}if(c){var d=x(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),o=ie(o,d);}}return o},e}(),et=React.createContext(void 0);et.Consumer;var rt={},st=new Set;function it(e,r,s){var i=se(e),a=e,c=!L(e),p=r.attrs,d=void 0===p?_:p,h=r.componentId,f=void 0===h?function(e,t){var n="string"!=typeof e?"sc":R(e);rt[n]=(rt[n]||0)+1;var o="".concat(n,"-").concat($(v+n+rt[n]));return t?"".concat(t,"-").concat(o):o}(r.displayName,r.parentComponentId):h,m=r.displayName,y=void 0===m?function(e){return L(e)?"styled.".concat(e):"Styled(".concat(B(e),")")}(e):m,g=r.displayName&&r.componentId?"".concat(R(r.displayName),"-").concat(r.componentId):r.componentId||f,S=i&&a.attrs?a.attrs.concat(d).filter(Boolean):d,w=r.shouldForwardProp;if(i&&a.shouldForwardProp){var b=a.shouldForwardProp;if(r.shouldForwardProp){var E=r.shouldForwardProp;w=function(e,t){return b(e,t)&&E(e,t)};}else w=b;}var N=new Qe(s,g,i?a.componentStyle:void 0);function O(e,r){return function(e,r,s){var i=e.attrs,a=e.componentStyle,c=e.defaultProps,p=e.foldedComponentIds,d=e.styledComponentId,h=e.target,f=React.useContext(et),m=Ge(),y=e.shouldForwardProp||m.shouldForwardProp;"production"!==process.env.NODE_ENV&&reactExports.useDebugValue(d);var v=I(r,f,c)||C,g=function(e,n,o){for(var r,s=__assign(__assign({},n),{className:void 0,theme:o}),i=0;i<e.length;i+=1){var a=re(r=e[i])?r(s):r;for(var c in a)s[c]="className"===c?ie(s[c],a[c]):"style"===c?__assign(__assign({},s[c]),a[c]):a[c];}return n.className&&(s.className=ie(s.className,n.className)),s}(i,r,v),S=g.as||h,w={};for(var b in g)void 0===g[b]||"$"===b[0]||"as"===b||"theme"===b&&g.theme===v||("forwardedAs"===b?w.as=g.forwardedAs:y&&!y(b,S)||(w[b]=g[b],y||"development"!==process.env.NODE_ENV||isPropValid(b)||st.has(b)||!A.has(S)||(st.add(b),console.warn('styled-components: it looks like an unknown prop "'.concat(b,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var E=function(e,t){var n=Ge(),o=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return "production"!==process.env.NODE_ENV&&reactExports.useDebugValue(o),o}(a,g);"production"!==process.env.NODE_ENV&&e.warnTooManyClasses&&e.warnTooManyClasses(E);var N=ie(p,d);return E&&(N+=" "+E),g.className&&(N+=" "+g.className),w[L(S)&&!A.has(S)?"class":"className"]=N,s&&(w.ref=s),reactExports.createElement(S,w)}(D,e,r)}O.displayName=y;var D=React.forwardRef(O);return D.attrs=S,D.componentStyle=N,D.displayName=y,D.shouldForwardProp=w,D.foldedComponentIds=i?ie(a.foldedComponentIds,a.styledComponentId):"",D.styledComponentId=g,D.target=i?a.target:e,Object.defineProperty(D,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var o=0,r=t;o<r.length;o++)le(e,r[o],!0);return e}({},a.defaultProps,e):e;}}),"production"!==process.env.NODE_ENV&&(P(y,g),D.warnTooManyClasses=function(e,t){var n={},o=!1;return function(r){if(!o&&(n[r]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),o=!0,n={};}}}(y,g)),ue(D,function(){return ".".concat(D.styledComponentId)}),c&&oe(D,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),D}function at(e,t){for(var n=[e[0]],o=0,r=t.length;o<r;o+=1)n.push(t[o],e[o+1]);return n}var ct=function(e){return Object.assign(e,{isCss:!0})};function lt(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(re(t)||ce(t))return ct(Xe(at(_,__spreadArray([t],n,!0))));var r=t;return 0===n.length&&1===r.length&&"string"==typeof r[0]?Xe(r):ct(Xe(at(r,n)))}function ut(n,o,r){if(void 0===r&&(r=C),!o)throw he(1,o);var s=function(t){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return n(o,r,lt.apply(void 0,__spreadArray([t],s,!1)))};return s.attrs=function(e){return ut(n,o,__assign(__assign({},r),{attrs:Array.prototype.concat(r.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return ut(n,o,__assign(__assign({},r),e))},s}var pt=function(e){return ut(it,e)},dt=pt;A.forEach(function(e){dt[e]=pt(e);});"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var St="__sc-".concat(f,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[St]||(window[St]=0),1===window[St]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window[St]+=1);
|
|
6973
|
-
|
|
6974
6060
|
// import { IconSpinner } from '../assets/image';
|
|
6975
6061
|
|
|
6976
|
-
|
|
6062
|
+
styled.div`
|
|
6977
6063
|
user-select: none;
|
|
6978
6064
|
cursor: wait;
|
|
6979
6065
|
display: none;
|
|
@@ -7106,7 +6192,7 @@ const axiosSubmit = axios$1.create({
|
|
|
7106
6192
|
,
|
|
7107
6193
|
maxContentLength: 104857600 //100mb
|
|
7108
6194
|
});
|
|
7109
|
-
const StyledCover =
|
|
6195
|
+
const StyledCover = styled.div`
|
|
7110
6196
|
border:2px solid red;
|
|
7111
6197
|
`;
|
|
7112
6198
|
const Cover = ({
|
|
@@ -7373,7 +6459,106 @@ class JRSubmit extends React.Component {
|
|
|
7373
6459
|
}
|
|
7374
6460
|
}
|
|
7375
6461
|
|
|
7376
|
-
const
|
|
6462
|
+
const FreeType$1 = ({
|
|
6463
|
+
tag: Tag,
|
|
6464
|
+
config,
|
|
6465
|
+
me,
|
|
6466
|
+
className
|
|
6467
|
+
}) => {
|
|
6468
|
+
if (typeof config === 'function') {
|
|
6469
|
+
let style;
|
|
6470
|
+
const setStyle = function (_style) {
|
|
6471
|
+
style = _style;
|
|
6472
|
+
};
|
|
6473
|
+
const content = config.bind(me)({
|
|
6474
|
+
setStyle
|
|
6475
|
+
});
|
|
6476
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
6477
|
+
className: className,
|
|
6478
|
+
style: style
|
|
6479
|
+
}, content);
|
|
6480
|
+
}
|
|
6481
|
+
};
|
|
6482
|
+
const StyledJRFrame$1 = styled.div`
|
|
6483
|
+
display:flex;
|
|
6484
|
+
flex:1;
|
|
6485
|
+
overflow:hidden;
|
|
6486
|
+
|
|
6487
|
+
> *{
|
|
6488
|
+
Xborder:1px solid gray;
|
|
6489
|
+
}
|
|
6490
|
+
>main{
|
|
6491
|
+
display:flex;
|
|
6492
|
+
flex:1;
|
|
6493
|
+
overflow:overlay;
|
|
6494
|
+
flex-direction: column;
|
|
6495
|
+
> *{
|
|
6496
|
+
XXborder:1px solid gray;
|
|
6497
|
+
min-height:30px;
|
|
6498
|
+
}
|
|
6499
|
+
|
|
6500
|
+
>header{
|
|
6501
|
+
XXborder:1px solid red;
|
|
6502
|
+
XXoverflow: overlay;
|
|
6503
|
+
}
|
|
6504
|
+
>main{
|
|
6505
|
+
display:flex;
|
|
6506
|
+
flex:1;
|
|
6507
|
+
overflow:hidden;
|
|
6508
|
+
}
|
|
6509
|
+
>footer{
|
|
6510
|
+
XXborder:1px solid blue;
|
|
6511
|
+
overflow: overlay;
|
|
6512
|
+
}
|
|
6513
|
+
|
|
6514
|
+
}
|
|
6515
|
+
|
|
6516
|
+
`;
|
|
6517
|
+
class JRFrame extends JRSubmit {
|
|
6518
|
+
renderer() {
|
|
6519
|
+
return /*#__PURE__*/React.createElement(StyledJRFrame$1, {
|
|
6520
|
+
style: this.props.style,
|
|
6521
|
+
className: `${this.props.className} jr-frame`
|
|
6522
|
+
}, /*#__PURE__*/React.createElement(FreeType$1, {
|
|
6523
|
+
tag: "div",
|
|
6524
|
+
config: this.props.start,
|
|
6525
|
+
me: this,
|
|
6526
|
+
className: 'start'
|
|
6527
|
+
}), /*#__PURE__*/React.createElement("main", null, /*#__PURE__*/React.createElement(FreeType$1, {
|
|
6528
|
+
tag: "header",
|
|
6529
|
+
config: this.props.top,
|
|
6530
|
+
me: this
|
|
6531
|
+
}), /*#__PURE__*/React.createElement("main", null, /*#__PURE__*/React.createElement(FreeType$1, {
|
|
6532
|
+
tag: "div",
|
|
6533
|
+
config: this.props.left,
|
|
6534
|
+
me: this,
|
|
6535
|
+
className: 'left'
|
|
6536
|
+
}), this.renderMe(), /*#__PURE__*/React.createElement(FreeType$1, {
|
|
6537
|
+
tag: "div",
|
|
6538
|
+
config: this.props.right,
|
|
6539
|
+
me: this,
|
|
6540
|
+
className: 'right'
|
|
6541
|
+
})), /*#__PURE__*/React.createElement(FreeType$1, {
|
|
6542
|
+
tag: "footer",
|
|
6543
|
+
config: this.props.bottom,
|
|
6544
|
+
me: this
|
|
6545
|
+
})), /*#__PURE__*/React.createElement(FreeType$1, {
|
|
6546
|
+
tag: "div",
|
|
6547
|
+
config: this.props.end,
|
|
6548
|
+
me: this,
|
|
6549
|
+
className: 'end'
|
|
6550
|
+
}));
|
|
6551
|
+
}
|
|
6552
|
+
renderMe() {
|
|
6553
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6554
|
+
style: {
|
|
6555
|
+
flex: 1
|
|
6556
|
+
}
|
|
6557
|
+
}, "Render me");
|
|
6558
|
+
}
|
|
6559
|
+
}
|
|
6560
|
+
|
|
6561
|
+
const StyledJRFrame = styled.div`
|
|
7377
6562
|
display:flex;
|
|
7378
6563
|
flex:1;
|
|
7379
6564
|
overflow:hidden;
|
|
@@ -7472,4 +6657,4 @@ class JRTestReact extends JRSubmit {
|
|
|
7472
6657
|
}
|
|
7473
6658
|
}
|
|
7474
6659
|
|
|
7475
|
-
export { JRSubmit, JRTestReact };
|
|
6660
|
+
export { JRFrame, JRSubmit, JRTestReact };
|