MinsoftK

deleting

Showing 1000 changed files with 0 additions and 4881 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../semver/bin/semver.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@ECHO off
2 -SETLOCAL
3 -CALL :find_dp0
4 -
5 -IF EXIST "%dp0%\node.exe" (
6 - SET "_prog=%dp0%\node.exe"
7 -) ELSE (
8 - SET "_prog=node"
9 - SET PATHEXT=%PATHEXT:;.JS;=;%
10 -)
11 -
12 -"%_prog%" "%dp0%\..\semver\bin\semver.js" %*
13 -ENDLOCAL
14 -EXIT /b %errorlevel%
15 -:find_dp0
16 -SET dp0=%~dp0
17 -EXIT /b
1 -#!/usr/bin/env pwsh
2 -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3 -
4 -$exe=""
5 -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6 - # Fix case when both the Windows and Linux builds of Node
7 - # are installed in the same directory
8 - $exe=".exe"
9 -}
10 -$ret=0
11 -if (Test-Path "$basedir/node$exe") {
12 - & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
13 - $ret=$LASTEXITCODE
14 -} else {
15 - & "node$exe" "$basedir/../semver/bin/semver.js" $args
16 - $ret=$LASTEXITCODE
17 -}
18 -exit $ret
1 -MIT License
2 -
3 -Copyright (c) 2012-2018 Aseem Kishore, and [others].
4 -
5 -Permission is hereby granted, free of charge, to any person obtaining a copy
6 -of this software and associated documentation files (the "Software"), to deal
7 -in the Software without restriction, including without limitation the rights
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 -copies of the Software, and to permit persons to whom the Software is
10 -furnished to do so, subject to the following conditions:
11 -
12 -The above copyright notice and this permission notice shall be included in all
13 -copies or substantial portions of the Software.
14 -
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 -SOFTWARE.
22 -
23 -[others]: https://github.com/json5/json5/contributors
1 -# JSON5 – JSON for Humans
2 -
3 -[![Build Status](https://travis-ci.org/json5/json5.svg)][Build Status]
4 -[![Coverage
5 -Status](https://coveralls.io/repos/github/json5/json5/badge.svg)][Coverage
6 -Status]
7 -
8 -The JSON5 Data Interchange Format (JSON5) is a superset of [JSON] that aims to
9 -alleviate some of the limitations of JSON by expanding its syntax to include
10 -some productions from [ECMAScript 5.1].
11 -
12 -This JavaScript library is the official reference implementation for JSON5
13 -parsing and serialization libraries.
14 -
15 -[Build Status]: https://travis-ci.org/json5/json5
16 -
17 -[Coverage Status]: https://coveralls.io/github/json5/json5
18 -
19 -[JSON]: https://tools.ietf.org/html/rfc7159
20 -
21 -[ECMAScript 5.1]: https://www.ecma-international.org/ecma-262/5.1/
22 -
23 -## Summary of Features
24 -The following ECMAScript 5.1 features, which are not supported in JSON, have
25 -been extended to JSON5.
26 -
27 -### Objects
28 -- Object keys may be an ECMAScript 5.1 _[IdentifierName]_.
29 -- Objects may have a single trailing comma.
30 -
31 -### Arrays
32 -- Arrays may have a single trailing comma.
33 -
34 -### Strings
35 -- Strings may be single quoted.
36 -- Strings may span multiple lines by escaping new line characters.
37 -- Strings may include character escapes.
38 -
39 -### Numbers
40 -- Numbers may be hexadecimal.
41 -- Numbers may have a leading or trailing decimal point.
42 -- Numbers may be [IEEE 754] positive infinity, negative infinity, and NaN.
43 -- Numbers may begin with an explicit plus sign.
44 -
45 -### Comments
46 -- Single and multi-line comments are allowed.
47 -
48 -### White Space
49 -- Additional white space characters are allowed.
50 -
51 -[IdentifierName]: https://www.ecma-international.org/ecma-262/5.1/#sec-7.6
52 -
53 -[IEEE 754]: http://ieeexplore.ieee.org/servlet/opac?punumber=4610933
54 -
55 -## Short Example
56 -```js
57 -{
58 - // comments
59 - unquoted: 'and you can quote me on that',
60 - singleQuotes: 'I can use "double quotes" here',
61 - lineBreaks: "Look, Mom! \
62 -No \\n's!",
63 - hexadecimal: 0xdecaf,
64 - leadingDecimalPoint: .8675309, andTrailing: 8675309.,
65 - positiveSign: +1,
66 - trailingComma: 'in objects', andIn: ['arrays',],
67 - "backwardsCompatible": "with JSON",
68 -}
69 -```
70 -
71 -## Specification
72 -For a detailed explanation of the JSON5 format, please read the [official
73 -specification](https://json5.github.io/json5-spec/).
74 -
75 -## Installation
76 -### Node.js
77 -```sh
78 -npm install json5
79 -```
80 -
81 -```js
82 -const JSON5 = require('json5')
83 -```
84 -
85 -### Browsers
86 -```html
87 -<script src="https://unpkg.com/json5@^1.0.0"></script>
88 -```
89 -
90 -This will create a global `JSON5` variable.
91 -
92 -## API
93 -The JSON5 API is compatible with the [JSON API].
94 -
95 -[JSON API]:
96 -https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON
97 -
98 -### JSON5.parse()
99 -Parses a JSON5 string, constructing the JavaScript value or object described by
100 -the string. An optional reviver function can be provided to perform a
101 -transformation on the resulting object before it is returned.
102 -
103 -#### Syntax
104 - JSON5.parse(text[, reviver])
105 -
106 -#### Parameters
107 -- `text`: The string to parse as JSON5.
108 -- `reviver`: If a function, this prescribes how the value originally produced by
109 - parsing is transformed, before being returned.
110 -
111 -#### Return value
112 -The object corresponding to the given JSON5 text.
113 -
114 -### JSON5.stringify()
115 -Converts a JavaScript value to a JSON5 string, optionally replacing values if a
116 -replacer function is specified, or optionally including only the specified
117 -properties if a replacer array is specified.
118 -
119 -#### Syntax
120 - JSON5.stringify(value[, replacer[, space]])
121 - JSON5.stringify(value[, options])
122 -
123 -#### Parameters
124 -- `value`: The value to convert to a JSON5 string.
125 -- `replacer`: A function that alters the behavior of the stringification
126 - process, or an array of String and Number objects that serve as a whitelist
127 - for selecting/filtering the properties of the value object to be included in
128 - the JSON5 string. If this value is null or not provided, all properties of the
129 - object are included in the resulting JSON5 string.
130 -- `space`: A String or Number object that's used to insert white space into the
131 - output JSON5 string for readability purposes. If this is a Number, it
132 - indicates the number of space characters to use as white space; this number is
133 - capped at 10 (if it is greater, the value is just 10). Values less than 1
134 - indicate that no space should be used. If this is a String, the string (or the
135 - first 10 characters of the string, if it's longer than that) is used as white
136 - space. If this parameter is not provided (or is null), no white space is used.
137 - If white space is used, trailing commas will be used in objects and arrays.
138 -- `options`: An object with the following properties:
139 - - `replacer`: Same as the `replacer` parameter.
140 - - `space`: Same as the `space` parameter.
141 - - `quote`: A String representing the quote character to use when serializing
142 - strings.
143 -
144 -#### Return value
145 -A JSON5 string representing the value.
146 -
147 -### Node.js `require()` JSON5 files
148 -When using Node.js, you can `require()` JSON5 files by adding the following
149 -statement.
150 -
151 -```js
152 -require('json5/lib/register')
153 -```
154 -
155 -Then you can load a JSON5 file with a Node.js `require()` statement. For
156 -example:
157 -
158 -```js
159 -const config = require('./config.json5')
160 -```
161 -
162 -## CLI
163 -Since JSON is more widely used than JSON5, this package includes a CLI for
164 -converting JSON5 to JSON and for validating the syntax of JSON5 documents.
165 -
166 -### Installation
167 -```sh
168 -npm install --global json5
169 -```
170 -
171 -### Usage
172 -```sh
173 -json5 [options] <file>
174 -```
175 -
176 -If `<file>` is not provided, then STDIN is used.
177 -
178 -#### Options:
179 -- `-s`, `--space`: The number of spaces to indent or `t` for tabs
180 -- `-o`, `--out-file [file]`: Output to the specified file, otherwise STDOUT
181 -- `-v`, `--validate`: Validate JSON5 but do not output JSON
182 -- `-V`, `--version`: Output the version number
183 -- `-h`, `--help`: Output usage information
184 -
185 -## Contibuting
186 -### Development
187 -```sh
188 -git clone https://github.com/json5/json5
189 -cd json5
190 -npm install
191 -```
192 -
193 -When contributing code, please write relevant tests and run `npm test` and `npm
194 -run lint` before submitting pull requests. Please use an editor that supports
195 -[EditorConfig](http://editorconfig.org/).
196 -
197 -### Issues
198 -To report bugs or request features regarding the JSON5 data format, please
199 -submit an issue to the [official specification
200 -repository](https://github.com/json5/json5-spec).
201 -
202 -To report bugs or request features regarding the JavaScript implentation of
203 -JSON5, please submit an issue to this repository.
204 -
205 -## License
206 -MIT. See [LICENSE.md](./LICENSE.md) for details.
207 -
208 -## Credits
209 -[Assem Kishore](https://github.com/aseemk) founded this project.
210 -
211 -[Michael Bolin](http://bolinfest.com/) independently arrived at and published
212 -some of these same ideas with awesome explanations and detail. Recommended
213 -reading: [Suggested Improvements to JSON](http://bolinfest.com/essays/json.html)
214 -
215 -[Douglas Crockford](http://www.crockford.com/) of course designed and built
216 -JSON, but his state machine diagrams on the [JSON website](http://json.org/), as
217 -cheesy as it may sound, gave us motivation and confidence that building a new
218 -parser to implement these ideas was within reach! The original
219 -implementation of JSON5 was also modeled directly off of Doug’s open-source
220 -[json_parse.js] parser. We’re grateful for that clean and well-documented
221 -code.
222 -
223 -[json_parse.js]:
224 -https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js
225 -
226 -[Max Nanasy](https://github.com/MaxNanasy) has been an early and prolific
227 -supporter, contributing multiple patches and ideas.
228 -
229 -[Andrew Eisenberg](https://github.com/aeisenberg) contributed the original
230 -`stringify` method.
231 -
232 -[Jordan Tucker](https://github.com/jordanbtucker) has aligned JSON5 more closely
233 -with ES5, wrote the official JSON5 specification, completely rewrote the
234 -codebase from the ground up, and is actively maintaining this project.
1 -#!/usr/bin/env node
2 -'use strict';var _fs=require('fs');var _fs2=_interopRequireDefault(_fs);var _path=require('path');var _path2=_interopRequireDefault(_path);var _minimist=require('minimist');var _minimist2=_interopRequireDefault(_minimist);var _package=require('../package.json');var _package2=_interopRequireDefault(_package);var _=require('./');var _2=_interopRequireDefault(_);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var argv=(0,_minimist2.default)(process.argv.slice(2),{alias:{'convert':'c','space':'s','validate':'v','out-file':'o','version':'V','help':'h'},boolean:['convert','validate','version','help'],string:['space','out-file']});if(argv.version){version()}else if(argv.help){usage()}else{var inFilename=argv._[0];var readStream=void 0;if(inFilename){readStream=_fs2.default.createReadStream(inFilename)}else{readStream=process.stdin}var json5='';readStream.on('data',function(data){json5+=data});readStream.on('end',function(){var space=void 0;if(argv.space==='t'||argv.space==='tab'){space='\t'}else{space=Number(argv.space)}var value=void 0;try{value=_2.default.parse(json5);if(!argv.validate){var json=JSON.stringify(value,null,space);var writeStream=void 0;if(argv.convert&&inFilename&&!argv.o){var parsedFilename=_path2.default.parse(inFilename);var outFilename=_path2.default.format(Object.assign(parsedFilename,{base:_path2.default.basename(parsedFilename.base,parsedFilename.ext)+'.json'}));writeStream=_fs2.default.createWriteStream(outFilename)}else if(argv.o){writeStream=_fs2.default.createWriteStream(argv.o)}else{writeStream=process.stdout}writeStream.write(json)}}catch(err){console.error(err.message);process.exit(1)}})}function version(){console.log(_package2.default.version)}function usage(){console.log('\n Usage: json5 [options] <file>\n\n If <file> is not provided, then STDIN is used.\n\n Options:\n\n -s, --space The number of spaces to indent or \'t\' for tabs\n -o, --out-file [file] Output to the specified file, otherwise STDOUT\n -v, --validate Validate JSON5 but do not output JSON\n -V, --version Output the version number\n -h, --help Output usage information')}
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _parse=require('./parse');var _parse2=_interopRequireDefault(_parse);var _stringify=require('./stringify');var _stringify2=_interopRequireDefault(_stringify);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default={parse:_parse2.default,stringify:_stringify2.default};module.exports=exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';var _fs=require('fs');var _fs2=_interopRequireDefault(_fs);var _=require('./');var _2=_interopRequireDefault(_);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}require.extensions['.json5']=function(module,filename){var content=_fs2.default.readFileSync(filename,'utf8');try{module.exports=_2.default.parse(content)}catch(err){err.message=filename+': '+err.message;throw err}};
...\ No newline at end of file ...\ No newline at end of file
1 -"use strict";require("./register");console.warn("'json5/require' is deprecated. Please use 'json5/register' instead.");
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _typeof=typeof Symbol==='function'&&typeof Symbol.iterator==='symbol'?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==='function'&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};exports.default=stringify;var _util=require('./util');var util=_interopRequireWildcard(_util);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function stringify(value,replacer,space){var stack=[];var indent='';var propertyList=void 0;var replacerFunc=void 0;var gap='';var quote=void 0;if(replacer!=null&&(typeof replacer==='undefined'?'undefined':_typeof(replacer))==='object'&&!Array.isArray(replacer)){space=replacer.space;quote=replacer.quote;replacer=replacer.replacer}if(typeof replacer==='function'){replacerFunc=replacer}else if(Array.isArray(replacer)){propertyList=[];var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=replacer[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var v=_step.value;var item=void 0;if(typeof v==='string'){item=v}else if(typeof v==='number'||v instanceof String||v instanceof Number){item=String(v)}if(item!==undefined&&propertyList.indexOf(item)<0){propertyList.push(item)}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}if(space instanceof Number){space=Number(space)}else if(space instanceof String){space=String(space)}if(typeof space==='number'){if(space>0){space=Math.min(10,Math.floor(space));gap=' '.substr(0,space)}}else if(typeof space==='string'){gap=space.substr(0,10)}return serializeProperty('',{'':value});function serializeProperty(key,holder){var value=holder[key];if(value!=null){if(typeof value.toJSON5==='function'){value=value.toJSON5(key)}else if(typeof value.toJSON==='function'){value=value.toJSON(key)}}if(replacerFunc){value=replacerFunc.call(holder,key,value)}if(value instanceof Number){value=Number(value)}else if(value instanceof String){value=String(value)}else if(value instanceof Boolean){value=value.valueOf()}switch(value){case null:return'null';case true:return'true';case false:return'false';}if(typeof value==='string'){return quoteString(value,false)}if(typeof value==='number'){return String(value)}if((typeof value==='undefined'?'undefined':_typeof(value))==='object'){return Array.isArray(value)?serializeArray(value):serializeObject(value)}return undefined}function quoteString(value){var quotes={'\'':0.1,'"':0.2};var replacements={'\'':'\\\'','"':'\\"','\\':'\\\\','\b':'\\b','\f':'\\f','\n':'\\n','\r':'\\r','\t':'\\t','\x0B':'\\v','\0':'\\0','\u2028':'\\u2028','\u2029':'\\u2029'};var product='';var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=value[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var c=_step2.value;switch(c){case'\'':case'"':quotes[c]++;product+=c;continue;}if(replacements[c]){product+=replacements[c];continue}if(c<' '){var hexString=c.charCodeAt(0).toString(16);product+='\\x'+('00'+hexString).substring(hexString.length);continue}product+=c}}catch(err){_didIteratorError2=true;_iteratorError2=err}finally{try{if(!_iteratorNormalCompletion2&&_iterator2.return){_iterator2.return()}}finally{if(_didIteratorError2){throw _iteratorError2}}}var quoteChar=quote||Object.keys(quotes).reduce(function(a,b){return quotes[a]<quotes[b]?a:b});product=product.replace(new RegExp(quoteChar,'g'),replacements[quoteChar]);return quoteChar+product+quoteChar}function serializeObject(value){if(stack.indexOf(value)>=0){throw TypeError('Converting circular structure to JSON5')}stack.push(value);var stepback=indent;indent=indent+gap;var keys=propertyList||Object.keys(value);var partial=[];var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=keys[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var key=_step3.value;var propertyString=serializeProperty(key,value);if(propertyString!==undefined){var member=serializeKey(key)+':';if(gap!==''){member+=' '}member+=propertyString;partial.push(member)}}}catch(err){_didIteratorError3=true;_iteratorError3=err}finally{try{if(!_iteratorNormalCompletion3&&_iterator3.return){_iterator3.return()}}finally{if(_didIteratorError3){throw _iteratorError3}}}var final=void 0;if(partial.length===0){final='{}'}else{var properties=void 0;if(gap===''){properties=partial.join(',');final='{'+properties+'}'}else{var separator=',\n'+indent;properties=partial.join(separator);final='{\n'+indent+properties+',\n'+stepback+'}'}}stack.pop();indent=stepback;return final}function serializeKey(key){if(key.length===0){return quoteString(key,true)}var firstChar=String.fromCodePoint(key.codePointAt(0));if(!util.isIdStartChar(firstChar)){return quoteString(key,true)}for(var i=firstChar.length;i<key.length;i++){if(!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))){return quoteString(key,true)}}return key}function serializeArray(value){if(stack.indexOf(value)>=0){throw TypeError('Converting circular structure to JSON5')}stack.push(value);var stepback=indent;indent=indent+gap;var partial=[];for(var i=0;i<value.length;i++){var propertyString=serializeProperty(String(i),value);partial.push(propertyString!==undefined?propertyString:'null')}var final=void 0;if(partial.length===0){final='[]'}else{if(gap===''){var properties=partial.join(',');final='['+properties+']'}else{var separator=',\n'+indent;var _properties=partial.join(separator);final='[\n'+indent+_properties+',\n'+stepback+']'}}stack.pop();indent=stepback;return final}}module.exports=exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';Object.defineProperty(exports,'__esModule',{value:true});exports.isSpaceSeparator=isSpaceSeparator;exports.isIdStartChar=isIdStartChar;exports.isIdContinueChar=isIdContinueChar;exports.isDigit=isDigit;exports.isHexDigit=isHexDigit;var _unicode=require('../lib/unicode');var unicode=_interopRequireWildcard(_unicode);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function isSpaceSeparator(c){return unicode.Space_Separator.test(c)}function isIdStartChar(c){return c>='a'&&c<='z'||c>='A'&&c<='Z'||c==='$'||c==='_'||unicode.ID_Start.test(c)}function isIdContinueChar(c){return c>='a'&&c<='z'||c>='A'&&c<='Z'||c>='0'&&c<='9'||c==='$'||c==='_'||c==='\u200C'||c==='\u200D'||unicode.ID_Continue.test(c)}function isDigit(c){return /[0-9]/.test(c)}function isHexDigit(c){return /[0-9A-Fa-f]/.test(c)}
...\ No newline at end of file ...\ No newline at end of file
1 -{
2 - "_from": "json5@^1.0.1",
3 - "_id": "json5@1.0.1",
4 - "_inBundle": false,
5 - "_integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
6 - "_location": "/sass-loader/json5",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "json5@^1.0.1",
12 - "name": "json5",
13 - "escapedName": "json5",
14 - "rawSpec": "^1.0.1",
15 - "saveSpec": null,
16 - "fetchSpec": "^1.0.1"
17 - },
18 - "_requiredBy": [
19 - "/sass-loader/loader-utils"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
22 - "_shasum": "779fb0018604fa854eacbf6252180d83543e3dbe",
23 - "_spec": "json5@^1.0.1",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\sass-loader\\node_modules\\loader-utils",
25 - "author": {
26 - "name": "Aseem Kishore",
27 - "email": "aseem.kishore@gmail.com"
28 - },
29 - "bin": {
30 - "json5": "lib/cli.js"
31 - },
32 - "browser": "dist/index.js",
33 - "bugs": {
34 - "url": "https://github.com/json5/json5/issues"
35 - },
36 - "bundleDependencies": false,
37 - "contributors": [
38 - {
39 - "name": "Max Nanasy",
40 - "email": "max.nanasy@gmail.com"
41 - },
42 - {
43 - "name": "Andrew Eisenberg",
44 - "email": "andrew@eisenberg.as"
45 - },
46 - {
47 - "name": "Jordan Tucker",
48 - "email": "jordanbtucker@gmail.com"
49 - }
50 - ],
51 - "dependencies": {
52 - "minimist": "^1.2.0"
53 - },
54 - "deprecated": false,
55 - "description": "JSON for humans.",
56 - "devDependencies": {
57 - "babel-cli": "^6.26.0",
58 - "babel-core": "^6.26.0",
59 - "babel-plugin-add-module-exports": "^0.2.1",
60 - "babel-plugin-external-helpers": "^6.22.0",
61 - "babel-plugin-istanbul": "^4.1.5",
62 - "babel-preset-env": "^1.6.1",
63 - "babel-register": "^6.26.0",
64 - "babelrc-rollup": "^3.0.0",
65 - "coveralls": "^3.0.0",
66 - "cross-env": "^5.1.4",
67 - "del": "^3.0.0",
68 - "eslint": "^4.18.2",
69 - "eslint-config-standard": "^11.0.0",
70 - "eslint-plugin-import": "^2.9.0",
71 - "eslint-plugin-node": "^6.0.1",
72 - "eslint-plugin-promise": "^3.7.0",
73 - "eslint-plugin-standard": "^3.0.1",
74 - "mocha": "^5.0.4",
75 - "nyc": "^11.4.1",
76 - "regenerate": "^1.3.3",
77 - "rollup": "^0.56.5",
78 - "rollup-plugin-babel": "^3.0.3",
79 - "rollup-plugin-commonjs": "^9.0.0",
80 - "rollup-plugin-node-resolve": "^3.2.0",
81 - "rollup-plugin-uglify": "^3.0.0",
82 - "sinon": "^4.4.2",
83 - "unicode-9.0.0": "^0.7.5"
84 - },
85 - "files": [
86 - "lib/",
87 - "dist/"
88 - ],
89 - "homepage": "http://json5.org/",
90 - "keywords": [
91 - "json",
92 - "json5",
93 - "es5",
94 - "es2015",
95 - "ecmascript"
96 - ],
97 - "license": "MIT",
98 - "main": "lib/index.js",
99 - "name": "json5",
100 - "repository": {
101 - "type": "git",
102 - "url": "git+https://github.com/json5/json5.git"
103 - },
104 - "scripts": {
105 - "build": "babel-node build/build.js && babel src -d lib && rollup -c",
106 - "coverage": "nyc report --reporter=text-lcov | coveralls",
107 - "lint": "eslint --fix build src",
108 - "prepublishOnly": "npm run lint && npm test && npm run production",
109 - "pretest": "cross-env NODE_ENV=test npm run build",
110 - "preversion": "npm run lint && npm test && npm run production",
111 - "production": "cross-env NODE_ENV=production npm run build",
112 - "test": "nyc --reporter=html --reporter=text mocha"
113 - },
114 - "version": "1.0.1"
115 -}
1 -# Change Log
2 -
3 -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4 -
5 -<a name="1.4.0"></a>
6 -# [1.4.0](https://github.com/webpack/loader-utils/compare/v1.3.0...v1.4.0) (2020-02-19)
7 -
8 -
9 -### Features
10 -
11 -* the `resourceQuery` is passed to the `interpolateName` method ([#163](https://github.com/webpack/loader-utils/issues/163)) ([cd0e428](https://github.com/webpack/loader-utils/commit/cd0e428))
12 -
13 -
14 -
15 -<a name="1.3.0"></a>
16 -# [1.3.0](https://github.com/webpack/loader-utils/compare/v1.2.3...v1.3.0) (2020-02-19)
17 -
18 -
19 -### Features
20 -
21 -* support the `[query]` template for the `interpolatedName` method ([#162](https://github.com/webpack/loader-utils/issues/162)) ([469eeba](https://github.com/webpack/loader-utils/commit/469eeba))
22 -
23 -
24 -
25 -<a name="1.2.3"></a>
26 -## [1.2.3](https://github.com/webpack/loader-utils/compare/v1.2.2...v1.2.3) (2018-12-27)
27 -
28 -
29 -### Bug Fixes
30 -
31 -* **interpolateName:** don't interpolated `hashType` without `hash` or `contenthash` ([#140](https://github.com/webpack/loader-utils/issues/140)) ([3528fd9](https://github.com/webpack/loader-utils/commit/3528fd9))
32 -
33 -
34 -
35 -<a name="1.2.2"></a>
36 -## [1.2.2](https://github.com/webpack/loader-utils/compare/v1.2.1...v1.2.2) (2018-12-27)
37 -
38 -
39 -### Bug Fixes
40 -
41 -* fixed a hash type extracting in interpolateName ([#137](https://github.com/webpack/loader-utils/issues/137)) ([f8a71f4](https://github.com/webpack/loader-utils/commit/f8a71f4))
42 -
43 -
44 -
45 -<a name="1.2.1"></a>
46 -## [1.2.1](https://github.com/webpack/loader-utils/compare/v1.2.0...v1.2.1) (2018-12-25)
47 -
48 -
49 -### Bug Fixes
50 -
51 -* **isUrlRequest:** better handle absolute urls and non standards ([#134](https://github.com/webpack/loader-utils/issues/134)) ([aca43da](https://github.com/webpack/loader-utils/commit/aca43da))
52 -
53 -
54 -### Reverts
55 -
56 -* PR [#79](https://github.com/webpack/loader-utils/issues/79) ([#135](https://github.com/webpack/loader-utils/issues/135)) ([73d350a](https://github.com/webpack/loader-utils/commit/73d350a))
57 -
58 -
59 -
60 -<a name="1.2.0"></a>
61 -# [1.2.0](https://github.com/webpack/loader-utils/compare/v1.1.0...v1.2.0) (2018-12-24)
62 -
63 -
64 -### Features
65 -
66 -* **interpolateName:** support `[contenthash]`
67 -
68 -### Fixes
69 -
70 -* **urlToRequest:** empty urls are not rewritten to relative requests
71 -* **urlToRequest:** don't rewrite absolute urls
72 -* **isUrlRequest:** ignore all url with `extension` (like `moz-extension:`, `ms-browser-extension:` and etc)
73 -* **isUrlRequest:** ignore `about:blank`
74 -* **interpolateName:** failing explicitly when ran out of emoji
75 -* **interpolateName:** `[hash]` token regex in interpolate string to capture any hash algorithm name
76 -* **interpolateName:** parse string for emoji count before use
77 -
78 -
79 -
80 -<a name="1.1.0"></a>
81 -# [1.1.0](https://github.com/webpack/loader-utils/compare/v1.0.4...v1.1.0) (2017-03-16)
82 -
83 -
84 -### Features
85 -
86 -* **automatic-release:** Generation of automatic release ([7484d13](https://github.com/webpack/loader-utils/commit/7484d13))
87 -* **parseQuery:** export parseQuery ([ddf64e4](https://github.com/webpack/loader-utils/commit/ddf64e4))
1 -Copyright JS Foundation and other contributors
2 -
3 -Permission is hereby granted, free of charge, to any person obtaining
4 -a copy of this software and associated documentation files (the
5 -'Software'), to deal in the Software without restriction, including
6 -without limitation the rights to use, copy, modify, merge, publish,
7 -distribute, sublicense, and/or sell copies of the Software, and to
8 -permit persons to whom the Software is furnished to do so, subject to
9 -the following conditions:
10 -
11 -The above copyright notice and this permission notice shall be
12 -included in all copies or substantial portions of the Software.
13 -
14 -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15 -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 -'use strict';
2 -
3 -function getCurrentRequest(loaderContext) {
4 - if (loaderContext.currentRequest) {
5 - return loaderContext.currentRequest;
6 - }
7 -
8 - const request = loaderContext.loaders
9 - .slice(loaderContext.loaderIndex)
10 - .map((obj) => obj.request)
11 - .concat([loaderContext.resource]);
12 -
13 - return request.join('!');
14 -}
15 -
16 -module.exports = getCurrentRequest;
1 -'use strict';
2 -
3 -const baseEncodeTables = {
4 - 26: 'abcdefghijklmnopqrstuvwxyz',
5 - 32: '123456789abcdefghjkmnpqrstuvwxyz', // no 0lio
6 - 36: '0123456789abcdefghijklmnopqrstuvwxyz',
7 - 49: 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ', // no lIO
8 - 52: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
9 - 58: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ', // no 0lIO
10 - 62: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
11 - 64: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_',
12 -};
13 -
14 -function encodeBufferToBase(buffer, base) {
15 - const encodeTable = baseEncodeTables[base];
16 - if (!encodeTable) {
17 - throw new Error('Unknown encoding base' + base);
18 - }
19 -
20 - const readLength = buffer.length;
21 - const Big = require('big.js');
22 -
23 - Big.RM = Big.DP = 0;
24 - let b = new Big(0);
25 -
26 - for (let i = readLength - 1; i >= 0; i--) {
27 - b = b.times(256).plus(buffer[i]);
28 - }
29 -
30 - let output = '';
31 - while (b.gt(0)) {
32 - output = encodeTable[b.mod(base)] + output;
33 - b = b.div(base);
34 - }
35 -
36 - Big.DP = 20;
37 - Big.RM = 1;
38 -
39 - return output;
40 -}
41 -
42 -function getHashDigest(buffer, hashType, digestType, maxLength) {
43 - hashType = hashType || 'md5';
44 - maxLength = maxLength || 9999;
45 -
46 - const hash = require('crypto').createHash(hashType);
47 -
48 - hash.update(buffer);
49 -
50 - if (
51 - digestType === 'base26' ||
52 - digestType === 'base32' ||
53 - digestType === 'base36' ||
54 - digestType === 'base49' ||
55 - digestType === 'base52' ||
56 - digestType === 'base58' ||
57 - digestType === 'base62' ||
58 - digestType === 'base64'
59 - ) {
60 - return encodeBufferToBase(hash.digest(), digestType.substr(4)).substr(
61 - 0,
62 - maxLength
63 - );
64 - } else {
65 - return hash.digest(digestType || 'hex').substr(0, maxLength);
66 - }
67 -}
68 -
69 -module.exports = getHashDigest;
1 -'use strict';
2 -
3 -const parseQuery = require('./parseQuery');
4 -
5 -function getOptions(loaderContext) {
6 - const query = loaderContext.query;
7 -
8 - if (typeof query === 'string' && query !== '') {
9 - return parseQuery(loaderContext.query);
10 - }
11 -
12 - if (!query || typeof query !== 'object') {
13 - // Not object-like queries are not supported.
14 - return null;
15 - }
16 -
17 - return query;
18 -}
19 -
20 -module.exports = getOptions;
1 -'use strict';
2 -
3 -function getRemainingRequest(loaderContext) {
4 - if (loaderContext.remainingRequest) {
5 - return loaderContext.remainingRequest;
6 - }
7 -
8 - const request = loaderContext.loaders
9 - .slice(loaderContext.loaderIndex + 1)
10 - .map((obj) => obj.request)
11 - .concat([loaderContext.resource]);
12 -
13 - return request.join('!');
14 -}
15 -
16 -module.exports = getRemainingRequest;
1 -'use strict';
2 -
3 -const getOptions = require('./getOptions');
4 -const parseQuery = require('./parseQuery');
5 -const stringifyRequest = require('./stringifyRequest');
6 -const getRemainingRequest = require('./getRemainingRequest');
7 -const getCurrentRequest = require('./getCurrentRequest');
8 -const isUrlRequest = require('./isUrlRequest');
9 -const urlToRequest = require('./urlToRequest');
10 -const parseString = require('./parseString');
11 -const getHashDigest = require('./getHashDigest');
12 -const interpolateName = require('./interpolateName');
13 -
14 -exports.getOptions = getOptions;
15 -exports.parseQuery = parseQuery;
16 -exports.stringifyRequest = stringifyRequest;
17 -exports.getRemainingRequest = getRemainingRequest;
18 -exports.getCurrentRequest = getCurrentRequest;
19 -exports.isUrlRequest = isUrlRequest;
20 -exports.urlToRequest = urlToRequest;
21 -exports.parseString = parseString;
22 -exports.getHashDigest = getHashDigest;
23 -exports.interpolateName = interpolateName;
1 -'use strict';
2 -
3 -const path = require('path');
4 -const emojisList = require('emojis-list');
5 -const getHashDigest = require('./getHashDigest');
6 -
7 -const emojiRegex = /[\uD800-\uDFFF]./;
8 -const emojiList = emojisList.filter((emoji) => emojiRegex.test(emoji));
9 -const emojiCache = {};
10 -
11 -function encodeStringToEmoji(content, length) {
12 - if (emojiCache[content]) {
13 - return emojiCache[content];
14 - }
15 -
16 - length = length || 1;
17 -
18 - const emojis = [];
19 -
20 - do {
21 - if (!emojiList.length) {
22 - throw new Error('Ran out of emoji');
23 - }
24 -
25 - const index = Math.floor(Math.random() * emojiList.length);
26 -
27 - emojis.push(emojiList[index]);
28 - emojiList.splice(index, 1);
29 - } while (--length > 0);
30 -
31 - const emojiEncoding = emojis.join('');
32 -
33 - emojiCache[content] = emojiEncoding;
34 -
35 - return emojiEncoding;
36 -}
37 -
38 -function interpolateName(loaderContext, name, options) {
39 - let filename;
40 -
41 - const hasQuery =
42 - loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1;
43 -
44 - if (typeof name === 'function') {
45 - filename = name(
46 - loaderContext.resourcePath,
47 - hasQuery ? loaderContext.resourceQuery : undefined
48 - );
49 - } else {
50 - filename = name || '[hash].[ext]';
51 - }
52 -
53 - const context = options.context;
54 - const content = options.content;
55 - const regExp = options.regExp;
56 -
57 - let ext = 'bin';
58 - let basename = 'file';
59 - let directory = '';
60 - let folder = '';
61 - let query = '';
62 -
63 - if (loaderContext.resourcePath) {
64 - const parsed = path.parse(loaderContext.resourcePath);
65 - let resourcePath = loaderContext.resourcePath;
66 -
67 - if (parsed.ext) {
68 - ext = parsed.ext.substr(1);
69 - }
70 -
71 - if (parsed.dir) {
72 - basename = parsed.name;
73 - resourcePath = parsed.dir + path.sep;
74 - }
75 -
76 - if (typeof context !== 'undefined') {
77 - directory = path
78 - .relative(context, resourcePath + '_')
79 - .replace(/\\/g, '/')
80 - .replace(/\.\.(\/)?/g, '_$1');
81 - directory = directory.substr(0, directory.length - 1);
82 - } else {
83 - directory = resourcePath.replace(/\\/g, '/').replace(/\.\.(\/)?/g, '_$1');
84 - }
85 -
86 - if (directory.length === 1) {
87 - directory = '';
88 - } else if (directory.length > 1) {
89 - folder = path.basename(directory);
90 - }
91 - }
92 -
93 - if (loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1) {
94 - query = loaderContext.resourceQuery;
95 -
96 - const hashIdx = query.indexOf('#');
97 -
98 - if (hashIdx >= 0) {
99 - query = query.substr(0, hashIdx);
100 - }
101 - }
102 -
103 - let url = filename;
104 -
105 - if (content) {
106 - // Match hash template
107 - url = url
108 - // `hash` and `contenthash` are same in `loader-utils` context
109 - // let's keep `hash` for backward compatibility
110 - .replace(
111 - /\[(?:([^:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi,
112 - (all, hashType, digestType, maxLength) =>
113 - getHashDigest(content, hashType, digestType, parseInt(maxLength, 10))
114 - )
115 - .replace(/\[emoji(?::(\d+))?\]/gi, (all, length) =>
116 - encodeStringToEmoji(content, parseInt(length, 10))
117 - );
118 - }
119 -
120 - url = url
121 - .replace(/\[ext\]/gi, () => ext)
122 - .replace(/\[name\]/gi, () => basename)
123 - .replace(/\[path\]/gi, () => directory)
124 - .replace(/\[folder\]/gi, () => folder)
125 - .replace(/\[query\]/gi, () => query);
126 -
127 - if (regExp && loaderContext.resourcePath) {
128 - const match = loaderContext.resourcePath.match(new RegExp(regExp));
129 -
130 - match &&
131 - match.forEach((matched, i) => {
132 - url = url.replace(new RegExp('\\[' + i + '\\]', 'ig'), matched);
133 - });
134 - }
135 -
136 - if (
137 - typeof loaderContext.options === 'object' &&
138 - typeof loaderContext.options.customInterpolateName === 'function'
139 - ) {
140 - url = loaderContext.options.customInterpolateName.call(
141 - loaderContext,
142 - url,
143 - name,
144 - options
145 - );
146 - }
147 -
148 - return url;
149 -}
150 -
151 -module.exports = interpolateName;
1 -'use strict';
2 -
3 -const path = require('path');
4 -
5 -function isUrlRequest(url, root) {
6 - // An URL is not an request if
7 -
8 - // 1. It's an absolute url and it is not `windows` path like `C:\dir\file`
9 - if (/^[a-z][a-z0-9+.-]*:/i.test(url) && !path.win32.isAbsolute(url)) {
10 - return false;
11 - }
12 -
13 - // 2. It's a protocol-relative
14 - if (/^\/\//.test(url)) {
15 - return false;
16 - }
17 -
18 - // 3. It's some kind of url for a template
19 - if (/^[{}[\]#*;,'§$%&(=?`´^°<>]/.test(url)) {
20 - return false;
21 - }
22 -
23 - // 4. It's also not an request if root isn't set and it's a root-relative url
24 - if ((root === undefined || root === false) && /^\//.test(url)) {
25 - return false;
26 - }
27 -
28 - return true;
29 -}
30 -
31 -module.exports = isUrlRequest;
1 -'use strict';
2 -
3 -const JSON5 = require('json5');
4 -
5 -const specialValues = {
6 - null: null,
7 - true: true,
8 - false: false,
9 -};
10 -
11 -function parseQuery(query) {
12 - if (query.substr(0, 1) !== '?') {
13 - throw new Error(
14 - "A valid query string passed to parseQuery should begin with '?'"
15 - );
16 - }
17 -
18 - query = query.substr(1);
19 -
20 - if (!query) {
21 - return {};
22 - }
23 -
24 - if (query.substr(0, 1) === '{' && query.substr(-1) === '}') {
25 - return JSON5.parse(query);
26 - }
27 -
28 - const queryArgs = query.split(/[,&]/g);
29 - const result = {};
30 -
31 - queryArgs.forEach((arg) => {
32 - const idx = arg.indexOf('=');
33 -
34 - if (idx >= 0) {
35 - let name = arg.substr(0, idx);
36 - let value = decodeURIComponent(arg.substr(idx + 1));
37 -
38 - if (specialValues.hasOwnProperty(value)) {
39 - value = specialValues[value];
40 - }
41 -
42 - if (name.substr(-2) === '[]') {
43 - name = decodeURIComponent(name.substr(0, name.length - 2));
44 -
45 - if (!Array.isArray(result[name])) {
46 - result[name] = [];
47 - }
48 -
49 - result[name].push(value);
50 - } else {
51 - name = decodeURIComponent(name);
52 - result[name] = value;
53 - }
54 - } else {
55 - if (arg.substr(0, 1) === '-') {
56 - result[decodeURIComponent(arg.substr(1))] = false;
57 - } else if (arg.substr(0, 1) === '+') {
58 - result[decodeURIComponent(arg.substr(1))] = true;
59 - } else {
60 - result[decodeURIComponent(arg)] = true;
61 - }
62 - }
63 - });
64 -
65 - return result;
66 -}
67 -
68 -module.exports = parseQuery;
1 -'use strict';
2 -
3 -function parseString(str) {
4 - try {
5 - if (str[0] === '"') {
6 - return JSON.parse(str);
7 - }
8 -
9 - if (str[0] === "'" && str.substr(str.length - 1) === "'") {
10 - return parseString(
11 - str
12 - .replace(/\\.|"/g, (x) => (x === '"' ? '\\"' : x))
13 - .replace(/^'|'$/g, '"')
14 - );
15 - }
16 -
17 - return JSON.parse('"' + str + '"');
18 - } catch (e) {
19 - return str;
20 - }
21 -}
22 -
23 -module.exports = parseString;
1 -'use strict';
2 -
3 -const path = require('path');
4 -
5 -const matchRelativePath = /^\.\.?[/\\]/;
6 -
7 -function isAbsolutePath(str) {
8 - return path.posix.isAbsolute(str) || path.win32.isAbsolute(str);
9 -}
10 -
11 -function isRelativePath(str) {
12 - return matchRelativePath.test(str);
13 -}
14 -
15 -function stringifyRequest(loaderContext, request) {
16 - const splitted = request.split('!');
17 - const context =
18 - loaderContext.context ||
19 - (loaderContext.options && loaderContext.options.context);
20 -
21 - return JSON.stringify(
22 - splitted
23 - .map((part) => {
24 - // First, separate singlePath from query, because the query might contain paths again
25 - const splittedPart = part.match(/^(.*?)(\?.*)/);
26 - const query = splittedPart ? splittedPart[2] : '';
27 - let singlePath = splittedPart ? splittedPart[1] : part;
28 -
29 - if (isAbsolutePath(singlePath) && context) {
30 - singlePath = path.relative(context, singlePath);
31 -
32 - if (isAbsolutePath(singlePath)) {
33 - // If singlePath still matches an absolute path, singlePath was on a different drive than context.
34 - // In this case, we leave the path platform-specific without replacing any separators.
35 - // @see https://github.com/webpack/loader-utils/pull/14
36 - return singlePath + query;
37 - }
38 -
39 - if (isRelativePath(singlePath) === false) {
40 - // Ensure that the relative path starts at least with ./ otherwise it would be a request into the modules directory (like node_modules).
41 - singlePath = './' + singlePath;
42 - }
43 - }
44 -
45 - return singlePath.replace(/\\/g, '/') + query;
46 - })
47 - .join('!')
48 - );
49 -}
50 -
51 -module.exports = stringifyRequest;
1 -'use strict';
2 -
3 -// we can't use path.win32.isAbsolute because it also matches paths starting with a forward slash
4 -const matchNativeWin32Path = /^[A-Z]:[/\\]|^\\\\/i;
5 -
6 -function urlToRequest(url, root) {
7 - // Do not rewrite an empty url
8 - if (url === '') {
9 - return '';
10 - }
11 -
12 - const moduleRequestRegex = /^[^?]*~/;
13 - let request;
14 -
15 - if (matchNativeWin32Path.test(url)) {
16 - // absolute windows path, keep it
17 - request = url;
18 - } else if (root !== undefined && root !== false && /^\//.test(url)) {
19 - // if root is set and the url is root-relative
20 - switch (typeof root) {
21 - // 1. root is a string: root is prefixed to the url
22 - case 'string':
23 - // special case: `~` roots convert to module request
24 - if (moduleRequestRegex.test(root)) {
25 - request = root.replace(/([^~/])$/, '$1/') + url.slice(1);
26 - } else {
27 - request = root + url;
28 - }
29 - break;
30 - // 2. root is `true`: absolute paths are allowed
31 - // *nix only, windows-style absolute paths are always allowed as they doesn't start with a `/`
32 - case 'boolean':
33 - request = url;
34 - break;
35 - default:
36 - throw new Error(
37 - "Unexpected parameters to loader-utils 'urlToRequest': url = " +
38 - url +
39 - ', root = ' +
40 - root +
41 - '.'
42 - );
43 - }
44 - } else if (/^\.\.?\//.test(url)) {
45 - // A relative url stays
46 - request = url;
47 - } else {
48 - // every other url is threaded like a relative url
49 - request = './' + url;
50 - }
51 -
52 - // A `~` makes the url an module
53 - if (moduleRequestRegex.test(request)) {
54 - request = request.replace(moduleRequestRegex, '');
55 - }
56 -
57 - return request;
58 -}
59 -
60 -module.exports = urlToRequest;
1 -{
2 - "_from": "loader-utils@^1.2.3",
3 - "_id": "loader-utils@1.4.0",
4 - "_inBundle": false,
5 - "_integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==",
6 - "_location": "/sass-loader/loader-utils",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "loader-utils@^1.2.3",
12 - "name": "loader-utils",
13 - "escapedName": "loader-utils",
14 - "rawSpec": "^1.2.3",
15 - "saveSpec": null,
16 - "fetchSpec": "^1.2.3"
17 - },
18 - "_requiredBy": [
19 - "/sass-loader"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz",
22 - "_shasum": "c579b5e34cb34b1a74edc6c1fb36bfa371d5a613",
23 - "_spec": "loader-utils@^1.2.3",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\sass-loader",
25 - "author": {
26 - "name": "Tobias Koppers @sokra"
27 - },
28 - "bugs": {
29 - "url": "https://github.com/webpack/loader-utils/issues"
30 - },
31 - "bundleDependencies": false,
32 - "dependencies": {
33 - "big.js": "^5.2.2",
34 - "emojis-list": "^3.0.0",
35 - "json5": "^1.0.1"
36 - },
37 - "deprecated": false,
38 - "description": "utils for webpack loaders",
39 - "devDependencies": {
40 - "coveralls": "^3.0.2",
41 - "eslint": "^5.11.0",
42 - "eslint-plugin-node": "^8.0.0",
43 - "eslint-plugin-prettier": "^3.0.0",
44 - "jest": "^21.2.1",
45 - "prettier": "^1.19.1",
46 - "standard-version": "^4.0.0"
47 - },
48 - "engines": {
49 - "node": ">=4.0.0"
50 - },
51 - "files": [
52 - "lib"
53 - ],
54 - "homepage": "https://github.com/webpack/loader-utils#readme",
55 - "license": "MIT",
56 - "main": "lib/index.js",
57 - "name": "loader-utils",
58 - "repository": {
59 - "type": "git",
60 - "url": "git+https://github.com/webpack/loader-utils.git"
61 - },
62 - "scripts": {
63 - "lint": "eslint lib test",
64 - "pretest": "yarn lint",
65 - "release": "yarn test && standard-version",
66 - "test": "jest",
67 - "test:ci": "jest --coverage"
68 - },
69 - "version": "1.4.0"
70 -}
1 -# changes log
2 -
3 -## 6.2.0
4 -
5 -* Coerce numbers to strings when passed to semver.coerce()
6 -* Add `rtl` option to coerce from right to left
7 -
8 -## 6.1.3
9 -
10 -* Handle X-ranges properly in includePrerelease mode
11 -
12 -## 6.1.2
13 -
14 -* Do not throw when testing invalid version strings
15 -
16 -## 6.1.1
17 -
18 -* Add options support for semver.coerce()
19 -* Handle undefined version passed to Range.test
20 -
21 -## 6.1.0
22 -
23 -* Add semver.compareBuild function
24 -* Support `*` in semver.intersects
25 -
26 -## 6.0
27 -
28 -* Fix `intersects` logic.
29 -
30 - This is technically a bug fix, but since it is also a change to behavior
31 - that may require users updating their code, it is marked as a major
32 - version increment.
33 -
34 -## 5.7
35 -
36 -* Add `minVersion` method
37 -
38 -## 5.6
39 -
40 -* Move boolean `loose` param to an options object, with
41 - backwards-compatibility protection.
42 -* Add ability to opt out of special prerelease version handling with
43 - the `includePrerelease` option flag.
44 -
45 -## 5.5
46 -
47 -* Add version coercion capabilities
48 -
49 -## 5.4
50 -
51 -* Add intersection checking
52 -
53 -## 5.3
54 -
55 -* Add `minSatisfying` method
56 -
57 -## 5.2
58 -
59 -* Add `prerelease(v)` that returns prerelease components
60 -
61 -## 5.1
62 -
63 -* Add Backus-Naur for ranges
64 -* Remove excessively cute inspection methods
65 -
66 -## 5.0
67 -
68 -* Remove AMD/Browserified build artifacts
69 -* Fix ltr and gtr when using the `*` range
70 -* Fix for range `*` with a prerelease identifier
1 -The ISC License
2 -
3 -Copyright (c) Isaac Z. Schlueter and Contributors
4 -
5 -Permission to use, copy, modify, and/or distribute this software for any
6 -purpose with or without fee is hereby granted, provided that the above
7 -copyright notice and this permission notice appear in all copies.
8 -
9 -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15 -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1 -#!/usr/bin/env node
2 -// Standalone semver comparison program.
3 -// Exits successfully and prints matching version(s) if
4 -// any supplied version is valid and passes all tests.
5 -
6 -var argv = process.argv.slice(2)
7 -
8 -var versions = []
9 -
10 -var range = []
11 -
12 -var inc = null
13 -
14 -var version = require('../package.json').version
15 -
16 -var loose = false
17 -
18 -var includePrerelease = false
19 -
20 -var coerce = false
21 -
22 -var rtl = false
23 -
24 -var identifier
25 -
26 -var semver = require('../semver')
27 -
28 -var reverse = false
29 -
30 -var options = {}
31 -
32 -main()
33 -
34 -function main () {
35 - if (!argv.length) return help()
36 - while (argv.length) {
37 - var a = argv.shift()
38 - var indexOfEqualSign = a.indexOf('=')
39 - if (indexOfEqualSign !== -1) {
40 - a = a.slice(0, indexOfEqualSign)
41 - argv.unshift(a.slice(indexOfEqualSign + 1))
42 - }
43 - switch (a) {
44 - case '-rv': case '-rev': case '--rev': case '--reverse':
45 - reverse = true
46 - break
47 - case '-l': case '--loose':
48 - loose = true
49 - break
50 - case '-p': case '--include-prerelease':
51 - includePrerelease = true
52 - break
53 - case '-v': case '--version':
54 - versions.push(argv.shift())
55 - break
56 - case '-i': case '--inc': case '--increment':
57 - switch (argv[0]) {
58 - case 'major': case 'minor': case 'patch': case 'prerelease':
59 - case 'premajor': case 'preminor': case 'prepatch':
60 - inc = argv.shift()
61 - break
62 - default:
63 - inc = 'patch'
64 - break
65 - }
66 - break
67 - case '--preid':
68 - identifier = argv.shift()
69 - break
70 - case '-r': case '--range':
71 - range.push(argv.shift())
72 - break
73 - case '-c': case '--coerce':
74 - coerce = true
75 - break
76 - case '--rtl':
77 - rtl = true
78 - break
79 - case '--ltr':
80 - rtl = false
81 - break
82 - case '-h': case '--help': case '-?':
83 - return help()
84 - default:
85 - versions.push(a)
86 - break
87 - }
88 - }
89 -
90 - var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
91 -
92 - versions = versions.map(function (v) {
93 - return coerce ? (semver.coerce(v, options) || { version: v }).version : v
94 - }).filter(function (v) {
95 - return semver.valid(v)
96 - })
97 - if (!versions.length) return fail()
98 - if (inc && (versions.length !== 1 || range.length)) { return failInc() }
99 -
100 - for (var i = 0, l = range.length; i < l; i++) {
101 - versions = versions.filter(function (v) {
102 - return semver.satisfies(v, range[i], options)
103 - })
104 - if (!versions.length) return fail()
105 - }
106 - return success(versions)
107 -}
108 -
109 -function failInc () {
110 - console.error('--inc can only be used on a single version with no range')
111 - fail()
112 -}
113 -
114 -function fail () { process.exit(1) }
115 -
116 -function success () {
117 - var compare = reverse ? 'rcompare' : 'compare'
118 - versions.sort(function (a, b) {
119 - return semver[compare](a, b, options)
120 - }).map(function (v) {
121 - return semver.clean(v, options)
122 - }).map(function (v) {
123 - return inc ? semver.inc(v, inc, options, identifier) : v
124 - }).forEach(function (v, i, _) { console.log(v) })
125 -}
126 -
127 -function help () {
128 - console.log(['SemVer ' + version,
129 - '',
130 - 'A JavaScript implementation of the https://semver.org/ specification',
131 - 'Copyright Isaac Z. Schlueter',
132 - '',
133 - 'Usage: semver [options] <version> [<version> [...]]',
134 - 'Prints valid versions sorted by SemVer precedence',
135 - '',
136 - 'Options:',
137 - '-r --range <range>',
138 - ' Print versions that match the specified range.',
139 - '',
140 - '-i --increment [<level>]',
141 - ' Increment a version by the specified level. Level can',
142 - ' be one of: major, minor, patch, premajor, preminor,',
143 - " prepatch, or prerelease. Default level is 'patch'.",
144 - ' Only one version may be specified.',
145 - '',
146 - '--preid <identifier>',
147 - ' Identifier to be used to prefix premajor, preminor,',
148 - ' prepatch or prerelease version increments.',
149 - '',
150 - '-l --loose',
151 - ' Interpret versions and ranges loosely',
152 - '',
153 - '-p --include-prerelease',
154 - ' Always include prerelease versions in range matching',
155 - '',
156 - '-c --coerce',
157 - ' Coerce a string into SemVer if possible',
158 - ' (does not imply --loose)',
159 - '',
160 - '--rtl',
161 - ' Coerce version strings right to left',
162 - '',
163 - '--ltr',
164 - ' Coerce version strings left to right (default)',
165 - '',
166 - 'Program exits successfully if any valid version satisfies',
167 - 'all supplied ranges, and prints all satisfying versions.',
168 - '',
169 - 'If no satisfying versions are found, then exits failure.',
170 - '',
171 - 'Versions are printed in ascending order, so supplying',
172 - 'multiple versions to the utility will just sort them.'
173 - ].join('\n'))
174 -}
1 -{
2 - "_from": "semver@^6.3.0",
3 - "_id": "semver@6.3.0",
4 - "_inBundle": false,
5 - "_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
6 - "_location": "/sass-loader/semver",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "semver@^6.3.0",
12 - "name": "semver",
13 - "escapedName": "semver",
14 - "rawSpec": "^6.3.0",
15 - "saveSpec": null,
16 - "fetchSpec": "^6.3.0"
17 - },
18 - "_requiredBy": [
19 - "/sass-loader"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
22 - "_shasum": "ee0a64c8af5e8ceea67687b133761e1becbd1d3d",
23 - "_spec": "semver@^6.3.0",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\sass-loader",
25 - "bin": {
26 - "semver": "bin/semver.js"
27 - },
28 - "bugs": {
29 - "url": "https://github.com/npm/node-semver/issues"
30 - },
31 - "bundleDependencies": false,
32 - "deprecated": false,
33 - "description": "The semantic version parser used by npm.",
34 - "devDependencies": {
35 - "tap": "^14.3.1"
36 - },
37 - "files": [
38 - "bin",
39 - "range.bnf",
40 - "semver.js"
41 - ],
42 - "homepage": "https://github.com/npm/node-semver#readme",
43 - "license": "ISC",
44 - "main": "semver.js",
45 - "name": "semver",
46 - "repository": {
47 - "type": "git",
48 - "url": "git+https://github.com/npm/node-semver.git"
49 - },
50 - "scripts": {
51 - "postpublish": "git push origin --follow-tags",
52 - "postversion": "npm publish",
53 - "preversion": "npm test",
54 - "test": "tap"
55 - },
56 - "tap": {
57 - "check-coverage": true
58 - },
59 - "version": "6.3.0"
60 -}
1 -range-set ::= range ( logical-or range ) *
2 -logical-or ::= ( ' ' ) * '||' ( ' ' ) *
3 -range ::= hyphen | simple ( ' ' simple ) * | ''
4 -hyphen ::= partial ' - ' partial
5 -simple ::= primitive | partial | tilde | caret
6 -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
7 -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
8 -xr ::= 'x' | 'X' | '*' | nr
9 -nr ::= '0' | [1-9] ( [0-9] ) *
10 -tilde ::= '~' partial
11 -caret ::= '^' partial
12 -qualifier ::= ( '-' pre )? ( '+' build )?
13 -pre ::= parts
14 -build ::= parts
15 -parts ::= part ( '.' part ) *
16 -part ::= nr | [-0-9A-Za-z]+
1 -{
2 - "_from": "sass-loader@8.0.2",
3 - "_id": "sass-loader@8.0.2",
4 - "_inBundle": false,
5 - "_integrity": "sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==",
6 - "_location": "/sass-loader",
7 - "_phantomChildren": {
8 - "big.js": "5.2.2",
9 - "emojis-list": "3.0.0",
10 - "minimist": "1.2.5"
11 - },
12 - "_requested": {
13 - "type": "version",
14 - "registry": true,
15 - "raw": "sass-loader@8.0.2",
16 - "name": "sass-loader",
17 - "escapedName": "sass-loader",
18 - "rawSpec": "8.0.2",
19 - "saveSpec": null,
20 - "fetchSpec": "8.0.2"
21 - },
22 - "_requiredBy": [
23 - "/react-scripts"
24 - ],
25 - "_resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.2.tgz",
26 - "_shasum": "debecd8c3ce243c76454f2e8290482150380090d",
27 - "_spec": "sass-loader@8.0.2",
28 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\react-scripts",
29 - "author": {
30 - "name": "J. Tangelder"
31 - },
32 - "bugs": {
33 - "url": "https://github.com/webpack-contrib/sass-loader/issues"
34 - },
35 - "bundleDependencies": false,
36 - "dependencies": {
37 - "clone-deep": "^4.0.1",
38 - "loader-utils": "^1.2.3",
39 - "neo-async": "^2.6.1",
40 - "schema-utils": "^2.6.1",
41 - "semver": "^6.3.0"
42 - },
43 - "deprecated": false,
44 - "description": "Sass loader for webpack",
45 - "devDependencies": {
46 - "@babel/cli": "^7.8.0",
47 - "@babel/core": "^7.8.0",
48 - "@babel/preset-env": "^7.8.2",
49 - "@commitlint/cli": "^8.3.4",
50 - "@commitlint/config-conventional": "^8.3.4",
51 - "@webpack-contrib/defaults": "^6.3.0",
52 - "@webpack-contrib/eslint-config-webpack": "^3.0.0",
53 - "babel-jest": "^24.9.0",
54 - "bootstrap": "^4.4.1",
55 - "bootstrap-sass": "^3.4.1",
56 - "commitlint-azure-pipelines-cli": "^1.0.3",
57 - "cross-env": "^6.0.3",
58 - "css-loader": "^3.4.2",
59 - "del": "^5.1.0",
60 - "del-cli": "^3.0.0",
61 - "eslint": "^6.8.0",
62 - "eslint-config-prettier": "^6.9.0",
63 - "eslint-plugin-import": "^2.20.0",
64 - "fibers": "^4.0.2",
65 - "file-loader": "^5.0.2",
66 - "husky": "^4.0.7",
67 - "jest": "^24.9.0",
68 - "jest-junit": "^10.0.0",
69 - "jquery": "^3.4.1",
70 - "lint-staged": "^9.5.0",
71 - "memfs": "^3.0.3",
72 - "node-sass": "^4.13.0",
73 - "npm-run-all": "^4.1.5",
74 - "prettier": "^1.19.1",
75 - "sass": "^1.24.4",
76 - "standard-version": "^7.0.1",
77 - "style-loader": "^1.1.2",
78 - "webpack": "^4.41.5",
79 - "webpack-cli": "^3.3.10",
80 - "webpack-dev-server": "^3.10.1"
81 - },
82 - "engines": {
83 - "node": ">= 8.9.0"
84 - },
85 - "files": [
86 - "dist"
87 - ],
88 - "funding": {
89 - "type": "opencollective",
90 - "url": "https://opencollective.com/webpack"
91 - },
92 - "homepage": "https://github.com/webpack-contrib/sass-loader",
93 - "keywords": [
94 - "sass",
95 - "libsass",
96 - "webpack",
97 - "loader"
98 - ],
99 - "license": "MIT",
100 - "main": "dist/cjs.js",
101 - "name": "sass-loader",
102 - "peerDependencies": {
103 - "webpack": "^4.36.0 || ^5.0.0",
104 - "node-sass": "^4.0.0",
105 - "sass": "^1.3.0",
106 - "fibers": ">= 3.1.0"
107 - },
108 - "peerDependenciesMeta": {
109 - "node-sass": {
110 - "optional": true
111 - },
112 - "sass": {
113 - "optional": true
114 - },
115 - "fibers": {
116 - "optional": true
117 - }
118 - },
119 - "repository": {
120 - "type": "git",
121 - "url": "git+https://github.com/webpack-contrib/sass-loader.git"
122 - },
123 - "scripts": {
124 - "build": "cross-env NODE_ENV=production babel src -d dist --copy-files",
125 - "clean": "del-cli dist",
126 - "commitlint": "commitlint --from=master",
127 - "defaults": "webpack-defaults",
128 - "lint": "npm-run-all -l -p \"lint:**\"",
129 - "lint:js": "eslint --cache .",
130 - "lint:prettier": "prettier \"{**/*,*}.{js,json,md,yml,css,ts}\" --list-different",
131 - "prebuild": "npm run clean",
132 - "prepare": "npm run build",
133 - "pretest": "npm run lint",
134 - "release": "standard-version",
135 - "security": "npm audit",
136 - "start": "npm run build -- -w",
137 - "test": "npm run test:coverage",
138 - "test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
139 - "test:manual": "npm run build && webpack-dev-server test/manual/src/index.js --open --config test/manual/webpack.config.js",
140 - "test:only": "cross-env NODE_ENV=test jest",
141 - "test:watch": "npm run test:only -- --watch"
142 - },
143 - "version": "8.0.2"
144 -}
1 -The ISC License
2 -
3 -Copyright (c) Isaac Z. Schlueter and Contributors
4 -
5 -Permission to use, copy, modify, and/or distribute this software for any
6 -purpose with or without fee is hereby granted, provided that the above
7 -copyright notice and this permission notice appear in all copies.
8 -
9 -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15 -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 -
17 -====
18 -
19 -`String.fromCodePoint` by Mathias Bynens used according to terms of MIT
20 -License, as follows:
21 -
22 - Copyright Mathias Bynens <https://mathiasbynens.be/>
23 -
24 - Permission is hereby granted, free of charge, to any person obtaining
25 - a copy of this software and associated documentation files (the
26 - "Software"), to deal in the Software without restriction, including
27 - without limitation the rights to use, copy, modify, merge, publish,
28 - distribute, sublicense, and/or sell copies of the Software, and to
29 - permit persons to whom the Software is furnished to do so, subject to
30 - the following conditions:
31 -
32 - The above copyright notice and this permission notice shall be
33 - included in all copies or substantial portions of the Software.
34 -
35 - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36 - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
37 - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38 - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
39 - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
40 - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
41 - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 -# sax js
2 -
3 -A sax-style parser for XML and HTML.
4 -
5 -Designed with [node](http://nodejs.org/) in mind, but should work fine in
6 -the browser or other CommonJS implementations.
7 -
8 -## What This Is
9 -
10 -* A very simple tool to parse through an XML string.
11 -* A stepping stone to a streaming HTML parser.
12 -* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML
13 - docs.
14 -
15 -## What This Is (probably) Not
16 -
17 -* An HTML Parser - That's a fine goal, but this isn't it. It's just
18 - XML.
19 -* A DOM Builder - You can use it to build an object model out of XML,
20 - but it doesn't do that out of the box.
21 -* XSLT - No DOM = no querying.
22 -* 100% Compliant with (some other SAX implementation) - Most SAX
23 - implementations are in Java and do a lot more than this does.
24 -* An XML Validator - It does a little validation when in strict mode, but
25 - not much.
26 -* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic
27 - masochism.
28 -* A DTD-aware Thing - Fetching DTDs is a much bigger job.
29 -
30 -## Regarding `<!DOCTYPE`s and `<!ENTITY`s
31 -
32 -The parser will handle the basic XML entities in text nodes and attribute
33 -values: `&amp; &lt; &gt; &apos; &quot;`. It's possible to define additional
34 -entities in XML by putting them in the DTD. This parser doesn't do anything
35 -with that. If you want to listen to the `ondoctype` event, and then fetch
36 -the doctypes, and read the entities and add them to `parser.ENTITIES`, then
37 -be my guest.
38 -
39 -Unknown entities will fail in strict mode, and in loose mode, will pass
40 -through unmolested.
41 -
42 -## Usage
43 -
44 -```javascript
45 -var sax = require("./lib/sax"),
46 - strict = true, // set to false for html-mode
47 - parser = sax.parser(strict);
48 -
49 -parser.onerror = function (e) {
50 - // an error happened.
51 -};
52 -parser.ontext = function (t) {
53 - // got some text. t is the string of text.
54 -};
55 -parser.onopentag = function (node) {
56 - // opened a tag. node has "name" and "attributes"
57 -};
58 -parser.onattribute = function (attr) {
59 - // an attribute. attr has "name" and "value"
60 -};
61 -parser.onend = function () {
62 - // parser stream is done, and ready to have more stuff written to it.
63 -};
64 -
65 -parser.write('<xml>Hello, <who name="world">world</who>!</xml>').close();
66 -
67 -// stream usage
68 -// takes the same options as the parser
69 -var saxStream = require("sax").createStream(strict, options)
70 -saxStream.on("error", function (e) {
71 - // unhandled errors will throw, since this is a proper node
72 - // event emitter.
73 - console.error("error!", e)
74 - // clear the error
75 - this._parser.error = null
76 - this._parser.resume()
77 -})
78 -saxStream.on("opentag", function (node) {
79 - // same object as above
80 -})
81 -// pipe is supported, and it's readable/writable
82 -// same chunks coming in also go out.
83 -fs.createReadStream("file.xml")
84 - .pipe(saxStream)
85 - .pipe(fs.createWriteStream("file-copy.xml"))
86 -```
87 -
88 -
89 -## Arguments
90 -
91 -Pass the following arguments to the parser function. All are optional.
92 -
93 -`strict` - Boolean. Whether or not to be a jerk. Default: `false`.
94 -
95 -`opt` - Object bag of settings regarding string formatting. All default to `false`.
96 -
97 -Settings supported:
98 -
99 -* `trim` - Boolean. Whether or not to trim text and comment nodes.
100 -* `normalize` - Boolean. If true, then turn any whitespace into a single
101 - space.
102 -* `lowercase` - Boolean. If true, then lowercase tag names and attribute names
103 - in loose mode, rather than uppercasing them.
104 -* `xmlns` - Boolean. If true, then namespaces are supported.
105 -* `position` - Boolean. If false, then don't track line/col/position.
106 -* `strictEntities` - Boolean. If true, only parse [predefined XML
107 - entities](http://www.w3.org/TR/REC-xml/#sec-predefined-ent)
108 - (`&amp;`, `&apos;`, `&gt;`, `&lt;`, and `&quot;`)
109 -
110 -## Methods
111 -
112 -`write` - Write bytes onto the stream. You don't have to do this all at
113 -once. You can keep writing as much as you want.
114 -
115 -`close` - Close the stream. Once closed, no more data may be written until
116 -it is done processing the buffer, which is signaled by the `end` event.
117 -
118 -`resume` - To gracefully handle errors, assign a listener to the `error`
119 -event. Then, when the error is taken care of, you can call `resume` to
120 -continue parsing. Otherwise, the parser will not continue while in an error
121 -state.
122 -
123 -## Members
124 -
125 -At all times, the parser object will have the following members:
126 -
127 -`line`, `column`, `position` - Indications of the position in the XML
128 -document where the parser currently is looking.
129 -
130 -`startTagPosition` - Indicates the position where the current tag starts.
131 -
132 -`closed` - Boolean indicating whether or not the parser can be written to.
133 -If it's `true`, then wait for the `ready` event to write again.
134 -
135 -`strict` - Boolean indicating whether or not the parser is a jerk.
136 -
137 -`opt` - Any options passed into the constructor.
138 -
139 -`tag` - The current tag being dealt with.
140 -
141 -And a bunch of other stuff that you probably shouldn't touch.
142 -
143 -## Events
144 -
145 -All events emit with a single argument. To listen to an event, assign a
146 -function to `on<eventname>`. Functions get executed in the this-context of
147 -the parser object. The list of supported events are also in the exported
148 -`EVENTS` array.
149 -
150 -When using the stream interface, assign handlers using the EventEmitter
151 -`on` function in the normal fashion.
152 -
153 -`error` - Indication that something bad happened. The error will be hanging
154 -out on `parser.error`, and must be deleted before parsing can continue. By
155 -listening to this event, you can keep an eye on that kind of stuff. Note:
156 -this happens *much* more in strict mode. Argument: instance of `Error`.
157 -
158 -`text` - Text node. Argument: string of text.
159 -
160 -`doctype` - The `<!DOCTYPE` declaration. Argument: doctype string.
161 -
162 -`processinginstruction` - Stuff like `<?xml foo="blerg" ?>`. Argument:
163 -object with `name` and `body` members. Attributes are not parsed, as
164 -processing instructions have implementation dependent semantics.
165 -
166 -`sgmldeclaration` - Random SGML declarations. Stuff like `<!ENTITY p>`
167 -would trigger this kind of event. This is a weird thing to support, so it
168 -might go away at some point. SAX isn't intended to be used to parse SGML,
169 -after all.
170 -
171 -`opentagstart` - Emitted immediately when the tag name is available,
172 -but before any attributes are encountered. Argument: object with a
173 -`name` field and an empty `attributes` set. Note that this is the
174 -same object that will later be emitted in the `opentag` event.
175 -
176 -`opentag` - An opening tag. Argument: object with `name` and `attributes`.
177 -In non-strict mode, tag names are uppercased, unless the `lowercase`
178 -option is set. If the `xmlns` option is set, then it will contain
179 -namespace binding information on the `ns` member, and will have a
180 -`local`, `prefix`, and `uri` member.
181 -
182 -`closetag` - A closing tag. In loose mode, tags are auto-closed if their
183 -parent closes. In strict mode, well-formedness is enforced. Note that
184 -self-closing tags will have `closeTag` emitted immediately after `openTag`.
185 -Argument: tag name.
186 -
187 -`attribute` - An attribute node. Argument: object with `name` and `value`.
188 -In non-strict mode, attribute names are uppercased, unless the `lowercase`
189 -option is set. If the `xmlns` option is set, it will also contains namespace
190 -information.
191 -
192 -`comment` - A comment node. Argument: the string of the comment.
193 -
194 -`opencdata` - The opening tag of a `<![CDATA[` block.
195 -
196 -`cdata` - The text of a `<![CDATA[` block. Since `<![CDATA[` blocks can get
197 -quite large, this event may fire multiple times for a single block, if it
198 -is broken up into multiple `write()`s. Argument: the string of random
199 -character data.
200 -
201 -`closecdata` - The closing tag (`]]>`) of a `<![CDATA[` block.
202 -
203 -`opennamespace` - If the `xmlns` option is set, then this event will
204 -signal the start of a new namespace binding.
205 -
206 -`closenamespace` - If the `xmlns` option is set, then this event will
207 -signal the end of a namespace binding.
208 -
209 -`end` - Indication that the closed stream has ended.
210 -
211 -`ready` - Indication that the stream has reset, and is ready to be written
212 -to.
213 -
214 -`noscript` - In non-strict mode, `<script>` tags trigger a `"script"`
215 -event, and their contents are not checked for special xml characters.
216 -If you pass `noscript: true`, then this behavior is suppressed.
217 -
218 -## Reporting Problems
219 -
220 -It's best to write a failing test if you find an issue. I will always
221 -accept pull requests with failing tests if they demonstrate intended
222 -behavior, but it is very hard to figure out what issue you're describing
223 -without a test. Writing a test is also the best way for you yourself
224 -to figure out if you really understand the issue you think you have with
225 -sax-js.
This diff is collapsed. Click to expand it.
1 -{
2 - "_from": "sax@~1.2.4",
3 - "_id": "sax@1.2.4",
4 - "_inBundle": false,
5 - "_integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
6 - "_location": "/sax",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "sax@~1.2.4",
12 - "name": "sax",
13 - "escapedName": "sax",
14 - "rawSpec": "~1.2.4",
15 - "saveSpec": null,
16 - "fetchSpec": "~1.2.4"
17 - },
18 - "_requiredBy": [
19 - "/svgo"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
22 - "_shasum": "2816234e2378bddc4e5354fab5caa895df7100d9",
23 - "_spec": "sax@~1.2.4",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\svgo",
25 - "author": {
26 - "name": "Isaac Z. Schlueter",
27 - "email": "i@izs.me",
28 - "url": "http://blog.izs.me/"
29 - },
30 - "bugs": {
31 - "url": "https://github.com/isaacs/sax-js/issues"
32 - },
33 - "bundleDependencies": false,
34 - "deprecated": false,
35 - "description": "An evented streaming XML parser in JavaScript",
36 - "devDependencies": {
37 - "standard": "^8.6.0",
38 - "tap": "^10.5.1"
39 - },
40 - "files": [
41 - "lib/sax.js",
42 - "LICENSE",
43 - "README.md"
44 - ],
45 - "homepage": "https://github.com/isaacs/sax-js#readme",
46 - "license": "ISC",
47 - "main": "lib/sax.js",
48 - "name": "sax",
49 - "repository": {
50 - "type": "git",
51 - "url": "git://github.com/isaacs/sax-js.git"
52 - },
53 - "scripts": {
54 - "postpublish": "git push origin --all; git push origin --tags",
55 - "posttest": "standard -F test/*.js lib/*.js",
56 - "postversion": "npm publish",
57 - "preversion": "npm test",
58 - "test": "tap test/*.js --cov -j4"
59 - },
60 - "version": "1.2.4"
61 -}
This diff is collapsed. Click to expand it.
1 -{
2 - "_from": "saxes@^5.0.0",
3 - "_id": "saxes@5.0.1",
4 - "_inBundle": false,
5 - "_integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==",
6 - "_location": "/saxes",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "saxes@^5.0.0",
12 - "name": "saxes",
13 - "escapedName": "saxes",
14 - "rawSpec": "^5.0.0",
15 - "saveSpec": null,
16 - "fetchSpec": "^5.0.0"
17 - },
18 - "_requiredBy": [
19 - "/jsdom"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz",
22 - "_shasum": "eebab953fa3b7608dbe94e5dadb15c888fa6696d",
23 - "_spec": "saxes@^5.0.0",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\jsdom",
25 - "author": {
26 - "name": "Louis-Dominique Dubeau",
27 - "email": "ldd@lddubeau.com"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/lddubeau/saxes/issues"
31 - },
32 - "bundleDependencies": false,
33 - "dependencies": {
34 - "xmlchars": "^2.2.0"
35 - },
36 - "deprecated": false,
37 - "description": "An evented streaming XML parser in JavaScript",
38 - "devDependencies": {
39 - "@commitlint/cli": "^8.3.5",
40 - "@commitlint/config-angular": "^8.3.4",
41 - "@types/chai": "^4.2.11",
42 - "@types/mocha": "^7.0.2",
43 - "@typescript-eslint/eslint-plugin": "^2.27.0",
44 - "@typescript-eslint/eslint-plugin-tslint": "^2.27.0",
45 - "@typescript-eslint/parser": "^2.27.0",
46 - "@xml-conformance-suite/js": "^2.0.0",
47 - "@xml-conformance-suite/mocha": "^2.0.0",
48 - "@xml-conformance-suite/test-data": "^2.0.0",
49 - "chai": "^4.2.0",
50 - "conventional-changelog-cli": "^2.0.31",
51 - "eslint": "^6.8.0",
52 - "eslint-config-lddubeau-base": "^5.2.0",
53 - "eslint-config-lddubeau-ts": "^1.1.7",
54 - "eslint-import-resolver-typescript": "^2.0.0",
55 - "eslint-plugin-import": "^2.20.2",
56 - "eslint-plugin-jsx-a11y": "^6.2.3",
57 - "eslint-plugin-prefer-arrow": "^1.2.0",
58 - "eslint-plugin-react": "^7.19.0",
59 - "eslint-plugin-simple-import-sort": "^5.0.2",
60 - "husky": "^4.2.5",
61 - "mocha": "^7.1.1",
62 - "renovate-config-lddubeau": "^1.0.0",
63 - "simple-dist-tag": "^1.0.2",
64 - "ts-node": "^8.8.2",
65 - "tsd": "^0.11.0",
66 - "tslint": "^6.1.1",
67 - "tslint-microsoft-contrib": "^6.2.0",
68 - "typedoc": "^0.17.4",
69 - "typescript": "^3.8.3"
70 - },
71 - "engines": {
72 - "node": ">=10"
73 - },
74 - "homepage": "https://github.com/lddubeau/saxes#readme",
75 - "husky": {
76 - "hooks": {
77 - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
78 - }
79 - },
80 - "license": "ISC",
81 - "main": "saxes.js",
82 - "name": "saxes",
83 - "repository": {
84 - "type": "git",
85 - "url": "git+https://github.com/lddubeau/saxes.git"
86 - },
87 - "scripts": {
88 - "build": "npm run tsc && npm run copy",
89 - "build-docs": "npm run typedoc",
90 - "copy": "cp -p README.md build/dist && sed -e'/\"private\": true/d' package.json > build/dist/package.json",
91 - "gh-pages": "npm run build-docs && mkdir -p build && (cd build; rm -rf gh-pages; git clone .. --branch gh-pages gh-pages) && mkdir -p build/gh-pages/latest && find build/gh-pages/latest -type f -delete && cp -rp build/docs/* build/gh-pages/latest && find build/gh-pages -type d -empty -delete",
92 - "lint": "eslint --ignore-path .gitignore '**/*.ts' '**/*.js'",
93 - "lint-fix": "npm run lint -- --fix",
94 - "postpublish": "git push origin --follow-tags",
95 - "posttest": "npm run lint",
96 - "postversion": "npm run test && npm run self:publish",
97 - "self:publish": "cd build/dist && npm_config_tag=`simple-dist-tag` npm publish",
98 - "test": "npm run build && mocha --delay",
99 - "tsc": "tsc",
100 - "typedoc": "typedoc --tsconfig tsconfig.json --name saxes --out build/docs/ --listInvalidSymbolLinks --excludePrivate --excludeNotExported",
101 - "version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md"
102 - },
103 - "types": "saxes.d.ts",
104 - "version": "5.0.1"
105 -}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -MIT License
2 -
3 -Copyright (c) Facebook, Inc. and its affiliates.
4 -
5 -Permission is hereby granted, free of charge, to any person obtaining a copy
6 -of this software and associated documentation files (the "Software"), to deal
7 -in the Software without restriction, including without limitation the rights
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 -copies of the Software, and to permit persons to whom the Software is
10 -furnished to do so, subject to the following conditions:
11 -
12 -The above copyright notice and this permission notice shall be included in all
13 -copies or substantial portions of the Software.
14 -
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 -SOFTWARE.
1 -# `scheduler`
2 -
3 -This is a package for cooperative scheduling in a browser environment. It is currently used internally by React, but we plan to make it more generic.
4 -
5 -The public API for this package is not yet finalized.
6 -
7 -### Thanks
8 -
9 -The React team thanks [Anton Podviaznikov](https://podviaznikov.com/) for donating the `scheduler` package name.
1 -{
2 - "branch": "17.0.1",
3 - "buildNumber": "222790",
4 - "checksum": "addb3df",
5 - "commit": "8e5adfbd7",
6 - "environment": "ci",
7 - "reactVersion": "17.0.0-8e5adfbd7"
8 -}
1 -/** @license React v0.20.1
2 - * scheduler-tracing.development.js
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -
10 -'use strict';
11 -
12 -if (process.env.NODE_ENV !== "production") {
13 - (function() {
14 -'use strict';
15 -
16 -var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.
17 -
18 -var interactionIDCounter = 0;
19 -var threadIDCounter = 0; // Set of currently traced interactions.
20 -// Interactions "stack"–
21 -// Meaning that newly traced interactions are appended to the previously active set.
22 -// When an interaction goes out of scope, the previous set (if any) is restored.
23 -
24 -exports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end.
25 -
26 -exports.__subscriberRef = null;
27 -
28 -{
29 - exports.__interactionsRef = {
30 - current: new Set()
31 - };
32 - exports.__subscriberRef = {
33 - current: null
34 - };
35 -}
36 -function unstable_clear(callback) {
37 -
38 - var prevInteractions = exports.__interactionsRef.current;
39 - exports.__interactionsRef.current = new Set();
40 -
41 - try {
42 - return callback();
43 - } finally {
44 - exports.__interactionsRef.current = prevInteractions;
45 - }
46 -}
47 -function unstable_getCurrent() {
48 - {
49 - return exports.__interactionsRef.current;
50 - }
51 -}
52 -function unstable_getThreadID() {
53 - return ++threadIDCounter;
54 -}
55 -function unstable_trace(name, timestamp, callback) {
56 - var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;
57 -
58 - var interaction = {
59 - __count: 1,
60 - id: interactionIDCounter++,
61 - name: name,
62 - timestamp: timestamp
63 - };
64 - var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate.
65 - // To do that, clone the current interactions.
66 - // The previous set will be restored upon completion.
67 -
68 - var interactions = new Set(prevInteractions);
69 - interactions.add(interaction);
70 - exports.__interactionsRef.current = interactions;
71 - var subscriber = exports.__subscriberRef.current;
72 - var returnValue;
73 -
74 - try {
75 - if (subscriber !== null) {
76 - subscriber.onInteractionTraced(interaction);
77 - }
78 - } finally {
79 - try {
80 - if (subscriber !== null) {
81 - subscriber.onWorkStarted(interactions, threadID);
82 - }
83 - } finally {
84 - try {
85 - returnValue = callback();
86 - } finally {
87 - exports.__interactionsRef.current = prevInteractions;
88 -
89 - try {
90 - if (subscriber !== null) {
91 - subscriber.onWorkStopped(interactions, threadID);
92 - }
93 - } finally {
94 - interaction.__count--; // If no async work was scheduled for this interaction,
95 - // Notify subscribers that it's completed.
96 -
97 - if (subscriber !== null && interaction.__count === 0) {
98 - subscriber.onInteractionScheduledWorkCompleted(interaction);
99 - }
100 - }
101 - }
102 - }
103 - }
104 -
105 - return returnValue;
106 -}
107 -function unstable_wrap(callback) {
108 - var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;
109 -
110 - var wrappedInteractions = exports.__interactionsRef.current;
111 - var subscriber = exports.__subscriberRef.current;
112 -
113 - if (subscriber !== null) {
114 - subscriber.onWorkScheduled(wrappedInteractions, threadID);
115 - } // Update the pending async work count for the current interactions.
116 - // Update after calling subscribers in case of error.
117 -
118 -
119 - wrappedInteractions.forEach(function (interaction) {
120 - interaction.__count++;
121 - });
122 - var hasRun = false;
123 -
124 - function wrapped() {
125 - var prevInteractions = exports.__interactionsRef.current;
126 - exports.__interactionsRef.current = wrappedInteractions;
127 - subscriber = exports.__subscriberRef.current;
128 -
129 - try {
130 - var returnValue;
131 -
132 - try {
133 - if (subscriber !== null) {
134 - subscriber.onWorkStarted(wrappedInteractions, threadID);
135 - }
136 - } finally {
137 - try {
138 - returnValue = callback.apply(undefined, arguments);
139 - } finally {
140 - exports.__interactionsRef.current = prevInteractions;
141 -
142 - if (subscriber !== null) {
143 - subscriber.onWorkStopped(wrappedInteractions, threadID);
144 - }
145 - }
146 - }
147 -
148 - return returnValue;
149 - } finally {
150 - if (!hasRun) {
151 - // We only expect a wrapped function to be executed once,
152 - // But in the event that it's executed more than once–
153 - // Only decrement the outstanding interaction counts once.
154 - hasRun = true; // Update pending async counts for all wrapped interactions.
155 - // If this was the last scheduled async work for any of them,
156 - // Mark them as completed.
157 -
158 - wrappedInteractions.forEach(function (interaction) {
159 - interaction.__count--;
160 -
161 - if (subscriber !== null && interaction.__count === 0) {
162 - subscriber.onInteractionScheduledWorkCompleted(interaction);
163 - }
164 - });
165 - }
166 - }
167 - }
168 -
169 - wrapped.cancel = function cancel() {
170 - subscriber = exports.__subscriberRef.current;
171 -
172 - try {
173 - if (subscriber !== null) {
174 - subscriber.onWorkCanceled(wrappedInteractions, threadID);
175 - }
176 - } finally {
177 - // Update pending async counts for all wrapped interactions.
178 - // If this was the last scheduled async work for any of them,
179 - // Mark them as completed.
180 - wrappedInteractions.forEach(function (interaction) {
181 - interaction.__count--;
182 -
183 - if (subscriber && interaction.__count === 0) {
184 - subscriber.onInteractionScheduledWorkCompleted(interaction);
185 - }
186 - });
187 - }
188 - };
189 -
190 - return wrapped;
191 -}
192 -
193 -var subscribers = null;
194 -
195 -{
196 - subscribers = new Set();
197 -}
198 -
199 -function unstable_subscribe(subscriber) {
200 - {
201 - subscribers.add(subscriber);
202 -
203 - if (subscribers.size === 1) {
204 - exports.__subscriberRef.current = {
205 - onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
206 - onInteractionTraced: onInteractionTraced,
207 - onWorkCanceled: onWorkCanceled,
208 - onWorkScheduled: onWorkScheduled,
209 - onWorkStarted: onWorkStarted,
210 - onWorkStopped: onWorkStopped
211 - };
212 - }
213 - }
214 -}
215 -function unstable_unsubscribe(subscriber) {
216 - {
217 - subscribers.delete(subscriber);
218 -
219 - if (subscribers.size === 0) {
220 - exports.__subscriberRef.current = null;
221 - }
222 - }
223 -}
224 -
225 -function onInteractionTraced(interaction) {
226 - var didCatchError = false;
227 - var caughtError = null;
228 - subscribers.forEach(function (subscriber) {
229 - try {
230 - subscriber.onInteractionTraced(interaction);
231 - } catch (error) {
232 - if (!didCatchError) {
233 - didCatchError = true;
234 - caughtError = error;
235 - }
236 - }
237 - });
238 -
239 - if (didCatchError) {
240 - throw caughtError;
241 - }
242 -}
243 -
244 -function onInteractionScheduledWorkCompleted(interaction) {
245 - var didCatchError = false;
246 - var caughtError = null;
247 - subscribers.forEach(function (subscriber) {
248 - try {
249 - subscriber.onInteractionScheduledWorkCompleted(interaction);
250 - } catch (error) {
251 - if (!didCatchError) {
252 - didCatchError = true;
253 - caughtError = error;
254 - }
255 - }
256 - });
257 -
258 - if (didCatchError) {
259 - throw caughtError;
260 - }
261 -}
262 -
263 -function onWorkScheduled(interactions, threadID) {
264 - var didCatchError = false;
265 - var caughtError = null;
266 - subscribers.forEach(function (subscriber) {
267 - try {
268 - subscriber.onWorkScheduled(interactions, threadID);
269 - } catch (error) {
270 - if (!didCatchError) {
271 - didCatchError = true;
272 - caughtError = error;
273 - }
274 - }
275 - });
276 -
277 - if (didCatchError) {
278 - throw caughtError;
279 - }
280 -}
281 -
282 -function onWorkStarted(interactions, threadID) {
283 - var didCatchError = false;
284 - var caughtError = null;
285 - subscribers.forEach(function (subscriber) {
286 - try {
287 - subscriber.onWorkStarted(interactions, threadID);
288 - } catch (error) {
289 - if (!didCatchError) {
290 - didCatchError = true;
291 - caughtError = error;
292 - }
293 - }
294 - });
295 -
296 - if (didCatchError) {
297 - throw caughtError;
298 - }
299 -}
300 -
301 -function onWorkStopped(interactions, threadID) {
302 - var didCatchError = false;
303 - var caughtError = null;
304 - subscribers.forEach(function (subscriber) {
305 - try {
306 - subscriber.onWorkStopped(interactions, threadID);
307 - } catch (error) {
308 - if (!didCatchError) {
309 - didCatchError = true;
310 - caughtError = error;
311 - }
312 - }
313 - });
314 -
315 - if (didCatchError) {
316 - throw caughtError;
317 - }
318 -}
319 -
320 -function onWorkCanceled(interactions, threadID) {
321 - var didCatchError = false;
322 - var caughtError = null;
323 - subscribers.forEach(function (subscriber) {
324 - try {
325 - subscriber.onWorkCanceled(interactions, threadID);
326 - } catch (error) {
327 - if (!didCatchError) {
328 - didCatchError = true;
329 - caughtError = error;
330 - }
331 - }
332 - });
333 -
334 - if (didCatchError) {
335 - throw caughtError;
336 - }
337 -}
338 -
339 -exports.unstable_clear = unstable_clear;
340 -exports.unstable_getCurrent = unstable_getCurrent;
341 -exports.unstable_getThreadID = unstable_getThreadID;
342 -exports.unstable_subscribe = unstable_subscribe;
343 -exports.unstable_trace = unstable_trace;
344 -exports.unstable_unsubscribe = unstable_unsubscribe;
345 -exports.unstable_wrap = unstable_wrap;
346 - })();
347 -}
1 -/** @license React v0.20.1
2 - * scheduler-tracing.production.min.js
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -'use strict';var b=0;exports.__interactionsRef=null;exports.__subscriberRef=null;exports.unstable_clear=function(a){return a()};exports.unstable_getCurrent=function(){return null};exports.unstable_getThreadID=function(){return++b};exports.unstable_subscribe=function(){};exports.unstable_trace=function(a,d,c){return c()};exports.unstable_unsubscribe=function(){};exports.unstable_wrap=function(a){return a};
1 -/** @license React v0.20.1
2 - * scheduler-tracing.profiling.min.js
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -'use strict';var g=0,l=0;exports.__interactionsRef=null;exports.__subscriberRef=null;exports.__interactionsRef={current:new Set};exports.__subscriberRef={current:null};var m=null;m=new Set;function n(e){var d=!1,a=null;m.forEach(function(c){try{c.onInteractionTraced(e)}catch(b){d||(d=!0,a=b)}});if(d)throw a;}function p(e){var d=!1,a=null;m.forEach(function(c){try{c.onInteractionScheduledWorkCompleted(e)}catch(b){d||(d=!0,a=b)}});if(d)throw a;}
10 -function q(e,d){var a=!1,c=null;m.forEach(function(b){try{b.onWorkScheduled(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throw c;}function r(e,d){var a=!1,c=null;m.forEach(function(b){try{b.onWorkStarted(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throw c;}function t(e,d){var a=!1,c=null;m.forEach(function(b){try{b.onWorkStopped(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throw c;}function u(e,d){var a=!1,c=null;m.forEach(function(b){try{b.onWorkCanceled(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throw c;}
11 -exports.unstable_clear=function(e){var d=exports.__interactionsRef.current;exports.__interactionsRef.current=new Set;try{return e()}finally{exports.__interactionsRef.current=d}};exports.unstable_getCurrent=function(){return exports.__interactionsRef.current};exports.unstable_getThreadID=function(){return++l};
12 -exports.unstable_subscribe=function(e){m.add(e);1===m.size&&(exports.__subscriberRef.current={onInteractionScheduledWorkCompleted:p,onInteractionTraced:n,onWorkCanceled:u,onWorkScheduled:q,onWorkStarted:r,onWorkStopped:t})};
13 -exports.unstable_trace=function(e,d,a){var c=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,b={__count:1,id:g++,name:e,timestamp:d},f=exports.__interactionsRef.current,k=new Set(f);k.add(b);exports.__interactionsRef.current=k;var h=exports.__subscriberRef.current;try{if(null!==h)h.onInteractionTraced(b)}finally{try{if(null!==h)h.onWorkStarted(k,c)}finally{try{var v=a()}finally{exports.__interactionsRef.current=f;try{if(null!==h)h.onWorkStopped(k,c)}finally{if(b.__count--,null!==h&&0===b.__count)h.onInteractionScheduledWorkCompleted(b)}}}}return v};
14 -exports.unstable_unsubscribe=function(e){m.delete(e);0===m.size&&(exports.__subscriberRef.current=null)};
15 -exports.unstable_wrap=function(e){function d(){var d=exports.__interactionsRef.current;exports.__interactionsRef.current=c;b=exports.__subscriberRef.current;try{try{if(null!==b)b.onWorkStarted(c,a)}finally{try{var h=e.apply(void 0,arguments)}finally{if(exports.__interactionsRef.current=d,null!==b)b.onWorkStopped(c,a)}}return h}finally{f||(f=!0,c.forEach(function(a){a.__count--;if(null!==b&&0===a.__count)b.onInteractionScheduledWorkCompleted(a)}))}}var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:
16 -0,c=exports.__interactionsRef.current,b=exports.__subscriberRef.current;if(null!==b)b.onWorkScheduled(c,a);c.forEach(function(a){a.__count++});var f=!1;d.cancel=function(){b=exports.__subscriberRef.current;try{if(null!==b)b.onWorkCanceled(c,a)}finally{c.forEach(function(a){a.__count--;if(b&&0===a.__count)b.onInteractionScheduledWorkCompleted(a)})}};return d};
1 -/** @license React v0.20.1
2 - * scheduler-unstable_mock.production.min.js
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -'use strict';var f=0,g=null,h=null,k=-1,l=null,m=-1,n=!1,p=!1,q=!1,r=!1;function t(){return-1!==m&&null!==l&&l.length>=m||r&&q?n=!0:!1}function x(){if(p)throw Error("Already flushing work.");if(null!==g){var a=g;p=!0;try{var b=!0;do b=a(!0,f);while(b);b||(g=null);return!0}finally{p=!1}}else return!1}function z(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<A(e,b))a[d]=b,a[c]=e,c=d;else break a}}function B(a){a=a[0];return void 0===a?null:a}
10 -function C(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var u=2*(d+1)-1,v=a[u],w=u+1,y=a[w];if(void 0!==v&&0>A(v,c))void 0!==y&&0>A(y,v)?(a[d]=y,a[w]=c,d=w):(a[d]=v,a[u]=c,d=u);else if(void 0!==y&&0>A(y,c))a[d]=y,a[w]=c,d=w;else break a}}return b}return null}function A(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var D=[],E=[],F=1,G=null,H=3,I=!1,J=!1,K=!1;
11 -function L(a){for(var b=B(E);null!==b;){if(null===b.callback)C(E);else if(b.startTime<=a)C(E),b.sortIndex=b.expirationTime,z(D,b);else break;b=B(E)}}function M(a){K=!1;L(a);if(!J)if(null!==B(D))J=!0,g=N;else{var b=B(E);null!==b&&(a=b.startTime-a,h=M,k=f+a)}}
12 -function N(a,b){J=!1;K&&(K=!1,h=null,k=-1);I=!0;var c=H;try{L(b);for(G=B(D);null!==G&&(!(G.expirationTime>b)||a&&!t());){var d=G.callback;if("function"===typeof d){G.callback=null;H=G.priorityLevel;var e=d(G.expirationTime<=b);b=f;"function"===typeof e?G.callback=e:G===B(D)&&C(D);L(b)}else C(D);G=B(D)}if(null!==G)var u=!0;else{var v=B(E);if(null!==v){var w=v.startTime-b;h=M;k=f+w}u=!1}return u}finally{G=null,H=c,I=!1}}exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;
13 -exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_advanceTime=function(a){"disabledLog"!==console.log.name&&(f+=a,null!==h&&k<=f&&(h(f),k=-1,h=null))};exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_clearYields=function(){if(null===l)return[];var a=l;l=null;return a};exports.unstable_continueExecution=function(){J||I||(J=!0,g=N)};
14 -exports.unstable_flushAll=function(){if(null!==l)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");x();if(null!==l)throw Error("While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])");};exports.unstable_flushAllWithoutAsserting=x;
15 -exports.unstable_flushExpired=function(){if(p)throw Error("Already flushing work.");if(null!==g){p=!0;try{g(!1,f)||(g=null)}finally{p=!1}}};exports.unstable_flushNumberOfYields=function(a){if(p)throw Error("Already flushing work.");if(null!==g){var b=g;m=a;p=!0;try{a=!0;do a=b(!0,f);while(a&&!n);a||(g=null)}finally{m=-1,p=n=!1}}};
16 -exports.unstable_flushUntilNextPaint=function(){if(p)throw Error("Already flushing work.");if(null!==g){var a=g;r=!0;q=!1;p=!0;try{var b=!0;do b=a(!0,f);while(b&&!n);b||(g=null)}finally{p=n=r=!1}}};exports.unstable_forceFrameRate=function(){};exports.unstable_getCurrentPriorityLevel=function(){return H};exports.unstable_getFirstCallbackNode=function(){return B(D)};exports.unstable_next=function(a){switch(H){case 1:case 2:case 3:var b=3;break;default:b=H}var c=H;H=b;try{return a()}finally{H=c}};
17 -exports.unstable_now=function(){return f};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=function(){q=!0};exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=H;H=a;try{return b()}finally{H=c}};
18 -exports.unstable_scheduleCallback=function(a,b,c){var d=f;"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:F++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,z(E,a),null===B(D)&&a===B(E)&&(K?(h=null,k=-1):K=!0,h=M,k=f+(c-d))):(a.sortIndex=e,z(D,a),J||I||(J=!0,g=N));return a};exports.unstable_shouldYield=t;
19 -exports.unstable_wrapCallback=function(a){var b=H;return function(){var c=H;H=b;try{return a.apply(this,arguments)}finally{H=c}}};exports.unstable_yieldValue=function(a){"disabledLog"!==console.log.name&&(null===l?l=[a]:l.push(a))};
1 -/** @license React v0.20.1
2 - * scheduler-unstable_post_task.development.js
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -
10 -'use strict';
11 -
12 -if (process.env.NODE_ENV !== "production") {
13 - (function() {
14 -'use strict';
15 -
16 -// TODO: Use symbols?
17 -var ImmediatePriority = 1;
18 -var UserBlockingPriority = 2;
19 -var NormalPriority = 3;
20 -var LowPriority = 4;
21 -var IdlePriority = 5;
22 -
23 -var perf = window.performance;
24 -var setTimeout = window.setTimeout; // Use experimental Chrome Scheduler postTask API.
25 -
26 -var scheduler = global.scheduler;
27 -var getCurrentTime = perf.now.bind(perf);
28 -var unstable_now = getCurrentTime; // Scheduler periodically yields in case there is other work on the main
29 -// thread, like user events. By default, it yields multiple times per frame.
30 -// It does not attempt to align with frame boundaries, since most tasks don't
31 -// need to be frame aligned; for those that do, use requestAnimationFrame.
32 -
33 -var yieldInterval = 5;
34 -var deadline = 0;
35 -var currentPriorityLevel_DEPRECATED = NormalPriority; // `isInputPending` is not available. Since we have no way of knowing if
36 -// there's pending input, always yield at the end of the frame.
37 -
38 -function unstable_shouldYield() {
39 - return getCurrentTime() >= deadline;
40 -}
41 -function unstable_requestPaint() {// Since we yield every frame regardless, `requestPaint` has no effect.
42 -}
43 -function unstable_scheduleCallback(priorityLevel, callback, options) {
44 - var postTaskPriority;
45 -
46 - switch (priorityLevel) {
47 - case ImmediatePriority:
48 - case UserBlockingPriority:
49 - postTaskPriority = 'user-blocking';
50 - break;
51 -
52 - case LowPriority:
53 - case NormalPriority:
54 - postTaskPriority = 'user-visible';
55 - break;
56 -
57 - case IdlePriority:
58 - postTaskPriority = 'background';
59 - break;
60 -
61 - default:
62 - postTaskPriority = 'user-visible';
63 - break;
64 - }
65 -
66 - var controller = new TaskController();
67 - var postTaskOptions = {
68 - priority: postTaskPriority,
69 - delay: typeof options === 'object' && options !== null ? options.delay : 0,
70 - signal: controller.signal
71 - };
72 - var node = {
73 - _controller: controller
74 - };
75 - scheduler.postTask(runTask.bind(null, priorityLevel, postTaskPriority, node, callback), postTaskOptions).catch(handleAbortError);
76 - return node;
77 -}
78 -
79 -function runTask(priorityLevel, postTaskPriority, node, callback) {
80 - deadline = getCurrentTime() + yieldInterval;
81 -
82 - try {
83 - currentPriorityLevel_DEPRECATED = priorityLevel;
84 - var _didTimeout_DEPRECATED = false;
85 - var result = callback(_didTimeout_DEPRECATED);
86 -
87 - if (typeof result === 'function') {
88 - // Assume this is a continuation
89 - var continuation = result;
90 - var continuationController = new TaskController();
91 - var continuationOptions = {
92 - priority: postTaskPriority,
93 - signal: continuationController.signal
94 - }; // Update the original callback node's controller, since even though we're
95 - // posting a new task, conceptually it's the same one.
96 -
97 - node._controller = continuationController;
98 - scheduler.postTask(runTask.bind(null, priorityLevel, postTaskPriority, node, continuation), continuationOptions).catch(handleAbortError);
99 - }
100 - } catch (error) {
101 - // We're inside a `postTask` promise. If we don't handle this error, then it
102 - // will trigger an "Unhandled promise rejection" error. We don't want that,
103 - // but we do want the default error reporting behavior that normal
104 - // (non-Promise) tasks get for unhandled errors.
105 - //
106 - // So we'll re-throw the error inside a regular browser task.
107 - setTimeout(function () {
108 - throw error;
109 - });
110 - } finally {
111 - currentPriorityLevel_DEPRECATED = NormalPriority;
112 - }
113 -}
114 -
115 -function handleAbortError(error) {// Abort errors are an implementation detail. We don't expose the
116 - // TaskController to the user, nor do we expose the promise that is returned
117 - // from `postTask`. So we should suppress them, since there's no way for the
118 - // user to handle them.
119 -}
120 -
121 -function unstable_cancelCallback(node) {
122 - var controller = node._controller;
123 - controller.abort();
124 -}
125 -function unstable_runWithPriority(priorityLevel, callback) {
126 - var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
127 - currentPriorityLevel_DEPRECATED = priorityLevel;
128 -
129 - try {
130 - return callback();
131 - } finally {
132 - currentPriorityLevel_DEPRECATED = previousPriorityLevel;
133 - }
134 -}
135 -function unstable_getCurrentPriorityLevel() {
136 - return currentPriorityLevel_DEPRECATED;
137 -}
138 -function unstable_next(callback) {
139 - var priorityLevel;
140 -
141 - switch (currentPriorityLevel_DEPRECATED) {
142 - case ImmediatePriority:
143 - case UserBlockingPriority:
144 - case NormalPriority:
145 - // Shift down to normal priority
146 - priorityLevel = NormalPriority;
147 - break;
148 -
149 - default:
150 - // Anything lower than normal priority should remain at the current level.
151 - priorityLevel = currentPriorityLevel_DEPRECATED;
152 - break;
153 - }
154 -
155 - var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
156 - currentPriorityLevel_DEPRECATED = priorityLevel;
157 -
158 - try {
159 - return callback();
160 - } finally {
161 - currentPriorityLevel_DEPRECATED = previousPriorityLevel;
162 - }
163 -}
164 -function unstable_wrapCallback(callback) {
165 - var parentPriorityLevel = currentPriorityLevel_DEPRECATED;
166 - return function () {
167 - var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
168 - currentPriorityLevel_DEPRECATED = parentPriorityLevel;
169 -
170 - try {
171 - return callback();
172 - } finally {
173 - currentPriorityLevel_DEPRECATED = previousPriorityLevel;
174 - }
175 - };
176 -}
177 -function unstable_forceFrameRate() {}
178 -function unstable_pauseExecution() {}
179 -function unstable_continueExecution() {}
180 -function unstable_getFirstCallbackNode() {
181 - return null;
182 -} // Currently no profiling build
183 -
184 -var unstable_Profiling = null;
185 -
186 -exports.unstable_IdlePriority = IdlePriority;
187 -exports.unstable_ImmediatePriority = ImmediatePriority;
188 -exports.unstable_LowPriority = LowPriority;
189 -exports.unstable_NormalPriority = NormalPriority;
190 -exports.unstable_Profiling = unstable_Profiling;
191 -exports.unstable_UserBlockingPriority = UserBlockingPriority;
192 -exports.unstable_cancelCallback = unstable_cancelCallback;
193 -exports.unstable_continueExecution = unstable_continueExecution;
194 -exports.unstable_forceFrameRate = unstable_forceFrameRate;
195 -exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
196 -exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
197 -exports.unstable_next = unstable_next;
198 -exports.unstable_now = unstable_now;
199 -exports.unstable_pauseExecution = unstable_pauseExecution;
200 -exports.unstable_requestPaint = unstable_requestPaint;
201 -exports.unstable_runWithPriority = unstable_runWithPriority;
202 -exports.unstable_scheduleCallback = unstable_scheduleCallback;
203 -exports.unstable_shouldYield = unstable_shouldYield;
204 -exports.unstable_wrapCallback = unstable_wrapCallback;
205 - })();
206 -}
1 -/** @license React v0.20.1
2 - * scheduler-unstable_post_task.production.min.js
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -'use strict';var a=window.performance,g=window.setTimeout,h=global.scheduler,k=a.now.bind(a),l=0,m=3;function p(c,d,b,f){l=k()+5;try{m=c;var e=f(!1);if("function"===typeof e){var n=new TaskController,r={priority:d,signal:n.signal};b._controller=n;h.postTask(p.bind(null,c,d,b,e),r).catch(q)}}catch(t){g(function(){throw t;})}finally{m=3}}function q(){}exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;
10 -exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(c){c._controller.abort()};exports.unstable_continueExecution=function(){};exports.unstable_forceFrameRate=function(){};exports.unstable_getCurrentPriorityLevel=function(){return m};exports.unstable_getFirstCallbackNode=function(){return null};exports.unstable_next=function(c){switch(m){case 1:case 2:case 3:var d=3;break;default:d=m}var b=m;m=d;try{return c()}finally{m=b}};
11 -exports.unstable_now=k;exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=function(){};exports.unstable_runWithPriority=function(c,d){var b=m;m=c;try{return d()}finally{m=b}};
12 -exports.unstable_scheduleCallback=function(c,d,b){switch(c){case 1:case 2:var f="user-blocking";break;case 4:case 3:f="user-visible";break;case 5:f="background";break;default:f="user-visible"}var e=new TaskController;b={priority:f,delay:"object"===typeof b&&null!==b?b.delay:0,signal:e.signal};e={_controller:e};h.postTask(p.bind(null,c,f,e,d),b).catch(q);return e};exports.unstable_shouldYield=function(){return k()>=l};
13 -exports.unstable_wrapCallback=function(c){var d=m;return function(){var b=m;m=d;try{return c()}finally{m=b}}};
1 -/** @license React v0.20.1
2 - * scheduler.production.min.js
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -'use strict';var f,g,h,k;if("object"===typeof performance&&"function"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}
10 -if("undefined"===typeof window||"function"!==typeof MessageChannel){var t=null,u=null,w=function(){if(null!==t)try{var a=exports.unstable_now();t(!0,a);t=null}catch(b){throw setTimeout(w,0),b;}};f=function(a){null!==t?setTimeout(f,0,a):(t=a,setTimeout(w,0))};g=function(a,b){u=setTimeout(a,b)};h=function(){clearTimeout(u)};exports.unstable_shouldYield=function(){return!1};k=exports.unstable_forceFrameRate=function(){}}else{var x=window.setTimeout,y=window.clearTimeout;if("undefined"!==typeof console){var z=
11 -window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");"function"!==typeof z&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var A=!1,B=null,C=-1,D=5,E=0;exports.unstable_shouldYield=function(){return exports.unstable_now()>=
12 -E};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<a?Math.floor(1E3/a):5};var F=new MessageChannel,G=F.port2;F.port1.onmessage=function(){if(null!==B){var a=exports.unstable_now();E=a+D;try{B(!0,a)?G.postMessage(null):(A=!1,B=null)}catch(b){throw G.postMessage(null),b;}}else A=!1};f=function(a){B=a;A||(A=!0,G.postMessage(null))};g=function(a,b){C=
13 -x(function(){a(exports.unstable_now())},b)};h=function(){y(C);C=-1}}function H(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<I(e,b))a[d]=b,a[c]=e,c=d;else break a}}function J(a){a=a[0];return void 0===a?null:a}
14 -function K(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1;
15 -function T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M)}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else{var b=J(M);null!==b&&g(U,b.startTime-a)}}
16 -function V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if("function"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?O.callback=e:O===J(L)&&K(L);T(b)}else K(L);O=J(L)}if(null!==O)var m=!0;else{var n=J(M);null!==n&&g(U,n.startTime-b);m=!1}return m}finally{O=null,P=c,Q=!1}}var W=k;exports.unstable_IdlePriority=5;
17 -exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V))};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)};
18 -exports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P}var c=P;P=b;try{return a()}finally{P=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=P;P=a;try{return b()}finally{P=c}};
19 -exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:N++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a};
20 -exports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c}}};
1 -'use strict';
2 -
3 -if (process.env.NODE_ENV === 'production') {
4 - module.exports = require('./cjs/scheduler.production.min.js');
5 -} else {
6 - module.exports = require('./cjs/scheduler.development.js');
7 -}
1 -{
2 - "_from": "scheduler@^0.20.1",
3 - "_id": "scheduler@0.20.1",
4 - "_inBundle": false,
5 - "_integrity": "sha512-LKTe+2xNJBNxu/QhHvDR14wUXHRQbVY5ZOYpOGWRzhydZUqrLb2JBvLPY7cAqFmqrWuDED0Mjk7013SZiOz6Bw==",
6 - "_location": "/scheduler",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "scheduler@^0.20.1",
12 - "name": "scheduler",
13 - "escapedName": "scheduler",
14 - "rawSpec": "^0.20.1",
15 - "saveSpec": null,
16 - "fetchSpec": "^0.20.1"
17 - },
18 - "_requiredBy": [
19 - "/react-dom"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.1.tgz",
22 - "_shasum": "da0b907e24026b01181ecbc75efdc7f27b5a000c",
23 - "_spec": "scheduler@^0.20.1",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\react-dom",
25 - "browserify": {
26 - "transform": [
27 - "loose-envify"
28 - ]
29 - },
30 - "bugs": {
31 - "url": "https://github.com/facebook/react/issues"
32 - },
33 - "bundleDependencies": false,
34 - "dependencies": {
35 - "loose-envify": "^1.1.0",
36 - "object-assign": "^4.1.1"
37 - },
38 - "deprecated": false,
39 - "description": "Cooperative scheduler for the browser environment.",
40 - "files": [
41 - "LICENSE",
42 - "README.md",
43 - "build-info.json",
44 - "index.js",
45 - "tracing.js",
46 - "tracing-profiling.js",
47 - "unstable_mock.js",
48 - "unstable_post_task.js",
49 - "cjs/",
50 - "umd/"
51 - ],
52 - "homepage": "https://reactjs.org/",
53 - "keywords": [
54 - "react"
55 - ],
56 - "license": "MIT",
57 - "main": "index.js",
58 - "name": "scheduler",
59 - "repository": {
60 - "type": "git",
61 - "url": "git+https://github.com/facebook/react.git",
62 - "directory": "packages/scheduler"
63 - },
64 - "version": "0.20.1"
65 -}
1 -'use strict';
2 -
3 -if (process.env.NODE_ENV === 'production') {
4 - module.exports = require('./cjs/scheduler-tracing.profiling.min.js');
5 -} else {
6 - module.exports = require('./cjs/scheduler-tracing.development.js');
7 -}
1 -'use strict';
2 -
3 -if (process.env.NODE_ENV === 'production') {
4 - module.exports = require('./cjs/scheduler-tracing.production.min.js');
5 -} else {
6 - module.exports = require('./cjs/scheduler-tracing.development.js');
7 -}
1 -/**
2 - * @license React
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -
10 -'use strict';
11 -
12 -(function(global, factory) {
13 - // eslint-disable-next-line no-unused-expressions
14 - typeof exports === 'object' && typeof module !== 'undefined'
15 - ? (module.exports = factory(require('react')))
16 - : typeof define === 'function' && define.amd // eslint-disable-line no-undef
17 - ? define(['react'], factory) // eslint-disable-line no-undef
18 - : (global.SchedulerTracing = factory(global));
19 -})(this, function(global) {
20 - function unstable_clear() {
21 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_clear.apply(
22 - this,
23 - arguments
24 - );
25 - }
26 -
27 - function unstable_getCurrent() {
28 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getCurrent.apply(
29 - this,
30 - arguments
31 - );
32 - }
33 -
34 - function unstable_getThreadID() {
35 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getThreadID.apply(
36 - this,
37 - arguments
38 - );
39 - }
40 -
41 - function unstable_subscribe() {
42 - // eslint-disable-next-line max-len
43 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_subscribe.apply(
44 - this,
45 - arguments
46 - );
47 - }
48 -
49 - function unstable_trace() {
50 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_trace.apply(
51 - this,
52 - arguments
53 - );
54 - }
55 -
56 - function unstable_unsubscribe() {
57 - // eslint-disable-next-line max-len
58 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_unsubscribe.apply(
59 - this,
60 - arguments
61 - );
62 - }
63 -
64 - function unstable_wrap() {
65 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_wrap.apply(
66 - this,
67 - arguments
68 - );
69 - }
70 -
71 - return Object.freeze({
72 - unstable_clear: unstable_clear,
73 - unstable_getCurrent: unstable_getCurrent,
74 - unstable_getThreadID: unstable_getThreadID,
75 - unstable_subscribe: unstable_subscribe,
76 - unstable_trace: unstable_trace,
77 - unstable_unsubscribe: unstable_unsubscribe,
78 - unstable_wrap: unstable_wrap,
79 - });
80 -});
1 -/**
2 - * @license React
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -
10 -'use strict';
11 -
12 -(function(global, factory) {
13 - // eslint-disable-next-line no-unused-expressions
14 - typeof exports === 'object' && typeof module !== 'undefined'
15 - ? (module.exports = factory(require('react')))
16 - : typeof define === 'function' && define.amd // eslint-disable-line no-undef
17 - ? define(['react'], factory) // eslint-disable-line no-undef
18 - : (global.SchedulerTracing = factory(global));
19 -})(this, function(global) {
20 - function unstable_clear() {
21 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_clear.apply(
22 - this,
23 - arguments
24 - );
25 - }
26 -
27 - function unstable_getCurrent() {
28 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getCurrent.apply(
29 - this,
30 - arguments
31 - );
32 - }
33 -
34 - function unstable_getThreadID() {
35 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getThreadID.apply(
36 - this,
37 - arguments
38 - );
39 - }
40 -
41 - function unstable_subscribe() {
42 - // eslint-disable-next-line max-len
43 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_subscribe.apply(
44 - this,
45 - arguments
46 - );
47 - }
48 -
49 - function unstable_trace() {
50 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_trace.apply(
51 - this,
52 - arguments
53 - );
54 - }
55 -
56 - function unstable_unsubscribe() {
57 - // eslint-disable-next-line max-len
58 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_unsubscribe.apply(
59 - this,
60 - arguments
61 - );
62 - }
63 -
64 - function unstable_wrap() {
65 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_wrap.apply(
66 - this,
67 - arguments
68 - );
69 - }
70 -
71 - return Object.freeze({
72 - unstable_clear: unstable_clear,
73 - unstable_getCurrent: unstable_getCurrent,
74 - unstable_getThreadID: unstable_getThreadID,
75 - unstable_subscribe: unstable_subscribe,
76 - unstable_trace: unstable_trace,
77 - unstable_unsubscribe: unstable_unsubscribe,
78 - unstable_wrap: unstable_wrap,
79 - });
80 -});
1 -/**
2 - * @license React
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -
10 -'use strict';
11 -
12 -(function(global, factory) {
13 - // eslint-disable-next-line no-unused-expressions
14 - typeof exports === 'object' && typeof module !== 'undefined'
15 - ? (module.exports = factory(require('react')))
16 - : typeof define === 'function' && define.amd // eslint-disable-line no-undef
17 - ? define(['react'], factory) // eslint-disable-line no-undef
18 - : (global.SchedulerTracing = factory(global));
19 -})(this, function(global) {
20 - function unstable_clear() {
21 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_clear.apply(
22 - this,
23 - arguments
24 - );
25 - }
26 -
27 - function unstable_getCurrent() {
28 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getCurrent.apply(
29 - this,
30 - arguments
31 - );
32 - }
33 -
34 - function unstable_getThreadID() {
35 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getThreadID.apply(
36 - this,
37 - arguments
38 - );
39 - }
40 -
41 - function unstable_subscribe() {
42 - // eslint-disable-next-line max-len
43 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_subscribe.apply(
44 - this,
45 - arguments
46 - );
47 - }
48 -
49 - function unstable_trace() {
50 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_trace.apply(
51 - this,
52 - arguments
53 - );
54 - }
55 -
56 - function unstable_unsubscribe() {
57 - // eslint-disable-next-line max-len
58 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_unsubscribe.apply(
59 - this,
60 - arguments
61 - );
62 - }
63 -
64 - function unstable_wrap() {
65 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_wrap.apply(
66 - this,
67 - arguments
68 - );
69 - }
70 -
71 - return Object.freeze({
72 - unstable_clear: unstable_clear,
73 - unstable_getCurrent: unstable_getCurrent,
74 - unstable_getThreadID: unstable_getThreadID,
75 - unstable_subscribe: unstable_subscribe,
76 - unstable_trace: unstable_trace,
77 - unstable_unsubscribe: unstable_unsubscribe,
78 - unstable_wrap: unstable_wrap,
79 - });
80 -});
1 -/** @license React v0.20.1
2 - * scheduler-unstable_mock.production.min.js
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -(function(){'use strict';(function(a,v){"object"===typeof exports&&"undefined"!==typeof module?v(exports):"function"===typeof define&&define.amd?define(["exports"],v):(a=a||self,v(a.SchedulerMock={}))})(this,function(a){function v(){return-1!==y&&null!==k&&k.length>=y||C&&D?r=!0:!1}function I(){if(f)throw Error("Already flushing work.");if(null!==e){var b=e;f=!0;try{var h=!0;do h=b(!0,g);while(h);h||(e=null);return!0}finally{f=!1}}else return!1}function E(b,h){var c=b.length;b.push(h);a:for(;;){var a=c-1>>>1,
10 -w=b[a];if(void 0!==w&&0<z(w,h))b[a]=h,b[c]=w,c=a;else break a}}function m(b){b=b[0];return void 0===b?null:b}function A(b){var h=b[0];if(void 0!==h){var c=b.pop();if(c!==h){b[0]=c;a:for(var a=0,w=b.length;a<w;){var d=2*(a+1)-1,e=b[d],g=d+1,f=b[g];if(void 0!==e&&0>z(e,c))void 0!==f&&0>z(f,e)?(b[a]=f,b[g]=c,a=g):(b[a]=e,b[d]=c,a=d);else if(void 0!==f&&0>z(f,c))b[a]=f,b[g]=c,a=g;else break a}}return h}return null}function z(b,h){var a=b.sortIndex-h.sortIndex;return 0!==a?a:b.id-h.id}function F(b){for(var a=
11 -m(p);null!==a;){if(null===a.callback)A(p);else if(a.startTime<=b)A(p),a.sortIndex=a.expirationTime,E(n,a);else break;a=m(p)}}function G(b){x=!1;F(b);if(!t)if(null!==m(n))t=!0,e=H;else{var a=m(p);null!==a&&(b=a.startTime-b,q=G,u=g+b)}}function H(b,a){t=!1;x&&(x=!1,q=null,u=-1);B=!0;var c=d;try{F(a);for(l=m(n);null!==l&&(!(l.expirationTime>a)||b&&!v());){var h=l.callback;if("function"===typeof h){l.callback=null;d=l.priorityLevel;var e=h(l.expirationTime<=a);a=g;"function"===typeof e?l.callback=e:l===
12 -m(n)&&A(n);F(a)}else A(n);l=m(n)}if(null!==l)var f=!0;else{var k=m(p);if(null!==k){var r=k.startTime-a;q=G;u=g+r}f=!1}return f}finally{l=null,d=c,B=!1}}var g=0,e=null,q=null,u=-1,k=null,y=-1,r=!1,f=!1,D=!1,C=!1,n=[],p=[],J=1,l=null,d=3,B=!1,t=!1,x=!1;a.unstable_IdlePriority=5;a.unstable_ImmediatePriority=1;a.unstable_LowPriority=4;a.unstable_NormalPriority=3;a.unstable_Profiling=null;a.unstable_UserBlockingPriority=2;a.unstable_advanceTime=function(b){"disabledLog"!==console.log.name&&(g+=b,null!==
13 -q&&u<=g&&(q(g),u=-1,q=null))};a.unstable_cancelCallback=function(b){b.callback=null};a.unstable_clearYields=function(){if(null===k)return[];var b=k;k=null;return b};a.unstable_continueExecution=function(){t||B||(t=!0,e=H)};a.unstable_flushAll=function(){if(null!==k)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");I();if(null!==k)throw Error("While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])");
14 -};a.unstable_flushAllWithoutAsserting=I;a.unstable_flushExpired=function(){if(f)throw Error("Already flushing work.");if(null!==e){f=!0;try{e(!1,g)||(e=null)}finally{f=!1}}};a.unstable_flushNumberOfYields=function(b){if(f)throw Error("Already flushing work.");if(null!==e){var a=e;y=b;f=!0;try{b=!0;do b=a(!0,g);while(b&&!r);b||(e=null)}finally{y=-1,f=r=!1}}};a.unstable_flushUntilNextPaint=function(){if(f)throw Error("Already flushing work.");if(null!==e){var b=e;C=!0;D=!1;f=!0;try{var a=!0;do a=b(!0,
15 -g);while(a&&!r);a||(e=null)}finally{f=r=C=!1}}};a.unstable_forceFrameRate=function(){};a.unstable_getCurrentPriorityLevel=function(){return d};a.unstable_getFirstCallbackNode=function(){return m(n)};a.unstable_next=function(b){switch(d){case 1:case 2:case 3:var a=3;break;default:a=d}var c=d;d=a;try{return b()}finally{d=c}};a.unstable_now=function(){return g};a.unstable_pauseExecution=function(){};a.unstable_requestPaint=function(){D=!0};a.unstable_runWithPriority=function(a,e){switch(a){case 1:case 2:case 3:case 4:case 5:break;
16 -default:a=3}var b=d;d=a;try{return e()}finally{d=b}};a.unstable_scheduleCallback=function(a,f,c){var b=g;"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?b+c:b):c=b;switch(a){case 1:var d=-1;break;case 2:d=250;break;case 5:d=1073741823;break;case 4:d=1E4;break;default:d=5E3}d=c+d;a={id:J++,callback:f,priorityLevel:a,startTime:c,expirationTime:d,sortIndex:-1};c>b?(a.sortIndex=c,E(p,a),null===m(n)&&a===m(p)&&(x?(q=null,u=-1):x=!0,q=G,u=g+(c-b))):(a.sortIndex=d,E(n,a),t||B||(t=!0,
17 -e=H));return a};a.unstable_shouldYield=v;a.unstable_wrapCallback=function(a){var b=d;return function(){var c=d;d=b;try{return a.apply(this,arguments)}finally{d=c}}};a.unstable_yieldValue=function(a){"disabledLog"!==console.log.name&&(null===k?k=[a]:k.push(a))}});
18 -})();
1 -/**
2 - * @license React
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -
10 -/* eslint-disable max-len */
11 -
12 -'use strict';
13 -
14 -(function(global, factory) {
15 - // eslint-disable-next-line no-unused-expressions
16 - typeof exports === 'object' && typeof module !== 'undefined'
17 - ? (module.exports = factory(require('react')))
18 - : typeof define === 'function' && define.amd // eslint-disable-line no-undef
19 - ? define(['react'], factory) // eslint-disable-line no-undef
20 - : (global.Scheduler = factory(global));
21 -})(this, function(global) {
22 - function unstable_now() {
23 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
24 - this,
25 - arguments
26 - );
27 - }
28 -
29 - function unstable_scheduleCallback() {
30 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
31 - this,
32 - arguments
33 - );
34 - }
35 -
36 - function unstable_cancelCallback() {
37 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
38 - this,
39 - arguments
40 - );
41 - }
42 -
43 - function unstable_shouldYield() {
44 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
45 - this,
46 - arguments
47 - );
48 - }
49 -
50 - function unstable_requestPaint() {
51 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
52 - this,
53 - arguments
54 - );
55 - }
56 -
57 - function unstable_runWithPriority() {
58 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
59 - this,
60 - arguments
61 - );
62 - }
63 -
64 - function unstable_next() {
65 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
66 - this,
67 - arguments
68 - );
69 - }
70 -
71 - function unstable_wrapCallback() {
72 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
73 - this,
74 - arguments
75 - );
76 - }
77 -
78 - function unstable_getCurrentPriorityLevel() {
79 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
80 - this,
81 - arguments
82 - );
83 - }
84 -
85 - function unstable_getFirstCallbackNode() {
86 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
87 - this,
88 - arguments
89 - );
90 - }
91 -
92 - function unstable_pauseExecution() {
93 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_pauseExecution.apply(
94 - this,
95 - arguments
96 - );
97 - }
98 -
99 - function unstable_continueExecution() {
100 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_continueExecution.apply(
101 - this,
102 - arguments
103 - );
104 - }
105 -
106 - function unstable_forceFrameRate() {
107 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
108 - this,
109 - arguments
110 - );
111 - }
112 -
113 - return Object.freeze({
114 - unstable_now: unstable_now,
115 - unstable_scheduleCallback: unstable_scheduleCallback,
116 - unstable_cancelCallback: unstable_cancelCallback,
117 - unstable_shouldYield: unstable_shouldYield,
118 - unstable_requestPaint: unstable_requestPaint,
119 - unstable_runWithPriority: unstable_runWithPriority,
120 - unstable_next: unstable_next,
121 - unstable_wrapCallback: unstable_wrapCallback,
122 - unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
123 - unstable_continueExecution: unstable_continueExecution,
124 - unstable_pauseExecution: unstable_pauseExecution,
125 - unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
126 - unstable_forceFrameRate: unstable_forceFrameRate,
127 - get unstable_IdlePriority() {
128 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
129 - .Scheduler.unstable_IdlePriority;
130 - },
131 - get unstable_ImmediatePriority() {
132 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
133 - .Scheduler.unstable_ImmediatePriority;
134 - },
135 - get unstable_LowPriority() {
136 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
137 - .Scheduler.unstable_LowPriority;
138 - },
139 - get unstable_NormalPriority() {
140 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
141 - .Scheduler.unstable_NormalPriority;
142 - },
143 - get unstable_UserBlockingPriority() {
144 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
145 - .Scheduler.unstable_UserBlockingPriority;
146 - },
147 - get unstable_Profiling() {
148 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
149 - .Scheduler.unstable_Profiling;
150 - },
151 - });
152 -});
1 -/**
2 - * @license React
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -
10 -/* eslint-disable max-len */
11 -
12 -'use strict';
13 -
14 -(function(global, factory) {
15 - // eslint-disable-next-line no-unused-expressions
16 - typeof exports === 'object' && typeof module !== 'undefined'
17 - ? (module.exports = factory(require('react')))
18 - : typeof define === 'function' && define.amd // eslint-disable-line no-undef
19 - ? define(['react'], factory) // eslint-disable-line no-undef
20 - : (global.Scheduler = factory(global));
21 -})(this, function(global) {
22 - function unstable_now() {
23 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
24 - this,
25 - arguments
26 - );
27 - }
28 -
29 - function unstable_scheduleCallback() {
30 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
31 - this,
32 - arguments
33 - );
34 - }
35 -
36 - function unstable_cancelCallback() {
37 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
38 - this,
39 - arguments
40 - );
41 - }
42 -
43 - function unstable_shouldYield() {
44 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
45 - this,
46 - arguments
47 - );
48 - }
49 -
50 - function unstable_requestPaint() {
51 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
52 - this,
53 - arguments
54 - );
55 - }
56 -
57 - function unstable_runWithPriority() {
58 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
59 - this,
60 - arguments
61 - );
62 - }
63 -
64 - function unstable_next() {
65 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
66 - this,
67 - arguments
68 - );
69 - }
70 -
71 - function unstable_wrapCallback() {
72 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
73 - this,
74 - arguments
75 - );
76 - }
77 -
78 - function unstable_getCurrentPriorityLevel() {
79 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
80 - this,
81 - arguments
82 - );
83 - }
84 -
85 - function unstable_getFirstCallbackNode() {
86 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
87 - this,
88 - arguments
89 - );
90 - }
91 -
92 - function unstable_pauseExecution() {
93 - return undefined;
94 - }
95 -
96 - function unstable_continueExecution() {
97 - return undefined;
98 - }
99 -
100 - function unstable_forceFrameRate() {
101 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
102 - this,
103 - arguments
104 - );
105 - }
106 -
107 - return Object.freeze({
108 - unstable_now: unstable_now,
109 - unstable_scheduleCallback: unstable_scheduleCallback,
110 - unstable_cancelCallback: unstable_cancelCallback,
111 - unstable_shouldYield: unstable_shouldYield,
112 - unstable_requestPaint: unstable_requestPaint,
113 - unstable_runWithPriority: unstable_runWithPriority,
114 - unstable_next: unstable_next,
115 - unstable_wrapCallback: unstable_wrapCallback,
116 - unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
117 - unstable_continueExecution: unstable_continueExecution,
118 - unstable_pauseExecution: unstable_pauseExecution,
119 - unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
120 - unstable_forceFrameRate: unstable_forceFrameRate,
121 - get unstable_IdlePriority() {
122 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
123 - .Scheduler.unstable_IdlePriority;
124 - },
125 - get unstable_ImmediatePriority() {
126 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
127 - .Scheduler.unstable_ImmediatePriority;
128 - },
129 - get unstable_LowPriority() {
130 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
131 - .Scheduler.unstable_LowPriority;
132 - },
133 - get unstable_NormalPriority() {
134 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
135 - .Scheduler.unstable_NormalPriority;
136 - },
137 - get unstable_UserBlockingPriority() {
138 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
139 - .Scheduler.unstable_UserBlockingPriority;
140 - },
141 - get unstable_Profiling() {
142 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
143 - .Scheduler.unstable_Profiling;
144 - },
145 - });
146 -});
1 -/**
2 - * @license React
3 - *
4 - * Copyright (c) Facebook, Inc. and its affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -
10 -/* eslint-disable max-len */
11 -
12 -'use strict';
13 -
14 -(function(global, factory) {
15 - // eslint-disable-next-line no-unused-expressions
16 - typeof exports === 'object' && typeof module !== 'undefined'
17 - ? (module.exports = factory(require('react')))
18 - : typeof define === 'function' && define.amd // eslint-disable-line no-undef
19 - ? define(['react'], factory) // eslint-disable-line no-undef
20 - : (global.Scheduler = factory(global));
21 -})(this, function(global) {
22 - function unstable_now() {
23 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
24 - this,
25 - arguments
26 - );
27 - }
28 -
29 - function unstable_scheduleCallback() {
30 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
31 - this,
32 - arguments
33 - );
34 - }
35 -
36 - function unstable_cancelCallback() {
37 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
38 - this,
39 - arguments
40 - );
41 - }
42 -
43 - function unstable_shouldYield() {
44 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
45 - this,
46 - arguments
47 - );
48 - }
49 -
50 - function unstable_requestPaint() {
51 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
52 - this,
53 - arguments
54 - );
55 - }
56 -
57 - function unstable_runWithPriority() {
58 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
59 - this,
60 - arguments
61 - );
62 - }
63 -
64 - function unstable_next() {
65 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
66 - this,
67 - arguments
68 - );
69 - }
70 -
71 - function unstable_wrapCallback() {
72 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
73 - this,
74 - arguments
75 - );
76 - }
77 -
78 - function unstable_getCurrentPriorityLevel() {
79 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
80 - this,
81 - arguments
82 - );
83 - }
84 -
85 - function unstable_getFirstCallbackNode() {
86 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
87 - this,
88 - arguments
89 - );
90 - }
91 -
92 - function unstable_pauseExecution() {
93 - return undefined;
94 - }
95 -
96 - function unstable_continueExecution() {
97 - return undefined;
98 - }
99 -
100 - function unstable_forceFrameRate() {
101 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
102 - this,
103 - arguments
104 - );
105 - }
106 -
107 - return Object.freeze({
108 - unstable_now: unstable_now,
109 - unstable_scheduleCallback: unstable_scheduleCallback,
110 - unstable_cancelCallback: unstable_cancelCallback,
111 - unstable_shouldYield: unstable_shouldYield,
112 - unstable_requestPaint: unstable_requestPaint,
113 - unstable_runWithPriority: unstable_runWithPriority,
114 - unstable_next: unstable_next,
115 - unstable_wrapCallback: unstable_wrapCallback,
116 - unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
117 - unstable_continueExecution: unstable_continueExecution,
118 - unstable_pauseExecution: unstable_pauseExecution,
119 - unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
120 - unstable_forceFrameRate: unstable_forceFrameRate,
121 - get unstable_IdlePriority() {
122 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
123 - .Scheduler.unstable_IdlePriority;
124 - },
125 - get unstable_ImmediatePriority() {
126 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
127 - .Scheduler.unstable_ImmediatePriority;
128 - },
129 - get unstable_LowPriority() {
130 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
131 - .Scheduler.unstable_LowPriority;
132 - },
133 - get unstable_NormalPriority() {
134 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
135 - .Scheduler.unstable_NormalPriority;
136 - },
137 - get unstable_UserBlockingPriority() {
138 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
139 - .Scheduler.unstable_UserBlockingPriority;
140 - },
141 - get unstable_Profiling() {
142 - return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
143 - .Scheduler.unstable_Profiling;
144 - },
145 - });
146 -});
1 -'use strict';
2 -
3 -if (process.env.NODE_ENV === 'production') {
4 - module.exports = require('./cjs/scheduler-unstable_mock.production.min.js');
5 -} else {
6 - module.exports = require('./cjs/scheduler-unstable_mock.development.js');
7 -}
1 -'use strict';
2 -
3 -if (process.env.NODE_ENV === 'production') {
4 - module.exports = require('./cjs/scheduler-unstable_post_task.production.min.js');
5 -} else {
6 - module.exports = require('./cjs/scheduler-unstable_post_task.development.js');
7 -}
This diff is collapsed. Click to expand it.
1 -Copyright JS Foundation and other contributors
2 -
3 -Permission is hereby granted, free of charge, to any person obtaining
4 -a copy of this software and associated documentation files (the
5 -'Software'), to deal in the Software without restriction, including
6 -without limitation the rights to use, copy, modify, merge, publish,
7 -distribute, sublicense, and/or sell copies of the Software, and to
8 -permit persons to whom the Software is furnished to do so, subject to
9 -the following conditions:
10 -
11 -The above copyright notice and this permission notice shall be
12 -included in all copies or substantial portions of the Software.
13 -
14 -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15 -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 -<div align="center">
2 - <a href="http://json-schema.org">
3 - <img width="160" height="160"
4 - src="https://raw.githubusercontent.com/webpack-contrib/schema-utils/master/.github/assets/logo.png">
5 - </a>
6 - <a href="https://github.com/webpack/webpack">
7 - <img width="200" height="200"
8 - src="https://webpack.js.org/assets/icon-square-big.svg">
9 - </a>
10 -</div>
11 -
12 -[![npm][npm]][npm-url]
13 -[![node][node]][node-url]
14 -[![deps][deps]][deps-url]
15 -[![tests][tests]][tests-url]
16 -[![coverage][cover]][cover-url]
17 -[![chat][chat]][chat-url]
18 -[![size][size]][size-url]
19 -
20 -# schema-utils
21 -
22 -Package for validate options in loaders and plugins.
23 -
24 -## Getting Started
25 -
26 -To begin, you'll need to install `schema-utils`:
27 -
28 -```console
29 -npm install schema-utils
30 -```
31 -
32 -## API
33 -
34 -**schema.json**
35 -
36 -```json
37 -{
38 - "type": "object",
39 - "properties": {
40 - "option": {
41 - "type": "boolean"
42 - }
43 - },
44 - "additionalProperties": false
45 -}
46 -```
47 -
48 -```js
49 -import schema from './path/to/schema.json';
50 -import validate from 'schema-utils';
51 -
52 -const options = { option: true };
53 -const configuration = { name: 'Loader Name/Plugin Name/Name' };
54 -
55 -validate(schema, options, configuration);
56 -```
57 -
58 -### `schema`
59 -
60 -Type: `String`
61 -
62 -JSON schema.
63 -
64 -Simple example of schema:
65 -
66 -```json
67 -{
68 - "type": "object",
69 - "properties": {
70 - "name": {
71 - "description": "This is description of option.",
72 - "type": "string"
73 - }
74 - },
75 - "additionalProperties": false
76 -}
77 -```
78 -
79 -### `options`
80 -
81 -Type: `Object`
82 -
83 -Object with options.
84 -
85 -```js
86 -validate(
87 - schema,
88 - {
89 - name: 123,
90 - },
91 - { name: 'MyPlugin' }
92 -);
93 -```
94 -
95 -### `configuration`
96 -
97 -Allow to configure validator.
98 -
99 -There is an alternative method to configure the `name` and`baseDataPath` options via the `title` property in the schema.
100 -For example:
101 -
102 -```json
103 -{
104 - "title": "My Loader options",
105 - "type": "object",
106 - "properties": {
107 - "name": {
108 - "description": "This is description of option.",
109 - "type": "string"
110 - }
111 - },
112 - "additionalProperties": false
113 -}
114 -```
115 -
116 -The last word used for the `baseDataPath` option, other words used for the `name` option.
117 -Based on the example above the `name` option equals `My Loader`, the `baseDataPath` option equals `options`.
118 -
119 -#### `name`
120 -
121 -Type: `Object`
122 -Default: `"Object"`
123 -
124 -Allow to setup name in validation errors.
125 -
126 -```js
127 -validate(schema, options, { name: 'MyPlugin' });
128 -```
129 -
130 -```shell
131 -Invalid configuration object. MyPlugin has been initialised using a configuration object that does not match the API schema.
132 - - configuration.optionName should be a integer.
133 -```
134 -
135 -#### `baseDataPath`
136 -
137 -Type: `String`
138 -Default: `"configuration"`
139 -
140 -Allow to setup base data path in validation errors.
141 -
142 -```js
143 -validate(schema, options, { name: 'MyPlugin', baseDataPath: 'options' });
144 -```
145 -
146 -```shell
147 -Invalid options object. MyPlugin has been initialised using an options object that does not match the API schema.
148 - - options.optionName should be a integer.
149 -```
150 -
151 -#### `postFormatter`
152 -
153 -Type: `Function`
154 -Default: `undefined`
155 -
156 -Allow to reformat errors.
157 -
158 -```js
159 -validate(schema, options, {
160 - name: 'MyPlugin',
161 - postFormatter: (formattedError, error) => {
162 - if (error.keyword === 'type') {
163 - return `${formattedError}\nAdditional Information.`;
164 - }
165 -
166 - return formattedError;
167 - },
168 -});
169 -```
170 -
171 -```shell
172 -Invalid options object. MyPlugin has been initialized using an options object that does not match the API schema.
173 - - options.optionName should be a integer.
174 - Additional Information.
175 -```
176 -
177 -## Examples
178 -
179 -**schema.json**
180 -
181 -```json
182 -{
183 - "type": "object",
184 - "properties": {
185 - "name": {
186 - "type": "string"
187 - },
188 - "test": {
189 - "anyOf": [
190 - { "type": "array" },
191 - { "type": "string" },
192 - { "instanceof": "RegExp" }
193 - ]
194 - },
195 - "transform": {
196 - "instanceof": "Function"
197 - },
198 - "sourceMap": {
199 - "type": "boolean"
200 - }
201 - },
202 - "additionalProperties": false
203 -}
204 -```
205 -
206 -### `Loader`
207 -
208 -```js
209 -import { getOptions } from 'loader-utils';
210 -import validateOptions from 'schema-utils';
211 -
212 -import schema from 'path/to/schema.json';
213 -
214 -function loader(src, map) {
215 - const options = getOptions(this) || {};
216 -
217 - validateOptions(schema, options, {
218 - name: 'Loader Name',
219 - baseDataPath: 'options',
220 - });
221 -
222 - // Code...
223 -}
224 -
225 -export default loader;
226 -```
227 -
228 -### `Plugin`
229 -
230 -```js
231 -import validateOptions from 'schema-utils';
232 -
233 -import schema from 'path/to/schema.json';
234 -
235 -class Plugin {
236 - constructor(options) {
237 - validateOptions(schema, options, {
238 - name: 'Plugin Name',
239 - baseDataPath: 'options',
240 - });
241 -
242 - this.options = options;
243 - }
244 -
245 - apply(compiler) {
246 - // Code...
247 - }
248 -}
249 -
250 -export default Plugin;
251 -```
252 -
253 -## Contributing
254 -
255 -Please take a moment to read our contributing guidelines if you haven't yet done so.
256 -
257 -[CONTRIBUTING](./.github/CONTRIBUTING.md)
258 -
259 -## License
260 -
261 -[MIT](./LICENSE)
262 -
263 -[npm]: https://img.shields.io/npm/v/schema-utils.svg
264 -[npm-url]: https://npmjs.com/package/schema-utils
265 -[node]: https://img.shields.io/node/v/schema-utils.svg
266 -[node-url]: https://nodejs.org
267 -[deps]: https://david-dm.org/webpack/schema-utils.svg
268 -[deps-url]: https://david-dm.org/webpack/schema-utils
269 -[tests]: https://github.com/webpack/schema-utils/workflows/schema-utils/badge.svg
270 -[tests-url]: https://github.com/webpack/schema-utils/actions
271 -[cover]: https://codecov.io/gh/webpack/schema-utils/branch/master/graph/badge.svg
272 -[cover-url]: https://codecov.io/gh/webpack/schema-utils
273 -[chat]: https://badges.gitter.im/webpack/webpack.svg
274 -[chat-url]: https://gitter.im/webpack/webpack
275 -[size]: https://packagephobia.com/badge?p=schema-utils
276 -[size-url]: https://packagephobia.com/result?p=schema-utils
1 -export default ValidationError;
2 -export type JSONSchema6 = import('json-schema').JSONSchema6;
3 -export type JSONSchema7 = import('json-schema').JSONSchema7;
4 -export type Schema =
5 - | (import('json-schema').JSONSchema4 & import('./validate').Extend)
6 - | (import('json-schema').JSONSchema6 & import('./validate').Extend)
7 - | (import('json-schema').JSONSchema7 & import('./validate').Extend);
8 -export type ValidationErrorConfiguration = {
9 - name?: string | undefined;
10 - baseDataPath?: string | undefined;
11 - postFormatter?: import('./validate').PostFormatter | undefined;
12 -};
13 -export type PostFormatter = (
14 - formattedError: string,
15 - error: import('ajv').ErrorObject & {
16 - children?: import('ajv').ErrorObject[] | undefined;
17 - }
18 -) => string;
19 -export type SchemaUtilErrorObject = import('ajv').ErrorObject & {
20 - children?: import('ajv').ErrorObject[] | undefined;
21 -};
22 -export type SPECIFICITY = number;
23 -declare class ValidationError extends Error {
24 - /**
25 - * @param {Array<SchemaUtilErrorObject>} errors
26 - * @param {Schema} schema
27 - * @param {ValidationErrorConfiguration} configuration
28 - */
29 - constructor(
30 - errors: Array<SchemaUtilErrorObject>,
31 - schema: Schema,
32 - configuration?: ValidationErrorConfiguration
33 - );
34 - /** @type {Array<SchemaUtilErrorObject>} */
35 - errors: Array<SchemaUtilErrorObject>;
36 - /** @type {Schema} */
37 - schema: Schema;
38 - /** @type {string} */
39 - headerName: string;
40 - /** @type {string} */
41 - baseDataPath: string;
42 - /** @type {PostFormatter | null} */
43 - postFormatter: PostFormatter | null;
44 - /**
45 - * @param {string} path
46 - * @returns {Schema}
47 - */
48 - getSchemaPart(path: string): Schema;
49 - /**
50 - * @param {Schema} schema
51 - * @param {boolean} logic
52 - * @param {Array<Object>} prevSchemas
53 - * @returns {string}
54 - */
55 - formatSchema(
56 - schema: Schema,
57 - logic?: boolean,
58 - prevSchemas?: Array<Object>
59 - ): string;
60 - /**
61 - * @param {Schema=} schemaPart
62 - * @param {(boolean | Array<string>)=} additionalPath
63 - * @param {boolean=} needDot
64 - * @param {boolean=} logic
65 - * @returns {string}
66 - */
67 - getSchemaPartText(
68 - schemaPart?: Schema | undefined,
69 - additionalPath?: (boolean | Array<string>) | undefined,
70 - needDot?: boolean | undefined,
71 - logic?: boolean | undefined
72 - ): string;
73 - /**
74 - * @param {Schema=} schemaPart
75 - * @returns {string}
76 - */
77 - getSchemaPartDescription(schemaPart?: Schema | undefined): string;
78 - /**
79 - * @param {SchemaUtilErrorObject} error
80 - * @returns {string}
81 - */
82 - formatValidationError(error: SchemaUtilErrorObject): string;
83 - /**
84 - * @param {Array<SchemaUtilErrorObject>} errors
85 - * @returns {string}
86 - */
87 - formatValidationErrors(errors: Array<SchemaUtilErrorObject>): string;
88 -}
1 -declare const _exports: typeof import('./validate').default;
2 -export = _exports;
1 -export default addAbsolutePathKeyword;
2 -export type Ajv = import('ajv').Ajv;
3 -export type ValidateFunction = import('ajv').ValidateFunction;
4 -export type SchemaUtilErrorObject = import('ajv').ErrorObject & {
5 - children?: import('ajv').ErrorObject[] | undefined;
6 -};
7 -/**
8 - *
9 - * @param {Ajv} ajv
10 - * @returns {Ajv}
11 - */
12 -declare function addAbsolutePathKeyword(ajv: Ajv): Ajv;
1 -export = Range;
2 -/**
3 - * @typedef {[number, boolean]} RangeValue
4 - */
5 -/**
6 - * @callback RangeValueCallback
7 - * @param {RangeValue} rangeValue
8 - * @returns {boolean}
9 - */
10 -declare class Range {
11 - /**
12 - * @param {"left" | "right"} side
13 - * @param {boolean} exclusive
14 - * @returns {">" | ">=" | "<" | "<="}
15 - */
16 - static getOperator(
17 - side: 'left' | 'right',
18 - exclusive: boolean
19 - ): '>' | '>=' | '<' | '<=';
20 - /**
21 - * @param {number} value
22 - * @param {boolean} logic is not logic applied
23 - * @param {boolean} exclusive is range exclusive
24 - * @returns {string}
25 - */
26 - static formatRight(value: number, logic: boolean, exclusive: boolean): string;
27 - /**
28 - * @param {number} value
29 - * @param {boolean} logic is not logic applied
30 - * @param {boolean} exclusive is range exclusive
31 - * @returns {string}
32 - */
33 - static formatLeft(value: number, logic: boolean, exclusive: boolean): string;
34 - /**
35 - * @param {number} start left side value
36 - * @param {number} end right side value
37 - * @param {boolean} startExclusive is range exclusive from left side
38 - * @param {boolean} endExclusive is range exclusive from right side
39 - * @param {boolean} logic is not logic applied
40 - * @returns {string}
41 - */
42 - static formatRange(
43 - start: number,
44 - end: number,
45 - startExclusive: boolean,
46 - endExclusive: boolean,
47 - logic: boolean
48 - ): string;
49 - /**
50 - * @param {Array<RangeValue>} values
51 - * @param {boolean} logic is not logic applied
52 - * @return {RangeValue} computed value and it's exclusive flag
53 - */
54 - static getRangeValue(
55 - values: Array<[number, boolean]>,
56 - logic: boolean
57 - ): [number, boolean];
58 - /** @type {Array<RangeValue>} */
59 - _left: Array<[number, boolean]>;
60 - /** @type {Array<RangeValue>} */
61 - _right: Array<[number, boolean]>;
62 - /**
63 - * @param {number} value
64 - * @param {boolean=} exclusive
65 - */
66 - left(value: number, exclusive?: boolean | undefined): void;
67 - /**
68 - * @param {number} value
69 - * @param {boolean=} exclusive
70 - */
71 - right(value: number, exclusive?: boolean | undefined): void;
72 - /**
73 - * @param {boolean} logic is not logic applied
74 - * @return {string} "smart" range string representation
75 - */
76 - format(logic?: boolean): string;
77 -}
78 -declare namespace Range {
79 - export { RangeValue, RangeValueCallback };
80 -}
81 -type RangeValue = [number, boolean];
82 -type RangeValueCallback = (rangeValue: [number, boolean]) => boolean;
1 -export function stringHints(schema: Schema, logic: boolean): string[];
2 -export function numberHints(schema: Schema, logic: boolean): string[];
3 -export type Schema =
4 - | (import('json-schema').JSONSchema4 & import('../validate').Extend)
5 - | (import('json-schema').JSONSchema6 & import('../validate').Extend)
6 - | (import('json-schema').JSONSchema7 & import('../validate').Extend);
1 -export default validate;
2 -export type JSONSchema4 = import('json-schema').JSONSchema4;
3 -export type JSONSchema6 = import('json-schema').JSONSchema6;
4 -export type JSONSchema7 = import('json-schema').JSONSchema7;
5 -export type ErrorObject = import('ajv').ErrorObject;
6 -export type Extend = {
7 - formatMinimum?: number | undefined;
8 - formatMaximum?: number | undefined;
9 - formatExclusiveMinimum?: boolean | undefined;
10 - formatExclusiveMaximum?: boolean | undefined;
11 -};
12 -export type Schema =
13 - | (import('json-schema').JSONSchema4 & Extend)
14 - | (import('json-schema').JSONSchema6 & Extend)
15 - | (import('json-schema').JSONSchema7 & Extend);
16 -export type SchemaUtilErrorObject = import('ajv').ErrorObject & {
17 - children?: import('ajv').ErrorObject[] | undefined;
18 -};
19 -export type PostFormatter = (
20 - formattedError: string,
21 - error: SchemaUtilErrorObject
22 -) => string;
23 -export type ValidationErrorConfiguration = {
24 - name?: string | undefined;
25 - baseDataPath?: string | undefined;
26 - postFormatter?: PostFormatter | undefined;
27 -};
28 -/**
29 - * @param {Schema} schema
30 - * @param {Array<object> | object} options
31 - * @param {ValidationErrorConfiguration=} configuration
32 - * @returns {void}
33 - */
34 -declare function validate(
35 - schema: Schema,
36 - options: Array<object> | object,
37 - configuration?: ValidationErrorConfiguration | undefined
38 -): void;
39 -declare namespace validate {
40 - export { ValidationError };
41 - export { ValidationError as ValidateError };
42 -}
43 -import ValidationError from './ValidationError';
1 -"use strict";
2 -
3 -const validate = require('./validate');
4 -
5 -module.exports = validate.default;
...\ No newline at end of file ...\ No newline at end of file
1 -"use strict";
2 -
3 -Object.defineProperty(exports, "__esModule", {
4 - value: true
5 -});
6 -exports.default = void 0;
7 -
8 -/** @typedef {import("ajv").Ajv} Ajv */
9 -
10 -/** @typedef {import("ajv").ValidateFunction} ValidateFunction */
11 -
12 -/** @typedef {import("../validate").SchemaUtilErrorObject} SchemaUtilErrorObject */
13 -
14 -/**
15 - * @param {string} message
16 - * @param {object} schema
17 - * @param {string} data
18 - * @returns {SchemaUtilErrorObject}
19 - */
20 -function errorMessage(message, schema, data) {
21 - return {
22 - // @ts-ignore
23 - // eslint-disable-next-line no-undefined
24 - dataPath: undefined,
25 - // @ts-ignore
26 - // eslint-disable-next-line no-undefined
27 - schemaPath: undefined,
28 - keyword: 'absolutePath',
29 - params: {
30 - absolutePath: data
31 - },
32 - message,
33 - parentSchema: schema
34 - };
35 -}
36 -/**
37 - * @param {boolean} shouldBeAbsolute
38 - * @param {object} schema
39 - * @param {string} data
40 - * @returns {SchemaUtilErrorObject}
41 - */
42 -
43 -
44 -function getErrorFor(shouldBeAbsolute, schema, data) {
45 - const message = shouldBeAbsolute ? `The provided value ${JSON.stringify(data)} is not an absolute path!` : `A relative path is expected. However, the provided value ${JSON.stringify(data)} is an absolute path!`;
46 - return errorMessage(message, schema, data);
47 -}
48 -/**
49 - *
50 - * @param {Ajv} ajv
51 - * @returns {Ajv}
52 - */
53 -
54 -
55 -function addAbsolutePathKeyword(ajv) {
56 - ajv.addKeyword('absolutePath', {
57 - errors: true,
58 - type: 'string',
59 -
60 - compile(schema, parentSchema) {
61 - /** @type {ValidateFunction} */
62 - const callback = data => {
63 - let passes = true;
64 - const isExclamationMarkPresent = data.includes('!');
65 -
66 - if (isExclamationMarkPresent) {
67 - callback.errors = [errorMessage(`The provided value ${JSON.stringify(data)} contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.`, parentSchema, data)];
68 - passes = false;
69 - } // ?:[A-Za-z]:\\ - Windows absolute path
70 - // \\\\ - Windows network absolute path
71 - // \/ - Unix-like OS absolute path
72 -
73 -
74 - const isCorrectAbsolutePath = schema === /^(?:[A-Za-z]:(\\|\/)|\\\\|\/)/.test(data);
75 -
76 - if (!isCorrectAbsolutePath) {
77 - callback.errors = [getErrorFor(schema, parentSchema, data)];
78 - passes = false;
79 - }
80 -
81 - return passes;
82 - };
83 -
84 - callback.errors = [];
85 - return callback;
86 - }
87 -
88 - });
89 - return ajv;
90 -}
91 -
92 -var _default = addAbsolutePathKeyword;
93 -exports.default = _default;
...\ No newline at end of file ...\ No newline at end of file
1 -"use strict";
2 -
3 -/**
4 - * @typedef {[number, boolean]} RangeValue
5 - */
6 -
7 -/**
8 - * @callback RangeValueCallback
9 - * @param {RangeValue} rangeValue
10 - * @returns {boolean}
11 - */
12 -class Range {
13 - /**
14 - * @param {"left" | "right"} side
15 - * @param {boolean} exclusive
16 - * @returns {">" | ">=" | "<" | "<="}
17 - */
18 - static getOperator(side, exclusive) {
19 - if (side === 'left') {
20 - return exclusive ? '>' : '>=';
21 - }
22 -
23 - return exclusive ? '<' : '<=';
24 - }
25 - /**
26 - * @param {number} value
27 - * @param {boolean} logic is not logic applied
28 - * @param {boolean} exclusive is range exclusive
29 - * @returns {string}
30 - */
31 -
32 -
33 - static formatRight(value, logic, exclusive) {
34 - if (logic === false) {
35 - return Range.formatLeft(value, !logic, !exclusive);
36 - }
37 -
38 - return `should be ${Range.getOperator('right', exclusive)} ${value}`;
39 - }
40 - /**
41 - * @param {number} value
42 - * @param {boolean} logic is not logic applied
43 - * @param {boolean} exclusive is range exclusive
44 - * @returns {string}
45 - */
46 -
47 -
48 - static formatLeft(value, logic, exclusive) {
49 - if (logic === false) {
50 - return Range.formatRight(value, !logic, !exclusive);
51 - }
52 -
53 - return `should be ${Range.getOperator('left', exclusive)} ${value}`;
54 - }
55 - /**
56 - * @param {number} start left side value
57 - * @param {number} end right side value
58 - * @param {boolean} startExclusive is range exclusive from left side
59 - * @param {boolean} endExclusive is range exclusive from right side
60 - * @param {boolean} logic is not logic applied
61 - * @returns {string}
62 - */
63 -
64 -
65 - static formatRange(start, end, startExclusive, endExclusive, logic) {
66 - let result = 'should be';
67 - result += ` ${Range.getOperator(logic ? 'left' : 'right', logic ? startExclusive : !startExclusive)} ${start} `;
68 - result += logic ? 'and' : 'or';
69 - result += ` ${Range.getOperator(logic ? 'right' : 'left', logic ? endExclusive : !endExclusive)} ${end}`;
70 - return result;
71 - }
72 - /**
73 - * @param {Array<RangeValue>} values
74 - * @param {boolean} logic is not logic applied
75 - * @return {RangeValue} computed value and it's exclusive flag
76 - */
77 -
78 -
79 - static getRangeValue(values, logic) {
80 - let minMax = logic ? Infinity : -Infinity;
81 - let j = -1;
82 - const predicate = logic ?
83 - /** @type {RangeValueCallback} */
84 - ([value]) => value <= minMax :
85 - /** @type {RangeValueCallback} */
86 - ([value]) => value >= minMax;
87 -
88 - for (let i = 0; i < values.length; i++) {
89 - if (predicate(values[i])) {
90 - [minMax] = values[i];
91 - j = i;
92 - }
93 - }
94 -
95 - if (j > -1) {
96 - return values[j];
97 - }
98 -
99 - return [Infinity, true];
100 - }
101 -
102 - constructor() {
103 - /** @type {Array<RangeValue>} */
104 - this._left = [];
105 - /** @type {Array<RangeValue>} */
106 -
107 - this._right = [];
108 - }
109 - /**
110 - * @param {number} value
111 - * @param {boolean=} exclusive
112 - */
113 -
114 -
115 - left(value, exclusive = false) {
116 - this._left.push([value, exclusive]);
117 - }
118 - /**
119 - * @param {number} value
120 - * @param {boolean=} exclusive
121 - */
122 -
123 -
124 - right(value, exclusive = false) {
125 - this._right.push([value, exclusive]);
126 - }
127 - /**
128 - * @param {boolean} logic is not logic applied
129 - * @return {string} "smart" range string representation
130 - */
131 -
132 -
133 - format(logic = true) {
134 - const [start, leftExclusive] = Range.getRangeValue(this._left, logic);
135 - const [end, rightExclusive] = Range.getRangeValue(this._right, !logic);
136 -
137 - if (!Number.isFinite(start) && !Number.isFinite(end)) {
138 - return '';
139 - }
140 -
141 - const realStart = leftExclusive ? start + 1 : start;
142 - const realEnd = rightExclusive ? end - 1 : end; // e.g. 5 < x < 7, 5 < x <= 6, 6 <= x <= 6
143 -
144 - if (realStart === realEnd) {
145 - return `should be ${logic ? '' : '!'}= ${realStart}`;
146 - } // e.g. 4 < x < ∞
147 -
148 -
149 - if (Number.isFinite(start) && !Number.isFinite(end)) {
150 - return Range.formatLeft(start, logic, leftExclusive);
151 - } // e.g. ∞ < x < 4
152 -
153 -
154 - if (!Number.isFinite(start) && Number.isFinite(end)) {
155 - return Range.formatRight(end, logic, rightExclusive);
156 - }
157 -
158 - return Range.formatRange(start, end, leftExclusive, rightExclusive, logic);
159 - }
160 -
161 -}
162 -
163 -module.exports = Range;
...\ No newline at end of file ...\ No newline at end of file
1 -"use strict";
2 -
3 -const Range = require('./Range');
4 -/** @typedef {import("../validate").Schema} Schema */
5 -
6 -/**
7 - * @param {Schema} schema
8 - * @param {boolean} logic
9 - * @return {string[]}
10 - */
11 -
12 -
13 -module.exports.stringHints = function stringHints(schema, logic) {
14 - const hints = [];
15 - let type = 'string';
16 - const currentSchema = { ...schema
17 - };
18 -
19 - if (!logic) {
20 - const tmpLength = currentSchema.minLength;
21 - const tmpFormat = currentSchema.formatMinimum;
22 - const tmpExclusive = currentSchema.formatExclusiveMaximum;
23 - currentSchema.minLength = currentSchema.maxLength;
24 - currentSchema.maxLength = tmpLength;
25 - currentSchema.formatMinimum = currentSchema.formatMaximum;
26 - currentSchema.formatMaximum = tmpFormat;
27 - currentSchema.formatExclusiveMaximum = !currentSchema.formatExclusiveMinimum;
28 - currentSchema.formatExclusiveMinimum = !tmpExclusive;
29 - }
30 -
31 - if (typeof currentSchema.minLength === 'number') {
32 - if (currentSchema.minLength === 1) {
33 - type = 'non-empty string';
34 - } else {
35 - const length = Math.max(currentSchema.minLength - 1, 0);
36 - hints.push(`should be longer than ${length} character${length > 1 ? 's' : ''}`);
37 - }
38 - }
39 -
40 - if (typeof currentSchema.maxLength === 'number') {
41 - if (currentSchema.maxLength === 0) {
42 - type = 'empty string';
43 - } else {
44 - const length = currentSchema.maxLength + 1;
45 - hints.push(`should be shorter than ${length} character${length > 1 ? 's' : ''}`);
46 - }
47 - }
48 -
49 - if (currentSchema.pattern) {
50 - hints.push(`should${logic ? '' : ' not'} match pattern ${JSON.stringify(currentSchema.pattern)}`);
51 - }
52 -
53 - if (currentSchema.format) {
54 - hints.push(`should${logic ? '' : ' not'} match format ${JSON.stringify(currentSchema.format)}`);
55 - }
56 -
57 - if (currentSchema.formatMinimum) {
58 - hints.push(`should be ${currentSchema.formatExclusiveMinimum ? '>' : '>='} ${JSON.stringify(currentSchema.formatMinimum)}`);
59 - }
60 -
61 - if (currentSchema.formatMaximum) {
62 - hints.push(`should be ${currentSchema.formatExclusiveMaximum ? '<' : '<='} ${JSON.stringify(currentSchema.formatMaximum)}`);
63 - }
64 -
65 - return [type].concat(hints);
66 -};
67 -/**
68 - * @param {Schema} schema
69 - * @param {boolean} logic
70 - * @return {string[]}
71 - */
72 -
73 -
74 -module.exports.numberHints = function numberHints(schema, logic) {
75 - const hints = [schema.type === 'integer' ? 'integer' : 'number'];
76 - const range = new Range();
77 -
78 - if (typeof schema.minimum === 'number') {
79 - range.left(schema.minimum);
80 - }
81 -
82 - if (typeof schema.exclusiveMinimum === 'number') {
83 - range.left(schema.exclusiveMinimum, true);
84 - }
85 -
86 - if (typeof schema.maximum === 'number') {
87 - range.right(schema.maximum);
88 - }
89 -
90 - if (typeof schema.exclusiveMaximum === 'number') {
91 - range.right(schema.exclusiveMaximum, true);
92 - }
93 -
94 - const rangeFormat = range.format(logic);
95 -
96 - if (rangeFormat) {
97 - hints.push(rangeFormat);
98 - }
99 -
100 - if (typeof schema.multipleOf === 'number') {
101 - hints.push(`should${logic ? '' : ' not'} be multiple of ${schema.multipleOf}`);
102 - }
103 -
104 - return hints;
105 -};
...\ No newline at end of file ...\ No newline at end of file
1 -"use strict";
2 -
3 -Object.defineProperty(exports, "__esModule", {
4 - value: true
5 -});
6 -exports.default = void 0;
7 -
8 -var _absolutePath = _interopRequireDefault(require("./keywords/absolutePath"));
9 -
10 -var _ValidationError = _interopRequireDefault(require("./ValidationError"));
11 -
12 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13 -
14 -// Use CommonJS require for ajv libs so TypeScript consumers aren't locked into esModuleInterop (see #110).
15 -const Ajv = require('ajv');
16 -
17 -const ajvKeywords = require('ajv-keywords');
18 -/** @typedef {import("json-schema").JSONSchema4} JSONSchema4 */
19 -
20 -/** @typedef {import("json-schema").JSONSchema6} JSONSchema6 */
21 -
22 -/** @typedef {import("json-schema").JSONSchema7} JSONSchema7 */
23 -
24 -/** @typedef {import("ajv").ErrorObject} ErrorObject */
25 -
26 -/**
27 - * @typedef {Object} Extend
28 - * @property {number=} formatMinimum
29 - * @property {number=} formatMaximum
30 - * @property {boolean=} formatExclusiveMinimum
31 - * @property {boolean=} formatExclusiveMaximum
32 - */
33 -
34 -/** @typedef {(JSONSchema4 | JSONSchema6 | JSONSchema7) & Extend} Schema */
35 -
36 -/** @typedef {ErrorObject & { children?: Array<ErrorObject>}} SchemaUtilErrorObject */
37 -
38 -/**
39 - * @callback PostFormatter
40 - * @param {string} formattedError
41 - * @param {SchemaUtilErrorObject} error
42 - * @returns {string}
43 - */
44 -
45 -/**
46 - * @typedef {Object} ValidationErrorConfiguration
47 - * @property {string=} name
48 - * @property {string=} baseDataPath
49 - * @property {PostFormatter=} postFormatter
50 - */
51 -
52 -
53 -const ajv = new Ajv({
54 - allErrors: true,
55 - verbose: true,
56 - $data: true
57 -});
58 -ajvKeywords(ajv, ['instanceof', 'formatMinimum', 'formatMaximum', 'patternRequired']); // Custom keywords
59 -
60 -(0, _absolutePath.default)(ajv);
61 -/**
62 - * @param {Schema} schema
63 - * @param {Array<object> | object} options
64 - * @param {ValidationErrorConfiguration=} configuration
65 - * @returns {void}
66 - */
67 -
68 -function validate(schema, options, configuration) {
69 - let errors = [];
70 -
71 - if (Array.isArray(options)) {
72 - errors = Array.from(options, nestedOptions => validateObject(schema, nestedOptions));
73 - errors.forEach((list, idx) => {
74 - const applyPrefix =
75 - /**
76 - * @param {SchemaUtilErrorObject} error
77 - */
78 - error => {
79 - // eslint-disable-next-line no-param-reassign
80 - error.dataPath = `[${idx}]${error.dataPath}`;
81 -
82 - if (error.children) {
83 - error.children.forEach(applyPrefix);
84 - }
85 - };
86 -
87 - list.forEach(applyPrefix);
88 - });
89 - errors = errors.reduce((arr, items) => {
90 - arr.push(...items);
91 - return arr;
92 - }, []);
93 - } else {
94 - errors = validateObject(schema, options);
95 - }
96 -
97 - if (errors.length > 0) {
98 - throw new _ValidationError.default(errors, schema, configuration);
99 - }
100 -}
101 -/**
102 - * @param {Schema} schema
103 - * @param {Array<object> | object} options
104 - * @returns {Array<SchemaUtilErrorObject>}
105 - */
106 -
107 -
108 -function validateObject(schema, options) {
109 - const compiledSchema = ajv.compile(schema);
110 - const valid = compiledSchema(options);
111 - if (valid) return [];
112 - return compiledSchema.errors ? filterErrors(compiledSchema.errors) : [];
113 -}
114 -/**
115 - * @param {Array<ErrorObject>} errors
116 - * @returns {Array<SchemaUtilErrorObject>}
117 - */
118 -
119 -
120 -function filterErrors(errors) {
121 - /** @type {Array<SchemaUtilErrorObject>} */
122 - let newErrors = [];
123 -
124 - for (const error of
125 - /** @type {Array<SchemaUtilErrorObject>} */
126 - errors) {
127 - const {
128 - dataPath
129 - } = error;
130 - /** @type {Array<SchemaUtilErrorObject>} */
131 -
132 - let children = [];
133 - newErrors = newErrors.filter(oldError => {
134 - if (oldError.dataPath.includes(dataPath)) {
135 - if (oldError.children) {
136 - children = children.concat(oldError.children.slice(0));
137 - } // eslint-disable-next-line no-undefined, no-param-reassign
138 -
139 -
140 - oldError.children = undefined;
141 - children.push(oldError);
142 - return false;
143 - }
144 -
145 - return true;
146 - });
147 -
148 - if (children.length) {
149 - error.children = children;
150 - }
151 -
152 - newErrors.push(error);
153 - }
154 -
155 - return newErrors;
156 -} // TODO change after resolve https://github.com/microsoft/TypeScript/issues/34994
157 -
158 -
159 -validate.ValidationError = _ValidationError.default;
160 -validate.ValidateError = _ValidationError.default;
161 -var _default = validate;
162 -exports.default = _default;
...\ No newline at end of file ...\ No newline at end of file
1 -{
2 - "_from": "schema-utils@^2.6.5",
3 - "_id": "schema-utils@2.7.1",
4 - "_inBundle": false,
5 - "_integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==",
6 - "_location": "/schema-utils",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "schema-utils@^2.6.5",
12 - "name": "schema-utils",
13 - "escapedName": "schema-utils",
14 - "rawSpec": "^2.6.5",
15 - "saveSpec": null,
16 - "fetchSpec": "^2.6.5"
17 - },
18 - "_requiredBy": [
19 - "/@pmmmwh/react-refresh-webpack-plugin",
20 - "/babel-loader",
21 - "/css-loader",
22 - "/sass-loader",
23 - "/style-loader"
24 - ],
25 - "_resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz",
26 - "_shasum": "1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7",
27 - "_spec": "schema-utils@^2.6.5",
28 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\@pmmmwh\\react-refresh-webpack-plugin",
29 - "author": {
30 - "name": "webpack Contrib",
31 - "url": "https://github.com/webpack-contrib"
32 - },
33 - "bugs": {
34 - "url": "https://github.com/webpack/schema-utils/issues"
35 - },
36 - "bundleDependencies": false,
37 - "dependencies": {
38 - "@types/json-schema": "^7.0.5",
39 - "ajv": "^6.12.4",
40 - "ajv-keywords": "^3.5.2"
41 - },
42 - "deprecated": false,
43 - "description": "webpack Validation Utils",
44 - "devDependencies": {
45 - "@babel/cli": "^7.10.5",
46 - "@babel/core": "^7.11.4",
47 - "@babel/preset-env": "^7.11.0",
48 - "@commitlint/cli": "^10.0.0",
49 - "@commitlint/config-conventional": "^10.0.0",
50 - "@webpack-contrib/defaults": "^6.3.0",
51 - "@webpack-contrib/eslint-config-webpack": "^3.0.0",
52 - "babel-jest": "^25.5.1",
53 - "cross-env": "^6.0.3",
54 - "del": "^5.1.0",
55 - "del-cli": "^3.0.1",
56 - "eslint": "^7.7.0",
57 - "eslint-config-prettier": "^6.11.0",
58 - "eslint-plugin-import": "^2.22.0",
59 - "husky": "^4.2.5",
60 - "jest": "^25.5.4",
61 - "lint-staged": "^10.2.13",
62 - "npm-run-all": "^4.1.5",
63 - "prettier": "^1.19.1",
64 - "standard-version": "^9.0.0",
65 - "typescript": "^4.0.2"
66 - },
67 - "engines": {
68 - "node": ">= 8.9.0"
69 - },
70 - "files": [
71 - "dist",
72 - "declarations"
73 - ],
74 - "funding": {
75 - "type": "opencollective",
76 - "url": "https://opencollective.com/webpack"
77 - },
78 - "homepage": "https://github.com/webpack/schema-utils",
79 - "keywords": [
80 - "webpack"
81 - ],
82 - "license": "MIT",
83 - "main": "dist/index.js",
84 - "name": "schema-utils",
85 - "repository": {
86 - "type": "git",
87 - "url": "git+https://github.com/webpack/schema-utils.git"
88 - },
89 - "scripts": {
90 - "build": "npm-run-all -p \"build:**\"",
91 - "build:code": "cross-env NODE_ENV=production babel src -d dist --copy-files",
92 - "build:types": "tsc --declaration --emitDeclarationOnly --outDir declarations && prettier \"declarations/**/*.ts\" --write",
93 - "clean": "del-cli dist declarations",
94 - "commitlint": "commitlint --from=master",
95 - "defaults": "webpack-defaults",
96 - "lint": "npm-run-all -l -p \"lint:**\"",
97 - "lint:js": "eslint --cache .",
98 - "lint:prettier": "prettier \"{**/*,*}.{js,json,md,yml,css,ts}\" --list-different",
99 - "lint:types": "tsc --pretty --noEmit",
100 - "prebuild": "npm run clean",
101 - "prepare": "npm run build",
102 - "pretest": "npm run lint",
103 - "release": "standard-version",
104 - "security": "npm audit",
105 - "start": "npm run build -- -w",
106 - "test": "npm run test:coverage",
107 - "test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
108 - "test:only": "cross-env NODE_ENV=test jest",
109 - "test:watch": "npm run test:only -- --watch"
110 - },
111 - "types": "declarations/index.d.ts",
112 - "version": "2.7.1"
113 -}
1 -# Changelog
2 -
3 -All notable changes to this project will be documented in this file.
4 -
5 -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6 -and this project adheres to
7 -[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
8 -
9 -## [Unreleased]
10 -
11 -### Added
12 -
13 -- Support for `behavior`, `block` and `inline` options, from [the spec](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView).
14 -- `scrollMode: "if-needed" | "always"` to control the `if-needed` behavior, based on [the csswg proposal to the spec](https://github.com/w3c/csswg-drafts/pull/1805).
15 -
16 -### Removed
17 -
18 -- `centerIfNeeded`, use `scrollMode: "if-needed", block: "center"` instead.
19 -- `duration` to trigger animation, use [`smooth-scroll-into-view-if-needed`](https://github.com/stipsan/smooth-scroll-into-view-if-needed) instead.
20 -- `handleScroll(parent, {scrollLeft, scrollTop}, options)`, use `behavior: function(actions)` instead, where `actions` is an array of `{el, top, left}` allowing you to scroll everything in parallel or in a sequence, it's up to you.
21 -- `offset`, use wrapper elements and CSS like padding or margins instead.
22 -
23 -## [1.5.0] - 2018-02-25
24 -
25 -### Added
26 -
27 -- `sideEffects: false` in package.json to enable optimizations introduced in webpack v4.
28 -
29 -## [1.4.0] - 2017-11-17
30 -
31 -### Added
32 -
33 -- New `handleScroll` option allows customizing scrolling behavior.
34 -
35 -### Changed
36 -
37 -- Animation logic is separated from scroll calculation logic. This allows skip
38 - importing animation dependencies and reduces bundle sizes when you don't need
39 - the built in animation feature.
40 -
41 -## [1.3.0] - 2017-11-12
42 -
43 -### Added
44 -
45 -- New API interface (#148 @tonybdesign)
46 -
47 -## [1.2.8] - 2017-11-05
48 -
49 -### Fixed
50 -
51 -- Missing TypeScript definitions and rollup/webpack pkg.module files from
52 - published package (#145)
53 -
54 -## [1.2.7] - 2017-11-05
55 -
56 -### Fixed
57 -
58 -- Package published on npm contained unnecessary files bloating the package
59 - (#144)
60 -
61 -## [1.2.6] - 2017-11-05
62 -
63 -### Fixed
64 -
65 -- Don't use postinstall as it runs in userland (#143)
66 -
67 -## [1.2.5] - 2017-11-05
68 -
69 -### Fixed
70 -
71 -- Migrate tests to
72 - [new page](https://stipsan.github.io/scroll-into-view-if-needed/) that
73 - showcases how it works (#141)
74 -
75 -## [1.2.4] - 2017-11-05
76 -
77 -### Fixed
78 -
79 -- TypeScript requires HTMLElement when it should accept Element (#140)
80 -
81 -## [1.2.3] - 2017-11-04
82 -
83 -### Fixed
84 -
85 -- Incorrect TypeScript declarations and export format (#136)
86 -
87 -## [1.2.2] - 2017-10-29
88 -
89 -### Fixed
90 -
91 -- Incorrect export declaration in TS typings (#132)
92 -
93 -## [1.2.1] - 2017-10-02
94 -
95 -### Fixed
96 -
97 -- Fifth option should be optional (#129)
98 -
99 -## [1.2.0] - 2017-10-01
100 -
101 -### Added
102 -
103 -- Set offset feature (#127 @iwangulenko)
104 -
105 -## [1.1.1] - 2017-10-01
106 -
107 -### Fixed
108 -
109 -- Windows compatibility and CommonJS interop change back to Babel 5
110 - functionality (#121 @khell)
111 -
112 -## [1.1.0] - 2017-03-29
113 -
114 -### Added
115 -
116 -- An optional argument finalElement was added to limit the scope of the function
117 - (#108 @hemnstill)
118 -
119 -## [1.0.7] - 2017-03-14
120 -
121 -### Added
122 -
123 -- MIT License (#107 @JKillian)
124 -
125 -### Changed
126 -
127 -- Reduced size of dist build by switching from rollup to babel (#106 @JKillian)
128 -
129 -## [1.0.6] - 2016-11-17
130 -
131 -### Changed
132 -
133 -- Updated typescript definition making options optional (#75 @pelotom)
134 -
135 -## [1.0.5] - 2016-11-12
136 -
137 -### Fixed
138 -
139 -- Fix TypeScript definition file issues (#74 @forabi)
140 -
141 -### Documentation
142 -
143 -- React example snippet in readme.
144 -
145 -## [1.0.4] - 2016-10-31
146 -
147 -### Added
148 -
149 -- Changelog readme.
150 -- TypeScript definition file (#73 @forabi)
151 -
152 -## 1.0.3 - 2016-09-30
153 -
154 -### Documentation
155 -
156 -- link to official ponyfill page (#68 @sindresorhus)
157 -
158 -## 1.0.2 - 2016-04-18
159 -
160 -### Added
161 -
162 -- Greenkeeper
163 -
164 -### Fixes
165 -
166 -- Incomatibility with default webpack config.
167 -
168 -## 1.0.1 - 2016-04-18
169 -
170 -- PULLED: accidentally pushed incomplete build to npm!
171 -
172 -## 1.0.0 - 2016-04-18
173 -
174 -### Added
175 -
176 -- Initial release.
177 -
178 -[unreleased]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.5.0...HEAD
179 -[1.5.0]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.4.0...v1.5.0
180 -[1.4.0]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.3.0...v1.4.0
181 -[1.3.0]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.2.8...v1.3.0
182 -[1.2.8]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.2.7...v1.2.8
183 -[1.2.7]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.2.6...v1.2.7
184 -[1.2.6]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.2.5...v1.2.6
185 -[1.2.5]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.2.4...v1.2.5
186 -[1.2.4]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.2.3...v1.2.4
187 -[1.2.3]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.2.2...v1.2.3
188 -[1.2.2]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.2.1...v1.2.2
189 -[1.2.1]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.2.0...v1.2.1
190 -[1.2.0]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.1.1...v1.2.0
191 -[1.1.1]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.1.0...v1.1.1
192 -[1.1.0]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.0.7...v1.1.0
193 -[1.0.7]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.0.6...v1.0.7
194 -[1.0.6]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.0.5...v1.0.6
195 -[1.0.5]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.0.4...v1.0.5
196 -[1.0.4]: https://github.com/stipsan/scroll-into-view-if-needed/compare/v1.0.3...v1.0.4
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.