shelfware 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/.output/nitro.json +15 -0
  2. package/.output/public/_nuxt/6IstVYrV.js +1 -0
  3. package/.output/public/_nuxt/9C5WUlLE.js +36 -0
  4. package/.output/public/_nuxt/BDNMzG2s.js +1 -0
  5. package/.output/public/_nuxt/BW3xJdEx.js +1 -0
  6. package/.output/public/_nuxt/BXXtFil5.js +1 -0
  7. package/.output/public/_nuxt/BZuUK3cr.js +1 -0
  8. package/.output/public/_nuxt/BeLyMmd4.js +1 -0
  9. package/.output/public/_nuxt/C_VgD9ZI.js +3 -0
  10. package/.output/public/_nuxt/DB5Vxbte.js +2 -0
  11. package/.output/public/_nuxt/DMg0j7gv.js +14 -0
  12. package/.output/public/_nuxt/builds/latest.json +1 -0
  13. package/.output/public/_nuxt/builds/meta/4c307968-4837-497b-a570-d6ee336accc4.json +1 -0
  14. package/.output/public/_nuxt/entry.b3_DJTEt.css +2 -0
  15. package/.output/public/_nuxt/error-404.CHsn7XF-.css +1 -0
  16. package/.output/public/_nuxt/error-500.Bawx2bLr.css +1 -0
  17. package/.output/server/chunks/_/api-handler.mjs +44 -0
  18. package/.output/server/chunks/_/batch.mjs +27 -0
  19. package/.output/server/chunks/_/catalog.mjs +1115 -0
  20. package/.output/server/chunks/_/detail.mjs +16 -0
  21. package/.output/server/chunks/_/error-500.mjs +19 -0
  22. package/.output/server/chunks/_/quarantine.mjs +159 -0
  23. package/.output/server/chunks/nitro/nitro.mjs +5399 -0
  24. package/.output/server/chunks/routes/api/_..._.mjs +16 -0
  25. package/.output/server/chunks/routes/api/health.get.mjs +13 -0
  26. package/.output/server/chunks/routes/api/skills/_id/file.get.mjs +25 -0
  27. package/.output/server/chunks/routes/api/skills/_id_.get.mjs +25 -0
  28. package/.output/server/chunks/routes/api/skills/_id_.put.mjs +74 -0
  29. package/.output/server/chunks/routes/api/skills/delete.post.mjs +48 -0
  30. package/.output/server/chunks/routes/api/skills/quarantine.post.mjs +26 -0
  31. package/.output/server/chunks/routes/api/skills/restore.post.mjs +26 -0
  32. package/.output/server/chunks/routes/api/skills.get.mjs +41 -0
  33. package/.output/server/chunks/routes/renderer.mjs +341 -0
  34. package/.output/server/chunks/virtual/_virtual_spa-template.mjs +3 -0
  35. package/.output/server/chunks/virtual/precomputed.mjs +3 -0
  36. package/.output/server/index.mjs +9 -0
  37. package/.output/server/node_modules/@babel/parser/lib/index.js +14611 -0
  38. package/.output/server/node_modules/@babel/parser/package.json +50 -0
  39. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6801 -0
  40. package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  41. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +692 -0
  42. package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  43. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1420 -0
  44. package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  45. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1903 -0
  46. package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  47. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6980 -0
  48. package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  49. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1867 -0
  50. package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  51. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +904 -0
  52. package/.output/server/node_modules/@vue/server-renderer/package.json +53 -0
  53. package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +636 -0
  54. package/.output/server/node_modules/@vue/shared/package.json +47 -0
  55. package/.output/server/node_modules/devalue/index.js +17 -0
  56. package/.output/server/node_modules/devalue/package.json +39 -0
  57. package/.output/server/node_modules/devalue/src/base64.js +60 -0
  58. package/.output/server/node_modules/devalue/src/constants.js +12 -0
  59. package/.output/server/node_modules/devalue/src/operations.js +193 -0
  60. package/.output/server/node_modules/devalue/src/parse.js +274 -0
  61. package/.output/server/node_modules/devalue/src/stringify.js +428 -0
  62. package/.output/server/node_modules/devalue/src/uneval.js +606 -0
  63. package/.output/server/node_modules/devalue/src/utils.js +185 -0
  64. package/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  65. package/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  66. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  67. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  68. package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  69. package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  70. package/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
  71. package/.output/server/node_modules/entities/package.json +120 -0
  72. package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  73. package/.output/server/node_modules/estree-walker/package.json +37 -0
  74. package/.output/server/node_modules/hookable/dist/index.mjs +257 -0
  75. package/.output/server/node_modules/hookable/package.json +53 -0
  76. package/.output/server/node_modules/nostics/dist/formatters/ansi.mjs +19 -0
  77. package/.output/server/node_modules/nostics/dist/index.mjs +187 -0
  78. package/.output/server/node_modules/nostics/package.json +125 -0
  79. package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  80. package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  81. package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  82. package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  83. package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  84. package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  85. package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  86. package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  87. package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
  88. package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  89. package/.output/server/node_modules/source-map-js/package.json +71 -0
  90. package/.output/server/node_modules/source-map-js/source-map.js +8 -0
  91. package/.output/server/node_modules/ufo/dist/index.mjs +645 -0
  92. package/.output/server/node_modules/ufo/package.json +48 -0
  93. package/.output/server/node_modules/unhead/dist/client.mjs +22 -0
  94. package/.output/server/node_modules/unhead/dist/legacy.mjs +33 -0
  95. package/.output/server/node_modules/unhead/dist/minify.mjs +183 -0
  96. package/.output/server/node_modules/unhead/dist/parser.mjs +518 -0
  97. package/.output/server/node_modules/unhead/dist/plugins.mjs +720 -0
  98. package/.output/server/node_modules/unhead/dist/server.mjs +99 -0
  99. package/.output/server/node_modules/unhead/dist/shared/unhead.-hZVKou0.mjs +400 -0
  100. package/.output/server/node_modules/unhead/dist/shared/unhead.BEmVMkeA.mjs +673 -0
  101. package/.output/server/node_modules/unhead/dist/shared/unhead.BGFxPGPQ.mjs +47 -0
  102. package/.output/server/node_modules/unhead/dist/shared/unhead.BQWSw36o.mjs +192 -0
  103. package/.output/server/node_modules/unhead/dist/shared/unhead.Bf_fPVYA.mjs +6 -0
  104. package/.output/server/node_modules/unhead/dist/shared/unhead.Bjbp1C8D.mjs +224 -0
  105. package/.output/server/node_modules/unhead/dist/shared/unhead.Bm4Y6XQI.mjs +17 -0
  106. package/.output/server/node_modules/unhead/dist/shared/unhead.C5Bksi2B.mjs +49 -0
  107. package/.output/server/node_modules/unhead/dist/shared/unhead.CGPOfp5O.mjs +32 -0
  108. package/.output/server/node_modules/unhead/dist/shared/unhead.CHEy9ana.mjs +7 -0
  109. package/.output/server/node_modules/unhead/dist/shared/unhead.D7HkBzZn.mjs +59 -0
  110. package/.output/server/node_modules/unhead/dist/shared/unhead.Dssd7L5I.mjs +196 -0
  111. package/.output/server/node_modules/unhead/dist/shared/unhead.jEy9BmRq.mjs +264 -0
  112. package/.output/server/node_modules/unhead/dist/shared/unhead.oZ7pkTV1.mjs +19 -0
  113. package/.output/server/node_modules/unhead/dist/shared/unhead.tQnRaXfX.mjs +240 -0
  114. package/.output/server/node_modules/unhead/dist/stream/client.mjs +33 -0
  115. package/.output/server/node_modules/unhead/dist/stream/iife.mjs +2 -0
  116. package/.output/server/node_modules/unhead/dist/stream/server.mjs +445 -0
  117. package/.output/server/node_modules/unhead/dist/utils.mjs +7 -0
  118. package/.output/server/node_modules/unhead/package.json +179 -0
  119. package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  120. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  121. package/.output/server/node_modules/vue/index.js +7 -0
  122. package/.output/server/node_modules/vue/index.mjs +1 -0
  123. package/.output/server/node_modules/vue/package.json +112 -0
  124. package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  125. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +278 -0
  126. package/.output/server/node_modules/vue-bundle-renderer/package.json +54 -0
  127. package/.output/server/node_modules/yaml/dist/compose/compose-collection.js +90 -0
  128. package/.output/server/node_modules/yaml/dist/compose/compose-doc.js +45 -0
  129. package/.output/server/node_modules/yaml/dist/compose/compose-node.js +112 -0
  130. package/.output/server/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
  131. package/.output/server/node_modules/yaml/dist/compose/composer.js +224 -0
  132. package/.output/server/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
  133. package/.output/server/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
  134. package/.output/server/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
  135. package/.output/server/node_modules/yaml/dist/compose/resolve-end.js +39 -0
  136. package/.output/server/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
  137. package/.output/server/node_modules/yaml/dist/compose/resolve-flow-scalar.js +227 -0
  138. package/.output/server/node_modules/yaml/dist/compose/resolve-props.js +148 -0
  139. package/.output/server/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
  140. package/.output/server/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
  141. package/.output/server/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
  142. package/.output/server/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
  143. package/.output/server/node_modules/yaml/dist/doc/Document.js +337 -0
  144. package/.output/server/node_modules/yaml/dist/doc/anchors.js +76 -0
  145. package/.output/server/node_modules/yaml/dist/doc/applyReviver.js +57 -0
  146. package/.output/server/node_modules/yaml/dist/doc/createNode.js +90 -0
  147. package/.output/server/node_modules/yaml/dist/doc/directives.js +178 -0
  148. package/.output/server/node_modules/yaml/dist/errors.js +62 -0
  149. package/.output/server/node_modules/yaml/dist/index.js +50 -0
  150. package/.output/server/node_modules/yaml/dist/log.js +19 -0
  151. package/.output/server/node_modules/yaml/dist/nodes/Alias.js +118 -0
  152. package/.output/server/node_modules/yaml/dist/nodes/Collection.js +151 -0
  153. package/.output/server/node_modules/yaml/dist/nodes/Node.js +40 -0
  154. package/.output/server/node_modules/yaml/dist/nodes/Pair.js +39 -0
  155. package/.output/server/node_modules/yaml/dist/nodes/Scalar.js +27 -0
  156. package/.output/server/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
  157. package/.output/server/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
  158. package/.output/server/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
  159. package/.output/server/node_modules/yaml/dist/nodes/identity.js +53 -0
  160. package/.output/server/node_modules/yaml/dist/nodes/toJS.js +39 -0
  161. package/.output/server/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
  162. package/.output/server/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
  163. package/.output/server/node_modules/yaml/dist/parse/cst-visit.js +99 -0
  164. package/.output/server/node_modules/yaml/dist/parse/cst.js +112 -0
  165. package/.output/server/node_modules/yaml/dist/parse/lexer.js +723 -0
  166. package/.output/server/node_modules/yaml/dist/parse/line-counter.js +41 -0
  167. package/.output/server/node_modules/yaml/dist/parse/parser.js +980 -0
  168. package/.output/server/node_modules/yaml/dist/public-api.js +107 -0
  169. package/.output/server/node_modules/yaml/dist/schema/Schema.js +39 -0
  170. package/.output/server/node_modules/yaml/dist/schema/common/map.js +19 -0
  171. package/.output/server/node_modules/yaml/dist/schema/common/null.js +17 -0
  172. package/.output/server/node_modules/yaml/dist/schema/common/seq.js +19 -0
  173. package/.output/server/node_modules/yaml/dist/schema/common/string.js +16 -0
  174. package/.output/server/node_modules/yaml/dist/schema/core/bool.js +21 -0
  175. package/.output/server/node_modules/yaml/dist/schema/core/float.js +47 -0
  176. package/.output/server/node_modules/yaml/dist/schema/core/int.js +42 -0
  177. package/.output/server/node_modules/yaml/dist/schema/core/schema.js +25 -0
  178. package/.output/server/node_modules/yaml/dist/schema/json/schema.js +64 -0
  179. package/.output/server/node_modules/yaml/dist/schema/tags.js +99 -0
  180. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
  181. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
  182. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
  183. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
  184. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
  185. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
  186. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
  187. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
  188. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
  189. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
  190. package/.output/server/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
  191. package/.output/server/node_modules/yaml/dist/stringify/stringify.js +132 -0
  192. package/.output/server/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
  193. package/.output/server/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
  194. package/.output/server/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
  195. package/.output/server/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
  196. package/.output/server/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
  197. package/.output/server/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
  198. package/.output/server/node_modules/yaml/dist/visit.js +236 -0
  199. package/.output/server/node_modules/yaml/package.json +97 -0
  200. package/.output/server/package.json +28 -0
  201. package/LICENSE +21 -0
  202. package/README.md +57 -1
  203. package/bin/launch.mjs +158 -0
  204. package/bin/shelfware.mjs +6 -0
  205. package/package.json +64 -5
  206. package/cli.mjs +0 -3
@@ -0,0 +1,22 @@
1
+ export { c as createHead } from './shared/unhead.oZ7pkTV1.mjs';
2
+ export { c as createDomRenderer, r as renderDOMHead } from './shared/unhead.Bjbp1C8D.mjs';
3
+ import './shared/unhead.D7HkBzZn.mjs';
4
+ import './shared/unhead.CGPOfp5O.mjs';
5
+ import './shared/unhead.Bm4Y6XQI.mjs';
6
+ import 'hookable';
7
+ import './shared/unhead.C5Bksi2B.mjs';
8
+ import './shared/unhead.-hZVKou0.mjs';
9
+
10
+ function createDebouncedFn(callee, delayer) {
11
+ let ctxId = 0;
12
+ return () => {
13
+ const delayFnCtxId = ++ctxId;
14
+ delayer(() => {
15
+ if (ctxId === delayFnCtxId) {
16
+ callee();
17
+ }
18
+ });
19
+ };
20
+ }
21
+
22
+ export { createDebouncedFn };
@@ -0,0 +1,33 @@
1
+ import { D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin, A as AliasSortingPlugin } from './shared/unhead.tQnRaXfX.mjs';
2
+ import { c as createUnhead } from './shared/unhead.D7HkBzZn.mjs';
3
+ import { c as createHead$1 } from './shared/unhead.oZ7pkTV1.mjs';
4
+ import { c as createHead$2 } from './shared/unhead.Dssd7L5I.mjs';
5
+ import './shared/unhead.CHEy9ana.mjs';
6
+ import './shared/unhead.BGFxPGPQ.mjs';
7
+ import './shared/unhead.CGPOfp5O.mjs';
8
+ import './shared/unhead.Bm4Y6XQI.mjs';
9
+ import 'hookable';
10
+ import './shared/unhead.C5Bksi2B.mjs';
11
+ import './shared/unhead.Bjbp1C8D.mjs';
12
+ import './shared/unhead.-hZVKou0.mjs';
13
+
14
+ const legacyPlugins = [DeprecationsPlugin, PromisesPlugin, TemplateParamsPlugin, AliasSortingPlugin];
15
+ const activeHead = { value: null };
16
+ function getActiveHead() {
17
+ return activeHead.value;
18
+ }
19
+ function createHead(options = {}) {
20
+ return activeHead.value = createHead$1({
21
+ ...options,
22
+ plugins: [...legacyPlugins, ...options.plugins || []]
23
+ });
24
+ }
25
+ function createServerHead(options = {}) {
26
+ return activeHead.value = createHead$2({
27
+ ...options,
28
+ plugins: [...legacyPlugins, ...options.plugins || []]
29
+ });
30
+ }
31
+ const createHeadCore = createUnhead;
32
+
33
+ export { DeprecationsPlugin, activeHead, createHead, createHeadCore, createServerHead, getActiveHead, legacyPlugins };
@@ -0,0 +1,183 @@
1
+ function minifyCSS(code) {
2
+ if (!/[\s/]|;\}|0\.\d/.test(code))
3
+ return code;
4
+ let result = "";
5
+ let last = "";
6
+ let i = 0;
7
+ let parenDepth = 0;
8
+ const len = code.length;
9
+ const append = (value) => {
10
+ result += value;
11
+ last = value;
12
+ };
13
+ while (i < len) {
14
+ const ch = code[i];
15
+ if (ch === "'" || ch === '"') {
16
+ const quote = ch;
17
+ append(ch);
18
+ i++;
19
+ while (i < len && code[i] !== quote) {
20
+ if (code[i] === "\\" && i + 1 < len)
21
+ append(code[i++]);
22
+ append(code[i++]);
23
+ }
24
+ if (i < len)
25
+ append(code[i++]);
26
+ } else if (ch === "/" && code[i + 1] === "*") {
27
+ i += 2;
28
+ while (i < len && !(code[i] === "*" && code[i + 1] === "/"))
29
+ i++;
30
+ i += 2;
31
+ } else if (ch === "(") {
32
+ parenDepth++;
33
+ append(ch);
34
+ i++;
35
+ } else if (ch === ")") {
36
+ parenDepth = Math.max(0, parenDepth - 1);
37
+ append(ch);
38
+ i++;
39
+ } else if (ch === " " || ch === " " || ch === "\n" || ch === "\r") {
40
+ while (i < len && (code[i] === " " || code[i] === " " || code[i] === "\n" || code[i] === "\r"))
41
+ i++;
42
+ const next = code[i];
43
+ if (next === "!")
44
+ continue;
45
+ if (parenDepth > 0) {
46
+ if (last && next && !isCSSCalcPunctuation(last) && !isCSSCalcPunctuation(next))
47
+ append(" ");
48
+ } else if (last && next && !isCSSPunctuation(last) && !isCSSPunctuation(next)) {
49
+ append(" ");
50
+ }
51
+ } else if (ch === ";") {
52
+ let j = i + 1;
53
+ while (j < len && (code[j] === " " || code[j] === " " || code[j] === "\n" || code[j] === "\r"))
54
+ j++;
55
+ if (code[j] === "}") {
56
+ i++;
57
+ } else {
58
+ append(ch);
59
+ i++;
60
+ }
61
+ } else if (ch === "0" && code[i + 1] === "." && code[i + 2] >= "0" && code[i + 2] <= "9") {
62
+ if (last && last >= "0" && last <= "9") {
63
+ append(ch);
64
+ i++;
65
+ } else {
66
+ i++;
67
+ }
68
+ } else {
69
+ append(ch);
70
+ i++;
71
+ }
72
+ }
73
+ return result.trim();
74
+ }
75
+ function isCSSPunctuation(ch) {
76
+ return ch === "{" || ch === "}" || ch === ";" || ch === ":" || ch === "," || ch === ">" || ch === "~" || ch === "+" || ch === "(" || ch === ")";
77
+ }
78
+ function isCSSCalcPunctuation(ch) {
79
+ return ch === "*" || ch === "/" || ch === "(" || ch === ")" || ch === ",";
80
+ }
81
+
82
+ function minifyJS(code) {
83
+ if (!/[\s/]/.test(code))
84
+ return code;
85
+ let result = "";
86
+ let last = "";
87
+ let i = 0;
88
+ const len = code.length;
89
+ const append = (value) => {
90
+ result += value;
91
+ last = value;
92
+ };
93
+ while (i < len) {
94
+ const ch = code[i];
95
+ if (ch === "'" || ch === '"' || ch === "`") {
96
+ const quote = ch;
97
+ append(ch);
98
+ i++;
99
+ while (i < len && code[i] !== quote) {
100
+ if (code[i] === "\\" && i + 1 < len) {
101
+ append(code[i++]);
102
+ }
103
+ append(code[i++]);
104
+ }
105
+ if (i < len)
106
+ append(code[i++]);
107
+ } else if (ch === "/" && code[i + 1] === "/") {
108
+ i += 2;
109
+ while (i < len && code[i] !== "\n")
110
+ i++;
111
+ } else if (ch === "/" && code[i + 1] === "*") {
112
+ i += 2;
113
+ while (i < len && !(code[i] === "*" && code[i + 1] === "/"))
114
+ i++;
115
+ i += 2;
116
+ } else if (ch === " " || ch === " " || ch === "\n" || ch === "\r") {
117
+ let hasNewline = false;
118
+ while (i < len && (code[i] === " " || code[i] === " " || code[i] === "\n" || code[i] === "\r")) {
119
+ if (code[i] === "\n")
120
+ hasNewline = true;
121
+ i++;
122
+ }
123
+ const next = code[i];
124
+ if (hasNewline && last && next && last !== "{" && last !== "}" && last !== ";" && next !== "}" && next !== ";")
125
+ append("\n");
126
+ else if (last && next && isIdentChar(last) && isIdentChar(next))
127
+ append(" ");
128
+ else if (last && next && (last === "+" && next === "+" || last === "-" && next === "-"))
129
+ append(" ");
130
+ } else {
131
+ append(ch);
132
+ i++;
133
+ }
134
+ }
135
+ return result.trim();
136
+ }
137
+ function isIdentChar(ch) {
138
+ return ch >= "a" && ch <= "z" || ch >= "A" && ch <= "Z" || ch >= "0" && ch <= "9" || ch === "_" || ch === "$";
139
+ }
140
+
141
+ function isJsonWhitespace(char) {
142
+ return char === " " || char === "\n" || char === "\r" || char === " ";
143
+ }
144
+ function minifyJSON(code) {
145
+ let escaped = false;
146
+ let inString = false;
147
+ let segmentStart = 0;
148
+ let chunks;
149
+ for (let i = 0; i < code.length; i++) {
150
+ const char = code[i];
151
+ if (inString) {
152
+ if (escaped)
153
+ escaped = false;
154
+ else if (char === "\\")
155
+ escaped = true;
156
+ else if (char === '"')
157
+ inString = false;
158
+ continue;
159
+ }
160
+ if (char === '"') {
161
+ inString = true;
162
+ continue;
163
+ }
164
+ if (isJsonWhitespace(char)) {
165
+ chunks ||= [];
166
+ if (segmentStart < i)
167
+ chunks.push(code.slice(segmentStart, i));
168
+ segmentStart = i + 1;
169
+ }
170
+ }
171
+ if (!chunks)
172
+ return code;
173
+ try {
174
+ JSON.parse(code);
175
+ } catch {
176
+ return code;
177
+ }
178
+ if (segmentStart < code.length)
179
+ chunks.push(code.slice(segmentStart));
180
+ return chunks.join("");
181
+ }
182
+
183
+ export { minifyCSS, minifyJS, minifyJSON };