chunk-PGYCW7PW.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. import {
  2. __commonJS,
  3. __toESM
  4. } from "./chunk-2LSFTFF7.js";
  5. // node_modules/.pnpm/css.escape@1.5.1/node_modules/css.escape/css.escape.js
  6. var require_css_escape = __commonJS({
  7. "node_modules/.pnpm/css.escape@1.5.1/node_modules/css.escape/css.escape.js"(exports, module) {
  8. (function(root, factory) {
  9. if (typeof exports == "object") {
  10. module.exports = factory(root);
  11. } else if (typeof define == "function" && define.amd) {
  12. define([], factory.bind(root, root));
  13. } else {
  14. factory(root);
  15. }
  16. })(typeof global != "undefined" ? global : exports, function(root) {
  17. if (root.CSS && root.CSS.escape) {
  18. return root.CSS.escape;
  19. }
  20. var cssEscape = function(value) {
  21. if (arguments.length == 0) {
  22. throw new TypeError("`CSS.escape` requires an argument.");
  23. }
  24. var string = String(value);
  25. var length = string.length;
  26. var index = -1;
  27. var codeUnit;
  28. var result = "";
  29. var firstCodeUnit = string.charCodeAt(0);
  30. while (++index < length) {
  31. codeUnit = string.charCodeAt(index);
  32. if (codeUnit == 0) {
  33. result += "�";
  34. continue;
  35. }
  36. if (
  37. // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
  38. // U+007F, […]
  39. codeUnit >= 1 && codeUnit <= 31 || codeUnit == 127 || // If the character is the first character and is in the range [0-9]
  40. // (U+0030 to U+0039), […]
  41. index == 0 && codeUnit >= 48 && codeUnit <= 57 || // If the character is the second character and is in the range [0-9]
  42. // (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
  43. index == 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit == 45
  44. ) {
  45. result += "\\" + codeUnit.toString(16) + " ";
  46. continue;
  47. }
  48. if (
  49. // If the character is the first character and is a `-` (U+002D), and
  50. // there is no second character, […]
  51. index == 0 && length == 1 && codeUnit == 45
  52. ) {
  53. result += "\\" + string.charAt(index);
  54. continue;
  55. }
  56. if (codeUnit >= 128 || codeUnit == 45 || codeUnit == 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122) {
  57. result += string.charAt(index);
  58. continue;
  59. }
  60. result += "\\" + string.charAt(index);
  61. }
  62. return result;
  63. };
  64. if (!root.CSS) {
  65. root.CSS = {};
  66. }
  67. root.CSS.escape = cssEscape;
  68. return cssEscape;
  69. });
  70. }
  71. });
  72. // node_modules/.pnpm/diagram-js@11.9.1/node_modules/diagram-js/lib/util/EscapeUtil.js
  73. var import_css = __toESM(require_css_escape());
  74. var HTML_ESCAPE_MAP = {
  75. "&": "&amp;",
  76. "<": "&lt;",
  77. ">": "&gt;",
  78. '"': "&quot;",
  79. "'": "&#39;"
  80. };
  81. function escapeHTML(str) {
  82. str = "" + str;
  83. return str && str.replace(/[&<>"']/g, function(match) {
  84. return HTML_ESCAPE_MAP[match];
  85. });
  86. }
  87. export {
  88. escapeHTML,
  89. import_css
  90. };
  91. /*! Bundled license information:
  92. css.escape/css.escape.js:
  93. (*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license *)
  94. */
  95. //# sourceMappingURL=chunk-PGYCW7PW.js.map