@costrict/csc 4.0.4 → 4.0.5-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (425) hide show
  1. package/README.md +398 -398
  2. package/dist/{chunk-kpdp2gz2.js → chunk-017h2t5s.js} +13 -13
  3. package/dist/{chunk-tg41r14s.js → chunk-01s11pzc.js} +5 -5
  4. package/dist/{chunk-yhjccrrs.js → chunk-03fgtmxr.js} +97 -97
  5. package/dist/{chunk-pn0k5wak.js → chunk-03qpgz7e.js} +749 -23
  6. package/dist/{chunk-zwna33ms.js → chunk-04gervaa.js} +36 -36
  7. package/dist/{chunk-xq3k2392.js → chunk-06vftkzj.js} +57 -57
  8. package/dist/{chunk-b4ftppkp.js → chunk-07qe00pw.js} +22 -22
  9. package/dist/{chunk-zwv3h48p.js → chunk-0bnr3avz.js} +3 -3
  10. package/dist/{chunk-gaz7te9m.js → chunk-0f0x7wey.js} +6 -6
  11. package/dist/{chunk-tw4tjc73.js → chunk-0jd3p53p.js} +1 -1
  12. package/dist/{chunk-waar1mpa.js → chunk-0mf8c3kx.js} +2 -3
  13. package/dist/{chunk-31959kp1.js → chunk-0t96xx6m.js} +5 -5
  14. package/dist/chunk-0vrstrej.js +40 -0
  15. package/dist/{chunk-epat31ss.js → chunk-0vwyh27q.js} +1 -1
  16. package/dist/{chunk-v4zejp1f.js → chunk-0wcjaby5.js} +57 -57
  17. package/dist/{chunk-bg86k3wz.js → chunk-0x2d0pvq.js} +83 -339
  18. package/dist/{chunk-smzahkka.js → chunk-0xfdnpd3.js} +4 -4
  19. package/dist/{chunk-bgptt4dd.js → chunk-0xkrxtvs.js} +56 -56
  20. package/dist/{chunk-w8ttjf01.js → chunk-0yncnctp.js} +183 -179
  21. package/dist/{chunk-m0yqzzgm.js → chunk-11hsxgtv.js} +2 -2
  22. package/dist/{chunk-6rrp0t66.js → chunk-1gj2ern2.js} +530 -1321
  23. package/dist/{chunk-zatd0y92.js → chunk-1nmcmem8.js} +5 -5
  24. package/dist/{chunk-3q10e1r5.js → chunk-22rbrd4c.js} +64 -64
  25. package/dist/{chunk-ds6b4567.js → chunk-25d4tsxt.js} +67 -67
  26. package/dist/{chunk-p6359g16.js → chunk-2625r3vm.js} +26 -26
  27. package/dist/{chunk-sqb7kkqx.js → chunk-262zh26y.js} +6 -6
  28. package/dist/{chunk-m5chmh67.js → chunk-2c0sn45e.js} +2 -2
  29. package/dist/{chunk-cb0cjgk3.js → chunk-2d3mes58.js} +56 -56
  30. package/dist/{chunk-4qcmn89e.js → chunk-2dhbfegz.js} +14 -17
  31. package/dist/{chunk-whs655k7.js → chunk-2dwsdnd5.js} +57 -57
  32. package/dist/{chunk-j1psatq5.js → chunk-2j59ksap.js} +3 -3
  33. package/dist/{chunk-pv6amr31.js → chunk-2kmmz00g.js} +1 -1
  34. package/dist/{chunk-nt36mbmr.js → chunk-2mtjmgq4.js} +14 -14
  35. package/dist/{chunk-j2ba3wye.js → chunk-2ne8qzyp.js} +22 -22
  36. package/dist/chunk-2xpkjfdd.js +94 -0
  37. package/dist/{chunk-eenv3551.js → chunk-30934n2w.js} +56 -56
  38. package/dist/{chunk-125xg82c.js → chunk-3a8yw7zy.js} +22 -22
  39. package/dist/{chunk-hhc28ga0.js → chunk-3aj8x8wh.js} +26 -26
  40. package/dist/{chunk-j5bved6z.js → chunk-3hk1e3s8.js} +61 -61
  41. package/dist/{chunk-b43rsa2d.js → chunk-3nys7146.js} +2 -2
  42. package/dist/{chunk-pbn6n0kg.js → chunk-3px6h32z.js} +56 -56
  43. package/dist/{chunk-bnznxckg.js → chunk-3rrf7vb7.js} +56 -56
  44. package/dist/{chunk-j2bv645h.js → chunk-3s96vaet.js} +9 -11
  45. package/dist/{chunk-8ew7s39b.js → chunk-3wdbgpa5.js} +1 -1
  46. package/dist/{chunk-a7bs51hq.js → chunk-423tyk90.js} +28 -28
  47. package/dist/{chunk-6zf34pgy.js → chunk-47sy4t29.js} +1 -1
  48. package/dist/{chunk-p2xfr5am.js → chunk-48qkvr25.js} +57 -57
  49. package/dist/{chunk-q4tkspkp.js → chunk-4bfe005x.js} +4 -4
  50. package/dist/{chunk-qdfzdcz3.js → chunk-4dn253dg.js} +60 -60
  51. package/dist/{chunk-r089a4na.js → chunk-4gv5n07n.js} +22 -22
  52. package/dist/{chunk-npvte75f.js → chunk-4jy4qv07.js} +5 -5
  53. package/dist/{chunk-n00sjrne.js → chunk-4m7gyesz.js} +6 -6
  54. package/dist/{chunk-90tgpdv5.js → chunk-4q954a7f.js} +3 -3
  55. package/dist/{chunk-7sgatxct.js → chunk-4qqswajh.js} +5 -5
  56. package/dist/{chunk-zwwgfs0j.js → chunk-4rwe8abn.js} +3 -3
  57. package/dist/{chunk-122wp3n9.js → chunk-4sfd9m3h.js} +2 -2
  58. package/dist/{chunk-q72weaf5.js → chunk-4tn9qqws.js} +829 -2177
  59. package/dist/{chunk-3d953efq.js → chunk-4wr994cr.js} +5 -5
  60. package/dist/{chunk-kaqp12mx.js → chunk-4xptxbxj.js} +56 -56
  61. package/dist/{chunk-9pp9xrw2.js → chunk-50fv6d8k.js} +14 -17
  62. package/dist/{chunk-fmq83t7h.js → chunk-50x6aec4.js} +3 -3
  63. package/dist/{chunk-9k7n4z3r.js → chunk-54nmt278.js} +5 -5
  64. package/dist/{chunk-kn9hzg11.js → chunk-5798ckxm.js} +3 -3
  65. package/dist/{chunk-m3szhhvz.js → chunk-5bb2bqwr.js} +58 -58
  66. package/dist/{chunk-63v197w4.js → chunk-5c6821w5.js} +56 -56
  67. package/dist/{chunk-vh70jg33.js → chunk-5kzpey2d.js} +4 -4
  68. package/dist/{chunk-4w4wdgeb.js → chunk-5nbjxyeb.js} +23 -23
  69. package/dist/{chunk-1sg2k4mx.js → chunk-5vdpbk46.js} +515 -515
  70. package/dist/{chunk-yhc1fee8.js → chunk-5vt3zdmw.js} +23 -23
  71. package/dist/{chunk-0gqymhpf.js → chunk-61ts87kf.js} +4 -4
  72. package/dist/{chunk-tjaexdr7.js → chunk-63cw4ef2.js} +56 -56
  73. package/dist/{chunk-9rtywfhp.js → chunk-64nsm3qd.js} +2 -2
  74. package/dist/{chunk-7mpdfrdm.js → chunk-656z4m7c.js} +5 -5
  75. package/dist/{chunk-h9ef6kkf.js → chunk-67xwtjkv.js} +5 -5
  76. package/dist/{chunk-8jpxzesa.js → chunk-67zpbdn4.js} +1 -1
  77. package/dist/{chunk-8vawdfrp.js → chunk-6c5zyga7.js} +3 -5
  78. package/dist/{chunk-mz0qfs55.js → chunk-6dj7qxgs.js} +63 -63
  79. package/dist/{chunk-jxyh3xyq.js → chunk-6e7m4qwa.js} +23 -23
  80. package/dist/{chunk-f6qh3vrn.js → chunk-6kw1svfr.js} +4 -4
  81. package/dist/{chunk-t1mtqz1e.js → chunk-6r247w4d.js} +1 -1
  82. package/dist/{chunk-4mygvv18.js → chunk-6rjtp4nk.js} +57 -57
  83. package/dist/{chunk-dct4myst.js → chunk-6yax8ef2.js} +57 -57
  84. package/dist/{chunk-ntwe4mq2.js → chunk-6zfse75g.js} +11 -11
  85. package/dist/{chunk-tz2rkx2s.js → chunk-71xc05s3.js} +3 -3
  86. package/dist/{chunk-2mmx9qqz.js → chunk-769r5are.js} +27 -27
  87. package/dist/{chunk-zf5wkcyy.js → chunk-7bme7hfa.js} +127 -1099
  88. package/dist/{chunk-ppa284pd.js → chunk-7h8yq9tw.js} +56 -56
  89. package/dist/{chunk-sx291v4f.js → chunk-7mkddxxm.js} +63 -63
  90. package/dist/{chunk-9m27g5s1.js → chunk-7njxy9q8.js} +18 -3
  91. package/dist/{chunk-vdh36rw7.js → chunk-7pdhxye3.js} +3 -3
  92. package/dist/{chunk-zpm1rpmw.js → chunk-7q2pgeny.js} +16 -16
  93. package/dist/{chunk-f16qs2ag.js → chunk-7r37a4t0.js} +56 -56
  94. package/dist/{chunk-skxa5fes.js → chunk-7sk1sscc.js} +14 -16
  95. package/dist/{chunk-b3behs0y.js → chunk-7wqgtnxf.js} +3 -3
  96. package/dist/{chunk-3gaxrmqq.js → chunk-7xsa2mcd.js} +15 -15
  97. package/dist/{chunk-t1whcbtd.js → chunk-7zzbce1y.js} +73 -73
  98. package/dist/{chunk-371mcwkv.js → chunk-861s8jy8.js} +7 -7
  99. package/dist/{chunk-kh9fj2xh.js → chunk-86415apq.js} +60 -60
  100. package/dist/{chunk-7vzj8rfd.js → chunk-86b8rhe0.js} +4 -4
  101. package/dist/{chunk-tp3mqwh3.js → chunk-87gjcnga.js} +7 -7
  102. package/dist/{chunk-vxnvzfnv.js → chunk-8avfrdpz.js} +2 -3
  103. package/dist/{chunk-6dhen79h.js → chunk-8b3p55rz.js} +8 -8
  104. package/dist/{chunk-h13g15kb.js → chunk-8bcxzxe5.js} +1 -1
  105. package/dist/{chunk-pb2x8g1w.js → chunk-8g14cs7t.js} +67 -67
  106. package/dist/{chunk-s6a338bt.js → chunk-8g3sbhtv.js} +3 -3
  107. package/dist/{chunk-2f3vsxna.js → chunk-8hmfghmy.js} +5 -5
  108. package/dist/{chunk-j64ga6ta.js → chunk-8jyp5q4y.js} +304 -272
  109. package/dist/{chunk-zwkqabbj.js → chunk-8wxvkw8d.js} +11 -11
  110. package/dist/{chunk-3b5a4wa6.js → chunk-8zfg78yq.js} +22 -22
  111. package/dist/{chunk-02n5zpyc.js → chunk-95gj5fgc.js} +4 -4
  112. package/dist/{chunk-rzj6hzme.js → chunk-965vae8e.js} +8 -8
  113. package/dist/{chunk-rar7nmve.js → chunk-9b7s3jwq.js} +57 -57
  114. package/dist/{chunk-ga3m4ews.js → chunk-9bt80zz1.js} +56 -56
  115. package/dist/{chunk-ng8q29em.js → chunk-9f1128wv.js} +2 -2
  116. package/dist/chunk-9fnz1421.js +180 -0
  117. package/dist/{chunk-kh9hfyzf.js → chunk-9qjtmqvh.js} +56 -56
  118. package/dist/{chunk-eserktyd.js → chunk-9szwp11z.js} +4 -4
  119. package/dist/{chunk-vmfckw4g.js → chunk-9v2wtvk2.js} +56 -56
  120. package/dist/{chunk-ftwqpbvy.js → chunk-9xz0knh8.js} +56 -56
  121. package/dist/{chunk-b82adekm.js → chunk-absyky51.js} +57 -57
  122. package/dist/{chunk-bneqxcmf.js → chunk-acv242nr.js} +1 -1
  123. package/dist/{chunk-4h43b7ww.js → chunk-ak67x6gk.js} +69 -69
  124. package/dist/{chunk-w12f58yz.js → chunk-amp2gnxw.js} +14 -17
  125. package/dist/{chunk-mnrswcqf.js → chunk-anm6tjv1.js} +56 -56
  126. package/dist/{chunk-b909mp8w.js → chunk-aqf46h5w.js} +1 -1
  127. package/dist/{chunk-td6j7fcr.js → chunk-avc2286c.js} +56 -56
  128. package/dist/{chunk-y64tceyw.js → chunk-b08zpkbe.js} +3 -3
  129. package/dist/{chunk-rn68wk3p.js → chunk-b91fnap2.js} +22 -22
  130. package/dist/{chunk-2ab59kwj.js → chunk-bdr1btg9.js} +3 -3
  131. package/dist/{chunk-03mgn26m.js → chunk-bqhegf30.js} +65 -65
  132. package/dist/{chunk-j04z48rw.js → chunk-bt64sq5y.js} +3 -3
  133. package/dist/{chunk-5qxgyby3.js → chunk-btma241g.js} +612 -2
  134. package/dist/{chunk-yztxtgd8.js → chunk-bvrsyxek.js} +66 -66
  135. package/dist/{chunk-xs12ggs7.js → chunk-c22zscvr.js} +60 -60
  136. package/dist/{chunk-ex2q76wx.js → chunk-c5yryhhe.js} +1 -1
  137. package/dist/{chunk-2kxk7ftp.js → chunk-ccecm4xc.js} +59 -59
  138. package/dist/{chunk-b2pxvgwp.js → chunk-ccpczrgp.js} +10 -10
  139. package/dist/{chunk-swq8qack.js → chunk-chm6hn2w.js} +24 -24
  140. package/dist/{chunk-6ge6zddg.js → chunk-chv0ybb2.js} +3 -3
  141. package/dist/{chunk-bbxfenf0.js → chunk-ckhc04my.js} +57 -57
  142. package/dist/{chunk-2dtmmwxh.js → chunk-cqvjzkby.js} +4 -4
  143. package/dist/{chunk-9b2ts7my.js → chunk-d1gqavnx.js} +1 -1
  144. package/dist/{chunk-5zpstd3m.js → chunk-dd2axg8f.js} +7 -7
  145. package/dist/{chunk-9b48fxkx.js → chunk-dde29xbq.js} +56 -56
  146. package/dist/{chunk-0wp0zaz8.js → chunk-ddqc9xg3.js} +57 -57
  147. package/dist/{chunk-ngrj6x74.js → chunk-df52t7ys.js} +168 -161
  148. package/dist/{chunk-sw51thrz.js → chunk-dmmgx418.js} +59 -59
  149. package/dist/{chunk-pp347e16.js → chunk-dt9jxccj.js} +56 -56
  150. package/dist/{chunk-tq82bwaf.js → chunk-dvd65zc6.js} +2 -2
  151. package/dist/{chunk-cx8c18e3.js → chunk-dxrv7e4f.js} +62 -62
  152. package/dist/{chunk-rgm0v4he.js → chunk-e321pz6p.js} +24 -24
  153. package/dist/{chunk-vmf74a91.js → chunk-e4r3ytgn.js} +57 -57
  154. package/dist/{chunk-sjmx1scx.js → chunk-e6y51dry.js} +23 -23
  155. package/dist/{chunk-sd3jwppm.js → chunk-ebbxn1k1.js} +8 -8
  156. package/dist/{chunk-m1qqm2nc.js → chunk-ec8te99g.js} +3 -3
  157. package/dist/{chunk-wkh76b1p.js → chunk-enxnnzk5.js} +7 -7
  158. package/dist/{chunk-zwa133ny.js → chunk-es1hw74y.js} +2 -2
  159. package/dist/{chunk-ezwhbfk8.js → chunk-evddwqmn.js} +5 -5
  160. package/dist/{chunk-1j8anrn2.js → chunk-ezn0kc6e.js} +56 -56
  161. package/dist/{chunk-dc83q1dm.js → chunk-f4kbe948.js} +2 -2
  162. package/dist/{chunk-w2x18mrn.js → chunk-f5tw1fzg.js} +23 -23
  163. package/dist/{chunk-5a6vqs49.js → chunk-f7d1nm78.js} +67 -67
  164. package/dist/{chunk-p6ejgd85.js → chunk-f9r0qhn5.js} +60 -60
  165. package/dist/{chunk-7rk9ppx4.js → chunk-fbz7854m.js} +1 -1
  166. package/dist/{chunk-w8krbzb0.js → chunk-fc1dg6fw.js} +4 -4
  167. package/dist/chunk-ff3ahqvh.js +85 -0
  168. package/dist/{chunk-yb6x70md.js → chunk-fg5ke2mj.js} +1786 -141
  169. package/dist/{chunk-dge3af7q.js → chunk-fgccqgaa.js} +8 -8
  170. package/dist/{chunk-rwzb4fmk.js → chunk-fh13xqb9.js} +59 -59
  171. package/dist/{chunk-neh0bkkf.js → chunk-fh1s6406.js} +56 -56
  172. package/dist/{chunk-nzqmmqwj.js → chunk-fh4n4a9x.js} +23 -23
  173. package/dist/{chunk-kxptk43f.js → chunk-fjawf9k6.js} +57 -57
  174. package/dist/{chunk-m7r4wqc3.js → chunk-fp4n49gs.js} +1 -1
  175. package/dist/{chunk-jvgc4q2b.js → chunk-fqrvsdfn.js} +59 -59
  176. package/dist/{chunk-svw35ajj.js → chunk-fshcxsrd.js} +57 -57
  177. package/dist/{chunk-h5qx4apy.js → chunk-fswvn2rk.js} +1 -1
  178. package/dist/{chunk-bwqvhzrw.js → chunk-fthbxpt7.js} +76 -69
  179. package/dist/{chunk-send164b.js → chunk-ftm33kfs.js} +23 -23
  180. package/dist/{chunk-1nz1mgm6.js → chunk-fw8e2t6e.js} +39 -268
  181. package/dist/{chunk-fw64v27c.js → chunk-fz0ch109.js} +3 -3
  182. package/dist/{chunk-vxs1rvy8.js → chunk-g27zzhxy.js} +6 -6
  183. package/dist/{chunk-z8zf2bjp.js → chunk-g4qkf769.js} +4 -4
  184. package/dist/{chunk-j2cbcyf7.js → chunk-g649rtg8.js} +4 -6
  185. package/dist/{chunk-5p8k3wyp.js → chunk-g80p271x.js} +59 -59
  186. package/dist/{chunk-ekkewv4y.js → chunk-g8bjvhzs.js} +1 -1
  187. package/dist/{chunk-js21kfpq.js → chunk-garqv1np.js} +1 -1
  188. package/dist/{chunk-2c8aqb33.js → chunk-gemm3j13.js} +56 -56
  189. package/dist/{chunk-t4z17xt4.js → chunk-geytfqmn.js} +10 -10
  190. package/dist/{chunk-tsdqd747.js → chunk-gfex5hb6.js} +10 -4
  191. package/dist/{chunk-kk42fg5v.js → chunk-gffypgc8.js} +23 -23
  192. package/dist/{chunk-4nvhfqsy.js → chunk-gh5t5hks.js} +58 -58
  193. package/dist/{chunk-h0n9zhgw.js → chunk-gjsh5d1m.js} +56 -56
  194. package/dist/{chunk-xeehxb1q.js → chunk-gntxvc8d.js} +3 -3
  195. package/dist/{chunk-yw0st51b.js → chunk-gp0e8n1j.js} +57 -57
  196. package/dist/{chunk-7t38tp7c.js → chunk-gvw8sq1x.js} +24 -24
  197. package/dist/{chunk-5dn1m1r7.js → chunk-gwyn2qmg.js} +2 -2
  198. package/dist/{chunk-h28xqfk8.js → chunk-gybg10fj.js} +62 -62
  199. package/dist/{chunk-7srwepm7.js → chunk-h0634caf.js} +1 -1
  200. package/dist/{chunk-zw543g0m.js → chunk-h50avem9.js} +57 -57
  201. package/dist/{chunk-34vn56ag.js → chunk-h7c9t4eg.js} +8 -8
  202. package/dist/{chunk-zbrk28bp.js → chunk-h9vwd6jb.js} +56 -56
  203. package/dist/{chunk-nn8nkawn.js → chunk-hece55mn.js} +7 -7
  204. package/dist/{chunk-skrja2sz.js → chunk-hj1zymy7.js} +2 -2
  205. package/dist/{chunk-7sgn6fv0.js → chunk-hnydgd6d.js} +6 -6
  206. package/dist/{chunk-9azyfe65.js → chunk-hrj5pszj.js} +61 -61
  207. package/dist/{chunk-vhjhyt2r.js → chunk-j2dwrqy6.js} +26 -26
  208. package/dist/{chunk-ebx4j5r5.js → chunk-j6k3zjb5.js} +5 -7
  209. package/dist/{chunk-3nmhzccb.js → chunk-j6v1eh21.js} +2 -2
  210. package/dist/{chunk-2xezy8pc.js → chunk-jfr51c5y.js} +7 -7
  211. package/dist/{chunk-khdftpea.js → chunk-jgxk5p8d.js} +9 -9
  212. package/dist/{chunk-cs9xxrmx.js → chunk-jh5g3xkz.js} +56 -56
  213. package/dist/{chunk-zvxjnak3.js → chunk-jpawr85p.js} +56 -56
  214. package/dist/{chunk-rvp6qq44.js → chunk-jqv2patg.js} +5 -5
  215. package/dist/{chunk-9kqtdah4.js → chunk-jr21cjeg.js} +1 -1
  216. package/dist/{chunk-znehavdm.js → chunk-jvnb1zrw.js} +1 -1
  217. package/dist/{chunk-34b0y9w3.js → chunk-k4xqffsa.js} +57 -57
  218. package/dist/{chunk-92skmpg9.js → chunk-k53j516k.js} +56 -56
  219. package/dist/{chunk-jd2ams26.js → chunk-k6h9p8gg.js} +6 -6
  220. package/dist/{chunk-3c1ddhnk.js → chunk-kgbtjbmd.js} +19 -207
  221. package/dist/{chunk-ztqfa7pd.js → chunk-khz74t05.js} +56 -56
  222. package/dist/{chunk-xt4v95je.js → chunk-kjkb2g5m.js} +3 -3
  223. package/dist/{chunk-tyxhcbsd.js → chunk-kpmqm0t6.js} +1 -1
  224. package/dist/{chunk-d09j71dr.js → chunk-kqdp5wzc.js} +6 -6
  225. package/dist/{chunk-8y3eszv7.js → chunk-krbnqs28.js} +2 -2
  226. package/dist/{chunk-wj8gbr2g.js → chunk-kt3be60k.js} +58 -58
  227. package/dist/{chunk-vgdtw10n.js → chunk-ktzxeprc.js} +2 -2
  228. package/dist/{chunk-65gzht6d.js → chunk-m38tg84x.js} +56 -56
  229. package/dist/{chunk-b3t64cwd.js → chunk-m3x5s3db.js} +59 -59
  230. package/dist/{chunk-z5w7a1cv.js → chunk-m7p0qsyd.js} +26 -26
  231. package/dist/{chunk-njdz3yry.js → chunk-mb56b98v.js} +4 -4
  232. package/dist/{chunk-jp8tnjzr.js → chunk-mc0ehz52.js} +59 -59
  233. package/dist/{chunk-vf3etxnx.js → chunk-mcs219z2.js} +1 -1
  234. package/dist/{chunk-ffy37ks3.js → chunk-mdcz65hq.js} +23 -23
  235. package/dist/{chunk-61edjmf6.js → chunk-mg1w5bk3.js} +2 -2
  236. package/dist/{chunk-metmg93w.js → chunk-mgjpqqqv.js} +2 -2
  237. package/dist/{chunk-1k0wbt0f.js → chunk-mn4ve34r.js} +87 -87
  238. package/dist/{chunk-4vqz7w3v.js → chunk-mratscx5.js} +4 -4
  239. package/dist/{chunk-n5pe3jtt.js → chunk-n1bh6pgv.js} +2 -2
  240. package/dist/{chunk-t0twk3e5.js → chunk-n217n8sr.js} +1 -1
  241. package/dist/chunk-n35vwqby.js +777 -0
  242. package/dist/{chunk-4tre5ddg.js → chunk-neak2qc4.js} +1 -1
  243. package/dist/{chunk-w8yhf638.js → chunk-nfnvct96.js} +1 -1
  244. package/dist/{chunk-e5ewhhx6.js → chunk-nm4p4t82.js} +56 -56
  245. package/dist/{chunk-9pkh2w7v.js → chunk-nm5gk39k.js} +8 -8
  246. package/dist/{chunk-wyz7j9j0.js → chunk-nr4y1jqa.js} +23 -23
  247. package/dist/{chunk-1d0d18qj.js → chunk-nsnkzerj.js} +22 -22
  248. package/dist/{chunk-j5keq4ye.js → chunk-nt65jyx9.js} +60 -60
  249. package/dist/{chunk-0pkrwxrg.js → chunk-nz4mxnb9.js} +3 -3
  250. package/dist/{chunk-74v2mh4t.js → chunk-p1adg740.js} +1 -1
  251. package/dist/{chunk-d8ztpy7x.js → chunk-p45yh5qt.js} +7 -7
  252. package/dist/{chunk-jvf4wvhn.js → chunk-p4nbt9zw.js} +57 -57
  253. package/dist/{chunk-0xfz1hj1.js → chunk-pbrwgq4d.js} +6 -6
  254. package/dist/{chunk-6hk5a6ky.js → chunk-pc5qdkr6.js} +56 -56
  255. package/dist/{chunk-67jg7cfy.js → chunk-phce1mav.js} +2 -2
  256. package/dist/{chunk-vjv7wvnc.js → chunk-phqrbrn0.js} +4 -4
  257. package/dist/{chunk-3xhmzvxm.js → chunk-pjkaqt23.js} +5 -5
  258. package/dist/{chunk-jq9vjfbd.js → chunk-pjqxn9ac.js} +57 -57
  259. package/dist/{chunk-npywdb7q.js → chunk-pn1wg9d1.js} +3 -3
  260. package/dist/{chunk-f62xm8dh.js → chunk-pn8s6m5g.js} +3 -3
  261. package/dist/{chunk-9snpw77c.js → chunk-pnarhx6j.js} +67 -67
  262. package/dist/{chunk-6eq35v86.js → chunk-pnv69npn.js} +1 -1
  263. package/dist/{chunk-1395xfcq.js → chunk-pyzhdqts.js} +58 -58
  264. package/dist/{chunk-j95j6wz8.js → chunk-q27bsq0y.js} +1 -1
  265. package/dist/chunk-q697t7v5.js +500 -0
  266. package/dist/{chunk-wdwa58v1.js → chunk-qc0qywhh.js} +59 -59
  267. package/dist/{chunk-3jjc204v.js → chunk-qcgd8bgd.js} +18 -18
  268. package/dist/{chunk-d9bvzfkg.js → chunk-qd5ch7gy.js} +62 -62
  269. package/dist/{chunk-vj8q7shk.js → chunk-qe7arwgg.js} +2 -2
  270. package/dist/{chunk-r41sjxcn.js → chunk-qegzj6nm.js} +1 -1
  271. package/dist/{chunk-9jt1c7t9.js → chunk-qenkaqer.js} +58 -58
  272. package/dist/{chunk-hyc3kbfq.js → chunk-qevpw4g9.js} +4 -4
  273. package/dist/{chunk-kerkk89t.js → chunk-qfdzqed0.js} +4 -4
  274. package/dist/{chunk-99p0sa4h.js → chunk-qhw6wg0y.js} +2 -2
  275. package/dist/{chunk-6jdrt36m.js → chunk-qk4akts4.js} +2 -2
  276. package/dist/{chunk-knc5za98.js → chunk-qkjkr973.js} +57 -57
  277. package/dist/{chunk-5ycqyqbj.js → chunk-qnbe7d8a.js} +1 -1
  278. package/dist/{chunk-e4jqbn4d.js → chunk-qqfbkaad.js} +3 -4
  279. package/dist/{chunk-zqhxr0h7.js → chunk-qs2xnhte.js} +5 -7
  280. package/dist/{chunk-hfy21maq.js → chunk-qszxzska.js} +6 -6
  281. package/dist/{chunk-nbvc8bh6.js → chunk-qvf5w48h.js} +24 -24
  282. package/dist/{chunk-tbce47cr.js → chunk-qxsrtfzn.js} +4 -4
  283. package/dist/{chunk-2cpxc5we.js → chunk-r1931n7y.js} +56 -56
  284. package/dist/{chunk-13g6d7wt.js → chunk-r3rck4qa.js} +10 -10
  285. package/dist/{chunk-pb2nc7r0.js → chunk-r5c38r2r.js} +149 -61
  286. package/dist/{chunk-k6tzzr9c.js → chunk-r65v6fg2.js} +7 -7
  287. package/dist/{chunk-me2986xy.js → chunk-r6v7yh3c.js} +57 -57
  288. package/dist/{chunk-ns3babbs.js → chunk-r7mjzgyn.js} +2 -4
  289. package/dist/{chunk-jxe1a8kz.js → chunk-rbkzzw66.js} +6 -6
  290. package/dist/chunk-red9b98p.js +378 -0
  291. package/dist/{chunk-drnxbc1w.js → chunk-rfp8ja4z.js} +2 -2
  292. package/dist/{chunk-g8w2205d.js → chunk-rhcejk4j.js} +6 -6
  293. package/dist/{chunk-r6ewgv12.js → chunk-rjpkjatc.js} +1 -1
  294. package/dist/{chunk-rw44vqpq.js → chunk-rqzrj3gm.js} +56 -56
  295. package/dist/{chunk-g0jmqbp4.js → chunk-rr9tqgxc.js} +6 -6
  296. package/dist/{chunk-s38qgqfs.js → chunk-rrtkz2js.js} +4 -4
  297. package/dist/{chunk-k95meznc.js → chunk-rsf6y5zm.js} +7 -7
  298. package/dist/{chunk-7jm7pa1e.js → chunk-ryd3pd8a.js} +14 -17
  299. package/dist/{chunk-wn8nakrh.js → chunk-s748h9my.js} +56 -56
  300. package/dist/{chunk-32fv3vze.js → chunk-s8a5ta09.js} +25 -25
  301. package/dist/{chunk-5wxavbb8.js → chunk-sa4athwh.js} +23 -23
  302. package/dist/{chunk-ew68a4sy.js → chunk-sec4gngn.js} +57 -57
  303. package/dist/{chunk-wxe04dx4.js → chunk-sf8fnzc3.js} +3 -3
  304. package/dist/{chunk-k591s450.js → chunk-sfh6dmxz.js} +56 -56
  305. package/dist/chunk-shj5md9j.js +1486 -0
  306. package/dist/{chunk-n0pkzaaw.js → chunk-smcj5g84.js} +6 -6
  307. package/dist/{chunk-0ejzh5by.js → chunk-spw5dfzh.js} +58 -58
  308. package/dist/{chunk-1ymedh1v.js → chunk-stwnpgkm.js} +23 -23
  309. package/dist/{chunk-0kh2f6kh.js → chunk-sz53f4b4.js} +3 -3
  310. package/dist/{chunk-ndcrbqq2.js → chunk-t24yf1vt.js} +57 -57
  311. package/dist/{chunk-z93cpz34.js → chunk-t7b3r8v9.js} +3 -3
  312. package/dist/{chunk-00m08jnq.js → chunk-ta5dpd9k.js} +56 -56
  313. package/dist/{chunk-mj9rbmy1.js → chunk-tdcaa5xt.js} +5 -5
  314. package/dist/{chunk-zr78q4qg.js → chunk-tephtjvc.js} +56 -56
  315. package/dist/{chunk-7f0atzzf.js → chunk-tgwvgrb8.js} +57 -57
  316. package/dist/{chunk-95dy6w67.js → chunk-tq7vtsx4.js} +2 -2
  317. package/dist/{chunk-vhk0hgnv.js → chunk-tvw4vmrq.js} +56 -56
  318. package/dist/{chunk-7vzwyazf.js → chunk-v1rvqs6p.js} +4 -4
  319. package/dist/{chunk-tzpxsjm3.js → chunk-v3rtftz9.js} +29 -29
  320. package/dist/{chunk-sm24ay0y.js → chunk-v3yayvzt.js} +117 -117
  321. package/dist/{chunk-z6wpnk5y.js → chunk-vn9vww4b.js} +1 -1
  322. package/dist/{chunk-84cjtasj.js → chunk-vnc0m7be.js} +58 -58
  323. package/dist/{chunk-0wrzeej6.js → chunk-vqnb1we6.js} +1 -1
  324. package/dist/{chunk-fq1j9zm0.js → chunk-vsa6z84y.js} +3 -3
  325. package/dist/{chunk-atpyr1kg.js → chunk-vvf0dstd.js} +57 -57
  326. package/dist/{chunk-6v1p41rg.js → chunk-vy5q8hrp.js} +7 -7
  327. package/dist/{chunk-mbv3f2vm.js → chunk-vywhk0sd.js} +4 -4
  328. package/dist/{chunk-t2ex5gsn.js → chunk-w02wh43r.js} +3 -3
  329. package/dist/{chunk-e08marnp.js → chunk-w058sn3x.js} +4 -4
  330. package/dist/{chunk-mq7m54qk.js → chunk-w5nbvkxb.js} +69 -69
  331. package/dist/{chunk-8ympg941.js → chunk-w6eqjaa7.js} +1 -1
  332. package/dist/{chunk-rexrttsb.js → chunk-wcz7qa33.js} +33 -33
  333. package/dist/{chunk-jh0d0pbd.js → chunk-wg0d4shw.js} +4 -4
  334. package/dist/{chunk-7kbezevv.js → chunk-wk9wdgv6.js} +5 -5
  335. package/dist/{chunk-edt6c4pc.js → chunk-wkjptwgy.js} +73 -73
  336. package/dist/{chunk-ekqvx6ek.js → chunk-wn36chwc.js} +56 -56
  337. package/dist/{chunk-sdzpdzj3.js → chunk-wnncbex7.js} +58 -58
  338. package/dist/{chunk-s8zha7q1.js → chunk-ws1046mv.js} +9 -11
  339. package/dist/{chunk-bhwnjx3e.js → chunk-wtymvrh9.js} +8 -8
  340. package/dist/{chunk-drnr3z7x.js → chunk-wz2qyvhx.js} +144 -144
  341. package/dist/{chunk-sf4rsw52.js → chunk-x463hr55.js} +8 -8
  342. package/dist/{chunk-xafy9ccy.js → chunk-x6gjy97a.js} +57 -57
  343. package/dist/{chunk-1zrpqh8h.js → chunk-x7aa6ah7.js} +1 -1
  344. package/dist/{chunk-79ztw13h.js → chunk-x89jeqbz.js} +2 -2
  345. package/dist/{chunk-2katyzq9.js → chunk-x8zp00qp.js} +3 -3
  346. package/dist/{chunk-g24e2jr3.js → chunk-xgxyhgy9.js} +56 -56
  347. package/dist/{chunk-8w2a9md8.js → chunk-xmmg3e9j.js} +3 -3
  348. package/dist/{chunk-7e78w86v.js → chunk-xn1wfxt2.js} +3 -3
  349. package/dist/{chunk-sjraxh5y.js → chunk-xr186qye.js} +57 -57
  350. package/dist/{chunk-fp2z22f1.js → chunk-xrrbcvj4.js} +59 -59
  351. package/dist/{chunk-g1jfytsa.js → chunk-xt17cf7n.js} +5 -5
  352. package/dist/{chunk-tzaj5mwz.js → chunk-xt71y0fa.js} +31 -31
  353. package/dist/{chunk-rvn77re6.js → chunk-xws9mdet.js} +23 -23
  354. package/dist/{chunk-vny8tpke.js → chunk-xza7dswj.js} +24 -24
  355. package/dist/{chunk-d6713rzt.js → chunk-y2zdt5wf.js} +30 -10
  356. package/dist/{chunk-z5tmqz5e.js → chunk-y4kd1f5p.js} +56 -56
  357. package/dist/{chunk-t31xvfy2.js → chunk-y5rq3t59.js} +60 -60
  358. package/dist/{chunk-avtcf910.js → chunk-y5x8wqe5.js} +1 -1
  359. package/dist/{chunk-wsm0s0c3.js → chunk-yd1xffwg.js} +3 -3
  360. package/dist/{chunk-vntvaf0c.js → chunk-ydepjfqs.js} +63 -63
  361. package/dist/{chunk-x6ceqp7t.js → chunk-ydwdbxgd.js} +23 -23
  362. package/dist/{chunk-hk24qq7n.js → chunk-yh27vvgm.js} +9 -9
  363. package/dist/{chunk-y8ab9dyv.js → chunk-yn6phqhx.js} +1 -1
  364. package/dist/{chunk-dc4krjj4.js → chunk-yr4qqfcj.js} +22 -22
  365. package/dist/{chunk-z43cvm9f.js → chunk-yrzxjvas.js} +75 -75
  366. package/dist/{chunk-7d3ba1n4.js → chunk-yvzh49tc.js} +1 -1
  367. package/dist/chunk-z51d7scc.js +244 -0
  368. package/dist/chunk-zdf30s24.js +334 -0
  369. package/dist/{chunk-dxcr07z5.js → chunk-ze6zvkg6.js} +4 -4
  370. package/dist/{chunk-nbath9yz.js → chunk-zhd2dv7y.js} +7 -7
  371. package/dist/{chunk-nvrje5t4.js → chunk-zm18kc5q.js} +70 -70
  372. package/dist/{chunk-3px6f9s5.js → chunk-zshqb2h1.js} +2 -2
  373. package/dist/{chunk-d6vexw90.js → chunk-zyy7th0a.js} +1 -1
  374. package/dist/cli-bun.js +0 -0
  375. package/dist/cli-node.js +418 -10
  376. package/dist/cli.js +11 -11
  377. package/dist/download-ripgrep.js +1 -1
  378. package/package.json +200 -195
  379. package/scripts/postinstall.cjs +339 -339
  380. package/scripts/setup-chrome-mcp.mjs +39 -39
  381. package/dist/chunk-05rcynmf.js +0 -81
  382. package/dist/chunk-27xc1csx.js +0 -104
  383. package/dist/chunk-30rst83v.js +0 -168
  384. package/dist/chunk-33tdaxv0.js +0 -16
  385. package/dist/chunk-3enkzjbw.js +0 -3966
  386. package/dist/chunk-3h8a89gy.js +0 -46
  387. package/dist/chunk-3qm927vk.js +0 -542
  388. package/dist/chunk-3z7wsvpa.js +0 -24
  389. package/dist/chunk-44ct1wzm.js +0 -17
  390. package/dist/chunk-4s0bw3mn.js +0 -208
  391. package/dist/chunk-7m3ja921.js +0 -27
  392. package/dist/chunk-7vs34s16.js +0 -173
  393. package/dist/chunk-80h2am3g.js +0 -5241
  394. package/dist/chunk-8f6raa6q.js +0 -615
  395. package/dist/chunk-a9vdeb6y.js +0 -258
  396. package/dist/chunk-ahc4y7pa.js +0 -782
  397. package/dist/chunk-b0bk6bxs.js +0 -742
  398. package/dist/chunk-b4wg70y1.js +0 -54
  399. package/dist/chunk-btnvjcc5.js +0 -15
  400. package/dist/chunk-cs6c9gbk.js +0 -1172
  401. package/dist/chunk-enhtm7h3.js +0 -1731
  402. package/dist/chunk-fckn68n0.js +0 -180
  403. package/dist/chunk-h0qngp9w.js +0 -157
  404. package/dist/chunk-hasadm64.js +0 -412
  405. package/dist/chunk-hk9xz7gk.js +0 -118
  406. package/dist/chunk-j2k4p94p.js +0 -55
  407. package/dist/chunk-jgcsawpq.js +0 -659
  408. package/dist/chunk-jzmz18nn.js +0 -65
  409. package/dist/chunk-kg4qmgbk.js +0 -1095
  410. package/dist/chunk-n0qaeaa5.js +0 -256
  411. package/dist/chunk-nbxr4cfd.js +0 -880
  412. package/dist/chunk-q25bjaev.js +0 -15
  413. package/dist/chunk-qpydzzk0.js +0 -182
  414. package/dist/chunk-qqy9drhh.js +0 -864
  415. package/dist/chunk-qtddenhw.js +0 -607
  416. package/dist/chunk-r6h4zwjj.js +0 -36
  417. package/dist/chunk-th1cykx3.js +0 -494
  418. package/dist/chunk-ttk5dzz8.js +0 -25
  419. package/dist/chunk-v9yc4wjc.js +0 -220
  420. package/dist/chunk-vsemkegd.js +0 -718
  421. package/dist/chunk-wadkbt36.js +0 -40
  422. package/dist/chunk-xsq9ae7x.js +0 -90
  423. package/dist/chunk-ze6h1ch1.js +0 -21
  424. package/dist/chunk-ztpbxsq6.js +0 -910
  425. package/dist/{chunk-2j1t3hcw.js → chunk-a07s68gh.js} +3 -3
@@ -1,1731 +0,0 @@
1
- // @bun
2
- import {
3
- __commonJS,
4
- __require
5
- } from "./chunk-qp2qdcda.js";
6
-
7
- // node_modules/.bun/@smithy+util-body-length-node@4.2.3/node_modules/@smithy/util-body-length-node/dist-cjs/index.js
8
- var require_dist_cjs = __commonJS((exports) => {
9
- var node_fs = __require("fs");
10
- var calculateBodyLength = (body) => {
11
- if (!body) {
12
- return 0;
13
- }
14
- if (typeof body === "string") {
15
- return Buffer.byteLength(body);
16
- } else if (typeof body.byteLength === "number") {
17
- return body.byteLength;
18
- } else if (typeof body.size === "number") {
19
- return body.size;
20
- } else if (typeof body.start === "number" && typeof body.end === "number") {
21
- return body.end + 1 - body.start;
22
- } else if (body instanceof node_fs.ReadStream) {
23
- if (body.path != null) {
24
- return node_fs.lstatSync(body.path).size;
25
- } else if (typeof body.fd === "number") {
26
- return node_fs.fstatSync(body.fd).size;
27
- }
28
- }
29
- throw new Error(`Body Length computation failed for ${body}`);
30
- };
31
- exports.calculateBodyLength = calculateBodyLength;
32
- });
33
-
34
- // node_modules/.bun/@aws+lambda-invoke-store@0.2.4/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js
35
- var require_invoke_store = __commonJS((exports) => {
36
- var PROTECTED_KEYS = {
37
- REQUEST_ID: Symbol.for("_AWS_LAMBDA_REQUEST_ID"),
38
- X_RAY_TRACE_ID: Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),
39
- TENANT_ID: Symbol.for("_AWS_LAMBDA_TENANT_ID")
40
- };
41
- var NO_GLOBAL_AWS_LAMBDA = ["true", "1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA ?? "");
42
- if (!NO_GLOBAL_AWS_LAMBDA) {
43
- globalThis.awslambda = globalThis.awslambda || {};
44
- }
45
-
46
- class InvokeStoreBase {
47
- static PROTECTED_KEYS = PROTECTED_KEYS;
48
- isProtectedKey(key) {
49
- return Object.values(PROTECTED_KEYS).includes(key);
50
- }
51
- getRequestId() {
52
- return this.get(PROTECTED_KEYS.REQUEST_ID) ?? "-";
53
- }
54
- getXRayTraceId() {
55
- return this.get(PROTECTED_KEYS.X_RAY_TRACE_ID);
56
- }
57
- getTenantId() {
58
- return this.get(PROTECTED_KEYS.TENANT_ID);
59
- }
60
- }
61
-
62
- class InvokeStoreSingle extends InvokeStoreBase {
63
- currentContext;
64
- getContext() {
65
- return this.currentContext;
66
- }
67
- hasContext() {
68
- return this.currentContext !== undefined;
69
- }
70
- get(key) {
71
- return this.currentContext?.[key];
72
- }
73
- set(key, value) {
74
- if (this.isProtectedKey(key)) {
75
- throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`);
76
- }
77
- this.currentContext = this.currentContext || {};
78
- this.currentContext[key] = value;
79
- }
80
- run(context, fn) {
81
- this.currentContext = context;
82
- return fn();
83
- }
84
- }
85
-
86
- class InvokeStoreMulti extends InvokeStoreBase {
87
- als;
88
- static async create() {
89
- const instance = new InvokeStoreMulti;
90
- const asyncHooks = await import("async_hooks");
91
- instance.als = new asyncHooks.AsyncLocalStorage;
92
- return instance;
93
- }
94
- getContext() {
95
- return this.als.getStore();
96
- }
97
- hasContext() {
98
- return this.als.getStore() !== undefined;
99
- }
100
- get(key) {
101
- return this.als.getStore()?.[key];
102
- }
103
- set(key, value) {
104
- if (this.isProtectedKey(key)) {
105
- throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`);
106
- }
107
- const store = this.als.getStore();
108
- if (!store) {
109
- throw new Error("No context available");
110
- }
111
- store[key] = value;
112
- }
113
- run(context, fn) {
114
- return this.als.run(context, fn);
115
- }
116
- }
117
- exports.InvokeStore = undefined;
118
- (function(InvokeStore) {
119
- let instance = null;
120
- async function getInstanceAsync(forceInvokeStoreMulti) {
121
- if (!instance) {
122
- instance = (async () => {
123
- const isMulti = forceInvokeStoreMulti === true || "AWS_LAMBDA_MAX_CONCURRENCY" in process.env;
124
- const newInstance = isMulti ? await InvokeStoreMulti.create() : new InvokeStoreSingle;
125
- if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda?.InvokeStore) {
126
- return globalThis.awslambda.InvokeStore;
127
- } else if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda) {
128
- globalThis.awslambda.InvokeStore = newInstance;
129
- return newInstance;
130
- } else {
131
- return newInstance;
132
- }
133
- })();
134
- }
135
- return instance;
136
- }
137
- InvokeStore.getInstanceAsync = getInstanceAsync;
138
- InvokeStore._testing = process.env.AWS_LAMBDA_BENCHMARK_MODE === "1" ? {
139
- reset: () => {
140
- instance = null;
141
- if (globalThis.awslambda?.InvokeStore) {
142
- delete globalThis.awslambda.InvokeStore;
143
- }
144
- globalThis.awslambda = { InvokeStore: undefined };
145
- }
146
- } : undefined;
147
- })(exports.InvokeStore || (exports.InvokeStore = {}));
148
- exports.InvokeStoreBase = InvokeStoreBase;
149
- });
150
-
151
- // node_modules/.bun/@smithy+util-body-length-browser@4.2.2/node_modules/@smithy/util-body-length-browser/dist-cjs/index.js
152
- var require_dist_cjs2 = __commonJS((exports) => {
153
- var TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder : null;
154
- var calculateBodyLength = (body) => {
155
- if (typeof body === "string") {
156
- if (TEXT_ENCODER) {
157
- return TEXT_ENCODER.encode(body).byteLength;
158
- }
159
- let len = body.length;
160
- for (let i = len - 1;i >= 0; i--) {
161
- const code = body.charCodeAt(i);
162
- if (code > 127 && code <= 2047)
163
- len++;
164
- else if (code > 2047 && code <= 65535)
165
- len += 2;
166
- if (code >= 56320 && code <= 57343)
167
- i--;
168
- }
169
- return len;
170
- } else if (typeof body.byteLength === "number") {
171
- return body.byteLength;
172
- } else if (typeof body.size === "number") {
173
- return body.size;
174
- }
175
- throw new Error(`Body Length computation failed for ${body}`);
176
- };
177
- exports.calculateBodyLength = calculateBodyLength;
178
- });
179
-
180
- // node_modules/.bun/fast-xml-parser@5.5.8/node_modules/fast-xml-parser/lib/fxp.cjs
181
- var require_fxp = __commonJS((exports, module) => {
182
- (() => {
183
- var t = { d: (e2, i2) => {
184
- for (var n2 in i2)
185
- t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] });
186
- }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => {
187
- typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
188
- } }, e = {};
189
- t.r(e), t.d(e, { XMLBuilder: () => $t, XMLParser: () => gt, XMLValidator: () => It });
190
- const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
191
- function s(t2, e2) {
192
- const i2 = [];
193
- let n2 = e2.exec(t2);
194
- for (;n2; ) {
195
- const s2 = [];
196
- s2.startIndex = e2.lastIndex - n2[0].length;
197
- const r2 = n2.length;
198
- for (let t3 = 0;t3 < r2; t3++)
199
- s2.push(n2[t3]);
200
- i2.push(s2), n2 = e2.exec(t2);
201
- }
202
- return i2;
203
- }
204
- const r = function(t2) {
205
- return !(n.exec(t2) == null);
206
- }, o = ["hasOwnProperty", "toString", "valueOf", "__defineGetter__", "__defineSetter__", "__lookupGetter__", "__lookupSetter__"], a = ["__proto__", "constructor", "prototype"], h = { allowBooleanAttributes: false, unpairedTags: [] };
207
- function l(t2, e2) {
208
- e2 = Object.assign({}, h, e2);
209
- const i2 = [];
210
- let n2 = false, s2 = false;
211
- t2[0] === "\uFEFF" && (t2 = t2.substr(1));
212
- for (let r2 = 0;r2 < t2.length; r2++)
213
- if (t2[r2] === "<" && t2[r2 + 1] === "?") {
214
- if (r2 += 2, r2 = u(t2, r2), r2.err)
215
- return r2;
216
- } else {
217
- if (t2[r2] !== "<") {
218
- if (p(t2[r2]))
219
- continue;
220
- return b("InvalidChar", "char '" + t2[r2] + "' is not expected.", w(t2, r2));
221
- }
222
- {
223
- let o2 = r2;
224
- if (r2++, t2[r2] === "!") {
225
- r2 = c(t2, r2);
226
- continue;
227
- }
228
- {
229
- let a2 = false;
230
- t2[r2] === "/" && (a2 = true, r2++);
231
- let h2 = "";
232
- for (;r2 < t2.length && t2[r2] !== ">" && t2[r2] !== " " && t2[r2] !== "\t" && t2[r2] !== `
233
- ` && t2[r2] !== "\r"; r2++)
234
- h2 += t2[r2];
235
- if (h2 = h2.trim(), h2[h2.length - 1] === "/" && (h2 = h2.substring(0, h2.length - 1), r2--), !y(h2)) {
236
- let e3;
237
- return e3 = h2.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + h2 + "' is an invalid name.", b("InvalidTag", e3, w(t2, r2));
238
- }
239
- const l2 = g(t2, r2);
240
- if (l2 === false)
241
- return b("InvalidAttr", "Attributes for '" + h2 + "' have open quote.", w(t2, r2));
242
- let d2 = l2.value;
243
- if (r2 = l2.index, d2[d2.length - 1] === "/") {
244
- const i3 = r2 - d2.length;
245
- d2 = d2.substring(0, d2.length - 1);
246
- const s3 = x(d2, e2);
247
- if (s3 !== true)
248
- return b(s3.err.code, s3.err.msg, w(t2, i3 + s3.err.line));
249
- n2 = true;
250
- } else if (a2) {
251
- if (!l2.tagClosed)
252
- return b("InvalidTag", "Closing tag '" + h2 + "' doesn't have proper closing.", w(t2, r2));
253
- if (d2.trim().length > 0)
254
- return b("InvalidTag", "Closing tag '" + h2 + "' can't have attributes or invalid starting.", w(t2, o2));
255
- if (i2.length === 0)
256
- return b("InvalidTag", "Closing tag '" + h2 + "' has not been opened.", w(t2, o2));
257
- {
258
- const e3 = i2.pop();
259
- if (h2 !== e3.tagName) {
260
- let i3 = w(t2, e3.tagStartPos);
261
- return b("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + h2 + "'.", w(t2, o2));
262
- }
263
- i2.length == 0 && (s2 = true);
264
- }
265
- } else {
266
- const a3 = x(d2, e2);
267
- if (a3 !== true)
268
- return b(a3.err.code, a3.err.msg, w(t2, r2 - d2.length + a3.err.line));
269
- if (s2 === true)
270
- return b("InvalidXml", "Multiple possible root nodes found.", w(t2, r2));
271
- e2.unpairedTags.indexOf(h2) !== -1 || i2.push({ tagName: h2, tagStartPos: o2 }), n2 = true;
272
- }
273
- for (r2++;r2 < t2.length; r2++)
274
- if (t2[r2] === "<") {
275
- if (t2[r2 + 1] === "!") {
276
- r2++, r2 = c(t2, r2);
277
- continue;
278
- }
279
- if (t2[r2 + 1] !== "?")
280
- break;
281
- if (r2 = u(t2, ++r2), r2.err)
282
- return r2;
283
- } else if (t2[r2] === "&") {
284
- const e3 = N(t2, r2);
285
- if (e3 == -1)
286
- return b("InvalidChar", "char '&' is not expected.", w(t2, r2));
287
- r2 = e3;
288
- } else if (s2 === true && !p(t2[r2]))
289
- return b("InvalidXml", "Extra text at the end", w(t2, r2));
290
- t2[r2] === "<" && r2--;
291
- }
292
- }
293
- }
294
- return n2 ? i2.length == 1 ? b("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", w(t2, i2[0].tagStartPos)) : !(i2.length > 0) || b("InvalidXml", "Invalid '" + JSON.stringify(i2.map((t3) => t3.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : b("InvalidXml", "Start tag expected.", 1);
295
- }
296
- function p(t2) {
297
- return t2 === " " || t2 === "\t" || t2 === `
298
- ` || t2 === "\r";
299
- }
300
- function u(t2, e2) {
301
- const i2 = e2;
302
- for (;e2 < t2.length; e2++)
303
- if (t2[e2] == "?" || t2[e2] == " ") {
304
- const n2 = t2.substr(i2, e2 - i2);
305
- if (e2 > 5 && n2 === "xml")
306
- return b("InvalidXml", "XML declaration allowed only at the start of the document.", w(t2, e2));
307
- if (t2[e2] == "?" && t2[e2 + 1] == ">") {
308
- e2++;
309
- break;
310
- }
311
- continue;
312
- }
313
- return e2;
314
- }
315
- function c(t2, e2) {
316
- if (t2.length > e2 + 5 && t2[e2 + 1] === "-" && t2[e2 + 2] === "-") {
317
- for (e2 += 3;e2 < t2.length; e2++)
318
- if (t2[e2] === "-" && t2[e2 + 1] === "-" && t2[e2 + 2] === ">") {
319
- e2 += 2;
320
- break;
321
- }
322
- } else if (t2.length > e2 + 8 && t2[e2 + 1] === "D" && t2[e2 + 2] === "O" && t2[e2 + 3] === "C" && t2[e2 + 4] === "T" && t2[e2 + 5] === "Y" && t2[e2 + 6] === "P" && t2[e2 + 7] === "E") {
323
- let i2 = 1;
324
- for (e2 += 8;e2 < t2.length; e2++)
325
- if (t2[e2] === "<")
326
- i2++;
327
- else if (t2[e2] === ">" && (i2--, i2 === 0))
328
- break;
329
- } else if (t2.length > e2 + 9 && t2[e2 + 1] === "[" && t2[e2 + 2] === "C" && t2[e2 + 3] === "D" && t2[e2 + 4] === "A" && t2[e2 + 5] === "T" && t2[e2 + 6] === "A" && t2[e2 + 7] === "[") {
330
- for (e2 += 8;e2 < t2.length; e2++)
331
- if (t2[e2] === "]" && t2[e2 + 1] === "]" && t2[e2 + 2] === ">") {
332
- e2 += 2;
333
- break;
334
- }
335
- }
336
- return e2;
337
- }
338
- const d = '"', f = "'";
339
- function g(t2, e2) {
340
- let i2 = "", n2 = "", s2 = false;
341
- for (;e2 < t2.length; e2++) {
342
- if (t2[e2] === d || t2[e2] === f)
343
- n2 === "" ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = "");
344
- else if (t2[e2] === ">" && n2 === "") {
345
- s2 = true;
346
- break;
347
- }
348
- i2 += t2[e2];
349
- }
350
- return n2 === "" && { value: i2, index: e2, tagClosed: s2 };
351
- }
352
- const m = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
353
- function x(t2, e2) {
354
- const i2 = s(t2, m), n2 = {};
355
- for (let t3 = 0;t3 < i2.length; t3++) {
356
- if (i2[t3][1].length === 0)
357
- return b("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", v(i2[t3]));
358
- if (i2[t3][3] !== undefined && i2[t3][4] === undefined)
359
- return b("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", v(i2[t3]));
360
- if (i2[t3][3] === undefined && !e2.allowBooleanAttributes)
361
- return b("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", v(i2[t3]));
362
- const s2 = i2[t3][2];
363
- if (!E(s2))
364
- return b("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", v(i2[t3]));
365
- if (Object.prototype.hasOwnProperty.call(n2, s2))
366
- return b("InvalidAttr", "Attribute '" + s2 + "' is repeated.", v(i2[t3]));
367
- n2[s2] = 1;
368
- }
369
- return true;
370
- }
371
- function N(t2, e2) {
372
- if (t2[++e2] === ";")
373
- return -1;
374
- if (t2[e2] === "#")
375
- return function(t3, e3) {
376
- let i3 = /\d/;
377
- for (t3[e3] === "x" && (e3++, i3 = /[\da-fA-F]/);e3 < t3.length; e3++) {
378
- if (t3[e3] === ";")
379
- return e3;
380
- if (!t3[e3].match(i3))
381
- break;
382
- }
383
- return -1;
384
- }(t2, ++e2);
385
- let i2 = 0;
386
- for (;e2 < t2.length; e2++, i2++)
387
- if (!(t2[e2].match(/\w/) && i2 < 20)) {
388
- if (t2[e2] === ";")
389
- break;
390
- return -1;
391
- }
392
- return e2;
393
- }
394
- function b(t2, e2, i2) {
395
- return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } };
396
- }
397
- function E(t2) {
398
- return r(t2);
399
- }
400
- function y(t2) {
401
- return r(t2);
402
- }
403
- function w(t2, e2) {
404
- const i2 = t2.substring(0, e2).split(/\r?\n/);
405
- return { line: i2.length, col: i2[i2.length - 1].length + 1 };
406
- }
407
- function v(t2) {
408
- return t2.startIndex + t2[1].length;
409
- }
410
- const T = (t2) => o.includes(t2) ? "__" + t2 : t2, P = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) {
411
- return e2;
412
- }, attributeValueProcessor: function(t2, e2) {
413
- return e2;
414
- }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) {
415
- return t2;
416
- }, captureMetaData: false, maxNestedTags: 100, strictReservedNames: true, jPath: true, onDangerousProperty: T };
417
- function S(t2, e2) {
418
- if (typeof t2 != "string")
419
- return;
420
- const i2 = t2.toLowerCase();
421
- if (o.some((t3) => i2 === t3.toLowerCase()))
422
- throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
423
- if (a.some((t3) => i2 === t3.toLowerCase()))
424
- throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
425
- }
426
- function A(t2) {
427
- return typeof t2 == "boolean" ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1000, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : typeof t2 == "object" && t2 !== null ? { enabled: t2.enabled !== false, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1000), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
428
- }
429
- const O = function(t2) {
430
- const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
431
- for (const { value: t3, name: e3 } of i2)
432
- t3 && S(t3, e3);
433
- return e2.onDangerousProperty === null && (e2.onDangerousProperty = T), e2.processEntities = A(e2.processEntities), e2.stopNodes && Array.isArray(e2.stopNodes) && (e2.stopNodes = e2.stopNodes.map((t3) => typeof t3 == "string" && t3.startsWith("*.") ? ".." + t3.substring(2) : t3)), e2;
434
- };
435
- let C;
436
- C = typeof Symbol != "function" ? "@@xmlMetadata" : Symbol("XML Node Metadata");
437
-
438
- class $ {
439
- constructor(t2) {
440
- this.tagname = t2, this.child = [], this[":@"] = Object.create(null);
441
- }
442
- add(t2, e2) {
443
- t2 === "__proto__" && (t2 = "#__proto__"), this.child.push({ [t2]: e2 });
444
- }
445
- addChild(t2, e2) {
446
- t2.tagname === "__proto__" && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), e2 !== undefined && (this.child[this.child.length - 1][C] = { startIndex: e2 });
447
- }
448
- static getMetaDataSymbol() {
449
- return C;
450
- }
451
- }
452
-
453
- class I {
454
- constructor(t2) {
455
- this.suppressValidationErr = !t2, this.options = t2;
456
- }
457
- readDocType(t2, e2) {
458
- const i2 = Object.create(null);
459
- let n2 = 0;
460
- if (t2[e2 + 3] !== "O" || t2[e2 + 4] !== "C" || t2[e2 + 5] !== "T" || t2[e2 + 6] !== "Y" || t2[e2 + 7] !== "P" || t2[e2 + 8] !== "E")
461
- throw new Error("Invalid Tag instead of DOCTYPE");
462
- {
463
- e2 += 9;
464
- let s2 = 1, r2 = false, o2 = false, a2 = "";
465
- for (;e2 < t2.length; e2++)
466
- if (t2[e2] !== "<" || o2)
467
- if (t2[e2] === ">") {
468
- if (o2 ? t2[e2 - 1] === "-" && t2[e2 - 2] === "-" && (o2 = false, s2--) : s2--, s2 === 0)
469
- break;
470
- } else
471
- t2[e2] === "[" ? r2 = true : a2 += t2[e2];
472
- else {
473
- if (r2 && M(t2, "!ENTITY", e2)) {
474
- let s3, r3;
475
- if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), r3.indexOf("&") === -1) {
476
- if (this.options.enabled !== false && this.options.maxEntityCount != null && n2 >= this.options.maxEntityCount)
477
- throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
478
- const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
479
- i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
480
- }
481
- } else if (r2 && M(t2, "!ELEMENT", e2)) {
482
- e2 += 8;
483
- const { index: i3 } = this.readElementExp(t2, e2 + 1);
484
- e2 = i3;
485
- } else if (r2 && M(t2, "!ATTLIST", e2))
486
- e2 += 8;
487
- else if (r2 && M(t2, "!NOTATION", e2)) {
488
- e2 += 9;
489
- const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr);
490
- e2 = i3;
491
- } else {
492
- if (!M(t2, "!--", e2))
493
- throw new Error("Invalid DOCTYPE");
494
- o2 = true;
495
- }
496
- s2++, a2 = "";
497
- }
498
- if (s2 !== 0)
499
- throw new Error("Unclosed DOCTYPE");
500
- }
501
- return { entities: i2, i: e2 };
502
- }
503
- readEntityExp(t2, e2) {
504
- const i2 = e2 = j(t2, e2);
505
- for (;e2 < t2.length && !/\s/.test(t2[e2]) && t2[e2] !== '"' && t2[e2] !== "'"; )
506
- e2++;
507
- let n2 = t2.substring(i2, e2);
508
- if (_(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
509
- if (t2.substring(e2, e2 + 6).toUpperCase() === "SYSTEM")
510
- throw new Error("External entities are not supported");
511
- if (t2[e2] === "%")
512
- throw new Error("Parameter entities are not supported");
513
- }
514
- let s2 = "";
515
- if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), this.options.enabled !== false && this.options.maxEntitySize != null && s2.length > this.options.maxEntitySize)
516
- throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
517
- return [n2, s2, --e2];
518
- }
519
- readNotationExp(t2, e2) {
520
- const i2 = e2 = j(t2, e2);
521
- for (;e2 < t2.length && !/\s/.test(t2[e2]); )
522
- e2++;
523
- let n2 = t2.substring(i2, e2);
524
- !this.suppressValidationErr && _(n2), e2 = j(t2, e2);
525
- const s2 = t2.substring(e2, e2 + 6).toUpperCase();
526
- if (!this.suppressValidationErr && s2 !== "SYSTEM" && s2 !== "PUBLIC")
527
- throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
528
- e2 += s2.length, e2 = j(t2, e2);
529
- let r2 = null, o2 = null;
530
- if (s2 === "PUBLIC")
531
- [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), t2[e2 = j(t2, e2)] !== '"' && t2[e2] !== "'" || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
532
- else if (s2 === "SYSTEM" && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2))
533
- throw new Error("Missing mandatory system identifier for SYSTEM notation");
534
- return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
535
- }
536
- readIdentifierVal(t2, e2, i2) {
537
- let n2 = "";
538
- const s2 = t2[e2];
539
- if (s2 !== '"' && s2 !== "'")
540
- throw new Error(`Expected quoted string, found "${s2}"`);
541
- const r2 = ++e2;
542
- for (;e2 < t2.length && t2[e2] !== s2; )
543
- e2++;
544
- if (n2 = t2.substring(r2, e2), t2[e2] !== s2)
545
- throw new Error(`Unterminated ${i2} value`);
546
- return [++e2, n2];
547
- }
548
- readElementExp(t2, e2) {
549
- const i2 = e2 = j(t2, e2);
550
- for (;e2 < t2.length && !/\s/.test(t2[e2]); )
551
- e2++;
552
- let n2 = t2.substring(i2, e2);
553
- if (!this.suppressValidationErr && !r(n2))
554
- throw new Error(`Invalid element name: "${n2}"`);
555
- let s2 = "";
556
- if (t2[e2 = j(t2, e2)] === "E" && M(t2, "MPTY", e2))
557
- e2 += 4;
558
- else if (t2[e2] === "A" && M(t2, "NY", e2))
559
- e2 += 2;
560
- else if (t2[e2] === "(") {
561
- const i3 = ++e2;
562
- for (;e2 < t2.length && t2[e2] !== ")"; )
563
- e2++;
564
- if (s2 = t2.substring(i3, e2), t2[e2] !== ")")
565
- throw new Error("Unterminated content model");
566
- } else if (!this.suppressValidationErr)
567
- throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
568
- return { elementName: n2, contentModel: s2.trim(), index: e2 };
569
- }
570
- readAttlistExp(t2, e2) {
571
- let i2 = e2 = j(t2, e2);
572
- for (;e2 < t2.length && !/\s/.test(t2[e2]); )
573
- e2++;
574
- let n2 = t2.substring(i2, e2);
575
- for (_(n2), i2 = e2 = j(t2, e2);e2 < t2.length && !/\s/.test(t2[e2]); )
576
- e2++;
577
- let s2 = t2.substring(i2, e2);
578
- if (!_(s2))
579
- throw new Error(`Invalid attribute name: "${s2}"`);
580
- e2 = j(t2, e2);
581
- let r2 = "";
582
- if (t2.substring(e2, e2 + 8).toUpperCase() === "NOTATION") {
583
- if (r2 = "NOTATION", t2[e2 = j(t2, e2 += 8)] !== "(")
584
- throw new Error(`Expected '(', found "${t2[e2]}"`);
585
- e2++;
586
- let i3 = [];
587
- for (;e2 < t2.length && t2[e2] !== ")"; ) {
588
- const n3 = e2;
589
- for (;e2 < t2.length && t2[e2] !== "|" && t2[e2] !== ")"; )
590
- e2++;
591
- let s3 = t2.substring(n3, e2);
592
- if (s3 = s3.trim(), !_(s3))
593
- throw new Error(`Invalid notation name: "${s3}"`);
594
- i3.push(s3), t2[e2] === "|" && (e2++, e2 = j(t2, e2));
595
- }
596
- if (t2[e2] !== ")")
597
- throw new Error("Unterminated list of notations");
598
- e2++, r2 += " (" + i3.join("|") + ")";
599
- } else {
600
- const i3 = e2;
601
- for (;e2 < t2.length && !/\s/.test(t2[e2]); )
602
- e2++;
603
- r2 += t2.substring(i3, e2);
604
- const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
605
- if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase()))
606
- throw new Error(`Invalid attribute type: "${r2}"`);
607
- }
608
- e2 = j(t2, e2);
609
- let o2 = "";
610
- return t2.substring(e2, e2 + 8).toUpperCase() === "#REQUIRED" ? (o2 = "#REQUIRED", e2 += 8) : t2.substring(e2, e2 + 7).toUpperCase() === "#IMPLIED" ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
611
- }
612
- }
613
- const j = (t2, e2) => {
614
- for (;e2 < t2.length && /\s/.test(t2[e2]); )
615
- e2++;
616
- return e2;
617
- };
618
- function M(t2, e2, i2) {
619
- for (let n2 = 0;n2 < e2.length; n2++)
620
- if (e2[n2] !== t2[i2 + n2 + 1])
621
- return false;
622
- return true;
623
- }
624
- function _(t2) {
625
- if (r(t2))
626
- return t2;
627
- throw new Error(`Invalid entity name ${t2}`);
628
- }
629
- const D = /^[-+]?0x[a-fA-F0-9]+$/, V = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, k = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
630
- const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/, L = new Set(["push", "pop", "reset", "updateCurrent", "restore"]);
631
-
632
- class G {
633
- constructor(t2 = {}) {
634
- this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
635
- }
636
- push(t2, e2 = null, i2 = null) {
637
- this.path.length > 0 && (this.path[this.path.length - 1].values = undefined);
638
- const n2 = this.path.length;
639
- this.siblingStacks[n2] || (this.siblingStacks[n2] = new Map);
640
- const s2 = this.siblingStacks[n2], r2 = i2 ? `${i2}:${t2}` : t2, o2 = s2.get(r2) || 0;
641
- let a2 = 0;
642
- for (const t3 of s2.values())
643
- a2 += t3;
644
- s2.set(r2, o2 + 1);
645
- const h2 = { tag: t2, position: a2, counter: o2 };
646
- i2 != null && (h2.namespace = i2), e2 != null && (h2.values = e2), this.path.push(h2);
647
- }
648
- pop() {
649
- if (this.path.length === 0)
650
- return;
651
- const t2 = this.path.pop();
652
- return this.siblingStacks.length > this.path.length + 1 && (this.siblingStacks.length = this.path.length + 1), t2;
653
- }
654
- updateCurrent(t2) {
655
- if (this.path.length > 0) {
656
- const e2 = this.path[this.path.length - 1];
657
- t2 != null && (e2.values = t2);
658
- }
659
- }
660
- getCurrentTag() {
661
- return this.path.length > 0 ? this.path[this.path.length - 1].tag : undefined;
662
- }
663
- getCurrentNamespace() {
664
- return this.path.length > 0 ? this.path[this.path.length - 1].namespace : undefined;
665
- }
666
- getAttrValue(t2) {
667
- if (this.path.length === 0)
668
- return;
669
- const e2 = this.path[this.path.length - 1];
670
- return e2.values?.[t2];
671
- }
672
- hasAttr(t2) {
673
- if (this.path.length === 0)
674
- return false;
675
- const e2 = this.path[this.path.length - 1];
676
- return e2.values !== undefined && t2 in e2.values;
677
- }
678
- getPosition() {
679
- return this.path.length === 0 ? -1 : this.path[this.path.length - 1].position ?? 0;
680
- }
681
- getCounter() {
682
- return this.path.length === 0 ? -1 : this.path[this.path.length - 1].counter ?? 0;
683
- }
684
- getIndex() {
685
- return this.getPosition();
686
- }
687
- getDepth() {
688
- return this.path.length;
689
- }
690
- toString(t2, e2 = true) {
691
- const i2 = t2 || this.separator;
692
- return this.path.map((t3) => e2 && t3.namespace ? `${t3.namespace}:${t3.tag}` : t3.tag).join(i2);
693
- }
694
- toArray() {
695
- return this.path.map((t2) => t2.tag);
696
- }
697
- reset() {
698
- this.path = [], this.siblingStacks = [];
699
- }
700
- matches(t2) {
701
- const e2 = t2.segments;
702
- return e2.length !== 0 && (t2.hasDeepWildcard() ? this._matchWithDeepWildcard(e2) : this._matchSimple(e2));
703
- }
704
- _matchSimple(t2) {
705
- if (this.path.length !== t2.length)
706
- return false;
707
- for (let e2 = 0;e2 < t2.length; e2++) {
708
- const i2 = t2[e2], n2 = this.path[e2], s2 = e2 === this.path.length - 1;
709
- if (!this._matchSegment(i2, n2, s2))
710
- return false;
711
- }
712
- return true;
713
- }
714
- _matchWithDeepWildcard(t2) {
715
- let e2 = this.path.length - 1, i2 = t2.length - 1;
716
- for (;i2 >= 0 && e2 >= 0; ) {
717
- const n2 = t2[i2];
718
- if (n2.type === "deep-wildcard") {
719
- if (i2--, i2 < 0)
720
- return true;
721
- const n3 = t2[i2];
722
- let s2 = false;
723
- for (let t3 = e2;t3 >= 0; t3--) {
724
- const r2 = t3 === this.path.length - 1;
725
- if (this._matchSegment(n3, this.path[t3], r2)) {
726
- e2 = t3 - 1, i2--, s2 = true;
727
- break;
728
- }
729
- }
730
- if (!s2)
731
- return false;
732
- } else {
733
- const t3 = e2 === this.path.length - 1;
734
- if (!this._matchSegment(n2, this.path[e2], t3))
735
- return false;
736
- e2--, i2--;
737
- }
738
- }
739
- return i2 < 0;
740
- }
741
- _matchSegment(t2, e2, i2) {
742
- if (t2.tag !== "*" && t2.tag !== e2.tag)
743
- return false;
744
- if (t2.namespace !== undefined && t2.namespace !== "*" && t2.namespace !== e2.namespace)
745
- return false;
746
- if (t2.attrName !== undefined) {
747
- if (!i2)
748
- return false;
749
- if (!e2.values || !(t2.attrName in e2.values))
750
- return false;
751
- if (t2.attrValue !== undefined) {
752
- const i3 = e2.values[t2.attrName];
753
- if (String(i3) !== String(t2.attrValue))
754
- return false;
755
- }
756
- }
757
- if (t2.position !== undefined) {
758
- if (!i2)
759
- return false;
760
- const n2 = e2.counter ?? 0;
761
- if (t2.position === "first" && n2 !== 0)
762
- return false;
763
- if (t2.position === "odd" && n2 % 2 != 1)
764
- return false;
765
- if (t2.position === "even" && n2 % 2 != 0)
766
- return false;
767
- if (t2.position === "nth" && n2 !== t2.positionValue)
768
- return false;
769
- }
770
- return true;
771
- }
772
- snapshot() {
773
- return { path: this.path.map((t2) => ({ ...t2 })), siblingStacks: this.siblingStacks.map((t2) => new Map(t2)) };
774
- }
775
- restore(t2) {
776
- this.path = t2.path.map((t3) => ({ ...t3 })), this.siblingStacks = t2.siblingStacks.map((t3) => new Map(t3));
777
- }
778
- readOnly() {
779
- return new Proxy(this, { get(t2, e2, i2) {
780
- if (L.has(e2))
781
- return () => {
782
- throw new TypeError(`Cannot call '${e2}' on a read-only Matcher. Obtain a writable instance to mutate state.`);
783
- };
784
- const n2 = Reflect.get(t2, e2, i2);
785
- return e2 === "path" || e2 === "siblingStacks" ? Object.freeze(Array.isArray(n2) ? n2.map((t3) => t3 instanceof Map ? Object.freeze(new Map(t3)) : Object.freeze({ ...t3 })) : n2) : typeof n2 == "function" ? n2.bind(t2) : n2;
786
- }, set(t2, e2) {
787
- throw new TypeError(`Cannot set property '${String(e2)}' on a read-only Matcher.`);
788
- }, deleteProperty(t2, e2) {
789
- throw new TypeError(`Cannot delete property '${String(e2)}' from a read-only Matcher.`);
790
- } });
791
- }
792
- }
793
-
794
- class R {
795
- constructor(t2, e2 = {}) {
796
- this.pattern = t2, this.separator = e2.separator || ".", this.segments = this._parse(t2), this._hasDeepWildcard = this.segments.some((t3) => t3.type === "deep-wildcard"), this._hasAttributeCondition = this.segments.some((t3) => t3.attrName !== undefined), this._hasPositionSelector = this.segments.some((t3) => t3.position !== undefined);
797
- }
798
- _parse(t2) {
799
- const e2 = [];
800
- let i2 = 0, n2 = "";
801
- for (;i2 < t2.length; )
802
- t2[i2] === this.separator ? i2 + 1 < t2.length && t2[i2 + 1] === this.separator ? (n2.trim() && (e2.push(this._parseSegment(n2.trim())), n2 = ""), e2.push({ type: "deep-wildcard" }), i2 += 2) : (n2.trim() && e2.push(this._parseSegment(n2.trim())), n2 = "", i2++) : (n2 += t2[i2], i2++);
803
- return n2.trim() && e2.push(this._parseSegment(n2.trim())), e2;
804
- }
805
- _parseSegment(t2) {
806
- const e2 = { type: "tag" };
807
- let i2 = null, n2 = t2;
808
- const s2 = t2.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);
809
- if (s2 && (n2 = s2[1] + s2[3], s2[2])) {
810
- const t3 = s2[2].slice(1, -1);
811
- t3 && (i2 = t3);
812
- }
813
- let r2, o2, a2 = n2;
814
- if (n2.includes("::")) {
815
- const e3 = n2.indexOf("::");
816
- if (r2 = n2.substring(0, e3).trim(), a2 = n2.substring(e3 + 2).trim(), !r2)
817
- throw new Error(`Invalid namespace in pattern: ${t2}`);
818
- }
819
- let h2 = null;
820
- if (a2.includes(":")) {
821
- const t3 = a2.lastIndexOf(":"), e3 = a2.substring(0, t3).trim(), i3 = a2.substring(t3 + 1).trim();
822
- ["first", "last", "odd", "even"].includes(i3) || /^nth\(\d+\)$/.test(i3) ? (o2 = e3, h2 = i3) : o2 = a2;
823
- } else
824
- o2 = a2;
825
- if (!o2)
826
- throw new Error(`Invalid segment pattern: ${t2}`);
827
- if (e2.tag = o2, r2 && (e2.namespace = r2), i2)
828
- if (i2.includes("=")) {
829
- const t3 = i2.indexOf("=");
830
- e2.attrName = i2.substring(0, t3).trim(), e2.attrValue = i2.substring(t3 + 1).trim();
831
- } else
832
- e2.attrName = i2.trim();
833
- if (h2) {
834
- const t3 = h2.match(/^nth\((\d+)\)$/);
835
- t3 ? (e2.position = "nth", e2.positionValue = parseInt(t3[1], 10)) : e2.position = h2;
836
- }
837
- return e2;
838
- }
839
- get length() {
840
- return this.segments.length;
841
- }
842
- hasDeepWildcard() {
843
- return this._hasDeepWildcard;
844
- }
845
- hasAttributeCondition() {
846
- return this._hasAttributeCondition;
847
- }
848
- hasPositionSelector() {
849
- return this._hasPositionSelector;
850
- }
851
- toString() {
852
- return this.pattern;
853
- }
854
- }
855
- function U(t2, e2) {
856
- if (!t2)
857
- return {};
858
- const i2 = e2.attributesGroupName ? t2[e2.attributesGroupName] : t2;
859
- if (!i2)
860
- return {};
861
- const n2 = {};
862
- for (const t3 in i2)
863
- t3.startsWith(e2.attributeNamePrefix) ? n2[t3.substring(e2.attributeNamePrefix.length)] = i2[t3] : n2[t3] = i2[t3];
864
- return n2;
865
- }
866
- function B(t2) {
867
- if (!t2 || typeof t2 != "string")
868
- return;
869
- const e2 = t2.indexOf(":");
870
- if (e2 !== -1 && e2 > 0) {
871
- const i2 = t2.substring(0, e2);
872
- if (i2 !== "xmlns")
873
- return i2;
874
- }
875
- }
876
-
877
- class W {
878
- constructor(t2) {
879
- var e2;
880
- if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e3) => rt(e3, 10, "&#") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e3) => rt(e3, 16, "&#x") } }, this.addExternalEntities = Y, this.parseXml = J, this.parseTextData = z, this.resolveNameSpace = X, this.buildAttributesMap = Z, this.isItStopNode = tt, this.replaceEntitiesValue = Q, this.readStopNodeData = nt, this.saveTextToParentTag = H, this.addChild = K, this.ignoreAttributesFn = typeof (e2 = this.options.ignoreAttributes) == "function" ? e2 : Array.isArray(e2) ? (t3) => {
881
- for (const i2 of e2) {
882
- if (typeof i2 == "string" && t3 === i2)
883
- return true;
884
- if (i2 instanceof RegExp && i2.test(t3))
885
- return true;
886
- }
887
- } : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new G, this.readonlyMatcher = this.matcher.readOnly(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
888
- this.stopNodeExpressions = [];
889
- for (let t3 = 0;t3 < this.options.stopNodes.length; t3++) {
890
- const e3 = this.options.stopNodes[t3];
891
- typeof e3 == "string" ? this.stopNodeExpressions.push(new R(e3)) : e3 instanceof R && this.stopNodeExpressions.push(e3);
892
- }
893
- }
894
- }
895
- }
896
- function Y(t2) {
897
- const e2 = Object.keys(t2);
898
- for (let i2 = 0;i2 < e2.length; i2++) {
899
- const n2 = e2[i2], s2 = n2.replace(/[.\-+*:]/g, "\\.");
900
- this.lastEntities[n2] = { regex: new RegExp("&" + s2 + ";", "g"), val: t2[n2] };
901
- }
902
- }
903
- function z(t2, e2, i2, n2, s2, r2, o2) {
904
- if (t2 !== undefined && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) {
905
- o2 || (t2 = this.replaceEntitiesValue(t2, e2, i2));
906
- const n3 = this.options.jPath ? i2.toString() : i2, a2 = this.options.tagValueProcessor(e2, t2, n3, s2, r2);
907
- return a2 == null ? t2 : typeof a2 != typeof t2 || a2 !== t2 ? a2 : this.options.trimValues || t2.trim() === t2 ? st(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2;
908
- }
909
- }
910
- function X(t2) {
911
- if (this.options.removeNSPrefix) {
912
- const e2 = t2.split(":"), i2 = t2.charAt(0) === "/" ? "/" : "";
913
- if (e2[0] === "xmlns")
914
- return "";
915
- e2.length === 2 && (t2 = i2 + e2[1]);
916
- }
917
- return t2;
918
- }
919
- const q = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
920
- function Z(t2, e2, i2) {
921
- if (this.options.ignoreAttributes !== true && typeof t2 == "string") {
922
- const n2 = s(t2, q), r2 = n2.length, o2 = {}, a2 = {};
923
- for (let t3 = 0;t3 < r2; t3++) {
924
- const e3 = this.resolveNameSpace(n2[t3][1]), s2 = n2[t3][4];
925
- if (e3.length && s2 !== undefined) {
926
- let t4 = s2;
927
- this.options.trimValues && (t4 = t4.trim()), t4 = this.replaceEntitiesValue(t4, i2, this.readonlyMatcher), a2[e3] = t4;
928
- }
929
- }
930
- Object.keys(a2).length > 0 && typeof e2 == "object" && e2.updateCurrent && e2.updateCurrent(a2);
931
- for (let t3 = 0;t3 < r2; t3++) {
932
- const s2 = this.resolveNameSpace(n2[t3][1]), r3 = this.options.jPath ? e2.toString() : this.readonlyMatcher;
933
- if (this.ignoreAttributesFn(s2, r3))
934
- continue;
935
- let a3 = n2[t3][4], h2 = this.options.attributeNamePrefix + s2;
936
- if (s2.length)
937
- if (this.options.transformAttributeName && (h2 = this.options.transformAttributeName(h2)), h2 = at(h2, this.options), a3 !== undefined) {
938
- this.options.trimValues && (a3 = a3.trim()), a3 = this.replaceEntitiesValue(a3, i2, this.readonlyMatcher);
939
- const t4 = this.options.jPath ? e2.toString() : this.readonlyMatcher, n3 = this.options.attributeValueProcessor(s2, a3, t4);
940
- o2[h2] = n3 == null ? a3 : typeof n3 != typeof a3 || n3 !== a3 ? n3 : st(a3, this.options.parseAttributeValue, this.options.numberParseOptions);
941
- } else
942
- this.options.allowBooleanAttributes && (o2[h2] = true);
943
- }
944
- if (!Object.keys(o2).length)
945
- return;
946
- if (this.options.attributesGroupName) {
947
- const t3 = {};
948
- return t3[this.options.attributesGroupName] = o2, t3;
949
- }
950
- return o2;
951
- }
952
- }
953
- const J = function(t2) {
954
- t2 = t2.replace(/\r\n?/g, `
955
- `);
956
- const e2 = new $("!xml");
957
- let i2 = e2, n2 = "";
958
- this.matcher.reset(), this.entityExpansionCount = 0, this.currentExpandedLength = 0;
959
- const s2 = new I(this.options.processEntities);
960
- for (let r2 = 0;r2 < t2.length; r2++)
961
- if (t2[r2] === "<")
962
- if (t2[r2 + 1] === "/") {
963
- const e3 = et(t2, ">", r2, "Closing Tag is not closed.");
964
- let s3 = t2.substring(r2 + 2, e3).trim();
965
- if (this.options.removeNSPrefix) {
966
- const t3 = s3.indexOf(":");
967
- t3 !== -1 && (s3 = s3.substr(t3 + 1));
968
- }
969
- s3 = ot(this.options.transformTagName, s3, "", this.options).tagName, i2 && (n2 = this.saveTextToParentTag(n2, i2, this.readonlyMatcher));
970
- const o2 = this.matcher.getCurrentTag();
971
- if (s3 && this.options.unpairedTags.indexOf(s3) !== -1)
972
- throw new Error(`Unpaired tag can not be used as closing tag: </${s3}>`);
973
- o2 && this.options.unpairedTags.indexOf(o2) !== -1 && (this.matcher.pop(), this.tagsNodeStack.pop()), this.matcher.pop(), this.isCurrentNodeStopNode = false, i2 = this.tagsNodeStack.pop(), n2 = "", r2 = e3;
974
- } else if (t2[r2 + 1] === "?") {
975
- let e3 = it(t2, r2, false, "?>");
976
- if (!e3)
977
- throw new Error("Pi Tag is not closed.");
978
- if (n2 = this.saveTextToParentTag(n2, i2, this.readonlyMatcher), this.options.ignoreDeclaration && e3.tagName === "?xml" || this.options.ignorePiTags)
979
- ;
980
- else {
981
- const t3 = new $(e3.tagName);
982
- t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, this.matcher, e3.tagName)), this.addChild(i2, t3, this.readonlyMatcher, r2);
983
- }
984
- r2 = e3.closeIndex + 1;
985
- } else if (t2.substr(r2 + 1, 3) === "!--") {
986
- const e3 = et(t2, "-->", r2 + 4, "Comment is not closed.");
987
- if (this.options.commentPropName) {
988
- const s3 = t2.substring(r2 + 4, e3 - 2);
989
- n2 = this.saveTextToParentTag(n2, i2, this.readonlyMatcher), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: s3 }]);
990
- }
991
- r2 = e3;
992
- } else if (t2.substr(r2 + 1, 2) === "!D") {
993
- const e3 = s2.readDocType(t2, r2);
994
- this.docTypeEntities = e3.entities, r2 = e3.i;
995
- } else if (t2.substr(r2 + 1, 2) === "![") {
996
- const e3 = et(t2, "]]>", r2, "CDATA is not closed.") - 2, s3 = t2.substring(r2 + 9, e3);
997
- n2 = this.saveTextToParentTag(n2, i2, this.readonlyMatcher);
998
- let o2 = this.parseTextData(s3, i2.tagname, this.readonlyMatcher, true, false, true, true);
999
- o2 == null && (o2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: s3 }]) : i2.add(this.options.textNodeName, o2), r2 = e3 + 2;
1000
- } else {
1001
- let s3 = it(t2, r2, this.options.removeNSPrefix);
1002
- if (!s3) {
1003
- const e3 = t2.substring(Math.max(0, r2 - 50), Math.min(t2.length, r2 + 50));
1004
- throw new Error(`readTagExp returned undefined at position ${r2}. Context: "${e3}"`);
1005
- }
1006
- let o2 = s3.tagName;
1007
- const a2 = s3.rawTagName;
1008
- let { tagExp: h2, attrExpPresent: l2, closeIndex: p2 } = s3;
1009
- if ({ tagName: o2, tagExp: h2 } = ot(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName))
1010
- throw new Error(`Invalid tag name: ${o2}`);
1011
- i2 && n2 && i2.tagname !== "!xml" && (n2 = this.saveTextToParentTag(n2, i2, this.readonlyMatcher, false));
1012
- const u2 = i2;
1013
- u2 && this.options.unpairedTags.indexOf(u2.tagname) !== -1 && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
1014
- let c2 = false;
1015
- h2.length > 0 && h2.lastIndexOf("/") === h2.length - 1 && (c2 = true, o2[o2.length - 1] === "/" ? (o2 = o2.substr(0, o2.length - 1), h2 = o2) : h2 = h2.substr(0, h2.length - 1), l2 = o2 !== h2);
1016
- let d2, f2 = null, g2 = {};
1017
- d2 = B(a2), o2 !== e2.tagname && this.matcher.push(o2, {}, d2), o2 !== h2 && l2 && (f2 = this.buildAttributesMap(h2, this.matcher, o2), f2 && (g2 = U(f2, this.options))), o2 !== e2.tagname && (this.isCurrentNodeStopNode = this.isItStopNode(this.stopNodeExpressions, this.matcher));
1018
- const m2 = r2;
1019
- if (this.isCurrentNodeStopNode) {
1020
- let e3 = "";
1021
- if (c2)
1022
- r2 = s3.closeIndex;
1023
- else if (this.options.unpairedTags.indexOf(o2) !== -1)
1024
- r2 = s3.closeIndex;
1025
- else {
1026
- const i3 = this.readStopNodeData(t2, a2, p2 + 1);
1027
- if (!i3)
1028
- throw new Error(`Unexpected end of ${a2}`);
1029
- r2 = i3.i, e3 = i3.tagContent;
1030
- }
1031
- const n3 = new $(o2);
1032
- f2 && (n3[":@"] = f2), n3.add(this.options.textNodeName, e3), this.matcher.pop(), this.isCurrentNodeStopNode = false, this.addChild(i2, n3, this.readonlyMatcher, m2);
1033
- } else {
1034
- if (c2) {
1035
- ({ tagName: o2, tagExp: h2 } = ot(this.options.transformTagName, o2, h2, this.options));
1036
- const t3 = new $(o2);
1037
- f2 && (t3[":@"] = f2), this.addChild(i2, t3, this.readonlyMatcher, m2), this.matcher.pop(), this.isCurrentNodeStopNode = false;
1038
- } else {
1039
- if (this.options.unpairedTags.indexOf(o2) !== -1) {
1040
- const t3 = new $(o2);
1041
- f2 && (t3[":@"] = f2), this.addChild(i2, t3, this.readonlyMatcher, m2), this.matcher.pop(), this.isCurrentNodeStopNode = false, r2 = s3.closeIndex;
1042
- continue;
1043
- }
1044
- {
1045
- const t3 = new $(o2);
1046
- if (this.tagsNodeStack.length > this.options.maxNestedTags)
1047
- throw new Error("Maximum nested tags exceeded");
1048
- this.tagsNodeStack.push(i2), f2 && (t3[":@"] = f2), this.addChild(i2, t3, this.readonlyMatcher, m2), i2 = t3;
1049
- }
1050
- }
1051
- n2 = "", r2 = p2;
1052
- }
1053
- }
1054
- else
1055
- n2 += t2[r2];
1056
- return e2.child;
1057
- };
1058
- function K(t2, e2, i2, n2) {
1059
- this.options.captureMetaData || (n2 = undefined);
1060
- const s2 = this.options.jPath ? i2.toString() : i2, r2 = this.options.updateTag(e2.tagname, s2, e2[":@"]);
1061
- r2 === false || (typeof r2 == "string" ? (e2.tagname = r2, t2.addChild(e2, n2)) : t2.addChild(e2, n2));
1062
- }
1063
- function Q(t2, e2, i2) {
1064
- const n2 = this.options.processEntities;
1065
- if (!n2 || !n2.enabled)
1066
- return t2;
1067
- if (n2.allowedTags) {
1068
- const s2 = this.options.jPath ? i2.toString() : i2;
1069
- if (!(Array.isArray(n2.allowedTags) ? n2.allowedTags.includes(e2) : n2.allowedTags(e2, s2)))
1070
- return t2;
1071
- }
1072
- if (n2.tagFilter) {
1073
- const s2 = this.options.jPath ? i2.toString() : i2;
1074
- if (!n2.tagFilter(e2, s2))
1075
- return t2;
1076
- }
1077
- for (const e3 of Object.keys(this.docTypeEntities)) {
1078
- const i3 = this.docTypeEntities[e3], s2 = t2.match(i3.regx);
1079
- if (s2) {
1080
- if (this.entityExpansionCount += s2.length, n2.maxTotalExpansions && this.entityExpansionCount > n2.maxTotalExpansions)
1081
- throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n2.maxTotalExpansions}`);
1082
- const e4 = t2.length;
1083
- if (t2 = t2.replace(i3.regx, i3.val), n2.maxExpandedLength && (this.currentExpandedLength += t2.length - e4, this.currentExpandedLength > n2.maxExpandedLength))
1084
- throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${n2.maxExpandedLength}`);
1085
- }
1086
- }
1087
- for (const e3 of Object.keys(this.lastEntities)) {
1088
- const i3 = this.lastEntities[e3], s2 = t2.match(i3.regex);
1089
- if (s2 && (this.entityExpansionCount += s2.length, n2.maxTotalExpansions && this.entityExpansionCount > n2.maxTotalExpansions))
1090
- throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n2.maxTotalExpansions}`);
1091
- t2 = t2.replace(i3.regex, i3.val);
1092
- }
1093
- if (t2.indexOf("&") === -1)
1094
- return t2;
1095
- if (this.options.htmlEntities)
1096
- for (const e3 of Object.keys(this.htmlEntities)) {
1097
- const i3 = this.htmlEntities[e3], s2 = t2.match(i3.regex);
1098
- if (s2 && (this.entityExpansionCount += s2.length, n2.maxTotalExpansions && this.entityExpansionCount > n2.maxTotalExpansions))
1099
- throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n2.maxTotalExpansions}`);
1100
- t2 = t2.replace(i3.regex, i3.val);
1101
- }
1102
- return t2.replace(this.ampEntity.regex, this.ampEntity.val);
1103
- }
1104
- function H(t2, e2, i2, n2) {
1105
- return t2 && (n2 === undefined && (n2 = e2.child.length === 0), (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && Object.keys(e2[":@"]).length !== 0, n2)) !== undefined && t2 !== "" && e2.add(this.options.textNodeName, t2), t2 = ""), t2;
1106
- }
1107
- function tt(t2, e2) {
1108
- if (!t2 || t2.length === 0)
1109
- return false;
1110
- for (let i2 = 0;i2 < t2.length; i2++)
1111
- if (e2.matches(t2[i2]))
1112
- return true;
1113
- return false;
1114
- }
1115
- function et(t2, e2, i2, n2) {
1116
- const s2 = t2.indexOf(e2, i2);
1117
- if (s2 === -1)
1118
- throw new Error(n2);
1119
- return s2 + e2.length - 1;
1120
- }
1121
- function it(t2, e2, i2, n2 = ">") {
1122
- const s2 = function(t3, e3, i3 = ">") {
1123
- let n3, s3 = "";
1124
- for (let r3 = e3;r3 < t3.length; r3++) {
1125
- let e4 = t3[r3];
1126
- if (n3)
1127
- e4 === n3 && (n3 = "");
1128
- else if (e4 === '"' || e4 === "'")
1129
- n3 = e4;
1130
- else if (e4 === i3[0]) {
1131
- if (!i3[1])
1132
- return { data: s3, index: r3 };
1133
- if (t3[r3 + 1] === i3[1])
1134
- return { data: s3, index: r3 };
1135
- } else
1136
- e4 === "\t" && (e4 = " ");
1137
- s3 += e4;
1138
- }
1139
- }(t2, e2 + 1, n2);
1140
- if (!s2)
1141
- return;
1142
- let r2 = s2.data;
1143
- const o2 = s2.index, a2 = r2.search(/\s/);
1144
- let h2 = r2, l2 = true;
1145
- a2 !== -1 && (h2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart());
1146
- const p2 = h2;
1147
- if (i2) {
1148
- const t3 = h2.indexOf(":");
1149
- t3 !== -1 && (h2 = h2.substr(t3 + 1), l2 = h2 !== s2.data.substr(t3 + 1));
1150
- }
1151
- return { tagName: h2, tagExp: r2, closeIndex: o2, attrExpPresent: l2, rawTagName: p2 };
1152
- }
1153
- function nt(t2, e2, i2) {
1154
- const n2 = i2;
1155
- let s2 = 1;
1156
- for (;i2 < t2.length; i2++)
1157
- if (t2[i2] === "<")
1158
- if (t2[i2 + 1] === "/") {
1159
- const r2 = et(t2, ">", i2, `${e2} is not closed`);
1160
- if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, s2 === 0))
1161
- return { tagContent: t2.substring(n2, i2), i: r2 };
1162
- i2 = r2;
1163
- } else if (t2[i2 + 1] === "?")
1164
- i2 = et(t2, "?>", i2 + 1, "StopNode is not closed.");
1165
- else if (t2.substr(i2 + 1, 3) === "!--")
1166
- i2 = et(t2, "-->", i2 + 3, "StopNode is not closed.");
1167
- else if (t2.substr(i2 + 1, 2) === "![")
1168
- i2 = et(t2, "]]>", i2, "StopNode is not closed.") - 2;
1169
- else {
1170
- const n3 = it(t2, i2, ">");
1171
- n3 && ((n3 && n3.tagName) === e2 && n3.tagExp[n3.tagExp.length - 1] !== "/" && s2++, i2 = n3.closeIndex);
1172
- }
1173
- }
1174
- function st(t2, e2, i2) {
1175
- if (e2 && typeof t2 == "string") {
1176
- const e3 = t2.trim();
1177
- return e3 === "true" || e3 !== "false" && function(t3, e4 = {}) {
1178
- if (e4 = Object.assign({}, k, e4), !t3 || typeof t3 != "string")
1179
- return t3;
1180
- let i3 = t3.trim();
1181
- if (e4.skipLike !== undefined && e4.skipLike.test(i3))
1182
- return t3;
1183
- if (t3 === "0")
1184
- return 0;
1185
- if (e4.hex && D.test(i3))
1186
- return function(t4) {
1187
- if (parseInt)
1188
- return parseInt(t4, 16);
1189
- if (Number.parseInt)
1190
- return Number.parseInt(t4, 16);
1191
- if (window && window.parseInt)
1192
- return window.parseInt(t4, 16);
1193
- throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
1194
- }(i3);
1195
- if (isFinite(i3)) {
1196
- if (i3.includes("e") || i3.includes("E"))
1197
- return function(t4, e5, i4) {
1198
- if (!i4.eNotation)
1199
- return t4;
1200
- const n3 = e5.match(F);
1201
- if (n3) {
1202
- let s2 = n3[1] || "";
1203
- const r2 = n3[3].indexOf("e") === -1 ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
1204
- return o2.length > 1 && a2 ? t4 : (o2.length !== 1 || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
1205
- }
1206
- return t4;
1207
- }(t3, i3, e4);
1208
- {
1209
- const s2 = V.exec(i3);
1210
- if (s2) {
1211
- const r2 = s2[1] || "", o2 = s2[2];
1212
- let a2 = (n2 = s2[3]) && n2.indexOf(".") !== -1 ? ((n2 = n2.replace(/0+$/, "")) === "." ? n2 = "0" : n2[0] === "." ? n2 = "0" + n2 : n2[n2.length - 1] === "." && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
1213
- const h2 = r2 ? t3[o2.length + 1] === "." : t3[o2.length] === ".";
1214
- if (!e4.leadingZeros && (o2.length > 1 || o2.length === 1 && !h2))
1215
- return t3;
1216
- {
1217
- const n3 = Number(i3), s3 = String(n3);
1218
- if (n3 === 0)
1219
- return n3;
1220
- if (s3.search(/[eE]/) !== -1)
1221
- return e4.eNotation ? n3 : t3;
1222
- if (i3.indexOf(".") !== -1)
1223
- return s3 === "0" || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
1224
- let h3 = o2 ? a2 : i3;
1225
- return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
1226
- }
1227
- }
1228
- return t3;
1229
- }
1230
- }
1231
- var n2;
1232
- return function(t4, e5, i4) {
1233
- const n3 = e5 === 1 / 0;
1234
- switch (i4.infinity.toLowerCase()) {
1235
- case "null":
1236
- return null;
1237
- case "infinity":
1238
- return e5;
1239
- case "string":
1240
- return n3 ? "Infinity" : "-Infinity";
1241
- default:
1242
- return t4;
1243
- }
1244
- }(t3, Number(i3), e4);
1245
- }(t2, i2);
1246
- }
1247
- return t2 !== undefined ? t2 : "";
1248
- }
1249
- function rt(t2, e2, i2) {
1250
- const n2 = Number.parseInt(t2, e2);
1251
- return n2 >= 0 && n2 <= 1114111 ? String.fromCodePoint(n2) : i2 + t2 + ";";
1252
- }
1253
- function ot(t2, e2, i2, n2) {
1254
- if (t2) {
1255
- const n3 = t2(e2);
1256
- i2 === e2 && (i2 = n3), e2 = n3;
1257
- }
1258
- return { tagName: e2 = at(e2, n2), tagExp: i2 };
1259
- }
1260
- function at(t2, e2) {
1261
- if (a.includes(t2))
1262
- throw new Error(`[SECURITY] Invalid name: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
1263
- return o.includes(t2) ? e2.onDangerousProperty(t2) : t2;
1264
- }
1265
- const ht = $.getMetaDataSymbol();
1266
- function lt(t2, e2) {
1267
- if (!t2 || typeof t2 != "object")
1268
- return {};
1269
- if (!e2)
1270
- return t2;
1271
- const i2 = {};
1272
- for (const n2 in t2)
1273
- n2.startsWith(e2) ? i2[n2.substring(e2.length)] = t2[n2] : i2[n2] = t2[n2];
1274
- return i2;
1275
- }
1276
- function pt(t2, e2, i2, n2) {
1277
- return ut(t2, e2, i2, n2);
1278
- }
1279
- function ut(t2, e2, i2, n2) {
1280
- let s2;
1281
- const r2 = {};
1282
- for (let o2 = 0;o2 < t2.length; o2++) {
1283
- const a2 = t2[o2], h2 = ct(a2);
1284
- if (h2 !== undefined && h2 !== e2.textNodeName) {
1285
- const t3 = lt(a2[":@"] || {}, e2.attributeNamePrefix);
1286
- i2.push(h2, t3);
1287
- }
1288
- if (h2 === e2.textNodeName)
1289
- s2 === undefined ? s2 = a2[h2] : s2 += "" + a2[h2];
1290
- else {
1291
- if (h2 === undefined)
1292
- continue;
1293
- if (a2[h2]) {
1294
- let t3 = ut(a2[h2], e2, i2, n2);
1295
- const s3 = ft(t3, e2);
1296
- if (a2[":@"] ? dt(t3, a2[":@"], n2, e2) : Object.keys(t3).length !== 1 || t3[e2.textNodeName] === undefined || e2.alwaysCreateTextNode ? Object.keys(t3).length === 0 && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], a2[ht] !== undefined && typeof t3 == "object" && t3 !== null && (t3[ht] = a2[ht]), r2[h2] !== undefined && Object.prototype.hasOwnProperty.call(r2, h2))
1297
- Array.isArray(r2[h2]) || (r2[h2] = [r2[h2]]), r2[h2].push(t3);
1298
- else {
1299
- const i3 = e2.jPath ? n2.toString() : n2;
1300
- e2.isArray(h2, i3, s3) ? r2[h2] = [t3] : r2[h2] = t3;
1301
- }
1302
- h2 !== undefined && h2 !== e2.textNodeName && i2.pop();
1303
- }
1304
- }
1305
- }
1306
- return typeof s2 == "string" ? s2.length > 0 && (r2[e2.textNodeName] = s2) : s2 !== undefined && (r2[e2.textNodeName] = s2), r2;
1307
- }
1308
- function ct(t2) {
1309
- const e2 = Object.keys(t2);
1310
- for (let t3 = 0;t3 < e2.length; t3++) {
1311
- const i2 = e2[t3];
1312
- if (i2 !== ":@")
1313
- return i2;
1314
- }
1315
- }
1316
- function dt(t2, e2, i2, n2) {
1317
- if (e2) {
1318
- const s2 = Object.keys(e2), r2 = s2.length;
1319
- for (let o2 = 0;o2 < r2; o2++) {
1320
- const r3 = s2[o2], a2 = r3.startsWith(n2.attributeNamePrefix) ? r3.substring(n2.attributeNamePrefix.length) : r3, h2 = n2.jPath ? i2.toString() + "." + a2 : i2;
1321
- n2.isArray(r3, h2, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3];
1322
- }
1323
- }
1324
- }
1325
- function ft(t2, e2) {
1326
- const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length;
1327
- return n2 === 0 || !(n2 !== 1 || !t2[i2] && typeof t2[i2] != "boolean" && t2[i2] !== 0);
1328
- }
1329
-
1330
- class gt {
1331
- constructor(t2) {
1332
- this.externalEntities = {}, this.options = O(t2);
1333
- }
1334
- parse(t2, e2) {
1335
- if (typeof t2 != "string" && t2.toString)
1336
- t2 = t2.toString();
1337
- else if (typeof t2 != "string")
1338
- throw new Error("XML data is accepted in String or Bytes[] form.");
1339
- if (e2) {
1340
- e2 === true && (e2 = {});
1341
- const i3 = l(t2, e2);
1342
- if (i3 !== true)
1343
- throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`);
1344
- }
1345
- const i2 = new W(this.options);
1346
- i2.addExternalEntities(this.externalEntities);
1347
- const n2 = i2.parseXml(t2);
1348
- return this.options.preserveOrder || n2 === undefined ? n2 : pt(n2, this.options, i2.matcher, i2.readonlyMatcher);
1349
- }
1350
- addEntity(t2, e2) {
1351
- if (e2.indexOf("&") !== -1)
1352
- throw new Error("Entity value can't have '&'");
1353
- if (t2.indexOf("&") !== -1 || t2.indexOf(";") !== -1)
1354
- throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");
1355
- if (e2 === "&")
1356
- throw new Error("An entity with value '&' is not permitted");
1357
- this.externalEntities[t2] = e2;
1358
- }
1359
- static getMetaDataSymbol() {
1360
- return $.getMetaDataSymbol();
1361
- }
1362
- }
1363
- function mt(t2, e2) {
1364
- let i2 = "";
1365
- e2.format && e2.indentBy.length > 0 && (i2 = `
1366
- `);
1367
- const n2 = [];
1368
- if (e2.stopNodes && Array.isArray(e2.stopNodes))
1369
- for (let t3 = 0;t3 < e2.stopNodes.length; t3++) {
1370
- const i3 = e2.stopNodes[t3];
1371
- typeof i3 == "string" ? n2.push(new R(i3)) : i3 instanceof R && n2.push(i3);
1372
- }
1373
- return xt(t2, e2, i2, new G, n2);
1374
- }
1375
- function xt(t2, e2, i2, n2, s2) {
1376
- let r2 = "", o2 = false;
1377
- if (e2.maxNestedTags && n2.getDepth() > e2.maxNestedTags)
1378
- throw new Error("Maximum nested tags exceeded");
1379
- if (!Array.isArray(t2)) {
1380
- if (t2 != null) {
1381
- let i3 = t2.toString();
1382
- return i3 = Tt(i3, e2), i3;
1383
- }
1384
- return "";
1385
- }
1386
- for (let a2 = 0;a2 < t2.length; a2++) {
1387
- const h2 = t2[a2], l2 = yt(h2);
1388
- if (l2 === undefined)
1389
- continue;
1390
- const p2 = Nt(h2[":@"], e2);
1391
- n2.push(l2, p2);
1392
- const u2 = vt(n2, s2);
1393
- if (l2 === e2.textNodeName) {
1394
- let t3 = h2[l2];
1395
- u2 || (t3 = e2.tagValueProcessor(l2, t3), t3 = Tt(t3, e2)), o2 && (r2 += i2), r2 += t3, o2 = false, n2.pop();
1396
- continue;
1397
- }
1398
- if (l2 === e2.cdataPropName) {
1399
- o2 && (r2 += i2), r2 += `<![CDATA[${h2[l2][0][e2.textNodeName]}]]>`, o2 = false, n2.pop();
1400
- continue;
1401
- }
1402
- if (l2 === e2.commentPropName) {
1403
- r2 += i2 + `<!--${h2[l2][0][e2.textNodeName]}-->`, o2 = true, n2.pop();
1404
- continue;
1405
- }
1406
- if (l2[0] === "?") {
1407
- const t3 = wt(h2[":@"], e2, u2), s3 = l2 === "?xml" ? "" : i2;
1408
- let a3 = h2[l2][0][e2.textNodeName];
1409
- a3 = a3.length !== 0 ? " " + a3 : "", r2 += s3 + `<${l2}${a3}${t3}?>`, o2 = true, n2.pop();
1410
- continue;
1411
- }
1412
- let c2 = i2;
1413
- c2 !== "" && (c2 += e2.indentBy);
1414
- const d2 = i2 + `<${l2}${wt(h2[":@"], e2, u2)}`;
1415
- let f2;
1416
- f2 = u2 ? bt(h2[l2], e2) : xt(h2[l2], e2, c2, n2, s2), e2.unpairedTags.indexOf(l2) !== -1 ? e2.suppressUnpairedNode ? r2 += d2 + ">" : r2 += d2 + "/>" : f2 && f2.length !== 0 || !e2.suppressEmptyNode ? f2 && f2.endsWith(">") ? r2 += d2 + `>${f2}${i2}</${l2}>` : (r2 += d2 + ">", f2 && i2 !== "" && (f2.includes("/>") || f2.includes("</")) ? r2 += i2 + e2.indentBy + f2 + i2 : r2 += f2, r2 += `</${l2}>`) : r2 += d2 + "/>", o2 = true, n2.pop();
1417
- }
1418
- return r2;
1419
- }
1420
- function Nt(t2, e2) {
1421
- if (!t2 || e2.ignoreAttributes)
1422
- return null;
1423
- const i2 = {};
1424
- let n2 = false;
1425
- for (let s2 in t2)
1426
- Object.prototype.hasOwnProperty.call(t2, s2) && (i2[s2.startsWith(e2.attributeNamePrefix) ? s2.substr(e2.attributeNamePrefix.length) : s2] = t2[s2], n2 = true);
1427
- return n2 ? i2 : null;
1428
- }
1429
- function bt(t2, e2) {
1430
- if (!Array.isArray(t2))
1431
- return t2 != null ? t2.toString() : "";
1432
- let i2 = "";
1433
- for (let n2 = 0;n2 < t2.length; n2++) {
1434
- const s2 = t2[n2], r2 = yt(s2);
1435
- if (r2 === e2.textNodeName)
1436
- i2 += s2[r2];
1437
- else if (r2 === e2.cdataPropName)
1438
- i2 += s2[r2][0][e2.textNodeName];
1439
- else if (r2 === e2.commentPropName)
1440
- i2 += s2[r2][0][e2.textNodeName];
1441
- else {
1442
- if (r2 && r2[0] === "?")
1443
- continue;
1444
- if (r2) {
1445
- const t3 = Et(s2[":@"], e2), n3 = bt(s2[r2], e2);
1446
- n3 && n3.length !== 0 ? i2 += `<${r2}${t3}>${n3}</${r2}>` : i2 += `<${r2}${t3}/>`;
1447
- }
1448
- }
1449
- }
1450
- return i2;
1451
- }
1452
- function Et(t2, e2) {
1453
- let i2 = "";
1454
- if (t2 && !e2.ignoreAttributes)
1455
- for (let n2 in t2) {
1456
- if (!Object.prototype.hasOwnProperty.call(t2, n2))
1457
- continue;
1458
- let s2 = t2[n2];
1459
- s2 === true && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`;
1460
- }
1461
- return i2;
1462
- }
1463
- function yt(t2) {
1464
- const e2 = Object.keys(t2);
1465
- for (let i2 = 0;i2 < e2.length; i2++) {
1466
- const n2 = e2[i2];
1467
- if (Object.prototype.hasOwnProperty.call(t2, n2) && n2 !== ":@")
1468
- return n2;
1469
- }
1470
- }
1471
- function wt(t2, e2, i2) {
1472
- let n2 = "";
1473
- if (t2 && !e2.ignoreAttributes)
1474
- for (let s2 in t2) {
1475
- if (!Object.prototype.hasOwnProperty.call(t2, s2))
1476
- continue;
1477
- let r2;
1478
- i2 ? r2 = t2[s2] : (r2 = e2.attributeValueProcessor(s2, t2[s2]), r2 = Tt(r2, e2)), r2 === true && e2.suppressBooleanAttributes ? n2 += ` ${s2.substr(e2.attributeNamePrefix.length)}` : n2 += ` ${s2.substr(e2.attributeNamePrefix.length)}="${r2}"`;
1479
- }
1480
- return n2;
1481
- }
1482
- function vt(t2, e2) {
1483
- if (!e2 || e2.length === 0)
1484
- return false;
1485
- for (let i2 = 0;i2 < e2.length; i2++)
1486
- if (t2.matches(e2[i2]))
1487
- return true;
1488
- return false;
1489
- }
1490
- function Tt(t2, e2) {
1491
- if (t2 && t2.length > 0 && e2.processEntities)
1492
- for (let i2 = 0;i2 < e2.entities.length; i2++) {
1493
- const n2 = e2.entities[i2];
1494
- t2 = t2.replace(n2.regex, n2.val);
1495
- }
1496
- return t2;
1497
- }
1498
- const Pt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) {
1499
- return e2;
1500
- }, attributeValueProcessor: function(t2, e2) {
1501
- return e2;
1502
- }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&amp;" }, { regex: new RegExp(">", "g"), val: "&gt;" }, { regex: new RegExp("<", "g"), val: "&lt;" }, { regex: new RegExp("'", "g"), val: "&apos;" }, { regex: new RegExp('"', "g"), val: "&quot;" }], processEntities: true, stopNodes: [], oneListGroup: false, maxNestedTags: 100, jPath: true };
1503
- function St(t2) {
1504
- if (this.options = Object.assign({}, Pt, t2), this.options.stopNodes && Array.isArray(this.options.stopNodes) && (this.options.stopNodes = this.options.stopNodes.map((t3) => typeof t3 == "string" && t3.startsWith("*.") ? ".." + t3.substring(2) : t3)), this.stopNodeExpressions = [], this.options.stopNodes && Array.isArray(this.options.stopNodes))
1505
- for (let t3 = 0;t3 < this.options.stopNodes.length; t3++) {
1506
- const e3 = this.options.stopNodes[t3];
1507
- typeof e3 == "string" ? this.stopNodeExpressions.push(new R(e3)) : e3 instanceof R && this.stopNodeExpressions.push(e3);
1508
- }
1509
- var e2;
1510
- this.options.ignoreAttributes === true || this.options.attributesGroupName ? this.isAttribute = function() {
1511
- return false;
1512
- } : (this.ignoreAttributesFn = typeof (e2 = this.options.ignoreAttributes) == "function" ? e2 : Array.isArray(e2) ? (t3) => {
1513
- for (const i2 of e2) {
1514
- if (typeof i2 == "string" && t3 === i2)
1515
- return true;
1516
- if (i2 instanceof RegExp && i2.test(t3))
1517
- return true;
1518
- }
1519
- } : () => false, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Ct), this.processTextOrObjNode = At, this.options.format ? (this.indentate = Ot, this.tagEndChar = `>
1520
- `, this.newLine = `
1521
- `) : (this.indentate = function() {
1522
- return "";
1523
- }, this.tagEndChar = ">", this.newLine = "");
1524
- }
1525
- function At(t2, e2, i2, n2) {
1526
- const s2 = this.extractAttributes(t2);
1527
- if (n2.push(e2, s2), this.checkStopNode(n2)) {
1528
- const s3 = this.buildRawContent(t2), r3 = this.buildAttributesForStopNode(t2);
1529
- return n2.pop(), this.buildObjectNode(s3, e2, r3, i2);
1530
- }
1531
- const r2 = this.j2x(t2, i2 + 1, n2);
1532
- return n2.pop(), t2[this.options.textNodeName] !== undefined && Object.keys(t2).length === 1 ? this.buildTextValNode(t2[this.options.textNodeName], e2, r2.attrStr, i2, n2) : this.buildObjectNode(r2.val, e2, r2.attrStr, i2);
1533
- }
1534
- function Ot(t2) {
1535
- return this.options.indentBy.repeat(t2);
1536
- }
1537
- function Ct(t2) {
1538
- return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen);
1539
- }
1540
- St.prototype.build = function(t2) {
1541
- if (this.options.preserveOrder)
1542
- return mt(t2, this.options);
1543
- {
1544
- Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
1545
- const e2 = new G;
1546
- return this.j2x(t2, 0, e2).val;
1547
- }
1548
- }, St.prototype.j2x = function(t2, e2, i2) {
1549
- let n2 = "", s2 = "";
1550
- if (this.options.maxNestedTags && i2.getDepth() >= this.options.maxNestedTags)
1551
- throw new Error("Maximum nested tags exceeded");
1552
- const r2 = this.options.jPath ? i2.toString() : i2, o2 = this.checkStopNode(i2);
1553
- for (let a2 in t2)
1554
- if (Object.prototype.hasOwnProperty.call(t2, a2))
1555
- if (t2[a2] === undefined)
1556
- this.isAttribute(a2) && (s2 += "");
1557
- else if (t2[a2] === null)
1558
- this.isAttribute(a2) || a2 === this.options.cdataPropName ? s2 += "" : a2[0] === "?" ? s2 += this.indentate(e2) + "<" + a2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + a2 + "/" + this.tagEndChar;
1559
- else if (t2[a2] instanceof Date)
1560
- s2 += this.buildTextValNode(t2[a2], a2, "", e2, i2);
1561
- else if (typeof t2[a2] != "object") {
1562
- const h2 = this.isAttribute(a2);
1563
- if (h2 && !this.ignoreAttributesFn(h2, r2))
1564
- n2 += this.buildAttrPairStr(h2, "" + t2[a2], o2);
1565
- else if (!h2)
1566
- if (a2 === this.options.textNodeName) {
1567
- let e3 = this.options.tagValueProcessor(a2, "" + t2[a2]);
1568
- s2 += this.replaceEntitiesValue(e3);
1569
- } else {
1570
- i2.push(a2);
1571
- const n3 = this.checkStopNode(i2);
1572
- if (i2.pop(), n3) {
1573
- const i3 = "" + t2[a2];
1574
- s2 += i3 === "" ? this.indentate(e2) + "<" + a2 + this.closeTag(a2) + this.tagEndChar : this.indentate(e2) + "<" + a2 + ">" + i3 + "</" + a2 + this.tagEndChar;
1575
- } else
1576
- s2 += this.buildTextValNode(t2[a2], a2, "", e2, i2);
1577
- }
1578
- } else if (Array.isArray(t2[a2])) {
1579
- const n3 = t2[a2].length;
1580
- let r3 = "", o3 = "";
1581
- for (let h2 = 0;h2 < n3; h2++) {
1582
- const n4 = t2[a2][h2];
1583
- if (n4 === undefined)
1584
- ;
1585
- else if (n4 === null)
1586
- a2[0] === "?" ? s2 += this.indentate(e2) + "<" + a2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + a2 + "/" + this.tagEndChar;
1587
- else if (typeof n4 == "object")
1588
- if (this.options.oneListGroup) {
1589
- i2.push(a2);
1590
- const t3 = this.j2x(n4, e2 + 1, i2);
1591
- i2.pop(), r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (o3 += t3.attrStr);
1592
- } else
1593
- r3 += this.processTextOrObjNode(n4, a2, e2, i2);
1594
- else if (this.options.oneListGroup) {
1595
- let t3 = this.options.tagValueProcessor(a2, n4);
1596
- t3 = this.replaceEntitiesValue(t3), r3 += t3;
1597
- } else {
1598
- i2.push(a2);
1599
- const t3 = this.checkStopNode(i2);
1600
- if (i2.pop(), t3) {
1601
- const t4 = "" + n4;
1602
- r3 += t4 === "" ? this.indentate(e2) + "<" + a2 + this.closeTag(a2) + this.tagEndChar : this.indentate(e2) + "<" + a2 + ">" + t4 + "</" + a2 + this.tagEndChar;
1603
- } else
1604
- r3 += this.buildTextValNode(n4, a2, "", e2, i2);
1605
- }
1606
- }
1607
- this.options.oneListGroup && (r3 = this.buildObjectNode(r3, a2, o3, e2)), s2 += r3;
1608
- } else if (this.options.attributesGroupName && a2 === this.options.attributesGroupName) {
1609
- const e3 = Object.keys(t2[a2]), i3 = e3.length;
1610
- for (let s3 = 0;s3 < i3; s3++)
1611
- n2 += this.buildAttrPairStr(e3[s3], "" + t2[a2][e3[s3]], o2);
1612
- } else
1613
- s2 += this.processTextOrObjNode(t2[a2], a2, e2, i2);
1614
- return { attrStr: n2, val: s2 };
1615
- }, St.prototype.buildAttrPairStr = function(t2, e2, i2) {
1616
- return i2 || (e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2)), this.options.suppressBooleanAttributes && e2 === "true" ? " " + t2 : " " + t2 + '="' + e2 + '"';
1617
- }, St.prototype.extractAttributes = function(t2) {
1618
- if (!t2 || typeof t2 != "object")
1619
- return null;
1620
- const e2 = {};
1621
- let i2 = false;
1622
- if (this.options.attributesGroupName && t2[this.options.attributesGroupName]) {
1623
- const n2 = t2[this.options.attributesGroupName];
1624
- for (let t3 in n2)
1625
- Object.prototype.hasOwnProperty.call(n2, t3) && (e2[t3.startsWith(this.options.attributeNamePrefix) ? t3.substring(this.options.attributeNamePrefix.length) : t3] = n2[t3], i2 = true);
1626
- } else
1627
- for (let n2 in t2) {
1628
- if (!Object.prototype.hasOwnProperty.call(t2, n2))
1629
- continue;
1630
- const s2 = this.isAttribute(n2);
1631
- s2 && (e2[s2] = t2[n2], i2 = true);
1632
- }
1633
- return i2 ? e2 : null;
1634
- }, St.prototype.buildRawContent = function(t2) {
1635
- if (typeof t2 == "string")
1636
- return t2;
1637
- if (typeof t2 != "object" || t2 === null)
1638
- return String(t2);
1639
- if (t2[this.options.textNodeName] !== undefined)
1640
- return t2[this.options.textNodeName];
1641
- let e2 = "";
1642
- for (let i2 in t2) {
1643
- if (!Object.prototype.hasOwnProperty.call(t2, i2))
1644
- continue;
1645
- if (this.isAttribute(i2))
1646
- continue;
1647
- if (this.options.attributesGroupName && i2 === this.options.attributesGroupName)
1648
- continue;
1649
- const n2 = t2[i2];
1650
- if (i2 === this.options.textNodeName)
1651
- e2 += n2;
1652
- else if (Array.isArray(n2)) {
1653
- for (let t3 of n2)
1654
- if (typeof t3 == "string" || typeof t3 == "number")
1655
- e2 += `<${i2}>${t3}</${i2}>`;
1656
- else if (typeof t3 == "object" && t3 !== null) {
1657
- const n3 = this.buildRawContent(t3), s2 = this.buildAttributesForStopNode(t3);
1658
- e2 += n3 === "" ? `<${i2}${s2}/>` : `<${i2}${s2}>${n3}</${i2}>`;
1659
- }
1660
- } else if (typeof n2 == "object" && n2 !== null) {
1661
- const t3 = this.buildRawContent(n2), s2 = this.buildAttributesForStopNode(n2);
1662
- e2 += t3 === "" ? `<${i2}${s2}/>` : `<${i2}${s2}>${t3}</${i2}>`;
1663
- } else
1664
- e2 += `<${i2}>${n2}</${i2}>`;
1665
- }
1666
- return e2;
1667
- }, St.prototype.buildAttributesForStopNode = function(t2) {
1668
- if (!t2 || typeof t2 != "object")
1669
- return "";
1670
- let e2 = "";
1671
- if (this.options.attributesGroupName && t2[this.options.attributesGroupName]) {
1672
- const i2 = t2[this.options.attributesGroupName];
1673
- for (let t3 in i2) {
1674
- if (!Object.prototype.hasOwnProperty.call(i2, t3))
1675
- continue;
1676
- const n2 = t3.startsWith(this.options.attributeNamePrefix) ? t3.substring(this.options.attributeNamePrefix.length) : t3, s2 = i2[t3];
1677
- s2 === true && this.options.suppressBooleanAttributes ? e2 += " " + n2 : e2 += " " + n2 + '="' + s2 + '"';
1678
- }
1679
- } else
1680
- for (let i2 in t2) {
1681
- if (!Object.prototype.hasOwnProperty.call(t2, i2))
1682
- continue;
1683
- const n2 = this.isAttribute(i2);
1684
- if (n2) {
1685
- const s2 = t2[i2];
1686
- s2 === true && this.options.suppressBooleanAttributes ? e2 += " " + n2 : e2 += " " + n2 + '="' + s2 + '"';
1687
- }
1688
- }
1689
- return e2;
1690
- }, St.prototype.buildObjectNode = function(t2, e2, i2, n2) {
1691
- if (t2 === "")
1692
- return e2[0] === "?" ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar;
1693
- {
1694
- let s2 = "</" + e2 + this.tagEndChar, r2 = "";
1695
- return e2[0] === "?" && (r2 = "?", s2 = ""), !i2 && i2 !== "" || t2.indexOf("<") !== -1 ? this.options.commentPropName !== false && e2 === this.options.commentPropName && r2.length === 0 ? this.indentate(n2) + `<!--${t2}-->` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2;
1696
- }
1697
- }, St.prototype.closeTag = function(t2) {
1698
- let e2 = "";
1699
- return this.options.unpairedTags.indexOf(t2) !== -1 ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `></${t2}`, e2;
1700
- }, St.prototype.checkStopNode = function(t2) {
1701
- if (!this.stopNodeExpressions || this.stopNodeExpressions.length === 0)
1702
- return false;
1703
- for (let e2 = 0;e2 < this.stopNodeExpressions.length; e2++)
1704
- if (t2.matches(this.stopNodeExpressions[e2]))
1705
- return true;
1706
- return false;
1707
- }, St.prototype.buildTextValNode = function(t2, e2, i2, n2, s2) {
1708
- if (this.options.cdataPropName !== false && e2 === this.options.cdataPropName)
1709
- return this.indentate(n2) + `<![CDATA[${t2}]]>` + this.newLine;
1710
- if (this.options.commentPropName !== false && e2 === this.options.commentPropName)
1711
- return this.indentate(n2) + `<!--${t2}-->` + this.newLine;
1712
- if (e2[0] === "?")
1713
- return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar;
1714
- {
1715
- let s3 = this.options.tagValueProcessor(e2, t2);
1716
- return s3 = this.replaceEntitiesValue(s3), s3 === "" ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s3 + "</" + e2 + this.tagEndChar;
1717
- }
1718
- }, St.prototype.replaceEntitiesValue = function(t2) {
1719
- if (t2 && t2.length > 0 && this.options.processEntities)
1720
- for (let e2 = 0;e2 < this.options.entities.length; e2++) {
1721
- const i2 = this.options.entities[e2];
1722
- t2 = t2.replace(i2.regex, i2.val);
1723
- }
1724
- return t2;
1725
- };
1726
- const $t = St, It = { validate: l };
1727
- module.exports = e;
1728
- })();
1729
- });
1730
-
1731
- export { require_invoke_store, require_dist_cjs, require_dist_cjs2 as require_dist_cjs1, require_fxp };