| 1 |
var __create = Object.create; |
| 2 |
var __defProp = Object.defineProperty; |
| 3 |
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
| 4 |
var __getOwnPropNames = Object.getOwnPropertyNames; |
| 5 |
var __getProtoOf = Object.getPrototypeOf; |
| 6 |
var __hasOwnProp = Object.prototype.hasOwnProperty; |
| 7 |
var __commonJS = (cb, mod) => function __require() { |
| 8 |
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; |
| 9 |
}; |
| 10 |
var __copyProps = (to, from, except, desc) => { |
| 11 |
if (from && typeof from === "object" || typeof from === "function") { |
| 12 |
for (let key of __getOwnPropNames(from)) |
| 13 |
if (!__hasOwnProp.call(to, key) && key !== except) |
| 14 |
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); |
| 15 |
} |
| 16 |
return to; |
| 17 |
}; |
| 18 |
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( |
| 19 |
// If the importer is in node compatibility mode or this is not an ESM |
| 20 |
// file that has been converted to a CommonJS file using a Babel- |
| 21 |
// compatible transform (i.e. "__esModule" has not been set), then set |
| 22 |
// "default" to the CommonJS "module.exports" for node compatibility. |
| 23 |
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, |
| 24 |
mod |
| 25 |
)); |
| 26 |
|
| 27 |
// package-external:@wordpress/data |
| 28 |
var require_data = __commonJS({ |
| 29 |
"package-external:@wordpress/data"(exports, module) { |
| 30 |
module.exports = window.wp.data; |
| 31 |
} |
| 32 |
}); |
| 33 |
|
| 34 |
// package-external:@wordpress/core-data |
| 35 |
var require_core_data = __commonJS({ |
| 36 |
"package-external:@wordpress/core-data"(exports, module) { |
| 37 |
module.exports = window.wp.coreData; |
| 38 |
} |
| 39 |
}); |
| 40 |
|
| 41 |
// package-external:@wordpress/i18n |
| 42 |
var require_i18n = __commonJS({ |
| 43 |
"package-external:@wordpress/i18n"(exports, module) { |
| 44 |
module.exports = window.wp.i18n; |
| 45 |
} |
| 46 |
}); |
| 47 |
|
| 48 |
// node_modules/domelementtype/lib/index.js |
| 49 |
var require_lib = __commonJS({ |
| 50 |
"node_modules/domelementtype/lib/index.js"(exports) { |
| 51 |
"use strict"; |
| 52 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 53 |
exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0; |
| 54 |
var ElementType; |
| 55 |
(function(ElementType2) { |
| 56 |
ElementType2["Root"] = "root"; |
| 57 |
ElementType2["Text"] = "text"; |
| 58 |
ElementType2["Directive"] = "directive"; |
| 59 |
ElementType2["Comment"] = "comment"; |
| 60 |
ElementType2["Script"] = "script"; |
| 61 |
ElementType2["Style"] = "style"; |
| 62 |
ElementType2["Tag"] = "tag"; |
| 63 |
ElementType2["CDATA"] = "cdata"; |
| 64 |
ElementType2["Doctype"] = "doctype"; |
| 65 |
})(ElementType = exports.ElementType || (exports.ElementType = {})); |
| 66 |
function isTag(elem) { |
| 67 |
return elem.type === ElementType.Tag || elem.type === ElementType.Script || elem.type === ElementType.Style; |
| 68 |
} |
| 69 |
exports.isTag = isTag; |
| 70 |
exports.Root = ElementType.Root; |
| 71 |
exports.Text = ElementType.Text; |
| 72 |
exports.Directive = ElementType.Directive; |
| 73 |
exports.Comment = ElementType.Comment; |
| 74 |
exports.Script = ElementType.Script; |
| 75 |
exports.Style = ElementType.Style; |
| 76 |
exports.Tag = ElementType.Tag; |
| 77 |
exports.CDATA = ElementType.CDATA; |
| 78 |
exports.Doctype = ElementType.Doctype; |
| 79 |
} |
| 80 |
}); |
| 81 |
|
| 82 |
// node_modules/domhandler/lib/node.js |
| 83 |
var require_node = __commonJS({ |
| 84 |
"node_modules/domhandler/lib/node.js"(exports) { |
| 85 |
"use strict"; |
| 86 |
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() { |
| 87 |
var extendStatics = function(d, b) { |
| 88 |
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { |
| 89 |
d2.__proto__ = b2; |
| 90 |
} || function(d2, b2) { |
| 91 |
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; |
| 92 |
}; |
| 93 |
return extendStatics(d, b); |
| 94 |
}; |
| 95 |
return function(d, b) { |
| 96 |
if (typeof b !== "function" && b !== null) |
| 97 |
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); |
| 98 |
extendStatics(d, b); |
| 99 |
function __2() { |
| 100 |
this.constructor = d; |
| 101 |
} |
| 102 |
d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); |
| 103 |
}; |
| 104 |
})(); |
| 105 |
var __assign = exports && exports.__assign || function() { |
| 106 |
__assign = Object.assign || function(t) { |
| 107 |
for (var s, i = 1, n = arguments.length; i < n; i++) { |
| 108 |
s = arguments[i]; |
| 109 |
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) |
| 110 |
t[p] = s[p]; |
| 111 |
} |
| 112 |
return t; |
| 113 |
}; |
| 114 |
return __assign.apply(this, arguments); |
| 115 |
}; |
| 116 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 117 |
exports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.CDATA = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0; |
| 118 |
var domelementtype_1 = require_lib(); |
| 119 |
var Node = ( |
| 120 |
/** @class */ |
| 121 |
(function() { |
| 122 |
function Node2() { |
| 123 |
this.parent = null; |
| 124 |
this.prev = null; |
| 125 |
this.next = null; |
| 126 |
this.startIndex = null; |
| 127 |
this.endIndex = null; |
| 128 |
} |
| 129 |
Object.defineProperty(Node2.prototype, "parentNode", { |
| 130 |
// Read-write aliases for properties |
| 131 |
/** |
| 132 |
* Same as {@link parent}. |
| 133 |
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias. |
| 134 |
*/ |
| 135 |
get: function() { |
| 136 |
return this.parent; |
| 137 |
}, |
| 138 |
set: function(parent) { |
| 139 |
this.parent = parent; |
| 140 |
}, |
| 141 |
enumerable: false, |
| 142 |
configurable: true |
| 143 |
}); |
| 144 |
Object.defineProperty(Node2.prototype, "previousSibling", { |
| 145 |
/** |
| 146 |
* Same as {@link prev}. |
| 147 |
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias. |
| 148 |
*/ |
| 149 |
get: function() { |
| 150 |
return this.prev; |
| 151 |
}, |
| 152 |
set: function(prev) { |
| 153 |
this.prev = prev; |
| 154 |
}, |
| 155 |
enumerable: false, |
| 156 |
configurable: true |
| 157 |
}); |
| 158 |
Object.defineProperty(Node2.prototype, "nextSibling", { |
| 159 |
/** |
| 160 |
* Same as {@link next}. |
| 161 |
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias. |
| 162 |
*/ |
| 163 |
get: function() { |
| 164 |
return this.next; |
| 165 |
}, |
| 166 |
set: function(next) { |
| 167 |
this.next = next; |
| 168 |
}, |
| 169 |
enumerable: false, |
| 170 |
configurable: true |
| 171 |
}); |
| 172 |
Node2.prototype.cloneNode = function(recursive) { |
| 173 |
if (recursive === void 0) { |
| 174 |
recursive = false; |
| 175 |
} |
| 176 |
return cloneNode(this, recursive); |
| 177 |
}; |
| 178 |
return Node2; |
| 179 |
})() |
| 180 |
); |
| 181 |
exports.Node = Node; |
| 182 |
var DataNode = ( |
| 183 |
/** @class */ |
| 184 |
(function(_super) { |
| 185 |
__extends(DataNode2, _super); |
| 186 |
function DataNode2(data) { |
| 187 |
var _this = _super.call(this) || this; |
| 188 |
_this.data = data; |
| 189 |
return _this; |
| 190 |
} |
| 191 |
Object.defineProperty(DataNode2.prototype, "nodeValue", { |
| 192 |
/** |
| 193 |
* Same as {@link data}. |
| 194 |
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias. |
| 195 |
*/ |
| 196 |
get: function() { |
| 197 |
return this.data; |
| 198 |
}, |
| 199 |
set: function(data) { |
| 200 |
this.data = data; |
| 201 |
}, |
| 202 |
enumerable: false, |
| 203 |
configurable: true |
| 204 |
}); |
| 205 |
return DataNode2; |
| 206 |
})(Node) |
| 207 |
); |
| 208 |
exports.DataNode = DataNode; |
| 209 |
var Text2 = ( |
| 210 |
/** @class */ |
| 211 |
(function(_super) { |
| 212 |
__extends(Text3, _super); |
| 213 |
function Text3() { |
| 214 |
var _this = _super !== null && _super.apply(this, arguments) || this; |
| 215 |
_this.type = domelementtype_1.ElementType.Text; |
| 216 |
return _this; |
| 217 |
} |
| 218 |
Object.defineProperty(Text3.prototype, "nodeType", { |
| 219 |
get: function() { |
| 220 |
return 3; |
| 221 |
}, |
| 222 |
enumerable: false, |
| 223 |
configurable: true |
| 224 |
}); |
| 225 |
return Text3; |
| 226 |
})(DataNode) |
| 227 |
); |
| 228 |
exports.Text = Text2; |
| 229 |
var Comment2 = ( |
| 230 |
/** @class */ |
| 231 |
(function(_super) { |
| 232 |
__extends(Comment3, _super); |
| 233 |
function Comment3() { |
| 234 |
var _this = _super !== null && _super.apply(this, arguments) || this; |
| 235 |
_this.type = domelementtype_1.ElementType.Comment; |
| 236 |
return _this; |
| 237 |
} |
| 238 |
Object.defineProperty(Comment3.prototype, "nodeType", { |
| 239 |
get: function() { |
| 240 |
return 8; |
| 241 |
}, |
| 242 |
enumerable: false, |
| 243 |
configurable: true |
| 244 |
}); |
| 245 |
return Comment3; |
| 246 |
})(DataNode) |
| 247 |
); |
| 248 |
exports.Comment = Comment2; |
| 249 |
var ProcessingInstruction2 = ( |
| 250 |
/** @class */ |
| 251 |
(function(_super) { |
| 252 |
__extends(ProcessingInstruction3, _super); |
| 253 |
function ProcessingInstruction3(name, data) { |
| 254 |
var _this = _super.call(this, data) || this; |
| 255 |
_this.name = name; |
| 256 |
_this.type = domelementtype_1.ElementType.Directive; |
| 257 |
return _this; |
| 258 |
} |
| 259 |
Object.defineProperty(ProcessingInstruction3.prototype, "nodeType", { |
| 260 |
get: function() { |
| 261 |
return 1; |
| 262 |
}, |
| 263 |
enumerable: false, |
| 264 |
configurable: true |
| 265 |
}); |
| 266 |
return ProcessingInstruction3; |
| 267 |
})(DataNode) |
| 268 |
); |
| 269 |
exports.ProcessingInstruction = ProcessingInstruction2; |
| 270 |
var NodeWithChildren = ( |
| 271 |
/** @class */ |
| 272 |
(function(_super) { |
| 273 |
__extends(NodeWithChildren2, _super); |
| 274 |
function NodeWithChildren2(children) { |
| 275 |
var _this = _super.call(this) || this; |
| 276 |
_this.children = children; |
| 277 |
return _this; |
| 278 |
} |
| 279 |
Object.defineProperty(NodeWithChildren2.prototype, "firstChild", { |
| 280 |
// Aliases |
| 281 |
/** First child of the node. */ |
| 282 |
get: function() { |
| 283 |
var _a; |
| 284 |
return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null; |
| 285 |
}, |
| 286 |
enumerable: false, |
| 287 |
configurable: true |
| 288 |
}); |
| 289 |
Object.defineProperty(NodeWithChildren2.prototype, "lastChild", { |
| 290 |
/** Last child of the node. */ |
| 291 |
get: function() { |
| 292 |
return this.children.length > 0 ? this.children[this.children.length - 1] : null; |
| 293 |
}, |
| 294 |
enumerable: false, |
| 295 |
configurable: true |
| 296 |
}); |
| 297 |
Object.defineProperty(NodeWithChildren2.prototype, "childNodes", { |
| 298 |
/** |
| 299 |
* Same as {@link children}. |
| 300 |
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias. |
| 301 |
*/ |
| 302 |
get: function() { |
| 303 |
return this.children; |
| 304 |
}, |
| 305 |
set: function(children) { |
| 306 |
this.children = children; |
| 307 |
}, |
| 308 |
enumerable: false, |
| 309 |
configurable: true |
| 310 |
}); |
| 311 |
return NodeWithChildren2; |
| 312 |
})(Node) |
| 313 |
); |
| 314 |
exports.NodeWithChildren = NodeWithChildren; |
| 315 |
var CDATA = ( |
| 316 |
/** @class */ |
| 317 |
(function(_super) { |
| 318 |
__extends(CDATA2, _super); |
| 319 |
function CDATA2() { |
| 320 |
var _this = _super !== null && _super.apply(this, arguments) || this; |
| 321 |
_this.type = domelementtype_1.ElementType.CDATA; |
| 322 |
return _this; |
| 323 |
} |
| 324 |
Object.defineProperty(CDATA2.prototype, "nodeType", { |
| 325 |
get: function() { |
| 326 |
return 4; |
| 327 |
}, |
| 328 |
enumerable: false, |
| 329 |
configurable: true |
| 330 |
}); |
| 331 |
return CDATA2; |
| 332 |
})(NodeWithChildren) |
| 333 |
); |
| 334 |
exports.CDATA = CDATA; |
| 335 |
var Document = ( |
| 336 |
/** @class */ |
| 337 |
(function(_super) { |
| 338 |
__extends(Document2, _super); |
| 339 |
function Document2() { |
| 340 |
var _this = _super !== null && _super.apply(this, arguments) || this; |
| 341 |
_this.type = domelementtype_1.ElementType.Root; |
| 342 |
return _this; |
| 343 |
} |
| 344 |
Object.defineProperty(Document2.prototype, "nodeType", { |
| 345 |
get: function() { |
| 346 |
return 9; |
| 347 |
}, |
| 348 |
enumerable: false, |
| 349 |
configurable: true |
| 350 |
}); |
| 351 |
return Document2; |
| 352 |
})(NodeWithChildren) |
| 353 |
); |
| 354 |
exports.Document = Document; |
| 355 |
var Element2 = ( |
| 356 |
/** @class */ |
| 357 |
(function(_super) { |
| 358 |
__extends(Element3, _super); |
| 359 |
function Element3(name, attribs, children, type) { |
| 360 |
if (children === void 0) { |
| 361 |
children = []; |
| 362 |
} |
| 363 |
if (type === void 0) { |
| 364 |
type = name === "script" ? domelementtype_1.ElementType.Script : name === "style" ? domelementtype_1.ElementType.Style : domelementtype_1.ElementType.Tag; |
| 365 |
} |
| 366 |
var _this = _super.call(this, children) || this; |
| 367 |
_this.name = name; |
| 368 |
_this.attribs = attribs; |
| 369 |
_this.type = type; |
| 370 |
return _this; |
| 371 |
} |
| 372 |
Object.defineProperty(Element3.prototype, "nodeType", { |
| 373 |
get: function() { |
| 374 |
return 1; |
| 375 |
}, |
| 376 |
enumerable: false, |
| 377 |
configurable: true |
| 378 |
}); |
| 379 |
Object.defineProperty(Element3.prototype, "tagName", { |
| 380 |
// DOM Level 1 aliases |
| 381 |
/** |
| 382 |
* Same as {@link name}. |
| 383 |
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias. |
| 384 |
*/ |
| 385 |
get: function() { |
| 386 |
return this.name; |
| 387 |
}, |
| 388 |
set: function(name) { |
| 389 |
this.name = name; |
| 390 |
}, |
| 391 |
enumerable: false, |
| 392 |
configurable: true |
| 393 |
}); |
| 394 |
Object.defineProperty(Element3.prototype, "attributes", { |
| 395 |
get: function() { |
| 396 |
var _this = this; |
| 397 |
return Object.keys(this.attribs).map(function(name) { |
| 398 |
var _a, _b; |
| 399 |
return { |
| 400 |
name, |
| 401 |
value: _this.attribs[name], |
| 402 |
namespace: (_a = _this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name], |
| 403 |
prefix: (_b = _this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name] |
| 404 |
}; |
| 405 |
}); |
| 406 |
}, |
| 407 |
enumerable: false, |
| 408 |
configurable: true |
| 409 |
}); |
| 410 |
return Element3; |
| 411 |
})(NodeWithChildren) |
| 412 |
); |
| 413 |
exports.Element = Element2; |
| 414 |
function isTag(node) { |
| 415 |
return (0, domelementtype_1.isTag)(node); |
| 416 |
} |
| 417 |
exports.isTag = isTag; |
| 418 |
function isCDATA(node) { |
| 419 |
return node.type === domelementtype_1.ElementType.CDATA; |
| 420 |
} |
| 421 |
exports.isCDATA = isCDATA; |
| 422 |
function isText(node) { |
| 423 |
return node.type === domelementtype_1.ElementType.Text; |
| 424 |
} |
| 425 |
exports.isText = isText; |
| 426 |
function isComment(node) { |
| 427 |
return node.type === domelementtype_1.ElementType.Comment; |
| 428 |
} |
| 429 |
exports.isComment = isComment; |
| 430 |
function isDirective(node) { |
| 431 |
return node.type === domelementtype_1.ElementType.Directive; |
| 432 |
} |
| 433 |
exports.isDirective = isDirective; |
| 434 |
function isDocument(node) { |
| 435 |
return node.type === domelementtype_1.ElementType.Root; |
| 436 |
} |
| 437 |
exports.isDocument = isDocument; |
| 438 |
function hasChildren(node) { |
| 439 |
return Object.prototype.hasOwnProperty.call(node, "children"); |
| 440 |
} |
| 441 |
exports.hasChildren = hasChildren; |
| 442 |
function cloneNode(node, recursive) { |
| 443 |
if (recursive === void 0) { |
| 444 |
recursive = false; |
| 445 |
} |
| 446 |
var result; |
| 447 |
if (isText(node)) { |
| 448 |
result = new Text2(node.data); |
| 449 |
} else if (isComment(node)) { |
| 450 |
result = new Comment2(node.data); |
| 451 |
} else if (isTag(node)) { |
| 452 |
var children = recursive ? cloneChildren(node.children) : []; |
| 453 |
var clone_1 = new Element2(node.name, __assign({}, node.attribs), children); |
| 454 |
children.forEach(function(child) { |
| 455 |
return child.parent = clone_1; |
| 456 |
}); |
| 457 |
if (node.namespace != null) { |
| 458 |
clone_1.namespace = node.namespace; |
| 459 |
} |
| 460 |
if (node["x-attribsNamespace"]) { |
| 461 |
clone_1["x-attribsNamespace"] = __assign({}, node["x-attribsNamespace"]); |
| 462 |
} |
| 463 |
if (node["x-attribsPrefix"]) { |
| 464 |
clone_1["x-attribsPrefix"] = __assign({}, node["x-attribsPrefix"]); |
| 465 |
} |
| 466 |
result = clone_1; |
| 467 |
} else if (isCDATA(node)) { |
| 468 |
var children = recursive ? cloneChildren(node.children) : []; |
| 469 |
var clone_2 = new CDATA(children); |
| 470 |
children.forEach(function(child) { |
| 471 |
return child.parent = clone_2; |
| 472 |
}); |
| 473 |
result = clone_2; |
| 474 |
} else if (isDocument(node)) { |
| 475 |
var children = recursive ? cloneChildren(node.children) : []; |
| 476 |
var clone_3 = new Document(children); |
| 477 |
children.forEach(function(child) { |
| 478 |
return child.parent = clone_3; |
| 479 |
}); |
| 480 |
if (node["x-mode"]) { |
| 481 |
clone_3["x-mode"] = node["x-mode"]; |
| 482 |
} |
| 483 |
result = clone_3; |
| 484 |
} else if (isDirective(node)) { |
| 485 |
var instruction = new ProcessingInstruction2(node.name, node.data); |
| 486 |
if (node["x-name"] != null) { |
| 487 |
instruction["x-name"] = node["x-name"]; |
| 488 |
instruction["x-publicId"] = node["x-publicId"]; |
| 489 |
instruction["x-systemId"] = node["x-systemId"]; |
| 490 |
} |
| 491 |
result = instruction; |
| 492 |
} else { |
| 493 |
throw new Error("Not implemented yet: ".concat(node.type)); |
| 494 |
} |
| 495 |
result.startIndex = node.startIndex; |
| 496 |
result.endIndex = node.endIndex; |
| 497 |
if (node.sourceCodeLocation != null) { |
| 498 |
result.sourceCodeLocation = node.sourceCodeLocation; |
| 499 |
} |
| 500 |
return result; |
| 501 |
} |
| 502 |
exports.cloneNode = cloneNode; |
| 503 |
function cloneChildren(childs) { |
| 504 |
var children = childs.map(function(child) { |
| 505 |
return cloneNode(child, true); |
| 506 |
}); |
| 507 |
for (var i = 1; i < children.length; i++) { |
| 508 |
children[i].prev = children[i - 1]; |
| 509 |
children[i - 1].next = children[i]; |
| 510 |
} |
| 511 |
return children; |
| 512 |
} |
| 513 |
} |
| 514 |
}); |
| 515 |
|
| 516 |
// node_modules/domhandler/lib/index.js |
| 517 |
var require_lib2 = __commonJS({ |
| 518 |
"node_modules/domhandler/lib/index.js"(exports) { |
| 519 |
"use strict"; |
| 520 |
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { |
| 521 |
if (k2 === void 0) k2 = k; |
| 522 |
var desc = Object.getOwnPropertyDescriptor(m, k); |
| 523 |
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { |
| 524 |
desc = { enumerable: true, get: function() { |
| 525 |
return m[k]; |
| 526 |
} }; |
| 527 |
} |
| 528 |
Object.defineProperty(o, k2, desc); |
| 529 |
}) : (function(o, m, k, k2) { |
| 530 |
if (k2 === void 0) k2 = k; |
| 531 |
o[k2] = m[k]; |
| 532 |
})); |
| 533 |
var __exportStar = exports && exports.__exportStar || function(m, exports2) { |
| 534 |
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p); |
| 535 |
}; |
| 536 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 537 |
exports.DomHandler = void 0; |
| 538 |
var domelementtype_1 = require_lib(); |
| 539 |
var node_js_1 = require_node(); |
| 540 |
__exportStar(require_node(), exports); |
| 541 |
var defaultOpts = { |
| 542 |
withStartIndices: false, |
| 543 |
withEndIndices: false, |
| 544 |
xmlMode: false |
| 545 |
}; |
| 546 |
var DomHandler = ( |
| 547 |
/** @class */ |
| 548 |
(function() { |
| 549 |
function DomHandler2(callback, options, elementCB) { |
| 550 |
this.dom = []; |
| 551 |
this.root = new node_js_1.Document(this.dom); |
| 552 |
this.done = false; |
| 553 |
this.tagStack = [this.root]; |
| 554 |
this.lastNode = null; |
| 555 |
this.parser = null; |
| 556 |
if (typeof options === "function") { |
| 557 |
elementCB = options; |
| 558 |
options = defaultOpts; |
| 559 |
} |
| 560 |
if (typeof callback === "object") { |
| 561 |
options = callback; |
| 562 |
callback = void 0; |
| 563 |
} |
| 564 |
this.callback = callback !== null && callback !== void 0 ? callback : null; |
| 565 |
this.options = options !== null && options !== void 0 ? options : defaultOpts; |
| 566 |
this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null; |
| 567 |
} |
| 568 |
DomHandler2.prototype.onparserinit = function(parser) { |
| 569 |
this.parser = parser; |
| 570 |
}; |
| 571 |
DomHandler2.prototype.onreset = function() { |
| 572 |
this.dom = []; |
| 573 |
this.root = new node_js_1.Document(this.dom); |
| 574 |
this.done = false; |
| 575 |
this.tagStack = [this.root]; |
| 576 |
this.lastNode = null; |
| 577 |
this.parser = null; |
| 578 |
}; |
| 579 |
DomHandler2.prototype.onend = function() { |
| 580 |
if (this.done) |
| 581 |
return; |
| 582 |
this.done = true; |
| 583 |
this.parser = null; |
| 584 |
this.handleCallback(null); |
| 585 |
}; |
| 586 |
DomHandler2.prototype.onerror = function(error) { |
| 587 |
this.handleCallback(error); |
| 588 |
}; |
| 589 |
DomHandler2.prototype.onclosetag = function() { |
| 590 |
this.lastNode = null; |
| 591 |
var elem = this.tagStack.pop(); |
| 592 |
if (this.options.withEndIndices) { |
| 593 |
elem.endIndex = this.parser.endIndex; |
| 594 |
} |
| 595 |
if (this.elementCB) |
| 596 |
this.elementCB(elem); |
| 597 |
}; |
| 598 |
DomHandler2.prototype.onopentag = function(name, attribs) { |
| 599 |
var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : void 0; |
| 600 |
var element = new node_js_1.Element(name, attribs, void 0, type); |
| 601 |
this.addNode(element); |
| 602 |
this.tagStack.push(element); |
| 603 |
}; |
| 604 |
DomHandler2.prototype.ontext = function(data) { |
| 605 |
var lastNode = this.lastNode; |
| 606 |
if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) { |
| 607 |
lastNode.data += data; |
| 608 |
if (this.options.withEndIndices) { |
| 609 |
lastNode.endIndex = this.parser.endIndex; |
| 610 |
} |
| 611 |
} else { |
| 612 |
var node = new node_js_1.Text(data); |
| 613 |
this.addNode(node); |
| 614 |
this.lastNode = node; |
| 615 |
} |
| 616 |
}; |
| 617 |
DomHandler2.prototype.oncomment = function(data) { |
| 618 |
if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) { |
| 619 |
this.lastNode.data += data; |
| 620 |
return; |
| 621 |
} |
| 622 |
var node = new node_js_1.Comment(data); |
| 623 |
this.addNode(node); |
| 624 |
this.lastNode = node; |
| 625 |
}; |
| 626 |
DomHandler2.prototype.oncommentend = function() { |
| 627 |
this.lastNode = null; |
| 628 |
}; |
| 629 |
DomHandler2.prototype.oncdatastart = function() { |
| 630 |
var text = new node_js_1.Text(""); |
| 631 |
var node = new node_js_1.CDATA([text]); |
| 632 |
this.addNode(node); |
| 633 |
text.parent = node; |
| 634 |
this.lastNode = text; |
| 635 |
}; |
| 636 |
DomHandler2.prototype.oncdataend = function() { |
| 637 |
this.lastNode = null; |
| 638 |
}; |
| 639 |
DomHandler2.prototype.onprocessinginstruction = function(name, data) { |
| 640 |
var node = new node_js_1.ProcessingInstruction(name, data); |
| 641 |
this.addNode(node); |
| 642 |
}; |
| 643 |
DomHandler2.prototype.handleCallback = function(error) { |
| 644 |
if (typeof this.callback === "function") { |
| 645 |
this.callback(error, this.dom); |
| 646 |
} else if (error) { |
| 647 |
throw error; |
| 648 |
} |
| 649 |
}; |
| 650 |
DomHandler2.prototype.addNode = function(node) { |
| 651 |
var parent = this.tagStack[this.tagStack.length - 1]; |
| 652 |
var previousSibling = parent.children[parent.children.length - 1]; |
| 653 |
if (this.options.withStartIndices) { |
| 654 |
node.startIndex = this.parser.startIndex; |
| 655 |
} |
| 656 |
if (this.options.withEndIndices) { |
| 657 |
node.endIndex = this.parser.endIndex; |
| 658 |
} |
| 659 |
parent.children.push(node); |
| 660 |
if (previousSibling) { |
| 661 |
node.prev = previousSibling; |
| 662 |
previousSibling.next = node; |
| 663 |
} |
| 664 |
node.parent = parent; |
| 665 |
this.lastNode = null; |
| 666 |
}; |
| 667 |
return DomHandler2; |
| 668 |
})() |
| 669 |
); |
| 670 |
exports.DomHandler = DomHandler; |
| 671 |
exports.default = DomHandler; |
| 672 |
} |
| 673 |
}); |
| 674 |
|
| 675 |
// node_modules/html-dom-parser/lib/client/constants.js |
| 676 |
var require_constants = __commonJS({ |
| 677 |
"node_modules/html-dom-parser/lib/client/constants.js"(exports) { |
| 678 |
"use strict"; |
| 679 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 680 |
exports.CARRIAGE_RETURN_PLACEHOLDER_REGEX = exports.CARRIAGE_RETURN_PLACEHOLDER = exports.CARRIAGE_RETURN_REGEX = exports.CARRIAGE_RETURN = exports.CASE_SENSITIVE_TAG_NAMES_MAP = exports.CASE_SENSITIVE_TAG_NAMES = void 0; |
| 681 |
exports.CASE_SENSITIVE_TAG_NAMES = [ |
| 682 |
"animateMotion", |
| 683 |
"animateTransform", |
| 684 |
"clipPath", |
| 685 |
"feBlend", |
| 686 |
"feColorMatrix", |
| 687 |
"feComponentTransfer", |
| 688 |
"feComposite", |
| 689 |
"feConvolveMatrix", |
| 690 |
"feDiffuseLighting", |
| 691 |
"feDisplacementMap", |
| 692 |
"feDropShadow", |
| 693 |
"feFlood", |
| 694 |
"feFuncA", |
| 695 |
"feFuncB", |
| 696 |
"feFuncG", |
| 697 |
"feFuncR", |
| 698 |
"feGaussianBlur", |
| 699 |
"feImage", |
| 700 |
"feMerge", |
| 701 |
"feMergeNode", |
| 702 |
"feMorphology", |
| 703 |
"feOffset", |
| 704 |
"fePointLight", |
| 705 |
"feSpecularLighting", |
| 706 |
"feSpotLight", |
| 707 |
"feTile", |
| 708 |
"feTurbulence", |
| 709 |
"foreignObject", |
| 710 |
"linearGradient", |
| 711 |
"radialGradient", |
| 712 |
"textPath" |
| 713 |
]; |
| 714 |
exports.CASE_SENSITIVE_TAG_NAMES_MAP = exports.CASE_SENSITIVE_TAG_NAMES.reduce(function(accumulator, tagName) { |
| 715 |
accumulator[tagName.toLowerCase()] = tagName; |
| 716 |
return accumulator; |
| 717 |
}, {}); |
| 718 |
exports.CARRIAGE_RETURN = "\r"; |
| 719 |
exports.CARRIAGE_RETURN_REGEX = new RegExp(exports.CARRIAGE_RETURN, "g"); |
| 720 |
exports.CARRIAGE_RETURN_PLACEHOLDER = "__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(), "__"); |
| 721 |
exports.CARRIAGE_RETURN_PLACEHOLDER_REGEX = new RegExp(exports.CARRIAGE_RETURN_PLACEHOLDER, "g"); |
| 722 |
} |
| 723 |
}); |
| 724 |
|
| 725 |
// node_modules/html-dom-parser/lib/client/utilities.js |
| 726 |
var require_utilities = __commonJS({ |
| 727 |
"node_modules/html-dom-parser/lib/client/utilities.js"(exports) { |
| 728 |
"use strict"; |
| 729 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 730 |
exports.formatAttributes = formatAttributes; |
| 731 |
exports.escapeSpecialCharacters = escapeSpecialCharacters; |
| 732 |
exports.revertEscapedCharacters = revertEscapedCharacters; |
| 733 |
exports.formatDOM = formatDOM; |
| 734 |
var domhandler_1 = require_lib2(); |
| 735 |
var constants_1 = require_constants(); |
| 736 |
function getCaseSensitiveTagName(tagName) { |
| 737 |
return constants_1.CASE_SENSITIVE_TAG_NAMES_MAP[tagName]; |
| 738 |
} |
| 739 |
function formatAttributes(attributes) { |
| 740 |
var map = {}; |
| 741 |
var index = 0; |
| 742 |
var attributesLength = attributes.length; |
| 743 |
for (; index < attributesLength; index++) { |
| 744 |
var attribute = attributes[index]; |
| 745 |
map[attribute.name] = attribute.value; |
| 746 |
} |
| 747 |
return map; |
| 748 |
} |
| 749 |
function formatTagName(tagName) { |
| 750 |
tagName = tagName.toLowerCase(); |
| 751 |
var caseSensitiveTagName = getCaseSensitiveTagName(tagName); |
| 752 |
if (caseSensitiveTagName) { |
| 753 |
return caseSensitiveTagName; |
| 754 |
} |
| 755 |
return tagName; |
| 756 |
} |
| 757 |
function escapeSpecialCharacters(html) { |
| 758 |
return html.replace(constants_1.CARRIAGE_RETURN_REGEX, constants_1.CARRIAGE_RETURN_PLACEHOLDER); |
| 759 |
} |
| 760 |
function revertEscapedCharacters(text) { |
| 761 |
return text.replace(constants_1.CARRIAGE_RETURN_PLACEHOLDER_REGEX, constants_1.CARRIAGE_RETURN); |
| 762 |
} |
| 763 |
function formatDOM(nodes, parent, directive) { |
| 764 |
if (parent === void 0) { |
| 765 |
parent = null; |
| 766 |
} |
| 767 |
var domNodes = []; |
| 768 |
var current; |
| 769 |
var index = 0; |
| 770 |
var nodesLength = nodes.length; |
| 771 |
for (; index < nodesLength; index++) { |
| 772 |
var node = nodes[index]; |
| 773 |
switch (node.nodeType) { |
| 774 |
case 1: { |
| 775 |
var tagName = formatTagName(node.nodeName); |
| 776 |
current = new domhandler_1.Element(tagName, formatAttributes(node.attributes)); |
| 777 |
current.children = formatDOM( |
| 778 |
// template children are on content |
| 779 |
tagName === "template" ? node.content.childNodes : node.childNodes, |
| 780 |
current |
| 781 |
); |
| 782 |
break; |
| 783 |
} |
| 784 |
case 3: |
| 785 |
current = new domhandler_1.Text(revertEscapedCharacters(node.nodeValue)); |
| 786 |
break; |
| 787 |
case 8: |
| 788 |
current = new domhandler_1.Comment(node.nodeValue); |
| 789 |
break; |
| 790 |
default: |
| 791 |
continue; |
| 792 |
} |
| 793 |
var prev = domNodes[index - 1] || null; |
| 794 |
if (prev) { |
| 795 |
prev.next = current; |
| 796 |
} |
| 797 |
current.parent = parent; |
| 798 |
current.prev = prev; |
| 799 |
current.next = null; |
| 800 |
domNodes.push(current); |
| 801 |
} |
| 802 |
if (directive) { |
| 803 |
current = new domhandler_1.ProcessingInstruction(directive.substring(0, directive.indexOf(" ")).toLowerCase(), directive); |
| 804 |
current.next = domNodes[0] || null; |
| 805 |
current.parent = parent; |
| 806 |
domNodes.unshift(current); |
| 807 |
if (domNodes[1]) { |
| 808 |
domNodes[1].prev = domNodes[0]; |
| 809 |
} |
| 810 |
} |
| 811 |
return domNodes; |
| 812 |
} |
| 813 |
} |
| 814 |
}); |
| 815 |
|
| 816 |
// node_modules/html-dom-parser/lib/client/domparser.js |
| 817 |
var require_domparser = __commonJS({ |
| 818 |
"node_modules/html-dom-parser/lib/client/domparser.js"(exports) { |
| 819 |
"use strict"; |
| 820 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 821 |
exports.default = domparser; |
| 822 |
var utilities_1 = require_utilities(); |
| 823 |
var HTML = "html"; |
| 824 |
var HEAD = "head"; |
| 825 |
var BODY = "body"; |
| 826 |
var FIRST_TAG_REGEX = /<([a-zA-Z]+[0-9]?)/; |
| 827 |
var HEAD_TAG_REGEX = /<head[^]*>/i; |
| 828 |
var BODY_TAG_REGEX = /<body[^]*>/i; |
| 829 |
var parseFromDocument = function(html, tagName) { |
| 830 |
throw new Error("This browser does not support `document.implementation.createHTMLDocument`"); |
| 831 |
}; |
| 832 |
var parseFromString = function(html, tagName) { |
| 833 |
throw new Error("This browser does not support `DOMParser.prototype.parseFromString`"); |
| 834 |
}; |
| 835 |
var DOMParser = typeof window === "object" && window.DOMParser; |
| 836 |
if (typeof DOMParser === "function") { |
| 837 |
domParser_1 = new DOMParser(); |
| 838 |
mimeType_1 = "text/html"; |
| 839 |
parseFromString = function(html, tagName) { |
| 840 |
if (tagName) { |
| 841 |
html = "<".concat(tagName, ">").concat(html, "</").concat(tagName, ">"); |
| 842 |
} |
| 843 |
return domParser_1.parseFromString(html, mimeType_1); |
| 844 |
}; |
| 845 |
parseFromDocument = parseFromString; |
| 846 |
} |
| 847 |
var domParser_1; |
| 848 |
var mimeType_1; |
| 849 |
if (typeof document === "object" && document.implementation) { |
| 850 |
htmlDocument_1 = document.implementation.createHTMLDocument(); |
| 851 |
parseFromDocument = function(html, tagName) { |
| 852 |
if (tagName) { |
| 853 |
var element = htmlDocument_1.documentElement.querySelector(tagName); |
| 854 |
if (element) { |
| 855 |
element.innerHTML = html; |
| 856 |
} |
| 857 |
return htmlDocument_1; |
| 858 |
} |
| 859 |
htmlDocument_1.documentElement.innerHTML = html; |
| 860 |
return htmlDocument_1; |
| 861 |
}; |
| 862 |
} |
| 863 |
var htmlDocument_1; |
| 864 |
var template = typeof document === "object" && document.createElement("template"); |
| 865 |
var parseFromTemplate; |
| 866 |
if (template && template.content) { |
| 867 |
parseFromTemplate = function(html) { |
| 868 |
template.innerHTML = html; |
| 869 |
return template.content.childNodes; |
| 870 |
}; |
| 871 |
} |
| 872 |
function domparser(html) { |
| 873 |
var _a, _b; |
| 874 |
html = (0, utilities_1.escapeSpecialCharacters)(html); |
| 875 |
var match = html.match(FIRST_TAG_REGEX); |
| 876 |
var firstTagName = match && match[1] ? match[1].toLowerCase() : ""; |
| 877 |
switch (firstTagName) { |
| 878 |
case HTML: { |
| 879 |
var doc = parseFromString(html); |
| 880 |
if (!HEAD_TAG_REGEX.test(html)) { |
| 881 |
var element = doc.querySelector(HEAD); |
| 882 |
(_a = element === null || element === void 0 ? void 0 : element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element); |
| 883 |
} |
| 884 |
if (!BODY_TAG_REGEX.test(html)) { |
| 885 |
var element = doc.querySelector(BODY); |
| 886 |
(_b = element === null || element === void 0 ? void 0 : element.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(element); |
| 887 |
} |
| 888 |
return doc.querySelectorAll(HTML); |
| 889 |
} |
| 890 |
case HEAD: |
| 891 |
case BODY: { |
| 892 |
var elements = parseFromDocument(html).querySelectorAll(firstTagName); |
| 893 |
if (BODY_TAG_REGEX.test(html) && HEAD_TAG_REGEX.test(html)) { |
| 894 |
return elements[0].parentNode.childNodes; |
| 895 |
} |
| 896 |
return elements; |
| 897 |
} |
| 898 |
// low-level tag or text |
| 899 |
default: { |
| 900 |
if (parseFromTemplate) { |
| 901 |
return parseFromTemplate(html); |
| 902 |
} |
| 903 |
var element = parseFromDocument(html, BODY).querySelector(BODY); |
| 904 |
return element.childNodes; |
| 905 |
} |
| 906 |
} |
| 907 |
} |
| 908 |
} |
| 909 |
}); |
| 910 |
|
| 911 |
// node_modules/html-dom-parser/lib/client/html-to-dom.js |
| 912 |
var require_html_to_dom = __commonJS({ |
| 913 |
"node_modules/html-dom-parser/lib/client/html-to-dom.js"(exports) { |
| 914 |
"use strict"; |
| 915 |
var __importDefault = exports && exports.__importDefault || function(mod) { |
| 916 |
return mod && mod.__esModule ? mod : { "default": mod }; |
| 917 |
}; |
| 918 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 919 |
exports.default = HTMLDOMParser; |
| 920 |
var domparser_1 = __importDefault(require_domparser()); |
| 921 |
var utilities_1 = require_utilities(); |
| 922 |
var DIRECTIVE_REGEX = /<(![a-zA-Z\s]+)>/; |
| 923 |
function HTMLDOMParser(html) { |
| 924 |
if (typeof html !== "string") { |
| 925 |
throw new TypeError("First argument must be a string"); |
| 926 |
} |
| 927 |
if (!html) { |
| 928 |
return []; |
| 929 |
} |
| 930 |
var match = html.match(DIRECTIVE_REGEX); |
| 931 |
var directive = match ? match[1] : void 0; |
| 932 |
return (0, utilities_1.formatDOM)((0, domparser_1.default)(html), null, directive); |
| 933 |
} |
| 934 |
} |
| 935 |
}); |
| 936 |
|
| 937 |
// node_modules/react-property/lib/possibleStandardNamesOptimized.js |
| 938 |
var require_possibleStandardNamesOptimized = __commonJS({ |
| 939 |
"node_modules/react-property/lib/possibleStandardNamesOptimized.js"(exports) { |
| 940 |
var SAME = 0; |
| 941 |
exports.SAME = SAME; |
| 942 |
var CAMELCASE = 1; |
| 943 |
exports.CAMELCASE = CAMELCASE; |
| 944 |
exports.possibleStandardNames = { |
| 945 |
accept: 0, |
| 946 |
acceptCharset: 1, |
| 947 |
"accept-charset": "acceptCharset", |
| 948 |
accessKey: 1, |
| 949 |
action: 0, |
| 950 |
allowFullScreen: 1, |
| 951 |
alt: 0, |
| 952 |
as: 0, |
| 953 |
async: 0, |
| 954 |
autoCapitalize: 1, |
| 955 |
autoComplete: 1, |
| 956 |
autoCorrect: 1, |
| 957 |
autoFocus: 1, |
| 958 |
autoPlay: 1, |
| 959 |
autoSave: 1, |
| 960 |
capture: 0, |
| 961 |
cellPadding: 1, |
| 962 |
cellSpacing: 1, |
| 963 |
challenge: 0, |
| 964 |
charSet: 1, |
| 965 |
checked: 0, |
| 966 |
children: 0, |
| 967 |
cite: 0, |
| 968 |
class: "className", |
| 969 |
classID: 1, |
| 970 |
className: 1, |
| 971 |
cols: 0, |
| 972 |
colSpan: 1, |
| 973 |
content: 0, |
| 974 |
contentEditable: 1, |
| 975 |
contextMenu: 1, |
| 976 |
controls: 0, |
| 977 |
controlsList: 1, |
| 978 |
coords: 0, |
| 979 |
crossOrigin: 1, |
| 980 |
dangerouslySetInnerHTML: 1, |
| 981 |
data: 0, |
| 982 |
dateTime: 1, |
| 983 |
default: 0, |
| 984 |
defaultChecked: 1, |
| 985 |
defaultValue: 1, |
| 986 |
defer: 0, |
| 987 |
dir: 0, |
| 988 |
disabled: 0, |
| 989 |
disablePictureInPicture: 1, |
| 990 |
disableRemotePlayback: 1, |
| 991 |
download: 0, |
| 992 |
draggable: 0, |
| 993 |
encType: 1, |
| 994 |
enterKeyHint: 1, |
| 995 |
for: "htmlFor", |
| 996 |
form: 0, |
| 997 |
formMethod: 1, |
| 998 |
formAction: 1, |
| 999 |
formEncType: 1, |
| 1000 |
formNoValidate: 1, |
| 1001 |
formTarget: 1, |
| 1002 |
frameBorder: 1, |
| 1003 |
headers: 0, |
| 1004 |
height: 0, |
| 1005 |
hidden: 0, |
| 1006 |
high: 0, |
| 1007 |
href: 0, |
| 1008 |
hrefLang: 1, |
| 1009 |
htmlFor: 1, |
| 1010 |
httpEquiv: 1, |
| 1011 |
"http-equiv": "httpEquiv", |
| 1012 |
icon: 0, |
| 1013 |
id: 0, |
| 1014 |
innerHTML: 1, |
| 1015 |
inputMode: 1, |
| 1016 |
integrity: 0, |
| 1017 |
is: 0, |
| 1018 |
itemID: 1, |
| 1019 |
itemProp: 1, |
| 1020 |
itemRef: 1, |
| 1021 |
itemScope: 1, |
| 1022 |
itemType: 1, |
| 1023 |
keyParams: 1, |
| 1024 |
keyType: 1, |
| 1025 |
kind: 0, |
| 1026 |
label: 0, |
| 1027 |
lang: 0, |
| 1028 |
list: 0, |
| 1029 |
loop: 0, |
| 1030 |
low: 0, |
| 1031 |
manifest: 0, |
| 1032 |
marginWidth: 1, |
| 1033 |
marginHeight: 1, |
| 1034 |
max: 0, |
| 1035 |
maxLength: 1, |
| 1036 |
media: 0, |
| 1037 |
mediaGroup: 1, |
| 1038 |
method: 0, |
| 1039 |
min: 0, |
| 1040 |
minLength: 1, |
| 1041 |
multiple: 0, |
| 1042 |
muted: 0, |
| 1043 |
name: 0, |
| 1044 |
noModule: 1, |
| 1045 |
nonce: 0, |
| 1046 |
noValidate: 1, |
| 1047 |
open: 0, |
| 1048 |
optimum: 0, |
| 1049 |
pattern: 0, |
| 1050 |
placeholder: 0, |
| 1051 |
playsInline: 1, |
| 1052 |
poster: 0, |
| 1053 |
preload: 0, |
| 1054 |
profile: 0, |
| 1055 |
radioGroup: 1, |
| 1056 |
readOnly: 1, |
| 1057 |
referrerPolicy: 1, |
| 1058 |
rel: 0, |
| 1059 |
required: 0, |
| 1060 |
reversed: 0, |
| 1061 |
role: 0, |
| 1062 |
rows: 0, |
| 1063 |
rowSpan: 1, |
| 1064 |
sandbox: 0, |
| 1065 |
scope: 0, |
| 1066 |
scoped: 0, |
| 1067 |
scrolling: 0, |
| 1068 |
seamless: 0, |
| 1069 |
selected: 0, |
| 1070 |
shape: 0, |
| 1071 |
size: 0, |
| 1072 |
sizes: 0, |
| 1073 |
span: 0, |
| 1074 |
spellCheck: 1, |
| 1075 |
src: 0, |
| 1076 |
srcDoc: 1, |
| 1077 |
srcLang: 1, |
| 1078 |
srcSet: 1, |
| 1079 |
start: 0, |
| 1080 |
step: 0, |
| 1081 |
style: 0, |
| 1082 |
summary: 0, |
| 1083 |
tabIndex: 1, |
| 1084 |
target: 0, |
| 1085 |
title: 0, |
| 1086 |
type: 0, |
| 1087 |
useMap: 1, |
| 1088 |
value: 0, |
| 1089 |
width: 0, |
| 1090 |
wmode: 0, |
| 1091 |
wrap: 0, |
| 1092 |
about: 0, |
| 1093 |
accentHeight: 1, |
| 1094 |
"accent-height": "accentHeight", |
| 1095 |
accumulate: 0, |
| 1096 |
additive: 0, |
| 1097 |
alignmentBaseline: 1, |
| 1098 |
"alignment-baseline": "alignmentBaseline", |
| 1099 |
allowReorder: 1, |
| 1100 |
alphabetic: 0, |
| 1101 |
amplitude: 0, |
| 1102 |
arabicForm: 1, |
| 1103 |
"arabic-form": "arabicForm", |
| 1104 |
ascent: 0, |
| 1105 |
attributeName: 1, |
| 1106 |
attributeType: 1, |
| 1107 |
autoReverse: 1, |
| 1108 |
azimuth: 0, |
| 1109 |
baseFrequency: 1, |
| 1110 |
baselineShift: 1, |
| 1111 |
"baseline-shift": "baselineShift", |
| 1112 |
baseProfile: 1, |
| 1113 |
bbox: 0, |
| 1114 |
begin: 0, |
| 1115 |
bias: 0, |
| 1116 |
by: 0, |
| 1117 |
calcMode: 1, |
| 1118 |
capHeight: 1, |
| 1119 |
"cap-height": "capHeight", |
| 1120 |
clip: 0, |
| 1121 |
clipPath: 1, |
| 1122 |
"clip-path": "clipPath", |
| 1123 |
clipPathUnits: 1, |
| 1124 |
clipRule: 1, |
| 1125 |
"clip-rule": "clipRule", |
| 1126 |
color: 0, |
| 1127 |
colorInterpolation: 1, |
| 1128 |
"color-interpolation": "colorInterpolation", |
| 1129 |
colorInterpolationFilters: 1, |
| 1130 |
"color-interpolation-filters": "colorInterpolationFilters", |
| 1131 |
colorProfile: 1, |
| 1132 |
"color-profile": "colorProfile", |
| 1133 |
colorRendering: 1, |
| 1134 |
"color-rendering": "colorRendering", |
| 1135 |
contentScriptType: 1, |
| 1136 |
contentStyleType: 1, |
| 1137 |
cursor: 0, |
| 1138 |
cx: 0, |
| 1139 |
cy: 0, |
| 1140 |
d: 0, |
| 1141 |
datatype: 0, |
| 1142 |
decelerate: 0, |
| 1143 |
descent: 0, |
| 1144 |
diffuseConstant: 1, |
| 1145 |
direction: 0, |
| 1146 |
display: 0, |
| 1147 |
divisor: 0, |
| 1148 |
dominantBaseline: 1, |
| 1149 |
"dominant-baseline": "dominantBaseline", |
| 1150 |
dur: 0, |
| 1151 |
dx: 0, |
| 1152 |
dy: 0, |
| 1153 |
edgeMode: 1, |
| 1154 |
elevation: 0, |
| 1155 |
enableBackground: 1, |
| 1156 |
"enable-background": "enableBackground", |
| 1157 |
end: 0, |
| 1158 |
exponent: 0, |
| 1159 |
externalResourcesRequired: 1, |
| 1160 |
fill: 0, |
| 1161 |
fillOpacity: 1, |
| 1162 |
"fill-opacity": "fillOpacity", |
| 1163 |
fillRule: 1, |
| 1164 |
"fill-rule": "fillRule", |
| 1165 |
filter: 0, |
| 1166 |
filterRes: 1, |
| 1167 |
filterUnits: 1, |
| 1168 |
floodOpacity: 1, |
| 1169 |
"flood-opacity": "floodOpacity", |
| 1170 |
floodColor: 1, |
| 1171 |
"flood-color": "floodColor", |
| 1172 |
focusable: 0, |
| 1173 |
fontFamily: 1, |
| 1174 |
"font-family": "fontFamily", |
| 1175 |
fontSize: 1, |
| 1176 |
"font-size": "fontSize", |
| 1177 |
fontSizeAdjust: 1, |
| 1178 |
"font-size-adjust": "fontSizeAdjust", |
| 1179 |
fontStretch: 1, |
| 1180 |
"font-stretch": "fontStretch", |
| 1181 |
fontStyle: 1, |
| 1182 |
"font-style": "fontStyle", |
| 1183 |
fontVariant: 1, |
| 1184 |
"font-variant": "fontVariant", |
| 1185 |
fontWeight: 1, |
| 1186 |
"font-weight": "fontWeight", |
| 1187 |
format: 0, |
| 1188 |
from: 0, |
| 1189 |
fx: 0, |
| 1190 |
fy: 0, |
| 1191 |
g1: 0, |
| 1192 |
g2: 0, |
| 1193 |
glyphName: 1, |
| 1194 |
"glyph-name": "glyphName", |
| 1195 |
glyphOrientationHorizontal: 1, |
| 1196 |
"glyph-orientation-horizontal": "glyphOrientationHorizontal", |
| 1197 |
glyphOrientationVertical: 1, |
| 1198 |
"glyph-orientation-vertical": "glyphOrientationVertical", |
| 1199 |
glyphRef: 1, |
| 1200 |
gradientTransform: 1, |
| 1201 |
gradientUnits: 1, |
| 1202 |
hanging: 0, |
| 1203 |
horizAdvX: 1, |
| 1204 |
"horiz-adv-x": "horizAdvX", |
| 1205 |
horizOriginX: 1, |
| 1206 |
"horiz-origin-x": "horizOriginX", |
| 1207 |
ideographic: 0, |
| 1208 |
imageRendering: 1, |
| 1209 |
"image-rendering": "imageRendering", |
| 1210 |
in2: 0, |
| 1211 |
in: 0, |
| 1212 |
inlist: 0, |
| 1213 |
intercept: 0, |
| 1214 |
k1: 0, |
| 1215 |
k2: 0, |
| 1216 |
k3: 0, |
| 1217 |
k4: 0, |
| 1218 |
k: 0, |
| 1219 |
kernelMatrix: 1, |
| 1220 |
kernelUnitLength: 1, |
| 1221 |
kerning: 0, |
| 1222 |
keyPoints: 1, |
| 1223 |
keySplines: 1, |
| 1224 |
keyTimes: 1, |
| 1225 |
lengthAdjust: 1, |
| 1226 |
letterSpacing: 1, |
| 1227 |
"letter-spacing": "letterSpacing", |
| 1228 |
lightingColor: 1, |
| 1229 |
"lighting-color": "lightingColor", |
| 1230 |
limitingConeAngle: 1, |
| 1231 |
local: 0, |
| 1232 |
markerEnd: 1, |
| 1233 |
"marker-end": "markerEnd", |
| 1234 |
markerHeight: 1, |
| 1235 |
markerMid: 1, |
| 1236 |
"marker-mid": "markerMid", |
| 1237 |
markerStart: 1, |
| 1238 |
"marker-start": "markerStart", |
| 1239 |
markerUnits: 1, |
| 1240 |
markerWidth: 1, |
| 1241 |
mask: 0, |
| 1242 |
maskContentUnits: 1, |
| 1243 |
maskUnits: 1, |
| 1244 |
mathematical: 0, |
| 1245 |
mode: 0, |
| 1246 |
numOctaves: 1, |
| 1247 |
offset: 0, |
| 1248 |
opacity: 0, |
| 1249 |
operator: 0, |
| 1250 |
order: 0, |
| 1251 |
orient: 0, |
| 1252 |
orientation: 0, |
| 1253 |
origin: 0, |
| 1254 |
overflow: 0, |
| 1255 |
overlinePosition: 1, |
| 1256 |
"overline-position": "overlinePosition", |
| 1257 |
overlineThickness: 1, |
| 1258 |
"overline-thickness": "overlineThickness", |
| 1259 |
paintOrder: 1, |
| 1260 |
"paint-order": "paintOrder", |
| 1261 |
panose1: 0, |
| 1262 |
"panose-1": "panose1", |
| 1263 |
pathLength: 1, |
| 1264 |
patternContentUnits: 1, |
| 1265 |
patternTransform: 1, |
| 1266 |
patternUnits: 1, |
| 1267 |
pointerEvents: 1, |
| 1268 |
"pointer-events": "pointerEvents", |
| 1269 |
points: 0, |
| 1270 |
pointsAtX: 1, |
| 1271 |
pointsAtY: 1, |
| 1272 |
pointsAtZ: 1, |
| 1273 |
prefix: 0, |
| 1274 |
preserveAlpha: 1, |
| 1275 |
preserveAspectRatio: 1, |
| 1276 |
primitiveUnits: 1, |
| 1277 |
property: 0, |
| 1278 |
r: 0, |
| 1279 |
radius: 0, |
| 1280 |
refX: 1, |
| 1281 |
refY: 1, |
| 1282 |
renderingIntent: 1, |
| 1283 |
"rendering-intent": "renderingIntent", |
| 1284 |
repeatCount: 1, |
| 1285 |
repeatDur: 1, |
| 1286 |
requiredExtensions: 1, |
| 1287 |
requiredFeatures: 1, |
| 1288 |
resource: 0, |
| 1289 |
restart: 0, |
| 1290 |
result: 0, |
| 1291 |
results: 0, |
| 1292 |
rotate: 0, |
| 1293 |
rx: 0, |
| 1294 |
ry: 0, |
| 1295 |
scale: 0, |
| 1296 |
security: 0, |
| 1297 |
seed: 0, |
| 1298 |
shapeRendering: 1, |
| 1299 |
"shape-rendering": "shapeRendering", |
| 1300 |
slope: 0, |
| 1301 |
spacing: 0, |
| 1302 |
specularConstant: 1, |
| 1303 |
specularExponent: 1, |
| 1304 |
speed: 0, |
| 1305 |
spreadMethod: 1, |
| 1306 |
startOffset: 1, |
| 1307 |
stdDeviation: 1, |
| 1308 |
stemh: 0, |
| 1309 |
stemv: 0, |
| 1310 |
stitchTiles: 1, |
| 1311 |
stopColor: 1, |
| 1312 |
"stop-color": "stopColor", |
| 1313 |
stopOpacity: 1, |
| 1314 |
"stop-opacity": "stopOpacity", |
| 1315 |
strikethroughPosition: 1, |
| 1316 |
"strikethrough-position": "strikethroughPosition", |
| 1317 |
strikethroughThickness: 1, |
| 1318 |
"strikethrough-thickness": "strikethroughThickness", |
| 1319 |
string: 0, |
| 1320 |
stroke: 0, |
| 1321 |
strokeDasharray: 1, |
| 1322 |
"stroke-dasharray": "strokeDasharray", |
| 1323 |
strokeDashoffset: 1, |
| 1324 |
"stroke-dashoffset": "strokeDashoffset", |
| 1325 |
strokeLinecap: 1, |
| 1326 |
"stroke-linecap": "strokeLinecap", |
| 1327 |
strokeLinejoin: 1, |
| 1328 |
"stroke-linejoin": "strokeLinejoin", |
| 1329 |
strokeMiterlimit: 1, |
| 1330 |
"stroke-miterlimit": "strokeMiterlimit", |
| 1331 |
strokeWidth: 1, |
| 1332 |
"stroke-width": "strokeWidth", |
| 1333 |
strokeOpacity: 1, |
| 1334 |
"stroke-opacity": "strokeOpacity", |
| 1335 |
suppressContentEditableWarning: 1, |
| 1336 |
suppressHydrationWarning: 1, |
| 1337 |
surfaceScale: 1, |
| 1338 |
systemLanguage: 1, |
| 1339 |
tableValues: 1, |
| 1340 |
targetX: 1, |
| 1341 |
targetY: 1, |
| 1342 |
textAnchor: 1, |
| 1343 |
"text-anchor": "textAnchor", |
| 1344 |
textDecoration: 1, |
| 1345 |
"text-decoration": "textDecoration", |
| 1346 |
textLength: 1, |
| 1347 |
textRendering: 1, |
| 1348 |
"text-rendering": "textRendering", |
| 1349 |
to: 0, |
| 1350 |
transform: 0, |
| 1351 |
typeof: 0, |
| 1352 |
u1: 0, |
| 1353 |
u2: 0, |
| 1354 |
underlinePosition: 1, |
| 1355 |
"underline-position": "underlinePosition", |
| 1356 |
underlineThickness: 1, |
| 1357 |
"underline-thickness": "underlineThickness", |
| 1358 |
unicode: 0, |
| 1359 |
unicodeBidi: 1, |
| 1360 |
"unicode-bidi": "unicodeBidi", |
| 1361 |
unicodeRange: 1, |
| 1362 |
"unicode-range": "unicodeRange", |
| 1363 |
unitsPerEm: 1, |
| 1364 |
"units-per-em": "unitsPerEm", |
| 1365 |
unselectable: 0, |
| 1366 |
vAlphabetic: 1, |
| 1367 |
"v-alphabetic": "vAlphabetic", |
| 1368 |
values: 0, |
| 1369 |
vectorEffect: 1, |
| 1370 |
"vector-effect": "vectorEffect", |
| 1371 |
version: 0, |
| 1372 |
vertAdvY: 1, |
| 1373 |
"vert-adv-y": "vertAdvY", |
| 1374 |
vertOriginX: 1, |
| 1375 |
"vert-origin-x": "vertOriginX", |
| 1376 |
vertOriginY: 1, |
| 1377 |
"vert-origin-y": "vertOriginY", |
| 1378 |
vHanging: 1, |
| 1379 |
"v-hanging": "vHanging", |
| 1380 |
vIdeographic: 1, |
| 1381 |
"v-ideographic": "vIdeographic", |
| 1382 |
viewBox: 1, |
| 1383 |
viewTarget: 1, |
| 1384 |
visibility: 0, |
| 1385 |
vMathematical: 1, |
| 1386 |
"v-mathematical": "vMathematical", |
| 1387 |
vocab: 0, |
| 1388 |
widths: 0, |
| 1389 |
wordSpacing: 1, |
| 1390 |
"word-spacing": "wordSpacing", |
| 1391 |
writingMode: 1, |
| 1392 |
"writing-mode": "writingMode", |
| 1393 |
x1: 0, |
| 1394 |
x2: 0, |
| 1395 |
x: 0, |
| 1396 |
xChannelSelector: 1, |
| 1397 |
xHeight: 1, |
| 1398 |
"x-height": "xHeight", |
| 1399 |
xlinkActuate: 1, |
| 1400 |
"xlink:actuate": "xlinkActuate", |
| 1401 |
xlinkArcrole: 1, |
| 1402 |
"xlink:arcrole": "xlinkArcrole", |
| 1403 |
xlinkHref: 1, |
| 1404 |
"xlink:href": "xlinkHref", |
| 1405 |
xlinkRole: 1, |
| 1406 |
"xlink:role": "xlinkRole", |
| 1407 |
xlinkShow: 1, |
| 1408 |
"xlink:show": "xlinkShow", |
| 1409 |
xlinkTitle: 1, |
| 1410 |
"xlink:title": "xlinkTitle", |
| 1411 |
xlinkType: 1, |
| 1412 |
"xlink:type": "xlinkType", |
| 1413 |
xmlBase: 1, |
| 1414 |
"xml:base": "xmlBase", |
| 1415 |
xmlLang: 1, |
| 1416 |
"xml:lang": "xmlLang", |
| 1417 |
xmlns: 0, |
| 1418 |
"xml:space": "xmlSpace", |
| 1419 |
xmlnsXlink: 1, |
| 1420 |
"xmlns:xlink": "xmlnsXlink", |
| 1421 |
xmlSpace: 1, |
| 1422 |
y1: 0, |
| 1423 |
y2: 0, |
| 1424 |
y: 0, |
| 1425 |
yChannelSelector: 1, |
| 1426 |
z: 0, |
| 1427 |
zoomAndPan: 1 |
| 1428 |
}; |
| 1429 |
} |
| 1430 |
}); |
| 1431 |
|
| 1432 |
// node_modules/react-property/lib/index.js |
| 1433 |
var require_lib3 = __commonJS({ |
| 1434 |
"node_modules/react-property/lib/index.js"(exports) { |
| 1435 |
"use strict"; |
| 1436 |
var RESERVED = 0; |
| 1437 |
var STRING = 1; |
| 1438 |
var BOOLEANISH_STRING = 2; |
| 1439 |
var BOOLEAN = 3; |
| 1440 |
var OVERLOADED_BOOLEAN = 4; |
| 1441 |
var NUMERIC = 5; |
| 1442 |
var POSITIVE_NUMERIC = 6; |
| 1443 |
function getPropertyInfo(name) { |
| 1444 |
return properties.hasOwnProperty(name) ? properties[name] : null; |
| 1445 |
} |
| 1446 |
function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) { |
| 1447 |
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; |
| 1448 |
this.attributeName = attributeName; |
| 1449 |
this.attributeNamespace = attributeNamespace; |
| 1450 |
this.mustUseProperty = mustUseProperty; |
| 1451 |
this.propertyName = name; |
| 1452 |
this.type = type; |
| 1453 |
this.sanitizeURL = sanitizeURL; |
| 1454 |
this.removeEmptyString = removeEmptyString; |
| 1455 |
} |
| 1456 |
var properties = {}; |
| 1457 |
var reservedProps = [ |
| 1458 |
"children", |
| 1459 |
"dangerouslySetInnerHTML", |
| 1460 |
// TODO: This prevents the assignment of defaultValue to regular |
| 1461 |
// elements (not just inputs). Now that ReactDOMInput assigns to the |
| 1462 |
// defaultValue property -- do we need this? |
| 1463 |
"defaultValue", |
| 1464 |
"defaultChecked", |
| 1465 |
"innerHTML", |
| 1466 |
"suppressContentEditableWarning", |
| 1467 |
"suppressHydrationWarning", |
| 1468 |
"style" |
| 1469 |
]; |
| 1470 |
reservedProps.forEach((name) => { |
| 1471 |
properties[name] = new PropertyInfoRecord( |
| 1472 |
name, |
| 1473 |
RESERVED, |
| 1474 |
false, |
| 1475 |
// mustUseProperty |
| 1476 |
name, |
| 1477 |
// attributeName |
| 1478 |
null, |
| 1479 |
// attributeNamespace |
| 1480 |
false, |
| 1481 |
// sanitizeURL |
| 1482 |
false |
| 1483 |
// removeEmptyString |
| 1484 |
); |
| 1485 |
}); |
| 1486 |
[ |
| 1487 |
["acceptCharset", "accept-charset"], |
| 1488 |
["className", "class"], |
| 1489 |
["htmlFor", "for"], |
| 1490 |
["httpEquiv", "http-equiv"] |
| 1491 |
].forEach(([name, attributeName]) => { |
| 1492 |
properties[name] = new PropertyInfoRecord( |
| 1493 |
name, |
| 1494 |
STRING, |
| 1495 |
false, |
| 1496 |
// mustUseProperty |
| 1497 |
attributeName, |
| 1498 |
// attributeName |
| 1499 |
null, |
| 1500 |
// attributeNamespace |
| 1501 |
false, |
| 1502 |
// sanitizeURL |
| 1503 |
false |
| 1504 |
// removeEmptyString |
| 1505 |
); |
| 1506 |
}); |
| 1507 |
["contentEditable", "draggable", "spellCheck", "value"].forEach((name) => { |
| 1508 |
properties[name] = new PropertyInfoRecord( |
| 1509 |
name, |
| 1510 |
BOOLEANISH_STRING, |
| 1511 |
false, |
| 1512 |
// mustUseProperty |
| 1513 |
name.toLowerCase(), |
| 1514 |
// attributeName |
| 1515 |
null, |
| 1516 |
// attributeNamespace |
| 1517 |
false, |
| 1518 |
// sanitizeURL |
| 1519 |
false |
| 1520 |
// removeEmptyString |
| 1521 |
); |
| 1522 |
}); |
| 1523 |
[ |
| 1524 |
"autoReverse", |
| 1525 |
"externalResourcesRequired", |
| 1526 |
"focusable", |
| 1527 |
"preserveAlpha" |
| 1528 |
].forEach((name) => { |
| 1529 |
properties[name] = new PropertyInfoRecord( |
| 1530 |
name, |
| 1531 |
BOOLEANISH_STRING, |
| 1532 |
false, |
| 1533 |
// mustUseProperty |
| 1534 |
name, |
| 1535 |
// attributeName |
| 1536 |
null, |
| 1537 |
// attributeNamespace |
| 1538 |
false, |
| 1539 |
// sanitizeURL |
| 1540 |
false |
| 1541 |
// removeEmptyString |
| 1542 |
); |
| 1543 |
}); |
| 1544 |
[ |
| 1545 |
"allowFullScreen", |
| 1546 |
"async", |
| 1547 |
// Note: there is a special case that prevents it from being written to the DOM |
| 1548 |
// on the client side because the browsers are inconsistent. Instead we call focus(). |
| 1549 |
"autoFocus", |
| 1550 |
"autoPlay", |
| 1551 |
"controls", |
| 1552 |
"default", |
| 1553 |
"defer", |
| 1554 |
"disabled", |
| 1555 |
"disablePictureInPicture", |
| 1556 |
"disableRemotePlayback", |
| 1557 |
"formNoValidate", |
| 1558 |
"hidden", |
| 1559 |
"loop", |
| 1560 |
"noModule", |
| 1561 |
"noValidate", |
| 1562 |
"open", |
| 1563 |
"playsInline", |
| 1564 |
"readOnly", |
| 1565 |
"required", |
| 1566 |
"reversed", |
| 1567 |
"scoped", |
| 1568 |
"seamless", |
| 1569 |
// Microdata |
| 1570 |
"itemScope" |
| 1571 |
].forEach((name) => { |
| 1572 |
properties[name] = new PropertyInfoRecord( |
| 1573 |
name, |
| 1574 |
BOOLEAN, |
| 1575 |
false, |
| 1576 |
// mustUseProperty |
| 1577 |
name.toLowerCase(), |
| 1578 |
// attributeName |
| 1579 |
null, |
| 1580 |
// attributeNamespace |
| 1581 |
false, |
| 1582 |
// sanitizeURL |
| 1583 |
false |
| 1584 |
// removeEmptyString |
| 1585 |
); |
| 1586 |
}); |
| 1587 |
[ |
| 1588 |
"checked", |
| 1589 |
// Note: `option.selected` is not updated if `select.multiple` is |
| 1590 |
// disabled with `removeAttribute`. We have special logic for handling this. |
| 1591 |
"multiple", |
| 1592 |
"muted", |
| 1593 |
"selected" |
| 1594 |
// NOTE: if you add a camelCased prop to this list, |
| 1595 |
// you'll need to set attributeName to name.toLowerCase() |
| 1596 |
// instead in the assignment below. |
| 1597 |
].forEach((name) => { |
| 1598 |
properties[name] = new PropertyInfoRecord( |
| 1599 |
name, |
| 1600 |
BOOLEAN, |
| 1601 |
true, |
| 1602 |
// mustUseProperty |
| 1603 |
name, |
| 1604 |
// attributeName |
| 1605 |
null, |
| 1606 |
// attributeNamespace |
| 1607 |
false, |
| 1608 |
// sanitizeURL |
| 1609 |
false |
| 1610 |
// removeEmptyString |
| 1611 |
); |
| 1612 |
}); |
| 1613 |
[ |
| 1614 |
"capture", |
| 1615 |
"download" |
| 1616 |
// NOTE: if you add a camelCased prop to this list, |
| 1617 |
// you'll need to set attributeName to name.toLowerCase() |
| 1618 |
// instead in the assignment below. |
| 1619 |
].forEach((name) => { |
| 1620 |
properties[name] = new PropertyInfoRecord( |
| 1621 |
name, |
| 1622 |
OVERLOADED_BOOLEAN, |
| 1623 |
false, |
| 1624 |
// mustUseProperty |
| 1625 |
name, |
| 1626 |
// attributeName |
| 1627 |
null, |
| 1628 |
// attributeNamespace |
| 1629 |
false, |
| 1630 |
// sanitizeURL |
| 1631 |
false |
| 1632 |
// removeEmptyString |
| 1633 |
); |
| 1634 |
}); |
| 1635 |
[ |
| 1636 |
"cols", |
| 1637 |
"rows", |
| 1638 |
"size", |
| 1639 |
"span" |
| 1640 |
// NOTE: if you add a camelCased prop to this list, |
| 1641 |
// you'll need to set attributeName to name.toLowerCase() |
| 1642 |
// instead in the assignment below. |
| 1643 |
].forEach((name) => { |
| 1644 |
properties[name] = new PropertyInfoRecord( |
| 1645 |
name, |
| 1646 |
POSITIVE_NUMERIC, |
| 1647 |
false, |
| 1648 |
// mustUseProperty |
| 1649 |
name, |
| 1650 |
// attributeName |
| 1651 |
null, |
| 1652 |
// attributeNamespace |
| 1653 |
false, |
| 1654 |
// sanitizeURL |
| 1655 |
false |
| 1656 |
// removeEmptyString |
| 1657 |
); |
| 1658 |
}); |
| 1659 |
["rowSpan", "start"].forEach((name) => { |
| 1660 |
properties[name] = new PropertyInfoRecord( |
| 1661 |
name, |
| 1662 |
NUMERIC, |
| 1663 |
false, |
| 1664 |
// mustUseProperty |
| 1665 |
name.toLowerCase(), |
| 1666 |
// attributeName |
| 1667 |
null, |
| 1668 |
// attributeNamespace |
| 1669 |
false, |
| 1670 |
// sanitizeURL |
| 1671 |
false |
| 1672 |
// removeEmptyString |
| 1673 |
); |
| 1674 |
}); |
| 1675 |
var CAMELIZE = /[\-\:]([a-z])/g; |
| 1676 |
var capitalize = (token) => token[1].toUpperCase(); |
| 1677 |
[ |
| 1678 |
"accent-height", |
| 1679 |
"alignment-baseline", |
| 1680 |
"arabic-form", |
| 1681 |
"baseline-shift", |
| 1682 |
"cap-height", |
| 1683 |
"clip-path", |
| 1684 |
"clip-rule", |
| 1685 |
"color-interpolation", |
| 1686 |
"color-interpolation-filters", |
| 1687 |
"color-profile", |
| 1688 |
"color-rendering", |
| 1689 |
"dominant-baseline", |
| 1690 |
"enable-background", |
| 1691 |
"fill-opacity", |
| 1692 |
"fill-rule", |
| 1693 |
"flood-color", |
| 1694 |
"flood-opacity", |
| 1695 |
"font-family", |
| 1696 |
"font-size", |
| 1697 |
"font-size-adjust", |
| 1698 |
"font-stretch", |
| 1699 |
"font-style", |
| 1700 |
"font-variant", |
| 1701 |
"font-weight", |
| 1702 |
"glyph-name", |
| 1703 |
"glyph-orientation-horizontal", |
| 1704 |
"glyph-orientation-vertical", |
| 1705 |
"horiz-adv-x", |
| 1706 |
"horiz-origin-x", |
| 1707 |
"image-rendering", |
| 1708 |
"letter-spacing", |
| 1709 |
"lighting-color", |
| 1710 |
"marker-end", |
| 1711 |
"marker-mid", |
| 1712 |
"marker-start", |
| 1713 |
"overline-position", |
| 1714 |
"overline-thickness", |
| 1715 |
"paint-order", |
| 1716 |
"panose-1", |
| 1717 |
"pointer-events", |
| 1718 |
"rendering-intent", |
| 1719 |
"shape-rendering", |
| 1720 |
"stop-color", |
| 1721 |
"stop-opacity", |
| 1722 |
"strikethrough-position", |
| 1723 |
"strikethrough-thickness", |
| 1724 |
"stroke-dasharray", |
| 1725 |
"stroke-dashoffset", |
| 1726 |
"stroke-linecap", |
| 1727 |
"stroke-linejoin", |
| 1728 |
"stroke-miterlimit", |
| 1729 |
"stroke-opacity", |
| 1730 |
"stroke-width", |
| 1731 |
"text-anchor", |
| 1732 |
"text-decoration", |
| 1733 |
"text-rendering", |
| 1734 |
"underline-position", |
| 1735 |
"underline-thickness", |
| 1736 |
"unicode-bidi", |
| 1737 |
"unicode-range", |
| 1738 |
"units-per-em", |
| 1739 |
"v-alphabetic", |
| 1740 |
"v-hanging", |
| 1741 |
"v-ideographic", |
| 1742 |
"v-mathematical", |
| 1743 |
"vector-effect", |
| 1744 |
"vert-adv-y", |
| 1745 |
"vert-origin-x", |
| 1746 |
"vert-origin-y", |
| 1747 |
"word-spacing", |
| 1748 |
"writing-mode", |
| 1749 |
"xmlns:xlink", |
| 1750 |
"x-height" |
| 1751 |
// NOTE: if you add a camelCased prop to this list, |
| 1752 |
// you'll need to set attributeName to name.toLowerCase() |
| 1753 |
// instead in the assignment below. |
| 1754 |
].forEach((attributeName) => { |
| 1755 |
const name = attributeName.replace(CAMELIZE, capitalize); |
| 1756 |
properties[name] = new PropertyInfoRecord( |
| 1757 |
name, |
| 1758 |
STRING, |
| 1759 |
false, |
| 1760 |
// mustUseProperty |
| 1761 |
attributeName, |
| 1762 |
null, |
| 1763 |
// attributeNamespace |
| 1764 |
false, |
| 1765 |
// sanitizeURL |
| 1766 |
false |
| 1767 |
// removeEmptyString |
| 1768 |
); |
| 1769 |
}); |
| 1770 |
[ |
| 1771 |
"xlink:actuate", |
| 1772 |
"xlink:arcrole", |
| 1773 |
"xlink:role", |
| 1774 |
"xlink:show", |
| 1775 |
"xlink:title", |
| 1776 |
"xlink:type" |
| 1777 |
// NOTE: if you add a camelCased prop to this list, |
| 1778 |
// you'll need to set attributeName to name.toLowerCase() |
| 1779 |
// instead in the assignment below. |
| 1780 |
].forEach((attributeName) => { |
| 1781 |
const name = attributeName.replace(CAMELIZE, capitalize); |
| 1782 |
properties[name] = new PropertyInfoRecord( |
| 1783 |
name, |
| 1784 |
STRING, |
| 1785 |
false, |
| 1786 |
// mustUseProperty |
| 1787 |
attributeName, |
| 1788 |
"http://www.w3.org/1999/xlink", |
| 1789 |
false, |
| 1790 |
// sanitizeURL |
| 1791 |
false |
| 1792 |
// removeEmptyString |
| 1793 |
); |
| 1794 |
}); |
| 1795 |
[ |
| 1796 |
"xml:base", |
| 1797 |
"xml:lang", |
| 1798 |
"xml:space" |
| 1799 |
// NOTE: if you add a camelCased prop to this list, |
| 1800 |
// you'll need to set attributeName to name.toLowerCase() |
| 1801 |
// instead in the assignment below. |
| 1802 |
].forEach((attributeName) => { |
| 1803 |
const name = attributeName.replace(CAMELIZE, capitalize); |
| 1804 |
properties[name] = new PropertyInfoRecord( |
| 1805 |
name, |
| 1806 |
STRING, |
| 1807 |
false, |
| 1808 |
// mustUseProperty |
| 1809 |
attributeName, |
| 1810 |
"http://www.w3.org/XML/1998/namespace", |
| 1811 |
false, |
| 1812 |
// sanitizeURL |
| 1813 |
false |
| 1814 |
// removeEmptyString |
| 1815 |
); |
| 1816 |
}); |
| 1817 |
["tabIndex", "crossOrigin"].forEach((attributeName) => { |
| 1818 |
properties[attributeName] = new PropertyInfoRecord( |
| 1819 |
attributeName, |
| 1820 |
STRING, |
| 1821 |
false, |
| 1822 |
// mustUseProperty |
| 1823 |
attributeName.toLowerCase(), |
| 1824 |
// attributeName |
| 1825 |
null, |
| 1826 |
// attributeNamespace |
| 1827 |
false, |
| 1828 |
// sanitizeURL |
| 1829 |
false |
| 1830 |
// removeEmptyString |
| 1831 |
); |
| 1832 |
}); |
| 1833 |
var xlinkHref = "xlinkHref"; |
| 1834 |
properties[xlinkHref] = new PropertyInfoRecord( |
| 1835 |
"xlinkHref", |
| 1836 |
STRING, |
| 1837 |
false, |
| 1838 |
// mustUseProperty |
| 1839 |
"xlink:href", |
| 1840 |
"http://www.w3.org/1999/xlink", |
| 1841 |
true, |
| 1842 |
// sanitizeURL |
| 1843 |
false |
| 1844 |
// removeEmptyString |
| 1845 |
); |
| 1846 |
["src", "href", "action", "formAction"].forEach((attributeName) => { |
| 1847 |
properties[attributeName] = new PropertyInfoRecord( |
| 1848 |
attributeName, |
| 1849 |
STRING, |
| 1850 |
false, |
| 1851 |
// mustUseProperty |
| 1852 |
attributeName.toLowerCase(), |
| 1853 |
// attributeName |
| 1854 |
null, |
| 1855 |
// attributeNamespace |
| 1856 |
true, |
| 1857 |
// sanitizeURL |
| 1858 |
true |
| 1859 |
// removeEmptyString |
| 1860 |
); |
| 1861 |
}); |
| 1862 |
var { |
| 1863 |
CAMELCASE, |
| 1864 |
SAME, |
| 1865 |
possibleStandardNames: possibleStandardNamesOptimized |
| 1866 |
} = require_possibleStandardNamesOptimized(); |
| 1867 |
var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; |
| 1868 |
var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; |
| 1869 |
var isCustomAttribute = RegExp.prototype.test.bind( |
| 1870 |
// eslint-disable-next-line no-misleading-character-class |
| 1871 |
new RegExp("^(data|aria)-[" + ATTRIBUTE_NAME_CHAR + "]*$") |
| 1872 |
); |
| 1873 |
var possibleStandardNames = Object.keys( |
| 1874 |
possibleStandardNamesOptimized |
| 1875 |
).reduce((accumulator, standardName) => { |
| 1876 |
const propName = possibleStandardNamesOptimized[standardName]; |
| 1877 |
if (propName === SAME) { |
| 1878 |
accumulator[standardName] = standardName; |
| 1879 |
} else if (propName === CAMELCASE) { |
| 1880 |
accumulator[standardName.toLowerCase()] = standardName; |
| 1881 |
} else { |
| 1882 |
accumulator[standardName] = propName; |
| 1883 |
} |
| 1884 |
return accumulator; |
| 1885 |
}, {}); |
| 1886 |
exports.BOOLEAN = BOOLEAN; |
| 1887 |
exports.BOOLEANISH_STRING = BOOLEANISH_STRING; |
| 1888 |
exports.NUMERIC = NUMERIC; |
| 1889 |
exports.OVERLOADED_BOOLEAN = OVERLOADED_BOOLEAN; |
| 1890 |
exports.POSITIVE_NUMERIC = POSITIVE_NUMERIC; |
| 1891 |
exports.RESERVED = RESERVED; |
| 1892 |
exports.STRING = STRING; |
| 1893 |
exports.getPropertyInfo = getPropertyInfo; |
| 1894 |
exports.isCustomAttribute = isCustomAttribute; |
| 1895 |
exports.possibleStandardNames = possibleStandardNames; |
| 1896 |
} |
| 1897 |
}); |
| 1898 |
|
| 1899 |
// vendor-external:react |
| 1900 |
var require_react = __commonJS({ |
| 1901 |
"vendor-external:react"(exports, module) { |
| 1902 |
module.exports = window.React; |
| 1903 |
} |
| 1904 |
}); |
| 1905 |
|
| 1906 |
// node_modules/inline-style-parser/cjs/index.js |
| 1907 |
var require_cjs = __commonJS({ |
| 1908 |
"node_modules/inline-style-parser/cjs/index.js"(exports, module) { |
| 1909 |
"use strict"; |
| 1910 |
var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g; |
| 1911 |
var NEWLINE_REGEX = /\n/g; |
| 1912 |
var WHITESPACE_REGEX = /^\s*/; |
| 1913 |
var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/; |
| 1914 |
var COLON_REGEX = /^:\s*/; |
| 1915 |
var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/; |
| 1916 |
var SEMICOLON_REGEX = /^[;\s]*/; |
| 1917 |
var TRIM_REGEX = /^\s+|\s+$/g; |
| 1918 |
var NEWLINE = "\n"; |
| 1919 |
var FORWARD_SLASH = "/"; |
| 1920 |
var ASTERISK = "*"; |
| 1921 |
var EMPTY_STRING = ""; |
| 1922 |
var TYPE_COMMENT = "comment"; |
| 1923 |
var TYPE_DECLARATION = "declaration"; |
| 1924 |
function index(style, options) { |
| 1925 |
if (typeof style !== "string") { |
| 1926 |
throw new TypeError("First argument must be a string"); |
| 1927 |
} |
| 1928 |
if (!style) return []; |
| 1929 |
options = options || {}; |
| 1930 |
var lineno = 1; |
| 1931 |
var column = 1; |
| 1932 |
function updatePosition(str) { |
| 1933 |
var lines = str.match(NEWLINE_REGEX); |
| 1934 |
if (lines) lineno += lines.length; |
| 1935 |
var i = str.lastIndexOf(NEWLINE); |
| 1936 |
column = ~i ? str.length - i : column + str.length; |
| 1937 |
} |
| 1938 |
function position() { |
| 1939 |
var start = { line: lineno, column }; |
| 1940 |
return function(node) { |
| 1941 |
node.position = new Position(start); |
| 1942 |
whitespace(); |
| 1943 |
return node; |
| 1944 |
}; |
| 1945 |
} |
| 1946 |
function Position(start) { |
| 1947 |
this.start = start; |
| 1948 |
this.end = { line: lineno, column }; |
| 1949 |
this.source = options.source; |
| 1950 |
} |
| 1951 |
Position.prototype.content = style; |
| 1952 |
function error(msg) { |
| 1953 |
var err = new Error( |
| 1954 |
options.source + ":" + lineno + ":" + column + ": " + msg |
| 1955 |
); |
| 1956 |
err.reason = msg; |
| 1957 |
err.filename = options.source; |
| 1958 |
err.line = lineno; |
| 1959 |
err.column = column; |
| 1960 |
err.source = style; |
| 1961 |
if (options.silent) ; |
| 1962 |
else { |
| 1963 |
throw err; |
| 1964 |
} |
| 1965 |
} |
| 1966 |
function match(re) { |
| 1967 |
var m = re.exec(style); |
| 1968 |
if (!m) return; |
| 1969 |
var str = m[0]; |
| 1970 |
updatePosition(str); |
| 1971 |
style = style.slice(str.length); |
| 1972 |
return m; |
| 1973 |
} |
| 1974 |
function whitespace() { |
| 1975 |
match(WHITESPACE_REGEX); |
| 1976 |
} |
| 1977 |
function comments(rules) { |
| 1978 |
var c; |
| 1979 |
rules = rules || []; |
| 1980 |
while (c = comment()) { |
| 1981 |
if (c !== false) { |
| 1982 |
rules.push(c); |
| 1983 |
} |
| 1984 |
} |
| 1985 |
return rules; |
| 1986 |
} |
| 1987 |
function comment() { |
| 1988 |
var pos = position(); |
| 1989 |
if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return; |
| 1990 |
var i = 2; |
| 1991 |
while (EMPTY_STRING != style.charAt(i) && (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))) { |
| 1992 |
++i; |
| 1993 |
} |
| 1994 |
i += 2; |
| 1995 |
if (EMPTY_STRING === style.charAt(i - 1)) { |
| 1996 |
return error("End of comment missing"); |
| 1997 |
} |
| 1998 |
var str = style.slice(2, i - 2); |
| 1999 |
column += 2; |
| 2000 |
updatePosition(str); |
| 2001 |
style = style.slice(i); |
| 2002 |
column += 2; |
| 2003 |
return pos({ |
| 2004 |
type: TYPE_COMMENT, |
| 2005 |
comment: str |
| 2006 |
}); |
| 2007 |
} |
| 2008 |
function declaration() { |
| 2009 |
var pos = position(); |
| 2010 |
var prop = match(PROPERTY_REGEX); |
| 2011 |
if (!prop) return; |
| 2012 |
comment(); |
| 2013 |
if (!match(COLON_REGEX)) return error("property missing ':'"); |
| 2014 |
var val = match(VALUE_REGEX); |
| 2015 |
var ret = pos({ |
| 2016 |
type: TYPE_DECLARATION, |
| 2017 |
property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)), |
| 2018 |
value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING |
| 2019 |
}); |
| 2020 |
match(SEMICOLON_REGEX); |
| 2021 |
return ret; |
| 2022 |
} |
| 2023 |
function declarations() { |
| 2024 |
var decls = []; |
| 2025 |
comments(decls); |
| 2026 |
var decl; |
| 2027 |
while (decl = declaration()) { |
| 2028 |
if (decl !== false) { |
| 2029 |
decls.push(decl); |
| 2030 |
comments(decls); |
| 2031 |
} |
| 2032 |
} |
| 2033 |
return decls; |
| 2034 |
} |
| 2035 |
whitespace(); |
| 2036 |
return declarations(); |
| 2037 |
} |
| 2038 |
function trim(str) { |
| 2039 |
return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING; |
| 2040 |
} |
| 2041 |
module.exports = index; |
| 2042 |
} |
| 2043 |
}); |
| 2044 |
|
| 2045 |
// node_modules/style-to-object/cjs/index.js |
| 2046 |
var require_cjs2 = __commonJS({ |
| 2047 |
"node_modules/style-to-object/cjs/index.js"(exports) { |
| 2048 |
"use strict"; |
| 2049 |
var __importDefault = exports && exports.__importDefault || function(mod) { |
| 2050 |
return mod && mod.__esModule ? mod : { "default": mod }; |
| 2051 |
}; |
| 2052 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 2053 |
exports.default = StyleToObject; |
| 2054 |
var inline_style_parser_1 = __importDefault(require_cjs()); |
| 2055 |
function StyleToObject(style, iterator) { |
| 2056 |
let styleObject = null; |
| 2057 |
if (!style || typeof style !== "string") { |
| 2058 |
return styleObject; |
| 2059 |
} |
| 2060 |
const declarations = (0, inline_style_parser_1.default)(style); |
| 2061 |
const hasIterator = typeof iterator === "function"; |
| 2062 |
declarations.forEach((declaration) => { |
| 2063 |
if (declaration.type !== "declaration") { |
| 2064 |
return; |
| 2065 |
} |
| 2066 |
const { property, value } = declaration; |
| 2067 |
if (hasIterator) { |
| 2068 |
iterator(property, value, declaration); |
| 2069 |
} else if (value) { |
| 2070 |
styleObject = styleObject || {}; |
| 2071 |
styleObject[property] = value; |
| 2072 |
} |
| 2073 |
}); |
| 2074 |
return styleObject; |
| 2075 |
} |
| 2076 |
} |
| 2077 |
}); |
| 2078 |
|
| 2079 |
// node_modules/style-to-js/cjs/utilities.js |
| 2080 |
var require_utilities2 = __commonJS({ |
| 2081 |
"node_modules/style-to-js/cjs/utilities.js"(exports) { |
| 2082 |
"use strict"; |
| 2083 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 2084 |
exports.camelCase = void 0; |
| 2085 |
var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/; |
| 2086 |
var HYPHEN_REGEX = /-([a-z])/g; |
| 2087 |
var NO_HYPHEN_REGEX = /^[^-]+$/; |
| 2088 |
var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/; |
| 2089 |
var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/; |
| 2090 |
var skipCamelCase = function(property) { |
| 2091 |
return !property || NO_HYPHEN_REGEX.test(property) || CUSTOM_PROPERTY_REGEX.test(property); |
| 2092 |
}; |
| 2093 |
var capitalize = function(match, character) { |
| 2094 |
return character.toUpperCase(); |
| 2095 |
}; |
| 2096 |
var trimHyphen = function(match, prefix) { |
| 2097 |
return "".concat(prefix, "-"); |
| 2098 |
}; |
| 2099 |
var camelCase = function(property, options) { |
| 2100 |
if (options === void 0) { |
| 2101 |
options = {}; |
| 2102 |
} |
| 2103 |
if (skipCamelCase(property)) { |
| 2104 |
return property; |
| 2105 |
} |
| 2106 |
property = property.toLowerCase(); |
| 2107 |
if (options.reactCompat) { |
| 2108 |
property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen); |
| 2109 |
} else { |
| 2110 |
property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen); |
| 2111 |
} |
| 2112 |
return property.replace(HYPHEN_REGEX, capitalize); |
| 2113 |
}; |
| 2114 |
exports.camelCase = camelCase; |
| 2115 |
} |
| 2116 |
}); |
| 2117 |
|
| 2118 |
// node_modules/style-to-js/cjs/index.js |
| 2119 |
var require_cjs3 = __commonJS({ |
| 2120 |
"node_modules/style-to-js/cjs/index.js"(exports, module) { |
| 2121 |
"use strict"; |
| 2122 |
var __importDefault = exports && exports.__importDefault || function(mod) { |
| 2123 |
return mod && mod.__esModule ? mod : { "default": mod }; |
| 2124 |
}; |
| 2125 |
var style_to_object_1 = __importDefault(require_cjs2()); |
| 2126 |
var utilities_1 = require_utilities2(); |
| 2127 |
function StyleToJS(style, options) { |
| 2128 |
var output = {}; |
| 2129 |
if (!style || typeof style !== "string") { |
| 2130 |
return output; |
| 2131 |
} |
| 2132 |
(0, style_to_object_1.default)(style, function(property, value) { |
| 2133 |
if (property && value) { |
| 2134 |
output[(0, utilities_1.camelCase)(property, options)] = value; |
| 2135 |
} |
| 2136 |
}); |
| 2137 |
return output; |
| 2138 |
} |
| 2139 |
StyleToJS.default = StyleToJS; |
| 2140 |
module.exports = StyleToJS; |
| 2141 |
} |
| 2142 |
}); |
| 2143 |
|
| 2144 |
// node_modules/html-react-parser/lib/utilities.js |
| 2145 |
var require_utilities3 = __commonJS({ |
| 2146 |
"node_modules/html-react-parser/lib/utilities.js"(exports) { |
| 2147 |
"use strict"; |
| 2148 |
var __importDefault = exports && exports.__importDefault || function(mod) { |
| 2149 |
return mod && mod.__esModule ? mod : { "default": mod }; |
| 2150 |
}; |
| 2151 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 2152 |
exports.returnFirstArg = exports.canTextBeChildOfNode = exports.ELEMENTS_WITH_NO_TEXT_CHILDREN = exports.PRESERVE_CUSTOM_ATTRIBUTES = void 0; |
| 2153 |
exports.isCustomComponent = isCustomComponent; |
| 2154 |
exports.setStyleProp = setStyleProp; |
| 2155 |
var react_1 = require_react(); |
| 2156 |
var style_to_js_1 = __importDefault(require_cjs3()); |
| 2157 |
var RESERVED_SVG_MATHML_ELEMENTS = /* @__PURE__ */ new Set([ |
| 2158 |
"annotation-xml", |
| 2159 |
"color-profile", |
| 2160 |
"font-face", |
| 2161 |
"font-face-src", |
| 2162 |
"font-face-uri", |
| 2163 |
"font-face-format", |
| 2164 |
"font-face-name", |
| 2165 |
"missing-glyph" |
| 2166 |
]); |
| 2167 |
function isCustomComponent(tagName, props) { |
| 2168 |
if (!tagName.includes("-")) { |
| 2169 |
return Boolean(props && typeof props.is === "string"); |
| 2170 |
} |
| 2171 |
if (RESERVED_SVG_MATHML_ELEMENTS.has(tagName)) { |
| 2172 |
return false; |
| 2173 |
} |
| 2174 |
return true; |
| 2175 |
} |
| 2176 |
var styleOptions = { |
| 2177 |
reactCompat: true |
| 2178 |
}; |
| 2179 |
function setStyleProp(style, props) { |
| 2180 |
if (typeof style !== "string") { |
| 2181 |
return; |
| 2182 |
} |
| 2183 |
if (!style.trim()) { |
| 2184 |
props.style = {}; |
| 2185 |
return; |
| 2186 |
} |
| 2187 |
try { |
| 2188 |
props.style = (0, style_to_js_1.default)(style, styleOptions); |
| 2189 |
} catch (error) { |
| 2190 |
props.style = {}; |
| 2191 |
} |
| 2192 |
} |
| 2193 |
exports.PRESERVE_CUSTOM_ATTRIBUTES = Number(react_1.version.split(".")[0]) >= 16; |
| 2194 |
exports.ELEMENTS_WITH_NO_TEXT_CHILDREN = /* @__PURE__ */ new Set([ |
| 2195 |
"tr", |
| 2196 |
"tbody", |
| 2197 |
"thead", |
| 2198 |
"tfoot", |
| 2199 |
"colgroup", |
| 2200 |
"table", |
| 2201 |
"head", |
| 2202 |
"html", |
| 2203 |
"frameset" |
| 2204 |
]); |
| 2205 |
var canTextBeChildOfNode = function(node) { |
| 2206 |
return !exports.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(node.name); |
| 2207 |
}; |
| 2208 |
exports.canTextBeChildOfNode = canTextBeChildOfNode; |
| 2209 |
var returnFirstArg = function(arg) { |
| 2210 |
return arg; |
| 2211 |
}; |
| 2212 |
exports.returnFirstArg = returnFirstArg; |
| 2213 |
} |
| 2214 |
}); |
| 2215 |
|
| 2216 |
// node_modules/html-react-parser/lib/attributes-to-props.js |
| 2217 |
var require_attributes_to_props = __commonJS({ |
| 2218 |
"node_modules/html-react-parser/lib/attributes-to-props.js"(exports) { |
| 2219 |
"use strict"; |
| 2220 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 2221 |
exports.default = attributesToProps2; |
| 2222 |
var react_property_1 = require_lib3(); |
| 2223 |
var utilities_1 = require_utilities3(); |
| 2224 |
var UNCONTROLLED_COMPONENT_ATTRIBUTES = ["checked", "value"]; |
| 2225 |
var UNCONTROLLED_COMPONENT_NAMES = ["input", "select", "textarea"]; |
| 2226 |
var valueOnlyInputs = { |
| 2227 |
reset: true, |
| 2228 |
submit: true |
| 2229 |
}; |
| 2230 |
function attributesToProps2(attributes, nodeName) { |
| 2231 |
if (attributes === void 0) { |
| 2232 |
attributes = {}; |
| 2233 |
} |
| 2234 |
var props = {}; |
| 2235 |
var isInputValueOnly = Boolean(attributes.type && valueOnlyInputs[attributes.type]); |
| 2236 |
for (var attributeName in attributes) { |
| 2237 |
var attributeValue = attributes[attributeName]; |
| 2238 |
if ((0, react_property_1.isCustomAttribute)(attributeName)) { |
| 2239 |
props[attributeName] = attributeValue; |
| 2240 |
continue; |
| 2241 |
} |
| 2242 |
var attributeNameLowerCased = attributeName.toLowerCase(); |
| 2243 |
var propName = getPropName(attributeNameLowerCased); |
| 2244 |
if (propName) { |
| 2245 |
var propertyInfo = (0, react_property_1.getPropertyInfo)(propName); |
| 2246 |
if (UNCONTROLLED_COMPONENT_ATTRIBUTES.includes(propName) && UNCONTROLLED_COMPONENT_NAMES.includes(nodeName) && !isInputValueOnly) { |
| 2247 |
propName = getPropName("default" + attributeNameLowerCased); |
| 2248 |
} |
| 2249 |
props[propName] = attributeValue; |
| 2250 |
switch (propertyInfo && propertyInfo.type) { |
| 2251 |
case react_property_1.BOOLEAN: |
| 2252 |
props[propName] = true; |
| 2253 |
break; |
| 2254 |
case react_property_1.OVERLOADED_BOOLEAN: |
| 2255 |
if (attributeValue === "") { |
| 2256 |
props[propName] = true; |
| 2257 |
} |
| 2258 |
break; |
| 2259 |
} |
| 2260 |
continue; |
| 2261 |
} |
| 2262 |
if (utilities_1.PRESERVE_CUSTOM_ATTRIBUTES) { |
| 2263 |
props[attributeName] = attributeValue; |
| 2264 |
} |
| 2265 |
} |
| 2266 |
(0, utilities_1.setStyleProp)(attributes.style, props); |
| 2267 |
return props; |
| 2268 |
} |
| 2269 |
function getPropName(attributeName) { |
| 2270 |
return react_property_1.possibleStandardNames[attributeName]; |
| 2271 |
} |
| 2272 |
} |
| 2273 |
}); |
| 2274 |
|
| 2275 |
// node_modules/html-react-parser/lib/dom-to-react.js |
| 2276 |
var require_dom_to_react = __commonJS({ |
| 2277 |
"node_modules/html-react-parser/lib/dom-to-react.js"(exports) { |
| 2278 |
"use strict"; |
| 2279 |
var __importDefault = exports && exports.__importDefault || function(mod) { |
| 2280 |
return mod && mod.__esModule ? mod : { "default": mod }; |
| 2281 |
}; |
| 2282 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 2283 |
exports.default = domToReact2; |
| 2284 |
var react_1 = require_react(); |
| 2285 |
var attributes_to_props_1 = __importDefault(require_attributes_to_props()); |
| 2286 |
var utilities_1 = require_utilities3(); |
| 2287 |
var React = { |
| 2288 |
cloneElement: react_1.cloneElement, |
| 2289 |
createElement: react_1.createElement, |
| 2290 |
isValidElement: react_1.isValidElement |
| 2291 |
}; |
| 2292 |
function domToReact2(nodes, options) { |
| 2293 |
if (options === void 0) { |
| 2294 |
options = {}; |
| 2295 |
} |
| 2296 |
var reactElements = []; |
| 2297 |
var hasReplace = typeof options.replace === "function"; |
| 2298 |
var transform = options.transform || utilities_1.returnFirstArg; |
| 2299 |
var _a = options.library || React, cloneElement2 = _a.cloneElement, createElement = _a.createElement, isValidElement2 = _a.isValidElement; |
| 2300 |
var nodesLength = nodes.length; |
| 2301 |
for (var index = 0; index < nodesLength; index++) { |
| 2302 |
var node = nodes[index]; |
| 2303 |
if (hasReplace) { |
| 2304 |
var replaceElement = options.replace(node, index); |
| 2305 |
if (isValidElement2(replaceElement)) { |
| 2306 |
if (nodesLength > 1) { |
| 2307 |
replaceElement = cloneElement2(replaceElement, { |
| 2308 |
key: replaceElement.key || index |
| 2309 |
}); |
| 2310 |
} |
| 2311 |
reactElements.push(transform(replaceElement, node, index)); |
| 2312 |
continue; |
| 2313 |
} |
| 2314 |
} |
| 2315 |
if (node.type === "text") { |
| 2316 |
var isWhitespace = !node.data.trim().length; |
| 2317 |
if (isWhitespace && node.parent && !(0, utilities_1.canTextBeChildOfNode)(node.parent)) { |
| 2318 |
continue; |
| 2319 |
} |
| 2320 |
if (options.trim && isWhitespace) { |
| 2321 |
continue; |
| 2322 |
} |
| 2323 |
reactElements.push(transform(node.data, node, index)); |
| 2324 |
continue; |
| 2325 |
} |
| 2326 |
var element = node; |
| 2327 |
var props = {}; |
| 2328 |
if (skipAttributesToProps(element)) { |
| 2329 |
(0, utilities_1.setStyleProp)(element.attribs.style, element.attribs); |
| 2330 |
props = element.attribs; |
| 2331 |
} else if (element.attribs) { |
| 2332 |
props = (0, attributes_to_props_1.default)(element.attribs, element.name); |
| 2333 |
} |
| 2334 |
var children = void 0; |
| 2335 |
switch (node.type) { |
| 2336 |
case "script": |
| 2337 |
case "style": |
| 2338 |
if (node.children[0]) { |
| 2339 |
props.dangerouslySetInnerHTML = { |
| 2340 |
__html: node.children[0].data |
| 2341 |
}; |
| 2342 |
} |
| 2343 |
break; |
| 2344 |
case "tag": |
| 2345 |
if (node.name === "textarea" && node.children[0]) { |
| 2346 |
props.defaultValue = node.children[0].data; |
| 2347 |
} else if (node.children && node.children.length) { |
| 2348 |
children = domToReact2(node.children, options); |
| 2349 |
} |
| 2350 |
break; |
| 2351 |
// skip all other cases (e.g., comment) |
| 2352 |
default: |
| 2353 |
continue; |
| 2354 |
} |
| 2355 |
if (nodesLength > 1) { |
| 2356 |
props.key = index; |
| 2357 |
} |
| 2358 |
reactElements.push(transform(createElement(node.name, props, children), node, index)); |
| 2359 |
} |
| 2360 |
return reactElements.length === 1 ? reactElements[0] : reactElements; |
| 2361 |
} |
| 2362 |
function skipAttributesToProps(node) { |
| 2363 |
return utilities_1.PRESERVE_CUSTOM_ATTRIBUTES && node.type === "tag" && (0, utilities_1.isCustomComponent)(node.name, node.attribs); |
| 2364 |
} |
| 2365 |
} |
| 2366 |
}); |
| 2367 |
|
| 2368 |
// node_modules/html-react-parser/lib/index.js |
| 2369 |
var require_lib4 = __commonJS({ |
| 2370 |
"node_modules/html-react-parser/lib/index.js"(exports) { |
| 2371 |
"use strict"; |
| 2372 |
var __importDefault = exports && exports.__importDefault || function(mod) { |
| 2373 |
return mod && mod.__esModule ? mod : { "default": mod }; |
| 2374 |
}; |
| 2375 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 2376 |
exports.htmlToDOM = exports.domToReact = exports.attributesToProps = exports.Text = exports.ProcessingInstruction = exports.Element = exports.Comment = void 0; |
| 2377 |
exports.default = HTMLReactParser2; |
| 2378 |
var html_dom_parser_1 = __importDefault(require_html_to_dom()); |
| 2379 |
exports.htmlToDOM = html_dom_parser_1.default; |
| 2380 |
var attributes_to_props_1 = __importDefault(require_attributes_to_props()); |
| 2381 |
exports.attributesToProps = attributes_to_props_1.default; |
| 2382 |
var dom_to_react_1 = __importDefault(require_dom_to_react()); |
| 2383 |
exports.domToReact = dom_to_react_1.default; |
| 2384 |
var domhandler_1 = require_lib2(); |
| 2385 |
Object.defineProperty(exports, "Comment", { enumerable: true, get: function() { |
| 2386 |
return domhandler_1.Comment; |
| 2387 |
} }); |
| 2388 |
Object.defineProperty(exports, "Element", { enumerable: true, get: function() { |
| 2389 |
return domhandler_1.Element; |
| 2390 |
} }); |
| 2391 |
Object.defineProperty(exports, "ProcessingInstruction", { enumerable: true, get: function() { |
| 2392 |
return domhandler_1.ProcessingInstruction; |
| 2393 |
} }); |
| 2394 |
Object.defineProperty(exports, "Text", { enumerable: true, get: function() { |
| 2395 |
return domhandler_1.Text; |
| 2396 |
} }); |
| 2397 |
var domParserOptions = { lowerCaseAttributeNames: false }; |
| 2398 |
function HTMLReactParser2(html, options) { |
| 2399 |
if (typeof html !== "string") { |
| 2400 |
throw new TypeError("First argument must be a string"); |
| 2401 |
} |
| 2402 |
if (!html) { |
| 2403 |
return []; |
| 2404 |
} |
| 2405 |
return (0, dom_to_react_1.default)((0, html_dom_parser_1.default)(html, (options === null || options === void 0 ? void 0 : options.htmlparser2) || domParserOptions), options); |
| 2406 |
} |
| 2407 |
} |
| 2408 |
}); |
| 2409 |
|
| 2410 |
// package-external:@wordpress/dom |
| 2411 |
var require_dom = __commonJS({ |
| 2412 |
"package-external:@wordpress/dom"(exports, module) { |
| 2413 |
module.exports = window.wp.dom; |
| 2414 |
} |
| 2415 |
}); |
| 2416 |
|
| 2417 |
// package-external:@wordpress/element |
| 2418 |
var require_element = __commonJS({ |
| 2419 |
"package-external:@wordpress/element"(exports, module) { |
| 2420 |
module.exports = window.wp.element; |
| 2421 |
} |
| 2422 |
}); |
| 2423 |
|
| 2424 |
// packages/dashboard-init/build-module/index.mjs |
| 2425 |
var import_data2 = __toESM(require_data(), 1); |
| 2426 |
var import_core_data2 = __toESM(require_core_data(), 1); |
| 2427 |
var import_i18n = __toESM(require_i18n(), 1); |
| 2428 |
|
| 2429 |
// node_modules/html-react-parser/esm/index.mjs |
| 2430 |
var import_lib = __toESM(require_lib4(), 1); |
| 2431 |
var import_lib2 = __toESM(require_lib4(), 1); |
| 2432 |
var esm_default = import_lib.default.default || import_lib.default; |
| 2433 |
|
| 2434 |
// packages/dashboard-init/build-module/icons/index.mjs |
| 2435 |
var import_core_data = __toESM(require_core_data(), 1); |
| 2436 |
var import_data = __toESM(require_data(), 1); |
| 2437 |
var import_dom = __toESM(require_dom(), 1); |
| 2438 |
var import_element = __toESM(require_element(), 1); |
| 2439 |
import { registerIconResolver } from "@wordpress/widget-primitives"; |
| 2440 |
function registerDashboardIconResolver() { |
| 2441 |
registerIconResolver(async (reference) => { |
| 2442 |
const record = await (0, import_data.resolveSelect)(import_core_data.store).getEntityRecord( |
| 2443 |
"root", |
| 2444 |
"icon", |
| 2445 |
reference |
| 2446 |
); |
| 2447 |
if (!record?.content) { |
| 2448 |
return null; |
| 2449 |
} |
| 2450 |
const parsed = esm_default((0, import_dom.safeHTML)(record.content.trim())); |
| 2451 |
const found = Array.isArray(parsed) ? parsed.find(import_element.isValidElement) : parsed; |
| 2452 |
if (!(0, import_element.isValidElement)(found)) { |
| 2453 |
return null; |
| 2454 |
} |
| 2455 |
const element = found; |
| 2456 |
return element.props.fill ? element : (0, import_element.cloneElement)(element, { fill: "currentColor" }); |
| 2457 |
}); |
| 2458 |
} |
| 2459 |
|
| 2460 |
// packages/dashboard-init/build-module/index.mjs |
| 2461 |
async function init() { |
| 2462 |
if ((0, import_data2.select)(import_core_data2.store).getEntityConfig("root", "widgetModule")) { |
| 2463 |
return; |
| 2464 |
} |
| 2465 |
registerDashboardIconResolver(); |
| 2466 |
(0, import_data2.dispatch)(import_core_data2.store).addEntities([ |
| 2467 |
{ |
| 2468 |
name: "widgetModule", |
| 2469 |
kind: "root", |
| 2470 |
key: "name", |
| 2471 |
baseURL: "/wp/v2/widget-modules", |
| 2472 |
plural: "widgetModules", |
| 2473 |
label: (0, import_i18n.__)("Widget modules"), |
| 2474 |
supportsPagination: false |
| 2475 |
} |
| 2476 |
]); |
| 2477 |
} |
| 2478 |
export { |
| 2479 |
init |
| 2480 |
}; |
| 2481 |
//# sourceMappingURL=index.js.map |
| 2482 |
|