added old data
This commit is contained in:
11
project3/node_modules/dom-serializer/LICENSE
generated
vendored
Normal file
11
project3/node_modules/dom-serializer/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
License
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 The cheeriojs contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
project3/node_modules/dom-serializer/README.md
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/README.md
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Renders a DOM node or an array of DOM nodes to a string.
|
102
project3/node_modules/dom-serializer/foreignNames.json
generated
vendored
Normal file
102
project3/node_modules/dom-serializer/foreignNames.json
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"elementNames" : {
|
||||
"altglyph" : "altGlyph",
|
||||
"altglyphdef" : "altGlyphDef",
|
||||
"altglyphitem" : "altGlyphItem",
|
||||
"animatecolor" : "animateColor",
|
||||
"animatemotion" : "animateMotion",
|
||||
"animatetransform" : "animateTransform",
|
||||
"clippath" : "clipPath",
|
||||
"feblend" : "feBlend",
|
||||
"fecolormatrix" : "feColorMatrix",
|
||||
"fecomponenttransfer" : "feComponentTransfer",
|
||||
"fecomposite" : "feComposite",
|
||||
"feconvolvematrix" : "feConvolveMatrix",
|
||||
"fediffuselighting" : "feDiffuseLighting",
|
||||
"fedisplacementmap" : "feDisplacementMap",
|
||||
"fedistantlight" : "feDistantLight",
|
||||
"fedropshadow" : "feDropShadow",
|
||||
"feflood" : "feFlood",
|
||||
"fefunca" : "feFuncA",
|
||||
"fefuncb" : "feFuncB",
|
||||
"fefuncg" : "feFuncG",
|
||||
"fefuncr" : "feFuncR",
|
||||
"fegaussianblur" : "feGaussianBlur",
|
||||
"feimage" : "feImage",
|
||||
"femerge" : "feMerge",
|
||||
"femergenode" : "feMergeNode",
|
||||
"femorphology" : "feMorphology",
|
||||
"feoffset" : "feOffset",
|
||||
"fepointlight" : "fePointLight",
|
||||
"fespecularlighting" : "feSpecularLighting",
|
||||
"fespotlight" : "feSpotLight",
|
||||
"fetile" : "feTile",
|
||||
"feturbulence" : "feTurbulence",
|
||||
"foreignobject" : "foreignObject",
|
||||
"glyphref" : "glyphRef",
|
||||
"lineargradient" : "linearGradient",
|
||||
"radialgradient" : "radialGradient",
|
||||
"textpath" : "textPath"
|
||||
},
|
||||
"attributeNames" : {
|
||||
"definitionurl" : "definitionURL",
|
||||
"attributename" : "attributeName",
|
||||
"attributetype" : "attributeType",
|
||||
"basefrequency" : "baseFrequency",
|
||||
"baseprofile" : "baseProfile",
|
||||
"calcmode" : "calcMode",
|
||||
"clippathunits" : "clipPathUnits",
|
||||
"diffuseconstant" : "diffuseConstant",
|
||||
"edgemode" : "edgeMode",
|
||||
"filterunits" : "filterUnits",
|
||||
"glyphref" : "glyphRef",
|
||||
"gradienttransform" : "gradientTransform",
|
||||
"gradientunits" : "gradientUnits",
|
||||
"kernelmatrix" : "kernelMatrix",
|
||||
"kernelunitlength" : "kernelUnitLength",
|
||||
"keypoints" : "keyPoints",
|
||||
"keysplines" : "keySplines",
|
||||
"keytimes" : "keyTimes",
|
||||
"lengthadjust" : "lengthAdjust",
|
||||
"limitingconeangle" : "limitingConeAngle",
|
||||
"markerheight" : "markerHeight",
|
||||
"markerunits" : "markerUnits",
|
||||
"markerwidth" : "markerWidth",
|
||||
"maskcontentunits" : "maskContentUnits",
|
||||
"maskunits" : "maskUnits",
|
||||
"numoctaves" : "numOctaves",
|
||||
"pathlength" : "pathLength",
|
||||
"patterncontentunits" : "patternContentUnits",
|
||||
"patterntransform" : "patternTransform",
|
||||
"patternunits" : "patternUnits",
|
||||
"pointsatx" : "pointsAtX",
|
||||
"pointsaty" : "pointsAtY",
|
||||
"pointsatz" : "pointsAtZ",
|
||||
"preservealpha" : "preserveAlpha",
|
||||
"preserveaspectratio" : "preserveAspectRatio",
|
||||
"primitiveunits" : "primitiveUnits",
|
||||
"refx" : "refX",
|
||||
"refy" : "refY",
|
||||
"repeatcount" : "repeatCount",
|
||||
"repeatdur" : "repeatDur",
|
||||
"requiredextensions" : "requiredExtensions",
|
||||
"requiredfeatures" : "requiredFeatures",
|
||||
"specularconstant" : "specularConstant",
|
||||
"specularexponent" : "specularExponent",
|
||||
"spreadmethod" : "spreadMethod",
|
||||
"startoffset" : "startOffset",
|
||||
"stddeviation" : "stdDeviation",
|
||||
"stitchtiles" : "stitchTiles",
|
||||
"surfacescale" : "surfaceScale",
|
||||
"systemlanguage" : "systemLanguage",
|
||||
"tablevalues" : "tableValues",
|
||||
"targetx" : "targetX",
|
||||
"targety" : "targetY",
|
||||
"textlength" : "textLength",
|
||||
"viewbox" : "viewBox",
|
||||
"viewtarget" : "viewTarget",
|
||||
"xchannelselector" : "xChannelSelector",
|
||||
"ychannelselector" : "yChannelSelector",
|
||||
"zoomandpan" : "zoomAndPan"
|
||||
}
|
||||
}
|
17
project3/node_modules/dom-serializer/index.d.ts
generated
vendored
Normal file
17
project3/node_modules/dom-serializer/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
export interface DomSerializerOptions {
|
||||
xmlMode?: boolean | 'foreign';
|
||||
decodeEntities?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders a DOM node or an array of DOM nodes to a string.
|
||||
*
|
||||
* Can be thought of as the equivalent of the `outerHTML` of the passed node(s).
|
||||
*
|
||||
* @param nodes Nodes to be rendered.
|
||||
* @param options Changes serialization behavior
|
||||
*/
|
||||
export default function render(
|
||||
nodes: {} | {}[],
|
||||
options?: DomSerializerOptions
|
||||
): string;
|
183
project3/node_modules/dom-serializer/index.js
generated
vendored
Normal file
183
project3/node_modules/dom-serializer/index.js
generated
vendored
Normal file
@@ -0,0 +1,183 @@
|
||||
/*
|
||||
Module dependencies
|
||||
*/
|
||||
var ElementType = require('domelementtype');
|
||||
var entities = require('entities');
|
||||
|
||||
/* mixed-case SVG and MathML tags & attributes
|
||||
recognized by the HTML parser, see
|
||||
https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign
|
||||
*/
|
||||
var foreignNames = require('./foreignNames.json');
|
||||
foreignNames.elementNames.__proto__ = null; /* use as a simple dictionary */
|
||||
foreignNames.attributeNames.__proto__ = null;
|
||||
|
||||
var unencodedElements = {
|
||||
__proto__: null,
|
||||
style: true,
|
||||
script: true,
|
||||
xmp: true,
|
||||
iframe: true,
|
||||
noembed: true,
|
||||
noframes: true,
|
||||
plaintext: true,
|
||||
noscript: true
|
||||
};
|
||||
|
||||
/*
|
||||
Format attributes
|
||||
*/
|
||||
function formatAttrs(attributes, opts) {
|
||||
if (!attributes) return;
|
||||
|
||||
var output = '';
|
||||
var value;
|
||||
|
||||
// Loop through the attributes
|
||||
for (var key in attributes) {
|
||||
value = attributes[key];
|
||||
if (output) {
|
||||
output += ' ';
|
||||
}
|
||||
|
||||
if (opts.xmlMode === 'foreign') {
|
||||
/* fix up mixed-case attribute names */
|
||||
key = foreignNames.attributeNames[key] || key;
|
||||
}
|
||||
output += key;
|
||||
if ((value !== null && value !== '') || opts.xmlMode) {
|
||||
output +=
|
||||
'="' +
|
||||
(opts.decodeEntities
|
||||
? entities.encodeXML(value)
|
||||
: value.replace(/\"/g, '"')) +
|
||||
'"';
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
/*
|
||||
Self-enclosing tags (stolen from node-htmlparser)
|
||||
*/
|
||||
var singleTag = {
|
||||
__proto__: null,
|
||||
area: true,
|
||||
base: true,
|
||||
basefont: true,
|
||||
br: true,
|
||||
col: true,
|
||||
command: true,
|
||||
embed: true,
|
||||
frame: true,
|
||||
hr: true,
|
||||
img: true,
|
||||
input: true,
|
||||
isindex: true,
|
||||
keygen: true,
|
||||
link: true,
|
||||
meta: true,
|
||||
param: true,
|
||||
source: true,
|
||||
track: true,
|
||||
wbr: true
|
||||
};
|
||||
|
||||
var render = (module.exports = function(dom, opts) {
|
||||
if (!Array.isArray(dom) && !dom.cheerio) dom = [dom];
|
||||
opts = opts || {};
|
||||
|
||||
var output = '';
|
||||
|
||||
for (var i = 0; i < dom.length; i++) {
|
||||
var elem = dom[i];
|
||||
|
||||
if (elem.type === 'root') output += render(elem.children, opts);
|
||||
else if (ElementType.isTag(elem)) output += renderTag(elem, opts);
|
||||
else if (elem.type === ElementType.Directive)
|
||||
output += renderDirective(elem);
|
||||
else if (elem.type === ElementType.Comment) output += renderComment(elem);
|
||||
else if (elem.type === ElementType.CDATA) output += renderCdata(elem);
|
||||
else output += renderText(elem, opts);
|
||||
}
|
||||
|
||||
return output;
|
||||
});
|
||||
|
||||
var foreignModeIntegrationPoints = [
|
||||
'mi',
|
||||
'mo',
|
||||
'mn',
|
||||
'ms',
|
||||
'mtext',
|
||||
'annotation-xml',
|
||||
'foreignObject',
|
||||
'desc',
|
||||
'title'
|
||||
];
|
||||
|
||||
function renderTag(elem, opts) {
|
||||
// Handle SVG / MathML in HTML
|
||||
if (opts.xmlMode === 'foreign') {
|
||||
/* fix up mixed-case element names */
|
||||
elem.name = foreignNames.elementNames[elem.name] || elem.name;
|
||||
/* exit foreign mode at integration points */
|
||||
if (
|
||||
elem.parent &&
|
||||
foreignModeIntegrationPoints.indexOf(elem.parent.name) >= 0
|
||||
)
|
||||
opts = Object.assign({}, opts, { xmlMode: false });
|
||||
}
|
||||
if (!opts.xmlMode && ['svg', 'math'].indexOf(elem.name) >= 0) {
|
||||
opts = Object.assign({}, opts, { xmlMode: 'foreign' });
|
||||
}
|
||||
|
||||
var tag = '<' + elem.name;
|
||||
var attribs = formatAttrs(elem.attribs, opts);
|
||||
|
||||
if (attribs) {
|
||||
tag += ' ' + attribs;
|
||||
}
|
||||
|
||||
if (opts.xmlMode && (!elem.children || elem.children.length === 0)) {
|
||||
tag += '/>';
|
||||
} else {
|
||||
tag += '>';
|
||||
if (elem.children) {
|
||||
tag += render(elem.children, opts);
|
||||
}
|
||||
|
||||
if (!singleTag[elem.name] || opts.xmlMode) {
|
||||
tag += '</' + elem.name + '>';
|
||||
}
|
||||
}
|
||||
|
||||
return tag;
|
||||
}
|
||||
|
||||
function renderDirective(elem) {
|
||||
return '<' + elem.data + '>';
|
||||
}
|
||||
|
||||
function renderText(elem, opts) {
|
||||
var data = elem.data || '';
|
||||
|
||||
// if entities weren't decoded, no need to encode them back
|
||||
if (
|
||||
opts.decodeEntities &&
|
||||
!(elem.parent && elem.parent.name in unencodedElements)
|
||||
) {
|
||||
data = entities.encodeXML(data);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function renderCdata(elem) {
|
||||
return '<![CDATA[' + elem.children[0].data + ']]>';
|
||||
}
|
||||
|
||||
function renderComment(elem) {
|
||||
return '<!--' + elem.data + '-->';
|
||||
}
|
11
project3/node_modules/dom-serializer/node_modules/domelementtype/LICENSE
generated
vendored
Normal file
11
project3/node_modules/dom-serializer/node_modules/domelementtype/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
Copyright (c) Felix Böhm
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1
project3/node_modules/dom-serializer/node_modules/domelementtype/README.md
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/domelementtype/README.md
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
All the types of nodes in htmlparser2's DOM.
|
28
project3/node_modules/dom-serializer/node_modules/domelementtype/lib/index.d.ts
generated
vendored
Normal file
28
project3/node_modules/dom-serializer/node_modules/domelementtype/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/** Types of elements found in the DOM */
|
||||
export declare const enum ElementType {
|
||||
Text = "text",
|
||||
Directive = "directive",
|
||||
Comment = "comment",
|
||||
Script = "script",
|
||||
Style = "style",
|
||||
Tag = "tag",
|
||||
CDATA = "cdata",
|
||||
Doctype = "doctype"
|
||||
}
|
||||
/**
|
||||
* Tests whether an element is a tag or not.
|
||||
*
|
||||
* @param elem Element to test
|
||||
*/
|
||||
export declare function isTag(elem: {
|
||||
type: ElementType;
|
||||
}): boolean;
|
||||
export declare const Text = ElementType.Text;
|
||||
export declare const Directive = ElementType.Directive;
|
||||
export declare const Comment = ElementType.Comment;
|
||||
export declare const Script = ElementType.Script;
|
||||
export declare const Style = ElementType.Style;
|
||||
export declare const Tag = ElementType.Tag;
|
||||
export declare const CDATA = ElementType.CDATA;
|
||||
export declare const Doctype = ElementType.Doctype;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
project3/node_modules/dom-serializer/node_modules/domelementtype/lib/index.d.ts.map
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/domelementtype/lib/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,0BAAkB,WAAW;IACzB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,OAAO,YAAY;CACtB;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG,OAAO,CAM1D;AAGD,eAAO,MAAM,IAAI,mBAAmB,CAAC;AACrC,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAC/C,eAAO,MAAM,OAAO,sBAAsB,CAAC;AAC3C,eAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,eAAO,MAAM,KAAK,oBAAoB,CAAC;AACvC,eAAO,MAAM,GAAG,kBAAkB,CAAC;AACnC,eAAO,MAAM,KAAK,oBAAoB,CAAC;AACvC,eAAO,MAAM,OAAO,sBAAsB,CAAC"}
|
22
project3/node_modules/dom-serializer/node_modules/domelementtype/lib/index.js
generated
vendored
Normal file
22
project3/node_modules/dom-serializer/node_modules/domelementtype/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* Tests whether an element is a tag or not.
|
||||
*
|
||||
* @param elem Element to test
|
||||
*/
|
||||
function isTag(elem) {
|
||||
return (elem.type === "tag" /* Tag */ ||
|
||||
elem.type === "script" /* Script */ ||
|
||||
elem.type === "style" /* Style */);
|
||||
}
|
||||
exports.isTag = isTag;
|
||||
// Exports for backwards compatibility
|
||||
exports.Text = "text" /* Text */; //Text
|
||||
exports.Directive = "directive" /* Directive */; //<? ... ?>
|
||||
exports.Comment = "comment" /* Comment */; //<!-- ... -->
|
||||
exports.Script = "script" /* Script */; //<script> tags
|
||||
exports.Style = "style" /* Style */; //<style> tags
|
||||
exports.Tag = "tag" /* Tag */; //Any tag
|
||||
exports.CDATA = "cdata" /* CDATA */; //<![CDATA[ ... ]]>
|
||||
exports.Doctype = "doctype" /* Doctype */;
|
70
project3/node_modules/dom-serializer/node_modules/domelementtype/package.json
generated
vendored
Normal file
70
project3/node_modules/dom-serializer/node_modules/domelementtype/package.json
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"_from": "domelementtype@^2.0.1",
|
||||
"_id": "domelementtype@2.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==",
|
||||
"_location": "/dom-serializer/domelementtype",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "domelementtype@^2.0.1",
|
||||
"name": "domelementtype",
|
||||
"escapedName": "domelementtype",
|
||||
"rawSpec": "^2.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/dom-serializer"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
|
||||
"_shasum": "1f8bdfe91f5a78063274e803b4bdcedf6e94f94d",
|
||||
"_spec": "domelementtype@^2.0.1",
|
||||
"_where": "/home/massiveatoms/Desktop/cs142/project3/node_modules/dom-serializer",
|
||||
"author": {
|
||||
"name": "Felix Boehm",
|
||||
"email": "me@feedic.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/fb55/domelementtype/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "all the types of nodes in htmlparser2's dom",
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^1.13.0",
|
||||
"@typescript-eslint/parser": "^1.13.0",
|
||||
"eslint": "^6.1.0",
|
||||
"eslint-config-prettier": "^6.0.0",
|
||||
"prettier": "^1.18.2",
|
||||
"typescript": "^3.5.3"
|
||||
},
|
||||
"files": [
|
||||
"lib/**/*"
|
||||
],
|
||||
"homepage": "https://github.com/fb55/domelementtype#readme",
|
||||
"keywords": [
|
||||
"dom",
|
||||
"htmlparser2"
|
||||
],
|
||||
"license": "BSD-2-Clause",
|
||||
"main": "lib/index.js",
|
||||
"name": "domelementtype",
|
||||
"prettier": {
|
||||
"tabWidth": 4
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/fb55/domelementtype.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"format": "prettier --write **/*.{ts,json,md}",
|
||||
"lint": "eslint **/*.ts",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run lint && prettier --check **/*.{ts,json,md}"
|
||||
},
|
||||
"types": "lib/index.d.ts",
|
||||
"version": "2.0.1"
|
||||
}
|
11
project3/node_modules/dom-serializer/node_modules/entities/LICENSE
generated
vendored
Normal file
11
project3/node_modules/dom-serializer/node_modules/entities/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
Copyright (c) Felix Böhm
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
33
project3/node_modules/dom-serializer/node_modules/entities/README.md
generated
vendored
Normal file
33
project3/node_modules/dom-serializer/node_modules/entities/README.md
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# entities [](https://npmjs.org/package/entities) [](https://npmjs.org/package/entities) [](http://travis-ci.org/fb55/entities) [](https://coveralls.io/r/fb55/entities)
|
||||
|
||||
En- & decoder for XML/HTML entities.
|
||||
|
||||
## How to…
|
||||
|
||||
### …install `entities`
|
||||
|
||||
npm i entities
|
||||
|
||||
### …use `entities`
|
||||
|
||||
```javascript
|
||||
const entities = require("entities");
|
||||
//encoding
|
||||
entities.escape("&"); // "&#38;"
|
||||
entities.encodeXML("&"); // "&#38;"
|
||||
entities.encodeHTML("&"); // "&#38;"
|
||||
//decoding
|
||||
entities.decodeXML("asdf & ÿ ü '"); // "asdf & ÿ ü '"
|
||||
entities.decodeHTML("asdf & ÿ ü '"); // "asdf & ÿ ü '"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
License: BSD-2-Clause
|
||||
|
||||
[Get supported entities with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-entities?utm_source=npm-entities&utm_medium=referral&utm_campaign=readme)
|
||||
|
||||
## Security contact information
|
||||
|
||||
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security).
|
||||
Tidelift will coordinate the fix and disclosure.
|
7
project3/node_modules/dom-serializer/node_modules/entities/lib/decode.d.ts
generated
vendored
Normal file
7
project3/node_modules/dom-serializer/node_modules/entities/lib/decode.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export declare const decodeXML: (str: string) => string;
|
||||
export declare const decodeHTMLStrict: (str: string) => string;
|
||||
export interface MapType {
|
||||
[key: string]: string;
|
||||
}
|
||||
export declare const decodeHTML: (str: string) => string;
|
||||
//# sourceMappingURL=decode.d.ts.map
|
1
project3/node_modules/dom-serializer/node_modules/entities/lib/decode.d.ts.map
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/entities/lib/decode.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../src/decode.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,yBAA2B,CAAC;AAClD,eAAO,MAAM,gBAAgB,yBAA8B,CAAC;AAE5D,MAAM,WAAW,OAAO;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAeD,eAAO,MAAM,UAAU,yBA4BnB,CAAC"}
|
54
project3/node_modules/dom-serializer/node_modules/entities/lib/decode.js
generated
vendored
Normal file
54
project3/node_modules/dom-serializer/node_modules/entities/lib/decode.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var entities_json_1 = __importDefault(require("./maps/entities.json"));
|
||||
var legacy_json_1 = __importDefault(require("./maps/legacy.json"));
|
||||
var xml_json_1 = __importDefault(require("./maps/xml.json"));
|
||||
var decode_codepoint_1 = __importDefault(require("./decode_codepoint"));
|
||||
exports.decodeXML = getStrictDecoder(xml_json_1.default);
|
||||
exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default);
|
||||
function getStrictDecoder(map) {
|
||||
var keys = Object.keys(map).join("|");
|
||||
var replace = getReplacer(map);
|
||||
keys += "|#[xX][\\da-fA-F]+|#\\d+";
|
||||
var re = new RegExp("&(?:" + keys + ");", "g");
|
||||
return function (str) { return String(str).replace(re, replace); };
|
||||
}
|
||||
var sorter = function (a, b) { return (a < b ? 1 : -1); };
|
||||
exports.decodeHTML = (function () {
|
||||
var legacy = Object.keys(legacy_json_1.default).sort(sorter);
|
||||
var keys = Object.keys(entities_json_1.default).sort(sorter);
|
||||
for (var i = 0, j = 0; i < keys.length; i++) {
|
||||
if (legacy[j] === keys[i]) {
|
||||
keys[i] += ";?";
|
||||
j++;
|
||||
}
|
||||
else {
|
||||
keys[i] += ";";
|
||||
}
|
||||
}
|
||||
var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g");
|
||||
var replace = getReplacer(entities_json_1.default);
|
||||
function replacer(str) {
|
||||
if (str.substr(-1) !== ";")
|
||||
str += ";";
|
||||
return replace(str);
|
||||
}
|
||||
//TODO consider creating a merged map
|
||||
return function (str) {
|
||||
return String(str).replace(re, replacer);
|
||||
};
|
||||
})();
|
||||
function getReplacer(map) {
|
||||
return function replace(str) {
|
||||
if (str.charAt(1) === "#") {
|
||||
if (str.charAt(2) === "X" || str.charAt(2) === "x") {
|
||||
return decode_codepoint_1.default(parseInt(str.substr(3), 16));
|
||||
}
|
||||
return decode_codepoint_1.default(parseInt(str.substr(2), 10));
|
||||
}
|
||||
return map[str.slice(1, -1)];
|
||||
};
|
||||
}
|
2
project3/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.d.ts
generated
vendored
Normal file
2
project3/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export default function decodeCodePoint(codePoint: number): string;
|
||||
//# sourceMappingURL=decode_codepoint.d.ts.map
|
1
project3/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.d.ts.map
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"decode_codepoint.d.ts","sourceRoot":"","sources":["../src/decode_codepoint.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,MAAM,UAoBxD"}
|
25
project3/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js
generated
vendored
Normal file
25
project3/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var decode_json_1 = __importDefault(require("./maps/decode.json"));
|
||||
// modified version of https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119
|
||||
function decodeCodePoint(codePoint) {
|
||||
if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {
|
||||
return "\uFFFD";
|
||||
}
|
||||
if (codePoint in decode_json_1.default) {
|
||||
// @ts-ignore
|
||||
codePoint = decode_json_1.default[codePoint];
|
||||
}
|
||||
var output = "";
|
||||
if (codePoint > 0xffff) {
|
||||
codePoint -= 0x10000;
|
||||
output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);
|
||||
codePoint = 0xdc00 | (codePoint & 0x3ff);
|
||||
}
|
||||
output += String.fromCharCode(codePoint);
|
||||
return output;
|
||||
}
|
||||
exports.default = decodeCodePoint;
|
4
project3/node_modules/dom-serializer/node_modules/entities/lib/encode.d.ts
generated
vendored
Normal file
4
project3/node_modules/dom-serializer/node_modules/entities/lib/encode.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const encodeXML: (data: string) => string;
|
||||
export declare const encodeHTML: (data: string) => string;
|
||||
export declare function escape(data: string): string;
|
||||
//# sourceMappingURL=encode.d.ts.map
|
1
project3/node_modules/dom-serializer/node_modules/entities/lib/encode.d.ts.map
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/entities/lib/encode.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../src/encode.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,0BAAsC,CAAC;AAO7D,eAAO,MAAM,UAAU,0BAAwC,CAAC;AA4DhE,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,UAKlC"}
|
67
project3/node_modules/dom-serializer/node_modules/entities/lib/encode.js
generated
vendored
Normal file
67
project3/node_modules/dom-serializer/node_modules/entities/lib/encode.js
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var xml_json_1 = __importDefault(require("./maps/xml.json"));
|
||||
var inverseXML = getInverseObj(xml_json_1.default);
|
||||
var xmlReplacer = getInverseReplacer(inverseXML);
|
||||
exports.encodeXML = getInverse(inverseXML, xmlReplacer);
|
||||
var entities_json_1 = __importDefault(require("./maps/entities.json"));
|
||||
var inverseHTML = getInverseObj(entities_json_1.default);
|
||||
var htmlReplacer = getInverseReplacer(inverseHTML);
|
||||
exports.encodeHTML = getInverse(inverseHTML, htmlReplacer);
|
||||
function getInverseObj(obj) {
|
||||
return Object.keys(obj)
|
||||
.sort()
|
||||
.reduce(function (inverse, name) {
|
||||
inverse[obj[name]] = "&" + name + ";";
|
||||
return inverse;
|
||||
}, {});
|
||||
}
|
||||
function getInverseReplacer(inverse) {
|
||||
var single = [];
|
||||
var multiple = [];
|
||||
Object.keys(inverse).forEach(function (k) {
|
||||
return k.length === 1
|
||||
? // Add value to single array
|
||||
single.push("\\" + k)
|
||||
: // Add value to multiple array
|
||||
multiple.push(k);
|
||||
});
|
||||
//TODO add ranges
|
||||
multiple.unshift("[" + single.join("") + "]");
|
||||
return new RegExp(multiple.join("|"), "g");
|
||||
}
|
||||
var reNonASCII = /[^\0-\x7F]/g;
|
||||
var reAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
||||
function singleCharReplacer(c) {
|
||||
return "&#x" + c
|
||||
.charCodeAt(0)
|
||||
.toString(16)
|
||||
.toUpperCase() + ";";
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
||||
function astralReplacer(c, _) {
|
||||
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
||||
var high = c.charCodeAt(0);
|
||||
var low = c.charCodeAt(1);
|
||||
var codePoint = (high - 0xd800) * 0x400 + low - 0xdc00 + 0x10000;
|
||||
return "&#x" + codePoint.toString(16).toUpperCase() + ";";
|
||||
}
|
||||
function getInverse(inverse, re) {
|
||||
return function (data) {
|
||||
return data
|
||||
.replace(re, function (name) { return inverse[name]; })
|
||||
.replace(reAstralSymbols, astralReplacer)
|
||||
.replace(reNonASCII, singleCharReplacer);
|
||||
};
|
||||
}
|
||||
var reXmlChars = getInverseReplacer(inverseXML);
|
||||
function escape(data) {
|
||||
return data
|
||||
.replace(reXmlChars, singleCharReplacer)
|
||||
.replace(reAstralSymbols, astralReplacer)
|
||||
.replace(reNonASCII, singleCharReplacer);
|
||||
}
|
||||
exports.escape = escape;
|
6
project3/node_modules/dom-serializer/node_modules/entities/lib/index.d.ts
generated
vendored
Normal file
6
project3/node_modules/dom-serializer/node_modules/entities/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export declare function decode(data: string, level?: number): string;
|
||||
export declare function decodeStrict(data: string, level?: number): string;
|
||||
export declare function encode(data: string, level?: number): string;
|
||||
export { encodeXML, encodeHTML, escape, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5 } from "./encode";
|
||||
export { decodeXML, decodeHTML, decodeHTMLStrict, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict } from "./decode";
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
project3/node_modules/dom-serializer/node_modules/entities/lib/index.d.ts.map
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/entities/lib/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,OAAO,EACH,SAAS,EACT,UAAU,EACV,MAAM,EAEN,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EAC5B,MAAM,UAAU,CAAC;AAElB,OAAO,EACH,SAAS,EACT,UAAU,EACV,gBAAgB,EAEhB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,EAC/B,MAAM,UAAU,CAAC"}
|
33
project3/node_modules/dom-serializer/node_modules/entities/lib/index.js
generated
vendored
Normal file
33
project3/node_modules/dom-serializer/node_modules/entities/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var decode_1 = require("./decode");
|
||||
var encode_1 = require("./encode");
|
||||
function decode(data, level) {
|
||||
return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);
|
||||
}
|
||||
exports.decode = decode;
|
||||
function decodeStrict(data, level) {
|
||||
return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);
|
||||
}
|
||||
exports.decodeStrict = decodeStrict;
|
||||
function encode(data, level) {
|
||||
return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);
|
||||
}
|
||||
exports.encode = encode;
|
||||
var encode_2 = require("./encode");
|
||||
exports.encodeXML = encode_2.encodeXML;
|
||||
exports.encodeHTML = encode_2.encodeHTML;
|
||||
exports.escape = encode_2.escape;
|
||||
// Legacy aliases
|
||||
exports.encodeHTML4 = encode_2.encodeHTML;
|
||||
exports.encodeHTML5 = encode_2.encodeHTML;
|
||||
var decode_2 = require("./decode");
|
||||
exports.decodeXML = decode_2.decodeXML;
|
||||
exports.decodeHTML = decode_2.decodeHTML;
|
||||
exports.decodeHTMLStrict = decode_2.decodeHTMLStrict;
|
||||
// Legacy aliases
|
||||
exports.decodeHTML4 = decode_2.decodeHTML;
|
||||
exports.decodeHTML5 = decode_2.decodeHTML;
|
||||
exports.decodeHTML4Strict = decode_2.decodeHTMLStrict;
|
||||
exports.decodeHTML5Strict = decode_2.decodeHTMLStrict;
|
||||
exports.decodeXMLStrict = decode_2.decodeXML;
|
1
project3/node_modules/dom-serializer/node_modules/entities/lib/maps/decode.json
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/entities/lib/maps/decode.json
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240, "138": 352, "139": 8249, "140": 338, "142": 381, "145": 8216, "146": 8217, "147": 8220, "148": 8221, "149": 8226, "150": 8211, "151": 8212, "152": 732, "153": 8482, "154": 353, "155": 8250, "156": 339, "158": 382, "159": 376 }
|
1
project3/node_modules/dom-serializer/node_modules/entities/lib/maps/entities.json
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/entities/lib/maps/entities.json
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
project3/node_modules/dom-serializer/node_modules/entities/lib/maps/legacy.json
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/entities/lib/maps/legacy.json
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "Aacute": "\u00C1", "aacute": "\u00E1", "Acirc": "\u00C2", "acirc": "\u00E2", "acute": "\u00B4", "AElig": "\u00C6", "aelig": "\u00E6", "Agrave": "\u00C0", "agrave": "\u00E0", "amp": "&", "AMP": "&", "Aring": "\u00C5", "aring": "\u00E5", "Atilde": "\u00C3", "atilde": "\u00E3", "Auml": "\u00C4", "auml": "\u00E4", "brvbar": "\u00A6", "Ccedil": "\u00C7", "ccedil": "\u00E7", "cedil": "\u00B8", "cent": "\u00A2", "copy": "\u00A9", "COPY": "\u00A9", "curren": "\u00A4", "deg": "\u00B0", "divide": "\u00F7", "Eacute": "\u00C9", "eacute": "\u00E9", "Ecirc": "\u00CA", "ecirc": "\u00EA", "Egrave": "\u00C8", "egrave": "\u00E8", "ETH": "\u00D0", "eth": "\u00F0", "Euml": "\u00CB", "euml": "\u00EB", "frac12": "\u00BD", "frac14": "\u00BC", "frac34": "\u00BE", "gt": ">", "GT": ">", "Iacute": "\u00CD", "iacute": "\u00ED", "Icirc": "\u00CE", "icirc": "\u00EE", "iexcl": "\u00A1", "Igrave": "\u00CC", "igrave": "\u00EC", "iquest": "\u00BF", "Iuml": "\u00CF", "iuml": "\u00EF", "laquo": "\u00AB", "lt": "<", "LT": "<", "macr": "\u00AF", "micro": "\u00B5", "middot": "\u00B7", "nbsp": "\u00A0", "not": "\u00AC", "Ntilde": "\u00D1", "ntilde": "\u00F1", "Oacute": "\u00D3", "oacute": "\u00F3", "Ocirc": "\u00D4", "ocirc": "\u00F4", "Ograve": "\u00D2", "ograve": "\u00F2", "ordf": "\u00AA", "ordm": "\u00BA", "Oslash": "\u00D8", "oslash": "\u00F8", "Otilde": "\u00D5", "otilde": "\u00F5", "Ouml": "\u00D6", "ouml": "\u00F6", "para": "\u00B6", "plusmn": "\u00B1", "pound": "\u00A3", "quot": "\"", "QUOT": "\"", "raquo": "\u00BB", "reg": "\u00AE", "REG": "\u00AE", "sect": "\u00A7", "shy": "\u00AD", "sup1": "\u00B9", "sup2": "\u00B2", "sup3": "\u00B3", "szlig": "\u00DF", "THORN": "\u00DE", "thorn": "\u00FE", "times": "\u00D7", "Uacute": "\u00DA", "uacute": "\u00FA", "Ucirc": "\u00DB", "ucirc": "\u00FB", "Ugrave": "\u00D9", "ugrave": "\u00F9", "uml": "\u00A8", "Uuml": "\u00DC", "uuml": "\u00FC", "Yacute": "\u00DD", "yacute": "\u00FD", "yen": "\u00A5", "yuml": "\u00FF" }
|
1
project3/node_modules/dom-serializer/node_modules/entities/lib/maps/xml.json
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/entities/lib/maps/xml.json
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "amp": "&", "apos": "'", "gt": ">", "lt": "<", "quot": "\"" }
|
7
project3/node_modules/dom-serializer/node_modules/entities/lib/src/decode.d.ts
generated
vendored
Normal file
7
project3/node_modules/dom-serializer/node_modules/entities/lib/src/decode.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export declare const decodeXML: (str: string) => string;
|
||||
export declare const decodeHTMLStrict: (str: string) => string;
|
||||
export interface MapType {
|
||||
[key: string]: string;
|
||||
}
|
||||
export declare const decodeHTML: (str: string) => string;
|
||||
//# sourceMappingURL=decode.d.ts.map
|
1
project3/node_modules/dom-serializer/node_modules/entities/lib/src/decode.d.ts.map
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/entities/lib/src/decode.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../src/decode.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,yBAA2B,CAAC;AAClD,eAAO,MAAM,gBAAgB,yBAA8B,CAAC;AAE5D,MAAM,WAAW,OAAO;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAeD,eAAO,MAAM,UAAU,yBA4BnB,CAAC"}
|
54
project3/node_modules/dom-serializer/node_modules/entities/lib/src/decode.js
generated
vendored
Normal file
54
project3/node_modules/dom-serializer/node_modules/entities/lib/src/decode.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var entities_json_1 = __importDefault(require("../maps/entities.json"));
|
||||
var legacy_json_1 = __importDefault(require("../maps/legacy.json"));
|
||||
var xml_json_1 = __importDefault(require("../maps/xml.json"));
|
||||
var decode_codepoint_1 = __importDefault(require("./decode_codepoint"));
|
||||
exports.decodeXML = getStrictDecoder(xml_json_1.default);
|
||||
exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default);
|
||||
function getStrictDecoder(map) {
|
||||
var keys = Object.keys(map).join("|");
|
||||
var replace = getReplacer(map);
|
||||
keys += "|#[xX][\\da-fA-F]+|#\\d+";
|
||||
var re = new RegExp("&(?:" + keys + ");", "g");
|
||||
return function (str) { return String(str).replace(re, replace); };
|
||||
}
|
||||
var sorter = function (a, b) { return (a < b ? 1 : -1); };
|
||||
exports.decodeHTML = (function () {
|
||||
var legacy = Object.keys(legacy_json_1.default).sort(sorter);
|
||||
var keys = Object.keys(entities_json_1.default).sort(sorter);
|
||||
for (var i = 0, j = 0; i < keys.length; i++) {
|
||||
if (legacy[j] === keys[i]) {
|
||||
keys[i] += ";?";
|
||||
j++;
|
||||
}
|
||||
else {
|
||||
keys[i] += ";";
|
||||
}
|
||||
}
|
||||
var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g");
|
||||
var replace = getReplacer(entities_json_1.default);
|
||||
function replacer(str) {
|
||||
if (str.substr(-1) !== ";")
|
||||
str += ";";
|
||||
return replace(str);
|
||||
}
|
||||
//TODO consider creating a merged map
|
||||
return function (str) {
|
||||
return String(str).replace(re, replacer);
|
||||
};
|
||||
})();
|
||||
function getReplacer(map) {
|
||||
return function replace(str) {
|
||||
if (str.charAt(1) === "#") {
|
||||
if (str.charAt(2) === "X" || str.charAt(2) === "x") {
|
||||
return decode_codepoint_1.default(parseInt(str.substr(3), 16));
|
||||
}
|
||||
return decode_codepoint_1.default(parseInt(str.substr(2), 10));
|
||||
}
|
||||
return map[str.slice(1, -1)];
|
||||
};
|
||||
}
|
2
project3/node_modules/dom-serializer/node_modules/entities/lib/src/decode_codepoint.d.ts
generated
vendored
Normal file
2
project3/node_modules/dom-serializer/node_modules/entities/lib/src/decode_codepoint.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export default function decodeCodePoint(codePoint: number): string;
|
||||
//# sourceMappingURL=decode_codepoint.d.ts.map
|
1
project3/node_modules/dom-serializer/node_modules/entities/lib/src/decode_codepoint.d.ts.map
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/entities/lib/src/decode_codepoint.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"decode_codepoint.d.ts","sourceRoot":"","sources":["../../src/decode_codepoint.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,MAAM,UAoBxD"}
|
25
project3/node_modules/dom-serializer/node_modules/entities/lib/src/decode_codepoint.js
generated
vendored
Normal file
25
project3/node_modules/dom-serializer/node_modules/entities/lib/src/decode_codepoint.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var decode_json_1 = __importDefault(require("../maps/decode.json"));
|
||||
// modified version of https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119
|
||||
function decodeCodePoint(codePoint) {
|
||||
if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {
|
||||
return "\uFFFD";
|
||||
}
|
||||
if (codePoint in decode_json_1.default) {
|
||||
// @ts-ignore
|
||||
codePoint = decode_json_1.default[codePoint];
|
||||
}
|
||||
var output = "";
|
||||
if (codePoint > 0xffff) {
|
||||
codePoint -= 0x10000;
|
||||
output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);
|
||||
codePoint = 0xdc00 | (codePoint & 0x3ff);
|
||||
}
|
||||
output += String.fromCharCode(codePoint);
|
||||
return output;
|
||||
}
|
||||
exports.default = decodeCodePoint;
|
4
project3/node_modules/dom-serializer/node_modules/entities/lib/src/encode.d.ts
generated
vendored
Normal file
4
project3/node_modules/dom-serializer/node_modules/entities/lib/src/encode.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const encodeXML: (data: string) => string;
|
||||
export declare const encodeHTML: (data: string) => string;
|
||||
export declare function escape(data: string): string;
|
||||
//# sourceMappingURL=encode.d.ts.map
|
1
project3/node_modules/dom-serializer/node_modules/entities/lib/src/encode.d.ts.map
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/entities/lib/src/encode.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../src/encode.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,0BAAsC,CAAC;AAO7D,eAAO,MAAM,UAAU,0BAAwC,CAAC;AA4DhE,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,UAKlC"}
|
67
project3/node_modules/dom-serializer/node_modules/entities/lib/src/encode.js
generated
vendored
Normal file
67
project3/node_modules/dom-serializer/node_modules/entities/lib/src/encode.js
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var xml_json_1 = __importDefault(require("../maps/xml.json"));
|
||||
var inverseXML = getInverseObj(xml_json_1.default);
|
||||
var xmlReplacer = getInverseReplacer(inverseXML);
|
||||
exports.encodeXML = getInverse(inverseXML, xmlReplacer);
|
||||
var entities_json_1 = __importDefault(require("../maps/entities.json"));
|
||||
var inverseHTML = getInverseObj(entities_json_1.default);
|
||||
var htmlReplacer = getInverseReplacer(inverseHTML);
|
||||
exports.encodeHTML = getInverse(inverseHTML, htmlReplacer);
|
||||
function getInverseObj(obj) {
|
||||
return Object.keys(obj)
|
||||
.sort()
|
||||
.reduce(function (inverse, name) {
|
||||
inverse[obj[name]] = "&" + name + ";";
|
||||
return inverse;
|
||||
}, {});
|
||||
}
|
||||
function getInverseReplacer(inverse) {
|
||||
var single = [];
|
||||
var multiple = [];
|
||||
Object.keys(inverse).forEach(function (k) {
|
||||
return k.length === 1
|
||||
? // Add value to single array
|
||||
single.push("\\" + k)
|
||||
: // Add value to multiple array
|
||||
multiple.push(k);
|
||||
});
|
||||
//TODO add ranges
|
||||
multiple.unshift("[" + single.join("") + "]");
|
||||
return new RegExp(multiple.join("|"), "g");
|
||||
}
|
||||
var reNonASCII = /[^\0-\x7F]/g;
|
||||
var reAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
||||
function singleCharReplacer(c) {
|
||||
return "&#x" + c
|
||||
.charCodeAt(0)
|
||||
.toString(16)
|
||||
.toUpperCase() + ";";
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
||||
function astralReplacer(c, _) {
|
||||
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
||||
var high = c.charCodeAt(0);
|
||||
var low = c.charCodeAt(1);
|
||||
var codePoint = (high - 0xd800) * 0x400 + low - 0xdc00 + 0x10000;
|
||||
return "&#x" + codePoint.toString(16).toUpperCase() + ";";
|
||||
}
|
||||
function getInverse(inverse, re) {
|
||||
return function (data) {
|
||||
return data
|
||||
.replace(re, function (name) { return inverse[name]; })
|
||||
.replace(reAstralSymbols, astralReplacer)
|
||||
.replace(reNonASCII, singleCharReplacer);
|
||||
};
|
||||
}
|
||||
var reXmlChars = getInverseReplacer(inverseXML);
|
||||
function escape(data) {
|
||||
return data
|
||||
.replace(reXmlChars, singleCharReplacer)
|
||||
.replace(reAstralSymbols, astralReplacer)
|
||||
.replace(reNonASCII, singleCharReplacer);
|
||||
}
|
||||
exports.escape = escape;
|
6
project3/node_modules/dom-serializer/node_modules/entities/lib/src/index.d.ts
generated
vendored
Normal file
6
project3/node_modules/dom-serializer/node_modules/entities/lib/src/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export declare function decode(data: string, level?: number): string;
|
||||
export declare function decodeStrict(data: string, level?: number): string;
|
||||
export declare function encode(data: string, level?: number): string;
|
||||
export { encodeXML, encodeHTML, escape, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5 } from "./encode";
|
||||
export { decodeXML, decodeHTML, decodeHTMLStrict, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict } from "./decode";
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
project3/node_modules/dom-serializer/node_modules/entities/lib/src/index.d.ts.map
generated
vendored
Normal file
1
project3/node_modules/dom-serializer/node_modules/entities/lib/src/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3D;AAGD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAEjE;AAGD,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,OAAO,EACH,SAAS,EACT,UAAU,EACV,MAAM,EAEN,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EAC5B,MAAM,UAAU,CAAC;AAElB,OAAO,EACH,SAAS,EACT,UAAU,EACV,gBAAgB,EAEhB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,EAC/B,MAAM,UAAU,CAAC"}
|
36
project3/node_modules/dom-serializer/node_modules/entities/lib/src/index.js
generated
vendored
Normal file
36
project3/node_modules/dom-serializer/node_modules/entities/lib/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var decode_1 = require("./decode");
|
||||
var encode_1 = require("./encode");
|
||||
// Note: Deprecated
|
||||
function decode(data, level) {
|
||||
return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);
|
||||
}
|
||||
exports.decode = decode;
|
||||
// Note: Deprecated
|
||||
function decodeStrict(data, level) {
|
||||
return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);
|
||||
}
|
||||
exports.decodeStrict = decodeStrict;
|
||||
// Note: Deprecated
|
||||
function encode(data, level) {
|
||||
return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);
|
||||
}
|
||||
exports.encode = encode;
|
||||
var encode_2 = require("./encode");
|
||||
exports.encodeXML = encode_2.encodeXML;
|
||||
exports.encodeHTML = encode_2.encodeHTML;
|
||||
exports.escape = encode_2.escape;
|
||||
// Legacy aliases
|
||||
exports.encodeHTML4 = encode_2.encodeHTML;
|
||||
exports.encodeHTML5 = encode_2.encodeHTML;
|
||||
var decode_2 = require("./decode");
|
||||
exports.decodeXML = decode_2.decodeXML;
|
||||
exports.decodeHTML = decode_2.decodeHTML;
|
||||
exports.decodeHTMLStrict = decode_2.decodeHTMLStrict;
|
||||
// Legacy aliases
|
||||
exports.decodeHTML4 = decode_2.decodeHTML;
|
||||
exports.decodeHTML5 = decode_2.decodeHTML;
|
||||
exports.decodeHTML4Strict = decode_2.decodeHTMLStrict;
|
||||
exports.decodeHTML5Strict = decode_2.decodeHTMLStrict;
|
||||
exports.decodeXMLStrict = decode_2.decodeXML;
|
98
project3/node_modules/dom-serializer/node_modules/entities/package.json
generated
vendored
Normal file
98
project3/node_modules/dom-serializer/node_modules/entities/package.json
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"_from": "entities@^2.0.0",
|
||||
"_id": "entities@2.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==",
|
||||
"_location": "/dom-serializer/entities",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "entities@^2.0.0",
|
||||
"name": "entities",
|
||||
"escapedName": "entities",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/dom-serializer"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz",
|
||||
"_shasum": "68d6084cab1b079767540d80e56a39b423e4abf4",
|
||||
"_spec": "entities@^2.0.0",
|
||||
"_where": "/home/massiveatoms/Desktop/cs142/project3/node_modules/dom-serializer",
|
||||
"author": {
|
||||
"name": "Felix Boehm",
|
||||
"email": "me@feedic.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/fb55/entities/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Encode & decode XML/HTML entities with ease",
|
||||
"devDependencies": {
|
||||
"@types/mocha": "^5.2.7",
|
||||
"@types/node": "^12.6.8",
|
||||
"@typescript-eslint/eslint-plugin": "^1.12.0",
|
||||
"@typescript-eslint/parser": "^1.12.0",
|
||||
"coveralls": "*",
|
||||
"eslint": "^6.0.1",
|
||||
"eslint-config-prettier": "^6.0.0",
|
||||
"mocha": "^6.1.4",
|
||||
"mocha-lcov-reporter": "*",
|
||||
"nyc": "^14.1.1",
|
||||
"prettier": "^1.18.2",
|
||||
"source-map-support": "^0.5.12",
|
||||
"ts-node": "^8.3.0",
|
||||
"typescript": "^3.5.3"
|
||||
},
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"files": [
|
||||
"lib/**/*"
|
||||
],
|
||||
"homepage": "https://github.com/fb55/entities#readme",
|
||||
"keywords": [
|
||||
"html",
|
||||
"xml",
|
||||
"entity",
|
||||
"decoding",
|
||||
"encoding"
|
||||
],
|
||||
"license": "BSD-2-Clause",
|
||||
"main": "lib/index.js",
|
||||
"name": "entities",
|
||||
"nyc": {
|
||||
"extension": [
|
||||
".ts",
|
||||
".tsx"
|
||||
],
|
||||
"exclude": [
|
||||
"**/*.d.ts"
|
||||
],
|
||||
"reporter": [
|
||||
"html",
|
||||
"text"
|
||||
],
|
||||
"all": true
|
||||
},
|
||||
"prettier": {
|
||||
"tabWidth": 4
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/fb55/entities.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
||||
"eslint": "eslint '**/*.ts'",
|
||||
"format": "prettier --write **/*.{ts,md}",
|
||||
"prepare": "npm run build",
|
||||
"test": "nyc mocha && npm run eslint"
|
||||
},
|
||||
"version": "2.0.0"
|
||||
}
|
72
project3/node_modules/dom-serializer/package.json
generated
vendored
Normal file
72
project3/node_modules/dom-serializer/package.json
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"_from": "dom-serializer@0",
|
||||
"_id": "dom-serializer@0.2.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
|
||||
"_location": "/dom-serializer",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "dom-serializer@0",
|
||||
"name": "dom-serializer",
|
||||
"escapedName": "dom-serializer",
|
||||
"rawSpec": "0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/domutils"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
|
||||
"_shasum": "1afb81f533717175d478655debc5e332d9f9bb51",
|
||||
"_spec": "dom-serializer@0",
|
||||
"_where": "/home/massiveatoms/Desktop/cs142/project3/node_modules/domutils",
|
||||
"author": {
|
||||
"name": "Felix Boehm",
|
||||
"email": "me@feedic.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/cheeriojs/dom-renderer/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"domelementtype": "^2.0.1",
|
||||
"entities": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "render dom nodes to string",
|
||||
"devDependencies": {
|
||||
"cheerio": "^1.0.0-rc.2",
|
||||
"expect.js": "~0.3.1",
|
||||
"htmlparser2": "^3.10.0",
|
||||
"lodash": "^4.17.11",
|
||||
"mocha": "^6.2.0",
|
||||
"xyz": "^3.0.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"foreignNames.json"
|
||||
],
|
||||
"homepage": "https://github.com/cheeriojs/dom-renderer#readme",
|
||||
"keywords": [
|
||||
"html",
|
||||
"xml",
|
||||
"render"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./index.js",
|
||||
"name": "dom-serializer",
|
||||
"prettier": {
|
||||
"singleQuote": true
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/cheeriojs/dom-renderer.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha test.js"
|
||||
},
|
||||
"version": "0.2.2"
|
||||
}
|
Reference in New Issue
Block a user