@digi-frontend/dgate-api-documentation 1.0.1 → 1.0.4

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 (479) hide show
  1. package/.editorconfig +12 -12
  2. package/.prettierignore +7 -7
  3. package/.prettierrc +15 -15
  4. package/dist/{2e10bbdb265df50e.svg → 43595976d1fdccbf.svg} +4 -4
  5. package/dist/{8789eb84283ea95b.svg → 56dc416b683db280.svg} +5 -5
  6. package/dist/{bb8b87cace25e052.svg → 64efc2716808c4a4.svg} +3 -3
  7. package/dist/{d32ce84bbd78babd.svg → 72db3b05a96dd600.svg} +3 -3
  8. package/dist/{d501922060662842.svg → 844eba3f2e42a9eb.svg} +3 -3
  9. package/dist/_virtual/index10.js +1 -1
  10. package/dist/_virtual/index21.js +2 -0
  11. package/dist/_virtual/index21.js.map +1 -0
  12. package/dist/_virtual/index3.js +1 -1
  13. package/dist/_virtual/index4.js +1 -1
  14. package/dist/_virtual/index6.js +1 -1
  15. package/dist/_virtual/index7.js +1 -1
  16. package/dist/_virtual/index8.js +1 -1
  17. package/dist/_virtual/index9.js +1 -1
  18. package/dist/_virtual/node2.js +2 -0
  19. package/dist/_virtual/node2.js.map +1 -0
  20. package/dist/_virtual/node3.js +2 -0
  21. package/dist/_virtual/node3.js.map +1 -0
  22. package/dist/{070dc6ecd197bc80.svg → a7568b270e175038.svg} +8 -8
  23. package/dist/{9bdff13f8d8fa48a.svg → af16a554be8c4d69.svg} +3 -3
  24. package/dist/{7f54eeb0bb2d1150.svg → b82c7612e73342f3.svg} +3 -3
  25. package/dist/node_modules/digitinary-ui/dist/index.js +1 -1
  26. package/dist/node_modules/digitinary-ui/dist/index.js.map +1 -1
  27. package/dist/node_modules/domelementtype/lib/index.js +1 -1
  28. package/dist/node_modules/formik/dist/formik.esm.js +1 -1
  29. package/dist/node_modules/html-dom-parser/lib/index.js +1 -1
  30. package/dist/node_modules/html-dom-parser/lib/server/html-to-dom.js +1 -1
  31. package/dist/node_modules/html-dom-parser/lib/server/html-to-dom.js.map +1 -1
  32. package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/index.js +2 -0
  33. package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/index.js.map +1 -0
  34. package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/node.js +2 -0
  35. package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/node.js.map +1 -0
  36. package/dist/node_modules/html-react-parser/esm/index.mjs.js +1 -1
  37. package/dist/node_modules/html-react-parser/esm/index.mjs.js.map +1 -1
  38. package/dist/node_modules/html-react-parser/lib/index.js +1 -1
  39. package/dist/node_modules/html-react-parser/lib/index.js.map +1 -1
  40. package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/index.js +2 -0
  41. package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/index.js.map +1 -0
  42. package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/node.js +2 -0
  43. package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/node.js.map +1 -0
  44. package/dist/node_modules/htmlparser2/dist/commonjs/Parser.js +1 -1
  45. package/dist/node_modules/htmlparser2/dist/commonjs/Parser.js.map +1 -1
  46. package/dist/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +1 -1
  47. package/dist/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +1 -1
  48. package/dist/node_modules/htmlparser2/dist/commonjs/index.js +1 -1
  49. package/dist/node_modules/htmlparser2/dist/commonjs/index.js.map +1 -1
  50. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/foreignNames.js +2 -0
  51. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/foreignNames.js.map +1 -0
  52. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/index.js +2 -0
  53. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/index.js.map +1 -0
  54. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode.js +2 -0
  55. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode.js.map +1 -0
  56. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js +2 -0
  57. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js.map +1 -0
  58. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/encode.js +2 -0
  59. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/encode.js.map +1 -0
  60. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/escape.js +2 -0
  61. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/escape.js.map +1 -0
  62. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js +2 -0
  63. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
  64. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js +2 -0
  65. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
  66. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js +2 -0
  67. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js.map +1 -0
  68. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/index.js +2 -0
  69. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/index.js.map +1 -0
  70. package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/index.js +2 -0
  71. package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/index.js.map +1 -0
  72. package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/node.js +2 -0
  73. package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/node.js.map +1 -0
  74. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/feeds.js +2 -0
  75. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/feeds.js.map +1 -0
  76. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js +2 -0
  77. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js.map +1 -0
  78. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/index.js +2 -0
  79. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/index.js.map +1 -0
  80. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js +2 -0
  81. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js.map +1 -0
  82. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js +2 -0
  83. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js.map +1 -0
  84. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/querying.js +2 -0
  85. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/querying.js.map +1 -0
  86. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js +2 -0
  87. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js.map +1 -0
  88. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js +2 -0
  89. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js.map +1 -0
  90. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +2 -0
  91. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +1 -0
  92. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +2 -0
  93. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +1 -0
  94. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +2 -0
  95. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -0
  96. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +2 -0
  97. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -0
  98. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +1 -1
  99. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -1
  100. package/dist/node_modules/react-fast-compare/index.js +1 -1
  101. package/dist/node_modules/react-fast-compare/index.js.map +1 -1
  102. package/dist/node_modules/react-is/index.js +1 -1
  103. package/dist/node_modules/react-property/lib/index.js +1 -1
  104. package/dist/node_modules/react-property/lib/index.js.map +1 -1
  105. package/dist/node_modules/style-to-object/cjs/index.js +1 -1
  106. package/dist/node_modules/toposort/index.js +1 -1
  107. package/dist/node_modules/yup/index.esm.js +1 -1
  108. package/dist/node_modules/yup/index.esm.js.map +1 -1
  109. package/dist/src/assets/icons/AddRow.svg.js +1 -1
  110. package/dist/src/assets/icons/AddRow.svg.js.map +1 -1
  111. package/dist/src/assets/icons/CheckMarkSquare.svg.js +2 -0
  112. package/dist/src/assets/icons/CheckMarkSquare.svg.js.map +1 -0
  113. package/dist/src/assets/icons/CloseIcon.svg.js +1 -1
  114. package/dist/src/assets/icons/CloseIcon.svg.js.map +1 -1
  115. package/dist/src/assets/icons/DeleteIcon.svg.js +1 -1
  116. package/dist/src/assets/icons/DeleteIcon.svg.js.map +1 -1
  117. package/dist/src/assets/icons/DownArrow.svg.js +1 -1
  118. package/dist/src/assets/icons/DownArrow.svg.js.map +1 -1
  119. package/dist/src/assets/icons/EditIcon.svg.js +1 -1
  120. package/dist/src/assets/icons/EditIcon.svg.js.map +1 -1
  121. package/dist/src/assets/icons/UpArrow.svg.js +1 -1
  122. package/dist/src/assets/icons/UpArrow.svg.js.map +1 -1
  123. package/dist/src/assets/icons/deleteOutlinedIcon.svg.js +2 -0
  124. package/dist/src/assets/icons/deleteOutlinedIcon.svg.js.map +1 -0
  125. package/dist/src/components/Chips/Chips.js +2 -0
  126. package/dist/src/components/Chips/Chips.js.map +1 -0
  127. package/dist/src/components/InfoForm/InfoForm.js +1 -1
  128. package/dist/src/components/InfoForm/InfoForm.js.map +1 -1
  129. package/dist/src/components/LivePreview/LivePreview.js +1 -1
  130. package/dist/src/components/LivePreview/LivePreview.js.map +1 -1
  131. package/dist/src/components/MethodAccordion/MethodAccordion.js +1 -1
  132. package/dist/src/components/MethodAccordion/MethodAccordion.js.map +1 -1
  133. package/dist/src/components/SVGLoader/SVGLoader.js.map +1 -1
  134. package/dist/src/components/SectionHead/SectionHead.js.map +1 -1
  135. package/dist/src/components/SimpleLabelValue/SimpleLabelValue.js.map +1 -1
  136. package/dist/src/components/Tooltip/Tooltip.js.map +1 -1
  137. package/dist/src/components/dialog/index.js +1 -1
  138. package/dist/src/components/dialog/index.js.map +1 -1
  139. package/dist/src/components/table/table.js +1 -1
  140. package/dist/src/components/table/table.js.map +1 -1
  141. package/dist/src/constants/index.js +1 -1
  142. package/dist/src/constants/index.js.map +1 -1
  143. package/dist/src/constants/regex.js +1 -1
  144. package/dist/src/constants/regex.js.map +1 -1
  145. package/dist/src/helpers/layout.helper.js +1 -1
  146. package/dist/src/helpers/layout.helper.js.map +1 -1
  147. package/dist/src/helpers/methodAccordion.helper.js.map +1 -1
  148. package/dist/src/index.js +1 -1
  149. package/dist/src/layout/layout.js +1 -1
  150. package/dist/src/layout/layout.js.map +1 -1
  151. package/dist/src/layout/layout.module.css.js +1 -1
  152. package/dist/src/validator/form.scheme.js +1 -1
  153. package/dist/src/validator/form.scheme.js.map +1 -1
  154. package/dist/styles.css +500 -2036
  155. package/dist/types/assets/icons/index.d.ts +1 -17
  156. package/dist/types/components/InfoForm/InfoForm.d.ts +1 -3
  157. package/dist/types/components/LivePreview/LivePreview.d.ts +0 -1
  158. package/dist/types/components/MethodAccordion/MethodAccordion.d.ts +3 -7
  159. package/dist/types/components/Tooltip/Tooltip.d.ts +2 -2
  160. package/dist/types/components/dialog/dialog.d.ts +0 -6
  161. package/dist/types/components/dialog/index.d.ts +1 -1
  162. package/dist/types/components/table/table.d.ts +1 -2
  163. package/dist/types/constants/index.d.ts +4 -23
  164. package/dist/types/constants/regex.d.ts +0 -2
  165. package/dist/types/index.d.ts +0 -1
  166. package/dist/types/layout/layout.d.ts +1 -4
  167. package/dist/types/types/index.d.ts +16 -25
  168. package/dist/types/types/layout.type.d.ts +1 -11
  169. package/dist/types/types/openApi.d.ts +5 -18
  170. package/dist/types/validator/form.scheme.d.ts +3 -12
  171. package/package.json +42 -47
  172. package/rollup.config.js +35 -37
  173. package/src/assets/icons/AddRow.svg +3 -3
  174. package/src/assets/icons/CheckMarkSquare.svg +5 -5
  175. package/src/assets/icons/CloseIcon.svg +4 -4
  176. package/src/assets/icons/DeleteIcon.svg +3 -3
  177. package/src/assets/icons/DownArrow.svg +3 -3
  178. package/src/assets/icons/EditIcon.svg +3 -3
  179. package/src/assets/icons/UpArrow.svg +3 -3
  180. package/src/assets/icons/deleteOutlinedIcon.svg +8 -8
  181. package/src/assets/icons/index.ts +8 -24
  182. package/src/components/Chips/Chips.tsx +87 -87
  183. package/src/components/Chips/style.scss +147 -147
  184. package/src/components/InfoForm/InfoForm.module.scss +20 -165
  185. package/src/components/InfoForm/InfoForm.tsx +138 -424
  186. package/src/components/LivePreview/LivePreview.module.scss +5 -181
  187. package/src/components/LivePreview/LivePreview.tsx +80 -224
  188. package/src/components/MethodAccordion/MethodAccordion.module.scss +289 -399
  189. package/src/components/MethodAccordion/MethodAccordion.tsx +431 -1063
  190. package/src/components/SVGLoader/SVGLoader.tsx +94 -96
  191. package/src/components/SectionHead/SectionHead.scss +29 -29
  192. package/src/components/SectionHead/SectionHead.tsx +22 -22
  193. package/src/components/SimpleLabelValue/SimpleLabelValue.tsx +31 -31
  194. package/src/components/SimpleLabelValue/index.ts +1 -1
  195. package/src/components/SimpleLabelValue/style.scss +30 -30
  196. package/src/components/Tooltip/Tooltip.scss +130 -133
  197. package/src/components/Tooltip/Tooltip.tsx +86 -85
  198. package/src/components/_global.scss +337 -337
  199. package/src/components/dialog/dialog.ts +54 -61
  200. package/src/components/dialog/index.tsx +85 -88
  201. package/src/components/dialog/style.scss +104 -188
  202. package/src/components/table/style.scss +179 -223
  203. package/src/components/table/table.tsx +307 -490
  204. package/src/constants/index.ts +66 -95
  205. package/src/constants/regex.ts +5 -7
  206. package/src/global.d.ts +13 -13
  207. package/src/helpers/layout.helper.ts +118 -187
  208. package/src/helpers/methodAccordion.helper.ts +19 -19
  209. package/src/index.ts +1 -2
  210. package/src/layout/layout.module.css +38 -65
  211. package/src/layout/layout.tsx +75 -181
  212. package/src/types/index.ts +0 -28
  213. package/src/types/layout.type.ts +22 -32
  214. package/src/types/openApi.ts +95 -109
  215. package/src/types/transformedOpenApi.ts +52 -52
  216. package/src/validator/form.scheme.ts +70 -96
  217. package/tsconfig.json +33 -33
  218. package/dist/16702d92fd6d1730.svg +0 -6
  219. package/dist/2b546d6e9fdf604a.svg +0 -3
  220. package/dist/2c3c6c2c3b835504.svg +0 -5
  221. package/dist/55b5994c5781482b.svg +0 -5
  222. package/dist/60bef8083c55f46b.svg +0 -6
  223. package/dist/68c710e0583e19e6.svg +0 -5
  224. package/dist/731221b3f242672d.svg +0 -4
  225. package/dist/8520b6792278d9df.svg +0 -6
  226. package/dist/9506ef7a26a74147.svg +0 -12
  227. package/dist/9b7aee27757b5036.svg +0 -3
  228. package/dist/_virtual/core.js +0 -2
  229. package/dist/_virtual/core.js.map +0 -1
  230. package/dist/_virtual/core2.js +0 -2
  231. package/dist/_virtual/core2.js.map +0 -1
  232. package/dist/_virtual/format.js +0 -2
  233. package/dist/_virtual/format.js.map +0 -1
  234. package/dist/_virtual/json.js +0 -2
  235. package/dist/_virtual/json.js.map +0 -1
  236. package/dist/cceb1e5dc06b0b85.svg +0 -4
  237. package/dist/d140a601c85bac25.svg +0 -3
  238. package/dist/d6d0a98ec38e6b77.svg +0 -3
  239. package/dist/e04479ad425e7d58.svg +0 -4
  240. package/dist/f4452c3ebcf0d5da.svg +0 -4
  241. package/dist/f4a32992f02af522.svg +0 -5
  242. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -2
  243. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +0 -1
  244. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -2
  245. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js.map +0 -1
  246. package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -2
  247. package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +0 -1
  248. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -2
  249. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +0 -1
  250. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -2
  251. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +0 -1
  252. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -2
  253. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js.map +0 -1
  254. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -2
  255. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js.map +0 -1
  256. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -2
  257. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +0 -1
  258. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -2
  259. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js.map +0 -1
  260. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -2
  261. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +0 -1
  262. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -2
  263. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +0 -1
  264. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -2
  265. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js.map +0 -1
  266. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -2
  267. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +0 -1
  268. package/dist/node_modules/dom-serializer/lib/foreignNames.js +0 -2
  269. package/dist/node_modules/dom-serializer/lib/foreignNames.js.map +0 -1
  270. package/dist/node_modules/dom-serializer/lib/index.js +0 -2
  271. package/dist/node_modules/dom-serializer/lib/index.js.map +0 -1
  272. package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode.js +0 -2
  273. package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode.js.map +0 -1
  274. package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js +0 -2
  275. package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js.map +0 -1
  276. package/dist/node_modules/dom-serializer/node_modules/entities/lib/encode.js +0 -2
  277. package/dist/node_modules/dom-serializer/node_modules/entities/lib/encode.js.map +0 -1
  278. package/dist/node_modules/dom-serializer/node_modules/entities/lib/escape.js +0 -2
  279. package/dist/node_modules/dom-serializer/node_modules/entities/lib/escape.js.map +0 -1
  280. package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js +0 -2
  281. package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js.map +0 -1
  282. package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js +0 -2
  283. package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js.map +0 -1
  284. package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js +0 -2
  285. package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js.map +0 -1
  286. package/dist/node_modules/dom-serializer/node_modules/entities/lib/index.js +0 -2
  287. package/dist/node_modules/dom-serializer/node_modules/entities/lib/index.js.map +0 -1
  288. package/dist/node_modules/domhandler/lib/index.js +0 -2
  289. package/dist/node_modules/domhandler/lib/index.js.map +0 -1
  290. package/dist/node_modules/domhandler/lib/node.js +0 -2
  291. package/dist/node_modules/domhandler/lib/node.js.map +0 -1
  292. package/dist/node_modules/domutils/lib/feeds.js +0 -2
  293. package/dist/node_modules/domutils/lib/feeds.js.map +0 -1
  294. package/dist/node_modules/domutils/lib/helpers.js +0 -2
  295. package/dist/node_modules/domutils/lib/helpers.js.map +0 -1
  296. package/dist/node_modules/domutils/lib/index.js +0 -2
  297. package/dist/node_modules/domutils/lib/index.js.map +0 -1
  298. package/dist/node_modules/domutils/lib/legacy.js +0 -2
  299. package/dist/node_modules/domutils/lib/legacy.js.map +0 -1
  300. package/dist/node_modules/domutils/lib/manipulation.js +0 -2
  301. package/dist/node_modules/domutils/lib/manipulation.js.map +0 -1
  302. package/dist/node_modules/domutils/lib/querying.js +0 -2
  303. package/dist/node_modules/domutils/lib/querying.js.map +0 -1
  304. package/dist/node_modules/domutils/lib/stringify.js +0 -2
  305. package/dist/node_modules/domutils/lib/stringify.js.map +0 -1
  306. package/dist/node_modules/domutils/lib/traversal.js +0 -2
  307. package/dist/node_modules/domutils/lib/traversal.js.map +0 -1
  308. package/dist/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -2
  309. package/dist/node_modules/entities/dist/commonjs/decode-codepoint.js.map +0 -1
  310. package/dist/node_modules/entities/dist/commonjs/decode.js +0 -2
  311. package/dist/node_modules/entities/dist/commonjs/decode.js.map +0 -1
  312. package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -2
  313. package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +0 -1
  314. package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -2
  315. package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +0 -1
  316. package/dist/node_modules/fast-json-stable-stringify/index.js +0 -2
  317. package/dist/node_modules/fast-json-stable-stringify/index.js.map +0 -1
  318. package/dist/node_modules/fault/index.js +0 -2
  319. package/dist/node_modules/fault/index.js.map +0 -1
  320. package/dist/node_modules/format/format.js +0 -2
  321. package/dist/node_modules/format/format.js.map +0 -1
  322. package/dist/node_modules/highlight.js/lib/core.js +0 -2
  323. package/dist/node_modules/highlight.js/lib/core.js.map +0 -1
  324. package/dist/node_modules/highlight.js/lib/languages/json.js +0 -2
  325. package/dist/node_modules/highlight.js/lib/languages/json.js.map +0 -1
  326. package/dist/node_modules/js-yaml/dist/js-yaml.mjs.js +0 -3
  327. package/dist/node_modules/js-yaml/dist/js-yaml.mjs.js.map +0 -1
  328. package/dist/node_modules/lowlight/lib/core.js +0 -2
  329. package/dist/node_modules/lowlight/lib/core.js.map +0 -1
  330. package/dist/node_modules/nanoid/index.js +0 -2
  331. package/dist/node_modules/nanoid/index.js.map +0 -1
  332. package/dist/node_modules/nanoid/url-alphabet/index.js +0 -2
  333. package/dist/node_modules/nanoid/url-alphabet/index.js.map +0 -1
  334. package/dist/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js +0 -2
  335. package/dist/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js.map +0 -1
  336. package/dist/node_modules/react-syntax-highlighter/dist/esm/create-element.js +0 -2
  337. package/dist/node_modules/react-syntax-highlighter/dist/esm/create-element.js.map +0 -1
  338. package/dist/node_modules/react-syntax-highlighter/dist/esm/highlight.js +0 -2
  339. package/dist/node_modules/react-syntax-highlighter/dist/esm/highlight.js.map +0 -1
  340. package/dist/node_modules/react-syntax-highlighter/dist/esm/languages/hljs/json.js +0 -2
  341. package/dist/node_modules/react-syntax-highlighter/dist/esm/languages/hljs/json.js.map +0 -1
  342. package/dist/node_modules/react-syntax-highlighter/dist/esm/light.js +0 -2
  343. package/dist/node_modules/react-syntax-highlighter/dist/esm/light.js.map +0 -1
  344. package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/stackoverflow-dark.js +0 -2
  345. package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/stackoverflow-dark.js.map +0 -1
  346. package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/stackoverflow-light.js +0 -2
  347. package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/stackoverflow-light.js.map +0 -1
  348. package/dist/src/assets/icons/ApiIcon.svg.js +0 -2
  349. package/dist/src/assets/icons/ApiIcon.svg.js.map +0 -1
  350. package/dist/src/assets/icons/ArrowBack.svg.js +0 -2
  351. package/dist/src/assets/icons/ArrowBack.svg.js.map +0 -1
  352. package/dist/src/assets/icons/BookIcon.svg.js +0 -2
  353. package/dist/src/assets/icons/BookIcon.svg.js.map +0 -1
  354. package/dist/src/assets/icons/CopySticker.svg.js +0 -2
  355. package/dist/src/assets/icons/CopySticker.svg.js.map +0 -1
  356. package/dist/src/assets/icons/DeleteOutlinedIcon.svg.js +0 -2
  357. package/dist/src/assets/icons/DeleteOutlinedIcon.svg.js.map +0 -1
  358. package/dist/src/assets/icons/FilterIcon.svg.js +0 -2
  359. package/dist/src/assets/icons/FilterIcon.svg.js.map +0 -1
  360. package/dist/src/assets/icons/Plus.svg.js +0 -2
  361. package/dist/src/assets/icons/Plus.svg.js.map +0 -1
  362. package/dist/src/assets/icons/PlusSquare.svg.js +0 -2
  363. package/dist/src/assets/icons/PlusSquare.svg.js.map +0 -1
  364. package/dist/src/assets/icons/RequestOption.svg.js +0 -2
  365. package/dist/src/assets/icons/RequestOption.svg.js.map +0 -1
  366. package/dist/src/assets/icons/arrowDownGray.svg.js +0 -2
  367. package/dist/src/assets/icons/arrowDownGray.svg.js.map +0 -1
  368. package/dist/src/assets/icons/arrowRightGray.svg.js +0 -2
  369. package/dist/src/assets/icons/arrowRightGray.svg.js.map +0 -1
  370. package/dist/src/assets/icons/close-circle.svg.js +0 -2
  371. package/dist/src/assets/icons/close-circle.svg.js.map +0 -1
  372. package/dist/src/assets/icons/copy.svg.js +0 -2
  373. package/dist/src/assets/icons/copy.svg.js.map +0 -1
  374. package/dist/src/assets/icons/document.svg.js +0 -2
  375. package/dist/src/assets/icons/document.svg.js.map +0 -1
  376. package/dist/src/assets/icons/eye.svg.js +0 -2
  377. package/dist/src/assets/icons/eye.svg.js.map +0 -1
  378. package/dist/src/assets/icons/infoIcon.svg.js +0 -2
  379. package/dist/src/assets/icons/infoIcon.svg.js.map +0 -1
  380. package/dist/src/assets/icons/searchIcon.svg.js +0 -2
  381. package/dist/src/assets/icons/searchIcon.svg.js.map +0 -1
  382. package/dist/src/components/JsonInput/JsonInput.js +0 -2
  383. package/dist/src/components/JsonInput/JsonInput.js.map +0 -1
  384. package/dist/src/components/JsonInput/style.module.scss.js +0 -2
  385. package/dist/src/components/JsonInput/style.module.scss.js.map +0 -1
  386. package/dist/src/components/table/tags-table.js +0 -2
  387. package/dist/src/components/table/tags-table.js.map +0 -1
  388. package/dist/src/constants/methods.constant.js +0 -2
  389. package/dist/src/constants/methods.constant.js.map +0 -1
  390. package/dist/src/context/SectionToggleContext.js +0 -2
  391. package/dist/src/context/SectionToggleContext.js.map +0 -1
  392. package/dist/src/helpers/docs.helper.js +0 -2
  393. package/dist/src/helpers/docs.helper.js.map +0 -1
  394. package/dist/src/layout/docsComponents/Codebox/Codebox.js +0 -2
  395. package/dist/src/layout/docsComponents/Codebox/Codebox.js.map +0 -1
  396. package/dist/src/layout/docsComponents/Codebox/style.module.scss.js +0 -2
  397. package/dist/src/layout/docsComponents/Codebox/style.module.scss.js.map +0 -1
  398. package/dist/src/layout/docsComponents/DocsAside/DocsAside.js +0 -2
  399. package/dist/src/layout/docsComponents/DocsAside/DocsAside.js.map +0 -1
  400. package/dist/src/layout/docsComponents/DocsAside/style.module.scss.js +0 -2
  401. package/dist/src/layout/docsComponents/DocsAside/style.module.scss.js.map +0 -1
  402. package/dist/src/layout/docsComponents/DocsContent/DocsContent.js +0 -2
  403. package/dist/src/layout/docsComponents/DocsContent/DocsContent.js.map +0 -1
  404. package/dist/src/layout/docsComponents/DocsContent/EndpointPage/index.js +0 -2
  405. package/dist/src/layout/docsComponents/DocsContent/EndpointPage/index.js.map +0 -1
  406. package/dist/src/layout/docsComponents/DocsContent/OverviewPage/index.js +0 -2
  407. package/dist/src/layout/docsComponents/DocsContent/OverviewPage/index.js.map +0 -1
  408. package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.js +0 -2
  409. package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.js.map +0 -1
  410. package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.module.scss.js +0 -2
  411. package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.module.scss.js.map +0 -1
  412. package/dist/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.js +0 -2
  413. package/dist/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.js.map +0 -1
  414. package/dist/src/layout/docsComponents/index.js +0 -2
  415. package/dist/src/layout/docsComponents/index.js.map +0 -1
  416. package/dist/src/layout/docsLayout.js +0 -2
  417. package/dist/src/layout/docsLayout.js.map +0 -1
  418. package/dist/src/utils/index.js +0 -2
  419. package/dist/src/utils/index.js.map +0 -1
  420. package/dist/types/components/JsonInput/JsonInput.d.ts +0 -14
  421. package/dist/types/components/table/tags-table.d.ts +0 -11
  422. package/dist/types/constants/methods.constant.d.ts +0 -16
  423. package/dist/types/context/SectionToggleContext.d.ts +0 -37
  424. package/dist/types/helpers/docs.helper.d.ts +0 -3
  425. package/dist/types/layout/docsComponents/Codebox/Codebox.d.ts +0 -4
  426. package/dist/types/layout/docsComponents/DocsAside/DocsAside.d.ts +0 -5
  427. package/dist/types/layout/docsComponents/DocsContent/DocsContent.d.ts +0 -12
  428. package/dist/types/layout/docsComponents/DocsContent/EndpointPage/index.d.ts +0 -7
  429. package/dist/types/layout/docsComponents/DocsContent/OverviewPage/index.d.ts +0 -9
  430. package/dist/types/layout/docsComponents/DocsHeader/DocsHeader.d.ts +0 -6
  431. package/dist/types/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.d.ts +0 -18
  432. package/dist/types/layout/docsComponents/index.d.ts +0 -17
  433. package/dist/types/layout/docsLayout.d.ts +0 -31
  434. package/dist/types/types/docsLayout.type.d.ts +0 -7
  435. package/dist/types/utils/index.d.ts +0 -2
  436. package/src/assets/icons/ApiIcon.svg +0 -12
  437. package/src/assets/icons/ArrowBack.svg +0 -3
  438. package/src/assets/icons/BookIcon.svg +0 -6
  439. package/src/assets/icons/CopySticker.svg +0 -6
  440. package/src/assets/icons/DeleteOutlinedIcon.svg +0 -8
  441. package/src/assets/icons/FilterIcon.svg +0 -4
  442. package/src/assets/icons/Plus.svg +0 -5
  443. package/src/assets/icons/PlusSquare.svg +0 -3
  444. package/src/assets/icons/RequestOption.svg +0 -5
  445. package/src/assets/icons/arrowDownGray.svg +0 -3
  446. package/src/assets/icons/arrowRightGray.svg +0 -3
  447. package/src/assets/icons/close-circle.svg +0 -5
  448. package/src/assets/icons/copy.svg +0 -4
  449. package/src/assets/icons/document.svg +0 -6
  450. package/src/assets/icons/eye.svg +0 -4
  451. package/src/assets/icons/infoIcon.svg +0 -5
  452. package/src/assets/icons/searchIcon.svg +0 -4
  453. package/src/components/JsonInput/JsonInput.tsx +0 -149
  454. package/src/components/JsonInput/style.module.scss +0 -133
  455. package/src/components/table/tags-table.tsx +0 -348
  456. package/src/constants/methods.constant.ts +0 -26
  457. package/src/context/SectionToggleContext.tsx +0 -121
  458. package/src/helpers/docs.helper.ts +0 -42
  459. package/src/layout/docsComponents/Codebox/Codebox.tsx +0 -61
  460. package/src/layout/docsComponents/Codebox/style.module.scss +0 -43
  461. package/src/layout/docsComponents/DocsAside/DocsAside.tsx +0 -93
  462. package/src/layout/docsComponents/DocsAside/style.module.scss +0 -113
  463. package/src/layout/docsComponents/DocsContent/DocsContent.tsx +0 -51
  464. package/src/layout/docsComponents/DocsContent/EndpointPage/index.tsx +0 -236
  465. package/src/layout/docsComponents/DocsContent/EndpointPage/style.scss +0 -309
  466. package/src/layout/docsComponents/DocsContent/OverviewPage/index.tsx +0 -192
  467. package/src/layout/docsComponents/DocsContent/OverviewPage/style.scss +0 -284
  468. package/src/layout/docsComponents/DocsContent/style.scss +0 -0
  469. package/src/layout/docsComponents/DocsHeader/DocsHeader.module.scss +0 -270
  470. package/src/layout/docsComponents/DocsHeader/DocsHeader.tsx +0 -187
  471. package/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.tsx +0 -229
  472. package/src/layout/docsComponents/DocsSideMenuTree/style.scss +0 -195
  473. package/src/layout/docsComponents/index.scss +0 -49
  474. package/src/layout/docsComponents/index.tsx +0 -28
  475. package/src/layout/docsLayout.tsx +0 -120
  476. package/src/types/docsLayout.type.ts +0 -7
  477. package/src/utils/index.ts +0 -12
  478. package/the_npm_commands.sh +0 -12
  479. package/variables.txt +0 -4
@@ -1,2 +1,2 @@
1
- import{__exports as e}from"../../../_virtual/index15.js";var t;function o(){return t||(t=1,o=e,Object.defineProperty(o,"__esModule",{value:!0}),o.Doctype=o.CDATA=o.Tag=o.Style=o.Script=o.Comment=o.Directive=o.Text=o.Root=o.isTag=o.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(i=o.ElementType||(o.ElementType={})),o.isTag=function(e){return e.type===i.Tag||e.type===i.Script||e.type===i.Style},o.Root=i.Root,o.Text=i.Text,o.Directive=i.Directive,o.Comment=i.Comment,o.Script=i.Script,o.Style=i.Style,o.Tag=i.Tag,o.CDATA=i.CDATA,o.Doctype=i.Doctype),e;var o,i}export{o as __require};
1
+ import{__exports as e}from"../../../_virtual/index14.js";var t;function o(){return t||(t=1,o=e,Object.defineProperty(o,"__esModule",{value:!0}),o.Doctype=o.CDATA=o.Tag=o.Style=o.Script=o.Comment=o.Directive=o.Text=o.Root=o.isTag=o.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(i=o.ElementType||(o.ElementType={})),o.isTag=function(e){return e.type===i.Tag||e.type===i.Script||e.type===i.Style},o.Root=i.Root,o.Text=i.Text,o.Directive=i.Directive,o.Comment=i.Comment,o.Script=i.Script,o.Style=i.Style,o.Tag=i.Tag,o.CDATA=i.CDATA,o.Doctype=i.Doctype),e;var o,i}export{o as __require};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import e from"../node_modules/deepmerge/dist/es.js";import t from"../../lodash-es/isPlainObject.js";import r from"../../lodash-es/cloneDeep.js";import{useRef as n,useEffect as i,useState as a,useCallback as o,useMemo as u,createContext as l,useContext as c,useLayoutEffect as s,forwardRef as d,createElement as f,Children as v,Component as p}from"react";import h from"../../../_virtual/index8.js";import m from"../../tiny-warning/dist/tiny-warning.esm.js";import y from"../../lodash-es/clone.js";import E from"../../lodash-es/toPath.js";import"../../../_virtual/hoist-non-react-statics.cjs.js";function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S.apply(this,arguments)}function T(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var _=l(void 0);_.displayName="FormikContext";var b=_.Provider;function A(){var e=c(_);return e||("production"!==process.env.NODE_ENV?m(!1,"Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component."):m(!1)),e}_.Consumer;var O=function(e){return Array.isArray(e)&&0===e.length},F=function(e){return"function"==typeof e},I=function(e){return null!==e&&"object"==typeof e},R=function(e){return String(Math.floor(Number(e)))===e},D=function(e){return"[object String]"===Object.prototype.toString.call(e)},V=function(e){return 0===v.count(e)},k=function(e){return I(e)&&F(e.then)};function w(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function N(e,t,r,n){void 0===n&&(n=0);for(var i=E(t);e&&n<i.length;)e=e[i[n++]];return n===i.length||e?void 0===e?r:e:r}function L(e,t,r){for(var n=y(e),i=n,a=0,o=E(t);a<o.length-1;a++){var u=o[a],l=N(e,o.slice(0,a+1));if(l&&(I(l)||Array.isArray(l)))i=i[u]=y(l);else{var c=o[a+1];i=i[u]=R(c)&&Number(c)>=0?[]:{}}}return(0===a?e:i)[o[a]]===r?e:(void 0===r?delete i[o[a]]:i[o[a]]=r,0===a&&void 0===r&&delete n[o[a]],n)}function P(e,t,r,n){void 0===r&&(r=new WeakMap),void 0===n&&(n={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],u=e[o];I(u)?r.get(u)||(r.set(u,!0),n[o]=Array.isArray(u)?[]:{},P(u,t,r,n[o])):n[o]=t}return n}var M={},C={};function U(t){var l=t.validateOnChange,c=void 0===l||l,s=t.validateOnBlur,d=void 0===s||s,f=t.validateOnMount,v=void 0!==f&&f,p=t.isInitialValid,y=t.enableReinitialize,E=void 0!==y&&y,g=t.onSubmit,_=T(t,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),b=S({validateOnChange:c,validateOnBlur:d,validateOnMount:v,onSubmit:g},_),A=n(b.initialValues),O=n(b.initialErrors||M),R=n(b.initialTouched||C),V=n(b.initialStatus),U=n(!1),G=n({});"production"!==process.env.NODE_ENV&&i((function(){void 0!==p&&("production"!==process.env.NODE_ENV?m(!1,"isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead."):m(!1))}),[]),i((function(){return U.current=!0,function(){U.current=!1}}),[]);var W=a(0)[1],Y=n({values:r(b.initialValues),errors:r(b.initialErrors)||M,touched:r(b.initialTouched)||C,status:r(b.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),z=Y.current,q=o((function(e){var t=Y.current;Y.current=function(e,t){switch(t.type){case"SET_VALUES":return S({},e,{values:t.payload});case"SET_TOUCHED":return S({},e,{touched:t.payload});case"SET_ERRORS":return h(e.errors,t.payload)?e:S({},e,{errors:t.payload});case"SET_STATUS":return S({},e,{status:t.payload});case"SET_ISSUBMITTING":return S({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return S({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return S({},e,{values:L(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return S({},e,{touched:L(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return S({},e,{errors:L(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return S({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return S({},e,{touched:P(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return S({},e,{isSubmitting:!1});default:return e}}(t,e),t!==Y.current&&W((function(e){return e+1}))}),[]),J=o((function(e,t){return new Promise((function(r,n){var i=b.validate(e,t);null==i?r(M):k(i)?i.then((function(e){r(e||M)}),(function(e){"production"!==process.env.NODE_ENV&&console.warn("Warning: An unhandled error was caught during validation in <Formik validate />",e),n(e)})):r(i)}))}),[b.validate]),Q=o((function(e,t){var r=b.validationSchema,n=F(r)?r(t):r,i=t&&n.validateAt?n.validateAt(t,e):x(e,n);return new Promise((function(e,t){i.then((function(){e(M)}),(function(r){"ValidationError"===r.name?e(B(r)):("production"!==process.env.NODE_ENV&&console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />",r),t(r))}))}))}),[b.validationSchema]),X=o((function(e,t){return new Promise((function(r){return r(G.current[e].validate(t))}))}),[]),Z=o((function(e){var t=Object.keys(G.current).filter((function(e){return F(G.current[e].validate)})),r=t.length>0?t.map((function(t){return X(t,N(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(r).then((function(e){return e.reduce((function(e,r,n){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===r||r&&(e=L(e,t[n],r)),e}),{})}))}),[X]),$=o((function(t){return Promise.all([Z(t),b.validationSchema?Q(t):{},b.validate?J(t):{}]).then((function(t){var r=t[0],n=t[1],i=t[2];return e.all([r,n,i],{arrayMerge:H})}))}),[b.validate,b.validationSchema,Z,J,Q]),ee=K((function(e){return void 0===e&&(e=z.values),q({type:"SET_ISVALIDATING",payload:!0}),$(e).then((function(e){return U.current&&(q({type:"SET_ISVALIDATING",payload:!1}),q({type:"SET_ERRORS",payload:e})),e}))}));i((function(){v&&!0===U.current&&h(A.current,b.initialValues)&&ee(A.current)}),[v,ee]);var te=o((function(e){var t=e&&e.values?e.values:A.current,r=e&&e.errors?e.errors:O.current?O.current:b.initialErrors||{},n=e&&e.touched?e.touched:R.current?R.current:b.initialTouched||{},i=e&&e.status?e.status:V.current?V.current:b.initialStatus;A.current=t,O.current=r,R.current=n,V.current=i;var a=function(){q({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:r,touched:n,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(b.onReset){var o=b.onReset(z.values,Te);k(o)?o.then(a):a()}else a()}),[b.initialErrors,b.initialStatus,b.initialTouched,b.onReset]);i((function(){!0!==U.current||h(A.current,b.initialValues)||E&&(A.current=b.initialValues,te(),v&&ee(A.current))}),[E,b.initialValues,te,v,ee]),i((function(){E&&!0===U.current&&!h(O.current,b.initialErrors)&&(O.current=b.initialErrors||M,q({type:"SET_ERRORS",payload:b.initialErrors||M}))}),[E,b.initialErrors]),i((function(){E&&!0===U.current&&!h(R.current,b.initialTouched)&&(R.current=b.initialTouched||C,q({type:"SET_TOUCHED",payload:b.initialTouched||C}))}),[E,b.initialTouched]),i((function(){E&&!0===U.current&&!h(V.current,b.initialStatus)&&(V.current=b.initialStatus,q({type:"SET_STATUS",payload:b.initialStatus}))}),[E,b.initialStatus,b.initialTouched]);var re=K((function(e){if(G.current[e]&&F(G.current[e].validate)){var t=N(z.values,e),r=G.current[e].validate(t);return k(r)?(q({type:"SET_ISVALIDATING",payload:!0}),r.then((function(e){return e})).then((function(t){q({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),q({type:"SET_ISVALIDATING",payload:!1})}))):(q({type:"SET_FIELD_ERROR",payload:{field:e,value:r}}),Promise.resolve(r))}return b.validationSchema?(q({type:"SET_ISVALIDATING",payload:!0}),Q(z.values,e).then((function(e){return e})).then((function(t){q({type:"SET_FIELD_ERROR",payload:{field:e,value:N(t,e)}}),q({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),ne=o((function(e,t){var r=t.validate;G.current[e]={validate:r}}),[]),ie=o((function(e){delete G.current[e]}),[]),ae=K((function(e,t){return q({type:"SET_TOUCHED",payload:e}),(void 0===t?d:t)?ee(z.values):Promise.resolve()})),oe=o((function(e){q({type:"SET_ERRORS",payload:e})}),[]),ue=K((function(e,t){var r=F(e)?e(z.values):e;return q({type:"SET_VALUES",payload:r}),(void 0===t?c:t)?ee(r):Promise.resolve()})),le=o((function(e,t){q({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),ce=K((function(e,t,r){return q({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?c:r)?ee(L(z.values,e,t)):Promise.resolve()})),se=o((function(e,t){var r,n=t,i=e;if(!D(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,o=a.type,u=a.name,l=a.id,c=a.value,s=a.checked,d=a.outerHTML,f=a.options,v=a.multiple;(n=t||(u||l))||"production"===process.env.NODE_ENV||j({htmlContent:d,documentationAnchorLink:"handlechange-e-reactchangeeventany--void",handlerName:"handleChange"}),i=/number|range/.test(o)?(r=parseFloat(c),isNaN(r)?"":r):/checkbox/.test(o)?function(e,t,r){if("boolean"==typeof e)return Boolean(t);var n=[],i=!1,a=-1;if(Array.isArray(e))n=e,i=(a=e.indexOf(r))>=0;else if(!r||"true"==r||"false"==r)return Boolean(t);if(t&&r&&!i)return n.concat(r);if(!i)return n;return n.slice(0,a).concat(n.slice(a+1))}(N(z.values,n),s,c):f&&v?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(f):c}n&&ce(n,i)}),[ce,z.values]),de=K((function(e){if(D(e))return function(t){return se(t,e)};se(e)})),fe=K((function(e,t,r){return void 0===t&&(t=!0),q({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===r?d:r)?ee(z.values):Promise.resolve()})),ve=o((function(e,t){e.persist&&e.persist();var r=e.target,n=r.name,i=r.id,a=r.outerHTML,o=t||(n||i);o||"production"===process.env.NODE_ENV||j({htmlContent:a,documentationAnchorLink:"handleblur-e-any--void",handlerName:"handleBlur"}),fe(o,!0)}),[fe]),pe=K((function(e){if(D(e))return function(t){return ve(t,e)};ve(e)})),he=o((function(e){F(e)?q({type:"SET_FORMIK_STATE",payload:e}):q({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),me=o((function(e){q({type:"SET_STATUS",payload:e})}),[]),ye=o((function(e){q({type:"SET_ISSUBMITTING",payload:e})}),[]),Ee=K((function(){return q({type:"SUBMIT_ATTEMPT"}),ee().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var r;try{if(void 0===(r=ge()))return}catch(e){throw e}return Promise.resolve(r).then((function(e){return U.current&&q({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(U.current)throw q({type:"SUBMIT_FAILURE"}),e}))}if(U.current&&(q({type:"SUBMIT_FAILURE"}),t))throw e}))})),Se=K((function(e){if(e&&e.preventDefault&&F(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&F(e.stopPropagation)&&e.stopPropagation(),"production"!==process.env.NODE_ENV&&"undefined"!=typeof document){var t=w();null!==t&&t instanceof HTMLButtonElement&&(t.attributes&&t.attributes.getNamedItem("type")||("production"!==process.env.NODE_ENV?m(!1,'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.'):m(!1)))}Ee().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),Te={resetForm:te,validateForm:ee,validateField:re,setErrors:oe,setFieldError:le,setFieldTouched:fe,setFieldValue:ce,setStatus:me,setSubmitting:ye,setTouched:ae,setValues:ue,setFormikState:he,submitForm:Ee},ge=K((function(){return g(z.values,Te)})),_e=K((function(e){e&&e.preventDefault&&F(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&F(e.stopPropagation)&&e.stopPropagation(),te()})),be=o((function(e){return{value:N(z.values,e),error:N(z.errors,e),touched:!!N(z.touched,e),initialValue:N(A.current,e),initialTouched:!!N(R.current,e),initialError:N(O.current,e)}}),[z.errors,z.touched,z.values]),Ae=o((function(e){return{setValue:function(t,r){return ce(e,t,r)},setTouched:function(t,r){return fe(e,t,r)},setError:function(t){return le(e,t)}}}),[ce,fe,le]),Oe=o((function(e){var t=I(e),r=t?e.name:e,n=N(z.values,r),i={name:r,value:n,onChange:de,onBlur:pe};if(t){var a=e.type,o=e.value,u=e.as,l=e.multiple;"checkbox"===a?void 0===o?i.checked=!!n:(i.checked=!(!Array.isArray(n)||!~n.indexOf(o)),i.value=o):"radio"===a?(i.checked=n===o,i.value=o):"select"===u&&l&&(i.value=i.value||[],i.multiple=!0)}return i}),[pe,de,z.values]),Fe=u((function(){return!h(A.current,z.values)}),[A.current,z.values]),Ie=u((function(){return void 0!==p?Fe?z.errors&&0===Object.keys(z.errors).length:!1!==p&&F(p)?p(b):p:z.errors&&0===Object.keys(z.errors).length}),[p,Fe,z.errors,b]);return S({},z,{initialValues:A.current,initialErrors:O.current,initialTouched:R.current,initialStatus:V.current,handleBlur:pe,handleChange:de,handleReset:_e,handleSubmit:Se,resetForm:te,setErrors:oe,setFormikState:he,setFieldTouched:fe,setFieldValue:ce,setFieldError:le,setStatus:me,setSubmitting:ye,setTouched:ae,setValues:ue,submitForm:Ee,validateForm:ee,validateField:re,isValid:Ie,dirty:Fe,unregisterField:ie,registerField:ne,getFieldProps:Oe,getFieldMeta:be,getFieldHelpers:Ae,validateOnBlur:d,validateOnChange:c,validateOnMount:v})}function j(e){var t=e.htmlContent,r=e.documentationAnchorLink,n=e.handlerName;console.warn("Warning: Formik called `"+n+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+t+"\n Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#"+r+"\n ")}function B(e){var t={};if(e.inner){if(0===e.inner.length)return L(t,e.path,e.message);var r=e.inner,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}var o=a;N(t,o.path)||(t=L(t,o.path,o.message))}}return t}function x(e,t,r,n){void 0===r&&(r=!1);var i=G(e);return t[r?"validateSync":"validate"](i,{abortEarly:!1,context:n||i})}function G(e){var r=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=String(n);!0===Array.isArray(e[i])?r[i]=e[i].map((function(e){return!0===Array.isArray(e)||t(e)?G(e):""!==e?e:void 0})):t(e[i])?r[i]=G(e[i]):r[i]=""!==e[i]?e[i]:void 0}return r}function H(t,r,n){var i=t.slice();return r.forEach((function(r,a){if(void 0===i[a]){var o=!1!==n.clone&&n.isMergeableObject(r);i[a]=o?e(Array.isArray(r)?[]:{},r,n):r}else n.isMergeableObject(r)?i[a]=e(t[a],r,n):-1===t.indexOf(r)&&i.push(r)})),i}var W="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s:i;function K(e){var t=n(e);return W((function(){t.current=e})),o((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.current.apply(void 0,r)}),[])}var Y=d((function(e,t){var r=e.action,n=T(e,["action"]),i=null!=r?r:"#",a=A(),o=a.handleReset,u=a.handleSubmit;return f("form",S({onSubmit:u,ref:t,onReset:o,action:i},n))}));Y.displayName="Form";var z=function(e,t,r){var n=X(e),i=n[t];return n.splice(t,1),n.splice(r,0,i),n},q=function(e,t,r){var n=X(e),i=n[t];return n[t]=n[r],n[r]=i,n},J=function(e,t,r){var n=X(e);return n.splice(t,0,r),n},Q=function(e,t,r){var n=X(e);return n[t]=r,n},X=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(S({},e,{length:t+1}))}return[]},Z=function(e,t){var r="function"==typeof e?e:t;return function(e){if(Array.isArray(e)||I(e)){var t=X(e);return r(t)}return e}};(function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,a=i.name;(0,i.formik.setFormikState)((function(n){var i=Z(r,e),o=Z(t,e),u=L(n.values,a,e(N(n.values,a))),l=r?i(N(n.errors,a)):void 0,c=t?o(N(n.touched,a)):void 0;return O(l)&&(l=void 0),O(c)&&(c=void 0),S({},n,{values:u,errors:r?L(n.errors,a,l):n.errors,touched:t?L(n.touched,a,c):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(X(t),[r(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(r){return q(r,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(r){return z(r,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(r){return J(r,e,t)}),(function(t){return J(t,e,null)}),(function(t){return J(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(r){return Q(r,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(r){var n=r?[e].concat(r):[e];return t=n.length,n}),(function(e){return e?[null].concat(e):[null]}),(function(e){return e?[null].concat(e):[null]})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(g(n)),n.pop=n.pop.bind(g(n)),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=i.prototype;return a.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!h(N(e.formik.values,e.name),N(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},a.remove=function(e){var t;return this.updateArrayField((function(r){var n=r?X(r):[];return t||(t=n[e]),F(n.splice)&&n.splice(e,1),F(n.every)&&n.every((function(e){return void 0===e}))?[]:n}),!0,!0),t},a.pop=function(){var e;return this.updateArrayField((function(t){var r=t.slice();return e||(e=r&&r.pop&&r.pop()),r}),!0,!0),e},a.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,r=t.component,n=t.render,i=t.children,a=t.name,o=S({},e,{form:T(t.formik,["validate","validationSchema"]),name:a});return r?f(r,o):n?n(o):i?"function"==typeof i?i(o):V(i)?null:v.only(i):null},i}(p)).defaultProps={validateOnChange:!0};export{Y as Form,_ as FormikContext,b as FormikProvider,w as getActiveElement,N as getIn,J as insert,O as isEmptyArray,V as isEmptyChildren,F as isFunction,R as isInteger,I as isObject,k as isPromise,D as isString,z as move,G as prepareDataForValidation,Q as replace,L as setIn,P as setNestedObjectValues,q as swap,U as useFormik,A as useFormikContext,x as validateYupSchema,B as yupToFormErrors};
1
+ import e from"../node_modules/deepmerge/dist/es.js";import t from"../../lodash-es/isPlainObject.js";import r from"../../lodash-es/cloneDeep.js";import{useRef as n,useEffect as i,useState as a,useCallback as o,useMemo as u,createContext as l,useContext as c,useLayoutEffect as s,forwardRef as d,createElement as f,Children as v,Component as p}from"react";import h from"../../../_virtual/index7.js";import m from"../../tiny-warning/dist/tiny-warning.esm.js";import y from"../../lodash-es/clone.js";import E from"../../lodash-es/toPath.js";import"../../../_virtual/hoist-non-react-statics.cjs.js";function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S.apply(this,arguments)}function T(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var _=l(void 0);_.displayName="FormikContext";var b=_.Provider;function A(){var e=c(_);return e||("production"!==process.env.NODE_ENV?m(!1,"Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component."):m(!1)),e}_.Consumer;var O=function(e){return Array.isArray(e)&&0===e.length},F=function(e){return"function"==typeof e},I=function(e){return null!==e&&"object"==typeof e},R=function(e){return String(Math.floor(Number(e)))===e},D=function(e){return"[object String]"===Object.prototype.toString.call(e)},V=function(e){return 0===v.count(e)},k=function(e){return I(e)&&F(e.then)};function w(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function N(e,t,r,n){void 0===n&&(n=0);for(var i=E(t);e&&n<i.length;)e=e[i[n++]];return n===i.length||e?void 0===e?r:e:r}function L(e,t,r){for(var n=y(e),i=n,a=0,o=E(t);a<o.length-1;a++){var u=o[a],l=N(e,o.slice(0,a+1));if(l&&(I(l)||Array.isArray(l)))i=i[u]=y(l);else{var c=o[a+1];i=i[u]=R(c)&&Number(c)>=0?[]:{}}}return(0===a?e:i)[o[a]]===r?e:(void 0===r?delete i[o[a]]:i[o[a]]=r,0===a&&void 0===r&&delete n[o[a]],n)}function P(e,t,r,n){void 0===r&&(r=new WeakMap),void 0===n&&(n={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],u=e[o];I(u)?r.get(u)||(r.set(u,!0),n[o]=Array.isArray(u)?[]:{},P(u,t,r,n[o])):n[o]=t}return n}var M={},C={};function U(t){var l=t.validateOnChange,c=void 0===l||l,s=t.validateOnBlur,d=void 0===s||s,f=t.validateOnMount,v=void 0!==f&&f,p=t.isInitialValid,y=t.enableReinitialize,E=void 0!==y&&y,g=t.onSubmit,_=T(t,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),b=S({validateOnChange:c,validateOnBlur:d,validateOnMount:v,onSubmit:g},_),A=n(b.initialValues),O=n(b.initialErrors||M),R=n(b.initialTouched||C),V=n(b.initialStatus),U=n(!1),G=n({});"production"!==process.env.NODE_ENV&&i((function(){void 0!==p&&("production"!==process.env.NODE_ENV?m(!1,"isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead."):m(!1))}),[]),i((function(){return U.current=!0,function(){U.current=!1}}),[]);var W=a(0)[1],Y=n({values:r(b.initialValues),errors:r(b.initialErrors)||M,touched:r(b.initialTouched)||C,status:r(b.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),z=Y.current,q=o((function(e){var t=Y.current;Y.current=function(e,t){switch(t.type){case"SET_VALUES":return S({},e,{values:t.payload});case"SET_TOUCHED":return S({},e,{touched:t.payload});case"SET_ERRORS":return h(e.errors,t.payload)?e:S({},e,{errors:t.payload});case"SET_STATUS":return S({},e,{status:t.payload});case"SET_ISSUBMITTING":return S({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return S({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return S({},e,{values:L(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return S({},e,{touched:L(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return S({},e,{errors:L(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return S({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return S({},e,{touched:P(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return S({},e,{isSubmitting:!1});default:return e}}(t,e),t!==Y.current&&W((function(e){return e+1}))}),[]),J=o((function(e,t){return new Promise((function(r,n){var i=b.validate(e,t);null==i?r(M):k(i)?i.then((function(e){r(e||M)}),(function(e){"production"!==process.env.NODE_ENV&&console.warn("Warning: An unhandled error was caught during validation in <Formik validate />",e),n(e)})):r(i)}))}),[b.validate]),Q=o((function(e,t){var r=b.validationSchema,n=F(r)?r(t):r,i=t&&n.validateAt?n.validateAt(t,e):x(e,n);return new Promise((function(e,t){i.then((function(){e(M)}),(function(r){"ValidationError"===r.name?e(B(r)):("production"!==process.env.NODE_ENV&&console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />",r),t(r))}))}))}),[b.validationSchema]),X=o((function(e,t){return new Promise((function(r){return r(G.current[e].validate(t))}))}),[]),Z=o((function(e){var t=Object.keys(G.current).filter((function(e){return F(G.current[e].validate)})),r=t.length>0?t.map((function(t){return X(t,N(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(r).then((function(e){return e.reduce((function(e,r,n){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===r||r&&(e=L(e,t[n],r)),e}),{})}))}),[X]),$=o((function(t){return Promise.all([Z(t),b.validationSchema?Q(t):{},b.validate?J(t):{}]).then((function(t){var r=t[0],n=t[1],i=t[2];return e.all([r,n,i],{arrayMerge:H})}))}),[b.validate,b.validationSchema,Z,J,Q]),ee=K((function(e){return void 0===e&&(e=z.values),q({type:"SET_ISVALIDATING",payload:!0}),$(e).then((function(e){return U.current&&(q({type:"SET_ISVALIDATING",payload:!1}),q({type:"SET_ERRORS",payload:e})),e}))}));i((function(){v&&!0===U.current&&h(A.current,b.initialValues)&&ee(A.current)}),[v,ee]);var te=o((function(e){var t=e&&e.values?e.values:A.current,r=e&&e.errors?e.errors:O.current?O.current:b.initialErrors||{},n=e&&e.touched?e.touched:R.current?R.current:b.initialTouched||{},i=e&&e.status?e.status:V.current?V.current:b.initialStatus;A.current=t,O.current=r,R.current=n,V.current=i;var a=function(){q({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:r,touched:n,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(b.onReset){var o=b.onReset(z.values,Te);k(o)?o.then(a):a()}else a()}),[b.initialErrors,b.initialStatus,b.initialTouched,b.onReset]);i((function(){!0!==U.current||h(A.current,b.initialValues)||E&&(A.current=b.initialValues,te(),v&&ee(A.current))}),[E,b.initialValues,te,v,ee]),i((function(){E&&!0===U.current&&!h(O.current,b.initialErrors)&&(O.current=b.initialErrors||M,q({type:"SET_ERRORS",payload:b.initialErrors||M}))}),[E,b.initialErrors]),i((function(){E&&!0===U.current&&!h(R.current,b.initialTouched)&&(R.current=b.initialTouched||C,q({type:"SET_TOUCHED",payload:b.initialTouched||C}))}),[E,b.initialTouched]),i((function(){E&&!0===U.current&&!h(V.current,b.initialStatus)&&(V.current=b.initialStatus,q({type:"SET_STATUS",payload:b.initialStatus}))}),[E,b.initialStatus,b.initialTouched]);var re=K((function(e){if(G.current[e]&&F(G.current[e].validate)){var t=N(z.values,e),r=G.current[e].validate(t);return k(r)?(q({type:"SET_ISVALIDATING",payload:!0}),r.then((function(e){return e})).then((function(t){q({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),q({type:"SET_ISVALIDATING",payload:!1})}))):(q({type:"SET_FIELD_ERROR",payload:{field:e,value:r}}),Promise.resolve(r))}return b.validationSchema?(q({type:"SET_ISVALIDATING",payload:!0}),Q(z.values,e).then((function(e){return e})).then((function(t){q({type:"SET_FIELD_ERROR",payload:{field:e,value:N(t,e)}}),q({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),ne=o((function(e,t){var r=t.validate;G.current[e]={validate:r}}),[]),ie=o((function(e){delete G.current[e]}),[]),ae=K((function(e,t){return q({type:"SET_TOUCHED",payload:e}),(void 0===t?d:t)?ee(z.values):Promise.resolve()})),oe=o((function(e){q({type:"SET_ERRORS",payload:e})}),[]),ue=K((function(e,t){var r=F(e)?e(z.values):e;return q({type:"SET_VALUES",payload:r}),(void 0===t?c:t)?ee(r):Promise.resolve()})),le=o((function(e,t){q({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),ce=K((function(e,t,r){return q({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?c:r)?ee(L(z.values,e,t)):Promise.resolve()})),se=o((function(e,t){var r,n=t,i=e;if(!D(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,o=a.type,u=a.name,l=a.id,c=a.value,s=a.checked,d=a.outerHTML,f=a.options,v=a.multiple;(n=t||(u||l))||"production"===process.env.NODE_ENV||j({htmlContent:d,documentationAnchorLink:"handlechange-e-reactchangeeventany--void",handlerName:"handleChange"}),i=/number|range/.test(o)?(r=parseFloat(c),isNaN(r)?"":r):/checkbox/.test(o)?function(e,t,r){if("boolean"==typeof e)return Boolean(t);var n=[],i=!1,a=-1;if(Array.isArray(e))n=e,i=(a=e.indexOf(r))>=0;else if(!r||"true"==r||"false"==r)return Boolean(t);if(t&&r&&!i)return n.concat(r);if(!i)return n;return n.slice(0,a).concat(n.slice(a+1))}(N(z.values,n),s,c):f&&v?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(f):c}n&&ce(n,i)}),[ce,z.values]),de=K((function(e){if(D(e))return function(t){return se(t,e)};se(e)})),fe=K((function(e,t,r){return void 0===t&&(t=!0),q({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===r?d:r)?ee(z.values):Promise.resolve()})),ve=o((function(e,t){e.persist&&e.persist();var r=e.target,n=r.name,i=r.id,a=r.outerHTML,o=t||(n||i);o||"production"===process.env.NODE_ENV||j({htmlContent:a,documentationAnchorLink:"handleblur-e-any--void",handlerName:"handleBlur"}),fe(o,!0)}),[fe]),pe=K((function(e){if(D(e))return function(t){return ve(t,e)};ve(e)})),he=o((function(e){F(e)?q({type:"SET_FORMIK_STATE",payload:e}):q({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),me=o((function(e){q({type:"SET_STATUS",payload:e})}),[]),ye=o((function(e){q({type:"SET_ISSUBMITTING",payload:e})}),[]),Ee=K((function(){return q({type:"SUBMIT_ATTEMPT"}),ee().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var r;try{if(void 0===(r=ge()))return}catch(e){throw e}return Promise.resolve(r).then((function(e){return U.current&&q({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(U.current)throw q({type:"SUBMIT_FAILURE"}),e}))}if(U.current&&(q({type:"SUBMIT_FAILURE"}),t))throw e}))})),Se=K((function(e){if(e&&e.preventDefault&&F(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&F(e.stopPropagation)&&e.stopPropagation(),"production"!==process.env.NODE_ENV&&"undefined"!=typeof document){var t=w();null!==t&&t instanceof HTMLButtonElement&&(t.attributes&&t.attributes.getNamedItem("type")||("production"!==process.env.NODE_ENV?m(!1,'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.'):m(!1)))}Ee().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),Te={resetForm:te,validateForm:ee,validateField:re,setErrors:oe,setFieldError:le,setFieldTouched:fe,setFieldValue:ce,setStatus:me,setSubmitting:ye,setTouched:ae,setValues:ue,setFormikState:he,submitForm:Ee},ge=K((function(){return g(z.values,Te)})),_e=K((function(e){e&&e.preventDefault&&F(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&F(e.stopPropagation)&&e.stopPropagation(),te()})),be=o((function(e){return{value:N(z.values,e),error:N(z.errors,e),touched:!!N(z.touched,e),initialValue:N(A.current,e),initialTouched:!!N(R.current,e),initialError:N(O.current,e)}}),[z.errors,z.touched,z.values]),Ae=o((function(e){return{setValue:function(t,r){return ce(e,t,r)},setTouched:function(t,r){return fe(e,t,r)},setError:function(t){return le(e,t)}}}),[ce,fe,le]),Oe=o((function(e){var t=I(e),r=t?e.name:e,n=N(z.values,r),i={name:r,value:n,onChange:de,onBlur:pe};if(t){var a=e.type,o=e.value,u=e.as,l=e.multiple;"checkbox"===a?void 0===o?i.checked=!!n:(i.checked=!(!Array.isArray(n)||!~n.indexOf(o)),i.value=o):"radio"===a?(i.checked=n===o,i.value=o):"select"===u&&l&&(i.value=i.value||[],i.multiple=!0)}return i}),[pe,de,z.values]),Fe=u((function(){return!h(A.current,z.values)}),[A.current,z.values]),Ie=u((function(){return void 0!==p?Fe?z.errors&&0===Object.keys(z.errors).length:!1!==p&&F(p)?p(b):p:z.errors&&0===Object.keys(z.errors).length}),[p,Fe,z.errors,b]);return S({},z,{initialValues:A.current,initialErrors:O.current,initialTouched:R.current,initialStatus:V.current,handleBlur:pe,handleChange:de,handleReset:_e,handleSubmit:Se,resetForm:te,setErrors:oe,setFormikState:he,setFieldTouched:fe,setFieldValue:ce,setFieldError:le,setStatus:me,setSubmitting:ye,setTouched:ae,setValues:ue,submitForm:Ee,validateForm:ee,validateField:re,isValid:Ie,dirty:Fe,unregisterField:ie,registerField:ne,getFieldProps:Oe,getFieldMeta:be,getFieldHelpers:Ae,validateOnBlur:d,validateOnChange:c,validateOnMount:v})}function j(e){var t=e.htmlContent,r=e.documentationAnchorLink,n=e.handlerName;console.warn("Warning: Formik called `"+n+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+t+"\n Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#"+r+"\n ")}function B(e){var t={};if(e.inner){if(0===e.inner.length)return L(t,e.path,e.message);var r=e.inner,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}var o=a;N(t,o.path)||(t=L(t,o.path,o.message))}}return t}function x(e,t,r,n){void 0===r&&(r=!1);var i=G(e);return t[r?"validateSync":"validate"](i,{abortEarly:!1,context:n||i})}function G(e){var r=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=String(n);!0===Array.isArray(e[i])?r[i]=e[i].map((function(e){return!0===Array.isArray(e)||t(e)?G(e):""!==e?e:void 0})):t(e[i])?r[i]=G(e[i]):r[i]=""!==e[i]?e[i]:void 0}return r}function H(t,r,n){var i=t.slice();return r.forEach((function(r,a){if(void 0===i[a]){var o=!1!==n.clone&&n.isMergeableObject(r);i[a]=o?e(Array.isArray(r)?[]:{},r,n):r}else n.isMergeableObject(r)?i[a]=e(t[a],r,n):-1===t.indexOf(r)&&i.push(r)})),i}var W="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s:i;function K(e){var t=n(e);return W((function(){t.current=e})),o((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.current.apply(void 0,r)}),[])}var Y=d((function(e,t){var r=e.action,n=T(e,["action"]),i=null!=r?r:"#",a=A(),o=a.handleReset,u=a.handleSubmit;return f("form",S({onSubmit:u,ref:t,onReset:o,action:i},n))}));Y.displayName="Form";var z=function(e,t,r){var n=X(e),i=n[t];return n.splice(t,1),n.splice(r,0,i),n},q=function(e,t,r){var n=X(e),i=n[t];return n[t]=n[r],n[r]=i,n},J=function(e,t,r){var n=X(e);return n.splice(t,0,r),n},Q=function(e,t,r){var n=X(e);return n[t]=r,n},X=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(S({},e,{length:t+1}))}return[]},Z=function(e,t){var r="function"==typeof e?e:t;return function(e){if(Array.isArray(e)||I(e)){var t=X(e);return r(t)}return e}};(function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,a=i.name;(0,i.formik.setFormikState)((function(n){var i=Z(r,e),o=Z(t,e),u=L(n.values,a,e(N(n.values,a))),l=r?i(N(n.errors,a)):void 0,c=t?o(N(n.touched,a)):void 0;return O(l)&&(l=void 0),O(c)&&(c=void 0),S({},n,{values:u,errors:r?L(n.errors,a,l):n.errors,touched:t?L(n.touched,a,c):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(X(t),[r(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(r){return q(r,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(r){return z(r,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(r){return J(r,e,t)}),(function(t){return J(t,e,null)}),(function(t){return J(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(r){return Q(r,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(r){var n=r?[e].concat(r):[e];return t=n.length,n}),(function(e){return e?[null].concat(e):[null]}),(function(e){return e?[null].concat(e):[null]})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(g(n)),n.pop=n.pop.bind(g(n)),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=i.prototype;return a.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!h(N(e.formik.values,e.name),N(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},a.remove=function(e){var t;return this.updateArrayField((function(r){var n=r?X(r):[];return t||(t=n[e]),F(n.splice)&&n.splice(e,1),F(n.every)&&n.every((function(e){return void 0===e}))?[]:n}),!0,!0),t},a.pop=function(){var e;return this.updateArrayField((function(t){var r=t.slice();return e||(e=r&&r.pop&&r.pop()),r}),!0,!0),e},a.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,r=t.component,n=t.render,i=t.children,a=t.name,o=S({},e,{form:T(t.formik,["validate","validationSchema"]),name:a});return r?f(r,o):n?n(o):i?"function"==typeof i?i(o):V(i)?null:v.only(i):null},i}(p)).defaultProps={validateOnChange:!0};export{Y as Form,_ as FormikContext,b as FormikProvider,w as getActiveElement,N as getIn,J as insert,O as isEmptyArray,V as isEmptyChildren,F as isFunction,R as isInteger,I as isObject,k as isPromise,D as isString,z as move,G as prepareDataForValidation,Q as replace,L as setIn,P as setNestedObjectValues,q as swap,U as useFormik,A as useFormikContext,x as validateYupSchema,B as yupToFormErrors};
2
2
  //# sourceMappingURL=formik.esm.js.map
@@ -1,2 +1,2 @@
1
- import{__exports as e}from"../../../_virtual/index12.js";import{__require as r}from"./server/html-to-dom.js";import{__require as t}from"./types.js";var o;function n(){return o||(o=1,function(o){var n=e&&e.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var n=Object.getOwnPropertyDescriptor(r,t);n&&!("get"in n?!r.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,n)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),i=e&&e.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||n(r,e,t)},u=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var a=r();Object.defineProperty(o,"default",{enumerable:!0,get:function(){return u(a).default}}),i(t(),o)}(e)),e}export{n as __require};
1
+ import{__exports as e}from"../../../_virtual/index11.js";import{__require as r}from"./server/html-to-dom.js";import{__require as t}from"./types.js";var o;function n(){return o||(o=1,function(o){var n=e&&e.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var n=Object.getOwnPropertyDescriptor(r,t);n&&!("get"in n?!r.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,n)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),i=e&&e.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||n(r,e,t)},u=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var a=r();Object.defineProperty(o,"default",{enumerable:!0,get:function(){return u(a).default}}),i(t(),o)}(e)),e}export{n as __require};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__exports as r}from"../../../../_virtual/html-to-dom.js";import{__require as e}from"../../../domhandler/lib/index.js";import{__require as t}from"../../../htmlparser2/dist/commonjs/index.js";import{__require as o}from"./utilities.js";var i;function n(){if(i)return r;i=1,Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(r,e){if("string"!=typeof r)throw new TypeError("First argument must be a string.");if(!r)return[];var t=new n.DomHandler(void 0,e);return new s.Parser(t,e).end(r),(0,a.unsetRootParent)(t.dom)};var n=e(),s=t(),a=o();return r}export{n as __require};
1
+ import{__exports as r}from"../../../../_virtual/html-to-dom.js";import{__require as e}from"../../node_modules/domhandler/lib/index.js";import{__require as t}from"../../../htmlparser2/dist/commonjs/index.js";import{__require as o}from"./utilities.js";var i;function n(){if(i)return r;i=1,Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(r,e){if("string"!=typeof r)throw new TypeError("First argument must be a string.");if(!r)return[];var t=new n.DomHandler(void 0,e);return new s.Parser(t,e).end(r),(0,m.unsetRootParent)(t.dom)};var n=e(),s=t(),m=o();return r}export{n as __require};
2
2
  //# sourceMappingURL=html-to-dom.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"html-to-dom.js","sources":["../../../../../node_modules/html-dom-parser/lib/server/html-to-dom.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = HTMLDOMParser;\nvar domhandler_1 = require(\"domhandler\");\nvar htmlparser2_1 = require(\"htmlparser2\");\nvar utilities_1 = require(\"./utilities\");\n/**\n * Parses HTML string to DOM nodes in Node.js.\n *\n * This is the same method as `require('htmlparser2').parseDOM`\n *\n * @see https://github.com/fb55/htmlparser2/blob/v9.0.0/src/index.ts#L44-L46\n * @see https://github.com/fb55/domhandler/tree/v5.0.3#readme\n *\n * @param html - HTML markup.\n * @param options - Parser options.\n * @returns - DOM nodes.\n */\nfunction HTMLDOMParser(html, options) {\n if (typeof html !== 'string') {\n throw new TypeError('First argument must be a string.');\n }\n if (!html) {\n return [];\n }\n var handler = new domhandler_1.DomHandler(undefined, options);\n new htmlparser2_1.Parser(handler, options).end(html);\n return (0, utilities_1.unsetRootParent)(handler.dom);\n}\n//# sourceMappingURL=html-to-dom.js.map"],"names":["Object","defineProperty","htmlToDom","value","default","html","options","TypeError","handler","domhandler_1","DomHandler","undefined","htmlparser2_1","Parser","end","utilities_1","unsetRootParent","dom","require$$0","require$$1","require$$2"],"mappings":"qRACAA,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,IACtDD,EAAAE,QAgBA,SAAuBC,EAAMC,GACzB,GAAoB,iBAATD,EACP,MAAM,IAAIE,UAAU,oCAExB,IAAKF,EACD,MAAO,GAEX,IAAIG,EAAU,IAAIC,EAAaC,gBAAWC,EAAWL,GAErD,OADA,IAAIM,EAAcC,OAAOL,EAASF,GAASQ,IAAIT,IACxC,EAAIU,EAAYC,iBAAiBR,EAAQS,IACpD,EAzBA,IAAIR,EAAoCS,IACpCN,EAAsCO,IACtCJ,EAAcK"}
1
+ {"version":3,"file":"html-to-dom.js","sources":["../../../../../node_modules/html-dom-parser/lib/server/html-to-dom.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = HTMLDOMParser;\nvar domhandler_1 = require(\"domhandler\");\nvar htmlparser2_1 = require(\"htmlparser2\");\nvar utilities_1 = require(\"./utilities\");\n/**\n * Parses HTML string to DOM nodes in Node.js.\n *\n * This is the same method as `require('htmlparser2').parseDOM`\n *\n * @see https://github.com/fb55/htmlparser2/blob/v9.0.0/src/index.ts#L44-L46\n * @see https://github.com/fb55/domhandler/tree/v5.0.3#readme\n *\n * @param html - HTML markup.\n * @param options - Parser options.\n * @returns - DOM nodes.\n */\nfunction HTMLDOMParser(html, options) {\n if (typeof html !== 'string') {\n throw new TypeError('First argument must be a string.');\n }\n if (!html) {\n return [];\n }\n var handler = new domhandler_1.DomHandler(undefined, options);\n new htmlparser2_1.Parser(handler, options).end(html);\n return (0, utilities_1.unsetRootParent)(handler.dom);\n}\n//# sourceMappingURL=html-to-dom.js.map"],"names":["Object","defineProperty","htmlToDom","value","default","html","options","TypeError","handler","domhandler_1","DomHandler","undefined","htmlparser2_1","Parser","end","utilities_1","unsetRootParent","dom","require$$0","require$$1","require$$2"],"mappings":"+RACAA,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,IACtDD,EAAAE,QAgBA,SAAuBC,EAAMC,GACzB,GAAoB,iBAATD,EACP,MAAM,IAAIE,UAAU,oCAExB,IAAKF,EACD,MAAO,GAEX,IAAIG,EAAU,IAAIC,EAAaC,gBAAWC,EAAWL,GAErD,OADA,IAAIM,EAAcC,OAAOL,EAASF,GAASQ,IAAIT,IACxC,EAAIU,EAAYC,iBAAiBR,EAAQS,IACpD,EAzBA,IAAIR,EAAoCS,IACpCN,EAAsCO,IACtCJ,EAAcK"}
@@ -0,0 +1,2 @@
1
+ import{__exports as t}from"../../../../../_virtual/index15.js";import{__require as e}from"../../../../domelementtype/lib/index.js";import{__require as n}from"./node.js";var o;function i(){return o||(o=1,function(o){var i=t&&t.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),s=t&&t.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(o,"__esModule",{value:!0}),o.DomHandler=void 0;var r=e(),a=n();s(n(),o);var d={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function t(t,e,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof e&&(n=e,e=d),"object"==typeof t&&(e=t,t=void 0),this.callback=null!=t?t:null,this.options=null!=e?e:d,this.elementCB=null!=n?n:null}return t.prototype.onparserinit=function(t){this.parser=t},t.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},t.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},t.prototype.onerror=function(t){this.handleCallback(t)},t.prototype.onclosetag=function(){this.lastNode=null;var t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)},t.prototype.onopentag=function(t,e){var n=this.options.xmlMode?r.ElementType.Tag:void 0,o=new a.Element(t,e,void 0,n);this.addNode(o),this.tagStack.push(o)},t.prototype.ontext=function(t){var e=this.lastNode;if(e&&e.type===r.ElementType.Text)e.data+=t,this.options.withEndIndices&&(e.endIndex=this.parser.endIndex);else{var n=new a.Text(t);this.addNode(n),this.lastNode=n}},t.prototype.oncomment=function(t){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment)this.lastNode.data+=t;else{var e=new a.Comment(t);this.addNode(e),this.lastNode=e}},t.prototype.oncommentend=function(){this.lastNode=null},t.prototype.oncdatastart=function(){var t=new a.Text(""),e=new a.CDATA([t]);this.addNode(e),t.parent=e,this.lastNode=t},t.prototype.oncdataend=function(){this.lastNode=null},t.prototype.onprocessinginstruction=function(t,e){var n=new a.ProcessingInstruction(t,e);this.addNode(n)},t.prototype.handleCallback=function(t){if("function"==typeof this.callback)this.callback(t,this.dom);else if(t)throw t},t.prototype.addNode=function(t){var e=this.tagStack[this.tagStack.length-1],n=e.children[e.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),e.children.push(t),n&&(t.prev=n,n.next=t),t.parent=e,this.lastNode=null},t}();o.DomHandler=l,o.default=l}(t)),t}export{i as __require};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../node_modules/html-dom-parser/node_modules/domhandler/lib/index.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DomHandler = void 0;\nvar domelementtype_1 = require(\"domelementtype\");\nvar node_js_1 = require(\"./node.js\");\n__exportStar(require(\"./node.js\"), exports);\n// Default options\nvar defaultOpts = {\n withStartIndices: false,\n withEndIndices: false,\n xmlMode: false,\n};\nvar DomHandler = /** @class */ (function () {\n /**\n * @param callback Called once parsing has completed.\n * @param options Settings for the handler.\n * @param elementCB Callback whenever a tag is closed.\n */\n function DomHandler(callback, options, elementCB) {\n /** The elements of the DOM */\n this.dom = [];\n /** The root element for the DOM */\n this.root = new node_js_1.Document(this.dom);\n /** Indicated whether parsing has been completed. */\n this.done = false;\n /** Stack of open tags. */\n this.tagStack = [this.root];\n /** A data node that is still being written to. */\n this.lastNode = null;\n /** Reference to the parser instance. Used for location information. */\n this.parser = null;\n // Make it possible to skip arguments, for backwards-compatibility\n if (typeof options === \"function\") {\n elementCB = options;\n options = defaultOpts;\n }\n if (typeof callback === \"object\") {\n options = callback;\n callback = undefined;\n }\n this.callback = callback !== null && callback !== void 0 ? callback : null;\n this.options = options !== null && options !== void 0 ? options : defaultOpts;\n this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;\n }\n DomHandler.prototype.onparserinit = function (parser) {\n this.parser = parser;\n };\n // Resets the handler back to starting state\n DomHandler.prototype.onreset = function () {\n this.dom = [];\n this.root = new node_js_1.Document(this.dom);\n this.done = false;\n this.tagStack = [this.root];\n this.lastNode = null;\n this.parser = null;\n };\n // Signals the handler that parsing is done\n DomHandler.prototype.onend = function () {\n if (this.done)\n return;\n this.done = true;\n this.parser = null;\n this.handleCallback(null);\n };\n DomHandler.prototype.onerror = function (error) {\n this.handleCallback(error);\n };\n DomHandler.prototype.onclosetag = function () {\n this.lastNode = null;\n var elem = this.tagStack.pop();\n if (this.options.withEndIndices) {\n elem.endIndex = this.parser.endIndex;\n }\n if (this.elementCB)\n this.elementCB(elem);\n };\n DomHandler.prototype.onopentag = function (name, attribs) {\n var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : undefined;\n var element = new node_js_1.Element(name, attribs, undefined, type);\n this.addNode(element);\n this.tagStack.push(element);\n };\n DomHandler.prototype.ontext = function (data) {\n var lastNode = this.lastNode;\n if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) {\n lastNode.data += data;\n if (this.options.withEndIndices) {\n lastNode.endIndex = this.parser.endIndex;\n }\n }\n else {\n var node = new node_js_1.Text(data);\n this.addNode(node);\n this.lastNode = node;\n }\n };\n DomHandler.prototype.oncomment = function (data) {\n if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) {\n this.lastNode.data += data;\n return;\n }\n var node = new node_js_1.Comment(data);\n this.addNode(node);\n this.lastNode = node;\n };\n DomHandler.prototype.oncommentend = function () {\n this.lastNode = null;\n };\n DomHandler.prototype.oncdatastart = function () {\n var text = new node_js_1.Text(\"\");\n var node = new node_js_1.CDATA([text]);\n this.addNode(node);\n text.parent = node;\n this.lastNode = text;\n };\n DomHandler.prototype.oncdataend = function () {\n this.lastNode = null;\n };\n DomHandler.prototype.onprocessinginstruction = function (name, data) {\n var node = new node_js_1.ProcessingInstruction(name, data);\n this.addNode(node);\n };\n DomHandler.prototype.handleCallback = function (error) {\n if (typeof this.callback === \"function\") {\n this.callback(error, this.dom);\n }\n else if (error) {\n throw error;\n }\n };\n DomHandler.prototype.addNode = function (node) {\n var parent = this.tagStack[this.tagStack.length - 1];\n var previousSibling = parent.children[parent.children.length - 1];\n if (this.options.withStartIndices) {\n node.startIndex = this.parser.startIndex;\n }\n if (this.options.withEndIndices) {\n node.endIndex = this.parser.endIndex;\n }\n parent.children.push(node);\n if (previousSibling) {\n node.prev = previousSibling;\n previousSibling.next = node;\n }\n node.parent = parent;\n this.lastNode = null;\n };\n return DomHandler;\n}());\nexports.DomHandler = DomHandler;\nexports.default = DomHandler;\n"],"names":["__createBinding","this","Object","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__exportStar","exports","p","prototype","hasOwnProperty","call","value","DomHandler","domelementtype_1","require$$0","node_js_1","require$$1","defaultOpts","withStartIndices","withEndIndices","xmlMode","callback","options","elementCB","dom","root","Document","done","tagStack","lastNode","parser","onparserinit","onreset","onend","handleCallback","onerror","error","onclosetag","elem","pop","endIndex","onopentag","name","attribs","type","ElementType","Tag","element","Element","addNode","push","ontext","data","Text","node","oncomment","Comment","oncommentend","oncdatastart","text","CDATA","parent","oncdataend","onprocessinginstruction","ProcessingInstruction","length","previousSibling","children","startIndex","prev","next","default"],"mappings":"uNACA,IAAIA,EAAmBC,GAAQA,EAAKD,kBAAqBE,OAAOC,OAAM,SAAaC,EAAGC,EAAGC,EAAGC,QAC7EC,IAAPD,IAAkBA,EAAKD,GAC3B,IAAIG,EAAOP,OAAOQ,yBAAyBL,EAAGC,GACzCG,KAAS,QAASA,GAAQJ,EAAEM,WAAaF,EAAKG,UAAYH,EAAKI,gBAClEJ,EAAO,CAAEK,YAAY,EAAMC,IAAK,WAAa,OAAOV,EAAEC,EAAG,IAE3DJ,OAAOc,eAAeZ,EAAGG,EAAIE,EAChC,EAAA,SAAcL,EAAGC,EAAGC,EAAGC,QACTC,IAAPD,IAAkBA,EAAKD,GAC3BF,EAAEG,GAAMF,EAAEC,EACb,GACGW,EAAgBhB,GAAQA,EAAKgB,cAAiB,SAASZ,EAAGa,GAC1D,IAAK,IAAIC,KAAKd,EAAa,YAANc,GAAoBjB,OAAOkB,UAAUC,eAAeC,KAAKJ,EAASC,IAAInB,EAAgBkB,EAASb,EAAGc,IAE3HjB,OAAOc,eAAcE,EAAU,aAAc,CAAEK,OAAO,IACtDL,EAAAM,gBAAqB,EACrB,IAAIC,EAA4CC,IAC5CC,EAAgCC,IACpCX,EAAaW,IAAsBV,GAEnC,IAAIW,EAAc,CACdC,kBAAkB,EAClBC,gBAAgB,EAChBC,SAAS,GAETR,EAA4B,WAM5B,SAASA,EAAWS,EAAUC,EAASC,GAEnClC,KAAKmC,IAAM,GAEXnC,KAAKoC,KAAO,IAAIV,EAAUW,SAASrC,KAAKmC,KAExCnC,KAAKsC,MAAO,EAEZtC,KAAKuC,SAAW,CAACvC,KAAKoC,MAEtBpC,KAAKwC,SAAW,KAEhBxC,KAAKyC,OAAS,KAES,mBAAZR,IACPC,EAAYD,EACZA,EAAUL,GAEU,i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EAAOM,SAASjB,KAAKI,GACjBY,IACAZ,EAAKe,KAAOH,EACZA,EAAgBI,KAAOhB,GAE3BA,EAAKO,OAASA,EACdxE,KAAKwC,SAAW,MAEbjB,CACV,CAxIa,GAyIdN,EAAAM,WAAqBA,EACrBN,EAAAiE,QAAkB3D"}
@@ -0,0 +1,2 @@
1
+ import{__exports as e}from"../../../../../_virtual/node2.js";import{__require as t}from"../../../../domelementtype/lib/index.js";var n;function r(){if(n)return e;n=1;var r,i=e&&e.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=e&&e.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.cloneNode=e.hasChildren=e.isDocument=e.isDirective=e.isComment=e.isText=e.isCDATA=e.isTag=e.Element=e.Document=e.CDATA=e.NodeWithChildren=e.ProcessingInstruction=e.Comment=e.Text=e.DataNode=e.Node=void 0;var u=t(),a=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),O(this,e)},e}();e.Node=a;var c=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(a);e.DataNode=c;var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=u.ElementType.Text,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(c);e.Text=l;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=u.ElementType.Comment,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(c);e.Comment=p;var s=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=u.ElementType.Directive,r}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(c);e.ProcessingInstruction=s;var f=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);e.NodeWithChildren=f;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=u.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);e.CDATA=d;var y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=u.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);e.Document=y;var m=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?u.ElementType.Script:"style"===t?u.ElementType.Style:u.ElementType.Tag);var o=e.call(this,r)||this;return o.name=t,o.attribs=n,o.type=i,o}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function h(e){return(0,u.isTag)(e)}function b(e){return e.type===u.ElementType.CDATA}function v(e){return e.type===u.ElementType.Text}function g(e){return e.type===u.ElementType.Comment}function x(e){return e.type===u.ElementType.Directive}function T(e){return e.type===u.ElementType.Root}function O(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new l(e.data);else if(g(e))n=new p(e.data);else if(h(e)){var r=t?P(e.children):[],i=new m(e.name,o({},e.attribs),r);r.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),n=i}else if(b(e)){r=t?P(e.children):[];var u=new d(r);r.forEach((function(e){return e.parent=u})),n=u}else if(T(e)){r=t?P(e.children):[];var a=new y(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!x(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new s(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),n=c}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function P(e){for(var t=e.map((function(e){return O(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}return e.Element=m,e.isTag=h,e.isCDATA=b,e.isText=v,e.isComment=g,e.isDirective=x,e.isDocument=T,e.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},e.cloneNode=O,e}export{r as __require};
2
+ //# sourceMappingURL=node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sources":["../../../../../../node_modules/html-dom-parser/node_modules/domhandler/lib/node.js"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.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;\nvar domelementtype_1 = require(\"domelementtype\");\n/**\n * This object will be used as the prototype for Nodes when creating a\n * DOM-Level-1-compliant structure.\n */\nvar Node = /** @class */ (function () {\n function Node() {\n /** Parent of the node */\n this.parent = null;\n /** Previous sibling */\n this.prev = null;\n /** Next sibling */\n this.next = null;\n /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */\n this.startIndex = null;\n /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */\n this.endIndex = null;\n }\n Object.defineProperty(Node.prototype, \"parentNode\", {\n // Read-write aliases for properties\n /**\n * Same as {@link parent}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.parent;\n },\n set: function (parent) {\n this.parent = parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"previousSibling\", {\n /**\n * Same as {@link prev}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.prev;\n },\n set: function (prev) {\n this.prev = prev;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"nextSibling\", {\n /**\n * Same as {@link next}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.next;\n },\n set: function (next) {\n this.next = next;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Clone this node, and optionally its children.\n *\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\n Node.prototype.cloneNode = function (recursive) {\n if (recursive === void 0) { recursive = false; }\n return cloneNode(this, recursive);\n };\n return Node;\n}());\nexports.Node = Node;\n/**\n * A node that contains some data.\n */\nvar DataNode = /** @class */ (function (_super) {\n __extends(DataNode, _super);\n /**\n * @param data The content of the data node\n */\n function DataNode(data) {\n var _this = _super.call(this) || this;\n _this.data = data;\n return _this;\n }\n Object.defineProperty(DataNode.prototype, \"nodeValue\", {\n /**\n * Same as {@link data}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.data;\n },\n set: function (data) {\n this.data = data;\n },\n enumerable: false,\n configurable: true\n });\n return DataNode;\n}(Node));\nexports.DataNode = DataNode;\n/**\n * Text within the document.\n */\nvar Text = /** @class */ (function (_super) {\n __extends(Text, _super);\n function Text() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = domelementtype_1.ElementType.Text;\n return _this;\n }\n Object.defineProperty(Text.prototype, \"nodeType\", {\n get: function () {\n return 3;\n },\n enumerable: false,\n configurable: true\n });\n return Text;\n}(DataNode));\nexports.Text = Text;\n/**\n * Comments within the document.\n */\nvar Comment = /** @class */ (function (_super) {\n __extends(Comment, _super);\n function Comment() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = domelementtype_1.ElementType.Comment;\n return _this;\n }\n Object.defineProperty(Comment.prototype, \"nodeType\", {\n get: function () {\n return 8;\n },\n enumerable: false,\n configurable: true\n });\n return Comment;\n}(DataNode));\nexports.Comment = Comment;\n/**\n * Processing instructions, including doc types.\n */\nvar ProcessingInstruction = /** @class */ (function (_super) {\n __extends(ProcessingInstruction, _super);\n function ProcessingInstruction(name, data) {\n var _this = _super.call(this, data) || this;\n _this.name = name;\n _this.type = domelementtype_1.ElementType.Directive;\n return _this;\n }\n Object.defineProperty(ProcessingInstruction.prototype, \"nodeType\", {\n get: function () {\n return 1;\n },\n enumerable: false,\n configurable: true\n });\n return ProcessingInstruction;\n}(DataNode));\nexports.ProcessingInstruction = ProcessingInstruction;\n/**\n * A `Node` that can have children.\n */\nvar NodeWithChildren = /** @class */ (function (_super) {\n __extends(NodeWithChildren, _super);\n /**\n * @param children Children of the node. Only certain node types can have children.\n */\n function NodeWithChildren(children) {\n var _this = _super.call(this) || this;\n _this.children = children;\n return _this;\n }\n Object.defineProperty(NodeWithChildren.prototype, \"firstChild\", {\n // Aliases\n /** First child of the node. */\n get: function () {\n var _a;\n return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(NodeWithChildren.prototype, \"lastChild\", {\n /** Last child of the node. */\n get: function () {\n return this.children.length > 0\n ? this.children[this.children.length - 1]\n : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(NodeWithChildren.prototype, \"childNodes\", {\n /**\n * Same as {@link children}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.children;\n },\n set: function (children) {\n this.children = children;\n },\n enumerable: false,\n configurable: true\n });\n return NodeWithChildren;\n}(Node));\nexports.NodeWithChildren = NodeWithChildren;\nvar CDATA = /** @class */ (function (_super) {\n __extends(CDATA, _super);\n function CDATA() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = domelementtype_1.ElementType.CDATA;\n return _this;\n }\n Object.defineProperty(CDATA.prototype, \"nodeType\", {\n get: function () {\n return 4;\n },\n enumerable: false,\n configurable: true\n });\n return CDATA;\n}(NodeWithChildren));\nexports.CDATA = CDATA;\n/**\n * The root node of the document.\n */\nvar Document = /** @class */ (function (_super) {\n __extends(Document, _super);\n function Document() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = domelementtype_1.ElementType.Root;\n return _this;\n }\n Object.defineProperty(Document.prototype, \"nodeType\", {\n get: function () {\n return 9;\n },\n enumerable: false,\n configurable: true\n });\n return Document;\n}(NodeWithChildren));\nexports.Document = Document;\n/**\n * An element within the DOM.\n */\nvar Element = /** @class */ (function (_super) {\n __extends(Element, _super);\n /**\n * @param name Name of the tag, eg. `div`, `span`.\n * @param attribs Object mapping attribute names to attribute values.\n * @param children Children of the node.\n */\n function Element(name, attribs, children, type) {\n if (children === void 0) { children = []; }\n if (type === void 0) { type = name === \"script\"\n ? domelementtype_1.ElementType.Script\n : name === \"style\"\n ? domelementtype_1.ElementType.Style\n : domelementtype_1.ElementType.Tag; }\n var _this = _super.call(this, children) || this;\n _this.name = name;\n _this.attribs = attribs;\n _this.type = type;\n return _this;\n }\n Object.defineProperty(Element.prototype, \"nodeType\", {\n get: function () {\n return 1;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Element.prototype, \"tagName\", {\n // DOM Level 1 aliases\n /**\n * Same as {@link name}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.name;\n },\n set: function (name) {\n this.name = name;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Element.prototype, \"attributes\", {\n get: function () {\n var _this = this;\n return Object.keys(this.attribs).map(function (name) {\n var _a, _b;\n return ({\n name: name,\n value: _this.attribs[name],\n namespace: (_a = _this[\"x-attribsNamespace\"]) === null || _a === void 0 ? void 0 : _a[name],\n prefix: (_b = _this[\"x-attribsPrefix\"]) === null || _b === void 0 ? void 0 : _b[name],\n });\n });\n },\n enumerable: false,\n configurable: true\n });\n return Element;\n}(NodeWithChildren));\nexports.Element = Element;\n/**\n * @param node Node to check.\n * @returns `true` if the node is a `Element`, `false` otherwise.\n */\nfunction isTag(node) {\n return (0, domelementtype_1.isTag)(node);\n}\nexports.isTag = isTag;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `CDATA`, `false` otherwise.\n */\nfunction isCDATA(node) {\n return node.type === domelementtype_1.ElementType.CDATA;\n}\nexports.isCDATA = isCDATA;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `Text`, `false` otherwise.\n */\nfunction isText(node) {\n return node.type === domelementtype_1.ElementType.Text;\n}\nexports.isText = isText;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `Comment`, `false` otherwise.\n */\nfunction isComment(node) {\n return node.type === domelementtype_1.ElementType.Comment;\n}\nexports.isComment = isComment;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n */\nfunction isDirective(node) {\n return node.type === domelementtype_1.ElementType.Directive;\n}\nexports.isDirective = isDirective;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n */\nfunction isDocument(node) {\n return node.type === domelementtype_1.ElementType.Root;\n}\nexports.isDocument = isDocument;\n/**\n * @param node Node to check.\n * @returns `true` if the node has children, `false` otherwise.\n */\nfunction hasChildren(node) {\n return Object.prototype.hasOwnProperty.call(node, \"children\");\n}\nexports.hasChildren = hasChildren;\n/**\n * Clone a node, and optionally its children.\n *\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\nfunction cloneNode(node, recursive) {\n if (recursive === void 0) { recursive = false; }\n var result;\n if (isText(node)) {\n result = new Text(node.data);\n }\n else if (isComment(node)) {\n result = new Comment(node.data);\n }\n else if (isTag(node)) {\n var children = recursive ? cloneChildren(node.children) : [];\n var clone_1 = new Element(node.name, __assign({}, node.attribs), children);\n children.forEach(function (child) { return (child.parent = clone_1); });\n if (node.namespace != null) {\n clone_1.namespace = node.namespace;\n }\n if (node[\"x-attribsNamespace\"]) {\n clone_1[\"x-attribsNamespace\"] = __assign({}, node[\"x-attribsNamespace\"]);\n }\n if (node[\"x-attribsPrefix\"]) {\n clone_1[\"x-attribsPrefix\"] = __assign({}, node[\"x-attribsPrefix\"]);\n }\n result = clone_1;\n }\n else if (isCDATA(node)) {\n var children = recursive ? cloneChildren(node.children) : [];\n var clone_2 = new CDATA(children);\n children.forEach(function (child) { return (child.parent = clone_2); });\n result = clone_2;\n }\n else if (isDocument(node)) {\n var children = recursive ? cloneChildren(node.children) : [];\n var clone_3 = new Document(children);\n children.forEach(function (child) { return (child.parent = clone_3); });\n if (node[\"x-mode\"]) {\n clone_3[\"x-mode\"] = node[\"x-mode\"];\n }\n result = clone_3;\n }\n else if (isDirective(node)) {\n var instruction = new ProcessingInstruction(node.name, node.data);\n if (node[\"x-name\"] != null) {\n instruction[\"x-name\"] = node[\"x-name\"];\n instruction[\"x-publicId\"] = node[\"x-publicId\"];\n instruction[\"x-systemId\"] = node[\"x-systemId\"];\n }\n result = instruction;\n }\n else {\n throw new Error(\"Not implemented yet: \".concat(node.type));\n }\n result.startIndex = node.startIndex;\n result.endIndex = node.endIndex;\n if (node.sourceCodeLocation != null) {\n result.sourceCodeLocation = node.sourceCodeLocation;\n }\n return result;\n}\nexports.cloneNode = cloneNode;\nfunction cloneChildren(childs) {\n var children = childs.map(function (child) { return cloneNode(child, true); });\n for (var i = 1; i < children.length; i++) {\n children[i].prev = children[i - 1];\n children[i - 1].next = children[i];\n }\n return children;\n}\n"],"names":["extendStatics","__extends","this","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","defineProperty","node","value","cloneNode","hasChildren","isDocument","isDirective","isComment","isCDATA","isTag","Element","Document","CDATA","NodeWithChildren","Comment","Text","DataNode","Node","domelementtype_1","require$$0","parent","prev","next","startIndex","endIndex","get","set","enumerable","configurable","recursive","_super","data","_this","type","ElementType","ProcessingInstruction","name","Directive","children","_a","Root","attribs","Script","Style","Tag","keys","map","_b","namespace","prefix","isText","result","cloneChildren","clone_1","forEach","child","clone_2","clone_3","Error","concat","instruction","sourceCodeLocation","childs"],"mappings":"sKACA,IACQA,EADJC,EAAaC,GAAQA,EAAKD,YACtBD,EAAgB,SAAUG,EAAGC,GAI7B,OAHAJ,EAAgBK,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,CAAE,GACzE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOC,OAAOK,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,KACzFT,EAAcG,EAAGC,IAErB,SAAUD,EAAGC,GAChB,GAAiB,mBAANA,GAA0B,OAANA,EAC3B,MAAM,IAAIS,UAAU,uBAAyBC,OAAOV,GAAK,iCAE7D,SAASW,IAAOb,KAAKc,YAAcb,CAAE,CADrCH,EAAcG,EAAGC,GAEjBD,EAAEO,UAAkB,OAANN,EAAaC,OAAOY,OAAOb,IAAMW,EAAGL,UAAYN,EAAEM,UAAW,IAAIK,KAGnFG,EAAYhB,GAAQA,EAAKgB,UAAa,WAStC,OARAA,EAAWb,OAAOc,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IA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,MAAgBA,EAQhBR,EAAAO,QAAkBA,EAQlBP,EAAAiD,OAAiBA,EAQjBjD,EAAAM,UAAoBA,EAQpBN,EAAAK,YAAsBA,EAQtBL,EAAAI,WAAqBA,EAQrBJ,EAAAG,YAHA,SAAqBH,GACjB,OAAOvB,OAAOK,UAAUC,eAAeC,KAAKgB,EAAM,WACtD,EAkEAA,EAAAE,UAAoBA"}
@@ -1,2 +1,2 @@
1
- import a from"../../../_virtual/index10.js";var r=a.default||a;export{r as default};
1
+ import a from"../../../_virtual/index9.js";var r=a.default||a;export{r as default};
2
2
  //# sourceMappingURL=index.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs.js","sources":["../../../../node_modules/html-react-parser/esm/index.mjs"],"sourcesContent":["import HTMLReactParser from '../lib/index.js';\n\nexport {\n attributesToProps,\n Comment,\n domToReact,\n Element,\n htmlToDOM,\n ProcessingInstruction,\n Text,\n} from '../lib/index.js';\n\nexport default HTMLReactParser.default || HTMLReactParser;\n"],"names":["parse","HTMLReactParser","default"],"mappings":"4CAYA,IAAAA,EAAeC,EAAgBC,SAAWD"}
1
+ {"version":3,"file":"index.mjs.js","sources":["../../../../node_modules/html-react-parser/esm/index.mjs"],"sourcesContent":["import HTMLReactParser from '../lib/index.js';\n\nexport {\n attributesToProps,\n Comment,\n domToReact,\n Element,\n htmlToDOM,\n ProcessingInstruction,\n Text,\n} from '../lib/index.js';\n\nexport default HTMLReactParser.default || HTMLReactParser;\n"],"names":["parse","HTMLReactParser","default"],"mappings":"2CAYA,IAAAA,EAAeC,EAAgBC,SAAWD"}
@@ -1,2 +1,2 @@
1
- import{__exports as e}from"../../../_virtual/index11.js";import{__require as t}from"../../html-dom-parser/lib/index.js";import{__require as r}from"./attributes-to-props.js";import{__require as o}from"./dom-to-react.js";import{__require as n}from"../../domhandler/lib/index.js";var i;function u(){return i||(i=1,function(i){var u=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.htmlToDOM=i.domToReact=i.attributesToProps=i.Text=i.ProcessingInstruction=i.Element=i.Comment=void 0,i.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];return(0,m.default)((0,a.default)(e,(null==t?void 0:t.htmlparser2)||l),t)};var a=u(t());i.htmlToDOM=a.default;var s=u(r());i.attributesToProps=s.default;var m=u(o());i.domToReact=m.default;var f=n();Object.defineProperty(i,"Comment",{enumerable:!0,get:function(){return f.Comment}}),Object.defineProperty(i,"Element",{enumerable:!0,get:function(){return f.Element}}),Object.defineProperty(i,"ProcessingInstruction",{enumerable:!0,get:function(){return f.ProcessingInstruction}}),Object.defineProperty(i,"Text",{enumerable:!0,get:function(){return f.Text}});var l={lowerCaseAttributeNames:!1}}(e)),e}export{u as __require};
1
+ import{__exports as e}from"../../../_virtual/index10.js";import{__require as t}from"../../html-dom-parser/lib/index.js";import{__require as r}from"./attributes-to-props.js";import{__require as o}from"./dom-to-react.js";import{__require as n}from"../node_modules/domhandler/lib/index.js";var u;function i(){return u||(u=1,function(u){var i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u,"__esModule",{value:!0}),u.htmlToDOM=u.domToReact=u.attributesToProps=u.Text=u.ProcessingInstruction=u.Element=u.Comment=void 0,u.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];return(0,m.default)((0,a.default)(e,(null==t?void 0:t.htmlparser2)||f),t)};var a=i(t());u.htmlToDOM=a.default;var s=i(r());u.attributesToProps=s.default;var m=i(o());u.domToReact=m.default;var l=n();Object.defineProperty(u,"Comment",{enumerable:!0,get:function(){return l.Comment}}),Object.defineProperty(u,"Element",{enumerable:!0,get:function(){return l.Element}}),Object.defineProperty(u,"ProcessingInstruction",{enumerable:!0,get:function(){return l.ProcessingInstruction}}),Object.defineProperty(u,"Text",{enumerable:!0,get:function(){return l.Text}});var f={lowerCaseAttributeNames:!1}}(e)),e}export{i as __require};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../node_modules/html-react-parser/lib/index.js"],"sourcesContent":["\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.htmlToDOM = exports.domToReact = exports.attributesToProps = exports.Text = exports.ProcessingInstruction = exports.Element = exports.Comment = void 0;\nexports.default = HTMLReactParser;\nvar html_dom_parser_1 = __importDefault(require(\"html-dom-parser\"));\nexports.htmlToDOM = html_dom_parser_1.default;\nvar attributes_to_props_1 = __importDefault(require(\"./attributes-to-props\"));\nexports.attributesToProps = attributes_to_props_1.default;\nvar dom_to_react_1 = __importDefault(require(\"./dom-to-react\"));\nexports.domToReact = dom_to_react_1.default;\nvar domhandler_1 = require(\"domhandler\");\nObject.defineProperty(exports, \"Comment\", { enumerable: true, get: function () { return domhandler_1.Comment; } });\nObject.defineProperty(exports, \"Element\", { enumerable: true, get: function () { return domhandler_1.Element; } });\nObject.defineProperty(exports, \"ProcessingInstruction\", { enumerable: true, get: function () { return domhandler_1.ProcessingInstruction; } });\nObject.defineProperty(exports, \"Text\", { enumerable: true, get: function () { return domhandler_1.Text; } });\nvar domParserOptions = { lowerCaseAttributeNames: false };\n/**\n * Converts HTML string to React elements.\n *\n * @param html - HTML string.\n * @param options - Parser options.\n * @returns - React element(s), empty array, or string.\n */\nfunction HTMLReactParser(html, options) {\n if (typeof html !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n if (!html) {\n return [];\n }\n 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);\n}\n//# sourceMappingURL=index.js.map"],"names":["__importDefault","this","mod","__esModule","default","Object","defineProperty","exports","value","htmlToDOM","attributesToProps","Text","Element","Comment","html","options","TypeError","dom_to_react_1","html_dom_parser_1","htmlparser2","domParserOptions","require$$0","attributes_to_props_1","require$$1","require$$2","domToReact","domhandler_1","require$$3","enumerable","get","ProcessingInstruction","lowerCaseAttributeNames"],"mappings":"mUACA,IAAIA,EAAmBC,GAAQA,EAAKD,iBAAoB,SAAUE,GAC9D,OAAQA,GAAOA,EAAIC,WAAcD,EAAM,CAAEE,QAAWF,IAExDG,OAAOC,eAAcC,EAAU,aAAc,CAAEC,OAAO,IACtDD,EAAAE,UAAoBF,aAAqBA,EAA4BG,kBAAAH,EAAAI,KAAeJ,wBAAgCA,EAAkBK,QAAAL,EAAAM,aAAkB,EACxJN,EAAAH,QAoBA,SAAyBU,EAAMC,GAC3B,GAAoB,iBAATD,EACP,MAAM,IAAIE,UAAU,mCAExB,IAAKF,EACD,MAAO,GAEX,OAAO,EAAIG,EAAeb,UAAS,EAAIc,EAAkBd,SAASU,GAAOC,aAAyC,EAASA,EAAQI,cAAgBC,GAAmBL,EAC1K,EA3BA,IAAIG,EAAoBlB,EAAgBqB,KACxCd,EAAoBE,UAAAS,EAAkBd,QACtC,IAAIkB,EAAwBtB,EAAgBuB,KAC5ChB,EAA4BG,kBAAAY,EAAsBlB,QAClD,IAAIa,EAAiBjB,EAAgBwB,KACrCjB,EAAqBkB,WAAAR,EAAeb,QACpC,IAAIsB,EAAoCC,IACxCtB,OAAOC,eAAeC,EAAS,UAAW,CAAEqB,YAAY,EAAMC,IAAK,WAAc,OAAOH,EAAab,OAAQ,IAC7GR,OAAOC,eAAeC,EAAS,UAAW,CAAEqB,YAAY,EAAMC,IAAK,WAAc,OAAOH,EAAad,OAAQ,IAC7GP,OAAOC,eAAeC,EAAS,wBAAyB,CAAEqB,YAAY,EAAMC,IAAK,WAAc,OAAOH,EAAaI,qBAAsB,IACzIzB,OAAOC,eAAeC,EAAS,OAAQ,CAAEqB,YAAY,EAAMC,IAAK,WAAc,OAAOH,EAAaf,IAAK,IACvG,IAAIS,EAAmB,CAAEW,yBAAyB"}
1
+ {"version":3,"file":"index.js","sources":["../../../../node_modules/html-react-parser/lib/index.js"],"sourcesContent":["\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.htmlToDOM = exports.domToReact = exports.attributesToProps = exports.Text = exports.ProcessingInstruction = exports.Element = exports.Comment = void 0;\nexports.default = HTMLReactParser;\nvar html_dom_parser_1 = __importDefault(require(\"html-dom-parser\"));\nexports.htmlToDOM = html_dom_parser_1.default;\nvar attributes_to_props_1 = __importDefault(require(\"./attributes-to-props\"));\nexports.attributesToProps = attributes_to_props_1.default;\nvar dom_to_react_1 = __importDefault(require(\"./dom-to-react\"));\nexports.domToReact = dom_to_react_1.default;\nvar domhandler_1 = require(\"domhandler\");\nObject.defineProperty(exports, \"Comment\", { enumerable: true, get: function () { return domhandler_1.Comment; } });\nObject.defineProperty(exports, \"Element\", { enumerable: true, get: function () { return domhandler_1.Element; } });\nObject.defineProperty(exports, \"ProcessingInstruction\", { enumerable: true, get: function () { return domhandler_1.ProcessingInstruction; } });\nObject.defineProperty(exports, \"Text\", { enumerable: true, get: function () { return domhandler_1.Text; } });\nvar domParserOptions = { lowerCaseAttributeNames: false };\n/**\n * Converts HTML string to React elements.\n *\n * @param html - HTML string.\n * @param options - Parser options.\n * @returns - React element(s), empty array, or string.\n */\nfunction HTMLReactParser(html, options) {\n if (typeof html !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n if (!html) {\n return [];\n }\n 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);\n}\n//# sourceMappingURL=index.js.map"],"names":["__importDefault","this","mod","__esModule","default","Object","defineProperty","exports","value","htmlToDOM","attributesToProps","Text","Element","Comment","html","options","TypeError","dom_to_react_1","html_dom_parser_1","htmlparser2","domParserOptions","require$$0","attributes_to_props_1","require$$1","require$$2","domToReact","domhandler_1","require$$3","enumerable","get","ProcessingInstruction","lowerCaseAttributeNames"],"mappings":"6UACA,IAAIA,EAAmBC,GAAQA,EAAKD,iBAAoB,SAAUE,GAC9D,OAAQA,GAAOA,EAAIC,WAAcD,EAAM,CAAEE,QAAWF,IAExDG,OAAOC,eAAcC,EAAU,aAAc,CAAEC,OAAO,IACtDD,EAAAE,UAAoBF,aAAqBA,EAA4BG,kBAAAH,EAAAI,KAAeJ,wBAAgCA,EAAkBK,QAAAL,EAAAM,aAAkB,EACxJN,EAAAH,QAoBA,SAAyBU,EAAMC,GAC3B,GAAoB,iBAATD,EACP,MAAM,IAAIE,UAAU,mCAExB,IAAKF,EACD,MAAO,GAEX,OAAO,EAAIG,EAAeb,UAAS,EAAIc,EAAkBd,SAASU,GAAOC,aAAyC,EAASA,EAAQI,cAAgBC,GAAmBL,EAC1K,EA3BA,IAAIG,EAAoBlB,EAAgBqB,KACxCd,EAAoBE,UAAAS,EAAkBd,QACtC,IAAIkB,EAAwBtB,EAAgBuB,KAC5ChB,EAA4BG,kBAAAY,EAAsBlB,QAClD,IAAIa,EAAiBjB,EAAgBwB,KACrCjB,EAAqBkB,WAAAR,EAAeb,QACpC,IAAIsB,EAAoCC,IACxCtB,OAAOC,eAAeC,EAAS,UAAW,CAAEqB,YAAY,EAAMC,IAAK,WAAc,OAAOH,EAAab,OAAQ,IAC7GR,OAAOC,eAAeC,EAAS,UAAW,CAAEqB,YAAY,EAAMC,IAAK,WAAc,OAAOH,EAAad,OAAQ,IAC7GP,OAAOC,eAAeC,EAAS,wBAAyB,CAAEqB,YAAY,EAAMC,IAAK,WAAc,OAAOH,EAAaI,qBAAsB,IACzIzB,OAAOC,eAAeC,EAAS,OAAQ,CAAEqB,YAAY,EAAMC,IAAK,WAAc,OAAOH,EAAaf,IAAK,IACvG,IAAIS,EAAmB,CAAEW,yBAAyB"}
@@ -0,0 +1,2 @@
1
+ import{__exports as t}from"../../../../../_virtual/index12.js";import{__require as e}from"../../../../domelementtype/lib/index.js";import{__require as n}from"./node.js";var o;function i(){return o||(o=1,function(o){var i=t&&t.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),s=t&&t.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(o,"__esModule",{value:!0}),o.DomHandler=void 0;var r=e(),a=n();s(n(),o);var d={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function t(t,e,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof e&&(n=e,e=d),"object"==typeof t&&(e=t,t=void 0),this.callback=null!=t?t:null,this.options=null!=e?e:d,this.elementCB=null!=n?n:null}return t.prototype.onparserinit=function(t){this.parser=t},t.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},t.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},t.prototype.onerror=function(t){this.handleCallback(t)},t.prototype.onclosetag=function(){this.lastNode=null;var t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)},t.prototype.onopentag=function(t,e){var n=this.options.xmlMode?r.ElementType.Tag:void 0,o=new a.Element(t,e,void 0,n);this.addNode(o),this.tagStack.push(o)},t.prototype.ontext=function(t){var e=this.lastNode;if(e&&e.type===r.ElementType.Text)e.data+=t,this.options.withEndIndices&&(e.endIndex=this.parser.endIndex);else{var n=new a.Text(t);this.addNode(n),this.lastNode=n}},t.prototype.oncomment=function(t){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment)this.lastNode.data+=t;else{var e=new a.Comment(t);this.addNode(e),this.lastNode=e}},t.prototype.oncommentend=function(){this.lastNode=null},t.prototype.oncdatastart=function(){var t=new a.Text(""),e=new a.CDATA([t]);this.addNode(e),t.parent=e,this.lastNode=t},t.prototype.oncdataend=function(){this.lastNode=null},t.prototype.onprocessinginstruction=function(t,e){var n=new a.ProcessingInstruction(t,e);this.addNode(n)},t.prototype.handleCallback=function(t){if("function"==typeof this.callback)this.callback(t,this.dom);else if(t)throw t},t.prototype.addNode=function(t){var e=this.tagStack[this.tagStack.length-1],n=e.children[e.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),e.children.push(t),n&&(t.prev=n,n.next=t),t.parent=e,this.lastNode=null},t}();o.DomHandler=l,o.default=l}(t)),t}export{i as __require};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../node_modules/html-react-parser/node_modules/domhandler/lib/index.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DomHandler = void 0;\nvar domelementtype_1 = require(\"domelementtype\");\nvar node_js_1 = require(\"./node.js\");\n__exportStar(require(\"./node.js\"), exports);\n// Default options\nvar defaultOpts = {\n withStartIndices: false,\n withEndIndices: false,\n xmlMode: false,\n};\nvar DomHandler = /** @class */ (function () {\n /**\n * @param callback Called once parsing has completed.\n * @param options Settings for the handler.\n * @param elementCB Callback whenever a tag is closed.\n */\n function DomHandler(callback, options, elementCB) {\n /** The elements of the DOM */\n this.dom = [];\n /** The root element for the DOM */\n this.root = new node_js_1.Document(this.dom);\n /** Indicated whether parsing has been completed. */\n this.done = false;\n /** Stack of open tags. */\n this.tagStack = [this.root];\n /** A data node that is still being written to. */\n this.lastNode = null;\n /** Reference to the parser instance. Used for location information. */\n this.parser = null;\n // Make it possible to skip arguments, for backwards-compatibility\n if (typeof options === \"function\") {\n elementCB = options;\n options = defaultOpts;\n }\n if (typeof callback === \"object\") {\n options = callback;\n callback = undefined;\n }\n this.callback = callback !== null && callback !== void 0 ? callback : null;\n this.options = options !== null && options !== void 0 ? options : defaultOpts;\n this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;\n }\n DomHandler.prototype.onparserinit = function (parser) {\n this.parser = parser;\n };\n // Resets the handler back to starting state\n DomHandler.prototype.onreset = function () {\n this.dom = [];\n this.root = new node_js_1.Document(this.dom);\n this.done = false;\n this.tagStack = [this.root];\n this.lastNode = null;\n this.parser = null;\n };\n // Signals the handler that parsing is done\n DomHandler.prototype.onend = function () {\n if (this.done)\n return;\n this.done = true;\n this.parser = null;\n this.handleCallback(null);\n };\n DomHandler.prototype.onerror = function (error) {\n this.handleCallback(error);\n };\n DomHandler.prototype.onclosetag = function () {\n this.lastNode = null;\n var elem = this.tagStack.pop();\n if (this.options.withEndIndices) {\n elem.endIndex = this.parser.endIndex;\n }\n if (this.elementCB)\n this.elementCB(elem);\n };\n DomHandler.prototype.onopentag = function (name, attribs) {\n var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : undefined;\n var element = new node_js_1.Element(name, attribs, undefined, type);\n this.addNode(element);\n this.tagStack.push(element);\n };\n DomHandler.prototype.ontext = function (data) {\n var lastNode = this.lastNode;\n if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) {\n lastNode.data += data;\n if (this.options.withEndIndices) {\n lastNode.endIndex = this.parser.endIndex;\n }\n }\n else {\n var node = new node_js_1.Text(data);\n this.addNode(node);\n this.lastNode = node;\n }\n };\n DomHandler.prototype.oncomment = function (data) {\n if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) {\n this.lastNode.data += data;\n return;\n }\n var node = new node_js_1.Comment(data);\n this.addNode(node);\n this.lastNode = node;\n };\n DomHandler.prototype.oncommentend = function () {\n this.lastNode = null;\n };\n DomHandler.prototype.oncdatastart = function () {\n var text = new node_js_1.Text(\"\");\n var node = new node_js_1.CDATA([text]);\n this.addNode(node);\n text.parent = node;\n this.lastNode = text;\n };\n DomHandler.prototype.oncdataend = function () {\n this.lastNode = null;\n };\n DomHandler.prototype.onprocessinginstruction = function (name, data) {\n var node = new node_js_1.ProcessingInstruction(name, data);\n this.addNode(node);\n };\n DomHandler.prototype.handleCallback = function (error) {\n if (typeof this.callback === \"function\") {\n this.callback(error, this.dom);\n }\n else if (error) {\n throw error;\n }\n };\n DomHandler.prototype.addNode = function (node) {\n var parent = this.tagStack[this.tagStack.length - 1];\n var previousSibling = parent.children[parent.children.length - 1];\n if (this.options.withStartIndices) {\n node.startIndex = this.parser.startIndex;\n }\n if (this.options.withEndIndices) {\n node.endIndex = this.parser.endIndex;\n }\n parent.children.push(node);\n if (previousSibling) {\n node.prev = previousSibling;\n previousSibling.next = node;\n }\n node.parent = parent;\n this.lastNode = null;\n };\n return DomHandler;\n}());\nexports.DomHandler = DomHandler;\nexports.default = DomHandler;\n"],"names":["__createBinding","this","Object","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__exportStar","exports","p","prototype","hasOwnProperty","call","value","DomHandler","domelementtype_1","require$$0","node_js_1","require$$1","defaultOpts","withStartIndices","withEndIndices","xmlMode","callback","options","elementCB","dom","root","Document","done","tagStack","lastNode","parser","onparserinit","onreset","onend","handleCallback","onerror","error","onclosetag","elem","pop","endIndex","onopentag","name","attribs","type","ElementType","Tag","element","Element","addNode","push","ontext","data","Text","node","oncomment","Comment","oncommentend","oncdatastart","text","CDATA","parent","oncdataend","onprocessinginstruction","ProcessingInstruction","length","previousSibling","children","startIndex","prev","next","default"],"mappings":"uNACA,IAAIA,EAAmBC,GAAQA,EAAKD,kBAAqBE,OAAOC,OAAM,SAAaC,EAAGC,EAAGC,EAAGC,QAC7EC,IAAPD,IAAkBA,EAAKD,GAC3B,IAAIG,EAAOP,OAAOQ,yBAAyBL,EAAGC,GACzCG,KAAS,QAASA,GAAQJ,EAAEM,WAAaF,EAAKG,UAAYH,EAAKI,gBAClEJ,EAAO,CAAEK,YAAY,EAAMC,IAAK,WAAa,OAAOV,EAAEC,EAAG,IAE3DJ,OAAOc,eAAeZ,EAAGG,EAAIE,EAChC,EAAA,SAAcL,EAAGC,EAAGC,EAAGC,QACTC,IAAPD,IAAkBA,EAAKD,GAC3BF,EAAEG,GAAMF,EAAEC,EACb,GACGW,EAAgBhB,GAAQA,EAAKgB,cAAiB,SAASZ,EAAGa,GAC1D,IAAK,IAAIC,KAAKd,EAAa,YAANc,GAAoBjB,OAAOkB,UAAUC,eAAeC,KAAKJ,EAASC,IAAInB,EAAgBkB,EAASb,EAAGc,IAE3HjB,OAAOc,eAAcE,EAAU,aAAc,CAAEK,OAAO,IACtDL,EAAAM,gBAAqB,EACrB,IAAIC,EAA4CC,IAC5CC,EAAgCC,IACpCX,EAAaW,IAAsBV,GAEnC,IAAIW,EAAc,CACdC,kBAAkB,EAClBC,gBAAgB,EAChBC,SAAS,GAETR,EAA4B,WAM5B,SAASA,EAAWS,EAAUC,EAASC,GAEnClC,KAAKmC,IAAM,GAEXnC,KAAKoC,KAAO,IAAIV,EAAUW,SAASrC,KAAKmC,KAExCnC,KAAKsC,MAAO,EAEZtC,KAAKuC,SAAW,CAACvC,KAAKoC,MAEtBpC,KAAKwC,SAAW,KAEhBxC,KAAKyC,OAAS,KAES,mBAAZR,IACPC,EAAYD,EACZA,EAAUL,GAEU,iBAAbI,IACPC,EAAUD,EACVA,OAAWzB,GAEfP,KAAKgC,SAAWA,Q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AgBI,KAAOhB,GAE3BA,EAAKO,OAASA,EACdxE,KAAKwC,SAAW,MAEbjB,CACV,CAxIa,GAyIdN,EAAAM,WAAqBA,EACrBN,EAAAiE,QAAkB3D"}
@@ -0,0 +1,2 @@
1
+ import{__exports as e}from"../../../../../_virtual/node.js";import{__require as t}from"../../../../domelementtype/lib/index.js";var n;function r(){if(n)return e;n=1;var r,i=e&&e.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=e&&e.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.cloneNode=e.hasChildren=e.isDocument=e.isDirective=e.isComment=e.isText=e.isCDATA=e.isTag=e.Element=e.Document=e.CDATA=e.NodeWithChildren=e.ProcessingInstruction=e.Comment=e.Text=e.DataNode=e.Node=void 0;var u=t(),a=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),O(this,e)},e}();e.Node=a;var c=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(a);e.DataNode=c;var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=u.ElementType.Text,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(c);e.Text=l;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=u.ElementType.Comment,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(c);e.Comment=p;var s=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=u.ElementType.Directive,r}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(c);e.ProcessingInstruction=s;var f=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);e.NodeWithChildren=f;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=u.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);e.CDATA=d;var y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=u.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);e.Document=y;var m=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?u.ElementType.Script:"style"===t?u.ElementType.Style:u.ElementType.Tag);var o=e.call(this,r)||this;return o.name=t,o.attribs=n,o.type=i,o}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function h(e){return(0,u.isTag)(e)}function b(e){return e.type===u.ElementType.CDATA}function v(e){return e.type===u.ElementType.Text}function g(e){return e.type===u.ElementType.Comment}function x(e){return e.type===u.ElementType.Directive}function T(e){return e.type===u.ElementType.Root}function O(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new l(e.data);else if(g(e))n=new p(e.data);else if(h(e)){var r=t?P(e.children):[],i=new m(e.name,o({},e.attribs),r);r.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),n=i}else if(b(e)){r=t?P(e.children):[];var u=new d(r);r.forEach((function(e){return e.parent=u})),n=u}else if(T(e)){r=t?P(e.children):[];var a=new y(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!x(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new s(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),n=c}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function P(e){for(var t=e.map((function(e){return O(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}return e.Element=m,e.isTag=h,e.isCDATA=b,e.isText=v,e.isComment=g,e.isDirective=x,e.isDocument=T,e.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},e.cloneNode=O,e}export{r as __require};
2
+ //# sourceMappingURL=node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sources":["../../../../../../node_modules/html-react-parser/node_modules/domhandler/lib/node.js"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.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;\nvar domelementtype_1 = require(\"domelementtype\");\n/**\n * This object will be used as the prototype for Nodes when creating a\n * DOM-Level-1-compliant structure.\n */\nvar Node = /** @class */ (function () {\n function Node() {\n /** Parent of the node */\n this.parent = null;\n /** Previous sibling */\n this.prev = null;\n /** Next sibling */\n this.next = null;\n /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */\n this.startIndex = null;\n /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */\n this.endIndex = null;\n }\n Object.defineProperty(Node.prototype, \"parentNode\", {\n // Read-write aliases for properties\n /**\n * Same as {@link parent}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.parent;\n },\n set: function (parent) {\n this.parent = parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"previousSibling\", {\n /**\n * Same as {@link prev}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.prev;\n },\n set: function (prev) {\n this.prev = prev;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"nextSibling\", {\n /**\n * Same as {@link next}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.next;\n },\n set: function (next) {\n this.next = next;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Clone this node, and optionally its children.\n *\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\n Node.prototype.cloneNode = function (recursive) {\n if (recursive === void 0) { recursive = false; }\n return cloneNode(this, recursive);\n };\n return Node;\n}());\nexports.Node = Node;\n/**\n * A node that contains some data.\n */\nvar DataNode = /** @class */ (function (_super) {\n __extends(DataNode, _super);\n /**\n * @param data The content of the data node\n */\n function DataNode(data) {\n var _this = _super.call(this) || this;\n _this.data = data;\n return _this;\n }\n Object.defineProperty(DataNode.prototype, \"nodeValue\", {\n /**\n * Same as {@link data}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.data;\n },\n set: function (data) {\n this.data = data;\n },\n enumerable: false,\n configurable: true\n });\n return DataNode;\n}(Node));\nexports.DataNode = DataNode;\n/**\n * Text within the document.\n */\nvar Text = /** @class */ (function (_super) {\n __extends(Text, _super);\n function Text() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = domelementtype_1.ElementType.Text;\n return _this;\n }\n Object.defineProperty(Text.prototype, \"nodeType\", {\n get: function () {\n return 3;\n },\n enumerable: false,\n configurable: true\n });\n return Text;\n}(DataNode));\nexports.Text = Text;\n/**\n * Comments within the document.\n */\nvar Comment = /** @class */ (function (_super) {\n __extends(Comment, _super);\n function Comment() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = domelementtype_1.ElementType.Comment;\n return _this;\n }\n Object.defineProperty(Comment.prototype, \"nodeType\", {\n get: function () {\n return 8;\n },\n enumerable: false,\n configurable: true\n });\n return Comment;\n}(DataNode));\nexports.Comment = Comment;\n/**\n * Processing instructions, including doc types.\n */\nvar ProcessingInstruction = /** @class */ (function (_super) {\n __extends(ProcessingInstruction, _super);\n function ProcessingInstruction(name, data) {\n var _this = _super.call(this, data) || this;\n _this.name = name;\n _this.type = domelementtype_1.ElementType.Directive;\n return _this;\n }\n Object.defineProperty(ProcessingInstruction.prototype, \"nodeType\", {\n get: function () {\n return 1;\n },\n enumerable: false,\n configurable: true\n });\n return ProcessingInstruction;\n}(DataNode));\nexports.ProcessingInstruction = ProcessingInstruction;\n/**\n * A `Node` that can have children.\n */\nvar NodeWithChildren = /** @class */ (function (_super) {\n __extends(NodeWithChildren, _super);\n /**\n * @param children Children of the node. Only certain node types can have children.\n */\n function NodeWithChildren(children) {\n var _this = _super.call(this) || this;\n _this.children = children;\n return _this;\n }\n Object.defineProperty(NodeWithChildren.prototype, \"firstChild\", {\n // Aliases\n /** First child of the node. */\n get: function () {\n var _a;\n return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(NodeWithChildren.prototype, \"lastChild\", {\n /** Last child of the node. */\n get: function () {\n return this.children.length > 0\n ? this.children[this.children.length - 1]\n : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(NodeWithChildren.prototype, \"childNodes\", {\n /**\n * Same as {@link children}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.children;\n },\n set: function (children) {\n this.children = children;\n },\n enumerable: false,\n configurable: true\n });\n return NodeWithChildren;\n}(Node));\nexports.NodeWithChildren = NodeWithChildren;\nvar CDATA = /** @class */ (function (_super) {\n __extends(CDATA, _super);\n function CDATA() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = domelementtype_1.ElementType.CDATA;\n return _this;\n }\n Object.defineProperty(CDATA.prototype, \"nodeType\", {\n get: function () {\n return 4;\n },\n enumerable: false,\n configurable: true\n });\n return CDATA;\n}(NodeWithChildren));\nexports.CDATA = CDATA;\n/**\n * The root node of the document.\n */\nvar Document = /** @class */ (function (_super) {\n __extends(Document, _super);\n function Document() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = domelementtype_1.ElementType.Root;\n return _this;\n }\n Object.defineProperty(Document.prototype, \"nodeType\", {\n get: function () {\n return 9;\n },\n enumerable: false,\n configurable: true\n });\n return Document;\n}(NodeWithChildren));\nexports.Document = Document;\n/**\n * An element within the DOM.\n */\nvar Element = /** @class */ (function (_super) {\n __extends(Element, _super);\n /**\n * @param name Name of the tag, eg. `div`, `span`.\n * @param attribs Object mapping attribute names to attribute values.\n * @param children Children of the node.\n */\n function Element(name, attribs, children, type) {\n if (children === void 0) { children = []; }\n if (type === void 0) { type = name === \"script\"\n ? domelementtype_1.ElementType.Script\n : name === \"style\"\n ? domelementtype_1.ElementType.Style\n : domelementtype_1.ElementType.Tag; }\n var _this = _super.call(this, children) || this;\n _this.name = name;\n _this.attribs = attribs;\n _this.type = type;\n return _this;\n }\n Object.defineProperty(Element.prototype, \"nodeType\", {\n get: function () {\n return 1;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Element.prototype, \"tagName\", {\n // DOM Level 1 aliases\n /**\n * Same as {@link name}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.name;\n },\n set: function (name) {\n this.name = name;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Element.prototype, \"attributes\", {\n get: function () {\n var _this = this;\n return Object.keys(this.attribs).map(function (name) {\n var _a, _b;\n return ({\n name: name,\n value: _this.attribs[name],\n namespace: (_a = _this[\"x-attribsNamespace\"]) === null || _a === void 0 ? void 0 : _a[name],\n prefix: (_b = _this[\"x-attribsPrefix\"]) === null || _b === void 0 ? void 0 : _b[name],\n });\n });\n },\n enumerable: false,\n configurable: true\n });\n return Element;\n}(NodeWithChildren));\nexports.Element = Element;\n/**\n * @param node Node to check.\n * @returns `true` if the node is a `Element`, `false` otherwise.\n */\nfunction isTag(node) {\n return (0, domelementtype_1.isTag)(node);\n}\nexports.isTag = isTag;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `CDATA`, `false` otherwise.\n */\nfunction isCDATA(node) {\n return node.type === domelementtype_1.ElementType.CDATA;\n}\nexports.isCDATA = isCDATA;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `Text`, `false` otherwise.\n */\nfunction isText(node) {\n return node.type === domelementtype_1.ElementType.Text;\n}\nexports.isText = isText;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `Comment`, `false` otherwise.\n */\nfunction isComment(node) {\n return node.type === domelementtype_1.ElementType.Comment;\n}\nexports.isComment = isComment;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n */\nfunction isDirective(node) {\n return node.type === domelementtype_1.ElementType.Directive;\n}\nexports.isDirective = isDirective;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n */\nfunction isDocument(node) {\n return node.type === domelementtype_1.ElementType.Root;\n}\nexports.isDocument = isDocument;\n/**\n * @param node Node to check.\n * @returns `true` if the node has children, `false` otherwise.\n */\nfunction hasChildren(node) {\n return Object.prototype.hasOwnProperty.call(node, \"children\");\n}\nexports.hasChildren = hasChildren;\n/**\n * Clone a node, and optionally its children.\n *\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\nfunction cloneNode(node, recursive) {\n if (recursive === void 0) { recursive = false; }\n var result;\n if (isText(node)) {\n result = new Text(node.data);\n }\n else if (isComment(node)) {\n result = new Comment(node.data);\n }\n else if (isTag(node)) {\n var children = recursive ? cloneChildren(node.children) : [];\n var clone_1 = new Element(node.name, __assign({}, node.attribs), children);\n children.forEach(function (child) { return (child.parent = clone_1); });\n if (node.namespace != null) {\n clone_1.namespace = node.namespace;\n }\n if (node[\"x-attribsNamespace\"]) {\n clone_1[\"x-attribsNamespace\"] = __assign({}, node[\"x-attribsNamespace\"]);\n }\n if (node[\"x-attribsPrefix\"]) {\n clone_1[\"x-attribsPrefix\"] = __assign({}, node[\"x-attribsPrefix\"]);\n }\n result = clone_1;\n }\n else if (isCDATA(node)) {\n var children = recursive ? cloneChildren(node.children) : [];\n var clone_2 = new CDATA(children);\n children.forEach(function (child) { return (child.parent = clone_2); });\n result = clone_2;\n }\n else if (isDocument(node)) {\n var children = recursive ? cloneChildren(node.children) : [];\n var clone_3 = new Document(children);\n children.forEach(function (child) { return (child.parent = clone_3); });\n if (node[\"x-mode\"]) {\n clone_3[\"x-mode\"] = node[\"x-mode\"];\n }\n result = clone_3;\n }\n else if (isDirective(node)) {\n var instruction = new ProcessingInstruction(node.name, node.data);\n if (node[\"x-name\"] != null) {\n instruction[\"x-name\"] = node[\"x-name\"];\n instruction[\"x-publicId\"] = node[\"x-publicId\"];\n instruction[\"x-systemId\"] = node[\"x-systemId\"];\n }\n result = instruction;\n }\n else {\n throw new Error(\"Not implemented yet: \".concat(node.type));\n }\n result.startIndex = node.startIndex;\n result.endIndex = node.endIndex;\n if (node.sourceCodeLocation != null) {\n result.sourceCodeLocation = node.sourceCodeLocation;\n }\n return result;\n}\nexports.cloneNode = cloneNode;\nfunction cloneChildren(childs) {\n var children = childs.map(function (child) { return cloneNode(child, true); });\n for (var i = 1; i < children.length; i++) {\n children[i].prev = children[i - 1];\n children[i - 1].next = children[i];\n }\n return children;\n}\n"],"names":["extendStatics","__extends","this","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","defineProperty","node","value","cloneNode","hasChildren","isDocument","isDirective","isComment","isCDATA","isTag","Element","Document","CDATA","NodeWithChildren","Comment","Text","DataNode","Node","domelementtype_1","require$$0","parent","prev","next","startIndex","endIndex","get","set","enumerable","configurable","recursive","_super","data","_this","type","ElementType","ProcessingInstruction","name","Directive","children","_a","Root","attribs","Script","Style","Tag","keys","map","_b","namespace","prefix","isText","result","cloneChildren","clone_1","forEach","child","clone_2","clone_3","Error","concat","instruction","sourceCodeLocation","childs"],"mappings":"qKACA,IACQA,EADJC,EAAaC,GAAQA,EAAKD,YACtBD,EAAgB,SAAUG,EAAGC,GAI7B,OAHAJ,EAAgBK,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,CAAE,GACzE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOC,OAAOK,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,KACzFT,EAAcG,EAAGC,IAErB,SAAUD,EAAGC,GAChB,GAAiB,mBAANA,GAA0B,OAANA,EAC3B,MAAM,IAAIS,UAAU,uBAAyBC,OAAOV,GAAK,iCAE7D,SAASW,IAAOb,KAAKc,YAAcb,CAAE,CADrCH,EAAcG,EAAGC,GAEjBD,EAAEO,UAAkB,OAANN,EAAaC,OAAOY,OAAOb,IAAMW,EAAGL,UAAYN,EAAEM,UAAW,IAAIK,KAGnFG,EAAYhB,GAAQA,EAAKgB,UAAa,WAStC,OARAA,EAAWb,OAAOc,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIb,KADTY,EAAIG,UAAUF,GACOjB,OAAOK,UAAUC,eAAeC,K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QjBjD,EAAAM,UAAoBA,EAQpBN,EAAAK,YAAsBA,EAQtBL,EAAAI,WAAqBA,EAQrBJ,EAAAG,YAHA,SAAqBH,GACjB,OAAOvB,OAAOK,UAAUC,eAAeC,KAAKgB,EAAM,WACtD,EAkEAA,EAAAE,UAAoBA"}
@@ -1,2 +1,2 @@
1
- import{__exports as t}from"../../../../_virtual/Parser.js";import{__require as e}from"./Tokenizer.js";import{__require as s}from"../../../entities/dist/commonjs/decode.js";var i;function n(){if(i)return t;i=1;var n,o=t&&t.__createBinding||(Object.create?function(t,e,s,i){void 0===i&&(i=s);var n=Object.getOwnPropertyDescriptor(e,s);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(t,i,n)}:function(t,e,s,i){void 0===i&&(i=s),t[i]=e[s]}),r=t&&t.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=t&&t.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[e.length]=s);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s=n(t),i=0;i<s.length;i++)"default"!==s[i]&&o(e,t,s[i]);return r(e,t),e});Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;const h=a(e()),l=s(),d=new Set(["input","option","optgroup","select","button","datalist","textarea"]),c=new Set(["p"]),u=new Set(["thead","tbody"]),f=new Set(["dd","dt"]),b=new Set(["rt","rp"]),g=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",c],["h1",c],["h2",c],["h3",c],["h4",c],["h5",c],["h6",c],["select",d],["input",d],["output",d],["button",d],["datalist",d],["textarea",d],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",f],["dt",f],["address",c],["article",c],["aside",c],["blockquote",c],["details",c],["div",c],["dl",c],["fieldset",c],["figcaption",c],["figure",c],["footer",c],["form",c],["header",c],["hr",c],["main",c],["nav",c],["ol",c],["pre",c],["section",c],["table",c],["ul",c],["rt",b],["rp",b],["tbody",u],["tfoot",u]]),m=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),p=new Set(["math","svg"]),v=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),x=/\s|\//;return t.Parser=class{constructor(t,e={}){var s,i,n,o,r,a;this.options=e,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=t?t:{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=null!==(s=e.lowerCaseTags)&&void 0!==s?s:this.htmlMode,this.lowerCaseAttributeNames=null!==(i=e.lowerCaseAttributeNames)&&void 0!==i?i:this.htmlMode,this.recognizeSelfClosing=null!==(n=e.recognizeSelfClosing)&&void 0!==n?n:!this.htmlMode,this.tokenizer=new(null!==(o=e.Tokenizer)&&void 0!==o?o:h.default)(this.options,this),this.foreignContext=[!this.htmlMode],null===(a=(r=this.cbs).onparserinit)||void 0===a||a.call(r,this)}ontext(t,e){var s,i;const n=this.getSlice(t,e);this.endIndex=e-1,null===(i=(s=this.cbs).ontext)||void 0===i||i.call(s,n),this.startIndex=e}ontextentity(t,e){var s,i;this.endIndex=e-1,null===(i=(s=this.cbs).ontext)||void 0===i||i.call(s,(0,l.fromCodePoint)(t)),this.startIndex=e}isVoidElement(t){return this.htmlMode&&m.has(t)}onopentagname(t,e){this.endIndex=e;let s=this.getSlice(t,e);this.lowerCaseTagNames&&(s=s.toLowerCase()),this.emitOpenTag(s)}emitOpenTag(t){var e,s,i,n;this.openTagStart=this.startIndex,this.tagname=t;const o=this.htmlMode&&g.get(t);if(o)for(;this.stack.length>0&&o.has(this.stack[0]);){const t=this.stack.shift();null===(s=(e=this.cbs).onclosetag)||void 0===s||s.call(e,t,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(p.has(t)?this.foreignContext.unshift(!0):v.has(t)&&this.foreignContext.unshift(!1))),null===(n=(i=this.cbs).onopentagname)||void 0===n||n.call(i,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var e,s;this.startIndex=this.openTagStart,this.attribs&&(null===(s=(e=this.cbs).onopentag)||void 0===s||s.call(e,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,e){var s,i,n,o,r,a,h,l;this.endIndex=e;let d=this.getSlice(t,e);if(this.lowerCaseTagNames&&(d=d.toLowerCase()),this.htmlMode&&(p.has(d)||v.has(d))&&this.foreignContext.shift(),this.isVoidElement(d))this.htmlMode&&"br"===d&&(null===(o=(n=this.cbs).onopentagname)||void 0===o||o.call(n,"br"),null===(a=(r=this.cbs).onopentag)||void 0===a||a.call(r,"br",{},!0),null===(l=(h=this.cbs).onclosetag)||void 0===l||l.call(h,"br",!1));else{const t=this.stack.indexOf(d);if(-1!==t)for(let e=0;e<=t;e++){const n=this.stack.shift();null===(i=(s=this.cbs).onclosetag)||void 0===i||i.call(s,n,e!==t)}else this.htmlMode&&"p"===d&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=e+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var e,s;const i=this.tagname;this.endOpenTag(t),this.stack[0]===i&&(null===(s=(e=this.cbs).onclosetag)||void 0===s||s.call(e,i,!t),this.stack.shift())}onattribname(t,e){this.startIndex=t;const s=this.getSlice(t,e);this.attribname=this.lowerCaseAttributeNames?s.toLowerCase():s}onattribdata(t,e){this.attribvalue+=this.getSlice(t,e)}onattribentity(t){this.attribvalue+=(0,l.fromCodePoint)(t)}onattribend(t,e){var s,i;this.endIndex=e,null===(i=(s=this.cbs).onattribute)||void 0===i||i.call(s,this.attribname,this.attribvalue,t===h.QuoteType.Double?'"':t===h.QuoteType.Single?"'":t===h.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const e=t.search(x);let s=e<0?t:t.substr(0,e);return this.lowerCaseTagNames&&(s=s.toLowerCase()),s}ondeclaration(t,e){this.endIndex=e;const s=this.getSlice(t,e);if(this.cbs.onprocessinginstruction){const t=this.getInstructionName(s);this.cbs.onprocessinginstruction(`!${t}`,`!${s}`)}this.startIndex=e+1}onprocessinginstruction(t,e){this.endIndex=e;const s=this.getSlice(t,e);if(this.cbs.onprocessinginstruction){const t=this.getInstructionName(s);this.cbs.onprocessinginstruction(`?${t}`,`?${s}`)}this.startIndex=e+1}oncomment(t,e,s){var i,n,o,r;this.endIndex=e,null===(n=(i=this.cbs).oncomment)||void 0===n||n.call(i,this.getSlice(t,e-s)),null===(r=(o=this.cbs).oncommentend)||void 0===r||r.call(o),this.startIndex=e+1}oncdata(t,e,s){var i,n,o,r,a,h,l,d,c,u;this.endIndex=e;const f=this.getSlice(t,e-s);!this.htmlMode||this.options.recognizeCDATA?(null===(n=(i=this.cbs).oncdatastart)||void 0===n||n.call(i),null===(r=(o=this.cbs).ontext)||void 0===r||r.call(o,f),null===(h=(a=this.cbs).oncdataend)||void 0===h||h.call(a)):(null===(d=(l=this.cbs).oncomment)||void 0===d||d.call(l,`[CDATA[${f}]]`),null===(u=(c=this.cbs).oncommentend)||void 0===u||u.call(c)),this.startIndex=e+1}onend(){var t,e;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let t=0;t<this.stack.length;t++)this.cbs.onclosetag(this.stack[t],!0)}null===(e=(t=this.cbs).onend)||void 0===e||e.call(t)}reset(){var t,e,s,i;null===(e=(t=this.cbs).onreset)||void 0===e||e.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(i=(s=this.cbs).onparserinit)||void 0===i||i.call(s,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,e){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let s=this.buffers[0].slice(t-this.bufferOffset,e-this.bufferOffset);for(;e-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),s+=this.buffers[0].slice(0,e-this.bufferOffset);return s}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var e,s;this.ended?null===(s=(e=this.cbs).onerror)||void 0===s||s.call(e,new Error(".write() after done!")):(this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++))}end(t){var e,s;this.ended?null===(s=(e=this.cbs).onerror)||void 0===s||s.call(e,new Error(".end() after done!")):(t&&this.write(t),this.ended=!0,this.tokenizer.end())}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}},t}export{n as __require};
1
+ import{__exports as t}from"../../../../_virtual/Parser.js";import{__require as e}from"./Tokenizer.js";import{__require as s}from"../../node_modules/entities/dist/commonjs/decode.js";var i;function n(){if(i)return t;i=1;var n,o=t&&t.__createBinding||(Object.create?function(t,e,s,i){void 0===i&&(i=s);var n=Object.getOwnPropertyDescriptor(e,s);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(t,i,n)}:function(t,e,s,i){void 0===i&&(i=s),t[i]=e[s]}),r=t&&t.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=t&&t.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[e.length]=s);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s=n(t),i=0;i<s.length;i++)"default"!==s[i]&&o(e,t,s[i]);return r(e,t),e});Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;const h=a(e()),l=s(),d=new Set(["input","option","optgroup","select","button","datalist","textarea"]),c=new Set(["p"]),u=new Set(["thead","tbody"]),f=new Set(["dd","dt"]),b=new Set(["rt","rp"]),g=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",c],["h1",c],["h2",c],["h3",c],["h4",c],["h5",c],["h6",c],["select",d],["input",d],["output",d],["button",d],["datalist",d],["textarea",d],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",f],["dt",f],["address",c],["article",c],["aside",c],["blockquote",c],["details",c],["div",c],["dl",c],["fieldset",c],["figcaption",c],["figure",c],["footer",c],["form",c],["header",c],["hr",c],["main",c],["nav",c],["ol",c],["pre",c],["section",c],["table",c],["ul",c],["rt",b],["rp",b],["tbody",u],["tfoot",u]]),m=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),p=new Set(["math","svg"]),v=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),x=/\s|\//;return t.Parser=class{constructor(t,e={}){var s,i,n,o,r,a;this.options=e,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=t?t:{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=null!==(s=e.lowerCaseTags)&&void 0!==s?s:this.htmlMode,this.lowerCaseAttributeNames=null!==(i=e.lowerCaseAttributeNames)&&void 0!==i?i:this.htmlMode,this.recognizeSelfClosing=null!==(n=e.recognizeSelfClosing)&&void 0!==n?n:!this.htmlMode,this.tokenizer=new(null!==(o=e.Tokenizer)&&void 0!==o?o:h.default)(this.options,this),this.foreignContext=[!this.htmlMode],null===(a=(r=this.cbs).onparserinit)||void 0===a||a.call(r,this)}ontext(t,e){var s,i;const n=this.getSlice(t,e);this.endIndex=e-1,null===(i=(s=this.cbs).ontext)||void 0===i||i.call(s,n),this.startIndex=e}ontextentity(t,e){var s,i;this.endIndex=e-1,null===(i=(s=this.cbs).ontext)||void 0===i||i.call(s,(0,l.fromCodePoint)(t)),this.startIndex=e}isVoidElement(t){return this.htmlMode&&m.has(t)}onopentagname(t,e){this.endIndex=e;let s=this.getSlice(t,e);this.lowerCaseTagNames&&(s=s.toLowerCase()),this.emitOpenTag(s)}emitOpenTag(t){var e,s,i,n;this.openTagStart=this.startIndex,this.tagname=t;const o=this.htmlMode&&g.get(t);if(o)for(;this.stack.length>0&&o.has(this.stack[0]);){const t=this.stack.shift();null===(s=(e=this.cbs).onclosetag)||void 0===s||s.call(e,t,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(p.has(t)?this.foreignContext.unshift(!0):v.has(t)&&this.foreignContext.unshift(!1))),null===(n=(i=this.cbs).onopentagname)||void 0===n||n.call(i,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var e,s;this.startIndex=this.openTagStart,this.attribs&&(null===(s=(e=this.cbs).onopentag)||void 0===s||s.call(e,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,e){var s,i,n,o,r,a,h,l;this.endIndex=e;let d=this.getSlice(t,e);if(this.lowerCaseTagNames&&(d=d.toLowerCase()),this.htmlMode&&(p.has(d)||v.has(d))&&this.foreignContext.shift(),this.isVoidElement(d))this.htmlMode&&"br"===d&&(null===(o=(n=this.cbs).onopentagname)||void 0===o||o.call(n,"br"),null===(a=(r=this.cbs).onopentag)||void 0===a||a.call(r,"br",{},!0),null===(l=(h=this.cbs).onclosetag)||void 0===l||l.call(h,"br",!1));else{const t=this.stack.indexOf(d);if(-1!==t)for(let e=0;e<=t;e++){const n=this.stack.shift();null===(i=(s=this.cbs).onclosetag)||void 0===i||i.call(s,n,e!==t)}else this.htmlMode&&"p"===d&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=e+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var e,s;const i=this.tagname;this.endOpenTag(t),this.stack[0]===i&&(null===(s=(e=this.cbs).onclosetag)||void 0===s||s.call(e,i,!t),this.stack.shift())}onattribname(t,e){this.startIndex=t;const s=this.getSlice(t,e);this.attribname=this.lowerCaseAttributeNames?s.toLowerCase():s}onattribdata(t,e){this.attribvalue+=this.getSlice(t,e)}onattribentity(t){this.attribvalue+=(0,l.fromCodePoint)(t)}onattribend(t,e){var s,i;this.endIndex=e,null===(i=(s=this.cbs).onattribute)||void 0===i||i.call(s,this.attribname,this.attribvalue,t===h.QuoteType.Double?'"':t===h.QuoteType.Single?"'":t===h.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const e=t.search(x);let s=e<0?t:t.substr(0,e);return this.lowerCaseTagNames&&(s=s.toLowerCase()),s}ondeclaration(t,e){this.endIndex=e;const s=this.getSlice(t,e);if(this.cbs.onprocessinginstruction){const t=this.getInstructionName(s);this.cbs.onprocessinginstruction(`!${t}`,`!${s}`)}this.startIndex=e+1}onprocessinginstruction(t,e){this.endIndex=e;const s=this.getSlice(t,e);if(this.cbs.onprocessinginstruction){const t=this.getInstructionName(s);this.cbs.onprocessinginstruction(`?${t}`,`?${s}`)}this.startIndex=e+1}oncomment(t,e,s){var i,n,o,r;this.endIndex=e,null===(n=(i=this.cbs).oncomment)||void 0===n||n.call(i,this.getSlice(t,e-s)),null===(r=(o=this.cbs).oncommentend)||void 0===r||r.call(o),this.startIndex=e+1}oncdata(t,e,s){var i,n,o,r,a,h,l,d,c,u;this.endIndex=e;const f=this.getSlice(t,e-s);!this.htmlMode||this.options.recognizeCDATA?(null===(n=(i=this.cbs).oncdatastart)||void 0===n||n.call(i),null===(r=(o=this.cbs).ontext)||void 0===r||r.call(o,f),null===(h=(a=this.cbs).oncdataend)||void 0===h||h.call(a)):(null===(d=(l=this.cbs).oncomment)||void 0===d||d.call(l,`[CDATA[${f}]]`),null===(u=(c=this.cbs).oncommentend)||void 0===u||u.call(c)),this.startIndex=e+1}onend(){var t,e;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let t=0;t<this.stack.length;t++)this.cbs.onclosetag(this.stack[t],!0)}null===(e=(t=this.cbs).onend)||void 0===e||e.call(t)}reset(){var t,e,s,i;null===(e=(t=this.cbs).onreset)||void 0===e||e.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(i=(s=this.cbs).onparserinit)||void 0===i||i.call(s,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,e){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let s=this.buffers[0].slice(t-this.bufferOffset,e-this.bufferOffset);for(;e-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),s+=this.buffers[0].slice(0,e-this.bufferOffset);return s}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var e,s;this.ended?null===(s=(e=this.cbs).onerror)||void 0===s||s.call(e,new Error(".write() after done!")):(this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++))}end(t){var e,s;this.ended?null===(s=(e=this.cbs).onerror)||void 0===s||s.call(e,new Error(".end() after done!")):(t&&this.write(t),this.ended=!0,this.tokenizer.end())}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}},t}export{n as __require};
2
2
  //# sourceMappingURL=Parser.js.map