@pokash/n8n-nodes-ksef 0.2.16 → 0.2.17

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.

Potentially problematic release.


This version of @pokash/n8n-nodes-ksef might be problematic. Click here for more details.

Files changed (645) hide show
  1. package/package.json +5 -12
  2. package/node_modules/@oozcitak/dom/LICENSE +0 -21
  3. package/node_modules/@oozcitak/dom/README.md +0 -32
  4. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.d.ts +0 -21
  5. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js +0 -79
  6. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js.map +0 -1
  7. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.d.ts +0 -8
  8. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js +0 -23
  9. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js.map +0 -1
  10. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.d.ts +0 -8
  11. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js +0 -76
  12. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js.map +0 -1
  13. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.d.ts +0 -19
  14. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js +0 -140
  15. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js.map +0 -1
  16. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.d.ts +0 -192
  17. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js +0 -303
  18. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js.map +0 -1
  19. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.d.ts +0 -61
  20. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js +0 -108
  21. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js.map +0 -1
  22. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.d.ts +0 -72
  23. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js +0 -288
  24. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js.map +0 -1
  25. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.d.ts +0 -21
  26. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js +0 -61
  27. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js.map +0 -1
  28. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.d.ts +0 -29
  29. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js +0 -161
  30. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js.map +0 -1
  31. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.d.ts +0 -121
  32. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js +0 -608
  33. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js.map +0 -1
  34. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.d.ts +0 -146
  35. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js +0 -995
  36. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js.map +0 -1
  37. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.d.ts +0 -33
  38. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js +0 -142
  39. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js.map +0 -1
  40. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.d.ts +0 -66
  41. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js +0 -1173
  42. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js.map +0 -1
  43. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.d.ts +0 -43
  44. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js +0 -276
  45. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js.map +0 -1
  46. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.d.ts +0 -25
  47. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js +0 -85
  48. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js.map +0 -1
  49. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.d.ts +0 -68
  50. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js +0 -543
  51. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js.map +0 -1
  52. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.d.ts +0 -15
  53. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js +0 -105
  54. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js.map +0 -1
  55. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.d.ts +0 -27
  56. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js +0 -125
  57. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js.map +0 -1
  58. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.d.ts +0 -9
  59. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js +0 -69
  60. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js.map +0 -1
  61. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.d.ts +0 -82
  62. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js +0 -829
  63. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js.map +0 -1
  64. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.d.ts +0 -8
  65. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js +0 -21
  66. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js.map +0 -1
  67. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.d.ts +0 -57
  68. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js +0 -316
  69. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js.map +0 -1
  70. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.d.ts +0 -30
  71. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js +0 -226
  72. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js.map +0 -1
  73. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.d.ts +0 -8
  74. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js +0 -62
  75. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js.map +0 -1
  76. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.d.ts +0 -268
  77. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js +0 -853
  78. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js.map +0 -1
  79. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.d.ts +0 -17
  80. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js +0 -147
  81. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js.map +0 -1
  82. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.d.ts +0 -8
  83. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js +0 -14
  84. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js.map +0 -1
  85. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.d.ts +0 -25
  86. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js +0 -164
  87. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js.map +0 -1
  88. package/node_modules/@oozcitak/dom/lib/algorithm/index.d.ts +0 -28
  89. package/node_modules/@oozcitak/dom/lib/algorithm/index.js +0 -34
  90. package/node_modules/@oozcitak/dom/lib/algorithm/index.js.map +0 -1
  91. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.d.ts +0 -15
  92. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js +0 -32
  93. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js.map +0 -1
  94. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.d.ts +0 -23
  95. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js +0 -59
  96. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js.map +0 -1
  97. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.d.ts +0 -23
  98. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js +0 -70
  99. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js.map +0 -1
  100. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.d.ts +0 -45
  101. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js +0 -118
  102. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js.map +0 -1
  103. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.d.ts +0 -21
  104. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js +0 -51
  105. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js.map +0 -1
  106. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.d.ts +0 -35
  107. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js +0 -132
  108. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js.map +0 -1
  109. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.d.ts +0 -16
  110. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js +0 -165
  111. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js.map +0 -1
  112. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.d.ts +0 -21
  113. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js +0 -52
  114. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js.map +0 -1
  115. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.d.ts +0 -16
  116. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js +0 -60
  117. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js.map +0 -1
  118. package/node_modules/@oozcitak/dom/lib/dom/DOMException.d.ts +0 -171
  119. package/node_modules/@oozcitak/dom/lib/dom/DOMException.js +0 -347
  120. package/node_modules/@oozcitak/dom/lib/dom/DOMException.js.map +0 -1
  121. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.d.ts +0 -48
  122. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js +0 -100
  123. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js.map +0 -1
  124. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.d.ts +0 -29
  125. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js +0 -149
  126. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js.map +0 -1
  127. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.d.ts +0 -46
  128. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js +0 -312
  129. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js.map +0 -1
  130. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.d.ts +0 -32
  131. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js +0 -103
  132. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js.map +0 -1
  133. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.d.ts +0 -116
  134. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js +0 -545
  135. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js.map +0 -1
  136. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.d.ts +0 -11
  137. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js +0 -17
  138. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js.map +0 -1
  139. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.d.ts +0 -39
  140. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js +0 -109
  141. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js.map +0 -1
  142. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.d.ts +0 -132
  143. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js +0 -714
  144. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js.map +0 -1
  145. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.d.ts +0 -74
  146. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.js +0 -313
  147. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.js.map +0 -1
  148. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.d.ts +0 -30
  149. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js +0 -133
  150. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js.map +0 -1
  151. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.d.ts +0 -44
  152. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js +0 -157
  153. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js.map +0 -1
  154. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.d.ts +0 -22
  155. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js +0 -184
  156. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js.map +0 -1
  157. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.d.ts +0 -73
  158. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js +0 -116
  159. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js.map +0 -1
  160. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.d.ts +0 -34
  161. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js +0 -112
  162. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js.map +0 -1
  163. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.d.ts +0 -50
  164. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js +0 -64
  165. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js.map +0 -1
  166. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.d.ts +0 -252
  167. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js +0 -891
  168. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js.map +0 -1
  169. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.d.ts +0 -34
  170. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js +0 -86
  171. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js.map +0 -1
  172. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.d.ts +0 -46
  173. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js +0 -198
  174. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js.map +0 -1
  175. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.d.ts +0 -49
  176. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js +0 -188
  177. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js.map +0 -1
  178. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.d.ts +0 -12
  179. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js +0 -53
  180. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js.map +0 -1
  181. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.d.ts +0 -9
  182. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js +0 -31
  183. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js.map +0 -1
  184. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.d.ts +0 -24
  185. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js +0 -158
  186. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js.map +0 -1
  187. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.d.ts +0 -25
  188. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js +0 -59
  189. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js.map +0 -1
  190. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.d.ts +0 -71
  191. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js +0 -649
  192. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js.map +0 -1
  193. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.d.ts +0 -33
  194. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js +0 -82
  195. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js.map +0 -1
  196. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.d.ts +0 -16
  197. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js +0 -35
  198. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js.map +0 -1
  199. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.d.ts +0 -13
  200. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js +0 -48
  201. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js.map +0 -1
  202. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.d.ts +0 -28
  203. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.js +0 -109
  204. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.js.map +0 -1
  205. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.d.ts +0 -23
  206. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js +0 -41
  207. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js.map +0 -1
  208. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.d.ts +0 -36
  209. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js +0 -249
  210. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js.map +0 -1
  211. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.d.ts +0 -26
  212. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js +0 -57
  213. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js.map +0 -1
  214. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.d.ts +0 -11
  215. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js +0 -31
  216. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js.map +0 -1
  217. package/node_modules/@oozcitak/dom/lib/dom/index.d.ts +0 -36
  218. package/node_modules/@oozcitak/dom/lib/dom/index.js +0 -102
  219. package/node_modules/@oozcitak/dom/lib/dom/index.js.map +0 -1
  220. package/node_modules/@oozcitak/dom/lib/dom/interfaces.d.ts +0 -2218
  221. package/node_modules/@oozcitak/dom/lib/dom/interfaces.js +0 -91
  222. package/node_modules/@oozcitak/dom/lib/dom/interfaces.js.map +0 -1
  223. package/node_modules/@oozcitak/dom/lib/index.d.ts +0 -3
  224. package/node_modules/@oozcitak/dom/lib/index.js +0 -11
  225. package/node_modules/@oozcitak/dom/lib/index.js.map +0 -1
  226. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.d.ts +0 -11
  227. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js +0 -37
  228. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js.map +0 -1
  229. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.d.ts +0 -26
  230. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js +0 -240
  231. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js.map +0 -1
  232. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.d.ts +0 -159
  233. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js +0 -512
  234. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js.map +0 -1
  235. package/node_modules/@oozcitak/dom/lib/parser/index.d.ts +0 -1
  236. package/node_modules/@oozcitak/dom/lib/parser/index.js +0 -6
  237. package/node_modules/@oozcitak/dom/lib/parser/index.js.map +0 -1
  238. package/node_modules/@oozcitak/dom/lib/parser/interfaces.d.ts +0 -131
  239. package/node_modules/@oozcitak/dom/lib/parser/interfaces.js +0 -18
  240. package/node_modules/@oozcitak/dom/lib/parser/interfaces.js.map +0 -1
  241. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.d.ts +0 -27
  242. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js +0 -56
  243. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js.map +0 -1
  244. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.d.ts +0 -52
  245. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js +0 -151
  246. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js.map +0 -1
  247. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.d.ts +0 -166
  248. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js +0 -1479
  249. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js.map +0 -1
  250. package/node_modules/@oozcitak/dom/lib/serializer/index.d.ts +0 -1
  251. package/node_modules/@oozcitak/dom/lib/serializer/index.js +0 -6
  252. package/node_modules/@oozcitak/dom/lib/serializer/index.js.map +0 -1
  253. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.d.ts +0 -15
  254. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.js +0 -3
  255. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.js.map +0 -1
  256. package/node_modules/@oozcitak/dom/lib/util/Cast.d.ts +0 -12
  257. package/node_modules/@oozcitak/dom/lib/util/Cast.js +0 -26
  258. package/node_modules/@oozcitak/dom/lib/util/Cast.js.map +0 -1
  259. package/node_modules/@oozcitak/dom/lib/util/EmptySet.d.ts +0 -13
  260. package/node_modules/@oozcitak/dom/lib/util/EmptySet.js +0 -61
  261. package/node_modules/@oozcitak/dom/lib/util/EmptySet.js.map +0 -1
  262. package/node_modules/@oozcitak/dom/lib/util/Guard.d.ts +0 -135
  263. package/node_modules/@oozcitak/dom/lib/util/Guard.js +0 -192
  264. package/node_modules/@oozcitak/dom/lib/util/Guard.js.map +0 -1
  265. package/node_modules/@oozcitak/dom/lib/util/index.d.ts +0 -3
  266. package/node_modules/@oozcitak/dom/lib/util/index.js +0 -9
  267. package/node_modules/@oozcitak/dom/lib/util/index.js.map +0 -1
  268. package/node_modules/@oozcitak/dom/package.json +0 -72
  269. package/node_modules/@oozcitak/infra/LICENSE +0 -21
  270. package/node_modules/@oozcitak/infra/README.md +0 -13
  271. package/node_modules/@oozcitak/infra/lib/Base64.d.ts +0 -12
  272. package/node_modules/@oozcitak/infra/lib/Base64.js +0 -82
  273. package/node_modules/@oozcitak/infra/lib/Base64.js.map +0 -1
  274. package/node_modules/@oozcitak/infra/lib/Byte.d.ts +0 -6
  275. package/node_modules/@oozcitak/infra/lib/Byte.js +0 -15
  276. package/node_modules/@oozcitak/infra/lib/Byte.js.map +0 -1
  277. package/node_modules/@oozcitak/infra/lib/ByteSequence.d.ts +0 -45
  278. package/node_modules/@oozcitak/infra/lib/ByteSequence.js +0 -171
  279. package/node_modules/@oozcitak/infra/lib/ByteSequence.js.map +0 -1
  280. package/node_modules/@oozcitak/infra/lib/CodePoints.d.ts +0 -82
  281. package/node_modules/@oozcitak/infra/lib/CodePoints.js +0 -85
  282. package/node_modules/@oozcitak/infra/lib/CodePoints.js.map +0 -1
  283. package/node_modules/@oozcitak/infra/lib/JSON.d.ts +0 -24
  284. package/node_modules/@oozcitak/infra/lib/JSON.js +0 -123
  285. package/node_modules/@oozcitak/infra/lib/JSON.js.map +0 -1
  286. package/node_modules/@oozcitak/infra/lib/List.d.ts +0 -101
  287. package/node_modules/@oozcitak/infra/lib/List.js +0 -325
  288. package/node_modules/@oozcitak/infra/lib/List.js.map +0 -1
  289. package/node_modules/@oozcitak/infra/lib/Map.d.ts +0 -87
  290. package/node_modules/@oozcitak/infra/lib/Map.js +0 -308
  291. package/node_modules/@oozcitak/infra/lib/Map.js.map +0 -1
  292. package/node_modules/@oozcitak/infra/lib/Namespace.d.ts +0 -6
  293. package/node_modules/@oozcitak/infra/lib/Namespace.js +0 -9
  294. package/node_modules/@oozcitak/infra/lib/Namespace.js.map +0 -1
  295. package/node_modules/@oozcitak/infra/lib/Queue.d.ts +0 -13
  296. package/node_modules/@oozcitak/infra/lib/Queue.js +0 -22
  297. package/node_modules/@oozcitak/infra/lib/Queue.js.map +0 -1
  298. package/node_modules/@oozcitak/infra/lib/Set.d.ts +0 -136
  299. package/node_modules/@oozcitak/infra/lib/Set.js +0 -467
  300. package/node_modules/@oozcitak/infra/lib/Set.js.map +0 -1
  301. package/node_modules/@oozcitak/infra/lib/Stack.d.ts +0 -13
  302. package/node_modules/@oozcitak/infra/lib/Stack.js +0 -22
  303. package/node_modules/@oozcitak/infra/lib/Stack.js.map +0 -1
  304. package/node_modules/@oozcitak/infra/lib/String.d.ts +0 -129
  305. package/node_modules/@oozcitak/infra/lib/String.js +0 -472
  306. package/node_modules/@oozcitak/infra/lib/String.js.map +0 -1
  307. package/node_modules/@oozcitak/infra/lib/index.d.ts +0 -13
  308. package/node_modules/@oozcitak/infra/lib/index.js +0 -34
  309. package/node_modules/@oozcitak/infra/lib/index.js.map +0 -1
  310. package/node_modules/@oozcitak/infra/package.json +0 -54
  311. package/node_modules/@oozcitak/url/LICENSE +0 -21
  312. package/node_modules/@oozcitak/url/README.md +0 -27
  313. package/node_modules/@oozcitak/url/lib/URLAlgorithm.d.ts +0 -267
  314. package/node_modules/@oozcitak/url/lib/URLAlgorithm.js +0 -2758
  315. package/node_modules/@oozcitak/url/lib/URLAlgorithm.js.map +0 -1
  316. package/node_modules/@oozcitak/url/lib/URLImpl.d.ts +0 -53
  317. package/node_modules/@oozcitak/url/lib/URLImpl.js +0 -377
  318. package/node_modules/@oozcitak/url/lib/URLImpl.js.map +0 -1
  319. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.d.ts +0 -38
  320. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js +0 -303
  321. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js.map +0 -1
  322. package/node_modules/@oozcitak/url/lib/index.d.ts +0 -2
  323. package/node_modules/@oozcitak/url/lib/index.js +0 -7
  324. package/node_modules/@oozcitak/url/lib/index.js.map +0 -1
  325. package/node_modules/@oozcitak/url/lib/interfaces.d.ts +0 -195
  326. package/node_modules/@oozcitak/url/lib/interfaces.js +0 -31
  327. package/node_modules/@oozcitak/url/lib/interfaces.js.map +0 -1
  328. package/node_modules/@oozcitak/url/package.json +0 -55
  329. package/node_modules/@oozcitak/util/LICENSE +0 -21
  330. package/node_modules/@oozcitak/util/README.md +0 -10
  331. package/node_modules/@oozcitak/util/lib/CompareCache.d.ts +0 -32
  332. package/node_modules/@oozcitak/util/lib/CompareCache.js +0 -59
  333. package/node_modules/@oozcitak/util/lib/CompareCache.js.map +0 -1
  334. package/node_modules/@oozcitak/util/lib/FixedSizeSet.d.ts +0 -64
  335. package/node_modules/@oozcitak/util/lib/FixedSizeSet.js +0 -174
  336. package/node_modules/@oozcitak/util/lib/FixedSizeSet.js.map +0 -1
  337. package/node_modules/@oozcitak/util/lib/Lazy.d.ts +0 -18
  338. package/node_modules/@oozcitak/util/lib/Lazy.js +0 -34
  339. package/node_modules/@oozcitak/util/lib/Lazy.js.map +0 -1
  340. package/node_modules/@oozcitak/util/lib/ObjectCache.d.ts +0 -71
  341. package/node_modules/@oozcitak/util/lib/ObjectCache.js +0 -181
  342. package/node_modules/@oozcitak/util/lib/ObjectCache.js.map +0 -1
  343. package/node_modules/@oozcitak/util/lib/StringWalker.d.ts +0 -49
  344. package/node_modules/@oozcitak/util/lib/StringWalker.js +0 -105
  345. package/node_modules/@oozcitak/util/lib/StringWalker.js.map +0 -1
  346. package/node_modules/@oozcitak/util/lib/index.d.ts +0 -178
  347. package/node_modules/@oozcitak/util/lib/index.js +0 -439
  348. package/node_modules/@oozcitak/util/lib/index.js.map +0 -1
  349. package/node_modules/@oozcitak/util/package.json +0 -50
  350. package/node_modules/@xmldom/is-dom-node/LICENSE.md +0 -21
  351. package/node_modules/@xmldom/is-dom-node/README.md +0 -91
  352. package/node_modules/@xmldom/is-dom-node/dist/index.d.ts +0 -33
  353. package/node_modules/@xmldom/is-dom-node/dist/index.js +0 -91
  354. package/node_modules/@xmldom/is-dom-node/dist/index.js.map +0 -1
  355. package/node_modules/@xmldom/is-dom-node/package.json +0 -69
  356. package/node_modules/@xmldom/xmldom/CHANGELOG.md +0 -468
  357. package/node_modules/@xmldom/xmldom/LICENSE +0 -8
  358. package/node_modules/@xmldom/xmldom/SECURITY.md +0 -50
  359. package/node_modules/@xmldom/xmldom/index.d.ts +0 -43
  360. package/node_modules/@xmldom/xmldom/lib/.eslintrc.yml +0 -2
  361. package/node_modules/@xmldom/xmldom/lib/conventions.js +0 -203
  362. package/node_modules/@xmldom/xmldom/lib/dom-parser.js +0 -322
  363. package/node_modules/@xmldom/xmldom/lib/dom.js +0 -1879
  364. package/node_modules/@xmldom/xmldom/lib/entities.js +0 -2166
  365. package/node_modules/@xmldom/xmldom/lib/index.js +0 -4
  366. package/node_modules/@xmldom/xmldom/lib/sax.js +0 -662
  367. package/node_modules/@xmldom/xmldom/package.json +0 -71
  368. package/node_modules/@xmldom/xmldom/readme.md +0 -356
  369. package/node_modules/esprima/ChangeLog +0 -235
  370. package/node_modules/esprima/LICENSE.BSD +0 -21
  371. package/node_modules/esprima/README.md +0 -46
  372. package/node_modules/esprima/bin/esparse.js +0 -139
  373. package/node_modules/esprima/bin/esvalidate.js +0 -236
  374. package/node_modules/esprima/dist/esprima.js +0 -6709
  375. package/node_modules/esprima/package.json +0 -112
  376. package/node_modules/node-forge/LICENSE +0 -331
  377. package/node_modules/node-forge/README.md +0 -2071
  378. package/node_modules/node-forge/dist/forge.all.min.js +0 -2
  379. package/node_modules/node-forge/dist/forge.all.min.js.map +0 -1
  380. package/node_modules/node-forge/dist/forge.min.js +0 -2
  381. package/node_modules/node-forge/dist/forge.min.js.map +0 -1
  382. package/node_modules/node-forge/dist/prime.worker.min.js +0 -2
  383. package/node_modules/node-forge/dist/prime.worker.min.js.map +0 -1
  384. package/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
  385. package/node_modules/node-forge/lib/aes.js +0 -1091
  386. package/node_modules/node-forge/lib/aesCipherSuites.js +0 -282
  387. package/node_modules/node-forge/lib/asn1-validator.js +0 -91
  388. package/node_modules/node-forge/lib/asn1.js +0 -1503
  389. package/node_modules/node-forge/lib/baseN.js +0 -186
  390. package/node_modules/node-forge/lib/cipher.js +0 -230
  391. package/node_modules/node-forge/lib/cipherModes.js +0 -999
  392. package/node_modules/node-forge/lib/des.js +0 -496
  393. package/node_modules/node-forge/lib/ed25519.js +0 -1072
  394. package/node_modules/node-forge/lib/forge.js +0 -13
  395. package/node_modules/node-forge/lib/form.js +0 -149
  396. package/node_modules/node-forge/lib/hmac.js +0 -146
  397. package/node_modules/node-forge/lib/http.js +0 -1346
  398. package/node_modules/node-forge/lib/index.all.js +0 -16
  399. package/node_modules/node-forge/lib/index.js +0 -33
  400. package/node_modules/node-forge/lib/jsbn.js +0 -1264
  401. package/node_modules/node-forge/lib/kem.js +0 -168
  402. package/node_modules/node-forge/lib/log.js +0 -319
  403. package/node_modules/node-forge/lib/md.all.js +0 -13
  404. package/node_modules/node-forge/lib/md.js +0 -11
  405. package/node_modules/node-forge/lib/md5.js +0 -289
  406. package/node_modules/node-forge/lib/mgf.js +0 -12
  407. package/node_modules/node-forge/lib/mgf1.js +0 -57
  408. package/node_modules/node-forge/lib/oids.js +0 -179
  409. package/node_modules/node-forge/lib/pbe.js +0 -1023
  410. package/node_modules/node-forge/lib/pbkdf2.js +0 -211
  411. package/node_modules/node-forge/lib/pem.js +0 -237
  412. package/node_modules/node-forge/lib/pkcs1.js +0 -276
  413. package/node_modules/node-forge/lib/pkcs12.js +0 -1078
  414. package/node_modules/node-forge/lib/pkcs7.js +0 -1260
  415. package/node_modules/node-forge/lib/pkcs7asn1.js +0 -410
  416. package/node_modules/node-forge/lib/pki.js +0 -102
  417. package/node_modules/node-forge/lib/prime.js +0 -297
  418. package/node_modules/node-forge/lib/prime.worker.js +0 -168
  419. package/node_modules/node-forge/lib/prng.js +0 -419
  420. package/node_modules/node-forge/lib/pss.js +0 -241
  421. package/node_modules/node-forge/lib/random.js +0 -191
  422. package/node_modules/node-forge/lib/rc2.js +0 -410
  423. package/node_modules/node-forge/lib/rsa.js +0 -1949
  424. package/node_modules/node-forge/lib/sha1.js +0 -319
  425. package/node_modules/node-forge/lib/sha256.js +0 -327
  426. package/node_modules/node-forge/lib/sha512.js +0 -561
  427. package/node_modules/node-forge/lib/socket.js +0 -287
  428. package/node_modules/node-forge/lib/ssh.js +0 -236
  429. package/node_modules/node-forge/lib/tls.js +0 -4282
  430. package/node_modules/node-forge/lib/tlssocket.js +0 -249
  431. package/node_modules/node-forge/lib/util.js +0 -2652
  432. package/node_modules/node-forge/lib/x509.js +0 -3242
  433. package/node_modules/node-forge/lib/xhr.js +0 -738
  434. package/node_modules/node-forge/package.json +0 -123
  435. package/node_modules/sprintf-js/.npmignore +0 -1
  436. package/node_modules/sprintf-js/LICENSE +0 -24
  437. package/node_modules/sprintf-js/README.md +0 -88
  438. package/node_modules/sprintf-js/bower.json +0 -14
  439. package/node_modules/sprintf-js/demo/angular.html +0 -20
  440. package/node_modules/sprintf-js/dist/angular-sprintf.min.js +0 -4
  441. package/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +0 -1
  442. package/node_modules/sprintf-js/dist/angular-sprintf.min.map +0 -1
  443. package/node_modules/sprintf-js/dist/sprintf.min.js +0 -4
  444. package/node_modules/sprintf-js/dist/sprintf.min.js.map +0 -1
  445. package/node_modules/sprintf-js/dist/sprintf.min.map +0 -1
  446. package/node_modules/sprintf-js/gruntfile.js +0 -36
  447. package/node_modules/sprintf-js/package.json +0 -22
  448. package/node_modules/sprintf-js/src/angular-sprintf.js +0 -18
  449. package/node_modules/sprintf-js/src/sprintf.js +0 -208
  450. package/node_modules/sprintf-js/test/test.js +0 -82
  451. package/node_modules/xml-crypto/LICENSE +0 -22
  452. package/node_modules/xml-crypto/README.md +0 -557
  453. package/node_modules/xml-crypto/lib/c14n-canonicalization.d.ts +0 -39
  454. package/node_modules/xml-crypto/lib/c14n-canonicalization.js +0 -230
  455. package/node_modules/xml-crypto/lib/c14n-canonicalization.js.map +0 -1
  456. package/node_modules/xml-crypto/lib/enveloped-signature.d.ts +0 -7
  457. package/node_modules/xml-crypto/lib/enveloped-signature.js +0 -43
  458. package/node_modules/xml-crypto/lib/enveloped-signature.js.map +0 -1
  459. package/node_modules/xml-crypto/lib/exclusive-canonicalization.d.ts +0 -38
  460. package/node_modules/xml-crypto/lib/exclusive-canonicalization.js +0 -246
  461. package/node_modules/xml-crypto/lib/exclusive-canonicalization.js.map +0 -1
  462. package/node_modules/xml-crypto/lib/hash-algorithms.d.ts +0 -13
  463. package/node_modules/xml-crypto/lib/hash-algorithms.js +0 -47
  464. package/node_modules/xml-crypto/lib/hash-algorithms.js.map +0 -1
  465. package/node_modules/xml-crypto/lib/index.d.ts +0 -5
  466. package/node_modules/xml-crypto/lib/index.js +0 -28
  467. package/node_modules/xml-crypto/lib/index.js.map +0 -1
  468. package/node_modules/xml-crypto/lib/signature-algorithms.d.ts +0 -47
  469. package/node_modules/xml-crypto/lib/signature-algorithms.js +0 -86
  470. package/node_modules/xml-crypto/lib/signature-algorithms.js.map +0 -1
  471. package/node_modules/xml-crypto/lib/signed-xml.d.ts +0 -225
  472. package/node_modules/xml-crypto/lib/signed-xml.js +0 -960
  473. package/node_modules/xml-crypto/lib/signed-xml.js.map +0 -1
  474. package/node_modules/xml-crypto/lib/types.d.ts +0 -125
  475. package/node_modules/xml-crypto/lib/types.js +0 -57
  476. package/node_modules/xml-crypto/lib/types.js.map +0 -1
  477. package/node_modules/xml-crypto/lib/utils.d.ts +0 -65
  478. package/node_modules/xml-crypto/lib/utils.js +0 -256
  479. package/node_modules/xml-crypto/lib/utils.js.map +0 -1
  480. package/node_modules/xml-crypto/node_modules/xpath/LICENSE +0 -22
  481. package/node_modules/xml-crypto/node_modules/xpath/README.md +0 -133
  482. package/node_modules/xml-crypto/node_modules/xpath/docs/XPathEvaluator.md +0 -62
  483. package/node_modules/xml-crypto/node_modules/xpath/docs/XPathResult.md +0 -47
  484. package/node_modules/xml-crypto/node_modules/xpath/docs/function resolvers.md +0 -88
  485. package/node_modules/xml-crypto/node_modules/xpath/docs/namespace resolvers.md +0 -69
  486. package/node_modules/xml-crypto/node_modules/xpath/docs/parsed expressions.md +0 -21
  487. package/node_modules/xml-crypto/node_modules/xpath/docs/variable resolvers.md +0 -89
  488. package/node_modules/xml-crypto/node_modules/xpath/docs/xpath methods.md +0 -39
  489. package/node_modules/xml-crypto/node_modules/xpath/package.json +0 -39
  490. package/node_modules/xml-crypto/node_modules/xpath/test.js +0 -1186
  491. package/node_modules/xml-crypto/node_modules/xpath/xpath.d.ts +0 -51
  492. package/node_modules/xml-crypto/node_modules/xpath/xpath.js +0 -4938
  493. package/node_modules/xml-crypto/package.json +0 -73
  494. package/node_modules/xmlbuilder2/CHANGELOG.md +0 -309
  495. package/node_modules/xmlbuilder2/LICENSE +0 -21
  496. package/node_modules/xmlbuilder2/README.md +0 -183
  497. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.d.ts +0 -236
  498. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.js +0 -108
  499. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.js.map +0 -1
  500. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.d.ts +0 -17
  501. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.js +0 -26
  502. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.js.map +0 -1
  503. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.d.ts +0 -124
  504. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js +0 -782
  505. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js.map +0 -1
  506. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.d.ts +0 -143
  507. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.js +0 -841
  508. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.js.map +0 -1
  509. package/node_modules/xmlbuilder2/lib/builder/dom.d.ts +0 -8
  510. package/node_modules/xmlbuilder2/lib/builder/dom.js +0 -67
  511. package/node_modules/xmlbuilder2/lib/builder/dom.js.map +0 -1
  512. package/node_modules/xmlbuilder2/lib/builder/index.d.ts +0 -4
  513. package/node_modules/xmlbuilder2/lib/builder/index.js +0 -15
  514. package/node_modules/xmlbuilder2/lib/builder/index.js.map +0 -1
  515. package/node_modules/xmlbuilder2/lib/constants.d.ts +0 -1
  516. package/node_modules/xmlbuilder2/lib/constants.js +0 -4
  517. package/node_modules/xmlbuilder2/lib/constants.js.map +0 -1
  518. package/node_modules/xmlbuilder2/lib/index.d.ts +0 -1
  519. package/node_modules/xmlbuilder2/lib/index.js +0 -10
  520. package/node_modules/xmlbuilder2/lib/index.js.map +0 -1
  521. package/node_modules/xmlbuilder2/lib/interfaces.d.ts +0 -1355
  522. package/node_modules/xmlbuilder2/lib/interfaces.js +0 -76
  523. package/node_modules/xmlbuilder2/lib/interfaces.js.map +0 -1
  524. package/node_modules/xmlbuilder2/lib/readers/BaseReader.d.ts +0 -109
  525. package/node_modules/xmlbuilder2/lib/readers/BaseReader.js +0 -167
  526. package/node_modules/xmlbuilder2/lib/readers/BaseReader.js.map +0 -1
  527. package/node_modules/xmlbuilder2/lib/readers/JSONReader.d.ts +0 -14
  528. package/node_modules/xmlbuilder2/lib/readers/JSONReader.js +0 -38
  529. package/node_modules/xmlbuilder2/lib/readers/JSONReader.js.map +0 -1
  530. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.d.ts +0 -15
  531. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.js +0 -168
  532. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.js.map +0 -1
  533. package/node_modules/xmlbuilder2/lib/readers/XMLReader.d.ts +0 -14
  534. package/node_modules/xmlbuilder2/lib/readers/XMLReader.js +0 -206
  535. package/node_modules/xmlbuilder2/lib/readers/XMLReader.js.map +0 -1
  536. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.d.ts +0 -14
  537. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.js +0 -44
  538. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.js.map +0 -1
  539. package/node_modules/xmlbuilder2/lib/readers/index.d.ts +0 -4
  540. package/node_modules/xmlbuilder2/lib/readers/index.js +0 -11
  541. package/node_modules/xmlbuilder2/lib/readers/index.js.map +0 -1
  542. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.d.ts +0 -110
  543. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.js +0 -23
  544. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.js.map +0 -1
  545. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.d.ts +0 -276
  546. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.js +0 -1603
  547. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.js.map +0 -1
  548. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.d.ts +0 -68
  549. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.js +0 -172
  550. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.js.map +0 -1
  551. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.d.ts +0 -67
  552. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.js +0 -222
  553. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.js.map +0 -1
  554. package/node_modules/xmlbuilder2/lib/writers/MapWriter.d.ts +0 -27
  555. package/node_modules/xmlbuilder2/lib/writers/MapWriter.js +0 -84
  556. package/node_modules/xmlbuilder2/lib/writers/MapWriter.js.map +0 -1
  557. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.d.ts +0 -56
  558. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.js +0 -483
  559. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.js.map +0 -1
  560. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.d.ts +0 -51
  561. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.js +0 -165
  562. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.js.map +0 -1
  563. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.d.ts +0 -60
  564. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.js +0 -236
  565. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.js.map +0 -1
  566. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.d.ts +0 -61
  567. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.js +0 -161
  568. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.js.map +0 -1
  569. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.d.ts +0 -55
  570. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.js +0 -186
  571. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.js.map +0 -1
  572. package/node_modules/xmlbuilder2/lib/writers/index.d.ts +0 -5
  573. package/node_modules/xmlbuilder2/lib/writers/index.js +0 -13
  574. package/node_modules/xmlbuilder2/lib/writers/index.js.map +0 -1
  575. package/node_modules/xmlbuilder2/lib/xmlbuilder2.min.js +0 -8
  576. package/node_modules/xmlbuilder2/node_modules/argparse/CHANGELOG.md +0 -185
  577. package/node_modules/xmlbuilder2/node_modules/argparse/LICENSE +0 -21
  578. package/node_modules/xmlbuilder2/node_modules/argparse/README.md +0 -257
  579. package/node_modules/xmlbuilder2/node_modules/argparse/index.js +0 -3
  580. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/append/constant.js +0 -47
  581. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/append.js +0 -53
  582. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/count.js +0 -40
  583. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/help.js +0 -47
  584. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store/constant.js +0 -43
  585. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store/false.js +0 -27
  586. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store/true.js +0 -26
  587. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store.js +0 -50
  588. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/subparsers.js +0 -149
  589. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/version.js +0 -47
  590. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action.js +0 -146
  591. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action_container.js +0 -482
  592. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argparse.js +0 -14
  593. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument/error.js +0 -50
  594. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument/exclusive.js +0 -54
  595. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument/group.js +0 -75
  596. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument_parser.js +0 -1161
  597. package/node_modules/xmlbuilder2/node_modules/argparse/lib/const.js +0 -21
  598. package/node_modules/xmlbuilder2/node_modules/argparse/lib/help/added_formatters.js +0 -87
  599. package/node_modules/xmlbuilder2/node_modules/argparse/lib/help/formatter.js +0 -795
  600. package/node_modules/xmlbuilder2/node_modules/argparse/lib/namespace.js +0 -76
  601. package/node_modules/xmlbuilder2/node_modules/argparse/lib/utils.js +0 -57
  602. package/node_modules/xmlbuilder2/node_modules/argparse/package.json +0 -34
  603. package/node_modules/xmlbuilder2/node_modules/js-yaml/CHANGELOG.md +0 -557
  604. package/node_modules/xmlbuilder2/node_modules/js-yaml/LICENSE +0 -21
  605. package/node_modules/xmlbuilder2/node_modules/js-yaml/README.md +0 -299
  606. package/node_modules/xmlbuilder2/node_modules/js-yaml/bin/js-yaml.js +0 -132
  607. package/node_modules/xmlbuilder2/node_modules/js-yaml/dist/js-yaml.js +0 -3989
  608. package/node_modules/xmlbuilder2/node_modules/js-yaml/dist/js-yaml.min.js +0 -1
  609. package/node_modules/xmlbuilder2/node_modules/js-yaml/index.js +0 -7
  610. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/common.js +0 -59
  611. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/dumper.js +0 -850
  612. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/exception.js +0 -43
  613. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/loader.js +0 -1644
  614. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/mark.js +0 -76
  615. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/core.js +0 -18
  616. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +0 -25
  617. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +0 -28
  618. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +0 -17
  619. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/json.js +0 -25
  620. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema.js +0 -108
  621. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/binary.js +0 -138
  622. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/bool.js +0 -35
  623. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/float.js +0 -116
  624. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/int.js +0 -173
  625. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/function.js +0 -93
  626. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +0 -60
  627. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +0 -28
  628. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/map.js +0 -8
  629. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/merge.js +0 -12
  630. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/null.js +0 -34
  631. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/omap.js +0 -44
  632. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/pairs.js +0 -53
  633. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/seq.js +0 -8
  634. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/set.js +0 -29
  635. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/str.js +0 -8
  636. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +0 -88
  637. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type.js +0 -61
  638. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml.js +0 -39
  639. package/node_modules/xmlbuilder2/node_modules/js-yaml/package.json +0 -49
  640. package/node_modules/xmlbuilder2/package.json +0 -82
  641. package/node_modules/xpath/LICENSE +0 -22
  642. package/node_modules/xpath/README.md +0 -133
  643. package/node_modules/xpath/package.json +0 -43
  644. package/node_modules/xpath/xpath.d.ts +0 -51
  645. package/node_modules/xpath/xpath.js +0 -5041
@@ -1,1603 +0,0 @@
1
- "use strict";
2
- var __values = (this && this.__values) || function(o) {
3
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4
- if (m) return m.call(o);
5
- if (o && typeof o.length === "number") return {
6
- next: function () {
7
- if (o && i >= o.length) o = void 0;
8
- return { value: o && o[i++], done: !o };
9
- }
10
- };
11
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
12
- };
13
- var __read = (this && this.__read) || function (o, n) {
14
- var m = typeof Symbol === "function" && o[Symbol.iterator];
15
- if (!m) return o;
16
- var i = m.call(o), r, ar = [], e;
17
- try {
18
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
- }
20
- catch (error) { e = { error: error }; }
21
- finally {
22
- try {
23
- if (r && !r.done && (m = i["return"])) m.call(i);
24
- }
25
- finally { if (e) throw e.error; }
26
- }
27
- return ar;
28
- };
29
- var __spread = (this && this.__spread) || function () {
30
- for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
31
- return ar;
32
- };
33
- Object.defineProperty(exports, "__esModule", { value: true });
34
- var interfaces_1 = require("@oozcitak/dom/lib/dom/interfaces");
35
- var LocalNameSet_1 = require("@oozcitak/dom/lib/serializer/LocalNameSet");
36
- var NamespacePrefixMap_1 = require("@oozcitak/dom/lib/serializer/NamespacePrefixMap");
37
- var infra_1 = require("@oozcitak/infra");
38
- var algorithm_1 = require("@oozcitak/dom/lib/algorithm");
39
- var constants_1 = require("../constants");
40
- /**
41
- * Pre-serializes XML nodes.
42
- */
43
- var BaseWriter = /** @class */ (function () {
44
- /**
45
- * Initializes a new instance of `BaseWriter`.
46
- *
47
- * @param builderOptions - XML builder options
48
- */
49
- function BaseWriter(builderOptions) {
50
- /**
51
- * Gets the current depth of the XML tree.
52
- */
53
- this.level = 0;
54
- this._builderOptions = builderOptions;
55
- }
56
- /**
57
- * Used by derived classes to serialize the XML declaration.
58
- *
59
- * @param version - a version number string
60
- * @param encoding - encoding declaration
61
- * @param standalone - standalone document declaration
62
- */
63
- BaseWriter.prototype.declaration = function (version, encoding, standalone) { };
64
- /**
65
- * Used by derived classes to serialize a DocType node.
66
- *
67
- * @param name - node name
68
- * @param publicId - public identifier
69
- * @param systemId - system identifier
70
- */
71
- BaseWriter.prototype.docType = function (name, publicId, systemId) { };
72
- /**
73
- * Used by derived classes to serialize a comment node.
74
- *
75
- * @param data - node data
76
- */
77
- BaseWriter.prototype.comment = function (data) { };
78
- /**
79
- * Used by derived classes to serialize a text node.
80
- *
81
- * @param data - node data
82
- */
83
- BaseWriter.prototype.text = function (data) { };
84
- /**
85
- * Used by derived classes to serialize a processing instruction node.
86
- *
87
- * @param target - instruction target
88
- * @param data - node data
89
- */
90
- BaseWriter.prototype.instruction = function (target, data) { };
91
- /**
92
- * Used by derived classes to serialize a CData section node.
93
- *
94
- * @param data - node data
95
- */
96
- BaseWriter.prototype.cdata = function (data) { };
97
- /**
98
- * Used by derived classes to serialize the beginning of the opening tag of an
99
- * element node.
100
- *
101
- * @param name - node name
102
- */
103
- BaseWriter.prototype.openTagBegin = function (name) { };
104
- /**
105
- * Used by derived classes to serialize the ending of the opening tag of an
106
- * element node.
107
- *
108
- * @param name - node name
109
- * @param selfClosing - whether the element node is self closing
110
- * @param voidElement - whether the element node is a HTML void element
111
- */
112
- BaseWriter.prototype.openTagEnd = function (name, selfClosing, voidElement) { };
113
- /**
114
- * Used by derived classes to serialize the closing tag of an element node.
115
- *
116
- * @param name - node name
117
- */
118
- BaseWriter.prototype.closeTag = function (name) { };
119
- /**
120
- * Used by derived classes to serialize attributes or namespace declarations.
121
- *
122
- * @param attributes - attribute array
123
- */
124
- BaseWriter.prototype.attributes = function (attributes) {
125
- var e_1, _a;
126
- try {
127
- for (var attributes_1 = __values(attributes), attributes_1_1 = attributes_1.next(); !attributes_1_1.done; attributes_1_1 = attributes_1.next()) {
128
- var attr = attributes_1_1.value;
129
- this.attribute(attr[1] === null ? attr[2] : attr[1] + ':' + attr[2], attr[3]);
130
- }
131
- }
132
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
133
- finally {
134
- try {
135
- if (attributes_1_1 && !attributes_1_1.done && (_a = attributes_1.return)) _a.call(attributes_1);
136
- }
137
- finally { if (e_1) throw e_1.error; }
138
- }
139
- };
140
- /**
141
- * Used by derived classes to serialize an attribute or namespace declaration.
142
- *
143
- * @param name - node name
144
- * @param value - node value
145
- */
146
- BaseWriter.prototype.attribute = function (name, value) { };
147
- /**
148
- * Used by derived classes to perform any pre-processing steps before starting
149
- * serializing an element node.
150
- *
151
- * @param name - node name
152
- */
153
- BaseWriter.prototype.beginElement = function (name) { };
154
- /**
155
- * Used by derived classes to perform any post-processing steps after
156
- * completing serializing an element node.
157
- *
158
- * @param name - node name
159
- */
160
- BaseWriter.prototype.endElement = function (name) { };
161
- /**
162
- * Produces an XML serialization of the given node. The pre-serializer inserts
163
- * namespace declarations where necessary and produces qualified names for
164
- * nodes and attributes.
165
- *
166
- * @param node - node to serialize
167
- * @param requireWellFormed - whether to check conformance
168
- */
169
- BaseWriter.prototype.serializeNode = function (node, requireWellFormed) {
170
- var hasNamespaces = (node._nodeDocument !== undefined && node._nodeDocument._hasNamespaces);
171
- this.level = 0;
172
- this.currentNode = node;
173
- if (hasNamespaces) {
174
- /** From: https://w3c.github.io/DOM-Parsing/#xml-serialization
175
- *
176
- * 1. Let namespace be a context namespace with value null.
177
- * The context namespace tracks the XML serialization algorithm's current
178
- * default namespace. The context namespace is changed when either an Element
179
- * Node has a default namespace declaration, or the algorithm generates a
180
- * default namespace declaration for the Element Node to match its own
181
- * namespace. The algorithm assumes no namespace (null) to start.
182
- * 2. Let prefix map be a new namespace prefix map.
183
- * 3. Add the XML namespace with prefix value "xml" to prefix map.
184
- * 4. Let prefix index be a generated namespace prefix index with value 1.
185
- * The generated namespace prefix index is used to generate a new unique
186
- * prefix value when no suitable existing namespace prefix is available to
187
- * serialize a node's namespaceURI (or the namespaceURI of one of node's
188
- * attributes). See the generate a prefix algorithm.
189
- */
190
- var namespace = null;
191
- var prefixMap = new NamespacePrefixMap_1.NamespacePrefixMap();
192
- prefixMap.set("xml", infra_1.namespace.XML);
193
- var prefixIndex = { value: 1 };
194
- /**
195
- * 5. Return the result of running the XML serialization algorithm on node
196
- * passing the context namespace namespace, namespace prefix map prefix map,
197
- * generated namespace prefix index reference to prefix index, and the
198
- * flag require well-formed. If an exception occurs during the execution
199
- * of the algorithm, then catch that exception and throw an
200
- * "InvalidStateError" DOMException.
201
- */
202
- this._serializeNodeNS(node, namespace, prefixMap, prefixIndex, requireWellFormed);
203
- }
204
- else {
205
- this._serializeNode(node, requireWellFormed);
206
- }
207
- };
208
- /**
209
- * Produces an XML serialization of a node.
210
- *
211
- * @param node - node to serialize
212
- * @param namespace - context namespace
213
- * @param prefixMap - namespace prefix map
214
- * @param prefixIndex - generated namespace prefix index
215
- * @param requireWellFormed - whether to check conformance
216
- */
217
- BaseWriter.prototype._serializeNodeNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) {
218
- this.currentNode = node;
219
- switch (node.nodeType) {
220
- case interfaces_1.NodeType.Element:
221
- this._serializeElementNS(node, namespace, prefixMap, prefixIndex, requireWellFormed);
222
- break;
223
- case interfaces_1.NodeType.Document:
224
- this._serializeDocumentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed);
225
- break;
226
- case interfaces_1.NodeType.Comment:
227
- this._serializeComment(node, requireWellFormed);
228
- break;
229
- case interfaces_1.NodeType.Text:
230
- this._serializeText(node, requireWellFormed);
231
- break;
232
- case interfaces_1.NodeType.DocumentFragment:
233
- this._serializeDocumentFragmentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed);
234
- break;
235
- case interfaces_1.NodeType.DocumentType:
236
- this._serializeDocumentType(node, requireWellFormed);
237
- break;
238
- case interfaces_1.NodeType.ProcessingInstruction:
239
- this._serializeProcessingInstruction(node, requireWellFormed);
240
- break;
241
- case interfaces_1.NodeType.CData:
242
- this._serializeCData(node, requireWellFormed);
243
- break;
244
- default:
245
- throw new Error("Unknown node type: " + node.nodeType);
246
- }
247
- };
248
- /**
249
- * Produces an XML serialization of a node.
250
- *
251
- * @param node - node to serialize
252
- * @param requireWellFormed - whether to check conformance
253
- */
254
- BaseWriter.prototype._serializeNode = function (node, requireWellFormed) {
255
- this.currentNode = node;
256
- switch (node.nodeType) {
257
- case interfaces_1.NodeType.Element:
258
- this._serializeElement(node, requireWellFormed);
259
- break;
260
- case interfaces_1.NodeType.Document:
261
- this._serializeDocument(node, requireWellFormed);
262
- break;
263
- case interfaces_1.NodeType.Comment:
264
- this._serializeComment(node, requireWellFormed);
265
- break;
266
- case interfaces_1.NodeType.Text:
267
- this._serializeText(node, requireWellFormed);
268
- break;
269
- case interfaces_1.NodeType.DocumentFragment:
270
- this._serializeDocumentFragment(node, requireWellFormed);
271
- break;
272
- case interfaces_1.NodeType.DocumentType:
273
- this._serializeDocumentType(node, requireWellFormed);
274
- break;
275
- case interfaces_1.NodeType.ProcessingInstruction:
276
- this._serializeProcessingInstruction(node, requireWellFormed);
277
- break;
278
- case interfaces_1.NodeType.CData:
279
- this._serializeCData(node, requireWellFormed);
280
- break;
281
- default:
282
- throw new Error("Unknown node type: " + node.nodeType);
283
- }
284
- };
285
- /**
286
- * Produces an XML serialization of an element node.
287
- *
288
- * @param node - node to serialize
289
- * @param namespace - context namespace
290
- * @param prefixMap - namespace prefix map
291
- * @param prefixIndex - generated namespace prefix index
292
- * @param requireWellFormed - whether to check conformance
293
- */
294
- BaseWriter.prototype._serializeElementNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) {
295
- var e_2, _a;
296
- var attributes = [];
297
- /**
298
- * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node
299
- *
300
- * 1. If the require well-formed flag is set (its value is true), and this
301
- * node's localName attribute contains the character ":" (U+003A COLON) or
302
- * does not match the XML Name production, then throw an exception; the
303
- * serialization of this node would not be a well-formed element.
304
- */
305
- if (requireWellFormed && (node.localName.indexOf(":") !== -1 ||
306
- !algorithm_1.xml_isName(node.localName))) {
307
- throw new Error("Node local name contains invalid characters (well-formed required).");
308
- }
309
- /**
310
- * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN).
311
- * 3. Let qualified name be an empty string.
312
- * 4. Let skip end tag be a boolean flag with value false.
313
- * 5. Let ignore namespace definition attribute be a boolean flag with value
314
- * false.
315
- * 6. Given prefix map, copy a namespace prefix map and let map be the
316
- * result.
317
- * 7. Let local prefixes map be an empty map. The map has unique Node prefix
318
- * strings as its keys, with corresponding namespaceURI Node values as the
319
- * map's key values (in this map, the null namespace is represented by the
320
- * empty string).
321
- *
322
- * _Note:_ This map is local to each element. It is used to ensure there
323
- * are no conflicting prefixes should a new namespace prefix attribute need
324
- * to be generated. It is also used to enable skipping of duplicate prefix
325
- * definitions when writing an element's attributes: the map allows the
326
- * algorithm to distinguish between a prefix in the namespace prefix map
327
- * that might be locally-defined (to the current Element) and one that is
328
- * not.
329
- * 8. Let local default namespace be the result of recording the namespace
330
- * information for node given map and local prefixes map.
331
- *
332
- * _Note:_ The above step will update map with any found namespace prefix
333
- * definitions, add the found prefix definitions to the local prefixes map
334
- * and return a local default namespace value defined by a default namespace
335
- * attribute if one exists. Otherwise it returns null.
336
- * 9. Let inherited ns be a copy of namespace.
337
- * 10. Let ns be the value of node's namespaceURI attribute.
338
- */
339
- var qualifiedName = '';
340
- var skipEndTag = false;
341
- var ignoreNamespaceDefinitionAttribute = false;
342
- var map = prefixMap.copy();
343
- var localPrefixesMap = {};
344
- var localDefaultNamespace = this._recordNamespaceInformation(node, map, localPrefixesMap);
345
- var inheritedNS = namespace;
346
- var ns = node.namespaceURI;
347
- /** 11. If inherited ns is equal to ns, then: */
348
- if (inheritedNS === ns) {
349
- /**
350
- * 11.1. If local default namespace is not null, then set ignore
351
- * namespace definition attribute to true.
352
- */
353
- if (localDefaultNamespace !== null) {
354
- ignoreNamespaceDefinitionAttribute = true;
355
- }
356
- /**
357
- * 11.2. If ns is the XML namespace, then append to qualified name the
358
- * concatenation of the string "xml:" and the value of node's localName.
359
- * 11.3. Otherwise, append to qualified name the value of node's
360
- * localName. The node's prefix if it exists, is dropped.
361
- */
362
- if (ns === infra_1.namespace.XML) {
363
- qualifiedName = 'xml:' + node.localName;
364
- }
365
- else {
366
- qualifiedName = node.localName;
367
- }
368
- /** 11.4. Append the value of qualified name to markup. */
369
- this.beginElement(qualifiedName);
370
- this.openTagBegin(qualifiedName);
371
- }
372
- else {
373
- /**
374
- * 12. Otherwise, inherited ns is not equal to ns (the node's own
375
- * namespace is different from the context namespace of its parent).
376
- * Run these sub-steps:
377
- *
378
- * 12.1. Let prefix be the value of node's prefix attribute.
379
- * 12.2. Let candidate prefix be the result of retrieving a preferred
380
- * prefix string prefix from map given namespace ns. The above may return
381
- * null if no namespace key ns exists in map.
382
- */
383
- var prefix = node.prefix;
384
- /**
385
- * We don't need to run "retrieving a preferred prefix string" algorithm if
386
- * the element has no prefix and its namespace matches to the default
387
- * namespace.
388
- * See: https://github.com/web-platform-tests/wpt/pull/16703
389
- */
390
- var candidatePrefix = null;
391
- if (prefix !== null || ns !== localDefaultNamespace) {
392
- candidatePrefix = map.get(prefix, ns);
393
- }
394
- /**
395
- * 12.3. If the value of prefix matches "xmlns", then run the following
396
- * steps:
397
- */
398
- if (prefix === "xmlns") {
399
- /**
400
- * 12.3.1. If the require well-formed flag is set, then throw an error.
401
- * An Element with prefix "xmlns" will not legally round-trip in a
402
- * conforming XML parser.
403
- */
404
- if (requireWellFormed) {
405
- throw new Error("An element cannot have the 'xmlns' prefix (well-formed required).");
406
- }
407
- /**
408
- * 12.3.2. Let candidate prefix be the value of prefix.
409
- */
410
- candidatePrefix = prefix;
411
- }
412
- /**
413
- * 12.4.Found a suitable namespace prefix: if candidate prefix is not
414
- * null (a namespace prefix is defined which maps to ns), then:
415
- */
416
- if (candidatePrefix !== null) {
417
- /**
418
- * The following may serialize a different prefix than the Element's
419
- * existing prefix if it already had one. However, the retrieving a
420
- * preferred prefix string algorithm already tried to match the
421
- * existing prefix if possible.
422
- *
423
- * 12.4.1. Append to qualified name the concatenation of candidate
424
- * prefix, ":" (U+003A COLON), and node's localName. There exists on
425
- * this node or the node's ancestry a namespace prefix definition that
426
- * defines the node's namespace.
427
- * 12.4.2. If the local default namespace is not null (there exists a
428
- * locally-defined default namespace declaration attribute) and its
429
- * value is not the XML namespace, then let inherited ns get the value
430
- * of local default namespace unless the local default namespace is the
431
- * empty string in which case let it get null (the context namespace
432
- * is changed to the declared default, rather than this node's own
433
- * namespace).
434
- *
435
- * _Note:_ Any default namespace definitions or namespace prefixes that
436
- * define the XML namespace are omitted when serializing this node's
437
- * attributes.
438
- */
439
- qualifiedName = candidatePrefix + ':' + node.localName;
440
- if (localDefaultNamespace !== null && localDefaultNamespace !== infra_1.namespace.XML) {
441
- inheritedNS = localDefaultNamespace || null;
442
- }
443
- /**
444
- * 12.4.3. Append the value of qualified name to markup.
445
- */
446
- this.beginElement(qualifiedName);
447
- this.openTagBegin(qualifiedName);
448
- /** 12.5. Otherwise, if prefix is not null, then: */
449
- }
450
- else if (prefix !== null) {
451
- /**
452
- * _Note:_ By this step, there is no namespace or prefix mapping
453
- * declaration in this node (or any parent node visited by this
454
- * algorithm) that defines prefix otherwise the step labelled Found
455
- * a suitable namespace prefix would have been followed. The sub-steps
456
- * that follow will create a new namespace prefix declaration for prefix
457
- * and ensure that prefix does not conflict with an existing namespace
458
- * prefix declaration of the same localName in node's attribute list.
459
- *
460
- * 12.5.1. If the local prefixes map contains a key matching prefix,
461
- * then let prefix be the result of generating a prefix providing as
462
- * input map, ns, and prefix index.
463
- */
464
- if (prefix in localPrefixesMap) {
465
- prefix = this._generatePrefix(ns, map, prefixIndex);
466
- }
467
- /**
468
- * 12.5.2. Add prefix to map given namespace ns.
469
- * 12.5.3. Append to qualified name the concatenation of prefix, ":"
470
- * (U+003A COLON), and node's localName.
471
- * 12.5.4. Append the value of qualified name to markup.
472
- */
473
- map.set(prefix, ns);
474
- qualifiedName += prefix + ':' + node.localName;
475
- this.beginElement(qualifiedName);
476
- this.openTagBegin(qualifiedName);
477
- /**
478
- * 12.5.5. Append the following to markup, in the order listed:
479
- *
480
- * _Note:_ The following serializes a namespace prefix declaration for
481
- * prefix which was just added to the map.
482
- *
483
- * 12.5.5.1. " " (U+0020 SPACE);
484
- * 12.5.5.2. The string "xmlns:";
485
- * 12.5.5.3. The value of prefix;
486
- * 12.5.5.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
487
- * 12.5.5.5. The result of serializing an attribute value given ns and
488
- * the require well-formed flag as input;
489
- * 12.5.5.6. """ (U+0022 QUOTATION MARK).
490
- */
491
- attributes.push([null, 'xmlns', prefix,
492
- this._serializeAttributeValue(ns, requireWellFormed)]);
493
- /**
494
- * 12.5.5.7. If local default namespace is not null (there exists a
495
- * locally-defined default namespace declaration attribute), then
496
- * let inherited ns get the value of local default namespace unless the
497
- * local default namespace is the empty string in which case let it get
498
- * null.
499
- */
500
- if (localDefaultNamespace !== null) {
501
- inheritedNS = localDefaultNamespace || null;
502
- }
503
- /**
504
- * 12.6. Otherwise, if local default namespace is null, or local
505
- * default namespace is not null and its value is not equal to ns, then:
506
- */
507
- }
508
- else if (localDefaultNamespace === null ||
509
- (localDefaultNamespace !== null && localDefaultNamespace !== ns)) {
510
- /**
511
- * _Note:_ At this point, the namespace for this node still needs to be
512
- * serialized, but there's no prefix (or candidate prefix) available; the
513
- * following uses the default namespace declaration to define the
514
- * namespace--optionally replacing an existing default declaration
515
- * if present.
516
- *
517
- * 12.6.1. Set the ignore namespace definition attribute flag to true.
518
- * 12.6.2. Append to qualified name the value of node's localName.
519
- * 12.6.3. Let the value of inherited ns be ns.
520
- *
521
- * _Note:_ The new default namespace will be used in the serialization
522
- * to define this node's namespace and act as the context namespace for
523
- * its children.
524
- */
525
- ignoreNamespaceDefinitionAttribute = true;
526
- qualifiedName += node.localName;
527
- inheritedNS = ns;
528
- /**
529
- * 12.6.4. Append the value of qualified name to markup.
530
- */
531
- this.beginElement(qualifiedName);
532
- this.openTagBegin(qualifiedName);
533
- /**
534
- * 12.6.5. Append the following to markup, in the order listed:
535
- *
536
- * _Note:_ The following serializes the new (or replacement) default
537
- * namespace definition.
538
- *
539
- * 12.6.5.1. " " (U+0020 SPACE);
540
- * 12.6.5.2. The string "xmlns";
541
- * 12.6.5.3. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
542
- * 12.6.5.4. The result of serializing an attribute value given ns
543
- * and the require well-formed flag as input;
544
- * 12.6.5.5. """ (U+0022 QUOTATION MARK).
545
- */
546
- attributes.push([null, null, 'xmlns',
547
- this._serializeAttributeValue(ns, requireWellFormed)]);
548
- /**
549
- * 12.7. Otherwise, the node has a local default namespace that matches
550
- * ns. Append to qualified name the value of node's localName, let the
551
- * value of inherited ns be ns, and append the value of qualified name
552
- * to markup.
553
- */
554
- }
555
- else {
556
- qualifiedName += node.localName;
557
- inheritedNS = ns;
558
- this.beginElement(qualifiedName);
559
- this.openTagBegin(qualifiedName);
560
- }
561
- }
562
- /**
563
- * 13. Append to markup the result of the XML serialization of node's
564
- * attributes given map, prefix index, local prefixes map, ignore namespace
565
- * definition attribute flag, and require well-formed flag.
566
- */
567
- attributes.push.apply(attributes, __spread(this._serializeAttributesNS(node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed)));
568
- this.attributes(attributes);
569
- /**
570
- * 14. If ns is the HTML namespace, and the node's list of children is
571
- * empty, and the node's localName matches any one of the following void
572
- * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed",
573
- * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta",
574
- * "param", "source", "track", "wbr"; then append the following to markup,
575
- * in the order listed:
576
- * 14.1. " " (U+0020 SPACE);
577
- * 14.2. "/" (U+002F SOLIDUS).
578
- * and set the skip end tag flag to true.
579
- * 15. If ns is not the HTML namespace, and the node's list of children is
580
- * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end
581
- * tag flag to true.
582
- * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup.
583
- */
584
- var isHTML = (ns === infra_1.namespace.HTML);
585
- if (isHTML && node.childNodes.length === 0 &&
586
- BaseWriter._VoidElementNames.has(node.localName)) {
587
- this.openTagEnd(qualifiedName, true, true);
588
- this.endElement(qualifiedName);
589
- skipEndTag = true;
590
- }
591
- else if (!isHTML && node.childNodes.length === 0) {
592
- this.openTagEnd(qualifiedName, true, false);
593
- this.endElement(qualifiedName);
594
- skipEndTag = true;
595
- }
596
- else {
597
- this.openTagEnd(qualifiedName, false, false);
598
- }
599
- /**
600
- * 17. If the value of skip end tag is true, then return the value of markup
601
- * and skip the remaining steps. The node is a leaf-node.
602
- */
603
- if (skipEndTag)
604
- return;
605
- /**
606
- * 18. If ns is the HTML namespace, and the node's localName matches the
607
- * string "template", then this is a template element. Append to markup the
608
- * result of XML serializing a DocumentFragment node given the template
609
- * element's template contents (a DocumentFragment), providing inherited
610
- * ns, map, prefix index, and the require well-formed flag.
611
- *
612
- * _Note:_ This allows template content to round-trip, given the rules for
613
- * parsing XHTML documents.
614
- *
615
- * 19. Otherwise, append to markup the result of running the XML
616
- * serialization algorithm on each of node's children, in tree order,
617
- * providing inherited ns, map, prefix index, and the require well-formed
618
- * flag.
619
- */
620
- if (isHTML && node.localName === "template") {
621
- // TODO: serialize template contents
622
- }
623
- else {
624
- try {
625
- for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
626
- var childNode = _c.value;
627
- this.level++;
628
- this._serializeNodeNS(childNode, inheritedNS, map, prefixIndex, requireWellFormed);
629
- this.level--;
630
- }
631
- }
632
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
633
- finally {
634
- try {
635
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
636
- }
637
- finally { if (e_2) throw e_2.error; }
638
- }
639
- }
640
- /**
641
- * 20. Append the following to markup, in the order listed:
642
- * 20.1. "</" (U+003C LESS-THAN SIGN, U+002F SOLIDUS);
643
- * 20.2. The value of qualified name;
644
- * 20.3. ">" (U+003E GREATER-THAN SIGN).
645
- * 21. Return the value of markup.
646
- */
647
- this.closeTag(qualifiedName);
648
- this.endElement(qualifiedName);
649
- };
650
- /**
651
- * Produces an XML serialization of an element node.
652
- *
653
- * @param node - node to serialize
654
- * @param requireWellFormed - whether to check conformance
655
- */
656
- BaseWriter.prototype._serializeElement = function (node, requireWellFormed) {
657
- var e_3, _a;
658
- /**
659
- * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node
660
- *
661
- * 1. If the require well-formed flag is set (its value is true), and this
662
- * node's localName attribute contains the character ":" (U+003A COLON) or
663
- * does not match the XML Name production, then throw an exception; the
664
- * serialization of this node would not be a well-formed element.
665
- */
666
- if (requireWellFormed && (node.localName.indexOf(":") !== -1 ||
667
- !algorithm_1.xml_isName(node.localName))) {
668
- throw new Error("Node local name contains invalid characters (well-formed required).");
669
- }
670
- /**
671
- * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN).
672
- * 3. Let qualified name be an empty string.
673
- * 4. Let skip end tag be a boolean flag with value false.
674
- * 5. Let ignore namespace definition attribute be a boolean flag with value
675
- * false.
676
- * 6. Given prefix map, copy a namespace prefix map and let map be the
677
- * result.
678
- * 7. Let local prefixes map be an empty map. The map has unique Node prefix
679
- * strings as its keys, with corresponding namespaceURI Node values as the
680
- * map's key values (in this map, the null namespace is represented by the
681
- * empty string).
682
- *
683
- * _Note:_ This map is local to each element. It is used to ensure there
684
- * are no conflicting prefixes should a new namespace prefix attribute need
685
- * to be generated. It is also used to enable skipping of duplicate prefix
686
- * definitions when writing an element's attributes: the map allows the
687
- * algorithm to distinguish between a prefix in the namespace prefix map
688
- * that might be locally-defined (to the current Element) and one that is
689
- * not.
690
- * 8. Let local default namespace be the result of recording the namespace
691
- * information for node given map and local prefixes map.
692
- *
693
- * _Note:_ The above step will update map with any found namespace prefix
694
- * definitions, add the found prefix definitions to the local prefixes map
695
- * and return a local default namespace value defined by a default namespace
696
- * attribute if one exists. Otherwise it returns null.
697
- * 9. Let inherited ns be a copy of namespace.
698
- * 10. Let ns be the value of node's namespaceURI attribute.
699
- */
700
- var skipEndTag = false;
701
- /** 11. If inherited ns is equal to ns, then: */
702
- /**
703
- * 11.1. If local default namespace is not null, then set ignore
704
- * namespace definition attribute to true.
705
- */
706
- /**
707
- * 11.2. If ns is the XML namespace, then append to qualified name the
708
- * concatenation of the string "xml:" and the value of node's localName.
709
- * 11.3. Otherwise, append to qualified name the value of node's
710
- * localName. The node's prefix if it exists, is dropped.
711
- */
712
- var qualifiedName = node.localName;
713
- /** 11.4. Append the value of qualified name to markup. */
714
- this.beginElement(qualifiedName);
715
- this.openTagBegin(qualifiedName);
716
- /**
717
- * 13. Append to markup the result of the XML serialization of node's
718
- * attributes given map, prefix index, local prefixes map, ignore namespace
719
- * definition attribute flag, and require well-formed flag.
720
- */
721
- var attributes = this._serializeAttributes(node, requireWellFormed);
722
- this.attributes(attributes);
723
- /**
724
- * 14. If ns is the HTML namespace, and the node's list of children is
725
- * empty, and the node's localName matches any one of the following void
726
- * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed",
727
- * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta",
728
- * "param", "source", "track", "wbr"; then append the following to markup,
729
- * in the order listed:
730
- * 14.1. " " (U+0020 SPACE);
731
- * 14.2. "/" (U+002F SOLIDUS).
732
- * and set the skip end tag flag to true.
733
- * 15. If ns is not the HTML namespace, and the node's list of children is
734
- * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end
735
- * tag flag to true.
736
- * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup.
737
- */
738
- if (!node.hasChildNodes()) {
739
- this.openTagEnd(qualifiedName, true, false);
740
- this.endElement(qualifiedName);
741
- skipEndTag = true;
742
- }
743
- else {
744
- this.openTagEnd(qualifiedName, false, false);
745
- }
746
- /**
747
- * 17. If the value of skip end tag is true, then return the value of markup
748
- * and skip the remaining steps. The node is a leaf-node.
749
- */
750
- if (skipEndTag)
751
- return;
752
- try {
753
- /**
754
- * 18. If ns is the HTML namespace, and the node's localName matches the
755
- * string "template", then this is a template element. Append to markup the
756
- * result of XML serializing a DocumentFragment node given the template
757
- * element's template contents (a DocumentFragment), providing inherited
758
- * ns, map, prefix index, and the require well-formed flag.
759
- *
760
- * _Note:_ This allows template content to round-trip, given the rules for
761
- * parsing XHTML documents.
762
- *
763
- * 19. Otherwise, append to markup the result of running the XML
764
- * serialization algorithm on each of node's children, in tree order,
765
- * providing inherited ns, map, prefix index, and the require well-formed
766
- * flag.
767
- */
768
- for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) {
769
- var childNode = _c.value;
770
- this.level++;
771
- this._serializeNode(childNode, requireWellFormed);
772
- this.level--;
773
- }
774
- }
775
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
776
- finally {
777
- try {
778
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
779
- }
780
- finally { if (e_3) throw e_3.error; }
781
- }
782
- /**
783
- * 20. Append the following to markup, in the order listed:
784
- * 20.1. "</" (U+003C LESS-THAN SIGN, U+002F SOLIDUS);
785
- * 20.2. The value of qualified name;
786
- * 20.3. ">" (U+003E GREATER-THAN SIGN).
787
- * 21. Return the value of markup.
788
- */
789
- this.closeTag(qualifiedName);
790
- this.endElement(qualifiedName);
791
- };
792
- /**
793
- * Produces an XML serialization of a document node.
794
- *
795
- * @param node - node to serialize
796
- * @param namespace - context namespace
797
- * @param prefixMap - namespace prefix map
798
- * @param prefixIndex - generated namespace prefix index
799
- * @param requireWellFormed - whether to check conformance
800
- */
801
- BaseWriter.prototype._serializeDocumentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) {
802
- var e_4, _a;
803
- /**
804
- * If the require well-formed flag is set (its value is true), and this node
805
- * has no documentElement (the documentElement attribute's value is null),
806
- * then throw an exception; the serialization of this node would not be a
807
- * well-formed document.
808
- */
809
- if (requireWellFormed && node.documentElement === null) {
810
- throw new Error("Missing document element (well-formed required).");
811
- }
812
- try {
813
- /**
814
- * Otherwise, run the following steps:
815
- * 1. Let serialized document be an empty string.
816
- * 2. For each child child of node, in tree order, run the XML
817
- * serialization algorithm on the child passing along the provided
818
- * arguments, and append the result to serialized document.
819
- *
820
- * _Note:_ This will serialize any number of ProcessingInstruction and
821
- * Comment nodes both before and after the Document's documentElement node,
822
- * including at most one DocumentType node. (Text nodes are not allowed as
823
- * children of the Document.)
824
- *
825
- * 3. Return the value of serialized document.
826
- */
827
- for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
828
- var childNode = _c.value;
829
- this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed);
830
- }
831
- }
832
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
833
- finally {
834
- try {
835
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
836
- }
837
- finally { if (e_4) throw e_4.error; }
838
- }
839
- };
840
- /**
841
- * Produces an XML serialization of a document node.
842
- *
843
- * @param node - node to serialize
844
- * @param requireWellFormed - whether to check conformance
845
- */
846
- BaseWriter.prototype._serializeDocument = function (node, requireWellFormed) {
847
- var e_5, _a;
848
- /**
849
- * If the require well-formed flag is set (its value is true), and this node
850
- * has no documentElement (the documentElement attribute's value is null),
851
- * then throw an exception; the serialization of this node would not be a
852
- * well-formed document.
853
- */
854
- if (requireWellFormed && node.documentElement === null) {
855
- throw new Error("Missing document element (well-formed required).");
856
- }
857
- try {
858
- /**
859
- * Otherwise, run the following steps:
860
- * 1. Let serialized document be an empty string.
861
- * 2. For each child child of node, in tree order, run the XML
862
- * serialization algorithm on the child passing along the provided
863
- * arguments, and append the result to serialized document.
864
- *
865
- * _Note:_ This will serialize any number of ProcessingInstruction and
866
- * Comment nodes both before and after the Document's documentElement node,
867
- * including at most one DocumentType node. (Text nodes are not allowed as
868
- * children of the Document.)
869
- *
870
- * 3. Return the value of serialized document.
871
- */
872
- for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) {
873
- var childNode = _c.value;
874
- this._serializeNode(childNode, requireWellFormed);
875
- }
876
- }
877
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
878
- finally {
879
- try {
880
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
881
- }
882
- finally { if (e_5) throw e_5.error; }
883
- }
884
- };
885
- /**
886
- * Produces an XML serialization of a comment node.
887
- *
888
- * @param node - node to serialize
889
- * @param requireWellFormed - whether to check conformance
890
- */
891
- BaseWriter.prototype._serializeComment = function (node, requireWellFormed) {
892
- /**
893
- * If the require well-formed flag is set (its value is true), and node's
894
- * data contains characters that are not matched by the XML Char production
895
- * or contains "--" (two adjacent U+002D HYPHEN-MINUS characters) or that
896
- * ends with a "-" (U+002D HYPHEN-MINUS) character, then throw an exception;
897
- * the serialization of this node's data would not be well-formed.
898
- */
899
- if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) ||
900
- node.data.indexOf("--") !== -1 || node.data.endsWith("-"))) {
901
- throw new Error("Comment data contains invalid characters (well-formed required).");
902
- }
903
- /**
904
- * Otherwise, return the concatenation of "<!--", node's data, and "-->".
905
- */
906
- this.comment(node.data);
907
- };
908
- /**
909
- * Produces an XML serialization of a text node.
910
- *
911
- * @param node - node to serialize
912
- * @param requireWellFormed - whether to check conformance
913
- * @param level - current depth of the XML tree
914
- */
915
- BaseWriter.prototype._serializeText = function (node, requireWellFormed) {
916
- /**
917
- * 1. If the require well-formed flag is set (its value is true), and
918
- * node's data contains characters that are not matched by the XML Char
919
- * production, then throw an exception; the serialization of this node's
920
- * data would not be well-formed.
921
- */
922
- if (requireWellFormed && !algorithm_1.xml_isLegalChar(node.data)) {
923
- throw new Error("Text data contains invalid characters (well-formed required).");
924
- }
925
- /**
926
- * 2. Let markup be the value of node's data.
927
- * 3. Replace any occurrences of "&" in markup by "&amp;".
928
- * 4. Replace any occurrences of "<" in markup by "&lt;".
929
- * 5. Replace any occurrences of ">" in markup by "&gt;".
930
- * 6. Return the value of markup.
931
- */
932
- var markup = node.data.replace(constants_1.nonEntityAmpersandRegex, '&amp;')
933
- .replace(/</g, '&lt;')
934
- .replace(/>/g, '&gt;');
935
- this.text(markup);
936
- };
937
- /**
938
- * Produces an XML serialization of a document fragment node.
939
- *
940
- * @param node - node to serialize
941
- * @param namespace - context namespace
942
- * @param prefixMap - namespace prefix map
943
- * @param prefixIndex - generated namespace prefix index
944
- * @param requireWellFormed - whether to check conformance
945
- */
946
- BaseWriter.prototype._serializeDocumentFragmentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) {
947
- var e_6, _a;
948
- try {
949
- /**
950
- * 1. Let markup the empty string.
951
- * 2. For each child child of node, in tree order, run the XML serialization
952
- * algorithm on the child given namespace, prefix map, a reference to prefix
953
- * index, and flag require well-formed. Concatenate the result to markup.
954
- * 3. Return the value of markup.
955
- */
956
- for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
957
- var childNode = _c.value;
958
- this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed);
959
- }
960
- }
961
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
962
- finally {
963
- try {
964
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
965
- }
966
- finally { if (e_6) throw e_6.error; }
967
- }
968
- };
969
- /**
970
- * Produces an XML serialization of a document fragment node.
971
- *
972
- * @param node - node to serialize
973
- * @param requireWellFormed - whether to check conformance
974
- */
975
- BaseWriter.prototype._serializeDocumentFragment = function (node, requireWellFormed) {
976
- var e_7, _a;
977
- try {
978
- /**
979
- * 1. Let markup the empty string.
980
- * 2. For each child child of node, in tree order, run the XML serialization
981
- * algorithm on the child given namespace, prefix map, a reference to prefix
982
- * index, and flag require well-formed. Concatenate the result to markup.
983
- * 3. Return the value of markup.
984
- */
985
- for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) {
986
- var childNode = _c.value;
987
- this._serializeNode(childNode, requireWellFormed);
988
- }
989
- }
990
- catch (e_7_1) { e_7 = { error: e_7_1 }; }
991
- finally {
992
- try {
993
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
994
- }
995
- finally { if (e_7) throw e_7.error; }
996
- }
997
- };
998
- /**
999
- * Produces an XML serialization of a document type node.
1000
- *
1001
- * @param node - node to serialize
1002
- * @param requireWellFormed - whether to check conformance
1003
- */
1004
- BaseWriter.prototype._serializeDocumentType = function (node, requireWellFormed) {
1005
- /**
1006
- * 1. If the require well-formed flag is true and the node's publicId
1007
- * attribute contains characters that are not matched by the XML PubidChar
1008
- * production, then throw an exception; the serialization of this node
1009
- * would not be a well-formed document type declaration.
1010
- */
1011
- if (requireWellFormed && !algorithm_1.xml_isPubidChar(node.publicId)) {
1012
- throw new Error("DocType public identifier does not match PubidChar construct (well-formed required).");
1013
- }
1014
- /**
1015
- * 2. If the require well-formed flag is true and the node's systemId
1016
- * attribute contains characters that are not matched by the XML Char
1017
- * production or that contains both a """ (U+0022 QUOTATION MARK) and a
1018
- * "'" (U+0027 APOSTROPHE), then throw an exception; the serialization
1019
- * of this node would not be a well-formed document type declaration.
1020
- */
1021
- if (requireWellFormed &&
1022
- (!algorithm_1.xml_isLegalChar(node.systemId) ||
1023
- (node.systemId.indexOf('"') !== -1 && node.systemId.indexOf("'") !== -1))) {
1024
- throw new Error("DocType system identifier contains invalid characters (well-formed required).");
1025
- }
1026
- /**
1027
- * 3. Let markup be an empty string.
1028
- * 4. Append the string "<!DOCTYPE" to markup.
1029
- * 5. Append " " (U+0020 SPACE) to markup.
1030
- * 6. Append the value of the node's name attribute to markup. For a node
1031
- * belonging to an HTML document, the value will be all lowercase.
1032
- * 7. If the node's publicId is not the empty string then append the
1033
- * following, in the order listed, to markup:
1034
- * 7.1. " " (U+0020 SPACE);
1035
- * 7.2. The string "PUBLIC";
1036
- * 7.3. " " (U+0020 SPACE);
1037
- * 7.4. """ (U+0022 QUOTATION MARK);
1038
- * 7.5. The value of the node's publicId attribute;
1039
- * 7.6. """ (U+0022 QUOTATION MARK).
1040
- * 8. If the node's systemId is not the empty string and the node's publicId
1041
- * is set to the empty string, then append the following, in the order
1042
- * listed, to markup:
1043
- * 8.1. " " (U+0020 SPACE);
1044
- * 8.2. The string "SYSTEM".
1045
- * 9. If the node's systemId is not the empty string then append the
1046
- * following, in the order listed, to markup:
1047
- * 9.2. " " (U+0020 SPACE);
1048
- * 9.3. """ (U+0022 QUOTATION MARK);
1049
- * 9.3. The value of the node's systemId attribute;
1050
- * 9.4. """ (U+0022 QUOTATION MARK).
1051
- * 10. Append ">" (U+003E GREATER-THAN SIGN) to markup.
1052
- * 11. Return the value of markup.
1053
- */
1054
- this.docType(node.name, node.publicId, node.systemId);
1055
- };
1056
- /**
1057
- * Produces an XML serialization of a processing instruction node.
1058
- *
1059
- * @param node - node to serialize
1060
- * @param requireWellFormed - whether to check conformance
1061
- */
1062
- BaseWriter.prototype._serializeProcessingInstruction = function (node, requireWellFormed) {
1063
- /**
1064
- * 1. If the require well-formed flag is set (its value is true), and node's
1065
- * target contains a ":" (U+003A COLON) character or is an ASCII
1066
- * case-insensitive match for the string "xml", then throw an exception;
1067
- * the serialization of this node's target would not be well-formed.
1068
- */
1069
- if (requireWellFormed && (node.target.indexOf(":") !== -1 || (/^xml$/i).test(node.target))) {
1070
- throw new Error("Processing instruction target contains invalid characters (well-formed required).");
1071
- }
1072
- /**
1073
- * 2. If the require well-formed flag is set (its value is true), and node's
1074
- * data contains characters that are not matched by the XML Char production
1075
- * or contains the string "?>" (U+003F QUESTION MARK,
1076
- * U+003E GREATER-THAN SIGN), then throw an exception; the serialization of
1077
- * this node's data would not be well-formed.
1078
- */
1079
- if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) ||
1080
- node.data.indexOf("?>") !== -1)) {
1081
- throw new Error("Processing instruction data contains invalid characters (well-formed required).");
1082
- }
1083
- /**
1084
- * 3. Let markup be the concatenation of the following, in the order listed:
1085
- * 3.1. "<?" (U+003C LESS-THAN SIGN, U+003F QUESTION MARK);
1086
- * 3.2. The value of node's target;
1087
- * 3.3. " " (U+0020 SPACE);
1088
- * 3.4. The value of node's data;
1089
- * 3.5. "?>" (U+003F QUESTION MARK, U+003E GREATER-THAN SIGN).
1090
- * 4. Return the value of markup.
1091
- */
1092
- this.instruction(node.target, node.data);
1093
- };
1094
- /**
1095
- * Produces an XML serialization of a CDATA node.
1096
- *
1097
- * @param node - node to serialize
1098
- * @param requireWellFormed - whether to check conformance
1099
- */
1100
- BaseWriter.prototype._serializeCData = function (node, requireWellFormed) {
1101
- if (requireWellFormed && (node.data.indexOf("]]>") !== -1)) {
1102
- throw new Error("CDATA contains invalid characters (well-formed required).");
1103
- }
1104
- this.cdata(node.data);
1105
- };
1106
- /**
1107
- * Produces an XML serialization of the attributes of an element node.
1108
- *
1109
- * @param node - node to serialize
1110
- * @param map - namespace prefix map
1111
- * @param prefixIndex - generated namespace prefix index
1112
- * @param localPrefixesMap - local prefixes map
1113
- * @param ignoreNamespaceDefinitionAttribute - whether to ignore namespace
1114
- * attributes
1115
- * @param requireWellFormed - whether to check conformance
1116
- */
1117
- BaseWriter.prototype._serializeAttributesNS = function (node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed) {
1118
- var e_8, _a;
1119
- /**
1120
- * 1. Let result be the empty string.
1121
- * 2. Let localname set be a new empty namespace localname set. This
1122
- * localname set will contain tuples of unique attribute namespaceURI and
1123
- * localName pairs, and is populated as each attr is processed. This set is
1124
- * used to [optionally] enforce the well-formed constraint that an element
1125
- * cannot have two attributes with the same namespaceURI and localName.
1126
- * This can occur when two otherwise identical attributes on the same
1127
- * element differ only by their prefix values.
1128
- */
1129
- var result = [];
1130
- var localNameSet = requireWellFormed ? new LocalNameSet_1.LocalNameSet() : undefined;
1131
- try {
1132
- /**
1133
- * 3. Loop: For each attribute attr in element's attributes, in the order
1134
- * they are specified in the element's attribute list:
1135
- */
1136
- for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
1137
- var attr = _c.value;
1138
- // Optimize common case
1139
- if (!requireWellFormed && !ignoreNamespaceDefinitionAttribute && attr.namespaceURI === null) {
1140
- result.push([null, null, attr.localName,
1141
- this._serializeAttributeValue(attr.value, requireWellFormed)]);
1142
- continue;
1143
- }
1144
- /**
1145
- * 3.1. If the require well-formed flag is set (its value is true), and the
1146
- * localname set contains a tuple whose values match those of a new tuple
1147
- * consisting of attr's namespaceURI attribute and localName attribute,
1148
- * then throw an exception; the serialization of this attr would fail to
1149
- * produce a well-formed element serialization.
1150
- */
1151
- if (requireWellFormed && localNameSet && localNameSet.has(attr.namespaceURI, attr.localName)) {
1152
- throw new Error("Element contains duplicate attributes (well-formed required).");
1153
- }
1154
- /**
1155
- * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and
1156
- * localName attribute, and add it to the localname set.
1157
- * 3.3. Let attribute namespace be the value of attr's namespaceURI value.
1158
- * 3.4. Let candidate prefix be null.
1159
- */
1160
- if (requireWellFormed && localNameSet)
1161
- localNameSet.set(attr.namespaceURI, attr.localName);
1162
- var attributeNamespace = attr.namespaceURI;
1163
- var candidatePrefix = null;
1164
- /** 3.5. If attribute namespace is not null, then run these sub-steps: */
1165
- if (attributeNamespace !== null) {
1166
- /**
1167
- * 3.5.1. Let candidate prefix be the result of retrieving a preferred
1168
- * prefix string from map given namespace attribute namespace with
1169
- * preferred prefix being attr's prefix value.
1170
- */
1171
- candidatePrefix = map.get(attr.prefix, attributeNamespace);
1172
- /**
1173
- * 3.5.2. If the value of attribute namespace is the XMLNS namespace,
1174
- * then run these steps:
1175
- */
1176
- if (attributeNamespace === infra_1.namespace.XMLNS) {
1177
- /**
1178
- * 3.5.2.1. If any of the following are true, then stop running these
1179
- * steps and goto Loop to visit the next attribute:
1180
- * - the attr's value is the XML namespace;
1181
- * _Note:_ The XML namespace cannot be redeclared and survive
1182
- * round-tripping (unless it defines the prefix "xml"). To avoid this
1183
- * problem, this algorithm always prefixes elements in the XML
1184
- * namespace with "xml" and drops any related definitions as seen
1185
- * in the above condition.
1186
- * - the attr's prefix is null and the ignore namespace definition
1187
- * attribute flag is true (the Element's default namespace attribute
1188
- * should be skipped);
1189
- * - the attr's prefix is not null and either
1190
- * * the attr's localName is not a key contained in the local
1191
- * prefixes map, or
1192
- * * the attr's localName is present in the local prefixes map but
1193
- * the value of the key does not match attr's value
1194
- * and furthermore that the attr's localName (as the prefix to find)
1195
- * is found in the namespace prefix map given the namespace consisting
1196
- * of the attr's value (the current namespace prefix definition was
1197
- * exactly defined previously--on an ancestor element not the current
1198
- * element whose attributes are being processed).
1199
- */
1200
- if (attr.value === infra_1.namespace.XML ||
1201
- (attr.prefix === null && ignoreNamespaceDefinitionAttribute) ||
1202
- (attr.prefix !== null && (!(attr.localName in localPrefixesMap) ||
1203
- localPrefixesMap[attr.localName] !== attr.value) &&
1204
- map.has(attr.localName, attr.value)))
1205
- continue;
1206
- /**
1207
- * 3.5.2.2. If the require well-formed flag is set (its value is true),
1208
- * and the value of attr's value attribute matches the XMLNS
1209
- * namespace, then throw an exception; the serialization of this
1210
- * attribute would produce invalid XML because the XMLNS namespace
1211
- * is reserved and cannot be applied as an element's namespace via
1212
- * XML parsing.
1213
- *
1214
- * _Note:_ DOM APIs do allow creation of elements in the XMLNS
1215
- * namespace but with strict qualifications.
1216
- */
1217
- if (requireWellFormed && attr.value === infra_1.namespace.XMLNS) {
1218
- throw new Error("XMLNS namespace is reserved (well-formed required).");
1219
- }
1220
- /**
1221
- * 3.5.2.3. If the require well-formed flag is set (its value is true),
1222
- * and the value of attr's value attribute is the empty string, then
1223
- * throw an exception; namespace prefix declarations cannot be used
1224
- * to undeclare a namespace (use a default namespace declaration
1225
- * instead).
1226
- */
1227
- if (requireWellFormed && attr.value === '') {
1228
- throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).");
1229
- }
1230
- /**
1231
- * 3.5.2.4. the attr's prefix matches the string "xmlns", then let
1232
- * candidate prefix be the string "xmlns".
1233
- */
1234
- if (attr.prefix === 'xmlns')
1235
- candidatePrefix = 'xmlns';
1236
- /**
1237
- * 3.5.3. Otherwise, the attribute namespace is not the XMLNS namespace.
1238
- * Run these steps:
1239
- *
1240
- * _Note:_ The (candidatePrefix === null) check is not in the spec.
1241
- * We deviate from the spec here. Otherwise a prefix is generated for
1242
- * all attributes with namespaces.
1243
- */
1244
- }
1245
- else if (candidatePrefix === null) {
1246
- if (attr.prefix !== null &&
1247
- (!map.hasPrefix(attr.prefix) ||
1248
- map.has(attr.prefix, attributeNamespace))) {
1249
- /**
1250
- * Check if we can use the attribute's own prefix.
1251
- * We deviate from the spec here.
1252
- * TODO: This is not an efficient way of searching for prefixes.
1253
- * Follow developments to the spec.
1254
- */
1255
- candidatePrefix = attr.prefix;
1256
- }
1257
- else {
1258
- /**
1259
- * 3.5.3.1. Let candidate prefix be the result of generating a prefix
1260
- * providing map, attribute namespace, and prefix index as input.
1261
- */
1262
- candidatePrefix = this._generatePrefix(attributeNamespace, map, prefixIndex);
1263
- }
1264
- /**
1265
- * 3.5.3.2. Append the following to result, in the order listed:
1266
- * 3.5.3.2.1. " " (U+0020 SPACE);
1267
- * 3.5.3.2.2. The string "xmlns:";
1268
- * 3.5.3.2.3. The value of candidate prefix;
1269
- * 3.5.3.2.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
1270
- * 3.5.3.2.5. The result of serializing an attribute value given
1271
- * attribute namespace and the require well-formed flag as input;
1272
- * 3.5.3.2.6. """ (U+0022 QUOTATION MARK).
1273
- */
1274
- result.push([null, "xmlns", candidatePrefix,
1275
- this._serializeAttributeValue(attributeNamespace, requireWellFormed)]);
1276
- }
1277
- }
1278
- /**
1279
- * 3.6. Append a " " (U+0020 SPACE) to result.
1280
- * 3.7. If candidate prefix is not null, then append to result the
1281
- * concatenation of candidate prefix with ":" (U+003A COLON).
1282
- */
1283
- var attrName = '';
1284
- if (candidatePrefix !== null) {
1285
- attrName = candidatePrefix;
1286
- }
1287
- /**
1288
- * 3.8. If the require well-formed flag is set (its value is true), and
1289
- * this attr's localName attribute contains the character
1290
- * ":" (U+003A COLON) or does not match the XML Name production or
1291
- * equals "xmlns" and attribute namespace is null, then throw an
1292
- * exception; the serialization of this attr would not be a
1293
- * well-formed attribute.
1294
- */
1295
- if (requireWellFormed && (attr.localName.indexOf(":") !== -1 ||
1296
- !algorithm_1.xml_isName(attr.localName) ||
1297
- (attr.localName === "xmlns" && attributeNamespace === null))) {
1298
- throw new Error("Attribute local name contains invalid characters (well-formed required).");
1299
- }
1300
- /**
1301
- * 3.9. Append the following strings to result, in the order listed:
1302
- * 3.9.1. The value of attr's localName;
1303
- * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
1304
- * 3.9.3. The result of serializing an attribute value given attr's value
1305
- * attribute and the require well-formed flag as input;
1306
- * 3.9.4. """ (U+0022 QUOTATION MARK).
1307
- */
1308
- result.push([attributeNamespace, candidatePrefix, attr.localName,
1309
- this._serializeAttributeValue(attr.value, requireWellFormed)]);
1310
- }
1311
- }
1312
- catch (e_8_1) { e_8 = { error: e_8_1 }; }
1313
- finally {
1314
- try {
1315
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1316
- }
1317
- finally { if (e_8) throw e_8.error; }
1318
- }
1319
- /**
1320
- * 4. Return the value of result.
1321
- */
1322
- return result;
1323
- };
1324
- /**
1325
- * Produces an XML serialization of the attributes of an element node.
1326
- *
1327
- * @param node - node to serialize
1328
- * @param requireWellFormed - whether to check conformance
1329
- */
1330
- BaseWriter.prototype._serializeAttributes = function (node, requireWellFormed) {
1331
- var e_9, _a;
1332
- /**
1333
- * 1. Let result be the empty string.
1334
- * 2. Let localname set be a new empty namespace localname set. This
1335
- * localname set will contain tuples of unique attribute namespaceURI and
1336
- * localName pairs, and is populated as each attr is processed. This set is
1337
- * used to [optionally] enforce the well-formed constraint that an element
1338
- * cannot have two attributes with the same namespaceURI and localName.
1339
- * This can occur when two otherwise identical attributes on the same
1340
- * element differ only by their prefix values.
1341
- */
1342
- var result = [];
1343
- var localNameSet = requireWellFormed ? {} : undefined;
1344
- try {
1345
- /**
1346
- * 3. Loop: For each attribute attr in element's attributes, in the order
1347
- * they are specified in the element's attribute list:
1348
- */
1349
- for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
1350
- var attr = _c.value;
1351
- // Optimize common case
1352
- if (!requireWellFormed) {
1353
- result.push([null, null, attr.localName,
1354
- this._serializeAttributeValue(attr.value, requireWellFormed)]);
1355
- continue;
1356
- }
1357
- /**
1358
- * 3.1. If the require well-formed flag is set (its value is true), and the
1359
- * localname set contains a tuple whose values match those of a new tuple
1360
- * consisting of attr's namespaceURI attribute and localName attribute,
1361
- * then throw an exception; the serialization of this attr would fail to
1362
- * produce a well-formed element serialization.
1363
- */
1364
- if (requireWellFormed && localNameSet && (attr.localName in localNameSet)) {
1365
- throw new Error("Element contains duplicate attributes (well-formed required).");
1366
- }
1367
- /**
1368
- * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and
1369
- * localName attribute, and add it to the localname set.
1370
- * 3.3. Let attribute namespace be the value of attr's namespaceURI value.
1371
- * 3.4. Let candidate prefix be null.
1372
- */
1373
- /* istanbul ignore else */
1374
- if (requireWellFormed && localNameSet)
1375
- localNameSet[attr.localName] = true;
1376
- /** 3.5. If attribute namespace is not null, then run these sub-steps: */
1377
- /**
1378
- * 3.6. Append a " " (U+0020 SPACE) to result.
1379
- * 3.7. If candidate prefix is not null, then append to result the
1380
- * concatenation of candidate prefix with ":" (U+003A COLON).
1381
- */
1382
- /**
1383
- * 3.8. If the require well-formed flag is set (its value is true), and
1384
- * this attr's localName attribute contains the character
1385
- * ":" (U+003A COLON) or does not match the XML Name production or
1386
- * equals "xmlns" and attribute namespace is null, then throw an
1387
- * exception; the serialization of this attr would not be a
1388
- * well-formed attribute.
1389
- */
1390
- if (requireWellFormed && (attr.localName.indexOf(":") !== -1 ||
1391
- !algorithm_1.xml_isName(attr.localName))) {
1392
- throw new Error("Attribute local name contains invalid characters (well-formed required).");
1393
- }
1394
- /**
1395
- * 3.9. Append the following strings to result, in the order listed:
1396
- * 3.9.1. The value of attr's localName;
1397
- * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
1398
- * 3.9.3. The result of serializing an attribute value given attr's value
1399
- * attribute and the require well-formed flag as input;
1400
- * 3.9.4. """ (U+0022 QUOTATION MARK).
1401
- */
1402
- result.push([null, null, attr.localName,
1403
- this._serializeAttributeValue(attr.value, requireWellFormed)]);
1404
- }
1405
- }
1406
- catch (e_9_1) { e_9 = { error: e_9_1 }; }
1407
- finally {
1408
- try {
1409
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1410
- }
1411
- finally { if (e_9) throw e_9.error; }
1412
- }
1413
- /**
1414
- * 4. Return the value of result.
1415
- */
1416
- return result;
1417
- };
1418
- /**
1419
- * Records namespace information for the given element and returns the
1420
- * default namespace attribute value.
1421
- *
1422
- * @param node - element node to process
1423
- * @param map - namespace prefix map
1424
- * @param localPrefixesMap - local prefixes map
1425
- */
1426
- BaseWriter.prototype._recordNamespaceInformation = function (node, map, localPrefixesMap) {
1427
- var e_10, _a;
1428
- /**
1429
- * 1. Let default namespace attr value be null.
1430
- */
1431
- var defaultNamespaceAttrValue = null;
1432
- try {
1433
- /**
1434
- * 2. Main: For each attribute attr in element's attributes, in the order
1435
- * they are specified in the element's attribute list:
1436
- */
1437
- for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
1438
- var attr = _c.value;
1439
- /**
1440
- * _Note:_ The following conditional steps find namespace prefixes. Only
1441
- * attributes in the XMLNS namespace are considered (e.g., attributes made
1442
- * to look like namespace declarations via
1443
- * setAttribute("xmlns:pretend-prefix", "pretend-namespace") are not
1444
- * included).
1445
- */
1446
- /** 2.1. Let attribute namespace be the value of attr's namespaceURI value. */
1447
- var attributeNamespace = attr.namespaceURI;
1448
- /** 2.2. Let attribute prefix be the value of attr's prefix. */
1449
- var attributePrefix = attr.prefix;
1450
- /** 2.3. If the attribute namespace is the XMLNS namespace, then: */
1451
- if (attributeNamespace === infra_1.namespace.XMLNS) {
1452
- /**
1453
- * 2.3.1. If attribute prefix is null, then attr is a default namespace
1454
- * declaration. Set the default namespace attr value to attr's value and
1455
- * stop running these steps, returning to Main to visit the next
1456
- * attribute.
1457
- */
1458
- if (attributePrefix === null) {
1459
- defaultNamespaceAttrValue = attr.value;
1460
- continue;
1461
- /**
1462
- * 2.3.2. Otherwise, the attribute prefix is not null and attr is a
1463
- * namespace prefix definition. Run the following steps:
1464
- */
1465
- }
1466
- else {
1467
- /** 2.3.2.1. Let prefix definition be the value of attr's localName. */
1468
- var prefixDefinition = attr.localName;
1469
- /** 2.3.2.2. Let namespace definition be the value of attr's value. */
1470
- var namespaceDefinition = attr.value;
1471
- /**
1472
- * 2.3.2.3. If namespace definition is the XML namespace, then stop
1473
- * running these steps, and return to Main to visit the next
1474
- * attribute.
1475
- *
1476
- * _Note:_ XML namespace definitions in prefixes are completely
1477
- * ignored (in order to avoid unnecessary work when there might be
1478
- * prefix conflicts). XML namespaced elements are always handled
1479
- * uniformly by prefixing (and overriding if necessary) the element's
1480
- * localname with the reserved "xml" prefix.
1481
- */
1482
- if (namespaceDefinition === infra_1.namespace.XML) {
1483
- continue;
1484
- }
1485
- /**
1486
- * 2.3.2.4. If namespace definition is the empty string (the
1487
- * declarative form of having no namespace), then let namespace
1488
- * definition be null instead.
1489
- */
1490
- if (namespaceDefinition === '') {
1491
- namespaceDefinition = null;
1492
- }
1493
- /**
1494
- * 2.3.2.5. If prefix definition is found in map given the namespace
1495
- * namespace definition, then stop running these steps, and return to
1496
- * Main to visit the next attribute.
1497
- *
1498
- * _Note:_ This step avoids adding duplicate prefix definitions for
1499
- * the same namespace in the map. This has the side-effect of avoiding
1500
- * later serialization of duplicate namespace prefix declarations in
1501
- * any descendant nodes.
1502
- */
1503
- if (map.has(prefixDefinition, namespaceDefinition)) {
1504
- continue;
1505
- }
1506
- /**
1507
- * 2.3.2.6. Add the prefix prefix definition to map given namespace
1508
- * namespace definition.
1509
- */
1510
- map.set(prefixDefinition, namespaceDefinition);
1511
- /**
1512
- * 2.3.2.7. Add the value of prefix definition as a new key to the
1513
- * local prefixes map, with the namespace definition as the key's
1514
- * value replacing the value of null with the empty string if
1515
- * applicable.
1516
- */
1517
- localPrefixesMap[prefixDefinition] = namespaceDefinition || '';
1518
- }
1519
- }
1520
- }
1521
- }
1522
- catch (e_10_1) { e_10 = { error: e_10_1 }; }
1523
- finally {
1524
- try {
1525
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1526
- }
1527
- finally { if (e_10) throw e_10.error; }
1528
- }
1529
- /**
1530
- * 3. Return the value of default namespace attr value.
1531
- *
1532
- * _Note:_ The empty string is a legitimate return value and is not
1533
- * converted to null.
1534
- */
1535
- return defaultNamespaceAttrValue;
1536
- };
1537
- /**
1538
- * Generates a new prefix for the given namespace.
1539
- *
1540
- * @param newNamespace - a namespace to generate prefix for
1541
- * @param prefixMap - namespace prefix map
1542
- * @param prefixIndex - generated namespace prefix index
1543
- */
1544
- BaseWriter.prototype._generatePrefix = function (newNamespace, prefixMap, prefixIndex) {
1545
- /**
1546
- * 1. Let generated prefix be the concatenation of the string "ns" and the
1547
- * current numerical value of prefix index.
1548
- * 2. Let the value of prefix index be incremented by one.
1549
- * 3. Add to map the generated prefix given the new namespace namespace.
1550
- * 4. Return the value of generated prefix.
1551
- */
1552
- var generatedPrefix = "ns" + prefixIndex.value.toString();
1553
- prefixIndex.value++;
1554
- prefixMap.set(generatedPrefix, newNamespace);
1555
- return generatedPrefix;
1556
- };
1557
- /**
1558
- * Produces an XML serialization of an attribute value.
1559
- *
1560
- * @param value - attribute value
1561
- * @param requireWellFormed - whether to check conformance
1562
- */
1563
- BaseWriter.prototype._serializeAttributeValue = function (value, requireWellFormed) {
1564
- /**
1565
- * From: https://w3c.github.io/DOM-Parsing/#dfn-serializing-an-attribute-value
1566
- *
1567
- * 1. If the require well-formed flag is set (its value is true), and
1568
- * attribute value contains characters that are not matched by the XML Char
1569
- * production, then throw an exception; the serialization of this attribute
1570
- * value would fail to produce a well-formed element serialization.
1571
- */
1572
- if (requireWellFormed && value !== null && !algorithm_1.xml_isLegalChar(value)) {
1573
- throw new Error("Invalid characters in attribute value.");
1574
- }
1575
- /**
1576
- * 2. If attribute value is null, then return the empty string.
1577
- */
1578
- if (value === null)
1579
- return "";
1580
- /**
1581
- * 3. Otherwise, attribute value is a string. Return the value of attribute
1582
- * value, first replacing any occurrences of the following:
1583
- * - "&" with "&amp;"
1584
- * - """ with "&quot;"
1585
- * - "<" with "&lt;"
1586
- * - ">" with "&gt;"
1587
- * NOTE
1588
- * This matches behavior present in browsers, and goes above and beyond the
1589
- * grammar requirement in the XML specification's AttValue production by
1590
- * also replacing ">" characters.
1591
- */
1592
- return value.replace(constants_1.nonEntityAmpersandRegex, '&amp;')
1593
- .replace(/</g, '&lt;')
1594
- .replace(/>/g, '&gt;')
1595
- .replace(/"/g, '&quot;');
1596
- };
1597
- BaseWriter._VoidElementNames = new Set(['area', 'base', 'basefont',
1598
- 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen',
1599
- 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']);
1600
- return BaseWriter;
1601
- }());
1602
- exports.BaseWriter = BaseWriter;
1603
- //# sourceMappingURL=BaseWriter.js.map