@esri/solutions-components 1.2.0-next.30 → 1.2.0-next.31
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/cdn/26CIPTQN.js +4 -0
- package/dist/cdn/{UQDX4HH7.js → 26CIVFI7.js} +2 -2
- package/dist/cdn/{JBJKRXXO.js → 26ZMWP6Z.js} +2 -2
- package/dist/cdn/{XPA5STW7.js → 27Q7IH64.js} +2 -2
- package/dist/cdn/{TE7MJY7J.js → 2BG4TYOD.js} +2 -2
- package/dist/cdn/{RYTGUQNW.js → 2GPTZNVI.js} +2 -2
- package/dist/cdn/{WMWRHS2O.js → 2H7IYD2F.js} +2 -2
- package/dist/cdn/{6YD2HBWD.js → 2IOG6JI2.js} +2 -2
- package/dist/cdn/{B4GTYQZH.js → 2ITFRR75.js} +2 -2
- package/dist/cdn/{C6XXEAWS.js → 2KCNUGHU.js} +2 -2
- package/dist/cdn/{5AWDPORB.js → 2KXZDC54.js} +2 -2
- package/dist/cdn/{DPZVQEH4.js → 2KYKQUHK.js} +2 -2
- package/dist/cdn/{DOUPRF5M.js → 2NNRS6QJ.js} +2 -2
- package/dist/cdn/2SHK7ROD.js +4 -0
- package/dist/cdn/{OKEQ6VW4.js → 2SQJ42QL.js} +2 -2
- package/dist/cdn/{5NTV25EH.js → 2VBJ24WG.js} +2 -2
- package/dist/cdn/{ON3VIYPQ.js → 2ZCAWD3F.js} +2 -2
- package/dist/cdn/{EDB5QBJ4.js → 32OKNC7F.js} +1 -1
- package/dist/cdn/{F2EIQ3EO.js → 3CE2JQRD.js} +2 -2
- package/dist/cdn/{HMBSQFUJ.js → 3CQH3UC2.js} +2 -2
- package/dist/cdn/{7VMUOYRC.js → 3EF32E4B.js} +2 -2
- package/dist/cdn/{GGMFABEF.js → 3FHCXLTP.js} +2 -2
- package/dist/cdn/{TUMBFPWA.js → 3FRGP6NR.js} +2 -2
- package/dist/cdn/{UXPVRSYI.js → 3FUHLW24.js} +2 -2
- package/dist/cdn/{EZU7FJ4I.js → 3GKOLG3P.js} +2 -2
- package/dist/cdn/{Q5KLXIL2.js → 3HXDXA5V.js} +2 -2
- package/dist/cdn/3JZF6PQM.js +4 -0
- package/dist/cdn/{34PDVGEI.js → 3T7IYLMO.js} +2 -2
- package/dist/cdn/{U3RN3VMR.js → 3Y4L5QPG.js} +2 -2
- package/dist/cdn/{JQHH2OCZ.js → 3YPVT2SF.js} +2 -2
- package/dist/cdn/43KJ7ZGS.js +18 -0
- package/dist/cdn/{SWMICF3O.js → 44PDCPXG.js} +2 -2
- package/dist/cdn/{LONY44WL.js → 4B4DVSY5.js} +2 -2
- package/dist/cdn/{D465QWTQ.js → 4BBPYTMJ.js} +2 -2
- package/dist/cdn/{FKNP522A.js → 4EWKLZQB.js} +1 -1
- package/dist/cdn/{3FWMXAKG.js → 4FCZ4AZ7.js} +2 -2
- package/dist/cdn/{2IKATLLY.js → 4FLNSTTX.js} +2 -2
- package/dist/cdn/{K54HDSYB.js → 4GSMGWKQ.js} +2 -2
- package/dist/cdn/{6TAASZPW.js → 4Q6AVQE7.js} +2 -2
- package/dist/cdn/{PLRNVZN6.js → 4TH2AQWE.js} +2 -2
- package/dist/cdn/{F2QEERVM.js → 4WHF6Z3F.js} +2 -2
- package/dist/cdn/{PCJIW7J4.js → 4WSQCQFN.js} +2 -2
- package/dist/cdn/{BPOQYDR5.js → 4X5LCVEW.js} +2 -2
- package/dist/cdn/{QYQGUEKK.js → 5NCLW4RU.js} +2 -2
- package/dist/cdn/{2YRUPZI2.js → 5RVBDF5G.js} +2 -2
- package/dist/cdn/{EIY2RNYU.js → 5VA6CQMM.js} +2 -2
- package/dist/cdn/{4SKQUXSZ.js → 5XXUCV3V.js} +2 -2
- package/dist/cdn/{FP6CVRPP.js → 5YJPALMY.js} +2 -2
- package/dist/cdn/{MRS7JBCM.js → 64F2C7FH.js} +2 -2
- package/dist/cdn/{B7RCE3HL.js → 6AP7BDVC.js} +3 -3
- package/dist/cdn/{JACZFLX5.js → 6BSQ4FI6.js} +2 -2
- package/dist/cdn/{QTHKDVZA.js → 6CDMAYRH.js} +2 -2
- package/dist/cdn/{LGY6RHRJ.js → 6CRO3RMM.js} +2 -2
- package/dist/cdn/{JC7USH53.js → 6FQEMJLG.js} +1 -1
- package/dist/cdn/{74G765B3.js → 6GINIJMQ.js} +2 -2
- package/dist/cdn/{7HFPD7CI.js → 6KMBNOZ3.js} +2 -2
- package/dist/cdn/{MRRQXIAY.js → 6KVTLN7I.js} +1 -1
- package/dist/cdn/{T66GPNTR.js → 6L5JZ6CY.js} +2 -2
- package/dist/cdn/{KPWGBLMQ.js → 6LD6WQRF.js} +2 -2
- package/dist/cdn/{4R3HMKHB.js → 6WIKCCYS.js} +2 -2
- package/dist/cdn/{AXOVLMEZ.js → 6WXAPOXD.js} +2 -2
- package/dist/cdn/{WP6QUJD5.js → 6YSJ5I5V.js} +2 -2
- package/dist/cdn/{XDQ5U3RX.js → 7BKAYHD3.js} +2 -2
- package/dist/cdn/{VWZIPDPO.js → 7DFRNIIN.js} +2 -2
- package/dist/cdn/{H3WB7ANQ.js → 7GMTKVDP.js} +2 -2
- package/dist/cdn/{PVKLE7AC.js → 7KD2EYNO.js} +2 -2
- package/dist/cdn/{DUH2FCJG.js → 7KQEUB3J.js} +2 -2
- package/dist/cdn/{JHUQCA3Z.js → 7LHHPXFC.js} +2 -2
- package/dist/cdn/{ZLWE4SGQ.js → 7P6J3DF5.js} +1 -1
- package/dist/cdn/{5PWFCMK4.js → 7SETBRJQ.js} +2 -2
- package/dist/cdn/{AZCLMDQA.js → 7WVIQXD6.js} +2 -2
- package/dist/cdn/{AUZIEPJY.js → 7Y73EJQK.js} +2 -2
- package/dist/cdn/{WNNXONB6.js → A3DZ652X.js} +2 -2
- package/dist/cdn/{3Z6YZFUQ.js → A56WOLMU.js} +2 -2
- package/dist/cdn/{BDJVTVGV.js → AA3OODB2.js} +2 -2
- package/dist/cdn/{6NKXBHT3.js → AA5S43EA.js} +2 -2
- package/dist/cdn/{MCPVXPMM.js → ABT5YG3I.js} +1 -1
- package/dist/cdn/{KIOXB2OZ.js → ADFNFEXR.js} +2 -2
- package/dist/cdn/{4ETQSIFF.js → AIWE35NS.js} +2 -2
- package/dist/cdn/{B7ALYLRG.js → APRQR7XL.js} +2 -2
- package/dist/cdn/{CAC5OPSW.js → AQMXUMFV.js} +2 -2
- package/dist/cdn/{AT2K2TZK.js → AT4QQS4E.js} +2 -2
- package/dist/cdn/{TISZ6QTW.js → ATVG5O7I.js} +2 -2
- package/dist/cdn/{J7QDKBVB.js → AWZINHAE.js} +2 -2
- package/dist/cdn/{SZVZ7L22.js → AZY3OG5Z.js} +2 -2
- package/dist/cdn/{YLAFYD5G.js → B3QZGAKL.js} +2 -2
- package/dist/cdn/{6DCWHIG6.js → B6ACMA5B.js} +2 -2
- package/dist/cdn/{HQX2UTQA.js → BCC43MR4.js} +2 -2
- package/dist/cdn/{RBY55AW4.js → BEXA43V2.js} +2 -2
- package/dist/cdn/{ZPV3TQLX.js → BG7THPYT.js} +2 -2
- package/dist/cdn/{EVNTAGJW.js → BNT5DJGY.js} +2 -2
- package/dist/cdn/{EORDZOGU.js → BOJKJLWQ.js} +2 -2
- package/dist/cdn/{KJQJXQFO.js → BYPEUWGZ.js} +2 -2
- package/dist/cdn/{JTVBLWSK.js → BZCZ7VL4.js} +2 -2
- package/dist/cdn/{LYQT3N5Z.js → C5HMYUFH.js} +1 -1
- package/dist/cdn/{HXVM7BGX.js → CCWREFPV.js} +2 -2
- package/dist/cdn/{GWPPIURG.js → CG54KNHW.js} +2 -2
- package/dist/cdn/{QOAKCYXR.js → CHGMM5CE.js} +2 -2
- package/dist/cdn/{WR2PXMWC.js → CN2QKE6N.js} +2 -2
- package/dist/cdn/CPXQZ3SL.js +18 -0
- package/dist/cdn/{SLTVLCFQ.js → CQRE2M4F.js} +2 -2
- package/dist/cdn/{2GFXYPLE.js → CWFWYRT4.js} +2 -2
- package/dist/cdn/{U7CHN77W.js → CWPWSVA7.js} +2 -2
- package/dist/cdn/{HDWF5BGC.js → CZ5X5637.js} +1 -1
- package/dist/cdn/CZB5Z7GA.js +4 -0
- package/dist/cdn/{UN3HEMCS.js → D447J5GT.js} +2 -2
- package/dist/cdn/{JFL4U4UA.js → D4QLXXIE.js} +2 -2
- package/dist/cdn/{UWIIDEOZ.js → DDU4V5V6.js} +2 -2
- package/dist/cdn/{LPOSNNLD.js → DKSGQFJD.js} +2 -2
- package/dist/cdn/{KV6OFAYE.js → DPRMLSWB.js} +2 -2
- package/dist/cdn/{24DMHUEK.js → DPX5WAK6.js} +2 -2
- package/dist/cdn/{GFEO3V7B.js → DSESXQAF.js} +2 -2
- package/dist/cdn/{CNZTLIB3.js → E6TINCRP.js} +2 -2
- package/dist/cdn/{UE4JYH6Q.js → E7AJJ7UX.js} +2 -2
- package/dist/cdn/{72XEQTIF.js → E7BTZQRN.js} +2 -2
- package/dist/cdn/{WL6ES3HJ.js → EB6Y35GJ.js} +2 -2
- package/dist/cdn/{3ICH54JL.js → EJ7ULT5F.js} +2 -2
- package/dist/cdn/EJQOZRVC.js +4 -0
- package/dist/cdn/{ZQLLWXUS.js → EKGKWXEB.js} +1 -1
- package/dist/cdn/EKP4LAMB.js +160 -0
- package/dist/cdn/{7S7DGB25.js → ELMP3CV5.js} +2 -2
- package/dist/cdn/{2ZIO725Y.js → ESDGUCHM.js} +2 -2
- package/dist/cdn/{OCTGDVTD.js → ESLRUAYH.js} +1 -1
- package/dist/cdn/{TC3U37J7.js → ET2O476H.js} +2 -2
- package/dist/cdn/{Y7MPYZYV.js → EWL35ZZV.js} +2 -2
- package/dist/cdn/{DLDZLA7R.js → EZWJABZU.js} +2 -2
- package/dist/cdn/{J2A24DGF.js → F37R3OXJ.js} +1 -1
- package/dist/cdn/{L4ENNIQZ.js → F5A5P5TO.js} +2 -2
- package/dist/cdn/{36VKRU3A.js → F7FPLRM7.js} +2 -2
- package/dist/cdn/{OVWAIW4T.js → FEHN4KPL.js} +4 -4
- package/dist/cdn/FMCVXTPQ.js +4 -0
- package/dist/cdn/{ITJX53EA.js → FWANARJ7.js} +2 -2
- package/dist/cdn/{OOHID67S.js → FY32LSLJ.js} +2 -2
- package/dist/cdn/{4U3FPTF5.js → FYNEWFSC.js} +2 -2
- package/dist/cdn/{2HXRWLJY.js → G25LXNP5.js} +2 -2
- package/dist/cdn/{YUE54TGU.js → G3RMVSCM.js} +2 -2
- package/dist/cdn/{2RHNGWV3.js → GA6IWULR.js} +2 -2
- package/dist/cdn/{DFEHZSKJ.js → GBNDVZDC.js} +2 -2
- package/dist/cdn/{7NHT4ID4.js → GD2DMOOA.js} +2 -2
- package/dist/cdn/{ISBYRWUS.js → GFCB6UVI.js} +2 -2
- package/dist/cdn/{TQZZQ74I.js → GFIYGODA.js} +1 -1
- package/dist/cdn/{B7V66ZZG.js → GHCAZWON.js} +1 -1
- package/dist/cdn/{TDB43YAO.js → GHELMKMF.js} +2 -2
- package/dist/cdn/{25MYRWPK.js → GMIEOLX5.js} +2 -2
- package/dist/cdn/{ZKOJOIGE.js → GMMJSQCO.js} +2 -2
- package/dist/cdn/{QTQ5VFMI.js → GPA7SOWJ.js} +2 -2
- package/dist/cdn/{6M575VM5.js → GRFZ2FCA.js} +1 -1
- package/dist/cdn/{ZLJ5FGJ6.js → GWQCD476.js} +2 -2
- package/dist/cdn/{MMRBO6I4.js → GXVFUFAX.js} +2 -2
- package/dist/cdn/{OSOFOQEK.js → GZPX7N7S.js} +2 -2
- package/dist/cdn/{NMEYVDKO.js → H3DUPFBO.js} +2 -2
- package/dist/cdn/{RMJBQVZQ.js → H3KAICJN.js} +2 -2
- package/dist/cdn/{QSX5S7NE.js → H3QLA57G.js} +2 -2
- package/dist/cdn/{R6C247GY.js → H6DRMF2A.js} +2 -2
- package/dist/cdn/{TXZZ7IGA.js → HAKLSL2C.js} +1 -1
- package/dist/cdn/{MBBBUQA7.js → HBZOEYFG.js} +2 -2
- package/dist/cdn/{7F6JTIWK.js → HGTZFPBI.js} +2 -2
- package/dist/cdn/{VZLRW2AX.js → HJZYONIH.js} +2 -2
- package/dist/cdn/{QCGMRCNR.js → HKGZIXAW.js} +2 -2
- package/dist/cdn/{GAQ3EPIU.js → HMVNFKGE.js} +2 -2
- package/dist/cdn/{QH7G7WSC.js → HTJXA6GN.js} +2 -2
- package/dist/cdn/{M77VUV2Q.js → HWS6ASNJ.js} +2 -2
- package/dist/cdn/HZZL7AU3.js +4 -0
- package/dist/cdn/{63WA56NY.js → I3BWD2LX.js} +2 -2
- package/dist/cdn/I5ZQTYAN.js +4 -0
- package/dist/cdn/{PNAS5XAC.js → IBGVJQ3D.js} +1 -1
- package/dist/cdn/{NGL5DBBP.js → IDR3G6QJ.js} +2 -2
- package/dist/cdn/{X4O2UX77.js → IEP7RNEW.js} +2 -2
- package/dist/cdn/{R5UVF7YP.js → IJ2XYITD.js} +2 -2
- package/dist/cdn/{FEWO73EQ.js → ISBOWSOF.js} +2 -2
- package/dist/cdn/{6QXC35GC.js → IWFECRP6.js} +2 -2
- package/dist/cdn/{277565E7.js → IZIT3Q6M.js} +2 -2
- package/dist/cdn/{NLPH7XLY.js → J4HGP2TR.js} +2 -2
- package/dist/cdn/{PKH6X23Q.js → J4KULWAC.js} +2 -2
- package/dist/cdn/{OOC5Y54N.js → JM4DQYUF.js} +2 -2
- package/dist/cdn/{BMYOJ35W.js → JPU2OPHN.js} +2 -2
- package/dist/cdn/{L5LXFBXD.js → JPZU2BUG.js} +2 -2
- package/dist/cdn/{DUBCPEXD.js → JSKC5AKJ.js} +2 -2
- package/dist/cdn/{XEQGJKML.js → JXU4HAWE.js} +2 -2
- package/dist/cdn/{Y27TXUN2.js → K6QUJXWV.js} +4 -4
- package/dist/cdn/{OJFZ6T4L.js → KBQJQVZP.js} +2 -2
- package/dist/cdn/{QG473DGW.js → KFTMUTWW.js} +2 -2
- package/dist/cdn/{XQURVTFE.js → KHJ277OT.js} +1 -1
- package/dist/cdn/{Y5BS3BHR.js → KQL6O3FK.js} +2 -2
- package/dist/cdn/{OHWJG6P3.js → KV6E2SFN.js} +2 -2
- package/dist/cdn/{KRGPHVWG.js → KYQKVXNP.js} +2 -2
- package/dist/cdn/{5LKRTP4M.js → L563AYUP.js} +2 -2
- package/dist/cdn/{HGN2PHJG.js → L7MBYDMB.js} +2 -2
- package/dist/cdn/{TPMDZI3N.js → LDYUDDLO.js} +2 -2
- package/dist/cdn/{TZC7FR57.js → LEIIQ3A6.js} +2 -2
- package/dist/cdn/{H4UX7IPM.js → LKKXUC52.js} +2 -2
- package/dist/cdn/{GPLPJI55.js → LKN6XSL5.js} +2 -2
- package/dist/cdn/{NS2BBVPW.js → LORQGESC.js} +2 -2
- package/dist/cdn/{ASR3PHZX.js → LPBE2FHF.js} +2 -2
- package/dist/cdn/LR5BWGNC.js +4 -0
- package/dist/cdn/{XLTAB44X.js → LV3XG53H.js} +2 -2
- package/dist/cdn/{KUQK2ONH.js → LWHILP4F.js} +2 -2
- package/dist/cdn/{FDUPZ25R.js → M3ZETHYO.js} +2 -2
- package/dist/cdn/{NGHRTOE5.js → M7X7Z3UY.js} +1 -1
- package/dist/cdn/{STNJMHAQ.js → MAZUKK57.js} +2 -2
- package/dist/cdn/{RYDA2GVY.js → MB4RZXW5.js} +2 -2
- package/dist/cdn/{CUAZD4LK.js → MBPSOAK3.js} +2 -2
- package/dist/cdn/{Z6455FX4.js → MD7MMSUZ.js} +1 -1
- package/dist/cdn/{2776LBZR.js → ML4FQKR3.js} +2 -2
- package/dist/cdn/{AWBOSR4C.js → MPUF2TPM.js} +1 -1
- package/dist/cdn/{ILTORA35.js → MRSWEWWB.js} +2 -2
- package/dist/cdn/{RKXN5H6E.js → MTURX67L.js} +2 -2
- package/dist/cdn/{PGGLPX3Y.js → N57KFLJ6.js} +2 -2
- package/dist/cdn/{4T73N7V2.js → NEMKCYHR.js} +2 -2
- package/dist/cdn/{BBIGCWRV.js → NFRC2QRL.js} +2 -2
- package/dist/cdn/{YFRAG76M.js → NKNKTKHO.js} +2 -2
- package/dist/cdn/{OGFYIHYL.js → NM44M4IW.js} +2 -2
- package/dist/cdn/{E6CHHVGK.js → NMKJ5JOM.js} +2 -2
- package/dist/cdn/{RH7MI7ML.js → NNA3NDDO.js} +2 -2
- package/dist/cdn/{W5WC3DQR.js → NOCFSXVG.js} +2 -2
- package/dist/cdn/{H2R75MHA.js → NPAHQC2C.js} +2 -2
- package/dist/cdn/{LAOPK2BR.js → NUOQWKHY.js} +2 -2
- package/dist/cdn/{EVNUKA47.js → NZDTEHWH.js} +2 -2
- package/dist/cdn/{2PW6ABS2.js → NZQGONJV.js} +2 -2
- package/dist/cdn/NZXEDJEA.js +18 -0
- package/dist/cdn/{HYVUOIDV.js → O7S3FCYR.js} +1 -1
- package/dist/cdn/{SZSFIVOE.js → OEIUCKZ7.js} +2 -2
- package/dist/cdn/{ZL226NXE.js → OF2SUOO3.js} +2 -2
- package/dist/cdn/{OGFRY2XT.js → OGODOUBS.js} +2 -2
- package/dist/cdn/{XQK2EEXA.js → OMYBTBPL.js} +2 -2
- package/dist/cdn/{EGM522HI.js → OO6FJRTO.js} +1 -1
- package/dist/cdn/{LKEA7WT3.js → OPMQCAR3.js} +2 -2
- package/dist/cdn/{MYKMNK6X.js → OVWM6TYS.js} +2 -2
- package/dist/cdn/{AK4FP6HL.js → OXM25VGF.js} +1 -1
- package/dist/cdn/{HVONRLYE.js → P44724IG.js} +2 -2
- package/dist/cdn/{O5O4WPGT.js → P7UXKWMX.js} +2 -2
- package/dist/cdn/{2U7L5PBM.js → POMBIM2T.js} +2 -2
- package/dist/cdn/{GPLD4OLN.js → POS6K2UE.js} +1 -1
- package/dist/cdn/{FG6WOVWI.js → PST6SAY2.js} +2 -2
- package/dist/cdn/{YWB3PVWJ.js → Q52VS7JD.js} +2 -2
- package/dist/cdn/{LJ37OTR5.js → Q67LCQR5.js} +2 -2
- package/dist/cdn/Q6QBQRTG.js +4 -0
- package/dist/cdn/{5QGNITLO.js → Q74EQS3O.js} +2 -2
- package/dist/cdn/{P32GLMOO.js → QCBF6D2I.js} +2 -2
- package/dist/cdn/{KJ7FA4KA.js → QDOHJRID.js} +2 -2
- package/dist/cdn/{U6IZ7NDO.js → QFL5XGCR.js} +2 -2
- package/dist/cdn/{3WDCAEUK.js → QJMIHCYA.js} +2 -2
- package/dist/cdn/{NALQ7ZA4.js → QNZCOWWV.js} +2 -2
- package/dist/cdn/{CEUB4OXF.js → QRBXPHG6.js} +2 -2
- package/dist/cdn/{BV53Z64R.js → QRYOQHNP.js} +2 -2
- package/dist/cdn/QSYA2APQ.js +4 -0
- package/dist/cdn/{GJYH7TRE.js → QVJ7QQVE.js} +2 -2
- package/dist/cdn/{C4AGRX46.js → QWCZAOXA.js} +2 -2
- package/dist/cdn/{65ZZ77SE.js → R2Y4BFBA.js} +1 -1
- package/dist/cdn/{NEVLWT5F.js → R5U2WANE.js} +2 -2
- package/dist/cdn/{F5Z37SAY.js → RCR3LGTO.js} +2 -2
- package/dist/cdn/{J62SMQQ7.js → RDTGNHBE.js} +2 -2
- package/dist/cdn/{HC4IU67I.js → REITZYXX.js} +2 -2
- package/dist/cdn/{HXI2RJM3.js → RKDFCEV6.js} +2 -2
- package/dist/cdn/{6RA3RUIS.js → RO4XDPUY.js} +2 -2
- package/dist/cdn/{27GKKFQI.js → RQ5KHDEQ.js} +2 -2
- package/dist/cdn/{N3YA5MDL.js → RSA4AWTB.js} +2 -2
- package/dist/cdn/{QRR2HRFO.js → RX5LXQBF.js} +2 -2
- package/dist/cdn/{UVYMD3SU.js → RZWTSUJZ.js} +2 -2
- package/dist/cdn/{V33LR6IS.js → SBR5OKMT.js} +2 -2
- package/dist/cdn/{J45MBO4E.js → SEJZOKLD.js} +2 -2
- package/dist/cdn/{WIIOBTYW.js → SH26YDC5.js} +2 -2
- package/dist/cdn/{WNSRF7JD.js → SHN4JOAS.js} +2 -2
- package/dist/cdn/{QVX3HKWH.js → SJOOBDVL.js} +2 -2
- package/dist/cdn/{GLIEFW2W.js → SLMFVTWE.js} +1 -1
- package/dist/cdn/{FA3IKFAL.js → SMNRWNUV.js} +1 -1
- package/dist/cdn/{ITD43QIH.js → SUGCGTUE.js} +2 -2
- package/dist/cdn/{3JCJJ2GF.js → SXGZX66A.js} +2 -2
- package/dist/cdn/T6U4HMPV.js +4 -0
- package/dist/cdn/{72SAT2FH.js → TCD2EBVI.js} +1 -1
- package/dist/cdn/{LMLBAQTW.js → TCPOSEXP.js} +2 -2
- package/dist/cdn/{VF3BOXK6.js → TFFGKLXZ.js} +1 -1
- package/dist/cdn/{UJ7M33YD.js → TG66S6FW.js} +1 -1
- package/dist/cdn/{Y7YN2IIU.js → TJ3ELT7Y.js} +2 -2
- package/dist/cdn/{YZLM4OIF.js → TM3QT4MY.js} +2 -2
- package/dist/cdn/TNAZAPLS.js +18 -0
- package/dist/cdn/{UNU2VFCG.js → TVBP7E34.js} +2 -2
- package/dist/cdn/{IJGEUPSK.js → TWIBC25F.js} +2 -2
- package/dist/cdn/{P7TBO62O.js → TXF4E6LF.js} +1 -1
- package/dist/cdn/{S362MWIR.js → TYQ5FGMD.js} +2 -2
- package/dist/cdn/{S2AT5YY2.js → UC6KMQRH.js} +2 -2
- package/dist/cdn/UCN2N7DB.js +4 -0
- package/dist/cdn/{ZGWPTRGZ.js → UE2IX2RL.js} +2 -2
- package/dist/cdn/UEOJE65W.js +89 -0
- package/dist/cdn/{CP4HACAH.js → UFE4G4RJ.js} +1 -1
- package/dist/cdn/{D2D2CPBJ.js → UHZSVZPK.js} +2 -2
- package/dist/cdn/{AE6H6ELK.js → UJO2FYV6.js} +2 -2
- package/dist/cdn/{TF7HCU4R.js → UNAA6QIJ.js} +2 -2
- package/dist/cdn/{O4LF5ZK4.js → UO7CVYHI.js} +2 -2
- package/dist/cdn/{KXFJ5CVI.js → UUPE5QOV.js} +2 -2
- package/dist/cdn/{NQNIGRVW.js → UV2WNCQF.js} +2 -2
- package/dist/cdn/{XP2EQZNN.js → UV62PU26.js} +2 -2
- package/dist/cdn/{JNSLXW7O.js → UW3ZGSQU.js} +2 -2
- package/dist/cdn/{WA6JCIVJ.js → V2WCN5DX.js} +2 -2
- package/dist/cdn/{FLQEDTUI.js → VNIE2PXO.js} +2 -2
- package/dist/cdn/{5HZVV4CF.js → VP4CHRDT.js} +1 -1
- package/dist/cdn/{SQ4ONYA6.js → VQFP6AZI.js} +2 -2
- package/dist/cdn/{CYDNA2QI.js → VQIF3HW2.js} +2 -2
- package/dist/cdn/{NDBQUUTO.js → VWCVOS6M.js} +1 -1
- package/dist/cdn/{SJGKDRLS.js → VXKH2VOP.js} +1 -1
- package/dist/cdn/{EB2JKK3D.js → VY4RTYGY.js} +2 -2
- package/dist/cdn/{PGWOXALJ.js → VZNCCCR4.js} +2 -2
- package/dist/cdn/{47L5OVTL.js → W3QOBRE2.js} +2 -2
- package/dist/cdn/{JFT5UZJT.js → W3UAB5V7.js} +2 -2
- package/dist/cdn/{7QLGF5J6.js → WBLATNLZ.js} +2 -2
- package/dist/cdn/{QDHG7XI7.js → WDH5XQN5.js} +2 -2
- package/dist/cdn/{QNUGOWWM.js → WDK5H56L.js} +2 -2
- package/dist/cdn/{XTBZMRJM.js → WF6EYQVV.js} +2 -2
- package/dist/cdn/{VFV5JCQN.js → WI5VAMGJ.js} +2 -2
- package/dist/cdn/{CQKXZVLC.js → WKYLL2JX.js} +2 -2
- package/dist/cdn/{4EXGNBXW.js → WPY4LC3K.js} +2 -2
- package/dist/cdn/{65GKVZWM.js → WQBQCO4B.js} +2 -2
- package/dist/cdn/{MBGLCBIC.js → WQSKVYFF.js} +2 -2
- package/dist/cdn/{FRS5F6O5.js → WTS5H53O.js} +2 -2
- package/dist/cdn/{3FYPCIOV.js → WTZNO7PN.js} +2 -2
- package/dist/cdn/{RJAI2F2A.js → X4ZKBTN4.js} +2 -2
- package/dist/cdn/{HN2G2EYZ.js → XCSYY3XX.js} +2 -2
- package/dist/cdn/{ECKEIM2Y.js → XDQDDZ44.js} +2 -2
- package/dist/cdn/{WFJNZNPO.js → XH7Q5FKW.js} +2 -2
- package/dist/cdn/{SH2FEGSB.js → XJMRQKZW.js} +2 -2
- package/dist/cdn/{GOLJIOZF.js → XS3JXY2Q.js} +2 -2
- package/dist/cdn/{QN7Y6QOZ.js → XZ627753.js} +2 -2
- package/dist/cdn/{NWANGG5T.js → Y6WUVKKJ.js} +2 -2
- package/dist/cdn/{LMF2IQVY.js → YA5GFONS.js} +2 -2
- package/dist/cdn/{BHDNLSI7.js → YARWRAKS.js} +1 -1
- package/dist/cdn/YCB5OBM7.js +18 -0
- package/dist/cdn/YFF7HPPF.js +18 -0
- package/dist/cdn/{OU7QCTNJ.js → YLYTCJC5.js} +2 -2
- package/dist/cdn/{5MKH7FO7.js → YR2Q4MEZ.js} +2 -2
- package/dist/cdn/{BUF25CTJ.js → YTP3FLYV.js} +1 -1
- package/dist/cdn/{LIQY6VUI.js → Z4KFLWH7.js} +2 -2
- package/dist/cdn/{JN3I6HM2.js → Z62OH3MN.js} +2 -2
- package/dist/cdn/{ECGNRFQC.js → Z7WH3PY4.js} +2 -2
- package/dist/cdn/{BX56GQJM.js → ZCRLXSR3.js} +2 -2
- package/dist/cdn/{2GMVKD6U.js → ZGABFMI5.js} +2 -2
- package/dist/cdn/{MXKXWU54.js → ZGCTHCV6.js} +1 -1
- package/dist/cdn/{EHZVBSNG.js → ZKG2VPKR.js} +2 -2
- package/dist/cdn/{3CSYZLTP.js → ZMPDT3BZ.js} +2 -2
- package/dist/cdn/{3VWHKZED.js → ZN4UP4WI.js} +2 -2
- package/dist/cdn/{KAFYTKP3.js → ZOD4ZXTC.js} +2 -2
- package/dist/cdn/{DTHSN36M.js → ZS5WKHPW.js} +2 -2
- package/dist/cdn/{PJFQYGK6.js → ZUJ3VJF5.js} +2 -2
- package/dist/cdn/{LWNDAKHU.js → ZWPKTGXD.js} +2 -2
- package/dist/cdn/assets/solutions-deployed-shell/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solutions-deployed-shell/t9n/messages.json +1 -1
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/Auth.js +37 -37
- package/dist/chunks/CardsFetcher.js +1 -1
- package/dist/chunks/appConfig.js +1 -1
- package/dist/chunks/cardFetchingUtils.js +1 -1
- package/dist/chunks/cardsHelpers.js +1 -1
- package/dist/chunks/common.js +1 -1
- package/dist/chunks/deployAppContexts.js +1 -1
- package/dist/chunks/downloadUtils.js +1 -1
- package/dist/chunks/getItemIcon.js +1 -1
- package/dist/chunks/helpers.js +1 -1
- package/dist/chunks/interfaces.js +1 -1
- package/dist/chunks/loadModules.js +1 -1
- package/dist/chunks/mapViewUtils.js +1 -1
- package/dist/chunks/pciUtils.js +1 -1
- package/dist/chunks/popupUtils.js +1 -1
- package/dist/chunks/prepareDataForSolutionDisplay.js +1 -1
- package/dist/chunks/privilegeUtils.js +1 -1
- package/dist/chunks/publicNotificationContext.js +1 -1
- package/dist/chunks/queryUtils.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/solution-store.js +1 -1
- package/dist/chunks/templates.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-solutions-assistant/customElement.d.ts +2 -2
- package/dist/components/arcgis-solutions-assistant/customElement.js +771 -592
- package/dist/components/arcgis-solutions-assistant/index.d.ts +2 -2
- package/dist/components/arcgis-solutions-assistant/index.js +2 -2
- package/dist/components/arcgis-solutions-assistant/utils/typewriter-text.d.ts +48 -0
- package/dist/components/basemap-gallery/customElement.js +1 -1
- package/dist/components/buffer-tools/customElement.js +1 -1
- package/dist/components/card-manager/customElement.js +1 -1
- package/dist/components/consent-manager/customElement.js +1 -1
- package/dist/components/create-feature/customElement.js +1 -1
- package/dist/components/create-related-feature/customElement.js +1 -1
- package/dist/components/crowdsource-manager/customElement.js +1 -1
- package/dist/components/crowdsource-reporter/customElement.js +1 -1
- package/dist/components/deduct-calculator/customElement.js +1 -1
- package/dist/components/delete-button/customElement.js +1 -1
- package/dist/components/delete-dialog/customElement.js +1 -1
- package/dist/components/edit-card/customElement.js +1 -1
- package/dist/components/feature-details/customElement.js +1 -1
- package/dist/components/feature-list/customElement.js +1 -1
- package/dist/components/field-selection/customElement.js +1 -1
- package/dist/components/floor-filter/customElement.js +1 -1
- package/dist/components/info-card/customElement.js +1 -1
- package/dist/components/json-editor/customElement.js +1 -1
- package/dist/components/layer-list/customElement.js +1 -1
- package/dist/components/layer-table/customElement.js +1 -1
- package/dist/components/map-card/customElement.js +1 -1
- package/dist/components/map-draw-tools/customElement.js +1 -1
- package/dist/components/map-fullscreen/customElement.js +1 -1
- package/dist/components/map-layer-picker/customElement.js +1 -1
- package/dist/components/map-legend/customElement.js +1 -1
- package/dist/components/map-picker/customElement.js +1 -1
- package/dist/components/map-search/customElement.js +1 -1
- package/dist/components/map-select-tools/customElement.js +1 -1
- package/dist/components/map-tools/customElement.js +1 -1
- package/dist/components/pci-calculator/customElement.js +1 -1
- package/dist/components/pdf-download/customElement.js +1 -1
- package/dist/components/public-notification/customElement.js +1 -1
- package/dist/components/refine-selection/customElement.js +1 -1
- package/dist/components/selection-tool/customElement.js +1 -1
- package/dist/components/solution-configuration/customElement.js +1 -1
- package/dist/components/solution-configure-titles/customElement.js +1 -1
- package/dist/components/solution-contents/customElement.js +1 -1
- package/dist/components/solution-delete-dialog/customElement.js +1 -1
- package/dist/components/solution-deploy-dialog/customElement.js +1 -1
- package/dist/components/solution-deployed-card/customElement.js +1 -1
- package/dist/components/solution-deployed-card-panel/customElement.js +1 -1
- package/dist/components/solution-deploying-dialog/customElement.js +1 -1
- package/dist/components/solution-details-card/customElement.js +1 -1
- package/dist/components/solution-details-panel/customElement.js +1 -1
- package/dist/components/solution-item/customElement.js +1 -1
- package/dist/components/solution-item-accordion/customElement.js +1 -1
- package/dist/components/solution-item-details/customElement.js +1 -1
- package/dist/components/solution-item-diagram/customElement.js +1 -1
- package/dist/components/solution-item-icon/customElement.js +1 -1
- package/dist/components/solution-item-sharing/customElement.js +1 -1
- package/dist/components/solution-organization-variables/customElement.js +1 -1
- package/dist/components/solution-resource-card/customElement.js +1 -1
- package/dist/components/solution-resource-item/customElement.js +1 -1
- package/dist/components/solution-snapshot-gallery/customElement.js +1 -1
- package/dist/components/solution-social-share/customElement.js +1 -1
- package/dist/components/solution-spatial-ref/customElement.js +1 -1
- package/dist/components/solution-template-data/customElement.js +1 -1
- package/dist/components/solution-variables/customElement.js +1 -1
- package/dist/components/solutions-all-panel/customElement.js +1 -1
- package/dist/components/solutions-all-shell/customElement.js +20 -23
- package/dist/components/solutions-deploy-app/customElement.js +33 -25
- package/dist/components/solutions-deploy-app-nav/customElement.js +12 -12
- package/dist/components/solutions-deployed-filter-panel/customElement.js +1 -1
- package/dist/components/solutions-deployed-panel/customElement.js +1 -1
- package/dist/components/solutions-deployed-shell/customElement.js +27 -17
- package/dist/components/solutions-deployed-shell/index.d.ts +2 -0
- package/dist/components/solutions-deployed-shell/index.js +2 -0
- package/dist/components/solutions-filter-panel/customElement.d.ts +1 -7
- package/dist/components/solutions-filter-panel/customElement.js +25 -18
- package/dist/components/solutions-resource-panel/customElement.js +1 -1
- package/dist/components/solutions-resources/customElement.js +1 -1
- package/dist/components/solutions-resources-shell/customElement.js +1 -1
- package/dist/components/solutions-searchsort-toolbar/customElement.js +5 -5
- package/dist/components/spatial-ref/customElement.js +1 -1
- package/dist/components/store-manager/customElement.js +1 -1
- package/dist/docs/api.json +4 -33
- package/dist/docs/docs.json +6 -28
- package/dist/docs/vscode.html-custom-data.json +1 -6
- package/dist/docs/web-types.json +2 -15
- package/dist/index.js +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/preact10.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/dist/utils/Auth.d.ts +2 -0
- package/dist/utils/interfaces.d.ts +5 -0
- package/package.json +1 -1
- package/dist/cdn/2DKKN6C2.js +0 -4
- package/dist/cdn/346BLCF2.js +0 -4
- package/dist/cdn/6FNOQGIZ.js +0 -4
- package/dist/cdn/ABDQSCIZ.js +0 -18
- package/dist/cdn/B4OV3LHY.js +0 -4
- package/dist/cdn/BPXPCMXX.js +0 -18
- package/dist/cdn/BTBWYAZW.js +0 -18
- package/dist/cdn/F6BFZHUG.js +0 -4
- package/dist/cdn/GD43N373.js +0 -4
- package/dist/cdn/GNLAHRZT.js +0 -18
- package/dist/cdn/I73WIDZD.js +0 -4
- package/dist/cdn/IJCG3D4S.js +0 -4
- package/dist/cdn/JXBEZT5A.js +0 -4
- package/dist/cdn/MT4KKD5M.js +0 -4
- package/dist/cdn/MYMVJFH4.js +0 -64
- package/dist/cdn/NLLMNIAA.js +0 -4
- package/dist/cdn/NTLJHWLQ.js +0 -89
- package/dist/cdn/PPT7MVPV.js +0 -4
- package/dist/cdn/PTTGFXZZ.js +0 -18
- package/dist/cdn/YOA42CLH.js +0 -18
- package/dist/cdn/ZIRTUZJU.js +0 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { c as we } from "../../chunks/runtime.js";
|
|
2
2
|
import { ref as te } from "lit/directives/ref.js";
|
|
3
|
-
import { u as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { css as
|
|
6
|
-
import {
|
|
3
|
+
import { u as ye } from "../../chunks/useT9n.js";
|
|
4
|
+
import { LitElement as _e, createEvent as ve, safeClassMap as Te } from "@arcgis/lumina";
|
|
5
|
+
import { css as Se, html as b } from "lit";
|
|
6
|
+
import { render as $ } from "lit-html";
|
|
7
7
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
8
8
|
See https://js.arcgis.com/1.2/esri/copyright.txt for details.
|
|
9
|
-
v1.2.0-next.
|
|
10
|
-
const
|
|
9
|
+
v1.2.0-next.31 */
|
|
10
|
+
const $e = Se`:host{display:block;height:100%}.display-flex-row{display:flex;flex-direction:row}.padding-left-10{padding-left:10px}.chat-container{display:flex;flex-direction:column;gap:0px;max-width:600px;height:75%;background-color:var(--calcite-color-foreground-3);padding:1px}.chat-container_expanded{display:flex;flex-direction:column;gap:0px;max-width:100%;height:95%;background-color:var(--calcite-color-background);border-radius:10px;padding:10px}.chat-panel{--calcite-panel-header-background-color: var(--calcite-color-brand);--calcite-panel-action-background-color: var(--calcite-color-brand);--calcite-panel-heading-text-color: var(--calcite-color-background);--calcite-dialog-min-size-y: 90vh;--calcite-dialog-max-size-y: 90vh}.chat-panel-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.chat-messages{display:flex;flex-direction:column;gap:20px;padding:4px;height:100%;overflow-y:auto}.user-message{align-self:flex-end;background:var(--calcite-ui-brand);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-brand);--calcite-card-border-color: var(--calcite-color-brand);color:var(--calcite-color-background);text-align:left}.system-message{align-self:flex-start;background:var(--calcite-color-foreground-2);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-foreground-3);--calcite-card-border-color: var(--calcite-color-foreground-3);text-align:left}.loader-message{align-self:flex-start;background:var(--calcite-color-foreground-3);border-radius:8px;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-foreground-3);--calcite-card-border-color: var(--calcite-color-foreground-3)}.message-content{padding:0;font-size:14px}.message-content p:first-child{margin-top:0}.message-content img{max-width:100%;height:auto;display:block;object-fit:contain}.message-content-pad{padding-bottom:10px;font-size:14px}.message-content-summary{padding-bottom:14px}.message-content-alignment{display:flex;align-items:center;gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}.padding-top-10{padding-top:10px}.padding-right-8{padding-right:8px}.chip-content{padding:5px 5px 5px 0}.chat-input{display:flex;flex-direction:row;flex-grow:1}.table-cell{--calcite-table-cell-background: var(--calcite-color-foreground-3)}.cursor-pointer{cursor:pointer}.notice-border-color{--temp-initial-brand: var(--calcite-color-brand)}.notice-border-color calcite-notice{--calcite-color-brand: #ddd;--calcite-icon-color: var(--temp-initial-brand)}.notice-border-color calcite-notice *{--calcite-color-brand: var(--temp-initial-brand)}.solution-card{padding:5px 0;text-decoration:none;display:block;width:100%;cursor:pointer}.solution-card calcite-card{display:flex;flex-direction:column;max-height:132px;overflow:hidden;--calcite-card-corner-radius: var(--calcite-corner-radius-round) !important;--calcite-card-shadow: var(--calcite-shadow-sm);--calcite-card-background-color: var(--calcite-card-background-color) }.solution-card div[slot=thumbnail]{max-height:100%;width:100%;position:relative;&:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;transition:all .15s ease-in-out}}.solution-card div[slot=thumbnail] img{max-height:100%;width:100%;object-fit:cover}.solution-card span[slot=description]{padding-top:10px}.solution-card calcite-chip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);visibility:hidden;pointer-events:none;opacity:0;transition:all .15s ease-in-out;z-index:9999}.solution-card:hover calcite-chip{visibility:visible;opacity:1}.solution-card:hover div[slot=thumbnail]:after{background-color:#00000080}.solution-card:hover h3{text-decoration:underline}.references-container{padding-top:10px;display:block}.references-container.collapsed{display:none}.width-100{width:100%}.disclaimer-div{display:flex;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size--0);color:var(--calcite-color-text-1)}.height-32-flex-auto{height:32px;flex:0 0 auto}.display-none{display:none}`;
|
|
11
11
|
/**
|
|
12
12
|
* @license
|
|
13
13
|
* Copyright 2025 Esri
|
|
@@ -24,113 +24,113 @@ const Te = _e`:host{display:block;height:100%}.display-flex-row{display:flex;fle
|
|
|
24
24
|
* See the License for the specific language governing permissions and
|
|
25
25
|
* limitations under the License.
|
|
26
26
|
*/
|
|
27
|
-
const
|
|
28
|
-
async function
|
|
29
|
-
return await
|
|
27
|
+
const Re = "https://www.arcgis.com/sharing/rest/content/items/";
|
|
28
|
+
async function Ie(n) {
|
|
29
|
+
return await Ae(n);
|
|
30
30
|
}
|
|
31
|
-
async function
|
|
32
|
-
const e =
|
|
31
|
+
async function Ae(n) {
|
|
32
|
+
const e = Re + n + "?f=json";
|
|
33
33
|
try {
|
|
34
|
-
const
|
|
34
|
+
const t = await fetch(
|
|
35
35
|
e,
|
|
36
36
|
{ method: "GET" }
|
|
37
37
|
);
|
|
38
|
-
if (!
|
|
39
|
-
throw new Error(`HTTP error! Status: ${
|
|
40
|
-
return await
|
|
41
|
-
} catch (
|
|
42
|
-
return { error:
|
|
38
|
+
if (!t.ok)
|
|
39
|
+
throw new Error(`HTTP error! Status: ${t.status}`);
|
|
40
|
+
return await t.json();
|
|
41
|
+
} catch (t) {
|
|
42
|
+
return { error: t.message };
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function j() {
|
|
46
46
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
47
47
|
}
|
|
48
|
-
var
|
|
48
|
+
var S = j();
|
|
49
49
|
function oe(n) {
|
|
50
|
-
|
|
50
|
+
S = n;
|
|
51
51
|
}
|
|
52
|
-
var
|
|
53
|
-
function
|
|
54
|
-
let
|
|
52
|
+
var L = { exec: () => null };
|
|
53
|
+
function g(n, e = "") {
|
|
54
|
+
let t = typeof n == "string" ? n : n.source, r = { replace: (s, a) => {
|
|
55
55
|
let i = typeof a == "string" ? a : a.source;
|
|
56
|
-
return i = i.replace(
|
|
57
|
-
}, getRegex: () => new RegExp(
|
|
56
|
+
return i = i.replace(m.caret, "$1"), t = t.replace(s, i), r;
|
|
57
|
+
}, getRegex: () => new RegExp(t, e) };
|
|
58
58
|
return r;
|
|
59
59
|
}
|
|
60
|
-
var
|
|
60
|
+
var ze = (() => {
|
|
61
61
|
try {
|
|
62
62
|
return !!new RegExp("(?<=1)(?<!1)");
|
|
63
63
|
} catch {
|
|
64
64
|
return !1;
|
|
65
65
|
}
|
|
66
|
-
})(),
|
|
67
|
-
]`).replace("lheading", he).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() },
|
|
68
|
-
function
|
|
66
|
+
})(), m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (n) => new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`), htmlBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i") }, Le = /^(?:[ \t]*(?:\n|$))+/, Ce = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, qe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ee = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, H = /(?:[*+-]|\d{1,9}[.)])/, ce = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, he = g(ce).replace(/bull/g, H).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Me = g(ce).replace(/bull/g, H).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), G = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Pe = /^[^\n]+/, W = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Be = g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", W).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Qe = g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, H).getRegex(), D = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", K = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, De = g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", K).replace("tag", D).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ue = g(G).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", D).getRegex(), Ze = g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ue).getRegex(), X = { blockquote: Ze, code: Ce, def: Be, fences: qe, heading: Ee, hr: C, html: De, lheading: he, list: Qe, newline: Le, paragraph: ue, table: L, text: Pe }, se = g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", D).getRegex(), Ne = { ...X, lheading: Me, table: se, paragraph: g(G).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", se).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", D).getRegex() }, Oe = { ...X, html: g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", K).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: L, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: g(G).replace("hr", C).replace("heading", ` *#{1,6} *[^
|
|
67
|
+
]`).replace("lheading", he).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Fe = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ue = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, pe = /^( {2,}|\\)\n(?!\s*$)/, je = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Z = /[\p{P}\p{S}]/u, J = /[\s\p{P}\p{S}]/u, de = /[^\s\p{P}\p{S}]/u, He = g(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, J).getRegex(), ge = /(?!~)[\p{P}\p{S}]/u, Ge = /(?!~)[\s\p{P}\p{S}]/u, We = /(?:[^\s\p{P}\p{S}]|~)/u, Ke = g(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ze ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), fe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Xe = g(fe, "u").replace(/punct/g, Z).getRegex(), Je = g(fe, "u").replace(/punct/g, ge).getRegex(), ke = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ve = g(ke, "gu").replace(/notPunctSpace/g, de).replace(/punctSpace/g, J).replace(/punct/g, Z).getRegex(), Ye = g(ke, "gu").replace(/notPunctSpace/g, We).replace(/punctSpace/g, Ge).replace(/punct/g, ge).getRegex(), et = g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, de).replace(/punctSpace/g, J).replace(/punct/g, Z).getRegex(), tt = g(/\\(punct)/, "gu").replace(/punct/g, Z).getRegex(), st = g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), nt = g(K).replace("(?:-->|$)", "-->").getRegex(), rt = g("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", nt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), P = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, it = g(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", P).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), xe = g(/^!?\[(label)\]\[(ref)\]/).replace("label", P).replace("ref", W).getRegex(), be = g(/^!?\[(ref)\](?:\[\])?/).replace("ref", W).getRegex(), at = g("reflink|nolink(?!\\()", "g").replace("reflink", xe).replace("nolink", be).getRegex(), ne = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, V = { _backpedal: L, anyPunctuation: tt, autolink: st, blockSkip: Ke, br: pe, code: Ue, del: L, emStrongLDelim: Xe, emStrongRDelimAst: Ve, emStrongRDelimUnd: et, escape: Fe, link: it, nolink: be, punctuation: He, reflink: xe, reflinkSearch: at, tag: rt, text: je, url: L }, lt = { ...V, link: g(/^!?\[(label)\]\((.*?)\)/).replace("label", P).getRegex(), reflink: g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", P).getRegex() }, O = { ...V, emStrongRDelimAst: Ye, emStrongLDelim: Je, url: g(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ne).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: g(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ne).getRegex() }, ot = { ...O, br: g(pe).replace("{2,}", "*").getRegex(), text: g(O.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, M = { normal: X, gfm: Ne, pedantic: Oe }, I = { normal: V, gfm: O, breaks: ot, pedantic: lt }, ct = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, re = (n) => ct[n];
|
|
68
|
+
function _(n, e) {
|
|
69
69
|
if (e) {
|
|
70
|
-
if (
|
|
71
|
-
} else if (
|
|
70
|
+
if (m.escapeTest.test(n)) return n.replace(m.escapeReplace, re);
|
|
71
|
+
} else if (m.escapeTestNoEncode.test(n)) return n.replace(m.escapeReplaceNoEncode, re);
|
|
72
72
|
return n;
|
|
73
73
|
}
|
|
74
74
|
function ie(n) {
|
|
75
75
|
try {
|
|
76
|
-
n = encodeURI(n).replace(
|
|
76
|
+
n = encodeURI(n).replace(m.percentDecode, "%");
|
|
77
77
|
} catch {
|
|
78
78
|
return null;
|
|
79
79
|
}
|
|
80
80
|
return n;
|
|
81
81
|
}
|
|
82
82
|
function ae(n, e) {
|
|
83
|
-
let
|
|
83
|
+
let t = n.replace(m.findPipe, (a, i, o) => {
|
|
84
84
|
let l = !1, h = i;
|
|
85
85
|
for (; --h >= 0 && o[h] === "\\"; ) l = !l;
|
|
86
86
|
return l ? "|" : " |";
|
|
87
|
-
}), r =
|
|
87
|
+
}), r = t.split(m.splitPipe), s = 0;
|
|
88
88
|
if (r[0].trim() || r.shift(), r.length > 0 && !r.at(-1)?.trim() && r.pop(), e) if (r.length > e) r.splice(e);
|
|
89
89
|
else for (; r.length < e; ) r.push("");
|
|
90
|
-
for (;
|
|
90
|
+
for (; s < r.length; s++) r[s] = r[s].trim().replace(m.slashPipe, "|");
|
|
91
91
|
return r;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function A(n, e, t) {
|
|
94
94
|
let r = n.length;
|
|
95
95
|
if (r === 0) return "";
|
|
96
|
-
let
|
|
97
|
-
for (;
|
|
98
|
-
|
|
99
|
-
return n.slice(0, r -
|
|
96
|
+
let s = 0;
|
|
97
|
+
for (; s < r && n.charAt(r - s - 1) === e; )
|
|
98
|
+
s++;
|
|
99
|
+
return n.slice(0, r - s);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function ht(n, e) {
|
|
102
102
|
if (n.indexOf(e[1]) === -1) return -1;
|
|
103
|
-
let
|
|
103
|
+
let t = 0;
|
|
104
104
|
for (let r = 0; r < n.length; r++) if (n[r] === "\\") r++;
|
|
105
|
-
else if (n[r] === e[0])
|
|
106
|
-
else if (n[r] === e[1] && (
|
|
107
|
-
return
|
|
105
|
+
else if (n[r] === e[0]) t++;
|
|
106
|
+
else if (n[r] === e[1] && (t--, t < 0)) return r;
|
|
107
|
+
return t > 0 ? -2 : -1;
|
|
108
108
|
}
|
|
109
|
-
function le(n, e,
|
|
110
|
-
let a = e.href, i = e.title || null, o = n[1].replace(
|
|
109
|
+
function le(n, e, t, r, s) {
|
|
110
|
+
let a = e.href, i = e.title || null, o = n[1].replace(s.other.outputLinkReplace, "$1");
|
|
111
111
|
r.state.inLink = !0;
|
|
112
|
-
let l = { type: n[0].charAt(0) === "!" ? "image" : "link", raw:
|
|
112
|
+
let l = { type: n[0].charAt(0) === "!" ? "image" : "link", raw: t, href: a, title: i, text: o, tokens: r.inlineTokens(o) };
|
|
113
113
|
return r.state.inLink = !1, l;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
let r = n.match(
|
|
115
|
+
function ut(n, e, t) {
|
|
116
|
+
let r = n.match(t.other.indentCodeCompensation);
|
|
117
117
|
if (r === null) return e;
|
|
118
|
-
let
|
|
118
|
+
let s = r[1];
|
|
119
119
|
return e.split(`
|
|
120
120
|
`).map((a) => {
|
|
121
|
-
let i = a.match(
|
|
121
|
+
let i = a.match(t.other.beginningSpace);
|
|
122
122
|
if (i === null) return a;
|
|
123
123
|
let [o] = i;
|
|
124
|
-
return o.length >=
|
|
124
|
+
return o.length >= s.length ? a.slice(s.length) : a;
|
|
125
125
|
}).join(`
|
|
126
126
|
`);
|
|
127
127
|
}
|
|
128
|
-
var
|
|
128
|
+
var B = class {
|
|
129
129
|
options;
|
|
130
130
|
rules;
|
|
131
131
|
lexer;
|
|
132
132
|
constructor(n) {
|
|
133
|
-
this.options = n ||
|
|
133
|
+
this.options = n || S;
|
|
134
134
|
}
|
|
135
135
|
space(n) {
|
|
136
136
|
let e = this.rules.block.newline.exec(n);
|
|
@@ -139,131 +139,131 @@ var L = class {
|
|
|
139
139
|
code(n) {
|
|
140
140
|
let e = this.rules.block.code.exec(n);
|
|
141
141
|
if (e) {
|
|
142
|
-
let
|
|
143
|
-
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ?
|
|
142
|
+
let t = e[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
143
|
+
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? t : A(t, `
|
|
144
144
|
`) };
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
fences(n) {
|
|
148
148
|
let e = this.rules.block.fences.exec(n);
|
|
149
149
|
if (e) {
|
|
150
|
-
let
|
|
151
|
-
return { type: "code", raw:
|
|
150
|
+
let t = e[0], r = ut(t, e[3] || "", this.rules);
|
|
151
|
+
return { type: "code", raw: t, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: r };
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
heading(n) {
|
|
155
155
|
let e = this.rules.block.heading.exec(n);
|
|
156
156
|
if (e) {
|
|
157
|
-
let
|
|
158
|
-
if (this.rules.other.endingHash.test(
|
|
159
|
-
let r =
|
|
160
|
-
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (
|
|
157
|
+
let t = e[2].trim();
|
|
158
|
+
if (this.rules.other.endingHash.test(t)) {
|
|
159
|
+
let r = A(t, "#");
|
|
160
|
+
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (t = r.trim());
|
|
161
161
|
}
|
|
162
|
-
return { type: "heading", raw: e[0], depth: e[1].length, text:
|
|
162
|
+
return { type: "heading", raw: e[0], depth: e[1].length, text: t, tokens: this.lexer.inline(t) };
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
hr(n) {
|
|
166
166
|
let e = this.rules.block.hr.exec(n);
|
|
167
|
-
if (e) return { type: "hr", raw:
|
|
167
|
+
if (e) return { type: "hr", raw: A(e[0], `
|
|
168
168
|
`) };
|
|
169
169
|
}
|
|
170
170
|
blockquote(n) {
|
|
171
171
|
let e = this.rules.block.blockquote.exec(n);
|
|
172
172
|
if (e) {
|
|
173
|
-
let
|
|
173
|
+
let t = A(e[0], `
|
|
174
174
|
`).split(`
|
|
175
|
-
`), r = "",
|
|
176
|
-
for (;
|
|
175
|
+
`), r = "", s = "", a = [];
|
|
176
|
+
for (; t.length > 0; ) {
|
|
177
177
|
let i = !1, o = [], l;
|
|
178
|
-
for (l = 0; l <
|
|
179
|
-
else if (!i) o.push(
|
|
178
|
+
for (l = 0; l < t.length; l++) if (this.rules.other.blockquoteStart.test(t[l])) o.push(t[l]), i = !0;
|
|
179
|
+
else if (!i) o.push(t[l]);
|
|
180
180
|
else break;
|
|
181
|
-
|
|
181
|
+
t = t.slice(l);
|
|
182
182
|
let h = o.join(`
|
|
183
183
|
`), c = h.replace(this.rules.other.blockquoteSetextReplace, `
|
|
184
184
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
185
185
|
r = r ? `${r}
|
|
186
|
-
${h}` : h,
|
|
186
|
+
${h}` : h, s = s ? `${s}
|
|
187
187
|
${c}` : c;
|
|
188
|
-
let
|
|
189
|
-
if (this.lexer.state.top = !0, this.lexer.blockTokens(c, a, !0), this.lexer.state.top =
|
|
190
|
-
let
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
let k =
|
|
194
|
-
` +
|
|
195
|
-
`),
|
|
196
|
-
a[a.length - 1] =
|
|
188
|
+
let u = this.lexer.state.top;
|
|
189
|
+
if (this.lexer.state.top = !0, this.lexer.blockTokens(c, a, !0), this.lexer.state.top = u, t.length === 0) break;
|
|
190
|
+
let d = a.at(-1);
|
|
191
|
+
if (d?.type === "code") break;
|
|
192
|
+
if (d?.type === "blockquote") {
|
|
193
|
+
let k = d, p = k.raw + `
|
|
194
|
+
` + t.join(`
|
|
195
|
+
`), x = this.blockquote(p);
|
|
196
|
+
a[a.length - 1] = x, r = r.substring(0, r.length - k.raw.length) + x.raw, s = s.substring(0, s.length - k.text.length) + x.text;
|
|
197
197
|
break;
|
|
198
|
-
} else if (
|
|
199
|
-
let k =
|
|
200
|
-
` +
|
|
201
|
-
`),
|
|
202
|
-
a[a.length - 1] =
|
|
198
|
+
} else if (d?.type === "list") {
|
|
199
|
+
let k = d, p = k.raw + `
|
|
200
|
+
` + t.join(`
|
|
201
|
+
`), x = this.list(p);
|
|
202
|
+
a[a.length - 1] = x, r = r.substring(0, r.length - d.raw.length) + x.raw, s = s.substring(0, s.length - k.raw.length) + x.raw, t = p.substring(a.at(-1).raw.length).split(`
|
|
203
203
|
`);
|
|
204
204
|
continue;
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
return { type: "blockquote", raw: r, tokens: a, text:
|
|
207
|
+
return { type: "blockquote", raw: r, tokens: a, text: s };
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
list(n) {
|
|
211
211
|
let e = this.rules.block.list.exec(n);
|
|
212
212
|
if (e) {
|
|
213
|
-
let
|
|
214
|
-
|
|
215
|
-
let a = this.rules.other.listItemRegex(
|
|
213
|
+
let t = e[1].trim(), r = t.length > 1, s = { type: "list", raw: "", ordered: r, start: r ? +t.slice(0, -1) : "", loose: !1, items: [] };
|
|
214
|
+
t = r ? `\\d{1,9}\\${t.slice(-1)}` : `\\${t}`, this.options.pedantic && (t = r ? t : "[*+-]");
|
|
215
|
+
let a = this.rules.other.listItemRegex(t), i = !1;
|
|
216
216
|
for (; n; ) {
|
|
217
217
|
let l = !1, h = "", c = "";
|
|
218
218
|
if (!(e = a.exec(n)) || this.rules.block.hr.test(n)) break;
|
|
219
219
|
h = e[0], n = n.substring(h.length);
|
|
220
|
-
let
|
|
221
|
-
`, 1)[0].replace(this.rules.other.listReplaceTabs, (
|
|
222
|
-
`, 1)[0], k = !
|
|
223
|
-
if (this.options.pedantic ? (
|
|
224
|
-
`, n = n.substring(
|
|
225
|
-
let
|
|
220
|
+
let u = e[2].split(`
|
|
221
|
+
`, 1)[0].replace(this.rules.other.listReplaceTabs, (v) => " ".repeat(3 * v.length)), d = n.split(`
|
|
222
|
+
`, 1)[0], k = !u.trim(), p = 0;
|
|
223
|
+
if (this.options.pedantic ? (p = 2, c = u.trimStart()) : k ? p = e[1].length + 1 : (p = e[2].search(this.rules.other.nonSpaceChar), p = p > 4 ? 1 : p, c = u.slice(p), p += e[1].length), k && this.rules.other.blankLine.test(d) && (h += d + `
|
|
224
|
+
`, n = n.substring(d.length + 1), l = !0), !l) {
|
|
225
|
+
let v = this.rules.other.nextBulletRegex(p), q = this.rules.other.hrRegex(p), E = this.rules.other.fencesBeginRegex(p), ee = this.rules.other.headingBeginRegex(p), me = this.rules.other.htmlBeginRegex(p);
|
|
226
226
|
for (; n; ) {
|
|
227
|
-
let
|
|
228
|
-
`, 1)[0],
|
|
229
|
-
if (
|
|
230
|
-
if (
|
|
231
|
-
` +
|
|
227
|
+
let N = n.split(`
|
|
228
|
+
`, 1)[0], R;
|
|
229
|
+
if (d = N, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), R = d) : R = d.replace(this.rules.other.tabCharGlobal, " "), E.test(d) || ee.test(d) || me.test(d) || v.test(d) || q.test(d)) break;
|
|
230
|
+
if (R.search(this.rules.other.nonSpaceChar) >= p || !d.trim()) c += `
|
|
231
|
+
` + R.slice(p);
|
|
232
232
|
else {
|
|
233
|
-
if (k ||
|
|
233
|
+
if (k || u.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || E.test(u) || ee.test(u) || q.test(u)) break;
|
|
234
234
|
c += `
|
|
235
|
-
` +
|
|
235
|
+
` + d;
|
|
236
236
|
}
|
|
237
|
-
!k && !
|
|
238
|
-
`, n = n.substring(
|
|
237
|
+
!k && !d.trim() && (k = !0), h += N + `
|
|
238
|
+
`, n = n.substring(N.length + 1), u = R.slice(p);
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
|
|
242
|
-
let
|
|
243
|
-
this.options.gfm && (
|
|
241
|
+
s.loose || (i ? s.loose = !0 : this.rules.other.doubleBlankLine.test(h) && (i = !0));
|
|
242
|
+
let x = null;
|
|
243
|
+
this.options.gfm && (x = this.rules.other.listIsTask.exec(c), x && (c = c.replace(this.rules.other.listReplaceTask, ""))), s.items.push({ type: "list_item", raw: h, task: !!x, loose: !1, text: c, tokens: [] }), s.raw += h;
|
|
244
244
|
}
|
|
245
|
-
let o =
|
|
245
|
+
let o = s.items.at(-1);
|
|
246
246
|
if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
|
|
247
247
|
else return;
|
|
248
|
-
|
|
249
|
-
for (let l of
|
|
248
|
+
s.raw = s.raw.trimEnd();
|
|
249
|
+
for (let l of s.items) {
|
|
250
250
|
if (this.lexer.state.top = !1, l.tokens = this.lexer.blockTokens(l.text, []), l.task) {
|
|
251
251
|
let h = this.rules.other.listTaskCheckbox.exec(l.raw);
|
|
252
252
|
if (h) {
|
|
253
253
|
let c = { type: "checkbox", raw: h[0] + " ", checked: h[0] !== "[ ]" };
|
|
254
|
-
l.checked = c.checked,
|
|
254
|
+
l.checked = c.checked, s.loose ? l.tokens[0] && ["paragraph", "text"].includes(l.tokens[0].type) && "tokens" in l.tokens[0] && l.tokens[0].tokens ? (l.tokens[0].raw = c.raw + l.tokens[0].raw, l.tokens[0].text = c.raw + l.tokens[0].text, l.tokens[0].tokens.unshift(c)) : l.tokens.unshift({ type: "paragraph", raw: c.raw, text: c.raw, tokens: [c] }) : l.tokens.unshift(c);
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
if (!
|
|
258
|
-
let h = l.tokens.filter((
|
|
259
|
-
|
|
257
|
+
if (!s.loose) {
|
|
258
|
+
let h = l.tokens.filter((u) => u.type === "space"), c = h.length > 0 && h.some((u) => this.rules.other.anyLine.test(u.raw));
|
|
259
|
+
s.loose = c;
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
if (
|
|
262
|
+
if (s.loose) for (let l of s.items) {
|
|
263
263
|
l.loose = !0;
|
|
264
264
|
for (let h of l.tokens) h.type === "text" && (h.type = "paragraph");
|
|
265
265
|
}
|
|
266
|
-
return
|
|
266
|
+
return s;
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
html(n) {
|
|
@@ -273,19 +273,19 @@ ${c}` : c;
|
|
|
273
273
|
def(n) {
|
|
274
274
|
let e = this.rules.block.def.exec(n);
|
|
275
275
|
if (e) {
|
|
276
|
-
let
|
|
277
|
-
return { type: "def", tag:
|
|
276
|
+
let t = e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), r = e[2] ? e[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", s = e[3] ? e[3].substring(1, e[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : e[3];
|
|
277
|
+
return { type: "def", tag: t, raw: e[0], href: r, title: s };
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
table(n) {
|
|
281
281
|
let e = this.rules.block.table.exec(n);
|
|
282
282
|
if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
|
|
283
|
-
let
|
|
283
|
+
let t = ae(e[1]), r = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
284
284
|
`) : [], a = { type: "table", raw: e[0], header: [], align: [], rows: [] };
|
|
285
|
-
if (
|
|
285
|
+
if (t.length === r.length) {
|
|
286
286
|
for (let i of r) this.rules.other.tableAlignRight.test(i) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(i) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(i) ? a.align.push("left") : a.align.push(null);
|
|
287
|
-
for (let i = 0; i <
|
|
288
|
-
for (let i of
|
|
287
|
+
for (let i = 0; i < t.length; i++) a.header.push({ text: t[i], tokens: this.lexer.inline(t[i]), header: !0, align: a.align[i] });
|
|
288
|
+
for (let i of s) a.rows.push(ae(i, a.header.length).map((o, l) => ({ text: o, tokens: this.lexer.inline(o), header: !1, align: a.align[l] })));
|
|
289
289
|
return a;
|
|
290
290
|
}
|
|
291
291
|
}
|
|
@@ -296,9 +296,9 @@ ${c}` : c;
|
|
|
296
296
|
paragraph(n) {
|
|
297
297
|
let e = this.rules.block.paragraph.exec(n);
|
|
298
298
|
if (e) {
|
|
299
|
-
let
|
|
299
|
+
let t = e[1].charAt(e[1].length - 1) === `
|
|
300
300
|
` ? e[1].slice(0, -1) : e[1];
|
|
301
|
-
return { type: "paragraph", raw: e[0], text:
|
|
301
|
+
return { type: "paragraph", raw: e[0], text: t, tokens: this.lexer.inline(t) };
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
text(n) {
|
|
@@ -316,68 +316,68 @@ ${c}` : c;
|
|
|
316
316
|
link(n) {
|
|
317
317
|
let e = this.rules.inline.link.exec(n);
|
|
318
318
|
if (e) {
|
|
319
|
-
let
|
|
320
|
-
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(
|
|
321
|
-
if (!this.rules.other.endAngleBracket.test(
|
|
322
|
-
let a =
|
|
323
|
-
if ((
|
|
319
|
+
let t = e[2].trim();
|
|
320
|
+
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(t)) {
|
|
321
|
+
if (!this.rules.other.endAngleBracket.test(t)) return;
|
|
322
|
+
let a = A(t.slice(0, -1), "\\");
|
|
323
|
+
if ((t.length - a.length) % 2 === 0) return;
|
|
324
324
|
} else {
|
|
325
|
-
let a =
|
|
325
|
+
let a = ht(e[2], "()");
|
|
326
326
|
if (a === -2) return;
|
|
327
327
|
if (a > -1) {
|
|
328
328
|
let i = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + a;
|
|
329
329
|
e[2] = e[2].substring(0, a), e[0] = e[0].substring(0, i).trim(), e[3] = "";
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
let r = e[2],
|
|
332
|
+
let r = e[2], s = "";
|
|
333
333
|
if (this.options.pedantic) {
|
|
334
334
|
let a = this.rules.other.pedanticHrefTitle.exec(r);
|
|
335
|
-
a && (r = a[1],
|
|
336
|
-
} else
|
|
337
|
-
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(
|
|
335
|
+
a && (r = a[1], s = a[3]);
|
|
336
|
+
} else s = e[3] ? e[3].slice(1, -1) : "";
|
|
337
|
+
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(t) ? r = r.slice(1) : r = r.slice(1, -1)), le(e, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: s && s.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
reflink(n, e) {
|
|
341
|
-
let
|
|
342
|
-
if ((
|
|
343
|
-
let r = (
|
|
344
|
-
if (!
|
|
345
|
-
let a =
|
|
341
|
+
let t;
|
|
342
|
+
if ((t = this.rules.inline.reflink.exec(n)) || (t = this.rules.inline.nolink.exec(n))) {
|
|
343
|
+
let r = (t[2] || t[1]).replace(this.rules.other.multipleSpaceGlobal, " "), s = e[r.toLowerCase()];
|
|
344
|
+
if (!s) {
|
|
345
|
+
let a = t[0].charAt(0);
|
|
346
346
|
return { type: "text", raw: a, text: a };
|
|
347
347
|
}
|
|
348
|
-
return le(s, t
|
|
348
|
+
return le(t, s, t[0], this.lexer, this.rules);
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
emStrong(n, e,
|
|
351
|
+
emStrong(n, e, t = "") {
|
|
352
352
|
let r = this.rules.inline.emStrongLDelim.exec(n);
|
|
353
|
-
if (!(!r || r[3] &&
|
|
354
|
-
let
|
|
355
|
-
for (h.lastIndex = 0, e = e.slice(-1 * n.length +
|
|
353
|
+
if (!(!r || r[3] && t.match(this.rules.other.unicodeAlphaNumeric)) && (!(r[1] || r[2]) || !t || this.rules.inline.punctuation.exec(t))) {
|
|
354
|
+
let s = [...r[0]].length - 1, a, i, o = s, l = 0, h = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
355
|
+
for (h.lastIndex = 0, e = e.slice(-1 * n.length + s); (r = h.exec(e)) != null; ) {
|
|
356
356
|
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
|
|
357
357
|
if (i = [...a].length, r[3] || r[4]) {
|
|
358
358
|
o += i;
|
|
359
359
|
continue;
|
|
360
|
-
} else if ((r[5] || r[6]) &&
|
|
360
|
+
} else if ((r[5] || r[6]) && s % 3 && !((s + i) % 3)) {
|
|
361
361
|
l += i;
|
|
362
362
|
continue;
|
|
363
363
|
}
|
|
364
364
|
if (o -= i, o > 0) continue;
|
|
365
365
|
i = Math.min(i, i + o + l);
|
|
366
|
-
let c = [...r[0]][0].length,
|
|
367
|
-
if (Math.min(
|
|
368
|
-
let k =
|
|
369
|
-
return { type: "em", raw:
|
|
366
|
+
let c = [...r[0]][0].length, u = n.slice(0, s + r.index + c + i);
|
|
367
|
+
if (Math.min(s, i) % 2) {
|
|
368
|
+
let k = u.slice(1, -1);
|
|
369
|
+
return { type: "em", raw: u, text: k, tokens: this.lexer.inlineTokens(k) };
|
|
370
370
|
}
|
|
371
|
-
let
|
|
372
|
-
return { type: "strong", raw:
|
|
371
|
+
let d = u.slice(2, -2);
|
|
372
|
+
return { type: "strong", raw: u, text: d, tokens: this.lexer.inlineTokens(d) };
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
codespan(n) {
|
|
377
377
|
let e = this.rules.inline.code.exec(n);
|
|
378
378
|
if (e) {
|
|
379
|
-
let
|
|
380
|
-
return r &&
|
|
379
|
+
let t = e[2].replace(this.rules.other.newLineCharGlobal, " "), r = this.rules.other.nonSpaceChar.test(t), s = this.rules.other.startingSpaceChar.test(t) && this.rules.other.endingSpaceChar.test(t);
|
|
380
|
+
return r && s && (t = t.substring(1, t.length - 1)), { type: "codespan", raw: e[0], text: t };
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
br(n) {
|
|
@@ -391,120 +391,120 @@ ${c}` : c;
|
|
|
391
391
|
autolink(n) {
|
|
392
392
|
let e = this.rules.inline.autolink.exec(n);
|
|
393
393
|
if (e) {
|
|
394
|
-
let
|
|
395
|
-
return e[2] === "@" ? (
|
|
394
|
+
let t, r;
|
|
395
|
+
return e[2] === "@" ? (t = e[1], r = "mailto:" + t) : (t = e[1], r = t), { type: "link", raw: e[0], text: t, href: r, tokens: [{ type: "text", raw: t, text: t }] };
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
url(n) {
|
|
399
399
|
let e;
|
|
400
400
|
if (e = this.rules.inline.url.exec(n)) {
|
|
401
|
-
let
|
|
402
|
-
if (e[2] === "@")
|
|
401
|
+
let t, r;
|
|
402
|
+
if (e[2] === "@") t = e[0], r = "mailto:" + t;
|
|
403
403
|
else {
|
|
404
|
-
let
|
|
404
|
+
let s;
|
|
405
405
|
do
|
|
406
|
-
|
|
407
|
-
while (
|
|
408
|
-
|
|
406
|
+
s = e[0], e[0] = this.rules.inline._backpedal.exec(e[0])?.[0] ?? "";
|
|
407
|
+
while (s !== e[0]);
|
|
408
|
+
t = e[0], e[1] === "www." ? r = "http://" + e[0] : r = e[0];
|
|
409
409
|
}
|
|
410
|
-
return { type: "link", raw: e[0], text:
|
|
410
|
+
return { type: "link", raw: e[0], text: t, href: r, tokens: [{ type: "text", raw: t, text: t }] };
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
inlineText(n) {
|
|
414
414
|
let e = this.rules.inline.text.exec(n);
|
|
415
415
|
if (e) {
|
|
416
|
-
let
|
|
417
|
-
return { type: "text", raw: e[0], text: e[0], escaped:
|
|
416
|
+
let t = this.lexer.state.inRawBlock;
|
|
417
|
+
return { type: "text", raw: e[0], text: e[0], escaped: t };
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
}, w = class
|
|
420
|
+
}, w = class F {
|
|
421
421
|
tokens;
|
|
422
422
|
options;
|
|
423
423
|
state;
|
|
424
424
|
tokenizer;
|
|
425
425
|
inlineQueue;
|
|
426
426
|
constructor(e) {
|
|
427
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
428
|
-
let
|
|
429
|
-
this.options.pedantic ? (
|
|
427
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || S, this.options.tokenizer = this.options.tokenizer || new B(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
428
|
+
let t = { other: m, block: M.normal, inline: I.normal };
|
|
429
|
+
this.options.pedantic ? (t.block = M.pedantic, t.inline = I.pedantic) : this.options.gfm && (t.block = M.gfm, this.options.breaks ? t.inline = I.breaks : t.inline = I.gfm), this.tokenizer.rules = t;
|
|
430
430
|
}
|
|
431
431
|
static get rules() {
|
|
432
|
-
return { block:
|
|
432
|
+
return { block: M, inline: I };
|
|
433
433
|
}
|
|
434
|
-
static lex(e,
|
|
435
|
-
return new
|
|
434
|
+
static lex(e, t) {
|
|
435
|
+
return new F(t).lex(e);
|
|
436
436
|
}
|
|
437
|
-
static lexInline(e,
|
|
438
|
-
return new
|
|
437
|
+
static lexInline(e, t) {
|
|
438
|
+
return new F(t).inlineTokens(e);
|
|
439
439
|
}
|
|
440
440
|
lex(e) {
|
|
441
|
-
e = e.replace(
|
|
441
|
+
e = e.replace(m.carriageReturn, `
|
|
442
442
|
`), this.blockTokens(e, this.tokens);
|
|
443
|
-
for (let
|
|
444
|
-
let r = this.inlineQueue[
|
|
443
|
+
for (let t = 0; t < this.inlineQueue.length; t++) {
|
|
444
|
+
let r = this.inlineQueue[t];
|
|
445
445
|
this.inlineTokens(r.src, r.tokens);
|
|
446
446
|
}
|
|
447
447
|
return this.inlineQueue = [], this.tokens;
|
|
448
448
|
}
|
|
449
|
-
blockTokens(e,
|
|
450
|
-
for (this.options.pedantic && (e = e.replace(
|
|
451
|
-
let
|
|
452
|
-
if (this.options.extensions?.block?.some((i) => (
|
|
453
|
-
if (
|
|
454
|
-
e = e.substring(
|
|
455
|
-
let i =
|
|
456
|
-
|
|
457
|
-
` :
|
|
449
|
+
blockTokens(e, t = [], r = !1) {
|
|
450
|
+
for (this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e; ) {
|
|
451
|
+
let s;
|
|
452
|
+
if (this.options.extensions?.block?.some((i) => (s = i.call({ lexer: this }, e, t)) ? (e = e.substring(s.raw.length), t.push(s), !0) : !1)) continue;
|
|
453
|
+
if (s = this.tokenizer.space(e)) {
|
|
454
|
+
e = e.substring(s.raw.length);
|
|
455
|
+
let i = t.at(-1);
|
|
456
|
+
s.raw.length === 1 && i !== void 0 ? i.raw += `
|
|
457
|
+
` : t.push(s);
|
|
458
458
|
continue;
|
|
459
459
|
}
|
|
460
|
-
if (
|
|
461
|
-
e = e.substring(
|
|
462
|
-
let i =
|
|
460
|
+
if (s = this.tokenizer.code(e)) {
|
|
461
|
+
e = e.substring(s.raw.length);
|
|
462
|
+
let i = t.at(-1);
|
|
463
463
|
i?.type === "paragraph" || i?.type === "text" ? (i.raw += (i.raw.endsWith(`
|
|
464
464
|
`) ? "" : `
|
|
465
|
-
`) +
|
|
466
|
-
` +
|
|
465
|
+
`) + s.raw, i.text += `
|
|
466
|
+
` + s.text, this.inlineQueue.at(-1).src = i.text) : t.push(s);
|
|
467
467
|
continue;
|
|
468
468
|
}
|
|
469
|
-
if (
|
|
470
|
-
e = e.substring(
|
|
469
|
+
if (s = this.tokenizer.fences(e)) {
|
|
470
|
+
e = e.substring(s.raw.length), t.push(s);
|
|
471
471
|
continue;
|
|
472
472
|
}
|
|
473
|
-
if (
|
|
474
|
-
e = e.substring(
|
|
473
|
+
if (s = this.tokenizer.heading(e)) {
|
|
474
|
+
e = e.substring(s.raw.length), t.push(s);
|
|
475
475
|
continue;
|
|
476
476
|
}
|
|
477
|
-
if (
|
|
478
|
-
e = e.substring(
|
|
477
|
+
if (s = this.tokenizer.hr(e)) {
|
|
478
|
+
e = e.substring(s.raw.length), t.push(s);
|
|
479
479
|
continue;
|
|
480
480
|
}
|
|
481
|
-
if (
|
|
482
|
-
e = e.substring(
|
|
481
|
+
if (s = this.tokenizer.blockquote(e)) {
|
|
482
|
+
e = e.substring(s.raw.length), t.push(s);
|
|
483
483
|
continue;
|
|
484
484
|
}
|
|
485
|
-
if (
|
|
486
|
-
e = e.substring(
|
|
485
|
+
if (s = this.tokenizer.list(e)) {
|
|
486
|
+
e = e.substring(s.raw.length), t.push(s);
|
|
487
487
|
continue;
|
|
488
488
|
}
|
|
489
|
-
if (
|
|
490
|
-
e = e.substring(
|
|
489
|
+
if (s = this.tokenizer.html(e)) {
|
|
490
|
+
e = e.substring(s.raw.length), t.push(s);
|
|
491
491
|
continue;
|
|
492
492
|
}
|
|
493
|
-
if (
|
|
494
|
-
e = e.substring(
|
|
495
|
-
let i =
|
|
493
|
+
if (s = this.tokenizer.def(e)) {
|
|
494
|
+
e = e.substring(s.raw.length);
|
|
495
|
+
let i = t.at(-1);
|
|
496
496
|
i?.type === "paragraph" || i?.type === "text" ? (i.raw += (i.raw.endsWith(`
|
|
497
497
|
`) ? "" : `
|
|
498
|
-
`) +
|
|
499
|
-
` +
|
|
498
|
+
`) + s.raw, i.text += `
|
|
499
|
+
` + s.raw, this.inlineQueue.at(-1).src = i.text) : this.tokens.links[s.tag] || (this.tokens.links[s.tag] = { href: s.href, title: s.title }, t.push(s));
|
|
500
500
|
continue;
|
|
501
501
|
}
|
|
502
|
-
if (
|
|
503
|
-
e = e.substring(
|
|
502
|
+
if (s = this.tokenizer.table(e)) {
|
|
503
|
+
e = e.substring(s.raw.length), t.push(s);
|
|
504
504
|
continue;
|
|
505
505
|
}
|
|
506
|
-
if (
|
|
507
|
-
e = e.substring(
|
|
506
|
+
if (s = this.tokenizer.lheading(e)) {
|
|
507
|
+
e = e.substring(s.raw.length), t.push(s);
|
|
508
508
|
continue;
|
|
509
509
|
}
|
|
510
510
|
let a = e;
|
|
@@ -514,21 +514,21 @@ ${c}` : c;
|
|
|
514
514
|
l = h.call({ lexer: this }, o), typeof l == "number" && l >= 0 && (i = Math.min(i, l));
|
|
515
515
|
}), i < 1 / 0 && i >= 0 && (a = e.substring(0, i + 1));
|
|
516
516
|
}
|
|
517
|
-
if (this.state.top && (
|
|
518
|
-
let i =
|
|
517
|
+
if (this.state.top && (s = this.tokenizer.paragraph(a))) {
|
|
518
|
+
let i = t.at(-1);
|
|
519
519
|
r && i?.type === "paragraph" ? (i.raw += (i.raw.endsWith(`
|
|
520
520
|
`) ? "" : `
|
|
521
|
-
`) +
|
|
522
|
-
` +
|
|
521
|
+
`) + s.raw, i.text += `
|
|
522
|
+
` + s.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = i.text) : t.push(s), r = a.length !== e.length, e = e.substring(s.raw.length);
|
|
523
523
|
continue;
|
|
524
524
|
}
|
|
525
|
-
if (
|
|
526
|
-
e = e.substring(
|
|
527
|
-
let i =
|
|
525
|
+
if (s = this.tokenizer.text(e)) {
|
|
526
|
+
e = e.substring(s.raw.length);
|
|
527
|
+
let i = t.at(-1);
|
|
528
528
|
i?.type === "text" ? (i.raw += (i.raw.endsWith(`
|
|
529
529
|
`) ? "" : `
|
|
530
|
-
`) +
|
|
531
|
-
` +
|
|
530
|
+
`) + s.raw, i.text += `
|
|
531
|
+
` + s.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = i.text) : t.push(s);
|
|
532
532
|
continue;
|
|
533
533
|
}
|
|
534
534
|
if (e) {
|
|
@@ -539,79 +539,79 @@ ${c}` : c;
|
|
|
539
539
|
} else throw new Error(i);
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
return this.state.top = !0,
|
|
542
|
+
return this.state.top = !0, t;
|
|
543
543
|
}
|
|
544
|
-
inline(e,
|
|
545
|
-
return this.inlineQueue.push({ src: e, tokens:
|
|
544
|
+
inline(e, t = []) {
|
|
545
|
+
return this.inlineQueue.push({ src: e, tokens: t }), t;
|
|
546
546
|
}
|
|
547
|
-
inlineTokens(e,
|
|
548
|
-
let r = e,
|
|
547
|
+
inlineTokens(e, t = []) {
|
|
548
|
+
let r = e, s = null;
|
|
549
549
|
if (this.tokens.links) {
|
|
550
550
|
let l = Object.keys(this.tokens.links);
|
|
551
|
-
if (l.length > 0) for (; (
|
|
551
|
+
if (l.length > 0) for (; (s = this.tokenizer.rules.inline.reflinkSearch.exec(r)) != null; ) l.includes(s[0].slice(s[0].lastIndexOf("[") + 1, -1)) && (r = r.slice(0, s.index) + "[" + "a".repeat(s[0].length - 2) + "]" + r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
552
552
|
}
|
|
553
|
-
for (; (
|
|
553
|
+
for (; (s = this.tokenizer.rules.inline.anyPunctuation.exec(r)) != null; ) r = r.slice(0, s.index) + "++" + r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
554
554
|
let a;
|
|
555
|
-
for (; (
|
|
555
|
+
for (; (s = this.tokenizer.rules.inline.blockSkip.exec(r)) != null; ) a = s[2] ? s[2].length : 0, r = r.slice(0, s.index + a) + "[" + "a".repeat(s[0].length - a - 2) + "]" + r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
556
556
|
r = this.options.hooks?.emStrongMask?.call({ lexer: this }, r) ?? r;
|
|
557
557
|
let i = !1, o = "";
|
|
558
558
|
for (; e; ) {
|
|
559
559
|
i || (o = ""), i = !1;
|
|
560
560
|
let l;
|
|
561
|
-
if (this.options.extensions?.inline?.some((c) => (l = c.call({ lexer: this }, e,
|
|
561
|
+
if (this.options.extensions?.inline?.some((c) => (l = c.call({ lexer: this }, e, t)) ? (e = e.substring(l.raw.length), t.push(l), !0) : !1)) continue;
|
|
562
562
|
if (l = this.tokenizer.escape(e)) {
|
|
563
|
-
e = e.substring(l.raw.length),
|
|
563
|
+
e = e.substring(l.raw.length), t.push(l);
|
|
564
564
|
continue;
|
|
565
565
|
}
|
|
566
566
|
if (l = this.tokenizer.tag(e)) {
|
|
567
|
-
e = e.substring(l.raw.length),
|
|
567
|
+
e = e.substring(l.raw.length), t.push(l);
|
|
568
568
|
continue;
|
|
569
569
|
}
|
|
570
570
|
if (l = this.tokenizer.link(e)) {
|
|
571
|
-
e = e.substring(l.raw.length),
|
|
571
|
+
e = e.substring(l.raw.length), t.push(l);
|
|
572
572
|
continue;
|
|
573
573
|
}
|
|
574
574
|
if (l = this.tokenizer.reflink(e, this.tokens.links)) {
|
|
575
575
|
e = e.substring(l.raw.length);
|
|
576
|
-
let c =
|
|
577
|
-
l.type === "text" && c?.type === "text" ? (c.raw += l.raw, c.text += l.text) :
|
|
576
|
+
let c = t.at(-1);
|
|
577
|
+
l.type === "text" && c?.type === "text" ? (c.raw += l.raw, c.text += l.text) : t.push(l);
|
|
578
578
|
continue;
|
|
579
579
|
}
|
|
580
580
|
if (l = this.tokenizer.emStrong(e, r, o)) {
|
|
581
|
-
e = e.substring(l.raw.length),
|
|
581
|
+
e = e.substring(l.raw.length), t.push(l);
|
|
582
582
|
continue;
|
|
583
583
|
}
|
|
584
584
|
if (l = this.tokenizer.codespan(e)) {
|
|
585
|
-
e = e.substring(l.raw.length),
|
|
585
|
+
e = e.substring(l.raw.length), t.push(l);
|
|
586
586
|
continue;
|
|
587
587
|
}
|
|
588
588
|
if (l = this.tokenizer.br(e)) {
|
|
589
|
-
e = e.substring(l.raw.length),
|
|
589
|
+
e = e.substring(l.raw.length), t.push(l);
|
|
590
590
|
continue;
|
|
591
591
|
}
|
|
592
592
|
if (l = this.tokenizer.del(e)) {
|
|
593
|
-
e = e.substring(l.raw.length),
|
|
593
|
+
e = e.substring(l.raw.length), t.push(l);
|
|
594
594
|
continue;
|
|
595
595
|
}
|
|
596
596
|
if (l = this.tokenizer.autolink(e)) {
|
|
597
|
-
e = e.substring(l.raw.length),
|
|
597
|
+
e = e.substring(l.raw.length), t.push(l);
|
|
598
598
|
continue;
|
|
599
599
|
}
|
|
600
600
|
if (!this.state.inLink && (l = this.tokenizer.url(e))) {
|
|
601
|
-
e = e.substring(l.raw.length),
|
|
601
|
+
e = e.substring(l.raw.length), t.push(l);
|
|
602
602
|
continue;
|
|
603
603
|
}
|
|
604
604
|
let h = e;
|
|
605
605
|
if (this.options.extensions?.startInline) {
|
|
606
|
-
let c = 1 / 0,
|
|
606
|
+
let c = 1 / 0, u = e.slice(1), d;
|
|
607
607
|
this.options.extensions.startInline.forEach((k) => {
|
|
608
|
-
|
|
608
|
+
d = k.call({ lexer: this }, u), typeof d == "number" && d >= 0 && (c = Math.min(c, d));
|
|
609
609
|
}), c < 1 / 0 && c >= 0 && (h = e.substring(0, c + 1));
|
|
610
610
|
}
|
|
611
611
|
if (l = this.tokenizer.inlineText(h)) {
|
|
612
612
|
e = e.substring(l.raw.length), l.raw.slice(-1) !== "_" && (o = l.raw.slice(-1)), i = !0;
|
|
613
|
-
let c =
|
|
614
|
-
c?.type === "text" ? (c.raw += l.raw, c.text += l.text) :
|
|
613
|
+
let c = t.at(-1);
|
|
614
|
+
c?.type === "text" ? (c.raw += l.raw, c.text += l.text) : t.push(l);
|
|
615
615
|
continue;
|
|
616
616
|
}
|
|
617
617
|
if (e) {
|
|
@@ -622,22 +622,22 @@ ${c}` : c;
|
|
|
622
622
|
} else throw new Error(c);
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
|
-
return
|
|
625
|
+
return t;
|
|
626
626
|
}
|
|
627
|
-
},
|
|
627
|
+
}, Q = class {
|
|
628
628
|
options;
|
|
629
629
|
parser;
|
|
630
630
|
constructor(n) {
|
|
631
|
-
this.options = n ||
|
|
631
|
+
this.options = n || S;
|
|
632
632
|
}
|
|
633
633
|
space(n) {
|
|
634
634
|
return "";
|
|
635
635
|
}
|
|
636
|
-
code({ text: n, lang: e, escaped:
|
|
637
|
-
let r = (e || "").match(
|
|
636
|
+
code({ text: n, lang: e, escaped: t }) {
|
|
637
|
+
let r = (e || "").match(m.notSpaceStart)?.[0], s = n.replace(m.endingNewline, "") + `
|
|
638
638
|
`;
|
|
639
|
-
return r ? '<pre><code class="language-' +
|
|
640
|
-
` : "<pre><code>" + (
|
|
639
|
+
return r ? '<pre><code class="language-' + _(r) + '">' + (t ? s : _(s, !0)) + `</code></pre>
|
|
640
|
+
` : "<pre><code>" + (t ? s : _(s, !0)) + `</code></pre>
|
|
641
641
|
`;
|
|
642
642
|
}
|
|
643
643
|
blockquote({ tokens: n }) {
|
|
@@ -660,14 +660,14 @@ ${this.parser.parse(n)}</blockquote>
|
|
|
660
660
|
`;
|
|
661
661
|
}
|
|
662
662
|
list(n) {
|
|
663
|
-
let e = n.ordered,
|
|
663
|
+
let e = n.ordered, t = n.start, r = "";
|
|
664
664
|
for (let i = 0; i < n.items.length; i++) {
|
|
665
665
|
let o = n.items[i];
|
|
666
666
|
r += this.listitem(o);
|
|
667
667
|
}
|
|
668
|
-
let
|
|
669
|
-
return "<" +
|
|
670
|
-
` + r + "</" +
|
|
668
|
+
let s = e ? "ol" : "ul", a = e && t !== 1 ? ' start="' + t + '"' : "";
|
|
669
|
+
return "<" + s + a + `>
|
|
670
|
+
` + r + "</" + s + `>
|
|
671
671
|
`;
|
|
672
672
|
}
|
|
673
673
|
listitem(n) {
|
|
@@ -682,15 +682,15 @@ ${this.parser.parse(n)}</blockquote>
|
|
|
682
682
|
`;
|
|
683
683
|
}
|
|
684
684
|
table(n) {
|
|
685
|
-
let e = "",
|
|
686
|
-
for (let
|
|
687
|
-
e += this.tablerow({ text:
|
|
685
|
+
let e = "", t = "";
|
|
686
|
+
for (let s = 0; s < n.header.length; s++) t += this.tablecell(n.header[s]);
|
|
687
|
+
e += this.tablerow({ text: t });
|
|
688
688
|
let r = "";
|
|
689
|
-
for (let
|
|
690
|
-
let a = n.rows[
|
|
691
|
-
|
|
692
|
-
for (let i = 0; i < a.length; i++)
|
|
693
|
-
r += this.tablerow({ text:
|
|
689
|
+
for (let s = 0; s < n.rows.length; s++) {
|
|
690
|
+
let a = n.rows[s];
|
|
691
|
+
t = "";
|
|
692
|
+
for (let i = 0; i < a.length; i++) t += this.tablecell(a[i]);
|
|
693
|
+
r += this.tablerow({ text: t });
|
|
694
694
|
}
|
|
695
695
|
return r && (r = `<tbody>${r}</tbody>`), `<table>
|
|
696
696
|
<thead>
|
|
@@ -704,8 +704,8 @@ ${n}</tr>
|
|
|
704
704
|
`;
|
|
705
705
|
}
|
|
706
706
|
tablecell(n) {
|
|
707
|
-
let e = this.parser.parseInline(n.tokens),
|
|
708
|
-
return (n.align ? `<${
|
|
707
|
+
let e = this.parser.parseInline(n.tokens), t = n.header ? "th" : "td";
|
|
708
|
+
return (n.align ? `<${t} align="${n.align}">` : `<${t}>`) + e + `</${t}>
|
|
709
709
|
`;
|
|
710
710
|
}
|
|
711
711
|
strong({ tokens: n }) {
|
|
@@ -715,7 +715,7 @@ ${n}</tr>
|
|
|
715
715
|
return `<em>${this.parser.parseInline(n)}</em>`;
|
|
716
716
|
}
|
|
717
717
|
codespan({ text: n }) {
|
|
718
|
-
return `<code>${
|
|
718
|
+
return `<code>${_(n, !0)}</code>`;
|
|
719
719
|
}
|
|
720
720
|
br(n) {
|
|
721
721
|
return "<br>";
|
|
@@ -723,25 +723,25 @@ ${n}</tr>
|
|
|
723
723
|
del({ tokens: n }) {
|
|
724
724
|
return `<del>${this.parser.parseInline(n)}</del>`;
|
|
725
725
|
}
|
|
726
|
-
link({ href: n, title: e, tokens:
|
|
727
|
-
let r = this.parser.parseInline(
|
|
728
|
-
if (
|
|
729
|
-
n =
|
|
726
|
+
link({ href: n, title: e, tokens: t }) {
|
|
727
|
+
let r = this.parser.parseInline(t), s = ie(n);
|
|
728
|
+
if (s === null) return r;
|
|
729
|
+
n = s;
|
|
730
730
|
let a = '<a href="' + n + '"';
|
|
731
|
-
return e && (a += ' title="' +
|
|
731
|
+
return e && (a += ' title="' + _(e) + '"'), a += ">" + r + "</a>", a;
|
|
732
732
|
}
|
|
733
|
-
image({ href: n, title: e, text:
|
|
734
|
-
r && (
|
|
735
|
-
let
|
|
736
|
-
if (
|
|
737
|
-
n =
|
|
738
|
-
let a = `<img src="${n}" alt="${
|
|
739
|
-
return e && (a += ` title="${
|
|
733
|
+
image({ href: n, title: e, text: t, tokens: r }) {
|
|
734
|
+
r && (t = this.parser.parseInline(r, this.parser.textRenderer));
|
|
735
|
+
let s = ie(n);
|
|
736
|
+
if (s === null) return _(t);
|
|
737
|
+
n = s;
|
|
738
|
+
let a = `<img src="${n}" alt="${t}"`;
|
|
739
|
+
return e && (a += ` title="${_(e)}"`), a += ">", a;
|
|
740
740
|
}
|
|
741
741
|
text(n) {
|
|
742
|
-
return "tokens" in n && n.tokens ? this.parser.parseInline(n.tokens) : "escaped" in n && n.escaped ? n.text :
|
|
742
|
+
return "tokens" in n && n.tokens ? this.parser.parseInline(n.tokens) : "escaped" in n && n.escaped ? n.text : _(n.text);
|
|
743
743
|
}
|
|
744
|
-
},
|
|
744
|
+
}, Y = class {
|
|
745
745
|
strong({ text: n }) {
|
|
746
746
|
return n;
|
|
747
747
|
}
|
|
@@ -772,78 +772,78 @@ ${n}</tr>
|
|
|
772
772
|
checkbox({ raw: n }) {
|
|
773
773
|
return n;
|
|
774
774
|
}
|
|
775
|
-
},
|
|
775
|
+
}, y = class U {
|
|
776
776
|
options;
|
|
777
777
|
renderer;
|
|
778
778
|
textRenderer;
|
|
779
779
|
constructor(e) {
|
|
780
|
-
this.options = e ||
|
|
780
|
+
this.options = e || S, this.options.renderer = this.options.renderer || new Q(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Y();
|
|
781
781
|
}
|
|
782
|
-
static parse(e,
|
|
783
|
-
return new
|
|
782
|
+
static parse(e, t) {
|
|
783
|
+
return new U(t).parse(e);
|
|
784
784
|
}
|
|
785
|
-
static parseInline(e,
|
|
786
|
-
return new
|
|
785
|
+
static parseInline(e, t) {
|
|
786
|
+
return new U(t).parseInline(e);
|
|
787
787
|
}
|
|
788
788
|
parse(e) {
|
|
789
|
-
let
|
|
789
|
+
let t = "";
|
|
790
790
|
for (let r = 0; r < e.length; r++) {
|
|
791
|
-
let
|
|
792
|
-
if (this.options.extensions?.renderers?.[
|
|
793
|
-
let i =
|
|
791
|
+
let s = e[r];
|
|
792
|
+
if (this.options.extensions?.renderers?.[s.type]) {
|
|
793
|
+
let i = s, o = this.options.extensions.renderers[i.type].call({ parser: this }, i);
|
|
794
794
|
if (o !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(i.type)) {
|
|
795
|
-
|
|
795
|
+
t += o || "";
|
|
796
796
|
continue;
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
|
-
let a =
|
|
799
|
+
let a = s;
|
|
800
800
|
switch (a.type) {
|
|
801
801
|
case "space": {
|
|
802
|
-
|
|
802
|
+
t += this.renderer.space(a);
|
|
803
803
|
break;
|
|
804
804
|
}
|
|
805
805
|
case "hr": {
|
|
806
|
-
|
|
806
|
+
t += this.renderer.hr(a);
|
|
807
807
|
break;
|
|
808
808
|
}
|
|
809
809
|
case "heading": {
|
|
810
|
-
|
|
810
|
+
t += this.renderer.heading(a);
|
|
811
811
|
break;
|
|
812
812
|
}
|
|
813
813
|
case "code": {
|
|
814
|
-
|
|
814
|
+
t += this.renderer.code(a);
|
|
815
815
|
break;
|
|
816
816
|
}
|
|
817
817
|
case "table": {
|
|
818
|
-
|
|
818
|
+
t += this.renderer.table(a);
|
|
819
819
|
break;
|
|
820
820
|
}
|
|
821
821
|
case "blockquote": {
|
|
822
|
-
|
|
822
|
+
t += this.renderer.blockquote(a);
|
|
823
823
|
break;
|
|
824
824
|
}
|
|
825
825
|
case "list": {
|
|
826
|
-
|
|
826
|
+
t += this.renderer.list(a);
|
|
827
827
|
break;
|
|
828
828
|
}
|
|
829
829
|
case "checkbox": {
|
|
830
|
-
|
|
830
|
+
t += this.renderer.checkbox(a);
|
|
831
831
|
break;
|
|
832
832
|
}
|
|
833
833
|
case "html": {
|
|
834
|
-
|
|
834
|
+
t += this.renderer.html(a);
|
|
835
835
|
break;
|
|
836
836
|
}
|
|
837
837
|
case "def": {
|
|
838
|
-
|
|
838
|
+
t += this.renderer.def(a);
|
|
839
839
|
break;
|
|
840
840
|
}
|
|
841
841
|
case "paragraph": {
|
|
842
|
-
|
|
842
|
+
t += this.renderer.paragraph(a);
|
|
843
843
|
break;
|
|
844
844
|
}
|
|
845
845
|
case "text": {
|
|
846
|
-
|
|
846
|
+
t += this.renderer.text(a);
|
|
847
847
|
break;
|
|
848
848
|
}
|
|
849
849
|
default: {
|
|
@@ -853,12 +853,12 @@ ${n}</tr>
|
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
|
-
return
|
|
856
|
+
return t;
|
|
857
857
|
}
|
|
858
|
-
parseInline(e,
|
|
858
|
+
parseInline(e, t = this.renderer) {
|
|
859
859
|
let r = "";
|
|
860
|
-
for (let
|
|
861
|
-
let a = e[
|
|
860
|
+
for (let s = 0; s < e.length; s++) {
|
|
861
|
+
let a = e[s];
|
|
862
862
|
if (this.options.extensions?.renderers?.[a.type]) {
|
|
863
863
|
let o = this.options.extensions.renderers[a.type].call({ parser: this }, a);
|
|
864
864
|
if (o !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(a.type)) {
|
|
@@ -869,47 +869,47 @@ ${n}</tr>
|
|
|
869
869
|
let i = a;
|
|
870
870
|
switch (i.type) {
|
|
871
871
|
case "escape": {
|
|
872
|
-
r +=
|
|
872
|
+
r += t.text(i);
|
|
873
873
|
break;
|
|
874
874
|
}
|
|
875
875
|
case "html": {
|
|
876
|
-
r +=
|
|
876
|
+
r += t.html(i);
|
|
877
877
|
break;
|
|
878
878
|
}
|
|
879
879
|
case "link": {
|
|
880
|
-
r +=
|
|
880
|
+
r += t.link(i);
|
|
881
881
|
break;
|
|
882
882
|
}
|
|
883
883
|
case "image": {
|
|
884
|
-
r +=
|
|
884
|
+
r += t.image(i);
|
|
885
885
|
break;
|
|
886
886
|
}
|
|
887
887
|
case "checkbox": {
|
|
888
|
-
r +=
|
|
888
|
+
r += t.checkbox(i);
|
|
889
889
|
break;
|
|
890
890
|
}
|
|
891
891
|
case "strong": {
|
|
892
|
-
r +=
|
|
892
|
+
r += t.strong(i);
|
|
893
893
|
break;
|
|
894
894
|
}
|
|
895
895
|
case "em": {
|
|
896
|
-
r +=
|
|
896
|
+
r += t.em(i);
|
|
897
897
|
break;
|
|
898
898
|
}
|
|
899
899
|
case "codespan": {
|
|
900
|
-
r +=
|
|
900
|
+
r += t.codespan(i);
|
|
901
901
|
break;
|
|
902
902
|
}
|
|
903
903
|
case "br": {
|
|
904
|
-
r +=
|
|
904
|
+
r += t.br(i);
|
|
905
905
|
break;
|
|
906
906
|
}
|
|
907
907
|
case "del": {
|
|
908
|
-
r +=
|
|
908
|
+
r += t.del(i);
|
|
909
909
|
break;
|
|
910
910
|
}
|
|
911
911
|
case "text": {
|
|
912
|
-
r +=
|
|
912
|
+
r += t.text(i);
|
|
913
913
|
break;
|
|
914
914
|
}
|
|
915
915
|
default: {
|
|
@@ -921,11 +921,11 @@ ${n}</tr>
|
|
|
921
921
|
}
|
|
922
922
|
return r;
|
|
923
923
|
}
|
|
924
|
-
},
|
|
924
|
+
}, z = class {
|
|
925
925
|
options;
|
|
926
926
|
block;
|
|
927
927
|
constructor(n) {
|
|
928
|
-
this.options = n ||
|
|
928
|
+
this.options = n || S;
|
|
929
929
|
}
|
|
930
930
|
static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
|
|
931
931
|
static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
|
|
@@ -945,120 +945,120 @@ ${n}</tr>
|
|
|
945
945
|
return this.block ? w.lex : w.lexInline;
|
|
946
946
|
}
|
|
947
947
|
provideParser() {
|
|
948
|
-
return this.block ?
|
|
948
|
+
return this.block ? y.parse : y.parseInline;
|
|
949
949
|
}
|
|
950
|
-
},
|
|
951
|
-
defaults =
|
|
950
|
+
}, pt = class {
|
|
951
|
+
defaults = j();
|
|
952
952
|
options = this.setOptions;
|
|
953
953
|
parse = this.parseMarkdown(!0);
|
|
954
954
|
parseInline = this.parseMarkdown(!1);
|
|
955
|
-
Parser =
|
|
956
|
-
Renderer =
|
|
957
|
-
TextRenderer =
|
|
955
|
+
Parser = y;
|
|
956
|
+
Renderer = Q;
|
|
957
|
+
TextRenderer = Y;
|
|
958
958
|
Lexer = w;
|
|
959
|
-
Tokenizer =
|
|
960
|
-
Hooks =
|
|
959
|
+
Tokenizer = B;
|
|
960
|
+
Hooks = z;
|
|
961
961
|
constructor(...n) {
|
|
962
962
|
this.use(...n);
|
|
963
963
|
}
|
|
964
964
|
walkTokens(n, e) {
|
|
965
|
-
let
|
|
966
|
-
for (let r of n) switch (
|
|
965
|
+
let t = [];
|
|
966
|
+
for (let r of n) switch (t = t.concat(e.call(this, r)), r.type) {
|
|
967
967
|
case "table": {
|
|
968
|
-
let
|
|
969
|
-
for (let a of
|
|
970
|
-
for (let a of
|
|
968
|
+
let s = r;
|
|
969
|
+
for (let a of s.header) t = t.concat(this.walkTokens(a.tokens, e));
|
|
970
|
+
for (let a of s.rows) for (let i of a) t = t.concat(this.walkTokens(i.tokens, e));
|
|
971
971
|
break;
|
|
972
972
|
}
|
|
973
973
|
case "list": {
|
|
974
|
-
let
|
|
975
|
-
|
|
974
|
+
let s = r;
|
|
975
|
+
t = t.concat(this.walkTokens(s.items, e));
|
|
976
976
|
break;
|
|
977
977
|
}
|
|
978
978
|
default: {
|
|
979
|
-
let
|
|
980
|
-
this.defaults.extensions?.childTokens?.[
|
|
981
|
-
let i =
|
|
982
|
-
|
|
983
|
-
}) :
|
|
979
|
+
let s = r;
|
|
980
|
+
this.defaults.extensions?.childTokens?.[s.type] ? this.defaults.extensions.childTokens[s.type].forEach((a) => {
|
|
981
|
+
let i = s[a].flat(1 / 0);
|
|
982
|
+
t = t.concat(this.walkTokens(i, e));
|
|
983
|
+
}) : s.tokens && (t = t.concat(this.walkTokens(s.tokens, e)));
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
|
-
return
|
|
986
|
+
return t;
|
|
987
987
|
}
|
|
988
988
|
use(...n) {
|
|
989
989
|
let e = this.defaults.extensions || { renderers: {}, childTokens: {} };
|
|
990
|
-
return n.forEach((
|
|
991
|
-
let r = { ...
|
|
992
|
-
if (r.async = this.defaults.async || r.async || !1,
|
|
993
|
-
if (!
|
|
994
|
-
if ("renderer" in
|
|
995
|
-
let a = e.renderers[
|
|
996
|
-
a ? e.renderers[
|
|
997
|
-
let o =
|
|
990
|
+
return n.forEach((t) => {
|
|
991
|
+
let r = { ...t };
|
|
992
|
+
if (r.async = this.defaults.async || r.async || !1, t.extensions && (t.extensions.forEach((s) => {
|
|
993
|
+
if (!s.name) throw new Error("extension name required");
|
|
994
|
+
if ("renderer" in s) {
|
|
995
|
+
let a = e.renderers[s.name];
|
|
996
|
+
a ? e.renderers[s.name] = function(...i) {
|
|
997
|
+
let o = s.renderer.apply(this, i);
|
|
998
998
|
return o === !1 && (o = a.apply(this, i)), o;
|
|
999
|
-
} : e.renderers[
|
|
999
|
+
} : e.renderers[s.name] = s.renderer;
|
|
1000
1000
|
}
|
|
1001
|
-
if ("tokenizer" in
|
|
1002
|
-
if (!
|
|
1003
|
-
let a = e[
|
|
1004
|
-
a ? a.unshift(
|
|
1001
|
+
if ("tokenizer" in s) {
|
|
1002
|
+
if (!s.level || s.level !== "block" && s.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
|
|
1003
|
+
let a = e[s.level];
|
|
1004
|
+
a ? a.unshift(s.tokenizer) : e[s.level] = [s.tokenizer], s.start && (s.level === "block" ? e.startBlock ? e.startBlock.push(s.start) : e.startBlock = [s.start] : s.level === "inline" && (e.startInline ? e.startInline.push(s.start) : e.startInline = [s.start]));
|
|
1005
1005
|
}
|
|
1006
|
-
"childTokens" in
|
|
1007
|
-
}), r.extensions = e),
|
|
1008
|
-
let
|
|
1009
|
-
for (let a in
|
|
1010
|
-
if (!(a in
|
|
1006
|
+
"childTokens" in s && s.childTokens && (e.childTokens[s.name] = s.childTokens);
|
|
1007
|
+
}), r.extensions = e), t.renderer) {
|
|
1008
|
+
let s = this.defaults.renderer || new Q(this.defaults);
|
|
1009
|
+
for (let a in t.renderer) {
|
|
1010
|
+
if (!(a in s)) throw new Error(`renderer '${a}' does not exist`);
|
|
1011
1011
|
if (["options", "parser"].includes(a)) continue;
|
|
1012
|
-
let i = a, o =
|
|
1013
|
-
|
|
1014
|
-
let c = o.apply(
|
|
1015
|
-
return c === !1 && (c = l.apply(
|
|
1012
|
+
let i = a, o = t.renderer[i], l = s[i];
|
|
1013
|
+
s[i] = (...h) => {
|
|
1014
|
+
let c = o.apply(s, h);
|
|
1015
|
+
return c === !1 && (c = l.apply(s, h)), c || "";
|
|
1016
1016
|
};
|
|
1017
1017
|
}
|
|
1018
|
-
r.renderer =
|
|
1018
|
+
r.renderer = s;
|
|
1019
1019
|
}
|
|
1020
|
-
if (
|
|
1021
|
-
let
|
|
1022
|
-
for (let a in
|
|
1023
|
-
if (!(a in
|
|
1020
|
+
if (t.tokenizer) {
|
|
1021
|
+
let s = this.defaults.tokenizer || new B(this.defaults);
|
|
1022
|
+
for (let a in t.tokenizer) {
|
|
1023
|
+
if (!(a in s)) throw new Error(`tokenizer '${a}' does not exist`);
|
|
1024
1024
|
if (["options", "rules", "lexer"].includes(a)) continue;
|
|
1025
|
-
let i = a, o =
|
|
1026
|
-
|
|
1027
|
-
let c = o.apply(
|
|
1028
|
-
return c === !1 && (c = l.apply(
|
|
1025
|
+
let i = a, o = t.tokenizer[i], l = s[i];
|
|
1026
|
+
s[i] = (...h) => {
|
|
1027
|
+
let c = o.apply(s, h);
|
|
1028
|
+
return c === !1 && (c = l.apply(s, h)), c;
|
|
1029
1029
|
};
|
|
1030
1030
|
}
|
|
1031
|
-
r.tokenizer =
|
|
1031
|
+
r.tokenizer = s;
|
|
1032
1032
|
}
|
|
1033
|
-
if (
|
|
1034
|
-
let
|
|
1035
|
-
for (let a in
|
|
1036
|
-
if (!(a in
|
|
1033
|
+
if (t.hooks) {
|
|
1034
|
+
let s = this.defaults.hooks || new z();
|
|
1035
|
+
for (let a in t.hooks) {
|
|
1036
|
+
if (!(a in s)) throw new Error(`hook '${a}' does not exist`);
|
|
1037
1037
|
if (["options", "block"].includes(a)) continue;
|
|
1038
|
-
let i = a, o =
|
|
1039
|
-
|
|
1040
|
-
if (this.defaults.async &&
|
|
1041
|
-
let
|
|
1042
|
-
return l.call(
|
|
1038
|
+
let i = a, o = t.hooks[i], l = s[i];
|
|
1039
|
+
z.passThroughHooks.has(a) ? s[i] = (h) => {
|
|
1040
|
+
if (this.defaults.async && z.passThroughHooksRespectAsync.has(a)) return (async () => {
|
|
1041
|
+
let u = await o.call(s, h);
|
|
1042
|
+
return l.call(s, u);
|
|
1043
1043
|
})();
|
|
1044
|
-
let c = o.call(
|
|
1045
|
-
return l.call(
|
|
1046
|
-
} :
|
|
1044
|
+
let c = o.call(s, h);
|
|
1045
|
+
return l.call(s, c);
|
|
1046
|
+
} : s[i] = (...h) => {
|
|
1047
1047
|
if (this.defaults.async) return (async () => {
|
|
1048
|
-
let
|
|
1049
|
-
return
|
|
1048
|
+
let u = await o.apply(s, h);
|
|
1049
|
+
return u === !1 && (u = await l.apply(s, h)), u;
|
|
1050
1050
|
})();
|
|
1051
|
-
let c = o.apply(
|
|
1052
|
-
return c === !1 && (c = l.apply(
|
|
1051
|
+
let c = o.apply(s, h);
|
|
1052
|
+
return c === !1 && (c = l.apply(s, h)), c;
|
|
1053
1053
|
};
|
|
1054
1054
|
}
|
|
1055
|
-
r.hooks =
|
|
1055
|
+
r.hooks = s;
|
|
1056
1056
|
}
|
|
1057
|
-
if (
|
|
1058
|
-
let
|
|
1057
|
+
if (t.walkTokens) {
|
|
1058
|
+
let s = this.defaults.walkTokens, a = t.walkTokens;
|
|
1059
1059
|
r.walkTokens = function(i) {
|
|
1060
1060
|
let o = [];
|
|
1061
|
-
return o.push(a.call(this, i)),
|
|
1061
|
+
return o.push(a.call(this, i)), s && (o = o.concat(s.call(this, i))), o;
|
|
1062
1062
|
};
|
|
1063
1063
|
}
|
|
1064
1064
|
this.defaults = { ...this.defaults, ...r };
|
|
@@ -1071,87 +1071,175 @@ ${n}</tr>
|
|
|
1071
1071
|
return w.lex(n, e ?? this.defaults);
|
|
1072
1072
|
}
|
|
1073
1073
|
parser(n, e) {
|
|
1074
|
-
return
|
|
1074
|
+
return y.parse(n, e ?? this.defaults);
|
|
1075
1075
|
}
|
|
1076
1076
|
parseMarkdown(n) {
|
|
1077
|
-
return (e,
|
|
1078
|
-
let r = { ...
|
|
1077
|
+
return (e, t) => {
|
|
1078
|
+
let r = { ...t }, s = { ...this.defaults, ...r }, a = this.onError(!!s.silent, !!s.async);
|
|
1079
1079
|
if (this.defaults.async === !0 && r.async === !1) return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
|
|
1080
1080
|
if (typeof e > "u" || e === null) return a(new Error("marked(): input parameter is undefined or null"));
|
|
1081
1081
|
if (typeof e != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
|
|
1082
|
-
if (
|
|
1083
|
-
let i =
|
|
1084
|
-
|
|
1085
|
-
let h = await (
|
|
1086
|
-
return
|
|
1082
|
+
if (s.hooks && (s.hooks.options = s, s.hooks.block = n), s.async) return (async () => {
|
|
1083
|
+
let i = s.hooks ? await s.hooks.preprocess(e) : e, o = await (s.hooks ? await s.hooks.provideLexer() : n ? w.lex : w.lexInline)(i, s), l = s.hooks ? await s.hooks.processAllTokens(o) : o;
|
|
1084
|
+
s.walkTokens && await Promise.all(this.walkTokens(l, s.walkTokens));
|
|
1085
|
+
let h = await (s.hooks ? await s.hooks.provideParser() : n ? y.parse : y.parseInline)(l, s);
|
|
1086
|
+
return s.hooks ? await s.hooks.postprocess(h) : h;
|
|
1087
1087
|
})().catch(a);
|
|
1088
1088
|
try {
|
|
1089
|
-
|
|
1090
|
-
let i = (
|
|
1091
|
-
|
|
1092
|
-
let o = (
|
|
1093
|
-
return
|
|
1089
|
+
s.hooks && (e = s.hooks.preprocess(e));
|
|
1090
|
+
let i = (s.hooks ? s.hooks.provideLexer() : n ? w.lex : w.lexInline)(e, s);
|
|
1091
|
+
s.hooks && (i = s.hooks.processAllTokens(i)), s.walkTokens && this.walkTokens(i, s.walkTokens);
|
|
1092
|
+
let o = (s.hooks ? s.hooks.provideParser() : n ? y.parse : y.parseInline)(i, s);
|
|
1093
|
+
return s.hooks && (o = s.hooks.postprocess(o)), o;
|
|
1094
1094
|
} catch (i) {
|
|
1095
1095
|
return a(i);
|
|
1096
1096
|
}
|
|
1097
1097
|
};
|
|
1098
1098
|
}
|
|
1099
1099
|
onError(n, e) {
|
|
1100
|
-
return (
|
|
1101
|
-
if (
|
|
1100
|
+
return (t) => {
|
|
1101
|
+
if (t.message += `
|
|
1102
1102
|
Please report this to https://github.com/markedjs/marked.`, n) {
|
|
1103
|
-
let r = "<p>An error occurred:</p><pre>" +
|
|
1103
|
+
let r = "<p>An error occurred:</p><pre>" + _(t.message + "", !0) + "</pre>";
|
|
1104
1104
|
return e ? Promise.resolve(r) : r;
|
|
1105
1105
|
}
|
|
1106
|
-
if (e) return Promise.reject(
|
|
1107
|
-
throw
|
|
1106
|
+
if (e) return Promise.reject(t);
|
|
1107
|
+
throw t;
|
|
1108
1108
|
};
|
|
1109
1109
|
}
|
|
1110
|
-
},
|
|
1111
|
-
function
|
|
1112
|
-
return
|
|
1110
|
+
}, T = new pt();
|
|
1111
|
+
function f(n, e) {
|
|
1112
|
+
return T.parse(n, e);
|
|
1113
1113
|
}
|
|
1114
|
-
|
|
1115
|
-
return
|
|
1114
|
+
f.options = f.setOptions = function(n) {
|
|
1115
|
+
return T.setOptions(n), f.defaults = T.defaults, oe(f.defaults), f;
|
|
1116
1116
|
};
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
return
|
|
1117
|
+
f.getDefaults = j;
|
|
1118
|
+
f.defaults = S;
|
|
1119
|
+
f.use = function(...n) {
|
|
1120
|
+
return T.use(...n), f.defaults = T.defaults, oe(f.defaults), f;
|
|
1121
1121
|
};
|
|
1122
|
-
|
|
1123
|
-
return
|
|
1122
|
+
f.walkTokens = function(n, e) {
|
|
1123
|
+
return T.walkTokens(n, e);
|
|
1124
1124
|
};
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1125
|
+
f.parseInline = T.parseInline;
|
|
1126
|
+
f.Parser = y;
|
|
1127
|
+
f.parser = y.parse;
|
|
1128
|
+
f.Renderer = Q;
|
|
1129
|
+
f.TextRenderer = Y;
|
|
1130
|
+
f.Lexer = w;
|
|
1131
|
+
f.lexer = w.lex;
|
|
1132
|
+
f.Tokenizer = B;
|
|
1133
|
+
f.Hooks = z;
|
|
1134
|
+
f.parse = f;
|
|
1135
|
+
f.options;
|
|
1136
|
+
f.setOptions;
|
|
1137
|
+
f.use;
|
|
1138
|
+
f.walkTokens;
|
|
1139
|
+
f.parseInline;
|
|
1140
|
+
y.parse;
|
|
1141
1141
|
w.lex;
|
|
1142
|
-
|
|
1142
|
+
/**
|
|
1143
|
+
* @license
|
|
1144
|
+
* Copyright 2025 Esri
|
|
1145
|
+
*
|
|
1146
|
+
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
1147
|
+
* you may not use this file except in compliance with the License.
|
|
1148
|
+
* You may obtain a copy of the License at
|
|
1149
|
+
*
|
|
1150
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1151
|
+
*
|
|
1152
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1153
|
+
* distributed under the License is distributed on an 'AS IS' BASIS,
|
|
1154
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1155
|
+
* See the License for the specific language governing permissions and
|
|
1156
|
+
* limitations under the License.
|
|
1157
|
+
*/
|
|
1158
|
+
class dt {
|
|
1159
|
+
/** how quickly the text should reveal */
|
|
1160
|
+
/*
|
|
1161
|
+
private _animationTimer: number | null = null;
|
|
1162
|
+
private isRevealing = false;
|
|
1163
|
+
private onTypingCompleted?: () => void;
|
|
1164
|
+
*/
|
|
1165
|
+
constructor(e = "") {
|
|
1166
|
+
this._text = "", this._displayedText = "", this._pendingText = "", this._text = e, this._pendingText = e;
|
|
1167
|
+
}
|
|
1168
|
+
/** Set or update the text that will be type written
|
|
1169
|
+
* @param text the new or updated string to type write
|
|
1170
|
+
*/
|
|
1171
|
+
setText(e) {
|
|
1172
|
+
this._text = e, this._displayedText && e.includes(this._displayedText) ? this._pendingText = e.substring(this._displayedText.length) : (this._pendingText = this._text, this._displayedText = "");
|
|
1173
|
+
}
|
|
1174
|
+
/** Gets the current text that is written out */
|
|
1175
|
+
getText() {
|
|
1176
|
+
return this._displayedText;
|
|
1177
|
+
}
|
|
1178
|
+
/** Clear all the text and state */
|
|
1179
|
+
clearText() {
|
|
1180
|
+
this._displayedText = "", this._text = "", this._pendingText = "";
|
|
1181
|
+
}
|
|
1182
|
+
/**
|
|
1183
|
+
* Updates the display text on what will be shown to the users.
|
|
1184
|
+
*/
|
|
1185
|
+
updateDisplayText() {
|
|
1186
|
+
if (this._pendingText.length > 0) {
|
|
1187
|
+
const e = this._pendingText[0];
|
|
1188
|
+
if (e === "[" || e === "<" || e === "!") {
|
|
1189
|
+
const t = this._matchMarkdownPattern(
|
|
1190
|
+
this._displayedText + this._pendingText,
|
|
1191
|
+
this._displayedText.length
|
|
1192
|
+
);
|
|
1193
|
+
if (t) {
|
|
1194
|
+
const r = t.end - t.start, s = this._pendingText.substring(0, r);
|
|
1195
|
+
this._displayedText += s, this._pendingText = this._pendingText.substring(r);
|
|
1196
|
+
} else
|
|
1197
|
+
this._displayedText += e, this._pendingText = this._pendingText.substring(1);
|
|
1198
|
+
} else
|
|
1199
|
+
this._displayedText += e, this._pendingText = this._pendingText.substring(1);
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
/**
|
|
1203
|
+
* Check the string for any markdown pattern and the length of that pattern.
|
|
1204
|
+
* @param text the string to check markdown
|
|
1205
|
+
* @param position The current position in the text to check
|
|
1206
|
+
* @returns the start and end positions.
|
|
1207
|
+
*/
|
|
1208
|
+
_matchMarkdownPattern(e, t) {
|
|
1209
|
+
const r = [
|
|
1210
|
+
/<sup>\[\[[^\]]+\]\]\([^)]+\)<\/sup>/,
|
|
1211
|
+
// <sup>[[1]](url)</sup>
|
|
1212
|
+
/\[\[[^\]]+\]\]\([^)]+\)/,
|
|
1213
|
+
// [[1]](url)
|
|
1214
|
+
/\[[^\]]+\]\([^)]+\)/,
|
|
1215
|
+
// [text](url)
|
|
1216
|
+
/!\[[^\]]*\]\([^)]+\)/
|
|
1217
|
+
// 
|
|
1218
|
+
], s = e.substring(t);
|
|
1219
|
+
for (const a of r) {
|
|
1220
|
+
const i = s.match(a);
|
|
1221
|
+
if (i && i.index === 0)
|
|
1222
|
+
return {
|
|
1223
|
+
start: t,
|
|
1224
|
+
end: t + i[0].length
|
|
1225
|
+
};
|
|
1226
|
+
}
|
|
1227
|
+
return null;
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
class gt extends _e {
|
|
1143
1231
|
constructor() {
|
|
1144
1232
|
super(), this.serverRoot = "https://aiservices-beta.arcgis.com", this.token = null, this.open = !1, this.conversationStore = {
|
|
1145
1233
|
conversationId: null,
|
|
1146
1234
|
inquiryId: null,
|
|
1147
1235
|
ackSequenceNumber: null
|
|
1148
|
-
}, this._isLoading = !1, this._isLoadingText = "", this.messages = [], this._translations =
|
|
1236
|
+
}, this._currentResponse = "", this._isLoading = !1, this._isLoadingText = "", this.messages = [], this._translations = ye({ name: "arcgis-solutions-assistant", blocking: !0 }), this._isTyping = !1, this.closeAssistant = ve(), this._resetConversation = () => {
|
|
1149
1237
|
this.conversationStore.conversationId = null, this.conversationStore.inquiryId = null, this.conversationStore.ackSequenceNumber = null;
|
|
1150
1238
|
}, this._setMessageContainerRef = (e) => {
|
|
1151
1239
|
this._chatContainer = e;
|
|
1152
1240
|
}, this._setInputRef = (e) => {
|
|
1153
|
-
this._inputRef = e, this._inputRef.addEventListener("keydown", (
|
|
1154
|
-
|
|
1241
|
+
this._inputRef = e, this._inputRef.addEventListener("keydown", (t) => {
|
|
1242
|
+
t.key === "Enter" && !t.shiftKey && (t.preventDefault(), this.handleSendMessage());
|
|
1155
1243
|
}), setTimeout(() => {
|
|
1156
1244
|
this._inputRef?.focus();
|
|
1157
1245
|
}, 100);
|
|
@@ -1162,10 +1250,10 @@ class gt extends ye {
|
|
|
1162
1250
|
});
|
|
1163
1251
|
}
|
|
1164
1252
|
static {
|
|
1165
|
-
this.properties = { serverRoot: 1, token: 1, open: 5, conversationStore: 16, _isLoading: 16, _isLoadingText: 16, messages: 16, _translations: 16 };
|
|
1253
|
+
this.properties = { serverRoot: 1, token: 1, open: 5, conversationStore: 16, _currentResponse: 16, _isLoading: 16, _isLoadingText: 16, messages: 16, _translations: 16, _isTyping: 16 };
|
|
1166
1254
|
}
|
|
1167
1255
|
static {
|
|
1168
|
-
this.styles =
|
|
1256
|
+
this.styles = $e;
|
|
1169
1257
|
}
|
|
1170
1258
|
get solutionAIurl() {
|
|
1171
1259
|
return `${this.serverRoot}/skills/solution_deployment/chat`;
|
|
@@ -1179,7 +1267,7 @@ class gt extends ye {
|
|
|
1179
1267
|
this._isLoading = !0;
|
|
1180
1268
|
const e = this._inputRef.value.trim();
|
|
1181
1269
|
this._inputRef.value = "";
|
|
1182
|
-
let
|
|
1270
|
+
let t = {
|
|
1183
1271
|
message: e,
|
|
1184
1272
|
context: {
|
|
1185
1273
|
debug: !1,
|
|
@@ -1187,7 +1275,7 @@ class gt extends ye {
|
|
|
1187
1275
|
}
|
|
1188
1276
|
};
|
|
1189
1277
|
if (this.conversationStore.conversationId !== null) {
|
|
1190
|
-
if (
|
|
1278
|
+
if (t.conversationId = this.conversationStore.conversationId, this.token) {
|
|
1191
1279
|
const r = {
|
|
1192
1280
|
author: "human",
|
|
1193
1281
|
conversationId: this.conversationStore.conversationId ? this.conversationStore.conversationId : "",
|
|
@@ -1195,8 +1283,8 @@ class gt extends ye {
|
|
|
1195
1283
|
render: this._renderSimpleTextMessage(e, "human", "", "Other")
|
|
1196
1284
|
};
|
|
1197
1285
|
this.messages = [...this.messages, r];
|
|
1198
|
-
const
|
|
1199
|
-
this.loopRequest(
|
|
1286
|
+
const s = await this.requestAIServer(t, this.token, this.solutionAIurl);
|
|
1287
|
+
this.loopRequest(s, this.token, this.solutionAIurl);
|
|
1200
1288
|
}
|
|
1201
1289
|
} else if (this.token) {
|
|
1202
1290
|
const r = {
|
|
@@ -1205,122 +1293,115 @@ class gt extends ye {
|
|
|
1205
1293
|
render: this._renderSimpleTextMessage(e, "human", "", "Other")
|
|
1206
1294
|
};
|
|
1207
1295
|
this.messages = [...this.messages, r];
|
|
1208
|
-
const
|
|
1209
|
-
this.conversationStore.conversationId =
|
|
1296
|
+
const s = await this.requestAIServer(t, this.token, this.solutionAIurl);
|
|
1297
|
+
this.conversationStore.conversationId = s.conversationId, this.conversationStore.inquiryId = s.inquiryId, this.conversationStore.ackSequenceNumber = s.sequenceNumber, this.loopRequest(s, this.token, this.solutionAIurl);
|
|
1210
1298
|
}
|
|
1211
1299
|
}
|
|
1212
|
-
async loopRequest(e,
|
|
1213
|
-
let
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1300
|
+
async loopRequest(e, t, r) {
|
|
1301
|
+
let s = r;
|
|
1302
|
+
this._isLoading = !0;
|
|
1303
|
+
const a = document.createElement("div");
|
|
1304
|
+
a.classList.add("response-message", "message-content");
|
|
1305
|
+
let i = document.createElement("div");
|
|
1306
|
+
i.classList.add("display-none");
|
|
1307
|
+
const o = document.createElement("div");
|
|
1308
|
+
o.classList.add("display-none");
|
|
1309
|
+
const l = this._renderResponseBlock(a, i, o), h = new dt(this._currentResponse), c = {
|
|
1310
|
+
author: "ai",
|
|
1311
|
+
conversationId: e.conversationId,
|
|
1312
|
+
message: e.message ?? "",
|
|
1313
|
+
render: l
|
|
1314
|
+
};
|
|
1315
|
+
for (this.messages.push(c); e.hasMore; ) {
|
|
1316
|
+
await new Promise((x) => setTimeout(x, 500));
|
|
1317
|
+
let p = {
|
|
1318
|
+
conversationId: e.conversationId,
|
|
1319
|
+
ackSequenceNumber: e.sequenceNumber,
|
|
1320
|
+
inquiryId: e.inquiryId
|
|
1219
1321
|
};
|
|
1220
|
-
if (
|
|
1221
|
-
if (this.conversationStore.context =
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
conversationId: i.conversationId,
|
|
1233
|
-
context: {
|
|
1234
|
-
kind: "DocAIAssistantRequest",
|
|
1235
|
-
filters: {
|
|
1236
|
-
products: "ArcGIS Solutions"
|
|
1237
|
-
}
|
|
1238
|
-
}
|
|
1239
|
-
};
|
|
1240
|
-
a = this.docAIurl, t = await this.requestAIServer(o, s, a);
|
|
1241
|
-
break;
|
|
1242
|
-
case "Recommend solution":
|
|
1243
|
-
if (t.context.results) {
|
|
1244
|
-
const h = {
|
|
1245
|
-
author: "ai",
|
|
1246
|
-
conversationId: t.conversationId,
|
|
1247
|
-
message: t.message ?? "",
|
|
1248
|
-
intent: "Recommend solution",
|
|
1249
|
-
render: this._renderSuggestedSolutions(t.message ?? "", t.context.results, t.conversationId, "Recommend solution")
|
|
1250
|
-
};
|
|
1251
|
-
this.messages.push(h);
|
|
1322
|
+
if (e.context)
|
|
1323
|
+
if (this.conversationStore.context = e.context, e.context.results && !e.context.intent)
|
|
1324
|
+
for (const x of e.context.results)
|
|
1325
|
+
this._currentResponse = x.reply, this._currentResponse !== "" && (this._isLoading = !1, this._isTyping = !0, this._startTypeWriter(h, this._currentResponse, a, i, o)), e = await this.requestAIServer(p, t, s);
|
|
1326
|
+
else if (e.context.intent === "Solution question") {
|
|
1327
|
+
const x = {
|
|
1328
|
+
message: e.message,
|
|
1329
|
+
conversationId: p.conversationId,
|
|
1330
|
+
context: {
|
|
1331
|
+
kind: "DocAIAssistantRequest",
|
|
1332
|
+
filters: {
|
|
1333
|
+
products: "ArcGIS Solutions"
|
|
1252
1334
|
}
|
|
1253
|
-
break;
|
|
1254
|
-
default:
|
|
1255
|
-
this.messages.push({
|
|
1256
|
-
author: "ai",
|
|
1257
|
-
conversationId: t.conversationId,
|
|
1258
|
-
message: t.message ?? "",
|
|
1259
|
-
intent: "Other",
|
|
1260
|
-
render: this._renderSimpleTextMessage(t.message ?? "", "ai", t.conversationId, "Other")
|
|
1261
|
-
});
|
|
1262
|
-
break;
|
|
1263
|
-
}
|
|
1264
|
-
else if (t.context.results) {
|
|
1265
|
-
for (const o of t.context.results)
|
|
1266
|
-
if (o.reply !== "") {
|
|
1267
|
-
this._isLoadingText = "";
|
|
1268
|
-
const l = await Promise.resolve(d(o.reply));
|
|
1269
|
-
this.messages.push({
|
|
1270
|
-
message: l,
|
|
1271
|
-
author: "ai",
|
|
1272
|
-
conversationId: t.conversationId,
|
|
1273
|
-
intent: "Solution question",
|
|
1274
|
-
render: this._renderDocAssistantResults(l, o.reply, o.ref, o.followupQuestions, t.conversationId, "Solution question")
|
|
1275
|
-
});
|
|
1276
1335
|
}
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1336
|
+
};
|
|
1337
|
+
s = this.docAIurl, e = await this.requestAIServer(x, t, s);
|
|
1338
|
+
} else
|
|
1339
|
+
this._currentResponse = e.message ?? "", e.context.kind && e.context.kind.toLowerCase() === "ArcGISErrorAsContext".toLowerCase() && (this._currentResponse = this._translations.genericErrorMessage), this._currentResponse !== "" && (this._isLoading = !1, this._isTyping = !0, this._startTypeWriter(h, this._currentResponse, a, i, o)), e = await this.requestAIServer(p, t, s);
|
|
1340
|
+
else
|
|
1341
|
+
this._currentResponse = e.message ?? "", this._currentResponse !== "" && (this._isLoading = !1, this._isTyping = !0, this._startTypeWriter(h, this._currentResponse, a, i, o)), e = await this.requestAIServer(p, t, s);
|
|
1342
|
+
}
|
|
1343
|
+
this._isLoading = !1;
|
|
1344
|
+
const { context: u } = this.conversationStore, d = this.messages.length >= 2 ? this._getMostRecentQuestion() : "", k = typeof d == "string" ? "" : d?.message ?? "";
|
|
1345
|
+
if (u && u.intent)
|
|
1346
|
+
switch (u.intent) {
|
|
1347
|
+
case "Recommend solution": {
|
|
1348
|
+
if (u.results) {
|
|
1349
|
+
const p = u.results, x = p.map((E) => `- ${E.title}`).join(`
|
|
1350
|
+
`), v = this._renderSuggestedSolutions(p), q = this._renderFeedback(this._currentResponse + `
|
|
1351
|
+
` + x, k, this.conversationStore.conversationId, u.intent);
|
|
1352
|
+
$(v, i), $(q, o);
|
|
1353
|
+
} else
|
|
1354
|
+
i.innerHTML = "";
|
|
1355
|
+
this._scrollToBottom();
|
|
1356
|
+
break;
|
|
1357
|
+
}
|
|
1358
|
+
default: {
|
|
1359
|
+
const p = this._renderFeedback(this._currentResponse, k, this.conversationStore.conversationId, u.intent);
|
|
1360
|
+
$(p, o), this._scrollToBottom();
|
|
1291
1361
|
break;
|
|
1292
1362
|
}
|
|
1363
|
+
}
|
|
1364
|
+
else {
|
|
1365
|
+
if (u && u.results && !u.intent)
|
|
1366
|
+
for (const p of u.results) {
|
|
1367
|
+
const x = this._renderSolutionsQuestionTable(p.ref, p.followupQuestions), v = this._renderFeedback(this._currentResponse, k, this.conversationStore.conversationId, "Solution question");
|
|
1368
|
+
$(x, i), $(v, o);
|
|
1369
|
+
}
|
|
1370
|
+
else if (u && u.kind && u.kind.toLowerCase() === "ArcGISErrorAsContext".toLowerCase()) {
|
|
1371
|
+
const p = this._renderFeedback(this._currentResponse, k, this.conversationStore.conversationId, "Error");
|
|
1372
|
+
$(p, o);
|
|
1373
|
+
}
|
|
1374
|
+
this._scrollToBottom();
|
|
1293
1375
|
}
|
|
1294
|
-
this._isLoading = !1;
|
|
1295
1376
|
}
|
|
1296
|
-
async requestAIServer(e,
|
|
1377
|
+
async requestAIServer(e, t, r) {
|
|
1297
1378
|
try {
|
|
1298
1379
|
const a = await (await fetch(r, {
|
|
1299
1380
|
method: "POST",
|
|
1300
1381
|
headers: {
|
|
1301
1382
|
"Content-Type": "application/json",
|
|
1302
|
-
token:
|
|
1383
|
+
token: t
|
|
1303
1384
|
},
|
|
1304
1385
|
body: JSON.stringify(e)
|
|
1305
1386
|
})).json();
|
|
1306
1387
|
if (a)
|
|
1307
1388
|
return a;
|
|
1308
1389
|
throw new Error("No data returned");
|
|
1309
|
-
} catch (
|
|
1310
|
-
throw new Error(`Request failed: ${
|
|
1390
|
+
} catch (s) {
|
|
1391
|
+
throw new Error(`Request failed: ${s}`);
|
|
1311
1392
|
}
|
|
1312
1393
|
}
|
|
1313
1394
|
resetChat() {
|
|
1314
1395
|
const e = this.messages[this.messages.length - 1];
|
|
1315
1396
|
if (e.author !== "system" && e.conversationId !== "-1") {
|
|
1316
1397
|
this._resetConversation();
|
|
1317
|
-
const
|
|
1398
|
+
const t = {
|
|
1318
1399
|
author: "system",
|
|
1319
1400
|
conversationId: "-1",
|
|
1320
1401
|
message: this._translations.newConversationStarted,
|
|
1321
1402
|
render: this._renderSimpleTextMessage(this._translations.newConversationStarted, "system", "", "Other", "speech-bubble-plus")
|
|
1322
1403
|
};
|
|
1323
|
-
this.messages = [...this.messages,
|
|
1404
|
+
this.messages = [...this.messages, t], this._inputRef && (this._inputRef.value = "");
|
|
1324
1405
|
}
|
|
1325
1406
|
}
|
|
1326
1407
|
willUpdate(e) {
|
|
@@ -1336,60 +1417,147 @@ class gt extends ye {
|
|
|
1336
1417
|
updated(e) {
|
|
1337
1418
|
(e.size || this._isLoading) && this._scrollToBottom();
|
|
1338
1419
|
}
|
|
1339
|
-
_renderFeedback(e,
|
|
1340
|
-
return b
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1420
|
+
_renderFeedback(e, t, r, s) {
|
|
1421
|
+
return b`
|
|
1422
|
+
<div>
|
|
1423
|
+
<calcite-button
|
|
1424
|
+
appearance='transparent'
|
|
1425
|
+
class='height-32-flex-auto'
|
|
1426
|
+
icon-start='thumbs-up'
|
|
1427
|
+
label='position feedback'
|
|
1428
|
+
kind='neutral'
|
|
1429
|
+
@click=${() => {
|
|
1430
|
+
this._sendFeedback(e, t, "Good", r, s);
|
|
1431
|
+
}}
|
|
1432
|
+
>
|
|
1433
|
+
</calcite-button>
|
|
1434
|
+
|
|
1435
|
+
<calcite-button
|
|
1436
|
+
appearance='transparent'
|
|
1437
|
+
class='height-32-flex-auto'
|
|
1438
|
+
icon-start='thumbs-down'
|
|
1439
|
+
label='position feedback'
|
|
1440
|
+
kind='neutral'
|
|
1441
|
+
@click=${() => {
|
|
1442
|
+
this._sendFeedback(e, t, "Bad", r, s);
|
|
1443
|
+
}}
|
|
1444
|
+
>
|
|
1445
|
+
</calcite-button>
|
|
1446
|
+
|
|
1447
|
+
<calcite-button
|
|
1448
|
+
appearance='transparent'
|
|
1449
|
+
class='height-32-flex-auto'
|
|
1450
|
+
icon-start='copy'
|
|
1451
|
+
label='position feedback'
|
|
1452
|
+
kind='neutral'
|
|
1453
|
+
@click=${(a) => {
|
|
1345
1454
|
this._copyResponseToClipboard(e, a);
|
|
1346
|
-
}}
|
|
1455
|
+
}}
|
|
1456
|
+
>
|
|
1457
|
+
</calcite-button>
|
|
1458
|
+
</div>
|
|
1459
|
+
`;
|
|
1347
1460
|
}
|
|
1348
1461
|
_renderSolutionQuestionReferences(e) {
|
|
1349
|
-
return
|
|
1462
|
+
return b`
|
|
1463
|
+
${e.map((t) => b`
|
|
1464
|
+
<div class='message-content-pad'>
|
|
1465
|
+
<a href=${t.url} target='_blank'>
|
|
1466
|
+
${t.title}
|
|
1467
|
+
</a>
|
|
1468
|
+
</div>
|
|
1469
|
+
`)}
|
|
1470
|
+
`;
|
|
1350
1471
|
}
|
|
1351
1472
|
_renderSolutionQuestionFollowup(e) {
|
|
1352
|
-
return
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1473
|
+
return b`
|
|
1474
|
+
${e.map((t) => b`
|
|
1475
|
+
<calcite-chip
|
|
1476
|
+
class='chip-content cursor-pointer'
|
|
1477
|
+
kind='brand'
|
|
1478
|
+
label=${t}
|
|
1479
|
+
@click=${() => {
|
|
1480
|
+
this._submitFollowupQuestion(t);
|
|
1481
|
+
}}
|
|
1482
|
+
>
|
|
1483
|
+
${t}
|
|
1484
|
+
</calcite-chip>
|
|
1485
|
+
`)}
|
|
1486
|
+
`;
|
|
1487
|
+
}
|
|
1488
|
+
_renderSolutionsQuestionTable(e, t) {
|
|
1489
|
+
const r = this._renderSolutionQuestionReferences(e), s = this._renderSolutionQuestionFollowup(t);
|
|
1490
|
+
return b`
|
|
1491
|
+
<div slot='description' class='message-content'>
|
|
1492
|
+
<div style='display: flex; justify-content: flex-start;'>
|
|
1493
|
+
<calcite-button
|
|
1494
|
+
appearance='outline'
|
|
1495
|
+
icon-end='chevron-down'
|
|
1496
|
+
icon-start='link'
|
|
1497
|
+
@click=${(a) => {
|
|
1498
|
+
const i = a.currentTarget, o = i.parentElement.nextElementSibling;
|
|
1499
|
+
o.classList.toggle("collapsed"), i.setAttribute("icon-end", o.classList.contains("collapsed") ? "chevron-down" : "chevron-up");
|
|
1500
|
+
}}
|
|
1501
|
+
>
|
|
1502
|
+
${e.length}
|
|
1503
|
+
${e.length === 1 ? this._translations.solutionsDocReference : this._translations.solutionsDocReferences}
|
|
1504
|
+
</calcite-button>
|
|
1505
|
+
</div>
|
|
1506
|
+
|
|
1507
|
+
<div class='references-container collapsed'>
|
|
1508
|
+
${r}
|
|
1509
|
+
</div>
|
|
1510
|
+
</div>
|
|
1511
|
+
|
|
1512
|
+
<div class='padding-top-10'>
|
|
1513
|
+
${s}
|
|
1514
|
+
</div>
|
|
1515
|
+
`;
|
|
1516
|
+
}
|
|
1517
|
+
_renderSolutionCard(e, t) {
|
|
1518
|
+
return b`
|
|
1519
|
+
<a
|
|
1520
|
+
class='solution-card'
|
|
1521
|
+
id='${t}'
|
|
1522
|
+
@click=${() => this._emitItemIdFromAI(t)}
|
|
1523
|
+
>
|
|
1524
|
+
<calcite-card thumbnail-position='inline-start'>
|
|
1525
|
+
<div slot='thumbnail'>
|
|
1526
|
+
<img src='${e.thumbnail}' alt='Thumbnail' />
|
|
1527
|
+
<calcite-chip icon='launch' label='View solution'>
|
|
1528
|
+
${this._translations.viewSolutionInApp}
|
|
1529
|
+
</calcite-chip>
|
|
1530
|
+
</div>
|
|
1531
|
+
|
|
1532
|
+
<h3 slot='heading'><b>${e.title}</b></h3>
|
|
1533
|
+
|
|
1534
|
+
<span slot='description'>${e.snippet}</span>
|
|
1535
|
+
</calcite-card>
|
|
1536
|
+
</a>
|
|
1537
|
+
`;
|
|
1538
|
+
}
|
|
1539
|
+
_renderResponseBlock(e, t, r) {
|
|
1540
|
+
return b`<calcite-card class=system-message>${e}${t}${r}</calcite-card>`;
|
|
1541
|
+
}
|
|
1542
|
+
_renderSimpleTextMessage(e, t, r, s, a) {
|
|
1376
1543
|
const i = this.messages.length >= 2 ? this._getMostRecentQuestion() : "", o = typeof i == "string" ? "" : i?.message ?? "";
|
|
1377
|
-
return
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
const
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1544
|
+
return t === "system" ? b`<div class="message-content message-content-alignment">${a && b`<calcite-icon .icon=${a}></calcite-icon>` || ""}${e}</div>` : b`<calcite-card class=${Te(t === "human" ? "user-message" : "system-message")}><div class="message-content">${e}${t === "ai" && r !== "" && this._renderFeedback(e, o, r, s) || ""}</div></calcite-card>`;
|
|
1545
|
+
}
|
|
1546
|
+
_renderSuggestedSolutions(e) {
|
|
1547
|
+
const t = e.map((r) => {
|
|
1548
|
+
const s = r.thumbnail.match(/\/items\/([a-f0-9]+)\//);
|
|
1549
|
+
return s ? this._renderSolutionCard(r, s[1]) : null;
|
|
1550
|
+
}).filter((r) => r !== null);
|
|
1551
|
+
return b`
|
|
1552
|
+
<div class='message-content'>
|
|
1553
|
+
${t}
|
|
1554
|
+
</div>
|
|
1555
|
+
`;
|
|
1388
1556
|
}
|
|
1389
1557
|
render() {
|
|
1390
1558
|
return b`<calcite-dialog class="chat-panel" .open=${this.open} resizable .heading=${this._translations.solutionAssistantTitle} id=example-dialog placement=bottom-start @calciteDialogClose=${() => {
|
|
1391
1559
|
this.closeAssistant.emit(!0), this.open = !1;
|
|
1392
|
-
}}><span class="chat-panel-heading" slot=header-content><span class="padding-right-8">${this._translations.solutionAssistantTitle}</span><calcite-chip .label=${this._translations.betaTag} .value=${this._translations.betaTag}>${this._translations.betaTag}</calcite-chip></span>${this.messages.length > 1 ? b`<calcite-button @click=${this.resetChat} slot=header-actions-end appearance=transparent icon-end=speech-bubble-plus label="New conversation" kind=neutral></calcite-button>` : ""}<div class="chat-messages" ${te(this._setMessageContainerRef)}>${this.messages.map((e) => e.render)}${this._isLoading && b`<calcite-card class="loader-message"><div class="message-content display-flex-row"><calcite-loader .label=${this._isLoadingText} inline scale=s></calcite-loader>${this._isLoadingText != "" && b`<div class="padding-left-10">${this._isLoadingText}</div>` || ""}</div></calcite-card>` || ""}</div><div slot=footer class="width-100"><div class="chat-input"><calcite-text-area resize=none rows=3 .placeholder=${this._translations.sendMessage} value ${te(this._setInputRef)}></calcite-text-area><calcite-button icon-start=send appearance=outline kind=neutral @click=${this.handleSendMessage} .disabled=${!!this._isLoading}></calcite-button></div><div class="disclaimer-div padding-top-10" slot=footer><calcite-icon icon=information scale=s></calcite-icon>${this._translations.disclaimerMessage}<a href=https://trust.arcgis.com/en/security-concern/ target=_blank>${this._translations.reportConcern}</a></div></div></calcite-dialog>`;
|
|
1560
|
+
}}><span class="chat-panel-heading" slot=header-content><span class="padding-right-8">${this._translations.solutionAssistantTitle}</span><calcite-chip .label=${this._translations.betaTag} .value=${this._translations.betaTag}>${this._translations.betaTag}</calcite-chip></span>${this.messages.length > 1 ? b`<calcite-button @click=${this.resetChat} slot=header-actions-end appearance=transparent icon-end=speech-bubble-plus label="New conversation" kind=neutral .disabled=${!!this._isLoading || this._isTyping}></calcite-button>` : ""}<div class="chat-messages" ${te(this._setMessageContainerRef)}>${this.messages.map((e) => e.render)}${this._isLoading && b`<calcite-card class="loader-message"><div class="message-content display-flex-row"><calcite-loader .label=${this._isLoadingText} inline scale=s></calcite-loader>${this._isLoadingText != "" && b`<div class="padding-left-10">${this._isLoadingText}</div>` || ""}</div></calcite-card>` || ""}</div><div slot=footer class="width-100"><div class="chat-input"><calcite-text-area resize=none rows=3 .placeholder=${this._translations.sendMessage} value .disabled=${!!this._isLoading || this._isTyping} ${te(this._setInputRef)}></calcite-text-area><calcite-button icon-start=send appearance=outline kind=neutral @click=${this.handleSendMessage} .disabled=${!!this._isLoading || this._isTyping}></calcite-button></div><div class="disclaimer-div padding-top-10" slot=footer><calcite-icon icon=information scale=s></calcite-icon>${this._translations.disclaimerMessage}<a href=https://trust.arcgis.com/en/security-concern/ target=_blank>${this._translations.reportConcern}</a></div></div></calcite-dialog>`;
|
|
1393
1561
|
}
|
|
1394
1562
|
_scrollToBottom() {
|
|
1395
1563
|
this._chatContainer && setTimeout(() => {
|
|
@@ -1397,9 +1565,9 @@ class gt extends ye {
|
|
|
1397
1565
|
}, 100);
|
|
1398
1566
|
}
|
|
1399
1567
|
_emitItemIdFromAI(e) {
|
|
1400
|
-
this._querySolutions(e).then((
|
|
1401
|
-
const
|
|
1402
|
-
detail:
|
|
1568
|
+
this._querySolutions(e).then((t) => {
|
|
1569
|
+
const s = t.typeKeywords.filter((i) => i.includes("solutionid")), a = new CustomEvent("solutionIDFromAssistant", {
|
|
1570
|
+
detail: s.length > 0 ? s[0] : e,
|
|
1403
1571
|
bubbles: !0,
|
|
1404
1572
|
composed: !0
|
|
1405
1573
|
});
|
|
@@ -1407,33 +1575,44 @@ class gt extends ye {
|
|
|
1407
1575
|
});
|
|
1408
1576
|
}
|
|
1409
1577
|
_submitFollowupQuestion(e) {
|
|
1410
|
-
const
|
|
1578
|
+
const t = new CustomEvent("submitQuestion", {
|
|
1411
1579
|
detail: e,
|
|
1412
1580
|
bubbles: !0,
|
|
1413
1581
|
composed: !0
|
|
1414
1582
|
});
|
|
1415
|
-
window.dispatchEvent(
|
|
1583
|
+
window.dispatchEvent(t);
|
|
1416
1584
|
}
|
|
1417
1585
|
_getMostRecentQuestion() {
|
|
1418
1586
|
return [...this.messages].reverse().find((e) => e.author === "human") || null;
|
|
1419
1587
|
}
|
|
1420
1588
|
async _querySolutions(e) {
|
|
1421
|
-
const
|
|
1422
|
-
if ("error" in
|
|
1423
|
-
throw new Error(
|
|
1424
|
-
return
|
|
1589
|
+
const t = await Ie(e);
|
|
1590
|
+
if ("error" in t)
|
|
1591
|
+
throw new Error(t.error);
|
|
1592
|
+
return t;
|
|
1425
1593
|
}
|
|
1426
|
-
_sendFeedback(e,
|
|
1427
|
-
const i = `https://survey123.arcgis.com/share/6e349a50b4504ca6b6107216d568db5f?field:_source=${encodeURIComponent("Solutions Assistant")}&field:user_evaluation=${encodeURIComponent(r)}&field:question=${encodeURIComponent(
|
|
1594
|
+
_sendFeedback(e, t, r, s, a) {
|
|
1595
|
+
const i = `https://survey123.arcgis.com/share/6e349a50b4504ca6b6107216d568db5f?field:_source=${encodeURIComponent("Solutions Assistant")}&field:user_evaluation=${encodeURIComponent(r)}&field:question=${encodeURIComponent(t)}&field:answer=${encodeURIComponent(e)}&field:context=${encodeURIComponent(JSON.stringify({ intent: a }))}&field:conversation_id=${encodeURIComponent(s)}&field:version=${encodeURIComponent("v1")}`;
|
|
1428
1596
|
window.open(i, "_blank");
|
|
1429
1597
|
}
|
|
1430
|
-
_copyResponseToClipboard(e,
|
|
1598
|
+
_copyResponseToClipboard(e, t) {
|
|
1431
1599
|
navigator.clipboard.writeText(e);
|
|
1432
|
-
const r =
|
|
1600
|
+
const r = t.currentTarget;
|
|
1433
1601
|
r.iconStart = "check", setTimeout(() => {
|
|
1434
1602
|
r.iconStart = "copy";
|
|
1435
1603
|
}, 3e3);
|
|
1436
1604
|
}
|
|
1605
|
+
_startTypeWriter(e, t, r, s, a) {
|
|
1606
|
+
if (t.length > 0) {
|
|
1607
|
+
e.setText(t);
|
|
1608
|
+
const i = async () => {
|
|
1609
|
+
e.updateDisplayText();
|
|
1610
|
+
const o = e.getText();
|
|
1611
|
+
r.innerHTML = await f.parse(o), o.length < this._currentResponse.length ? (this._scrollToBottom(), setTimeout(i, 5)) : (this._isTyping = !1, s.classList.remove("display-none"), a.classList.remove("display-none"));
|
|
1612
|
+
};
|
|
1613
|
+
i();
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1437
1616
|
}
|
|
1438
1617
|
we("arcgis-solutions-assistant", gt);
|
|
1439
1618
|
export {
|