@pi-outpost/embed 0.40.0 → 0.40.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.
- package/dist/{CodeEditor-Cb6i9oIs.cjs → CodeEditor-B699PZlx.cjs} +1 -1
- package/dist/{CodeEditor-2Vx8PHAy.js → CodeEditor-CxKTvrhG.js} +5 -5
- package/dist/PdfViewer-COOgvLyp.js +428 -0
- package/dist/PdfViewer-Dyou2VMw.cjs +1 -0
- package/dist/{abnfDiagram-WEYOIA3C-B2ss_Vsq.js → abnfDiagram-WEYOIA3C-B_dTFm2g.js} +5 -5
- package/dist/{abnfDiagram-WEYOIA3C-DMn87p58.cjs → abnfDiagram-WEYOIA3C-Dk2VD3Iw.cjs} +1 -1
- package/dist/{arc-CLGGhOeW.js → arc-37kcMiGl.js} +1 -1
- package/dist/{arc-Dh2Zrypi.cjs → arc-C7P0rHQr.cjs} +1 -1
- package/dist/architecture-WOLXFQ4H-Dg4VU8sZ.js +2 -0
- package/dist/architecture-WOLXFQ4H-u_y_0ZVC.cjs +1 -0
- package/dist/architectureDiagram-ZHVYKT53-Bud-mHjo.cjs +36 -0
- package/dist/{architectureDiagram-ZHVYKT53-C5QppHvM.js → architectureDiagram-ZHVYKT53-CslNYmQN.js} +48 -64
- package/dist/{blockDiagram-RJAE7QA3-DOvlohR9.js → blockDiagram-RJAE7QA3-Dgm9J6pS.js} +27 -38
- package/dist/{blockDiagram-RJAE7QA3-CODM9GdZ.cjs → blockDiagram-RJAE7QA3-lEBn-_Yn.cjs} +2 -2
- package/dist/{c4Diagram-XDPPPE54-eTVK3Kzy.cjs → c4Diagram-XDPPPE54-BKNqVY-U.cjs} +1 -1
- package/dist/{c4Diagram-XDPPPE54-8dwnUpAO.js → c4Diagram-XDPPPE54-rbzhqhW5.js} +8 -8
- package/dist/channel-AESWk0Yw.cjs +1 -0
- package/dist/{channel-B1lf-ehw.js → channel-CEoRf1uz.js} +1 -1
- package/dist/{chunk-2E7WHVMD-DkV-cet-.cjs → chunk-2E7WHVMD-BNsJOdNP.cjs} +1 -1
- package/dist/{chunk-2E7WHVMD-Dg_Sckag.js → chunk-2E7WHVMD-Vo-POJc_.js} +3 -3
- package/dist/{chunk-4EMNKR2T-C2XrT3x_.js → chunk-4EMNKR2T-BIO9veC4.js} +1 -1
- package/dist/{chunk-4EMNKR2T-DfeN909d.cjs → chunk-4EMNKR2T-CGAdq4EA.cjs} +1 -1
- package/dist/{chunk-55XCU76K-d9D4PS_7.cjs → chunk-55XCU76K-IpMfjRYv.cjs} +1 -1
- package/dist/{chunk-55XCU76K-CADZXRVb.js → chunk-55XCU76K-o8OgDLPD.js} +3 -3
- package/dist/{chunk-7S6XSTFO-DV8etStf.js → chunk-7S6XSTFO-DrDRohsE.js} +4 -4
- package/dist/{chunk-7S6XSTFO-DJ37SdG5.cjs → chunk-7S6XSTFO-ejBVk-tI.cjs} +1 -1
- package/dist/{chunk-AQDTSKZB-DElrkKED.cjs → chunk-AQDTSKZB-B-MpZ-y2.cjs} +7 -7
- package/dist/{chunk-AQDTSKZB-CUCC855j.js → chunk-AQDTSKZB-DUZx386i.js} +14 -73
- package/dist/chunk-DSNLSHJZ-BxQ7lMXY.cjs +129 -0
- package/dist/{chunk-DSNLSHJZ-Bicto10E.js → chunk-DSNLSHJZ-DPpiuUZK.js} +627 -624
- package/dist/{chunk-HAGFOTED-Dykk1LyE.cjs → chunk-HAGFOTED-BUPxFGdn.cjs} +1 -1
- package/dist/{chunk-HAGFOTED-BjDmRfgG.js → chunk-HAGFOTED-ceXO12G4.js} +6 -6
- package/dist/{chunk-HNE4Q36P-C-j5Nn9f.cjs → chunk-HNE4Q36P-CCHAgwa3.cjs} +1 -1
- package/dist/{chunk-HNE4Q36P-5u7dvjgt.js → chunk-HNE4Q36P-uON_vFhT.js} +6 -6
- package/dist/{chunk-NGNAAXSQ-kHtfTQLE.cjs → chunk-NGNAAXSQ-BaBpWF2S.cjs} +6 -6
- package/dist/{chunk-NGNAAXSQ-DM0DL2MX.js → chunk-NGNAAXSQ-uUWLDjAm.js} +46 -50
- package/dist/{chunk-NQOKRVIF-CpOc5MEh.cjs → chunk-NQOKRVIF-DcZqKWzv.cjs} +1 -1
- package/dist/{chunk-NQOKRVIF-DUgN94ic.js → chunk-NQOKRVIF-DmOxzSOQ.js} +9 -9
- package/dist/{chunk-UHW7PFBP-NbzzxkEP.js → chunk-UHW7PFBP-BTk1ZC8L.js} +1 -1
- package/dist/{chunk-UHW7PFBP-SZ8KvGM0.cjs → chunk-UHW7PFBP-Bays5Zi8.cjs} +1 -1
- package/dist/{chunk-VQ5W62QI-D3c9tcDC.js → chunk-VQ5W62QI-Bvcxpp51.js} +2 -2
- package/dist/{chunk-VQ5W62QI-CsW6i5Ev.cjs → chunk-VQ5W62QI-Dw9Kffnl.cjs} +1 -1
- package/dist/{chunk-WQQL4CDK-l3Yf4SAX.js → chunk-WQQL4CDK-C3yDIFZ3.js} +8 -8
- package/dist/{chunk-WQQL4CDK-TvwGUFeE.cjs → chunk-WQQL4CDK-DxEEyQzx.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-IzhWXllg.js → chunk-XXDRQBXY-CNtMgRT_.js} +1 -1
- package/dist/{chunk-XXDRQBXY-yMT3rT5Y.cjs → chunk-XXDRQBXY-DfReYcER.cjs} +1 -1
- package/dist/{chunk-YZO67HFG-CLf5aoHk.cjs → chunk-YZO67HFG-DCQIFG8j.cjs} +1 -1
- package/dist/{chunk-YZO67HFG-DWHo0c6-.js → chunk-YZO67HFG-WF3jklBn.js} +2 -2
- package/dist/{chunk-ZAUX2LTX-BwjEPfG0.cjs → chunk-ZAUX2LTX-DIQkgUFr.cjs} +1 -1
- package/dist/{chunk-ZAUX2LTX-COHXRsvU.js → chunk-ZAUX2LTX-P8LAwm_U.js} +3 -3
- package/dist/{chunk-ZCHMQSOR-Cw-9SNln.js → chunk-ZCHMQSOR-BbO7eY2w.js} +78 -80
- package/dist/chunk-ZCHMQSOR-Cg8zPt0w.cjs +1 -0
- package/dist/{classDiagram-v2-4MYWR3UA-vsmkJ0Cx.js → classDiagram-v2-4MYWR3UA-DIjHIULx.js} +16 -16
- package/dist/{classDiagram-v2-4MYWR3UA-wLbwKHvU.cjs → classDiagram-v2-4MYWR3UA-DyMM0DMP.cjs} +2 -2
- package/dist/{clike-8rZWBES0.cjs → clike-I-fVVl3d.cjs} +1 -1
- package/dist/{clike-D-dOQnrm.js → clike-VB7owi7S.js} +1 -5
- package/dist/{conversationExport-BmvGyAf-.cjs → conversationExport-Co-E1-fF.cjs} +1 -1
- package/dist/{conversationExport-CBiBLWVk.js → conversationExport-KyCOByU5.js} +7 -8
- package/dist/conversationHistory-BYekdNUk.cjs +31 -0
- package/dist/conversationHistory-DPZF00Qz.js +21639 -0
- package/dist/{core-D_MCdR2m.js → core-BGZbe1UJ.js} +2 -6
- package/dist/{core-BrupIPpc.cjs → core-CmCLKhYZ.cjs} +2 -2
- package/dist/{cose-bilkent-JH36ORCC-qPjrc3_9.js → cose-bilkent-JH36ORCC-DjbvRWCz.js} +58 -71
- package/dist/cose-bilkent-JH36ORCC-KeNQ2SMA.cjs +1 -0
- package/dist/cynefin-EF2NZ3EQ-BBhIrDKD.cjs +1 -0
- package/dist/cynefin-EF2NZ3EQ-DDZjUykJ.js +2 -0
- package/dist/{cynefinDiagram-WF24UDRP-CHBmFbqk.cjs → cynefinDiagram-WF24UDRP-BC09SRT2.cjs} +1 -1
- package/dist/{cynefinDiagram-WF24UDRP-BhWkOxCi.js → cynefinDiagram-WF24UDRP-DEFG-MNh.js} +5 -5
- package/dist/cytoscape.esm-BN8NndIc.cjs +321 -0
- package/dist/{cytoscape.esm-Cq7KPj0t.js → cytoscape.esm-BmhLauwj.js} +412 -513
- package/dist/dagre-NK4GIZVX-D0_oLrA9.cjs +4 -0
- package/dist/{dagre-NK4GIZVX-CJfLDa-C.js → dagre-NK4GIZVX-D6Xuc_Nw.js} +43 -47
- package/dist/{diagram-CBK3MWTC-2pAHlnGJ.js → diagram-CBK3MWTC-CuUrHQAz.js} +7 -7
- package/dist/{diagram-CBK3MWTC-B_5GBGbb.cjs → diagram-CBK3MWTC-DbXGbFMz.cjs} +1 -1
- package/dist/{diagram-I5XIIV2D-CQ_Y9NJs.js → diagram-I5XIIV2D-DbwsxgDf.js} +5 -5
- package/dist/{diagram-I5XIIV2D-BPxYY-Kp.cjs → diagram-I5XIIV2D-Dom9usNq.cjs} +1 -1
- package/dist/{diagram-ODIL2UCW-pyDNtrY0.cjs → diagram-ODIL2UCW-CLSAtgxG.cjs} +2 -2
- package/dist/{diagram-ODIL2UCW-BJL-7QWJ.js → diagram-ODIL2UCW-CSnuo9bJ.js} +7 -15
- package/dist/{diagram-PFBEJUXE-CXd3x3TA.js → diagram-PFBEJUXE-ChA6KYWw.js} +6 -6
- package/dist/{diagram-PFBEJUXE-BUvTWvw5.cjs → diagram-PFBEJUXE-DAIw33Bx.cjs} +1 -1
- package/dist/{diagram-RJA3I4VV-T3Hd1koB.cjs → diagram-RJA3I4VV-Bt-BxYua.cjs} +1 -1
- package/dist/{diagram-RJA3I4VV-eMNhs7pW.js → diagram-RJA3I4VV-DCygetH_.js} +5 -5
- package/dist/{diagram-TYUNFSNR-CWpFSB2K.js → diagram-TYUNFSNR-BSq4ni3b.js} +22 -35
- package/dist/diagram-TYUNFSNR-Dy2nkVin.cjs +200 -0
- package/dist/{dist-Dvqp7T4I.cjs → dist-2ynRxsSC.cjs} +1 -1
- package/dist/{dist-B7I27gkN.cjs → dist-AeGgfThs.cjs} +1 -1
- package/dist/{dist-Dwv2VYAL.cjs → dist-BB5r6V4R.cjs} +1 -1
- package/dist/{dist-BvsCdwbL.cjs → dist-BDenKBYL.cjs} +1 -1
- package/dist/{dist-BhXQJ0x3.js → dist-BJHB0x8Y.js} +12 -18
- package/dist/{dist-BWlGU9XM.js → dist-BTD5L343.js} +3 -3
- package/dist/{dist-Dr4zY56l.js → dist-BWEDf1a-.js} +2 -2
- package/dist/{dist-BlD6NhiG.js → dist-BWVp6Da-.js} +4 -7
- package/dist/{dist-B8gmxwh-.cjs → dist-C6eKaA9j.cjs} +1 -1
- package/dist/{dist-C0_uLrCb.cjs → dist-CCIM600Y.cjs} +1 -1
- package/dist/{dist-BZcglaBe.cjs → dist-CFf_g4kk.cjs} +1 -1
- package/dist/{dist-DPXHxuWb.js → dist-CGZbBQje.js} +2 -2
- package/dist/{dist-Xjm88mbq.js → dist-CIBKGNWD.js} +4 -4
- package/dist/{dist-DqbI0un6.cjs → dist-CQNYwGEy.cjs} +1 -1
- package/dist/{dist-CyFPTQ2l.cjs → dist-CT7H4C9g.cjs} +1 -1
- package/dist/{dist-BBUKMRrs.js → dist-CYUF5YPj.js} +2 -2
- package/dist/{dist-DWv23S35.js → dist-CZhfI1u7.js} +1 -1
- package/dist/{dist-CHKg1Qb9.js → dist-ChWDi62w.js} +3 -3
- package/dist/dist-CmF-TINl.cjs +1 -0
- package/dist/{dist-C8jjSrIs.cjs → dist-Cz8GulTe.cjs} +1 -1
- package/dist/{dist-qNFo_ASR.cjs → dist-D6LkseRA.cjs} +1 -1
- package/dist/{dist-BZjcsPqi.cjs → dist-DEZD35IP.cjs} +7 -7
- package/dist/{dist-DZrtSp8H.js → dist-DNg4hNu7.js} +3 -3
- package/dist/dist-D_oMTxAl.cjs +2 -0
- package/dist/{dist-BfQGuM1r.js → dist-DaJf_JYz.js} +4 -4
- package/dist/dist-Dpu_aN4m.cjs +1 -0
- package/dist/{dist-CA6ERWRG.js → dist-DszFZlYh.js} +2 -2
- package/dist/{dist-qq9a_ch2.js → dist-Kg2QsUg8.js} +4 -4
- package/dist/{dist-FSzij9Rn.js → dist-LM11INLG.js} +2 -2
- package/dist/{dist-C9dtxVRR.cjs → dist-M4fo1U45.cjs} +1 -1
- package/dist/{dist-BhNvvg0I.js → dist-gn9y7Yb8.js} +116 -119
- package/dist/{dist-B0lO3k1f.js → dist-hv72z6I6.js} +3 -3
- package/dist/{dist-Bppoi_v9.js → dist-lPCEVnGX.js} +2 -2
- package/dist/{dist-D8I4FQ-Q.cjs → dist-rfjaCa2V.cjs} +1 -1
- package/dist/{docxExport-BGYavEI-.js → docxExport-DpgcioIA.js} +2 -2
- package/dist/{docxExport-B24fOHFl.cjs → docxExport-ZYp4tZ7k.cjs} +1 -1
- package/dist/{ebnfDiagram-V4P3TTPT-DAoJZ85k.cjs → ebnfDiagram-V4P3TTPT-6xhHNshj.cjs} +1 -1
- package/dist/{ebnfDiagram-V4P3TTPT-B7cCNP3X.js → ebnfDiagram-V4P3TTPT-e4I3Otpa.js} +5 -5
- package/dist/{elk-QONTBCTQ-BYnAuRAH.js → elk-QONTBCTQ-B8RYU1Ay.js} +746 -1241
- package/dist/elk-QONTBCTQ-hBYUI6Nr.cjs +27 -0
- package/dist/{erDiagram-KYQIGQAA-BKkxORU3.js → erDiagram-KYQIGQAA-BTNANm6p.js} +14 -14
- package/dist/{erDiagram-KYQIGQAA-BIlejnVi.cjs → erDiagram-KYQIGQAA-DsqyoDOz.cjs} +1 -1
- package/dist/eventmodeling-K75KTNOO-Ckh9Djrw.js +2 -0
- package/dist/eventmodeling-K75KTNOO-DKYlYG2c.cjs +1 -0
- package/dist/flowDiagram-IUGLLWBU-BJlVRCj8.js +15 -0
- package/dist/flowDiagram-IUGLLWBU-CsC_IEV_.cjs +1 -0
- package/dist/{ganttDiagram-R7GPNTJY-BGcXo1KA.cjs → ganttDiagram-R7GPNTJY-B1juClwW.cjs} +2 -2
- package/dist/{ganttDiagram-R7GPNTJY-dcubAqZI.js → ganttDiagram-R7GPNTJY-CEGQ6hzi.js} +18 -26
- package/dist/gitGraph-VSP46ZUC-5x2CrP9e.js +2 -0
- package/dist/gitGraph-VSP46ZUC-Cgx_wrMl.cjs +1 -0
- package/dist/{gitGraphDiagram-PDYL7XHY-BoJsALki.cjs → gitGraphDiagram-PDYL7XHY-6cCNinUi.cjs} +1 -1
- package/dist/{gitGraphDiagram-PDYL7XHY-CfRYMd3w.js → gitGraphDiagram-PDYL7XHY-D_ADFBrL.js} +4 -4
- package/dist/info-OHQRW6UA-DDzA9eXN.cjs +1 -0
- package/dist/info-OHQRW6UA-DkaWmfEE.js +2 -0
- package/dist/{infoDiagram-MVDRKAX5-B1QBSTSo.cjs → infoDiagram-MVDRKAX5-CVeFOzof.cjs} +1 -1
- package/dist/{infoDiagram-MVDRKAX5-BYGrp2QT.js → infoDiagram-MVDRKAX5-Dkuw3h5s.js} +4 -4
- package/dist/{ishikawaDiagram-HPEHV2GE-BWJo3pFM.cjs → ishikawaDiagram-HPEHV2GE-92CAbMpi.cjs} +2 -2
- package/dist/{ishikawaDiagram-HPEHV2GE-C32LoFQd.js → ishikawaDiagram-HPEHV2GE-oTSoKUOA.js} +5 -7
- package/dist/{javascript-CIP6I0eT.js → javascript-BSRoJWCv.js} +1 -8
- package/dist/javascript-B_OkdA1F.cjs +1 -0
- package/dist/{journeyDiagram-BOSHW7O7-DJ9OKW8H.js → journeyDiagram-BOSHW7O7-CMbGxPLA.js} +4 -4
- package/dist/{journeyDiagram-BOSHW7O7-090H5NM8.cjs → journeyDiagram-BOSHW7O7-Cb_yTQWF.cjs} +1 -1
- package/dist/{kanban-definition-FNSA4HC5-BhC2u-9L.cjs → kanban-definition-FNSA4HC5-DlUMoAIT.cjs} +1 -1
- package/dist/{kanban-definition-FNSA4HC5-FqIvMKJw.js → kanban-definition-FNSA4HC5-DzEQcVPw.js} +10 -10
- package/dist/{katex-DTnCNBYg.js → katex-BOYcAQ2I.js} +17 -26
- package/dist/{katex-DBUQi-HZ.cjs → katex-C-T_oEhv.cjs} +5 -5
- package/dist/lib-CRTt_FoR.cjs +26 -0
- package/dist/{lib-DILNlJGg.js → lib-CSMo4o20.js} +1522 -1452
- package/dist/{line-CJjnW4T-.js → line-0VTxwDiV.js} +1 -1
- package/dist/{line-DjYp3Ff8.cjs → line-ZwhMGa3_.cjs} +1 -1
- package/dist/linear-Bh2vuvAF.cjs +1 -0
- package/dist/{linear-DVFZQF4V.js → linear-CxE0kir0.js} +2 -3
- package/dist/{loadReferencedImage-CkvnSeQi.js → loadReferencedImage-2qNdVVhQ.js} +2 -2
- package/dist/{loadReferencedImage-CHTgZKAP.cjs → loadReferencedImage-qVqyIGz2.cjs} +1 -1
- package/dist/mermaid-parser.core-DKJw9lm9.cjs +6 -0
- package/dist/{mermaid-parser.core-CI12FMcX.js → mermaid-parser.core-IoY9gmm6.js} +19 -25
- package/dist/{mermaid.core-2PafqU96.cjs → mermaid.core-73kk5oPm.cjs} +7 -7
- package/dist/{mermaid.core-BxQmR6RW.js → mermaid.core-C8dp1dnD.js} +69 -75
- package/dist/{mermaidToImage-DowDuCUe.js → mermaidToImage-B2aJB9x8.js} +4900 -2274
- package/dist/mermaidToImage-qujM0Ggp.cjs +28 -0
- package/dist/{mindmap-definition-6OY57UG3-C0JXAaiI.js → mindmap-definition-6OY57UG3-CXobmoZM.js} +13 -13
- package/dist/{mindmap-definition-6OY57UG3-QMaMZxqJ.cjs → mindmap-definition-6OY57UG3-DLx3d1V6.cjs} +1 -1
- package/dist/packet-JDAUHWVQ-7Kdl1aNj.js +2 -0
- package/dist/packet-JDAUHWVQ-BB_DuPiR.cjs +1 -0
- package/dist/{pdf-D6MygsxO.js → pdf-CL7gVGT1.js} +3278 -3383
- package/dist/pdf-HcLHRelN.cjs +54 -0
- package/dist/{pegDiagram-ECIUJNBX-agFLe55J.cjs → pegDiagram-ECIUJNBX-B-eSDSQK.cjs} +1 -1
- package/dist/{pegDiagram-ECIUJNBX-BluDPMz-.js → pegDiagram-ECIUJNBX-ODBWqs1V.js} +5 -5
- package/dist/pi-outpost-embed.cjs +15 -15
- package/dist/pi-outpost-embed.js +160 -325
- package/dist/pie-XZMESJXO-CxP1ntAS.cjs +1 -0
- package/dist/pie-XZMESJXO-vkOzPeYA.js +2 -0
- package/dist/{pieDiagram-GNMPY74T-Bkt6LXIr.cjs → pieDiagram-GNMPY74T-BtYyKCrf.cjs} +1 -1
- package/dist/{pieDiagram-GNMPY74T-D2Dlw9oL.js → pieDiagram-GNMPY74T-DYDC5z2D.js} +7 -7
- package/dist/{quadrantDiagram-D57K4MC3-vbdBbRAF.js → quadrantDiagram-D57K4MC3-BfQWcg-D.js} +3 -3
- package/dist/{quadrantDiagram-D57K4MC3-BwUPO-ri.cjs → quadrantDiagram-D57K4MC3-Cu6JmzPE.cjs} +1 -1
- package/dist/radar-ABXABTNO-BIDY5R4F.cjs +1 -0
- package/dist/radar-ABXABTNO-DvS23EDt.js +2 -0
- package/dist/railroad-I3PHUGI6-BRbLa2w3.cjs +1 -0
- package/dist/railroad-I3PHUGI6-DH5Ttw2P.js +2 -0
- package/dist/railroad-abnf-LNEFI6M7-Qj3WuV4C.cjs +1 -0
- package/dist/railroad-abnf-LNEFI6M7-wA0DIfJr.js +2 -0
- package/dist/railroad-ebnf-DWYD2UWJ-C7YCjuXb.cjs +1 -0
- package/dist/railroad-ebnf-DWYD2UWJ-CkakbyYF.js +2 -0
- package/dist/railroad-peg-JR7BVNR7-CpVGf7CG.cjs +1 -0
- package/dist/railroad-peg-JR7BVNR7-Kw2gXekA.js +2 -0
- package/dist/{railroadDiagram-Y72NRBL7-CJ9MP3wV.cjs → railroadDiagram-Y72NRBL7-BdHmqKV_.cjs} +1 -1
- package/dist/{railroadDiagram-Y72NRBL7-B2x_q8pa.js → railroadDiagram-Y72NRBL7-ChQwG3mZ.js} +5 -5
- package/dist/{requirementDiagram-EQYSW5RA-CP0M11vC.cjs → requirementDiagram-EQYSW5RA-CDQ6Nza1.cjs} +1 -1
- package/dist/{requirementDiagram-EQYSW5RA-j7VZ-e65.js → requirementDiagram-EQYSW5RA-Dj4E0fE3.js} +13 -13
- package/dist/{rolldown-runtime-DArdT4gl.js → rolldown-runtime-5HNE8Q1r.js} +1 -1
- package/dist/rolldown-runtime-DbbDpzbe.cjs +1 -0
- package/dist/{sankeyDiagram-SY24JHO5-B7NuxaKG.cjs → sankeyDiagram-SY24JHO5-BPFkmPzT.cjs} +1 -1
- package/dist/{sankeyDiagram-SY24JHO5-Cgewgbc8.js → sankeyDiagram-SY24JHO5-luxVW4uf.js} +2 -2
- package/dist/{sequenceDiagram-BLEHNHQU-B5THoiqW.cjs → sequenceDiagram-BLEHNHQU-DX51aIRY.cjs} +1 -1
- package/dist/{sequenceDiagram-BLEHNHQU-DsjvHcWN.js → sequenceDiagram-BLEHNHQU-H4rQDzp-.js} +6 -6
- package/dist/{sizeCapture-INFHLROL-B5Lg3qGn.js → sizeCapture-INFHLROL-Uzko9_4n.js} +1 -1
- package/dist/sizeCapture-INFHLROL-bi8MyHwB.cjs +1 -0
- package/dist/{src-Dkp7vqs8.js → src-65Lfw03T.js} +12 -18
- package/dist/src-BN1VgXwj.cjs +1 -0
- package/dist/{stateDiagram-v2-A6IESKWZ-BD0FNkiB.js → stateDiagram-v2-A6IESKWZ-DBJ11U2p.js} +14 -14
- package/dist/{stateDiagram-v2-A6IESKWZ-Dqzvdrv1.cjs → stateDiagram-v2-A6IESKWZ-Dbp783Hd.cjs} +1 -1
- package/dist/{swimlanes-B3ENRKFQ-Do-xntE9.js → swimlanes-B3ENRKFQ-Bp3vZCmK.js} +38 -60
- package/dist/swimlanes-B3ENRKFQ-DY1V--Rq.cjs +1 -0
- package/dist/swimlanesDiagram-AYQRV4AK-COavJcG4.js +27 -0
- package/dist/swimlanesDiagram-AYQRV4AK-dUd5QjxZ.cjs +8 -0
- package/dist/{timeline-definition-JXYKGLGB-Cxi2ay-W.js → timeline-definition-JXYKGLGB-BE6iAj4r.js} +5 -5
- package/dist/{timeline-definition-JXYKGLGB-B_QITrmE.cjs → timeline-definition-JXYKGLGB-DKhMPFBi.cjs} +1 -1
- package/dist/treeView-D4JQ5SDB-BAXbN8Bf.cjs +1 -0
- package/dist/treeView-D4JQ5SDB-BAub6u3e.js +2 -0
- package/dist/treemap-SAJKECNS-DlyYa6yd.js +2 -0
- package/dist/treemap-SAJKECNS-EjU-hEqB.cjs +1 -0
- package/dist/{typescript-C93MG6Zk.js → typescript-4QjI-Ug2.js} +1 -8
- package/dist/typescript-CUdTaGTg.cjs +1 -0
- package/dist/{usecaseDiagram-WPOLBNNX-_GFZAFdK.cjs → usecaseDiagram-WPOLBNNX-BRWufOTq.cjs} +6 -6
- package/dist/{usecaseDiagram-WPOLBNNX-C5u6uogx.js → usecaseDiagram-WPOLBNNX-DY9Md_AG.js} +36 -48
- package/dist/{vennDiagram-Q3Y3IDCW-CircfM4o.js → vennDiagram-Q3Y3IDCW-DbPGt27W.js} +4 -4
- package/dist/{vennDiagram-Q3Y3IDCW-Bf1i94bS.cjs → vennDiagram-Q3Y3IDCW-NYVHk5sI.cjs} +1 -1
- package/dist/wardley-7MLQ67FV-BDYz-MEd.js +2 -0
- package/dist/wardley-7MLQ67FV-BdwutaJ8.cjs +1 -0
- package/dist/{wardleyDiagram-IVAIDKWA-BOSseRAa.js → wardleyDiagram-IVAIDKWA-BHkJFpfC.js} +5 -5
- package/dist/{wardleyDiagram-IVAIDKWA-Cr5LS-u2.cjs → wardleyDiagram-IVAIDKWA-DsYJNlmX.cjs} +1 -1
- package/dist/{xychartDiagram-4URNHDU4-DOUN6alM.cjs → xychartDiagram-4URNHDU4-B_g46bSg.cjs} +1 -1
- package/dist/{xychartDiagram-4URNHDU4-C4X8LFY4.js → xychartDiagram-4URNHDU4-IvFjWG-y.js} +8 -8
- package/package.json +14 -14
- package/dist/PdfViewer-BJfC4rzg.js +0 -428
- package/dist/PdfViewer-D6C-NAyn.cjs +0 -1
- package/dist/architecture-WOLXFQ4H-DupyKILn.cjs +0 -1
- package/dist/architecture-WOLXFQ4H-X4ZWxzi-.js +0 -3
- package/dist/architectureDiagram-ZHVYKT53-DBfdIpyr.cjs +0 -36
- package/dist/channel-BRczbI_M.cjs +0 -1
- package/dist/chunk-DSNLSHJZ-DZO9xahH.cjs +0 -129
- package/dist/chunk-ZCHMQSOR-7slscxYq.cjs +0 -1
- package/dist/conversationHistory-DN1r7WZT.cjs +0 -287
- package/dist/conversationHistory-DwB6hasI.js +0 -43647
- package/dist/cose-bilkent-JH36ORCC-Cc2qvpLA.cjs +0 -1
- package/dist/cynefin-EF2NZ3EQ-BB_WO8YQ.js +0 -3
- package/dist/cynefin-EF2NZ3EQ-Du3-s5Z7.cjs +0 -1
- package/dist/cytoscape.esm-uHsEX1XI.cjs +0 -321
- package/dist/dagre-NK4GIZVX-BI_akQkH.cjs +0 -4
- package/dist/diagram-TYUNFSNR-B_p2UHsR.cjs +0 -200
- package/dist/dist-DEl2Ze0j.cjs +0 -2
- package/dist/dist-DJbgM591.cjs +0 -1
- package/dist/dist-Dja2VlN5.cjs +0 -1
- package/dist/elk-QONTBCTQ-BDAptnPT.cjs +0 -27
- package/dist/eventmodeling-K75KTNOO-CMoz0K5S.js +0 -3
- package/dist/eventmodeling-K75KTNOO-DZdZrgwl.cjs +0 -1
- package/dist/flowDiagram-IUGLLWBU-BSiCLGuL.cjs +0 -1
- package/dist/flowDiagram-IUGLLWBU-DL_I6QCE.js +0 -16
- package/dist/gitGraph-VSP46ZUC-DoTshgkY.js +0 -3
- package/dist/gitGraph-VSP46ZUC-lawIO6K6.cjs +0 -1
- package/dist/info-OHQRW6UA-DPTZOb30.js +0 -3
- package/dist/info-OHQRW6UA-deop1PPz.cjs +0 -1
- package/dist/javascript-Gn0piXHk.cjs +0 -1
- package/dist/lib-BDkAiWI9.cjs +0 -26
- package/dist/linear-Nt9BuHfn.cjs +0 -1
- package/dist/mermaid-parser.core-BHBS1DqP.cjs +0 -6
- package/dist/mermaidToImage-CSR5Vyvs.cjs +0 -25
- package/dist/packet-JDAUHWVQ-Bcik24Kz.js +0 -3
- package/dist/packet-JDAUHWVQ-CrY7ylWJ.cjs +0 -1
- package/dist/pdf-BcvU2rBV.cjs +0 -54
- package/dist/pie-XZMESJXO-BYQC-ufi.js +0 -3
- package/dist/pie-XZMESJXO-WjCBboSE.cjs +0 -1
- package/dist/radar-ABXABTNO-BoQ7hH7Z.cjs +0 -1
- package/dist/radar-ABXABTNO-MxbyaZja.js +0 -3
- package/dist/railroad-I3PHUGI6-DckUArT-.js +0 -3
- package/dist/railroad-I3PHUGI6-DuGTlHry.cjs +0 -1
- package/dist/railroad-abnf-LNEFI6M7-DmAJaMEu.js +0 -3
- package/dist/railroad-abnf-LNEFI6M7-DoWf9u55.cjs +0 -1
- package/dist/railroad-ebnf-DWYD2UWJ-Bf05ZyW1.cjs +0 -1
- package/dist/railroad-ebnf-DWYD2UWJ-CS2AUYSv.js +0 -3
- package/dist/railroad-peg-JR7BVNR7-B-nctVbV.js +0 -3
- package/dist/railroad-peg-JR7BVNR7-CcV5KH4m.cjs +0 -1
- package/dist/rolldown-runtime-DF3sbh8G.cjs +0 -1
- package/dist/sizeCapture-INFHLROL-bJ2ZX4Du.cjs +0 -1
- package/dist/src-D9o9TOtH.cjs +0 -1
- package/dist/swimlanes-B3ENRKFQ-DEsfJ_Va.cjs +0 -1
- package/dist/swimlanesDiagram-AYQRV4AK-CU4USE4p.cjs +0 -8
- package/dist/swimlanesDiagram-AYQRV4AK-ora_Y3LB.js +0 -27
- package/dist/treeView-D4JQ5SDB-C3ticT1s.cjs +0 -1
- package/dist/treeView-D4JQ5SDB-CEuRf8gK.js +0 -3
- package/dist/treemap-SAJKECNS-BwIfwvl-.cjs +0 -1
- package/dist/treemap-SAJKECNS-DiC0668-.js +0 -3
- package/dist/typescript-BarIi8q9.cjs +0 -1
- package/dist/wardley-7MLQ67FV-BoIyQQ0E.cjs +0 -1
- package/dist/wardley-7MLQ67FV-CFF6IT1d.js +0 -3
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-DbbDpzbe.cjs"),t=require("./lib-CRTt_FoR.cjs"),n=require("./katex-C-T_oEhv.cjs");var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},u=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:r(s(e)),d(t||!e||!e.__esModule||!c.call(e,`default`)?i(n,`default`,{value:e,enumerable:!0}):n,e)),p=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});function m(e){"@babel/helpers - typeof";return m=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},m(e)}function h(e,t){if(m(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(m(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function g(e){var t=h(e,`string`);return m(t)==`symbol`?t:t+``}function _(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=class{constructor(e){_(this,`rootKey`,void 0),this.rootKey=e}get writtenAs(){}},y=Object.seal({}),b=class extends v{constructor(e){super(e),_(this,`root`,void 0),this.root=[]}prepForXml(e){e.stack.push(this);let t=this.root.flatMap(t=>{if(t instanceof v){let n=t.writtenAs;return n?n.map(t=>t.prepForXml(e)):t.prepForXml(e)}return t}).filter(e=>e!==void 0);return e.stack.pop(),{[this.rootKey]:t.length?t.length===1&&t[0]?._attr?t[0]:t:y}}addChildElement(e){return this.root.push(e),this}},x=class extends b{constructor(e,t){super(e),_(this,`includeIfEmpty`,void 0),this.includeIfEmpty=t}prepForXml(e){let t=super.prepForXml(e);return this.includeIfEmpty||t&&(typeof t[this.rootKey]!=`object`||Object.keys(t[this.rootKey]).length)?t:void 0}};function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?S(Object(n),!0).forEach(function(t){_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var w=class extends v{constructor(e){super(`_attr`),_(this,`root`,void 0),_(this,`xmlKeys`,void 0),this.root=e}prepForXml(e){let t={};return Object.entries(this.root).forEach(([e,n])=>{if(n!==void 0){let r=this.xmlKeys&&this.xmlKeys[e]||e;t[r]=n}}),{_attr:t}}},T=class extends v{constructor(e){super(`_attr`),_(this,`root`,void 0),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:e})=>e!==void 0).reduce((e,{key:t,value:n})=>C(C({},e),{},{[t]:n}),{})}}},E=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{val:`w:val`,color:`w:color`,fill:`w:fill`,space:`w:space`,sz:`w:sz`,type:`w:type`,rsidR:`w:rsidR`,rsidRPr:`w:rsidRPr`,rsidSect:`w:rsidSect`,w:`w:w`,h:`w:h`,top:`w:top`,right:`w:right`,bottom:`w:bottom`,left:`w:left`,header:`w:header`,footer:`w:footer`,gutter:`w:gutter`,linePitch:`w:linePitch`,pos:`w:pos`})}},D=u(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n<l;++n)r(u[n],this,t);return!0};function d(e,t,n,r){var i,o,s;if(l(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s==`function`?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=u(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],a!==`removeListener`&&this.removeAllListeners(a);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function y(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}x(e,t,a,{once:!0}),t!==`error`&&b(e,i,{once:!0})})}function b(e,t,n){typeof e.on==`function`&&x(e,`error`,t,n)}function x(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}})),O=u(((e,t)=>{t.exports=typeof Object.create==`function`?function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),k,A=l((()=>{k=globalThis||self}));function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function M(){throw Error(`setTimeout has not been defined`)}function N(){throw Error(`clearTimeout has not been defined`)}function P(e){if(H===setTimeout)return setTimeout(e,0);if((H===M||!H)&&setTimeout)return H=setTimeout,setTimeout(e,0);try{return H(e,0)}catch{try{return H.call(null,e,0)}catch{return H.call(this,e,0)}}}function F(e){if(U===clearTimeout)return clearTimeout(e);if((U===N||!U)&&clearTimeout)return U=clearTimeout,clearTimeout(e);try{return U(e)}catch{try{return U.call(null,e)}catch{return U.call(this,e)}}}function I(){G&&ee&&(G=!1,ee.length?W=ee.concat(W):K=-1,W.length&&L())}function L(){if(!G){var e=P(I);G=!0;for(var t=W.length;t;){for(ee=W,W=[];++K<t;)ee&&ee[K].run();K=-1,t=W.length}ee=null,G=!1,F(e)}}function R(e,t){this.fun=e,this.array=t}function z(){}var B,V,H,U,W,G,ee,K,te,q,ne=l((()=>{B={exports:{}},V=B.exports={},(function(){try{H=typeof setTimeout==`function`?setTimeout:M}catch{H=M}try{U=typeof clearTimeout==`function`?clearTimeout:N}catch{U=N}})(),W=[],G=!1,K=-1,V.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];W.push(new R(e,t)),W.length===1&&!G&&P(L)},R.prototype.run=function(){this.fun.apply(null,this.array)},V.title=`browser`,V.browser=!0,V.env={},V.argv=[],V.version=``,V.versions={},V.on=z,V.addListener=z,V.once=z,V.off=z,V.removeListener=z,V.removeAllListeners=z,V.emit=z,V.prependListener=z,V.prependOnceListener=z,V.listeners=function(e){return[]},V.binding=function(e){throw Error(`process.binding is not supported`)},V.cwd=function(){return`/`},V.chdir=function(e){throw Error(`process.chdir is not supported`)},V.umask=function(){return 0},te=B.exports,q=j(te)})),re=u(((e,t)=>{t.exports=D().EventEmitter})),ie=u((e=>{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a<o;++a)t[a]=i[a],n[i.charCodeAt(a)]=a;n[45]=62,n[95]=63;function s(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){for(var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f=0;f<d;f+=4)t=n[e.charCodeAt(f)]<<18|n[e.charCodeAt(f+1)]<<12|n[e.charCodeAt(f+2)]<<6|n[e.charCodeAt(f+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(d(r));return i.join(``)}function p(e){for(var n,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;s<c;s+=o)a.push(f(e,s,s+o>c?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),ae=u((e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}})),oe=u((e=>{var t=ie(),n=ae(),r=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=s,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(e){if(e>i)throw RangeError(`The value "`+e+`" is invalid for option "size"`);var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return d(e)}return c(e,t,n)}s.poolSize=8192;function c(e,t,n){if(typeof e==`string`)return f(e,t);if(ArrayBuffer.isView(e))return m(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return h(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);var r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return s.from(r,t,n);var i=g(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return s.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}s.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function u(e,t,n){return l(e),e<=0||t===void 0?o(e):typeof n==`string`?o(e).fill(t,n):o(e).fill(t)}s.alloc=function(e,t,n){return u(e,t,n)};function d(e){return l(e),o(e<0?0:_(e)|0)}s.allocUnsafe=function(e){return d(e)},s.allocUnsafeSlow=function(e){return d(e)};function f(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!s.isEncoding(t))throw TypeError(`Unknown encoding: `+t);var n=y(e,t)|0,r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function p(e){for(var t=e.length<0?0:_(e.length)|0,n=o(t),r=0;r<t;r+=1)n[r]=e[r]&255;return n}function m(e){if(q(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}function h(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);var r=t===void 0&&n===void 0?new Uint8Array(e):n===void 0?new Uint8Array(e,t):new Uint8Array(e,t,n);return Object.setPrototypeOf(r,s.prototype),r}function g(e){if(s.isBuffer(e)){var t=_(e.length)|0,n=o(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||ne(e.length)?o(0):p(e);if(e.type===`Buffer`&&Array.isArray(e.data))return p(e.data)}function _(e){if(e>=i)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+i.toString(16)+` bytes`);return e|0}function v(e){return+e!=e&&(e=0),s.alloc(+e)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return s.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(q(a,Uint8Array))i+a.length>r.length?s.from(a).copy(r,i):Uint8Array.prototype.set.call(r,a,i);else if(s.isBuffer(a))a.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=a.length}return r};function y(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);var n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;for(var i=!1;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return W(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return K(e).length;default:if(i)return r?-1:W(e).length;t=(``+t).toLowerCase(),i=!0}}s.byteLength=y;function b(e,t,n){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return F(this,t,n);case`utf8`:case`utf-8`:return A(this,t,n);case`ascii`:return N(this,t,n);case`latin1`:case`binary`:return P(this,t,n);case`base64`:return k(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return I(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}s.prototype._isBuffer=!0;function x(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(var t=0;t<e;t+=2)x(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(var t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(var t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return e===0?``:arguments.length===0?A(this,0,e):b.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e||s.compare(this,e)===0},s.prototype.inspect=function(){var t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,o=n-t,c=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n),d=0;d<c;++d)if(l[d]!==u[d]){a=l[d],o=u[d];break}return a<o?-1:+(o<a)};function S(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,ne(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(i)n=0;else return-1}if(typeof t==`string`&&(t=s.from(t,r)),s.isBuffer(t))return t.length===0?-1:C(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):C(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function C(e,t,n,r,i){var a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}var l;if(i){var u=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,u===-1?0:l-u)){if(u===-1&&(u=l),l-u+1===s)return u*a}else u!==-1&&(l-=l-u),u=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){for(var d=!0,f=0;f<s;f++)if(c(e,l+f)!==c(t,f)){d=!1;break}if(d)return l}return-1}s.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},s.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)};function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var a=t.length;r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(o*2,2),16);if(ne(s))return o;e[n+o]=s}return o}function T(e,t,n,r){return te(W(t,e.length-n),e,n,r)}function E(e,t,n,r){return te(G(t),e,n,r)}function D(e,t,n,r){return te(K(t),e,n,r)}function O(e,t,n,r){return te(ee(t,e.length-n),e,n,r)}s.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);var i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;for(var a=!1;;)switch(r){case`hex`:return w(this,e,t,n);case`utf8`:case`utf-8`:return T(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return E(this,e,t,n);case`base64`:return D(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return O(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=n){var c,l,u,d;switch(s){case 1:a<128&&(o=a);break;case 2:c=e[i+1],(c&192)==128&&(d=(a&31)<<6|c&63,d>127&&(o=d));break;case 3:c=e[i+1],l=e[i+2],(c&192)==128&&(l&192)==128&&(d=(a&15)<<12|(c&63)<<6|l&63,d>2047&&(d<55296||d>57343)&&(o=d));break;case 4:c=e[i+1],l=e[i+2],u=e[i+3],(c&192)==128&&(l&192)==128&&(u&192)==128&&(d=(a&15)<<18|(c&63)<<12|(l&63)<<6|u&63,d>65535&&d<1114112&&(o=d))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|o&1023),r.push(o),i+=s}return M(r)}var j=4096;function M(e){var t=e.length;if(t<=j)return String.fromCharCode.apply(String,e);for(var n=``,r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=j));return n}function N(e,t,n){var r=``;n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function P(e,t,n){var r=``;n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function F(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i=``,a=t;a<n;++a)i+=re[e[a]];return i}function I(e,t,n){for(var r=e.slice(t,n),i=``,a=0;a<r.length-1;a+=2)i+=String.fromCharCode(r[a]+r[a+1]*256);return i}s.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,s.prototype),r};function L(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),n.read(this,e,!1,52,8)};function R(e,t,n,r,i,a){if(!s.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var i=2**(8*n)-1;R(this,e,t,n,i,0)}var a=1,o=0;for(this[t]=e&255;++o<n&&(a*=256);)this[t+o]=e/a&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var i=2**(8*n)-1;R(this,e,t,n,i,0)}var a=n-1,o=1;for(this[t+a]=e&255;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=2**(8*n-1);R(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=e&255;++a<n&&(o*=256);)e<0&&s===0&&this[t+a-1]!==0&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=2**(8*n-1);R(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=e&255;--a>=0&&(o*=256);)e<0&&s===0&&this[t+a+1]!==0&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function z(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function B(e,t,r,i,a){return t=+t,r>>>=0,a||z(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}s.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)};function V(e,t,r,i,a){return t=+t,r>>>=0,a||z(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}s.prototype.writeDoubleLE=function(e,t,n){return V(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return V(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;return this===e&&typeof Uint8Array.prototype.copyWithin==`function`?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},s.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!s.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){var i=e.charCodeAt(0);(r===`utf8`&&i<128||r===`latin1`)&&(e=i)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;var a;if(typeof e==`number`)for(a=t;a<n;++a)this[a]=e;else{var o=s.isBuffer(e)?e:s.from(e,r),c=o.length;if(c===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(a=0;a<n-t;++a)this[a+t]=o[a%c]}return this};var H=/[^+/0-9A-Za-z-_]/g;function U(e){if(e=e.split(`=`)[0],e=e.trim().replace(H,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function W(e,t){t||=1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319||o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function G(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function ee(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function K(e){return t.toByteArray(U(e))}function te(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function q(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function ne(e){return e!==e}var re=(function(){for(var e=`0123456789abcdef`,t=Array(256),n=0;n<16;++n)for(var r=n*16,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t})()})),se=u(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),ce=u(((e,t)=>{var n=se();t.exports=function(){return n()&&!!Symbol.toStringTag}})),le=u(((e,t)=>{t.exports=Object})),ue=u(((e,t)=>{t.exports=Error})),de=u(((e,t)=>{t.exports=EvalError})),fe=u(((e,t)=>{t.exports=RangeError})),pe=u(((e,t)=>{t.exports=ReferenceError})),me=u(((e,t)=>{t.exports=SyntaxError})),he=u(((e,t)=>{t.exports=TypeError})),ge=u(((e,t)=>{t.exports=URIError})),_e=u(((e,t)=>{t.exports=Math.abs})),ve=u(((e,t)=>{t.exports=Math.floor})),ye=u(((e,t)=>{t.exports=Math.max})),be=u(((e,t)=>{t.exports=Math.min})),xe=u(((e,t)=>{t.exports=Math.pow})),Se=u(((e,t)=>{t.exports=Math.round})),Ce=u(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),we=u(((e,t)=>{var n=Ce();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),Te=u(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),Ee=u(((e,t)=>{var n=Te();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),De=u(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),Oe=u(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=se();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),ke=u(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),Ae=u(((e,t)=>{t.exports=le().getPrototypeOf||null})),je=u(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||n.apply(t)!==i)throw TypeError(`Function.prototype.bind called on incompatible `+t);for(var c=o(arguments,1),l,u=function(){if(this instanceof l){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},d=r(0,t.length-c.length),f=[],p=0;p<d;p++)f[p]=`$`+p;if(l=Function(`binder`,`return function (`+s(f,`,`)+`){ return binder.apply(this,arguments); }`)(u),t.prototype){var m=function(){};m.prototype=t.prototype,l.prototype=new m,m.prototype=null}return l}})),Me=u(((e,t)=>{var n=je();t.exports=Function.prototype.bind||n})),Ne=u(((e,t)=>{t.exports=Function.prototype.call})),Pe=u(((e,t)=>{t.exports=Function.prototype.apply})),Fe=u(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),Ie=u(((e,t)=>{var n=Me(),r=Pe(),i=Ne();t.exports=Fe()||n.call(i,r)})),Le=u(((e,t)=>{var n=Me(),r=he(),i=Ne(),a=Ie();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),Re=u(((e,t)=>{var n=Le(),r=Ee(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`&&function(e){return s(e==null?e:o(e))}})),ze=u(((e,t)=>{var n=ke(),r=Ae(),i=Re();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),Be=u(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=Me().call(n,r)})),Ve=u(((e,t)=>{var n,r=le(),i=ue(),a=de(),o=fe(),s=pe(),c=me(),l=he(),u=ge(),d=_e(),f=ve(),p=ye(),m=be(),h=xe(),g=Se(),_=we(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=Ee(),x=De(),S=function(){throw new l},C=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}}():S,w=Oe()(),T=ze(),E=Ae(),D=ke(),O=Pe(),k=Ne(),A={},j=typeof Uint8Array>`u`||!T?n:T(Uint8Array),M={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":w&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&T?T(T([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!w||!T?n:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!w||!T?n:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&T?T(``[Symbol.iterator]()):n,"%Symbol%":w?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":j,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":D};if(T)try{null.error}catch(e){M[`%Error.prototype%`]=T(T(e))}var N=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&T&&(n=T(i.prototype))}return M[t]=n,n},P={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},F=Me(),I=Be(),L=F.call(k,Array.prototype.concat),R=F.call(O,Array.prototype.splice),z=F.call(k,String.prototype.replace),B=F.call(k,String.prototype.slice),V=F.call(k,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,W=function(e){var t=B(e,0,1),n=B(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return z(e,H,function(e,t,n,i){r[r.length]=n?z(i,U,`$1`):t||e}),r},G=function(e,t){var n=e,r;if(I(P,n)&&(r=P[n],n=`%`+r[0]+`%`),I(M,n)){var i=M[n];if(i===A&&(i=N(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(V(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=W(e),r=n.length>0?n[0]:``,i=G(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],R(n,L([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=B(p,0,1),h=B(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,I(M,a))o=M[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=I(o,p),o=o[p];f&&!s&&(M[a]=o)}}return o}})),He=u(((e,t)=>{var n=Ve(),r=Le(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),Ue=u(((e,t)=>{var n=ce()(),r=He()(`Object.prototype.toString`),i=function(e){return n&&e&&typeof e==`object`&&Symbol.toStringTag in e?!1:r(e)===`[object Arguments]`},a=function(e){return i(e)?!0:typeof e==`object`&&!!e&&`length`in e&&typeof e.length==`number`&&e.length>=0&&r(e)!==`[object Array]`&&`callee`in e&&r(e.callee)===`[object Function]`},o=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=o?i:a})),We=u(((e,t)=>{var n=Object.prototype.toString,r=Function.prototype.toString,i=/^\s*(?:function)?\*/,a=ce()(),o=Object.getPrototypeOf,s=function(){if(!a)return!1;try{return Function(`return function*() {}`)()}catch{}},c;t.exports=function(e){if(typeof e!=`function`)return!1;if(i.test(r.call(e)))return!0;if(!a)return n.call(e)===`[object GeneratorFunction]`;if(!o)return!1;if(c===void 0){var t=s();c=t?o(t):!1}return o(e)===c}})),Ge=u(((e,t)=>{var n=Function.prototype.toString,r=typeof Reflect==`object`&&Reflect!==null&&Reflect.apply,i,a;if(typeof r==`function`&&typeof Object.defineProperty==`function`)try{i=Object.defineProperty({},"length",{get:function(){throw a}}),a={},r(function(){throw 42},null,i)}catch(e){e!==a&&(r=null)}else r=null;var o=/^\s*class\b/,s=function(e){try{var t=n.call(e);return o.test(t)}catch{return!1}},c=function(e){try{return!s(e)&&(n.call(e),!0)}catch{return!1}},l=Object.prototype.toString,u=`[object Object]`,d=`[object Function]`,f=`[object GeneratorFunction]`,p=`[object HTMLAllCollection]`,m=`[object HTML document.all class]`,h=`[object HTMLCollection]`,g=typeof Symbol==`function`&&!!Symbol.toStringTag,_=!(0 in[,]),v=function(){return!1};if(typeof document==`object`){var y=document.all;l.call(y)===l.call(document.all)&&(v=function(e){if((_||!e)&&(e===void 0||typeof e==`object`))try{var t=l.call(e);return(t===p||t===m||t===h||t===u)&&e(``)==null}catch{}return!1})}t.exports=r?function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;try{r(e,null,i)}catch(e){if(e!==a)return!1}return!s(e)&&c(e)}:function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;if(g)return c(e);if(s(e))return!1;var t=l.call(e);return t!==d&&t!==f&&!/^\[object HTML/.test(t)?!1:c(e)}})),Ke=u(((e,t)=>{var n=Ge(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,a=e.length;r<a;r++)i.call(e,r)&&(n==null?t(e[r],r,e):t.call(n,e[r],r,e))},o=function(e,t,n){for(var r=0,i=e.length;r<i;r++)n==null?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},s=function(e,t,n){for(var r in e)i.call(e,r)&&(n==null?t(e[r],r,e):t.call(n,e[r],r,e))};function c(e){return r.call(e)===`[object Array]`}t.exports=function(e,t,r){if(!n(t))throw TypeError(`iterator must be a function`);var i;arguments.length>=3&&(i=r),c(e)?a(e,t,i):typeof e==`string`?o(e,t,i):s(e,t,i)}})),qe=u(((e,t)=>{t.exports=[`Float32Array`,`Float64Array`,`Int8Array`,`Int16Array`,`Int32Array`,`Uint8Array`,`Uint8ClampedArray`,`Uint16Array`,`Uint32Array`,`BigInt64Array`,`BigUint64Array`]})),Je=u(((e,t)=>{A();var n=qe(),r=typeof globalThis>`u`?k:globalThis;t.exports=function(){for(var e=[],t=0;t<n.length;t++)typeof r[n[t]]==`function`&&(e[e.length]=n[t]);return e}})),Ye=u(((e,t)=>{var n=De(),r=me(),i=he(),a=Ee();t.exports=function(e,t,o){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`obj` must be an object or a function`");if(typeof t!=`string`&&typeof t!=`symbol`)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=`boolean`&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=`boolean`&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=`boolean`&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=`boolean`)throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!a&&a(e,t);if(n)n(e,t,{configurable:l===null&&d?d.configurable:!l,enumerable:s===null&&d?d.enumerable:!s,value:o,writable:c===null&&d?d.writable:!c});else if(u||!s&&!c&&!l)e[t]=o;else throw new r(`This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.`)}})),Xe=u(((e,t)=>{var n=De(),r=function(){return!!n};r.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],`length`,{value:1}).length!==1}catch{return!0}},t.exports=r})),Ze=u(((e,t)=>{var n=Ve(),r=Ye(),i=Xe()(),a=Ee(),o=he(),s=n(`%Math.floor%`);t.exports=function(e,t){if(typeof e!=`function`)throw new o("`fn` is not a function");if(typeof t!=`number`||t<0||t>4294967295||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],c=!0,l=!0;if(`length`in e&&a){var u=a(e,`length`);u&&!u.configurable&&(c=!1),u&&!u.writable&&(l=!1)}return(c||l||!n)&&(i?r(e,`length`,t,!0,!0):r(e,`length`,t)),e}})),Qe=u(((e,t)=>{var n=Me(),r=Pe(),i=Ie();t.exports=function(){return i(n,r,arguments)}})),$e=u(((e,t)=>{var n=Ze(),r=De(),i=Le(),a=Qe();t.exports=function(e){var t=i(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},r?r(t.exports,`apply`,{value:a}):t.exports.apply=a})),et=u(((e,t)=>{A();var n=Ke(),r=Je(),i=$e(),a=He(),o=Ee(),s=ze(),c=a(`Object.prototype.toString`),l=ce()(),u=typeof globalThis>`u`?k:globalThis,d=r(),f=a(`String.prototype.slice`),p=a(`Array.prototype.indexOf`,!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},m={__proto__:null};l&&o&&s?n(d,function(e){var t=new u[e];if(Symbol.toStringTag in t&&s){var n=s(t),r=o(n,Symbol.toStringTag);!r&&n&&(r=o(s(n),Symbol.toStringTag)),m[`$`+e]=i(r.get)}}):n(d,function(e){var t=new u[e],n=t.slice||t.set;n&&(m[`$`+e]=i(n))});var h=function(e){var t=!1;return n(m,function(n,r){if(!t)try{`$`+n(e)===r&&(t=f(r,1))}catch{}}),t},g=function(e){var t=!1;return n(m,function(n,r){if(!t)try{n(e),t=f(r,1)}catch{}}),t};t.exports=function(e){if(!e||typeof e!=`object`)return!1;if(!l){var t=f(c(e),8,-1);return p(d,t)>-1?t:t===`Object`&&g(e)}return o?h(e):null}})),tt=u(((e,t)=>{var n=et();t.exports=function(e){return!!n(e)}})),nt=u((e=>{var t=Ue(),n=We(),r=et(),i=tt();function a(e){return e.call.bind(e)}var o=typeof BigInt<`u`,s=typeof Symbol<`u`,c=a(Object.prototype.toString),l=a(Number.prototype.valueOf),u=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(o)var f=a(BigInt.prototype.valueOf);if(s)var p=a(Symbol.prototype.valueOf);function m(e,t){if(typeof e!=`object`)return!1;try{return t(e),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=i;function h(e){return typeof Promise<`u`&&e instanceof Promise||typeof e==`object`&&!!e&&typeof e.then==`function`&&typeof e.catch==`function`}e.isPromise=h;function g(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):i(e)||z(e)}e.isArrayBufferView=g;function _(e){return r(e)===`Uint8Array`}e.isUint8Array=_;function v(e){return r(e)===`Uint8ClampedArray`}e.isUint8ClampedArray=v;function y(e){return r(e)===`Uint16Array`}e.isUint16Array=y;function b(e){return r(e)===`Uint32Array`}e.isUint32Array=b;function x(e){return r(e)===`Int8Array`}e.isInt8Array=x;function S(e){return r(e)===`Int16Array`}e.isInt16Array=S;function C(e){return r(e)===`Int32Array`}e.isInt32Array=C;function w(e){return r(e)===`Float32Array`}e.isFloat32Array=w;function T(e){return r(e)===`Float64Array`}e.isFloat64Array=T;function E(e){return r(e)===`BigInt64Array`}e.isBigInt64Array=E;function D(e){return r(e)===`BigUint64Array`}e.isBigUint64Array=D;function O(e){return c(e)===`[object Map]`}O.working=typeof Map<`u`&&O(new Map);function k(e){return typeof Map>`u`?!1:O.working?O(e):e instanceof Map}e.isMap=k;function A(e){return c(e)===`[object Set]`}A.working=typeof Set<`u`&&A(new Set);function j(e){return typeof Set>`u`?!1:A.working?A(e):e instanceof Set}e.isSet=j;function M(e){return c(e)===`[object WeakMap]`}M.working=typeof WeakMap<`u`&&M(new WeakMap);function N(e){return typeof WeakMap>`u`?!1:M.working?M(e):e instanceof WeakMap}e.isWeakMap=N;function P(e){return c(e)===`[object WeakSet]`}P.working=typeof WeakSet<`u`&&P(new WeakSet);function F(e){return P(e)}e.isWeakSet=F;function I(e){return c(e)===`[object ArrayBuffer]`}I.working=typeof ArrayBuffer<`u`&&I(new ArrayBuffer);function L(e){return typeof ArrayBuffer>`u`?!1:I.working?I(e):e instanceof ArrayBuffer}e.isArrayBuffer=L;function R(e){return c(e)===`[object DataView]`}R.working=typeof ArrayBuffer<`u`&&typeof DataView<`u`&&R(new DataView(new ArrayBuffer(1),0,1));function z(e){return typeof DataView>`u`?!1:R.working?R(e):e instanceof DataView}e.isDataView=z;var B=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:void 0;function V(e){return c(e)===`[object SharedArrayBuffer]`}function H(e){return B!==void 0&&(V.working===void 0&&(V.working=V(new B)),V.working?V(e):e instanceof B)}e.isSharedArrayBuffer=H;function U(e){return c(e)===`[object AsyncFunction]`}e.isAsyncFunction=U;function W(e){return c(e)===`[object Map Iterator]`}e.isMapIterator=W;function G(e){return c(e)===`[object Set Iterator]`}e.isSetIterator=G;function ee(e){return c(e)===`[object Generator]`}e.isGeneratorObject=ee;function K(e){return c(e)===`[object WebAssembly.Module]`}e.isWebAssemblyCompiledModule=K;function te(e){return m(e,l)}e.isNumberObject=te;function q(e){return m(e,u)}e.isStringObject=q;function ne(e){return m(e,d)}e.isBooleanObject=ne;function re(e){return o&&m(e,f)}e.isBigIntObject=re;function ie(e){return s&&m(e,p)}e.isSymbolObject=ie;function ae(e){return te(e)||q(e)||ne(e)||re(e)||ie(e)}e.isBoxedPrimitive=ae;function oe(e){return typeof Uint8Array<`u`&&(L(e)||H(e))}e.isAnyArrayBuffer=oe,[`isProxy`,`isExternal`,`isModuleNamespaceObject`].forEach(function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw Error(t+` is not supported in userland`)}})})})),rt=u(((e,t)=>{t.exports=function(e){return e&&typeof e==`object`&&typeof e.copy==`function`&&typeof e.fill==`function`&&typeof e.readUInt8==`function`}})),it=u((e=>{ne();var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},n=/%[sdj%]/g;e.format=function(e){if(!x(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(o(arguments[r]));return t.join(` `)}for(var r=1,i=arguments,a=i.length,s=String(e).replace(n,function(e){if(e===`%%`)return`%`;if(r>=a)return e;switch(e){case`%s`:return String(i[r++]);case`%d`:return Number(i[r++]);case`%j`:try{return JSON.stringify(i[r++])}catch{return`[Circular]`}default:return e}}),c=i[r];r<a;c=i[++r])v(c)||!T(c)?s+=` `+c:s+=` `+o(c);return s},e.deprecate=function(t,n){if(q!==void 0&&q.noDeprecation===!0)return t;if(q===void 0)return function(){return e.deprecate(t,n).apply(this,arguments)};var r=!1;function i(){if(!r){if(q.throwDeprecation)throw Error(n);q.traceDeprecation?console.trace(n):console.error(n),r=!0}return t.apply(this,arguments)}return i};var r={},i=/^$/;if(q.env.NODE_DEBUG){var a=q.env.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,`\\$&`).replace(/\*/g,`.*`).replace(/,/g,`$|^`).toUpperCase(),i=RegExp(`^`+a+`$`,`i`)}e.debuglog=function(t){if(t=t.toUpperCase(),!r[t]){if(i.test(t)){var n=q.pid;r[t]=function(){var r=e.format.apply(e,arguments);console.error(`%s %d: %s`,t,n,r)}}else r[t]=function(){}}return r[t]};function o(t,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),_(n)?r.showHidden=n:n&&e._extend(r,n),C(r.showHidden)&&(r.showHidden=!1),C(r.depth)&&(r.depth=2),C(r.colors)&&(r.colors=!1),C(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),u(r,t,r.depth)}e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:`cyan`,number:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,date:`magenta`,regexp:`red`};function s(e,t){var n=o.styles[t];return n?`\x1B[`+o.colors[n][0]+`m`+e+`\x1B[`+o.colors[n][1]+`m`:e}function c(e,t){return e}function l(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(t,n,r){if(t.customInspect&&n&&k(n.inspect)&&n.inspect!==e.inspect&&!(n.constructor&&n.constructor.prototype===n)){var i=n.inspect(r,t);return x(i)||(i=u(t,i,r)),i}var a=d(t,n);if(a)return a;var o=Object.keys(n),s=l(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),D(n)&&(o.indexOf(`message`)>=0||o.indexOf(`description`)>=0))return f(n);if(o.length===0){if(k(n)){var c=n.name?`: `+n.name:``;return t.stylize(`[Function`+c+`]`,`special`)}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),`regexp`);if(E(n))return t.stylize(Date.prototype.toString.call(n),`date`);if(D(n))return f(n)}var _=``,v=!1,y=[`{`,`}`];if(g(n)&&(v=!0,y=[`[`,`]`]),k(n)&&(_=` [Function`+(n.name?`: `+n.name:``)+`]`),w(n)&&(_=` `+RegExp.prototype.toString.call(n)),E(n)&&(_=` `+Date.prototype.toUTCString.call(n)),D(n)&&(_=` `+f(n)),o.length===0&&(!v||n.length==0))return y[0]+_+y[1];if(r<0)return w(n)?t.stylize(RegExp.prototype.toString.call(n),`regexp`):t.stylize(`[Object]`,`special`);t.seen.push(n);var b=v?p(t,n,r,s,o):o.map(function(e){return m(t,n,r,s,e,v)});return t.seen.pop(),h(b,_,y)}function d(e,t){if(C(t))return e.stylize(`undefined`,`undefined`);if(x(t)){var n=`'`+JSON.stringify(t).replace(/^"|"$/g,``).replace(/'/g,`\\'`).replace(/\\"/g,`"`)+`'`;return e.stylize(n,`string`)}if(b(t))return e.stylize(``+t,`number`);if(_(t))return e.stylize(``+t,`boolean`);if(v(t))return e.stylize(`null`,`null`)}function f(e){return`[`+Error.prototype.toString.call(e)+`]`}function p(e,t,n,r,i){for(var a=[],o=0,s=t.length;o<s;++o)F(t,String(o))?a.push(m(e,t,n,r,String(o),!0)):a.push(``);return i.forEach(function(i){i.match(/^\d+$/)||a.push(m(e,t,n,r,i,!0))}),a}function m(e,t,n,r,i,a){var o,s,c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]};if(c.get?s=c.set?e.stylize(`[Getter/Setter]`,`special`):e.stylize(`[Getter]`,`special`):c.set&&(s=e.stylize(`[Setter]`,`special`)),F(r,i)||(o=`[`+i+`]`),s||(e.seen.indexOf(c.value)<0?(s=v(n)?u(e,c.value,null):u(e,c.value,n-1),s.indexOf(`
|
|
2
|
+
`)>-1&&(s=a?s.split(`
|
|
3
|
+
`).map(function(e){return` `+e}).join(`
|
|
4
|
+
`).slice(2):`
|
|
5
|
+
`+s.split(`
|
|
6
|
+
`).map(function(e){return` `+e}).join(`
|
|
7
|
+
`))):s=e.stylize(`[Circular]`,`special`)),C(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(``+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,`name`)):(o=o.replace(/'/g,`\\'`).replace(/\\"/g,`"`).replace(/(^"|"$)/g,`'`),o=e.stylize(o,`string`))}return o+`: `+s}function h(e,t,n){var r=0;return e.reduce(function(e,t){return r++,t.indexOf(`
|
|
8
|
+
`)>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,``).length+1},0)>60?n[0]+(t===``?``:t+`
|
|
9
|
+
`)+` `+e.join(`,
|
|
10
|
+
`)+` `+n[1]:n[0]+t+` `+e.join(`, `)+` `+n[1]}e.types=nt();function g(e){return Array.isArray(e)}e.isArray=g;function _(e){return typeof e==`boolean`}e.isBoolean=_;function v(e){return e===null}e.isNull=v;function y(e){return e==null}e.isNullOrUndefined=y;function b(e){return typeof e==`number`}e.isNumber=b;function x(e){return typeof e==`string`}e.isString=x;function S(e){return typeof e==`symbol`}e.isSymbol=S;function C(e){return e===void 0}e.isUndefined=C;function w(e){return T(e)&&j(e)===`[object RegExp]`}e.isRegExp=w,e.types.isRegExp=w;function T(e){return typeof e==`object`&&!!e}e.isObject=T;function E(e){return T(e)&&j(e)===`[object Date]`}e.isDate=E,e.types.isDate=E;function D(e){return T(e)&&(j(e)===`[object Error]`||e instanceof Error)}e.isError=D,e.types.isNativeError=D;function k(e){return typeof e==`function`}e.isFunction=k;function A(e){return e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`||typeof e==`symbol`||e===void 0}e.isPrimitive=A,e.isBuffer=rt();function j(e){return Object.prototype.toString.call(e)}function M(e){return e<10?`0`+e.toString(10):e.toString(10)}var N=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function P(){var e=new Date,t=[M(e.getHours()),M(e.getMinutes()),M(e.getSeconds())].join(`:`);return[e.getDate(),N[e.getMonth()],t].join(` `)}e.log=function(){console.log(`%s - %s`,P(),e.format.apply(e,arguments))},e.inherits=O(),e._extend=function(e,t){if(!t||!T(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};function F(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var I=typeof Symbol<`u`?Symbol(`util.promisify.custom`):void 0;e.promisify=function(e){if(typeof e!=`function`)throw TypeError(`The "original" argument must be of type Function`);if(I&&e[I]){var n=e[I];if(typeof n!=`function`)throw TypeError(`The "util.promisify.custom" argument must be of type Function`);return Object.defineProperty(n,I,{value:n,enumerable:!1,writable:!1,configurable:!0}),n}function n(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),i=[],a=0;a<arguments.length;a++)i.push(arguments[a]);i.push(function(e,r){e?n(e):t(r)});try{e.apply(this,i)}catch(e){n(e)}return r}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),I&&Object.defineProperty(n,I,{value:n,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(n,t(e))},e.promisify.custom=I;function L(e,t){if(!e){var n=Error(`Promise was rejected with a falsy value`);n.reason=e,e=n}return t(e)}function R(e){if(typeof e!=`function`)throw TypeError(`The "original" argument must be of type Function`);function n(){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n]);var r=t.pop();if(typeof r!=`function`)throw TypeError(`The last argument must be of type Function`);var i=this,a=function(){return r.apply(i,arguments)};e.apply(this,t).then(function(e){q.nextTick(a.bind(null,null,e))},function(e){q.nextTick(L.bind(null,e,a))})}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,t(e)),n}e.callbackify=R})),at=u(((e,t)=>{function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t];t%2?n(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t,n){return t=c(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function s(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,`string`);return typeof t==`symbol`?t:String(t)}function l(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var u=oe().Buffer,d=it().inspect,f=d&&d.custom||`inspect`;function p(e,t,n){u.prototype.copy.call(e,t,n)}t.exports=function(){function e(){a(this,e),this.head=null,this.tail=null,this.length=0}return s(e,[{key:`push`,value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:`unshift`,value:function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length}},{key:`shift`,value:function(){if(this.length!==0){var e=this.head.data;return this.head=this.length===1?this.tail=null:this.head.next,--this.length,e}}},{key:`clear`,value:function(){this.head=this.tail=null,this.length=0}},{key:`join`,value:function(e){if(this.length===0)return``;for(var t=this.head,n=``+t.data;t=t.next;)n+=e+t.data;return n}},{key:`concat`,value:function(e){if(this.length===0)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),n=this.head,r=0;n;)p(n.data,t,r),r+=n.data.length,n=n.next;return t}},{key:`consume`,value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:`first`,value:function(){return this.head.data}},{key:`_getString`,value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),e-=a,e===0){a===i.length?(++n,this.head=t.next?t.next:this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:`_getBuffer`,value:function(e){var t=u.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),e-=a,e===0){a===i.length?(++r,this.head=n.next?n.next:this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:f,value:function(e,t){return d(this,r(r({},t),{},{depth:0,customInspect:!1}))}}]),e}()})),ot=u(((e,t)=>{ne();function n(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,q.nextTick(o,this,e)):q.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted?q.nextTick(i,n):(n._writableState.errorEmitted=!0,q.nextTick(r,n,e)):q.nextTick(r,n,e):t?(q.nextTick(i,n),t(e)):q.nextTick(i,n)}),this)}function r(e,t){o(e,t),i(e)}function i(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit(`close`)}function a(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(e,t){e.emit(`error`,t)}function s(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit(`error`,t)}t.exports={destroy:n,undestroy:a,errorOrDestroy:s}})),st=u(((e,t)=>{function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r={};function i(e,t,i){i||=Error;function a(e,n,r){return typeof t==`string`?t:t(e,n,r)}var o=function(e){n(t,e);function t(t,n,r){return e.call(this,a(t,n,r))||this}return t}(i);o.prototype.name=i.name,o.prototype.code=e,r[e]=o}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(e){return String(e)}),n>2?`one of ${t} ${e.slice(0,n-1).join(`, `)}, or `+e[n-1]:n===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}function o(e,t,n){return e.substr(!n||n<0?0:+n,t.length)===t}function s(e,t,n){return(n===void 0||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}function c(e,t,n){return typeof n!=`number`&&(n=0),n+t.length>e.length?!1:e.indexOf(t,n)!==-1}i(`ERR_INVALID_OPT_VALUE`,function(e,t){return`The value "`+t+`" is invalid for option "`+e+`"`},TypeError),i(`ERR_INVALID_ARG_TYPE`,function(e,t,n){var r;typeof t==`string`&&o(t,`not `)?(r=`must not be`,t=t.replace(/^not /,``)):r=`must be`;var i=s(e,` argument`)?`The ${e} ${r} ${a(t,`type`)}`:`The "${e}" ${c(e,`.`)?`property`:`argument`} ${r} ${a(t,`type`)}`;return i+=`. Received type ${typeof n}`,i},TypeError),i(`ERR_STREAM_PUSH_AFTER_EOF`,`stream.push() after EOF`),i(`ERR_METHOD_NOT_IMPLEMENTED`,function(e){return`The `+e+` method is not implemented`}),i(`ERR_STREAM_PREMATURE_CLOSE`,`Premature close`),i(`ERR_STREAM_DESTROYED`,function(e){return`Cannot call `+e+` after a stream was destroyed`}),i(`ERR_MULTIPLE_CALLBACK`,`Callback called multiple times`),i(`ERR_STREAM_CANNOT_PIPE`,`Cannot pipe, not readable`),i(`ERR_STREAM_WRITE_AFTER_END`,`write after end`),i(`ERR_STREAM_NULL_VALUES`,`May not write null values to stream`,TypeError),i(`ERR_UNKNOWN_ENCODING`,function(e){return`Unknown encoding: `+e},TypeError),i(`ERR_STREAM_UNSHIFT_AFTER_END_EVENT`,`stream.unshift() after end event`),t.exports.codes=r})),ct=u(((e,t)=>{var n=st().codes.ERR_INVALID_OPT_VALUE;function r(e,t,n){return e.highWaterMark==null?t?e[n]:null:e.highWaterMark}function i(e,t,i,a){var o=r(t,a,i);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0)throw new n(a?i:`highWaterMark`,o);return Math.floor(o)}return e.objectMode?16:16384}t.exports={getHighWaterMark:i}})),lt=u(((e,t)=>{A(),t.exports=n;function n(e,t){if(r(`noDeprecation`))return e;var n=!1;function i(){if(!n){if(r(`throwDeprecation`))throw Error(t);r(`traceDeprecation`)?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return i}function r(e){try{if(!k.localStorage)return!1}catch{return!1}var t=k.localStorage[e];return t!=null&&String(t).toLowerCase()===`true`}})),ut=u(((e,t)=>{A(),ne(),t.exports=T;function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){G(t,e)}}var r;T.WritableState=C;var i={deprecate:lt()},a=re(),o=oe().Buffer,s=(k===void 0?typeof window<`u`?window:typeof self<`u`?self:{}:k).Uint8Array||function(){};function c(e){return o.from(e)}function l(e){return o.isBuffer(e)||e instanceof s}var u=ot(),d=ct().getHighWaterMark,f=st().codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,h=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,_=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,y=f.ERR_STREAM_WRITE_AFTER_END,b=f.ERR_UNKNOWN_ENCODING,x=u.errorOrDestroy;O()(T,a);function S(){}function C(e,t,i){r||=dt(),e||={},typeof i!=`boolean`&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,`writableHighWaterMark`,i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}C.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:i.deprecate(function(){return this.getBuffer()},`_writableState.buffer is deprecated. Use _writableState.getBuffer instead.`,`DEP0003`)})}catch{}})();var w;typeof Symbol==`function`&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==`function`?(w=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return w.call(this,e)?!0:this===T&&e&&e._writableState instanceof C}})):w=function(e){return e instanceof this};function T(e){r||=dt();var t=this instanceof r;if(!t&&!w.call(T,this))return new T(e);this._writableState=new C(e,this,t),this.writable=!0,e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final)),a.call(this)}T.prototype.pipe=function(){x(this,new g)};function E(e,t){var n=new y;x(e,n),q.nextTick(t,n)}function D(e,t,n,r){var i;return n===null?i=new v:typeof n!=`string`&&!t.objectMode&&(i=new p(`chunk`,[`string`,`Buffer`],n)),!i||(x(e,i),q.nextTick(r,i),!1)}T.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=!r.objectMode&&l(e);return a&&!o.isBuffer(e)&&(e=c(e)),typeof t==`function`&&(n=t,t=null),a?t=`buffer`:t||=r.defaultEncoding,typeof n!=`function`&&(n=S),r.ending?E(this,n):(a||D(this,r,e,n))&&(r.pendingcb++,i=M(this,r,a,e,t,n)),i},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&z(this,e))},T.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=e.toLowerCase()),!([`hex`,`utf8`,`utf-8`,`ascii`,`binary`,`base64`,`ucs2`,`ucs-2`,`utf16le`,`utf-16le`,`raw`].indexOf((e+``).toLowerCase())>-1))throw new b(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function j(e,t,n){return!e.objectMode&&e.decodeStrings!==!1&&typeof t==`string`&&(t=o.from(t,n)),t}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function M(e,t,n,r,i,a){if(!n){var o=j(t,r,i);r!==o&&(n=!0,i=`buffer`,r=o)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else N(e,t,!1,s,r,i,a);return c}function N(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new _(`write`)):n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function P(e,t,n,r,i){--t.pendingcb,n?(q.nextTick(i,r),q.nextTick(U,e,t),e._writableState.errorEmitted=!0,x(e,r)):(i(r),e._writableState.errorEmitted=!0,x(e,r),U(e,t))}function F(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(typeof i!=`function`)throw new h;if(F(n),t)P(e,n,r,t,i);else{var a=B(n)||e.destroyed;!a&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest&&z(e,n),r?q.nextTick(L,e,n,a,i):L(e,n,a,i)}}function L(e,t,n,r){n||R(e,t),t.pendingcb--,r(),U(e,t)}function R(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit(`drain`))}function z(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,a=Array(i),o=t.corkedRequestsFree;o.entry=r;for(var s=0,c=!0;r;)a[s]=r,r.isBuf||(c=!1),r=r.next,s+=1;a.allBuffers=c,N(e,t,!0,t.length,a,``,o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,d=r.callback;if(N(e,t,!1,t.objectMode?1:l.length,l,u,d),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}T.prototype._write=function(e,t,n){n(new m(`_write()`))},T.prototype._writev=null,T.prototype.end=function(e,t,n){var r=this._writableState;return typeof e==`function`?(n=e,e=null,t=null):typeof t==`function`&&(n=t,t=null),e!=null&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||W(this,r,n),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function B(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function V(e,t){e._final(function(n){t.pendingcb--,n&&x(e,n),t.prefinished=!0,e.emit(`prefinish`),U(e,t)})}function H(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final==`function`&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,q.nextTick(V,e,t)):(t.prefinished=!0,e.emit(`prefinish`)))}function U(e,t){var n=B(t);if(n&&(H(e,t),t.pendingcb===0&&(t.finished=!0,e.emit(`finish`),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}function W(e,t,n){t.ending=!0,U(e,t),n&&(t.finished?q.nextTick(n):e.once(`finish`,n)),t.ended=!0,e.writable=!1}function G(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=u.destroy,T.prototype._undestroy=u.undestroy,T.prototype._destroy=function(e,t){t(e)}})),dt=u(((e,t)=>{ne();var n=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=c;var r=_t(),i=ut();O()(c,r);for(var a=n(i.prototype),o=0;o<a.length;o++){var s=a[o];c.prototype[s]||(c.prototype[s]=i.prototype[s])}function c(e){if(!(this instanceof c))return new c(e);r.call(this,e),i.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once(`end`,l)))}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function l(){this._writableState.ended||q.nextTick(u,this)}function u(e){e.end()}Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})})),ft=u(((e,t)=>{var n=oe(),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a);function a(e,t,n){return r(e,t,n)}i(r,a),a.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return r(e,t,n)},a.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var i=r(e);return t===void 0?i.fill(0):typeof n==`string`?i.fill(t,n):i.fill(t),i},a.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r(e)},a.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}})),pt=u((e=>{var t=ft().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:case`raw`:return!0;default:return!1}};function r(e){if(!e)return`utf8`;for(var t;;)switch(e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||``},a.prototype.end=d,a.prototype.text=u,a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function _(e){return e&&e.length?this.write(e):``}})),mt=u(((e,t)=>{var n=st().codes.ERR_STREAM_PREMATURE_CLOSE;function r(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}function i(){}function a(e){return e.setHeader&&typeof e.abort==`function`}function o(e,t,s){if(typeof t==`function`)return o(e,null,t);t||={},s=r(s||i);var c=t.readable||t.readable!==!1&&e.readable,l=t.writable||t.writable!==!1&&e.writable,u=function(){e.writable||f()},d=e._writableState&&e._writableState.finished,f=function(){l=!1,d=!0,c||s.call(e)},p=e._readableState&&e._readableState.endEmitted,m=function(){c=!1,p=!0,l||s.call(e)},h=function(t){s.call(e,t)},g=function(){var t;if(c&&!p)return(!e._readableState||!e._readableState.ended)&&(t=new n),s.call(e,t);if(l&&!d)return(!e._writableState||!e._writableState.ended)&&(t=new n),s.call(e,t)},_=function(){e.req.on(`finish`,f)};return a(e)?(e.on(`complete`,f),e.on(`abort`,g),e.req?_():e.on(`request`,_)):l&&!e._writableState&&(e.on(`end`,u),e.on(`close`,u)),e.on(`end`,m),e.on(`finish`,f),t.error!==!1&&e.on(`error`,h),e.on(`close`,g),function(){e.removeListener(`complete`,f),e.removeListener(`abort`,g),e.removeListener(`request`,_),e.req&&e.req.removeListener(`finish`,f),e.removeListener(`end`,u),e.removeListener(`close`,u),e.removeListener(`finish`,f),e.removeListener(`end`,m),e.removeListener(`error`,h),e.removeListener(`close`,g)}}t.exports=o})),ht=u(((e,t)=>{ne();var n;function r(e,t,n){return t=i(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){var t=a(e,`string`);return typeof t==`symbol`?t:String(t)}function a(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var o=mt(),s=Symbol(`lastResolve`),c=Symbol(`lastReject`),l=Symbol(`error`),u=Symbol(`ended`),d=Symbol(`lastPromise`),f=Symbol(`handlePromise`),p=Symbol(`stream`);function m(e,t){return{value:e,done:t}}function h(e){var t=e[s];if(t!==null){var n=e[p].read();n!==null&&(e[d]=null,e[s]=null,e[c]=null,t(m(n,!1)))}}function g(e){q.nextTick(h,e)}function _(e,t){return function(n,r){e.then(function(){t[u]?n(m(void 0,!0)):t[f](n,r)},r)}}var v=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((n={get stream(){return this[p]},next:function(){var e=this,t=this[l];if(t!==null)return Promise.reject(t);if(this[u])return Promise.resolve(m(void 0,!0));if(this[p].destroyed)return new Promise(function(t,n){q.nextTick(function(){e[l]?n(e[l]):t(m(void 0,!0))})});var n=this[d],r;if(n)r=new Promise(_(n,this));else{var i=this[p].read();if(i!==null)return Promise.resolve(m(i,!1));r=new Promise(this[f])}return this[d]=r,r}},r(n,Symbol.asyncIterator,function(){return this}),r(n,`return`,function(){var e=this;return new Promise(function(t,n){e[p].destroy(null,function(e){e?n(e):t(m(void 0,!0))})})}),n),v);t.exports=function(e){var t,n=Object.create(y,(t={},r(t,p,{value:e,writable:!0}),r(t,s,{value:null,writable:!0}),r(t,c,{value:null,writable:!0}),r(t,l,{value:null,writable:!0}),r(t,u,{value:e._readableState.endEmitted,writable:!0}),r(t,f,{value:function(e,t){var r=n[p].read();r?(n[d]=null,n[s]=null,n[c]=null,e(m(r,!1))):(n[s]=e,n[c]=t)},writable:!0}),t));return n[d]=null,o(e,function(e){if(e&&e.code!==`ERR_STREAM_PREMATURE_CLOSE`){var t=n[c];t!==null&&(n[d]=null,n[s]=null,n[c]=null,t(e)),n[l]=e}else{var r=n[s];r!==null&&(n[d]=null,n[s]=null,n[c]=null,r(m(void 0,!0))),n[u]=!0}}),e.on(`readable`,g.bind(null,n)),n}})),gt=u(((e,t)=>{t.exports=function(){throw Error(`Readable.from is not available in the browser`)}})),_t=u(((e,t)=>{A(),ne(),t.exports=E;var n;E.ReadableState=T,D().EventEmitter;var r=function(e,t){return e.listeners(t).length},i=re(),a=oe().Buffer,o=(k===void 0?typeof window<`u`?window:typeof self<`u`?self:{}:k).Uint8Array||function(){};function s(e){return a.from(e)}function c(e){return a.isBuffer(e)||e instanceof o}var l=it(),u=l&&l.debuglog?l.debuglog(`stream`):function(){},d=at(),f=ot(),p=ct().getHighWaterMark,m=st().codes,h=m.ERR_INVALID_ARG_TYPE,g=m.ERR_STREAM_PUSH_AFTER_EOF,_=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,y,b,x;O()(E,i);var S=f.errorOrDestroy,C=[`error`,`close`,`destroy`,`pause`,`resume`];function w(e,t,n){if(typeof e.prependListener==`function`)return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}function T(e,t,r){n||=dt(),e||={},typeof r!=`boolean`&&(r=t instanceof n),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,`readableHighWaterMark`,r),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||`utf8`,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(y||=pt().StringDecoder,this.decoder=new y(e.encoding),this.encoding=e.encoding)}function E(e){if(n||=dt(),!(this instanceof E))return new E(e);var t=this instanceof n;this._readableState=new T(e,this,t),this.readable=!0,e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy)),i.call(this)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:typeof e==`string`&&(t||=n.defaultEncoding,t!==n.encoding&&(e=a.from(e,t),t=``),r=!0),j(this,e,t,!1,r)},E.prototype.unshift=function(e){return j(this,e,null,!0,!1)};function j(e,t,n,r,i){u(`readableAddChunk`,t);var o=e._readableState;if(t===null)o.reading=!1,L(e,o);else{var c;if(i||(c=N(o,t)),c)S(e,c);else if(o.objectMode||t&&t.length>0){if(typeof t!=`string`&&!o.objectMode&&Object.getPrototypeOf(t)!==a.prototype&&(t=s(t)),r)o.endEmitted?S(e,new v):M(e,o,t,!0);else if(o.ended)S(e,new g);else if(o.destroyed)return!1;else o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||t.length!==0?M(e,o,t,!1):B(e,o)):M(e,o,t,!1)}else r||(o.reading=!1,B(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function M(e,t,n,r){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit(`data`,n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&R(e)),B(e,t)}function N(e,t){var n;return!c(t)&&typeof t!=`string`&&t!==void 0&&!e.objectMode&&(n=new h(`chunk`,[`string`,`Buffer`,`Uint8Array`],t)),n}E.prototype.isPaused=function(){return this._readableState.flowing===!1},E.prototype.setEncoding=function(e){y||=pt().StringDecoder;var t=new y(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,r=``;n!==null;)r+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),r!==``&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var P=1073741824;function F(e){return e>=P?e=P:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function I(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=F(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}E.prototype.read=function(e){u(`read`,e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark===0?t.length>0:t.length>=t.highWaterMark)||t.ended))return u(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?ie(this):R(this),null;if(e=I(e,t),e===0&&t.ended)return t.length===0&&ie(this),null;var r=t.needReadable;u(`need readable`,r),(t.length===0||t.length-e<t.highWaterMark)&&(r=!0,u(`length less than watermark`,r)),t.ended||t.reading?(r=!1,u(`reading or ended`,r)):r&&(u(`do read`),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(n,t)));var i=e>0?te(e,t):null;return i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&ie(this)),i!==null&&this.emit(`data`,i),i};function L(e,t){if(u(`onEofChunk`),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?R(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,z(e)))}}function R(e){var t=e._readableState;u(`emitReadable`,t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u(`emitReadable`,t.flowing),t.emittedReadable=!0,q.nextTick(z,e))}function z(e){var t=e._readableState;u(`emitReadable_`,t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit(`readable`),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,K(e)}function B(e,t){t.readingMore||(t.readingMore=!0,q.nextTick(V,e,t))}function V(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var n=t.length;if(u(`maybeReadMore read 0`),e.read(0),n===t.length)break}t.readingMore=!1}E.prototype._read=function(e){S(this,new _(`_read()`))},E.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u(`pipe count=%d opts=%j`,i.pipesCount,t);var a=(!t||t.end!==!1)&&e!==q.stdout&&e!==q.stderr?s:g;i.endEmitted?q.nextTick(a):n.once(`end`,a),e.on(`unpipe`,o);function o(e,t){u(`onunpipe`),e===n&&t&&t.hasUnpiped===!1&&(t.hasUnpiped=!0,d())}function s(){u(`onend`),e.end()}var c=H(n);e.on(`drain`,c);var l=!1;function d(){u(`cleanup`),e.removeListener(`close`,m),e.removeListener(`finish`,h),e.removeListener(`drain`,c),e.removeListener(`error`,p),e.removeListener(`unpipe`,o),n.removeListener(`end`,s),n.removeListener(`end`,g),n.removeListener(`data`,f),l=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c()}n.on(`data`,f);function f(t){u(`ondata`);var r=e.write(t);u(`dest.write`,r),r===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&se(i.pipes,e)!==-1)&&!l&&(u(`false write response, pause`,i.awaitDrain),i.awaitDrain++),n.pause())}function p(t){u(`onerror`,t),g(),e.removeListener(`error`,p),r(e,`error`)===0&&S(e,t)}w(e,`error`,p);function m(){e.removeListener(`finish`,h),g()}e.once(`close`,m);function h(){u(`onfinish`),e.removeListener(`close`,m),g()}e.once(`finish`,h);function g(){u(`unpipe`),n.unpipe(e)}return e.emit(`pipe`,n),i.flowing||(u(`pipe resume`),n.resume()),e};function H(e){return function(){var t=e._readableState;u(`pipeOnDrain`,t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&r(e,`data`)&&(t.flowing=!0,K(e))}}E.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes||(e||=t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(`unpipe`,this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit(`unpipe`,this,{hasUnpiped:!1});return this}var o=se(t.pipes,e);return o===-1||(t.pipes.splice(o,1),--t.pipesCount,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit(`unpipe`,this,n)),this},E.prototype.on=function(e,t){var n=i.prototype.on.call(this,e,t),r=this._readableState;return e===`data`?(r.readableListening=this.listenerCount(`readable`)>0,r.flowing!==!1&&this.resume()):e===`readable`&&!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,u(`on readable`,r.length,r.reading),r.length?R(this):r.reading||q.nextTick(W,this)),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=i.prototype.removeListener.call(this,e,t);return e===`readable`&&q.nextTick(U,this),n},E.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return(e===`readable`||e===void 0)&&q.nextTick(U,this),t};function U(e){var t=e._readableState;t.readableListening=e.listenerCount(`readable`)>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount(`data`)>0&&e.resume()}function W(e){u(`readable nexttick read 0`),e.read(0)}E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u(`resume`),e.flowing=!e.readableListening,G(this,e)),e.paused=!1,this};function G(e,t){t.resumeScheduled||(t.resumeScheduled=!0,q.nextTick(ee,e,t))}function ee(e,t){u(`resume`,t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(`resume`),K(e),t.flowing&&!t.reading&&e.read(0)}E.prototype.pause=function(){return u(`call pause flowing=%j`,this._readableState.flowing),this._readableState.flowing!==!1&&(u(`pause`),this._readableState.flowing=!1,this.emit(`pause`)),this._readableState.paused=!0,this};function K(e){var t=e._readableState;for(u(`flow`,t.flowing);t.flowing&&e.read()!==null;);}E.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on(`end`,function(){if(u(`wrapped end`),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on(`data`,function(i){u(`wrapped data`),n.decoder&&(i=n.decoder.write(i)),!(n.objectMode&&i==null)&&(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))}),e)this[i]===void 0&&typeof e[i]==`function`&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<C.length;a++)e.on(C[a],this.emit.bind(this,C[a]));return this._read=function(t){u(`wrapped _read`,t),r&&(r=!1,e.resume())},this},typeof Symbol==`function`&&(E.prototype[Symbol.asyncIterator]=function(){return b===void 0&&(b=ht()),b(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=te,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function te(e,t){if(t.length===0)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n}function ie(e){var t=e._readableState;u(`endReadable`,t.endEmitted),t.endEmitted||(t.ended=!0,q.nextTick(ae,t,e))}function ae(e,t){if(u(`endReadableNT`,e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit(`end`),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}typeof Symbol==`function`&&(E.from=function(e,t){return x===void 0&&(x=gt()),x(E,e,t)});function se(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}})),vt=u(((e,t)=>{t.exports=l;var n=st().codes,r=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,s=dt();O()(l,s);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(r===null)return this.emit(`error`,new i);n.writechunk=null,n.writecb=null,t!=null&&this.push(t),r(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);s.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform==`function`&&(this._transform=e.transform),typeof e.flush==`function`&&(this._flush=e.flush)),this.on(`prefinish`,u)}function u(){var e=this;typeof this._flush==`function`&&!this._readableState.destroyed?this._flush(function(t,n){d(e,t,n)}):d(this,null,null)}l.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,n){n(new r(`_transform()`))},l.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},l.prototype._destroy=function(e,t){s.prototype._destroy.call(this,e,function(e){t(e)})};function d(e,t,n){if(t)return e.emit(`error`,t);if(n!=null&&e.push(n),e._writableState.length)throw new o;if(e._transformState.transforming)throw new a;return e.push(null)}})),yt=u(((e,t)=>{t.exports=r;var n=vt();O()(r,n);function r(e){if(!(this instanceof r))return new r(e);n.call(this,e)}r.prototype._transform=function(e,t,n){n(null,e)}})),bt=u(((e,t)=>{var n;function r(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var i=st().codes,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function c(e){return e.setHeader&&typeof e.abort==`function`}function l(e,t,i,a){a=r(a);var s=!1;e.on(`close`,function(){s=!0}),n===void 0&&(n=mt()),n(e,{readable:t,writable:i},function(e){if(e)return a(e);s=!0,a()});var l=!1;return function(t){if(!s&&!l){if(l=!0,c(e))return e.abort();if(typeof e.destroy==`function`)return e.destroy();a(t||new o(`pipe`))}}}function u(e){e()}function d(e,t){return e.pipe(t)}function f(e){return!e.length||typeof e[e.length-1]!=`function`?s:e.pop()}function p(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=f(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new a(`streams`);var i,o=t.map(function(e,n){var a=n<t.length-1;return l(e,a,n>0,function(e){i||=e,e&&o.forEach(u),!a&&(o.forEach(u),r(i))})});return t.reduce(d)}t.exports=p})),xt=u(((e,t)=>{t.exports=r;var n=D().EventEmitter;O()(r,n),r.Readable=_t(),r.Writable=ut(),r.Duplex=dt(),r.Transform=vt(),r.PassThrough=yt(),r.finished=mt(),r.pipeline=bt(),r.Stream=r;function r(){n.call(this)}r.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}r.on(`data`,i);function a(){r.readable&&r.resume&&r.resume()}e.on(`drain`,a),!e._isStdio&&(!t||t.end!==!1)&&(r.on(`end`,s),r.on(`close`,c));var o=!1;function s(){o||(o=!0,e.end())}function c(){o||(o=!0,typeof e.destroy==`function`&&e.destroy())}function l(e){if(u(),n.listenerCount(this,`error`)===0)throw e}r.on(`error`,l),e.on(`error`,l);function u(){r.removeListener(`data`,i),e.removeListener(`drain`,a),r.removeListener(`end`,s),r.removeListener(`close`,c),r.removeListener(`error`,l),e.removeListener(`error`,l),r.removeListener(`end`,u),r.removeListener(`close`,u),e.removeListener(`close`,u)}return r.on(`end`,u),r.on(`close`,u),e.on(`close`,u),e.emit(`pipe`,r),e}})),St=u((e=>{(function(e){e.parser=function(e,t){return new n(e,t)},e.SAXParser=n,e.SAXStream=l,e.createStream=c,e.MAX_BUFFER_LENGTH=65536;var t=[`comment`,`sgmlDecl`,`textNode`,`tagName`,`doctype`,`procInstName`,`procInstBody`,`entity`,`attribName`,`attribValue`,`cdata`,`script`];e.EVENTS=[`text`,`processinginstruction`,`sgmldeclaration`,`doctype`,`comment`,`opentagstart`,`attribute`,`opentag`,`closetag`,`opencdata`,`cdata`,`closecdata`,`error`,`end`,`ready`,`script`,`opennamespace`,`closenamespace`];function n(t,r){if(!(this instanceof n))return new n(t,r);var a=this;i(a),a.q=a.c=``,a.bufferCheckPosition=e.MAX_BUFFER_LENGTH,a.opt=r||{},a.opt.lowercase=a.opt.lowercase||a.opt.lowercasetags,a.looseCase=a.opt.lowercase?`toLowerCase`:`toUpperCase`,a.tags=[],a.closed=a.closedRoot=a.sawRoot=!1,a.tag=a.error=null,a.strict=!!t,a.noscript=!!(t||a.opt.noscript),a.state=w.BEGIN,a.strictEntities=a.opt.strictEntities,a.ENTITIES=a.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),a.attribList=[],a.opt.xmlns&&(a.ns=Object.create(m)),a.trackPosition=a.opt.position!==!1,a.trackPosition&&(a.position=a.line=a.column=0),E(a,`onready`)}Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t});function r(n){for(var r=Math.max(e.MAX_BUFFER_LENGTH,10),i=0,a=0,o=t.length;a<o;a++){var s=n[t[a]].length;if(s>r)switch(t[a]){case`textNode`:O(n);break;case`cdata`:D(n,`oncdata`,n.cdata),n.cdata=``;break;case`script`:D(n,`onscript`,n.script),n.script=``;break;default:A(n,`Max buffer length exceeded: `+t[a])}i=Math.max(i,s)}n.bufferCheckPosition=e.MAX_BUFFER_LENGTH-i+n.position}function i(e){for(var n=0,r=t.length;n<r;n++)e[t[n]]=``}function a(e){O(e),e.cdata!==``&&(D(e,`oncdata`,e.cdata),e.cdata=``),e.script!==``&&(D(e,`onscript`,e.script),e.script=``)}n.prototype={end:function(){j(this)},write:V,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){a(this)}};var o;try{o=xt().Stream}catch{o=function(){}}var s=e.EVENTS.filter(function(e){return e!==`error`&&e!==`end`});function c(e,t){return new l(e,t)}function l(e,t){if(!(this instanceof l))return new l(e,t);o.apply(this),this._parser=new n(e,t),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit(`end`)},this._parser.onerror=function(e){r.emit(`error`,e),r._parser.error=null},this._decoder=null,s.forEach(function(e){Object.defineProperty(r,`on`+e,{get:function(){return r._parser[`on`+e]},set:function(t){if(!t)return r.removeAllListeners(e),r._parser[`on`+e]=t,t;r.on(e,t)},enumerable:!0,configurable:!1})})}l.prototype=Object.create(o.prototype,{constructor:{value:l}}),l.prototype.write=function(e){if(typeof Buffer==`function`&&typeof Buffer.isBuffer==`function`&&Buffer.isBuffer(e)){if(!this._decoder){var t=pt().StringDecoder;this._decoder=new t(`utf8`)}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit(`data`,e),!0},l.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},l.prototype.on=function(e,t){var n=this;return!n._parser[`on`+e]&&s.indexOf(e)!==-1&&(n._parser[`on`+e]=function(){var t=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),o.prototype.on.call(n,e,t)};var u=`[CDATA[`,d=`DOCTYPE`,f=`http://www.w3.org/XML/1998/namespace`,p=`http://www.w3.org/2000/xmlns/`,m={xml:f,xmlns:p},h=/[:_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]/,g=/[:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,_=/[#:_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]/,v=/[#:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function y(e){return e===` `||e===`
|
|
11
|
+
`||e===`\r`||e===` `}function b(e){return e===`"`||e===`'`}function x(e){return e===`>`||y(e)}function S(e,t){return e.test(t)}function C(e,t){return!S(e,t)}var w=0;for(var T in e.STATE={BEGIN:w++,BEGIN_WHITESPACE:w++,TEXT:w++,TEXT_ENTITY:w++,OPEN_WAKA:w++,SGML_DECL:w++,SGML_DECL_QUOTED:w++,DOCTYPE:w++,DOCTYPE_QUOTED:w++,DOCTYPE_DTD:w++,DOCTYPE_DTD_QUOTED:w++,COMMENT_STARTING:w++,COMMENT:w++,COMMENT_ENDING:w++,COMMENT_ENDED:w++,CDATA:w++,CDATA_ENDING:w++,CDATA_ENDING_2:w++,PROC_INST:w++,PROC_INST_BODY:w++,PROC_INST_ENDING:w++,OPEN_TAG:w++,OPEN_TAG_SLASH:w++,ATTRIB:w++,ATTRIB_NAME:w++,ATTRIB_NAME_SAW_WHITE:w++,ATTRIB_VALUE:w++,ATTRIB_VALUE_QUOTED:w++,ATTRIB_VALUE_CLOSED:w++,ATTRIB_VALUE_UNQUOTED:w++,ATTRIB_VALUE_ENTITY_Q:w++,ATTRIB_VALUE_ENTITY_U:w++,CLOSE_TAG:w++,CLOSE_TAG_SAW_WHITE:w++,SCRIPT:w++,SCRIPT_ENDING:w++},e.XML_ENTITIES={amp:`&`,gt:`>`,lt:`<`,quot:`"`,apos:`'`},e.ENTITIES={amp:`&`,gt:`>`,lt:`<`,quot:`"`,apos:`'`,AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(t){var n=e.ENTITIES[t],r=typeof n==`number`?String.fromCharCode(n):n;e.ENTITIES[t]=r}),e.STATE)e.STATE[e.STATE[T]]=T;w=e.STATE;function E(e,t,n){e[t]&&e[t](n)}function D(e,t,n){e.textNode&&O(e),E(e,t,n)}function O(e){e.textNode=k(e.opt,e.textNode),e.textNode&&E(e,`ontext`,e.textNode),e.textNode=``}function k(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g,` `)),t}function A(e,t){return O(e),e.trackPosition&&(t+=`
|
|
12
|
+
Line: `+e.line+`
|
|
13
|
+
Column: `+e.column+`
|
|
14
|
+
Char: `+e.c),t=Error(t),e.error=t,E(e,`onerror`,t),e}function j(e){return e.sawRoot&&!e.closedRoot&&M(e,`Unclosed root tag`),e.state!==w.BEGIN&&e.state!==w.BEGIN_WHITESPACE&&e.state!==w.TEXT&&A(e,`Unexpected end`),O(e),e.c=``,e.closed=!0,E(e,`onend`),n.call(e,e.strict,e.opt),e}function M(e,t){if(typeof e!=`object`||!(e instanceof n))throw Error(`bad call to strictFail`);e.strict&&A(e,t)}function N(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,D(e,`onopentagstart`,n)}function P(e,t){var n=e.indexOf(`:`)<0?[``,e]:e.split(`:`),r=n[0],i=n[1];return t&&e===`xmlns`&&(r=`xmlns`,i=``),{prefix:r,local:i}}function F(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),e.attribList.indexOf(e.attribName)!==-1||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue=``;else{if(e.opt.xmlns){var t=P(e.attribName,!0),n=t.prefix,r=t.local;if(n===`xmlns`){if(r===`xml`&&e.attribValue!==f)M(e,`xml: prefix must be bound to `+f+`
|
|
15
|
+
Actual: `+e.attribValue);else if(r===`xmlns`&&e.attribValue!==p)M(e,`xmlns: prefix must be bound to `+p+`
|
|
16
|
+
Actual: `+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[r]=e.attribValue}}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,D(e,`onattribute`,{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=``}}function I(e,t){if(e.opt.xmlns){var n=e.tag,r=P(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||``,n.prefix&&!n.uri&&(M(e,`Unbound namespace prefix: `+JSON.stringify(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach(function(t){D(e,`onopennamespace`,{prefix:t,uri:n.ns[t]})});for(var a=0,o=e.attribList.length;a<o;a++){var s=e.attribList[a],c=s[0],l=s[1],u=P(c,!0),d=u.prefix,f=u.local,p=d===``?``:n.ns[d]||``,m={name:c,value:l,prefix:d,local:f,uri:p};d&&d!==`xmlns`&&!p&&(M(e,`Unbound namespace prefix: `+JSON.stringify(d)),m.uri=d),e.tag.attributes[c]=m,D(e,`onattribute`,m)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),D(e,`onopentag`,e.tag),t||(e.state=!e.noscript&&e.tagName.toLowerCase()===`script`?w.SCRIPT:w.TEXT,e.tag=null,e.tagName=``),e.attribName=e.attribValue=``,e.attribList.length=0}function L(e){if(!e.tagName)M(e,`Weird empty close tag.`),e.textNode+=`</>`,e.state=w.TEXT;else{if(e.script){if(e.tagName!==`script`){e.script+=`</`+e.tagName+`>`,e.tagName=``,e.state=w.SCRIPT;return}D(e,`onscript`,e.script),e.script=``}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--&&e.tags[t].name!==r;)M(e,`Unexpected close tag`);if(t<0)M(e,`Unmatched closing tag: `+e.tagName),e.textNode+=`</`+e.tagName+`>`,e.state=w.TEXT;else{e.tagName=n;for(var i=e.tags.length;i-->t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,D(e,`onclosetag`,e.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==c.ns&&Object.keys(a.ns).forEach(function(t){var n=a.ns[t];D(e,`onclosenamespace`,{prefix:t,uri:n})})}t===0&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName=``,e.attribList.length=0,e.state=w.TEXT}}}function R(e){var t=e.entity,n=t.toLowerCase(),r,i=``;return e.ENTITIES[t]?e.ENTITIES[t]:e.ENTITIES[n]?e.ENTITIES[n]:(t=n,t.charAt(0)===`#`&&(t.charAt(1)===`x`?(t=t.slice(2),r=parseInt(t,16),i=r.toString(16)):(t=t.slice(1),r=parseInt(t,10),i=r.toString(10))),t=t.replace(/^0+/,``),isNaN(r)||i.toLowerCase()!==t?(M(e,`Invalid character entity`),`&`+e.entity+`;`):String.fromCodePoint(r))}function z(e,t){t===`<`?(e.state=w.OPEN_WAKA,e.startTagPosition=e.position):y(t)||(M(e,`Non-whitespace before first tag.`),e.textNode=t,e.state=w.TEXT)}function B(e,t){var n=``;return t<e.length&&(n=e.charAt(t)),n}function V(e){var t=this;if(this.error)throw this.error;if(t.closed)return A(t,`Cannot write after close. Assign an onready handler.`);if(e===null)return j(t);typeof e==`object`&&(e=e.toString());for(var n=0,i=``;i=B(e,n++),t.c=i,i;)switch(t.trackPosition&&(t.position++,i===`
|
|
17
|
+
`?(t.line++,t.column=0):t.column++),t.state){case w.BEGIN:if(t.state=w.BEGIN_WHITESPACE,i===``)continue;z(t,i);continue;case w.BEGIN_WHITESPACE:z(t,i);continue;case w.TEXT:if(t.sawRoot&&!t.closedRoot){for(var a=n-1;i&&i!==`<`&&i!==`&`;)i=B(e,n++),i&&t.trackPosition&&(t.position++,i===`
|
|
18
|
+
`?(t.line++,t.column=0):t.column++);t.textNode+=e.substring(a,n-1)}i===`<`&&!(t.sawRoot&&t.closedRoot&&!t.strict)?(t.state=w.OPEN_WAKA,t.startTagPosition=t.position):(!y(i)&&(!t.sawRoot||t.closedRoot)&&M(t,`Text data outside of root node.`),i===`&`?t.state=w.TEXT_ENTITY:t.textNode+=i);continue;case w.SCRIPT:i===`<`?t.state=w.SCRIPT_ENDING:t.script+=i;continue;case w.SCRIPT_ENDING:i===`/`?t.state=w.CLOSE_TAG:(t.script+=`<`+i,t.state=w.SCRIPT);continue;case w.OPEN_WAKA:if(i===`!`)t.state=w.SGML_DECL,t.sgmlDecl=``;else if(!y(i)){if(S(h,i))t.state=w.OPEN_TAG,t.tagName=i;else if(i===`/`)t.state=w.CLOSE_TAG,t.tagName=``;else if(i===`?`)t.state=w.PROC_INST,t.procInstName=t.procInstBody=``;else{if(M(t,`Unencoded <`),t.startTagPosition+1<t.position){var o=t.position-t.startTagPosition;i=Array(o).join(` `)+i}t.textNode+=`<`+i,t.state=w.TEXT}}continue;case w.SGML_DECL:(t.sgmlDecl+i).toUpperCase()===u?(D(t,`onopencdata`),t.state=w.CDATA,t.sgmlDecl=``,t.cdata=``):t.sgmlDecl+i===`--`?(t.state=w.COMMENT,t.comment=``,t.sgmlDecl=``):(t.sgmlDecl+i).toUpperCase()===d?(t.state=w.DOCTYPE,(t.doctype||t.sawRoot)&&M(t,`Inappropriately located doctype declaration`),t.doctype=``,t.sgmlDecl=``):i===`>`?(D(t,`onsgmldeclaration`,t.sgmlDecl),t.sgmlDecl=``,t.state=w.TEXT):(b(i)&&(t.state=w.SGML_DECL_QUOTED),t.sgmlDecl+=i);continue;case w.SGML_DECL_QUOTED:i===t.q&&(t.state=w.SGML_DECL,t.q=``),t.sgmlDecl+=i;continue;case w.DOCTYPE:i===`>`?(t.state=w.TEXT,D(t,`ondoctype`,t.doctype),t.doctype=!0):(t.doctype+=i,i===`[`?t.state=w.DOCTYPE_DTD:b(i)&&(t.state=w.DOCTYPE_QUOTED,t.q=i));continue;case w.DOCTYPE_QUOTED:t.doctype+=i,i===t.q&&(t.q=``,t.state=w.DOCTYPE);continue;case w.DOCTYPE_DTD:t.doctype+=i,i===`]`?t.state=w.DOCTYPE:b(i)&&(t.state=w.DOCTYPE_DTD_QUOTED,t.q=i);continue;case w.DOCTYPE_DTD_QUOTED:t.doctype+=i,i===t.q&&(t.state=w.DOCTYPE_DTD,t.q=``);continue;case w.COMMENT:i===`-`?t.state=w.COMMENT_ENDING:t.comment+=i;continue;case w.COMMENT_ENDING:i===`-`?(t.state=w.COMMENT_ENDED,t.comment=k(t.opt,t.comment),t.comment&&D(t,`oncomment`,t.comment),t.comment=``):(t.comment+=`-`+i,t.state=w.COMMENT);continue;case w.COMMENT_ENDED:i===`>`?t.state=w.TEXT:(M(t,`Malformed comment`),t.comment+=`--`+i,t.state=w.COMMENT);continue;case w.CDATA:i===`]`?t.state=w.CDATA_ENDING:t.cdata+=i;continue;case w.CDATA_ENDING:i===`]`?t.state=w.CDATA_ENDING_2:(t.cdata+=`]`+i,t.state=w.CDATA);continue;case w.CDATA_ENDING_2:i===`>`?(t.cdata&&D(t,`oncdata`,t.cdata),D(t,`onclosecdata`),t.cdata=``,t.state=w.TEXT):i===`]`?t.cdata+=`]`:(t.cdata+=`]]`+i,t.state=w.CDATA);continue;case w.PROC_INST:i===`?`?t.state=w.PROC_INST_ENDING:y(i)?t.state=w.PROC_INST_BODY:t.procInstName+=i;continue;case w.PROC_INST_BODY:if(!t.procInstBody&&y(i))continue;i===`?`?t.state=w.PROC_INST_ENDING:t.procInstBody+=i;continue;case w.PROC_INST_ENDING:i===`>`?(D(t,`onprocessinginstruction`,{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody=``,t.state=w.TEXT):(t.procInstBody+=`?`+i,t.state=w.PROC_INST_BODY);continue;case w.OPEN_TAG:S(g,i)?t.tagName+=i:(N(t),i===`>`?I(t):i===`/`?t.state=w.OPEN_TAG_SLASH:(y(i)||M(t,`Invalid character in tag name`),t.state=w.ATTRIB));continue;case w.OPEN_TAG_SLASH:i===`>`?(I(t,!0),L(t)):(M(t,`Forward-slash in opening tag not followed by >`),t.state=w.ATTRIB);continue;case w.ATTRIB:if(y(i))continue;i===`>`?I(t):i===`/`?t.state=w.OPEN_TAG_SLASH:S(h,i)?(t.attribName=i,t.attribValue=``,t.state=w.ATTRIB_NAME):M(t,`Invalid attribute name`);continue;case w.ATTRIB_NAME:i===`=`?t.state=w.ATTRIB_VALUE:i===`>`?(M(t,`Attribute without value`),t.attribValue=t.attribName,F(t),I(t)):y(i)?t.state=w.ATTRIB_NAME_SAW_WHITE:S(g,i)?t.attribName+=i:M(t,`Invalid attribute name`);continue;case w.ATTRIB_NAME_SAW_WHITE:if(i===`=`)t.state=w.ATTRIB_VALUE;else if(y(i))continue;else M(t,`Attribute without value`),t.tag.attributes[t.attribName]=``,t.attribValue=``,D(t,`onattribute`,{name:t.attribName,value:``}),t.attribName=``,i===`>`?I(t):S(h,i)?(t.attribName=i,t.state=w.ATTRIB_NAME):(M(t,`Invalid attribute name`),t.state=w.ATTRIB);continue;case w.ATTRIB_VALUE:if(y(i))continue;b(i)?(t.q=i,t.state=w.ATTRIB_VALUE_QUOTED):(M(t,`Unquoted attribute value`),t.state=w.ATTRIB_VALUE_UNQUOTED,t.attribValue=i);continue;case w.ATTRIB_VALUE_QUOTED:if(i!==t.q){i===`&`?t.state=w.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=i;continue}F(t),t.q=``,t.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:y(i)?t.state=w.ATTRIB:i===`>`?I(t):i===`/`?t.state=w.OPEN_TAG_SLASH:S(h,i)?(M(t,`No whitespace between attributes`),t.attribName=i,t.attribValue=``,t.state=w.ATTRIB_NAME):M(t,`Invalid attribute name`);continue;case w.ATTRIB_VALUE_UNQUOTED:if(!x(i)){i===`&`?t.state=w.ATTRIB_VALUE_ENTITY_U:t.attribValue+=i;continue}F(t),i===`>`?I(t):t.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(t.tagName)i===`>`?L(t):S(g,i)?t.tagName+=i:t.script?(t.script+=`</`+t.tagName,t.tagName=``,t.state=w.SCRIPT):(y(i)||M(t,`Invalid tagname in closing tag`),t.state=w.CLOSE_TAG_SAW_WHITE);else{if(y(i))continue;C(h,i)?t.script?(t.script+=`</`+i,t.state=w.SCRIPT):M(t,`Invalid tagname in closing tag.`):t.tagName=i}continue;case w.CLOSE_TAG_SAW_WHITE:if(y(i))continue;i===`>`?L(t):M(t,`Invalid characters in closing tag`);continue;case w.TEXT_ENTITY:case w.ATTRIB_VALUE_ENTITY_Q:case w.ATTRIB_VALUE_ENTITY_U:var s,c;switch(t.state){case w.TEXT_ENTITY:s=w.TEXT,c=`textNode`;break;case w.ATTRIB_VALUE_ENTITY_Q:s=w.ATTRIB_VALUE_QUOTED,c=`attribValue`;break;case w.ATTRIB_VALUE_ENTITY_U:s=w.ATTRIB_VALUE_UNQUOTED,c=`attribValue`}i===`;`?(t[c]+=R(t),t.entity=``,t.state=s):S(t.entity.length?v:_,i)?t.entity+=i:(M(t,`Invalid character in entity name`),t[c]+=`&`+t.entity+i,t.entity=``,t.state=s);continue;default:throw Error(t,`Unknown state: `+t.state)}return t.position>=t.bufferCheckPosition&&r(t),t}String.fromCodePoint||(function(){var e=String.fromCharCode,t=Math.floor,n=function(){var n=16384,r=[],i,a,o=-1,s=arguments.length;if(!s)return``;for(var c=``;++o<s;){var l=Number(arguments[o]);if(!isFinite(l)||l<0||l>1114111||t(l)!==l)throw RangeError(`Invalid code point: `+l);l<=65535?r.push(l):(l-=65536,i=(l>>10)+55296,a=l%1024+56320,r.push(i,a)),(o+1===s||r.length>n)&&(c+=e.apply(null,r),r.length=0)}return c};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:n,configurable:!0,writable:!0}):String.fromCodePoint=n})()})(e===void 0?e.sax={}:e)})),Ct=u(((e,t)=>{t.exports={isArray:function(e){return Array.isArray?Array.isArray(e):Object.prototype.toString.call(e)===`[object Array]`}}})),wt=u(((e,t)=>{var n=Ct().isArray;t.exports={copyOptions:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n},ensureFlagExists:function(e,t){(!(e in t)||typeof t[e]!=`boolean`)&&(t[e]=!1)},ensureSpacesExists:function(e){(!(`spaces`in e)||typeof e.spaces!=`number`&&typeof e.spaces!=`string`)&&(e.spaces=0)},ensureAlwaysArrayExists:function(e){(!(`alwaysArray`in e)||typeof e.alwaysArray!=`boolean`&&!n(e.alwaysArray))&&(e.alwaysArray=!1)},ensureKeyExists:function(e,t){(!(e+`Key`in t)||typeof t[e+`Key`]!=`string`)&&(t[e+`Key`]=t.compact?`_`+e:e)},checkFnExists:function(e,t){return e+`Fn`in t}}})),Tt=u(((e,t)=>{var n=St(),r={on:function(){},parse:function(){}},i=wt(),a=Ct().isArray,o,s=!0,c;function l(e){return o=i.copyOptions(e),i.ensureFlagExists(`ignoreDeclaration`,o),i.ensureFlagExists(`ignoreInstruction`,o),i.ensureFlagExists(`ignoreAttributes`,o),i.ensureFlagExists(`ignoreText`,o),i.ensureFlagExists(`ignoreComment`,o),i.ensureFlagExists(`ignoreCdata`,o),i.ensureFlagExists(`ignoreDoctype`,o),i.ensureFlagExists(`compact`,o),i.ensureFlagExists(`alwaysChildren`,o),i.ensureFlagExists(`addParent`,o),i.ensureFlagExists(`trim`,o),i.ensureFlagExists(`nativeType`,o),i.ensureFlagExists(`nativeTypeAttributes`,o),i.ensureFlagExists(`sanitize`,o),i.ensureFlagExists(`instructionHasAttributes`,o),i.ensureFlagExists(`captureSpacesBetweenElements`,o),i.ensureAlwaysArrayExists(o),i.ensureKeyExists(`declaration`,o),i.ensureKeyExists(`instruction`,o),i.ensureKeyExists(`attributes`,o),i.ensureKeyExists(`text`,o),i.ensureKeyExists(`comment`,o),i.ensureKeyExists(`cdata`,o),i.ensureKeyExists(`doctype`,o),i.ensureKeyExists(`type`,o),i.ensureKeyExists(`name`,o),i.ensureKeyExists(`elements`,o),i.ensureKeyExists(`parent`,o),i.checkFnExists(`doctype`,o),i.checkFnExists(`instruction`,o),i.checkFnExists(`cdata`,o),i.checkFnExists(`comment`,o),i.checkFnExists(`text`,o),i.checkFnExists(`instructionName`,o),i.checkFnExists(`elementName`,o),i.checkFnExists(`attributeName`,o),i.checkFnExists(`attributeValue`,o),i.checkFnExists(`attributes`,o),o}function u(e){var t=Number(e);if(!isNaN(t))return t;var n=e.toLowerCase();return n===`true`||n!==`false`&&e}function d(e,t){var n;if(o.compact){if(!c[o[e+`Key`]]&&(a(o.alwaysArray)?o.alwaysArray.indexOf(o[e+`Key`])!==-1:o.alwaysArray)&&(c[o[e+`Key`]]=[]),c[o[e+`Key`]]&&!a(c[o[e+`Key`]])&&(c[o[e+`Key`]]=[c[o[e+`Key`]]]),e+`Fn`in o&&typeof t==`string`&&(t=o[e+`Fn`](t,c)),e===`instruction`&&(`instructionFn`in o||`instructionNameFn`in o)){for(n in t)if(t.hasOwnProperty(n)){if(`instructionFn`in o)t[n]=o.instructionFn(t[n],n,c);else{var r=t[n];delete t[n],t[o.instructionNameFn(n,r,c)]=r}}}a(c[o[e+`Key`]])?c[o[e+`Key`]].push(t):c[o[e+`Key`]]=t}else{c[o.elementsKey]||(c[o.elementsKey]=[]);var i={};if(i[o.typeKey]=e,e===`instruction`){for(n in t)if(t.hasOwnProperty(n))break;i[o.nameKey]=`instructionNameFn`in o?o.instructionNameFn(n,t,c):n,o.instructionHasAttributes?(i[o.attributesKey]=t[n][o.attributesKey],`instructionFn`in o&&(i[o.attributesKey]=o.instructionFn(i[o.attributesKey],n,c))):(`instructionFn`in o&&(t[n]=o.instructionFn(t[n],n,c)),i[o.instructionKey]=t[n])}else e+`Fn`in o&&(t=o[e+`Fn`](t,c)),i[o[e+`Key`]]=t;o.addParent&&(i[o.parentKey]=c),c[o.elementsKey].push(i)}}function f(e){if(`attributesFn`in o&&e&&(e=o.attributesFn(e,c)),(o.trim||`attributeValueFn`in o||`attributeNameFn`in o||o.nativeTypeAttributes)&&e){for(var t in e)if(e.hasOwnProperty(t)&&(o.trim&&(e[t]=e[t].trim()),o.nativeTypeAttributes&&(e[t]=u(e[t])),`attributeValueFn`in o&&(e[t]=o.attributeValueFn(e[t],t,c)),`attributeNameFn`in o)){var n=e[t];delete e[t],e[o.attributeNameFn(t,e[t],c)]=n}}return e}function p(e){var t={};if(e.body&&(e.name.toLowerCase()===`xml`||o.instructionHasAttributes)){for(var n=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,r;(r=n.exec(e.body))!==null;)t[r[1]]=r[2]||r[3]||r[4];t=f(t)}if(e.name.toLowerCase()===`xml`){if(o.ignoreDeclaration)return;c[o.declarationKey]={},Object.keys(t).length&&(c[o.declarationKey][o.attributesKey]=t),o.addParent&&(c[o.declarationKey][o.parentKey]=c)}else{if(o.ignoreInstruction)return;o.trim&&(e.body=e.body.trim());var i={};o.instructionHasAttributes&&Object.keys(t).length?(i[e.name]={},i[e.name][o.attributesKey]=t):i[e.name]=e.body,d(`instruction`,i)}}function m(e,t){var n;if(typeof e==`object`&&(t=e.attributes,e=e.name),t=f(t),`elementNameFn`in o&&(e=o.elementNameFn(e,c)),o.compact){if(n={},!o.ignoreAttributes&&t&&Object.keys(t).length)for(var r in n[o.attributesKey]={},t)t.hasOwnProperty(r)&&(n[o.attributesKey][r]=t[r]);!(e in c)&&(a(o.alwaysArray)?o.alwaysArray.indexOf(e)!==-1:o.alwaysArray)&&(c[e]=[]),c[e]&&!a(c[e])&&(c[e]=[c[e]]),a(c[e])?c[e].push(n):c[e]=n}else c[o.elementsKey]||(c[o.elementsKey]=[]),n={},n[o.typeKey]=`element`,n[o.nameKey]=e,!o.ignoreAttributes&&t&&Object.keys(t).length&&(n[o.attributesKey]=t),o.alwaysChildren&&(n[o.elementsKey]=[]),c[o.elementsKey].push(n);n[o.parentKey]=c,c=n}function h(e){o.ignoreText||(e.trim()||o.captureSpacesBetweenElements)&&(o.trim&&(e=e.trim()),o.nativeType&&(e=u(e)),o.sanitize&&(e=e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)),d(`text`,e))}function g(e){o.ignoreComment||(o.trim&&(e=e.trim()),d(`comment`,e))}function _(e){var t=c[o.parentKey];o.addParent||delete c[o.parentKey],c=t}function v(e){o.ignoreCdata||(o.trim&&(e=e.trim()),d(`cdata`,e))}function y(e){o.ignoreDoctype||(e=e.replace(/^ /,``),o.trim&&(e=e.trim()),d(`doctype`,e))}function b(e){e.note=e}t.exports=function(e,t){var i=s?n.parser(!0,{}):i=new r.Parser(`UTF-8`),a={};if(c=a,o=l(t),s?(i.opt={strictEntities:!0},i.onopentag=m,i.ontext=h,i.oncomment=g,i.onclosetag=_,i.onerror=b,i.oncdata=v,i.ondoctype=y,i.onprocessinginstruction=p):(i.on(`startElement`,m),i.on(`text`,h),i.on(`comment`,g),i.on(`endElement`,_),i.on(`error`,b)),s)i.write(e).close();else if(!i.parse(e))throw Error(`XML parsing error: `+i.getError());if(a[o.elementsKey]){var u=a[o.elementsKey];delete a[o.elementsKey],a[o.elementsKey]=u,delete a.text}return a}})),Et=u(((e,t)=>{var n=wt(),r=Tt();function i(e){var t=n.copyOptions(e);return n.ensureSpacesExists(t),t}t.exports=function(e,t){var n=i(t),a=r(e,n),o,s=`compact`in n&&n.compact?`_parent`:`parent`;return o=`addParent`in n&&n.addParent?JSON.stringify(a,function(e,t){return e===s?`_`:t},n.spaces):JSON.stringify(a,null,n.spaces),o.replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}})),Dt=u(((e,t)=>{var n=wt(),r=Ct().isArray,i,a;function o(e){var t=n.copyOptions(e);return n.ensureFlagExists(`ignoreDeclaration`,t),n.ensureFlagExists(`ignoreInstruction`,t),n.ensureFlagExists(`ignoreAttributes`,t),n.ensureFlagExists(`ignoreText`,t),n.ensureFlagExists(`ignoreComment`,t),n.ensureFlagExists(`ignoreCdata`,t),n.ensureFlagExists(`ignoreDoctype`,t),n.ensureFlagExists(`compact`,t),n.ensureFlagExists(`indentText`,t),n.ensureFlagExists(`indentCdata`,t),n.ensureFlagExists(`indentAttributes`,t),n.ensureFlagExists(`indentInstruction`,t),n.ensureFlagExists(`fullTagEmptyElement`,t),n.ensureFlagExists(`noQuotesForNativeAttributes`,t),n.ensureSpacesExists(t),typeof t.spaces==`number`&&(t.spaces=Array(t.spaces+1).join(` `)),n.ensureKeyExists(`declaration`,t),n.ensureKeyExists(`instruction`,t),n.ensureKeyExists(`attributes`,t),n.ensureKeyExists(`text`,t),n.ensureKeyExists(`comment`,t),n.ensureKeyExists(`cdata`,t),n.ensureKeyExists(`doctype`,t),n.ensureKeyExists(`type`,t),n.ensureKeyExists(`name`,t),n.ensureKeyExists(`elements`,t),n.checkFnExists(`doctype`,t),n.checkFnExists(`instruction`,t),n.checkFnExists(`cdata`,t),n.checkFnExists(`comment`,t),n.checkFnExists(`text`,t),n.checkFnExists(`instructionName`,t),n.checkFnExists(`elementName`,t),n.checkFnExists(`attributeName`,t),n.checkFnExists(`attributeValue`,t),n.checkFnExists(`attributes`,t),n.checkFnExists(`fullTagEmptyElement`,t),t}function s(e,t,n){return(!n&&e.spaces?`
|
|
19
|
+
`:``)+Array(t+1).join(e.spaces)}function c(e,t,n){if(t.ignoreAttributes)return``;`attributesFn`in t&&(e=t.attributesFn(e,a,i));var r,o,c,l,u=[];for(r in e)e.hasOwnProperty(r)&&e[r]!==null&&e[r]!==void 0&&(l=t.noQuotesForNativeAttributes&&typeof e[r]!=`string`?``:`"`,o=``+e[r],o=o.replace(/"/g,`"`),c=`attributeNameFn`in t?t.attributeNameFn(r,o,a,i):r,u.push(t.spaces&&t.indentAttributes?s(t,n+1,!1):` `),u.push(c+`=`+l+(`attributeValueFn`in t?t.attributeValueFn(o,r,a,i):o)+l));return e&&Object.keys(e).length&&t.spaces&&t.indentAttributes&&u.push(s(t,n,!1)),u.join(``)}function l(e,t,n){return i=e,a=`xml`,t.ignoreDeclaration?``:`<?xml`+c(e[t.attributesKey],t,n)+`?>`}function u(e,t,n){if(t.ignoreInstruction)return``;for(var r in e)if(e.hasOwnProperty(r))break;var o=`instructionNameFn`in t?t.instructionNameFn(r,e[r],a,i):r;if(typeof e[r]==`object`)return i=e,a=o,`<?`+o+c(e[r][t.attributesKey],t,n)+`?>`;var s=e[r]?e[r]:``;return`instructionFn`in t&&(s=t.instructionFn(s,r,a,i)),`<?`+o+(s?` `+s:``)+`?>`}function d(e,t){return t.ignoreComment?``:`<!--`+(`commentFn`in t?t.commentFn(e,a,i):e)+`-->`}function f(e,t){return t.ignoreCdata?``:`<![CDATA[`+(`cdataFn`in t?t.cdataFn(e,a,i):e.replace(`]]>`,`]]]]><![CDATA[>`))+`]]>`}function p(e,t){return t.ignoreDoctype?``:`<!DOCTYPE `+(`doctypeFn`in t?t.doctypeFn(e,a,i):e)+`>`}function m(e,t){return t.ignoreText?``:(e=``+e,e=e.replace(/&/g,`&`),e=e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),`textFn`in t?t.textFn(e,a,i):e)}function h(e,t){var n;if(e.elements&&e.elements.length)for(n=0;n<e.elements.length;++n)switch(e.elements[n][t.typeKey]){case`text`:if(t.indentText)return!0;break;case`cdata`:if(t.indentCdata)return!0;break;case`instruction`:if(t.indentInstruction)return!0;break;case`doctype`:case`comment`:case`element`:return!0;default:return!0}return!1}function g(e,t,n){i=e,a=e.name;var r=[],o=`elementNameFn`in t?t.elementNameFn(e.name,e):e.name;r.push(`<`+o),e[t.attributesKey]&&r.push(c(e[t.attributesKey],t,n));var s=e[t.elementsKey]&&e[t.elementsKey].length||e[t.attributesKey]&&e[t.attributesKey][`xml:space`]===`preserve`;return s||=`fullTagEmptyElementFn`in t?t.fullTagEmptyElementFn(e.name,e):t.fullTagEmptyElement,s?(r.push(`>`),e[t.elementsKey]&&e[t.elementsKey].length&&(r.push(_(e[t.elementsKey],t,n+1)),i=e,a=e.name),r.push(t.spaces&&h(e,t)?`
|
|
20
|
+
`+Array(n+1).join(t.spaces):``),r.push(`</`+o+`>`)):r.push(`/>`),r.join(``)}function _(e,t,n,r){return e.reduce(function(e,i){var a=s(t,n,r&&!e);switch(i.type){case`element`:return e+a+g(i,t,n);case`comment`:return e+a+d(i[t.commentKey],t);case`doctype`:return e+a+p(i[t.doctypeKey],t);case`cdata`:return e+(t.indentCdata?a:``)+f(i[t.cdataKey],t);case`text`:return e+(t.indentText?a:``)+m(i[t.textKey],t);case`instruction`:var o={};return o[i[t.nameKey]]=i[t.attributesKey]?i:i[t.instructionKey],e+(t.indentInstruction?a:``)+u(o,t,n)}},``)}function v(e,t,n){for(var r in e)if(e.hasOwnProperty(r))switch(r){case t.parentKey:case t.attributesKey:break;case t.textKey:if(t.indentText||n)return!0;break;case t.cdataKey:if(t.indentCdata||n)return!0;break;case t.instructionKey:if(t.indentInstruction||n)return!0;break;case t.doctypeKey:case t.commentKey:return!0;default:return!0}return!1}function y(e,t,n,r,o){i=e,a=t;var l=`elementNameFn`in n?n.elementNameFn(t,e):t;if(e==null||e===``)return`fullTagEmptyElementFn`in n&&n.fullTagEmptyElementFn(t,e)||n.fullTagEmptyElement?`<`+l+`></`+l+`>`:`<`+l+`/>`;var u=[];if(t){if(u.push(`<`+l),typeof e!=`object`)return u.push(`>`+m(e,n)+`</`+l+`>`),u.join(``);e[n.attributesKey]&&u.push(c(e[n.attributesKey],n,r));var d=v(e,n,!0)||e[n.attributesKey]&&e[n.attributesKey][`xml:space`]===`preserve`;if(d||=`fullTagEmptyElementFn`in n?n.fullTagEmptyElementFn(t,e):n.fullTagEmptyElement,d)u.push(`>`);else return u.push(`/>`),u.join(``)}return u.push(b(e,n,r+1,!1)),i=e,a=t,t&&u.push((o?s(n,r,!1):``)+`</`+l+`>`),u.join(``)}function b(e,t,n,i){var a,o,c,h=[];for(o in e)if(e.hasOwnProperty(o))for(c=r(e[o])?e[o]:[e[o]],a=0;a<c.length;++a){switch(o){case t.declarationKey:h.push(l(c[a],t,n));break;case t.instructionKey:h.push((t.indentInstruction?s(t,n,i):``)+u(c[a],t,n));break;case t.attributesKey:case t.parentKey:break;case t.textKey:h.push((t.indentText?s(t,n,i):``)+m(c[a],t));break;case t.cdataKey:h.push((t.indentCdata?s(t,n,i):``)+f(c[a],t));break;case t.doctypeKey:h.push(s(t,n,i)+p(c[a],t));break;case t.commentKey:h.push(s(t,n,i)+d(c[a],t));break;default:h.push(s(t,n,i)+y(c[a],o,t,n,v(c[a],t)))}i&&=!h.length}return h.join(``)}t.exports=function(e,t){t=o(t);var n=[];return i=e,a=`_root_`,t.compact?n.push(b(e,t,0,!0)):(e[t.declarationKey]&&n.push(l(e[t.declarationKey],t,0)),e[t.elementsKey]&&e[t.elementsKey].length&&n.push(_(e[t.elementsKey],t,0,!n.length))),n.join(``)}})),Ot=u(((e,t)=>{var n=Dt();t.exports=function(e,t){e instanceof Buffer&&(e=e.toString());var r=null;if(typeof e==`string`)try{r=JSON.parse(e)}catch{throw Error(`The JSON structure is invalid`)}else r=e;return n(r,t)}})),kt=u(((e,t)=>{t.exports={xml2js:Tt(),xml2json:Et(),js2xml:Dt(),json2xml:Ot()}}))(),At=e=>{switch(e.type){case void 0:case`element`:let t=new Mt(e.name,e.attributes),n=e.elements||[];for(let e of n){let n=At(e);n!==void 0&&t.push(n)}return t;case`text`:return e.text;default:return}},jt=class extends w{},Mt=class extends b{static fromXmlString(e){return At((0,kt.xml2js)(e,{compact:!1}))}constructor(e,t){super(e),t&&this.root.push(new jt(t))}push(e){this.root.push(e)}},Nt=class extends b{constructor(e){super(``),_(this,`_attr`,void 0),this._attr=e}prepForXml(e){return{_attr:this._attr}}},Pt=class extends b{constructor(e,t){super(e),t&&(this.root=t.root)}},J=e=>{if(isNaN(e))throw Error(`Invalid value '${e}' specified. Must be an integer.`);return Math.floor(e)},Ft=e=>{let t=J(e);if(t<0)throw Error(`Invalid value '${e}' specified. Must be a positive integer.`);return t},It=(e,t)=>{let n=t*2;if(e.length!==n||isNaN(Number(`0x${e}`)))throw Error(`Invalid hex value '${e}'. Expected ${n} digit hex value`);return e},Lt=e=>It(e,1),Rt=e=>{let t=e.slice(-2),n=e.substring(0,e.length-2);return`${Number(n)}${t}`},zt={in:1440,cm:1440/2.54,mm:1440/25.4,pt:20,pc:240,pi:240},Bt=e=>{if(typeof e==`number`)return e;let t=e.slice(-2),n=Number(e.substring(0,e.length-2)),r=zt[t];if(r===void 0||Number.isNaN(n))throw Error(`Invalid universal measure '${e}'. Expected a number followed by mm, cm, in, pt, pc or pi.`);return n*r},Vt=e=>{let t=Rt(e);if(parseFloat(t)<0)throw Error(`Invalid value '${t}' specified. Expected a positive number.`);return t},Ht=e=>e===`auto`?e:It(e.charAt(0)===`#`?e.substring(1):e,3),Ut=e=>typeof e==`string`?Rt(e):J(e),Wt=e=>typeof e==`string`?Vt(e):Ft(e),Gt=e=>typeof e==`string`?Vt(e):Ft(e),Kt=e=>{let t=e.substring(0,e.length-1);return`${Number(t)}%`},qt=e=>typeof e==`number`?J(e):e.slice(-1)===`%`?Kt(e):Rt(e),Jt=Ft,Yt=Ft,Xt=e=>e.toISOString(),Y=class extends b{constructor(e,t=!0){super(e),t!==!0&&this.root.push(new E({val:t}))}},Zt=class extends b{constructor(e,t){super(e),this.root.push(new E({val:Wt(t)}))}},Qt=class extends b{},$t=class extends b{constructor(e,t){super(e),this.root.push(new E({val:t}))}},en=(e,t)=>new X({name:e,attributes:{value:{key:`w:val`,value:t}}}),tn=class extends b{constructor(e,t){super(e),this.root.push(new E({val:t}))}},nn=class extends b{constructor(e,t){super(e),this.root.push(t)}},X=class extends b{constructor({name:e,attributes:t,children:n}){super(e),t&&this.root.push(new T(t)),n&&this.root.push(...n)}},rn={START:`start`,CENTER:`center`,END:`end`,BOTH:`both`,MEDIUM_KASHIDA:`mediumKashida`,DISTRIBUTE:`distribute`,NUM_TAB:`numTab`,HIGH_KASHIDA:`highKashida`,LOW_KASHIDA:`lowKashida`,THAI_DISTRIBUTE:`thaiDistribute`,LEFT:`left`,RIGHT:`right`,JUSTIFIED:`both`},an=e=>new X({name:`w:jc`,attributes:{val:{key:`w:val`,value:e}}}),on={dark1:`dk1`,light1:`lt1`,dark2:`dk2`,light2:`lt2`,accent1:`accent1`,accent2:`accent2`,accent3:`accent3`,accent4:`accent4`,accent5:`accent5`,accent6:`accent6`,hyperlink:`hlink`,followedHyperlink:`folHlink`},sn={dark2:`44546A`,light2:`E7E6E6`,accent1:`4472C4`,accent2:`ED7D31`,accent3:`A5A5A5`,accent4:`FFC000`,accent5:`5B9BD5`,accent6:`70AD47`,hyperlink:`0563C1`,followedHyperlink:`954F72`},cn={dark1:{value:`windowText`,lastColor:`000000`},light1:{value:`window`,lastColor:`FFFFFF`}},ln=(e,t)=>{if(t===`auto`)throw Error(`Invalid theme color ${e} 'auto'. Expected 6 digit hex value`);return Ht(t)},un=(e={})=>Object.fromEntries(Object.keys(on).map(t=>{let n=e[t],r=t===`dark1`||t===`light1`?cn[t].lastColor:sn[t];return[t,n===void 0?r:ln(t,n)]})),dn=(e,t)=>new X({name:`a:srgbClr`,attributes:{value:{key:`val`,value:ln(e,t)}}}),fn=(e,t)=>{let n=t[e],r=e===`dark1`||e===`light1`?cn[e]:void 0;return new X({name:`a:${on[e]}`,children:[n===void 0&&r?new X({name:`a:sysClr`,attributes:{value:{key:`val`,value:r.value},lastColor:{key:`lastClr`,value:r.lastColor}}}):dn(e,n??sn[e])]})},pn=(e,t={})=>new X({name:`a:clrScheme`,attributes:{name:{key:`name`,value:e}},children:Object.keys(on).map(e=>fn(e,t))}),mn=new Set([`dark1`,`light1`,`dark2`,`light2`,`accent1`,`accent2`,`accent3`,`accent4`,`accent5`,`accent6`,`hyperlink`,`followedHyperlink`]),hn=new Map([[`dk1`,`dark1`],[`lt1`,`light1`],[`dk2`,`dark2`],[`lt2`,`light2`],[`hlink`,`hyperlink`],[`folHlink`,`followedHyperlink`],[`text1`,`dark1`],[`background1`,`light1`],[`text2`,`dark2`],[`background2`,`light2`]]),gn=(e,t)=>{if(!(e>=0&&e<=100))throw Error(`Invalid ${t} ${e}. Expected a number from 0 to 100`);return Math.round(255*(1-e/100))},_n=({theme:e,lighter:t,darker:n})=>{if(!mn.has(e)){let t=hn.get(e);throw Error(`Invalid theme color "${e}". ${t?`Did you mean "${t}"?`:`Expected one of ${[...mn].join(`, `)}`}`)}if(t!==void 0&&n!==void 0)throw Error(`Invalid theme color. Expected lighter or darker, not both`);let r=t===void 0?void 0:gn(t,`lighter`),i=n===void 0?void 0:gn(n,`darker`);return{tint:r===255?void 0:r,shade:i===255?void 0:i}},vn=e=>{let[t,n,r]=[0,2,4].map(t=>parseInt(e.slice(t,t+2),16)/255),i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2,s=i-a;return s===0?{hue:0,saturation:0,lightness:o}:{hue:(i===t?((n-r)/s+6)%6:i===n?(r-t)/s+2:(t-n)/s+4)*60,saturation:s/(1-Math.abs(2*o-1)),lightness:o}},yn=({hue:e,saturation:t,lightness:n})=>{let r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e/60%2-1)),[a,o,s]=e<60?[r,i,0]:e<120?[i,r,0]:e<180?[0,r,i]:e<240?[0,i,r]:e<300?[i,0,r]:[r,0,i],c=n-r/2;return[a,o,s].map(e=>Math.floor((e+c)*255+1e-9).toString(16).padStart(2,`0`)).join(``).toUpperCase()},bn=(e,{tint:t,shade:n})=>{if(t===void 0&&n===void 0)return e;let r=vn(e),i=t===void 0?r.lightness*n/255:r.lightness*t/255+(1-t/255);return yn(C(C({},r),{},{lightness:i}))},xn=e=>e===void 0?void 0:e.toString(16).padStart(2,`0`).toUpperCase(),Sn=e=>typeof e==`string`?{type:`hex`,value:Ht(e)}:{type:`theme`,color:e,change:_n(e)},Cn=(e,t)=>e.type===`hex`?{color:e.value}:{color:bn(t[e.color.theme],e.change),theme:e.color.theme,tint:xn(e.change.tint),shade:xn(e.change.shade)},wn=un(),Tn=class extends v{constructor(e){super(`_attr`),_(this,`attributes`,void 0),this.attributes=e.map(e=>`keys`in e?{keys:e.keys,color:e.color===void 0?void 0:Sn(e.color)}:e)}prepForXml(e){var t;let n=((t=e.file)==null||(t=t.Theme)==null?void 0:t.Colors)??wn,r=this.attributes.flatMap(e=>{if(!(`keys`in e))return[[e.key,e.value]];if(e.color===void 0)return[];let{keys:t}=e,r=Cn(e.color,n);return[[t.color,r.color],[t.theme,r.theme],[t.tint,r.tint],[t.shade,r.shade]]});return{_attr:Object.fromEntries(r.filter(([,e])=>e!==void 0))}}},En=class extends b{constructor(e,t){super(e),this.root.push(new Tn(t))}},Dn=(e,t)=>new En(e,t),On={color:`w:color`,theme:`w:themeColor`,tint:`w:themeTint`,shade:`w:themeShade`},Z=(e,{color:t,size:n,space:r,style:i})=>Dn(e,[{key:`w:val`,value:i},{keys:On,color:t},{key:`w:sz`,value:n===void 0?void 0:Jt(n)},{key:`w:space`,value:r===void 0?void 0:Yt(r)}]),kn={SINGLE:`single`,DASH_DOT_STROKED:`dashDotStroked`,DASHED:`dashed`,DASH_SMALL_GAP:`dashSmallGap`,DOT_DASH:`dotDash`,DOT_DOT_DASH:`dotDotDash`,DOTTED:`dotted`,DOUBLE:`double`,DOUBLE_WAVE:`doubleWave`,INSET:`inset`,NIL:`nil`,NONE:`none`,OUTSET:`outset`,THICK:`thick`,THICK_THIN_LARGE_GAP:`thickThinLargeGap`,THICK_THIN_MEDIUM_GAP:`thickThinMediumGap`,THICK_THIN_SMALL_GAP:`thickThinSmallGap`,THIN_THICK_LARGE_GAP:`thinThickLargeGap`,THIN_THICK_MEDIUM_GAP:`thinThickMediumGap`,THIN_THICK_SMALL_GAP:`thinThickSmallGap`,THIN_THICK_THIN_LARGE_GAP:`thinThickThinLargeGap`,THIN_THICK_THIN_MEDIUM_GAP:`thinThickThinMediumGap`,THIN_THICK_THIN_SMALL_GAP:`thinThickThinSmallGap`,THREE_D_EMBOSS:`threeDEmboss`,THREE_D_ENGRAVE:`threeDEngrave`,TRIPLE:`triple`,WAVE:`wave`},An=class extends x{constructor(e){super(`w:pBdr`),e.top&&this.root.push(Z(`w:top`,e.top)),e.left&&this.root.push(Z(`w:left`,e.left)),e.bottom&&this.root.push(Z(`w:bottom`,e.bottom)),e.right&&this.root.push(Z(`w:right`,e.right)),e.between&&this.root.push(Z(`w:between`,e.between))}},jn=class extends b{constructor(){super(`w:pBdr`);let e=Z(`w:bottom`,{color:`auto`,space:1,style:kn.SINGLE,size:6});this.root.push(e)}},Mn=({start:e,end:t,left:n,right:r,hanging:i,firstLine:a,firstLineChars:o})=>new X({name:`w:ind`,attributes:{start:{key:`w:start`,value:e===void 0?void 0:Ut(e)},end:{key:`w:end`,value:t===void 0?void 0:Ut(t)},left:{key:`w:left`,value:n===void 0?void 0:Ut(n)},right:{key:`w:right`,value:r===void 0?void 0:Ut(r)},hanging:{key:`w:hanging`,value:i===void 0?void 0:Gt(i)},firstLine:{key:`w:firstLine`,value:a===void 0?void 0:Gt(a)},firstLineChars:{key:`w:firstLineChars`,value:o===void 0?void 0:J(o)}}}),Nn=()=>new X({name:`w:br`}),Pn={BEGIN:`begin`,END:`end`,SEPARATE:`separate`},Fn=(e,t)=>new X({name:`w:fldChar`,attributes:{type:{key:`w:fldCharType`,value:e},dirty:{key:`w:dirty`,value:t}}}),In=e=>Fn(Pn.BEGIN,e),Ln=new WeakSet,Rn=class extends X{constructor(){super({name:`w:fldChar`,attributes:{type:{key:`w:fldCharType`,value:Pn.BEGIN},dirty:{key:`w:dirty`,value:!0}}})}prepForXml(e){let t=super.prepForXml(e);return Ln.add(t),t}},zn=()=>new Rn,Bn=e=>typeof e==`object`&&!!e&&Ln.has(e),Vn=e=>Fn(Pn.SEPARATE,e),Hn=e=>Fn(Pn.END,e),Un={DEFAULT:`default`,PRESERVE:`preserve`},Wn=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{space:`xml:space`})}},Gn=class extends b{constructor(){super(`w:instrText`),this.root.push(new Wn({space:Un.PRESERVE})),this.root.push(`PAGE`)}},Kn=class extends b{constructor(){super(`w:instrText`),this.root.push(new Wn({space:Un.PRESERVE})),this.root.push(`NUMPAGES`)}},qn=class extends b{constructor(){super(`w:instrText`),this.root.push(new Wn({space:Un.PRESERVE})),this.root.push(`SECTIONPAGES`)}},Jn=class extends b{constructor(){super(`w:instrText`),this.root.push(new Wn({space:Un.PRESERVE})),this.root.push(`SECTION`)}},Yn=({fill:e,color:t,type:n})=>Dn(`w:shd`,[{keys:{color:`w:fill`,theme:`w:themeFill`,tint:`w:themeFillTint`,shade:`w:themeFillShade`},color:e},{keys:On,color:t},{key:`w:val`,value:n??Xn.CLEAR}]),Xn={CLEAR:`clear`,DIAGONAL_CROSS:`diagCross`,DIAGONAL_STRIPE:`diagStripe`,HORIZONTAL_CROSS:`horzCross`,HORIZONTAL_STRIPE:`horzStripe`,NIL:`nil`,PERCENT_5:`pct5`,PERCENT_10:`pct10`,PERCENT_12:`pct12`,PERCENT_15:`pct15`,PERCENT_20:`pct20`,PERCENT_25:`pct25`,PERCENT_30:`pct30`,PERCENT_35:`pct35`,PERCENT_37:`pct37`,PERCENT_40:`pct40`,PERCENT_45:`pct45`,PERCENT_50:`pct50`,PERCENT_55:`pct55`,PERCENT_60:`pct60`,PERCENT_62:`pct62`,PERCENT_65:`pct65`,PERCENT_70:`pct70`,PERCENT_75:`pct75`,PERCENT_80:`pct80`,PERCENT_85:`pct85`,PERCENT_87:`pct87`,PERCENT_90:`pct90`,PERCENT_95:`pct95`,REVERSE_DIAGONAL_STRIPE:`reverseDiagStripe`,SOLID:`solid`,THIN_DIAGONAL_CROSS:`thinDiagCross`,THIN_DIAGONAL_STRIPE:`thinDiagStripe`,THIN_HORIZONTAL_CROSS:`thinHorzCross`,THIN_REVERSE_DIAGONAL_STRIPE:`thinReverseDiagStripe`,THIN_VERTICAL_STRIPE:`thinVertStripe`,VERTICAL_STRIPE:`vertStripe`},Zn=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{id:`w:id`,author:`w:author`,date:`w:date`})}},Qn=class extends b{constructor(e){super(`w:del`),this.root.push(new Zn({id:e.id,author:e.author,date:e.date}))}},$n=class extends b{constructor(e){super(`w:ins`),this.root.push(new Zn({id:e.id,author:e.author,date:e.date}))}},er={DOT:`dot`},tr=(e=er.DOT)=>new X({name:`w:em`,attributes:{val:{key:`w:val`,value:e}}}),nr=class extends b{constructor(e){super(`w:spacing`),this.root.push(new E({val:Ut(e)}))}},rr=class extends b{constructor(e){super(`w:color`),this.root.push(new Tn([{keys:C(C({},On),{},{color:`w:val`}),color:e}]))}},ir=class extends b{constructor(e){super(`w:highlight`),this.root.push(new E({val:e}))}},ar=e=>new X({name:`w:lang`,attributes:{value:{key:`w:val`,value:e.value},eastAsia:{key:`w:eastAsia`,value:e.eastAsia},bidirectional:{key:`w:bidi`,value:e.bidirectional}}}),or=(e,t)=>{if(typeof e==`string`){let n=e;return new X({name:`w:rFonts`,attributes:{ascii:{key:`w:ascii`,value:n},cs:{key:`w:cs`,value:n},eastAsia:{key:`w:eastAsia`,value:n},hAnsi:{key:`w:hAnsi`,value:n},hint:{key:`w:hint`,value:t}}})}if(`theme`in e){let t=e.theme===`headings`?`major`:`minor`;return new X({name:`w:rFonts`,attributes:{ascii:{key:`w:asciiTheme`,value:`${t}HAnsi`},eastAsia:{key:`w:eastAsiaTheme`,value:`${t}EastAsia`},hAnsi:{key:`w:hAnsiTheme`,value:`${t}HAnsi`},cs:{key:`w:cstheme`,value:`${t}Bidi`}}})}let n=e;return new X({name:`w:rFonts`,attributes:{ascii:{key:`w:ascii`,value:n.ascii},cs:{key:`w:cs`,value:n.cs},eastAsia:{key:`w:eastAsia`,value:n.eastAsia},hAnsi:{key:`w:hAnsi`,value:n.hAnsi},hint:{key:`w:hint`,value:n.hint}}})},sr=e=>new X({name:`w:vertAlign`,attributes:{val:{key:`w:val`,value:e}}}),cr=()=>sr(`superscript`),lr=()=>sr(`subscript`),ur={SINGLE:`single`,WORDS:`words`,DOUBLE:`double`,THICK:`thick`,DOTTED:`dotted`,DOTTEDHEAVY:`dottedHeavy`,DASH:`dash`,DASHEDHEAVY:`dashedHeavy`,DASHLONG:`dashLong`,DASHLONGHEAVY:`dashLongHeavy`,DOTDASH:`dotDash`,DASHDOTHEAVY:`dashDotHeavy`,DOTDOTDASH:`dotDotDash`,DASHDOTDOTHEAVY:`dashDotDotHeavy`,WAVE:`wave`,WAVYHEAVY:`wavyHeavy`,WAVYDOUBLE:`wavyDouble`,NONE:`none`},dr=(e=ur.SINGLE,t)=>Dn(`w:u`,[{key:`w:val`,value:e},{keys:On,color:t}]),fr=class extends x{constructor(e){if(super(`w:rPr`),!e)return;e.style&&this.push(new $t(`w:rStyle`,e.style)),e.font&&(typeof e.font==`string`?this.push(or(e.font)):`name`in e.font?this.push(or(e.font.name,e.font.hint)):this.push(or(e.font))),e.bold!==void 0&&this.push(new Y(`w:b`,e.bold)),(e.boldComplexScript===void 0&&e.bold!==void 0||e.boldComplexScript)&&this.push(new Y(`w:bCs`,e.boldComplexScript??e.bold)),e.italics!==void 0&&this.push(new Y(`w:i`,e.italics)),(e.italicsComplexScript===void 0&&e.italics!==void 0||e.italicsComplexScript)&&this.push(new Y(`w:iCs`,e.italicsComplexScript??e.italics)),e.smallCaps===void 0?e.allCaps!==void 0&&this.push(new Y(`w:caps`,e.allCaps)):this.push(new Y(`w:smallCaps`,e.smallCaps)),e.strike!==void 0&&this.push(new Y(`w:strike`,e.strike)),e.doubleStrike!==void 0&&this.push(new Y(`w:dstrike`,e.doubleStrike)),e.emboss!==void 0&&this.push(new Y(`w:emboss`,e.emboss)),e.imprint!==void 0&&this.push(new Y(`w:imprint`,e.imprint)),e.noProof!==void 0&&this.push(new Y(`w:noProof`,e.noProof)),e.snapToGrid!==void 0&&this.push(new Y(`w:snapToGrid`,e.snapToGrid)),e.vanish!==void 0&&this.push(new Y(`w:vanish`,e.vanish)),e.color&&this.push(new rr(e.color)),e.characterSpacing&&this.push(new nr(e.characterSpacing)),e.scale!==void 0&&this.push(new tn(`w:w`,e.scale)),e.kern&&this.push(new Zt(`w:kern`,e.kern)),e.position&&this.push(new $t(`w:position`,e.position)),e.size!==void 0&&this.push(new Zt(`w:sz`,e.size));let t=e.sizeComplexScript===void 0||e.sizeComplexScript===!0?e.size:e.sizeComplexScript;t&&this.push(new Zt(`w:szCs`,t)),e.highlight&&this.push(new ir(e.highlight)),e.underline&&this.push(dr(e.underline.type,e.underline.color)),e.effect&&this.push(new $t(`w:effect`,e.effect)),e.border&&this.push(Z(`w:bdr`,e.border)),e.shading&&this.push(Yn(e.shading)),e.subScript&&this.push(lr()),e.superScript&&this.push(cr()),e.rightToLeft!==void 0&&this.push(new Y(`w:rtl`,e.rightToLeft)),e.emphasisMark&&this.push(tr(e.emphasisMark.type)),e.language&&this.push(ar(e.language)),e.specVanish!==void 0&&this.push(new Y(`w:specVanish`,e.specVanish)),e.math!==void 0&&this.push(new Y(`w:oMath`,e.math)),e.revision&&this.push(new mr(e.revision))}push(e){this.root.push(e)}},pr=class extends fr{constructor(e){super(e),e?.insertion&&this.push(new $n(e.insertion)),e?.deletion&&this.push(new Qn(e.deletion))}},mr=class extends b{constructor(e){super(`w:rPrChange`),this.root.push(new Zn({id:e.id,author:e.author,date:e.date})),this.addChildElement(new fr(e))}},hr=class extends b{constructor(e){super(`w:t`),typeof e==`string`?(this.root.push(new Wn({space:Un.PRESERVE})),this.root.push(e)):(this.root.push(new Wn({space:e.space??Un.DEFAULT})),this.root.push(e.text))}},gr={CURRENT:`CURRENT`,TOTAL_PAGES:`TOTAL_PAGES`,TOTAL_PAGES_IN_SECTION:`TOTAL_PAGES_IN_SECTION`,CURRENT_SECTION:`SECTION`},_r=class e extends b{constructor(t){if(super(`w:r`),_(this,`properties`,void 0),_(this,`following`,[]),this.properties=new fr(t),this.root.push(this.properties),t.break)for(let e=0;e<t.break;e++)this.root.push(Nn());if(t.children)for(let[n,r]of t.children.entries()){if(r instanceof e){let i=t.children.slice(n+1);this.following=[r,...i.length>0?[new e(C(C({},t),{},{break:void 0,children:i}))]:[]];break}if(typeof r==`string`)switch(r){case gr.CURRENT:this.root.push(In()),this.root.push(new Gn),this.root.push(Vn()),this.root.push(Hn());break;case gr.TOTAL_PAGES:this.root.push(In()),this.root.push(new Kn),this.root.push(Vn()),this.root.push(Hn());break;case gr.TOTAL_PAGES_IN_SECTION:this.root.push(In()),this.root.push(new qn),this.root.push(Vn()),this.root.push(Hn());break;case gr.CURRENT_SECTION:this.root.push(In()),this.root.push(new Jn),this.root.push(Vn()),this.root.push(Hn());break;default:this.root.push(new hr(r))}else this.root.push(r)}else t.text!==void 0&&this.root.push(new hr(t.text))}get writtenAs(){return this.following.length>0?[this,...this.following.flatMap(e=>e.writtenAs??e)]:void 0}},vr=class extends _r{constructor(e){super(typeof e==`string`?{text:e}:e)}},yr=u(((e,t)=>{t.exports=n;function n(e,t){if(!e)throw Error(t||`Assertion failed`)}n.equal=function(e,t,n){if(e!=t)throw Error(n||`Assertion failed: `+e+` != `+t)}})),br=u((e=>{var t=yr();e.inherits=O();function n(e,t){return(e.charCodeAt(t)&64512)!=55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)==56320}function r(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e==`string`){if(!t)for(var i=0,a=0;a<e.length;a++){var o=e.charCodeAt(a);o<128?r[i++]=o:o<2048?(r[i++]=o>>6|192,r[i++]=o&63|128):n(e,a)?(o=65536+((o&1023)<<10)+(e.charCodeAt(++a)&1023),r[i++]=o>>18|240,r[i++]=o>>12&63|128,r[i++]=o>>6&63|128,r[i++]=o&63|128):(r[i++]=o>>12|224,r[i++]=o>>6&63|128,r[i++]=o&63|128)}else if(t===`hex`)for(e=e.replace(/[^a-z0-9]+/gi,``),e.length%2!=0&&(e=`0`+e),a=0;a<e.length;a+=2)r.push(parseInt(e[a]+e[a+1],16))}else for(a=0;a<e.length;a++)r[a]=e[a]|0;return r}e.toArray=r;function i(e){for(var t=``,n=0;n<e.length;n++)t+=s(e[n].toString(16));return t}e.toHex=i;function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24)>>>0}e.htonl=a;function o(e,t){for(var n=``,r=0;r<e.length;r++){var i=e[r];t===`little`&&(i=a(i)),n+=c(i.toString(16))}return n}e.toHex32=o;function s(e){return e.length===1?`0`+e:e}e.zero2=s;function c(e){return e.length===7?`0`+e:e.length===6?`00`+e:e.length===5?`000`+e:e.length===4?`0000`+e:e.length===3?`00000`+e:e.length===2?`000000`+e:e.length===1?`0000000`+e:e}e.zero8=c;function l(e,n,r,i){var a=r-n;t(a%4==0);for(var o=Array(a/4),s=0,c=n;s<o.length;s++,c+=4){var l=i===`big`?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c];o[s]=l>>>0}return o}e.join32=l;function u(e,t){for(var n=Array(e.length*4),r=0,i=0;r<e.length;r++,i+=4){var a=e[r];t===`big`?(n[i]=a>>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=a&255):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=a&255)}return n}e.split32=u;function d(e,t){return e>>>t|e<<32-t}e.rotr32=d;function f(e,t){return e<<t|e>>>32-t}e.rotl32=f;function p(e,t){return e+t>>>0}e.sum32=p;function m(e,t,n){return e+t+n>>>0}e.sum32_3=m;function h(e,t,n,r){return e+t+n+r>>>0}e.sum32_4=h;function g(e,t,n,r,i){return e+t+n+r+i>>>0}e.sum32_5=g;function _(e,t,n,r){var i=e[t],a=r+e[t+1]>>>0;e[t]=+(a<r)+n+i>>>0,e[t+1]=a}e.sum64=_;function v(e,t,n,r){return+(t+r>>>0<t)+e+n>>>0}e.sum64_hi=v;function y(e,t,n,r){return t+r>>>0}e.sum64_lo=y;function b(e,t,n,r,i,a,o,s){var c=0,l=t;return l=l+r>>>0,c+=+(l<t),l=l+a>>>0,c+=+(l<a),l=l+s>>>0,c+=+(l<s),e+n+i+o+c>>>0}e.sum64_4_hi=b;function x(e,t,n,r,i,a,o,s){return t+r+a+s>>>0}e.sum64_4_lo=x;function S(e,t,n,r,i,a,o,s,c,l){var u=0,d=t;return d=d+r>>>0,u+=+(d<t),d=d+a>>>0,u+=+(d<a),d=d+s>>>0,u+=+(d<s),d=d+l>>>0,u+=+(d<l),e+n+i+o+c+u>>>0}e.sum64_5_hi=S;function C(e,t,n,r,i,a,o,s,c,l){return t+r+a+s+l>>>0}e.sum64_5_lo=C;function w(e,t,n){return(t<<32-n|e>>>n)>>>0}e.rotr64_hi=w;function T(e,t,n){return(e<<32-n|t>>>n)>>>0}e.rotr64_lo=T;function E(e,t,n){return e>>>n}e.shr64_hi=E;function D(e,t,n){return(e<<32-n|t>>>n)>>>0}e.shr64_lo=D})),xr=u((e=>{var t=br(),n=yr();function r(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian=`big`,this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=r,r.prototype.update=function(e,n){if(e=t.toArray(e,n),this.pending=this.pending?this.pending.concat(e):e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),this.pending.length===0&&(this.pending=null),e=t.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},r.prototype.digest=function(e){return this.update(this._pad()),n(this.pending===null),this._digest(e)},r.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,this.endian===`big`){for(var a=8;a<this.padLength;a++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=e&255}else for(r[i++]=e&255,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a<this.padLength;a++)r[i++]=0;return r}})),Sr=u((e=>{var t=br().rotr32;function n(e,t,n,o){if(e===0)return r(t,n,o);if(e===1||e===3)return a(t,n,o);if(e===2)return i(t,n,o)}e.ft_1=n;function r(e,t,n){return e&t^~e&n}e.ch32=r;function i(e,t,n){return e&t^e&n^t&n}e.maj32=i;function a(e,t,n){return e^t^n}e.p32=a;function o(e){return t(e,2)^t(e,13)^t(e,22)}e.s0_256=o;function s(e){return t(e,6)^t(e,11)^t(e,25)}e.s1_256=s;function c(e){return t(e,7)^t(e,18)^e>>>3}e.g0_256=c;function l(e){return t(e,17)^t(e,19)^e>>>10}e.g1_256=l})),Cr=u(((e,t)=>{var n=br(),r=xr(),i=Sr(),a=n.rotl32,o=n.sum32,s=n.sum32_5,c=i.ft_1,l=r.BlockHash,u=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}n.inherits(d,l),t.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=a(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],l=this.h[1],d=this.h[2],f=this.h[3],p=this.h[4];for(r=0;r<n.length;r++){var m=~~(r/20),h=s(a(i,5),c(m,l,d,f),p,n[r],u[m]);p=f,f=d,d=a(l,30),l=i,i=h}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],l),this.h[2]=o(this.h[2],d),this.h[3]=o(this.h[3],f),this.h[4]=o(this.h[4],p)},d.prototype._digest=function(e){return e===`hex`?n.toHex32(this.h,`big`):n.split32(this.h,`big`)}})),wr=u(((e,t)=>{var n=br(),r=xr(),i=Sr(),a=yr(),o=n.sum32,s=n.sum32_4,c=n.sum32_5,l=i.ch32,u=i.maj32,d=i.s0_256,f=i.s1_256,p=i.g0_256,m=i.g1_256,h=r.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function _(){if(!(this instanceof _))return new _;h.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=Array(64)}n.inherits(_,h),t.exports=_,_.blockSize=512,_.outSize=256,_.hmacStrength=192,_.padLength=64,_.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=s(m(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],h=this.h[1],g=this.h[2],_=this.h[3],v=this.h[4],y=this.h[5],b=this.h[6],x=this.h[7];for(a(this.k.length===n.length),r=0;r<n.length;r++){var S=c(x,f(v),l(v,y,b),this.k[r],n[r]),C=o(d(i),u(i,h,g));x=b,b=y,y=v,v=o(_,S),_=g,g=h,h=i,i=o(S,C)}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],h),this.h[2]=o(this.h[2],g),this.h[3]=o(this.h[3],_),this.h[4]=o(this.h[4],v),this.h[5]=o(this.h[5],y),this.h[6]=o(this.h[6],b),this.h[7]=o(this.h[7],x)},_.prototype._digest=function(e){return e===`hex`?n.toHex32(this.h,`big`):n.split32(this.h,`big`)}})),Tr=u(((e,t)=>{var n=br(),r=wr();function i(){if(!(this instanceof i))return new i;r.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(i,r),t.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(e){return e===`hex`?n.toHex32(this.h.slice(0,7),`big`):n.split32(this.h.slice(0,7),`big`)}})),Er=u(((e,t)=>{var n=br(),r=xr(),i=yr(),a=n.rotr64_hi,o=n.rotr64_lo,s=n.shr64_hi,c=n.shr64_lo,l=n.sum64,u=n.sum64_hi,d=n.sum64_lo,f=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,h=n.sum64_5_lo,g=r.BlockHash,_=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=_,this.W=Array(160)}n.inherits(v,g),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=k(n[r-4],n[r-3]),a=A(n[r-4],n[r-3]),o=n[r-14],s=n[r-13],c=D(n[r-30],n[r-29]),l=O(n[r-30],n[r-29]),u=n[r-32],d=n[r-31];n[r]=f(i,a,o,s,c,l,u,d),n[r+1]=p(i,a,o,s,c,l,u,d)}},v.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],a=this.h[1],o=this.h[2],s=this.h[3],c=this.h[4],f=this.h[5],p=this.h[6],g=this.h[7],_=this.h[8],v=this.h[9],D=this.h[10],O=this.h[11],k=this.h[12],A=this.h[13],j=this.h[14],M=this.h[15];i(this.k.length===n.length);for(var N=0;N<n.length;N+=2){var P=j,F=M,I=T(_,v),L=E(_,v),R=y(_,v,D,O,k,A),z=b(_,v,D,O,k,A),B=this.k[N],V=this.k[N+1],H=n[N],U=n[N+1],W=m(P,F,I,L,R,z,B,V,H,U),G=h(P,F,I,L,R,z,B,V,H,U);P=C(r,a),F=w(r,a),I=x(r,a,o,s,c,f),L=S(r,a,o,s,c,f);var ee=u(P,F,I,L),K=d(P,F,I,L);j=k,M=A,k=D,A=O,D=_,O=v,_=u(p,g,W,G),v=d(g,g,W,G),p=c,g=f,c=o,f=s,o=r,s=a,r=u(W,G,ee,K),a=d(W,G,ee,K)}l(this.h,0,r,a),l(this.h,2,o,s),l(this.h,4,c,f),l(this.h,6,p,g),l(this.h,8,_,v),l(this.h,10,D,O),l(this.h,12,k,A),l(this.h,14,j,M)},v.prototype._digest=function(e){return e===`hex`?n.toHex32(this.h,`big`):n.split32(this.h,`big`)};function y(e,t,n,r,i){var a=e&n^~e&i;return a<0&&(a+=4294967296),a}function b(e,t,n,r,i,a){var o=t&r^~t&a;return o<0&&(o+=4294967296),o}function x(e,t,n,r,i){var a=e&n^e&i^n&i;return a<0&&(a+=4294967296),a}function S(e,t,n,r,i,a){var o=t&r^t&a^r&a;return o<0&&(o+=4294967296),o}function C(e,t){var n=a(e,t,28),r=a(t,e,2),i=a(t,e,7),o=n^r^i;return o<0&&(o+=4294967296),o}function w(e,t){var n=o(e,t,28),r=o(t,e,2),i=o(t,e,7),a=n^r^i;return a<0&&(a+=4294967296),a}function T(e,t){var n=a(e,t,14),r=a(e,t,18),i=a(t,e,9),o=n^r^i;return o<0&&(o+=4294967296),o}function E(e,t){var n=o(e,t,14),r=o(e,t,18),i=o(t,e,9),a=n^r^i;return a<0&&(a+=4294967296),a}function D(e,t){var n=a(e,t,1),r=a(e,t,8),i=s(e,t,7),o=n^r^i;return o<0&&(o+=4294967296),o}function O(e,t){var n=o(e,t,1),r=o(e,t,8),i=c(e,t,7),a=n^r^i;return a<0&&(a+=4294967296),a}function k(e,t){var n=a(e,t,19),r=a(t,e,29),i=s(e,t,6),o=n^r^i;return o<0&&(o+=4294967296),o}function A(e,t){var n=o(e,t,19),r=o(t,e,29),i=c(e,t,6),a=n^r^i;return a<0&&(a+=4294967296),a}})),Dr=u(((e,t)=>{var n=br(),r=Er();function i(){if(!(this instanceof i))return new i;r.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(i,r),t.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(e){return e===`hex`?n.toHex32(this.h.slice(0,12),`big`):n.split32(this.h.slice(0,12),`big`)}})),Or=u((e=>{e.sha1=Cr(),e.sha224=Tr(),e.sha256=wr(),e.sha384=Dr(),e.sha512=Er()})),kr=u((e=>{var t=br(),n=xr(),r=t.rotl32,i=t.sum32,a=t.sum32_3,o=t.sum32_4,s=n.BlockHash;function c(){if(!(this instanceof c))return new c;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian=`little`}t.inherits(c,s),e.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var n=this.h[0],s=this.h[1],c=this.h[2],g=this.h[3],_=this.h[4],v=n,y=s,b=c,x=g,S=_,C=0;C<80;C++){var w=i(r(o(n,l(C,s,c,g),e[f[C]+t],u(C)),m[C]),_);n=_,_=g,g=r(c,10),c=s,s=w,w=i(r(o(v,l(79-C,y,b,x),e[p[C]+t],d(C)),h[C]),S),v=S,S=x,x=r(b,10),b=y,y=w}w=a(this.h[1],c,x),this.h[1]=a(this.h[2],g,S),this.h[2]=a(this.h[3],_,v),this.h[3]=a(this.h[4],n,y),this.h[4]=a(this.h[0],s,b),this.h[0]=w},c.prototype._digest=function(e){return e===`hex`?t.toHex32(this.h,`little`):t.split32(this.h,`little`)};function l(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function u(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function d(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]})),Ar=u(((e,t)=>{var n=br(),r=yr();function i(e,t,r){if(!(this instanceof i))return new i(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}t.exports=i,i.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),r(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=new this.Hash().update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=new this.Hash().update(e)},i.prototype.update=function(e,t){return this.inner.update(e,t),this},i.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}})),jr=f(u((e=>{var t=e;t.utils=br(),t.common=xr(),t.sha=Or(),t.ripemd=kr(),t.hmac=Ar(),t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}))(),1),Mr=`57X6y3wQZNzYjJB2L_10pxbackgroundhimselfUTF-8DEMOGRAPHICSVqvt4KW9`,Nr=(e,t=21)=>(n=t)=>{let r=``,i=n|0;for(;i-->0;)r+=e[Math.random()*e.length|0];return r},Pr=(e=21)=>{let t=``,n=e|0;for(;n-->0;)t+=Mr[Math.random()*64|0];return t},Fr=e=>Math.floor(e*72*20),Ir=(e=0)=>{let t=e;return()=>++t},Lr=()=>Ir(),Rr=()=>Ir(1),zr=Ir(),Br=Ir(),Vr=()=>Pr().toLowerCase(),Hr=e=>jr.default.sha1().update(e instanceof ArrayBuffer?new Uint8Array(e):e).digest(`hex`),Ur=e=>Nr(`1234567890abcdef`,e)(),Wr=()=>`${Ur(8)}-${Ur(4)}-${Ur(4)}-${Ur(4)}-${Ur(12)}`,Gr=e=>new Uint8Array(new TextEncoder().encode(e)),Kr={CHARACTER:`character`,COLUMN:`column`,INSIDE_MARGIN:`insideMargin`,LEFT_MARGIN:`leftMargin`,MARGIN:`margin`,OUTSIDE_MARGIN:`outsideMargin`,PAGE:`page`,RIGHT_MARGIN:`rightMargin`},qr={BOTTOM_MARGIN:`bottomMargin`,INSIDE_MARGIN:`insideMargin`,LINE:`line`,MARGIN:`margin`,OUTSIDE_MARGIN:`outsideMargin`,PAGE:`page`,PARAGRAPH:`paragraph`,TOP_MARGIN:`topMargin`},Jr=()=>new X({name:`wp:simplePos`,attributes:{x:{key:`x`,value:0},y:{key:`y`,value:0}}}),Yr=e=>new X({name:`wp:align`,children:[e]}),Xr=e=>new X({name:`wp:posOffset`,children:[e.toString()]}),Zr=({relative:e,align:t,offset:n})=>new X({name:`wp:positionH`,attributes:{relativeFrom:{key:`relativeFrom`,value:e??Kr.PAGE}},children:[(()=>{if(t)return Yr(t);if(n!==void 0)return Xr(n);throw Error(`There is no configuration provided for floating position (Align or offset)`)})()]}),Qr=({relative:e,align:t,offset:n})=>new X({name:`wp:positionV`,attributes:{relativeFrom:{key:`relativeFrom`,value:e??qr.PAGE}},children:[(()=>{if(t)return Yr(t);if(n!==void 0)return Xr(n);throw Error(`There is no configuration provided for floating position (Align or offset)`)})()]}),$r=(e={})=>new X({name:`wps:bodyPr`,attributes:{lIns:{key:`lIns`,value:e.margins?.left},rIns:{key:`rIns`,value:e.margins?.right},tIns:{key:`tIns`,value:e.margins?.top},bIns:{key:`bIns`,value:e.margins?.bottom},anchor:{key:`anchor`,value:e.verticalAnchor}},children:[...e.noAutoFit?[new Y(`a:noAutofit`,e.noAutoFit)]:[]]}),ei=(e={txBox:`1`})=>new X({name:`wps:cNvSpPr`,attributes:{txBox:{key:`txBox`,value:e.txBox}}}),ti=e=>new X({name:`w:txbxContent`,children:[...e]}),ni=e=>new X({name:`wps:txbx`,children:[ti(e)]}),ri=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{cx:`cx`,cy:`cy`})}},ii=class extends b{constructor(e,t){super(`a:ext`),_(this,`attributes`,void 0),this.attributes=new ri({cx:e,cy:t}),this.root.push(this.attributes)}},ai=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{x:`x`,y:`y`})}},oi=class extends b{constructor(e,t){super(`a:off`),this.root.push(new ai({x:e??0,y:t??0}))}},si=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{flipVertical:`flipV`,flipHorizontal:`flipH`,rotation:`rot`})}},ci=class extends b{constructor(e){var t,n;super(`a:xfrm`),_(this,`extents`,void 0),_(this,`offset`,void 0),this.root.push(new si({flipVertical:e.flip?.vertical,flipHorizontal:e.flip?.horizontal,rotation:e.rotation})),this.offset=new oi((t=e.offset)==null||(t=t.emus)==null?void 0:t.x,(n=e.offset)==null||(n=n.emus)==null?void 0:n.y),this.extents=new ii(e.emus.x,e.emus.y),this.root.push(this.offset),this.root.push(this.extents)}},li=()=>new X({name:`a:noFill`}),ui=e=>new X({name:`a:srgbClr`,attributes:{value:{key:`val`,value:e.value}}}),di=e=>new X({name:`a:schemeClr`,attributes:{value:{key:`val`,value:e.value}}}),fi=e=>new X({name:`a:solidFill`,children:[e.type===`rgb`?ui(e):di(e)]}),pi={ROUND:`rnd`,SQUARE:`sq`,FLAT:`flat`},mi={SINGLE:`sng`,DOUBLE:`dbl`,THICK_THIN:`thickThin`,THIN_THICK:`thinThick`,TRI:`tri`},hi={CENTER:`ctr`,INSET:`in`},gi=e=>new X({name:`a:ln`,attributes:{width:{key:`w`,value:e.width},cap:{key:`cap`,value:e.cap===void 0?void 0:pi[e.cap]},compoundLine:{key:`cmpd`,value:e.compoundLine===void 0?void 0:mi[e.compoundLine]},align:{key:`algn`,value:e.align===void 0?void 0:hi[e.align]}},children:[e.type===`noFill`?li():e.solidFillType===`rgb`?fi({type:`rgb`,value:e.value}):fi({type:`scheme`,value:e.value})]}),_i=class extends b{constructor(){super(`a:avLst`)}},vi=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{prst:`prst`})}},yi=class extends b{constructor(){super(`a:prstGeom`),this.root.push(new vi({prst:`rect`})),this.root.push(new _i)}},bi=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{bwMode:`bwMode`})}},xi=class extends b{constructor({element:e,outline:t,solidFill:n,transform:r}){super(`${e}:spPr`),_(this,`form`,void 0),this.root.push(new bi({bwMode:`auto`})),this.form=new ci(r),this.root.push(this.form),this.root.push(new yi),n?this.root.push(fi(n)):t&&this.root.push(li()),t&&this.root.push(gi(t))}},Si=e=>new X({name:`wps:wsp`,children:[ei(e.nonVisualProperties),new xi({element:`wps`,transform:e.transformation,outline:e.outline,solidFill:e.solidFill}),ni(e.children),$r(e.bodyProperties)]}),Ci=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{uri:`uri`})}},wi=e=>new X({name:`asvg:svgBlip`,attributes:{asvg:{key:`xmlns:asvg`,value:`http://schemas.microsoft.com/office/drawing/2016/SVG/main`},embed:{key:`r:embed`,value:`rId{${e.fileName}}`}}}),Ti=e=>new X({name:`a:ext`,attributes:{uri:{key:`uri`,value:`{96DAC541-7B7A-43D3-8B79-37D633B846F1}`}},children:[wi(e)]}),Ei=e=>new X({name:`a:extLst`,children:[Ti(e)]}),Di=e=>new X({name:`a:blip`,attributes:{embed:{key:`r:embed`,value:`rId{${e.type===`svg`?e.fallback.fileName:e.fileName}}`},cstate:{key:`cstate`,value:`none`}},children:e.type===`svg`?[Ei(e)]:[]}),Oi=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{left:`l`,top:`t`,right:`r`,bottom:`b`})}},ki=(e,t)=>{if(e!==void 0){if(!(e>=0&&e<=100))throw Error(`Invalid crop ${t} ${e}. Expected a number from 0 to 100`);return Math.round(e*1e3)}},Ai=class extends b{constructor(e){super(`a:srcRect`),e&&this.root.push(new Oi({left:ki(e.left,`left`),top:ki(e.top,`top`),right:ki(e.right,`right`),bottom:ki(e.bottom,`bottom`)}))}},ji=class extends b{constructor(){super(`a:fillRect`)}},Mi=class extends b{constructor(){super(`a:stretch`),this.root.push(new ji)}},Ni=class extends b{constructor(e,t){super(`pic:blipFill`),this.root.push(Di(e)),this.root.push(new Ai(t)),this.root.push(new Mi)}},Pi=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{noChangeAspect:`noChangeAspect`,noChangeArrowheads:`noChangeArrowheads`})}},Fi=class extends b{constructor(){super(`a:picLocks`),this.root.push(new Pi({noChangeAspect:1,noChangeArrowheads:1}))}},Ii=class extends b{constructor(){super(`pic:cNvPicPr`),this.root.push(new Fi)}},Li=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{id:`id`,name:`name`,descr:`descr`})}},Ri=class extends b{constructor(){super(`pic:cNvPr`),this.root.push(new Li({id:0,name:``,descr:``}))}prepForXml(e){for(let t=e.stack.length-1;t>=0;t--){let n=e.stack[t];if(n instanceof bs){this.root.push(n.createDrawingClick(e,!1));break}}let t=super.prepForXml(e);return this.root.splice(1),t}},zi=class extends b{constructor(){super(`pic:nvPicPr`),this.root.push(new Ri),this.root.push(new Ii)}},Bi=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{xmlns:`xmlns:pic`})}},Vi=class extends b{constructor({mediaData:e,transform:t,outline:n,solidFill:r,crop:i}){super(`pic:pic`),this.root.push(new Bi({xmlns:`http://schemas.openxmlformats.org/drawingml/2006/picture`})),this.root.push(new zi),this.root.push(new Ni(e,i)),this.root.push(new xi({element:`pic`,transform:t,outline:n,solidFill:r}))}},Hi=e=>{var t,n;return new X({name:`a:xfrm`,attributes:{flipVertical:{key:`flipV`,value:e.flip?.vertical},flipHorizontal:{key:`flipH`,value:e.flip?.horizontal},rotation:{key:`rot`,value:e.rotation}},children:[new oi((t=e.offset)==null||(t=t.emus)==null?void 0:t.x,(n=e.offset)==null||(n=n.emus)==null?void 0:n.y),new ii(e.emus.x,e.emus.y),new X({name:`a:chOff`,attributes:{x:{key:`x`,value:0},y:{key:`y`,value:0}}}),new X({name:`a:chExt`,attributes:{x:{key:`cx`,value:e.emus.x},y:{key:`cy`,value:e.emus.y}}})]})},Ui=()=>new X({name:`wpg:cNvGrpSpPr`}),Wi=e=>new X({name:`wpg:wgp`,children:[Ui(),new X({name:`wpg:grpSpPr`,children:[Hi(e.transformation)]}),...e.children]}),Gi=class extends b{constructor({mediaData:e,transform:t,outline:n,solidFill:r,crop:i}){if(super(`a:graphicData`),e.type===`graphic`)this.root.push(new Ci({uri:e.uri})),this.root.push(e.content);else if(e.type===`wps`){this.root.push(new Ci({uri:`http://schemas.microsoft.com/office/word/2010/wordprocessingShape`}));let i=Si(C(C({},e.data),{},{transformation:t,outline:n,solidFill:r}));this.root.push(i)}else if(e.type===`wpg`){this.root.push(new Ci({uri:`http://schemas.microsoft.com/office/word/2010/wordprocessingGroup`}));let n=Wi({children:e.children.map(e=>e.type===`wps`?Si(C(C({},e.data),{},{transformation:e.transformation,outline:e.outline,solidFill:e.solidFill})):new Vi({mediaData:e,transform:e.transformation,outline:e.outline,solidFill:e.solidFill})),transformation:t});this.root.push(n)}else{this.root.push(new Ci({uri:`http://schemas.openxmlformats.org/drawingml/2006/picture`}));let a=new Vi({mediaData:e,transform:t,outline:n,solidFill:r,crop:i});this.root.push(a)}}},Ki=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{a:`xmlns:a`})}},qi=class extends b{constructor({mediaData:e,transform:t,outline:n,solidFill:r,crop:i}){super(`a:graphic`),_(this,`data`,void 0),this.root.push(new Ki({a:`http://schemas.openxmlformats.org/drawingml/2006/main`})),this.data=new Gi({mediaData:e,transform:t,outline:n,solidFill:r,crop:i}),this.root.push(this.data)}},Ji={NONE:0,SQUARE:1,TIGHT:2,TOP_AND_BOTTOM:3,THROUGH:4},Yi={BOTH_SIDES:`bothSides`,LEFT:`left`,RIGHT:`right`,LARGEST:`largest`},Xi=()=>new X({name:`wp:wrapNone`}),Zi=(e,t={top:0,bottom:0,left:0,right:0})=>new X({name:`wp:wrapSquare`,attributes:{wrapText:{key:`wrapText`,value:e.side||Yi.BOTH_SIDES},distT:{key:`distT`,value:t.top},distB:{key:`distB`,value:t.bottom},distL:{key:`distL`,value:t.left},distR:{key:`distR`,value:t.right}}}),Qi=21600,$i=(e,{x:t,y:n})=>new X({name:e,attributes:{x:{key:`x`,value:t},y:{key:`y`,value:n}}}),ea=()=>new X({name:`wp:wrapPolygon`,attributes:{edited:{key:`edited`,value:!1}},children:[$i(`wp:start`,{x:0,y:0}),$i(`wp:lineTo`,{x:0,y:Qi}),$i(`wp:lineTo`,{x:Qi,y:Qi}),$i(`wp:lineTo`,{x:Qi,y:0}),$i(`wp:lineTo`,{x:0,y:0})]}),ta=(e,t={},n)=>new X({name:e,attributes:{wrapText:{key:`wrapText`,value:n?.side??Yi.BOTH_SIDES},distL:{key:`distL`,value:t.left},distR:{key:`distR`,value:t.right}},children:[ea()]}),na=(e,t)=>ta(`wp:wrapTight`,e,t),ra=(e,t)=>ta(`wp:wrapThrough`,e,t),ia=(e={top:0,bottom:0})=>new X({name:`wp:wrapTopAndBottom`,attributes:{distT:{key:`distT`,value:e.top},distB:{key:`distB`,value:e.bottom}}}),aa={EXTERNAL:`External`},oa=(e,t,n,r)=>new X({name:`Relationship`,attributes:{id:{key:`Id`,value:e},type:{key:`Type`,value:t},target:{key:`Target`,value:n},targetMode:{key:`TargetMode`,value:r}}}),sa=(e,t)=>new X({name:`a:hlinkClick`,attributes:C(C({},t?{xmlns:{key:`xmlns:a`,value:`http://schemas.openxmlformats.org/drawingml/2006/main`}}:{}),{},{id:{key:`r:id`,value:`rId${e}`}})}),ca=`{C183D7F6-B498-43B3-948B-1728B52AA6E4}`,la=e=>new X({name:`a:extLst`,attributes:{namespace:{key:`xmlns:a`,value:e?`http://schemas.openxmlformats.org/drawingml/2006/main`:void 0}},children:[new X({name:`a:ext`,attributes:{uri:{key:`uri`,value:ca}},children:[new X({name:`adec:decorative`,attributes:{namespace:{key:`xmlns:adec`,value:`http://schemas.microsoft.com/office/drawing/2017/decorative`},value:{key:`val`,value:1}}})]})]}),ua=class{constructor(e){_(this,`link`,void 0),_(this,`linkId`,Vr()),_(this,`addedTo`,new WeakSet),this.link=e}createClick(e){return sa(this.linkId,e)}addRelationship(e){let t=e.viewWrapper.Relationships;this.addedTo.has(t)||(this.addedTo.add(t),t.addRelationship(this.linkId,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink`,this.link,aa.EXTERNAL))}},da=class extends b{constructor({name:e,description:t,title:n,id:r}={name:``,description:``,title:``},{link:i,decorative:a}={}){super(`wp:docPr`),_(this,`link`,void 0),_(this,`decorative`,void 0);let o={id:{key:`id`,value:r??zr()},name:{key:`name`,value:e}};t!=null&&(o.description={key:`descr`,value:t}),n!=null&&(o.title={key:`title`,value:n}),this.root.push(new T(o)),this.link=i===void 0?void 0:new ua(i),this.decorative=a}prepForXml(e){if(this.link)this.link.addRelationship(e),this.root.push(this.link.createClick(!0));else for(let t=e.stack.length-1;t>=0;t--){let n=e.stack[t];if(n instanceof bs){this.root.push(n.createDrawingClick(e,!0));break}}this.decorative&&this.root.push(la(!0));let t=super.prepForXml(e);return this.root.splice(1),t}},fa=({top:e,right:t,bottom:n,left:r})=>new X({name:`wp:effectExtent`,attributes:{top:{key:`t`,value:e},right:{key:`r`,value:t},bottom:{key:`b`,value:n},left:{key:`l`,value:r}}}),pa=2147483647,ma=9525,ha=(e,t)=>{if(t!==void 0&&t>pa)throw Error(`Invalid drawing ${e} ${t} EMUs (${Math.round(t/ma)} pixels). Word won't open a drawing with a ${e} over ${pa} EMUs (${Math.floor(pa/ma)} pixels). Sizes such as an ImageRun's transformation are in pixels, not EMUs`);return t},ga=({x:e,y:t})=>new X({name:`wp:extent`,attributes:{x:{key:`cx`,value:ha(`width`,e)},y:{key:`cy`,value:ha(`height`,t)}}}),_a=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{xmlns:`xmlns:a`,noChangeAspect:`noChangeAspect`})}},va=class extends b{constructor(){super(`a:graphicFrameLocks`),this.root.push(new _a({xmlns:`http://schemas.openxmlformats.org/drawingml/2006/main`,noChangeAspect:1}))}},ya=(e=!0)=>new X({name:`wp:cNvGraphicFramePr`,children:e?[new va]:[]}),ba=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{distT:`distT`,distB:`distB`,distL:`distL`,distR:`distR`,allowOverlap:`allowOverlap`,behindDoc:`behindDoc`,layoutInCell:`layoutInCell`,locked:`locked`,relativeHeight:`relativeHeight`,simplePos:`simplePos`})}},xa=class extends b{constructor({mediaData:e,transform:t,drawingOptions:n}){super(`wp:anchor`);let r=C({allowOverlap:!0,behindDocument:!1,lockAnchor:!1,layoutInCell:!0,verticalPosition:{},horizontalPosition:{}},n.floating);if(this.root.push(new ba({distT:r.margins&&r.margins.top||0,distB:r.margins&&r.margins.bottom||0,distL:r.margins&&r.margins.left||0,distR:r.margins&&r.margins.right||0,simplePos:`0`,allowOverlap:r.allowOverlap===!0?`1`:`0`,behindDoc:r.behindDocument===!0?`1`:`0`,locked:r.lockAnchor===!0?`1`:`0`,layoutInCell:r.layoutInCell===!0?`1`:`0`,relativeHeight:r.zIndex?r.zIndex:t.emus.y})),this.root.push(Jr()),this.root.push(Zr(r.horizontalPosition)),this.root.push(Qr(r.verticalPosition)),this.root.push(ga({x:t.emus.x,y:t.emus.y})),this.root.push(fa(n.effectExtent??{top:0,right:0,bottom:0,left:0})),n.floating!==void 0&&n.floating.wrap!==void 0)switch(n.floating.wrap.type){case Ji.SQUARE:this.root.push(Zi(n.floating.wrap,n.floating.margins));break;case Ji.TIGHT:this.root.push(na(n.floating.margins,n.floating.wrap));break;case Ji.THROUGH:this.root.push(ra(n.floating.margins,n.floating.wrap));break;case Ji.TOP_AND_BOTTOM:this.root.push(ia(n.floating.margins));break;case Ji.NONE:default:this.root.push(Xi())}else this.root.push(Xi());this.root.push(new da(n.docProperties,{link:n.link,decorative:n.decorative})),this.root.push(ya(e.type!==`graphic`||e.lockAspectRatio!==!1)),this.root.push(new qi({mediaData:e,transform:t,outline:n.outline,solidFill:n.solidFill,crop:n.crop}))}},Sa=({mediaData:e,transform:t,docProperties:n,outline:r,solidFill:i,crop:a,effectExtent:o,link:s,decorative:c})=>new X({name:`wp:inline`,attributes:{distanceTop:{key:`distT`,value:0},distanceBottom:{key:`distB`,value:0},distanceLeft:{key:`distL`,value:0},distanceRight:{key:`distR`,value:0}},children:[ga({x:t.emus.x,y:t.emus.y}),fa(o??(r?{top:(r.width??9525)*2,right:(r.width??9525)*2,bottom:(r.width??9525)*2,left:(r.width??9525)*2}:{top:0,right:0,bottom:0,left:0})),new da(n,{link:s,decorative:c}),ya(e.type!==`graphic`||e.lockAspectRatio!==!1),new qi({mediaData:e,transform:t,outline:r,solidFill:i,crop:a})]}),Ca=class extends b{constructor(e,t={}){super(`w:drawing`),t.floating?this.root.push(new xa({mediaData:e,transform:e.transformation,drawingOptions:t})):this.root.push(Sa({mediaData:e,transform:e.transformation,docProperties:t.docProperties,outline:t.outline,solidFill:t.solidFill,crop:t.crop,effectExtent:t.effectExtent,link:t.link,decorative:t.decorative}))}},wa=e=>{let t=e.indexOf(`;base64,`),n=t===-1?0:t+8;return new Uint8Array(atob(e.substring(n)).split(``).map(e=>e.charCodeAt(0)))},Ta=e=>typeof e==`string`?wa(e):e,Ea=(e,t)=>({data:Ta(e.data),fileName:t,transformation:{pixels:{x:Math.round(e.transformation.width),y:Math.round(e.transformation.height)},emus:{x:Math.round(e.transformation.width*9525),y:Math.round(e.transformation.height*9525)},flip:e.transformation.flip,rotation:e.transformation.rotation?e.transformation.rotation*6e4:void 0}}),Da=({id:e,author:t,date:n},r)=>new X({name:`w:del`,attributes:{id:{key:`w:id`,value:e},author:{key:`w:author`,value:t},date:{key:`w:date`,value:n}},children:[r]}),Oa=class extends b{constructor(e){let t=`${Hr(e.data)}.${e.type}`,n=e.type===`svg`?C(C({type:e.type},Ea(e,t)),{},{fallback:C({type:e.fallback.type},Ea(C(C({},e.fallback),{},{transformation:e.transformation}),`${Hr(e.fallback.data)}.${e.fallback.type}`))}):C({type:e.type},Ea(e,t)),r=new Ca(n,{floating:e.floating,docProperties:e.altText,outline:e.outline,solidFill:e.solidFill,crop:e.crop,link:e.link,decorative:e.decorative}),i=new fr(e.run),a=e.insertion??e.deletion,o=e.insertion?`w:ins`:e.deletion?`w:del`:`w:r`;if(super(o),_(this,`imageData`,void 0),a){this.root.push(new Zn({id:a.id,author:a.author,date:a.date}));let t=new X({name:`w:r`,children:[i,r]});this.addChildElement(e.insertion&&e.deletion?Da(e.deletion,t):t)}else this.root.push(i),this.root.push(r);this.imageData=n}prepForXml(e){return e.file.Media.addImage(this.imageData.fileName,this.imageData),this.imageData.type===`svg`&&e.file.Media.addImage(this.imageData.fallback.fileName,this.imageData.fallback),super.prepForXml(e)}},ka=32767,Aa=780,ja=[[1e3,`M`],[900,`CM`],[500,`D`],[400,`CD`],[100,`C`],[90,`XC`],[50,`L`],[40,`XL`],[10,`X`],[9,`IX`],[5,`V`],[4,`IV`],[1,`I`]],Ma=e=>e<=ka?ja.reduce(({rest:e,text:t},[n,r])=>({rest:e%n,text:t+r.repeat(Math.floor(e/n))}),{rest:e,text:``}).text:void 0,Na=e=>e===0?``:e<=Aa?String.fromCharCode(65+(e-1)%26).repeat(Math.ceil(e/26)):void 0,Pa=e=>`${e}${e%100>=11&&e%100<=13?`th`:[`th`,`st`,`nd`,`rd`][e%10]??`th`}`,Fa=e=>{let t=e.charAt(0)!==e.charAt(0).toUpperCase(),n=e=>n=>t?e(n)?.toLowerCase():e(n);switch(e.toLowerCase()){case`arabic`:return String;case`roman`:return n(Ma);case`alphabetic`:return n(Na);case`ordinal`:return e=>e>0?Pa(e):void 0;case`arabicdash`:return e=>`- ${e} -`;default:return}},Ia=new Set([`mergeformat`,`charformat`,`mergeformatinet`]),La=new Set([`upper`,`lower`,`firstcap`,`caps`]),Ra=e=>/^[#0,]*[#0][#0,]*$/.test(e),za=(e,t)=>{let n=[...t].filter(e=>e===`0`).length,r=n+[...t].filter(e=>e===`#`).length,i=String(e).padStart(n,`0`);if(!(i.length<r||n===0&&e===0))return t.includes(`,`)?i.replace(/\B(?=(\d{3})+$)/g,`,`):i},Ba=(e,t)=>{switch(t){case`upper`:return e.toUpperCase();case`lower`:return e.toLowerCase();case`firstcap`:return e.charAt(0).toUpperCase()+e.slice(1);default:return e}},Va=e=>{let t=RegExp(`^\\s*(PAGEREF|NUMPAGES|SECTIONPAGES)\\b(.*)$`,`is`).exec(e),n=t?.[1].toUpperCase()===`PAGEREF`?RegExp(`^\\s*("?)([^\\s"\\\\]+)\\1(.*)$`,`s`).exec(t[2]):void 0;if(!t||t[1].toUpperCase()===`PAGEREF`&&!n)return;let r=(n?n[3]:t[2]).match(/"[^"]*"|\S+/g)??[],i,a,o=[],s=!1,c=!0;for(let e=0;e<r.length;e++){let t=r[e],n=()=>(t.length>2?t.slice(2):r[++e]??``).replace(/^"(.*)"$/,`$1`);if(/^\\p$/i.test(t))s=!0;else if(t.startsWith(`\\#`)){let e=n();c&&=a===void 0&&Ra(e),a??=e}else if(t.startsWith(`\\*`)){let e=n(),t=e.toLowerCase();La.has(t)?o.push(t):e!==``&&!Ia.has(t)&&(c&&=i===void 0&&Fa(e)!==void 0,i??=e)}}let l=C(C(C(C({},i===void 0?{}:{numberFormat:i}),a===void 0?{}:{picture:a}),o.length===0?{}:{capitals:o[0]}),{},{written:c&&o.length<=1&&o[0]!==`caps`&&(i===void 0||a===void 0)});return C(n?{type:`pageReference`,bookmark:n[2],relative:s}:{type:`pageCount`,scope:t[1].toUpperCase()===`NUMPAGES`?`document`:`section`},l)},Ha=e=>RegExp(`^\\s*TOC\\b.*\\\\s\\b`,`is`).test(e),Ua=(e,{enclosing:t,within:n,inTextBox:r},{estimate:i,sectionPageCount:a,blank:o,relativeTo:s})=>{let c=Va(e);if(c===void 0)return;let{bookmarks:l,pageCount:u,bookmarkPageNumbers:d}=i,{numberFormat:f,picture:p,capitals:m,written:h}=c,g=f!==void 0||p!==void 0,_=e=>e===void 0?void 0:p===void 0?Fa(f??`arabic`)(e):za(e,p),v=c.type===`pageReference`&&c.relative&&n===`counted`&&!r?s?.(c.bookmark):void 0,y;return y=h?c.type===`pageCount`?_(c.scope===`document`?u:a):t.some(Ha)?void 0:g?_(d?.get(c.bookmark)):c.relative?v:l.get(c.bookmark):void 0,y===void 0?o?``:void 0:Ba(y,m)},Wa=(e,t)=>e===`mc:Fallback`||t===`fallback`?`fallback`:e===`w:del`||e===`w:moveFrom`?`deleted`:t,Ga=(e,t,n,r,i=`counted`,a=!1)=>{for(let s=0;s<t.length;s++){let c=t[s],l=e.nameOf(c);if(l===void 0)continue;let u=n[n.length-1];if(l===`w:fldChar`){let o=e.attributeOf(c,`w:fldCharType`);o===`begin`?n.push({begin:c,instruction:``,inResult:!1}):o===`separate`&&u?(e.writeClean(u.begin,u.instruction),u.inResult=!0,u.result=r.resultOf(u.instruction,{within:i,enclosing:n.slice(0,-1).map(e=>e.instruction),inTextBox:a}),u.result!==void 0&&(t.splice(s+1,0,e.textElement(u.result)),s++)):o===`end`&&n.pop()}else if(l===`w:instrText`&&u&&!u.inResult)u.instruction+=e.textOf(c);else if((l===`w:t`||l===`w:tab`||l===`w:br`||l===`w:cr`)&&u?.result!==void 0)t.splice(s,1),s--;else if(l===`w:fldSimple`){let t=r.resultOf(String(e.attributeOf(c,`w:instr`)),{within:i,enclosing:n.map(e=>e.instruction),inTextBox:a});t===void 0?Ga(e,e.contentOf(c)??[],[],r,i,a):e.setSimpleFieldResult(c,t)}else{if(l===`w:p`){var o;(o=r.beforeParagraph)==null||o.call(r,c)}Ga(e,e.contentOf(c)??[],n,r,Wa(l,i),a||l===`w:txbxContent`),l===`w:p`&&r.afterParagraph(c)}}},Ka=(e,t)=>t.flatMap(t=>{let n=e.nameOf(t);return n===void 0?[]:n===`w:sectPr`?[t]:Ka(e,e.contentOf(t)??[])}),qa=(e,t)=>(e.contentOf(t)??[]).some(t=>e.nameOf(t)===`w:pPr`&&(e.contentOf(t)??[]).some(t=>e.nameOf(t)===`w:sectPr`)),Ja=(e,t,n)=>{let r=Ka(e,[t]).reduce((t,n)=>{let r=(e.contentOf(n)??[]).flatMap(t=>{let n=e.nameOf(t);return n===`w:headerReference`||n===`w:footerReference`?[[`${n} ${String(e.attributeOf(t,`w:type`))}`,String(e.attributeOf(t,`r:id`))]]:[]});return[...t,new Map([...t[t.length-1]??[],...r])]},[]).reduce((e,t,r)=>{for(let i of t.values())e.set(i,[...e.get(i)??[],n[r]]);return e},new Map);return new Map([...r].flatMap(([e,[t,...n]])=>t!==void 0&&n.every(e=>e===t)?[[e,t]]:[]))},Ya=(e,t,n,{blank:r})=>{let{sectionPageCounts:i=[],relativePositions:a}=n,o=0,s=new Map,c=e=>{var t;let n=s.get(e)??0;return s.set(e,n+1),a==null||(t=a.get(e))==null?void 0:t[n]};return Ga(e,[t],[],{resultOf:(e,t)=>Ua(e,t,{estimate:n,sectionPageCount:i[o],blank:r,relativeTo:c}),afterParagraph:t=>{o+=+!!qa(e,t)}}),Ja(e,t,i)},Xa=(e,t,n,{blank:r,sectionPageCount:i,notes:a=!1})=>{let o=e=>{let t=n.bookmarks.get(e);return t===void 0?void 0:`on page ${t}`};Ga(e,[t],[],{resultOf:(e,t)=>Ua(e,t,C({estimate:n,sectionPageCount:i,blank:r},a?{relativeTo:o}:{})),afterParagraph:()=>void 0})},Za=(e,t,{beforeParagraph:n,resultOf:r})=>Ga(e,[t],[],{resultOf:(e,{within:t})=>r(e,t),beforeParagraph:n,afterParagraph:()=>void 0}),Qa=class extends b{constructor(e={}){super(`w:instrText`),_(this,`properties`,void 0),this.properties=e,this.root.push(new Wn({space:Un.PRESERVE}));let t=`TOC`;if(this.properties.captionLabel&&(t=`${t} \\a "${this.properties.captionLabel}"`),this.properties.entriesFromBookmark&&(t=`${t} \\b "${this.properties.entriesFromBookmark}"`),this.properties.captionLabelIncludingNumbers&&(t=`${t} \\c "${this.properties.captionLabelIncludingNumbers}"`),this.properties.sequenceAndPageNumbersSeparator&&(t=`${t} \\d "${this.properties.sequenceAndPageNumbersSeparator}"`),this.properties.tcFieldIdentifier&&(t=`${t} \\f "${this.properties.tcFieldIdentifier}"`),this.properties.hyperlink&&(t=`${t} \\h`),this.properties.tcFieldLevelRange&&(t=`${t} \\l "${this.properties.tcFieldLevelRange}"`),this.properties.pageNumbersEntryLevelsRange&&(t=`${t} \\n "${this.properties.pageNumbersEntryLevelsRange}"`),this.properties.headingStyleRange&&(t=`${t} \\o "${this.properties.headingStyleRange}"`),this.properties.entryAndPageNumberSeparator&&(t=`${t} \\p "${this.properties.entryAndPageNumberSeparator}"`),this.properties.seqFieldIdentifierForPrefix&&(t=`${t} \\s "${this.properties.seqFieldIdentifierForPrefix}"`),this.properties.stylesWithLevels&&this.properties.stylesWithLevels.length){let e=this.properties.stylesWithLevels.map(e=>`${e.styleName},${e.level}`).join(`,`);t=`${t} \\t "${e}"`}this.properties.useAppliedParagraphOutlineLevel&&(t=`${t} \\u`),this.properties.preserveTabInEntries&&(t=`${t} \\w`),this.properties.preserveNewLineInEntries&&(t=`${t} \\x`),this.properties.hideTabAndPageNumbersInWebView&&(t=`${t} \\z`),this.root.push(t)}},$a=class extends b{constructor(){super(`w:sdtContent`)}},eo=e=>e===void 0?zn():In(e),to=new WeakMap,no=class{constructor(){_(this,`ids`,[])}get(e){var t;return(t=this.ids)[e]??(t[e]=Br()),this.ids[e]}},ro=e=>typeof e==`object`&&e?Object.keys(e)[0]:void 0,io=e=>{let t=ro(e),n=t===void 0?void 0:e[t];return Array.isArray(n)?n:n===void 0?[]:[n]},ao=(e,t)=>io(e).find(e=>ro(e)===t),oo=(e,t)=>{var n;return(n=ao(e,`_attr`))==null||(n=n._attr)==null?void 0:n[t]},so=(e,t)=>{let n=oo(e,t);return n===void 0?void 0:Number(n)},co=new Set([`w:tbl`,`w:tr`,`w:tc`,`w:sdt`,`w:sdtContent`,`w:customXml`]),lo=e=>e.flatMap(e=>{let t=ro(e);return t===`w:p`||to.has(e)?[e]:t!==void 0&&co.has(t)?lo(io(e)):[]}),uo=new Set([`w:r`,`w:hyperlink`,`w:ins`,`w:moveTo`,`w:smartTag`,`w:customXml`,`w:sdt`,`w:sdtContent`,`w:fldSimple`,`w:dir`,`w:bdo`]),fo=e=>{switch(ro(e)){case`w:t`:return io(e).filter(e=>typeof e==`string`).join(``);case`w:tab`:return` `;case`w:br`:return[void 0,`textWrapping`].includes(oo(e,`w:type`))?`
|
|
21
|
+
`:``;case`w:cr`:return`
|
|
22
|
+
`;case`w:noBreakHyphen`:return`-`;default:return``}},po=e=>{let t=[],n=e=>{let r=ro(e);if(r!==void 0&&uo.has(r))return io(e).map(n).join(``);if(r===`w:fldChar`){let n=oo(e,`w:fldCharType`);return n===`begin`?t.push(!1):n===`separate`?t[t.length-1]=!0:t.pop(),``}return t.every(Boolean)?fo(e):``};return io(e).map(n).join(``)},mo=e=>{let t=ro(e);return t===`w:bookmarkStart`?[{start:!0,id:oo(e,`w:id`),name:oo(e,`w:name`)}]:t===`w:bookmarkEnd`?[{start:!1,id:oo(e,`w:id`)}]:t===void 0||t===`_attr`?[]:io(e).flatMap(mo)},ho=e=>{let t=new Map;return e.map(e=>{let n=mo(e),r=new Set([...t.values(),...n.flatMap(e=>e.start?[e.name]:[])]);for(let e of n)e.start?t.set(e.id,e.name):t.delete(e.id);return r})},go=(e,t)=>{let n=t?ho(e):[];return e.map((e,t)=>{let r=ao(e,`w:pPr`);return{element:e,styleId:oo(ao(r,`w:pStyle`),`w:val`),outlineLevel:so(ao(r,`w:outlineLvl`),`w:val`),text:po(e),bookmarks:n[t]??new Set}})},_o=e=>{var t;let n=(t=e.file)==null||(t=t.Styles)==null?void 0:t.prepForXml(e);return new Map(io(n).filter(e=>ro(e)===`w:style`&&[`paragraph`,void 0].includes(oo(e,`w:type`))).map(e=>[oo(e,`w:styleId`),{name:oo(ao(e,`w:name`),`w:val`),basedOn:oo(ao(e,`w:basedOn`),`w:val`),outlineLevel:so(ao(ao(e,`w:pPr`),`w:outlineLvl`),`w:val`)}]))},vo=e=>{let t=/^\s*(\d+)\s*-\s*(\d+)\s*$/.exec(e);return t?[Number(t[1]),Number(t[2])]:void 0},yo=(e,[t,n])=>e>=t&&e<=n,bo=(e,t)=>{if(e===void 0)return;let n=/^heading ?([1-9])$/i.exec(t.get(e)?.name??e);return n?Number(n[1]):void 0},xo=(e,t,n=0)=>{if(e===void 0||n>t.size)return;let r=t.get(e),i=bo(e,t);return r?.outlineLevel??(i===void 0?xo(r?.basedOn,t,n+1):i-1)},So=e=>{let t=_o(e);return e=>{let n=ao(e,`w:pPr`),r=oo(ao(n,`w:pStyle`),`w:val`),i=bo(r,t),a=Co({styleId:r,outlineLevel:so(ao(n,`w:outlineLvl`),`w:val`)},t),o=a===void 0||a>=9?void 0:a+1;return i!==void 0&&(o===void 0||o===i)?i:o===void 0?void 0:`unclear`}},Co=(e,t)=>e.outlineLevel??xo(e.styleId,t),wo=(e,t,n)=>{let{entriesFromBookmark:r,headingStyleRange:i,stylesWithLevels:a=[],useAppliedParagraphOutlineLevel:o}=e;if(t.text.trim()===``||r&&!t.bookmarks.has(r))return;let s=[t.styleId,t.styleId===void 0?void 0:n.get(t.styleId)?.name].filter(e=>e!==void 0).map(e=>e.toLowerCase()),c=a.find(e=>s.includes(e.styleName.toLowerCase()));if(c)return c.level;let l=!!i||a.length>0||!!o||!!e.tcFieldIdentifier||!!e.tcFieldLevelRange||!!e.captionLabel||!!e.captionLabelIncludingNumbers,u=i?vo(i):l?void 0:[1,9],d=bo(t.styleId,n);if(u&&d!==void 0&&yo(d,u))return d;let f=o?Co(t,n):void 0;return f!==void 0&&yo(f+1,u??[1,9])?f+1:void 0},To=(e,t)=>{let n=t.preserveTabInEntries?e:e.replace(/\t/g,` `);return(t.preserveNewLineInEntries?n.split(`
|
|
23
|
+
`):[n.replace(/\n/g,` `)]).map((e,t)=>new vr({break:t>0?1:void 0,children:e.split(` `).flatMap((e,t)=>[...t>0?[new os]:[],...e===``?[]:[e]])}))},Eo=(e,t)=>{let n=[...t].find(([,t])=>t.name?.toLowerCase()===`toc ${e}`)?.[0],r=n??`TOC${e}`;return n!==void 0||t.has(r)||e===1?{id:r}:{id:r,indent:(e-1)*220}},Do=({properties:e,beginDirty:t,textWidth:n},r,i,a)=>{let o=e.pageNumbersEntryLevelsRange?vo(e.pageNumbersEntryLevelsRange)??[1,9]:void 0,s=new $a;return r.forEach((r,a)=>{let c=o===void 0||!yo(r.level,o),l=[...To(r.title,e),...c?[new vr({children:[e.entryAndPageNumberSeparator||new os]}),new As(r.bookmark,{hyperlink:e.hyperlink})]:[]],u=Eo(r.level,i);s.addChildElement(new Q({style:u.id,indent:u.indent===void 0?void 0:{left:u.indent},tabStops:[{type:`right`,position:n,leader:`dot`}],children:[...a===0?[new _r({children:[eo(t),new Qa(e),Vn()]})]:[],...e.hyperlink?[new xs({anchor:r.bookmark,children:l})]:l]}))}),s.addChildElement(new Q({children:[new _r({children:[Hn()]})]})),s.prepForXml(a)},Oo=(e,t,n,r)=>{let i=io(e),a=i.findIndex(e=>ro(e)===`w:pPr`)+1;e[`w:p`]=[...i.slice(0,a),new Es(t,n).prepForXml(r),...i.slice(a),new Ds(n).prepForXml(r)]},ko=(e,t,n)=>{let r=lo(io(e)),i=r.flatMap(e=>{let t=to.get(e);return t?[[e,t]]:[]});if(i.length===0)return;let a=_o(t),o=i.some(([,{properties:e}])=>!!e.entriesFromBookmark),s=go(r.filter(e=>ro(e)===`w:p`),o).map(e=>({paragraph:e,levels:i.map(([,{properties:t}])=>wo(t,e,a))})).filter(({levels:e})=>e.some(e=>e!==void 0)).map((e,t)=>C(C({},e),{},{id:n.get(t)}));for(let{paragraph:e,id:n}of s)Oo(e.element,`_Toc${n}`,n,t);i.forEach(([e,n],r)=>{let i=s.flatMap(({paragraph:e,levels:t,id:n})=>{let i=t[r];return i===void 0?[]:[{title:e.text,level:i,bookmark:`_Toc${n}`}]});i.length!==0&&(e[`w:sdt`]=io(e).map(e=>ro(e)===`w:sdtContent`?Do(n,i,a,t):e))})},Ao=RegExp(`^\\p{L}[\\p{L}\\p{N}_]*$`,`u`),jo=e=>{let t,n=!1,r,i=!1,a=!1;for(let o=0;o<e.length;o++){let s=e[o],c=e[o+1]??``,l;if(o===0&&!s.startsWith(`\\`))l={type:`bookmark`};else if(s===`\\c`||s===`\\n`)l={type:s===`\\c`?`repeat`:`next`};else if((s===`\\r`||s===`\\s`)&&/^\d+$/.test(c))o++,l=s===`\\r`?{type:`reset`,to:Number(c)}:{type:`heading`,level:Number(c)};else if(s===`\\h`)n=!0;else if(s===`\\#`&&o+1<e.length)o++,a=!0;else if(s===`\\*`&&o+1<e.length){let t=e[++o];if(La.has(t.toLowerCase()))i=!0;else if(!Ia.has(t.toLowerCase())){if(r!==void 0)return;r=t}}else return;if(l&&t)return;t=l??t}if(t?.type===`bookmark`&&e.length>1)return;let o=!a&&!(i&&r!==void 0&&r.toLowerCase()!==`arabic`);return{step:t??{type:`next`},hidden:n&&r===void 0,format:o?r??`ARABIC`:``}},Mo=e=>{let t=RegExp(`^\\s*SEQ\\b(.*)$`,`is`).exec(e);if(!t)return;let[n,...r]=t[1].match(/"[^"]*"|\S+/g)??[];if(n===void 0)return{};let i=n.replace(/^"(.*)"$/,`$1`);return Ao.test(i)?{identifier:i,sequence:jo(r)}:{identifier:i}},No=e=>Mo(e)!==void 0,Po=e=>typeof e!=`object`||!e?[]:Array.isArray(e)?e.flatMap(Po):Object.entries(e).flatMap(([e,t])=>[...(e===`w:instrText`&&Array.isArray(t)?t:e===`_attr`?[t[`w:instr`]]:[]).flatMap(e=>{let t=typeof e==`string`?Mo(e):void 0;return t?.identifier===void 0?[]:[t.identifier.toLowerCase()]}),...Po(t)]),Fo=e=>{let t=e.file?.Comments;if(!t)return new Set;let n={View:t,Relationships:t.Relationships};return new Set(Po(t.prepForXml(C(C({},e),{},{viewWrapper:n,stack:[]}))))},Io=e=>{let t=So(e),n=new Map,r=new Map,i=[],a=-1,o=-1,s,c=(e,t)=>{let n=Math.max(-1,...i.slice(1,t+1).filter(e=>e!==void 0)),o=(r.get(e)??[]).filter(e=>e.paragraph>=n),s=o.every(({step:e})=>e?.type===`next`||e?.type===`heading`&&e.level===t);if(!(a>n||!s))return o.length+1};return{startParagraph:e=>{o++;let n=t(e);n===`unclear`?a=o:n!==void 0&&(i[n]=o)},numberOf:(t,i)=>{let{identifier:a,sequence:l}=Mo(t);if(a===void 0||i===`fallback`)return;s??=Fo(e);let u=a.toLowerCase();if(l?.step.type===`bookmark`&&i===`counted`&&!s.has(u))return;let d=n.has(u)?n.get(u):0,f=s.has(u)||i===`deleted`?void 0:l?.step,p=f?.type===`reset`?f.to:f?.type===`repeat`?d:f?.type===`heading`?c(u,f.level):f?.type===`next`&&d!==void 0?d+1:void 0;return n.set(u,p),r.set(u,[...r.get(u)??[],C({paragraph:o},p===void 0?{}:{step:f})]),p===void 0||l===void 0?void 0:l.hidden?``:Fa(l.format)?.(p)}}},Lo=e=>{let t=typeof e==`object`&&e&&!Array.isArray(e)?Object.keys(e)[0]:void 0;return t===`_attr`?void 0:t},Ro=e=>({"w:t":[{_attr:{"xml:space":`preserve`}},e]}),zo={nameOf:Lo,contentOf:e=>{let t=e[Lo(e)];return Array.isArray(t)?t:void 0},attributeOf:(e,t)=>{var n;let r=e[Lo(e)],i=Array.isArray(r)?r.find(e=>typeof e==`object`&&!!e&&`_attr`in e):r;return i==null||(n=i._attr)==null?void 0:n[t]},textOf:e=>zo.contentOf(e).filter(e=>typeof e==`string`).join(``),textElement:Ro,writeClean:e=>{if(Bn(e)){let t=e[`w:fldChar`]._attr;e[`w:fldChar`]={_attr:Object.fromEntries(Object.entries(t).filter(([e])=>e!==`w:dirty`))}}},setSimpleFieldResult:(e,t)=>{let n=e[`w:fldSimple`];e[`w:fldSimple`]=[...(Array.isArray(n)?n:[n]).filter(e=>typeof e==`object`&&!!e&&`_attr`in e),{"w:r":[Ro(t)]}]}},Bo=new WeakMap,Vo=(e,t)=>{let{startParagraph:n,numberOf:r}=Io(t);Za(zo,e,{beforeParagraph:e=>n(e),resultOf:(e,t)=>No(e)?r(e,t):void 0})},Ho=(e,t,n)=>{let r=n(e,t),i=Ya(zo,e,r,{blank:!1});t.file&&Bo.set(t.file,{estimate:r,partPageCounts:i})},Uo=(e,t,n)=>{let r=t.file&&Bo.get(t.file);if(!e||!r)return;let i=n===void 0?void 0:r.partPageCounts.get(`rId${n}`),a=`w:footnotes`in e||`w:endnotes`in e;Xa(zo,e,r.estimate,{blank:!1,sectionPageCount:i,notes:a})},Wo=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{xmlns:`xmlns`})}},Go=class e extends b{constructor(){super(`Relationships`),this.root.push(new Wo({xmlns:`http://schemas.openxmlformats.org/package/2006/relationships`}))}addRelationship(e,t,n,r){this.root.push(oa(`rId${e}`,t,n,r))}static copy(t){let n=new e;return n.root.push(...t.root.slice(1)),n}get RelationshipCount(){return this.root.length-1}},Ko=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{id:`w:id`,initials:`w:initials`,author:`w:author`,date:`w:date`})}},qo=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{"xmlns:wpc":`xmlns:wpc`,"xmlns:cx":`xmlns:cx`,"xmlns:cx1":`xmlns:cx1`,"xmlns:cx2":`xmlns:cx2`,"xmlns:cx3":`xmlns:cx3`,"xmlns:cx4":`xmlns:cx4`,"xmlns:cx5":`xmlns:cx5`,"xmlns:cx6":`xmlns:cx6`,"xmlns:cx7":`xmlns:cx7`,"xmlns:cx8":`xmlns:cx8`,"xmlns:mc":`xmlns:mc`,"xmlns:aink":`xmlns:aink`,"xmlns:am3d":`xmlns:am3d`,"xmlns:o":`xmlns:o`,"xmlns:r":`xmlns:r`,"xmlns:m":`xmlns:m`,"xmlns:v":`xmlns:v`,"xmlns:wp14":`xmlns:wp14`,"xmlns:wp":`xmlns:wp`,"xmlns:w10":`xmlns:w10`,"xmlns:w":`xmlns:w`,"xmlns:w14":`xmlns:w14`,"xmlns:w15":`xmlns:w15`,"xmlns:w16cex":`xmlns:w16cex`,"xmlns:w16cid":`xmlns:w16cid`,"xmlns:w16":`xmlns:w16`,"xmlns:w16sdtdh":`xmlns:w16sdtdh`,"xmlns:w16se":`xmlns:w16se`,"xmlns:wpg":`xmlns:wpg`,"xmlns:wpi":`xmlns:wpi`,"xmlns:wne":`xmlns:wne`,"xmlns:wps":`xmlns:wps`,"mc:Ignorable":`mc:Ignorable`})}},Jo=class extends b{constructor({id:e,initials:t,author:n,date:r=new Date,children:i},a){super(`w:comment`),_(this,`paraId`,void 0),this.paraId=a,this.root.push(new Ko({id:e,initials:t,author:n,date:r.toISOString()}));for(let e of i)this.root.push(e)}prepForXml(e){let t=super.prepForXml(e);if(!t||!this.paraId)return t;let n=t[`w:comment`];if(!Array.isArray(n))return t;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t&&typeof t==`object`&&`w:p`in t){let e=t[`w:p`];Array.isArray(e)&&e.unshift({_attr:{"w14:paraId":this.paraId,"w14:textId":this.paraId}});break}}return t}},Yo=e=>(e+1).toString(16).toUpperCase().padStart(8,`0`),Xo=class extends b{constructor({children:e}){super(`w:comments`),_(this,`relationships`,void 0),_(this,`threadData`,void 0),_(this,`commentIdsData`,void 0),_(this,`isEmpty`,void 0),this.isEmpty=e.length===0,this.root.push(new qo({"xmlns:wpc":`http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas`,"xmlns:cx":`http://schemas.microsoft.com/office/drawing/2014/chartex`,"xmlns:cx1":`http://schemas.microsoft.com/office/drawing/2015/9/8/chartex`,"xmlns:cx2":`http://schemas.microsoft.com/office/drawing/2015/10/21/chartex`,"xmlns:cx3":`http://schemas.microsoft.com/office/drawing/2016/5/9/chartex`,"xmlns:cx4":`http://schemas.microsoft.com/office/drawing/2016/5/10/chartex`,"xmlns:cx5":`http://schemas.microsoft.com/office/drawing/2016/5/11/chartex`,"xmlns:cx6":`http://schemas.microsoft.com/office/drawing/2016/5/12/chartex`,"xmlns:cx7":`http://schemas.microsoft.com/office/drawing/2016/5/13/chartex`,"xmlns:cx8":`http://schemas.microsoft.com/office/drawing/2016/5/14/chartex`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"xmlns:aink":`http://schemas.microsoft.com/office/drawing/2016/ink`,"xmlns:am3d":`http://schemas.microsoft.com/office/drawing/2017/model3d`,"xmlns:o":`urn:schemas-microsoft-com:office:office`,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"xmlns:m":`http://schemas.openxmlformats.org/officeDocument/2006/math`,"xmlns:v":`urn:schemas-microsoft-com:vml`,"xmlns:wp14":`http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing`,"xmlns:wp":`http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing`,"xmlns:w10":`urn:schemas-microsoft-com:office:word`,"xmlns:w":`http://schemas.openxmlformats.org/wordprocessingml/2006/main`,"xmlns:w14":`http://schemas.microsoft.com/office/word/2010/wordml`,"xmlns:w15":`http://schemas.microsoft.com/office/word/2012/wordml`,"xmlns:w16cex":`http://schemas.microsoft.com/office/word/2018/wordml/cex`,"xmlns:w16cid":`http://schemas.microsoft.com/office/word/2016/wordml/cid`,"xmlns:w16":`http://schemas.microsoft.com/office/word/2018/wordml`,"xmlns:w16sdtdh":`http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash`,"xmlns:w16se":`http://schemas.microsoft.com/office/word/2015/wordml/symex`,"xmlns:wpg":`http://schemas.microsoft.com/office/word/2010/wordprocessingGroup`,"xmlns:wpi":`http://schemas.microsoft.com/office/word/2010/wordprocessingInk`,"xmlns:wne":`http://schemas.microsoft.com/office/word/2006/wordml`,"xmlns:wps":`http://schemas.microsoft.com/office/word/2010/wordprocessingShape`,"mc:Ignorable":`w14 w15 wp14`}));let t=e.some(e=>e.parentId!==void 0),n=e.some(e=>e.durableId!==void 0);if(t||n){let r=new Map(e.map(e=>[e.id,Yo(e.id)]));for(let t of e)this.root.push(new Jo(t,r.get(t.id)));t&&(this.threadData=e.map(e=>({paraId:r.get(e.id),parentParaId:e.parentId===void 0?void 0:r.get(e.parentId),done:e.resolved}))),n&&(this.commentIdsData=e.map(e=>({paraId:r.get(e.id),durableId:e.durableId??r.get(e.id)})))}else for(let t of e)this.root.push(new Jo(t));this.relationships=new Go}get Relationships(){return this.relationships}get ThreadData(){return this.threadData}get CommentIdsData(){return this.commentIdsData}get IsEmpty(){return this.isEmpty}prepForXml(e){let t=super.prepForXml(e);return Uo(t,e),t}},Zo=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{"xmlns:wpc":`xmlns:wpc`,"xmlns:mc":`xmlns:mc`,"xmlns:w15":`xmlns:w15`,"mc:Ignorable":`mc:Ignorable`})}},Qo=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{paraId:`w15:paraId`,paraIdParent:`w15:paraIdParent`,done:`w15:done`})}},$o=class extends b{constructor(e){super(`w15:commentEx`),this.root.push(new Qo({paraId:e.paraId,paraIdParent:e.parentParaId,done:e.done===void 0?void 0:e.done?`1`:`0`}))}},es=class extends b{constructor(e){super(`w15:commentsEx`),this.root.push(new Zo({"xmlns:wpc":`http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"xmlns:w15":`http://schemas.microsoft.com/office/word/2012/wordml`,"mc:Ignorable":`w15`}));for(let t of e)this.root.push(new $o(t))}},ts=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{paraId:`w16cid:paraId`,durableId:`w16cid:durableId`})}},ns=class extends b{constructor(e){super(`w16cid:commentId`),this.root.push(new ts({paraId:e.paraId,durableId:e.durableId}))}},rs=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{"xmlns:w16cid":`xmlns:w16cid`,"xmlns:mc":`xmlns:mc`,"mc:Ignorable":`mc:Ignorable`})}},is=class extends b{constructor(e){super(`w16cid:commentsIds`),this.root.push(new rs({"xmlns:w16cid":`http://schemas.microsoft.com/office/word/2016/wordml/cid`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`w16cid`}));for(let t of e)this.root.push(new ns(t))}},as=class extends Qt{constructor(){super(`w:endnoteRef`)}},os=class extends Qt{constructor(){super(`w:tab`)}},ss=class extends b{constructor(){super(`w:pageBreakBefore`)}},cs={AT_LEAST:`atLeast`,EXACTLY:`exactly`,EXACT:`exact`,AUTO:`auto`},ls=({after:e,before:t,line:n,lineRule:r,beforeAutoSpacing:i,afterAutoSpacing:a})=>new X({name:`w:spacing`,attributes:{after:{key:`w:after`,value:e},before:{key:`w:before`,value:t},line:{key:`w:line`,value:n},lineRule:{key:`w:lineRule`,value:r},beforeAutoSpacing:{key:`w:beforeAutospacing`,value:i},afterAutoSpacing:{key:`w:afterAutospacing`,value:a}}}),us={HEADING_1:`Heading1`,HEADING_2:`Heading2`,HEADING_3:`Heading3`,HEADING_4:`Heading4`,HEADING_5:`Heading5`,HEADING_6:`Heading6`,TITLE:`Title`},ds=e=>new X({name:`w:pStyle`,attributes:{val:{key:`w:val`,value:e}}}),fs={LEFT:`left`,RIGHT:`right`,CENTER:`center`,BAR:`bar`,CLEAR:`clear`,DECIMAL:`decimal`,END:`end`,NUM:`num`,START:`start`},ps=({type:e,position:t,leader:n})=>new X({name:`w:tab`,attributes:{val:{key:`w:val`,value:e},pos:{key:`w:pos`,value:Ut(t)},leader:{key:`w:leader`,value:n}}}),ms=e=>new X({name:`w:tabs`,children:e.map(e=>ps(e))}),hs=class extends b{constructor(e,t){super(`w:numPr`),this.root.push(new gs(t)),this.root.push(new _s(e))}},gs=class extends b{constructor(e){if(super(`w:ilvl`),e>9)throw Error(`Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7`);this.root.push(new E({val:e}))}},_s=class extends b{constructor(e){super(`w:numId`),this.root.push(new E({val:typeof e==`string`?`{${e}}`:e}))}},vs=class extends b{constructor(...e){super(...e),_(this,`fileChild`,Symbol())}},ys=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{id:`r:id`,history:`w:history`,anchor:`w:anchor`})}},bs=class extends b{constructor(e,t,n,r){super(`w:hyperlink`),_(this,`linkId`,void 0),_(this,`drawingLink`,void 0),this.linkId=t,this.drawingLink=n&&r!==void 0?new ua(r):void 0;let i=new ys({history:1,anchor:n||void 0,id:!n||r!==void 0?`rId${this.linkId}`:void 0});this.root.push(i),e.forEach(e=>{this.root.push(e)})}createDrawingClick(e,t){return this.drawingLink?(this.drawingLink.addRelationship(e),this.drawingLink.createClick(t)):sa(this.linkId,t)}},xs=class extends bs{constructor(e){super(e.children,Vr(),e.anchor)}},Ss=class extends b{constructor(e){super(`w:externalHyperlink`),_(this,`options`,void 0),this.options=e}},Cs=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{id:`w:id`,name:`w:name`})}},ws=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{id:`w:id`})}},Ts=class e{constructor(e){_(this,`start`,void 0),_(this,`children`,void 0),_(this,`end`,void 0);let t=Br();this.start=new Es(e.id,t),this.children=e.children,this.end=new Ds(t)}get writtenAs(){return[this.start,...this.children.flatMap(t=>t instanceof e?t.writtenAs:[t]),this.end]}},Es=class extends b{constructor(e,t){super(`w:bookmarkStart`);let n=new Cs({name:e,id:t});this.root.push(n)}},Ds=class extends b{constructor(e){super(`w:bookmarkEnd`);let t=new ws({id:e});this.root.push(t)}},Os=e=>new X({name:`w:outlineLvl`,attributes:{val:{key:`w:val`,value:e}}}),ks=class extends b{constructor(e,t={}){super(`w:instrText`),this.root.push(new Wn({space:Un.PRESERVE}));let n=`PAGEREF ${e}`;t.hyperlink&&(n=`${n} \\h`),t.useRelativePosition&&(n=`${n} \\p`),this.root.push(n)}},As=class extends _r{constructor(e,t={}){super({children:[zn(),new ks(e,t),Vn(),Hn()]})}},js=255,Ms=e=>{let t=e.indexOf(`#`),n=e.length-t-1;return t>0&&n>0&&n<=js?{target:e.slice(0,t),anchor:e.slice(t+1)}:{target:e}},Ns=({id:e,fontKey:t,subsetted:n},r)=>new X({name:r,attributes:C({id:{key:`r:id`,value:e}},t?{fontKey:{key:`w:fontKey`,value:`{${t.toUpperCase()}}`}}:{}),children:[...n?[new Y(`w:subsetted`,n)]:[]]}),Ps=({name:e,altName:t,panose1:n,charset:r,family:i,notTrueType:a,pitch:o,sig:s,embedRegular:c,embedBold:l,embedItalic:u,embedBoldItalic:d})=>new X({name:`w:font`,attributes:{name:{key:`w:name`,value:e}},children:[...t?[en(`w:altName`,t)]:[],...n?[en(`w:panose1`,n)]:[],...r?[en(`w:charset`,r)]:[],...i?[en(`w:family`,i)]:[],...a?[new Y(`w:notTrueType`,a)]:[],...o?[en(`w:pitch`,o)]:[],...s?[new X({name:`w:sig`,attributes:{usb0:{key:`w:usb0`,value:s.usb0},usb1:{key:`w:usb1`,value:s.usb1},usb2:{key:`w:usb2`,value:s.usb2},usb3:{key:`w:usb3`,value:s.usb3},csb0:{key:`w:csb0`,value:s.csb0},csb1:{key:`w:csb1`,value:s.csb1}}})]:[],...c?[Ns(c,`w:embedRegular`)]:[],...l?[Ns(l,`w:embedBold`)]:[],...u?[Ns(u,`w:embedItalic`)]:[],...d?[Ns(d,`w:embedBoldItalic`)]:[]]}),Fs=({name:e,characterSet:t,embedRegular:n,embedBold:r,embedItalic:i,embedBoldItalic:a})=>Ps({name:e,sig:{usb0:`E0002AFF`,usb1:`C000247B`,usb2:`00000009`,usb3:`00000000`,csb0:`000001FF`,csb1:`00000000`},charset:t,family:`auto`,pitch:`variable`,embedRegular:n,embedBold:r,embedItalic:i,embedBoldItalic:a}),Is=e=>new X({name:`w:fonts`,attributes:{mc:{key:`xmlns:mc`,value:`http://schemas.openxmlformats.org/markup-compatibility/2006`},r:{key:`xmlns:r`,value:`http://schemas.openxmlformats.org/officeDocument/2006/relationships`},w:{key:`xmlns:w`,value:`http://schemas.openxmlformats.org/wordprocessingml/2006/main`},w14:{key:`xmlns:w14`,value:`http://schemas.microsoft.com/office/word/2010/wordml`},w15:{key:`xmlns:w15`,value:`http://schemas.microsoft.com/office/word/2012/wordml`},w16cex:{key:`xmlns:w16cex`,value:`http://schemas.microsoft.com/office/word/2018/wordml/cex`},w16cid:{key:`xmlns:w16cid`,value:`http://schemas.microsoft.com/office/word/2016/wordml/cid`},w16:{key:`xmlns:w16`,value:`http://schemas.microsoft.com/office/word/2018/wordml`},w16sdtdh:{key:`xmlns:w16sdtdh`,value:`http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash`},w16se:{key:`xmlns:w16se`,value:`http://schemas.microsoft.com/office/word/2015/wordml/symex`},Ignorable:{key:`mc:Ignorable`,value:`w14 w15 w16se w16cid w16 w16cex w16sdtdh`}},children:e.map(Fs)}),Ls=[{option:`data`,element:`embedRegular`,bold:!1,italic:!1},{option:`bold`,element:`embedBold`,bold:!0,italic:!1},{option:`italic`,element:`embedItalic`,bold:!1,italic:!0},{option:`boldItalic`,element:`embedBoldItalic`,bold:!0,italic:!0}],Rs=class{constructor(e){_(this,`options`,void 0),_(this,`fontTable`,void 0),_(this,`relationships`,void 0),_(this,`fontOptionsWithKey`,[]),_(this,`files`,[]),this.options=e;let t=e.map(e=>Ls.flatMap(({option:t,element:n,bold:r,italic:i})=>{let a=e[t];return a?[{element:n,file:{name:e.name,data:a,bold:r,italic:i,fontKey:Wr()}}]:[]}));this.files=t.flatMap(e=>e.map(({file:e})=>e)),this.fontOptionsWithKey=e.map((e,n)=>C(C({},e),{},{fontKey:t[n][0].file.fontKey})),this.fontTable=Is(e.map((e,n)=>C({name:e.name,characterSet:e.characterSet},Object.fromEntries(t[n].map(({element:e,file:t})=>[e,{id:`rId${this.files.indexOf(t)+1}`,fontKey:t.fontKey}]))))),this.relationships=new Go;for(let e=0;e<this.files.length;e++)this.relationships.addRelationship(e+1,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/font`,`fonts/font${e+1}.odttf`)}get View(){return this.fontTable}get Relationships(){return this.relationships}},zs=()=>new X({name:`w:wordWrap`,attributes:{val:{key:`w:val`,value:0}}}),Bs=e=>new X({name:`w:framePr`,attributes:{anchorLock:{key:`w:anchorLock`,value:e.anchorLock},dropCap:{key:`w:dropCap`,value:e.dropCap},width:{key:`w:w`,value:e.width},height:{key:`w:h`,value:e.height},x:{key:`w:x`,value:e.position?e.position.x:void 0},y:{key:`w:y`,value:e.position?e.position.y:void 0},anchorHorizontal:{key:`w:hAnchor`,value:e.anchor.horizontal},anchorVertical:{key:`w:vAnchor`,value:e.anchor.vertical},spaceHorizontal:{key:`w:hSpace`,value:e.space?.horizontal},spaceVertical:{key:`w:vSpace`,value:e.space?.vertical},rule:{key:`w:hRule`,value:e.rule},alignmentX:{key:`w:xAlign`,value:e.alignment?e.alignment.x:void 0},alignmentY:{key:`w:yAlign`,value:e.alignment?e.alignment.y:void 0},lines:{key:`w:lines`,value:e.lines},wrap:{key:`w:wrap`,value:e.wrap}}}),Vs={left:`right`,right:`left`},Hs=class extends x{constructor(e,{implicitListParagraphStyle:t=!0}={}){if(super(`w:pPr`,e?.includeIfEmpty),_(this,`numberingReferences`,[]),!e)return this;if(e.heading&&this.push(ds(e.heading)),t&&(e.bullet&&this.push(ds(`ListParagraph`)),e.numbering&&!e.numbering.custom&&!e.style&&!e.heading&&this.push(ds(`ListParagraph`))),e.style&&this.push(ds(e.style)),e.keepNext!==void 0&&this.push(new Y(`w:keepNext`,e.keepNext)),e.keepLines!==void 0&&this.push(new Y(`w:keepLines`,e.keepLines)),e.pageBreakBefore&&this.push(new ss),e.frame&&this.push(Bs(e.frame)),e.widowControl!==void 0&&this.push(new Y(`w:widowControl`,e.widowControl)),e.bullet&&this.push(new hs(1,e.bullet.level)),e.numbering){let{reference:t,instance:n=0,level:r}=e.numbering,i=typeof t==`string`?t:t.reference;this.numberingReferences.push({reference:i,instance:n,definition:typeof t==`string`?void 0:t}),this.push(new hs(`${i}-${n}`,r))}else e.numbering===!1&&this.push(new hs(0,0));e.border&&this.push(new An(e.border)),e.thematicBreak&&this.push(new jn),e.shading&&this.push(Yn(e.shading)),e.wordWrap&&this.push(zs()),e.overflowPunctuation&&this.push(new Y(`w:overflowPunct`,e.overflowPunctuation));let n=[...e.rightTabStop===void 0?[]:[{type:fs.RIGHT,position:e.rightTabStop}],...e.tabStops?e.tabStops:[],...e.leftTabStop===void 0?[]:[{type:fs.LEFT,position:e.leftTabStop}]];n.length>0&&this.push(ms(n)),e.bidirectional!==void 0&&this.push(new Y(`w:bidi`,e.bidirectional)),e.spacing&&this.push(ls(e.spacing)),e.indent&&this.push(Mn(e.indent)),e.contextualSpacing!==void 0&&this.push(new Y(`w:contextualSpacing`,e.contextualSpacing)),e.alignment&&this.push(an(e.bidirectional&&Vs[e.alignment]||e.alignment)),e.outlineLevel!==void 0&&this.push(Os(e.outlineLevel)),e.suppressLineNumbers!==void 0&&this.push(new Y(`w:suppressLineNumbers`,e.suppressLineNumbers)),e.autoSpaceEastAsianText!==void 0&&this.push(new Y(`w:autoSpaceDN`,e.autoSpaceEastAsianText)),e.run&&this.push(new pr(e.run)),e.revision&&this.push(new Us(e.revision))}push(e){this.root.push(e)}addSectionProperties(e){let t=this.root.findIndex(e=>e instanceof Us);t===-1?this.root.push(e):this.root.splice(t,0,e)}removeSectionProperties(e){let t=this.root.indexOf(e);t!==-1&&this.root.splice(t,1)}prepForXml(e){if(!(e.viewWrapper instanceof Rs))for(let{reference:t,instance:n,definition:r}of this.numberingReferences)e.file.Numbering.createConcreteNumberingInstance(t,n,r);return super.prepForXml(e)}},Us=class extends b{constructor(e){super(`w:pPrChange`),this.root.push(new Zn({id:e.id,author:e.author,date:e.date})),this.root.push(new Hs(C(C({},e),{},{includeIfEmpty:!0})))}},Q=class extends vs{constructor(e){if(super(`w:p`),_(this,`properties`,void 0),typeof e==`string`)return this.properties=new Hs({}),this.root.push(this.properties),this.root.push(new vr(e)),this;if(this.properties=new Hs(e),this.root.push(this.properties),e.text&&this.root.push(new vr(e.text)),e.children)for(let t of e.children)t instanceof Ts?this.root.push(...t.writtenAs):this.root.push(t)}prepForXml(e){for(let t of this.root)if(t instanceof Ss){let n=this.root.indexOf(t),{target:r,anchor:i}=Ms(t.options.link),a=new bs(t.options.children,Vr(),i,t.options.link);e.viewWrapper.Relationships.addRelationship(a.linkId,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink`,r,aa.EXTERNAL),this.root[n]=a}return super.prepForXml(e)}addSectionProperties(e){this.properties.addSectionProperties(e)}removeSectionProperties(e){this.properties.removeSectionProperties(e)}addRunToFront(e){return this.root.splice(1,0,e),this}},Ws=class extends b{constructor(e){super(`m:oMath`);for(let t of e.children)this.root.push(t)}},Gs=class extends b{constructor(e){super(`m:t`),/^[\s\u200B]|[\s\u200B]$/.test(e)&&this.root.push(new Wn({space:Un.PRESERVE})),this.root.push(e)}};function Ks(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function qs(e,t){if(e==null)return{};var n,r,i=Ks(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Js=[`text`,`normalText`,`script`,`literal`],Ys={plain:`p`,bold:`b`,italic:`i`,boldItalic:`bi`},Xs={roman:`roman`,script:`script`,fraktur:`fraktur`,doubleStruck:`double-struck`,sansSerif:`sans-serif`,monospace:`monospace`},Zs=(e,t)=>new X({name:e,attributes:{value:{key:`m:val`,value:t}}}),Qs=class extends b{constructor(e){super(`m:r`);let t=typeof e==`string`?{text:e}:e,{text:n,normalText:r,script:i,literal:a}=t,o=qs(t,Js).style??(i===void 0||i===`roman`?void 0:`plain`);if(r&&(o!==void 0||i!==void 0))throw Error(`MathRun: normalText can't be given with style or script, which are for math. Give one or the other`);if(o!==void 0&&!Object.keys(Ys).includes(o))throw Error(`MathRun: style is "${o}", which isn't one of ${Object.keys(Ys).join(`, `)}`);if(i!==void 0&&!Object.keys(Xs).includes(i))throw Error(`MathRun: script is "${i}", which isn't one of ${Object.keys(Xs).join(`, `)}`);let s=[...a?[Zs(`m:lit`,1)]:[],...r?[Zs(`m:nor`,1)]:[],...i===void 0?[]:[Zs(`m:scr`,Xs[i])],...o===void 0?[]:[Zs(`m:sty`,Ys[o])]];s.length>0&&this.root.push(new X({name:`m:rPr`,children:s})),this.root.push(new Gs(n))}},$s=class extends b{constructor(e){super(`m:den`);for(let t of e)this.root.push(t)}},ec=class extends b{constructor(e){super(`m:num`);for(let t of e)this.root.push(t)}},tc={stacked:`bar`,skewed:`skw`,linear:`lin`,noBar:`noBar`},nc=class extends b{constructor(e){if(super(`m:f`),e.type!==void 0){if(!Object.keys(tc).includes(e.type))throw Error(`MathFraction: type is "${e.type}", which isn't one of ${Object.keys(tc).join(`, `)}`);this.root.push(new X({name:`m:fPr`,children:[new X({name:`m:type`,attributes:{value:{key:`m:val`,value:tc[e.type]}}})]}))}this.root.push(new ec(e.numerator)),this.root.push(new $s(e.denominator))}},rc=({accent:e})=>new X({name:`m:chr`,attributes:{accent:{key:`m:val`,value:e}}}),ic=({children:e})=>new X({name:`m:e`,children:e}),ac=({value:e})=>new X({name:`m:limLoc`,attributes:{value:{key:`m:val`,value:e||`undOvr`}}}),oc=()=>new X({name:`m:subHide`,attributes:{hide:{key:`m:val`,value:1}}}),sc=()=>new X({name:`m:supHide`,attributes:{hide:{key:`m:val`,value:1}}}),cc=({accent:e,hasSuperScript:t,hasSubScript:n,limitLocationVal:r})=>new X({name:`m:naryPr`,children:[...e?[rc({accent:e})]:[],ac({value:r}),...n?[]:[oc()],...t?[]:[sc()]]}),lc=({children:e})=>new X({name:`m:sub`,children:e}),uc={aboveBelow:`undOvr`,side:`subSup`},dc=(e,t,n)=>{if(t===void 0)return n;if(!Object.keys(uc).includes(t))throw Error(`${e}: limits is "${t}", which isn't one of ${Object.keys(uc).join(`, `)}`);return uc[t]},fc=({children:e})=>new X({name:`m:sup`,children:e}),pc=class extends b{constructor(e){super(`m:nary`),this.root.push(cc({accent:`∑`,hasSuperScript:!!e.superScript,hasSubScript:!!e.subScript,limitLocationVal:dc(`MathSum`,e.limits,`undOvr`)})),this.root.push(lc({children:e.subScript??[]})),this.root.push(fc({children:e.superScript??[]})),this.root.push(ic({children:e.children}))}},mc=class extends b{constructor(e){super(`m:nary`),this.root.push(cc({accent:``,hasSuperScript:!!e.superScript,hasSubScript:!!e.subScript,limitLocationVal:dc(`MathIntegral`,e.limits,`subSup`)})),this.root.push(lc({children:e.subScript??[]})),this.root.push(fc({children:e.superScript??[]})),this.root.push(ic({children:e.children}))}},hc=()=>new X({name:`m:sSupPr`}),gc=class extends b{constructor(e){super(`m:sSup`),this.root.push(hc()),this.root.push(ic({children:e.children})),this.root.push(fc({children:e.superScript}))}},_c=()=>new X({name:`m:sSubPr`}),vc=class extends b{constructor(e){super(`m:sSub`),this.root.push(_c()),this.root.push(ic({children:e.children})),this.root.push(lc({children:e.subScript}))}},yc=()=>new X({name:`m:sSubSupPr`}),bc=class extends b{constructor(e){super(`m:sSubSup`),this.root.push(yc()),this.root.push(ic({children:e.children})),this.root.push(lc({children:e.subScript})),this.root.push(fc({children:e.superScript}))}},xc=class extends b{constructor(e){if(super(`m:deg`),e)for(let t of e)this.root.push(t)}},Sc=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{hide:`m:val`})}},Cc=class extends b{constructor(){super(`m:degHide`),this.root.push(new Sc({hide:1}))}},wc=class extends b{constructor(e){super(`m:radPr`),e||this.root.push(new Cc)}},Tc=class extends b{constructor(e){super(`m:rad`),this.root.push(new wc(!!e.degree)),this.root.push(new xc(e.degree)),this.root.push(ic({children:e.children}))}},Ec=({character:e})=>new X({name:`m:begChr`,attributes:{character:{key:`m:val`,value:e}}}),Dc=({character:e})=>new X({name:`m:endChr`,attributes:{character:{key:`m:val`,value:e}}}),Oc=({characters:e})=>new X({name:`m:dPr`,children:e?[Ec({character:e.beginningCharacter}),Dc({character:e.endingCharacter})]:[]}),kc=class extends b{constructor(e){super(`m:d`),this.root.push(Oc({})),this.root.push(ic({children:e.children}))}};C(C({},{TOP:`top`,CENTER:`center`,BOTTOM:`bottom`}),{},{BOTH:`both`});var Ac=e=>new X({name:`w:vAlign`,attributes:{verticalAlign:{key:`w:val`,value:e}}}),jc=({space:e,count:t,separate:n,equalWidth:r,children:i})=>new X({name:`w:cols`,attributes:{space:{key:`w:space`,value:e===void 0?void 0:Gt(e)},count:{key:`w:num`,value:t===void 0?void 0:J(t)},separate:{key:`w:sep`,value:n},equalWidth:{key:`w:equalWidth`,value:r}},children:!r&&i?i:void 0}),Mc=({type:e,linePitch:t,charSpace:n})=>new X({name:`w:docGrid`,attributes:{type:{key:`w:type`,value:e},linePitch:{key:`w:linePitch`,value:J(t)},charSpace:{key:`w:charSpace`,value:n?J(n):void 0}}}),Nc={DEFAULT:`default`,FIRST:`first`,EVEN:`even`},Pc={HEADER:`w:headerReference`,FOOTER:`w:footerReference`},Fc=(e,t)=>new X({name:e,attributes:{type:{key:`w:type`,value:t.type||Nc.DEFAULT},id:{key:`r:id`,value:`rId${t.id}`}}}),Ic=({countBy:e,start:t,restart:n,distance:r})=>new X({name:`w:lnNumType`,attributes:{countBy:{key:`w:countBy`,value:e===void 0?void 0:J(e)},start:{key:`w:start`,value:t===void 0?void 0:J(t)},restart:{key:`w:restart`,value:n},distance:{key:`w:distance`,value:r===void 0?void 0:Gt(r)}}}),Lc=({name:e,position:t,numberFormat:n,start:r,restart:i})=>new X({name:e,children:[...t===void 0?[]:[new X({name:`w:pos`,attributes:{val:{key:`w:val`,value:t}}})],...n?[new X({name:`w:numFmt`,attributes:{val:{key:`w:val`,value:n.type},format:{key:`w:format`,value:n.format}}})]:[],...r===void 0?[]:[new X({name:`w:numStart`,attributes:{val:{key:`w:val`,value:J(r)}}})],...i===void 0?[]:[new X({name:`w:numRestart`,attributes:{val:{key:`w:val`,value:i}}})]]}),Rc=e=>Lc(C({name:`w:footnotePr`},e)),zc=e=>Lc(C({name:`w:endnotePr`},e)),Bc=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{display:`w:display`,offsetFrom:`w:offsetFrom`,zOrder:`w:zOrder`})}},Vc=class extends x{constructor(e){if(super(`w:pgBorders`),!e)return this;e.pageBorders?this.root.push(new Bc({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new Bc({})),e.pageBorderTop&&this.root.push(Z(`w:top`,e.pageBorderTop)),e.pageBorderLeft&&this.root.push(Z(`w:left`,e.pageBorderLeft)),e.pageBorderBottom&&this.root.push(Z(`w:bottom`,e.pageBorderBottom)),e.pageBorderRight&&this.root.push(Z(`w:right`,e.pageBorderRight))}},Hc=(e,t,n,r,i,a,o)=>new X({name:`w:pgMar`,attributes:{top:{key:`w:top`,value:Ut(e)},right:{key:`w:right`,value:Gt(t)},bottom:{key:`w:bottom`,value:Ut(n)},left:{key:`w:left`,value:Gt(r)},header:{key:`w:header`,value:Gt(i)},footer:{key:`w:footer`,value:Gt(a)},gutter:{key:`w:gutter`,value:Gt(o)}}}),Uc={HYPHEN:`hyphen`,PERIOD:`period`,COLON:`colon`,EM_DASH:`emDash`,EN_DASH:`endash`},Wc=({start:e,formatType:t,separator:n,chapterHeadingLevel:r})=>new X({name:`w:pgNumType`,attributes:{start:{key:`w:start`,value:e===void 0?void 0:J(e)},formatType:{key:`w:fmt`,value:t},separator:{key:`w:chapSep`,value:n===Uc.EN_DASH?`enDash`:n},chapterHeadingLevel:{key:`w:chapStyle`,value:r===void 0?void 0:J(r)}}}),Gc={PORTRAIT:`portrait`,LANDSCAPE:`landscape`},Kc=({width:e,height:t,orientation:n,code:r})=>{let i=Gt(e),a=Gt(t);return new X({name:`w:pgSz`,attributes:{width:{key:`w:w`,value:n===Gc.LANDSCAPE?a:i},height:{key:`w:h`,value:n===Gc.LANDSCAPE?i:a},orientation:{key:`w:orient`,value:n},code:{key:`w:code`,value:r}}})},qc=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{val:`w:val`})}},Jc=class extends b{constructor(e){super(`w:textDirection`),this.root.push(new qc({val:e}))}},Yc=e=>new X({name:`w:type`,attributes:{val:{key:`w:val`,value:e}}}),Xc={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},Zc={WIDTH:11906,HEIGHT:16838,ORIENTATION:Gc.PORTRAIT},Qc=class e extends b{constructor({page:{size:{width:t=Zc.WIDTH,height:n=Zc.HEIGHT,orientation:r=Zc.ORIENTATION,code:i}={},margin:{top:a=Xc.TOP,right:o=Xc.RIGHT,bottom:s=Xc.BOTTOM,left:c=Xc.LEFT,header:l=Xc.HEADER,footer:u=Xc.FOOTER,gutter:d=Xc.GUTTER}={},pageNumbers:f={},borders:p,textDirection:m}={},grid:{linePitch:h=360,charSpace:g,type:v}={},headerWrapperGroup:y={},footerWrapperGroup:b={},lineNumbers:x,titlePage:S,verticalAlign:C,column:w,type:T,footnoteProperties:E,endnoteProperties:D,revision:O}={}){super(`w:sectPr`),_(this,`availableTextWidth`,void 0),this.availableTextWidth=e.calculateAvailableTextWidth({pageWidth:r===Gc.LANDSCAPE?n:t,left:c,right:o,gutter:d,column:w}),this.addHeaderFooterGroup(Pc.HEADER,y),this.addHeaderFooterGroup(Pc.FOOTER,b),E&&this.root.push(Rc(E)),D&&this.root.push(zc(D)),T&&this.root.push(Yc(T)),this.root.push(Kc({width:t,height:n,orientation:r,code:i})),this.root.push(Hc(a,o,s,c,l,u,d)),p&&this.root.push(new Vc(p)),x&&this.root.push(Ic(x)),this.root.push(Wc(f)),w&&this.root.push(jc(w)),C&&this.root.push(Ac(C)),S!==void 0&&this.root.push(new Y(`w:titlePg`,S)),m&&this.root.push(new Jc(m)),this.root.push(Mc({linePitch:h,charSpace:g,type:v})),O&&this.root.push(new $c(O))}get AvailableTextWidth(){return this.availableTextWidth}static calculateAvailableTextWidth({pageWidth:e,left:t,right:n,gutter:r,column:i}){let a=Bt(e)-Bt(t)-Bt(n)-Bt(r),o=i?.count??1;return o<=1?a:(a-Bt(i?.space??720)*(o-1))/o}addHeaderFooterGroup(e,t){t.default&&this.root.push(Fc(e,{type:Nc.DEFAULT,id:t.default.View.ReferenceId})),t.first&&this.root.push(Fc(e,{type:Nc.FIRST,id:t.first.View.ReferenceId})),t.even&&this.root.push(Fc(e,{type:Nc.EVEN,id:t.even.View.ReferenceId}))}},$c=class extends b{constructor(e){super(`w:sectPrChange`),this.root.push(new Zn({id:e.id,author:e.author,date:e.date})),this.root.push(new Qc(e))}},el=class extends b{constructor({pageNumbers:e}={}){super(`w:body`),_(this,`sections`,[]),_(this,`sectionParagraphs`,new Map),_(this,`headingBookmarkIds`,new no),_(this,`pageNumbers`,void 0),this.pageNumbers=e}getSectionPropertiesFor(e){let t=e?Math.max(this.root.indexOf(e),0):0;for(let e=t;e<this.root.length;e++){let t=this.root[e];if(t instanceof Qc)return t;let n=this.sectionParagraphs.get(t);if(n)return n}return this.sections[this.sections.length-1]}addSection(e){let t=this.sections.pop(),n=this.lastParagraphOfSection();if(t&&n)this.sectionParagraphs.set(n,t);else{let e=this.createSectionParagraph();this.root.push(e),t&&this.sectionParagraphs.set(e,t)}this.sections.push(new Qc(e))}prepForXml(e){this.sections.length===1&&(this.root.splice(0,1),this.root.push(this.sections.pop()));for(let[e,t]of this.sectionParagraphs)e.addSectionProperties(t);let t;try{t=super.prepForXml(e)}finally{for(let[e,t]of this.sectionParagraphs)e.removeSectionProperties(t)}return ko(t,e,this.headingBookmarkIds),this.pageNumbers&&(Vo(t,e),Ho(t,e,this.pageNumbers)),t}push(e){let t=e instanceof Q?this.sectionParagraphs.get(e):void 0;if(t){let n=this.createSectionParagraph();this.root.splice(this.root.indexOf(e)+1,0,n),this.sectionParagraphs.delete(e),this.sectionParagraphs.set(n,t)}this.root.push(e)}lastParagraphOfSection(){let e=this.root[this.root.length-1];return e instanceof Q&&e!==this.root[0]&&!this.sectionParagraphs.has(e)&&this.root.indexOf(e)===this.root.length-1?e:void 0}createSectionParagraph(){return new Q({})}},tl={AUTO:`auto`,DXA:`dxa`,NIL:`nil`,PERCENTAGE:`pct`},nl=(e,{type:t=tl.AUTO,size:n})=>{let r=n;return t===tl.PERCENTAGE&&typeof n==`number`&&(r=Math.round(n*50)),new X({name:e,attributes:{type:{key:`w:type`,value:t},size:{key:`w:w`,value:qt(r)}}})},rl=Zc.WIDTH-Xc.LEFT-Xc.RIGHT-Xc.GUTTER,il=e=>e.options.columnSpan||1,al=(e,t)=>{if(!e)return;let{type:n=tl.AUTO,size:r}=e;if(n!==tl.PERCENTAGE&&n!==tl.DXA)return;let i=typeof r==`number`?n===tl.PERCENTAGE?r/100*t:r:r.endsWith(`%`)?Number(r.slice(0,-1))/100*t:Bt(r);return i>0?i:void 0},ol=(e,t)=>al(e,t)??t,sl=e=>Math.max(0,...e.map(e=>e.cells.reduce((e,t)=>e+il(t),0))),cl=({rows:e,width:t,availableWidth:n})=>{let r=sl(e);if(r===0)return[];let i=ol(t,n),a=Array.from({length:r},()=>void 0),o=[];for(let t of e){let e=0;for(let n of t.cells){let t=il(n),r=al(n.options.width,i);if(r!==void 0){if(t===1){var s;a[s=e]??(a[s]=r)}else o.push({start:e,span:t,width:r})}e+=t}}for(let{start:e,span:t,width:n}of o){let i=Array.from({length:t},(t,n)=>e+n).filter(e=>e<r),o=i.filter(e=>a[e]===void 0),s=n-i.reduce((e,t)=>e+(a[t]??0),0);if(o.length>0&&s>0)for(let e of o)a[e]=s/o.length}let c=a.flatMap((e,t)=>e===void 0?[t]:[]);if(c.length>0){let e=i-a.reduce((e,t)=>e+(t??0),0),t=e>0?e/c.length:i/r;for(let e of c)a[e]=t}return a.map(e=>Math.round(e))},ll=e=>new X({name:`w:gridCol`,attributes:e===void 0?void 0:{width:{key:`w:w`,value:Gt(e)}}}),ul=class extends b{constructor(e,t){super(`w:tblGrid`);for(let t of e)this.root.push(ll(t));t&&this.root.push(new fl(t))}},dl=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{id:`w:id`})}},fl=class extends b{constructor(e){super(`w:tblGridChange`),this.root.push(new dl({id:e.id})),this.root.push(new ul(e.columnWidths))}},pl=class extends b{constructor(e){super(`w:ins`),this.root.push(new Zn({id:e.id,author:e.author,date:e.date}))}},ml=class extends b{constructor(e){super(`w:del`),this.root.push(new Zn({id:e.id,author:e.author,date:e.date}))}},hl=class extends b{constructor(e){super(`w:cellIns`),this.root.push(new Zn({id:e.id,author:e.author,date:e.date}))}},gl=class extends b{constructor(e){super(`w:cellDel`),this.root.push(new Zn({id:e.id,author:e.author,date:e.date}))}},_l=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{id:`w:id`,author:`w:author`,date:`w:date`,verticalMerge:`w:vMerge`,verticalMergeOriginal:`w:vMergeOrig`})}},vl=class extends b{constructor(e){super(`w:cellMerge`),this.root.push(new _l(e))}},yl=({marginUnitType:e=tl.DXA,top:t,left:n,bottom:r,right:i})=>[{name:`w:top`,size:t},{name:`w:left`,size:n},{name:`w:bottom`,size:r},{name:`w:right`,size:i}].filter(e=>e.size!==void 0).map(({name:t,size:n})=>nl(t,{type:e,size:n})),bl=e=>{let t=yl(e);if(t.length!==0)return new X({name:`w:tblCellMar`,children:t})},xl=e=>{let t=yl(e);if(t.length!==0)return new X({name:`w:tcMar`,children:t})},Sl=class extends x{constructor(e){super(`w:tcBorders`),e.top&&this.root.push(Z(`w:top`,e.top)),e.start&&this.root.push(Z(`w:start`,e.start)),e.left&&this.root.push(Z(`w:left`,e.left)),e.bottom&&this.root.push(Z(`w:bottom`,e.bottom)),e.end&&this.root.push(Z(`w:end`,e.end)),e.right&&this.root.push(Z(`w:right`,e.right))}},Cl=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{val:`w:val`})}},wl=class extends b{constructor(e){super(`w:gridSpan`),this.root.push(new Cl({val:J(e)}))}},Tl={CONTINUE:`continue`,RESTART:`restart`},El=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{val:`w:val`})}},Dl=class extends b{constructor(e){super(`w:vMerge`),this.root.push(new El({val:e}))}},Ol=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{val:`w:val`})}},kl=class extends b{constructor(e){super(`w:textDirection`),this.root.push(new Ol({val:e}))}},Al=class extends x{constructor(e){if(super(`w:tcPr`,e.includeIfEmpty),_(this,`hasWidth`,void 0),_(this,`hasColumnWidth`,!1),this.hasWidth=e.width!==void 0,e.width&&this.root.push(nl(`w:tcW`,e.width)),e.columnSpan&&this.root.push(new wl(e.columnSpan)),e.verticalMerge?this.root.push(new Dl(e.verticalMerge)):e.rowSpan&&e.rowSpan>1&&this.root.push(new Dl(Tl.RESTART)),e.borders&&this.root.push(new Sl(e.borders)),e.shading&&this.root.push(Yn(e.shading)),e.margins){let t=xl(e.margins);t&&this.root.push(t)}e.textDirection&&this.root.push(new kl(e.textDirection)),e.verticalAlign&&this.root.push(Ac(e.verticalAlign)),e.insertion&&this.root.push(new hl(e.insertion)),e.deletion&&this.root.push(new gl(e.deletion)),e.cellMerge&&this.root.push(new vl(e.cellMerge)),e.revision&&this.root.push(new jl(e.revision))}setColumnWidth(e){this.hasWidth||(this.root.splice(0,+!!this.hasColumnWidth,nl(`w:tcW`,{size:e,type:tl.DXA})),this.hasColumnWidth=!0)}},jl=class extends b{constructor(e){super(`w:tcPrChange`),this.root.push(new Zn({id:e.id,author:e.author,date:e.date})),this.root.push(new Al(C(C({},e),{},{includeIfEmpty:!0})))}},Ml=class extends b{constructor(e){super(`w:tc`),_(this,`options`,void 0),_(this,`properties`,void 0),this.options=e,this.properties=new Al(e),this.root.push(this.properties);for(let t of e.children)this.root.push(t)}setColumnWidth(e){this.properties.setColumnWidth(e)}prepForXml(e){return this.root[this.root.length-1]instanceof Q||this.root.push(new Q({})),super.prepForXml(e)}},Nl=(e,t)=>t?new Y(e):new $t(e,`off`),Pl={style:kn.NONE,size:0,color:`auto`},Fl={style:kn.SINGLE,size:4,color:`auto`},Il=class extends b{constructor(e){super(`w:tblBorders`),this.root.push(Z(`w:top`,e.top??Fl)),this.root.push(Z(`w:left`,e.left??Fl)),this.root.push(Z(`w:bottom`,e.bottom??Fl)),this.root.push(Z(`w:right`,e.right??Fl)),this.root.push(Z(`w:insideH`,e.insideHorizontal??Fl)),this.root.push(Z(`w:insideV`,e.insideVertical??Fl))}};_(Il,`NONE`,{top:Pl,bottom:Pl,left:Pl,right:Pl,insideHorizontal:Pl,insideVertical:Pl});var Ll=({horizontalAnchor:e,verticalAnchor:t,absoluteHorizontalPosition:n,relativeHorizontalPosition:r,absoluteVerticalPosition:i,relativeVerticalPosition:a,bottomFromText:o,topFromText:s,leftFromText:c,rightFromText:l})=>new X({name:`w:tblpPr`,attributes:{leftFromText:{key:`w:leftFromText`,value:c===void 0?void 0:Gt(c)},rightFromText:{key:`w:rightFromText`,value:l===void 0?void 0:Gt(l)},topFromText:{key:`w:topFromText`,value:s===void 0?void 0:Gt(s)},bottomFromText:{key:`w:bottomFromText`,value:o===void 0?void 0:Gt(o)},absoluteHorizontalPosition:{key:`w:tblpX`,value:n===void 0?void 0:Ut(n)},absoluteVerticalPosition:{key:`w:tblpY`,value:i===void 0?void 0:Ut(i)},horizontalAnchor:{key:`w:horzAnchor`,value:e},relativeHorizontalPosition:{key:`w:tblpXSpec`,value:r},relativeVerticalPosition:{key:`w:tblpYSpec`,value:a},verticalAnchor:{key:`w:vertAnchor`,value:t}}}),Rl=e=>new X({name:`w:tblLayout`,attributes:{type:{key:`w:type`,value:e}}}),zl={DXA:`dxa`,NIL:`nil`},Bl=({type:e=zl.DXA,value:t})=>new X({name:`w:tblCellSpacing`,attributes:{type:{key:`w:type`,value:e},value:{key:`w:w`,value:qt(t)}}}),Vl=({firstRow:e,lastRow:t,firstColumn:n,lastColumn:r,noHBand:i,noVBand:a})=>new X({name:`w:tblLook`,attributes:{firstRow:{key:`w:firstRow`,value:e},lastRow:{key:`w:lastRow`,value:t},firstColumn:{key:`w:firstColumn`,value:n},lastColumn:{key:`w:lastColumn`,value:r},noHBand:{key:`w:noHBand`,value:i},noVBand:{key:`w:noVBand`,value:a}}}),Hl=e=>new X({name:`w:tblOverlap`,attributes:{val:{key:`w:val`,value:e}}}),Ul=class extends x{constructor(e){if(super(`w:tblPr`,e.includeIfEmpty),e.style&&this.root.push(new $t(`w:tblStyle`,e.style)),e.float&&this.root.push(Ll(e.float)),e.float?.overlap&&this.root.push(Hl(e.float.overlap)),e.visuallyRightToLeft!==void 0&&this.root.push(Nl(`w:bidiVisual`,e.visuallyRightToLeft)),e.width&&this.root.push(nl(`w:tblW`,e.width)),e.alignment&&this.root.push(an(e.alignment)),e.cellSpacing&&this.root.push(Bl(e.cellSpacing)),e.indent&&this.root.push(nl(`w:tblInd`,e.indent)),e.borders&&this.root.push(new Il(e.borders)),e.shading&&this.root.push(Yn(e.shading)),e.layout&&this.root.push(Rl(e.layout)),e.cellMargin){let t=bl(e.cellMargin);t&&this.root.push(t)}e.tableLook&&this.root.push(Vl(e.tableLook)),e.revision&&this.root.push(new Wl(e.revision))}},Wl=class extends b{constructor(e){super(`w:tblPrChange`),this.root.push(new Zn({id:e.id,author:e.author,date:e.date})),this.root.push(new Ul(C(C({},e),{},{includeIfEmpty:!0})))}},Gl=(e,t)=>new X({name:`w:trHeight`,attributes:{value:{key:`w:val`,value:Gt(e)},rule:{key:`w:hRule`,value:t}}}),Kl=class extends x{constructor(e){super(`w:trPr`,e.includeIfEmpty),e.cantSplit!==void 0&&this.root.push(Nl(`w:cantSplit`,e.cantSplit)),e.tableHeader!==void 0&&this.root.push(Nl(`w:tblHeader`,e.tableHeader)),e.height&&this.root.push(Gl(e.height.value,e.height.rule)),e.cellSpacing&&this.root.push(Bl(e.cellSpacing)),e.insertion&&this.root.push(new pl(e.insertion)),e.deletion&&this.root.push(new ml(e.deletion)),e.revision&&this.root.push(new ql(e.revision))}},ql=class extends b{constructor(e){super(`w:trPrChange`),this.root.push(new Zn({id:e.id,author:e.author,date:e.date})),this.root.push(new Kl(C(C({},e),{},{includeIfEmpty:!0})))}},Jl=class extends b{constructor(e){super(`w:tr`),_(this,`options`,void 0),this.options=e,this.root.push(new Kl(e));for(let t of e.children)this.root.push(t)}get CellCount(){return this.options.children.length}get cells(){return this.root.filter(e=>e instanceof Ml)}addCellToIndex(e,t){this.root.splice(t+1,0,e)}addCellToColumnIndex(e,t){let n=this.columnIndexToRootIndex(t,!0);this.addCellToIndex(e,n-1)}rootIndexToColumnIndex(e){if(e<1||e>=this.root.length)throw Error(`cell 'rootIndex' should between 1 to ${this.root.length-1}`);let t=0;for(let n=1;n<e;n++){let e=this.root[n];t+=e.options.columnSpan||1}return t}columnIndexToRootIndex(e,t=!1){if(e<0)throw Error(`cell 'columnIndex' should not less than zero`);let n=0,r=1;for(;n<=e;){if(r>=this.root.length){if(t)return this.root.length;throw Error(`cell 'columnIndex' should not great than ${n-1}`)}let e=this.root[r];r+=1,n+=e&&e.options.columnSpan||1}return r-1}},Yl=class e extends vs{constructor({rows:e,width:t,columnWidths:n,columnWidthsRevision:r,margins:i,indent:a,float:o,layout:s,style:c,borders:l,alignment:u,visuallyRightToLeft:d,tableLook:f,cellSpacing:p,revision:m}){super(`w:tbl`),_(this,`rows`,void 0),_(this,`width`,void 0),_(this,`columnWidths`,void 0),_(this,`columnWidthsRevision`,void 0),_(this,`resolvedColumnWidths`,void 0),this.rows=e,this.width=t??{size:100},this.columnWidths=n,this.columnWidthsRevision=r,e.forEach((t,n)=>{if(n===e.length-1)return;let r=0;t.cells.forEach(t=>{if(t.options.rowSpan&&t.options.rowSpan>1){let i=new Ml({rowSpan:t.options.rowSpan-1,columnSpan:t.options.columnSpan,borders:t.options.borders,children:[],verticalMerge:Tl.CONTINUE});e[n+1].addCellToColumnIndex(i,r)}r+=t.options.columnSpan||1})}),this.setCellWidths(rl),this.resolvedColumnWidths=n??cl({rows:e,width:this.width,availableWidth:rl}),this.root.push(new Ul({borders:l??{},width:this.width,indent:a,float:o,layout:s,style:c,alignment:u,cellMargin:i,visuallyRightToLeft:d,tableLook:f,cellSpacing:p,revision:m})),this.root.push(new ul(this.resolvedColumnWidths,r));for(let t of e)this.root.push(t)}get ColumnWidths(){return this.resolvedColumnWidths}getCellWidth(e,t){let{cells:n}=e,r=n.indexOf(t);if(r===-1)return;let i=n.slice(0,r).reduce((e,t)=>e+(t.options.columnSpan||1),0),a=this.resolvedColumnWidths.slice(i,i+(t.options.columnSpan||1));return a.length===0?void 0:a.reduce((e,t)=>e+t,0)}prepForXml(e){if(this.setCellWidths(this.resolveAvailableWidth(e)),this.columnWidths===void 0){this.resolvedColumnWidths=cl({rows:this.rows,width:this.width,availableWidth:this.resolveAvailableWidth(e)});let t=this.root.findIndex(e=>e instanceof ul);this.root[t]=new ul(this.resolvedColumnWidths,this.columnWidthsRevision)}return super.prepForXml(e)}setCellWidths(e){if(this.columnWidths===void 0)return;let t=this.columnWidths.reduce((e,t)=>e+t,0),n=al(this.width,e)??0,r=t>0&&n>t?n/t:1;for(let e of this.rows){let t=0;for(let n of e.cells){let e=n.options.columnSpan||1,i=this.columnWidths.slice(t,t+e),a=Math.round(i.reduce((e,t)=>e+t,0)*r);i.length===e&&a>0&&n.setColumnWidth(a),t+=e}}}resolveAvailableWidth(t){var n;let{stack:r}=t,i=r[r.length-1],a=r[r.length-2],o=r[r.length-3];if(i instanceof Ml&&a instanceof Jl&&o instanceof e){let e=o.getCellWidth(a,i);if(e!==void 0)return e}let s=r.findIndex(e=>e instanceof el),c=(n=t.file)==null||(n=n.Document)==null?void 0:n.View.Body;return(s>=0?r[s].getSectionPropertiesFor(r[s+1]??this):c?.getSectionPropertiesFor())?.AvailableTextWidth??rl}},Xl=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{xmlns:`xmlns`,vt:`xmlns:vt`})}},Zl=class extends b{constructor(){super(`Properties`),this.root.push(new Xl({xmlns:`http://schemas.openxmlformats.org/officeDocument/2006/extended-properties`,vt:`http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes`}))}},Ql=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{xmlns:`xmlns`})}},$l=(e,t)=>new X({name:`Default`,attributes:{contentType:{key:`ContentType`,value:e},extension:{key:`Extension`,value:t}}}),eu=(e,t)=>new X({name:`Override`,attributes:{contentType:{key:`ContentType`,value:e},partName:{key:`PartName`,value:t}}}),tu=class extends b{constructor(){super(`Types`),this.root.push(new Ql({xmlns:`http://schemas.openxmlformats.org/package/2006/content-types`})),this.root.push($l(`image/png`,`png`)),this.root.push($l(`image/jpeg`,`jpeg`)),this.root.push($l(`image/jpeg`,`jpg`)),this.root.push($l(`image/bmp`,`bmp`)),this.root.push($l(`image/gif`,`gif`)),this.root.push($l(`image/svg+xml`,`svg`)),this.root.push($l(`application/vnd.openxmlformats-package.relationships+xml`,`rels`)),this.root.push($l(`application/xml`,`xml`)),this.root.push($l(`application/vnd.openxmlformats-officedocument.obfuscatedFont`,`odttf`)),this.root.push(eu(`application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml`,`/word/document.xml`)),this.root.push(eu(`application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml`,`/word/styles.xml`)),this.root.push(eu(`application/vnd.openxmlformats-package.core-properties+xml`,`/docProps/core.xml`)),this.root.push(eu(`application/vnd.openxmlformats-officedocument.custom-properties+xml`,`/docProps/custom.xml`)),this.root.push(eu(`application/vnd.openxmlformats-officedocument.extended-properties+xml`,`/docProps/app.xml`)),this.root.push(eu(`application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml`,`/word/numbering.xml`)),this.root.push(eu(`application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml`,`/word/footnotes.xml`)),this.root.push(eu(`application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml`,`/word/endnotes.xml`)),this.root.push(eu(`application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml`,`/word/settings.xml`)),this.root.push(eu(`application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml`,`/word/fontTable.xml`)),this.root.push(eu(`application/vnd.openxmlformats-officedocument.theme+xml`,`/word/theme/theme1.xml`))}addComments(){this.root.push(eu(`application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml`,`/word/comments.xml`))}addCommentsExtended(){this.root.push(eu(`application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml`,`/word/commentsExtended.xml`))}addCommentsIds(){this.root.push(eu(`application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml`,`/word/commentsIds.xml`))}addFooter(e){this.root.push(eu(`application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml`,`/word/footer${e}.xml`))}addOverride(e,t){this.root.push(eu(e,t))}addHeader(e){this.root.push(eu(`application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml`,`/word/header${e}.xml`))}},nu={wpc:`http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas`,mc:`http://schemas.openxmlformats.org/markup-compatibility/2006`,o:`urn:schemas-microsoft-com:office:office`,r:`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,m:`http://schemas.openxmlformats.org/officeDocument/2006/math`,v:`urn:schemas-microsoft-com:vml`,wp14:`http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing`,wp:`http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing`,w10:`urn:schemas-microsoft-com:office:word`,w:`http://schemas.openxmlformats.org/wordprocessingml/2006/main`,w14:`http://schemas.microsoft.com/office/word/2010/wordml`,w15:`http://schemas.microsoft.com/office/word/2012/wordml`,wpg:`http://schemas.microsoft.com/office/word/2010/wordprocessingGroup`,wpi:`http://schemas.microsoft.com/office/word/2010/wordprocessingInk`,wne:`http://schemas.microsoft.com/office/word/2006/wordml`,wps:`http://schemas.microsoft.com/office/word/2010/wordprocessingShape`,cp:`http://schemas.openxmlformats.org/package/2006/metadata/core-properties`,dc:`http://purl.org/dc/elements/1.1/`,dcterms:`http://purl.org/dc/terms/`,dcmitype:`http://purl.org/dc/dcmitype/`,xsi:`http://www.w3.org/2001/XMLSchema-instance`,cx:`http://schemas.microsoft.com/office/drawing/2014/chartex`,cx1:`http://schemas.microsoft.com/office/drawing/2015/9/8/chartex`,cx2:`http://schemas.microsoft.com/office/drawing/2015/10/21/chartex`,cx3:`http://schemas.microsoft.com/office/drawing/2016/5/9/chartex`,cx4:`http://schemas.microsoft.com/office/drawing/2016/5/10/chartex`,cx5:`http://schemas.microsoft.com/office/drawing/2016/5/11/chartex`,cx6:`http://schemas.microsoft.com/office/drawing/2016/5/12/chartex`,cx7:`http://schemas.microsoft.com/office/drawing/2016/5/13/chartex`,cx8:`http://schemas.microsoft.com/office/drawing/2016/5/14/chartex`,aink:`http://schemas.microsoft.com/office/drawing/2016/ink`,am3d:`http://schemas.microsoft.com/office/drawing/2017/model3d`,w16cex:`http://schemas.microsoft.com/office/word/2018/wordml/cex`,w16cid:`http://schemas.microsoft.com/office/word/2016/wordml/cid`,w16:`http://schemas.microsoft.com/office/word/2018/wordml`,w16sdtdh:`http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash`,w16se:`http://schemas.microsoft.com/office/word/2015/wordml/symex`},ru=class extends w{constructor(e,t){super(C({Ignorable:t},Object.fromEntries(e.map(e=>[e,nu[e]])))),_(this,`xmlKeys`,C({Ignorable:`mc:Ignorable`},Object.fromEntries(Object.keys(nu).map(e=>[e,`xmlns:${e}`]))))}},iu=class extends b{constructor(e){super(`cp:coreProperties`),this.root.push(new ru([`cp`,`dc`,`dcterms`,`dcmitype`,`xsi`])),e.title&&this.root.push(new nn(`dc:title`,e.title)),e.subject&&this.root.push(new nn(`dc:subject`,e.subject)),e.creator&&this.root.push(new nn(`dc:creator`,e.creator)),e.keywords&&this.root.push(new nn(`cp:keywords`,e.keywords)),e.description&&this.root.push(new nn(`dc:description`,e.description)),e.lastModifiedBy&&this.root.push(new nn(`cp:lastModifiedBy`,e.lastModifiedBy)),e.revision&&this.root.push(new nn(`cp:revision`,String(e.revision))),this.root.push(new ou(`dcterms:created`)),this.root.push(new ou(`dcterms:modified`))}},au=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{type:`xsi:type`})}},ou=class extends b{constructor(e){super(e),this.root.push(new au({type:`dcterms:W3CDTF`})),this.root.push(Xt(new Date))}},su=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{xmlns:`xmlns`,vt:`xmlns:vt`})}},cu=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{formatId:`fmtid`,pid:`pid`,name:`name`})}},lu=class extends b{constructor(e,t){super(`property`),this.root.push(new cu({formatId:`{D5CDD505-2E9C-101B-9397-08002B2CF9AE}`,pid:e.toString(),name:t.name})),this.root.push(new uu(t.value))}},uu=class extends b{constructor(e){super(`vt:lpwstr`),this.root.push(e)}},du=class extends b{constructor(e){super(`Properties`),_(this,`nextId`,void 0),_(this,`properties`,[]),this.root.push(new su({xmlns:`http://schemas.openxmlformats.org/officeDocument/2006/custom-properties`,vt:`http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes`})),this.nextId=2;for(let t of e)this.addCustomProperty(t)}prepForXml(e){return this.root.splice(1,this.root.length-1,...this.properties),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new lu(this.nextId++,e))}},fu=class extends b{constructor({color:e,themeColor:t,themeShade:n,themeTint:r}){if(super(`w:background`),typeof e==`object`&&(t!==void 0||n!==void 0||r!==void 0))throw Error(`Invalid background. Expected a theme color in color, or themeColor, themeShade and themeTint, not both`);this.root.push(new Tn([{keys:On,color:e},{key:`w:themeColor`,value:t},{key:`w:themeShade`,value:n===void 0?void 0:Lt(n)},{key:`w:themeTint`,value:r===void 0?void 0:Lt(r)}]))}},pu=class extends b{constructor(e){super(`w:document`),_(this,`body`,void 0),this.root.push(new ru(`wpc.mc.o.r.m.v.wp14.wp.w10.w.w14.w15.wpg.wpi.wne.wps.cx.cx1.cx2.cx3.cx4.cx5.cx6.cx7.cx8.aink.am3d.w16cex.w16cid.w16.w16sdtdh.w16se`.split(`.`),`w14 w15 wp14`)),this.body=new el({pageNumbers:e.pageNumbers}),e.background&&this.root.push(new fu(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}},mu=class{constructor(e){_(this,`document`,void 0),_(this,`relationships`,void 0),this.document=new pu(e),this.relationships=new Go}get View(){return this.document}get Relationships(){return this.relationships}},hu=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{wpc:`xmlns:wpc`,mc:`xmlns:mc`,o:`xmlns:o`,r:`xmlns:r`,m:`xmlns:m`,v:`xmlns:v`,wp14:`xmlns:wp14`,wp:`xmlns:wp`,w10:`xmlns:w10`,w:`xmlns:w`,w14:`xmlns:w14`,w15:`xmlns:w15`,wpg:`xmlns:wpg`,wpi:`xmlns:wpi`,wne:`xmlns:wne`,wps:`xmlns:wps`,Ignorable:`mc:Ignorable`})}},gu=class extends b{constructor(e,t){super(`w:p`),_(this,`paragraph`,void 0),_(this,`mark`,void 0),this.paragraph=e,this.mark=t}prepForXml(e){let t=this.paragraph.prepForXml(e)[`w:p`],n=Array.isArray(t)?t:[],r=+(n.length>0&&`w:pPr`in n[0]);return{"w:p":[...n.slice(0,r),this.mark.prepForXml(e),...n.slice(r)]}}},_u=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{type:`w:type`,id:`w:id`})}},vu=class extends _r{constructor(){super({style:`EndnoteReference`}),this.root.push(new as)}},yu={SEPARATOR:`separator`,CONTINUATION_SEPARATOR:`continuationSeparator`},bu=class extends b{constructor(e){super(`w:endnote`),this.root.push(new _u({type:e.type,id:e.id}));for(let[t,n]of e.children.entries())this.root.push(t===0?new gu(n,new vu):n)}},xu=class extends b{constructor(){super(`w:continuationSeparator`)}},Su=class extends _r{constructor(){super({}),this.root.push(new xu)}},Cu=class extends b{constructor(){super(`w:separator`)}},wu=class extends _r{constructor(){super({}),this.root.push(new Cu)}},Tu=class extends b{constructor(){super(`w:endnotes`),_(this,`ownNotes`,new Map),_(this,`highestId`,0),this.root.push(new hu({wpc:`http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas`,mc:`http://schemas.openxmlformats.org/markup-compatibility/2006`,o:`urn:schemas-microsoft-com:office:office`,r:`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,m:`http://schemas.openxmlformats.org/officeDocument/2006/math`,v:`urn:schemas-microsoft-com:vml`,wp14:`http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing`,wp:`http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing`,w10:`urn:schemas-microsoft-com:office:word`,w:`http://schemas.openxmlformats.org/wordprocessingml/2006/main`,w14:`http://schemas.microsoft.com/office/word/2010/wordml`,w15:`http://schemas.microsoft.com/office/word/2012/wordml`,wpg:`http://schemas.microsoft.com/office/word/2010/wordprocessingGroup`,wpi:`http://schemas.microsoft.com/office/word/2010/wordprocessingInk`,wne:`http://schemas.microsoft.com/office/word/2006/wordml`,wps:`http://schemas.microsoft.com/office/word/2010/wordprocessingShape`,Ignorable:`w14 w15 wp14`}));let e=new bu({id:-1,type:yu.SEPARATOR,children:[new Q({spacing:{after:0,line:240,lineRule:cs.AUTO},children:[new wu]})]});this.root.push(e);let t=new bu({id:0,type:yu.CONTINUATION_SEPARATOR,children:[new Q({spacing:{after:0,line:240,lineRule:cs.AUTO},children:[new Su]})]});this.root.push(t)}createEndnote(e,t){let n=new bu({id:e,children:t});this.root.push(n),Number.isFinite(e)&&(this.highestId=Math.max(this.highestId,Math.floor(e)))}idOf(e,t,n){if(n.viewWrapper!==n.file.Document)return;let r=this.ownNotes.get(e);if(r!==void 0)return r;let i=this.highestId+1;return this.createEndnote(i,t.children),this.ownNotes.set(e,i),i}prepForXml(e){let t=super.prepForXml(e);return Uo(t,e),t}},Eu=class{constructor(){_(this,`endnotes`,void 0),_(this,`relationships`,void 0),this.endnotes=new Tu,this.relationships=new Go}get View(){return this.endnotes}get Relationships(){return this.relationships}},Du=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{wpc:`xmlns:wpc`,mc:`xmlns:mc`,o:`xmlns:o`,r:`xmlns:r`,m:`xmlns:m`,v:`xmlns:v`,wp14:`xmlns:wp14`,wp:`xmlns:wp`,w10:`xmlns:w10`,w:`xmlns:w`,w14:`xmlns:w14`,w15:`xmlns:w15`,wpg:`xmlns:wpg`,wpi:`xmlns:wpi`,wne:`xmlns:wne`,wps:`xmlns:wps`,cp:`xmlns:cp`,dc:`xmlns:dc`,dcterms:`xmlns:dcterms`,dcmitype:`xmlns:dcmitype`,xsi:`xmlns:xsi`,type:`xsi:type`})}},Ou=class extends Pt{constructor(e,t){super(`w:ftr`,t),_(this,`refId`,void 0),this.refId=e,t||this.root.push(new Du({wpc:`http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas`,mc:`http://schemas.openxmlformats.org/markup-compatibility/2006`,o:`urn:schemas-microsoft-com:office:office`,r:`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,m:`http://schemas.openxmlformats.org/officeDocument/2006/math`,v:`urn:schemas-microsoft-com:vml`,wp14:`http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing`,wp:`http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing`,w10:`urn:schemas-microsoft-com:office:word`,w:`http://schemas.openxmlformats.org/wordprocessingml/2006/main`,w14:`http://schemas.microsoft.com/office/word/2010/wordml`,w15:`http://schemas.microsoft.com/office/word/2012/wordml`,wpg:`http://schemas.microsoft.com/office/word/2010/wordprocessingGroup`,wpi:`http://schemas.microsoft.com/office/word/2010/wordprocessingInk`,wne:`http://schemas.microsoft.com/office/word/2006/wordml`,wps:`http://schemas.microsoft.com/office/word/2010/wordprocessingShape`}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}prepForXml(e){let t=super.prepForXml(e);return Uo(t,e,this.refId),t}},ku=class{constructor(e,t,n){_(this,`media`,void 0),_(this,`footer`,void 0),_(this,`relationships`,void 0),this.media=e,this.footer=new Ou(t,n),this.relationships=new Go}add(e){this.footer.add(e)}addChildElement(e){this.footer.addChildElement(e)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}},Au=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{type:`w:type`,id:`w:id`})}},ju=class extends b{constructor(){super(`w:footnoteRef`)}},Mu=class extends _r{constructor(){super({style:`FootnoteReference`}),this.root.push(new ju)}},Nu={SEPERATOR:`separator`,CONTINUATION_SEPERATOR:`continuationSeparator`},Pu=class extends b{constructor(e){super(`w:footnote`),this.root.push(new Au({type:e.type,id:e.id}));for(let[t,n]of e.children.entries())this.root.push(t===0?new gu(n,new Mu):n)}},Fu=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{wpc:`xmlns:wpc`,mc:`xmlns:mc`,o:`xmlns:o`,r:`xmlns:r`,m:`xmlns:m`,v:`xmlns:v`,wp14:`xmlns:wp14`,wp:`xmlns:wp`,w10:`xmlns:w10`,w:`xmlns:w`,w14:`xmlns:w14`,w15:`xmlns:w15`,wpg:`xmlns:wpg`,wpi:`xmlns:wpi`,wne:`xmlns:wne`,wps:`xmlns:wps`,Ignorable:`mc:Ignorable`})}},Iu=class extends b{constructor(){super(`w:footnotes`),_(this,`ownNotes`,new Map),_(this,`highestId`,0),this.root.push(new Fu({wpc:`http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas`,mc:`http://schemas.openxmlformats.org/markup-compatibility/2006`,o:`urn:schemas-microsoft-com:office:office`,r:`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,m:`http://schemas.openxmlformats.org/officeDocument/2006/math`,v:`urn:schemas-microsoft-com:vml`,wp14:`http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing`,wp:`http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing`,w10:`urn:schemas-microsoft-com:office:word`,w:`http://schemas.openxmlformats.org/wordprocessingml/2006/main`,w14:`http://schemas.microsoft.com/office/word/2010/wordml`,w15:`http://schemas.microsoft.com/office/word/2012/wordml`,wpg:`http://schemas.microsoft.com/office/word/2010/wordprocessingGroup`,wpi:`http://schemas.microsoft.com/office/word/2010/wordprocessingInk`,wne:`http://schemas.microsoft.com/office/word/2006/wordml`,wps:`http://schemas.microsoft.com/office/word/2010/wordprocessingShape`,Ignorable:`w14 w15 wp14`}));let e=new Pu({id:-1,type:Nu.SEPERATOR,children:[new Q({spacing:{after:0,line:240,lineRule:cs.AUTO},children:[new wu]})]});this.root.push(e);let t=new Pu({id:0,type:Nu.CONTINUATION_SEPERATOR,children:[new Q({spacing:{after:0,line:240,lineRule:cs.AUTO},children:[new Su]})]});this.root.push(t)}createFootNote(e,t){let n=new Pu({id:e,children:t});this.root.push(n),Number.isFinite(e)&&(this.highestId=Math.max(this.highestId,Math.floor(e)))}idOf(e,t,n){if(n.viewWrapper!==n.file.Document)return;let r=this.ownNotes.get(e);if(r!==void 0)return r;let i=this.highestId+1;return this.createFootNote(i,t.children),this.ownNotes.set(e,i),i}prepForXml(e){let t=super.prepForXml(e);return Uo(t,e),t}},Lu=class{constructor(){_(this,`footnotess`,void 0),_(this,`relationships`,void 0),this.footnotess=new Iu,this.relationships=new Go}get View(){return this.footnotess}get Relationships(){return this.relationships}},Ru=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{wpc:`xmlns:wpc`,mc:`xmlns:mc`,o:`xmlns:o`,r:`xmlns:r`,m:`xmlns:m`,v:`xmlns:v`,wp14:`xmlns:wp14`,wp:`xmlns:wp`,w10:`xmlns:w10`,w:`xmlns:w`,w14:`xmlns:w14`,w15:`xmlns:w15`,wpg:`xmlns:wpg`,wpi:`xmlns:wpi`,wne:`xmlns:wne`,wps:`xmlns:wps`,cp:`xmlns:cp`,dc:`xmlns:dc`,dcterms:`xmlns:dcterms`,dcmitype:`xmlns:dcmitype`,xsi:`xmlns:xsi`,type:`xsi:type`,cx:`xmlns:cx`,cx1:`xmlns:cx1`,cx2:`xmlns:cx2`,cx3:`xmlns:cx3`,cx4:`xmlns:cx4`,cx5:`xmlns:cx5`,cx6:`xmlns:cx6`,cx7:`xmlns:cx7`,cx8:`xmlns:cx8`,w16cid:`xmlns:w16cid`,w16se:`xmlns:w16se`})}},zu=class extends Pt{constructor(e,t){super(`w:hdr`,t),_(this,`refId`,void 0),this.refId=e,t||this.root.push(new Ru({wpc:`http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas`,mc:`http://schemas.openxmlformats.org/markup-compatibility/2006`,o:`urn:schemas-microsoft-com:office:office`,r:`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,m:`http://schemas.openxmlformats.org/officeDocument/2006/math`,v:`urn:schemas-microsoft-com:vml`,wp14:`http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing`,wp:`http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing`,w10:`urn:schemas-microsoft-com:office:word`,w:`http://schemas.openxmlformats.org/wordprocessingml/2006/main`,w14:`http://schemas.microsoft.com/office/word/2010/wordml`,w15:`http://schemas.microsoft.com/office/word/2012/wordml`,wpg:`http://schemas.microsoft.com/office/word/2010/wordprocessingGroup`,wpi:`http://schemas.microsoft.com/office/word/2010/wordprocessingInk`,wne:`http://schemas.microsoft.com/office/word/2006/wordml`,wps:`http://schemas.microsoft.com/office/word/2010/wordprocessingShape`,cx:`http://schemas.microsoft.com/office/drawing/2014/chartex`,cx1:`http://schemas.microsoft.com/office/drawing/2015/9/8/chartex`,cx2:`http://schemas.microsoft.com/office/drawing/2015/10/21/chartex`,cx3:`http://schemas.microsoft.com/office/drawing/2016/5/9/chartex`,cx4:`http://schemas.microsoft.com/office/drawing/2016/5/10/chartex`,cx5:`http://schemas.microsoft.com/office/drawing/2016/5/11/chartex`,cx6:`http://schemas.microsoft.com/office/drawing/2016/5/12/chartex`,cx7:`http://schemas.microsoft.com/office/drawing/2016/5/13/chartex`,cx8:`http://schemas.microsoft.com/office/drawing/2016/5/14/chartex`,w16cid:`http://schemas.microsoft.com/office/word/2016/wordml/cid`,w16se:`http://schemas.microsoft.com/office/word/2015/wordml/symex`}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}prepForXml(e){let t=super.prepForXml(e);return Uo(t,e,this.refId),t}},Bu=class{constructor(e,t,n){_(this,`media`,void 0),_(this,`header`,void 0),_(this,`relationships`,void 0),this.media=e,this.header=new zu(t,n),this.relationships=new Go}add(e){return this.header.add(e),this}addChildElement(e){this.header.addChildElement(e)}get View(){return this.header}get Relationships(){return this.relationships}get Media(){return this.media}},Vu=class{constructor(){_(this,`map`,void 0),this.map=new Map}addImage(e,t){this.map.set(e,t)}get Array(){return Array.from(this.map.values())}},Hu={DECIMAL:`decimal`,UPPER_ROMAN:`upperRoman`,LOWER_ROMAN:`lowerRoman`,UPPER_LETTER:`upperLetter`,LOWER_LETTER:`lowerLetter`,ORDINAL:`ordinal`,CARDINAL_TEXT:`cardinalText`,ORDINAL_TEXT:`ordinalText`,HEX:`hex`,CHICAGO:`chicago`,IDEOGRAPH__DIGITAL:`ideographDigital`,JAPANESE_COUNTING:`japaneseCounting`,AIUEO:`aiueo`,IROHA:`iroha`,DECIMAL_FULL_WIDTH:`decimalFullWidth`,DECIMAL_HALF_WIDTH:`decimalHalfWidth`,JAPANESE_LEGAL:`japaneseLegal`,JAPANESE_DIGITAL_TEN_THOUSAND:`japaneseDigitalTenThousand`,DECIMAL_ENCLOSED_CIRCLE:`decimalEnclosedCircle`,DECIMAL_FULL_WIDTH2:`decimalFullWidth2`,AIUEO_FULL_WIDTH:`aiueoFullWidth`,IROHA_FULL_WIDTH:`irohaFullWidth`,DECIMAL_ZERO:`decimalZero`,BULLET:`bullet`,GANADA:`ganada`,CHOSUNG:`chosung`,DECIMAL_ENCLOSED_FULLSTOP:`decimalEnclosedFullstop`,DECIMAL_ENCLOSED_PARENTHESES:`decimalEnclosedParen`,DECIMAL_ENCLOSED_CIRCLE_CHINESE:`decimalEnclosedCircleChinese`,IDEOGRAPH_ENCLOSED_CIRCLE:`ideographEnclosedCircle`,IDEOGRAPH_TRADITIONAL:`ideographTraditional`,IDEOGRAPH_ZODIAC:`ideographZodiac`,IDEOGRAPH_ZODIAC_TRADITIONAL:`ideographZodiacTraditional`,TAIWANESE_COUNTING:`taiwaneseCounting`,IDEOGRAPH_LEGAL_TRADITIONAL:`ideographLegalTraditional`,TAIWANESE_COUNTING_THOUSAND:`taiwaneseCountingThousand`,TAIWANESE_DIGITAL:`taiwaneseDigital`,CHINESE_COUNTING:`chineseCounting`,CHINESE_LEGAL_SIMPLIFIED:`chineseLegalSimplified`,CHINESE_COUNTING_THOUSAND:`chineseCountingThousand`,KOREAN_DIGITAL:`koreanDigital`,KOREAN_COUNTING:`koreanCounting`,KOREAN_LEGAL:`koreanLegal`,KOREAN_DIGITAL2:`koreanDigital2`,VIETNAMESE_COUNTING:`vietnameseCounting`,RUSSIAN_LOWER:`russianLower`,RUSSIAN_UPPER:`russianUpper`,NONE:`none`,NUMBER_IN_DASH:`numberInDash`,HEBREW1:`hebrew1`,HEBREW2:`hebrew2`,ARABIC_ALPHA:`arabicAlpha`,ARABIC_ABJAD:`arabicAbjad`,HINDI_VOWELS:`hindiVowels`,HINDI_CONSONANTS:`hindiConsonants`,HINDI_NUMBERS:`hindiNumbers`,HINDI_COUNTING:`hindiCounting`,THAI_LETTERS:`thaiLetters`,THAI_NUMBERS:`thaiNumbers`,THAI_COUNTING:`thaiCounting`,BAHT_TEXT:`bahtText`,DOLLAR_TEXT:`dollarText`,CUSTOM:`custom`},Uu=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{ilvl:`w:ilvl`,tentative:`w:tentative`})}},Wu=class extends b{constructor(e){super(`w:numFmt`),this.root.push(new E({val:e}))}},Gu=class extends b{constructor(e){super(`w:lvlText`),this.root.push(new E({val:e}))}},Ku=e=>{switch(e){case rn.CENTER:return`center`;case rn.END:case rn.RIGHT:return`right`;default:return`left`}},qu=class extends b{constructor(e){super(`w:lvlJc`),this.root.push(new E({val:Ku(e)}))}},Ju=class extends b{constructor(e){super(`w:suff`),this.root.push(new E({val:e}))}},Yu=class extends b{constructor(){super(`w:isLgl`)}},Xu=class extends b{constructor({level:e,format:t,text:n,alignment:r=rn.START,start:i=1,style:a,suffix:o,isLegalNumberingStyle:s}){if(super(`w:lvl`),_(this,`paragraphProperties`,void 0),_(this,`runProperties`,void 0),this.root.push(new tn(`w:start`,J(i))),t&&this.root.push(new Wu(t)),a?.style&&this.root.push(ds(a.style)),s&&this.root.push(new Yu),o&&this.root.push(new Ju(o)),n&&this.root.push(new Gu(n)),this.root.push(new qu(r)),this.paragraphProperties=new Hs(a&&a.paragraph,{implicitListParagraphStyle:!1}),this.runProperties=new fr(a?.run&&C(C({},a.run),{},{highlight:void 0,math:void 0,revision:void 0})),this.root.push(this.paragraphProperties),this.root.push(this.runProperties),e>9)throw Error(`Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7`);this.root.push(new Uu({ilvl:J(e),tentative:1}))}},Zu=class extends Xu{},Qu=class extends b{constructor(e){super(`w:multiLevelType`),this.root.push(new E({val:e}))}},$u=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{abstractNumId:`w:abstractNumId`,restartNumberingAfterBreak:`w15:restartNumberingAfterBreak`})}},ed=class extends b{constructor(e,t){super(`w:abstractNum`),_(this,`id`,void 0),this.root.push(new $u({abstractNumId:J(e),restartNumberingAfterBreak:0})),this.root.push(new Qu(`hybridMultilevel`)),this.id=e;for(let e of t)this.root.push(new Zu(e))}},td=class extends b{constructor(e){super(`w:abstractNumId`),this.root.push(new E({val:e}))}},nd=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{numId:`w:numId`})}},rd=class extends b{constructor(e){if(super(`w:num`),_(this,`numId`,void 0),_(this,`reference`,void 0),_(this,`instance`,void 0),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.root.push(new nd({numId:J(e.numId)})),this.root.push(new td(J(e.abstractNumId))),e.overrideLevels&&e.overrideLevels.length)for(let t of e.overrideLevels)this.root.push(new ad(t.num,t.start))}},id=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{ilvl:`w:ilvl`})}},ad=class extends b{constructor(e,t){super(`w:lvlOverride`),this.root.push(new id({ilvl:e})),t!==void 0&&this.root.push(new sd(t))}},od=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{val:`w:val`})}},sd=class extends b{constructor(e){super(`w:startOverride`),this.root.push(new od({val:e}))}},cd=class extends b{constructor(e){super(`w:numbering`),_(this,`abstractNumberingMap`,new Map),_(this,`concreteNumberingMap`,new Map),_(this,`referenceConfigMap`,new Map),_(this,`abstractNumUniqueNumericId`,Lr()),_(this,`concreteNumUniqueNumericId`,Rr()),this.root.push(new ru([`wpc`,`mc`,`o`,`r`,`m`,`v`,`wp14`,`wp`,`w10`,`w`,`w14`,`w15`,`wpg`,`wpi`,`wne`,`wps`],`w14 w15 wp14`));let t=new ed(this.abstractNumUniqueNumericId(),[{level:0,format:Hu.BULLET,text:`●`,alignment:rn.LEFT,style:{paragraph:{indent:{left:Fr(.5),hanging:Fr(.25)}}}},{level:1,format:Hu.BULLET,text:`○`,alignment:rn.LEFT,style:{paragraph:{indent:{left:Fr(1),hanging:Fr(.25)}}}},{level:2,format:Hu.BULLET,text:`■`,alignment:rn.LEFT,style:{paragraph:{indent:{left:2160,hanging:Fr(.25)}}}},{level:3,format:Hu.BULLET,text:`●`,alignment:rn.LEFT,style:{paragraph:{indent:{left:2880,hanging:Fr(.25)}}}},{level:4,format:Hu.BULLET,text:`○`,alignment:rn.LEFT,style:{paragraph:{indent:{left:3600,hanging:Fr(.25)}}}},{level:5,format:Hu.BULLET,text:`■`,alignment:rn.LEFT,style:{paragraph:{indent:{left:4320,hanging:Fr(.25)}}}},{level:6,format:Hu.BULLET,text:`●`,alignment:rn.LEFT,style:{paragraph:{indent:{left:5040,hanging:Fr(.25)}}}},{level:7,format:Hu.BULLET,text:`●`,alignment:rn.LEFT,style:{paragraph:{indent:{left:5760,hanging:Fr(.25)}}}},{level:8,format:Hu.BULLET,text:`●`,alignment:rn.LEFT,style:{paragraph:{indent:{left:6480,hanging:Fr(.25)}}}}]);this.concreteNumberingMap.set(`default-bullet-numbering`,new rd({numId:1,abstractNumId:t.id,reference:`default-bullet-numbering`,instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set(`default-bullet-numbering`,t);for(let t of e.config)this.abstractNumberingMap.set(t.reference,new ed(this.abstractNumUniqueNumericId(),t.levels)),this.referenceConfigMap.set(t.reference,t.levels)}prepForXml(e){return this.root.splice(1,this.root.length-1,...this.abstractNumberingMap.values(),...this.concreteNumberingMap.values()),super.prepForXml(e)}createConcreteNumberingInstance(e,t,n){n&&!this.abstractNumberingMap.has(n.reference)&&(this.abstractNumberingMap.set(n.reference,new ed(this.abstractNumUniqueNumericId(),n.levels)),this.referenceConfigMap.set(n.reference,n.levels));let r=this.abstractNumberingMap.get(e);if(!r)return;let i=`${e}-${t}`;if(this.concreteNumberingMap.has(i))return;let a=this.referenceConfigMap.get(e),o=a&&a[0].start,s={numId:this.concreteNumUniqueNumericId(),abstractNumId:r.id,reference:e,instance:t,overrideLevels:[typeof o==`number`&&Number.isInteger(o)?{num:0,start:o}:{num:0,start:1}]};this.concreteNumberingMap.set(i,new rd(s))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}},ld=class{constructor(e,t=new Set){_(this,`contentTypes`,void 0),_(this,`existingPaths`,void 0),_(this,`paths`,new Map),_(this,`folders`,new WeakMap),this.contentTypes=e,this.existingPaths=t}add(e){let t=this.paths.get(e);if(t!==void 0)return t;let{folder:n,name:r,extension:i,contentType:a}=e.options,o=new Set([...this.existingPaths,...this.paths.values()]),s=1;for(;o.has(`${n}/${r}${s}.${i}`);)s++;let c=`${n}/${r}${s}.${i}`;return this.paths.set(e,c),this.contentTypes.addOverride(a,`/word/${c}`),c}get Array(){return[...this.paths].map(([e,t])=>({part:e,path:t}))}createRelationships(e){let t=new Go;return this.folders.set(t,e.slice(0,e.indexOf(`/`))),t}getTarget(e,t){let n=this.folders.get(e);return n===void 0?t:t.startsWith(`${n}/`)?t.slice(n.length+1):`../${t}`}},ud=e=>new X({name:`w:compatSetting`,attributes:{version:{key:`w:val`,value:e},name:{key:`w:name`,value:`compatibilityMode`},uri:{key:`w:uri`,value:`http://schemas.microsoft.com/office/word`}}}),dd=class extends b{constructor(e){super(`w:compat`),e.useSingleBorderforContiguousCells&&this.root.push(new Y(`w:useSingleBorderforContiguousCells`,e.useSingleBorderforContiguousCells)),e.wordPerfectJustification&&this.root.push(new Y(`w:wpJustification`,e.wordPerfectJustification)),e.noTabStopForHangingIndent&&this.root.push(new Y(`w:noTabHangInd`,e.noTabStopForHangingIndent)),e.noLeading&&this.root.push(new Y(`w:noLeading`,e.noLeading)),e.spaceForUnderline&&this.root.push(new Y(`w:spaceForUL`,e.spaceForUnderline)),e.noColumnBalance&&this.root.push(new Y(`w:noColumnBalance`,e.noColumnBalance)),e.balanceSingleByteDoubleByteWidth&&this.root.push(new Y(`w:balanceSingleByteDoubleByteWidth`,e.balanceSingleByteDoubleByteWidth)),e.noExtraLineSpacing&&this.root.push(new Y(`w:noExtraLineSpacing`,e.noExtraLineSpacing)),e.doNotLeaveBackslashAlone&&this.root.push(new Y(`w:doNotLeaveBackslashAlone`,e.doNotLeaveBackslashAlone)),e.underlineTrailingSpaces&&this.root.push(new Y(`w:ulTrailSpace`,e.underlineTrailingSpaces)),e.doNotExpandShiftReturn&&this.root.push(new Y(`w:doNotExpandShiftReturn`,e.doNotExpandShiftReturn)),e.spacingInWholePoints&&this.root.push(new Y(`w:spacingInWholePoints`,e.spacingInWholePoints)),e.lineWrapLikeWord6&&this.root.push(new Y(`w:lineWrapLikeWord6`,e.lineWrapLikeWord6)),e.printBodyTextBeforeHeader&&this.root.push(new Y(`w:printBodyTextBeforeHeader`,e.printBodyTextBeforeHeader)),e.printColorsBlack&&this.root.push(new Y(`w:printColBlack`,e.printColorsBlack)),e.spaceWidth&&this.root.push(new Y(`w:wpSpaceWidth`,e.spaceWidth)),e.showBreaksInFrames&&this.root.push(new Y(`w:showBreaksInFrames`,e.showBreaksInFrames)),e.subFontBySize&&this.root.push(new Y(`w:subFontBySize`,e.subFontBySize)),e.suppressBottomSpacing&&this.root.push(new Y(`w:suppressBottomSpacing`,e.suppressBottomSpacing)),e.suppressTopSpacing&&this.root.push(new Y(`w:suppressTopSpacing`,e.suppressTopSpacing)),e.suppressSpacingAtTopOfPage&&this.root.push(new Y(`w:suppressSpacingAtTopOfPage`,e.suppressSpacingAtTopOfPage)),e.suppressTopSpacingWP&&this.root.push(new Y(`w:suppressTopSpacingWP`,e.suppressTopSpacingWP)),e.suppressSpBfAfterPgBrk&&this.root.push(new Y(`w:suppressSpBfAfterPgBrk`,e.suppressSpBfAfterPgBrk)),e.swapBordersFacingPages&&this.root.push(new Y(`w:swapBordersFacingPages`,e.swapBordersFacingPages)),e.convertMailMergeEsc&&this.root.push(new Y(`w:convMailMergeEsc`,e.convertMailMergeEsc)),e.truncateFontHeightsLikeWP6&&this.root.push(new Y(`w:truncateFontHeightsLikeWP6`,e.truncateFontHeightsLikeWP6)),e.macWordSmallCaps&&this.root.push(new Y(`w:mwSmallCaps`,e.macWordSmallCaps)),e.usePrinterMetrics&&this.root.push(new Y(`w:usePrinterMetrics`,e.usePrinterMetrics)),e.doNotSuppressParagraphBorders&&this.root.push(new Y(`w:doNotSuppressParagraphBorders`,e.doNotSuppressParagraphBorders)),e.wrapTrailSpaces&&this.root.push(new Y(`w:wrapTrailSpaces`,e.wrapTrailSpaces)),e.footnoteLayoutLikeWW8&&this.root.push(new Y(`w:footnoteLayoutLikeWW8`,e.footnoteLayoutLikeWW8)),e.shapeLayoutLikeWW8&&this.root.push(new Y(`w:shapeLayoutLikeWW8`,e.shapeLayoutLikeWW8)),e.alignTablesRowByRow&&this.root.push(new Y(`w:alignTablesRowByRow`,e.alignTablesRowByRow)),e.forgetLastTabAlignment&&this.root.push(new Y(`w:forgetLastTabAlignment`,e.forgetLastTabAlignment)),e.adjustLineHeightInTable&&this.root.push(new Y(`w:adjustLineHeightInTable`,e.adjustLineHeightInTable)),e.autoSpaceLikeWord95&&this.root.push(new Y(`w:autoSpaceLikeWord95`,e.autoSpaceLikeWord95)),e.noSpaceRaiseLower&&this.root.push(new Y(`w:noSpaceRaiseLower`,e.noSpaceRaiseLower)),e.doNotUseHTMLParagraphAutoSpacing&&this.root.push(new Y(`w:doNotUseHTMLParagraphAutoSpacing`,e.doNotUseHTMLParagraphAutoSpacing)),e.layoutRawTableWidth&&this.root.push(new Y(`w:layoutRawTableWidth`,e.layoutRawTableWidth)),e.layoutTableRowsApart&&this.root.push(new Y(`w:layoutTableRowsApart`,e.layoutTableRowsApart)),e.useWord97LineBreakRules&&this.root.push(new Y(`w:useWord97LineBreakRules`,e.useWord97LineBreakRules)),e.doNotBreakWrappedTables&&this.root.push(new Y(`w:doNotBreakWrappedTables`,e.doNotBreakWrappedTables)),e.doNotSnapToGridInCell&&this.root.push(new Y(`w:doNotSnapToGridInCell`,e.doNotSnapToGridInCell)),e.selectFieldWithFirstOrLastCharacter&&this.root.push(new Y(`w:selectFldWithFirstOrLastChar`,e.selectFieldWithFirstOrLastCharacter)),e.applyBreakingRules&&this.root.push(new Y(`w:applyBreakingRules`,e.applyBreakingRules)),e.doNotWrapTextWithPunctuation&&this.root.push(new Y(`w:doNotWrapTextWithPunct`,e.doNotWrapTextWithPunctuation)),e.doNotUseEastAsianBreakRules&&this.root.push(new Y(`w:doNotUseEastAsianBreakRules`,e.doNotUseEastAsianBreakRules)),e.useWord2002TableStyleRules&&this.root.push(new Y(`w:useWord2002TableStyleRules`,e.useWord2002TableStyleRules)),e.growAutofit&&this.root.push(new Y(`w:growAutofit`,e.growAutofit)),e.useFELayout&&this.root.push(new Y(`w:useFELayout`,e.useFELayout)),e.useNormalStyleForList&&this.root.push(new Y(`w:useNormalStyleForList`,e.useNormalStyleForList)),e.doNotUseIndentAsNumberingTabStop&&this.root.push(new Y(`w:doNotUseIndentAsNumberingTabStop`,e.doNotUseIndentAsNumberingTabStop)),e.useAlternateEastAsianLineBreakRules&&this.root.push(new Y(`w:useAltKinsokuLineBreakRules`,e.useAlternateEastAsianLineBreakRules)),e.allowSpaceOfSameStyleInTable&&this.root.push(new Y(`w:allowSpaceOfSameStyleInTable`,e.allowSpaceOfSameStyleInTable)),e.doNotSuppressIndentation&&this.root.push(new Y(`w:doNotSuppressIndentation`,e.doNotSuppressIndentation)),e.doNotAutofitConstrainedTables&&this.root.push(new Y(`w:doNotAutofitConstrainedTables`,e.doNotAutofitConstrainedTables)),e.autofitToFirstFixedWidthCell&&this.root.push(new Y(`w:autofitToFirstFixedWidthCell`,e.autofitToFirstFixedWidthCell)),e.underlineTabInNumberingList&&this.root.push(new Y(`w:underlineTabInNumList`,e.underlineTabInNumberingList)),e.displayHangulFixedWidth&&this.root.push(new Y(`w:displayHangulFixedWidth`,e.displayHangulFixedWidth)),e.splitPgBreakAndParaMark&&this.root.push(new Y(`w:splitPgBreakAndParaMark`,e.splitPgBreakAndParaMark)),e.doNotVerticallyAlignCellWithSp&&this.root.push(new Y(`w:doNotVertAlignCellWithSp`,e.doNotVerticallyAlignCellWithSp)),e.doNotBreakConstrainedForcedTable&&this.root.push(new Y(`w:doNotBreakConstrainedForcedTable`,e.doNotBreakConstrainedForcedTable)),e.ignoreVerticalAlignmentInTextboxes&&this.root.push(new Y(`w:doNotVertAlignInTxbx`,e.ignoreVerticalAlignmentInTextboxes)),e.useAnsiKerningPairs&&this.root.push(new Y(`w:useAnsiKerningPairs`,e.useAnsiKerningPairs)),e.cachedColumnBalance&&this.root.push(new Y(`w:cachedColBalance`,e.cachedColumnBalance)),e.version&&this.root.push(ud(e.version))}},fd=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{wpc:`xmlns:wpc`,mc:`xmlns:mc`,o:`xmlns:o`,r:`xmlns:r`,m:`xmlns:m`,v:`xmlns:v`,wp14:`xmlns:wp14`,wp:`xmlns:wp`,w10:`xmlns:w10`,w:`xmlns:w`,w14:`xmlns:w14`,w15:`xmlns:w15`,wpg:`xmlns:wpg`,wpi:`xmlns:wpi`,wne:`xmlns:wne`,wps:`xmlns:wps`,Ignorable:`mc:Ignorable`})}},pd=class extends b{constructor(e){super(`w:settings`),this.root.push(new fd({wpc:`http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas`,mc:`http://schemas.openxmlformats.org/markup-compatibility/2006`,o:`urn:schemas-microsoft-com:office:office`,r:`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,m:`http://schemas.openxmlformats.org/officeDocument/2006/math`,v:`urn:schemas-microsoft-com:vml`,wp14:`http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing`,wp:`http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing`,w10:`urn:schemas-microsoft-com:office:word`,w:`http://schemas.openxmlformats.org/wordprocessingml/2006/main`,w14:`http://schemas.microsoft.com/office/word/2010/wordml`,w15:`http://schemas.microsoft.com/office/word/2012/wordml`,wpg:`http://schemas.microsoft.com/office/word/2010/wordprocessingGroup`,wpi:`http://schemas.microsoft.com/office/word/2010/wordprocessingInk`,wne:`http://schemas.microsoft.com/office/word/2006/wordml`,wps:`http://schemas.microsoft.com/office/word/2010/wordprocessingShape`,Ignorable:`w14 w15 wp14`})),this.root.push(new Y(`w:displayBackgroundShape`,!0)),e.embedFonts!==void 0&&this.root.push(new Y(`w:embedTrueTypeFonts`,e.embedFonts)),e.trackRevisions!==void 0&&this.root.push(new Y(`w:trackRevisions`,e.trackRevisions)),e.defaultTabStop!==void 0&&this.root.push(new tn(`w:defaultTabStop`,e.defaultTabStop)),e.hyphenation?.autoHyphenation!==void 0&&this.root.push(new Y(`w:autoHyphenation`,e.hyphenation.autoHyphenation)),e.hyphenation?.consecutiveHyphenLimit!==void 0&&this.root.push(new tn(`w:consecutiveHyphenLimit`,e.hyphenation.consecutiveHyphenLimit)),e.hyphenation?.hyphenationZone!==void 0&&this.root.push(new tn(`w:hyphenationZone`,e.hyphenation.hyphenationZone)),e.hyphenation?.doNotHyphenateCaps!==void 0&&this.root.push(new Y(`w:doNotHyphenateCaps`,e.hyphenation.doNotHyphenateCaps)),e.evenAndOddHeaders!==void 0&&this.root.push(new Y(`w:evenAndOddHeaders`,e.evenAndOddHeaders)),e.updateFields!==void 0&&this.root.push(new Y(`w:updateFields`,e.updateFields)),this.root.push(new dd(C(C({},e.compatibility??{}),{},{version:e.compatibility?.version??e.compatibilityModeVersion??15})))}},md=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{val:`w:val`})}},hd=class extends b{constructor(e){super(`w:name`),this.root.push(new md({val:e}))}},gd=class extends b{constructor(e){super(`w:uiPriority`),this.root.push(new md({val:J(e)}))}},_d=class extends w{constructor(...e){super(...e),_(this,`xmlKeys`,{type:`w:type`,styleId:`w:styleId`,default:`w:default`,customStyle:`w:customStyle`})}},vd=class extends b{constructor(e,t){super(`w:style`),this.root.push(new _d(e)),t.name&&this.root.push(new hd(t.name)),t.basedOn&&this.root.push(new $t(`w:basedOn`,t.basedOn)),t.next&&this.root.push(new $t(`w:next`,t.next)),t.link&&this.root.push(new $t(`w:link`,t.link)),t.uiPriority!==void 0&&this.root.push(new gd(t.uiPriority)),t.semiHidden!==void 0&&this.root.push(new Y(`w:semiHidden`,t.semiHidden)),t.unhideWhenUsed!==void 0&&this.root.push(new Y(`w:unhideWhenUsed`,t.unhideWhenUsed)),t.quickFormat!==void 0&&this.root.push(new Y(`w:qFormat`,t.quickFormat))}},yd=class extends vd{constructor(e){super({type:`paragraph`,styleId:e.id},e),_(this,`paragraphProperties`,void 0),_(this,`runProperties`,void 0),this.paragraphProperties=new Hs(e.paragraph,{implicitListParagraphStyle:!1}),this.runProperties=new fr(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}},bd=class extends vd{constructor(e){super({type:`character`,styleId:e.id},C({uiPriority:99,unhideWhenUsed:!0},e)),_(this,`runProperties`,void 0),this.runProperties=new fr(e.run),this.root.push(this.runProperties)}},xd=class extends yd{constructor(e){super(C({basedOn:`Normal`,next:`Normal`,quickFormat:!0},e))}},Sd=class extends xd{constructor(e){super(C({id:`Title`,name:`Title`},e))}},Cd=class extends xd{constructor(e){super(C({id:`Heading1`,name:`Heading 1`},e))}},wd=class extends xd{constructor(e){super(C({id:`Heading2`,name:`Heading 2`},e))}},Td=class extends xd{constructor(e){super(C({id:`Heading3`,name:`Heading 3`},e))}},Ed=class extends xd{constructor(e){super(C({id:`Heading4`,name:`Heading 4`},e))}},Dd=class extends xd{constructor(e){super(C({id:`Heading5`,name:`Heading 5`},e))}},Od=class extends xd{constructor(e){super(C({id:`Heading6`,name:`Heading 6`},e))}},kd=class extends xd{constructor(e){super(C({id:`Strong`,name:`Strong`},e))}},Ad=class extends yd{constructor(e){super(C({id:`ListParagraph`,name:`List Paragraph`,basedOn:`Normal`,quickFormat:!0},e))}},jd=class extends yd{constructor(e){super(C({id:`FootnoteText`,name:`footnote text`,link:`FootnoteTextChar`,basedOn:`Normal`,uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:cs.AUTO}},run:{size:20}},e))}},Md=class extends bd{constructor(e){super(C({id:`FootnoteReference`,name:`footnote reference`,basedOn:`DefaultParagraphFont`,semiHidden:!0,run:{superScript:!0}},e))}},Nd=class extends bd{constructor(e){super(C({id:`FootnoteTextChar`,name:`Footnote Text Char`,basedOn:`DefaultParagraphFont`,link:`FootnoteText`,semiHidden:!0,run:{size:20}},e))}},Pd=class extends yd{constructor(e){super(C({id:`EndnoteText`,name:`endnote text`,link:`EndnoteTextChar`,basedOn:`Normal`,uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:cs.AUTO}},run:{size:20}},e))}},Fd=class extends bd{constructor(e){super(C({id:`EndnoteReference`,name:`endnote reference`,basedOn:`DefaultParagraphFont`,semiHidden:!0,run:{superScript:!0}},e))}},Id=class extends bd{constructor(e){super(C({id:`EndnoteTextChar`,name:`Endnote Text Char`,basedOn:`DefaultParagraphFont`,link:`EndnoteText`,semiHidden:!0,run:{size:20}},e))}},Ld=class extends bd{constructor(e){super(C({id:`Hyperlink`,name:`Hyperlink`,basedOn:`DefaultParagraphFont`,run:{color:`0563C1`,underline:{type:ur.SINGLE}}},e))}},Rd=class extends vd{constructor(){super({type:`table`,styleId:`TableNormal`,default:!0},{name:`Normal Table`,uiPriority:99,semiHidden:!0,unhideWhenUsed:!0}),this.root.push(new Ul({indent:{size:0,type:tl.DXA},cellMargin:{top:0,left:108,bottom:0,right:108}}))}},zd=e=>typeof e==`object`?Object.keys(e)[0]:void 0,Bd=e=>[e[`w:style`]].flat().find(e=>e._attr)?._attr,Vd=e=>Bd(e)?.[`w:styleId`],Hd=e=>{let t=Bd(e);return(t?.[`w:type`]??`paragraph`)===`paragraph`&&t?.[`w:default`]!==void 0&&![`0`,`false`,`off`].includes(String(t[`w:default`]))},Ud=e=>({"w:style":[e[`w:style`]].flat().map(e=>e._attr?{_attr:C(C({},e._attr),{},{"w:default":`1`})}:e)}),Wd=class extends b{constructor(e){if(super(`w:styles`),e.initialStyles&&this.root.push(e.initialStyles),e.importedStyles)for(let t of e.importedStyles)this.root.push(t);if(e.paragraphStyles)for(let t of e.paragraphStyles)this.root.push(new yd(t));if(e.characterStyles)for(let t of e.characterStyles)this.root.push(new bd(t))}prepForXml(e){let t=super.prepForXml(e),n=t[`w:styles`];if(!Array.isArray(n))return t;let r=e=>n.filter(t=>zd(t)===e),i=n.map(e=>zd(e)===`w:style`?Vd(e):void 0),a=n.filter((e,t)=>![`_attr`,`w:docDefaults`,`w:latentStyles`].includes(zd(e))&&(i[t]===void 0||i.lastIndexOf(i[t])===t)),o=a.some(e=>zd(e)===`w:style`&&Hd(e))?a:a.map(e=>zd(e)===`w:style`&&Vd(e)===`Normal`&&(Bd(e)?.[`w:type`]??`paragraph`)===`paragraph`?Ud(e):e);return{"w:styles":[...r(`_attr`),...r(`w:docDefaults`).slice(-1),...r(`w:latentStyles`).slice(-1),...o]}}},Gd=class extends b{constructor(e){super(`w:pPrDefault`),this.root.push(new Hs(e,{implicitListParagraphStyle:!1}))}},Kd=class extends b{constructor(e){super(`w:rPrDefault`),this.root.push(new fr(e))}},qd=class extends b{constructor(e){super(`w:docDefaults`),_(this,`runPropertiesDefaults`,void 0),_(this,`paragraphPropertiesDefaults`,void 0),this.runPropertiesDefaults=new Kd(e.run),this.paragraphPropertiesDefaults=new Gd(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}},Jd=class{newInstance(e){let t=(0,kt.xml2js)(e,{compact:!1}),n;for(let e of t.elements||[])e.name===`w:styles`&&(n=e);if(n===void 0)throw Error(`can not find styles element`);let r=n.elements||[];return{initialStyles:new Nt(n.attributes),importedStyles:r.map(e=>At(e))}}},Yd=(e={})=>({normal:new yd({id:`Normal`,name:`Normal`,quickFormat:!0}),normalTable:new Rd,document:new qd(e.document??{}),title:new Sd(C({run:{size:56}},e.title)),heading1:new Cd(C({run:{color:`2E74B5`,size:32}},e.heading1)),heading2:new wd(C({run:{color:`2E74B5`,size:26}},e.heading2)),heading3:new Td(C({run:{color:`1F4D78`,size:24}},e.heading3)),heading4:new Ed(C({run:{color:`2E74B5`,italics:!0}},e.heading4)),heading5:new Dd(C({run:{color:`2E74B5`}},e.heading5)),heading6:new Od(C({run:{color:`1F4D78`}},e.heading6)),strong:new kd(C({run:{bold:!0}},e.strong)),listParagraph:new Ad(e.listParagraph||{}),hyperlink:new Ld(e.hyperlink||{}),footnoteReference:new Md(e.footnoteReference||{}),footnoteText:new jd(e.footnoteText||{}),footnoteTextChar:new Nd(e.footnoteTextChar||{}),endnoteReference:new Fd(e.endnoteReference||{}),endnoteText:new Pd(e.endnoteText||{}),endnoteTextChar:new Id(e.endnoteTextChar||{})}),Xd=class{newInstance(e={}){return{initialStyles:new ru([`mc`,`r`,`w`,`w14`,`w15`],`w14 w15`),importedStyles:Object.values(Yd(e))}}},Zd={headings:{latin:`Calibri Light`,panose:`020F0302020204030204`},body:{latin:`Calibri`,panose:`020F0502020204030204`}},Qd=[[`Jpan`,`游ゴシック Light`,`游明朝`],[`Hang`,`맑은 고딕`],[`Hans`,`等线 Light`,`等线`],[`Hant`,`新細明體`],[`Arab`,`Times New Roman`,`Arial`],[`Hebr`,`Times New Roman`,`Arial`],[`Thai`,`Angsana New`,`Cordia New`],[`Ethi`,`Nyala`],[`Beng`,`Vrinda`],[`Gujr`,`Shruti`],[`Khmr`,`MoolBoran`,`DaunPenh`],[`Knda`,`Tunga`],[`Guru`,`Raavi`],[`Cans`,`Euphemia`],[`Cher`,`Plantagenet Cherokee`],[`Yiii`,`Microsoft Yi Baiti`],[`Tibt`,`Microsoft Himalaya`],[`Thaa`,`MV Boli`],[`Deva`,`Mangal`],[`Telu`,`Gautami`],[`Taml`,`Latha`],[`Syrc`,`Estrangelo Edessa`],[`Orya`,`Kalinga`],[`Mlym`,`Kartika`],[`Laoo`,`DokChampa`],[`Sinh`,`Iskoola Pota`],[`Mong`,`Mongolian Baiti`],[`Viet`,`Times New Roman`,`Arial`],[`Uigh`,`Microsoft Uighur`],[`Geor`,`Sylfaen`],[`Armn`,`Arial`],[`Bugi`,`Leelawadee UI`],[`Bopo`,`Microsoft JhengHei`],[`Java`,`Javanese Text`],[`Lisu`,`Segoe UI`],[`Mymr`,`Myanmar Text`],[`Nkoo`,`Ebrima`],[`Olck`,`Nirmala UI`],[`Osma`,`Ebrima`],[`Phag`,`Phagspa`],[`Syrn`,`Estrangelo Edessa`],[`Syrj`,`Estrangelo Edessa`],[`Syre`,`Estrangelo Edessa`],[`Sora`,`Nirmala UI`],[`Tale`,`Microsoft Tai Le`],[`Talu`,`Microsoft New Tai Lue`],[`Tfng`,`Ebrima`]],$d=(e,t,n)=>new X({name:e,attributes:{typeface:{key:`typeface`,value:t},panose:{key:`panose`,value:n}}}),ef=(e,t)=>{let n=t[e];return(typeof n==`string`?n:n?.latin)??Zd[e].latin},tf=(e,t)=>{let n=t[e],{eastAsia:r=``,complexScript:i=``}=typeof n==`object`?n:{},a=ef(e,t),o=Zd[e];return new X({name:e===`headings`?`a:majorFont`:`a:minorFont`,children:[$d(`a:latin`,a,a===o.latin?o.panose:void 0),$d(`a:ea`,r),$d(`a:cs`,i),...Qd.map(([t,n,r=n])=>new X({name:`a:font`,attributes:{script:{key:`script`,value:t},typeface:{key:`typeface`,value:e===`headings`?n:r}}}))]})},nf=(e,t={})=>new X({name:`a:fontScheme`,attributes:{name:{key:`name`,value:e}},children:[tf(`headings`,t),tf(`body`,t)]}),rf=(e=[])=>new X({name:`a:schemeClr`,attributes:{value:{key:`val`,value:`phClr`}},children:e.map(([e,t])=>new X({name:`a:${e}`,attributes:{value:{key:`val`,value:t}}}))}),af=e=>new X({name:`a:solidFill`,children:[rf(e)]}),of=e=>new X({name:`a:gradFill`,attributes:{rotateWithShape:{key:`rotWithShape`,value:!0}},children:[new X({name:`a:gsLst`,children:e.map((e,t)=>new X({name:`a:gs`,attributes:{position:{key:`pos`,value:t*5e4}},children:[rf(e)]}))}),new X({name:`a:lin`,attributes:{angle:{key:`ang`,value:54e5},scaled:{key:`scaled`,value:!1}}})]}),sf=e=>new X({name:`a:ln`,attributes:{width:{key:`w`,value:e},cap:{key:`cap`,value:`flat`},compound:{key:`cmpd`,value:`sng`},alignment:{key:`algn`,value:`ctr`}},children:[af(),new X({name:`a:prstDash`,attributes:{value:{key:`val`,value:`solid`}}}),new X({name:`a:miter`,attributes:{limit:{key:`lim`,value:8e5}}})]}),cf=e=>new X({name:`a:effectStyle`,children:[new X({name:`a:effectLst`,children:e})]}),lf=()=>new X({name:`a:outerShdw`,attributes:{blurRadius:{key:`blurRad`,value:57150},distance:{key:`dist`,value:19050},direction:{key:`dir`,value:54e5},alignment:{key:`algn`,value:`ctr`},rotateWithShape:{key:`rotWithShape`,value:!1}},children:[new X({name:`a:srgbClr`,attributes:{value:{key:`val`,value:`000000`}},children:[new X({name:`a:alpha`,attributes:{value:{key:`val`,value:63e3}}})]})]}),uf=()=>new X({name:`a:fmtScheme`,attributes:{name:{key:`name`,value:`Office`}},children:[new X({name:`a:fillStyleLst`,children:[af(),of([[[`lumMod`,11e4],[`satMod`,105e3],[`tint`,67e3]],[[`lumMod`,105e3],[`satMod`,103e3],[`tint`,73e3]],[[`lumMod`,105e3],[`satMod`,109e3],[`tint`,81e3]]]),of([[[`satMod`,103e3],[`lumMod`,102e3],[`tint`,94e3]],[[`satMod`,11e4],[`lumMod`,1e5],[`shade`,1e5]],[[`lumMod`,99e3],[`satMod`,12e4],[`shade`,78e3]]])]}),new X({name:`a:lnStyleLst`,children:[sf(6350),sf(12700),sf(19050)]}),new X({name:`a:effectStyleLst`,children:[cf([]),cf([]),cf([lf()])]}),new X({name:`a:bgFillStyleLst`,children:[af(),af([[`tint`,95e3],[`satMod`,17e4]]),of([[[`tint`,93e3],[`satMod`,15e4],[`shade`,98e3],[`lumMod`,102e3]],[[`tint`,98e3],[`satMod`,13e4],[`shade`,9e4],[`lumMod`,103e3]],[[`shade`,63e3],[`satMod`,12e4]]])]})]}),df=class extends b{constructor({name:e=`Office Theme`,colors:t,fonts:n}={}){super(`a:theme`),_(this,`colors`,void 0),this.colors=un(t),this.root.push(new T({namespace:{key:`xmlns:a`,value:`http://schemas.openxmlformats.org/drawingml/2006/main`},name:{key:`name`,value:e}})),this.root.push(new X({name:`a:themeElements`,children:[pn(t?e:`Office`,t),nf(n?e:`Office`,n),uf()]})),this.root.push(new X({name:`a:objectDefaults`})),this.root.push(new X({name:`a:extraClrSchemeLst`}))}get Colors(){return this.colors}},ff=class{constructor(e){if(_(this,`currentRelationshipId`,1),_(this,`documentWrapper`,void 0),_(this,`headers`,[]),_(this,`footers`,[]),_(this,`coreProperties`,void 0),_(this,`numbering`,void 0),_(this,`media`,void 0),_(this,`fileRelationships`,void 0),_(this,`footnotesWrapper`,void 0),_(this,`endnotesWrapper`,void 0),_(this,`settings`,void 0),_(this,`contentTypes`,void 0),_(this,`customProperties`,void 0),_(this,`appProperties`,void 0),_(this,`styles`,void 0),_(this,`comments`,void 0),_(this,`commentsExtended`,void 0),_(this,`commentsIds`,void 0),_(this,`fontWrapper`,void 0),_(this,`theme`,void 0),_(this,`packageParts`,void 0),this.coreProperties=new iu(C(C({},e),{},{creator:e.creator??`Un-named`,revision:e.revision??1,lastModifiedBy:e.lastModifiedBy??`Un-named`})),this.numbering=new cd(e.numbering?e.numbering:{config:[]}),this.comments=new Xo(e.comments??{children:[]}),this.comments.ThreadData&&(this.commentsExtended=new es(this.comments.ThreadData)),this.comments.CommentIdsData&&(this.commentsIds=new is(this.comments.CommentIdsData)),this.fileRelationships=new Go,this.customProperties=new du(e.customProperties??[]),this.appProperties=new Zl,this.footnotesWrapper=new Lu,this.endnotesWrapper=new Eu,this.contentTypes=new tu,this.packageParts=new ld(this.contentTypes),this.documentWrapper=new mu({background:e.background,pageNumbers:e.pageNumbers}),this.settings=new pd({compatibilityModeVersion:e.compatabilityModeVersion,compatibility:e.compatibility,evenAndOddHeaders:!!e.evenAndOddHeaderAndFooters,trackRevisions:e.features?.trackRevisions,updateFields:e.features?.updateFields,embedFonts:e.fonts?.length?!0:void 0,defaultTabStop:e.defaultTabStop,hyphenation:{autoHyphenation:e.hyphenation?.autoHyphenation,hyphenationZone:e.hyphenation?.hyphenationZone,consecutiveHyphenLimit:e.hyphenation?.consecutiveHyphenLimit,doNotHyphenateCaps:e.hyphenation?.doNotHyphenateCaps}}),this.media=new Vu,e.externalStyles!==void 0){let t=e.styles?.default??{},n=Object.entries(Yd(t)),r=([e])=>t[e]!==void 0,i=new Jd().newInstance(e.externalStyles);this.styles=new Wd(C(C({},i),{},{paragraphStyles:e.styles?.paragraphStyles,characterStyles:e.styles?.characterStyles,importedStyles:[...n.filter(e=>!r(e)).map(([,e])=>e),...i.importedStyles,...n.filter(r).map(([,e])=>e)]}))}else if(e.styles){let t=new Xd().newInstance(e.styles.default);this.styles=new Wd(C(C({},t),e.styles))}else{let e=new Xd;this.styles=new Wd(e.newInstance())}this.addDefaultRelationships();for(let t of e.sections)this.addSection(t);if(e.footnotes)for(let t in e.footnotes)this.footnotesWrapper.View.createFootNote(parseFloat(t),e.footnotes[t].children);if(e.endnotes)for(let t in e.endnotes)this.endnotesWrapper.View.createEndnote(parseFloat(t),e.endnotes[t].children);this.fontWrapper=new Rs(e.fonts??[]),this.theme=new df(e.theme),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme`,`theme/theme1.xml`)}addSection({headers:e={},footers:t={},children:n,properties:r}){this.documentWrapper.View.Body.addSection(C(C({},r),{},{headerWrapperGroup:{default:e.default?this.createHeader(e.default):void 0,first:e.first?this.createHeader(e.first):void 0,even:e.even?this.createHeader(e.even):void 0},footerWrapperGroup:{default:t.default?this.createFooter(t.default):void 0,first:t.first?this.createFooter(t.first):void 0,even:t.even?this.createFooter(t.even):void 0}}));for(let e of n)this.documentWrapper.View.add(e)}createHeader(e){let t=new Bu(this.media,this.currentRelationshipId++);for(let n of e.options.children)t.add(n);return this.addHeaderToDocument(t),t}createFooter(e){let t=new ku(this.media,this.currentRelationshipId++);for(let n of e.options.children)t.add(n);return this.addFooterToDocument(t),t}addHeaderToDocument(e,t=Nc.DEFAULT){this.headers.push({header:e,type:t}),this.documentWrapper.Relationships.addRelationship(e.View.ReferenceId,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/header`,`header${this.headers.length}.xml`),this.contentTypes.addHeader(this.headers.length)}addFooterToDocument(e,t=Nc.DEFAULT){this.footers.push({footer:e,type:t}),this.documentWrapper.Relationships.addRelationship(e.View.ReferenceId,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer`,`footer${this.footers.length}.xml`),this.contentTypes.addFooter(this.footers.length)}addDefaultRelationships(){this.fileRelationships.addRelationship(1,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`,`word/document.xml`),this.fileRelationships.addRelationship(2,`http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties`,`docProps/core.xml`),this.fileRelationships.addRelationship(3,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties`,`docProps/app.xml`),this.fileRelationships.addRelationship(4,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties`,`docProps/custom.xml`),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles`,`styles.xml`),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering`,`numbering.xml`),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes`,`footnotes.xml`),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes`,`endnotes.xml`),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings`,`settings.xml`),this.comments.IsEmpty||(this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments`,`comments.xml`),this.contentTypes.addComments()),this.commentsExtended&&(this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,`http://schemas.microsoft.com/office/2011/relationships/commentsExtended`,`commentsExtended.xml`),this.contentTypes.addCommentsExtended()),this.commentsIds&&(this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,`http://schemas.microsoft.com/office/2016/09/relationships/commentsIds`,`commentsIds.xml`),this.contentTypes.addCommentsIds())}get Document(){return this.documentWrapper}get Styles(){return this.styles}get CoreProperties(){return this.coreProperties}get Numbering(){return this.numbering}get Media(){return this.media}get FileRelationships(){return this.fileRelationships}get Headers(){return this.headers.map(e=>e.header)}get Footers(){return this.footers.map(e=>e.footer)}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Endnotes(){return this.endnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}get CommentsExtended(){return this.commentsExtended}get CommentsIds(){return this.commentsIds}get FontTable(){return this.fontWrapper}get Theme(){return this.theme}get PackageParts(){return this.packageParts}},pf=u(((e,t)=>{A(),ne(),(function(n){typeof e==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:k===void 0?typeof self<`u`?self:this:k).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof p==`function`&&p;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var l=Error(`Cannot find module '`+o+`'`);throw l.code=`MODULE_NOT_FOUND`,l}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){var n=t[o][1][e];return i(n||e)},u,u.exports,e,t,n,r)}return n[o].exports}for(var a=typeof p==`function`&&p,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){"use strict";var r=e(`./utils`),i=e(`./support`),a=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;n.encode=function(e){for(var t,n,i,o,s,c,l,u=[],d=0,f=e.length,p=f,m=r.getTypeOf(e)!==`string`;d<e.length;)p=f-d,i=m?(t=e[d++],n=d<f?e[d++]:0,d<f?e[d++]:0):(t=e.charCodeAt(d++),n=d<f?e.charCodeAt(d++):0,d<f?e.charCodeAt(d++):0),o=t>>2,s=(3&t)<<4|n>>4,c=1<p?(15&n)<<2|i>>6:64,l=2<p?63&i:64,u.push(a.charAt(o)+a.charAt(s)+a.charAt(c)+a.charAt(l));return u.join(``)},n.decode=function(e){var t,n,r,o,s,c,l=0,u=0,d=`data:`;if(e.substr(0,d.length)===d)throw Error(`Invalid base64 input, it looks like a data url.`);var f,p=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,``)).length/4;if(e.charAt(e.length-1)===a.charAt(64)&&p--,e.charAt(e.length-2)===a.charAt(64)&&p--,p%1!=0)throw Error(`Invalid base64 input, bad content length.`);for(f=i.uint8array?new Uint8Array(0|p):Array(0|p);l<e.length;)t=a.indexOf(e.charAt(l++))<<2|(o=a.indexOf(e.charAt(l++)))>>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s<o;s++)e=e>>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r=``;for(n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=`
|
|
24
|
+
\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,i=function(e,t,n,i,o){var s=a.transformTo(`string`,o(i));return l.CENTRAL_DIRECTORY_END+`\0\0\0\0`+r(e,2)+r(e,2)+r(t,4)+r(n,4)+r(s.length,2)+s}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on(`data`,function(e){t.processChunk(e)}),e.on(`end`,function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on(`error`,function(e){t.error(e)}),this},u.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(e){var t=this._sources;if(!o.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch{}return!0},u.prototype.lock=function(){o.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,n){"use strict";var r=e(`../compressions`),i=e(`./ZipFileWorker`);n.generateWorker=function(e,t,n){var a=new i(t.streamFiles,n,t.platform,t.encodeFileName),o=0;try{e.forEach(function(e,n){o++;var i=function(e,t){var n=e||t,i=r[n];if(!i)throw Error(n+` is not a valid compression method !`);return i}(n.options.compression,t.compression),s=n.options.compressionOptions||t.compressionOptions||{},c=n.dir,l=n.date;n._compressWorker(i,s).withStreamInfo(`file`,{name:e,dir:c,date:l,comment:n.comment||``,unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(a)}),a.entriesCount=o}catch(e){a.error(e)}return a}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw Error(`The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.`);this.files=Object.create(null),this.comment=null,this.root=``,this.clone=function(){var e=new r;for(var t in this)typeof this[t]!=`function`&&(e[t]=this[t]);return e}}(r.prototype=e(`./object`)).loadAsync=e(`./load`),r.support=e(`./support`),r.defaults=e(`./defaults`),r.version=`3.10.2`,r.loadAsync=function(e,t){return new r().loadAsync(e,t)},r.external=e(`./external`),t.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,n){"use strict";var r=e(`./utils`),i=e(`./external`),a=e(`./utf8`),o=e(`./zipEntries`),s=e(`./stream/Crc32Probe`),c=e(`./nodejsUtils`);function l(e){return new i.Promise(function(t,n){var r=e.decompressed.getContentWorker().pipe(new s);r.on(`error`,function(e){n(e)}).on(`end`,function(){r.streamInfo.crc32===e.decompressed.crc32?t():n(Error(`Corrupted zip : CRC32 mismatch`))}).resume()})}t.exports=function(e,t){var n=this;return t=r.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),c.isNode&&c.isStream(e)?i.Promise.reject(Error(`JSZip can't accept a stream when loading a zip file.`)):r.prepareContent(`the loaded zip file`,e,!0,t.optimizedBinaryString,t.base64).then(function(e){var n=new o(t);return n.load(e),n}).then(function(e){var n=[i.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var a=0;a<r.length;a++)n.push(l(r[a]));return i.Promise.all(n)}).then(function(e){for(var i=e.shift(),a=i.files,o=0;o<a.length;o++){var s=a[o],c=s.fileNameStr,l=r.resolve(s.fileNameStr);n.file(l,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:t.createFolders}),s.dir||(n.file(l).unsafeOriginalName=c)}return i.zipComment.length&&(n.comment=i.zipComment),n})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`../stream/GenericWorker`);function a(e,t){i.call(this,`Nodejs stream input adapter for `+e),this._upstreamEnded=!1,this._bindStream(t)}r.inherits(a,i),a.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on(`data`,function(e){t.push({data:e,meta:{percent:0}})}).on(`error`,function(e){t.isPaused?this.generatedError=e:t.error(e)}).on(`end`,function(){t.isPaused?t._upstreamEnded=!0:t.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,n){"use strict";var r=e(`readable-stream`).Readable;function i(e,t,n){r.call(this,t),this._helper=e;var i=this;e.on(`data`,function(e,t){i.push(e)||i._helper.pause(),n&&n(t)}).on(`error`,function(e){i.emit(`error`,e)}).on(`end`,function(){i.push(null)})}e(`../utils`).inherits(i,r),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,t,n){"use strict";t.exports={isNode:typeof Buffer<`u`,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e==`number`)throw Error(`The "data" argument must not be a number`);return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on==`function`&&typeof e.pause==`function`&&typeof e.resume==`function`}}},{}],15:[function(e,t,n){"use strict";function r(e,t,n){var r,i=a.getTypeOf(t),s=a.extend(n||{},c);s.date=s.date||new Date,s.compression!==null&&(s.compression=s.compression.toUpperCase()),typeof s.unixPermissions==`string`&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=h(e)),s.createFolders&&(r=m(e))&&g.call(this,r,!0);var d=i===`string`&&!1===s.binary&&!1===s.base64;n&&n.binary!==void 0||(s.binary=!d),(t instanceof l&&t.uncompressedSize===0||s.dir||!t||t.length===0)&&(s.base64=!1,s.binary=!0,t=``,s.compression=`STORE`,i=`string`);var _=null;_=t instanceof l||t instanceof o?t:f.isNode&&f.isStream(t)?new p(e,t):a.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var v=new u(e,_,s);this.files[e]=v}var i=e(`./utf8`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=e(`./stream/StreamHelper`),c=e(`./defaults`),l=e(`./compressedObject`),u=e(`./zipObject`),d=e(`./generate`),f=e(`./nodejsUtils`),p=e(`./nodejs/NodejsStreamInputAdapter`),m=function(e){e.slice(-1)===`/`&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf(`/`);return 0<t?e.substring(0,t):``},h=function(e){return e.slice(-1)!==`/`&&(e+=`/`),e},g=function(e,t){return t=t===void 0?c.createFolders:t,e=h(e),this.files[e]||r.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function _(e){return Object.prototype.toString.call(e)===`[object RegExp]`}t.exports={load:function(){throw Error(`This method has been removed in JSZip 3.0, please check the upgrade guide.`)},forEach:function(e){var t,n,r;for(t in this.files)r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r)},filter:function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(r)}),t},file:function(e,t,n){if(arguments.length!==1)return e=this.root+e,r.call(this,e,t,n),this;if(_(e)){var i=e;return this.filter(function(e,t){return!t.dir&&i.test(e)})}var a=this.files[this.root+e];return a&&!a.dir?a:null},folder:function(e){if(!e)return this;if(_(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=g.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||=(e.slice(-1)!==`/`&&(e+=`/`),this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(){throw Error(`This method has been removed in JSZip 3.0, please check the upgrade guide.`)},generateInternalStream:function(e){var t,n={};try{if((n=a.extend(e||{},{streamFiles:!1,compression:`STORE`,compressionOptions:null,type:``,platform:`DOS`,comment:null,mimeType:`application/zip`,encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),n.type===`binarystring`&&(n.type=`string`),!n.type)throw Error(`No output type specified.`);a.checkSupport(n.type),n.platform!==`darwin`&&n.platform!==`freebsd`&&n.platform!==`linux`&&n.platform!==`sunos`||(n.platform=`UNIX`),n.platform===`win32`&&(n.platform=`DOS`);var r=n.comment||this.comment||``;t=d.generateWorker(this,n,r)}catch(e){(t=new o(`error`)).error(e)}return new s(t,n.type||`string`,n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e||={}).type||(e.type=`nodebuffer`),this.generateInternalStream(e).toNodejsStream(t)}}},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,n){"use strict";t.exports=e(`stream`)},{stream:void 0}],17:[function(e,t,n){"use strict";var r=e(`./DataReader`);function i(e){r.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),a=this.length-4;0<=a;--a)if(this.data[a]===t&&this.data[a+1]===n&&this.data[a+2]===r&&this.data[a+3]===i)return a-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&n===a[1]&&r===a[2]&&i===a[3]},i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,n){"use strict";var r=e(`../utils`);function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw Error(`End of data reached (data length = `+this.length+`, asked index = `+e+`). Corrupted zip ?`)},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){"use strict";var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){"use strict";function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw Error(`The stream '`+this+`' has already been used.`);this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on(`data`,function(e){t.processChunk(e)}),e.on(`end`,function(){t.end()}),e.on(`error`,function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw Error(`The stream '`+this+`' has already been used.`);this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e=`Worker `+this.name;return this.previous?this.previous+` -> `+e:e}},t.exports=r},{}],29:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n<t.length;n++)a+=t[n].length;switch(e){case`string`:return t.join(``);case`array`:return Array.prototype.concat.apply([],t);case`uint8array`:for(i=new Uint8Array(a),n=0;n<t.length;n++)i.set(t[n],r),r+=t[n].length;return i;case`nodebuffer`:return Buffer.concat(t);default:throw Error(`concat : unsupported type '`+e+`'`)}}(s,a),l))}catch(e){i(e)}a=[]}).resume()})}function d(e,t,n){var o=t;switch(t){case`blob`:case`arraybuffer`:o=`uint8array`;break;case`base64`:o=`string`}try{this._internalType=o,this._outputType=t,this._mimeType=n,r.checkSupport(o),this._worker=e.pipe(new i(o)),e.lock()}catch(e){this._worker=new a(`error`),this._worker.error(e)}}d.prototype={accumulate:function(e){return u(this,e)},on:function(e,t){var n=this;return e===`data`?this._worker.on(e,function(e){t.call(n,e.data,e.meta)}):this._worker.on(e,function(){r.delay(t,arguments,n)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(r.checkSupport(`nodestream`),this._outputType!==`nodebuffer`)throw Error(this._outputType+` is not supported by this method`);return new l(this,{objectMode:this._outputType!==`nodebuffer`},e)}},t.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,n){"use strict";if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`,n.nodebuffer=typeof Buffer<`u`,n.uint8array=typeof Uint8Array<`u`,typeof ArrayBuffer>`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){"use strict";for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a<s;a++)(64512&(n=e.charCodeAt(a)))==55296&&a+1<s&&(64512&(r=e.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(r-56320),a++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=i.uint8array?new Uint8Array(c):Array(c),a=o=0;o<c;a++)(64512&(n=e.charCodeAt(a)))==55296&&a+1<s&&(64512&(r=e.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(r-56320),a++),n<128?t[o++]=n:(n<2048?t[o++]=192|n>>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t<o;)if((i=e[t++])<128)c[n++]=i;else if(4<(a=s[i]))c[n++]=65533,t+=a-1;else{for(i&=a===2?31:a===3?15:7;1<a&&t<o;)i=i<<6|63&e[t++],a--;1<a?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){"use strict";var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}e(`setimmediate`),n.newBlob=function(e,t){n.checkSupport(`blob`);try{return new Blob([e],{type:t})}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return r.append(e),r.getBlob(t)}catch{throw Error(`Bug : can't construct the Blob.`)}}};var l={stringifyByChunk:function(e,t,n){var r=[],i=0,a=e.length;if(a<=n)return String.fromCharCode.apply(null,e);for(;i<a;)t===`array`||t===`nodebuffer`?r.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+n,a)))):r.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+n,a)))),i+=n;return r.join(``)},stringifyByChar:function(e){for(var t=``,n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function u(e){var t=65536,r=n.getTypeOf(e),i=!0;if(r===`uint8array`?i=l.applyCanBeUsed.uint8array:r===`nodebuffer`&&(i=l.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return l.stringifyByChunk(e,r,t)}catch{t=Math.floor(t/2)}return l.stringifyByChar(e)}function d(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}n.applyFromCharCode=u;var f={};f.string={string:s,array:function(e){return c(e,Array(e.length))},arraybuffer:function(e){return f.string.uint8array(e).buffer},uint8array:function(e){return c(e,new Uint8Array(e.length))},nodebuffer:function(e){return c(e,a.allocBuffer(e.length))}},f.array={string:u,array:s,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return a.newBufferFrom(e)}},f.arraybuffer={string:function(e){return u(new Uint8Array(e))},array:function(e){return d(new Uint8Array(e),Array(e.byteLength))},arraybuffer:s,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return a.newBufferFrom(new Uint8Array(e))}},f.uint8array={string:u,array:function(e){return d(e,Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:s,nodebuffer:function(e){return a.newBufferFrom(e)}},f.nodebuffer={string:u,array:function(e){return d(e,Array(e.length))},arraybuffer:function(e){return f.nodebuffer.uint8array(e).buffer},uint8array:function(e){return d(e,new Uint8Array(e.length))},nodebuffer:s},n.transformTo=function(e,t){return t||=``,e?(n.checkSupport(e),f[n.getTypeOf(t)][e](t)):t},n.resolve=function(e){for(var t=e.split(`/`),n=[],r=0;r<t.length;r++){var i=t[r];i===`.`||i===``&&r!==0&&r!==t.length-1||(i===`..`?n.pop():n.push(i))}return n.join(`/`)},n.getTypeOf=function(e){if(typeof e==`string`)return`string`;var t=Object.prototype.toString.call(e);return t===`[object Array]`?`array`:r.nodebuffer&&a.isBuffer(e)?`nodebuffer`:r.uint8array&&t===`[object Uint8Array]`?`uint8array`:r.arraybuffer&&t===`[object ArrayBuffer]`?`arraybuffer`:void 0},n.checkSupport=function(e){if(!r[e.toLowerCase()])throw Error(e+` is not supported by this platform`)},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(e){var t,n,r=``;for(n=0;n<(e||``).length;n++)r+=`\\x`+((t=e.charCodeAt(n))<16?`0`:``)+t.toString(16).toUpperCase();return r},n.delay=function(e,t,n){setImmediate(function(){e.apply(n||null,t||[])})},n.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},n.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&n[t]===void 0&&(n[t]=arguments[e][t]);return n},n.prepareContent=function(e,t,a,s,l){return o.Promise.resolve(t).then(function(t){return r.blob&&(t instanceof Blob||[`[object File]`,`[object Blob]`].indexOf(Object.prototype.toString.call(t))!==-1)?Blob.prototype.arrayBuffer===void 0?typeof FileReader<`u`?new o.Promise(function(e,n){var r=new FileReader;r.onload=function(t){e(t.target.result)},r.onerror=function(e){n(e.target.error)},r.readAsArrayBuffer(t)}):o.Promise.reject(Error(e+` is a Blob, but we have no way of reading it.`)):t.arrayBuffer():t}).then(function(t){var u=n.getTypeOf(t);return u?(u===`arraybuffer`?t=n.transformTo(`uint8array`,t):u===`string`&&(l?t=i.decode(t):a&&!0!==s&&(t=function(e){return c(e,r.uint8array?new Uint8Array(e.length):Array(e.length))}(t))),t):o.Promise.reject(Error(`Can't read the data of '`+e+`'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?`))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,n){"use strict";var r=e(`./reader/readerFor`),i=e(`./utils`),a=e(`./signature`),o=e(`./zipEntry`),s=e(`./support`);function c(e){this.files=[],this.loadOptions=e}c.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw Error(`Corrupted zip or bug: unexpected signature (`+i.pretty(t)+`, expected `+i.pretty(e)+`)`)}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4)===t;return this.reader.setIndex(n),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=s.uint8array?`uint8array`:`array`,n=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,r=this.zip64EndOfCentralSize-44;0<r;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw Error(`Multi-volumes zip are not supported`)},readLocalFiles:function(){for(var e=0,t;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(e=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw Error(`Corrupted zip or bug: expected `+this.centralDirRecords+` records in central dir, got `+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?Error(`Corrupted zip: can't find end of central directory`):Error(`Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html`);this.reader.setIndex(e);var t=e;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw Error(`Corrupted zip: can't find the ZIP64 end of central directory locator`);if(this.reader.setIndex(e),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw Error(`Corrupted zip: can't find the ZIP64 end of central directory`);this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=t-n;if(0<r)this.isSignature(t,a.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw Error(`Corrupted zip: missing `+Math.abs(r)+` bytes.`)},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=c},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,n){"use strict";var r=e(`./reader/readerFor`),i=e(`./utils`),a=e(`./compressedObject`),o=e(`./crc32`),s=e(`./utf8`),c=e(`./compressions`),l=e(`./support`);function u(e,t){this.options=e,this.loadOptions=t}u.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),this.compressedSize===-1||this.uncompressedSize===-1)throw Error(`Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)`);if((t=function(e){for(var t in c)if(Object.prototype.hasOwnProperty.call(c,t)&&c[t].magic===e)return c[t];return null}(this.compressionMethod))===null)throw Error(`Corrupted zip : compression `+i.pretty(this.compressionMethod)+` unknown (inner file : `+i.transformTo(`string`,this.fileName)+`)`);this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw Error(`Encrypted zip are not supported`);e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4<i;)t=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[t]={id:t,length:n,value:r};e.setIndex(i)},handleUTF8:function(){var e=l.uint8array?`uint8array`:`array`;if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(t!==null)this.fileNameStr=t;else{var n=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(r!==null)this.fileCommentStr=r;else{var a=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(a)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=r(e.value);return t.readInt(1)===1&&o(this.fileName)===t.readInt(4)?s.utf8decode(t.readData(e.length-5)):null}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=r(e.value);return t.readInt(1)===1&&o(this.fileComment)===t.readInt(4)?s.utf8decode(t.readData(e.length-5)):null}return null}},t.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,n){"use strict";function r(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var i=e(`./stream/StreamHelper`),a=e(`./stream/DataWorker`),o=e(`./utf8`),s=e(`./compressedObject`),c=e(`./stream/GenericWorker`);r.prototype={internalStream:function(e){var t=null,n=`string`;try{if(!e)throw Error(`No output type specified.`);var r=(n=e.toLowerCase())===`string`||n===`text`;n!==`binarystring`&&n!==`text`||(n=`string`),t=this._decompressWorker();var a=!this._dataBinary;a&&!r&&(t=t.pipe(new o.Utf8EncodeWorker)),!a&&r&&(t=t.pipe(new o.Utf8DecodeWorker))}catch(e){(t=new c(`error`)).error(e)}return new i(t,n,``)},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||`nodebuffer`).toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof s&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new o.Utf8EncodeWorker)),s.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof c?this._data:new a(this._data)}};for(var l=[`asText`,`asBinary`,`asNodeBuffer`,`asUint8Array`,`asArrayBuffer`],u=function(){throw Error(`This method has been removed in JSZip 3.0, please check the upgrade guide.`)},d=0;d<l.length;d++)r.prototype[l[d]]=u;t.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){"use strict";var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var a=0,o=new i(u),s=e.document.createTextNode(``);o.observe(s,{characterData:!0}),n=function(){s.data=a=++a%2}}else if(e.setImmediate||e.MessageChannel===void 0)n=`document`in e&&`onreadystatechange`in e.document.createElement(`script`)?function(){var t=e.document.createElement(`script`);t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var c=new e.MessageChannel;c.port1.onmessage=u,n=function(){c.port2.postMessage(0)}}var l=[];function u(){var e,t;r=!0;for(var n=l.length;n;){for(t=l,l=[],e=-1;++e<n;)t[e]();n=l.length}r=!1}t.exports=function(e){l.push(e)!==1||r||n()}}).call(this,k===void 0?typeof self<`u`?self:typeof window<`u`?window:{}:k)},{}],37:[function(e,t,n){"use strict";var r=e(`immediate`);function i(){}var a={},o=[`REJECTED`],s=[`FULFILLED`],c=[`PENDING`];function l(e){if(typeof e!=`function`)throw TypeError(`resolver must be a function`);this.state=c,this.queue=[],this.outcome=void 0,e!==i&&p(this,e)}function u(e,t,n){this.promise=e,typeof t==`function`&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof n==`function`&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r(function(){var r;try{r=t(n)}catch(t){return a.reject(e,t)}r===e?a.reject(e,TypeError(`Cannot resolve promise with itself`)):a.resolve(e,r)})}function f(e){var t=e&&e.then;if(e&&(typeof e==`object`||typeof e==`function`)&&typeof t==`function`)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,a.reject(e,t))}function i(t){n||(n=!0,a.resolve(e,t))}var o=m(function(){t(i,r)});o.status===`error`&&r(o.value)}function m(e,t){var n={};try{n.value=e(t),n.status=`success`}catch(e){n.status=`error`,n.value=e}return n}(t.exports=l).prototype.finally=function(e){if(typeof e!=`function`)return this;var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})},l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if(typeof e!=`function`&&this.state===s||typeof t!=`function`&&this.state===o)return this;var n=new this.constructor(i);return this.state===c?this.queue.push(new u(n,e,t)):d(n,this.state===s?e:t,this.outcome),n},u.prototype.callFulfilled=function(e){a.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){a.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},a.resolve=function(e,t){var n=m(f,t);if(n.status===`error`)return a.reject(e,n.value);var r=n.value;if(r)p(e,r);else{e.state=s,e.outcome=t;for(var i=-1,o=e.queue.length;++i<o;)e.queue[i].callFulfilled(t)}return e},a.reject=function(e,t){e.state=o,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},l.resolve=function(e){return e instanceof this?e:a.resolve(new this(i),e)},l.reject=function(e){var t=new this(i);return a.reject(t,e)},l.all=function(e){var t=this;if(Object.prototype.toString.call(e)!==`[object Array]`)return this.reject(TypeError(`must be an array`));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var o=Array(n),s=0,c=-1,l=new this(i);++c<n;)u(e[c],c);return l;function u(e,i){t.resolve(e).then(function(e){o[i]=e,++s!==n||r||(r=!0,a.resolve(l,o))},function(e){r||(r=!0,a.reject(l,e))})}},l.race=function(e){var t=this;if(Object.prototype.toString.call(e)!==`[object Array]`)return this.reject(TypeError(`must be an array`));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var o=-1,s=new this(i);++o<n;)c=e[o],t.resolve(c).then(function(e){r||(r=!0,a.resolve(s,e))},function(e){r||(r=!0,a.reject(s,e))});var c;return s}},{immediate:36}],38:[function(e,t,n){"use strict";var r={};(0,e(`./lib/utils/common`).assign)(r,e(`./lib/deflate`),e(`./lib/inflate`),e(`./lib/zlib/constants`)),t.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,n){"use strict";var r=e(`./zlib/deflate`),i=e(`./utils/common`),a=e(`./utils/strings`),o=e(`./zlib/messages`),s=e(`./zlib/zstream`),c=Object.prototype.toString,l=0,u=-1,d=0,f=8;function p(e){if(!(this instanceof p))return new p(e);this.options=i.assign({level:u,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:``},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==l)throw Error(o[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var m=typeof t.dictionary==`string`?a.string2buf(t.dictionary):c.call(t.dictionary)===`[object ArrayBuffer]`?new Uint8Array(t.dictionary):t.dictionary;if((n=r.deflateSetDictionary(this.strm,m))!==l)throw Error(o[n]);this._dict_set=!0}}function m(e,t){var n=new p(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}p.prototype.push=function(e,t){var n,o,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,s.input=typeof e==`string`?a.string2buf(e):c.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,s.next_in=0,s.avail_in=s.input.length;do{if(s.avail_out===0&&(s.output=new i.Buf8(u),s.next_out=0,s.avail_out=u),(n=r.deflate(s,o))!==1&&n!==l)return this.onEnd(n),!(this.ended=!0);s.avail_out!==0&&(s.avail_in!==0||o!==4&&o!==2)||(this.options.to===`string`?this.onData(a.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((0<s.avail_in||s.avail_out===0)&&n!==1);return o===4?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===l):o!==2||(this.onEnd(l),!(s.avail_out=0))},p.prototype.onData=function(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===l&&(this.result=this.options.to===`string`?this.chunks.join(``):i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=p,n.deflate=m,n.deflateRaw=function(e,t){return(t||={}).raw=!0,m(e,t)},n.gzip=function(e,t){return(t||={}).gzip=!0,m(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,n){"use strict";var r=e(`./zlib/inflate`),i=e(`./utils/common`),a=e(`./utils/strings`),o=e(`./zlib/constants`),s=e(`./zlib/messages`),c=e(`./zlib/zstream`),l=e(`./zlib/gzheader`),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:``},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==o.Z_OK)throw Error(s[n]);this.header=new l,r.inflateGetHeader(this.strm,this.header)}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(e,t){var n,s,c,l,d,f,p=this.strm,m=this.options.chunkSize,h=this.options.dictionary,g=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,p.input=typeof e==`string`?a.binstring2buf(e):u.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,p.next_in=0,p.avail_in=p.input.length;do{if(p.avail_out===0&&(p.output=new i.Buf8(m),p.next_out=0,p.avail_out=m),(n=r.inflate(p,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&h&&(f=typeof h==`string`?a.string2buf(h):u.call(h)===`[object ArrayBuffer]`?new Uint8Array(h):h,n=r.inflateSetDictionary(this.strm,f)),n===o.Z_BUF_ERROR&&!0===g&&(n=o.Z_OK,g=!1),n!==o.Z_STREAM_END&&n!==o.Z_OK)return this.onEnd(n),!(this.ended=!0);p.next_out&&(p.avail_out!==0&&n!==o.Z_STREAM_END&&(p.avail_in!==0||s!==o.Z_FINISH&&s!==o.Z_SYNC_FLUSH)||(this.options.to===`string`?(c=a.utf8border(p.output,p.next_out),l=p.next_out-c,d=a.buf2string(p.output,c),p.next_out=l,p.avail_out=m-l,l&&i.arraySet(p.output,p.output,c,l,0),this.onData(d)):this.onData(i.shrinkBuf(p.output,p.next_out)))),p.avail_in===0&&p.avail_out===0&&(g=!0)}while((0<p.avail_in||p.avail_out===0)&&n!==o.Z_STREAM_END);return n===o.Z_STREAM_END&&(s=o.Z_FINISH),s===o.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===o.Z_OK):s!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(p.avail_out=0))},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===o.Z_OK&&(this.result=this.options.to===`string`?this.chunks.join(``):i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=f,n.inflateRaw=function(e,t){return(t||={}).raw=!0,f(e,t)},n.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,n){"use strict";var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Int32Array<`u`;n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if(typeof n!=`object`)throw TypeError(n+`must be non-object`);for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){for(var t=r=0,n=e.length,r,i,a,o;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),t=i=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o}},a={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(r)},{}],42:[function(e,t,n){"use strict";var r=e(`./common`),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var o=new r.Buf8(256),s=0;s<256;s++)o[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function c(e,t){if(t<65537&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n=``,o=0;o<t;o++)n+=String.fromCharCode(e[o]);return n}o[254]=o[254]=1,n.string2buf=function(e){var t,n,i,a,o,s=e.length,c=0;for(a=0;a<s;a++)(64512&(n=e.charCodeAt(a)))==55296&&a+1<s&&(64512&(i=e.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(i-56320),a++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(c),a=o=0;o<c;a++)(64512&(n=e.charCodeAt(a)))==55296&&a+1<s&&(64512&(i=e.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(i-56320),a++),n<128?t[o++]=n:(n<2048?t[o++]=192|n>>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,i,a,s=t||e.length,l=Array(2*s);for(n=r=0;n<s;)if((i=e[n++])<128)l[r++]=i;else if(4<(a=o[i]))l[r++]=65533,n+=a-1;else{for(i&=a===2?31:a===3?15:7;1<a&&n<s;)i=i<<6|63&e[n++],a--;1<a?l[r++]=65533:i<65536?l[r++]=i:(i-=65536,l[r++]=55296|i>>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e,a=e>>>16&65535,o=0;n!==0;){for(n-=o=2e3<n?2e3:n;a=a+(i=i+t[r++]|0)|0,--o;);i%=65521,a%=65521}return i|a<<16}},{}],44:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,n){"use strict";var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){"use strict";var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4<e?9:0)}function P(e){for(var t=e.length;0<=--t;)e[t]=0}function F(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&a<f);if(r=w-(f-a),a=f-w,o<r){if(e.match_start=t,s<=(o=r))break;p=l[a+o-1],m=l[a+o]}}while((t=d[t&u])>c&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f<p&&(p=f),n=p===0?0:(l.avail_in-=p,i.arraySet(u,l.input,l.next_in,p,d),l.state.wrap===1?l.adler=o(l.adler,u,p,d):l.state.wrap===2&&(l.adler=s(l.adler,u,p,d)),l.next_in+=p,l.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+C-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<C)););}while(e.lookahead<T&&e.strm.avail_in!==0)}function V(e,t){for(var n,r;;){if(e.lookahead<T){if(B(e),e.lookahead<T&&t===l)return O;if(e.lookahead===0)break}if(n=0,e.lookahead>=C&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-T&&(e.match_length=z(e,n)),e.match_length>=C){if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,--e.match_length!=0;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask}else r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=e.strstart<C-1?e.strstart:C-1,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}function H(e,t){for(var n,r,i;;){if(e.lookahead<T){if(B(e),e.lookahead<T&&t===l)return O;if(e.lookahead===0)break}if(n=0,e.lookahead>=C&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=C-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-T&&(e.match_length=z(e,n),e.match_length<=5&&(e.strategy===1||e.match_length===C&&4096<e.strstart-e.match_start)&&(e.match_length=C-1)),e.prev_length>=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),--e.prev_length!=0;);if(e.match_available=0,e.match_length=C-1,e.strstart++,r&&(I(e,!1),e.strm.avail_out===0))return O}else if(e.match_available){if((r=a._tr_tally(e,0,e.window[e.strstart-1]))&&I(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return O}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=a._tr_tally(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<C-1?e.strstart:C-1,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}function U(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function W(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=g,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*x),this.dyn_dtree=new i.Buf16(2*(2*y+1)),this.bl_tree=new i.Buf16(2*(2*b+1)),P(this.dyn_ltree),P(this.dyn_dtree),P(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(S+1),this.heap=new i.Buf16(2*v+1),P(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*v+1),P(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function G(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=h,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?E:D,e.adler=t.wrap===2?0:1,t.last_flush=l,a._tr_init(t),d):M(e,f)}function ee(e){var t=G(e);return t===d&&function(e){e.window_size=2*e.w_size,P(e.head),e.max_lazy_match=r[e.level].max_lazy,e.good_match=r[e.level].good_length,e.nice_match=r[e.level].nice_length,e.max_chain_length=r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=C-1,e.match_available=0,e.ins_h=0}(e.state),t}function K(e,t,n,r,a,o){if(!e)return f;var s=1;if(t===p&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),a<1||_<a||n!==g||r<8||15<r||t<0||9<t||o<0||m<o)return M(e,f);r===8&&(r=9);var c=new W;return(e.state=c).strm=e,c.wrap=s,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=a+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+C-1)/C),c.window=new i.Buf8(2*c.w_size),c.head=new i.Buf16(c.hash_size),c.prev=new i.Buf16(c.w_size),c.lit_bufsize=1<<a+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new i.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=o,c.method=n,ee(e)}r=[new U(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new U(4,4,8,4,V),new U(4,5,16,8,V),new U(4,6,32,32,V),new U(4,4,16,16,H),new U(8,16,32,32,H),new U(8,16,128,128,H),new U(8,32,128,256,H),new U(32,128,258,1024,H),new U(32,258,258,4096,H)],n.deflateInit=function(e,t){return K(e,t,g,15,8,0)},n.deflateInit2=K,n.deflateReset=ee,n.deflateResetKeep=G,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5<t||t<0)return e?M(e,f):f;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===666&&t!==u)return M(e,e.avail_out===0?-5:f);if(i.strm=e,n=i.last_flush,i.last_flush=t,i.status===E){if(i.wrap===2)e.adler=0,L(i,31),L(i,139),L(i,8),i.gzhead?(L(i,+!!i.gzhead.text+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),L(i,255&i.gzhead.time),L(i,i.gzhead.time>>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}}if(i.status===69){if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73}if(i.status===73){if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,L(i,c)}while(c!==0);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91}if(i.status===91){if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,L(i,c)}while(c!==0);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103}if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0<e.strstart&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){o=e.strstart+w;do;while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);e.match_length=w-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0<i.wrap&&(i.wrap=-i.wrap),i.pending===0?1:d):d},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==E&&t!==69&&t!==73&&t!==91&&t!==103&&t!==D&&t!==666?M(e,f):(e.state=null,t===D?M(e,-3):d):f},n.deflateSetDictionary=function(e,t){var n,r,a,s,c,l,u,p,m=t.length;if(!e||!e.state||(s=(n=e.state).wrap)===2||s===1&&n.status!==E||n.lookahead)return f;for(s===1&&(e.adler=o(e.adler,t,m,0)),n.wrap=0,m>=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+C-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,--a;);n.strstart=r,n.lookahead=C-1,B(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=C-1,n.match_available=0,e.next_in=l,e.input=u,e.avail_in=c,n.wrap=s,d},n.deflateInfo=`pako deflate (from Nodeca project)`},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,n){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=``,this.comment=``,this.hcrc=0,this.done=!1}},{}],48:[function(e,t,n){"use strict";t.exports=function(e,t){var n=e.state,r=e.next_in,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=e.input,E;i=r+(e.avail_in-5),a=e.next_out,E=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),c=n.dmax,l=n.wsize,u=n.whave,d=n.wnext,f=n.window,p=n.hold,m=n.bits,h=n.lencode,g=n.distcode,_=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;e:do{m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=h[p&_];t:for(;;){if(p>>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<<b)-1)];continue t}if(32&b){n.mode=12;break e}e.msg=`invalid literal/length code`,n.mode=30;break e}x=65535&y,(b&=15)&&(m<b&&(p+=T[r++]<<m,m+=8),x+=p&(1<<b)-1,p>>>=b,m-=b),m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=g[p&v];r:for(;;){if(p>>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<<b)-1)];continue r}e.msg=`invalid distance code`,n.mode=30;break e}if(S=65535&y,m<(b&=15)&&(p+=T[r++]<<m,(m+=8)<b&&(p+=T[r++]<<m,m+=8)),c<(S+=p&(1<<b)-1)){e.msg=`invalid distance too far back`,n.mode=30;break e}if(p>>>=b,m-=b,(b=a-o)<S){if(u<(b=S-b)&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break e}if(w=f,(C=0)===d){if(C+=l-b,b<x){for(x-=b;E[a++]=f[C++],--b;);C=a-S,w=E}}else if(d<b){if(C+=l+d-b,(b-=d)<x){for(x-=b;E[a++]=f[C++],--b;);if(C=0,d<x){for(x-=b=d;E[a++]=f[C++],--b;);C=a-S,w=E}}}else if(C+=d-b,b<x){for(x-=b;E[a++]=f[C++],--b;);C=a-S,w=E}for(;2<x;)E[a++]=w[C++],E[a++]=w[C++],E[a++]=w[C++],x-=3;x&&(E[a++]=w[C++],1<x&&(E[a++]=w[C++]))}else{for(C=a-S;E[a++]=E[C++],E[a++]=E[C++],E[a++]=E[C++],2<(x-=3););x&&(E[a++]=E[C++],1<x&&(E[a++]=E[C++]))}break}}break}}while(r<i&&a<s);r-=x=m>>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=a<s?s-a+257:257-(a-s),n.hold=p,n.bits=m}},{}],49:[function(e,t,n){"use strict";var r=e(`../utils/common`),i=e(`./adler32`),a=e(`./crc32`),o=e(`./inffast`),s=e(`./inftrees`),c=1,l=2,u=0,d=-2,f=1,p=852,m=592;function h(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?d:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,v(e))):d}function b(e,t){var n,r;return e?(r=new g,(e.state=r).window=null,(n=y(e,t))!==u&&(e.state=null),n):d}var x,S,C=!0;function w(e){if(C){var t;for(x=new r.Buf32(512),S=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(c,e.lens,0,288,x,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(l,e.lens,0,32,S,0,e.work,{bits:5}),C=!1}e.lencode=x,e.lenbits=9,e.distcode=S,e.distbits=5}function T(e,t,n,i){var a,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new r.Buf8(o.wsize)),i>=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}n.inflateReset=v,n.inflateReset2=y,n.inflateResetKeep=_,n.inflateInit=function(e){return b(e,15)},n.inflateInit2=b,n.inflate=function(e,t){var n,p,m,g,_,v,y,b,x,S,C,E,D,O,k,A,j,M,N,P,F,I,L,R,z=0,B=new r.Buf8(4),V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return d;(n=e.state).mode===12&&(n.mode=13),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,S=v,C=y,I=u;e:for(;;)switch(n.mode){case f:if(n.wrap===0){n.mode=13;break}for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(2&n.wrap&&b===35615){B[n.check=0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<<F,e.adler=n.check=1,n.mode=512&b?10:12,x=b=0;break;case 2:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(n.flags=b,(255&n.flags)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(57344&n.flags){e.msg=`unknown header flags set`,n.mode=30;break}n.head&&(n.head.text=b>>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.head&&(n.head.time=b),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.head&&(n.head.xflags=255&b,n.head.os=b>>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.length=b,n.head&&(n.head.extra_len=b),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E<v;);if(512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,F)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(v===0)break e;for(E=0;F=p[g+E++],n.head&&F&&n.length<65536&&(n.head.comment+=String.fromCharCode(F)),F&&E<v;);if(512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,F)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(b!==(65535&n.check)){e.msg=`header crc mismatch`,n.mode=30;break}x=b=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}e.adler=n.check=h(b),x=b=0,n.mode=11;case 11:if(n.havedict===0)return e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,2;e.adler=n.check=1,n.mode=12;case 12:if(t===5||t===6)break e;case 13:if(n.last){b>>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}switch(n.last=1&b,--x,3&(b>>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if((65535&b)!=(b>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v<E&&(E=v),y<E&&(E=y),E===0)break e;r.arraySet(m,p,g,E,_),v-=E,g+=E,y-=E,_+=E,n.length-=E;break}n.mode=12;break;case 17:for(;x<14;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(n.nlen=257+(31&b),b>>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286<n.nlen||30<n.ndist){e.msg=`too many length or distance symbols`,n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;x<3;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.lens[V[n.have++]]=7&b,b>>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;A=(z=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(j<16)b>>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x<R;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(b>>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x<R;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}x-=k,F=0,E=3+(7&(b>>>=k)),b>>>=3,x-=3}else{for(R=k+7;x<R;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}x-=k,F=0,E=11+(127&(b>>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(A&&!(240&A)){for(M=k,N=A,P=j;A=(z=n.lencode[P+((b&(1<<M+N)-1)>>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}b>>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x<R;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.length+=b&(1<<n.extra)-1,b>>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<<n.distbits)-1])>>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(!(240&A)){for(M=k,N=A,P=j;A=(z=n.distcode[P+((b&(1<<M+N)-1)>>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}b>>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x<R;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.offset+=b&(1<<n.extra)-1,b>>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(y<E&&(E=y),y-=E,n.length-=E;m[_++]=O[D++],--E;);n.length===0&&(n.mode=21);break;case 26:if(y===0)break e;m[_++]=n.length,y--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(v===0)break e;v--,b|=p[g++]<<x,x+=8}if(C-=y,e.total_out+=C,n.total+=C,C&&(e.adler=n.check=n.flags?a(n.check,m,C,_-C):i(n.check,m,C,_-C)),C=y,(n.flags?b:h(b))!==n.check){e.msg=`incorrect data check`,n.mode=30;break}x=b=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;x<32;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(b!==(0|n.total)){e.msg=`incorrect length check`,n.mode=30;break}x=b=0}n.mode=29;case 29:I=1;break e;case 30:I=-3;break e;case 31:return-4;default:return d}return e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,(n.wsize||C!==e.avail_out&&n.mode<30&&(n.mode<27||t!==4))&&T(e,e.output,e.next_out,C-e.avail_out)?(n.mode=31,-4):(S-=e.avail_in,C-=e.avail_out,e.total_in+=S,e.total_out+=C,n.total+=C,n.wrap&&C&&(e.adler=n.check=n.flags?a(n.check,m,C,e.next_out-C):i(n.check,m,C,e.next_out-C)),e.data_type=n.bits+(n.last?64:0)+(n.mode===12?128:0)+(n.mode===20||n.mode===15?256:0),(S==0&&C===0||t===4)&&I===u&&(I=-5),I)},n.inflateEnd=function(e){if(!e||!e.state)return d;var t=e.state;return t.window&&=null,e.state=null,u},n.inflateGetHeader=function(e,t){var n;return e&&e.state&&2&(n=e.state).wrap?((n.head=t).done=!1,u):d},n.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?(n=e.state).wrap!==0&&n.mode!==11?d:n.mode===11&&i(1,t,r,0)!==n.check?-3:T(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,u):d},n.inflateInfo=`pako inflate (from Nodeca project)`},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,n){"use strict";var r=e(`../utils/common`),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,c,l,u,d,f){var p,m,h,g,_,v,y,b,x,S=f.bits,C=0,w=0,T=0,E=0,D=0,O=0,k=0,A=0,j=0,M=0,N=null,P=0,F=new r.Buf16(16),I=new r.Buf16(16),L=null,R=0;for(C=0;C<=15;C++)F[C]=0;for(w=0;w<c;w++)F[t[n+w]]++;for(D=S,E=15;1<=E&&F[E]===0;E--);if(E<D&&(D=E),E===0)return l[u++]=20971520,l[u++]=20971520,f.bits=1,0;for(T=1;T<E&&F[T]===0;T++);for(D<T&&(D=T),C=A=1;C<=15;C++)if(A<<=1,(A-=F[C])<0)return-1;if(0<A&&(e===0||E!==1))return-1;for(I[1]=0,C=1;C<15;C++)I[C+1]=I[C]+F[C];for(w=0;w<c;w++)t[n+w]!==0&&(d[I[t[n+w]]++]=w);if(v=e===0?(N=L=d,19):e===1?(N=i,P-=257,L=a,R-=257,256):(N=o,L=s,-1),C=T,_=u,k=w=M=0,h=-1,g=(j=1<<(O=D))-1,e===1&&852<j||e===2&&592<j)return 1;for(;;){for(y=C-k,x=d[w]<v?(b=0,d[w]):d[w]>v?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<<C-k,T=m=1<<O;l[_+(M>>k)+(m-=p)]=y<<24|b<<16|x,m!==0;);for(p=1<<C-1;M&p;)p>>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D<C&&(M&g)!==h){for(k===0&&(k=D),_+=T,A=1<<(O=C-k);O+k<E&&!((A-=F[O+k])<=0);)O++,A<<=1;if(j+=1<<O,e===1&&852<j||e===2&&592<j)return 1;l[h=M&g]=D<<24|O<<16|_-u}}return M!==0&&(l[_+M]=C-k<<24|4194304),f.bits=D,0}},{"../utils/common":41}],51:[function(e,t,n){"use strict";t.exports={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`}},{}],52:[function(e,t,n){"use strict";var r=e(`../utils/common`),i=0,a=1;function o(e){for(var t=e.length;0<=--t;)e[t]=0}var s=0,c=29,l=256,u=l+1+c,d=30,f=19,p=2*u+1,m=15,h=16,g=7,_=256,v=16,y=17,b=18,x=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],S=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(2*(u+2));o(T);var E=Array(2*d);o(E);var D=Array(512);o(D);var O=Array(256);o(O);var k=Array(c);o(k);var A,j,M,N=Array(d);function P(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function F(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function I(e){return e<256?D[e]:D[256+(e>>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<<e.bi_valid&65535,L(e,e.bi_buf),e.bi_buf=t>>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function z(e,t,n){R(e,n[2*t],n[2*t+1])}function B(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function V(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function H(e){for(var t=0;t<u;t++)e.dyn_ltree[2*t]=0;for(t=0;t<d;t++)e.dyn_dtree[2*t]=0;for(t=0;t<f;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*_]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function U(e){8<e.bi_valid?L(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function W(e,t,n,r){var i=2*t,a=2*n;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function G(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&W(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!W(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function ee(e,t,n){var r,i,a,o,s=0;if(e.last_lit!==0)for(;r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,r===0?z(e,i,t):(z(e,(a=O[i])+l+1,t),(o=x[a])!==0&&R(e,i-=k[a],o),z(e,a=I(--r),n),(o=S[a])!==0&&R(e,r-=N[a],o)),s<e.last_lit;);z(e,_,t)}function K(e,t){var n,r,i,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,c=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=p,n=0;n<c;n++)a[2*n]===0?a[2*n+1]=0:(e.heap[++e.heap_len]=l=n,e.depth[n]=0);for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;1<=n;n--)G(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,G(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<p;n++)g<(a=c[2*c[2*(r=e.heap[n])+1]+1]+1)&&(a=g,_++),c[2*r+1]=a,l<r||(e.bl_count[a]++,o=0,h<=r&&(o=f[r-h]),s=c[2*r],e.opt_len+=s*(a+o),d&&(e.static_len+=s*(u[2*r+1]+o)));if(_!==0){do{for(a=g-1;e.bl_count[a]===0;)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[g]--,_-=2}while(0<_);for(a=g;a!==0;a--)for(r=e.bl_count[a];r!==0;)l<(i=e.heap[--n])||(c[2*i+1]!==a&&(e.opt_len+=(a-c[2*i+1])*c[2*i],c[2*i+1]=a),r--)}}(e,t),V(a,l,e.bl_count)}function te(e,t,n){var r,i,a=-1,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++s<c&&i===o||(s<l?e.bl_tree[2*i]+=s:i===0?s<=10?e.bl_tree[2*y]++:e.bl_tree[2*b]++:(i!==a&&e.bl_tree[2*i]++,e.bl_tree[2*v]++),a=i,l=(s=0)===o?(c=138,3):i===o?(c=6,3):(c=7,4))}function q(e,t,n){var r,i,a=-1,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(i=o,o=t[2*(r+1)+1],!(++s<c&&i===o)){if(s<l)for(;z(e,i,e.bl_tree),--s!=0;);else i===0?s<=10?(z(e,y,e.bl_tree),R(e,s-3,3)):(z(e,b,e.bl_tree),R(e,s-11,7)):(i!==a&&(z(e,i,e.bl_tree),s--),z(e,v,e.bl_tree),R(e,s-3,2));a=i,l=(s=0)===o?(c=138,3):i===o?(c=6,3):(c=7,4)}}o(N);var ne=!1;function re(e,t,n,i){R(e,(s<<1)+ +!!i,3),function(e,t,n,i){U(e),L(e,n),L(e,~n),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}n._tr_init=function(e){ne||=(function(){var e,t,n,r,i,a=Array(m+1);for(r=n=0;r<c-1;r++)for(k[r]=n,e=0;e<1<<x[r];e++)O[n++]=r;for(O[n-1]=r,r=i=0;r<16;r++)for(N[r]=i,e=0;e<1<<S[r];e++)D[i++]=r;for(i>>=7;r<d;r++)for(N[r]=i<<7,e=0;e<1<<S[r]-7;e++)D[256+i++]=r;for(t=0;t<=m;t++)a[t]=0;for(e=0;e<=143;)T[2*e+1]=8,e++,a[8]++;for(;e<=255;)T[2*e+1]=9,e++,a[9]++;for(;e<=279;)T[2*e+1]=7,e++,a[7]++;for(;e<=287;)T[2*e+1]=8,e++,a[8]++;for(V(T,u+1,a),e=0;e<d;e++)E[2*e+1]=5,E[2*e]=B(e,5);A=new P(T,x,l+1,u,m),j=new P(E,S,0,d,m),M=new P([],C,0,f,g)}(),!0),e.l_desc=new F(e.dyn_ltree,A),e.d_desc=new F(e.dyn_dtree,j),e.bl_desc=new F(e.bl_tree,M),e.bi_buf=0,e.bi_valid=0,H(e)},n._tr_stored_block=re,n._tr_flush_block=function(e,t,n,r){var o,s,c=0;0<e.level?(e.strm.data_type===2&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t<l;t++)if(e.dyn_ltree[2*t]!==0)return a;return i}(e)),K(e,e.l_desc),K(e,e.d_desc),c=function(e){var t;for(te(e,e.dyn_ltree,e.l_desc.max_code),te(e,e.dyn_dtree,e.d_desc.max_code),K(e,e.bl_desc),t=f-1;3<=t&&e.bl_tree[2*w[t]+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?re(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),ee(e,T,E)):(R(e,4+ +!!r,3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i<r;i++)R(e,e.bl_tree[2*w[i]+1],3);q(e,e.dyn_ltree,t-1),q(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),ee(e,e.dyn_ltree,e.dyn_dtree)),H(e),r&&U(e)},n._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){"use strict";if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){q.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];return s[o]={callback:e,args:t},n(o),o++},u.clearImmediate=d}function d(e){delete s[e]}function f(e){if(c)setTimeout(f,0,e);else{var n=s[e];if(n){c=!0;try{(function(e){var n=e.callback,r=e.args;switch(r.length){case 0:n();break;case 1:n(r[0]);break;case 2:n(r[0],r[1]);break;case 3:n(r[0],r[1],r[2]);break;default:n.apply(t,r)}})(n)}finally{d(e),c=!1}}}}function p(t){t.source===e&&typeof t.data==`string`&&t.data.indexOf(a)===0&&f(+t.data.slice(a.length))}})(typeof self>`u`?e===void 0?this:e:self)}).call(this,k===void 0?typeof self<`u`?self:typeof window<`u`?window:{}:k)},{}]},{},[10])(10)})})),mf=u(((e,t)=>{var n={"&":`&`,'"':`"`,"'":`'`,"<":`<`,">":`>`};function r(e){return e&&e.replace?e.replace(/([&"<>'])/g,function(e,t){return n[t]}):e}t.exports=r})),hf=u(((e,t)=>{ne();var n=mf(),r=xt().Stream,i=` `;function a(e,t){typeof t!=`object`&&(t={indent:t});var n=t.stream?new r:null,a=``,o=!1,s=t.indent?t.indent===!0?i:t.indent:``,u=!0;function d(e){u?q.nextTick(e):e()}function f(e,t){if(t!==void 0&&(a+=t),e&&!o&&(n||=new r,o=!0),e&&o){var i=a;d(function(){n.emit(`data`,i)}),a=``}}function p(e,t){l(f,c(e,s,+!!s),t)}function m(){if(n){var e=a;d(function(){n.emit(`data`,e),n.emit(`end`),n.readable=!1,n.emit(`close`)})}}function h(e){var t={version:`1.0`,encoding:e.encoding||`UTF-8`};e.standalone&&(t.standalone=e.standalone),p({"?xml":{_attr:t}}),a=a.replace(`/>`,`?>`)}return d(function(){u=!1}),t.declaration&&h(t.declaration),e&&e.forEach?e.forEach(function(t,n){var r;n+1===e.length&&(r=m),p(t,r)}):p(e,m),n?(n.readable=!0,n):a}function o(){var e={_elem:c(Array.prototype.slice.call(arguments))};return e.push=function(e){if(!this.append)throw Error(`not assigned to a parent!`);var t=this,n=this._elem.indent;l(this.append,c(e,n,this._elem.icount+ +!!n),function(){t.append(!0)})},e.close=function(e){e!==void 0&&this.push(e),this.end&&this.end()},e}function s(e,t){return Array(t||0).join(e||``)}function c(e,t,r){r||=0;var i=s(t,r),a,o=e,l=!1;if(typeof e==`object`&&(a=Object.keys(e)[0],o=e[a],o&&o._elem))return o._elem.name=a,o._elem.icount=r,o._elem.indent=t,o._elem.indents=i,o._elem.interrupt=o,o._elem;var d=[],f=[],p;function m(e){Object.keys(e).forEach(function(t){d.push(u(t,e[t]))})}switch(typeof o){case`object`:if(o===null)break;o._attr&&m(o._attr),o._cdata&&f.push((`<![CDATA[`+o._cdata).replace(/\]\]>/g,`]]]]><![CDATA[>`)+`]]>`),o.forEach&&(p=!1,f.push(``),o.forEach(function(e){typeof e==`object`?Object.keys(e)[0]==`_attr`?m(e._attr):f.push(c(e,t,r+1)):(f.pop(),p=!0,f.push(n(e)))}),p||f.push(``));break;default:f.push(n(o))}return{name:a,interrupt:l,attributes:d,content:f,icount:r,indents:i,indent:t}}function l(e,t,n){if(typeof t!=`object`)return e(!1,t);var r=t.interrupt?1:t.content.length;function i(){for(;t.content.length;){var i=t.content.shift();if(i!==void 0){if(a(i))return;l(e,i)}}e(!1,(r>1?t.indents:``)+(t.name?`</`+t.name+`>`:``)+(t.indent&&!n?`
|
|
25
|
+
`:``)),n&&n()}function a(t){return t.interrupt?(t.interrupt.append=e,t.interrupt.end=i,t.interrupt=!1,e(!0),!0):!1}if(e(!1,t.indents+(t.name?`<`+t.name:``)+(t.attributes.length?` `+t.attributes.join(` `):``)+(r?t.name?`>`:``:t.name?`/>`:``)+(t.indent&&r>1?`
|
|
26
|
+
`:``)),!r)return e(!1,t.indent?`
|
|
27
|
+
`:``);a(t)||i()}function u(e,t){return e+`="`+n(t)+`"`}t.exports=a,t.exports.element=t.exports.Element=o})),gf=xt(),_f=f(pf(),1),$=f(hf(),1),vf=0,yf=32,bf=32,xf=(e,t)=>{let n=t.replace(/-/g,``);if(n.length!==bf)throw Error(`Error: Cannot extract GUID from font filename: ${t}`);let r=n.replace(/(..)/g,`$1 `).trim().split(` `).map(e=>parseInt(e,16));r.reverse();let i=e.slice(vf,yf).map((e,t)=>e^r[t%r.length]),a=new Uint8Array(vf+i.length+Math.max(0,e.length-yf));return a.set(e.slice(0,vf)),a.set(i,vf),a.set(e.slice(yf),vf+i.length),a},Sf=class{format(e,t={stack:[]}){let n=e.prepForXml(t);if(n)return n;throw Error(`XMLComponent did not format correctly`)}},Cf=class{replace(e,t,n){let r=e;return t.forEach((e,t)=>{r=r.replace(RegExp(`{${e.fileName}}`,`g`),(n+t).toString())}),r}getMediaData(e,t){return t.Array.filter(t=>e.search(`{${t.fileName}}`)>0)}},wf=class{replace(e,t){let n=e;for(let e of t)n=n.replace(RegExp(`{${e.reference}-${e.instance}}`,`g`),e.numId.toString());return n}},Tf=new Sf,Ef=(e,t,n,r,i=!0)=>(0,$.default)(Tf.format(t,{viewWrapper:{View:t,Relationships:r},file:e,stack:[]}),{indent:n,declaration:i?{standalone:`yes`,encoding:`UTF-8`}:{encoding:`UTF-8`}}),Df=(e,t,n,r)=>{let{content:i}=t.options;if(i instanceof Uint8Array)return[{data:i,path:`word/${n}`}];if(`files`in i){let t=new _f.default;for(let{path:n,content:a}of i.files)t.file(n,a instanceof Uint8Array?a:Gr(Ef(e,a,r,new Go)));return[{data:t.generateAsync({type:`uint8array`,compression:`DEFLATE`}),path:`word/${n}`}]}let a=e.PackageParts.createRelationships(n),o=Ef(e,i,r,a),s=n.slice(0,n.lastIndexOf(`/`)),c=n.slice(n.lastIndexOf(`/`)+1);return[{data:o,path:`word/${n}`},...a.RelationshipCount>0?[{data:Ef(e,a,r,a,!1),path:`word/${s}/_rels/${c}.rels`}]:[]]},Of=(e,t,n=0)=>{let r=e.PackageParts.Array.slice(n);return r.length===0?[]:[...r.flatMap(({part:n,path:r})=>Df(e,n,r,t)),...Of(e,t,n+r.length)]},kf=[`PackageParts`],Af=class{constructor(){_(this,`formatter`,void 0),_(this,`imageReplacer`,void 0),_(this,`numberingReplacer`,void 0),this.formatter=new Sf,this.imageReplacer=new Cf,this.numberingReplacer=new wf}compile(e,t,n=[]){let r=new _f.default,i=this.xmlifyFile(e,t),{PackageParts:a}=i,o=qs(i,kf),s=new Map(Object.entries(o));for(let[,e]of s)if(Array.isArray(e))for(let t of e)r.file(t.path,Gr(t.data));else r.file(e.path,Gr(e.data));for(let{path:e,data:t}of a)r.file(e,typeof t==`string`?Gr(t):t);for(let e of n)r.file(e.path,Gr(e.data));for(let t of e.Media.Array)t.type===`svg`?(r.file(`word/media/${t.fileName}`,t.data),r.file(`word/media/${t.fallback.fileName}`,t.fallback.data)):r.file(`word/media/${t.fileName}`,t.data);for(let[t,{data:n,fontKey:i}]of e.FontTable.files.entries())r.file(`word/fonts/font${t+1}.odttf`,xf(n,i));return r}xmlifyFile(e,t){let n=(0,$.default)(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),r=(0,$.default)(this.formatter.format(e.Comments,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),i=(0,$.default)(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),a=(0,$.default)(this.formatter.format(e.Endnotes.View,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),o=e.Document.Relationships.RelationshipCount+1,s=e.Comments.Relationships.RelationshipCount+1,c=e.FootNotes.Relationships.RelationshipCount+1,l=e.Endnotes.Relationships.RelationshipCount+1,u=this.imageReplacer.getMediaData(n,e.Media),d=this.imageReplacer.getMediaData(r,e.Media),f=this.imageReplacer.getMediaData(i,e.Media),p=this.imageReplacer.getMediaData(a,e.Media);return C(C(C(C({Relationships:{data:(()=>{let n=Go.copy(e.Document.Relationships);return u.forEach((e,t)=>{n.addRelationship(o+t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),n.addRelationship(n.RelationshipCount+1,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable`,`fontTable.xml`),(0,$.default)(this.formatter.format(n,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}})})(),path:`word/_rels/document.xml.rels`},Document:{data:(()=>{let t=this.imageReplacer.replace(n,u,o);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:`word/document.xml`},Styles:{data:(()=>{let n=(0,$.default)(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}});return this.numberingReplacer.replace(n,e.Numbering.ConcreteNumbering)})(),path:`word/styles.xml`},Properties:{data:(0,$.default)(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`docProps/core.xml`},FileRelationships:{data:(0,$.default)(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`_rels/.rels`},HeaderRelationships:e.Headers.map((n,r)=>{let i=(0,$.default)(this.formatter.format(n.View,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),a=this.imageReplacer.getMediaData(i,e.Media),o=Go.copy(n.Relationships);return a.forEach((e,t)=>{o.addRelationship(t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),{data:(0,$.default)(this.formatter.format(o,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`word/_rels/header${r+1}.xml.rels`}}),FooterRelationships:e.Footers.map((n,r)=>{let i=(0,$.default)(this.formatter.format(n.View,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),a=this.imageReplacer.getMediaData(i,e.Media),o=Go.copy(n.Relationships);return a.forEach((e,t)=>{o.addRelationship(t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),{data:(0,$.default)(this.formatter.format(o,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`word/_rels/footer${r+1}.xml.rels`}}),Headers:e.Headers.map((n,r)=>{let i=(0,$.default)(this.formatter.format(n.View,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),a=this.imageReplacer.getMediaData(i,e.Media),o=this.imageReplacer.replace(i,a,0);return{data:this.numberingReplacer.replace(o,e.Numbering.ConcreteNumbering),path:`word/header${r+1}.xml`}}),Footers:e.Footers.map((n,r)=>{let i=(0,$.default)(this.formatter.format(n.View,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),a=this.imageReplacer.getMediaData(i,e.Media),o=this.imageReplacer.replace(i,a,0);return{data:this.numberingReplacer.replace(o,e.Numbering.ConcreteNumbering),path:`word/footer${r+1}.xml`}}),CustomProperties:{data:(0,$.default)(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`docProps/custom.xml`},AppProperties:{data:(0,$.default)(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`docProps/app.xml`},FootNotes:{data:(()=>{let t=this.imageReplacer.replace(i,f,c);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:`word/footnotes.xml`},FootNotesRelationships:{data:(()=>{let n=Go.copy(e.FootNotes.Relationships);return f.forEach((e,t)=>{n.addRelationship(c+t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),(0,$.default)(this.formatter.format(n,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}})})(),path:`word/_rels/footnotes.xml.rels`},Endnotes:{data:(()=>{let t=this.imageReplacer.replace(a,p,l);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:`word/endnotes.xml`},EndnotesRelationships:{data:(()=>{let n=Go.copy(e.Endnotes.Relationships);return p.forEach((e,t)=>{n.addRelationship(l+t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),(0,$.default)(this.formatter.format(n,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}})})(),path:`word/_rels/endnotes.xml.rels`},Settings:{data:(0,$.default)(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/settings.xml`}},e.Comments.IsEmpty?{}:{Comments:{data:(()=>{let t=this.imageReplacer.replace(r,d,s);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:`word/comments.xml`},CommentsRelationships:{data:(()=>{let n=Go.copy(e.Comments.Relationships);return d.forEach((e,t)=>{n.addRelationship(s+t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),(0,$.default)(this.formatter.format(n,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}})})(),path:`word/_rels/comments.xml.rels`}}),e.CommentsExtended?{CommentsExtended:{data:(0,$.default)(this.formatter.format(e.CommentsExtended,{viewWrapper:{View:e.CommentsExtended,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/commentsExtended.xml`}}:{}),e.CommentsIds?{CommentsIds:{data:(0,$.default)(this.formatter.format(e.CommentsIds,{viewWrapper:{View:e.CommentsIds,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/commentsIds.xml`}}:{}),{},{FontTable:{data:(0,$.default)(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/fontTable.xml`},FontTableRelationships:{data:(0,$.default)(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`word/_rels/fontTable.xml.rels`},Theme:{data:(0,$.default)(this.formatter.format(e.Theme,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/theme/theme1.xml`},PackageParts:Of(e,t),Numbering:{data:(0,$.default)(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/numbering.xml`},ContentTypes:{data:(0,$.default)(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`[Content_Types].xml`}})}};function jf(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function Mf(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){jf(a,r,i,o,s,`next`,e)}function s(e){jf(a,r,i,o,s,`throw`,e)}o(void 0)})}}var Nf={NONE:``,WITH_2_BLANKS:` `,WITH_4_BLANKS:` `,WITH_TAB:` `},Pf=e=>e===!0?Nf.WITH_2_BLANKS:e===!1?void 0:e,Ff=class e{static pack(e,t,n){var r=this;return Mf(function*(e,t,n,i=[]){return r.compiler.compile(e,Pf(n),i).generateAsync({type:t,mimeType:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,compression:`DEFLATE`})}).apply(this,arguments)}static toString(t,n,r=[]){return e.pack(t,`string`,n,r)}static toBuffer(t,n,r=[]){return e.pack(t,`nodebuffer`,n,r)}static toBase64String(t,n,r=[]){return e.pack(t,`base64`,n,r)}static toBlob(t,n,r=[]){return e.pack(t,`blob`,n,r)}static toArrayBuffer(t,n,r=[]){return e.pack(t,`arraybuffer`,n,r)}static toStream(e,t,n=[]){let r=new gf.Stream;return this.compiler.compile(e,Pf(t),n).generateAsync({type:`nodebuffer`,mimeType:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,compression:`DEFLATE`}).then(e=>{r.emit(`data`,e),r.emit(`end`)}),r}};_(Ff,`compiler`,new Af);var If=e=>{if(e.name!==`w:bookmarkStart`&&e.name!==`w:bookmarkEnd`)return;let t=Number(e.attributes?.[`w:id`]);return Number.isInteger(t)?t:void 0},Lf=e=>{let t=If(e);return[...t===void 0?[]:[t],...(e.elements??[]).flatMap(Lf)]},Rf=e=>{let t=new Set(e),n=new Map,r=e.reduce((e,t)=>Math.max(e,t),0),i=e=>{let i=n.get(e);if(i!==void 0)return i;let a=t.has(e)?r+1:e;return r=Math.max(r,a),t.add(a),n.set(e,a),a},a=e=>{let t=If(e);return C(C(C({},e),t===void 0?{}:{attributes:C(C({},e.attributes),{},{"w:id":String(i(t))})}),e.elements===void 0?{}:{elements:e.elements.map(a)})};return e=>e.map(a)},zf=new Sf,Bf=e=>(0,kt.xml2js)(e,{compact:!1,captureSpacesBetweenElements:!0}),Vf=e=>Bf((0,$.default)(zf.format(new hr({text:e})))).elements[0].elements??[],Hf=e=>C(C({},e),{},{attributes:{"xml:space":`preserve`}}),Uf=(e,t)=>{let n=e.elements?.find(e=>e.name===t);return n===void 0?[]:(n.elements??=[],n.elements)},Wf=(e,t,n)=>{let r=Uf(e,`Types`);r.some(e=>{var r,i;return e.type===`element`&&e.name===`Default`&&(e==null||(r=e.attributes)==null?void 0:r.ContentType)===t&&(e==null||(i=e.attributes)==null?void 0:i.Extension)===n})||r.push({attributes:{ContentType:t,Extension:n},name:`Default`,type:`element`})},Gf=(e,t,n)=>{let r=Uf(e,`Types`);r.some(e=>e.type===`element`&&e.name===`Override`&&e.attributes?.PartName===n)||r.push({attributes:{ContentType:t,PartName:n},name:`Override`,type:`element`})},Kf=(e,t)=>{let n=e.elements?.find(e=>e.name===`Types`);n?.elements!==void 0&&(n.elements=n.elements.filter(e=>e.name!==`Override`||String(e.attributes?.PartName??``).toLowerCase()!==t.toLowerCase()))},qf=new Set([`wp:inline`,`wp:anchor`]),Jf=new Set([`wp:docPr`,`wps:cNvPr`,`wpg:cNvPr`]),Yf=new Set([`a:stCxn`,`a:endCxn`]),Xf=(e,t)=>{if(!t.has(e.name??``))return;let n=Number(e.attributes?.id);return Number.isInteger(n)?n:void 0},Zf=e=>{let t=Xf(e,Jf);return[...t===void 0?[]:[t],...(e.elements??[]).flatMap(Zf)]},Qf=e=>{let t=e=>{let n=Xf(e,Jf);return[...n===void 0?[]:[n],...(e.elements??[]).flatMap(e=>qf.has(e.name??``)?[]:t(e))]};return t(e)},$f=e=>{let t=new Set(e),n=e.reduce((e,t)=>Math.max(e,t),0),r=e=>{let r=t.has(e)?n+1:e;return n=Math.max(n,r),t.add(r),r},i=e=>{let t=new Map([...new Set(Qf(e))].map(e=>[e,r(e)])),n=r=>{if(r!==e&&qf.has(r.name??``))return i(r);let a=Xf(r,Jf)??Xf(r,Yf),o=a===void 0?void 0:t.get(a);return C(C(C({},r),o===void 0?{}:{attributes:C(C({},r.attributes),{},{id:String(o)})}),r.elements===void 0?{}:{elements:r.elements.map(n)})};return n(e)},a=e=>qf.has(e.name??``)?i(e):C(C({},e),e.elements===void 0?{}:{elements:e.elements.map(a)});return e=>e.map(a)},ep={DOCUMENT:`file`,PARAGRAPH:`paragraph`,TABLE_ROWS:`tableRows`,DRAWING:`drawing`},tp=e=>{let t=parseInt(e.substring(3),10);return isNaN(t)?0:t},np=e=>Uf(e,`Relationships`).map(e=>{var t;return tp(((t=e.attributes)==null||(t=t.Id)==null?void 0:t.toString())??``)}).reduce((e,t)=>Math.max(e,t),0)+1,rp=(e,t,n,r,i)=>{let a=Uf(e,`Relationships`);return a.push({attributes:{Id:`rId${t}`,Type:n,Target:r,TargetMode:i},name:`Relationship`,type:`element`}),a},ip=()=>({declaration:{attributes:{version:`1.0`,encoding:`UTF-8`,standalone:`yes`}},elements:[{type:`element`,name:`Relationships`,attributes:{xmlns:`http://schemas.openxmlformats.org/package/2006/relationships`},elements:[]}]}),ap=new Map([[`wp:inline`,`wp:docPr`],[`wp:anchor`,`wp:docPr`],[`wpg:graphicFrame`,`wpg:cNvPr`],[`wpc:graphicFrame`,`wpg:cNvPr`]]),op=e=>(e.elements??[]).flatMap(e=>{let t=e.name===void 0?void 0:ap.get(e.name),n=t===void 0?void 0:e.elements?.find(e=>e.name===t);return[...n?[{element:e,properties:n}]:[],...op(e)]}),sp=e=>[e.attributes?.descr,e.attributes?.title].flatMap(e=>e===void 0?[]:[String(e)]),cp=e=>{let t=e.lastIndexOf(`/`);return`${e.slice(0,t+1)}_rels/${e.slice(t+1)}.rels`},lp=e=>e.replace(/(^|\/)_rels\/([^/]*)\.rels$/,`$1$2`),up=e=>e.slice(0,e.lastIndexOf(`/`)+1),dp=(e,t)=>{let n=t.replace(/\\/g,`/`);return(n.startsWith(`/`)?n:`${up(e)}${n}`).split(`/`).reduce((e,t)=>t===``||t===`.`?e:t===`..`?e.slice(0,-1):[...e,t],[]).join(`/`)},fp=(e,t)=>{let n=up(e).split(`/`).filter(Boolean),r=t.split(`/`),i=n.findIndex((e,t)=>t>=r.length-1||r[t]!==e),a=i===-1?n.length:i;return[...n.slice(a).map(()=>`..`),...r.slice(a)].join(`/`)},pp=`[Content_Types].xml`,mp=e=>(e.elements?.some(e=>e.name===`Relationships`)||(e.elements=[...e.elements??[],...ip().elements]),Uf(e,`Relationships`)),hp=(e,t,n,r)=>{let i=new Sf,a=n=>e.has(n)||t.has(n),o=n=>{if(a(n))return n;let r=(()=>{try{return decodeURI(n)}catch{return}})();if(r!==void 0&&a(r))return r;let i=n.toLowerCase();return[...e.keys(),...t.keys()].find(e=>e.toLowerCase()===i)},s=(t,n)=>{let r=e.get(cp(t));return r===void 0?void 0:Uf(r,`Relationships`).find(e=>e.name===`Relationship`&&e.attributes?.Id===n)},c=(e,t)=>{let n=t.attributes?.Target;return t.attributes?.TargetMode===`External`||n===void 0?void 0:o(dp(e,String(n)))},l=t=>[...e].some(([e,n])=>e.endsWith(`.rels`)&&Uf(n,`Relationships`).some(n=>c(lp(e),n)===t)),u=n=>{e.delete(n),t.delete(n),e.delete(cp(n));let r=e.get(pp);r!==void 0&&Kf(r,`/${n}`)};return{getRelatedPart:(t,n)=>{let r=s(t.path,n),i=r===void 0?void 0:c(t.path,r);return i===void 0?void 0:{path:i,xml:e.get(i)}},replaceRelatedPart:(t,r,i)=>{let a=`word/${n.PackageParts.add(i)}`,{relationshipType:o}=i.options,d=fp(t.path,a),f=r===void 0?void 0:s(t.path,r);if(f===void 0){let n=cp(t.path),i=e.get(n)??ip();e.set(n,i);let a=r??`rId${np(i)}`;return mp(i).push({type:`element`,name:`Relationship`,attributes:{Id:a,Type:o,Target:d}}),a}let p=c(t.path,f);return f.attributes=C(C({},Object.fromEntries(Object.entries(f.attributes).filter(([e])=>e!==`TargetMode`))),{},{Type:o,Target:d}),p!==void 0&&p!==t.path&&p!==pp&&!p.endsWith(`.rels`)&&!l(p)&&u(p),String(f.attributes.Id)},format:e=>Bf((0,$.default)(i.format(e,r))).elements[0]}},gp=({parts:e,binaryParts:t,file:n,patches:r,delimiters:i},a)=>{let o=r.map(([e,t])=>({placeholder:`${i.start}${e}${i.end}`,patch:t})),s=[...e].filter(([e])=>e.startsWith(`word/`)&&!e.endsWith(`.rels`)).flatMap(([e,t])=>op(t).flatMap(n=>{let r=sp(n.properties),i=o.filter(({placeholder:e})=>r.some(t=>t.includes(e)));if(i.length>1)throw Error(`The drawing "${n.properties.attributes?.name??``}" in ${e} has the placeholders ${i.map(({placeholder:e})=>e).join(` and `)} in its alt text. A drawing can only be patched once`);return i.map(({placeholder:r,patch:i})=>({drawing:C(C({placeholder:r},n),{},{part:{path:e,xml:t}}),patch:i}))}));for(let{drawing:r,patch:i}of s)i.patch(r,hp(e,t,n,a(r.part.path)))},_p=new Sf,vp=`word/document.xml`,yp={path:`word/footnotes.xml`,rootName:`w:footnotes`,noteName:`w:footnote`,referenceName:`w:footnoteReference`,contentType:`application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml`,relationshipType:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes`,create:{part:()=>new Iu,mark:()=>new Mu,styles:()=>[new jd({}),new Nd({}),new Md({})]}},bp={path:`word/endnotes.xml`,rootName:`w:endnotes`,noteName:`w:endnote`,referenceName:`w:endnoteReference`,contentType:`application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml`,relationshipType:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes`,create:{part:()=>new Tu,mark:()=>new vu,styles:()=>[new Pd({}),new Id({}),new Fd({})]}},xp=(e,t)=>Bf((0,$.default)(_p.format(e,t))).elements[0],Sp=(e,t)=>{let n=t.includes(e.name??``)?Number(e.attributes?.[`w:id`]):NaN;return[...Number.isInteger(n)?[n]:[],...(e.elements??[]).flatMap(e=>Sp(e,t))]},Cp=(e,t)=>{let n=e.elements??[],r=+(n[0]?.name===`w:pPr`);return C(C({},e),{},{elements:[...n.slice(0,r),t,...n.slice(r)]})},wp=(e,t,n,{createContext:r,addContentTypeOverride:i,renumberBookmarks:a,renumberDrawings:o,renumberLists:s,useStyles:c})=>{let l=new Map(Object.entries(t).map(([e,t])=>[Number(e),t])),u=new Map,d=[...l.keys()].filter(Number.isFinite).reduce((e,t)=>Math.max(e,Math.floor(t)),0),f=new Map,p,m=t=>{let r=t.name===e.referenceName?l.get(Number(t.attributes?.[`w:id`])):void 0;return r===void 0?t.elements===void 0?t:C(C({},t),{},{elements:t.elements.map(m)}):(p=(p??[...n.values()].flatMap(t=>Sp(t,[e.noteName,e.referenceName])).reduce((e,t)=>Math.max(e,t),0))+1,f.set(p,r),C(C({},t),{},{attributes:C(C({},t.attributes),{},{"w:id":String(p)})}))},h=()=>{let t=Uf(n.get(cp(vp))??{},`Relationships`).find(t=>t.attributes?.Type===e.relationshipType),a=t?dp(vp,String(t.attributes.Target)):e.path;return n.has(a)||(n.set(a,{declaration:{attributes:{version:`1.0`,encoding:`UTF-8`,standalone:`yes`}},elements:[xp(e.create.part(),r(a))]}),i(e.contentType,`/${a}`)),t||r(vp).viewWrapper.Relationships.addRelationship(Vr(),e.relationshipType,fp(vp,a)),a};return{renumber:e=>e.map(m),write:()=>{if(f.size===0)return;let t=h(),i=r(t),l=new Map([...new Set(f.values())].map(t=>{let n=xp(e.create.mark(),i);return[t,c(s(a(t.children.map(e=>xp(e,i)).map((e,t)=>t===0?Cp(e,n):e))))]}));Uf(n.get(t),e.rootName).push(...[...f].map(([t,n])=>({type:`element`,name:e.noteName,attributes:{"w:id":String(t)},elements:[...o(l.get(n))]})));let u=n.get(`word/styles.xml`);if(u){let t=Uf(u,`w:styles`),n=new Set(t.map(e=>e.attributes?.[`w:styleId`]));t.push(...e.create.styles().map(e=>xp(e,i)).filter(e=>!n.has(e.attributes?.[`w:styleId`])))}},carry:(e,t)=>{let n=u.get(e);return n===void 0?(d++,l.set(d,t),u.set(e,d),d):n}}},Tp=({footnotes:e={},endnotes:t={}},n,r)=>{let i={footnotes:wp(yp,e,n,r),endnotes:wp(bp,t,n,r)};return{carry:(e,t,n)=>i[e].carry(t,n),renumber:e=>Object.values(i).reduce((e,t)=>t.renumber(e),e),write:()=>{for(let e of Object.values(i))e.write()}}},Ep=new Sf,Dp=`word/document.xml`,Op=`word/numbering.xml`,kp=`application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml`,Ap=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering`,jp=`default-bullet-numbering`,Mp=`1`,Np=(e,t)=>Bf((0,$.default)(Ep.format(e,t))).elements[0],Pp=e=>e.reduce((e,t)=>Math.max(e,t),0),Fp=(e,t,{createContext:n,addContentTypeOverride:r})=>{let i=new Map,a,o=()=>Uf(t.get(cp(Dp))??{},`Relationships`).find(e=>e.attributes?.Type===Ap),s=(e=o())=>e?dp(Dp,String(e.attributes.Target)):Op,c=(e,n)=>Uf(t.get(s())??{},`w:numbering`).filter(t=>t.name===e).map(e=>Number(e.attributes[n])),l=t=>{if(t===Mp)return e.ConcreteNumbering.find(({reference:e})=>e===jp);if(!t.startsWith(`{`))return;let n=e.ConcreteNumbering.find(({reference:e,instance:n})=>t===`{${e}-${n}}`);if(!n){let e=t.slice(1,-1).replace(/-\d+$/,``);throw Error(`A paragraph in a patch uses the numbering "${e}", which isn't in the numbering option of patchDocument. Add it there with its levels, as in a Document`)}return n},u=e=>{let t=i.get(e.numId);return t===void 0?(a=(a??Pp(c(`w:num`,`w:numId`)))+1,i.set(e.numId,a),a):t},d=e=>{let t=e.name===`w:numId`?l(String(e.attributes[`w:val`])):void 0;return t===void 0?e.elements===void 0?e:C(C({},e),{},{elements:e.elements.map(d)}):C(C({},e),{},{attributes:C(C({},e.attributes),{},{"w:val":String(u(t))})})},f=e=>{let i=o(),a=s(i);return t.has(a)||(t.set(a,{declaration:{attributes:{version:`1.0`,encoding:`UTF-8`,standalone:`yes`}},elements:[C(C({},e),{},{elements:[]})]}),r(kp,`/${a}`)),i||n(Dp).viewWrapper.Relationships.addRelationship(Vr(),Ap,fp(Dp,a)),a};return{renumber:e=>e.map(d),write:()=>{if(i.size===0)return;let r=Np(e,n(s())),a=e=>Number(e.elements.find(e=>e.name===`w:abstractNumId`).attributes[`w:val`]),o=r.elements.filter(e=>e.name===`w:num`&&i.has(Number(e.attributes[`w:numId`]))),l=Pp(c(`w:abstractNum`,`w:abstractNumId`)),u=new Map([...new Set(o.map(a))].map((e,t)=>[e,l+t+1])),d=r.elements.flatMap(e=>{let t=e.name===`w:abstractNum`?u.get(Number(e.attributes[`w:abstractNumId`])):void 0;return t===void 0?[]:[C(C({},e),{},{attributes:C(C({},e.attributes),{},{"w:abstractNumId":String(t)})})]}),p=f(r),m=t.get(p).elements.find(e=>e.name===`w:numbering`);m.attributes=C(C(C({},Object.fromEntries(Object.entries(r.attributes).filter(([e])=>e.startsWith(`xmlns:`)))),m.attributes),{},{"mc:Ignorable":[...new Set([...String(m.attributes?.[`mc:Ignorable`]??``).split(` `),...String(r.attributes[`mc:Ignorable`]).split(` `)])].filter(e=>e!==``).join(` `)});let h=Uf(t.get(p),`w:numbering`),g=e=>{let t=h.findIndex(t=>e.includes(t.name));return t===-1?h.length:t};h.splice(g([`w:num`,`w:numIdMacAtCleanup`]),0,...d),h.splice(g([`w:numIdMacAtCleanup`]),0,...o.map(e=>C(C({},e),{},{attributes:C(C({},e.attributes),{},{"w:numId":String(i.get(Number(e.attributes[`w:numId`])))}),elements:e.elements.map(t=>t.name===`w:abstractNumId`?C(C({},t),{},{attributes:{"w:val":String(u.get(a(e)))}}):t)})))}}},Ip={nameOf:e=>e.type===`element`?e.name:void 0,contentOf:e=>e.elements,attributeOf:(e,t)=>e.attributes?.[t],textOf:e=>(e.elements??[]).filter(({type:e})=>e===`text`).map(({text:e})=>String(e)).join(``),textElement:e=>({type:`element`,name:`w:t`,attributes:{"xml:space":`preserve`},elements:[{type:`text`,text:e}]}),writeClean:(e,t)=>{/^\s*(PAGEREF|TOC)\b/i.test(t)&&e.attributes?.[`w:dirty`]!==void 0&&(e.attributes=Object.fromEntries(Object.entries(e.attributes).filter(([e])=>e!==`w:dirty`)))},setSimpleFieldResult:(e,t)=>{e.elements=[{type:`element`,name:`w:r`,elements:[Ip.textElement(t)]}]}},Lp=`word/document.xml`,Rp=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk`,zp=[80,75,3,4],Bp=function(){var e=Mf(function*(e){if(zp.every((t,n)=>e[n]===t))try{let t=yield _f.default.loadAsync(e),n=new Map,r=new Map;for(let[e,i]of Object.entries(t.files))i.dir||(/\.(xml|rels)$/.test(e)?n.set(e,Bf(yield i.async(`text`))):r.set(e,yield i.async(`uint8array`)));let i=yield Vp(n,r);return C({parts:n,binaryParts:r},i.size>0?{importedDocuments:i}:{})}catch{return}});return function(t){return e.apply(this,arguments)}}(),Vp=function(){var e=Mf(function*(e,t){let n=new Map;for(let[r,i]of e)if(r.endsWith(`.rels`))for(let{attributes:e={}}of Hp(i)?.elements??[]){let i=dp(lp(r),String(e.Target)),a=t.get(i),o=e.Type===Rp&&e.TargetMode!==`External`&&a?yield Bp(a):void 0;o&&n.set(i,o)}return n});return function(t,n){return e.apply(this,arguments)}}(),Hp=e=>{var t;return e==null||(t=e.elements)==null?void 0:t.find(({type:e})=>e===`element`)},Up=function(){var e=Mf(function*(e,t,n=new Map){let r=Hp(e.get(Lp));if(!r)return;let i=yield Vp(e,n),a=t(C({parts:e,binaryParts:n},i.size>0?{importedDocuments:i}:{})),o=Ya(Ip,r,a,{blank:!0}),s=Hp(e.get(cp(Lp)))?.elements??[];for(let{attributes:t={}}of s){let n=/\/(header|footer)$/.test(String(t.Type))?Hp(e.get(dp(Lp,String(t.Target)))):void 0;n&&Xa(Ip,n,a,{blank:!0,sectionPageCount:o.get(String(t.Id))})}});return function(t,n){return e.apply(this,arguments)}}(),Wp=class extends Error{constructor(e){super(`Token ${e} not found`),this.name=`TokenNotFoundError`}},Gp=(e,t)=>{for(let n=0;n<(e.elements??[]).length;n++){let r=e.elements[n];if(r.type===`element`&&r.name===`w:r`){let e=(r.elements??[]).filter(e=>e.type===`element`&&e.name===`w:t`);for(let r of e)if(r.elements?.[0]&&r.elements[0].text?.includes(t))return n}}throw new Wp(t)},Kp=(e,t)=>{let n=-1,r=e.elements?.map((e,r)=>{if(n!==-1)return e;if(e.type===`element`&&e.name===`w:t`){var i;let a=(((i=e.elements)==null||(i=i[0])==null?void 0:i.text)??``).split(t),o=a.map(t=>C(C(C({},e),Hf(e)),{},{elements:Vf(t)}));return a.length>1&&(n=r),o}return e}).flat()??[];return{left:C(C({},JSON.parse(JSON.stringify(e))),{},{elements:r.slice(0,n+1)}),right:C(C({},JSON.parse(JSON.stringify(e))),{},{elements:r.slice(n+1)})}},qp={START:0,MIDDLE:1,END:2},Jp=({paragraphElement:e,renderedParagraph:t,originalText:n,replacementText:r,fromIndex:i=0})=>{let a=t.text.indexOf(n,i),o=a+n.length-1,s=qp.START;for(let n of t.runs)for(let{text:t,index:i,start:c,end:l}of n.parts)switch(s){case qp.START:if(a>=c&&a<=l){let u=a-c,d=Math.min(o,l)-c;if(t.substring(u,d+1)===``)continue;let f=t.substring(0,u)+r+t.substring(d+1);Yp(e.elements[n.index].elements[i],f),s=qp.MIDDLE;continue}break;case qp.MIDDLE:if(o<=l){let r=t.substring(o-c+1);Yp(e.elements[n.index].elements[i],r);let a=e.elements[n.index].elements[i];e.elements[n.index].elements[i]=Hf(a),s=qp.END}else Yp(e.elements[n.index].elements[i],``)}return e},Yp=(e,t)=>(e.elements=Vf(t),e),Xp=e=>{if(e.element.name!==`w:p`)throw Error(`Invalid node type: ${e.element.name}`);if(!e.element.elements)return{text:``,runs:[],index:-1,pathToParagraph:[]};let t=0,n=e.element.elements.map((e,t)=>({element:e,i:t})).filter(({element:e})=>e.name===`w:r`).map(({element:e,i:n})=>{let r=Zp(e,n,t);return t+=r.text.length,r}).filter(e=>!!e);return{text:n.reduce((e,t)=>e+t.text,``),runs:n,index:e.index,pathToParagraph:Qp(e)}},Zp=(e,t,n)=>{if(!e.elements)return{text:``,parts:[],index:-1,start:n,end:n};let r=n,i=e.elements.map((e,t)=>{if(e.name!==`w:t`||!e.elements||e.elements.length===0)return;let n=e.elements[0].text?.toString()??``,i=r;return r+=n.length,{text:n,index:t,start:i,end:i+n.length-1}}).filter(e=>!!e).map(e=>e);return{text:i.reduce((e,t)=>e+t.text,``),parts:i,index:t,start:n,end:i.length>0?i[i.length-1].end:n}},Qp=e=>e.parent?[...Qp(e.parent),e.index]:[e.index],$p=e=>e.element.elements?.map((t,n)=>({element:t,index:n,parent:e}))??[],em=e=>{let t=[],n=[...$p({element:e,index:0,parent:void 0})],r;for(;n.length>0;)r=n.shift(),r.element.name===`w:p`&&(t=[...t,Xp(r)]),n.push(...$p(r));return t},tm=(e,t)=>em(e).filter(e=>e.text.includes(t)),nm=``,rm=({json:e,patch:t,patchText:n,context:r,keepOriginalStyles:i=!0,recursive:a=!0,renumberIds:o=e=>e})=>{let s=tm(e,n);if(s.length===0)return{element:e,didFindOccurrence:!1};let c=[...s].reverse(),l=t.type===ep.DOCUMENT?fm(c):c;for(let s of l)switch(t.type){case ep.DOCUMENT:{let n=mm(e,s.pathToParagraph),i=hm(s.pathToParagraph),a=im(t,r,o),c=n.name===`w:tc`&&i===n.elements.length-1&&a[a.length-1]?.name!==`w:p`?[{type:`element`,name:`w:p`}]:[];n.elements.splice(i,1,...a,...c);break}case ep.PARAGRAPH:default:{let c=pm(e,s.pathToParagraph),l=s,u=0;do{let e=am({paragraphElement:c,renderedParagraph:l,patchText:n,fromIndex:u,children:im(t,r,o),keepOriginalStyles:i});l=Xp({element:c,index:s.index,parent:void 0}),u=l.runs.filter(t=>t.index<e).reduce((e,t)=>e+t.text.length,0)}while(a&&l.text.includes(n,u));break}}return{element:e,didFindOccurrence:!0}},im=(e,t,n)=>n(e.children.flatMap(e=>e.writtenAs??e).flatMap(e=>{let n=e.prepForXml(t);return n?[Bf((0,$.default)(n)).elements[0]]:[]})),am=({paragraphElement:e,renderedParagraph:t,patchText:n,fromIndex:r,children:i,keepOriginalStyles:a})=>{Jp({paragraphElement:e,renderedParagraph:t,originalText:n,replacementText:nm,fromIndex:r});let o=Gp(e,nm),s=e.elements[o],{left:c,right:l}=Kp(s,nm),u=s.elements.find(e=>e.type===`element`&&e.name===`w:rPr`),d=a&&u?i.map(e=>om(e,u)):i,f=u?C(C({},l),{},{elements:[u,...l.elements]}):l;return e.elements.splice(o,1,c,...d,f),o+1+d.length},om=(e,t)=>e.name===`w:r`?sm(e,t):e.elements?C(C({},e),{},{elements:e.elements.map(e=>om(e,t))}):e,sm=(e,t)=>{let n=um(e).find(e=>e.type===`element`&&e.name===`w:rPr`);if(!n)return C(C({},e),{},{elements:[t,...um(e)]});let r=new Set(um(n).map(e=>e.name)),i=[...um(t).filter(e=>!r.has(e.name)),...um(n)],a=C(C({},n),{},{elements:[...i].sort((e,t)=>lm(e)-lm(t))});return C(C({},e),{},{elements:um(e).map(e=>e===n?a:e)})},cm=`w:rStyle.w:rFonts.w:b.w:bCs.w:i.w:iCs.w:caps.w:smallCaps.w:strike.w:dstrike.w:outline.w:shadow.w:emboss.w:imprint.w:noProof.w:snapToGrid.w:vanish.w:webHidden.w:color.w:spacing.w:w.w:kern.w:position.w:sz.w:szCs.w:highlight.w:u.w:effect.w:bdr.w:shd.w:fitText.w:vertAlign.w:rtl.w:cs.w:em.w:lang.w:eastAsianLayout.w:specVanish.w:oMath.w14:glow.w14:shadow.w14:reflection.w14:textOutline.w14:textFill.w14:scene3d.w14:props3d.w14:ligatures.w14:numForm.w14:numSpacing.w14:stylisticSets.w14:cntxtAlts`.split(`.`),lm=e=>{if(e.name===`w:rPrChange`)return cm.length+1;let t=cm.indexOf(e.name??``);return t===-1?cm.length:t},um=e=>e.elements??[],dm=(e,t)=>e.length>t.length&&t.every((t,n)=>e[n]===t),fm=e=>e.filter(t=>!e.some(e=>dm(t.pathToParagraph,e.pathToParagraph))),pm=(e,t)=>{let n=e;for(let e=1;e<t.length;e++){let r=t[e];n=n.elements[r]}return n},mm=(e,t)=>pm(e,t.slice(0,t.length-1)),hm=e=>e[e.length-1],gm=new Sf,_m=`word/styles.xml`,vm=new Set([`w:pStyle`,`w:rStyle`,`w:tblStyle`,`w:basedOn`,`w:next`,`w:link`]),ym=e=>String(e.attributes?.[`w:styleId`]),bm=e=>{var t;let n=(t=e.elements)==null||(t=t.find(e=>e.name===`w:name`))==null||(t=t.attributes)==null?void 0:t[`w:val`];return n===void 0?void 0:String(n).toLowerCase()},xm=e=>new Map(Object.values(Yd()).map(t=>Bf((0,$.default)(gm.format(t,e))).elements[0]).filter(e=>e.name===`w:style`).map(e=>[ym(e),e])),Sm=(e,t)=>{let n=Uf(e.get(_m)??{},`w:styles`).filter(e=>e.name===`w:style`),r=new Set(n.map(ym)),i,a=e=>(i??=xm(t(_m)),i.get(e)),o=new Set,s=new Map,c=e=>{let t=r.has(e)?void 0:a(e);if(t===void 0)return e;let i=n.find(e=>e.attributes?.[`w:type`]===t.attributes?.[`w:type`]&&bm(e)===bm(t));return i===void 0?(o.add(e),e):ym(i)},l=e=>(s.has(e)||s.set(e,c(e)),s.get(e)),u=e=>vm.has(e.name??``)?C(C({},e),{},{attributes:C(C({},e.attributes),{},{"w:val":l(String(e.attributes[`w:val`]))})}):e.elements===void 0?e:C(C({},e),{},{elements:e.elements.map(u)});return{use:e=>e.map(u),write:()=>{let t=e.get(_m);if(!t)return;let n=Uf(t,`w:styles`),r=new Set(n.map(ym));for(let e of o)r.has(e)||(r.add(e),n.push(u(a(e))))}}},Cm={type:ep.PARAGRAPH,children:[]},wm=({json:e,key:t,patch:n,delimiters:{start:r,end:i},patchPlaceholder:a,renumberDrawings:o})=>{let s=`${r}${t}.`;for(let r of Tm(e,s)){let e=km(r.elements,s,i),c=n.rows.flatMap((n,i)=>{let s={type:`element`,name:`w:tbl`,elements:[...i===0?r.elements.map(Am):o(Nm(r.elements))]},c=new Map(Object.entries(n).flatMap(([e,t])=>t===void 0?[]:[[e,t]]));for(let[e,n]of c)a(s,`${t}.${e}`,n);for(let n of e.filter(e=>!c.has(e)))a(s,`${t}.${n}`,Cm);return s.elements});r.parent.elements.splice(r.parent.elements.indexOf(r.elements[0]),r.elements.length,...c),r.table&&!Om(r.table.element)&&r.table.parent.elements.splice(r.table.parent.elements.indexOf(r.table.element),1)}},Tm=(e,t)=>{let n=tm(e,t).flatMap(t=>{let n=Em(e,t.pathToParagraph);return n?[n]:[]}),r=n.filter(e=>!n.some(t=>Dm(e.path,t.path))).filter((e,t,n)=>n.findIndex(t=>t.row===e.row)===t);return[...new Set(r.map(e=>e.parent))].flatMap(e=>{let t=e.elements.filter(e=>e.name===`w:tr`),n=r.filter(t=>t.parent===e).map(e=>t.indexOf(e.row)).sort((e,t)=>e-t),{table:i}=r.find(t=>t.parent===e);return n.reduce((e,t)=>{let n=e[e.length-1];return n?.[n.length-1]===t-1?[...e.slice(0,-1),[...n,t]]:[...e,[t]]},[]).map(n=>{let r=e.elements.indexOf(t[n[0]]),a=e.elements.indexOf(t[n[n.length-1]]);return{parent:e,table:i,elements:e.elements.slice(r,a+1)}})})},Em=(e,t)=>{let n=e,r,i;for(let e=1;e<t.length;e++){let a=n.elements[t[e]];a.name===`w:tbl`&&(i={element:a,parent:n}),a.name===`w:tr`&&(r={parent:n,table:i,row:a,path:t.slice(0,e+1)}),n=a}return r},Dm=(e,t)=>e.length>t.length&&t.every((t,n)=>e[n]===t),Om=e=>(e.elements??[]).some(e=>e.name===`w:tr`||e.name!==`w:tblPr`&&e.name!==`w:tblGrid`&&Om(e)),km=(e,t,n)=>{let r=tm({elements:[...e]},t).flatMap(({text:e})=>e.split(t).slice(1).flatMap(e=>{let t=e.indexOf(n);return t>0?[e.slice(0,t)]:[]}));return[...new Set(r)]},Am=e=>JSON.parse(JSON.stringify(e)),jm=[`w14:paraId`,`w14:textId`],Mm=[`w:bookmarkStart`,`w:bookmarkEnd`],Nm=(e,t)=>e.filter(e=>!Mm.includes(e.name??``)&&(t?.name!==`w:sdtPr`||e.name!==`w:id`)).map(e=>C(C(C({},e),e.attributes===void 0?{}:{attributes:Object.fromEntries(Object.entries(e.attributes).filter(([e])=>!jm.includes(e)))}),e.elements===void 0?{}:{elements:[...Nm(e.elements,e)]})),Pm=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme`,Fm=new Map([[`dk1`,`dark1`],[`lt1`,`light1`],[`dk2`,`dark2`],[`lt2`,`light2`],[`accent1`,`accent1`],[`accent2`,`accent2`],[`accent3`,`accent3`],[`accent4`,`accent4`],[`accent5`,`accent5`],[`accent6`,`accent6`],[`hlink`,`hyperlink`],[`folHlink`,`followedHyperlink`]]),Im=e=>e.name?.slice(e.name.indexOf(`:`)+1),Lm=(e,t)=>{var n;return e==null||(n=e.elements)==null?void 0:n.find(e=>Im(e)===t)},Rm=e=>{let t=e.elements?.map(e=>Im(e)===`srgbClr`?e.attributes?.val:Im(e)===`sysClr`?e.attributes?.lastClr:void 0).find(e=>e!==void 0);return typeof t==`string`&&/^[0-9A-Fa-f]{6}$/.test(t)?t.toUpperCase():void 0},zm=e=>e[0]===255&&e[1]===254||e[0]===254&&e[1]===255,Bm=function(){var e=Mf(function*(e,t){let n=e.file(t);if(n!==null)return zm(yield n.async(`uint8array`))?void 0:Bf(yield n.async(`text`))});return function(t,n){return e.apply(this,arguments)}}(),Vm=function(){var e=Mf(function*(e){var t,n;let r=(t=Lm(yield Bm(e,`word/_rels/document.xml.rels`),`Relationships`))==null||(t=t.elements)==null?void 0:t.find(e=>e.attributes?.Type===Pm),i=r==null||(n=r.attributes)==null?void 0:n.Target;return typeof i==`string`?Bm(e,dp(`word/document.xml`,i)):void 0});return function(t){return e.apply(this,arguments)}}(),Hm=function(){var e=Mf(function*(e){let t=yield Vm(e);if(t===void 0)return;let n=(Lm(Lm(Lm(t,`theme`),`themeElements`),`clrScheme`)?.elements??[]).flatMap(e=>{let t=Fm.get(Im(e)??``),n=Rm(e);return t&&n?[[t,n]]:[]});return un(Object.fromEntries(n))});return function(t){return e.apply(this,arguments)}}(),Um=(e,t,{inTableRow:n})=>{if(t?.type===ep.TABLE_ROWS&&Array.isArray(t.rows))for(let n of t.rows){if(typeof n!=`object`||!n)throw Error(`Invalid patch "${e}". Expected each of its rows to be an object of patches, by the name of their field`);for(let[t,r]of Object.entries(n))r!==void 0&&Um(`${e}.${t}`,r,{inTableRow:!0})}else if(!(t?.type===ep.DRAWING?!n&&typeof t.patch==`function`:t?.type!==ep.TABLE_ROWS&&Array.isArray(t?.children)))throw Error(`Invalid patch "${e}". Expected { type: PatchType.PARAGRAPH or PatchType.DOCUMENT, children: [...] }, ${n?`or { type: PatchType.TABLE_ROWS, rows: [...] }`:`{ type: PatchType.TABLE_ROWS, rows: [...] }, or a drawing patch such as ChartDataPatch from docx/charts`}`)},Wm=new Cf,Gm=new Uint8Array([255,254]),Km=new Uint8Array([254,255]),qm=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0};(function(){var e=Mf(function*({outputType:e,data:t,patches:n,keepOriginalStyles:r,placeholderDelimiters:i={start:`{{`,end:`}}`},recursive:a=!0,footnotes:o,endnotes:s,numbering:c={config:[]},pageNumbers:l}){let u=t instanceof _f.default?t:yield _f.default.loadAsync(t),d=new Map,f=yield Hm(u),p=[],m={Media:new Vu,Numbering:new cd(c),Theme:f&&{Colors:f},FootNotes:{View:{idOf:(e,t,n)=>M(`footnotes`,e,t,n)}},Endnotes:{View:{idOf:(e,t,n)=>M(`endnotes`,e,t,n)}},PackageParts:new ld({addOverride:(e,t)=>p.push({contentType:e,partName:t})},new Set(Object.keys(u.files).filter(e=>e.startsWith(`word/`)).map(e=>e.slice(5))))},h=new Map,g=[],_=[],v=!1,y=new Map;if(!i?.start.trim()||!i?.end.trim())throw Error(`Both start and end delimiters must be non-empty strings.`);let{start:b,end:x}=i;for(let[e,t]of Object.entries(n))Um(e,t,{inTableRow:!1});for(let[e,t]of Object.entries(u.files)){let n=yield t.async(`uint8array`),r=n.slice(0,2);if(qm(r,Gm)||qm(r,Km)||!e.endsWith(`.xml`)&&!e.endsWith(`.rels`)){y.set(e,n);continue}let i=Bf(yield t.async(`text`));if(e===`word/document.xml`){let e=i.elements?.find(e=>e.name===`w:document`);if(e&&e.attributes){for(let t of[`mc`,`wp`,`r`,`w15`,`m`])e.attributes[`xmlns:${t}`]=nu[t];e.attributes[`mc:Ignorable`]=`${e.attributes[`mc:Ignorable`]||``} w15`.trim()}}h.set(e,i)}let S=Rf([...h.values()].flatMap(Lf)),w=$f([...h.values()].flatMap(Zf)),T=new Map,E=e=>{let t=T.get(e);if(t)return t;let n={Relationships:{addRelationship:(t,n,r,i)=>{_.push({key:e,id:t,type:n,target:r,targetMode:i})}}};return T.set(e,n),n},D=e=>({file:m,viewWrapper:E(e),stack:[]}),O=(e,t)=>{p.push({contentType:e,partName:t})},k=Sm(h,D),A=Fp(m.Numbering,h,{createContext:D,addContentTypeOverride:O}),j=Tp({footnotes:o,endnotes:s},h,{createContext:D,addContentTypeOverride:O,renumberBookmarks:S,renumberDrawings:w,renumberLists:A.renumber,useStyles:k.use}),M=(e,t,n,r)=>r.viewWrapper===E(`word/document.xml`)?j.carry(e,t,n):void 0;gp({parts:h,binaryParts:y,file:m,patches:Object.entries(n).flatMap(([e,t])=>t.type===ep.DRAWING?[[e,t]]:[]),delimiters:{start:b,end:x}},D);let N=Object.entries(n).flatMap(([e,t])=>t.type===ep.DRAWING?[]:[[e,t]]),P=[...N.filter(([,e])=>e.type===ep.TABLE_ROWS),...N.filter(([,e])=>e.type!==ep.TABLE_ROWS)];for(let[e,t]of[...h]){if(!e.startsWith(`word/`)||e.endsWith(`.xml.rels`))continue;let n=D(e);d.set(e,n);let i=(t,o,s)=>{if(s.type===ep.TABLE_ROWS){wm({json:t,key:o,patch:s,delimiters:{start:b,end:x},patchPlaceholder:i,renumberDrawings:w});return}let c=[],{didFindOccurrence:l}=rm({json:t,patch:C(C({},s),{},{children:s.children.flatMap(e=>e instanceof Ts?e.writtenAs:[e]).map(t=>{if(t instanceof Ss){let{target:n,anchor:r}=Ms(t.options.link),i=new bs(t.options.children,Vr(),r,t.options.link);return c.push({key:e,id:i.linkId,type:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink`,target:n,targetMode:aa.EXTERNAL}),i}return t})}),patchText:`${b}${o}${x}`,context:n,keepOriginalStyles:r,recursive:a,renumberIds:e=>k.use(A.renumber(j.renumber(S(w(e)))))});l&&_.push(...c)};for(let[e,n]of P)i(t,e,n)}j.write(),A.write(),k.write();for(let[e,t]of h){if(!e.startsWith(`word/`)||e.endsWith(`.xml.rels`))continue;let n=Wm.getMediaData(JSON.stringify(t),m.Media);n.length>0&&(v=!0,g.push({key:e,mediaDatas:n}))}for(let{key:e,mediaDatas:t}of g){let n=cp(e),r=h.get(n)??ip();h.set(n,r);let i=np(r),a=Wm.replace(JSON.stringify(h.get(e)),t,i);h.set(e,JSON.parse(a));for(let e=0;e<t.length;e++){let{fileName:n}=t[e];rp(r,i+e,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${n}`)}}for(let{key:e,id:t,type:n,target:r,targetMode:i}of _){let a=cp(e),o=h.get(a)??ip();h.set(a,o),rp(o,t,n,r,i)}l&&(yield Up(h,l,y));let F=Of(m,void 0);if(v||p.length>0){let e=h.get(`[Content_Types].xml`);if(!e)throw Error(`Could not find content types file`);v&&(Wf(e,`image/png`,`png`),Wf(e,`image/jpeg`,`jpeg`),Wf(e,`image/jpeg`,`jpg`),Wf(e,`image/bmp`,`bmp`),Wf(e,`image/gif`,`gif`),Wf(e,`image/svg+xml`,`svg`));for(let{contentType:t,partName:n}of p)Gf(e,t,n)}let I=new _f.default;for(let[e,t]of h){let n=Ym(t);I.file(e,Gr(n))}for(let[e,t]of y)I.file(e,t);for(let{data:e,fileName:t}of m.Media.Array)I.file(`word/media/${t}`,e);for(let{path:e,data:t}of F)I.file(e,typeof t==`string`?Gr(t):t);return I.generateAsync({type:e,mimeType:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,compression:`DEFLATE`})});return function(t){return e.apply(this,arguments)}})();var Jm=e=>C(C(C({},e),e.attributes===void 0?{}:{attributes:Object.fromEntries(Object.entries(e.attributes).map(([e,t])=>[e,t===void 0?t:String(t).replace(/&/g,`&`)]))}),e.elements===void 0?{}:{elements:e.elements.map(e=>e.type===`text`?C(C({},e),{},{text:String(e.text).replace(/&/g,`&`)}):Jm(e))}),Ym=e=>(0,kt.js2xml)(Jm(e),{attributeValueFn:e=>String(e).replace(/</g,`<`).replace(/>/g,`>`).replace(/'/g,`'`)});(function(){var e=Mf(function*({data:e}){let t=e instanceof _f.default?e:yield _f.default.loadAsync(e),n=new Set;for(let[e,r]of Object.entries(t.files))if((e.endsWith(`.xml`)||e.endsWith(`.rels`))&&e.startsWith(`word/`)&&!e.endsWith(`.xml.rels`)){let e=Bf(yield r.async(`text`));[...em(e).map(e=>e.text),...op(e).flatMap(({properties:e})=>sp(e))].forEach(e=>Xm(e).forEach(e=>n.add(e)))}return Array.from(n)});return function(t){return e.apply(this,arguments)}})();var Xm=e=>{let t=RegExp(`(?<=\\{\\{).+?(?=\\}\\})`,`gs`);return e.match(t)??[]},Zm=class extends Error{constructor(e){super(e),this.name=`MathMarkupError`}},Qm={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`};function $m(e){return e.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-zA-Z]+);/g,(e,t)=>t.startsWith(`#x`)?String.fromCodePoint(Number.parseInt(t.slice(2),16)):t.startsWith(`#`)?String.fromCodePoint(Number.parseInt(t.slice(1),10)):Qm[t]??e)}function eh(e){let t=e.children.map(eh);return{tagName:e.tagName,attributes:e.attributes,children:t,get textContent(){return e.text.join(``)}}}var th=/<(\/?)([A-Za-z][\w:.-]*)((?:\s+[\w:.-]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>/y,nh=/([\w:.-]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;function rh(e){let t={tagName:`#root`,attributes:new Map,children:[],text:[]},n=[t],r=0;for(;r<e.length;){let i=e.indexOf(`<`,r),a=i===-1?e.length:i;if(a>r){let t=$m(e.slice(r,a));for(let e of n)e.text.push(t)}if(i===-1)break;th.lastIndex=i;let o=th.exec(e);if(o===null)throw new Zm(`unreadable markup at ${i}`);let[,s,c,l,u]=o;if(r=th.lastIndex,s===`/`){let e=n.pop();if(e===void 0||e===t||e.tagName!==c)throw new Zm(`unexpected </${c}>`);continue}let d=new Map;for(let e of l.matchAll(nh))d.set(e[1],$m(e[2]??e[3]??``));let f={tagName:c,attributes:d,children:[],text:[]};n[n.length-1].children.push(f),u!==`/`&&n.push(f)}if(n.length!==1)throw new Zm(`unclosed <${n[n.length-1].tagName}>`);return t.children.map(eh)}function ih(e,t){for(let n of e){if(t(n))return n;let e=ih(n.children,t);if(e!==void 0)return e}}function ah(e,t){return(e.attributes.get(`class`)??``).split(/\s+/).includes(t)}var oh=class extends Error{element;constructor(e){super(`no OMML mapping for MathML element <${e}>`),this.name=`UnsupportedMathError`,this.element=e}},sh=new Set([`∑`]),ch=new Set([`∫`,`∬`,`∭`,`∮`]),lh=new Set([`(`,`(`]),uh=new Set([`)`,`)`]);function dh(e,t){let r=ih(rh(n.t.renderToString(e,{output:`mathml`,displayMode:t,throwOnError:!1})),e=>e.tagName.toLowerCase()===`math`);if(r===void 0)throw new oh(`math`);return r}function fh(e){return[...e.children]}function ph(e){return(e.textContent??``).replace(/[\u2061-\u2064]/g,``).trim()}function mh(e){return e.flatMap(hh)}function hh(e){let t=e.tagName.toLowerCase().replace(/^m:/,``);switch(t){case`math`:case`semantics`:case`mrow`:case`mstyle`:case`mpadded`:return yh(fh(e));case`annotation`:case`annotation-xml`:case`mphantom`:return[];case`mspace`:return[new Qs(` `)];case`mi`:case`mn`:case`mo`:case`mtext`:{let t=ph(e);return t===``?[]:[new Qs(t)]}case`mfrac`:{let[t,n]=fh(e);if(t===void 0||n===void 0)throw new oh(`mfrac`);return[new nc({numerator:hh(t),denominator:hh(n)})]}case`msqrt`:return[new Tc({children:mh(fh(e))})];case`mroot`:{let[t,n]=fh(e);if(t===void 0||n===void 0)throw new oh(`mroot`);return[new Tc({children:hh(t),degree:hh(n)})]}case`msub`:case`munder`:{let[n,r]=fh(e);if(n===void 0||r===void 0)throw new oh(t);return[new vc({children:hh(n),subScript:hh(r)})]}case`msup`:case`mover`:{let[n,r]=fh(e);if(n===void 0||r===void 0)throw new oh(t);return[new gc({children:hh(n),superScript:hh(r)})]}case`msubsup`:case`munderover`:{let[n,r,i]=fh(e);if(n===void 0||r===void 0||i===void 0)throw new oh(t);return[new bc({children:hh(n),subScript:hh(r),superScript:hh(i)})]}default:throw new oh(t)}}var gh=new Set([`msub`,`msup`,`msubsup`,`munder`,`mover`,`munderover`]);function _h(e,t){if(!gh.has(e.tagName.toLowerCase()))return;let[n,r,i]=fh(e);if(n===void 0)return;let a=ph(n),o=sh.has(a),s=ch.has(a);if(!o&&!s)return;let c=e.tagName.toLowerCase(),l=c===`msub`||c===`munder`||c===`msubsup`||c===`munderover`?r:void 0,u=c===`msup`||c===`mover`?r:c===`msubsup`||c===`munderover`?i:void 0,d={children:mh(t),...l===void 0?{}:{subScript:hh(l)},...u===void 0?{}:{superScript:hh(u)}};return[o?new pc(d):new mc(d)]}function vh(e){let t=e[0],n=e[e.length-1];return e.length>=2&&t!==void 0&&n!==void 0&&t.tagName.toLowerCase()===`mo`&&n.tagName.toLowerCase()===`mo`&&lh.has(ph(t))&&uh.has(ph(n))?[new kc({children:yh(e.slice(1,-1))})]:yh(e)}function yh(e){let t=[];for(let n=0;n<e.length;n++){let r=_h(e[n],e.slice(n+1));if(r!==void 0)return t.push(...r),t;t.push(...hh(e[n]))}return t}function bh(e,t){let n=dh(e,t);if(ih([n],e=>ah(e,`katex-error`))!==void 0)throw new oh(`katex-error`);let r=ih(n.children,e=>e.tagName.toLowerCase()===`semantics`),i=fh(r===void 0?n:r),a=vh((i.length===1&&i[0].tagName.toLowerCase()===`mrow`?fh(i[0]):i).filter(e=>e.tagName.toLowerCase()!==`annotation`));if(a.length===0)throw new oh(`empty`);return a}var xh=`�`,Sh=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\uFFFE\uFFFF]/g,Ch=/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;function wh(e){return e.replace(Sh,xh).replace(Ch,xh)}var Th=`Consolas, Courier New, monospace`,Eh=360,Dh=`md-ordered`;function Oh(e){return t.i().use(t.u).use(t.n).use(t.t).parse(t.g(e))}function kh(e,t){return new vr({text:wh(e),bold:t.bold,italics:t.italics,strike:t.strike,...t.code===!0?{font:Th}:{}})}function Ah(e,t,n={}){let r=[];for(let i of e)switch(i.type){case`text`:r.push(kh(i.value,n));break;case`strong`:r.push(...Ah(i.children,t,{...n,bold:!0}));break;case`emphasis`:r.push(...Ah(i.children,t,{...n,italics:!0}));break;case`delete`:r.push(...Ah(i.children,t,{...n,strike:!0}));break;case`inlineCode`:r.push(kh(i.value,{...n,code:!0}));break;case`link`:r.push(new Ss({children:Ah(i.children,t,n),link:i.url}));break;case`break`:r.push(new vr({text:``,break:1}));break;case`image`:{let e=t.get(i);e===void 0?r.push(kh(i.alt??i.url,n)):r.push(Uh(e,i.alt));break}case`inlineMath`:r.push(...jh(i.value,!1,n));break;default:r.push(...Ah(Mh(i),t,n))}return r}function jh(e,t,n){try{return[new Ws({children:bh(e,t)})]}catch{return[kh(e,{...n,code:!0})]}}function Mh(e){let t=e.children;return Array.isArray(t)?t:[]}var Nh=[us.HEADING_1,us.HEADING_2,us.HEADING_3,us.HEADING_4,us.HEADING_5,us.HEADING_6];function Ph(e,t){return new Q({heading:Nh[Math.min(e.depth,6)-1],children:Ah(e.children,t)})}function Fh(e){return e.value.split(`
|
|
28
|
+
`).map(e=>new Q({children:[new vr({text:wh(e===``?` `:e),font:Th})],spacing:{before:0,after:0}}))}var Ih=624;function Lh(e,t){return e<=Ih?{width:Math.round(e),height:Math.round(t)}:{width:Ih,height:Math.round(t*Ih/e)}}function Rh(e){return(e.lang??``).toLowerCase()===`mermaid`}async function zh(e,t){let n=new Map;if(t===void 0)return n;let r=[],i=e=>{e.type===`code`&&Rh(e)&&r.push(e);for(let t of e.children??[])i(t)};i(e);for(let[e,i]of r.entries())try{n.set(i,await t(i.value,`docx-export-${e}`))}catch{}return n}async function Bh(e,t){let n=new Map,{imageKey:r,loadImage:i}=t;if(r===void 0||i===void 0)return n;let a=[],o=e=>{e.type===`image`&&a.push(e);for(let t of e.children??[])o(t)};o(e);let s=new Map;for(let e of a){let t=r(e.url);if(t===void 0)continue;s.has(t)||s.set(t,await i(e.url));let a=s.get(t);a!==void 0&&n.set(e,a)}return n}function Vh(e){return new Oa({type:`svg`,data:new TextEncoder().encode(e.svg),fallback:{type:`png`,data:e.png},transformation:Lh(e.width,e.height)})}function Hh(e){return new Q({alignment:rn.CENTER,children:[Vh(e)]})}function Uh(e,t){return e.kind===`vector`?Vh(e.image):new Oa({type:e.type,data:e.bytes,transformation:Lh(e.width,e.height),...Wh(t)})}function Wh(e){let t=e?.trim()??``;return t===``?{}:{altText:{name:`Picture`,description:t}}}function Gh(e){return e===0?{}:{indent:{left:Eh*e},border:{left:{style:kn.SINGLE,size:12,color:`CCCCCC`,space:12}}}}function Kh(e,t,n=0){let r=e.ordered===!0,i=r?t.instance++:0,a=[];for(let o of e.children){let e=!0;for(let s of o.children)s.type===`list`?a.push(...Kh(s,t,n+1)):s.type===`paragraph`?(a.push(new Q({children:Ah(s.children,t.images),...e?r?{numbering:{reference:Dh,level:n,instance:i}}:{bullet:{level:n}}:{indent:{left:Eh*(n+1)}}})),e=!1):a.push(...Yh([s],t))}return a}function qh(e,t){return new Yl({rows:e.children.map((e,n)=>new Jl({tableHeader:n===0,children:e.children.map(e=>new Ml({children:[new Q({children:Ah(e.children,t)})]}))})),width:{size:100,type:tl.PERCENTAGE}})}function Jh(){return new Q({children:[],border:{bottom:{style:kn.SINGLE,size:6,color:`999999`,space:1}}})}function Yh(e,t){let n=[];for(let r of e)switch(r.type){case`heading`:n.push(Ph(r,t.images));break;case`paragraph`:n.push(new Q({children:Ah(r.children,t.images),...Gh(t.quoteDepth)}));break;case`list`:n.push(...Kh(r,t));break;case`table`:n.push(qh(r,t.images));break;case`code`:{let e=t.diagrams.get(r);e===void 0?n.push(...Fh(r)):n.push(Hh(e));break}case`blockquote`:n.push(...Yh(r.children,{...t,quoteDepth:t.quoteDepth+1}));break;case`thematicBreak`:n.push(Jh());break;case`math`:n.push(new Q({children:jh(r.value,!0,{}),alignment:rn.CENTER}));break;default:{let e=Ah(Mh(r),t.images);e.length>0&&n.push(new Q({children:e}));break}}return n}async function Xh(e,t={}){let n=Oh(e),r=await zh(n,t.renderDiagram),i=await Bh(n,t);return Yh(n.children,{instance:0,quoteDepth:0,diagrams:r,images:i})}function Zh(e){return new ff({styles:{default:Qh()},numbering:{config:[$h()]},sections:[{children:e}]})}function Qh(){let e=e=>({paragraph:{outlineLevel:e}});return{heading1:e(0),heading2:e(1),heading3:e(2),heading4:e(3),heading5:e(4),heading6:e(5)}}function $h(){return{reference:Dh,levels:[Hu.DECIMAL,Hu.LOWER_LETTER,Hu.LOWER_ROMAN,Hu.DECIMAL,Hu.LOWER_LETTER].map((e,t)=>({level:t,format:e,text:`%${t+1}.`,alignment:rn.START,style:{paragraph:{indent:{left:720*(t+1),hanging:360}}}}))}}function eg(e){let t=/viewBox="\s*[\d.-]+[\s,]+[\d.-]+[\s,]+([\d.]+)[\s,]+([\d.]+)/.exec(e),n=t?Number(t[1]):NaN,r=t?Number(t[2]):NaN;return!Number.isFinite(n)||!Number.isFinite(r)||n<=0||r<=0?null:{width:n,height:r}}function tg(e,t,n){let r=/^[\s\S]*?<svg\b[^>]*>/.exec(e);return r===null?e:r[0].replace(/\swidth="[^"]*"/,``).replace(/\sheight="[^"]*"/,``).replace(/\sstyle="[^"]*"/,e=>{let t=e.replace(/max-width:[^;"]*;?/,``);return/style="\s*"/.test(t)?``:t}).replace(/>$/,` width="${t}" height="${n}">`)+e.slice(r[0].length)}var ng=e.n({DiagramError:()=>rg,inlineStyles:()=>og,rasterise:()=>lg,renderDiagram:()=>sg,svgDimensions:()=>ig,withExplicitSize:()=>tg}),rg=class extends Error{constructor(e){super(e),this.name=`DiagramError`}};function ig(e){let t=eg(e);if(t===null)throw new rg(`diagram has no usable viewBox`);return t}var ag=[`fill`,`fill-opacity`,`stroke`,`stroke-width`,`stroke-opacity`,`stroke-dasharray`,`stroke-linecap`,`stroke-linejoin`,`opacity`,`font-family`,`font-size`,`font-weight`,`font-style`,`text-anchor`,`dominant-baseline`];function og(e){let t=document.createElement(`div`);t.setAttribute(`style`,`position:absolute;left:-10000px;top:0;width:0;height:0;overflow:hidden`),t.innerHTML=e;let n=t.querySelector(`svg`);if(n===null)return e;document.body.append(t);try{let e=[n,...n.querySelectorAll(`*`)].filter(e=>e.tagName.toLowerCase()!==`style`).map(e=>{let t=window.getComputedStyle(e),n=[];for(let e of ag){let r=t.getPropertyValue(e);r!==``&&n.push([e,r])}return{element:e,painted:n}});for(let{element:t,painted:n}of e){for(let[e,r]of n)t.setAttribute(e,r);t.removeAttribute(`style`),t.removeAttribute(`class`)}for(let e of[...n.querySelectorAll(`style`)])e.remove();return n.outerHTML}finally{t.remove()}}async function sg(e,n){return t.h(async()=>{let t=(await Promise.resolve().then(()=>require("./mermaid.core-73kk5oPm.cjs")).then(e=>e.t)).default,r;try{t.initialize({startOnLoad:!1,theme:`default`,look:`classic`,securityLevel:`strict`,suppressErrorRendering:!0,flowchart:{htmlLabels:!1},htmlLabels:!1}),{svg:r}=await t.render(n,e)}catch(e){throw new rg(`mermaid could not render the diagram: ${String(e)}`)}finally{t.initialize({startOnLoad:!1,look:`classic`,securityLevel:`strict`,suppressErrorRendering:!0})}let{width:i,height:a}=ig(r),o=tg(r,i,a),s=await lg(o,i,a);return{svg:og(o),png:s,width:i,height:a}})}var cg=2;async function lg(e,t,n){let r=document.createElement(`canvas`);r.width=Math.max(1,Math.round(t*cg)),r.height=Math.max(1,Math.round(n*cg));let i=r.getContext(`2d`);if(i===null)throw new rg(`no 2d canvas context for the fallback image`);let a=URL.createObjectURL(new Blob([e],{type:`image/svg+xml;charset=utf-8`}));try{let e=await ug(a);return i.fillStyle=`#ffffff`,i.fillRect(0,0,r.width,r.height),i.drawImage(e,0,0,r.width,r.height),await dg(r)}finally{URL.revokeObjectURL(a)}}function ug(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=()=>n(new rg(`the browser would not draw the diagram`)),r.src=e})}async function dg(e){let t=await new Promise(t=>e.toBlob(t,`image/png`));if(t===null)throw new rg(`the canvas produced no image`);return new Uint8Array(await t.arrayBuffer())}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return sg}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Zh}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Ff}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return lg}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Xh}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return og}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return ig}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return vr}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return ng}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return tg}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return rg}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return wh}});
|