From 9faf89922e84646ca5c510767bb0f4acd400aaac Mon Sep 17 00:00:00 2001 From: antmicrobot Date: Fri, 7 Mar 2025 07:34:00 +0000 Subject: [PATCH] deploy: b61d3226b843df253bb10d58aeb5d55fa33860fc --- MystEditor.js | 103762 +++++++-------- docs/_static/basic.css | 23 +- .../0204e961adca27dd4947c6df130dd96f.woff2 | Bin 0 -> 21580 bytes .../026a36b060c2ef6c88ac125a50e8b4c9.woff2 | Bin 0 -> 14924 bytes .../027cb81785975d282bd176dd05d6cd51.woff2 | Bin 0 -> 21140 bytes .../03b722034d0d2adc8c2b1b1d8e15f965.ttf | Bin 29176 -> 0 bytes .../05ada379c350a1406544195bc7289117.woff2 | Bin 0 -> 7840 bytes .../079efa5d2641f256a97c9c802c168ef3.woff2 | Bin 0 -> 7840 bytes .../0e100b86870ec5caaa887e0fe743b177.woff2 | Bin 19780 -> 0 bytes .../0e14f6ba4a76b5ed0302033fb767bada.woff2 | Bin 0 -> 18824 bytes .../0ef8a8fa25c458bcf4ac50a6dd593225.woff2 | Bin 0 -> 20684 bytes .../0f08976903cdc6cf8d005eb19d9c4da1.woff2 | Bin 16612 -> 0 bytes .../0f65443c2941435f9a90afb8921573f4.woff2 | Bin 0 -> 10596 bytes .../0fe4d8168abe6e917ef92b63a22ebccb.woff2 | Bin 0 -> 11596 bytes .../1073aeaac325164172146c0bd83b8e30.woff2 | Bin 7708 -> 0 bytes .../120343f7d6af93349482e59eb53ebbd7.woff2 | Bin 6992 -> 0 bytes .../131ca06998d2a2d721880706f0116365.woff2 | Bin 1496 -> 0 bytes .../13a6a5927667a6c96cab1890afa665e8.woff2 | Bin 7028 -> 0 bytes .../13a92d073c751034247a6d47e8134fdd.woff2 | Bin 0 -> 19708 bytes .../14ca7ef3a35fe2962fadfede864a5c4c.ttf | Bin 29464 -> 0 bytes .../16ef93a23793ea9defec5f01265a3fdc.woff2 | Bin 0 -> 10028 bytes .../17111913977f7ec5077bbdbc046fbc6a.woff2 | Bin 0 -> 3688 bytes .../1939f1a326cdc3ca24136297f8693ae6.ttf | Bin 27492 -> 0 bytes .../19d51705651235d6b681666f4b0d0403.woff2 | Bin 1456 -> 0 bytes .../1a7270887e0329d01f135e4591fef6bc.woff2 | Bin 12300 -> 0 bytes .../1b150c409df2cca1e55ffc6e55b64998.woff2 | Bin 18436 -> 0 bytes .../1b1a774a3e0e9b725eaa711a2afb7392.woff2 | Bin 0 -> 11456 bytes .../1bbd1c7eb550168d3a349e49e36c2a44.woff2 | Bin 0 -> 9680 bytes .../2126c6e0f6bcaf91253655e7fcce2851.ttf | Bin 0 -> 31648 bytes .../219dddc355ee1f0ae550a97bae8a2531.woff2 | Bin 0 -> 19976 bytes .../21a4306e449be7b5403a98b97f9dd0f9.woff2 | Bin 0 -> 10728 bytes .../2219c8fe3e890839e81f64c63cfb6131.woff2 | Bin 6220 -> 0 bytes .../22907d0beca92d41cc7ed6a5c91a7855.ttf | Bin 0 -> 33004 bytes .../23fa730ff9e71e652b7416d11b9b5a17.woff2 | Bin 19720 -> 0 bytes .../264c5b476ab42c43d6af4c257bb04477.woff2 | Bin 0 -> 16860 bytes .../26646b9d877d16236aa3267f8231ca4c.woff2 | Bin 0 -> 12840 bytes .../26d5039523e5456735778567a83e0af0.woff2 | Bin 5972 -> 0 bytes .../278aea57f792d9056837c4ded508ebc7.ttf | Bin 0 -> 31412 bytes .../28d2d42c2dc05f74362e21c4810e20cf.woff2 | Bin 0 -> 8296 bytes .../2a9ccbf9e2fc7ffc329cabcb326cac11.woff2 | Bin 0 -> 20448 bytes .../2ccecb9cb31bf1fb12644697ca46e0bf.woff2 | Bin 0 -> 12772 bytes .../2dc356092de7c114b1259e518a7f539a.woff2 | Bin 0 -> 18920 bytes .../2de1a52b5a1ee8049633825118f7cd4f.woff2 | Bin 0 -> 11588 bytes .../2e43802a9d1556dbe360c22e2b85a597.woff2 | Bin 0 -> 20712 bytes .../2e542495db1666774ba22396a147363c.woff2 | Bin 10492 -> 0 bytes .../2e991b4c7e5e35481357bf270b4d10e3.woff2 | Bin 0 -> 10996 bytes .../2f39871937f1093b0ff8429081c6ec7b.woff2 | Bin 0 -> 9512 bytes .../2f45b23744b48cb8432ebce3a7785b15.woff2 | Bin 0 -> 16156 bytes .../2fdf026badd63aad0ca82a950790c3ad.woff2 | Bin 0 -> 3668 bytes .../3006d9e284f581cfdc1184327dcdbbd6.woff2 | Bin 1520 -> 0 bytes .../31ce4972e0eedf25b993cb820d192cdf.woff2 | Bin 0 -> 14580 bytes .../334ef0433aba9da180c94265157590f8.woff2 | Bin 0 -> 22600 bytes .../341f33a3175e59ee248841561c5dd079.woff2 | Bin 14740 -> 0 bytes .../357f5f8032b9f64eef7164aef48e666f.ttf | Bin 27600 -> 0 bytes .../35af4c2de4e2c4660f0a0b855e9f6257.woff2 | Bin 7040 -> 0 bytes .../3762e1dc4b62febc4a7ba87dc6636fb9.woff2 | Bin 6104 -> 0 bytes .../3774b4ecc75b5d7dbf2ec07da7fb53e4.woff2 | Bin 0 -> 9652 bytes .../37e91aace1626ae9dd3ad09616137440.woff2 | Bin 0 -> 8268 bytes .../38ccf714b4ea1dadffd6c8331207b59a.woff2 | Bin 6904 -> 0 bytes .../3937a4c765110f2cc43d71e4daccfc13.woff2 | Bin 0 -> 15052 bytes .../3a15483d5724c153b48a077b14dfaa88.woff2 | Bin 7464 -> 0 bytes .../3abee1c50f8647f9b9e3ed2cf033c5f1.woff2 | Bin 9916 -> 0 bytes .../3b6666c0da3a7fc7977e7ad30d57a213.woff2 | Bin 0 -> 10624 bytes .../3b9319ab8a1ceb8d389b36fdf38563df.woff2 | Bin 1432 -> 0 bytes .../3bd701133164902559a25de85d1b4469.woff2 | Bin 6144 -> 0 bytes .../3e253f072fd8cb460de5e9daadfcc565.woff2 | Bin 0 -> 21516 bytes .../3e7f3b6d1673bd1657351359f56098bb.woff2 | Bin 10656 -> 0 bytes .../3e8f8a1d4f1a37245c6b7acbaa44a6c0.woff2 | Bin 12280 -> 0 bytes .../3ea86f7af28127ab72926d7d02bcf844.woff2 | Bin 16756 -> 0 bytes .../3eb393e3a3d57bfe84e0705f86a042da.woff2 | Bin 0 -> 17144 bytes .../3eee1b519e5b90cff820f524b33c1cc6.woff2 | Bin 5708 -> 0 bytes .../40658872e30aa3894c64651b230c499c.woff2 | Bin 13376 -> 0 bytes .../40d9a7ba120fbde112edc76a0e9f27fc.woff2 | Bin 0 -> 14940 bytes .../41296e2fc02a317e987764189f413ae2.ttf | Bin 0 -> 32924 bytes .../440e01dd2a67e0b4c218f98812398c1a.woff2 | Bin 12276 -> 0 bytes .../4caa7d82d0e5f6f127292f4f4c9af27a.woff2 | Bin 0 -> 11832 bytes .../4d539033909dd344ae868f1c72bd0fc3.woff2 | Bin 9852 -> 0 bytes .../4dbd328e347e890a801d51f9a5f8d38a.woff2 | Bin 18492 -> 0 bytes .../4e6d69d748044d096e9487d38ffb071c.woff2 | Bin 0 -> 18668 bytes .../4f1c4dcb9abc50152da5adbadf7f3a7f.ttf | Bin 29304 -> 0 bytes .../502c4e3ebeec1d459f951ff48e366c1e.woff2 | Bin 10836 -> 0 bytes .../512757a4e09f30e718530112a3be087c.woff2 | Bin 0 -> 3716 bytes .../51cf6e070062fa3bdd98929a6990aaf6.ttf | Bin 27376 -> 0 bytes .../51d978655b85a660b5ec352ab9eff784.woff2 | Bin 0 -> 8148 bytes .../52672870c9b3b0e5d8e74c9fdd522491.woff2 | Bin 0 -> 11604 bytes .../529667aea70b09ba8845845f8b791127.woff2 | Bin 0 -> 20236 bytes .../52b46681173c8d9cd37d72d1e5e4961d.woff2 | Bin 0 -> 7880 bytes .../542e2fd31336075667f486dbb0e086fd.woff2 | Bin 0 -> 8144 bytes .../5455d104d24e629c711b3a47b06e292e.woff2 | Bin 0 -> 14976 bytes .../550faacd31f18c0b9cfa0ab0825b94ed.woff2 | Bin 0 -> 18876 bytes .../573686b2c958c4fbc7f25726f642ddb0.woff2 | Bin 9684 -> 0 bytes .../5ae9b4b2ee6c8b3ded2d4008ccf058b7.woff2 | Bin 0 -> 22620 bytes .../5c20fe772ae00739c191fcf5fc92d383.woff2 | Bin 0 -> 9876 bytes .../5dcee8c3104fde5a91ac68bb640a4343.woff2 | Bin 9348 -> 0 bytes .../5eb5872bb169d41a79e46876e0441311.woff2 | Bin 0 -> 14052 bytes .../5f72bfaf9e281f741c41abe46dff3e1d.woff2 | Bin 0 -> 21332 bytes .../5ffe9ffb4b41fbbbe4890283818779a4.woff2 | Bin 0 -> 13964 bytes .../61e97a841678fbbfc045bcdcaa684820.woff2 | Bin 12324 -> 0 bytes .../666d5c2b0e7ef0cc2c46675b88b5867c.woff2 | Bin 5796 -> 0 bytes .../66a3ee81b536d3a0b26b43a49a1c3a78.woff2 | Bin 1516 -> 0 bytes .../66b26b3c84c6a918a3c1d323b81184cf.woff2 | Bin 0 -> 22444 bytes .../685dd0a4dbede9c486deb28acfbd6a23.woff2 | Bin 12456 -> 0 bytes .../687be4960a39c10a273737014ea979c6.woff2 | Bin 14932 -> 0 bytes .../6ae8f8b730d4bfe372997d78612486ac.woff2 | Bin 0 -> 14716 bytes .../6b4464ee024fff1bd7a9f622659eaaea.woff2 | Bin 0 -> 8304 bytes .../6b76c51e06a497bee64b065b08ad96b8.woff2 | Bin 0 -> 3668 bytes .../6c29edce0214f7ce5c29596630dda4df.woff2 | Bin 0 -> 22544 bytes .../6ea4bf3cac225e29318cd2a18a4f9ffa.woff2 | Bin 0 -> 14172 bytes .../6fea4c96d85aafe12ccfa3a7403b3fd4.woff2 | Bin 0 -> 19936 bytes .../707a3c6374c2f18803e678b898805e89.ttf | Bin 0 -> 31352 bytes .../70df311f920b9db2b2647692b885aed8.woff2 | Bin 0 -> 12796 bytes .../723cbd6f8aa09d478166cf4b328ec440.woff2 | Bin 0 -> 10184 bytes .../7426b8382b0c7ce632df53261dce20be.woff2 | Bin 0 -> 13996 bytes .../742a490470ad5add81a8614602f59609.woff2 | Bin 0 -> 9644 bytes .../752686e9f1580c8dc3eef03805ffd49e.woff2 | Bin 0 -> 7688 bytes .../75a25b58be61bbb058c77748d3c49526.woff2 | Bin 0 -> 11968 bytes .../75d351ba4b7ae0ba4a2287ef48ae282b.woff2 | Bin 0 -> 3716 bytes .../7608821ae7a01e76cb42e6fda12421e5.woff2 | Bin 0 -> 20940 bytes .../7635b26cac7923a2a94ad867d41afe4c.woff2 | Bin 0 -> 3676 bytes .../78147236d857659d7bec2b8a7a4d550b.woff2 | Bin 0 -> 10164 bytes .../79003e6320341ae4b3dc73aafa30e2a6.woff2 | Bin 0 -> 18488 bytes .../79e33408703a4c71c3b985b963a5d516.woff2 | Bin 0 -> 9468 bytes .../7a2d85e3ad5d0c32501a3333acbdbd2d.woff2 | Bin 16688 -> 0 bytes .../7a2e71719d906e861fe904f6da1007bd.woff2 | Bin 7636 -> 0 bytes .../7a5681247aa6fc3418022342557bf3e3.woff2 | Bin 0 -> 3708 bytes .../7a8bcfe0a68bb4832124e2e022554fa3.woff2 | Bin 0 -> 10048 bytes .../7c83b4151a7751d87ec6c58315cc6553.ttf | Bin 0 -> 31544 bytes .../7cd81183773ec9425bb4eb94f9ccc900.woff2 | Bin 16220 -> 0 bytes .../7ef81fadcc090047e1c258f05066207d.woff2 | Bin 0 -> 17216 bytes .../80b21d8db6045c871d36ad4a2c985722.woff2 | Bin 0 -> 3680 bytes .../813f3d53b027f6524f04ff51c8d64ac1.woff2 | Bin 14704 -> 0 bytes .../831095a78c8e25c05ab5964c5638bb7c.woff2 | Bin 20356 -> 0 bytes .../8322da20355935bc6607d6c19efe77fe.woff2 | Bin 16896 -> 0 bytes .../85b7e87c4d7247aaf8824e30b4144465.woff2 | Bin 0 -> 11744 bytes .../8638bf59a1e3ceb5b51df17bcf7bd7fc.woff2 | Bin 0 -> 9608 bytes .../889051bf739e69216d6a5162d29e7099.woff2 | Bin 7180 -> 0 bytes .../88b7c5e61902ab86691356a44517e57e.woff2 | Bin 0 -> 3660 bytes .../88dd336ac71fda6c70afb29082242181.ttf | Bin 0 -> 31444 bytes .../89978e658e840b927dddb5cb3a835c7d.woff2 | Bin 18536 -> 0 bytes .../89bd2cbbc4b133be434990f66ea692cb.woff2 | Bin 0 -> 11576 bytes .../8a08f5c435eed0f2414b3eeb3ce8c217.woff2 | Bin 0 -> 19940 bytes .../8a47e21790be9e92c8c54c2b1010c6fa.woff2 | Bin 1520 -> 0 bytes .../8b2d64f6d23946898f16996a57615871.woff2 | Bin 14988 -> 0 bytes .../8e67a526354c56c027c959a53b68147e.woff2 | Bin 0 -> 20668 bytes .../900521ad02892f97a92195fca71a2bf1.ttf | Bin 0 -> 31396 bytes .../90fa3a806a065c614ee8658cd82db50d.woff2 | Bin 13100 -> 0 bytes .../92cb00f145932cc8a9163f2bf6acfc25.ttf | Bin 0 -> 32996 bytes .../92e018250353983874a958541296cfa6.woff2 | Bin 0 -> 10020 bytes .../94333af3cbb89d3b83773d25618f1706.woff2 | Bin 0 -> 17592 bytes .../9462ffde1e6cc0db617644b0919fb034.woff2 | Bin 12304 -> 0 bytes .../96643bfad5a17eada947d70744155920.woff2 | Bin 18540 -> 0 bytes .../96a6a4e9dd5d1505226c82c13d410deb.woff2 | Bin 0 -> 3672 bytes .../96dbb7d9188b2e0703f002e68077f967.woff2 | Bin 0 -> 11524 bytes .../98901a616b22ef6dbca6abebf3560b6b.woff2 | Bin 0 -> 19736 bytes .../99304d217c52040274afe94947bed445.ttf | Bin 27472 -> 0 bytes .../99defe51be9b937614886fde910341ac.woff2 | Bin 1536 -> 0 bytes .../9b2da7c38d34ace18801291959a5fc03.woff2 | Bin 5864 -> 0 bytes .../9f226239b7cb86705238ec5a036a05bd.woff2 | Bin 9780 -> 0 bytes .../9f5373acc7aac4a2e89d0f34f4c6b675.woff2 | Bin 16080 -> 0 bytes .../9faa7062eb32d692b0b5f69f0e42fe62.woff2 | Bin 0 -> 12220 bytes .../a002f3e1a6bb50585fff1ba3e11ea497.woff2 | Bin 7656 -> 0 bytes .../a08aab97ea21fc5299645d12e3ef57bf.woff2 | Bin 0 -> 19660 bytes .../a147e4366336588aae172d59e25deef1.woff2 | Bin 0 -> 11460 bytes .../a2d2c60ad40172211ff4782075414565.woff2 | Bin 0 -> 12532 bytes .../a346eb01892d90d3150a27bcc3490add.woff2 | Bin 0 -> 12640 bytes .../a4573fe61a809de65a2ca63b88cf8eb6.woff2 | Bin 1468 -> 0 bytes .../a4793727e4c54702fcb599f2c9ee07c0.ttf | Bin 0 -> 33056 bytes .../a4afb0badd14ab3594ee2ef01392b285.woff2 | Bin 0 -> 7920 bytes .../a5e63948f7d9560d9b409d02edd64707.ttf | Bin 0 -> 31604 bytes .../a620860b63de9c40dac9a59b0094c61a.woff2 | Bin 0 -> 17160 bytes .../a6760631fecfe59ed152aeb2c51fdcb5.woff2 | Bin 20144 -> 0 bytes .../a68929959750fba2f6aec7649a516350.woff2 | Bin 0 -> 10796 bytes .../a712dd5fa12c7c09e52d44cfce499e33.woff2 | Bin 0 -> 14704 bytes .../a741ffbc1d695f6b9a9874e2da982dcf.ttf | Bin 27380 -> 0 bytes .../a81d5af4d9300ece4bfa274e6cb342b3.woff2 | Bin 1472 -> 0 bytes .../a82cf4c922189b14c3f7ebe5a2d8b6ce.woff2 | Bin 20160 -> 0 bytes .../a84df1f533205686b83a3232b24efa87.woff2 | Bin 0 -> 8232 bytes .../a94c81d0b3f6bb97fd97cfcfbfa5dcaf.woff2 | Bin 0 -> 16912 bytes .../a966ed9a844cd60b56d4e1b31b0051fe.woff2 | Bin 0 -> 13736 bytes .../aa221a8437ff853e43e8ec3503c2ff16.woff2 | Bin 15336 -> 0 bytes .../aae577798ff3f4e9e1d9640a97dea39a.woff2 | Bin 0 -> 16848 bytes .../ab0a020935184477d441bd13b3b9e642.woff2 | Bin 0 -> 19680 bytes .../ab65e77bbdfee66149ed7d6d7f74fbc7.ttf | Bin 0 -> 31404 bytes .../add79d702aef2d1f1cf4865df00911e0.woff2 | Bin 0 -> 10576 bytes .../ae0e442895406e9922237108496c2cd6.woff2 | Bin 18588 -> 0 bytes .../af09b935bb3d7e0f6541002b82baf166.woff2 | Bin 0 -> 18748 bytes .../b0ec4e94b74476aadd54bb284ac62bcb.ttf | Bin 29576 -> 0 bytes .../b11d18aa18f784f9afe47af79ad5ed5b.woff2 | Bin 7564 -> 0 bytes .../b17158b92ca6f9303712a3378bfb5636.woff2 | Bin 0 -> 8148 bytes .../b1a8d0a7022bc255536b407158b1dc07.woff2 | Bin 13352 -> 0 bytes .../b39a3761f41f9476dfd827446487cb79.woff2 | Bin 0 -> 7840 bytes .../b5b98bb4e5069d0f063d919167ba6653.woff2 | Bin 0 -> 7764 bytes .../b5c6e34d471a72326c3151f6f89b70b3.woff2 | Bin 0 -> 7840 bytes .../b731d7319cdb737328329a1e9e3a5280.woff2 | Bin 0 -> 21544 bytes .../b73c1098eed65e61418b5f54ba17ba07.woff2 | Bin 7096 -> 0 bytes .../b7c212f5d900890107f648d1f28310a8.woff2 | Bin 0 -> 10108 bytes .../b7cae3f403e6f573f0a7fed865887af4.woff2 | Bin 0 -> 18328 bytes .../b7f1713b565f769b0605291cc28102c0.woff2 | Bin 0 -> 3656 bytes .../b858224dba05c18c9ff9e9b2f2cb4b17.woff2 | Bin 0 -> 3676 bytes .../b8b678e335cca488ceeab549e0ee7c43.woff2 | Bin 0 -> 19184 bytes .../b965f477e38a00cafdcfba8553d17d35.woff2 | Bin 0 -> 13900 bytes .../bb857ae4bf5f984a09057860e371c331.woff2 | Bin 1500 -> 0 bytes .../bbd1d1a14cde3b29e24f67475f7c0569.woff2 | Bin 0 -> 18808 bytes .../bd6bbdda9ebfa829f1b1314a929f1197.woff2 | Bin 0 -> 21296 bytes .../bdab367381b6fc7bbf7b10cd828c1482.woff2 | Bin 10128 -> 0 bytes .../beabfea8c7ef7693427c37f99ece071f.woff2 | Bin 0 -> 7856 bytes .../bef5ef5511a39f5f2a5ec4d20ad5bbf7.woff2 | Bin 0 -> 22532 bytes .../c2018a1ed955d97c427d0f06f40d6050.woff2 | Bin 0 -> 13788 bytes .../c29bd9cd79bb0a8a71ce2962919e8b0d.woff2 | Bin 0 -> 22240 bytes .../c32d88b77c94ccea3e7a03e87fcbbad8.woff2 | Bin 0 -> 10756 bytes .../c3afdd3c83b6de20c3d9e87740770c9e.woff2 | Bin 0 -> 16984 bytes .../c4573f5964607694fb083cbd98b07ff7.woff2 | Bin 0 -> 17112 bytes .../c832945431dae01a6a5921e55d047a7e.woff2 | Bin 13360 -> 0 bytes .../c99a92c471d6f433b19fde75b2552e38.woff2 | Bin 0 -> 12848 bytes .../c9d2ed929af735b48cb072058361f129.woff2 | Bin 13224 -> 0 bytes .../ca087d81bf263ec11119d39583b81c3a.woff2 | Bin 0 -> 19980 bytes .../ca7f31435e0446821dcd43fc0e766e31.woff2 | Bin 0 -> 3676 bytes .../cc7318e183292c701800a2c61d807c98.woff2 | Bin 0 -> 22384 bytes .../cc8e2aaff31ab80d3c7a09863d0f8f5f.ttf | Bin 0 -> 33076 bytes .../cdec81ab55fb735870442a76524651c7.woff2 | Bin 0 -> 3672 bytes .../ce4650b74cac95f6c9484a808c046790.woff2 | Bin 0 -> 11832 bytes .../cec2c772ade5fece795bb18eeeab8632.woff2 | Bin 0 -> 20996 bytes .../cef0e4bcef815e9fd6b7b07b612822e7.woff2 | Bin 5600 -> 0 bytes .../d06d842a080c12b21bf6521a5d9dc79d.woff2 | Bin 0 -> 8016 bytes .../d1c02e048df2ebcd6626649c03f9549f.ttf | Bin 0 -> 32916 bytes .../d22c7353a102a9be9c67988ab7a16188.woff2 | Bin 0 -> 10128 bytes .../d4577260f133e8b3d89369ab48596774.woff2 | Bin 0 -> 10156 bytes .../d6d436fde6c23ffcdf1adc1626ace4d8.woff2 | Bin 20216 -> 0 bytes .../d752c7a8ec7bc743a483c9a7bf5e5e3c.woff2 | Bin 13104 -> 0 bytes .../d7ed3965fb236543ca714c28aa93846d.woff2 | Bin 0 -> 3704 bytes .../d9bada3a44bb2ffa66dec5cc781cafc9.woff2 | Bin 18596 -> 0 bytes .../da86283c34030c89397605c7e7e43c3e.woff2 | Bin 5708 -> 0 bytes .../dcac443a527040572c077cb2b28ac8ca.woff2 | Bin 0 -> 11512 bytes .../dcfb096c0a3b3089bfce4753d16eda3b.woff2 | Bin 0 -> 11976 bytes .../debe9be3a16253af4f043ef27a0bf6cf.woff2 | Bin 1480 -> 0 bytes .../df3312dfbf327224b9f2f9632c7ccd8c.woff2 | Bin 0 -> 12588 bytes .../e09925017ae85deb1876e6eadd7620c0.woff2 | Bin 15028 -> 0 bytes .../e17ecd62c4b3a5cac528841b89a2267d.ttf | Bin 29248 -> 0 bytes .../e1a38cc8ff546d3df1459c89df87b8ea.woff2 | Bin 0 -> 9560 bytes .../e1c796916b3538c0a441a60a90f5520a.woff2 | Bin 0 -> 8196 bytes .../e2068f7b83e0441f173894c14988456f.ttf | Bin 0 -> 31444 bytes .../e25d7629424c8d89c39bddb9b6a99b6f.woff2 | Bin 0 -> 11908 bytes .../e29a95b21321270ffb79543ee0cba17d.woff2 | Bin 0 -> 10776 bytes .../e340d891a3edd4db23f95f759fe85e53.woff2 | Bin 0 -> 10432 bytes .../e38d3465f2c8bf67cc531b6a68484b01.woff2 | Bin 0 -> 3692 bytes .../e43155115077f8ce42db882a6bed76a7.woff2 | Bin 0 -> 9656 bytes .../e44c11f4834bdd4d6b6da7b8ee5eaebc.woff2 | Bin 0 -> 20612 bytes .../e5b29c36b2e7a2f4db58307359fa5740.woff2 | Bin 0 -> 20928 bytes .../e6f072bccf56c7a5885cad43b269048e.woff2 | Bin 0 -> 3676 bytes .../e86101cc8a902668923f9cabfd607fdb.woff2 | Bin 0 -> 12684 bytes .../e871861f326f4c0f4f2ee4f07e50b58b.ttf | Bin 27808 -> 0 bytes .../e972943c8c50df41fca0fab199af6055.woff2 | Bin 0 -> 22356 bytes .../ebfaffa0ce7a84bf2216d03982a7a79b.woff2 | Bin 0 -> 11968 bytes .../ec072a9a08decd315536942c3a335888.woff2 | Bin 5688 -> 0 bytes .../ec999ab71cbb6beb7e10406b0d6910c3.woff2 | Bin 9964 -> 0 bytes .../ecb54ce0193aacd9bc7dbdb75eb9c824.woff2 | Bin 0 -> 10760 bytes .../ed5bf02d648da84d8d68e5e7a9261c19.woff2 | Bin 0 -> 13976 bytes .../ee566005c799d3a12ad4249208c341b1.woff2 | Bin 7724 -> 0 bytes .../eee5f43c92cb9030d97f216bbb2ba34e.woff2 | Bin 0 -> 21560 bytes .../ef1fccbc8e3265cc39de4e7bab29fc77.woff2 | Bin 0 -> 3728 bytes .../f07d0c93a3147897fad7ae0f6d52fba1.woff2 | Bin 0 -> 20908 bytes .../f0e738832755fce6d1519f2e15d9e6be.woff2 | Bin 6148 -> 0 bytes .../f200b88b158918b03884c3529a49f6c3.woff2 | Bin 0 -> 21536 bytes .../f2582d3070d783bbc7738cb003b703b4.ttf | Bin 0 -> 33032 bytes .../f2b9287e870e65639bc34af8a226575b.woff2 | Bin 0 -> 9640 bytes .../f3f7a9684a6c6b99147e351a82628e4e.ttf | Bin 0 -> 33032 bytes .../f48aae23139b54522853b755a9a07230.woff2 | Bin 6144 -> 0 bytes .../f491d519ae3928214f725a9b27936bf9.woff2 | Bin 0 -> 14980 bytes .../f54e327fe0216b69098f40bd76efc355.woff2 | Bin 10356 -> 0 bytes .../f5ae9dc221f121a31384a158230f6d7a.ttf | Bin 29224 -> 0 bytes .../f6ae49575b5a269d35d25f3c774bcc7f.woff2 | Bin 0 -> 21260 bytes .../f6c56d7a605e19cba07493bde4326ca0.woff2 | Bin 0 -> 13388 bytes .../f8b0aa100e2ea5a1aad746ddb2f27d9a.woff2 | Bin 1548 -> 0 bytes .../f8dc85e7e10f9eafb62db41ba60e19a3.woff2 | Bin 0 -> 11384 bytes .../facfc851a670b2a04e595d0b1c64a3aa.woff2 | Bin 10788 -> 0 bytes .../fdd953c288159a1f149911720d8a19fa.woff2 | Bin 0 -> 13740 bytes .../fe56d0d137acb0f9b17754d3670f5eca.woff2 | Bin 0 -> 11840 bytes .../ff47df30aa703f308b49f34c9f0e5b7c.ttf | Bin 0 -> 32984 bytes docs/_static/language_data.js | 7 - docs/_static/mathjax/LICENSE | 202 + docs/_static/mathjax/a11y/assistive-mml.js | 1 + docs/_static/mathjax/a11y/complexity.js | 1 + docs/_static/mathjax/a11y/explorer.js | 1 + docs/_static/mathjax/a11y/semantic-enrich.js | 1 + docs/_static/mathjax/a11y/sre.js | 1 + .../mathjax/input/tex/extensions/action.js | 1 + .../input/tex/extensions/all-packages.js | 34 + .../mathjax/input/tex/extensions/ams.js | 1 + .../mathjax/input/tex/extensions/amscd.js | 1 + .../mathjax/input/tex/extensions/autoload.js | 1 + .../mathjax/input/tex/extensions/bbox.js | 1 + .../input/tex/extensions/boldsymbol.js | 1 + .../mathjax/input/tex/extensions/braket.js | 1 + .../input/tex/extensions/bussproofs.js | 1 + .../mathjax/input/tex/extensions/cancel.js | 1 + .../mathjax/input/tex/extensions/cases.js | 1 + .../mathjax/input/tex/extensions/centernot.js | 1 + .../mathjax/input/tex/extensions/color.js | 1 + .../mathjax/input/tex/extensions/colortbl.js | 1 + .../mathjax/input/tex/extensions/colorv2.js | 1 + .../input/tex/extensions/configmacros.js | 1 + .../mathjax/input/tex/extensions/empheq.js | 1 + .../mathjax/input/tex/extensions/enclose.js | 1 + .../mathjax/input/tex/extensions/extpfeil.js | 1 + .../mathjax/input/tex/extensions/gensymb.js | 1 + .../mathjax/input/tex/extensions/html.js | 1 + .../mathjax/input/tex/extensions/mathtools.js | 1 + .../mathjax/input/tex/extensions/mhchem.js | 34 + .../input/tex/extensions/newcommand.js | 1 + .../mathjax/input/tex/extensions/noerrors.js | 1 + .../input/tex/extensions/noundefined.js | 1 + .../mathjax/input/tex/extensions/physics.js | 1 + .../mathjax/input/tex/extensions/require.js | 1 + .../input/tex/extensions/setoptions.js | 1 + .../mathjax/input/tex/extensions/tagformat.js | 1 + .../mathjax/input/tex/extensions/textcomp.js | 1 + .../input/tex/extensions/textmacros.js | 1 + .../mathjax/input/tex/extensions/unicode.js | 1 + .../mathjax/input/tex/extensions/upgreek.js | 1 + .../mathjax/input/tex/extensions/verb.js | 1 + docs/_static/mathjax/output/chtml.js | 1 + .../_static/mathjax/output/chtml/fonts/tex.js | 1 + .../fonts/woff-v2/MathJax_AMS-Regular.woff | Bin 0 -> 40808 bytes .../woff-v2/MathJax_Calligraphic-Bold.woff | Bin 0 -> 9908 bytes .../woff-v2/MathJax_Calligraphic-Regular.woff | Bin 0 -> 9600 bytes .../fonts/woff-v2/MathJax_Fraktur-Bold.woff | Bin 0 -> 22340 bytes .../woff-v2/MathJax_Fraktur-Regular.woff | Bin 0 -> 21480 bytes .../fonts/woff-v2/MathJax_Main-Bold.woff | Bin 0 -> 34464 bytes .../fonts/woff-v2/MathJax_Main-Italic.woff | Bin 0 -> 20832 bytes .../fonts/woff-v2/MathJax_Main-Regular.woff | Bin 0 -> 34160 bytes .../woff-v2/MathJax_Math-BoldItalic.woff | Bin 0 -> 19776 bytes .../fonts/woff-v2/MathJax_Math-Italic.woff | Bin 0 -> 19360 bytes .../fonts/woff-v2/MathJax_Math-Regular.woff | Bin 0 -> 19288 bytes .../fonts/woff-v2/MathJax_SansSerif-Bold.woff | Bin 0 -> 15944 bytes .../woff-v2/MathJax_SansSerif-Italic.woff | Bin 0 -> 14628 bytes .../woff-v2/MathJax_SansSerif-Regular.woff | Bin 0 -> 12660 bytes .../fonts/woff-v2/MathJax_Script-Regular.woff | Bin 0 -> 11852 bytes .../fonts/woff-v2/MathJax_Size1-Regular.woff | Bin 0 -> 5792 bytes .../fonts/woff-v2/MathJax_Size2-Regular.woff | Bin 0 -> 5464 bytes .../fonts/woff-v2/MathJax_Size3-Regular.woff | Bin 0 -> 3244 bytes .../fonts/woff-v2/MathJax_Size4-Regular.woff | Bin 0 -> 5148 bytes .../woff-v2/MathJax_Typewriter-Regular.woff | Bin 0 -> 17604 bytes .../fonts/woff-v2/MathJax_Vector-Bold.woff | Bin 0 -> 1116 bytes .../fonts/woff-v2/MathJax_Vector-Regular.woff | Bin 0 -> 1136 bytes .../chtml/fonts/woff-v2/MathJax_Zero.woff | Bin 0 -> 1368 bytes docs/_static/mathjax/output/svg.js | 1 + docs/_static/mathjax/output/svg/fonts/tex.js | 1 + docs/_static/mathjax/sre/mathmaps/base.json | 29 + docs/_static/mathjax/sre/mathmaps/ca.json | 140 + docs/_static/mathjax/sre/mathmaps/da.json | 140 + docs/_static/mathjax/sre/mathmaps/de.json | 146 + docs/_static/mathjax/sre/mathmaps/en.json | 158 + docs/_static/mathjax/sre/mathmaps/es.json | 140 + docs/_static/mathjax/sre/mathmaps/fr.json | 146 + docs/_static/mathjax/sre/mathmaps/hi.json | 146 + docs/_static/mathjax/sre/mathmaps/it.json | 146 + docs/_static/mathjax/sre/mathmaps/nb.json | 146 + docs/_static/mathjax/sre/mathmaps/nemeth.json | 125 + docs/_static/mathjax/sre/mathmaps/nn.json | 146 + docs/_static/mathjax/sre/mathmaps/sv.json | 146 + docs/_static/mathjax/tex-mml-chtml.js | 1 + ...immaterial_theme.02cb18745d09eea51.min.css | 4 + ...immaterial_theme.4b4a8c74e2ff2ab5b.min.css | 4 - docs/collaboration.html | 6 +- docs/comments.html | 6 +- docs/genindex.html | 6 +- docs/index.html | 6 +- docs/introduction.html | 6 +- docs/mermaid.html | 6 +- docs/rich-links.html | 6 +- docs/searchindex.js | 2 +- docs/settings.html | 6 +- docs/topbar.html | 6 +- 373 files changed, 53544 insertions(+), 52379 deletions(-) create mode 100644 docs/_static/fonts/0204e961adca27dd4947c6df130dd96f.woff2 create mode 100644 docs/_static/fonts/026a36b060c2ef6c88ac125a50e8b4c9.woff2 create mode 100644 docs/_static/fonts/027cb81785975d282bd176dd05d6cd51.woff2 delete mode 100644 docs/_static/fonts/03b722034d0d2adc8c2b1b1d8e15f965.ttf create mode 100644 docs/_static/fonts/05ada379c350a1406544195bc7289117.woff2 create mode 100644 docs/_static/fonts/079efa5d2641f256a97c9c802c168ef3.woff2 delete mode 100644 docs/_static/fonts/0e100b86870ec5caaa887e0fe743b177.woff2 create mode 100644 docs/_static/fonts/0e14f6ba4a76b5ed0302033fb767bada.woff2 create mode 100644 docs/_static/fonts/0ef8a8fa25c458bcf4ac50a6dd593225.woff2 delete mode 100644 docs/_static/fonts/0f08976903cdc6cf8d005eb19d9c4da1.woff2 create mode 100644 docs/_static/fonts/0f65443c2941435f9a90afb8921573f4.woff2 create mode 100644 docs/_static/fonts/0fe4d8168abe6e917ef92b63a22ebccb.woff2 delete mode 100644 docs/_static/fonts/1073aeaac325164172146c0bd83b8e30.woff2 delete mode 100644 docs/_static/fonts/120343f7d6af93349482e59eb53ebbd7.woff2 delete mode 100644 docs/_static/fonts/131ca06998d2a2d721880706f0116365.woff2 delete mode 100644 docs/_static/fonts/13a6a5927667a6c96cab1890afa665e8.woff2 create mode 100644 docs/_static/fonts/13a92d073c751034247a6d47e8134fdd.woff2 delete mode 100644 docs/_static/fonts/14ca7ef3a35fe2962fadfede864a5c4c.ttf create mode 100644 docs/_static/fonts/16ef93a23793ea9defec5f01265a3fdc.woff2 create mode 100644 docs/_static/fonts/17111913977f7ec5077bbdbc046fbc6a.woff2 delete mode 100644 docs/_static/fonts/1939f1a326cdc3ca24136297f8693ae6.ttf delete mode 100644 docs/_static/fonts/19d51705651235d6b681666f4b0d0403.woff2 delete mode 100644 docs/_static/fonts/1a7270887e0329d01f135e4591fef6bc.woff2 delete mode 100644 docs/_static/fonts/1b150c409df2cca1e55ffc6e55b64998.woff2 create mode 100644 docs/_static/fonts/1b1a774a3e0e9b725eaa711a2afb7392.woff2 create mode 100644 docs/_static/fonts/1bbd1c7eb550168d3a349e49e36c2a44.woff2 create mode 100644 docs/_static/fonts/2126c6e0f6bcaf91253655e7fcce2851.ttf create mode 100644 docs/_static/fonts/219dddc355ee1f0ae550a97bae8a2531.woff2 create mode 100644 docs/_static/fonts/21a4306e449be7b5403a98b97f9dd0f9.woff2 delete mode 100644 docs/_static/fonts/2219c8fe3e890839e81f64c63cfb6131.woff2 create mode 100644 docs/_static/fonts/22907d0beca92d41cc7ed6a5c91a7855.ttf delete mode 100644 docs/_static/fonts/23fa730ff9e71e652b7416d11b9b5a17.woff2 create mode 100644 docs/_static/fonts/264c5b476ab42c43d6af4c257bb04477.woff2 create mode 100644 docs/_static/fonts/26646b9d877d16236aa3267f8231ca4c.woff2 delete mode 100644 docs/_static/fonts/26d5039523e5456735778567a83e0af0.woff2 create mode 100644 docs/_static/fonts/278aea57f792d9056837c4ded508ebc7.ttf create mode 100644 docs/_static/fonts/28d2d42c2dc05f74362e21c4810e20cf.woff2 create mode 100644 docs/_static/fonts/2a9ccbf9e2fc7ffc329cabcb326cac11.woff2 create mode 100644 docs/_static/fonts/2ccecb9cb31bf1fb12644697ca46e0bf.woff2 create mode 100644 docs/_static/fonts/2dc356092de7c114b1259e518a7f539a.woff2 create mode 100644 docs/_static/fonts/2de1a52b5a1ee8049633825118f7cd4f.woff2 create mode 100644 docs/_static/fonts/2e43802a9d1556dbe360c22e2b85a597.woff2 delete mode 100644 docs/_static/fonts/2e542495db1666774ba22396a147363c.woff2 create mode 100644 docs/_static/fonts/2e991b4c7e5e35481357bf270b4d10e3.woff2 create mode 100644 docs/_static/fonts/2f39871937f1093b0ff8429081c6ec7b.woff2 create mode 100644 docs/_static/fonts/2f45b23744b48cb8432ebce3a7785b15.woff2 create mode 100644 docs/_static/fonts/2fdf026badd63aad0ca82a950790c3ad.woff2 delete mode 100644 docs/_static/fonts/3006d9e284f581cfdc1184327dcdbbd6.woff2 create mode 100644 docs/_static/fonts/31ce4972e0eedf25b993cb820d192cdf.woff2 create mode 100644 docs/_static/fonts/334ef0433aba9da180c94265157590f8.woff2 delete mode 100644 docs/_static/fonts/341f33a3175e59ee248841561c5dd079.woff2 delete mode 100644 docs/_static/fonts/357f5f8032b9f64eef7164aef48e666f.ttf delete mode 100644 docs/_static/fonts/35af4c2de4e2c4660f0a0b855e9f6257.woff2 delete mode 100644 docs/_static/fonts/3762e1dc4b62febc4a7ba87dc6636fb9.woff2 create mode 100644 docs/_static/fonts/3774b4ecc75b5d7dbf2ec07da7fb53e4.woff2 create mode 100644 docs/_static/fonts/37e91aace1626ae9dd3ad09616137440.woff2 delete mode 100644 docs/_static/fonts/38ccf714b4ea1dadffd6c8331207b59a.woff2 create mode 100644 docs/_static/fonts/3937a4c765110f2cc43d71e4daccfc13.woff2 delete mode 100644 docs/_static/fonts/3a15483d5724c153b48a077b14dfaa88.woff2 delete mode 100644 docs/_static/fonts/3abee1c50f8647f9b9e3ed2cf033c5f1.woff2 create mode 100644 docs/_static/fonts/3b6666c0da3a7fc7977e7ad30d57a213.woff2 delete mode 100644 docs/_static/fonts/3b9319ab8a1ceb8d389b36fdf38563df.woff2 delete mode 100644 docs/_static/fonts/3bd701133164902559a25de85d1b4469.woff2 create mode 100644 docs/_static/fonts/3e253f072fd8cb460de5e9daadfcc565.woff2 delete mode 100644 docs/_static/fonts/3e7f3b6d1673bd1657351359f56098bb.woff2 delete mode 100644 docs/_static/fonts/3e8f8a1d4f1a37245c6b7acbaa44a6c0.woff2 delete mode 100644 docs/_static/fonts/3ea86f7af28127ab72926d7d02bcf844.woff2 create mode 100644 docs/_static/fonts/3eb393e3a3d57bfe84e0705f86a042da.woff2 delete mode 100644 docs/_static/fonts/3eee1b519e5b90cff820f524b33c1cc6.woff2 delete mode 100644 docs/_static/fonts/40658872e30aa3894c64651b230c499c.woff2 create mode 100644 docs/_static/fonts/40d9a7ba120fbde112edc76a0e9f27fc.woff2 create mode 100644 docs/_static/fonts/41296e2fc02a317e987764189f413ae2.ttf delete mode 100644 docs/_static/fonts/440e01dd2a67e0b4c218f98812398c1a.woff2 create mode 100644 docs/_static/fonts/4caa7d82d0e5f6f127292f4f4c9af27a.woff2 delete mode 100644 docs/_static/fonts/4d539033909dd344ae868f1c72bd0fc3.woff2 delete mode 100644 docs/_static/fonts/4dbd328e347e890a801d51f9a5f8d38a.woff2 create mode 100644 docs/_static/fonts/4e6d69d748044d096e9487d38ffb071c.woff2 delete mode 100644 docs/_static/fonts/4f1c4dcb9abc50152da5adbadf7f3a7f.ttf delete mode 100644 docs/_static/fonts/502c4e3ebeec1d459f951ff48e366c1e.woff2 create mode 100644 docs/_static/fonts/512757a4e09f30e718530112a3be087c.woff2 delete mode 100644 docs/_static/fonts/51cf6e070062fa3bdd98929a6990aaf6.ttf create mode 100644 docs/_static/fonts/51d978655b85a660b5ec352ab9eff784.woff2 create mode 100644 docs/_static/fonts/52672870c9b3b0e5d8e74c9fdd522491.woff2 create mode 100644 docs/_static/fonts/529667aea70b09ba8845845f8b791127.woff2 create mode 100644 docs/_static/fonts/52b46681173c8d9cd37d72d1e5e4961d.woff2 create mode 100644 docs/_static/fonts/542e2fd31336075667f486dbb0e086fd.woff2 create mode 100644 docs/_static/fonts/5455d104d24e629c711b3a47b06e292e.woff2 create mode 100644 docs/_static/fonts/550faacd31f18c0b9cfa0ab0825b94ed.woff2 delete mode 100644 docs/_static/fonts/573686b2c958c4fbc7f25726f642ddb0.woff2 create mode 100644 docs/_static/fonts/5ae9b4b2ee6c8b3ded2d4008ccf058b7.woff2 create mode 100644 docs/_static/fonts/5c20fe772ae00739c191fcf5fc92d383.woff2 delete mode 100644 docs/_static/fonts/5dcee8c3104fde5a91ac68bb640a4343.woff2 create mode 100644 docs/_static/fonts/5eb5872bb169d41a79e46876e0441311.woff2 create mode 100644 docs/_static/fonts/5f72bfaf9e281f741c41abe46dff3e1d.woff2 create mode 100644 docs/_static/fonts/5ffe9ffb4b41fbbbe4890283818779a4.woff2 delete mode 100644 docs/_static/fonts/61e97a841678fbbfc045bcdcaa684820.woff2 delete mode 100644 docs/_static/fonts/666d5c2b0e7ef0cc2c46675b88b5867c.woff2 delete mode 100644 docs/_static/fonts/66a3ee81b536d3a0b26b43a49a1c3a78.woff2 create mode 100644 docs/_static/fonts/66b26b3c84c6a918a3c1d323b81184cf.woff2 delete mode 100644 docs/_static/fonts/685dd0a4dbede9c486deb28acfbd6a23.woff2 delete mode 100644 docs/_static/fonts/687be4960a39c10a273737014ea979c6.woff2 create mode 100644 docs/_static/fonts/6ae8f8b730d4bfe372997d78612486ac.woff2 create mode 100644 docs/_static/fonts/6b4464ee024fff1bd7a9f622659eaaea.woff2 create mode 100644 docs/_static/fonts/6b76c51e06a497bee64b065b08ad96b8.woff2 create mode 100644 docs/_static/fonts/6c29edce0214f7ce5c29596630dda4df.woff2 create mode 100644 docs/_static/fonts/6ea4bf3cac225e29318cd2a18a4f9ffa.woff2 create mode 100644 docs/_static/fonts/6fea4c96d85aafe12ccfa3a7403b3fd4.woff2 create mode 100644 docs/_static/fonts/707a3c6374c2f18803e678b898805e89.ttf create mode 100644 docs/_static/fonts/70df311f920b9db2b2647692b885aed8.woff2 create mode 100644 docs/_static/fonts/723cbd6f8aa09d478166cf4b328ec440.woff2 create mode 100644 docs/_static/fonts/7426b8382b0c7ce632df53261dce20be.woff2 create mode 100644 docs/_static/fonts/742a490470ad5add81a8614602f59609.woff2 create mode 100644 docs/_static/fonts/752686e9f1580c8dc3eef03805ffd49e.woff2 create mode 100644 docs/_static/fonts/75a25b58be61bbb058c77748d3c49526.woff2 create mode 100644 docs/_static/fonts/75d351ba4b7ae0ba4a2287ef48ae282b.woff2 create mode 100644 docs/_static/fonts/7608821ae7a01e76cb42e6fda12421e5.woff2 create mode 100644 docs/_static/fonts/7635b26cac7923a2a94ad867d41afe4c.woff2 create mode 100644 docs/_static/fonts/78147236d857659d7bec2b8a7a4d550b.woff2 create mode 100644 docs/_static/fonts/79003e6320341ae4b3dc73aafa30e2a6.woff2 create mode 100644 docs/_static/fonts/79e33408703a4c71c3b985b963a5d516.woff2 delete mode 100644 docs/_static/fonts/7a2d85e3ad5d0c32501a3333acbdbd2d.woff2 delete mode 100644 docs/_static/fonts/7a2e71719d906e861fe904f6da1007bd.woff2 create mode 100644 docs/_static/fonts/7a5681247aa6fc3418022342557bf3e3.woff2 create mode 100644 docs/_static/fonts/7a8bcfe0a68bb4832124e2e022554fa3.woff2 create mode 100644 docs/_static/fonts/7c83b4151a7751d87ec6c58315cc6553.ttf delete mode 100644 docs/_static/fonts/7cd81183773ec9425bb4eb94f9ccc900.woff2 create mode 100644 docs/_static/fonts/7ef81fadcc090047e1c258f05066207d.woff2 create mode 100644 docs/_static/fonts/80b21d8db6045c871d36ad4a2c985722.woff2 delete mode 100644 docs/_static/fonts/813f3d53b027f6524f04ff51c8d64ac1.woff2 delete mode 100644 docs/_static/fonts/831095a78c8e25c05ab5964c5638bb7c.woff2 delete mode 100644 docs/_static/fonts/8322da20355935bc6607d6c19efe77fe.woff2 create mode 100644 docs/_static/fonts/85b7e87c4d7247aaf8824e30b4144465.woff2 create mode 100644 docs/_static/fonts/8638bf59a1e3ceb5b51df17bcf7bd7fc.woff2 delete mode 100644 docs/_static/fonts/889051bf739e69216d6a5162d29e7099.woff2 create mode 100644 docs/_static/fonts/88b7c5e61902ab86691356a44517e57e.woff2 create mode 100644 docs/_static/fonts/88dd336ac71fda6c70afb29082242181.ttf delete mode 100644 docs/_static/fonts/89978e658e840b927dddb5cb3a835c7d.woff2 create mode 100644 docs/_static/fonts/89bd2cbbc4b133be434990f66ea692cb.woff2 create mode 100644 docs/_static/fonts/8a08f5c435eed0f2414b3eeb3ce8c217.woff2 delete mode 100644 docs/_static/fonts/8a47e21790be9e92c8c54c2b1010c6fa.woff2 delete mode 100644 docs/_static/fonts/8b2d64f6d23946898f16996a57615871.woff2 create mode 100644 docs/_static/fonts/8e67a526354c56c027c959a53b68147e.woff2 create mode 100644 docs/_static/fonts/900521ad02892f97a92195fca71a2bf1.ttf delete mode 100644 docs/_static/fonts/90fa3a806a065c614ee8658cd82db50d.woff2 create mode 100644 docs/_static/fonts/92cb00f145932cc8a9163f2bf6acfc25.ttf create mode 100644 docs/_static/fonts/92e018250353983874a958541296cfa6.woff2 create mode 100644 docs/_static/fonts/94333af3cbb89d3b83773d25618f1706.woff2 delete mode 100644 docs/_static/fonts/9462ffde1e6cc0db617644b0919fb034.woff2 delete mode 100644 docs/_static/fonts/96643bfad5a17eada947d70744155920.woff2 create mode 100644 docs/_static/fonts/96a6a4e9dd5d1505226c82c13d410deb.woff2 create mode 100644 docs/_static/fonts/96dbb7d9188b2e0703f002e68077f967.woff2 create mode 100644 docs/_static/fonts/98901a616b22ef6dbca6abebf3560b6b.woff2 delete mode 100644 docs/_static/fonts/99304d217c52040274afe94947bed445.ttf delete mode 100644 docs/_static/fonts/99defe51be9b937614886fde910341ac.woff2 delete mode 100644 docs/_static/fonts/9b2da7c38d34ace18801291959a5fc03.woff2 delete mode 100644 docs/_static/fonts/9f226239b7cb86705238ec5a036a05bd.woff2 delete mode 100644 docs/_static/fonts/9f5373acc7aac4a2e89d0f34f4c6b675.woff2 create mode 100644 docs/_static/fonts/9faa7062eb32d692b0b5f69f0e42fe62.woff2 delete mode 100644 docs/_static/fonts/a002f3e1a6bb50585fff1ba3e11ea497.woff2 create mode 100644 docs/_static/fonts/a08aab97ea21fc5299645d12e3ef57bf.woff2 create mode 100644 docs/_static/fonts/a147e4366336588aae172d59e25deef1.woff2 create mode 100644 docs/_static/fonts/a2d2c60ad40172211ff4782075414565.woff2 create mode 100644 docs/_static/fonts/a346eb01892d90d3150a27bcc3490add.woff2 delete mode 100644 docs/_static/fonts/a4573fe61a809de65a2ca63b88cf8eb6.woff2 create mode 100644 docs/_static/fonts/a4793727e4c54702fcb599f2c9ee07c0.ttf create mode 100644 docs/_static/fonts/a4afb0badd14ab3594ee2ef01392b285.woff2 create mode 100644 docs/_static/fonts/a5e63948f7d9560d9b409d02edd64707.ttf create mode 100644 docs/_static/fonts/a620860b63de9c40dac9a59b0094c61a.woff2 delete mode 100644 docs/_static/fonts/a6760631fecfe59ed152aeb2c51fdcb5.woff2 create mode 100644 docs/_static/fonts/a68929959750fba2f6aec7649a516350.woff2 create mode 100644 docs/_static/fonts/a712dd5fa12c7c09e52d44cfce499e33.woff2 delete mode 100644 docs/_static/fonts/a741ffbc1d695f6b9a9874e2da982dcf.ttf delete mode 100644 docs/_static/fonts/a81d5af4d9300ece4bfa274e6cb342b3.woff2 delete mode 100644 docs/_static/fonts/a82cf4c922189b14c3f7ebe5a2d8b6ce.woff2 create mode 100644 docs/_static/fonts/a84df1f533205686b83a3232b24efa87.woff2 create mode 100644 docs/_static/fonts/a94c81d0b3f6bb97fd97cfcfbfa5dcaf.woff2 create mode 100644 docs/_static/fonts/a966ed9a844cd60b56d4e1b31b0051fe.woff2 delete mode 100644 docs/_static/fonts/aa221a8437ff853e43e8ec3503c2ff16.woff2 create mode 100644 docs/_static/fonts/aae577798ff3f4e9e1d9640a97dea39a.woff2 create mode 100644 docs/_static/fonts/ab0a020935184477d441bd13b3b9e642.woff2 create mode 100644 docs/_static/fonts/ab65e77bbdfee66149ed7d6d7f74fbc7.ttf create mode 100644 docs/_static/fonts/add79d702aef2d1f1cf4865df00911e0.woff2 delete mode 100644 docs/_static/fonts/ae0e442895406e9922237108496c2cd6.woff2 create mode 100644 docs/_static/fonts/af09b935bb3d7e0f6541002b82baf166.woff2 delete mode 100644 docs/_static/fonts/b0ec4e94b74476aadd54bb284ac62bcb.ttf delete mode 100644 docs/_static/fonts/b11d18aa18f784f9afe47af79ad5ed5b.woff2 create mode 100644 docs/_static/fonts/b17158b92ca6f9303712a3378bfb5636.woff2 delete mode 100644 docs/_static/fonts/b1a8d0a7022bc255536b407158b1dc07.woff2 create mode 100644 docs/_static/fonts/b39a3761f41f9476dfd827446487cb79.woff2 create mode 100644 docs/_static/fonts/b5b98bb4e5069d0f063d919167ba6653.woff2 create mode 100644 docs/_static/fonts/b5c6e34d471a72326c3151f6f89b70b3.woff2 create mode 100644 docs/_static/fonts/b731d7319cdb737328329a1e9e3a5280.woff2 delete mode 100644 docs/_static/fonts/b73c1098eed65e61418b5f54ba17ba07.woff2 create mode 100644 docs/_static/fonts/b7c212f5d900890107f648d1f28310a8.woff2 create mode 100644 docs/_static/fonts/b7cae3f403e6f573f0a7fed865887af4.woff2 create mode 100644 docs/_static/fonts/b7f1713b565f769b0605291cc28102c0.woff2 create mode 100644 docs/_static/fonts/b858224dba05c18c9ff9e9b2f2cb4b17.woff2 create mode 100644 docs/_static/fonts/b8b678e335cca488ceeab549e0ee7c43.woff2 create mode 100644 docs/_static/fonts/b965f477e38a00cafdcfba8553d17d35.woff2 delete mode 100644 docs/_static/fonts/bb857ae4bf5f984a09057860e371c331.woff2 create mode 100644 docs/_static/fonts/bbd1d1a14cde3b29e24f67475f7c0569.woff2 create mode 100644 docs/_static/fonts/bd6bbdda9ebfa829f1b1314a929f1197.woff2 delete mode 100644 docs/_static/fonts/bdab367381b6fc7bbf7b10cd828c1482.woff2 create mode 100644 docs/_static/fonts/beabfea8c7ef7693427c37f99ece071f.woff2 create mode 100644 docs/_static/fonts/bef5ef5511a39f5f2a5ec4d20ad5bbf7.woff2 create mode 100644 docs/_static/fonts/c2018a1ed955d97c427d0f06f40d6050.woff2 create mode 100644 docs/_static/fonts/c29bd9cd79bb0a8a71ce2962919e8b0d.woff2 create mode 100644 docs/_static/fonts/c32d88b77c94ccea3e7a03e87fcbbad8.woff2 create mode 100644 docs/_static/fonts/c3afdd3c83b6de20c3d9e87740770c9e.woff2 create mode 100644 docs/_static/fonts/c4573f5964607694fb083cbd98b07ff7.woff2 delete mode 100644 docs/_static/fonts/c832945431dae01a6a5921e55d047a7e.woff2 create mode 100644 docs/_static/fonts/c99a92c471d6f433b19fde75b2552e38.woff2 delete mode 100644 docs/_static/fonts/c9d2ed929af735b48cb072058361f129.woff2 create mode 100644 docs/_static/fonts/ca087d81bf263ec11119d39583b81c3a.woff2 create mode 100644 docs/_static/fonts/ca7f31435e0446821dcd43fc0e766e31.woff2 create mode 100644 docs/_static/fonts/cc7318e183292c701800a2c61d807c98.woff2 create mode 100644 docs/_static/fonts/cc8e2aaff31ab80d3c7a09863d0f8f5f.ttf create mode 100644 docs/_static/fonts/cdec81ab55fb735870442a76524651c7.woff2 create mode 100644 docs/_static/fonts/ce4650b74cac95f6c9484a808c046790.woff2 create mode 100644 docs/_static/fonts/cec2c772ade5fece795bb18eeeab8632.woff2 delete mode 100644 docs/_static/fonts/cef0e4bcef815e9fd6b7b07b612822e7.woff2 create mode 100644 docs/_static/fonts/d06d842a080c12b21bf6521a5d9dc79d.woff2 create mode 100644 docs/_static/fonts/d1c02e048df2ebcd6626649c03f9549f.ttf create mode 100644 docs/_static/fonts/d22c7353a102a9be9c67988ab7a16188.woff2 create mode 100644 docs/_static/fonts/d4577260f133e8b3d89369ab48596774.woff2 delete mode 100644 docs/_static/fonts/d6d436fde6c23ffcdf1adc1626ace4d8.woff2 delete mode 100644 docs/_static/fonts/d752c7a8ec7bc743a483c9a7bf5e5e3c.woff2 create mode 100644 docs/_static/fonts/d7ed3965fb236543ca714c28aa93846d.woff2 delete mode 100644 docs/_static/fonts/d9bada3a44bb2ffa66dec5cc781cafc9.woff2 delete mode 100644 docs/_static/fonts/da86283c34030c89397605c7e7e43c3e.woff2 create mode 100644 docs/_static/fonts/dcac443a527040572c077cb2b28ac8ca.woff2 create mode 100644 docs/_static/fonts/dcfb096c0a3b3089bfce4753d16eda3b.woff2 delete mode 100644 docs/_static/fonts/debe9be3a16253af4f043ef27a0bf6cf.woff2 create mode 100644 docs/_static/fonts/df3312dfbf327224b9f2f9632c7ccd8c.woff2 delete mode 100644 docs/_static/fonts/e09925017ae85deb1876e6eadd7620c0.woff2 delete mode 100644 docs/_static/fonts/e17ecd62c4b3a5cac528841b89a2267d.ttf create mode 100644 docs/_static/fonts/e1a38cc8ff546d3df1459c89df87b8ea.woff2 create mode 100644 docs/_static/fonts/e1c796916b3538c0a441a60a90f5520a.woff2 create mode 100644 docs/_static/fonts/e2068f7b83e0441f173894c14988456f.ttf create mode 100644 docs/_static/fonts/e25d7629424c8d89c39bddb9b6a99b6f.woff2 create mode 100644 docs/_static/fonts/e29a95b21321270ffb79543ee0cba17d.woff2 create mode 100644 docs/_static/fonts/e340d891a3edd4db23f95f759fe85e53.woff2 create mode 100644 docs/_static/fonts/e38d3465f2c8bf67cc531b6a68484b01.woff2 create mode 100644 docs/_static/fonts/e43155115077f8ce42db882a6bed76a7.woff2 create mode 100644 docs/_static/fonts/e44c11f4834bdd4d6b6da7b8ee5eaebc.woff2 create mode 100644 docs/_static/fonts/e5b29c36b2e7a2f4db58307359fa5740.woff2 create mode 100644 docs/_static/fonts/e6f072bccf56c7a5885cad43b269048e.woff2 create mode 100644 docs/_static/fonts/e86101cc8a902668923f9cabfd607fdb.woff2 delete mode 100644 docs/_static/fonts/e871861f326f4c0f4f2ee4f07e50b58b.ttf create mode 100644 docs/_static/fonts/e972943c8c50df41fca0fab199af6055.woff2 create mode 100644 docs/_static/fonts/ebfaffa0ce7a84bf2216d03982a7a79b.woff2 delete mode 100644 docs/_static/fonts/ec072a9a08decd315536942c3a335888.woff2 delete mode 100644 docs/_static/fonts/ec999ab71cbb6beb7e10406b0d6910c3.woff2 create mode 100644 docs/_static/fonts/ecb54ce0193aacd9bc7dbdb75eb9c824.woff2 create mode 100644 docs/_static/fonts/ed5bf02d648da84d8d68e5e7a9261c19.woff2 delete mode 100644 docs/_static/fonts/ee566005c799d3a12ad4249208c341b1.woff2 create mode 100644 docs/_static/fonts/eee5f43c92cb9030d97f216bbb2ba34e.woff2 create mode 100644 docs/_static/fonts/ef1fccbc8e3265cc39de4e7bab29fc77.woff2 create mode 100644 docs/_static/fonts/f07d0c93a3147897fad7ae0f6d52fba1.woff2 delete mode 100644 docs/_static/fonts/f0e738832755fce6d1519f2e15d9e6be.woff2 create mode 100644 docs/_static/fonts/f200b88b158918b03884c3529a49f6c3.woff2 create mode 100644 docs/_static/fonts/f2582d3070d783bbc7738cb003b703b4.ttf create mode 100644 docs/_static/fonts/f2b9287e870e65639bc34af8a226575b.woff2 create mode 100644 docs/_static/fonts/f3f7a9684a6c6b99147e351a82628e4e.ttf delete mode 100644 docs/_static/fonts/f48aae23139b54522853b755a9a07230.woff2 create mode 100644 docs/_static/fonts/f491d519ae3928214f725a9b27936bf9.woff2 delete mode 100644 docs/_static/fonts/f54e327fe0216b69098f40bd76efc355.woff2 delete mode 100644 docs/_static/fonts/f5ae9dc221f121a31384a158230f6d7a.ttf create mode 100644 docs/_static/fonts/f6ae49575b5a269d35d25f3c774bcc7f.woff2 create mode 100644 docs/_static/fonts/f6c56d7a605e19cba07493bde4326ca0.woff2 delete mode 100644 docs/_static/fonts/f8b0aa100e2ea5a1aad746ddb2f27d9a.woff2 create mode 100644 docs/_static/fonts/f8dc85e7e10f9eafb62db41ba60e19a3.woff2 delete mode 100644 docs/_static/fonts/facfc851a670b2a04e595d0b1c64a3aa.woff2 create mode 100644 docs/_static/fonts/fdd953c288159a1f149911720d8a19fa.woff2 create mode 100644 docs/_static/fonts/fe56d0d137acb0f9b17754d3670f5eca.woff2 create mode 100644 docs/_static/fonts/ff47df30aa703f308b49f34c9f0e5b7c.ttf create mode 100644 docs/_static/mathjax/LICENSE create mode 100644 docs/_static/mathjax/a11y/assistive-mml.js create mode 100644 docs/_static/mathjax/a11y/complexity.js create mode 100644 docs/_static/mathjax/a11y/explorer.js create mode 100644 docs/_static/mathjax/a11y/semantic-enrich.js create mode 100644 docs/_static/mathjax/a11y/sre.js create mode 100644 docs/_static/mathjax/input/tex/extensions/action.js create mode 100644 docs/_static/mathjax/input/tex/extensions/all-packages.js create mode 100644 docs/_static/mathjax/input/tex/extensions/ams.js create mode 100644 docs/_static/mathjax/input/tex/extensions/amscd.js create mode 100644 docs/_static/mathjax/input/tex/extensions/autoload.js create mode 100644 docs/_static/mathjax/input/tex/extensions/bbox.js create mode 100644 docs/_static/mathjax/input/tex/extensions/boldsymbol.js create mode 100644 docs/_static/mathjax/input/tex/extensions/braket.js create mode 100644 docs/_static/mathjax/input/tex/extensions/bussproofs.js create mode 100644 docs/_static/mathjax/input/tex/extensions/cancel.js create mode 100644 docs/_static/mathjax/input/tex/extensions/cases.js create mode 100644 docs/_static/mathjax/input/tex/extensions/centernot.js create mode 100644 docs/_static/mathjax/input/tex/extensions/color.js create mode 100644 docs/_static/mathjax/input/tex/extensions/colortbl.js create mode 100644 docs/_static/mathjax/input/tex/extensions/colorv2.js create mode 100644 docs/_static/mathjax/input/tex/extensions/configmacros.js create mode 100644 docs/_static/mathjax/input/tex/extensions/empheq.js create mode 100644 docs/_static/mathjax/input/tex/extensions/enclose.js create mode 100644 docs/_static/mathjax/input/tex/extensions/extpfeil.js create mode 100644 docs/_static/mathjax/input/tex/extensions/gensymb.js create mode 100644 docs/_static/mathjax/input/tex/extensions/html.js create mode 100644 docs/_static/mathjax/input/tex/extensions/mathtools.js create mode 100644 docs/_static/mathjax/input/tex/extensions/mhchem.js create mode 100644 docs/_static/mathjax/input/tex/extensions/newcommand.js create mode 100644 docs/_static/mathjax/input/tex/extensions/noerrors.js create mode 100644 docs/_static/mathjax/input/tex/extensions/noundefined.js create mode 100644 docs/_static/mathjax/input/tex/extensions/physics.js create mode 100644 docs/_static/mathjax/input/tex/extensions/require.js create mode 100644 docs/_static/mathjax/input/tex/extensions/setoptions.js create mode 100644 docs/_static/mathjax/input/tex/extensions/tagformat.js create mode 100644 docs/_static/mathjax/input/tex/extensions/textcomp.js create mode 100644 docs/_static/mathjax/input/tex/extensions/textmacros.js create mode 100644 docs/_static/mathjax/input/tex/extensions/unicode.js create mode 100644 docs/_static/mathjax/input/tex/extensions/upgreek.js create mode 100644 docs/_static/mathjax/input/tex/extensions/verb.js create mode 100644 docs/_static/mathjax/output/chtml.js create mode 100644 docs/_static/mathjax/output/chtml/fonts/tex.js create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff create mode 100644 docs/_static/mathjax/output/chtml/fonts/woff-v2/MathJax_Zero.woff create mode 100644 docs/_static/mathjax/output/svg.js create mode 100644 docs/_static/mathjax/output/svg/fonts/tex.js create mode 100644 docs/_static/mathjax/sre/mathmaps/base.json create mode 100644 docs/_static/mathjax/sre/mathmaps/ca.json create mode 100644 docs/_static/mathjax/sre/mathmaps/da.json create mode 100644 docs/_static/mathjax/sre/mathmaps/de.json create mode 100644 docs/_static/mathjax/sre/mathmaps/en.json create mode 100644 docs/_static/mathjax/sre/mathmaps/es.json create mode 100644 docs/_static/mathjax/sre/mathmaps/fr.json create mode 100644 docs/_static/mathjax/sre/mathmaps/hi.json create mode 100644 docs/_static/mathjax/sre/mathmaps/it.json create mode 100644 docs/_static/mathjax/sre/mathmaps/nb.json create mode 100644 docs/_static/mathjax/sre/mathmaps/nemeth.json create mode 100644 docs/_static/mathjax/sre/mathmaps/nn.json create mode 100644 docs/_static/mathjax/sre/mathmaps/sv.json create mode 100644 docs/_static/mathjax/tex-mml-chtml.js create mode 100644 docs/_static/sphinx_immaterial_theme.02cb18745d09eea51.min.css delete mode 100644 docs/_static/sphinx_immaterial_theme.4b4a8c74e2ff2ab5b.min.css diff --git a/MystEditor.js b/MystEditor.js index 2472eb7..1f059de 100644 --- a/MystEditor.js +++ b/MystEditor.js @@ -1,56 +1,56 @@ -var l5e = Object.defineProperty; -var c5e = (t, e, r) => e in t ? l5e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r; -var zt = (t, e, r) => (c5e(t, typeof e != "symbol" ? e + "" : e, r), r), u5e = (t, e, r) => { +var v5e = Object.defineProperty; +var y5e = (t, e, r) => e in t ? v5e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r; +var zt = (t, e, r) => (y5e(t, typeof e != "symbol" ? e + "" : e, r), r), b5e = (t, e, r) => { if (!e.has(t)) throw TypeError("Cannot " + r); }; -var $4 = (t, e, r) => { +var T4 = (t, e, r) => { if (e.has(t)) throw TypeError("Cannot add the same private member more than once"); e instanceof WeakSet ? e.add(t) : e.set(t, r); }; -var D2 = (t, e, r) => (u5e(t, e, "access private method"), r); -var gk, cr, Xne, jne, x0, FQ, Zne, iM, Kne, Nx = {}, Jne = [], h5e = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, M_ = Array.isArray; -function lf(t, e) { +var T2 = (t, e, r) => (b5e(t, e, "access private method"), r); +var ok, cr, Gne, Hne, x0, UQ, Xne, VL, Zne, Cx = {}, jne = [], x5e = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, b_ = Array.isArray; +function tf(t, e) { for (var r in e) t[r] = e[r]; return t; } -function eie(t) { +function Kne(t) { var e = t.parentNode; e && e.removeChild(t); } -function hh(t, e, r) { +function ah(t, e, r) { var n, i, s, a = {}; for (s in e) s == "key" ? n = e[s] : s == "ref" ? i = e[s] : a[s] = e[s]; - if (arguments.length > 2 && (a.children = arguments.length > 3 ? gk.call(arguments, 2) : r), typeof t == "function" && t.defaultProps != null) + if (arguments.length > 2 && (a.children = arguments.length > 3 ? ok.call(arguments, 2) : r), typeof t == "function" && t.defaultProps != null) for (s in t.defaultProps) a[s] === void 0 && (a[s] = t.defaultProps[s]); - return tx(t, a, n, i, null); + return Yb(t, a, n, i, null); } -function tx(t, e, r, n, i) { - var s = { type: t, props: e, key: r, ref: n, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: i == null ? ++Xne : i, __i: -1, __u: 0 }; +function Yb(t, e, r, n, i) { + var s = { type: t, props: e, key: r, ref: n, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: i == null ? ++Gne : i, __i: -1, __u: 0 }; return i == null && cr.vnode != null && cr.vnode(s), s; } -function f5e() { +function w5e() { return { current: null }; } -function fh(t) { +function oh(t) { return t.children; } -function Wc(t, e) { +function qc(t, e) { this.props = t, this.context = e; } -function rv(t, e) { +function K1(t, e) { if (e == null) - return t.__ ? rv(t.__, t.__i + 1) : null; + return t.__ ? K1(t.__, t.__i + 1) : null; for (var r; e < t.__k.length; e++) if ((r = t.__k[e]) != null && r.__e != null) return r.__e; - return typeof t.type == "function" ? rv(t) : null; + return typeof t.type == "function" ? K1(t) : null; } -function tie(t) { +function Jne(t) { var e, r; if ((t = t.__) != null && t.__c != null) { for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) @@ -58,47 +58,47 @@ function tie(t) { t.__e = t.__c.base = r.__e; break; } - return tie(t); + return Jne(t); } } -function sM(t) { - (!t.__d && (t.__d = !0) && x0.push(t) && !rT.__r++ || FQ !== cr.debounceRendering) && ((FQ = cr.debounceRendering) || Zne)(rT); +function WL(t) { + (!t.__d && (t.__d = !0) && x0.push(t) && !U3.__r++ || UQ !== cr.debounceRendering) && ((UQ = cr.debounceRendering) || Xne)(U3); } -function rT() { +function U3() { var t, e, r, n, i, s, a, o, l; - for (x0.sort(iM); t = x0.shift(); ) - t.__d && (e = x0.length, n = void 0, s = (i = (r = t).__v).__e, o = [], l = [], (a = r.__P) && ((n = lf({}, i)).__v = i.__v + 1, cr.vnode && cr.vnode(n), c$(a, n, i, r.__n, a.ownerSVGElement !== void 0, 32 & i.__u ? [s] : null, o, s == null ? rv(i) : s, !!(32 & i.__u), l), n.__.__k[n.__i] = n, iie(o, n, l), n.__e != s && tie(n)), x0.length > e && x0.sort(iM)); - rT.__r = 0; -} -function rie(t, e, r, n, i, s, a, o, l, u, h) { - var f, d, p, g, m, v = n && n.__k || Jne, y = e.length; - for (r.__d = l, d5e(r, e, v), l = r.__d, f = 0; f < y; f++) - (p = r.__k[f]) != null && typeof p != "boolean" && typeof p != "function" && (d = p.__i === -1 ? Nx : v[p.__i] || Nx, p.__i = f, c$(t, p, d, i, s, a, o, l, u, h), g = p.__e, p.ref && d.ref != p.ref && (d.ref && u$(d.ref, null, p), h.push(p.ref, p.__c || g, p)), m == null && g != null && (m = g), 65536 & p.__u || d.__k === p.__k ? l = nie(p, l, t) : typeof p.type == "function" && p.__d !== void 0 ? l = p.__d : g && (l = g.nextSibling), p.__d = void 0, p.__u &= -196609); + for (x0.sort(VL); t = x0.shift(); ) + t.__d && (e = x0.length, n = void 0, s = (i = (r = t).__v).__e, o = [], l = [], (a = r.__P) && ((n = tf({}, i)).__v = i.__v + 1, cr.vnode && cr.vnode(n), t$(a, n, i, r.__n, a.ownerSVGElement !== void 0, 32 & i.__u ? [s] : null, o, s == null ? K1(i) : s, !!(32 & i.__u), l), n.__.__k[n.__i] = n, rie(o, n, l), n.__e != s && Jne(n)), x0.length > e && x0.sort(VL)); + U3.__r = 0; +} +function eie(t, e, r, n, i, s, a, o, l, u, h) { + var f, d, p, g, m, v = n && n.__k || jne, y = e.length; + for (r.__d = l, O5e(r, e, v), l = r.__d, f = 0; f < y; f++) + (p = r.__k[f]) != null && typeof p != "boolean" && typeof p != "function" && (d = p.__i === -1 ? Cx : v[p.__i] || Cx, p.__i = f, t$(t, p, d, i, s, a, o, l, u, h), g = p.__e, p.ref && d.ref != p.ref && (d.ref && r$(d.ref, null, p), h.push(p.ref, p.__c || g, p)), m == null && g != null && (m = g), 65536 & p.__u || d.__k === p.__k ? l = tie(p, l, t) : typeof p.type == "function" && p.__d !== void 0 ? l = p.__d : g && (l = g.nextSibling), p.__d = void 0, p.__u &= -196609); r.__d = l, r.__e = m; } -function d5e(t, e, r) { +function O5e(t, e, r) { var n, i, s, a, o, l = e.length, u = r.length, h = u, f = 0; for (t.__k = [], n = 0; n < l; n++) - (i = t.__k[n] = (i = e[n]) == null || typeof i == "boolean" || typeof i == "function" ? null : typeof i == "string" || typeof i == "number" || typeof i == "bigint" || i.constructor == String ? tx(null, i, null, null, i) : M_(i) ? tx(fh, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? tx(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : i) != null ? (i.__ = t, i.__b = t.__b + 1, o = p5e(i, r, a = n + f, h), i.__i = o, s = null, o !== -1 && (h--, (s = r[o]) && (s.__u |= 131072)), s == null || s.__v === null ? (o == -1 && f--, typeof i.type != "function" && (i.__u |= 65536)) : o !== a && (o === a + 1 ? f++ : o > a ? h > l - a ? f += o - a : f-- : f = o < a && o == a - 1 ? o - a : 0, o !== n + f && (i.__u |= 65536))) : (s = r[n]) && s.key == null && s.__e && (s.__e == t.__d && (t.__d = rv(s)), aM(s, s, !1), r[n] = null, h--); + (i = t.__k[n] = (i = e[n]) == null || typeof i == "boolean" || typeof i == "function" ? null : typeof i == "string" || typeof i == "number" || typeof i == "bigint" || i.constructor == String ? Yb(null, i, null, null, i) : b_(i) ? Yb(oh, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? Yb(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : i) != null ? (i.__ = t, i.__b = t.__b + 1, o = k5e(i, r, a = n + f, h), i.__i = o, s = null, o !== -1 && (h--, (s = r[o]) && (s.__u |= 131072)), s == null || s.__v === null ? (o == -1 && f--, typeof i.type != "function" && (i.__u |= 65536)) : o !== a && (o === a + 1 ? f++ : o > a ? h > l - a ? f += o - a : f-- : f = o < a && o == a - 1 ? o - a : 0, o !== n + f && (i.__u |= 65536))) : (s = r[n]) && s.key == null && s.__e && (s.__e == t.__d && (t.__d = K1(s)), YL(s, s, !1), r[n] = null, h--); if (h) for (n = 0; n < u; n++) - (s = r[n]) != null && (131072 & s.__u) == 0 && (s.__e == t.__d && (t.__d = rv(s)), aM(s, s)); + (s = r[n]) != null && (131072 & s.__u) == 0 && (s.__e == t.__d && (t.__d = K1(s)), YL(s, s)); } -function nie(t, e, r) { +function tie(t, e, r) { var n, i; if (typeof t.type == "function") { for (n = t.__k, i = 0; n && i < n.length; i++) - n[i] && (n[i].__ = t, e = nie(n[i], e, r)); + n[i] && (n[i].__ = t, e = tie(n[i], e, r)); return e; } return t.__e != e && (r.insertBefore(t.__e, e || null), e = t.__e), e && e.nextSibling; } -function gf(t, e) { - return e = e || [], t == null || typeof t == "boolean" || (M_(t) ? t.some(function(r) { - gf(r, e); +function cf(t, e) { + return e = e || [], t == null || typeof t == "boolean" || (b_(t) ? t.some(function(r) { + cf(r, e); }) : e.push(t)), e; } -function p5e(t, e, r, n) { +function k5e(t, e, r, n) { var i = t.key, s = t.type, a = r - 1, o = r + 1, l = e[r]; if (l === null || l && i == l.key && s === l.type) return r; @@ -117,10 +117,10 @@ function p5e(t, e, r, n) { } return -1; } -function zQ(t, e, r) { - e[0] === "-" ? t.setProperty(e, r == null ? "" : r) : t[e] = r == null ? "" : typeof r != "number" || h5e.test(e) ? r : r + "px"; +function QQ(t, e, r) { + e[0] === "-" ? t.setProperty(e, r == null ? "" : r) : t[e] = r == null ? "" : typeof r != "number" || x5e.test(e) ? r : r + "px"; } -function B4(t, e, r, n, i) { +function C4(t, e, r, n, i) { var s; e: if (e === "style") @@ -129,13 +129,13 @@ function B4(t, e, r, n, i) { else { if (typeof n == "string" && (t.style.cssText = n = ""), n) for (e in n) - r && e in r || zQ(t.style, e, ""); + r && e in r || QQ(t.style, e, ""); if (r) for (e in r) - n && r[e] === n[e] || zQ(t.style, e, r[e]); + n && r[e] === n[e] || QQ(t.style, e, r[e]); } else if (e[0] === "o" && e[1] === "n") - s = e !== (e = e.replace(/(PointerCapture)$|Capture$/, "$1")), e = e.toLowerCase() in t ? e.toLowerCase().slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + s] = r, r ? n ? r.u = n.u : (r.u = Date.now(), t.addEventListener(e, s ? UQ : qQ, s)) : t.removeEventListener(e, s ? UQ : qQ, s); + s = e !== (e = e.replace(/(PointerCapture)$|Capture$/, "$1")), e = e.toLowerCase() in t ? e.toLowerCase().slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + s] = r, r ? n ? r.u = n.u : (r.u = Date.now(), t.addEventListener(e, s ? WQ : VQ, s)) : t.removeEventListener(e, s ? WQ : VQ, s); else { if (i) e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); @@ -148,7 +148,7 @@ function B4(t, e, r, n, i) { typeof r == "function" || (r == null || r === !1 && e[4] !== "-" ? t.removeAttribute(e) : t.setAttribute(e, r)); } } -function qQ(t) { +function VQ(t) { var e = this.l[t.type + !1]; if (t.t) { if (t.t <= e.u) @@ -157,23 +157,23 @@ function qQ(t) { t.t = Date.now(); return e(cr.event ? cr.event(t) : t); } -function UQ(t) { +function WQ(t) { return this.l[t.type + !0](cr.event ? cr.event(t) : t); } -function c$(t, e, r, n, i, s, a, o, l, u) { - var h, f, d, p, g, m, v, y, b, w, O, S, C, T, D, E = e.type; +function t$(t, e, r, n, i, s, a, o, l, u) { + var h, f, d, p, g, m, v, y, b, w, O, S, C, T, M, E = e.type; if (e.constructor !== void 0) return null; 128 & r.__u && (l = !!(32 & r.__u), s = [o = e.__e = r.__e]), (h = cr.__b) && h(e); e: if (typeof E == "function") try { - if (y = e.props, b = (h = E.contextType) && n[h.__c], w = h ? b ? b.props.value : h.__ : n, r.__c ? v = (f = e.__c = r.__c).__ = f.__E : ("prototype" in E && E.prototype.render ? e.__c = f = new E(y, w) : (e.__c = f = new Wc(y, w), f.constructor = E, f.render = m5e), b && b.sub(f), f.props = y, f.state || (f.state = {}), f.context = w, f.__n = n, d = f.__d = !0, f.__h = [], f._sb = []), f.__s == null && (f.__s = f.state), E.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = lf({}, f.__s)), lf(f.__s, E.getDerivedStateFromProps(y, f.__s))), p = f.props, g = f.state, f.__v = e, d) + if (y = e.props, b = (h = E.contextType) && n[h.__c], w = h ? b ? b.props.value : h.__ : n, r.__c ? v = (f = e.__c = r.__c).__ = f.__E : ("prototype" in E && E.prototype.render ? e.__c = f = new E(y, w) : (e.__c = f = new qc(y, w), f.constructor = E, f.render = T5e), b && b.sub(f), f.props = y, f.state || (f.state = {}), f.context = w, f.__n = n, d = f.__d = !0, f.__h = [], f._sb = []), f.__s == null && (f.__s = f.state), E.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = tf({}, f.__s)), tf(f.__s, E.getDerivedStateFromProps(y, f.__s))), p = f.props, g = f.state, f.__v = e, d) E.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), f.componentDidMount != null && f.__h.push(f.componentDidMount); else { if (E.getDerivedStateFromProps == null && y !== p && f.componentWillReceiveProps != null && f.componentWillReceiveProps(y, w), !f.__e && (f.shouldComponentUpdate != null && f.shouldComponentUpdate(y, f.__s, w) === !1 || e.__v === r.__v)) { - for (e.__v !== r.__v && (f.props = y, f.state = f.__s, f.__d = !1), e.__e = r.__e, e.__k = r.__k, e.__k.forEach(function(N) { - N && (N.__ = e); + for (e.__v !== r.__v && (f.props = y, f.state = f.__s, f.__d = !1), e.__e = r.__e, e.__k = r.__k, e.__k.forEach(function(P) { + P && (P.__ = e); }), O = 0; O < f._sb.length; O++) f.__h.push(f._sb[O]); f._sb = [], f.__h.length && a.push(f); @@ -191,18 +191,18 @@ function c$(t, e, r, n, i, s, a, o, l, u) { do f.__d = !1, S && S(e), h = f.render(f.props, f.state, f.context), f.state = f.__s; while (f.__d && ++C < 25); - f.state = f.__s, f.getChildContext != null && (n = lf(lf({}, n), f.getChildContext())), d || f.getSnapshotBeforeUpdate == null || (m = f.getSnapshotBeforeUpdate(p, g)), rie(t, M_(D = h != null && h.type === fh && h.key == null ? h.props.children : h) ? D : [D], e, r, n, i, s, a, o, l, u), f.base = e.__e, e.__u &= -161, f.__h.length && a.push(f), v && (f.__E = f.__ = null); - } catch (N) { - e.__v = null, l || s != null ? (e.__e = o, e.__u |= l ? 160 : 32, s[s.indexOf(o)] = null) : (e.__e = r.__e, e.__k = r.__k), cr.__e(N, e, r); + f.state = f.__s, f.getChildContext != null && (n = tf(tf({}, n), f.getChildContext())), d || f.getSnapshotBeforeUpdate == null || (m = f.getSnapshotBeforeUpdate(p, g)), eie(t, b_(M = h != null && h.type === oh && h.key == null ? h.props.children : h) ? M : [M], e, r, n, i, s, a, o, l, u), f.base = e.__e, e.__u &= -161, f.__h.length && a.push(f), v && (f.__E = f.__ = null); + } catch (P) { + e.__v = null, l || s != null ? (e.__e = o, e.__u |= l ? 160 : 32, s[s.indexOf(o)] = null) : (e.__e = r.__e, e.__k = r.__k), cr.__e(P, e, r); } else - s == null && e.__v === r.__v ? (e.__k = r.__k, e.__e = r.__e) : e.__e = g5e(r.__e, e, r, n, i, s, a, l, u); + s == null && e.__v === r.__v ? (e.__k = r.__k, e.__e = r.__e) : e.__e = S5e(r.__e, e, r, n, i, s, a, l, u); (h = cr.diffed) && h(e); } -function iie(t, e, r) { +function rie(t, e, r) { e.__d = void 0; for (var n = 0; n < r.length; n++) - u$(r[n], r[++n], r[++n]); + r$(r[n], r[++n], r[++n]); cr.__c && cr.__c(e, t), t.some(function(i) { try { t = i.__h, i.__h = [], t.some(function(s) { @@ -213,7 +213,7 @@ function iie(t, e, r) { } }); } -function g5e(t, e, r, n, i, s, a, o, l) { +function S5e(t, e, r, n, i, s, a, o, l) { var u, h, f, d, p, g, m, v = r.props, y = e.props, b = e.type; if (b === "svg" && (i = !0), s != null) { for (u = 0; u < s.length; u++) @@ -230,32 +230,32 @@ function g5e(t, e, r, n, i, s, a, o, l) { if (b === null) v === y || o && t.data === y || (t.data = y); else { - if (s = s && gk.call(t.childNodes), v = r.props || Nx, !o && s != null) + if (s = s && ok.call(t.childNodes), v = r.props || Cx, !o && s != null) for (v = {}, u = 0; u < t.attributes.length; u++) v[(p = t.attributes[u]).name] = p.value; for (u in v) - p = v[u], u == "children" || (u == "dangerouslySetInnerHTML" ? f = p : u === "key" || u in y || B4(t, u, null, p, i)); + p = v[u], u == "children" || (u == "dangerouslySetInnerHTML" ? f = p : u === "key" || u in y || C4(t, u, null, p, i)); for (u in y) - p = y[u], u == "children" ? d = p : u == "dangerouslySetInnerHTML" ? h = p : u == "value" ? g = p : u == "checked" ? m = p : u === "key" || o && typeof p != "function" || v[u] === p || B4(t, u, p, v[u], i); + p = y[u], u == "children" ? d = p : u == "dangerouslySetInnerHTML" ? h = p : u == "value" ? g = p : u == "checked" ? m = p : u === "key" || o && typeof p != "function" || v[u] === p || C4(t, u, p, v[u], i); if (h) o || f && (h.__html === f.__html || h.__html === t.innerHTML) || (t.innerHTML = h.__html), e.__k = []; - else if (f && (t.innerHTML = ""), rie(t, M_(d) ? d : [d], e, r, n, i && b !== "foreignObject", s, a, s ? s[0] : r.__k && rv(r, 0), o, l), s != null) + else if (f && (t.innerHTML = ""), eie(t, b_(d) ? d : [d], e, r, n, i && b !== "foreignObject", s, a, s ? s[0] : r.__k && K1(r, 0), o, l), s != null) for (u = s.length; u--; ) - s[u] != null && eie(s[u]); - o || (u = "value", g !== void 0 && (g !== t[u] || b === "progress" && !g || b === "option" && g !== v[u]) && B4(t, u, g, v[u], !1), u = "checked", m !== void 0 && m !== t[u] && B4(t, u, m, v[u], !1)); + s[u] != null && Kne(s[u]); + o || (u = "value", g !== void 0 && (g !== t[u] || b === "progress" && !g || b === "option" && g !== v[u]) && C4(t, u, g, v[u], !1), u = "checked", m !== void 0 && m !== t[u] && C4(t, u, m, v[u], !1)); } return t; } -function u$(t, e, r) { +function r$(t, e, r) { try { typeof t == "function" ? t(e) : t.current = e; } catch (n) { cr.__e(n, r); } } -function aM(t, e, r) { +function YL(t, e, r) { var n, i; - if (cr.unmount && cr.unmount(t), (n = t.ref) && (n.current && n.current !== t.__e || u$(n, null, e)), (n = t.__c) != null) { + if (cr.unmount && cr.unmount(t), (n = t.ref) && (n.current && n.current !== t.__e || r$(n, null, e)), (n = t.__c) != null) { if (n.componentWillUnmount) try { n.componentWillUnmount(); @@ -266,27 +266,27 @@ function aM(t, e, r) { } if (n = t.__k) for (i = 0; i < n.length; i++) - n[i] && aM(n[i], e, r || typeof t.type != "function"); - r || t.__e == null || eie(t.__e), t.__ = t.__e = t.__d = void 0; + n[i] && YL(n[i], e, r || typeof t.type != "function"); + r || t.__e == null || Kne(t.__e), t.__ = t.__e = t.__d = void 0; } -function m5e(t, e, r) { +function T5e(t, e, r) { return this.constructor(t, r); } -function Sf(t, e, r) { +function bf(t, e, r) { var n, i, s, a; - cr.__ && cr.__(t, e), i = (n = typeof r == "function") ? null : r && r.__k || e.__k, s = [], a = [], c$(e, t = (!n && r || e).__k = hh(fh, null, [t]), i || Nx, Nx, e.ownerSVGElement !== void 0, !n && r ? [r] : i ? null : e.firstChild ? gk.call(e.childNodes) : null, s, !n && r ? r : i ? i.__e : e.firstChild, n, a), iie(s, t, a); + cr.__ && cr.__(t, e), i = (n = typeof r == "function") ? null : r && r.__k || e.__k, s = [], a = [], t$(e, t = (!n && r || e).__k = ah(oh, null, [t]), i || Cx, Cx, e.ownerSVGElement !== void 0, !n && r ? [r] : i ? null : e.firstChild ? ok.call(e.childNodes) : null, s, !n && r ? r : i ? i.__e : e.firstChild, n, a), rie(s, t, a); } -function sie(t, e) { - Sf(t, e, sie); +function nie(t, e) { + bf(t, e, nie); } -function v5e(t, e, r) { - var n, i, s, a, o = lf({}, t.props); +function C5e(t, e, r) { + var n, i, s, a, o = tf({}, t.props); for (s in t.type && t.type.defaultProps && (a = t.type.defaultProps), e) s == "key" ? n = e[s] : s == "ref" ? i = e[s] : o[s] = e[s] === void 0 && a !== void 0 ? a[s] : e[s]; - return arguments.length > 2 && (o.children = arguments.length > 3 ? gk.call(arguments, 2) : r), tx(t.type, o, n || t.key, i || t.ref, null); + return arguments.length > 2 && (o.children = arguments.length > 3 ? ok.call(arguments, 2) : r), Yb(t.type, o, n || t.key, i || t.ref, null); } -function aie(t, e) { - var r = { __c: e = "__cC" + Kne++, __: t, Consumer: function(n, i) { +function iie(t, e) { + var r = { __c: e = "__cC" + Zne++, __: t, Consumer: function(n, i) { return n.children(i); }, Provider: function(n) { var i, s; @@ -294,7 +294,7 @@ function aie(t, e) { return s; }, this.shouldComponentUpdate = function(a) { this.props.value !== a.value && i.some(function(o) { - o.__e = !0, sM(o); + o.__e = !0, WL(o); }); }, this.sub = function(a) { i.push(a); @@ -306,7 +306,7 @@ function aie(t, e) { } }; return r.Provider.__ = r.Consumer.contextType = r; } -gk = Jne.slice, cr = { __e: function(t, e, r, n) { +ok = jne.slice, cr = { __e: function(t, e, r, n) { for (var i, s, a; e = e.__; ) if ((i = e.__c) && !i.__) try { @@ -316,31 +316,31 @@ gk = Jne.slice, cr = { __e: function(t, e, r, n) { t = o; } throw t; -} }, Xne = 0, jne = function(t) { +} }, Gne = 0, Hne = function(t) { return t != null && t.constructor == null; -}, Wc.prototype.setState = function(t, e) { +}, qc.prototype.setState = function(t, e) { var r; - r = this.__s != null && this.__s !== this.state ? this.__s : this.__s = lf({}, this.state), typeof t == "function" && (t = t(lf({}, r), this.props)), t && lf(r, t), t != null && this.__v && (e && this._sb.push(e), sM(this)); -}, Wc.prototype.forceUpdate = function(t) { - this.__v && (this.__e = !0, t && this.__h.push(t), sM(this)); -}, Wc.prototype.render = fh, x0 = [], Zne = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, iM = function(t, e) { + r = this.__s != null && this.__s !== this.state ? this.__s : this.__s = tf({}, this.state), typeof t == "function" && (t = t(tf({}, r), this.props)), t && tf(r, t), t != null && this.__v && (e && this._sb.push(e), WL(this)); +}, qc.prototype.forceUpdate = function(t) { + this.__v && (this.__e = !0, t && this.__h.push(t), WL(this)); +}, qc.prototype.render = oh, x0 = [], Xne = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, VL = function(t, e) { return t.__v.__b - e.__v.__b; -}, rT.__r = 0, Kne = 0; -var ip, ri, N7, QQ, nv = 0, oie = [], P5 = [], VQ = cr.__b, WQ = cr.__r, YQ = cr.diffed, GQ = cr.__c, HQ = cr.unmount; -function Ay(t, e) { - cr.__h && cr.__h(ri, t, nv || e), nv = 0; - var r = ri.__H || (ri.__H = { __: [], __h: [] }); - return t >= r.__.length && r.__.push({ __V: P5 }), r.__[t]; -} -function ra(t) { - return nv = 1, D_(lie, t); -} -function D_(t, e, r) { - var n = Ay(ip++, 2); - if (n.t = t, !n.__c && (n.__ = [r ? r(e) : lie(void 0, e), function(o) { +}, U3.__r = 0, Zne = 0; +var np, ei, O7, YQ, J1 = 0, sie = [], x5 = [], GQ = cr.__b, HQ = cr.__r, XQ = cr.diffed, ZQ = cr.__c, jQ = cr.unmount; +function Cy(t, e) { + cr.__h && cr.__h(ei, t, J1 || e), J1 = 0; + var r = ei.__H || (ei.__H = { __: [], __h: [] }); + return t >= r.__.length && r.__.push({ __V: x5 }), r.__[t]; +} +function og(t) { + return J1 = 1, n$(oie, t); +} +function n$(t, e, r) { + var n = Cy(np++, 2); + if (n.t = t, !n.__c && (n.__ = [r ? r(e) : oie(void 0, e), function(o) { var l = n.__N ? n.__N[0] : n.__[0], u = n.t(l, o); l !== u && (n.__N = [u, n.__[1]], n.__c.setState({})); - }], n.__c = ri, !ri.u)) { + }], n.__c = ei, !ei.u)) { var i = function(o, l, u) { if (!n.__c.__H) return !0; @@ -359,33 +359,33 @@ function D_(t, e, r) { } }), !(!f && n.__c.props === o) && (!s || s.call(this, o, l, u)); }; - ri.u = !0; - var s = ri.shouldComponentUpdate, a = ri.componentWillUpdate; - ri.componentWillUpdate = function(o, l, u) { + ei.u = !0; + var s = ei.shouldComponentUpdate, a = ei.componentWillUpdate; + ei.componentWillUpdate = function(o, l, u) { if (this.__e) { var h = s; s = void 0, i(o, l, u), s = h; } a && a.call(this, o, l, u); - }, ri.shouldComponentUpdate = i; + }, ei.shouldComponentUpdate = i; } return n.__N || n.__; } -function Ji(t, e) { - var r = Ay(ip++, 3); - !cr.__s && h$(r.__H, e) && (r.__ = t, r.i = e, ri.__H.__h.push(r)); +function ca(t, e) { + var r = Cy(np++, 3); + !cr.__s && i$(r.__H, e) && (r.__ = t, r.i = e, ei.__H.__h.push(r)); } -function P_(t, e) { - var r = Ay(ip++, 4); - !cr.__s && h$(r.__H, e) && (r.__ = t, r.i = e, ri.__h.push(r)); +function x_(t, e) { + var r = Cy(np++, 4); + !cr.__s && i$(r.__H, e) && (r.__ = t, r.i = e, ei.__h.push(r)); } -function ts(t) { - return nv = 5, $s(function() { +function $i(t) { + return J1 = 5, Ns(function() { return { current: t }; }, []); } -function y5e(t, e, r) { - nv = 6, P_(function() { +function E5e(t, e, r) { + J1 = 6, x_(function() { return typeof t == "function" ? (t(e()), function() { return t(null); }) : t ? (t.current = e(), function() { @@ -393,249 +393,249 @@ function y5e(t, e, r) { }) : void 0; }, r == null ? r : r.concat(t)); } -function $s(t, e) { - var r = Ay(ip++, 7); - return h$(r.__H, e) ? (r.__V = t(), r.i = e, r.__h = t, r.__V) : r.__; +function Ns(t, e) { + var r = Cy(np++, 7); + return i$(r.__H, e) ? (r.__V = t(), r.i = e, r.__h = t, r.__V) : r.__; } -function nT(t, e) { - return nv = 8, $s(function() { +function aie(t, e) { + return J1 = 8, Ns(function() { return t; }, e); } -function Cl(t) { - var e = ri.context[t.__c], r = Ay(ip++, 9); - return r.c = t, e ? (r.__ == null && (r.__ = !0, e.sub(ri)), e.props.value) : t.__; +function Ol(t) { + var e = ei.context[t.__c], r = Cy(np++, 9); + return r.c = t, e ? (r.__ == null && (r.__ = !0, e.sub(ei)), e.props.value) : t.__; } -function oM(t, e) { +function GL(t, e) { cr.useDebugValue && cr.useDebugValue(e ? e(t) : t); } -function b5e() { - var t = Ay(ip++, 11); +function _5e() { + var t = Cy(np++, 11); if (!t.__) { - for (var e = ri.__v; e !== null && !e.__m && e.__ !== null; ) + for (var e = ei.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__; var r = e.__m || (e.__m = [0, 0]); t.__ = "P" + r[0] + "-" + r[1]++; } return t.__; } -function x5e() { - for (var t; t = oie.shift(); ) +function A5e() { + for (var t; t = sie.shift(); ) if (t.__P && t.__H) try { - t.__H.__h.forEach(N5), t.__H.__h.forEach(lM), t.__H.__h = []; + t.__H.__h.forEach(w5), t.__H.__h.forEach(HL), t.__H.__h = []; } catch (e) { t.__H.__h = [], cr.__e(e, t.__v); } } cr.__b = function(t) { - ri = null, VQ && VQ(t); + ei = null, GQ && GQ(t); }, cr.__r = function(t) { - WQ && WQ(t), ip = 0; - var e = (ri = t.__c).__H; - e && (N7 === ri ? (e.__h = [], ri.__h = [], e.__.forEach(function(r) { - r.__N && (r.__ = r.__N), r.__V = P5, r.__N = r.i = void 0; - })) : (e.__h.forEach(N5), e.__h.forEach(lM), e.__h = [], ip = 0)), N7 = ri; + HQ && HQ(t), np = 0; + var e = (ei = t.__c).__H; + e && (O7 === ei ? (e.__h = [], ei.__h = [], e.__.forEach(function(r) { + r.__N && (r.__ = r.__N), r.__V = x5, r.__N = r.i = void 0; + })) : (e.__h.forEach(w5), e.__h.forEach(HL), e.__h = [], np = 0)), O7 = ei; }, cr.diffed = function(t) { - YQ && YQ(t); + XQ && XQ(t); var e = t.__c; - e && e.__H && (e.__H.__h.length && (oie.push(e) !== 1 && QQ === cr.requestAnimationFrame || ((QQ = cr.requestAnimationFrame) || w5e)(x5e)), e.__H.__.forEach(function(r) { - r.i && (r.__H = r.i), r.__V !== P5 && (r.__ = r.__V), r.i = void 0, r.__V = P5; - })), N7 = ri = null; + e && e.__H && (e.__H.__h.length && (sie.push(e) !== 1 && YQ === cr.requestAnimationFrame || ((YQ = cr.requestAnimationFrame) || R5e)(A5e)), e.__H.__.forEach(function(r) { + r.i && (r.__H = r.i), r.__V !== x5 && (r.__ = r.__V), r.i = void 0, r.__V = x5; + })), O7 = ei = null; }, cr.__c = function(t, e) { e.some(function(r) { try { - r.__h.forEach(N5), r.__h = r.__h.filter(function(n) { - return !n.__ || lM(n); + r.__h.forEach(w5), r.__h = r.__h.filter(function(n) { + return !n.__ || HL(n); }); } catch (n) { e.some(function(i) { i.__h && (i.__h = []); }), e = [], cr.__e(n, r.__v); } - }), GQ && GQ(t, e); + }), ZQ && ZQ(t, e); }, cr.unmount = function(t) { - HQ && HQ(t); + jQ && jQ(t); var e, r = t.__c; r && r.__H && (r.__H.__.forEach(function(n) { try { - N5(n); + w5(n); } catch (i) { e = i; } }), r.__H = void 0, e && cr.__e(e, r.__v)); }; -var XQ = typeof requestAnimationFrame == "function"; -function w5e(t) { +var KQ = typeof requestAnimationFrame == "function"; +function R5e(t) { var e, r = function() { - clearTimeout(n), XQ && cancelAnimationFrame(e), setTimeout(t); + clearTimeout(n), KQ && cancelAnimationFrame(e), setTimeout(t); }, n = setTimeout(r, 100); - XQ && (e = requestAnimationFrame(r)); + KQ && (e = requestAnimationFrame(r)); } -function N5(t) { - var e = ri, r = t.__c; - typeof r == "function" && (t.__c = void 0, r()), ri = e; +function w5(t) { + var e = ei, r = t.__c; + typeof r == "function" && (t.__c = void 0, r()), ei = e; } -function lM(t) { - var e = ri; - t.__c = t.__(), ri = e; +function HL(t) { + var e = ei; + t.__c = t.__(), ei = e; } -function h$(t, e) { +function i$(t, e) { return !t || t.length !== e.length || e.some(function(r, n) { return r !== t[n]; }); } -function lie(t, e) { +function oie(t, e) { return typeof e == "function" ? e(t) : e; } -function O5e(t) { +function L5e(t) { return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; } -var cie = { exports: {} }, Wi = cie.exports = {}, Mu, Du; -function cM() { +var lie = { exports: {} }, Vi = lie.exports = {}, Eu, _u; +function XL() { throw new Error("setTimeout has not been defined"); } -function uM() { +function ZL() { throw new Error("clearTimeout has not been defined"); } (function() { try { - typeof setTimeout == "function" ? Mu = setTimeout : Mu = cM; + typeof setTimeout == "function" ? Eu = setTimeout : Eu = XL; } catch { - Mu = cM; + Eu = XL; } try { - typeof clearTimeout == "function" ? Du = clearTimeout : Du = uM; + typeof clearTimeout == "function" ? _u = clearTimeout : _u = ZL; } catch { - Du = uM; + _u = ZL; } })(); -function uie(t) { - if (Mu === setTimeout) +function cie(t) { + if (Eu === setTimeout) return setTimeout(t, 0); - if ((Mu === cM || !Mu) && setTimeout) - return Mu = setTimeout, setTimeout(t, 0); + if ((Eu === XL || !Eu) && setTimeout) + return Eu = setTimeout, setTimeout(t, 0); try { - return Mu(t, 0); + return Eu(t, 0); } catch { try { - return Mu.call(null, t, 0); + return Eu.call(null, t, 0); } catch { - return Mu.call(this, t, 0); + return Eu.call(this, t, 0); } } } -function k5e(t) { - if (Du === clearTimeout) +function M5e(t) { + if (_u === clearTimeout) return clearTimeout(t); - if ((Du === uM || !Du) && clearTimeout) - return Du = clearTimeout, clearTimeout(t); + if ((_u === ZL || !_u) && clearTimeout) + return _u = clearTimeout, clearTimeout(t); try { - return Du(t); + return _u(t); } catch { try { - return Du.call(null, t); + return _u.call(null, t); } catch { - return Du.call(this, t); + return _u.call(this, t); } } } -var cf = [], _1 = !1, P0, I5 = -1; -function S5e() { - !_1 || !P0 || (_1 = !1, P0.length ? cf = P0.concat(cf) : I5 = -1, cf.length && hie()); +var rf = [], k1 = !1, P0, O5 = -1; +function D5e() { + !k1 || !P0 || (k1 = !1, P0.length ? rf = P0.concat(rf) : O5 = -1, rf.length && uie()); } -function hie() { - if (!_1) { - var t = uie(S5e); - _1 = !0; - for (var e = cf.length; e; ) { - for (P0 = cf, cf = []; ++I5 < e; ) - P0 && P0[I5].run(); - I5 = -1, e = cf.length; +function uie() { + if (!k1) { + var t = cie(D5e); + k1 = !0; + for (var e = rf.length; e; ) { + for (P0 = rf, rf = []; ++O5 < e; ) + P0 && P0[O5].run(); + O5 = -1, e = rf.length; } - P0 = null, _1 = !1, k5e(t); + P0 = null, k1 = !1, M5e(t); } } -Wi.nextTick = function(t) { +Vi.nextTick = function(t) { var e = new Array(arguments.length - 1); if (arguments.length > 1) for (var r = 1; r < arguments.length; r++) e[r - 1] = arguments[r]; - cf.push(new fie(t, e)), cf.length === 1 && !_1 && uie(hie); + rf.push(new hie(t, e)), rf.length === 1 && !k1 && cie(uie); }; -function fie(t, e) { +function hie(t, e) { this.fun = t, this.array = e; } -fie.prototype.run = function() { +hie.prototype.run = function() { this.fun.apply(null, this.array); }; -Wi.title = "browser"; -Wi.browser = !0; -Wi.env = {}; -Wi.argv = []; -Wi.version = ""; -Wi.versions = {}; -function Gf() { -} -Wi.on = Gf; -Wi.addListener = Gf; -Wi.once = Gf; -Wi.off = Gf; -Wi.removeListener = Gf; -Wi.removeAllListeners = Gf; -Wi.emit = Gf; -Wi.prependListener = Gf; -Wi.prependOnceListener = Gf; -Wi.listeners = function(t) { +Vi.title = "browser"; +Vi.browser = !0; +Vi.env = {}; +Vi.argv = []; +Vi.version = ""; +Vi.versions = {}; +function Uf() { +} +Vi.on = Uf; +Vi.addListener = Uf; +Vi.once = Uf; +Vi.off = Uf; +Vi.removeListener = Uf; +Vi.removeAllListeners = Uf; +Vi.emit = Uf; +Vi.prependListener = Uf; +Vi.prependOnceListener = Uf; +Vi.listeners = function(t) { return []; }; -Wi.binding = function(t) { +Vi.binding = function(t) { throw new Error("process.binding is not supported"); }; -Wi.cwd = function() { +Vi.cwd = function() { return "/"; }; -Wi.chdir = function(t) { +Vi.chdir = function(t) { throw new Error("process.chdir is not supported"); }; -Wi.umask = function() { +Vi.umask = function() { return 0; }; -var T5e = cie.exports; -const Ns = /* @__PURE__ */ O5e(T5e); -var Vo = function() { - return Vo = Object.assign || function(e) { +var P5e = lie.exports; +const Ds = /* @__PURE__ */ L5e(P5e); +var zo = function() { + return zo = Object.assign || function(e) { for (var r, n = 1, i = arguments.length; n < i; n++) { r = arguments[n]; for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (e[s] = r[s]); } return e; - }, Vo.apply(this, arguments); + }, zo.apply(this, arguments); }; -function iv(t, e, r) { +function ev(t, e, r) { if (r || arguments.length === 2) for (var n = 0, i = e.length, s; n < i; n++) (s || !(n in e)) && (s || (s = Array.prototype.slice.call(e, 0, n)), s[n] = e[n]); return t.concat(s || Array.prototype.slice.call(e)); } -function C5e(t) { +function N5e(t) { var e = /* @__PURE__ */ Object.create(null); return function(r) { return e[r] === void 0 && (e[r] = t(r)), e[r]; }; } -var E5e = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, _5e = /* @__PURE__ */ C5e( +var I5e = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, $5e = /* @__PURE__ */ N5e( function(t) { - return E5e.test(t) || t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && t.charCodeAt(2) < 91; + return I5e.test(t) || t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && t.charCodeAt(2) < 91; } ); -function die(t, e) { +function fie(t, e) { for (var r in e) t[r] = e[r]; return t; } -function hM(t, e) { +function jL(t, e) { for (var r in t) if (r !== "__source" && !(r in e)) return !0; @@ -644,73 +644,73 @@ function hM(t, e) { return !0; return !1; } -function fM(t) { +function KL(t) { this.props = t; } -function A5e(t, e) { +function B5e(t, e) { function r(i) { var s = this.props.ref, a = s == i.ref; - return !a && s && (s.call ? s(null) : s.current = null), e ? !e(this.props, i) || !a : hM(this.props, i); + return !a && s && (s.call ? s(null) : s.current = null), e ? !e(this.props, i) || !a : jL(this.props, i); } function n(i) { - return this.shouldComponentUpdate = r, hh(t, i); + return this.shouldComponentUpdate = r, ah(t, i); } return n.displayName = "Memo(" + (t.displayName || t.name) + ")", n.prototype.isReactComponent = !0, n.__f = !0, n; } -(fM.prototype = new Wc()).isPureReactComponent = !0, fM.prototype.shouldComponentUpdate = function(t, e) { - return hM(this.props, t) || hM(this.state, e); +(KL.prototype = new qc()).isPureReactComponent = !0, KL.prototype.shouldComponentUpdate = function(t, e) { + return jL(this.props, t) || jL(this.state, e); }; -var jQ = cr.__b; +var JQ = cr.__b; cr.__b = function(t) { - t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), jQ && jQ(t); + t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), JQ && JQ(t); }; -var R5e = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911; -function L5e(t) { +var F5e = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911; +function z5e(t) { function e(r) { - var n = die({}, r); + var n = fie({}, r); return delete n.ref, t(n, r.ref || null); } - return e.$$typeof = R5e, e.render = e, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e; + return e.$$typeof = F5e, e.render = e, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e; } -var ZQ = function(t, e) { - return t == null ? null : gf(gf(t).map(e)); -}, M5e = { map: ZQ, forEach: ZQ, count: function(t) { - return t ? gf(t).length : 0; +var eV = function(t, e) { + return t == null ? null : cf(cf(t).map(e)); +}, q5e = { map: eV, forEach: eV, count: function(t) { + return t ? cf(t).length : 0; }, only: function(t) { - var e = gf(t); + var e = cf(t); if (e.length !== 1) throw "Children.only"; return e[0]; -}, toArray: gf }, D5e = cr.__e; +}, toArray: cf }, U5e = cr.__e; cr.__e = function(t, e, r, n) { if (t.then) { for (var i, s = e; s = s.__; ) if ((i = s.__c) && i.__c) return e.__e == null && (e.__e = r.__e, e.__k = r.__k), i.__c(t, e); } - D5e(t, e, r, n); + U5e(t, e, r, n); }; -var KQ = cr.unmount; -function pie(t, e, r) { +var tV = cr.unmount; +function die(t, e, r) { return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function(n) { typeof n.__c == "function" && n.__c(); - }), t.__c.__H = null), (t = die({}, t)).__c != null && (t.__c.__P === r && (t.__c.__P = e), t.__c = null), t.__k = t.__k && t.__k.map(function(n) { - return pie(n, e, r); + }), t.__c.__H = null), (t = fie({}, t)).__c != null && (t.__c.__P === r && (t.__c.__P = e), t.__c = null), t.__k = t.__k && t.__k.map(function(n) { + return die(n, e, r); })), t; } -function gie(t, e, r) { +function pie(t, e, r) { return t && r && (t.__v = null, t.__k = t.__k && t.__k.map(function(n) { - return gie(n, e, r); + return pie(n, e, r); }), t.__c && t.__c.__P === e && (t.__e && r.appendChild(t.__e), t.__c.__e = !0, t.__c.__P = r)), t; } -function $5() { +function k5() { this.__u = 0, this.t = null, this.__b = null; } -function mie(t) { +function gie(t) { var e = t.__.__c; return e && e.__a && e.__a(t); } -function P5e(t) { +function Q5e(t) { var e, r, n; function i(s) { if (e || (e = t()).then(function(a) { @@ -721,20 +721,20 @@ function P5e(t) { throw n; if (!r) throw e; - return hh(r, s); + return ah(r, s); } return i.displayName = "Lazy", i.__f = !0, i; } -function kb() { +function db() { this.u = null, this.o = null; } cr.unmount = function(t) { var e = t.__c; - e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), KQ && KQ(t); -}, ($5.prototype = new Wc()).__c = function(t, e) { + e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), tV && tV(t); +}, (k5.prototype = new qc()).__c = function(t, e) { var r = e.__c, n = this; n.t == null && (n.t = []), n.t.push(r); - var i = mie(n.__v), s = !1, a = function() { + var i = gie(n.__v), s = !1, a = function() { s || (s = !0, r.__R = null, i ? i(o) : o()); }; r.__R = a; @@ -742,7 +742,7 @@ cr.unmount = function(t) { if (!--n.__u) { if (n.state.__a) { var l = n.state.__a; - n.__v.__k[0] = gie(l, l.__c.__P, l.__c.__O); + n.__v.__k[0] = pie(l, l.__c.__P, l.__c.__O); } var u; for (n.setState({ __a: n.__b = null }); u = n.t.pop(); ) @@ -750,20 +750,20 @@ cr.unmount = function(t) { } }; n.__u++ || 32 & e.__u || n.setState({ __a: n.__b = n.__v.__k[0] }), t.then(a, a); -}, $5.prototype.componentWillUnmount = function() { +}, k5.prototype.componentWillUnmount = function() { this.t = []; -}, $5.prototype.render = function(t, e) { +}, k5.prototype.render = function(t, e) { if (this.__b) { if (this.__v.__k) { var r = document.createElement("div"), n = this.__v.__k[0].__c; - this.__v.__k[0] = pie(this.__b, r, n.__O = n.__P); + this.__v.__k[0] = die(this.__b, r, n.__O = n.__P); } this.__b = null; } - var i = e.__a && hh(fh, null, t.fallback); - return i && (i.__u &= -33), [hh(fh, null, e.__a ? null : t.children), i]; + var i = e.__a && ah(oh, null, t.fallback); + return i && (i.__u &= -33), [ah(oh, null, e.__a ? null : t.children), i]; }; -var JQ = function(t, e, r) { +var rV = function(t, e, r) { if (++r[1] === r[0] && t.o.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.o.size)) for (r = t.u; r; ) { for (; r.length > 3; ) @@ -773,153 +773,153 @@ var JQ = function(t, e, r) { t.u = r = r[2]; } }; -function N5e(t) { +function V5e(t) { return this.getChildContext = function() { return t.context; }, t.children; } -function I5e(t) { +function W5e(t) { var e = this, r = t.i; e.componentWillUnmount = function() { - Sf(null, e.l), e.l = null, e.i = null; + bf(null, e.l), e.l = null, e.i = null; }, e.i && e.i !== r && e.componentWillUnmount(), e.l || (e.i = r, e.l = { nodeType: 1, parentNode: r, childNodes: [], appendChild: function(n) { this.childNodes.push(n), e.i.appendChild(n); }, insertBefore: function(n, i) { this.childNodes.push(n), e.i.appendChild(n); }, removeChild: function(n) { this.childNodes.splice(this.childNodes.indexOf(n) >>> 1, 1), e.i.removeChild(n); - } }), Sf(hh(N5e, { context: e.context }, t.__v), e.l); + } }), bf(ah(V5e, { context: e.context }, t.__v), e.l); } -function $5e(t, e) { - var r = hh(I5e, { __v: t, i: e }); +function Y5e(t, e) { + var r = ah(W5e, { __v: t, i: e }); return r.containerInfo = e, r; } -(kb.prototype = new Wc()).__a = function(t) { - var e = this, r = mie(e.__v), n = e.o.get(t); +(db.prototype = new qc()).__a = function(t) { + var e = this, r = gie(e.__v), n = e.o.get(t); return n[0]++, function(i) { var s = function() { - e.props.revealOrder ? (n.push(i), JQ(e, t, n)) : i(); + e.props.revealOrder ? (n.push(i), rV(e, t, n)) : i(); }; r ? r(s) : s(); }; -}, kb.prototype.render = function(t) { +}, db.prototype.render = function(t) { this.u = null, this.o = /* @__PURE__ */ new Map(); - var e = gf(t.children); + var e = cf(t.children); t.revealOrder && t.revealOrder[0] === "b" && e.reverse(); for (var r = e.length; r--; ) this.o.set(e[r], this.u = [1, 0, this.u]); return t.children; -}, kb.prototype.componentDidUpdate = kb.prototype.componentDidMount = function() { +}, db.prototype.componentDidUpdate = db.prototype.componentDidMount = function() { var t = this; this.o.forEach(function(e, r) { - JQ(t, r, e); + rV(t, r, e); }); }; -var vie = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, B5e = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, F5e = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, z5e = /[A-Z0-9]/g, q5e = typeof document < "u", U5e = function(t) { +var mie = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, G5e = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, H5e = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, X5e = /[A-Z0-9]/g, Z5e = typeof document < "u", j5e = function(t) { return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t); }; -function Q5e(t, e, r) { - return e.__k == null && (e.textContent = ""), Sf(t, e), typeof r == "function" && r(), t ? t.__c : null; +function K5e(t, e, r) { + return e.__k == null && (e.textContent = ""), bf(t, e), typeof r == "function" && r(), t ? t.__c : null; } -function V5e(t, e, r) { - return sie(t, e), typeof r == "function" && r(), t ? t.__c : null; +function J5e(t, e, r) { + return nie(t, e), typeof r == "function" && r(), t ? t.__c : null; } -Wc.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) { - Object.defineProperty(Wc.prototype, t, { configurable: !0, get: function() { +qc.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) { + Object.defineProperty(qc.prototype, t, { configurable: !0, get: function() { return this["UNSAFE_" + t]; }, set: function(e) { Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e }); } }); }); -var eV = cr.event; -function W5e() { +var nV = cr.event; +function e3e() { } -function Y5e() { +function t3e() { return this.cancelBubble; } -function G5e() { +function r3e() { return this.defaultPrevented; } cr.event = function(t) { - return eV && (t = eV(t)), t.persist = W5e, t.isPropagationStopped = Y5e, t.isDefaultPrevented = G5e, t.nativeEvent = t; + return nV && (t = nV(t)), t.persist = e3e, t.isPropagationStopped = t3e, t.isDefaultPrevented = r3e, t.nativeEvent = t; }; -var f$, H5e = { enumerable: !1, configurable: !0, get: function() { +var s$, n3e = { enumerable: !1, configurable: !0, get: function() { return this.class; -} }, tV = cr.vnode; +} }, iV = cr.vnode; cr.vnode = function(t) { typeof t.type == "string" && function(e) { var r = e.props, n = e.type, i = {}; for (var s in r) { var a = r[s]; - if (!(s === "value" && "defaultValue" in r && a == null || q5e && s === "children" && n === "noscript" || s === "class" || s === "className")) { + if (!(s === "value" && "defaultValue" in r && a == null || Z5e && s === "children" && n === "noscript" || s === "class" || s === "className")) { var o = s.toLowerCase(); - s === "defaultValue" && "value" in r && r.value == null ? s = "value" : s === "download" && a === !0 ? a = "" : o === "ondoubleclick" ? s = "ondblclick" : o !== "onchange" || n !== "input" && n !== "textarea" || U5e(r.type) ? o === "onfocus" ? s = "onfocusin" : o === "onblur" ? s = "onfocusout" : F5e.test(s) ? s = o : n.indexOf("-") === -1 && B5e.test(s) ? s = s.replace(z5e, "-$&").toLowerCase() : a === null && (a = void 0) : o = s = "oninput", o === "oninput" && i[s = o] && (s = "oninputCapture"), i[s] = a; + s === "defaultValue" && "value" in r && r.value == null ? s = "value" : s === "download" && a === !0 ? a = "" : o === "ondoubleclick" ? s = "ondblclick" : o !== "onchange" || n !== "input" && n !== "textarea" || j5e(r.type) ? o === "onfocus" ? s = "onfocusin" : o === "onblur" ? s = "onfocusout" : H5e.test(s) ? s = o : n.indexOf("-") === -1 && G5e.test(s) ? s = s.replace(X5e, "-$&").toLowerCase() : a === null && (a = void 0) : o = s = "oninput", o === "oninput" && i[s = o] && (s = "oninputCapture"), i[s] = a; } } - n == "select" && i.multiple && Array.isArray(i.value) && (i.value = gf(r.children).forEach(function(l) { + n == "select" && i.multiple && Array.isArray(i.value) && (i.value = cf(r.children).forEach(function(l) { l.props.selected = i.value.indexOf(l.props.value) != -1; - })), n == "select" && i.defaultValue != null && (i.value = gf(r.children).forEach(function(l) { + })), n == "select" && i.defaultValue != null && (i.value = cf(r.children).forEach(function(l) { l.props.selected = i.multiple ? i.defaultValue.indexOf(l.props.value) != -1 : i.defaultValue == l.props.value; - })), r.class && !r.className ? (i.class = r.class, Object.defineProperty(i, "className", H5e)) : (r.className && !r.class || r.class && r.className) && (i.class = i.className = r.className), e.props = i; - }(t), t.$$typeof = vie, tV && tV(t); + })), r.class && !r.className ? (i.class = r.class, Object.defineProperty(i, "className", n3e)) : (r.className && !r.class || r.class && r.className) && (i.class = i.className = r.className), e.props = i; + }(t), t.$$typeof = mie, iV && iV(t); }; -var rV = cr.__r; +var sV = cr.__r; cr.__r = function(t) { - rV && rV(t), f$ = t.__c; + sV && sV(t), s$ = t.__c; }; -var nV = cr.diffed; +var aV = cr.diffed; cr.diffed = function(t) { - nV && nV(t); + aV && aV(t); var e = t.props, r = t.__e; - r != null && t.type === "textarea" && "value" in e && e.value !== r.value && (r.value = e.value == null ? "" : e.value), f$ = null; + r != null && t.type === "textarea" && "value" in e && e.value !== r.value && (r.value = e.value == null ? "" : e.value), s$ = null; }; -var X5e = { ReactCurrentDispatcher: { current: { readContext: function(t) { - return f$.__n[t.__c].props.value; +var i3e = { ReactCurrentDispatcher: { current: { readContext: function(t) { + return s$.__n[t.__c].props.value; } } } }; -function j5e(t) { - return hh.bind(null, t); +function s3e(t) { + return ah.bind(null, t); } -function N_(t) { - return !!t && t.$$typeof === vie; +function w_(t) { + return !!t && t.$$typeof === mie; } -function Z5e(t) { - return N_(t) && t.type === fh; +function a3e(t) { + return w_(t) && t.type === oh; } -function K5e(t) { - return N_(t) ? v5e.apply(null, arguments) : t; +function o3e(t) { + return w_(t) ? C5e.apply(null, arguments) : t; } -function J5e(t) { - return !!t.__k && (Sf(null, t), !0); +function l3e(t) { + return !!t.__k && (bf(null, t), !0); } -function e3e(t) { +function c3e(t) { return t && (t.base || t.nodeType === 1 && t) || null; } -var t3e = function(t, e) { +var u3e = function(t, e) { return t(e); -}, r3e = function(t, e) { +}, h3e = function(t, e) { return t(e); -}, n3e = fh; -function yie(t) { +}, f3e = oh; +function vie(t) { t(); } -function i3e(t) { +function d3e(t) { return t; } -function s3e() { - return [!1, yie]; -} -var a3e = P_, o3e = N_; -function l3e(t, e) { - var r = e(), n = ra({ h: { __: r, v: e } }), i = n[0].h, s = n[1]; - return P_(function() { - i.__ = r, i.v = e, I7(i) && s({ h: i }); - }, [t, r, e]), Ji(function() { - return I7(i) && s({ h: i }), t(function() { - I7(i) && s({ h: i }); +function p3e() { + return [!1, vie]; +} +var g3e = x_, m3e = w_; +function v3e(t, e) { + var r = e(), n = og({ h: { __: r, v: e } }), i = n[0].h, s = n[1]; + return x_(function() { + i.__ = r, i.v = e, k7(i) && s({ h: i }); + }, [t, r, e]), ca(function() { + return k7(i) && s({ h: i }), t(function() { + k7(i) && s({ h: i }); }); }, [t]), r; } -function I7(t) { +function k7(t) { var e, r, n = t.v, i = t.__; try { var s = n(); @@ -928,11 +928,11 @@ function I7(t) { return !0; } } -var lg = { useState: ra, useId: b5e, useReducer: D_, useEffect: Ji, useLayoutEffect: P_, useInsertionEffect: a3e, useTransition: s3e, useDeferredValue: i3e, useSyncExternalStore: l3e, startTransition: yie, useRef: ts, useImperativeHandle: y5e, useMemo: $s, useCallback: nT, useContext: Cl, useDebugValue: oM, version: "17.0.2", Children: M5e, render: Q5e, hydrate: V5e, unmountComponentAtNode: J5e, createPortal: $5e, createElement: hh, createContext: aie, createFactory: j5e, cloneElement: K5e, createRef: f5e, Fragment: fh, isValidElement: N_, isElement: o3e, isFragment: Z5e, findDOMNode: e3e, Component: Wc, PureComponent: fM, memo: A5e, forwardRef: L5e, flushSync: r3e, unstable_batchedUpdates: t3e, StrictMode: n3e, Suspense: $5, SuspenseList: kb, lazy: P5e, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: X5e }, sr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; -function bie(t) { +var lg = { useState: og, useId: _5e, useReducer: n$, useEffect: ca, useLayoutEffect: x_, useInsertionEffect: g3e, useTransition: p3e, useDeferredValue: d3e, useSyncExternalStore: v3e, startTransition: vie, useRef: $i, useImperativeHandle: E5e, useMemo: Ns, useCallback: aie, useContext: Ol, useDebugValue: GL, version: "17.0.2", Children: q5e, render: K5e, hydrate: J5e, unmountComponentAtNode: l3e, createPortal: Y5e, createElement: ah, createContext: iie, createFactory: s3e, cloneElement: o3e, createRef: w5e, Fragment: oh, isValidElement: w_, isElement: m3e, isFragment: a3e, findDOMNode: c3e, Component: qc, PureComponent: KL, memo: B5e, forwardRef: z5e, flushSync: h3e, unstable_batchedUpdates: u3e, StrictMode: f3e, Suspense: k5, SuspenseList: db, lazy: Q5e, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: i3e }, lr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; +function yie(t) { return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; } -function I_(t) { +function O_(t) { var e = t.default; if (typeof e == "function") { var r = function() { @@ -953,7 +953,7 @@ function I_(t) { }); }), r; } -var c3e = function(e, r, n, i) { +var y3e = function(e, r, n, i) { var s = n ? n.call(i, e, r) : void 0; if (s !== void 0) return !!s; @@ -973,76 +973,76 @@ var c3e = function(e, r, n, i) { return !1; } return !0; -}, Jn = "-ms-", rx = "-moz-", yn = "-webkit-", xie = "comm", $_ = "rule", d$ = "decl", u3e = "@import", wie = "@keyframes", h3e = "@layer", f3e = Math.abs, p$ = String.fromCharCode, dM = Object.assign; -function d3e(t, e) { - return Ds(t, 0) ^ 45 ? (((e << 2 ^ Ds(t, 0)) << 2 ^ Ds(t, 1)) << 2 ^ Ds(t, 2)) << 2 ^ Ds(t, 3) : 0; +}, jn = "-ms-", Gb = "-moz-", yn = "-webkit-", bie = "comm", k_ = "rule", a$ = "decl", b3e = "@import", xie = "@keyframes", x3e = "@layer", w3e = Math.abs, o$ = String.fromCharCode, JL = Object.assign; +function O3e(t, e) { + return Ls(t, 0) ^ 45 ? (((e << 2 ^ Ls(t, 0)) << 2 ^ Ls(t, 1)) << 2 ^ Ls(t, 2)) << 2 ^ Ls(t, 3) : 0; } -function Oie(t) { +function wie(t) { return t.trim(); } -function Zh(t, e) { +function Wh(t, e) { return (t = e.exec(t)) ? t[0] : t; } function Hr(t, e, r) { return t.replace(e, r); } -function B5(t, e) { +function S5(t, e) { return t.indexOf(e); } -function Ds(t, e) { +function Ls(t, e) { return t.charCodeAt(e) | 0; } -function sv(t, e, r) { +function tv(t, e, r) { return t.slice(e, r); } -function Iu(t) { +function Lu(t) { return t.length; } -function kie(t) { +function Oie(t) { return t.length; } -function Sb(t, e) { +function pb(t, e) { return e.push(t), t; } -function p3e(t, e) { +function k3e(t, e) { return t.map(e).join(""); } -function iV(t, e) { +function oV(t, e) { return t.filter(function(r) { - return !Zh(r, e); + return !Wh(r, e); }); } -var B_ = 1, av = 1, Sie = 0, cc = 0, Xi = 0, Ry = ""; -function F_(t, e, r, n, i, s, a, o) { - return { value: t, root: e, parent: r, type: n, props: i, children: s, line: B_, column: av, length: a, return: "", siblings: o }; +var S_ = 1, rv = 1, kie = 0, nc = 0, Xi = 0, Ey = ""; +function T_(t, e, r, n, i, s, a, o) { + return { value: t, root: e, parent: r, type: n, props: i, children: s, line: S_, column: rv, length: a, return: "", siblings: o }; } -function md(t, e) { - return dM(F_("", null, null, "", null, null, 0, t.siblings), t, { length: -t.length }, e); +function fd(t, e) { + return JL(T_("", null, null, "", null, null, 0, t.siblings), t, { length: -t.length }, e); } -function Im(t) { +function Rm(t) { for (; t.root; ) - t = md(t.root, { children: [t] }); - Sb(t, t.siblings); + t = fd(t.root, { children: [t] }); + pb(t, t.siblings); } -function g3e() { +function S3e() { return Xi; } -function m3e() { - return Xi = cc > 0 ? Ds(Ry, --cc) : 0, av--, Xi === 10 && (av = 1, B_--), Xi; +function T3e() { + return Xi = nc > 0 ? Ls(Ey, --nc) : 0, rv--, Xi === 10 && (rv = 1, S_--), Xi; } -function Yc() { - return Xi = cc < Sie ? Ds(Ry, cc++) : 0, av++, Xi === 10 && (av = 1, B_++), Xi; +function Uc() { + return Xi = nc < kie ? Ls(Ey, nc++) : 0, rv++, Xi === 10 && (rv = 1, S_++), Xi; } -function j0() { - return Ds(Ry, cc); +function Z0() { + return Ls(Ey, nc); } -function F5() { - return cc; +function T5() { + return nc; } -function z_(t, e) { - return sv(Ry, t, e); +function C_(t, e) { + return tv(Ey, t, e); } -function pM(t) { +function eM(t) { switch (t) { case 0: case 9: @@ -1074,91 +1074,91 @@ function pM(t) { } return 0; } -function v3e(t) { - return B_ = av = 1, Sie = Iu(Ry = t), cc = 0, []; +function C3e(t) { + return S_ = rv = 1, kie = Lu(Ey = t), nc = 0, []; } -function y3e(t) { - return Ry = "", t; +function E3e(t) { + return Ey = "", t; } -function $7(t) { - return Oie(z_(cc - 1, gM(t === 91 ? t + 2 : t === 40 ? t + 1 : t))); +function S7(t) { + return wie(C_(nc - 1, tM(t === 91 ? t + 2 : t === 40 ? t + 1 : t))); } -function b3e(t) { - for (; (Xi = j0()) && Xi < 33; ) - Yc(); - return pM(t) > 2 || pM(Xi) > 3 ? "" : " "; +function _3e(t) { + for (; (Xi = Z0()) && Xi < 33; ) + Uc(); + return eM(t) > 2 || eM(Xi) > 3 ? "" : " "; } -function x3e(t, e) { - for (; --e && Yc() && !(Xi < 48 || Xi > 102 || Xi > 57 && Xi < 65 || Xi > 70 && Xi < 97); ) +function A3e(t, e) { + for (; --e && Uc() && !(Xi < 48 || Xi > 102 || Xi > 57 && Xi < 65 || Xi > 70 && Xi < 97); ) ; - return z_(t, F5() + (e < 6 && j0() == 32 && Yc() == 32)); + return C_(t, T5() + (e < 6 && Z0() == 32 && Uc() == 32)); } -function gM(t) { - for (; Yc(); ) +function tM(t) { + for (; Uc(); ) switch (Xi) { case t: - return cc; + return nc; case 34: case 39: - t !== 34 && t !== 39 && gM(Xi); + t !== 34 && t !== 39 && tM(Xi); break; case 40: - t === 41 && gM(t); + t === 41 && tM(t); break; case 92: - Yc(); + Uc(); break; } - return cc; + return nc; } -function w3e(t, e) { - for (; Yc() && t + Xi !== 47 + 10; ) - if (t + Xi === 42 + 42 && j0() === 47) +function R3e(t, e) { + for (; Uc() && t + Xi !== 47 + 10; ) + if (t + Xi === 42 + 42 && Z0() === 47) break; - return "/*" + z_(e, cc - 1) + "*" + p$(t === 47 ? t : Yc()); + return "/*" + C_(e, nc - 1) + "*" + o$(t === 47 ? t : Uc()); } -function O3e(t) { - for (; !pM(j0()); ) - Yc(); - return z_(t, cc); +function L3e(t) { + for (; !eM(Z0()); ) + Uc(); + return C_(t, nc); } -function k3e(t) { - return y3e(z5("", null, null, null, [""], t = v3e(t), 0, [0], t)); +function M3e(t) { + return E3e(C5("", null, null, null, [""], t = C3e(t), 0, [0], t)); } -function z5(t, e, r, n, i, s, a, o, l) { +function C5(t, e, r, n, i, s, a, o, l) { for (var u = 0, h = 0, f = a, d = 0, p = 0, g = 0, m = 1, v = 1, y = 1, b = 0, w = "", O = i, S = s, C = n, T = w; v; ) - switch (g = b, b = Yc()) { + switch (g = b, b = Uc()) { case 40: - if (g != 108 && Ds(T, f - 1) == 58) { - B5(T += Hr($7(b), "&", "&\f"), "&\f") != -1 && (y = -1); + if (g != 108 && Ls(T, f - 1) == 58) { + S5(T += Hr(S7(b), "&", "&\f"), "&\f") != -1 && (y = -1); break; } case 34: case 39: case 91: - T += $7(b); + T += S7(b); break; case 9: case 10: case 13: case 32: - T += b3e(g); + T += _3e(g); break; case 92: - T += x3e(F5() - 1, 7); + T += A3e(T5() - 1, 7); continue; case 47: - switch (j0()) { + switch (Z0()) { case 42: case 47: - Sb(S3e(w3e(Yc(), F5()), e, r, l), l); + pb(D3e(R3e(Uc(), T5()), e, r, l), l); break; default: T += "/"; } break; case 123 * m: - o[u++] = Iu(T) * y; + o[u++] = Lu(T) * y; case 125 * m: case 59: case 0: @@ -1167,67 +1167,67 @@ function z5(t, e, r, n, i, s, a, o, l) { case 125: v = 0; case 59 + h: - y == -1 && (T = Hr(T, /\f/g, "")), p > 0 && Iu(T) - f && Sb(p > 32 ? aV(T + ";", n, r, f - 1, l) : aV(Hr(T, " ", "") + ";", n, r, f - 2, l), l); + y == -1 && (T = Hr(T, /\f/g, "")), p > 0 && Lu(T) - f && pb(p > 32 ? cV(T + ";", n, r, f - 1, l) : cV(Hr(T, " ", "") + ";", n, r, f - 2, l), l); break; case 59: T += ";"; default: - if (Sb(C = sV(T, e, r, u, h, i, o, w, O = [], S = [], f, s), s), b === 123) + if (pb(C = lV(T, e, r, u, h, i, o, w, O = [], S = [], f, s), s), b === 123) if (h === 0) - z5(T, e, C, C, O, s, f, o, S); + C5(T, e, C, C, O, s, f, o, S); else - switch (d === 99 && Ds(T, 3) === 110 ? 100 : d) { + switch (d === 99 && Ls(T, 3) === 110 ? 100 : d) { case 100: case 108: case 109: case 115: - z5(t, C, C, n && Sb(sV(t, C, C, 0, 0, i, o, w, i, O = [], f, S), S), i, S, f, o, n ? O : S); + C5(t, C, C, n && pb(lV(t, C, C, 0, 0, i, o, w, i, O = [], f, S), S), i, S, f, o, n ? O : S); break; default: - z5(T, C, C, C, [""], S, 0, o, S); + C5(T, C, C, C, [""], S, 0, o, S); } } u = h = p = 0, m = y = 1, w = T = "", f = a; break; case 58: - f = 1 + Iu(T), p = g; + f = 1 + Lu(T), p = g; default: if (m < 1) { if (b == 123) --m; - else if (b == 125 && m++ == 0 && m3e() == 125) + else if (b == 125 && m++ == 0 && T3e() == 125) continue; } - switch (T += p$(b), b * m) { + switch (T += o$(b), b * m) { case 38: y = h > 0 ? 1 : (T += "\f", -1); break; case 44: - o[u++] = (Iu(T) - 1) * y, y = 1; + o[u++] = (Lu(T) - 1) * y, y = 1; break; case 64: - j0() === 45 && (T += $7(Yc())), d = j0(), h = f = Iu(w = T += O3e(F5())), b++; + Z0() === 45 && (T += S7(Uc())), d = Z0(), h = f = Lu(w = T += L3e(T5())), b++; break; case 45: - g === 45 && Iu(T) == 2 && (m = 0); + g === 45 && Lu(T) == 2 && (m = 0); } } return s; } -function sV(t, e, r, n, i, s, a, o, l, u, h, f) { - for (var d = i - 1, p = i === 0 ? s : [""], g = kie(p), m = 0, v = 0, y = 0; m < n; ++m) - for (var b = 0, w = sv(t, d + 1, d = f3e(v = a[m])), O = t; b < g; ++b) - (O = Oie(v > 0 ? p[b] + " " + w : Hr(w, /&\f/g, p[b]))) && (l[y++] = O); - return F_(t, e, r, i === 0 ? $_ : o, l, u, h, f); +function lV(t, e, r, n, i, s, a, o, l, u, h, f) { + for (var d = i - 1, p = i === 0 ? s : [""], g = Oie(p), m = 0, v = 0, y = 0; m < n; ++m) + for (var b = 0, w = tv(t, d + 1, d = w3e(v = a[m])), O = t; b < g; ++b) + (O = wie(v > 0 ? p[b] + " " + w : Hr(w, /&\f/g, p[b]))) && (l[y++] = O); + return T_(t, e, r, i === 0 ? k_ : o, l, u, h, f); } -function S3e(t, e, r, n) { - return F_(t, e, r, xie, p$(g3e()), sv(t, 2, -2), 0, n); +function D3e(t, e, r, n) { + return T_(t, e, r, bie, o$(S3e()), tv(t, 2, -2), 0, n); } -function aV(t, e, r, n, i) { - return F_(t, e, r, d$, sv(t, 0, n), sv(t, n + 1, -1), n, i); +function cV(t, e, r, n, i) { + return T_(t, e, r, a$, tv(t, 0, n), tv(t, n + 1, -1), n, i); } -function Tie(t, e, r) { - switch (d3e(t, e)) { +function Sie(t, e, r) { + switch (O3e(t, e)) { case 5103: return yn + "print-" + t + t; case 5737: @@ -1257,40 +1257,40 @@ function Tie(t, e, r) { case 3829: return yn + t + t; case 4789: - return rx + t + t; + return Gb + t + t; case 5349: case 4246: case 4810: case 6968: case 2756: - return yn + t + rx + t + Jn + t + t; + return yn + t + Gb + t + jn + t + t; case 5936: - switch (Ds(t, e + 11)) { + switch (Ls(t, e + 11)) { case 114: - return yn + t + Jn + Hr(t, /[svh]\w+-[tblr]{2}/, "tb") + t; + return yn + t + jn + Hr(t, /[svh]\w+-[tblr]{2}/, "tb") + t; case 108: - return yn + t + Jn + Hr(t, /[svh]\w+-[tblr]{2}/, "tb-rl") + t; + return yn + t + jn + Hr(t, /[svh]\w+-[tblr]{2}/, "tb-rl") + t; case 45: - return yn + t + Jn + Hr(t, /[svh]\w+-[tblr]{2}/, "lr") + t; + return yn + t + jn + Hr(t, /[svh]\w+-[tblr]{2}/, "lr") + t; } case 6828: case 4268: case 2903: - return yn + t + Jn + t + t; + return yn + t + jn + t + t; case 6165: - return yn + t + Jn + "flex-" + t + t; + return yn + t + jn + "flex-" + t + t; case 5187: - return yn + t + Hr(t, /(\w+).+(:[^]+)/, yn + "box-$1$2" + Jn + "flex-$1$2") + t; + return yn + t + Hr(t, /(\w+).+(:[^]+)/, yn + "box-$1$2" + jn + "flex-$1$2") + t; case 5443: - return yn + t + Jn + "flex-item-" + Hr(t, /flex-|-self/g, "") + (Zh(t, /flex-|baseline/) ? "" : Jn + "grid-row-" + Hr(t, /flex-|-self/g, "")) + t; + return yn + t + jn + "flex-item-" + Hr(t, /flex-|-self/g, "") + (Wh(t, /flex-|baseline/) ? "" : jn + "grid-row-" + Hr(t, /flex-|-self/g, "")) + t; case 4675: - return yn + t + Jn + "flex-line-pack" + Hr(t, /align-content|flex-|-self/g, "") + t; + return yn + t + jn + "flex-line-pack" + Hr(t, /align-content|flex-|-self/g, "") + t; case 5548: - return yn + t + Jn + Hr(t, "shrink", "negative") + t; + return yn + t + jn + Hr(t, "shrink", "negative") + t; case 5292: - return yn + t + Jn + Hr(t, "basis", "preferred-size") + t; + return yn + t + jn + Hr(t, "basis", "preferred-size") + t; case 6060: - return yn + "box-" + Hr(t, "-grow", "") + yn + t + Jn + Hr(t, "grow", "positive") + t; + return yn + "box-" + Hr(t, "-grow", "") + yn + t + jn + Hr(t, "grow", "positive") + t; case 4554: return yn + Hr(t, /([^-])(transform)/g, "$1" + yn + "$2") + t; case 6187: @@ -1299,24 +1299,24 @@ function Tie(t, e, r) { case 3959: return Hr(t, /(image-set\([^]*)/, yn + "$1$`$1"); case 4968: - return Hr(Hr(t, /(.+:)(flex-)?(.*)/, yn + "box-pack:$3" + Jn + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + yn + t + t; + return Hr(Hr(t, /(.+:)(flex-)?(.*)/, yn + "box-pack:$3" + jn + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + yn + t + t; case 4200: - if (!Zh(t, /flex-|baseline/)) - return Jn + "grid-column-align" + sv(t, e) + t; + if (!Wh(t, /flex-|baseline/)) + return jn + "grid-column-align" + tv(t, e) + t; break; case 2592: case 3360: - return Jn + Hr(t, "template-", "") + t; + return jn + Hr(t, "template-", "") + t; case 4384: case 3616: return r && r.some(function(n, i) { - return e = i, Zh(n.props, /grid-\w+-end/); - }) ? ~B5(t + (r = r[e].value), "span") ? t : Jn + Hr(t, "-start", "") + t + Jn + "grid-row-span:" + (~B5(r, "span") ? Zh(r, /\d+/) : +Zh(r, /\d+/) - +Zh(t, /\d+/)) + ";" : Jn + Hr(t, "-start", "") + t; + return e = i, Wh(n.props, /grid-\w+-end/); + }) ? ~S5(t + (r = r[e].value), "span") ? t : jn + Hr(t, "-start", "") + t + jn + "grid-row-span:" + (~S5(r, "span") ? Wh(r, /\d+/) : +Wh(r, /\d+/) - +Wh(t, /\d+/)) + ";" : jn + Hr(t, "-start", "") + t; case 4896: case 4128: return r && r.some(function(n) { - return Zh(n.props, /grid-\w+-start/); - }) ? t : Jn + Hr(Hr(t, "-end", "-span"), "span ", "") + t; + return Wh(n.props, /grid-\w+-start/); + }) ? t : jn + Hr(Hr(t, "-end", "-span"), "span ", "") + t; case 4095: case 3583: case 4068: @@ -1334,32 +1334,32 @@ function Tie(t, e, r) { case 5789: case 5021: case 4765: - if (Iu(t) - 1 - e > 6) - switch (Ds(t, e + 1)) { + if (Lu(t) - 1 - e > 6) + switch (Ls(t, e + 1)) { case 109: - if (Ds(t, e + 4) !== 45) + if (Ls(t, e + 4) !== 45) break; case 102: - return Hr(t, /(.+:)(.+)-([^]+)/, "$1" + yn + "$2-$3$1" + rx + (Ds(t, e + 3) == 108 ? "$3" : "$2-$3")) + t; + return Hr(t, /(.+:)(.+)-([^]+)/, "$1" + yn + "$2-$3$1" + Gb + (Ls(t, e + 3) == 108 ? "$3" : "$2-$3")) + t; case 115: - return ~B5(t, "stretch") ? Tie(Hr(t, "stretch", "fill-available"), e, r) + t : t; + return ~S5(t, "stretch") ? Sie(Hr(t, "stretch", "fill-available"), e, r) + t : t; } break; case 5152: case 5920: return Hr(t, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(n, i, s, a, o, l, u) { - return Jn + i + ":" + s + u + (a ? Jn + i + "-span:" + (o ? l : +l - +s) + u : "") + t; + return jn + i + ":" + s + u + (a ? jn + i + "-span:" + (o ? l : +l - +s) + u : "") + t; }); case 4949: - if (Ds(t, e + 6) === 121) + if (Ls(t, e + 6) === 121) return Hr(t, ":", ":" + yn) + t; break; case 6444: - switch (Ds(t, Ds(t, 14) === 45 ? 18 : 11)) { + switch (Ls(t, Ls(t, 14) === 45 ? 18 : 11)) { case 120: - return Hr(t, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + yn + (Ds(t, 14) === 45 ? "inline-" : "") + "box$3$1" + yn + "$2$3$1" + Jn + "$2box$3") + t; + return Hr(t, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + yn + (Ls(t, 14) === 45 ? "inline-" : "") + "box$3$1" + yn + "$2$3$1" + jn + "$2box$3") + t; case 100: - return Hr(t, ":", ":" + Jn) + t; + return Hr(t, ":", ":" + jn) + t; } break; case 5719: @@ -1371,67 +1371,67 @@ function Tie(t, e, r) { } return t; } -function iT(t, e) { +function Q3(t, e) { for (var r = "", n = 0; n < t.length; n++) r += e(t[n], n, t, e) || ""; return r; } -function T3e(t, e, r, n) { +function P3e(t, e, r, n) { switch (t.type) { - case h3e: + case x3e: if (t.children.length) break; - case u3e: - case d$: + case b3e: + case a$: return t.return = t.return || t.value; - case xie: + case bie: return ""; - case wie: - return t.return = t.value + "{" + iT(t.children, n) + "}"; - case $_: - if (!Iu(t.value = t.props.join(","))) + case xie: + return t.return = t.value + "{" + Q3(t.children, n) + "}"; + case k_: + if (!Lu(t.value = t.props.join(","))) return ""; } - return Iu(r = iT(t.children, n)) ? t.return = t.value + "{" + r + "}" : ""; + return Lu(r = Q3(t.children, n)) ? t.return = t.value + "{" + r + "}" : ""; } -function C3e(t) { - var e = kie(t); +function N3e(t) { + var e = Oie(t); return function(r, n, i, s) { for (var a = "", o = 0; o < e; o++) a += t[o](r, n, i, s) || ""; return a; }; } -function E3e(t) { +function I3e(t) { return function(e) { e.root || (e = e.return) && t(e); }; } -function _3e(t, e, r, n) { +function $3e(t, e, r, n) { if (t.length > -1 && !t.return) switch (t.type) { - case d$: - t.return = Tie(t.value, t.length, r); + case a$: + t.return = Sie(t.value, t.length, r); return; - case wie: - return iT([md(t, { value: Hr(t.value, "@", "@" + yn) })], n); - case $_: + case xie: + return Q3([fd(t, { value: Hr(t.value, "@", "@" + yn) })], n); + case k_: if (t.length) - return p3e(r = t.props, function(i) { - switch (Zh(i, n = /(::plac\w+|:read-\w+)/)) { + return k3e(r = t.props, function(i) { + switch (Wh(i, n = /(::plac\w+|:read-\w+)/)) { case ":read-only": case ":read-write": - Im(md(t, { props: [Hr(i, /:(read-\w+)/, ":" + rx + "$1")] })), Im(md(t, { props: [i] })), dM(t, { props: iV(r, n) }); + Rm(fd(t, { props: [Hr(i, /:(read-\w+)/, ":" + Gb + "$1")] })), Rm(fd(t, { props: [i] })), JL(t, { props: oV(r, n) }); break; case "::placeholder": - Im(md(t, { props: [Hr(i, /:(plac\w+)/, ":" + yn + "input-$1")] })), Im(md(t, { props: [Hr(i, /:(plac\w+)/, ":" + rx + "$1")] })), Im(md(t, { props: [Hr(i, /:(plac\w+)/, Jn + "input-$1")] })), Im(md(t, { props: [i] })), dM(t, { props: iV(r, n) }); + Rm(fd(t, { props: [Hr(i, /:(plac\w+)/, ":" + yn + "input-$1")] })), Rm(fd(t, { props: [Hr(i, /:(plac\w+)/, ":" + Gb + "$1")] })), Rm(fd(t, { props: [Hr(i, /:(plac\w+)/, jn + "input-$1")] })), Rm(fd(t, { props: [i] })), JL(t, { props: oV(r, n) }); break; } return ""; }); } } -var A3e = { +var B3e = { animationIterationCount: 1, aspectRatio: 1, borderImageOutset: 1, @@ -1478,8 +1478,8 @@ var A3e = { strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 -}, cg = typeof Ns < "u" && {} !== void 0 && ({}.REACT_APP_SC_ATTR || {}.SC_ATTR) || "data-styled", Cie = "active", Eie = "data-styled-version", q_ = "6.1.2", g$ = `/*!sc*/ -`, m$ = typeof window < "u" && "HTMLElement" in window, R3e = Boolean(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof Ns < "u" && {} !== void 0 && {}.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && {}.REACT_APP_SC_DISABLE_SPEEDY !== "" ? {}.REACT_APP_SC_DISABLE_SPEEDY !== "false" && {}.REACT_APP_SC_DISABLE_SPEEDY : typeof Ns < "u" && {} !== void 0 && {}.SC_DISABLE_SPEEDY !== void 0 && {}.SC_DISABLE_SPEEDY !== "" ? {}.SC_DISABLE_SPEEDY !== "false" && {}.SC_DISABLE_SPEEDY : {}.NODE_ENV !== "production"), oV = /invalid hook call/i, F4 = /* @__PURE__ */ new Set(), L3e = function(t, e) { +}, cg = typeof Ds < "u" && {} !== void 0 && ({}.REACT_APP_SC_ATTR || {}.SC_ATTR) || "data-styled", Tie = "active", Cie = "data-styled-version", E_ = "6.1.2", l$ = `/*!sc*/ +`, c$ = typeof window < "u" && "HTMLElement" in window, F3e = Boolean(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof Ds < "u" && {} !== void 0 && {}.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && {}.REACT_APP_SC_DISABLE_SPEEDY !== "" ? {}.REACT_APP_SC_DISABLE_SPEEDY !== "false" && {}.REACT_APP_SC_DISABLE_SPEEDY : typeof Ds < "u" && {} !== void 0 && {}.SC_DISABLE_SPEEDY !== void 0 && {}.SC_DISABLE_SPEEDY !== "" ? {}.SC_DISABLE_SPEEDY !== "false" && {}.SC_DISABLE_SPEEDY : {}.NODE_ENV !== "production"), uV = /invalid hook call/i, E4 = /* @__PURE__ */ new Set(), z3e = function(t, e) { if ({}.NODE_ENV !== "production") { var r = e ? ' with the id of "'.concat(e, '"') : "", n = "The component ".concat(t).concat(r, ` has been created dynamically. `) + `You may see this warning because you've called styled inside another component. @@ -1489,67 +1489,67 @@ To resolve this only create new StyledComponents outside of any render method an console.error = function(a) { for (var o = [], l = 1; l < arguments.length; l++) o[l - 1] = arguments[l]; - oV.test(a) ? (s = !1, F4.delete(n)) : i.apply(void 0, iv([a], o, !1)); - }, ts(), s && !F4.has(n) && (console.warn(n), F4.add(n)); + uV.test(a) ? (s = !1, E4.delete(n)) : i.apply(void 0, ev([a], o, !1)); + }, $i(), s && !E4.has(n) && (console.warn(n), E4.add(n)); } catch (a) { - oV.test(a.message) && F4.delete(n); + uV.test(a.message) && E4.delete(n); } finally { console.error = i; } } -}, U_ = Object.freeze([]), ov = Object.freeze({}); -function M3e(t, e, r) { - return r === void 0 && (r = ov), t.theme !== r.theme && t.theme || e || r.theme; +}, __ = Object.freeze([]), nv = Object.freeze({}); +function q3e(t, e, r) { + return r === void 0 && (r = nv), t.theme !== r.theme && t.theme || e || r.theme; } -var mM = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), D3e = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, P3e = /(^-|-$)/g; -function lV(t) { - return t.replace(D3e, "-").replace(P3e, ""); +var rM = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), U3e = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Q3e = /(^-|-$)/g; +function hV(t) { + return t.replace(U3e, "-").replace(Q3e, ""); } -var N3e = /(a)(d)/gi, z4 = 52, cV = function(t) { +var V3e = /(a)(d)/gi, _4 = 52, fV = function(t) { return String.fromCharCode(t + (t > 25 ? 39 : 97)); }; -function vM(t) { +function nM(t) { var e, r = ""; - for (e = Math.abs(t); e > z4; e = e / z4 | 0) - r = cV(e % z4) + r; - return (cV(e % z4) + r).replace(N3e, "$1-$2"); + for (e = Math.abs(t); e > _4; e = e / _4 | 0) + r = fV(e % _4) + r; + return (fV(e % _4) + r).replace(V3e, "$1-$2"); } -var B7, _ie = 5381, w0 = function(t, e) { +var T7, Eie = 5381, w0 = function(t, e) { for (var r = e.length; r; ) t = 33 * t ^ e.charCodeAt(--r); return t; -}, Aie = function(t) { - return w0(_ie, t); +}, _ie = function(t) { + return w0(Eie, t); }; -function I3e(t) { - return vM(Aie(t) >>> 0); +function W3e(t) { + return nM(_ie(t) >>> 0); } -function Rie(t) { +function Aie(t) { return {}.NODE_ENV !== "production" && typeof t == "string" && t || t.displayName || t.name || "Component"; } -function F7(t) { +function C7(t) { return typeof t == "string" && ({}.NODE_ENV === "production" || t.charAt(0) === t.charAt(0).toLowerCase()); } -var Lie = typeof Symbol == "function" && Symbol.for, Mie = Lie ? Symbol.for("react.memo") : 60115, $3e = Lie ? Symbol.for("react.forward_ref") : 60112, B3e = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, F3e = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, Die = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, z3e = ((B7 = {})[$3e] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, B7[Mie] = Die, B7); -function uV(t) { - return ("type" in (e = t) && e.type.$$typeof) === Mie ? Die : "$$typeof" in t ? z3e[t.$$typeof] : B3e; +var Rie = typeof Symbol == "function" && Symbol.for, Lie = Rie ? Symbol.for("react.memo") : 60115, Y3e = Rie ? Symbol.for("react.forward_ref") : 60112, G3e = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, H3e = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, Mie = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, X3e = ((T7 = {})[Y3e] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, T7[Lie] = Mie, T7); +function dV(t) { + return ("type" in (e = t) && e.type.$$typeof) === Lie ? Mie : "$$typeof" in t ? X3e[t.$$typeof] : G3e; var e; } -var q3e = Object.defineProperty, U3e = Object.getOwnPropertyNames, hV = Object.getOwnPropertySymbols, Q3e = Object.getOwnPropertyDescriptor, V3e = Object.getPrototypeOf, fV = Object.prototype; -function Pie(t, e, r) { +var Z3e = Object.defineProperty, j3e = Object.getOwnPropertyNames, pV = Object.getOwnPropertySymbols, K3e = Object.getOwnPropertyDescriptor, J3e = Object.getPrototypeOf, gV = Object.prototype; +function Die(t, e, r) { if (typeof e != "string") { - if (fV) { - var n = V3e(e); - n && n !== fV && Pie(t, n, r); + if (gV) { + var n = J3e(e); + n && n !== gV && Die(t, n, r); } - var i = U3e(e); - hV && (i = i.concat(hV(e))); - for (var s = uV(t), a = uV(e), o = 0; o < i.length; ++o) { + var i = j3e(e); + pV && (i = i.concat(pV(e))); + for (var s = dV(t), a = dV(e), o = 0; o < i.length; ++o) { var l = i[o]; - if (!(l in F3e || r && r[l] || a && l in a || s && l in s)) { - var u = Q3e(e, l); + if (!(l in H3e || r && r[l] || a && l in a || s && l in s)) { + var u = K3e(e, l); try { - q3e(t, l, u); + Z3e(t, l, u); } catch { } } @@ -1557,40 +1557,40 @@ function Pie(t, e, r) { } return t; } -function lv(t) { +function iv(t) { return typeof t == "function"; } -function v$(t) { +function u$(t) { return typeof t == "object" && "styledComponentId" in t; } function N0(t, e) { return t && e ? "".concat(t, " ").concat(e) : t || e || ""; } -function dV(t, e) { +function mV(t, e) { if (t.length === 0) return ""; for (var r = t[0], n = 1; n < t.length; n++) r += e ? e + t[n] : t[n]; return r; } -function cv(t) { +function sv(t) { return t !== null && typeof t == "object" && t.constructor.name === Object.name && !("props" in t && t.$$typeof); } -function yM(t, e, r) { - if (r === void 0 && (r = !1), !r && !cv(t) && !Array.isArray(t)) +function iM(t, e, r) { + if (r === void 0 && (r = !1), !r && !sv(t) && !Array.isArray(t)) return e; if (Array.isArray(e)) for (var n = 0; n < e.length; n++) - t[n] = yM(t[n], e[n]); - else if (cv(e)) + t[n] = iM(t[n], e[n]); + else if (sv(e)) for (var n in e) - t[n] = yM(t[n], e[n]); + t[n] = iM(t[n], e[n]); return t; } -function y$(t, e) { +function h$(t, e) { Object.defineProperty(t, "toString", { value: e }); } -var W3e = {}.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s. +var eTe = {}.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s. `, 2: `Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle. @@ -1632,7 +1632,7 @@ as for instance in your render method then you may be running into this limitati `, 17: `CSSStyleSheet could not be found on HTMLStyleElement. Has styled-components' style tag been unmounted or altered by another script? `, 18: "ThemeProvider: Please make sure your useTheme hook is within a ``" } : {}; -function Y3e() { +function tTe() { for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e]; for (var r = t[0], n = [], i = 1, s = t.length; i < s; i += 1) @@ -1641,12 +1641,12 @@ function Y3e() { r = r.replace(/%[a-z]/, a); }), r; } -function Ly(t) { +function _y(t) { for (var e = [], r = 1; r < arguments.length; r++) e[r - 1] = arguments[r]; - return {}.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t, " for more information.").concat(e.length > 0 ? " Args: ".concat(e.join(", ")) : "")) : new Error(Y3e.apply(void 0, iv([W3e[t]], e, !1)).trim()); + return {}.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t, " for more information.").concat(e.length > 0 ? " Args: ".concat(e.join(", ")) : "")) : new Error(tTe.apply(void 0, ev([eTe[t]], e, !1)).trim()); } -var G3e = function() { +var rTe = function() { function t(e) { this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e; } @@ -1658,7 +1658,7 @@ var G3e = function() { if (e >= this.groupSizes.length) { for (var n = this.groupSizes, i = n.length, s = i; e >= s; ) if ((s <<= 1) < 0) - throw Ly(16, "".concat(e)); + throw _y(16, "".concat(e)); this.groupSizes = new Uint32Array(s), this.groupSizes.set(n), this.length = s; for (var a = i; a < s; a++) this.groupSizes[a] = 0; @@ -1677,50 +1677,50 @@ var G3e = function() { if (e >= this.length || this.groupSizes[e] === 0) return r; for (var n = this.groupSizes[e], i = this.indexOfGroup(e), s = i + n, a = i; a < s; a++) - r += "".concat(this.tag.getRule(a)).concat(g$); + r += "".concat(this.tag.getRule(a)).concat(l$); return r; }, t; -}(), q5 = /* @__PURE__ */ new Map(), sT = /* @__PURE__ */ new Map(), U5 = 1, q4 = function(t) { - if (q5.has(t)) - return q5.get(t); - for (; sT.has(U5); ) - U5++; - var e = U5++; +}(), E5 = /* @__PURE__ */ new Map(), V3 = /* @__PURE__ */ new Map(), _5 = 1, A4 = function(t) { + if (E5.has(t)) + return E5.get(t); + for (; V3.has(_5); ) + _5++; + var e = _5++; if ({}.NODE_ENV !== "production" && ((0 | e) < 0 || e > 1073741824)) - throw Ly(16, "".concat(e)); - return q5.set(t, e), sT.set(e, t), e; -}, H3e = function(t, e) { - U5 = e + 1, q5.set(t, e), sT.set(e, t); -}, X3e = "style[".concat(cg, "][").concat(Eie, '="').concat(q_, '"]'), j3e = new RegExp("^".concat(cg, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Z3e = function(t, e, r) { + throw _y(16, "".concat(e)); + return E5.set(t, e), V3.set(e, t), e; +}, nTe = function(t, e) { + _5 = e + 1, E5.set(t, e), V3.set(e, t); +}, iTe = "style[".concat(cg, "][").concat(Cie, '="').concat(E_, '"]'), sTe = new RegExp("^".concat(cg, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), aTe = function(t, e, r) { for (var n, i = r.split(","), s = 0, a = i.length; s < a; s++) (n = i[s]) && t.registerName(e, n); -}, K3e = function(t, e) { - for (var r, n = ((r = e.textContent) !== null && r !== void 0 ? r : "").split(g$), i = [], s = 0, a = n.length; s < a; s++) { +}, oTe = function(t, e) { + for (var r, n = ((r = e.textContent) !== null && r !== void 0 ? r : "").split(l$), i = [], s = 0, a = n.length; s < a; s++) { var o = n[s].trim(); if (o) { - var l = o.match(j3e); + var l = o.match(sTe); if (l) { var u = 0 | parseInt(l[1], 10), h = l[2]; - u !== 0 && (H3e(h, u), Z3e(t, h, l[3]), t.getTag().insertRules(u, i)), i.length = 0; + u !== 0 && (nTe(h, u), aTe(t, h, l[3]), t.getTag().insertRules(u, i)), i.length = 0; } else i.push(o); } } }; -function J3e() { +function lTe() { return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null; } -var Nie = function(t) { +var Pie = function(t) { var e = document.head, r = t || e, n = document.createElement("style"), i = function(o) { var l = Array.from(o.querySelectorAll("style[".concat(cg, "]"))); return l[l.length - 1]; }(r), s = i !== void 0 ? i.nextSibling : null; - n.setAttribute(cg, Cie), n.setAttribute(Eie, q_); - var a = J3e(); + n.setAttribute(cg, Tie), n.setAttribute(Cie, E_); + var a = lTe(); return a && n.setAttribute("nonce", a), r.insertBefore(n, s), n; -}, eTe = function() { +}, cTe = function() { function t(e) { - this.element = Nie(e), this.element.appendChild(document.createTextNode("")), this.sheet = function(r) { + this.element = Pie(e), this.element.appendChild(document.createTextNode("")), this.sheet = function(r) { if (r.sheet) return r.sheet; for (var n = document.styleSheets, i = 0, s = n.length; i < s; i++) { @@ -1728,7 +1728,7 @@ var Nie = function(t) { if (a.ownerNode === r) return a; } - throw Ly(17); + throw _y(17); }(this.element), this.length = 0; } return t.prototype.insertRule = function(e, r) { @@ -1743,9 +1743,9 @@ var Nie = function(t) { var r = this.sheet.cssRules[e]; return r && r.cssText ? r.cssText : ""; }, t; -}(), tTe = function() { +}(), uTe = function() { function t(e) { - this.element = Nie(e), this.nodes = this.element.childNodes, this.length = 0; + this.element = Pie(e), this.nodes = this.element.childNodes, this.length = 0; } return t.prototype.insertRule = function(e, r) { if (e <= this.length && e >= 0) { @@ -1758,7 +1758,7 @@ var Nie = function(t) { }, t.prototype.getRule = function(e) { return e < this.length ? this.nodes[e].textContent : ""; }, t; -}(), rTe = function() { +}(), hTe = function() { function t(e) { this.rules = [], this.length = 0; } @@ -1769,20 +1769,20 @@ var Nie = function(t) { }, t.prototype.getRule = function(e) { return e < this.length ? this.rules[e] : ""; }, t; -}(), pV = m$, nTe = { isServer: !m$, useCSSOMInjection: !R3e }, Iie = function() { +}(), vV = c$, fTe = { isServer: !c$, useCSSOMInjection: !F3e }, Nie = function() { function t(e, r, n) { - e === void 0 && (e = ov), r === void 0 && (r = {}); + e === void 0 && (e = nv), r === void 0 && (r = {}); var i = this; - this.options = Vo(Vo({}, nTe), e), this.gs = r, this.names = new Map(n), this.server = !!e.isServer, !this.server && m$ && pV && (pV = !1, function(s) { - for (var a = document.querySelectorAll(X3e), o = 0, l = a.length; o < l; o++) { + this.options = zo(zo({}, fTe), e), this.gs = r, this.names = new Map(n), this.server = !!e.isServer, !this.server && c$ && vV && (vV = !1, function(s) { + for (var a = document.querySelectorAll(iTe), o = 0, l = a.length; o < l; o++) { var u = a[o]; - u && u.getAttribute(cg) !== Cie && (K3e(s, u), u.parentNode && u.parentNode.removeChild(u)); + u && u.getAttribute(cg) !== Tie && (oTe(s, u), u.parentNode && u.parentNode.removeChild(u)); } - }(this)), y$(this, function() { + }(this)), h$(this, function() { return function(s) { for (var a = s.getTag(), o = a.length, l = "", u = function(f) { var d = function(y) { - return sT.get(y); + return V3.get(y); }(f); if (d === void 0) return "continue"; @@ -1792,7 +1792,7 @@ var Nie = function(t) { var m = "".concat(cg, ".g").concat(f, '[id="').concat(d, '"]'), v = ""; p !== void 0 && p.forEach(function(y) { y.length > 0 && (v += "".concat(y, ",")); - }), l += "".concat(g).concat(m, '{content:"').concat(v, '"}').concat(g$); + }), l += "".concat(g).concat(m, '{content:"').concat(v, '"}').concat(l$); }, h = 0; h < o; h++) u(h); return l; @@ -1800,147 +1800,147 @@ var Nie = function(t) { }); } return t.registerId = function(e) { - return q4(e); + return A4(e); }, t.prototype.reconstructWithOptions = function(e, r) { - return r === void 0 && (r = !0), new t(Vo(Vo({}, this.options), e), this.gs, r && this.names || void 0); + return r === void 0 && (r = !0), new t(zo(zo({}, this.options), e), this.gs, r && this.names || void 0); }, t.prototype.allocateGSInstance = function(e) { return this.gs[e] = (this.gs[e] || 0) + 1; }, t.prototype.getTag = function() { return this.tag || (this.tag = (e = function(r) { var n = r.useCSSOMInjection, i = r.target; - return r.isServer ? new rTe(i) : n ? new eTe(i) : new tTe(i); - }(this.options), new G3e(e))); + return r.isServer ? new hTe(i) : n ? new cTe(i) : new uTe(i); + }(this.options), new rTe(e))); var e; }, t.prototype.hasNameForId = function(e, r) { return this.names.has(e) && this.names.get(e).has(r); }, t.prototype.registerName = function(e, r) { - if (q4(e), this.names.has(e)) + if (A4(e), this.names.has(e)) this.names.get(e).add(r); else { var n = /* @__PURE__ */ new Set(); n.add(r), this.names.set(e, n); } }, t.prototype.insertRules = function(e, r, n) { - this.registerName(e, r), this.getTag().insertRules(q4(e), n); + this.registerName(e, r), this.getTag().insertRules(A4(e), n); }, t.prototype.clearNames = function(e) { this.names.has(e) && this.names.get(e).clear(); }, t.prototype.clearRules = function(e) { - this.getTag().clearGroup(q4(e)), this.clearNames(e); + this.getTag().clearGroup(A4(e)), this.clearNames(e); }, t.prototype.clearTag = function() { this.tag = void 0; }, t; -}(), iTe = /&/g, sTe = /^\s*\/\/.*$/gm; -function $ie(t, e) { +}(), dTe = /&/g, pTe = /^\s*\/\/.*$/gm; +function Iie(t, e) { return t.map(function(r) { return r.type === "rule" && (r.value = "".concat(e, " ").concat(r.value), r.value = r.value.replaceAll(",", ",".concat(e, " ")), r.props = r.props.map(function(n) { return "".concat(e, " ").concat(n); - })), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children = $ie(r.children, e)), r; + })), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children = Iie(r.children, e)), r; }); } -function Bie(t) { - var e, r, n, i = t === void 0 ? ov : t, s = i.options, a = s === void 0 ? ov : s, o = i.plugins, l = o === void 0 ? U_ : o, u = function(d, p, g) { +function $ie(t) { + var e, r, n, i = t === void 0 ? nv : t, s = i.options, a = s === void 0 ? nv : s, o = i.plugins, l = o === void 0 ? __ : o, u = function(d, p, g) { return g === r || g.startsWith(r) && g.endsWith(r) && g.replaceAll(r, "").length > 0 ? ".".concat(e) : d; }, h = l.slice(); h.push(function(d) { - d.type === $_ && d.value.includes("&") && (d.props[0] = d.props[0].replace(iTe, r).replace(n, u)); - }), a.prefix && h.push(_3e), h.push(T3e); + d.type === k_ && d.value.includes("&") && (d.props[0] = d.props[0].replace(dTe, r).replace(n, u)); + }), a.prefix && h.push($3e), h.push(P3e); var f = function(d, p, g, m) { p === void 0 && (p = ""), g === void 0 && (g = ""), m === void 0 && (m = "&"), e = m, r = p, n = new RegExp("\\".concat(r, "\\b"), "g"); - var v = d.replace(sTe, ""), y = k3e(g || p ? "".concat(g, " ").concat(p, " { ").concat(v, " }") : v); - a.namespace && (y = $ie(y, a.namespace)); + var v = d.replace(pTe, ""), y = M3e(g || p ? "".concat(g, " ").concat(p, " { ").concat(v, " }") : v); + a.namespace && (y = Iie(y, a.namespace)); var b = []; - return iT(y, C3e(h.concat(E3e(function(w) { + return Q3(y, N3e(h.concat(I3e(function(w) { return b.push(w); })))), b; }; return f.hash = l.length ? l.reduce(function(d, p) { - return p.name || Ly(15), w0(d, p.name); - }, _ie).toString() : "", f; + return p.name || _y(15), w0(d, p.name); + }, Eie).toString() : "", f; } -var aTe = new Iie(), bM = Bie(), b$ = lg.createContext({ shouldForwardProp: void 0, styleSheet: aTe, stylis: bM }); -b$.Consumer; -var oTe = lg.createContext(void 0); -function xM() { - return Cl(b$); +var gTe = new Nie(), sM = $ie(), f$ = lg.createContext({ shouldForwardProp: void 0, styleSheet: gTe, stylis: sM }); +f$.Consumer; +var mTe = lg.createContext(void 0); +function aM() { + return Ol(f$); } -function Fie(t) { - var e = ra(t.stylisPlugins), r = e[0], n = e[1], i = xM().styleSheet, s = $s(function() { +function Bie(t) { + var e = og(t.stylisPlugins), r = e[0], n = e[1], i = aM().styleSheet, s = Ns(function() { var l = i; return t.sheet ? l = t.sheet : t.target && (l = l.reconstructWithOptions({ target: t.target }, !1)), t.disableCSSOMInjection && (l = l.reconstructWithOptions({ useCSSOMInjection: !1 })), l; - }, [t.disableCSSOMInjection, t.sheet, t.target, i]), a = $s(function() { - return Bie({ options: { namespace: t.namespace, prefix: t.enableVendorPrefixes }, plugins: r }); + }, [t.disableCSSOMInjection, t.sheet, t.target, i]), a = Ns(function() { + return $ie({ options: { namespace: t.namespace, prefix: t.enableVendorPrefixes }, plugins: r }); }, [t.enableVendorPrefixes, t.namespace, r]); - Ji(function() { - c3e(r, t.stylisPlugins) || n(t.stylisPlugins); + ca(function() { + y3e(r, t.stylisPlugins) || n(t.stylisPlugins); }, [t.stylisPlugins]); - var o = $s(function() { + var o = Ns(function() { return { shouldForwardProp: t.shouldForwardProp, styleSheet: s, stylis: a }; }, [t.shouldForwardProp, s, a]); - return lg.createElement(b$.Provider, { value: o }, lg.createElement(oTe.Provider, { value: a }, t.children)); + return lg.createElement(f$.Provider, { value: o }, lg.createElement(mTe.Provider, { value: a }, t.children)); } -var gV = function() { +var yV = function() { function t(e, r) { var n = this; this.inject = function(i, s) { - s === void 0 && (s = bM); + s === void 0 && (s = sM); var a = n.name + s.hash; i.hasNameForId(n.id, a) || i.insertRules(n.id, a, s(n.rules, a, "@keyframes")); - }, this.name = e, this.id = "sc-keyframes-".concat(e), this.rules = r, y$(this, function() { - throw Ly(12, String(n.name)); + }, this.name = e, this.id = "sc-keyframes-".concat(e), this.rules = r, h$(this, function() { + throw _y(12, String(n.name)); }); } return t.prototype.getName = function(e) { - return e === void 0 && (e = bM), this.name + e.hash; + return e === void 0 && (e = sM), this.name + e.hash; }, t; -}(), lTe = function(t) { +}(), vTe = function(t) { return t >= "A" && t <= "Z"; }; -function mV(t) { +function bV(t) { for (var e = "", r = 0; r < t.length; r++) { var n = t[r]; if (r === 1 && n === "-" && t[0] === "-") return t; - lTe(n) ? e += "-" + n.toLowerCase() : e += n; + vTe(n) ? e += "-" + n.toLowerCase() : e += n; } return e.startsWith("ms-") ? "-" + e : e; } -var zie = function(t) { +var Fie = function(t) { return t == null || t === !1 || t === ""; -}, qie = function(t) { +}, zie = function(t) { var e, r, n = []; for (var i in t) { var s = t[i]; - t.hasOwnProperty(i) && !zie(s) && (Array.isArray(s) && s.isCss || lv(s) ? n.push("".concat(mV(i), ":"), s, ";") : cv(s) ? n.push.apply(n, iv(iv(["".concat(i, " {")], qie(s), !1), ["}"], !1)) : n.push("".concat(mV(i), ": ").concat((e = i, (r = s) == null || typeof r == "boolean" || r === "" ? "" : typeof r != "number" || r === 0 || e in A3e || e.startsWith("--") ? String(r).trim() : "".concat(r, "px")), ";"))); + t.hasOwnProperty(i) && !Fie(s) && (Array.isArray(s) && s.isCss || iv(s) ? n.push("".concat(bV(i), ":"), s, ";") : sv(s) ? n.push.apply(n, ev(ev(["".concat(i, " {")], zie(s), !1), ["}"], !1)) : n.push("".concat(bV(i), ": ").concat((e = i, (r = s) == null || typeof r == "boolean" || r === "" ? "" : typeof r != "number" || r === 0 || e in B3e || e.startsWith("--") ? String(r).trim() : "".concat(r, "px")), ";"))); } return n; }; -function Z0(t, e, r, n) { - if (zie(t)) +function j0(t, e, r, n) { + if (Fie(t)) return []; - if (v$(t)) + if (u$(t)) return [".".concat(t.styledComponentId)]; - if (lv(t)) { - if (!lv(s = t) || s.prototype && s.prototype.isReactComponent || !e) + if (iv(t)) { + if (!iv(s = t) || s.prototype && s.prototype.isReactComponent || !e) return [t]; var i = t(e); - return {}.NODE_ENV === "production" || typeof i != "object" || Array.isArray(i) || i instanceof gV || cv(i) || i === null || console.error("".concat(Rie(t), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), Z0(i, e, r, n); + return {}.NODE_ENV === "production" || typeof i != "object" || Array.isArray(i) || i instanceof yV || sv(i) || i === null || console.error("".concat(Aie(t), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), j0(i, e, r, n); } var s; - return t instanceof gV ? r ? (t.inject(r, n), [t.getName(n)]) : [t] : cv(t) ? qie(t) : Array.isArray(t) ? Array.prototype.concat.apply(U_, t.map(function(a) { - return Z0(a, e, r, n); + return t instanceof yV ? r ? (t.inject(r, n), [t.getName(n)]) : [t] : sv(t) ? zie(t) : Array.isArray(t) ? Array.prototype.concat.apply(__, t.map(function(a) { + return j0(a, e, r, n); })) : [t.toString()]; } -function cTe(t) { +function yTe(t) { for (var e = 0; e < t.length; e += 1) { var r = t[e]; - if (lv(r) && !v$(r)) + if (iv(r) && !u$(r)) return !1; } return !0; } -var uTe = Aie(q_), hTe = function() { +var bTe = _ie(E_), xTe = function() { function t(e, r, n) { - this.rules = e, this.staticRulesId = "", this.isStatic = {}.NODE_ENV === "production" && (n === void 0 || n.isStatic) && cTe(e), this.componentId = r, this.baseHash = w0(uTe, r), this.baseStyle = n, Iie.registerId(r); + this.rules = e, this.staticRulesId = "", this.isStatic = {}.NODE_ENV === "production" && (n === void 0 || n.isStatic) && yTe(e), this.componentId = r, this.baseHash = w0(bTe, r), this.baseStyle = n, Nie.registerId(r); } return t.prototype.generateAndInjectStyles = function(e, r, n) { var i = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e, r, n) : ""; @@ -1948,7 +1948,7 @@ var uTe = Aie(q_), hTe = function() { if (this.staticRulesId && r.hasNameForId(this.componentId, this.staticRulesId)) i = N0(i, this.staticRulesId); else { - var s = dV(Z0(this.rules, e, r, n)), a = vM(w0(this.baseHash, s) >>> 0); + var s = mV(j0(this.rules, e, r, n)), a = nM(w0(this.baseHash, s) >>> 0); if (!r.hasNameForId(this.componentId, a)) { var o = n(s, ".".concat(a), void 0, this.componentId); r.insertRules(this.componentId, a, o); @@ -1961,29 +1961,29 @@ var uTe = Aie(q_), hTe = function() { if (typeof f == "string") u += f, {}.NODE_ENV !== "production" && (l = w0(l, f)); else if (f) { - var d = dV(Z0(f, e, r, n)); + var d = mV(j0(f, e, r, n)); l = w0(l, d + h), u += d; } } if (u) { - var p = vM(l >>> 0); + var p = nM(l >>> 0); r.hasNameForId(this.componentId, p) || r.insertRules(this.componentId, p, n(u, ".".concat(p), void 0, this.componentId)), i = N0(i, p); } } return i; }, t; -}(), Uie = lg.createContext(void 0); -Uie.Consumer; -var z7 = {}, vV = /* @__PURE__ */ new Set(); -function fTe(t, e, r) { - var n = v$(t), i = t, s = !F7(t), a = e.attrs, o = a === void 0 ? U_ : a, l = e.componentId, u = l === void 0 ? function(O, S) { - var C = typeof O != "string" ? "sc" : lV(O); - z7[C] = (z7[C] || 0) + 1; - var T = "".concat(C, "-").concat(I3e(q_ + C + z7[C])); +}(), qie = lg.createContext(void 0); +qie.Consumer; +var E7 = {}, xV = /* @__PURE__ */ new Set(); +function wTe(t, e, r) { + var n = u$(t), i = t, s = !C7(t), a = e.attrs, o = a === void 0 ? __ : a, l = e.componentId, u = l === void 0 ? function(O, S) { + var C = typeof O != "string" ? "sc" : hV(O); + E7[C] = (E7[C] || 0) + 1; + var T = "".concat(C, "-").concat(W3e(E_ + C + E7[C])); return S ? "".concat(S, "-").concat(T) : T; }(e.displayName, e.parentComponentId) : l, h = e.displayName, f = h === void 0 ? function(O) { - return F7(O) ? "styled.".concat(O) : "Styled(".concat(Rie(O), ")"); - }(t) : h, d = e.displayName && e.componentId ? "".concat(lV(e.displayName), "-").concat(e.componentId) : e.componentId || u, p = n && i.attrs ? i.attrs.concat(o).filter(Boolean) : o, g = e.shouldForwardProp; + return C7(O) ? "styled.".concat(O) : "Styled(".concat(Aie(O), ")"); + }(t) : h, d = e.displayName && e.componentId ? "".concat(hV(e.displayName), "-").concat(e.componentId) : e.componentId || u, p = n && i.attrs ? i.attrs.concat(o).filter(Boolean) : o, g = e.shouldForwardProp; if (n && i.shouldForwardProp) { var m = i.shouldForwardProp; if (e.shouldForwardProp) { @@ -1994,28 +1994,28 @@ function fTe(t, e, r) { } else g = m; } - var y = new hTe(r, d, n ? i.componentStyle : void 0); + var y = new xTe(r, d, n ? i.componentStyle : void 0); function b(O, S) { - return function(C, T, D) { - var E = C.attrs, N = C.componentStyle, P = C.defaultProps, L = C.foldedComponentIds, F = C.styledComponentId, k = C.target, B = lg.useContext(Uie), A = xM(), M = C.shouldForwardProp || A.shouldForwardProp; - ({}).NODE_ENV !== "production" && oM(F); - var I = function(re, pe, ne) { - for (var le, ge = Vo(Vo({}, pe), { className: void 0, theme: ne }), j = 0; j < re.length; j += 1) { - var oe = lv(le = re[j]) ? le(ge) : le; - for (var ie in oe) - ge[ie] = ie === "className" ? N0(ge[ie], oe[ie]) : ie === "style" ? Vo(Vo({}, ge[ie]), oe[ie]) : oe[ie]; - } - return pe.className && (ge.className = N0(ge.className, pe.className)), ge; - }(E, T, M3e(T, B, P) || ov), q = I.as || k, Y = {}; - for (var W in I) - I[W] === void 0 || W[0] === "$" || W === "as" || W === "theme" || (W === "forwardedAs" ? Y.as = I.forwardedAs : M && !M(W, q) || (Y[W] = I[W], M || {}.NODE_ENV !== "development" || _5e(W) || vV.has(W) || !mM.has(q) || (vV.add(W), console.warn('styled-components: it looks like an unknown prop "'.concat(W, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)'))))); - var Z = function(re, pe) { - var ne = xM(), le = re.generateAndInjectStyles(pe, ne.styleSheet, ne.stylis); - return {}.NODE_ENV !== "production" && oM(le), le; - }(N, I); - ({}).NODE_ENV !== "production" && C.warnTooManyClasses && C.warnTooManyClasses(Z); - var K = N0(L, F); - return Z && (K += " " + Z), I.className && (K += " " + I.className), Y[F7(q) && !mM.has(q) ? "class" : "className"] = K, Y.ref = D, hh(q, Y); + return function(C, T, M) { + var E = C.attrs, P = C.componentStyle, L = C.defaultProps, D = C.foldedComponentIds, F = C.styledComponentId, k = C.target, I = lg.useContext(qie), _ = aM(), R = C.shouldForwardProp || _.shouldForwardProp; + ({}).NODE_ENV !== "production" && GL(F); + var N = function(te, fe, re) { + for (var ae, de = zo(zo({}, fe), { className: void 0, theme: re }), H = 0; H < te.length; H += 1) { + var se = iv(ae = te[H]) ? ae(de) : ae; + for (var ne in se) + de[ne] = ne === "className" ? N0(de[ne], se[ne]) : ne === "style" ? zo(zo({}, de[ne]), se[ne]) : se[ne]; + } + return fe.className && (de.className = N0(de.className, fe.className)), de; + }(E, T, q3e(T, I, L) || nv), $ = N.as || k, V = {}; + for (var U in N) + N[U] === void 0 || U[0] === "$" || U === "as" || U === "theme" || (U === "forwardedAs" ? V.as = N.forwardedAs : R && !R(U, $) || (V[U] = N[U], R || {}.NODE_ENV !== "development" || $5e(U) || xV.has(U) || !rM.has($) || (xV.add(U), console.warn('styled-components: it looks like an unknown prop "'.concat(U, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)'))))); + var X = function(te, fe) { + var re = aM(), ae = te.generateAndInjectStyles(fe, re.styleSheet, re.stylis); + return {}.NODE_ENV !== "production" && GL(ae), ae; + }(P, N); + ({}).NODE_ENV !== "production" && C.warnTooManyClasses && C.warnTooManyClasses(X); + var j = N0(D, F); + return X && (j += " " + X), N.className && (j += " " + N.className), V[C7($) && !rM.has($) ? "class" : "className"] = j, V.ref = M, ah($, V); }(w, O, S); } b.displayName = f; @@ -2026,14 +2026,14 @@ function fTe(t, e, r) { this._foldedDefaultProps = n ? function(S) { for (var C = [], T = 1; T < arguments.length; T++) C[T - 1] = arguments[T]; - for (var D = 0, E = C; D < E.length; D++) - yM(S, E[D], !0); + for (var M = 0, E = C; M < E.length; M++) + iM(S, E[M], !0); return S; }({}, i.defaultProps, O) : O; - } }), {}.NODE_ENV !== "production" && (L3e(f, d), w.warnTooManyClasses = function(O, S) { + } }), {}.NODE_ENV !== "production" && (z3e(f, d), w.warnTooManyClasses = function(O, S) { var C = {}, T = !1; - return function(D) { - if (!T && (C[D] = !0, Object.keys(C).length >= 200)) { + return function(M) { + if (!T && (C[M] = !0, Object.keys(C).length >= 200)) { var E = S ? ' with the id of "'.concat(S, '"') : ""; console.warn("Over ".concat(200, " classes were generated for component ").concat(O).concat(E, `. `) + `Consider using the attrs method, together with a style object for frequently changed styles. @@ -2047,67 +2047,67 @@ Example: `), T = !0, C = {}; } }; - }(f, d)), y$(w, function() { + }(f, d)), h$(w, function() { return ".".concat(w.styledComponentId); - }), s && Pie(w, t, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), w; + }), s && Die(w, t, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), w; } -function yV(t, e) { +function wV(t, e) { for (var r = [t[0]], n = 0, i = e.length; n < i; n += 1) r.push(e[n], t[n + 1]); return r; } -var bV = function(t) { +var OV = function(t) { return Object.assign(t, { isCss: !0 }); }; -function Qie(t) { +function Uie(t) { for (var e = [], r = 1; r < arguments.length; r++) e[r - 1] = arguments[r]; - if (lv(t) || cv(t)) - return bV(Z0(yV(U_, iv([t], e, !0)))); + if (iv(t) || sv(t)) + return OV(j0(wV(__, ev([t], e, !0)))); var n = t; - return e.length === 0 && n.length === 1 && typeof n[0] == "string" ? Z0(n) : bV(Z0(yV(n, e))); + return e.length === 0 && n.length === 1 && typeof n[0] == "string" ? j0(n) : OV(j0(wV(n, e))); } -function wM(t, e, r) { - if (r === void 0 && (r = ov), !e) - throw Ly(1, e); +function oM(t, e, r) { + if (r === void 0 && (r = nv), !e) + throw _y(1, e); var n = function(i) { for (var s = [], a = 1; a < arguments.length; a++) s[a - 1] = arguments[a]; - return t(e, r, Qie.apply(void 0, iv([i], s, !1))); + return t(e, r, Uie.apply(void 0, ev([i], s, !1))); }; return n.attrs = function(i) { - return wM(t, e, Vo(Vo({}, r), { attrs: Array.prototype.concat(r.attrs, i).filter(Boolean) })); + return oM(t, e, zo(zo({}, r), { attrs: Array.prototype.concat(r.attrs, i).filter(Boolean) })); }, n.withConfig = function(i) { - return wM(t, e, Vo(Vo({}, r), i)); + return oM(t, e, zo(zo({}, r), i)); }, n; } -var Vie = function(t) { - return wM(fTe, t); -}, gr = Vie; -mM.forEach(function(t) { - gr[t] = Vie(t); +var Qie = function(t) { + return oM(wTe, t); +}, mr = Qie; +rM.forEach(function(t) { + mr[t] = Qie(t); }); ({}).NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn(`It looks like you've imported 'styled-components' on React Native. Perhaps you're looking to import 'styled-components/native'? Read more about this at https://www.styled-components.com/docs/basics#react-native`); -var U4 = "__sc-".concat(cg, "__"); -({}).NODE_ENV !== "production" && {}.NODE_ENV !== "test" && typeof window < "u" && (window[U4] || (window[U4] = 0), window[U4] === 1 && console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason. +var R4 = "__sc-".concat(cg, "__"); +({}).NODE_ENV !== "production" && {}.NODE_ENV !== "test" && typeof window < "u" && (window[R4] || (window[R4] = 0), window[R4] === 1 && console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason. -See https://s-c.sh/2BAXzed for more info.`), window[U4] += 1); -let OM = [], Wie = []; +See https://s-c.sh/2BAXzed for more info.`), window[R4] += 1); +let lM = [], Vie = []; (() => { let t = "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e) => e ? parseInt(e, 36) : 1); for (let e = 0, r = 0; e < t.length; e++) - (e % 2 ? Wie : OM).push(r = r + t[e]); + (e % 2 ? Vie : lM).push(r = r + t[e]); })(); -function dTe(t) { +function OTe(t) { if (t < 768) return !1; - for (let e = 0, r = OM.length; ; ) { + for (let e = 0, r = lM.length; ; ) { let n = e + r >> 1; - if (t < OM[n]) + if (t < lM[n]) r = n; - else if (t >= Wie[n]) + else if (t >= Vie[n]) e = n + 1; else return !0; @@ -2115,25 +2115,25 @@ function dTe(t) { return !1; } } -function xV(t) { +function kV(t) { return t >= 127462 && t <= 127487; } -const wV = 8205; -function pTe(t, e, r = !0, n = !0) { - return (r ? Yie : gTe)(t, e, n); +const SV = 8205; +function kTe(t, e, r = !0, n = !0) { + return (r ? Wie : STe)(t, e, n); } -function Yie(t, e, r) { +function Wie(t, e, r) { if (e == t.length) return e; - e && Gie(t.charCodeAt(e)) && Hie(t.charCodeAt(e - 1)) && e--; - let n = q7(t, e); - for (e += OV(n); e < t.length; ) { - let i = q7(t, e); - if (n == wV || i == wV || r && dTe(i)) - e += OV(i), n = i; - else if (xV(i)) { + e && Yie(t.charCodeAt(e)) && Gie(t.charCodeAt(e - 1)) && e--; + let n = _7(t, e); + for (e += TV(n); e < t.length; ) { + let i = _7(t, e); + if (n == SV || i == SV || r && OTe(i)) + e += TV(i), n = i; + else if (kV(i)) { let s = 0, a = e - 2; - for (; a >= 0 && xV(q7(t, a)); ) + for (; a >= 0 && kV(_7(t, a)); ) s++, a -= 2; if (s % 2 == 0) break; @@ -2143,29 +2143,29 @@ function Yie(t, e, r) { } return e; } -function gTe(t, e, r) { +function STe(t, e, r) { for (; e > 0; ) { - let n = Yie(t, e - 2, r); + let n = Wie(t, e - 2, r); if (n < e) return n; e--; } return 0; } -function q7(t, e) { +function _7(t, e) { let r = t.charCodeAt(e); - if (!Hie(r) || e + 1 == t.length) + if (!Gie(r) || e + 1 == t.length) return r; let n = t.charCodeAt(e + 1); - return Gie(n) ? (r - 55296 << 10) + (n - 56320) + 65536 : r; + return Yie(n) ? (r - 55296 << 10) + (n - 56320) + 65536 : r; } -function Gie(t) { +function Yie(t) { return t >= 56320 && t < 57344; } -function Hie(t) { +function Gie(t) { return t >= 55296 && t < 56320; } -function OV(t) { +function TV(t) { return t < 65536 ? 1 : 2; } class nn { @@ -2180,24 +2180,24 @@ class nn { return this.lineInner(e, !0, 1, 0); } replace(e, r, n) { - [e, r] = uv(this, e, r); + [e, r] = av(this, e, r); let i = []; - return this.decompose(0, e, i, 2), n.length && n.decompose(0, n.length, i, 3), this.decompose(r, this.length, i, 1), zu.from(i, this.length - (r - e) + n.length); + return this.decompose(0, e, i, 2), n.length && n.decompose(0, n.length, i, 3), this.decompose(r, this.length, i, 1), Nu.from(i, this.length - (r - e) + n.length); } append(e) { return this.replace(this.length, this.length, e); } slice(e, r = this.length) { - [e, r] = uv(this, e, r); + [e, r] = av(this, e, r); let n = []; - return this.decompose(e, r, n, 0), zu.from(n, r - e); + return this.decompose(e, r, n, 0), Nu.from(n, r - e); } eq(e) { if (e == this) return !0; if (e.length != this.length || e.lines != this.lines) return !1; - let r = this.scanIdentical(e, 1), n = this.length - this.scanIdentical(e, -1), i = new nx(this), s = new nx(e); + let r = this.scanIdentical(e, 1), n = this.length - this.scanIdentical(e, -1), i = new Hb(this), s = new Hb(e); for (let a = r, o = r; ; ) { if (i.next(a), s.next(a), a = 0, i.lineBreak != s.lineBreak || i.done != s.done || i.value != s.value) return !1; @@ -2206,10 +2206,10 @@ class nn { } } iter(e = 1) { - return new nx(this, e); + return new Hb(this, e); } iterRange(e, r = this.length) { - return new Xie(this, e, r); + return new Hie(this, e, r); } iterLines(e, r) { let n; @@ -2220,7 +2220,7 @@ class nn { let i = this.line(e).from; n = this.iterRange(i, Math.max(i, r == this.lines + 1 ? this.length : r <= 1 ? 0 : this.line(r - 1).to)); } - return new jie(n); + return new Xie(n); } toString() { return this.sliceString(0); @@ -2234,11 +2234,11 @@ class nn { static of(e) { if (e.length == 0) throw new RangeError("A document must have at least one line"); - return e.length == 1 && !e[0] ? nn.empty : e.length <= 32 ? new Ni(e) : zu.from(Ni.split(e, [])); + return e.length == 1 && !e[0] ? nn.empty : e.length <= 32 ? new Di(e) : Nu.from(Di.split(e, [])); } } -class Ni extends nn { - constructor(e, r = mTe(e)) { +class Di extends nn { + constructor(e, r = TTe(e)) { super(), this.text = e, this.length = r; } get lines() { @@ -2251,33 +2251,33 @@ class Ni extends nn { for (let s = 0; ; s++) { let a = this.text[s], o = i + a.length; if ((r ? n : o) >= e) - return new vTe(i, o, n, a); + return new CTe(i, o, n, a); i = o + 1, n++; } } decompose(e, r, n, i) { - let s = e <= 0 && r >= this.length ? this : new Ni(kV(this.text, e, r), Math.min(r, this.length) - Math.max(0, e)); + let s = e <= 0 && r >= this.length ? this : new Di(CV(this.text, e, r), Math.min(r, this.length) - Math.max(0, e)); if (i & 1) { - let a = n.pop(), o = Q5(s.text, a.text.slice(), 0, s.length); + let a = n.pop(), o = A5(s.text, a.text.slice(), 0, s.length); if (o.length <= 32) - n.push(new Ni(o, a.length + s.length)); + n.push(new Di(o, a.length + s.length)); else { let l = o.length >> 1; - n.push(new Ni(o.slice(0, l)), new Ni(o.slice(l))); + n.push(new Di(o.slice(0, l)), new Di(o.slice(l))); } } else n.push(s); } replace(e, r, n) { - if (!(n instanceof Ni)) + if (!(n instanceof Di)) return super.replace(e, r, n); - [e, r] = uv(this, e, r); - let i = Q5(this.text, Q5(n.text, kV(this.text, 0, e)), r), s = this.length + n.length - (r - e); - return i.length <= 32 ? new Ni(i, s) : zu.from(Ni.split(i, []), s); + [e, r] = av(this, e, r); + let i = A5(this.text, A5(n.text, CV(this.text, 0, e)), r), s = this.length + n.length - (r - e); + return i.length <= 32 ? new Di(i, s) : Nu.from(Di.split(i, []), s); } sliceString(e, r = this.length, n = ` `) { - [e, r] = uv(this, e, r); + [e, r] = av(this, e, r); let i = ""; for (let s = 0, a = 0; s <= r && a < this.text.length; a++) { let o = this.text[a], l = s + o.length; @@ -2295,11 +2295,11 @@ class Ni extends nn { static split(e, r) { let n = [], i = -1; for (let s of e) - n.push(s), i += s.length + 1, n.length == 32 && (r.push(new Ni(n, i)), n = [], i = -1); - return i > -1 && r.push(new Ni(n, i)), r; + n.push(s), i += s.length + 1, n.length == 32 && (r.push(new Di(n, i)), n = [], i = -1); + return i > -1 && r.push(new Di(n, i)), r; } } -class zu extends nn { +class Nu extends nn { constructor(e, r) { super(), this.children = e, this.length = r, this.lines = 0; for (let n of e) @@ -2324,14 +2324,14 @@ class zu extends nn { } } replace(e, r, n) { - if ([e, r] = uv(this, e, r), n.lines < this.lines) + if ([e, r] = av(this, e, r), n.lines < this.lines) for (let i = 0, s = 0; i < this.children.length; i++) { let a = this.children[i], o = s + a.length; if (e >= s && r <= o) { let l = a.replace(e - s, r - s, n), u = this.lines - a.lines + l.lines; if (l.lines < u >> 5 - 1 && l.lines > u >> 5 + 1) { let h = this.children.slice(); - return h[i] = l, new zu(h, this.length - (r - e) + n.length); + return h[i] = l, new Nu(h, this.length - (r - e) + n.length); } return super.replace(s, o, l); } @@ -2341,7 +2341,7 @@ class zu extends nn { } sliceString(e, r = this.length, n = ` `) { - [e, r] = uv(this, e, r); + [e, r] = av(this, e, r); let i = ""; for (let s = 0, a = 0; s < this.children.length && a <= r; s++) { let o = this.children[s], l = a + o.length; @@ -2354,7 +2354,7 @@ class zu extends nn { r.flatten(e); } scanIdentical(e, r) { - if (!(e instanceof zu)) + if (!(e instanceof Nu)) return 0; let n = 0, [i, s, a, o] = r > 0 ? [0, 0, this.children.length, e.children.length] : [this.children.length - 1, e.children.length - 1, -1, -1]; for (; ; i += r, s += r) { @@ -2374,49 +2374,49 @@ class zu extends nn { let p = []; for (let g of e) g.flatten(p); - return new Ni(p, r); + return new Di(p, r); } let i = Math.max(32, n >> 5), s = i << 1, a = i >> 1, o = [], l = 0, u = -1, h = []; function f(p) { let g; - if (p.lines > s && p instanceof zu) + if (p.lines > s && p instanceof Nu) for (let m of p.children) f(m); else - p.lines > a && (l > a || !l) ? (d(), o.push(p)) : p instanceof Ni && l && (g = h[h.length - 1]) instanceof Ni && p.lines + g.lines <= 32 ? (l += p.lines, u += p.length + 1, h[h.length - 1] = new Ni(g.text.concat(p.text), g.length + 1 + p.length)) : (l + p.lines > i && d(), l += p.lines, u += p.length + 1, h.push(p)); + p.lines > a && (l > a || !l) ? (d(), o.push(p)) : p instanceof Di && l && (g = h[h.length - 1]) instanceof Di && p.lines + g.lines <= 32 ? (l += p.lines, u += p.length + 1, h[h.length - 1] = new Di(g.text.concat(p.text), g.length + 1 + p.length)) : (l + p.lines > i && d(), l += p.lines, u += p.length + 1, h.push(p)); } function d() { - l != 0 && (o.push(h.length == 1 ? h[0] : zu.from(h, u)), u = -1, l = h.length = 0); + l != 0 && (o.push(h.length == 1 ? h[0] : Nu.from(h, u)), u = -1, l = h.length = 0); } for (let p of e) f(p); - return d(), o.length == 1 ? o[0] : new zu(o, r); + return d(), o.length == 1 ? o[0] : new Nu(o, r); } } -nn.empty = /* @__PURE__ */ new Ni([""], 0); -function mTe(t) { +nn.empty = /* @__PURE__ */ new Di([""], 0); +function TTe(t) { let e = -1; for (let r of t) e += r.length + 1; return e; } -function Q5(t, e, r = 0, n = 1e9) { +function A5(t, e, r = 0, n = 1e9) { for (let i = 0, s = 0, a = !0; s < t.length && i <= n; s++) { let o = t[s], l = i + o.length; l >= r && (l > n && (o = o.slice(0, n - i)), i < r && (o = o.slice(r - i)), a ? (e[e.length - 1] += o, a = !1) : e.push(o)), i = l + 1; } return e; } -function kV(t, e, r) { - return Q5(t, [""], e, r); +function CV(t, e, r) { + return A5(t, [""], e, r); } -class nx { +class Hb { constructor(e, r = 1) { - this.dir = r, this.done = !1, this.lineBreak = !1, this.value = "", this.nodes = [e], this.offsets = [r > 0 ? 1 : (e instanceof Ni ? e.text.length : e.children.length) << 1]; + this.dir = r, this.done = !1, this.lineBreak = !1, this.value = "", this.nodes = [e], this.offsets = [r > 0 ? 1 : (e instanceof Di ? e.text.length : e.children.length) << 1]; } nextInner(e, r) { for (this.done = this.lineBreak = !1; ; ) { - let n = this.nodes.length - 1, i = this.nodes[n], s = this.offsets[n], a = s >> 1, o = i instanceof Ni ? i.text.length : i.children.length; + let n = this.nodes.length - 1, i = this.nodes[n], s = this.offsets[n], a = s >> 1, o = i instanceof Di ? i.text.length : i.children.length; if (a == (r > 0 ? o : 0)) { if (n == 0) return this.done = !0, this.value = "", this; @@ -2426,14 +2426,14 @@ class nx { return this.lineBreak = !0, this.value = ` `, this; e--; - } else if (i instanceof Ni) { + } else if (i instanceof Di) { let l = i.text[a + (r < 0 ? -1 : 0)]; if (this.offsets[n] += r, l.length > Math.max(0, e)) return this.value = e == 0 ? l : r > 0 ? l.slice(e) : l.slice(0, l.length - e), this; e -= l.length; } else { let l = i.children[a + (r < 0 ? -1 : 0)]; - e > l.length ? (e -= l.length, this.offsets[n] += r) : (r < 0 && this.offsets[n]--, this.nodes.push(l), this.offsets.push(r > 0 ? 1 : (l instanceof Ni ? l.text.length : l.children.length) << 1)); + e > l.length ? (e -= l.length, this.offsets[n] += r) : (r < 0 && this.offsets[n]--, this.nodes.push(l), this.offsets.push(r > 0 ? 1 : (l instanceof Di ? l.text.length : l.children.length) << 1)); } } } @@ -2441,9 +2441,9 @@ class nx { return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir); } } -class Xie { +class Hie { constructor(e, r, n) { - this.value = "", this.done = !1, this.cursor = new nx(e, r > n ? -1 : 1), this.pos = r > n ? e.length : 0, this.from = Math.min(r, n), this.to = Math.max(r, n); + this.value = "", this.done = !1, this.cursor = new Hb(e, r > n ? -1 : 1), this.pos = r > n ? e.length : 0, this.from = Math.min(r, n), this.to = Math.max(r, n); } nextInner(e, r) { if (r < 0 ? this.pos <= this.from : this.pos >= this.to) @@ -2461,7 +2461,7 @@ class Xie { return this.cursor.lineBreak && this.value != ""; } } -class jie { +class Xie { constructor(e) { this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1; } @@ -2475,10 +2475,10 @@ class jie { } typeof Symbol < "u" && (nn.prototype[Symbol.iterator] = function() { return this.iter(); -}, nx.prototype[Symbol.iterator] = Xie.prototype[Symbol.iterator] = jie.prototype[Symbol.iterator] = function() { +}, Hb.prototype[Symbol.iterator] = Hie.prototype[Symbol.iterator] = Xie.prototype[Symbol.iterator] = function() { return this; }); -class vTe { +class CTe { constructor(e, r, n, i) { this.from = e, this.to = r, this.number = n, this.text = i; } @@ -2486,36 +2486,36 @@ class vTe { return this.to - this.from; } } -function uv(t, e, r) { +function av(t, e, r) { return e = Math.max(0, Math.min(t.length, e)), [e, Math.max(e, Math.min(t.length, r))]; } -function oa(t, e, r = !0, n = !0) { - return pTe(t, e, r, n); +function ra(t, e, r = !0, n = !0) { + return kTe(t, e, r, n); } -function yTe(t) { +function ETe(t) { return t >= 56320 && t < 57344; } -function bTe(t) { +function _Te(t) { return t >= 55296 && t < 56320; } -function Vl(t, e) { +function Bl(t, e) { let r = t.charCodeAt(e); - if (!bTe(r) || e + 1 == t.length) + if (!_Te(r) || e + 1 == t.length) return r; let n = t.charCodeAt(e + 1); - return yTe(n) ? (r - 55296 << 10) + (n - 56320) + 65536 : r; + return ETe(n) ? (r - 55296 << 10) + (n - 56320) + 65536 : r; } -function x$(t) { +function d$(t) { return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320)); } -function nf(t) { +function jh(t) { return t < 65536 ? 1 : 2; } -const kM = /\r\n?|\n/; -var gi = /* @__PURE__ */ function(t) { +const cM = /\r\n?|\n/; +var pi = /* @__PURE__ */ function(t) { return t[t.Simple = 0] = "Simple", t[t.TrackDel = 1] = "TrackDel", t[t.TrackBefore = 2] = "TrackBefore", t[t.TrackAfter = 3] = "TrackAfter", t; -}(gi || (gi = {})); -class nh { +}(pi || (pi = {})); +class Ku { constructor(e) { this.sections = e; } @@ -2543,7 +2543,7 @@ class nh { } } iterChangedRanges(e, r = !1) { - SM(this, e, r); + uM(this, e, r); } get invertedDesc() { let e = []; @@ -2551,15 +2551,15 @@ class nh { let n = this.sections[r++], i = this.sections[r++]; i < 0 ? e.push(n, i) : e.push(i, n); } - return new nh(e); + return new Ku(e); } composeDesc(e) { return this.empty ? e : e.empty ? this : Zie(this, e); } mapDesc(e, r = !1) { - return e.empty ? this : TM(this, e, r); + return e.empty ? this : hM(this, e, r); } - mapPos(e, r = -1, n = gi.Simple) { + mapPos(e, r = -1, n = pi.Simple) { let i = 0, s = 0; for (let a = 0; a < this.sections.length; ) { let o = this.sections[a++], l = this.sections[a++], u = i + o; @@ -2568,7 +2568,7 @@ class nh { return s + (e - i); s += o; } else { - if (n != gi.Simple && u >= e && (n == gi.TrackDel && i < e && u > e || n == gi.TrackBefore && i < e || n == gi.TrackAfter && u > e)) + if (n != pi.Simple && u >= e && (n == pi.TrackDel && i < e && u > e || n == pi.TrackBefore && i < e || n == pi.TrackAfter && u > e)) return null; if (u > e || u == e && r < 0 && !o) return e == i || r < 0 ? s : s + l; @@ -2603,23 +2603,23 @@ class nh { static fromJSON(e) { if (!Array.isArray(e) || e.length % 2 || e.some((r) => typeof r != "number")) throw new RangeError("Invalid JSON representation of ChangeDesc"); - return new nh(e); + return new Ku(e); } static create(e) { - return new nh(e); + return new Ku(e); } } -class Gi extends nh { +class Yi extends Ku { constructor(e, r) { super(e), this.inserted = r; } apply(e) { if (this.length != e.length) throw new RangeError("Applying change set to a document with the wrong length"); - return SM(this, (r, n, i, s, a) => e = e.replace(i, i + (n - r), a), !1), e; + return uM(this, (r, n, i, s, a) => e = e.replace(i, i + (n - r), a), !1), e; } mapDesc(e, r = !1) { - return TM(this, e, r, !0); + return hM(this, e, r, !0); } invert(e) { let r = this.sections.slice(), n = []; @@ -2634,22 +2634,22 @@ class Gi extends nh { } s += a; } - return new Gi(r, n); + return new Yi(r, n); } compose(e) { return this.empty ? e : e.empty ? this : Zie(this, e, !0); } map(e, r = !1) { - return e.empty ? this : TM(this, e, r, !0); + return e.empty ? this : hM(this, e, r, !0); } iterChanges(e, r = !1) { - SM(this, e, r); + uM(this, e, r); } get desc() { - return nh.create(this.sections); + return Ku.create(this.sections); } filter(e) { - let r = [], n = [], i = [], s = new Ix(this); + let r = [], n = [], i = [], s = new Ex(this); e: for (let a = 0, o = 0; ; ) { let l = a == e.length ? 1e9 : e[a++]; @@ -2657,21 +2657,21 @@ class Gi extends nh { if (s.done) break e; let h = Math.min(s.len, l - o); - La(i, h, -1); + Aa(i, h, -1); let f = s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0; - La(r, h, f), f > 0 && Ad(n, r, s.text), s.forward(h), o += h; + Aa(r, h, f), f > 0 && Td(n, r, s.text), s.forward(h), o += h; } let u = e[a++]; for (; o < u; ) { if (s.done) break e; let h = Math.min(s.len, u - o); - La(r, h, -1), La(i, h, s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0), s.forward(h), o += h; + Aa(r, h, -1), Aa(i, h, s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0), s.forward(h), o += h; } } return { - changes: new Gi(r, n), - filtered: nh.create(i) + changes: new Yi(r, n), + filtered: Ku.create(i) }; } toJSON() { @@ -2687,15 +2687,15 @@ class Gi extends nh { function l(h = !1) { if (!h && !i.length) return; - a < r && La(i, r - a, -1); - let f = new Gi(i, s); + a < r && Aa(i, r - a, -1); + let f = new Yi(i, s); o = o ? o.compose(f.map(o)) : f, i = [], s = [], a = 0; } function u(h) { if (Array.isArray(h)) for (let f of h) u(f); - else if (h instanceof Gi) { + else if (h instanceof Yi) { if (h.length != r) throw new RangeError(`Mismatched change set length (got ${h.length}, expected ${r})`); l(), o = o ? o.compose(h.map(o)) : h; @@ -2703,16 +2703,16 @@ class Gi extends nh { let { from: f, to: d = f, insert: p } = h; if (f > d || f < 0 || d > r) throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${r})`); - let g = p ? typeof p == "string" ? nn.of(p.split(n || kM)) : p : nn.empty, m = g.length; + let g = p ? typeof p == "string" ? nn.of(p.split(n || cM)) : p : nn.empty, m = g.length; if (f == d && m == 0) return; - f < a && l(), f > a && La(i, f - a, -1), La(i, d - f, m), Ad(s, i, g), a = d; + f < a && l(), f > a && Aa(i, f - a, -1), Aa(i, d - f, m), Td(s, i, g), a = d; } } return u(e), l(!o), o; } static empty(e) { - return new Gi(e ? [e, -1] : [], []); + return new Yi(e ? [e, -1] : [], []); } static fromJSON(e) { if (!Array.isArray(e)) @@ -2734,19 +2734,19 @@ class Gi extends nh { } } } - return new Gi(r, n); + return new Yi(r, n); } static createSet(e, r) { - return new Gi(e, r); + return new Yi(e, r); } } -function La(t, e, r, n = !1) { +function Aa(t, e, r, n = !1) { if (e == 0 && r <= 0) return; let i = t.length - 2; i >= 0 && r <= 0 && r == t[i + 1] ? t[i] += e : i >= 0 && e == 0 && t[i] == 0 ? t[i + 1] += r : n ? (t[i] += e, t[i + 1] += r) : t.push(e, r); } -function Ad(t, e, r) { +function Td(t, e, r) { if (r.length == 0) return; let n = e.length - 2 >> 1; @@ -2758,7 +2758,7 @@ function Ad(t, e, r) { t.push(r); } } -function SM(t, e, r) { +function uM(t, e, r) { let n = t.inserted; for (let i = 0, s = 0, a = 0; a < t.sections.length; ) { let o = t.sections[a++], l = t.sections[a++]; @@ -2772,19 +2772,19 @@ function SM(t, e, r) { } } } -function TM(t, e, r, n = !1) { - let i = [], s = n ? [] : null, a = new Ix(t), o = new Ix(e); +function hM(t, e, r, n = !1) { + let i = [], s = n ? [] : null, a = new Ex(t), o = new Ex(e); for (let l = -1; ; ) { if (a.done && o.len || o.done && a.len) throw new Error("Mismatched change set lengths"); if (a.ins == -1 && o.ins == -1) { let u = Math.min(a.len, o.len); - La(i, u, -1), a.forward(u), o.forward(u); + Aa(i, u, -1), a.forward(u), o.forward(u); } else if (o.ins >= 0 && (a.ins < 0 || l == a.i || a.off == 0 && (o.len < a.len || o.len == a.len && !r))) { let u = o.len; - for (La(i, o.ins, -1); u; ) { + for (Aa(i, o.ins, -1); u; ) { let h = Math.min(a.len, u); - a.ins >= 0 && l < a.i && a.len <= h && (La(i, 0, a.ins), s && Ad(s, i, a.text), l = a.i), a.forward(h), u -= h; + a.ins >= 0 && l < a.i && a.len <= h && (Aa(i, 0, a.ins), s && Td(s, i, a.text), l = a.i), a.forward(h), u -= h; } o.next(); } else if (a.ins >= 0) { @@ -2797,23 +2797,23 @@ function TM(t, e, r, n = !1) { h -= o.len, o.next(); else break; - La(i, u, l < a.i ? a.ins : 0), s && l < a.i && Ad(s, i, a.text), l = a.i, a.forward(a.len - h); + Aa(i, u, l < a.i ? a.ins : 0), s && l < a.i && Td(s, i, a.text), l = a.i, a.forward(a.len - h); } else { if (a.done && o.done) - return s ? Gi.createSet(i, s) : nh.create(i); + return s ? Yi.createSet(i, s) : Ku.create(i); throw new Error("Mismatched change set lengths"); } } } function Zie(t, e, r = !1) { - let n = [], i = r ? [] : null, s = new Ix(t), a = new Ix(e); + let n = [], i = r ? [] : null, s = new Ex(t), a = new Ex(e); for (let o = !1; ; ) { if (s.done && a.done) - return i ? Gi.createSet(n, i) : nh.create(n); + return i ? Yi.createSet(n, i) : Ku.create(n); if (s.ins == 0) - La(n, s.len, 0, o), s.next(); + Aa(n, s.len, 0, o), s.next(); else if (a.len == 0 && !a.done) - La(n, 0, a.ins, o), i && Ad(i, n, a.text), a.next(); + Aa(n, 0, a.ins, o), i && Td(i, n, a.text), a.next(); else { if (s.done || a.done) throw new Error("Mismatched change set lengths"); @@ -2821,15 +2821,15 @@ function Zie(t, e, r = !1) { let l = Math.min(s.len2, a.len), u = n.length; if (s.ins == -1) { let h = a.ins == -1 ? -1 : a.off ? 0 : a.ins; - La(n, l, h, o), i && h && Ad(i, n, a.text); + Aa(n, l, h, o), i && h && Td(i, n, a.text); } else - a.ins == -1 ? (La(n, s.off ? 0 : s.len, l, o), i && Ad(i, n, s.textBit(l))) : (La(n, s.off ? 0 : s.len, a.off ? 0 : a.ins, o), i && !a.off && Ad(i, n, a.text)); + a.ins == -1 ? (Aa(n, s.off ? 0 : s.len, l, o), i && Td(i, n, s.textBit(l))) : (Aa(n, s.off ? 0 : s.len, a.off ? 0 : a.ins, o), i && !a.off && Td(i, n, a.text)); o = (s.ins > l || a.ins >= 0 && a.len > l) && (o || n.length > u), s.forward2(l), a.forward(l); } } } } -class Ix { +class Ex { constructor(e) { this.set = e, this.i = 0, this.next(); } @@ -2888,9 +2888,9 @@ class I0 { } extend(e, r = e) { if (e <= this.anchor && r >= this.anchor) - return ft.range(e, r); + return ut.range(e, r); let n = Math.abs(e - this.anchor) > Math.abs(r - this.anchor) ? e : r; - return ft.range(this.anchor, n); + return ut.range(this.anchor, n); } eq(e, r = !1) { return this.anchor == e.anchor && this.head == e.head && (!r || !this.empty || this.assoc == e.assoc); @@ -2901,18 +2901,18 @@ class I0 { static fromJSON(e) { if (!e || typeof e.anchor != "number" || typeof e.head != "number") throw new RangeError("Invalid JSON representation for SelectionRange"); - return ft.range(e.anchor, e.head); + return ut.range(e.anchor, e.head); } static create(e, r, n) { return new I0(e, r, n); } } -class ft { +class ut { constructor(e, r) { this.ranges = e, this.mainIndex = r; } map(e, r = -1) { - return e.empty ? this : ft.create(this.ranges.map((n) => n.map(e, r)), this.mainIndex); + return e.empty ? this : ut.create(this.ranges.map((n) => n.map(e, r)), this.mainIndex); } eq(e, r = !1) { if (this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex) @@ -2926,14 +2926,14 @@ class ft { return this.ranges[this.mainIndex]; } asSingle() { - return this.ranges.length == 1 ? this : new ft([this.main], 0); + return this.ranges.length == 1 ? this : new ut([this.main], 0); } addRange(e, r = !0) { - return ft.create([e].concat(this.ranges), r ? 0 : this.mainIndex + 1); + return ut.create([e].concat(this.ranges), r ? 0 : this.mainIndex + 1); } replaceRange(e, r = this.mainIndex) { let n = this.ranges.slice(); - return n[r] = e, ft.create(n, this.mainIndex); + return n[r] = e, ut.create(n, this.mainIndex); } toJSON() { return { ranges: this.ranges.map((e) => e.toJSON()), main: this.mainIndex }; @@ -2941,10 +2941,10 @@ class ft { static fromJSON(e) { if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length) throw new RangeError("Invalid JSON representation for EditorSelection"); - return new ft(e.ranges.map((r) => I0.fromJSON(r)), e.main); + return new ut(e.ranges.map((r) => I0.fromJSON(r)), e.main); } static single(e, r = e) { - return new ft([ft.range(e, r)], 0); + return new ut([ut.range(e, r)], 0); } static create(e, r = 0) { if (e.length == 0) @@ -2952,10 +2952,10 @@ class ft { for (let n = 0, i = 0; i < e.length; i++) { let s = e[i]; if (s.empty ? s.from <= n : s.from < n) - return ft.normalized(e.slice(), r); + return ut.normalized(e.slice(), r); n = s.to; } - return new ft(e, r); + return new ut(e, r); } static cursor(e, r = 0, n, i) { return I0.create(e, e, (r == 0 ? 0 : r < 0 ? 8 : 16) | (n == null ? 7 : Math.min(6, n)) | (i != null ? i : 16777215) << 6); @@ -2971,51 +2971,51 @@ class ft { let s = e[i], a = e[i - 1]; if (s.empty ? s.from <= a.to : s.from < a.to) { let o = a.from, l = Math.max(s.to, a.to); - i <= r && r--, e.splice(--i, 2, s.anchor > s.head ? ft.range(l, o) : ft.range(o, l)); + i <= r && r--, e.splice(--i, 2, s.anchor > s.head ? ut.range(l, o) : ut.range(o, l)); } } - return new ft(e, r); + return new ut(e, r); } } -function Kie(t, e) { +function jie(t, e) { for (let r of t.ranges) if (r.to > e) throw new RangeError("Selection points outside of document"); } -let w$ = 0; -class Gt { +let p$ = 0; +class Yt { constructor(e, r, n, i, s) { - this.combine = e, this.compareInput = r, this.compare = n, this.isStatic = i, this.id = w$++, this.default = e([]), this.extensions = typeof s == "function" ? s(this) : s; + this.combine = e, this.compareInput = r, this.compare = n, this.isStatic = i, this.id = p$++, this.default = e([]), this.extensions = typeof s == "function" ? s(this) : s; } get reader() { return this; } static define(e = {}) { - return new Gt(e.combine || ((r) => r), e.compareInput || ((r, n) => r === n), e.compare || (e.combine ? (r, n) => r === n : O$), !!e.static, e.enables); + return new Yt(e.combine || ((r) => r), e.compareInput || ((r, n) => r === n), e.compare || (e.combine ? (r, n) => r === n : g$), !!e.static, e.enables); } of(e) { - return new V5([], this, 0, e); + return new R5([], this, 0, e); } compute(e, r) { if (this.isStatic) throw new Error("Can't compute a static facet"); - return new V5(e, this, 1, r); + return new R5(e, this, 1, r); } computeN(e, r) { if (this.isStatic) throw new Error("Can't compute a static facet"); - return new V5(e, this, 2, r); + return new R5(e, this, 2, r); } from(e, r) { return r || (r = (n) => n), this.compute([e], (n) => r(n.field(e))); } } -function O$(t, e) { +function g$(t, e) { return t == e || t.length == e.length && t.every((r, n) => r === e[n]); } -class V5 { +class R5 { constructor(e, r, n, i) { - this.dependencies = e, this.facet = r, this.type = n, this.value = i, this.id = w$++; + this.dependencies = e, this.facet = r, this.type = n, this.value = i, this.id = p$++; } dynamicSlot(e) { var r; @@ -3027,9 +3027,9 @@ class V5 { return f.values[a] = n(f), 1; }, update(f, d) { - if (l && d.docChanged || u && (d.docChanged || d.selection) || CM(f, h)) { + if (l && d.docChanged || u && (d.docChanged || d.selection) || fM(f, h)) { let p = n(f); - if (o ? !SV(p, f.values[a], i) : !i(p, f.values[a])) + if (o ? !EV(p, f.values[a], i) : !i(p, f.values[a])) return f.values[a] = p, 1; } return 0; @@ -3037,8 +3037,8 @@ class V5 { reconfigure: (f, d) => { let p, g = d.config.address[s]; if (g != null) { - let m = oT(d, g); - if (this.dependencies.every((v) => v instanceof Gt ? d.facet(v) === f.facet(v) : v instanceof ai ? d.field(v, !1) == f.field(v, !1) : !0) || (o ? SV(p = n(f), m, i) : i(p = n(f), m))) + let m = Y3(d, g); + if (this.dependencies.every((v) => v instanceof Yt ? d.facet(v) === f.facet(v) : v instanceof ii ? d.field(v, !1) == f.field(v, !1) : !0) || (o ? EV(p = n(f), m, i) : i(p = n(f), m))) return f.values[a] = m, 0; } else p = n(f); @@ -3047,7 +3047,7 @@ class V5 { }; } } -function SV(t, e, r) { +function EV(t, e, r) { if (t.length != e.length) return !1; for (let n = 0; n < t.length; n++) @@ -3055,18 +3055,18 @@ function SV(t, e, r) { return !1; return !0; } -function CM(t, e) { +function fM(t, e) { let r = !1; for (let n of e) - ix(t, n) & 1 && (r = !0); + Xb(t, n) & 1 && (r = !0); return r; } -function xTe(t, e, r) { +function ATe(t, e, r) { let n = r.map((l) => t[l.id]), i = r.map((l) => l.type), s = n.filter((l) => !(l & 1)), a = t[e.id] >> 1; function o(l) { let u = []; for (let h = 0; h < n.length; h++) { - let f = oT(l, n[h]); + let f = Y3(l, n[h]); if (i[h] == 2) for (let d of f) u.push(d); @@ -3078,35 +3078,35 @@ function xTe(t, e, r) { return { create(l) { for (let u of n) - ix(l, u); + Xb(l, u); return l.values[a] = o(l), 1; }, update(l, u) { - if (!CM(l, s)) + if (!fM(l, s)) return 0; let h = o(l); return e.compare(h, l.values[a]) ? 0 : (l.values[a] = h, 1); }, reconfigure(l, u) { - let h = CM(l, n), f = u.config.facets[e.id], d = u.facet(e); - if (f && !h && O$(r, f)) + let h = fM(l, n), f = u.config.facets[e.id], d = u.facet(e); + if (f && !h && g$(r, f)) return l.values[a] = d, 0; let p = o(l); return e.compare(p, d) ? (l.values[a] = d, 0) : (l.values[a] = p, 1); } }; } -const Q4 = /* @__PURE__ */ Gt.define({ static: !0 }); -class ai { +const L4 = /* @__PURE__ */ Yt.define({ static: !0 }); +class ii { constructor(e, r, n, i, s) { this.id = e, this.createF = r, this.updateF = n, this.compareF = i, this.spec = s, this.provides = void 0; } static define(e) { - let r = new ai(w$++, e.create, e.update, e.compare || ((n, i) => n === i), e); + let r = new ii(p$++, e.create, e.update, e.compare || ((n, i) => n === i), e); return e.provide && (r.provides = e.provide(r)), r; } create(e) { - let r = e.facet(Q4).find((n) => n.field == this); + let r = e.facet(L4).find((n) => n.field == this); return ((r == null ? void 0 : r.create) || this.createF)(e); } slot(e) { @@ -3118,51 +3118,51 @@ class ai { return this.compareF(s, a) ? 0 : (n.values[r] = a, 1); }, reconfigure: (n, i) => { - let s = n.facet(Q4), a = i.facet(Q4), o; + let s = n.facet(L4), a = i.facet(L4), o; return (o = s.find((l) => l.field == this)) && o != a.find((l) => l.field == this) ? (n.values[r] = o.create(n), 1) : i.config.address[this.id] != null ? (n.values[r] = i.field(this), 0) : (n.values[r] = this.create(n), 1); } }; } init(e) { - return [this, Q4.of({ field: this, create: e })]; + return [this, L4.of({ field: this, create: e })]; } get extension() { return this; } } const O0 = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 }; -function P2(t) { - return (e) => new Jie(e, t); +function C2(t) { + return (e) => new Kie(e, t); } -const qa = { - highest: /* @__PURE__ */ P2(O0.highest), - high: /* @__PURE__ */ P2(O0.high), - default: /* @__PURE__ */ P2(O0.default), - low: /* @__PURE__ */ P2(O0.low), - lowest: /* @__PURE__ */ P2(O0.lowest) +const za = { + highest: /* @__PURE__ */ C2(O0.highest), + high: /* @__PURE__ */ C2(O0.high), + default: /* @__PURE__ */ C2(O0.default), + low: /* @__PURE__ */ C2(O0.low), + lowest: /* @__PURE__ */ C2(O0.lowest) }; -class Jie { +class Kie { constructor(e, r) { this.inner = e, this.prec = r; } } -class Hf { +class Qf { of(e) { - return new EM(this, e); + return new dM(this, e); } reconfigure(e) { - return Hf.reconfigure.of({ compartment: this, extension: e }); + return Qf.reconfigure.of({ compartment: this, extension: e }); } get(e) { return e.config.compartments.get(this); } } -class EM { +class dM { constructor(e, r) { this.compartment = e, this.inner = r; } } -class aT { +class W3 { constructor(e, r, n, i, s, a) { for (this.base = e, this.compartments = r, this.dynamicSlots = n, this.address = i, this.staticValues = s, this.facets = a, this.statusTemplate = []; this.statusTemplate.length < n.length; ) this.statusTemplate.push(0); @@ -3173,8 +3173,8 @@ class aT { } static resolve(e, r, n) { let i = [], s = /* @__PURE__ */ Object.create(null), a = /* @__PURE__ */ new Map(); - for (let d of wTe(e, r, a)) - d instanceof ai ? i.push(d) : (s[d.facet.id] || (s[d.facet.id] = [])).push(d); + for (let d of RTe(e, r, a)) + d instanceof ii ? i.push(d) : (s[d.facet.id] || (s[d.facet.id] = [])).push(d); let o = /* @__PURE__ */ Object.create(null), l = [], u = []; for (let d of i) o[d.id] = u.length << 1, u.push((p) => d.slot(p)); @@ -3182,7 +3182,7 @@ class aT { for (let d in s) { let p = s[d], g = p[0].facet, m = h && h[d] || []; if (p.every((v) => v.type == 0)) - if (o[g.id] = l.length << 1 | 1, O$(m, p)) + if (o[g.id] = l.length << 1 | 1, g$(m, p)) l.push(n.facet(g)); else { let v = g.combine(p.map((y) => y.value)); @@ -3191,14 +3191,14 @@ class aT { else { for (let v of p) v.type == 0 ? (o[v.id] = l.length << 1 | 1, l.push(v.value)) : (o[v.id] = u.length << 1, u.push((y) => v.dynamicSlot(y))); - o[g.id] = u.length << 1, u.push((v) => xTe(v, g, p)); + o[g.id] = u.length << 1, u.push((v) => ATe(v, g, p)); } } let f = u.map((d) => d(o)); - return new aT(e, a, f, o, l, s); + return new W3(e, a, f, o, l, s); } } -function wTe(t, e, r) { +function RTe(t, e, r) { let n = [[], [], [], [], []], i = /* @__PURE__ */ new Map(); function s(a, o) { let l = i.get(a); @@ -3206,21 +3206,21 @@ function wTe(t, e, r) { if (l <= o) return; let u = n[l].indexOf(a); - u > -1 && n[l].splice(u, 1), a instanceof EM && r.delete(a.compartment); + u > -1 && n[l].splice(u, 1), a instanceof dM && r.delete(a.compartment); } if (i.set(a, o), Array.isArray(a)) for (let u of a) s(u, o); - else if (a instanceof EM) { + else if (a instanceof dM) { if (r.has(a.compartment)) throw new RangeError("Duplicate use of compartment in extensions"); let u = e.get(a.compartment) || a.inner; r.set(a.compartment, u), s(u, o); - } else if (a instanceof Jie) + } else if (a instanceof Kie) s(a.inner, a.prec); - else if (a instanceof ai) + else if (a instanceof ii) n[o].push(a), a.provides && s(a.provides, o); - else if (a instanceof V5) + else if (a instanceof R5) n[o].push(a), a.facet.extensions && s(a.facet.extensions, O0.default); else { let u = a.extension; @@ -3231,7 +3231,7 @@ function wTe(t, e, r) { } return s(t, O0.default), n.reduce((a, o) => a.concat(o)); } -function ix(t, e) { +function Xb(t, e) { if (e & 1) return 2; let r = e >> 1, n = t.status[r]; @@ -3243,52 +3243,52 @@ function ix(t, e) { let i = t.computeSlot(t, t.config.dynamicSlots[r]); return t.status[r] = 2 | i; } -function oT(t, e) { +function Y3(t, e) { return e & 1 ? t.config.staticValues[e >> 1] : t.values[e >> 1]; } -const ese = /* @__PURE__ */ Gt.define(), _M = /* @__PURE__ */ Gt.define({ +const Jie = /* @__PURE__ */ Yt.define(), pM = /* @__PURE__ */ Yt.define({ combine: (t) => t.some((e) => e), static: !0 -}), tse = /* @__PURE__ */ Gt.define({ +}), ese = /* @__PURE__ */ Yt.define({ combine: (t) => t.length ? t[0] : void 0, static: !0 -}), rse = /* @__PURE__ */ Gt.define(), nse = /* @__PURE__ */ Gt.define(), ise = /* @__PURE__ */ Gt.define(), sse = /* @__PURE__ */ Gt.define({ +}), tse = /* @__PURE__ */ Yt.define(), rse = /* @__PURE__ */ Yt.define(), nse = /* @__PURE__ */ Yt.define(), ise = /* @__PURE__ */ Yt.define({ combine: (t) => t.length ? t[0] : !1 }); -class bo { +class vo { constructor(e, r) { this.type = e, this.value = r; } static define() { - return new OTe(); + return new LTe(); } } -class OTe { +class LTe { of(e) { - return new bo(this, e); + return new vo(this, e); } } -class kTe { +class MTe { constructor(e) { this.map = e; } of(e) { - return new _r(this, e); + return new Tr(this, e); } } -class _r { +class Tr { constructor(e, r) { this.type = e, this.value = r; } map(e) { let r = this.type.map(this.value, e); - return r === void 0 ? void 0 : r == this.value ? this : new _r(this.type, r); + return r === void 0 ? void 0 : r == this.value ? this : new Tr(this.type, r); } is(e) { return this.type == e; } static define(e = {}) { - return new kTe(e.map || ((r) => r)); + return new MTe(e.map || ((r) => r)); } static mapEffects(e, r) { if (!e.length) @@ -3301,14 +3301,14 @@ class _r { return n; } } -_r.reconfigure = /* @__PURE__ */ _r.define(); -_r.appendConfig = /* @__PURE__ */ _r.define(); -class Fi { +Tr.reconfigure = /* @__PURE__ */ Tr.define(); +Tr.appendConfig = /* @__PURE__ */ Tr.define(); +class Bi { constructor(e, r, n, i, s, a) { - this.startState = e, this.changes = r, this.selection = n, this.effects = i, this.annotations = s, this.scrollIntoView = a, this._doc = null, this._state = null, n && Kie(n, r.newLength), s.some((o) => o.type == Fi.time) || (this.annotations = s.concat(Fi.time.of(Date.now()))); + this.startState = e, this.changes = r, this.selection = n, this.effects = i, this.annotations = s, this.scrollIntoView = a, this._doc = null, this._state = null, n && jie(n, r.newLength), s.some((o) => o.type == Bi.time) || (this.annotations = s.concat(Bi.time.of(Date.now()))); } static create(e, r, n, i, s, a) { - return new Fi(e, r, n, i, s, a); + return new Bi(e, r, n, i, s, a); } get newDoc() { return this._doc || (this._doc = this.changes.apply(this.startState.doc)); @@ -3331,15 +3331,15 @@ class Fi { return this.startState.config != this.state.config; } isUserEvent(e) { - let r = this.annotation(Fi.userEvent); + let r = this.annotation(Bi.userEvent); return !!(r && (r == e || r.length > e.length && r.slice(0, e.length) == e && r[e.length] == ".")); } } -Fi.time = /* @__PURE__ */ bo.define(); -Fi.userEvent = /* @__PURE__ */ bo.define(); -Fi.addToHistory = /* @__PURE__ */ bo.define(); -Fi.remote = /* @__PURE__ */ bo.define(); -function STe(t, e) { +Bi.time = /* @__PURE__ */ vo.define(); +Bi.userEvent = /* @__PURE__ */ vo.define(); +Bi.addToHistory = /* @__PURE__ */ vo.define(); +Bi.remote = /* @__PURE__ */ vo.define(); +function DTe(t, e) { let r = []; for (let n = 0, i = 0; ; ) { let s, a; @@ -3352,113 +3352,113 @@ function STe(t, e) { !r.length || r[r.length - 1] < s ? r.push(s, a) : r[r.length - 1] < a && (r[r.length - 1] = a); } } -function ase(t, e, r) { +function sse(t, e, r) { var n; let i, s, a; - return r ? (i = e.changes, s = Gi.empty(e.changes.length), a = t.changes.compose(e.changes)) : (i = e.changes.map(t.changes), s = t.changes.mapDesc(e.changes, !0), a = t.changes.compose(i)), { + return r ? (i = e.changes, s = Yi.empty(e.changes.length), a = t.changes.compose(e.changes)) : (i = e.changes.map(t.changes), s = t.changes.mapDesc(e.changes, !0), a = t.changes.compose(i)), { changes: a, selection: e.selection ? e.selection.map(s) : (n = t.selection) === null || n === void 0 ? void 0 : n.map(i), - effects: _r.mapEffects(t.effects, i).concat(_r.mapEffects(e.effects, s)), + effects: Tr.mapEffects(t.effects, i).concat(Tr.mapEffects(e.effects, s)), annotations: t.annotations.length ? t.annotations.concat(e.annotations) : e.annotations, scrollIntoView: t.scrollIntoView || e.scrollIntoView }; } -function AM(t, e, r) { - let n = e.selection, i = A1(e.annotations); - return e.userEvent && (i = i.concat(Fi.userEvent.of(e.userEvent))), { - changes: e.changes instanceof Gi ? e.changes : Gi.of(e.changes || [], r, t.facet(tse)), - selection: n && (n instanceof ft ? n : ft.single(n.anchor, n.head)), - effects: A1(e.effects), +function gM(t, e, r) { + let n = e.selection, i = S1(e.annotations); + return e.userEvent && (i = i.concat(Bi.userEvent.of(e.userEvent))), { + changes: e.changes instanceof Yi ? e.changes : Yi.of(e.changes || [], r, t.facet(ese)), + selection: n && (n instanceof ut ? n : ut.single(n.anchor, n.head)), + effects: S1(e.effects), annotations: i, scrollIntoView: !!e.scrollIntoView }; } -function ose(t, e, r) { - let n = AM(t, e.length ? e[0] : {}, t.doc.length); +function ase(t, e, r) { + let n = gM(t, e.length ? e[0] : {}, t.doc.length); e.length && e[0].filter === !1 && (r = !1); for (let s = 1; s < e.length; s++) { e[s].filter === !1 && (r = !1); let a = !!e[s].sequential; - n = ase(n, AM(t, e[s], a ? n.changes.newLength : t.doc.length), a); + n = sse(n, gM(t, e[s], a ? n.changes.newLength : t.doc.length), a); } - let i = Fi.create(t, n.changes, n.selection, n.effects, n.annotations, n.scrollIntoView); - return CTe(r ? TTe(i) : i); + let i = Bi.create(t, n.changes, n.selection, n.effects, n.annotations, n.scrollIntoView); + return NTe(r ? PTe(i) : i); } -function TTe(t) { +function PTe(t) { let e = t.startState, r = !0; - for (let i of e.facet(rse)) { + for (let i of e.facet(tse)) { let s = i(t); if (s === !1) { r = !1; break; } - Array.isArray(s) && (r = r === !0 ? s : STe(r, s)); + Array.isArray(s) && (r = r === !0 ? s : DTe(r, s)); } if (r !== !0) { let i, s; if (r === !1) - s = t.changes.invertedDesc, i = Gi.empty(e.doc.length); + s = t.changes.invertedDesc, i = Yi.empty(e.doc.length); else { let a = t.changes.filter(r); i = a.changes, s = a.filtered.mapDesc(a.changes).invertedDesc; } - t = Fi.create(e, i, t.selection && t.selection.map(s), _r.mapEffects(t.effects, s), t.annotations, t.scrollIntoView); + t = Bi.create(e, i, t.selection && t.selection.map(s), Tr.mapEffects(t.effects, s), t.annotations, t.scrollIntoView); } - let n = e.facet(nse); + let n = e.facet(rse); for (let i = n.length - 1; i >= 0; i--) { let s = n[i](t); - s instanceof Fi ? t = s : Array.isArray(s) && s.length == 1 && s[0] instanceof Fi ? t = s[0] : t = ose(e, A1(s), !1); + s instanceof Bi ? t = s : Array.isArray(s) && s.length == 1 && s[0] instanceof Bi ? t = s[0] : t = ase(e, S1(s), !1); } return t; } -function CTe(t) { - let e = t.startState, r = e.facet(ise), n = t; +function NTe(t) { + let e = t.startState, r = e.facet(nse), n = t; for (let i = r.length - 1; i >= 0; i--) { let s = r[i](t); - s && Object.keys(s).length && (n = ase(n, AM(e, s, t.changes.newLength), !0)); + s && Object.keys(s).length && (n = sse(n, gM(e, s, t.changes.newLength), !0)); } - return n == t ? t : Fi.create(e, t.changes, t.selection, n.effects, n.annotations, n.scrollIntoView); + return n == t ? t : Bi.create(e, t.changes, t.selection, n.effects, n.annotations, n.scrollIntoView); } -const ETe = []; -function A1(t) { - return t == null ? ETe : Array.isArray(t) ? t : [t]; +const ITe = []; +function S1(t) { + return t == null ? ITe : Array.isArray(t) ? t : [t]; } -var li = /* @__PURE__ */ function(t) { +var ai = /* @__PURE__ */ function(t) { return t[t.Word = 0] = "Word", t[t.Space = 1] = "Space", t[t.Other = 2] = "Other", t; -}(li || (li = {})); -const _Te = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; -let RM; +}(ai || (ai = {})); +const $Te = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; +let mM; try { - RM = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u"); + mM = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u"); } catch { } -function ATe(t) { - if (RM) - return RM.test(t); +function BTe(t) { + if (mM) + return mM.test(t); for (let e = 0; e < t.length; e++) { let r = t[e]; - if (/\w/.test(r) || r > "\x80" && (r.toUpperCase() != r.toLowerCase() || _Te.test(r))) + if (/\w/.test(r) || r > "\x80" && (r.toUpperCase() != r.toLowerCase() || $Te.test(r))) return !0; } return !1; } -function RTe(t) { +function FTe(t) { return (e) => { if (!/\S/.test(e)) - return li.Space; - if (ATe(e)) - return li.Word; + return ai.Space; + if (BTe(e)) + return ai.Word; for (let r = 0; r < t.length; r++) if (e.indexOf(t[r]) > -1) - return li.Word; - return li.Other; + return ai.Word; + return ai.Other; }; } class qr { constructor(e, r, n, i, s, a) { this.config = e, this.doc = r, this.selection = n, this.values = i, this.status = e.statusTemplate.slice(), this.computeSlot = s, a && (a._state = this); for (let o = 0; o < this.config.dynamicSlots.length; o++) - ix(this, o << 1); + Xb(this, o << 1); this.computeSlot = null; } field(e, r = !0) { @@ -3468,53 +3468,53 @@ class qr { throw new RangeError("Field is not present in this state"); return; } - return ix(this, n), oT(this, n); + return Xb(this, n), Y3(this, n); } update(...e) { - return ose(this, e, !0); + return ase(this, e, !0); } applyTransaction(e) { let r = this.config, { base: n, compartments: i } = r; for (let o of e.effects) - o.is(Hf.reconfigure) ? (r && (i = /* @__PURE__ */ new Map(), r.compartments.forEach((l, u) => i.set(u, l)), r = null), i.set(o.value.compartment, o.value.extension)) : o.is(_r.reconfigure) ? (r = null, n = o.value) : o.is(_r.appendConfig) && (r = null, n = A1(n).concat(o.value)); + o.is(Qf.reconfigure) ? (r && (i = /* @__PURE__ */ new Map(), r.compartments.forEach((l, u) => i.set(u, l)), r = null), i.set(o.value.compartment, o.value.extension)) : o.is(Tr.reconfigure) ? (r = null, n = o.value) : o.is(Tr.appendConfig) && (r = null, n = S1(n).concat(o.value)); let s; - r ? s = e.startState.values.slice() : (r = aT.resolve(n, i, this), s = new qr(r, this.doc, this.selection, r.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values); - let a = e.startState.facet(_M) ? e.newSelection : e.newSelection.asSingle(); + r ? s = e.startState.values.slice() : (r = W3.resolve(n, i, this), s = new qr(r, this.doc, this.selection, r.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values); + let a = e.startState.facet(pM) ? e.newSelection : e.newSelection.asSingle(); new qr(r, e.newDoc, a, s, (o, l) => l.update(o, e), e); } replaceSelection(e) { return typeof e == "string" && (e = this.toText(e)), this.changeByRange((r) => ({ changes: { from: r.from, to: r.to, insert: e }, - range: ft.cursor(r.from + e.length) + range: ut.cursor(r.from + e.length) })); } changeByRange(e) { - let r = this.selection, n = e(r.ranges[0]), i = this.changes(n.changes), s = [n.range], a = A1(n.effects); + let r = this.selection, n = e(r.ranges[0]), i = this.changes(n.changes), s = [n.range], a = S1(n.effects); for (let o = 1; o < r.ranges.length; o++) { let l = e(r.ranges[o]), u = this.changes(l.changes), h = u.map(i); for (let d = 0; d < o; d++) s[d] = s[d].map(h); let f = i.mapDesc(u, !0); - s.push(l.range.map(f)), i = i.compose(h), a = _r.mapEffects(a, h).concat(_r.mapEffects(A1(l.effects), f)); + s.push(l.range.map(f)), i = i.compose(h), a = Tr.mapEffects(a, h).concat(Tr.mapEffects(S1(l.effects), f)); } return { changes: i, - selection: ft.create(s, r.mainIndex), + selection: ut.create(s, r.mainIndex), effects: a }; } changes(e = []) { - return e instanceof Gi ? e : Gi.of(e, this.doc.length, this.facet(qr.lineSeparator)); + return e instanceof Yi ? e : Yi.of(e, this.doc.length, this.facet(qr.lineSeparator)); } toText(e) { - return nn.of(e.split(this.facet(qr.lineSeparator) || kM)); + return nn.of(e.split(this.facet(qr.lineSeparator) || cM)); } sliceDoc(e = 0, r = this.doc.length) { return this.doc.sliceString(e, r, this.lineBreak); } facet(e) { let r = this.config.address[e.id]; - return r == null ? e.default : (ix(this, r), oT(this, r)); + return r == null ? e.default : (Xb(this, r), Y3(this, r)); } toJSON(e) { let r = { @@ -3524,7 +3524,7 @@ class qr { if (e) for (let n in e) { let i = e[n]; - i instanceof ai && this.config.address[i.id] != null && (r[n] = i.spec.toJSON(this.field(e[n]), this)); + i instanceof ii && this.config.address[i.id] != null && (r[n] = i.spec.toJSON(this.field(e[n]), this)); } return r; } @@ -3541,13 +3541,13 @@ class qr { } return qr.create({ doc: e.doc, - selection: ft.fromJSON(e.selection), + selection: ut.fromJSON(e.selection), extensions: r.extensions ? i.concat([r.extensions]) : i }); } static create(e = {}) { - let r = aT.resolve(e.extensions || [], /* @__PURE__ */ new Map()), n = e.doc instanceof nn ? e.doc : nn.of((e.doc || "").split(r.staticFacet(qr.lineSeparator) || kM)), i = e.selection ? e.selection instanceof ft ? e.selection : ft.single(e.selection.anchor, e.selection.head) : ft.single(0); - return Kie(i, n.length), r.staticFacet(_M) || (i = i.asSingle()), new qr(r, n, i, r.dynamicSlots.map(() => null), (s, a) => a.create(s), null); + let r = W3.resolve(e.extensions || [], /* @__PURE__ */ new Map()), n = e.doc instanceof nn ? e.doc : nn.of((e.doc || "").split(r.staticFacet(qr.lineSeparator) || cM)), i = e.selection ? e.selection instanceof ut ? e.selection : ut.single(e.selection.anchor, e.selection.head) : ut.single(0); + return jie(i, n.length), r.staticFacet(pM) || (i = i.asSingle()), new qr(r, n, i, r.dynamicSlots.map(() => null), (s, a) => a.create(s), null); } get tabSize() { return this.facet(qr.tabSize); @@ -3557,7 +3557,7 @@ class qr { `; } get readOnly() { - return this.facet(sse); + return this.facet(ise); } phrase(e, ...r) { for (let n of this.facet(qr.phrases)) @@ -3574,49 +3574,49 @@ class qr { } languageDataAt(e, r, n = -1) { let i = []; - for (let s of this.facet(ese)) + for (let s of this.facet(Jie)) for (let a of s(this, r, n)) Object.prototype.hasOwnProperty.call(a, e) && i.push(a[e]); return i; } charCategorizer(e) { - return RTe(this.languageDataAt("wordChars", e).join("")); + return FTe(this.languageDataAt("wordChars", e).join("")); } wordAt(e) { let { text: r, from: n, length: i } = this.doc.lineAt(e), s = this.charCategorizer(e), a = e - n, o = e - n; for (; a > 0; ) { - let l = oa(r, a, !1); - if (s(r.slice(l, a)) != li.Word) + let l = ra(r, a, !1); + if (s(r.slice(l, a)) != ai.Word) break; a = l; } for (; o < i; ) { - let l = oa(r, o); - if (s(r.slice(o, l)) != li.Word) + let l = ra(r, o); + if (s(r.slice(o, l)) != ai.Word) break; o = l; } - return a == o ? null : ft.range(a + n, o + n); + return a == o ? null : ut.range(a + n, o + n); } } -qr.allowMultipleSelections = _M; -qr.tabSize = /* @__PURE__ */ Gt.define({ +qr.allowMultipleSelections = pM; +qr.tabSize = /* @__PURE__ */ Yt.define({ combine: (t) => t.length ? t[0] : 4 }); -qr.lineSeparator = tse; -qr.readOnly = sse; -qr.phrases = /* @__PURE__ */ Gt.define({ +qr.lineSeparator = ese; +qr.readOnly = ise; +qr.phrases = /* @__PURE__ */ Yt.define({ compare(t, e) { let r = Object.keys(t), n = Object.keys(e); return r.length == n.length && r.every((i) => t[i] == e[i]); } }); -qr.languageData = ese; -qr.changeFilter = rse; -qr.transactionFilter = nse; -qr.transactionExtender = ise; -Hf.reconfigure = /* @__PURE__ */ _r.define(); -function Th(t, e, r = {}) { +qr.languageData = Jie; +qr.changeFilter = tse; +qr.transactionFilter = rse; +qr.transactionExtender = nse; +Qf.reconfigure = /* @__PURE__ */ Tr.define(); +function wh(t, e, r = {}) { let n = {}; for (let i of t) for (let s of Object.keys(i)) { @@ -3638,24 +3638,24 @@ class ug { return this == e; } range(e, r = e) { - return $x.create(e, r, this); + return _x.create(e, r, this); } } ug.prototype.startSide = ug.prototype.endSide = 0; ug.prototype.point = !1; -ug.prototype.mapMode = gi.TrackDel; -class $x { +ug.prototype.mapMode = pi.TrackDel; +class _x { constructor(e, r, n) { this.from = e, this.to = r, this.value = n; } static create(e, r, n) { - return new $x(e, r, n); + return new _x(e, r, n); } } -function LM(t, e) { +function vM(t, e) { return t.from - e.from || t.value.startSide - e.value.startSide; } -class k$ { +class m$ { constructor(e, r, n, i) { this.from = e, this.to = r, this.value = n, this.maxPoint = i; } @@ -3690,15 +3690,15 @@ class k$ { continue; (p - d || u.endSide - u.startSide) < 0 || (a < 0 && (a = d), u.point && (o = Math.max(o, p - d)), n.push(u), i.push(d - a), s.push(p - a)); } - return { mapped: n.length ? new k$(i, s, n, o) : null, pos: a }; + return { mapped: n.length ? new m$(i, s, n, o) : null, pos: a }; } } -class jr { +class Zr { constructor(e, r, n, i) { this.chunkPos = e, this.chunk = r, this.nextLayer = n, this.maxPoint = i; } static create(e, r, n, i) { - return new jr(e, r, n, i); + return new Zr(e, r, n, i); } get length() { let e = this.chunk.length - 1; @@ -3719,16 +3719,16 @@ class jr { let { add: r = [], sort: n = !1, filterFrom: i = 0, filterTo: s = this.length } = e, a = e.filter; if (r.length == 0 && !a) return this; - if (n && (r = r.slice().sort(LM)), this.isEmpty) - return r.length ? jr.of(r) : this; - let o = new lse(this, null, -1).goto(0), l = 0, u = [], h = new rs(); + if (n && (r = r.slice().sort(vM)), this.isEmpty) + return r.length ? Zr.of(r) : this; + let o = new ose(this, null, -1).goto(0), l = 0, u = [], h = new es(); for (; o.value || l < r.length; ) if (l < r.length && (o.from - r[l].from || o.startSide - r[l].value.startSide) >= 0) { let f = r[l++]; h.addInner(f.from, f.to, f.value) || u.push(f); } else - o.rangeIndex == 1 && o.chunkIndex < this.chunk.length && (l == r.length || this.chunkEnd(o.chunkIndex) < r[l].from) && (!a || i > this.chunkEnd(o.chunkIndex) || s < this.chunkPos[o.chunkIndex]) && h.addChunk(this.chunkPos[o.chunkIndex], this.chunk[o.chunkIndex]) ? o.nextChunk() : ((!a || i > o.to || s < o.from || a(o.from, o.to, o.value)) && (h.addInner(o.from, o.to, o.value) || u.push($x.create(o.from, o.to, o.value))), o.next()); - return h.finishInner(this.nextLayer.isEmpty && !u.length ? jr.empty : this.nextLayer.update({ add: u, filter: a, filterFrom: i, filterTo: s })); + o.rangeIndex == 1 && o.chunkIndex < this.chunk.length && (l == r.length || this.chunkEnd(o.chunkIndex) < r[l].from) && (!a || i > this.chunkEnd(o.chunkIndex) || s < this.chunkPos[o.chunkIndex]) && h.addChunk(this.chunkPos[o.chunkIndex], this.chunk[o.chunkIndex]) ? o.nextChunk() : ((!a || i > o.to || s < o.from || a(o.from, o.to, o.value)) && (h.addInner(o.from, o.to, o.value) || u.push(_x.create(o.from, o.to, o.value))), o.next()); + return h.finishInner(this.nextLayer.isEmpty && !u.length ? Zr.empty : this.nextLayer.update({ add: u, filter: a, filterFrom: i, filterTo: s })); } map(e) { if (e.empty || this.isEmpty) @@ -3744,7 +3744,7 @@ class jr { } } let s = this.nextLayer.map(e); - return r.length == 0 ? s : new jr(n, r, s || jr.empty, i); + return r.length == 0 ? s : new Zr(n, r, s || Zr.empty, i); } between(e, r, n) { if (!this.isEmpty) { @@ -3757,17 +3757,17 @@ class jr { } } iter(e = 0) { - return Bx.from([this]).goto(e); + return Ax.from([this]).goto(e); } get isEmpty() { return this.nextLayer == this; } static iter(e, r = 0) { - return Bx.from(e).goto(r); + return Ax.from(e).goto(r); } static compare(e, r, n, i, s = -1) { - let a = e.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), o = r.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), l = TV(a, o, n), u = new N2(a, l, s), h = new N2(o, l, s); - n.iterGaps((f, d, p) => CV(u, f, h, d, p, i)), n.empty && n.length == 0 && CV(u, 0, h, 0, 0, i); + let a = e.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), o = r.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), l = _V(a, o, n), u = new E2(a, l, s), h = new E2(o, l, s); + n.iterGaps((f, d, p) => AV(u, f, h, d, p, i)), n.empty && n.length == 0 && AV(u, 0, h, 0, 0, i); } static eq(e, r, n = 0, i) { i == null && (i = 1e9 - 1); @@ -3776,9 +3776,9 @@ class jr { return !1; if (!s.length) return !0; - let o = TV(s, a), l = new N2(s, o, 0).goto(n), u = new N2(a, o, 0).goto(n); + let o = _V(s, a), l = new E2(s, o, 0).goto(n), u = new E2(a, o, 0).goto(n); for (; ; ) { - if (l.to != u.to || !MM(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point))) + if (l.to != u.to || !yM(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point))) return !1; if (l.to > i) return !0; @@ -3786,7 +3786,7 @@ class jr { } } static spans(e, r, n, i, s = -1) { - let a = new N2(e, null, s).goto(r), o = r, l = a.openStart; + let a = new E2(e, null, s).goto(r), o = r, l = a.openStart; for (; ; ) { let u = Math.min(a.to, n); if (a.point) { @@ -3800,42 +3800,42 @@ class jr { } } static of(e, r = !1) { - let n = new rs(); - for (let i of e instanceof $x ? [e] : r ? LTe(e) : e) + let n = new es(); + for (let i of e instanceof _x ? [e] : r ? zTe(e) : e) n.add(i.from, i.to, i.value); return n.finish(); } static join(e) { if (!e.length) - return jr.empty; + return Zr.empty; let r = e[e.length - 1]; for (let n = e.length - 2; n >= 0; n--) - for (let i = e[n]; i != jr.empty; i = i.nextLayer) - r = new jr(i.chunkPos, i.chunk, r, Math.max(i.maxPoint, r.maxPoint)); + for (let i = e[n]; i != Zr.empty; i = i.nextLayer) + r = new Zr(i.chunkPos, i.chunk, r, Math.max(i.maxPoint, r.maxPoint)); return r; } } -jr.empty = /* @__PURE__ */ new jr([], [], null, -1); -function LTe(t) { +Zr.empty = /* @__PURE__ */ new Zr([], [], null, -1); +function zTe(t) { if (t.length > 1) for (let e = t[0], r = 1; r < t.length; r++) { let n = t[r]; - if (LM(e, n) > 0) - return t.slice().sort(LM); + if (vM(e, n) > 0) + return t.slice().sort(vM); e = n; } return t; } -jr.empty.nextLayer = jr.empty; -class rs { +Zr.empty.nextLayer = Zr.empty; +class es { finishChunk(e) { - this.chunks.push(new k$(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []); + this.chunks.push(new m$(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []); } constructor() { this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null; } add(e, r, n) { - this.addInner(e, r, n) || (this.nextLayer || (this.nextLayer = new rs())).add(e, r, n); + this.addInner(e, r, n) || (this.nextLayer || (this.nextLayer = new es())).add(e, r, n); } addInner(e, r, n) { let i = e - this.lastTo || n.startSide - this.last.endSide; @@ -3851,16 +3851,16 @@ class rs { return this.last = r.value[n], this.lastFrom = r.from[n] + e, this.lastTo = r.to[n] + e, !0; } finish() { - return this.finishInner(jr.empty); + return this.finishInner(Zr.empty); } finishInner(e) { if (this.from.length && this.finishChunk(!1), this.chunks.length == 0) return e; - let r = jr.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint); + let r = Zr.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint); return this.from = null, r; } } -function TV(t, e, r) { +function _V(t, e, r) { let n = /* @__PURE__ */ new Map(); for (let s of t) for (let a = 0; a < s.chunk.length; a++) @@ -3873,7 +3873,7 @@ function TV(t, e, r) { } return i; } -class lse { +class ose { constructor(e, r, n, i = 0) { this.layer = e, this.skip = r, this.minPoint = n, this.rank = i; } @@ -3929,7 +3929,7 @@ class lse { return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide; } } -class Bx { +class Ax { constructor(e) { this.heap = e; } @@ -3937,8 +3937,8 @@ class Bx { let i = []; for (let s = 0; s < e.length; s++) for (let a = e[s]; !a.isEmpty; a = a.nextLayer) - a.maxPoint >= n && i.push(new lse(a, r, n, s)); - return i.length == 1 ? i[0] : new Bx(i); + a.maxPoint >= n && i.push(new ose(a, r, n, s)); + return i.length == 1 ? i[0] : new Ax(i); } get startSide() { return this.value ? this.value.startSide : 0; @@ -3947,14 +3947,14 @@ class Bx { for (let n of this.heap) n.goto(e, r); for (let n = this.heap.length >> 1; n >= 0; n--) - U7(this.heap, n); + A7(this.heap, n); return this.next(), this; } forward(e, r) { for (let n of this.heap) n.forward(e, r); for (let n = this.heap.length >> 1; n >= 0; n--) - U7(this.heap, n); + A7(this.heap, n); (this.to - e || this.value.endSide - r) < 0 && this.next(); } next() { @@ -3962,11 +3962,11 @@ class Bx { this.from = this.to = 1e9, this.value = null, this.rank = -1; else { let e = this.heap[0]; - this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), U7(this.heap, 0); + this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), A7(this.heap, 0); } } } -function U7(t, e) { +function A7(t, e) { for (let r = t[e]; ; ) { let n = (e << 1) + 1; if (n >= t.length) @@ -3977,9 +3977,9 @@ function U7(t, e) { t[n] = r, t[e] = i, e = n; } } -class N2 { +class E2 { constructor(e, r, n) { - this.minPoint = n, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = Bx.from(e, r, n); + this.minPoint = n, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = Ax.from(e, r, n); } goto(e, r = -1e9) { return this.cursor.goto(e, r), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = e, this.endSide = r, this.openStart = -1, this.next(), this; @@ -3990,13 +3990,13 @@ class N2 { this.cursor.forward(e, r); } removeActive(e) { - V4(this.active, e), V4(this.activeTo, e), V4(this.activeRank, e), this.minActive = EV(this.active, this.activeTo); + M4(this.active, e), M4(this.activeTo, e), M4(this.activeRank, e), this.minActive = RV(this.active, this.activeTo); } addActive(e) { let r = 0, { value: n, to: i, rank: s } = this.cursor; for (; r < this.activeRank.length && (s - this.activeRank[r] || i - this.activeTo[r]) > 0; ) r++; - W4(this.active, r, n), W4(this.activeTo, r, i), W4(this.activeRank, r, s), e && W4(e, r, this.cursor.from), this.minActive = EV(this.active, this.activeTo); + D4(this.active, r, n), D4(this.activeTo, r, i), D4(this.activeRank, r, s), e && D4(e, r, this.cursor.from), this.minActive = RV(this.active, this.activeTo); } next() { let e = this.to, r = this.point; @@ -4009,7 +4009,7 @@ class N2 { this.to = this.activeTo[i], this.endSide = this.active[i].endSide; break; } - this.removeActive(i), n && V4(n, i); + this.removeActive(i), n && M4(n, i); } else if (this.cursor.value) if (this.cursor.from > e) { this.to = this.cursor.from, this.endSide = this.cursor.startSide; @@ -4051,17 +4051,17 @@ class N2 { return r; } } -function CV(t, e, r, n, i, s) { +function AV(t, e, r, n, i, s) { t.goto(e), r.goto(n); let a = n + i, o = n, l = n - e; for (; ; ) { let u = t.to + l - r.to, h = u || t.endSide - r.endSide, f = h < 0 ? t.to + l : r.to, d = Math.min(f, a); - if (t.point || r.point ? t.point && r.point && (t.point == r.point || t.point.eq(r.point)) && MM(t.activeForPoint(t.to), r.activeForPoint(r.to)) || s.comparePoint(o, d, t.point, r.point) : d > o && !MM(t.active, r.active) && s.compareRange(o, d, t.active, r.active), f > a) + if (t.point || r.point ? t.point && r.point && (t.point == r.point || t.point.eq(r.point)) && yM(t.activeForPoint(t.to), r.activeForPoint(r.to)) || s.comparePoint(o, d, t.point, r.point) : d > o && !yM(t.active, r.active) && s.compareRange(o, d, t.active, r.active), f > a) break; (u || t.openEnd != r.openEnd) && s.boundChange && s.boundChange(f), o = f, h <= 0 && t.next(), h >= 0 && r.next(); } } -function MM(t, e) { +function yM(t, e) { if (t.length != e.length) return !1; for (let r = 0; r < t.length; r++) @@ -4069,40 +4069,40 @@ function MM(t, e) { return !1; return !0; } -function V4(t, e) { +function M4(t, e) { for (let r = e, n = t.length - 1; r < n; r++) t[r] = t[r + 1]; t.pop(); } -function W4(t, e, r) { +function D4(t, e, r) { for (let n = t.length - 1; n >= e; n--) t[n + 1] = t[n]; t[e] = r; } -function EV(t, e) { +function RV(t, e) { let r = -1, n = 1e9; for (let i = 0; i < e.length; i++) (e[i] - n || t[i].endSide - t[r].endSide) < 0 && (r = i, n = e[i]); return r; } -function iu(t, e, r = t.length) { +function eu(t, e, r = t.length) { let n = 0; for (let i = 0; i < r && i < t.length; ) - t.charCodeAt(i) == 9 ? (n += e - n % e, i++) : (n++, i = oa(t, i)); + t.charCodeAt(i) == 9 ? (n += e - n % e, i++) : (n++, i = ra(t, i)); return n; } -function DM(t, e, r, n) { +function bM(t, e, r, n) { for (let i = 0, s = 0; ; ) { if (s >= e) return i; if (i == t.length) break; - s += t.charCodeAt(i) == 9 ? r - s % r : 1, i = oa(t, i); + s += t.charCodeAt(i) == 9 ? r - s % r : 1, i = ra(t, i); } return n === !0 ? -1 : t.length; } -const PM = "\u037C", _V = typeof Symbol > "u" ? "__" + PM : Symbol.for(PM), NM = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), AV = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {}; -class Tf { +const xM = "\u037C", LV = typeof Symbol > "u" ? "__" + xM : Symbol.for(xM), wM = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), MV = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {}; +class xf { constructor(e, r) { this.rules = []; let { finish: n } = r || {}; @@ -4138,29 +4138,29 @@ class Tf { `); } static newName() { - let e = AV[_V] || 1; - return AV[_V] = e + 1, PM + e.toString(36); + let e = MV[LV] || 1; + return MV[LV] = e + 1, xM + e.toString(36); } static mount(e, r, n) { - let i = e[NM], s = n && n.nonce; - i ? s && i.setNonce(s) : i = new MTe(e, s), i.mount(Array.isArray(r) ? r : [r]); + let i = e[wM], s = n && n.nonce; + i ? s && i.setNonce(s) : i = new qTe(e, s), i.mount(Array.isArray(r) ? r : [r]); } } -let RV = /* @__PURE__ */ new Map(); -class MTe { +let DV = /* @__PURE__ */ new Map(); +class qTe { constructor(e, r) { let n = e.ownerDocument || e, i = n.defaultView; if (!e.head && e.adoptedStyleSheets && i.CSSStyleSheet) { - let s = RV.get(n); + let s = DV.get(n); if (s) - return e.adoptedStyleSheets = [s.sheet, ...e.adoptedStyleSheets], e[NM] = s; - this.sheet = new i.CSSStyleSheet(), e.adoptedStyleSheets = [this.sheet, ...e.adoptedStyleSheets], RV.set(n, this); + return e.adoptedStyleSheets = [s.sheet, ...e.adoptedStyleSheets], e[wM] = s; + this.sheet = new i.CSSStyleSheet(), e.adoptedStyleSheets = [this.sheet, ...e.adoptedStyleSheets], DV.set(n, this); } else { this.styleTag = n.createElement("style"), r && this.styleTag.setAttribute("nonce", r); let s = e.head || e; s.insertBefore(this.styleTag, s.firstChild); } - this.modules = [], e[NM] = this; + this.modules = [], e[wM] = this; } mount(e) { let r = this.sheet, n = 0, i = 0; @@ -4188,7 +4188,7 @@ class MTe { this.styleTag && this.styleTag.getAttribute("nonce") != e && this.styleTag.setAttribute("nonce", e); } } -var sp = { +var ip = { 8: "Backspace", 9: "Tab", 10: "Enter", @@ -4241,7 +4241,7 @@ var sp = { 220: "\\", 221: "]", 222: "'" -}, Fx = { +}, Rx = { 48: ")", 49: "!", 50: "@", @@ -4266,54 +4266,54 @@ var sp = { 220: "|", 221: "}", 222: '"' -}, DTe = typeof navigator < "u" && /Mac/.test(navigator.platform), PTe = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent); -for (var na = 0; na < 10; na++) - sp[48 + na] = sp[96 + na] = String(na); -for (var na = 1; na <= 24; na++) - sp[na + 111] = "F" + na; -for (var na = 65; na <= 90; na++) - sp[na] = String.fromCharCode(na + 32), Fx[na] = String.fromCharCode(na); -for (var Q7 in sp) - Fx.hasOwnProperty(Q7) || (Fx[Q7] = sp[Q7]); -function NTe(t) { - var e = DTe && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || PTe && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", r = !e && t.key || (t.shiftKey ? Fx : sp)[t.keyCode] || t.key || "Unidentified"; +}, UTe = typeof navigator < "u" && /Mac/.test(navigator.platform), QTe = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent); +for (var js = 0; js < 10; js++) + ip[48 + js] = ip[96 + js] = String(js); +for (var js = 1; js <= 24; js++) + ip[js + 111] = "F" + js; +for (var js = 65; js <= 90; js++) + ip[js] = String.fromCharCode(js + 32), Rx[js] = String.fromCharCode(js); +for (var R7 in ip) + Rx.hasOwnProperty(R7) || (Rx[R7] = ip[R7]); +function VTe(t) { + var e = UTe && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || QTe && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", r = !e && t.key || (t.shiftKey ? Rx : ip)[t.keyCode] || t.key || "Unidentified"; return r == "Esc" && (r = "Escape"), r == "Del" && (r = "Delete"), r == "Left" && (r = "ArrowLeft"), r == "Up" && (r = "ArrowUp"), r == "Right" && (r = "ArrowRight"), r == "Down" && (r = "ArrowDown"), r; } -function zx(t) { +function Lx(t) { let e; return t.nodeType == 11 ? e = t.getSelection ? t : t.ownerDocument : e = t, e.getSelection(); } -function IM(t, e) { +function OM(t, e) { return e ? t == e || t.contains(e.nodeType != 1 ? e.parentNode : e) : !1; } -function W5(t, e) { +function L5(t, e) { if (!e.anchorNode) return !1; try { - return IM(t, e.anchorNode); + return OM(t, e.anchorNode); } catch { return !1; } } -function qx(t) { +function Mx(t) { return t.nodeType == 3 ? fg(t, 0, t.nodeValue.length).getClientRects() : t.nodeType == 1 ? t.getClientRects() : []; } -function sx(t, e, r, n) { - return r ? LV(t, e, r, n, -1) || LV(t, e, r, n, 1) : !1; +function Zb(t, e, r, n) { + return r ? PV(t, e, r, n, -1) || PV(t, e, r, n, 1) : !1; } function hg(t) { for (var e = 0; ; e++) if (t = t.previousSibling, !t) return e; } -function lT(t) { +function G3(t) { return t.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName); } -function LV(t, e, r, n, i) { +function PV(t, e, r, n, i) { for (; ; ) { if (t == r && e == n) return !0; - if (e == (i < 0 ? 0 : dh(t))) { + if (e == (i < 0 ? 0 : lh(t))) { if (t.nodeName == "DIV") return !1; let s = t.parentNode; @@ -4323,19 +4323,19 @@ function LV(t, e, r, n, i) { } else if (t.nodeType == 1) { if (t = t.childNodes[e + (i < 0 ? -1 : 0)], t.nodeType == 1 && t.contentEditable == "false") return !1; - e = i < 0 ? dh(t) : 0; + e = i < 0 ? lh(t) : 0; } else return !1; } } -function dh(t) { +function lh(t) { return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length; } -function Q_(t, e) { +function A_(t, e) { let r = e ? t.left : t.right; return { left: r, right: r, top: t.top, bottom: t.bottom }; } -function ITe(t) { +function WTe(t) { let e = t.visualViewport; return e ? { left: 0, @@ -4349,24 +4349,24 @@ function ITe(t) { bottom: t.innerHeight }; } -function cse(t, e) { +function lse(t, e) { let r = e.width / t.offsetWidth, n = e.height / t.offsetHeight; return (r > 0.995 && r < 1.005 || !isFinite(r) || Math.abs(e.width - t.offsetWidth) < 1) && (r = 1), (n > 0.995 && n < 1.005 || !isFinite(n) || Math.abs(e.height - t.offsetHeight) < 1) && (n = 1), { scaleX: r, scaleY: n }; } -function $Te(t, e, r, n, i, s, a, o) { +function YTe(t, e, r, n, i, s, a, o) { let l = t.ownerDocument, u = l.defaultView || window; for (let h = t, f = !1; h && !f; ) if (h.nodeType == 1) { let d, p = h == l.body, g = 1, m = 1; if (p) - d = ITe(u); + d = WTe(u); else { if (/^(fixed|sticky)$/.test(getComputedStyle(h).position) && (f = !0), h.scrollHeight <= h.clientHeight && h.scrollWidth <= h.clientWidth) { h = h.assignedSlot || h.parentNode; continue; } let b = h.getBoundingClientRect(); - ({ scaleX: g, scaleY: m } = cse(h, b)), d = { + ({ scaleX: g, scaleY: m } = lse(h, b)), d = { left: b.left, right: b.left + h.clientWidth * g, top: b.top, @@ -4408,7 +4408,7 @@ function $Te(t, e, r, n, i, s, a, o) { else break; } -function BTe(t) { +function GTe(t) { let e = t.ownerDocument, r, n; for (let i = t.parentNode; i && !(i == e.body || r && n); ) if (i.nodeType == 1) @@ -4419,7 +4419,7 @@ function BTe(t) { break; return { x: r, y: n }; } -class FTe { +class HTe { constructor() { this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0; } @@ -4428,39 +4428,39 @@ class FTe { } setRange(e) { let { anchorNode: r, focusNode: n } = e; - this.set(r, Math.min(e.anchorOffset, r ? dh(r) : 0), n, Math.min(e.focusOffset, n ? dh(n) : 0)); + this.set(r, Math.min(e.anchorOffset, r ? lh(r) : 0), n, Math.min(e.focusOffset, n ? lh(n) : 0)); } set(e, r, n, i) { this.anchorNode = e, this.anchorOffset = r, this.focusNode = n, this.focusOffset = i; } } -let $m = null; -function use(t) { +let Lm = null; +function cse(t) { if (t.setActive) return t.setActive(); - if ($m) - return t.focus($m); + if (Lm) + return t.focus(Lm); let e = []; for (let r = t; r && (e.push(r, r.scrollTop, r.scrollLeft), r != r.ownerDocument); r = r.parentNode) ; - if (t.focus($m == null ? { + if (t.focus(Lm == null ? { get preventScroll() { - return $m = { preventScroll: !0 }, !0; + return Lm = { preventScroll: !0 }, !0; } - } : void 0), !$m) { - $m = !1; + } : void 0), !Lm) { + Lm = !1; for (let r = 0; r < e.length; ) { let n = e[r++], i = e[r++], s = e[r++]; n.scrollTop != i && (n.scrollTop = i), n.scrollLeft != s && (n.scrollLeft = s); } } } -let MV; +let NV; function fg(t, e, r = e) { - let n = MV || (MV = document.createRange()); + let n = NV || (NV = document.createRange()); return n.setEnd(t, r), n.setStart(t, e), n; } -function R1(t, e, r, n) { +function T1(t, e, r, n) { let i = { key: e, code: e, keyCode: r, which: r, cancelable: !0 }; n && ({ altKey: i.altKey, ctrlKey: i.ctrlKey, shiftKey: i.shiftKey, metaKey: i.metaKey } = n); let s = new KeyboardEvent("keydown", i); @@ -4468,7 +4468,7 @@ function R1(t, e, r, n) { let a = new KeyboardEvent("keyup", i); return a.synthetic = !0, t.dispatchEvent(a), s.defaultPrevented || a.defaultPrevented; } -function zTe(t) { +function XTe(t) { for (; t; ) { if (t && (t.nodeType == 9 || t.nodeType == 11 && t.host)) return t; @@ -4476,44 +4476,44 @@ function zTe(t) { } return null; } -function hse(t) { +function use(t) { for (; t.attributes.length; ) t.removeAttributeNode(t.attributes[0]); } -function qTe(t, e) { +function ZTe(t, e) { let r = e.focusNode, n = e.focusOffset; if (!r || e.anchorNode != r || e.anchorOffset != n) return !1; - for (n = Math.min(n, dh(r)); ; ) + for (n = Math.min(n, lh(r)); ; ) if (n) { if (r.nodeType != 1) return !1; let i = r.childNodes[n - 1]; - i.contentEditable == "false" ? n-- : (r = i, n = dh(r)); + i.contentEditable == "false" ? n-- : (r = i, n = lh(r)); } else { if (r == t) return !0; n = hg(r), r = r.parentNode; } } -function fse(t) { +function hse(t) { return t.scrollTop > Math.max(1, t.scrollHeight - t.clientHeight - 4); } -function dse(t, e) { +function fse(t, e) { for (let r = t, n = e; ; ) { if (r.nodeType == 3 && n > 0) return { node: r, offset: n }; if (r.nodeType == 1 && n > 0) { if (r.contentEditable == "false") return null; - r = r.childNodes[n - 1], n = dh(r); - } else if (r.parentNode && !lT(r)) + r = r.childNodes[n - 1], n = lh(r); + } else if (r.parentNode && !G3(r)) n = hg(r), r = r.parentNode; else return null; } } -function pse(t, e) { +function dse(t, e) { for (let r = t, n = e; ; ) { if (r.nodeType == 3 && n < r.nodeValue.length) return { node: r, offset: n }; @@ -4521,25 +4521,25 @@ function pse(t, e) { if (r.contentEditable == "false") return null; r = r.childNodes[n], n = 0; - } else if (r.parentNode && !lT(r)) + } else if (r.parentNode && !G3(r)) n = hg(r) + 1, r = r.parentNode; else return null; } } -class Pa { +class Ma { constructor(e, r, n = !0) { this.node = e, this.offset = r, this.precise = n; } static before(e, r) { - return new Pa(e.parentNode, hg(e), r); + return new Ma(e.parentNode, hg(e), r); } static after(e, r) { - return new Pa(e.parentNode, hg(e) + 1, r); + return new Ma(e.parentNode, hg(e) + 1, r); } } -const S$ = []; -class Fn { +const v$ = []; +class Bn { constructor() { this.parent = null, this.dom = null, this.flags = 2; } @@ -4570,20 +4570,20 @@ class Fn { for (let a of this.children) { if (a.flags & 7) { if (!a.dom && (s = i ? i.nextSibling : n.firstChild)) { - let o = Fn.get(s); + let o = Bn.get(s); (!o || !o.parent && o.canReuseDOM(a)) && a.reuseDOM(s); } a.sync(e, r), a.flags &= -8; } if (s = i ? i.nextSibling : n.firstChild, r && !r.written && r.node == n && s != a.dom && (r.written = !0), a.dom.parentNode == n) for (; s && s != a.dom; ) - s = DV(s); + s = IV(s); else n.insertBefore(a.dom, s); i = a.dom; } for (s = i ? i.nextSibling : n.firstChild, s && r && r.node == n && (r.written = !0); s; ) - s = DV(s); + s = IV(s); } else if (this.flags & 1) for (let n of this.children) n.flags & 7 && (n.sync(e, r), n.flags &= -8); @@ -4595,7 +4595,7 @@ class Fn { if (e == this.dom) n = this.dom.childNodes[r]; else { - let i = dh(e) == 0 ? 0 : r == 0 ? -1 : 1; + let i = lh(e) == 0 ? 0 : r == 0 ? -1 : 1; for (; ; ) { let s = e.parentNode; if (s == this.dom) @@ -4606,7 +4606,7 @@ class Fn { } if (n == this.dom.firstChild) return 0; - for (; n && !Fn.get(n); ) + for (; n && !Bn.get(n); ) n = n.nextSibling; if (!n) return this.length; @@ -4660,7 +4660,7 @@ class Fn { e = r; } } - replaceChildren(e, r, n = S$) { + replaceChildren(e, r, n = v$) { this.markDirty(); for (let i = e; i < r; i++) { let s = this.children[i]; @@ -4677,7 +4677,7 @@ class Fn { return !1; } childCursor(e = this.length) { - return new gse(this.children, e, this.children.length); + return new pse(this.children, e, this.children.length); } childPos(e, r = 1) { return this.childCursor().findPos(e, r); @@ -4716,12 +4716,12 @@ class Fn { this.parent = null; } } -Fn.prototype.breakAfter = 0; -function DV(t) { +Bn.prototype.breakAfter = 0; +function IV(t) { let e = t.nextSibling; return t.parentNode.removeChild(t), e; } -class gse { +class pse { constructor(e, r, n) { this.children = e, this.pos = r, this.i = n, this.off = 0; } @@ -4734,7 +4734,7 @@ class gse { } } } -function mse(t, e, r, n, i, s, a, o, l) { +function gse(t, e, r, n, i, s, a, o, l) { let { children: u } = t, h = u.length ? u[e] : null, f = s.length ? s[s.length - 1] : null, d = f ? f.breakAfter : a; if (!(e == n && h && !a && !d && s.length < 2 && h.merge(r, i, s.length ? f : null, r == 0, o, l))) { if (n < u.length) { @@ -4751,33 +4751,33 @@ function mse(t, e, r, n, i, s, a, o, l) { !s.length && e && n < u.length && !u[e - 1].breakAfter && u[n].merge(0, 0, u[e - 1], !1, o, l) && e--, (e < n || s.length) && t.replaceChildren(e, n, s); } } -function vse(t, e, r, n, i, s) { +function mse(t, e, r, n, i, s) { let a = t.childCursor(), { i: o, off: l } = a.findPos(r, 1), { i: u, off: h } = a.findPos(e, -1), f = e - r; for (let d of n) f += d.length; - t.length += f, mse(t, u, h, o, l, n, 0, i, s); + t.length += f, gse(t, u, h, o, l, n, 0, i, s); } -let Do = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, $M = typeof document < "u" ? document : { documentElement: { style: {} } }; -const BM = /* @__PURE__ */ /Edge\/(\d+)/.exec(Do.userAgent), yse = /* @__PURE__ */ /MSIE \d/.test(Do.userAgent), FM = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Do.userAgent), V_ = !!(yse || FM || BM), PV = !V_ && /* @__PURE__ */ /gecko\/(\d+)/i.test(Do.userAgent), V7 = !V_ && /* @__PURE__ */ /Chrome\/(\d+)/.exec(Do.userAgent), NV = "webkitFontSmoothing" in $M.documentElement.style, bse = !V_ && /* @__PURE__ */ /Apple Computer/.test(Do.vendor), IV = bse && (/* @__PURE__ */ /Mobile\/\w+/.test(Do.userAgent) || Do.maxTouchPoints > 2); +let Ro = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, kM = typeof document < "u" ? document : { documentElement: { style: {} } }; +const SM = /* @__PURE__ */ /Edge\/(\d+)/.exec(Ro.userAgent), vse = /* @__PURE__ */ /MSIE \d/.test(Ro.userAgent), TM = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ro.userAgent), R_ = !!(vse || TM || SM), $V = !R_ && /* @__PURE__ */ /gecko\/(\d+)/i.test(Ro.userAgent), L7 = !R_ && /* @__PURE__ */ /Chrome\/(\d+)/.exec(Ro.userAgent), BV = "webkitFontSmoothing" in kM.documentElement.style, yse = !R_ && /* @__PURE__ */ /Apple Computer/.test(Ro.vendor), FV = yse && (/* @__PURE__ */ /Mobile\/\w+/.test(Ro.userAgent) || Ro.maxTouchPoints > 2); var nr = { - mac: IV || /* @__PURE__ */ /Mac/.test(Do.platform), - windows: /* @__PURE__ */ /Win/.test(Do.platform), - linux: /* @__PURE__ */ /Linux|X11/.test(Do.platform), - ie: V_, - ie_version: yse ? $M.documentMode || 6 : FM ? +FM[1] : BM ? +BM[1] : 0, - gecko: PV, - gecko_version: PV ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(Do.userAgent) || [0, 0])[1] : 0, - chrome: !!V7, - chrome_version: V7 ? +V7[1] : 0, - ios: IV, - android: /* @__PURE__ */ /Android\b/.test(Do.userAgent), - webkit: NV, - safari: bse, - webkit_version: NV ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(Do.userAgent) || [0, 0])[1] : 0, - tabSize: $M.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size" -}; -const UTe = 256; -class su extends Fn { + mac: FV || /* @__PURE__ */ /Mac/.test(Ro.platform), + windows: /* @__PURE__ */ /Win/.test(Ro.platform), + linux: /* @__PURE__ */ /Linux|X11/.test(Ro.platform), + ie: R_, + ie_version: vse ? kM.documentMode || 6 : TM ? +TM[1] : SM ? +SM[1] : 0, + gecko: $V, + gecko_version: $V ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(Ro.userAgent) || [0, 0])[1] : 0, + chrome: !!L7, + chrome_version: L7 ? +L7[1] : 0, + ios: FV, + android: /* @__PURE__ */ /Android\b/.test(Ro.userAgent), + webkit: BV, + safari: yse, + webkit_version: BV ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(Ro.userAgent) || [0, 0])[1] : 0, + tabSize: kM.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size" +}; +const jTe = 256; +class tu extends Bn { constructor(e) { super(), this.text = e; } @@ -4794,33 +4794,33 @@ class su extends Fn { e.nodeType == 3 && this.createDOM(e); } merge(e, r, n) { - return this.flags & 8 || n && (!(n instanceof su) || this.length - (r - e) + n.length > UTe || n.flags & 8) ? !1 : (this.text = this.text.slice(0, e) + (n ? n.text : "") + this.text.slice(r), this.markDirty(), !0); + return this.flags & 8 || n && (!(n instanceof tu) || this.length - (r - e) + n.length > jTe || n.flags & 8) ? !1 : (this.text = this.text.slice(0, e) + (n ? n.text : "") + this.text.slice(r), this.markDirty(), !0); } split(e) { - let r = new su(this.text.slice(e)); + let r = new tu(this.text.slice(e)); return this.text = this.text.slice(0, e), this.markDirty(), r.flags |= this.flags & 8, r; } localPosFromDOM(e, r) { return e == this.dom ? r : r ? this.text.length : 0; } domAtPos(e) { - return new Pa(this.dom, e); + return new Ma(this.dom, e); } domBoundsAround(e, r, n) { return { from: n, to: n + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling }; } coordsAt(e, r) { - return QTe(this.dom, e, r); + return KTe(this.dom, e, r); } } -class Cf extends Fn { +class wf extends Bn { constructor(e, r = [], n = 0) { super(), this.mark = e, this.children = r, this.length = n; for (let i of r) i.setParent(this); } setAttrs(e) { - if (hse(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs) + if (use(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs) for (let r in this.mark.attrs) e.setAttribute(r, this.mark.attrs[r]); return e; @@ -4835,7 +4835,7 @@ class Cf extends Fn { this.dom ? this.flags & 4 && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), super.sync(e, r); } merge(e, r, n, i, s, a) { - return n && (!(n instanceof Cf && n.mark.eq(this.mark)) || e && s <= 0 || r < this.length && a <= 0) ? !1 : (vse(this, e, r, n ? n.children.slice() : [], s - 1, a - 1), this.markDirty(), !0); + return n && (!(n instanceof wf && n.mark.eq(this.mark)) || e && s <= 0 || r < this.length && a <= 0) ? !1 : (mse(this, e, r, n ? n.children.slice() : [], s - 1, a - 1), this.markDirty(), !0); } split(e) { let r = [], n = 0, i = -1, s = 0; @@ -4844,16 +4844,16 @@ class Cf extends Fn { l > e && r.push(n < e ? o.split(e - n) : o), i < 0 && n >= e && (i = s), n = l, s++; } let a = this.length - e; - return this.length = e, i > -1 && (this.children.length = i, this.markDirty()), new Cf(this.mark, r, a); + return this.length = e, i > -1 && (this.children.length = i, this.markDirty()), new wf(this.mark, r, a); } domAtPos(e) { - return xse(this, e); + return bse(this, e); } coordsAt(e, r) { - return Ose(this, e, r); + return wse(this, e, r); } } -function QTe(t, e, r) { +function KTe(t, e, r) { let n = t.nodeValue.length; e > n && (e = n); let i = e, s = e, a = 0; @@ -4862,17 +4862,17 @@ function QTe(t, e, r) { if (!o.length) return null; let l = o[(a ? a < 0 : r >= 0) ? 0 : o.length - 1]; - return nr.safari && !a && l.width == 0 && (l = Array.prototype.find.call(o, (u) => u.width) || l), a ? Q_(l, a < 0) : l || null; + return nr.safari && !a && l.width == 0 && (l = Array.prototype.find.call(o, (u) => u.width) || l), a ? A_(l, a < 0) : l || null; } -class Rd extends Fn { +class Cd extends Bn { static create(e, r, n) { - return new Rd(e, r, n); + return new Cd(e, r, n); } constructor(e, r, n) { super(), this.widget = e, this.length = r, this.side = n, this.prevWidget = null; } split(e) { - let r = Rd.create(this.widget, this.length - e, this.side); + let r = Cd.create(this.widget, this.length - e, this.side); return this.length -= e, r; } sync(e) { @@ -4882,10 +4882,10 @@ class Rd extends Fn { return this.side; } merge(e, r, n, i, s, a) { - return n && (!(n instanceof Rd) || !this.widget.compare(n.widget) || e > 0 && s <= 0 || r < this.length && a <= 0) ? !1 : (this.length = e + (n ? n.length : 0) + (this.length - r), !0); + return n && (!(n instanceof Cd) || !this.widget.compare(n.widget) || e > 0 && s <= 0 || r < this.length && a <= 0) ? !1 : (this.length = e + (n ? n.length : 0) + (this.length - r), !0); } become(e) { - return e instanceof Rd && e.side == this.side && this.widget.constructor == e.widget.constructor ? (this.widget.compare(e.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, !0) : !1; + return e instanceof Cd && e.side == this.side && this.widget.constructor == e.widget.constructor ? (this.widget.compare(e.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, !0) : !1; } ignoreMutation() { return !0; @@ -4903,7 +4903,7 @@ class Rd extends Fn { return n ? n.slice(i, i + this.length) : nn.empty; } domAtPos(e) { - return (this.length ? e == 0 : this.side > 0) ? Pa.before(this.dom) : Pa.after(this.dom, e == this.length); + return (this.length ? e == 0 : this.side > 0) ? Ma.before(this.dom) : Ma.after(this.dom, e == this.length); } domBoundsAround() { return null; @@ -4918,7 +4918,7 @@ class Rd extends Fn { let a = this.side ? this.side < 0 : e > 0; for (let o = a ? i.length - 1 : 0; s = i[o], !(e > 0 ? o == 0 : o == i.length - 1 || s.top < s.bottom); o += a ? -1 : 1) ; - return Q_(s, !a); + return A_(s, !a); } get isEditable() { return !1; @@ -4933,7 +4933,7 @@ class Rd extends Fn { super.destroy(), this.dom && this.widget.destroy(this.dom); } } -class hv extends Fn { +class ov extends Bn { constructor(e) { super(), this.side = e; } @@ -4944,10 +4944,10 @@ class hv extends Fn { return !1; } become(e) { - return e instanceof hv && e.side == this.side; + return e instanceof ov && e.side == this.side; } split() { - return new hv(this.side); + return new ov(this.side); } sync() { if (!this.dom) { @@ -4959,7 +4959,7 @@ class hv extends Fn { return this.side; } domAtPos(e) { - return this.side > 0 ? Pa.before(this.dom) : Pa.after(this.dom); + return this.side > 0 ? Ma.before(this.dom) : Ma.after(this.dom); } localPosFromDOM() { return 0; @@ -4977,8 +4977,8 @@ class hv extends Fn { return !0; } } -su.prototype.children = Rd.prototype.children = hv.prototype.children = S$; -function xse(t, e) { +tu.prototype.children = Cd.prototype.children = ov.prototype.children = v$; +function bse(t, e) { let r = t.dom, { children: n } = t, i = 0; for (let s = 0; i < n.length; i++) { let a = n[i], o = s + a.length; @@ -5000,13 +5000,13 @@ function xse(t, e) { if (a.dom.parentNode == r) return a.domAtPos(0); } - return new Pa(r, 0); + return new Ma(r, 0); } -function wse(t, e, r) { +function xse(t, e, r) { let n, { children: i } = t; - r > 0 && e instanceof Cf && i.length && (n = i[i.length - 1]) instanceof Cf && n.mark.eq(e.mark) ? wse(n, e.children[0], r - 1) : (i.push(e), e.setParent(t)), t.length += e.length; + r > 0 && e instanceof wf && i.length && (n = i[i.length - 1]) instanceof wf && n.mark.eq(e.mark) ? xse(n, e.children[0], r - 1) : (i.push(e), e.setParent(t)), t.length += e.length; } -function Ose(t, e, r) { +function wse(t, e, r) { let n = null, i = -1, s = null, a = -1; function o(u, h) { for (let f = 0, d = 0; f < u.children.length && d <= h; f++) { @@ -5016,25 +5016,25 @@ function Ose(t, e, r) { } o(t, e); let l = (r < 0 ? n : s) || n || s; - return l ? l.coordsAt(Math.max(0, l == n ? i : a), r) : VTe(t); + return l ? l.coordsAt(Math.max(0, l == n ? i : a), r) : JTe(t); } -function VTe(t) { +function JTe(t) { let e = t.dom.lastChild; if (!e) return t.dom.getBoundingClientRect(); - let r = qx(e); + let r = Mx(e); return r[r.length - 1] || null; } -function zM(t, e) { +function CM(t, e) { for (let r in t) r == "class" && e.class ? e.class += " " + t.class : r == "style" && e.style ? e.style += ";" + t.style : e[r] = t[r]; return e; } -const $V = /* @__PURE__ */ Object.create(null); -function cT(t, e, r) { +const zV = /* @__PURE__ */ Object.create(null); +function H3(t, e, r) { if (t == e) return !0; - t || (t = $V), e || (e = $V); + t || (t = zV), e || (e = zV); let n = Object.keys(t), i = Object.keys(e); if (n.length - (r && n.indexOf(r) > -1 ? 1 : 0) != i.length - (r && i.indexOf(r) > -1 ? 1 : 0)) return !1; @@ -5043,7 +5043,7 @@ function cT(t, e, r) { return !1; return !0; } -function qM(t, e, r) { +function EM(t, e, r) { let n = !1; if (e) for (let i in e) @@ -5053,7 +5053,7 @@ function qM(t, e, r) { e && e[i] == r[i] || (n = !0, i == "style" ? t.style.cssText = r[i] : t.setAttribute(i, r[i])); return n; } -function WTe(t) { +function eCe(t) { let e = /* @__PURE__ */ Object.create(null); for (let r = 0; r < t.attributes.length; r++) { let n = t.attributes[r]; @@ -5061,7 +5061,7 @@ function WTe(t) { } return e; } -class el { +class Zo { eq(e) { return !1; } @@ -5092,10 +5092,10 @@ class el { destroy(e) { } } -var uo = /* @__PURE__ */ function(t) { +var lo = /* @__PURE__ */ function(t) { return t[t.Text = 0] = "Text", t[t.WidgetBefore = 1] = "WidgetBefore", t[t.WidgetAfter = 2] = "WidgetAfter", t[t.WidgetRange = 3] = "WidgetRange", t; -}(uo || (uo = {})); -class Ht extends ug { +}(lo || (lo = {})); +class Gt extends ug { constructor(e, r, n, i) { super(), this.startSide = e, this.endSide = r, this.widget = n, this.spec = i; } @@ -5103,41 +5103,41 @@ class Ht extends ug { return !1; } static mark(e) { - return new mk(e); + return new lk(e); } static widget(e) { let r = Math.max(-1e4, Math.min(1e4, e.side || 0)), n = !!e.block; - return r += n && !e.inlineOrder ? r > 0 ? 3e8 : -4e8 : r > 0 ? 1e8 : -1e8, new ap(e, r, r, n, e.widget || null, !1); + return r += n && !e.inlineOrder ? r > 0 ? 3e8 : -4e8 : r > 0 ? 1e8 : -1e8, new sp(e, r, r, n, e.widget || null, !1); } static replace(e) { let r = !!e.block, n, i; if (e.isBlockGap) n = -5e8, i = 4e8; else { - let { start: s, end: a } = kse(e, r); + let { start: s, end: a } = Ose(e, r); n = (s ? r ? -3e8 : -1 : 5e8) - 1, i = (a ? r ? 2e8 : 1 : -6e8) + 1; } - return new ap(e, n, i, r, e.widget || null, !0); + return new sp(e, n, i, r, e.widget || null, !0); } static line(e) { - return new vk(e); + return new ck(e); } static set(e, r = !1) { - return jr.of(e, r); + return Zr.of(e, r); } hasHeight() { return this.widget ? this.widget.estimatedHeight > -1 : !1; } } -Ht.none = jr.empty; -class mk extends Ht { +Gt.none = Zr.empty; +class lk extends Gt { constructor(e) { - let { start: r, end: n } = kse(e); + let { start: r, end: n } = Ose(e); super(r ? -1 : 5e8, n ? 1 : -6e8, null, e), this.tagName = e.tagName || "span", this.class = e.class || "", this.attrs = e.attributes || null; } eq(e) { var r, n; - return this == e || e instanceof mk && this.tagName == e.tagName && (this.class || ((r = this.attrs) === null || r === void 0 ? void 0 : r.class)) == (e.class || ((n = e.attrs) === null || n === void 0 ? void 0 : n.class)) && cT(this.attrs, e.attrs, "class"); + return this == e || e instanceof lk && this.tagName == e.tagName && (this.class || ((r = this.attrs) === null || r === void 0 ? void 0 : r.class)) == (e.class || ((n = e.attrs) === null || n === void 0 ? void 0 : n.class)) && H3(this.attrs, e.attrs, "class"); } range(e, r = e) { if (e >= r) @@ -5145,13 +5145,13 @@ class mk extends Ht { return super.range(e, r); } } -mk.prototype.point = !1; -class vk extends Ht { +lk.prototype.point = !1; +class ck extends Gt { constructor(e) { super(-2e8, -2e8, null, e); } eq(e) { - return e instanceof vk && this.spec.class == e.spec.class && cT(this.spec.attributes, e.spec.attributes); + return e instanceof ck && this.spec.class == e.spec.class && H3(this.spec.attributes, e.spec.attributes); } range(e, r = e) { if (r != e) @@ -5159,20 +5159,20 @@ class vk extends Ht { return super.range(e, r); } } -vk.prototype.mapMode = gi.TrackBefore; -vk.prototype.point = !0; -class ap extends Ht { +ck.prototype.mapMode = pi.TrackBefore; +ck.prototype.point = !0; +class sp extends Gt { constructor(e, r, n, i, s, a) { - super(r, n, s, e), this.block = i, this.isReplace = a, this.mapMode = i ? r <= 0 ? gi.TrackBefore : gi.TrackAfter : gi.TrackDel; + super(r, n, s, e), this.block = i, this.isReplace = a, this.mapMode = i ? r <= 0 ? pi.TrackBefore : pi.TrackAfter : pi.TrackDel; } get type() { - return this.startSide != this.endSide ? uo.WidgetRange : this.startSide <= 0 ? uo.WidgetBefore : uo.WidgetAfter; + return this.startSide != this.endSide ? lo.WidgetRange : this.startSide <= 0 ? lo.WidgetBefore : lo.WidgetAfter; } get heightRelevant() { return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0); } eq(e) { - return e instanceof ap && YTe(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide; + return e instanceof sp && tCe(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide; } range(e, r = e) { if (this.isReplace && (e > r || e == r && this.startSide > 0 && this.endSide <= 0)) @@ -5182,32 +5182,32 @@ class ap extends Ht { return super.range(e, r); } } -ap.prototype.point = !0; -function kse(t, e = !1) { +sp.prototype.point = !0; +function Ose(t, e = !1) { let { inclusiveStart: r, inclusiveEnd: n } = t; return r == null && (r = t.inclusive), n == null && (n = t.inclusive), { start: r != null ? r : e, end: n != null ? n : e }; } -function YTe(t, e) { +function tCe(t, e) { return t == e || !!(t && e && t.compare(e)); } -function Y5(t, e, r, n = 0) { +function M5(t, e, r, n = 0) { let i = r.length - 1; i >= 0 && r[i] + n >= t ? r[i] = Math.max(r[i], e) : r.push(t, e); } -class Yi extends Fn { +class Wi extends Bn { constructor() { super(...arguments), this.children = [], this.length = 0, this.prevAttrs = void 0, this.attrs = null, this.breakAfter = 0; } merge(e, r, n, i, s, a) { if (n) { - if (!(n instanceof Yi)) + if (!(n instanceof Wi)) return !1; this.dom || n.transferDOM(this); } - return i && this.setDeco(n ? n.attrs : null), vse(this, e, r, n ? n.children.slice() : [], s, a), !0; + return i && this.setDeco(n ? n.attrs : null), mse(this, e, r, n ? n.children.slice() : [], s, a), !0; } split(e) { - let r = new Yi(); + let r = new Wi(); if (r.breakAfter = this.breakAfter, this.length == 0) return r; let { i: n, off: i } = this.childPos(e); @@ -5222,28 +5222,28 @@ class Yi extends Fn { !this.dom || (this.markDirty(), e.setDOM(this.dom), e.prevAttrs = this.prevAttrs === void 0 ? this.attrs : this.prevAttrs, this.prevAttrs = void 0, this.dom = null); } setDeco(e) { - cT(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e); + H3(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e); } append(e, r) { - wse(this, e, r); + xse(this, e, r); } addLineDeco(e) { let r = e.spec.attributes, n = e.spec.class; - r && (this.attrs = zM(r, this.attrs || {})), n && (this.attrs = zM({ class: n }, this.attrs || {})); + r && (this.attrs = CM(r, this.attrs || {})), n && (this.attrs = CM({ class: n }, this.attrs || {})); } domAtPos(e) { - return xse(this, e); + return bse(this, e); } reuseDOM(e) { e.nodeName == "DIV" && (this.setDOM(e), this.flags |= 6); } sync(e, r) { var n; - this.dom ? this.flags & 4 && (hse(this.dom), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0) : (this.setDOM(document.createElement("div")), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0), this.prevAttrs !== void 0 && (qM(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), this.prevAttrs = void 0), super.sync(e, r); + this.dom ? this.flags & 4 && (use(this.dom), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0) : (this.setDOM(document.createElement("div")), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0), this.prevAttrs !== void 0 && (EM(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), this.prevAttrs = void 0), super.sync(e, r); let i = this.dom.lastChild; - for (; i && Fn.get(i) instanceof Cf; ) + for (; i && Bn.get(i) instanceof wf; ) i = i.lastChild; - if (!i || !this.length || i.nodeName != "BR" && ((n = Fn.get(i)) === null || n === void 0 ? void 0 : n.isEditable) == !1 && (!nr.ios || !this.children.some((s) => s instanceof su))) { + if (!i || !this.length || i.nodeName != "BR" && ((n = Bn.get(i)) === null || n === void 0 ? void 0 : n.isEditable) == !1 && (!nr.ios || !this.children.some((s) => s instanceof tu))) { let s = document.createElement("BR"); s.cmIgnore = !0, this.dom.appendChild(s); } @@ -5253,9 +5253,9 @@ class Yi extends Fn { return null; let e = 0, r; for (let n of this.children) { - if (!(n instanceof su) || /[^ -~]/.test(n.text)) + if (!(n instanceof tu) || /[^ -~]/.test(n.text)) return null; - let i = qx(n.dom); + let i = Mx(n.dom); if (i.length != 1) return null; e += i[0].width, r = i[0].height; @@ -5267,7 +5267,7 @@ class Yi extends Fn { } : null; } coordsAt(e, r) { - let n = Ose(this, e, r); + let n = wse(this, e, r); if (!this.children.length && n && this.parent) { let { heightOracle: i } = this.parent.view.viewState, s = n.bottom - n.top; if (Math.abs(s - i.lineHeight) < 2 && i.textHeight < s) { @@ -5278,7 +5278,7 @@ class Yi extends Fn { return n; } become(e) { - return e instanceof Yi && this.children.length == 0 && e.children.length == 0 && cT(this.attrs, e.attrs) && this.breakAfter == e.breakAfter; + return e instanceof Wi && this.children.length == 0 && e.children.length == 0 && H3(this.attrs, e.attrs) && this.breakAfter == e.breakAfter; } covers() { return !0; @@ -5287,7 +5287,7 @@ class Yi extends Fn { for (let n = 0, i = 0; n < e.children.length; n++) { let s = e.children[n], a = i + s.length; if (a >= r) { - if (s instanceof Yi) + if (s instanceof Wi) return s; if (a > r) break; @@ -5297,24 +5297,24 @@ class Yi extends Fn { return null; } } -class mf extends Fn { +class uf extends Bn { constructor(e, r, n) { super(), this.widget = e, this.length = r, this.deco = n, this.breakAfter = 0, this.prevWidget = null; } merge(e, r, n, i, s, a) { - return n && (!(n instanceof mf) || !this.widget.compare(n.widget) || e > 0 && s <= 0 || r < this.length && a <= 0) ? !1 : (this.length = e + (n ? n.length : 0) + (this.length - r), !0); + return n && (!(n instanceof uf) || !this.widget.compare(n.widget) || e > 0 && s <= 0 || r < this.length && a <= 0) ? !1 : (this.length = e + (n ? n.length : 0) + (this.length - r), !0); } domAtPos(e) { - return e == 0 ? Pa.before(this.dom) : Pa.after(this.dom, e == this.length); + return e == 0 ? Ma.before(this.dom) : Ma.after(this.dom, e == this.length); } split(e) { let r = this.length - e; this.length = e; - let n = new mf(this.widget, r, this.deco); + let n = new uf(this.widget, r, this.deco); return n.breakAfter = this.breakAfter, n; } get children() { - return S$; + return v$; } sync(e) { (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false")); @@ -5326,7 +5326,7 @@ class mf extends Fn { return null; } become(e) { - return e instanceof mf && e.widget.constructor == this.widget.constructor ? (e.widget.compare(this.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, this.deco = e.deco, this.breakAfter = e.breakAfter, !0) : !1; + return e instanceof uf && e.widget.constructor == this.widget.constructor ? (e.widget.compare(this.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, this.deco = e.deco, this.breakAfter = e.breakAfter, !0) : !1; } ignoreMutation() { return !0; @@ -5342,7 +5342,7 @@ class mf extends Fn { } coordsAt(e, r) { let n = this.widget.coordsAt(this.dom, e, r); - return n || (this.widget instanceof UM ? null : Q_(this.dom.getBoundingClientRect(), this.length ? e == 0 : r <= 0)); + return n || (this.widget instanceof _M ? null : A_(this.dom.getBoundingClientRect(), this.length ? e == 0 : r <= 0)); } destroy() { super.destroy(), this.dom && this.widget.destroy(this.dom); @@ -5352,7 +5352,7 @@ class mf extends Fn { return r == n ? !1 : e < 0 ? r < 0 : n > 0; } } -class UM extends el { +class _M extends Zo { constructor(e) { super(), this.height = e; } @@ -5376,7 +5376,7 @@ class UM extends el { return !1; } } -class ax { +class jb { constructor(e, r, n, i) { this.doc = e, this.pos = r, this.end = n, this.disallowBlockEffectsFor = i, this.content = [], this.curLine = null, this.breakAtStart = 0, this.pendingBuffer = 0, this.bufferMarks = [], this.atCursorPos = !0, this.openStart = -1, this.openEnd = -1, this.text = "", this.textOff = 0, this.cursor = e.iter(), this.skip = r; } @@ -5384,19 +5384,19 @@ class ax { if (this.content.length == 0) return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos; let e = this.content[this.content.length - 1]; - return !(e.breakAfter || e instanceof mf && e.deco.endSide < 0); + return !(e.breakAfter || e instanceof uf && e.deco.endSide < 0); } getLine() { - return this.curLine || (this.content.push(this.curLine = new Yi()), this.atCursorPos = !0), this.curLine; + return this.curLine || (this.content.push(this.curLine = new Wi()), this.atCursorPos = !0), this.curLine; } flushBuffer(e = this.bufferMarks) { - this.pendingBuffer && (this.curLine.append(Y4(new hv(-1), e), e.length), this.pendingBuffer = 0); + this.pendingBuffer && (this.curLine.append(P4(new ov(-1), e), e.length), this.pendingBuffer = 0); } addBlockWidget(e) { this.flushBuffer(), this.curLine = null, this.content.push(e); } finish(e) { - this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : this.pendingBuffer = 0, !this.posCovered() && !(e && this.content.length && this.content[this.content.length - 1] instanceof mf) && this.getLine(); + this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : this.pendingBuffer = 0, !this.posCovered() && !(e && this.content.length && this.content[this.content.length - 1] instanceof uf) && this.getLine(); } buildText(e, r, n) { for (; e > 0; ) { @@ -5411,42 +5411,42 @@ class ax { this.text = s, this.textOff = 0; } let i = Math.min(this.text.length - this.textOff, e, 512); - this.flushBuffer(r.slice(r.length - n)), this.getLine().append(Y4(new su(this.text.slice(this.textOff, this.textOff + i)), r), n), this.atCursorPos = !0, this.textOff += i, e -= i, n = 0; + this.flushBuffer(r.slice(r.length - n)), this.getLine().append(P4(new tu(this.text.slice(this.textOff, this.textOff + i)), r), n), this.atCursorPos = !0, this.textOff += i, e -= i, n = 0; } } span(e, r, n, i) { this.buildText(r - e, n, i), this.pos = r, this.openStart < 0 && (this.openStart = i); } point(e, r, n, i, s, a) { - if (this.disallowBlockEffectsFor[a] && n instanceof ap) { + if (this.disallowBlockEffectsFor[a] && n instanceof sp) { if (n.block) throw new RangeError("Block decorations may not be specified via plugins"); if (r > this.doc.lineAt(this.pos).to) throw new RangeError("Decorations that replace line breaks may not be specified via plugins"); } let o = r - e; - if (n instanceof ap) + if (n instanceof sp) if (n.block) - n.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new mf(n.widget || fv.block, o, n)); + n.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new uf(n.widget || lv.block, o, n)); else { - let l = Rd.create(n.widget || fv.inline, o, o ? 0 : n.startSide), u = this.atCursorPos && !l.isEditable && s <= i.length && (e < r || n.startSide > 0), h = !l.isEditable && (e < r || s > i.length || n.startSide <= 0), f = this.getLine(); - this.pendingBuffer == 2 && !u && !l.isEditable && (this.pendingBuffer = 0), this.flushBuffer(i), u && (f.append(Y4(new hv(1), i), s), s = i.length + Math.max(0, s - i.length)), f.append(Y4(l, i), s), this.atCursorPos = h, this.pendingBuffer = h ? e < r || s > i.length ? 1 : 2 : 0, this.pendingBuffer && (this.bufferMarks = i.slice()); + let l = Cd.create(n.widget || lv.inline, o, o ? 0 : n.startSide), u = this.atCursorPos && !l.isEditable && s <= i.length && (e < r || n.startSide > 0), h = !l.isEditable && (e < r || s > i.length || n.startSide <= 0), f = this.getLine(); + this.pendingBuffer == 2 && !u && !l.isEditable && (this.pendingBuffer = 0), this.flushBuffer(i), u && (f.append(P4(new ov(1), i), s), s = i.length + Math.max(0, s - i.length)), f.append(P4(l, i), s), this.atCursorPos = h, this.pendingBuffer = h ? e < r || s > i.length ? 1 : 2 : 0, this.pendingBuffer && (this.bufferMarks = i.slice()); } else this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(n); o && (this.textOff + o <= this.text.length ? this.textOff += o : (this.skip += o - (this.text.length - this.textOff), this.text = "", this.textOff = 0), this.pos = r), this.openStart < 0 && (this.openStart = s); } static build(e, r, n, i, s) { - let a = new ax(e, r, n, s); - return a.openEnd = jr.spans(i, r, n, a), a.openStart < 0 && (a.openStart = a.openEnd), a.finish(a.openEnd), a; + let a = new jb(e, r, n, s); + return a.openEnd = Zr.spans(i, r, n, a), a.openStart < 0 && (a.openStart = a.openEnd), a.finish(a.openEnd), a; } } -function Y4(t, e) { +function P4(t, e) { for (let r of e) - t = new Cf(r, [t], t.length); + t = new wf(r, [t], t.length); return t; } -class fv extends el { +class lv extends Zo { constructor(e) { super(), this.tag = e; } @@ -5463,30 +5463,30 @@ class fv extends el { return !0; } } -fv.inline = /* @__PURE__ */ new fv("span"); -fv.block = /* @__PURE__ */ new fv("div"); -var Xn = /* @__PURE__ */ function(t) { +lv.inline = /* @__PURE__ */ new lv("span"); +lv.block = /* @__PURE__ */ new lv("div"); +var Gn = /* @__PURE__ */ function(t) { return t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL", t; -}(Xn || (Xn = {})); -const dg = Xn.LTR, T$ = Xn.RTL; -function Sse(t) { +}(Gn || (Gn = {})); +const dg = Gn.LTR, y$ = Gn.RTL; +function kse(t) { let e = []; for (let r = 0; r < t.length; r++) e.push(1 << +t[r]); return e; } -const GTe = /* @__PURE__ */ Sse("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), HTe = /* @__PURE__ */ Sse("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), QM = /* @__PURE__ */ Object.create(null), Ou = []; +const rCe = /* @__PURE__ */ kse("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), nCe = /* @__PURE__ */ kse("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), AM = /* @__PURE__ */ Object.create(null), vu = []; for (let t of ["()", "[]", "{}"]) { let e = /* @__PURE__ */ t.charCodeAt(0), r = /* @__PURE__ */ t.charCodeAt(1); - QM[e] = r, QM[r] = -e; + AM[e] = r, AM[r] = -e; } -function Tse(t) { - return t <= 247 ? GTe[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? HTe[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1; +function Sse(t) { + return t <= 247 ? rCe[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? nCe[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1; } -const XTe = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/; -class Ld { +const iCe = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/; +class Ed { get dir() { - return this.level % 2 ? T$ : dg; + return this.level % 2 ? y$ : dg; } constructor(e, r, n) { this.from = e, this.to = r, this.level = n; @@ -5512,83 +5512,83 @@ class Ld { return s; } } -function Cse(t, e) { +function Tse(t, e) { if (t.length != e.length) return !1; for (let r = 0; r < t.length; r++) { let n = t[r], i = e[r]; - if (n.from != i.from || n.to != i.to || n.direction != i.direction || !Cse(n.inner, i.inner)) + if (n.from != i.from || n.to != i.to || n.direction != i.direction || !Tse(n.inner, i.inner)) return !1; } return !0; } -const $n = []; -function jTe(t, e, r, n, i) { +const In = []; +function sCe(t, e, r, n, i) { for (let s = 0; s <= n.length; s++) { let a = s ? n[s - 1].to : e, o = s < n.length ? n[s].from : r, l = s ? 256 : i; for (let u = a, h = l, f = l; u < o; u++) { - let d = Tse(t.charCodeAt(u)); - d == 512 ? d = h : d == 8 && f == 4 && (d = 16), $n[u] = d == 4 ? 2 : d, d & 7 && (f = d), h = d; + let d = Sse(t.charCodeAt(u)); + d == 512 ? d = h : d == 8 && f == 4 && (d = 16), In[u] = d == 4 ? 2 : d, d & 7 && (f = d), h = d; } for (let u = a, h = l, f = l; u < o; u++) { - let d = $n[u]; + let d = In[u]; if (d == 128) - u < o - 1 && h == $n[u + 1] && h & 24 ? d = $n[u] = h : $n[u] = 256; + u < o - 1 && h == In[u + 1] && h & 24 ? d = In[u] = h : In[u] = 256; else if (d == 64) { let p = u + 1; - for (; p < o && $n[p] == 64; ) + for (; p < o && In[p] == 64; ) p++; - let g = u && h == 8 || p < r && $n[p] == 8 ? f == 1 ? 1 : 8 : 256; + let g = u && h == 8 || p < r && In[p] == 8 ? f == 1 ? 1 : 8 : 256; for (let m = u; m < p; m++) - $n[m] = g; + In[m] = g; u = p - 1; } else - d == 8 && f == 1 && ($n[u] = 1); + d == 8 && f == 1 && (In[u] = 1); h = d, d & 7 && (f = d); } } } -function ZTe(t, e, r, n, i) { +function aCe(t, e, r, n, i) { let s = i == 1 ? 2 : 1; for (let a = 0, o = 0, l = 0; a <= n.length; a++) { let u = a ? n[a - 1].to : e, h = a < n.length ? n[a].from : r; for (let f = u, d, p, g; f < h; f++) - if (p = QM[d = t.charCodeAt(f)]) + if (p = AM[d = t.charCodeAt(f)]) if (p < 0) { for (let m = o - 3; m >= 0; m -= 3) - if (Ou[m + 1] == -p) { - let v = Ou[m + 2], y = v & 2 ? i : v & 4 ? v & 1 ? s : i : 0; - y && ($n[f] = $n[Ou[m]] = y), o = m; + if (vu[m + 1] == -p) { + let v = vu[m + 2], y = v & 2 ? i : v & 4 ? v & 1 ? s : i : 0; + y && (In[f] = In[vu[m]] = y), o = m; break; } } else { - if (Ou.length == 189) + if (vu.length == 189) break; - Ou[o++] = f, Ou[o++] = d, Ou[o++] = l; + vu[o++] = f, vu[o++] = d, vu[o++] = l; } - else if ((g = $n[f]) == 2 || g == 1) { + else if ((g = In[f]) == 2 || g == 1) { let m = g == i; l = m ? 0 : 1; for (let v = o - 3; v >= 0; v -= 3) { - let y = Ou[v + 2]; + let y = vu[v + 2]; if (y & 2) break; if (m) - Ou[v + 2] |= 2; + vu[v + 2] |= 2; else { if (y & 4) break; - Ou[v + 2] |= 4; + vu[v + 2] |= 4; } } } } } -function KTe(t, e, r, n) { +function oCe(t, e, r, n) { for (let i = 0, s = n; i <= r.length; i++) { let a = i ? r[i - 1].to : t, o = i < r.length ? r[i].from : e; for (let l = a; l < o; ) { - let u = $n[l]; + let u = In[l]; if (u == 256) { let h = l + 1; for (; ; ) @@ -5596,26 +5596,26 @@ function KTe(t, e, r, n) { if (i == r.length) break; h = r[i++].to, o = i < r.length ? r[i].from : e; - } else if ($n[h] == 256) + } else if (In[h] == 256) h++; else break; - let f = s == 1, d = (h < e ? $n[h] : n) == 1, p = f == d ? f ? 1 : 2 : n; + let f = s == 1, d = (h < e ? In[h] : n) == 1, p = f == d ? f ? 1 : 2 : n; for (let g = h, m = i, v = m ? r[m - 1].to : t; g > l; ) - g == v && (g = r[--m].from, v = m ? r[m - 1].to : t), $n[--g] = p; + g == v && (g = r[--m].from, v = m ? r[m - 1].to : t), In[--g] = p; l = h; } else s = u, l++; } } } -function VM(t, e, r, n, i, s, a) { +function RM(t, e, r, n, i, s, a) { let o = n % 2 ? 2 : 1; if (n % 2 == i % 2) for (let l = e, u = 0; l < r; ) { let h = !0, f = !1; if (u == s.length || l < s[u].from) { - let m = $n[l]; + let m = In[l]; m != o && (h = !1, f = m == 16); } let d = !h && o == 1 ? [] : null, p = h ? n : n + 1, g = l; @@ -5632,7 +5632,7 @@ function VM(t, e, r, n, i, s, a) { if (y < s.length && s[y].from == v) v = s[y++].to; else { - if ($n[v] == o) + if (In[v] == o) break e; break; } @@ -5640,23 +5640,23 @@ function VM(t, e, r, n, i, s, a) { if (u++, d) d.push(m); else { - m.from > l && a.push(new Ld(l, m.from, p)); + m.from > l && a.push(new Ed(l, m.from, p)); let v = m.direction == dg != !(p % 2); - WM(t, v ? n + 1 : n, i, m.inner, m.from, m.to, a), l = m.to; + LM(t, v ? n + 1 : n, i, m.inner, m.from, m.to, a), l = m.to; } g = m.to; } else { - if (g == r || (h ? $n[g] != o : $n[g] == o)) + if (g == r || (h ? In[g] != o : In[g] == o)) break; g++; } - d ? VM(t, l, g, n + 1, i, d, a) : l < g && a.push(new Ld(l, g, p)), l = g; + d ? RM(t, l, g, n + 1, i, d, a) : l < g && a.push(new Ed(l, g, p)), l = g; } else for (let l = r, u = s.length; l > e; ) { let h = !0, f = !1; if (!u || l > s[u - 1].to) { - let m = $n[l - 1]; + let m = In[l - 1]; m != o && (h = !1, f = m == 16); } let d = !h && o == 1 ? [] : null, p = h ? n : n + 1, g = l; @@ -5673,7 +5673,7 @@ function VM(t, e, r, n, i, s, a) { if (y && s[y - 1].to == v) v = s[--y].from; else { - if ($n[v - 1] == o) + if (In[v - 1] == o) break e; break; } @@ -5681,105 +5681,105 @@ function VM(t, e, r, n, i, s, a) { if (d) d.push(m); else { - m.to < l && a.push(new Ld(m.to, l, p)); + m.to < l && a.push(new Ed(m.to, l, p)); let v = m.direction == dg != !(p % 2); - WM(t, v ? n + 1 : n, i, m.inner, m.from, m.to, a), l = m.from; + LM(t, v ? n + 1 : n, i, m.inner, m.from, m.to, a), l = m.from; } g = m.from; } else { - if (g == e || (h ? $n[g - 1] != o : $n[g - 1] == o)) + if (g == e || (h ? In[g - 1] != o : In[g - 1] == o)) break; g--; } - d ? VM(t, g, l, n + 1, i, d, a) : g < l && a.push(new Ld(g, l, p)), l = g; + d ? RM(t, g, l, n + 1, i, d, a) : g < l && a.push(new Ed(g, l, p)), l = g; } } -function WM(t, e, r, n, i, s, a) { +function LM(t, e, r, n, i, s, a) { let o = e % 2 ? 2 : 1; - jTe(t, i, s, n, o), ZTe(t, i, s, n, o), KTe(i, s, n, o), VM(t, i, s, e, r, n, a); + sCe(t, i, s, n, o), aCe(t, i, s, n, o), oCe(i, s, n, o), RM(t, i, s, e, r, n, a); } -function JTe(t, e, r) { +function lCe(t, e, r) { if (!t) - return [new Ld(0, 0, e == T$ ? 1 : 0)]; - if (e == dg && !r.length && !XTe.test(t)) - return Ese(t.length); + return [new Ed(0, 0, e == y$ ? 1 : 0)]; + if (e == dg && !r.length && !iCe.test(t)) + return Cse(t.length); if (r.length) - for (; t.length > $n.length; ) - $n[$n.length] = 256; + for (; t.length > In.length; ) + In[In.length] = 256; let n = [], i = e == dg ? 0 : 1; - return WM(t, i, i, r, 0, t.length, n), n; + return LM(t, i, i, r, 0, t.length, n), n; } -function Ese(t) { - return [new Ld(0, t, 0)]; +function Cse(t) { + return [new Ed(0, t, 0)]; } -let _se = ""; -function eCe(t, e, r, n, i) { +let Ese = ""; +function cCe(t, e, r, n, i) { var s; - let a = n.head - t.from, o = Ld.find(e, a, (s = n.bidiLevel) !== null && s !== void 0 ? s : -1, n.assoc), l = e[o], u = l.side(i, r); + let a = n.head - t.from, o = Ed.find(e, a, (s = n.bidiLevel) !== null && s !== void 0 ? s : -1, n.assoc), l = e[o], u = l.side(i, r); if (a == u) { let d = o += i ? 1 : -1; if (d < 0 || d >= e.length) return null; l = e[o = d], a = l.side(!i, r), u = l.side(i, r); } - let h = oa(t.text, a, l.forward(i, r)); - (h < l.from || h > l.to) && (h = u), _se = t.text.slice(Math.min(a, h), Math.max(a, h)); + let h = ra(t.text, a, l.forward(i, r)); + (h < l.from || h > l.to) && (h = u), Ese = t.text.slice(Math.min(a, h), Math.max(a, h)); let f = o == (i ? e.length - 1 : 0) ? null : e[o + (i ? 1 : -1)]; - return f && h == u && f.level + (i ? 0 : 1) < l.level ? ft.cursor(f.side(!i, r) + t.from, f.forward(i, r) ? 1 : -1, f.level) : ft.cursor(h + t.from, l.forward(i, r) ? -1 : 1, l.level); + return f && h == u && f.level + (i ? 0 : 1) < l.level ? ut.cursor(f.side(!i, r) + t.from, f.forward(i, r) ? 1 : -1, f.level) : ut.cursor(h + t.from, l.forward(i, r) ? -1 : 1, l.level); } -function tCe(t, e, r) { +function uCe(t, e, r) { for (let n = e; n < r; n++) { - let i = Tse(t.charCodeAt(n)); + let i = Sse(t.charCodeAt(n)); if (i == 1) return dg; if (i == 2 || i == 4) - return T$; + return y$; } return dg; } -const Ase = /* @__PURE__ */ Gt.define(), Rse = /* @__PURE__ */ Gt.define(), Lse = /* @__PURE__ */ Gt.define(), Mse = /* @__PURE__ */ Gt.define(), YM = /* @__PURE__ */ Gt.define(), Dse = /* @__PURE__ */ Gt.define(), Pse = /* @__PURE__ */ Gt.define(), C$ = /* @__PURE__ */ Gt.define(), E$ = /* @__PURE__ */ Gt.define(), Nse = /* @__PURE__ */ Gt.define({ +const _se = /* @__PURE__ */ Yt.define(), Ase = /* @__PURE__ */ Yt.define(), Rse = /* @__PURE__ */ Yt.define(), Lse = /* @__PURE__ */ Yt.define(), MM = /* @__PURE__ */ Yt.define(), Mse = /* @__PURE__ */ Yt.define(), Dse = /* @__PURE__ */ Yt.define(), b$ = /* @__PURE__ */ Yt.define(), x$ = /* @__PURE__ */ Yt.define(), Pse = /* @__PURE__ */ Yt.define({ combine: (t) => t.some((e) => e) -}), Ise = /* @__PURE__ */ Gt.define({ +}), Nse = /* @__PURE__ */ Yt.define({ combine: (t) => t.some((e) => e) -}), $se = /* @__PURE__ */ Gt.define(); -class L1 { +}), Ise = /* @__PURE__ */ Yt.define(); +class C1 { constructor(e, r = "nearest", n = "nearest", i = 5, s = 5, a = !1) { this.range = e, this.y = r, this.x = n, this.yMargin = i, this.xMargin = s, this.isSnapshot = a; } map(e) { - return e.empty ? this : new L1(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot); + return e.empty ? this : new C1(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot); } clip(e) { - return this.range.to <= e.doc.length ? this : new L1(ft.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot); + return this.range.to <= e.doc.length ? this : new C1(ut.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot); } } -const G4 = /* @__PURE__ */ _r.define({ map: (t, e) => t.map(e) }), Bse = /* @__PURE__ */ _r.define(); -function Wo(t, e, r) { - let n = t.facet(Mse); +const N4 = /* @__PURE__ */ Tr.define({ map: (t, e) => t.map(e) }), $se = /* @__PURE__ */ Tr.define(); +function qo(t, e, r) { + let n = t.facet(Lse); n.length ? n[0](e) : window.onerror ? window.onerror(String(e), r, void 0, void 0, e) : r ? console.error(r + ":", e) : console.error(e); } -const sf = /* @__PURE__ */ Gt.define({ combine: (t) => t.length ? t[0] : !0 }); -let rCe = 0; -const Tb = /* @__PURE__ */ Gt.define(); -class fn { +const Kh = /* @__PURE__ */ Yt.define({ combine: (t) => t.length ? t[0] : !0 }); +let hCe = 0; +const gb = /* @__PURE__ */ Yt.define(); +class hn { constructor(e, r, n, i, s) { this.id = e, this.create = r, this.domEventHandlers = n, this.domEventObservers = i, this.extension = s(this); } static define(e, r) { const { eventHandlers: n, eventObservers: i, provide: s, decorations: a } = r || {}; - return new fn(rCe++, e, n, i, (o) => { - let l = [Tb.of(o)]; - return a && l.push(Ux.of((u) => { + return new hn(hCe++, e, n, i, (o) => { + let l = [gb.of(o)]; + return a && l.push(Dx.of((u) => { let h = u.plugin(o); - return h ? a(h) : Ht.none; + return h ? a(h) : Gt.none; })), s && l.push(s(o)), l; }); } static fromClass(e, r) { - return fn.define((n) => new e(n), r); + return hn.define((n) => new e(n), r); } } -class W7 { +class M7 { constructor(e) { this.spec = e, this.mustUpdate = null, this.value = null; } @@ -5791,7 +5791,7 @@ class W7 { try { this.value.update(r); } catch (n) { - if (Wo(r.state, n, "CodeMirror plugin crashed"), this.value.destroy) + if (qo(r.state, n, "CodeMirror plugin crashed"), this.value.destroy) try { this.value.destroy(); } catch { @@ -5803,7 +5803,7 @@ class W7 { try { this.value = this.spec.create(e); } catch (r) { - Wo(e.state, r, "CodeMirror plugin crashed"), this.deactivate(); + qo(e.state, r, "CodeMirror plugin crashed"), this.deactivate(); } return this; } @@ -5813,27 +5813,27 @@ class W7 { try { this.value.destroy(); } catch (n) { - Wo(e.state, n, "CodeMirror plugin crashed"); + qo(e.state, n, "CodeMirror plugin crashed"); } } deactivate() { this.spec = this.value = null; } } -const Fse = /* @__PURE__ */ Gt.define(), _$ = /* @__PURE__ */ Gt.define(), Ux = /* @__PURE__ */ Gt.define(), zse = /* @__PURE__ */ Gt.define(), A$ = /* @__PURE__ */ Gt.define(), qse = /* @__PURE__ */ Gt.define(); -function BV(t, e) { - let r = t.state.facet(qse); +const Bse = /* @__PURE__ */ Yt.define(), w$ = /* @__PURE__ */ Yt.define(), Dx = /* @__PURE__ */ Yt.define(), Fse = /* @__PURE__ */ Yt.define(), O$ = /* @__PURE__ */ Yt.define(), zse = /* @__PURE__ */ Yt.define(); +function qV(t, e) { + let r = t.state.facet(zse); if (!r.length) return r; let n = r.map((s) => s instanceof Function ? s(t) : s), i = []; - return jr.spans(n, e.from, e.to, { + return Zr.spans(n, e.from, e.to, { point() { }, span(s, a, o, l) { let u = s - e.from, h = a - e.from, f = i; for (let d = o.length - 1; d >= 0; d--, l--) { let p = o[d].spec.bidiIsolate, g; - if (p == null && (p = tCe(e.text, u, h)), l > 0 && f.length && (g = f[f.length - 1]).to == u && g.direction == p) + if (p == null && (p = uCe(e.text, u, h)), l > 0 && f.length && (g = f[f.length - 1]).to == u && g.direction == p) g.to = h, f = g.inner; else { let m = { from: u, to: h, direction: p, inner: [] }; @@ -5843,22 +5843,22 @@ function BV(t, e) { } }), i; } -const Use = /* @__PURE__ */ Gt.define(); -function R$(t) { +const qse = /* @__PURE__ */ Yt.define(); +function k$(t) { let e = 0, r = 0, n = 0, i = 0; - for (let s of t.state.facet(Use)) { + for (let s of t.state.facet(qse)) { let a = s(t); a && (a.left != null && (e = Math.max(e, a.left)), a.right != null && (r = Math.max(r, a.right)), a.top != null && (n = Math.max(n, a.top)), a.bottom != null && (i = Math.max(i, a.bottom))); } return { left: e, right: r, top: n, bottom: i }; } -const Cb = /* @__PURE__ */ Gt.define(); -class oc { +const mb = /* @__PURE__ */ Yt.define(); +class tc { constructor(e, r, n, i) { this.fromA = e, this.toA = r, this.fromB = n, this.toB = i; } join(e) { - return new oc(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB)); + return new tc(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB)); } addToSet(e) { let r = e.length, n = this; @@ -5880,26 +5880,26 @@ class oc { let l = i == e.length ? null : e[i], u = a - o, h = l ? l.fromB : 1e9; for (; s < r.length && r[s] < h; ) { let f = r[s], d = r[s + 1], p = Math.max(o, f), g = Math.min(h, d); - if (p <= g && new oc(p + u, g + u, p, g).addToSet(n), d > h) + if (p <= g && new tc(p + u, g + u, p, g).addToSet(n), d > h) break; s += 2; } if (!l) return n; - new oc(l.fromA, l.toA, l.fromB, l.toB).addToSet(n), a = l.toA, o = l.toB; + new tc(l.fromA, l.toA, l.fromB, l.toB).addToSet(n), a = l.toA, o = l.toB; } } } -class uT { +class X3 { constructor(e, r, n) { - this.view = e, this.state = r, this.transactions = n, this.flags = 0, this.startState = e.state, this.changes = Gi.empty(this.startState.doc.length); + this.view = e, this.state = r, this.transactions = n, this.flags = 0, this.startState = e.state, this.changes = Yi.empty(this.startState.doc.length); for (let s of n) this.changes = this.changes.compose(s.changes); let i = []; - this.changes.iterChangedRanges((s, a, o, l) => i.push(new oc(s, a, o, l))), this.changedRanges = i; + this.changes.iterChangedRanges((s, a, o, l) => i.push(new tc(s, a, o, l))), this.changedRanges = i; } static create(e, r, n) { - return new uT(e, r, n); + return new X3(e, r, n); } get viewportChanged() { return (this.flags & 4) > 0; @@ -5926,28 +5926,28 @@ class uT { return this.flags == 0 && this.transactions.length == 0; } } -class FV extends Fn { +class UV extends Bn { get length() { return this.view.state.doc.length; } constructor(e) { - super(), this.view = e, this.decorations = [], this.dynamicDecorationMap = [!1], this.domChanged = null, this.hasComposition = null, this.markedForComposition = /* @__PURE__ */ new Set(), this.editContextFormatting = Ht.none, this.lastCompositionAfterCursor = !1, this.minWidth = 0, this.minWidthFrom = 0, this.minWidthTo = 0, this.impreciseAnchor = null, this.impreciseHead = null, this.forceSelection = !1, this.lastUpdate = Date.now(), this.setDOM(e.contentDOM), this.children = [new Yi()], this.children[0].setParent(this), this.updateDeco(), this.updateInner([new oc(0, 0, 0, e.state.doc.length)], 0, null); + super(), this.view = e, this.decorations = [], this.dynamicDecorationMap = [!1], this.domChanged = null, this.hasComposition = null, this.markedForComposition = /* @__PURE__ */ new Set(), this.editContextFormatting = Gt.none, this.lastCompositionAfterCursor = !1, this.minWidth = 0, this.minWidthFrom = 0, this.minWidthTo = 0, this.impreciseAnchor = null, this.impreciseHead = null, this.forceSelection = !1, this.lastUpdate = Date.now(), this.setDOM(e.contentDOM), this.children = [new Wi()], this.children[0].setParent(this), this.updateDeco(), this.updateInner([new tc(0, 0, 0, e.state.doc.length)], 0, null); } update(e) { var r; let n = e.changedRanges; this.minWidth > 0 && n.length && (n.every(({ fromA: u, toA: h }) => h < this.minWidthFrom || u > this.minWidthTo) ? (this.minWidthFrom = e.changes.mapPos(this.minWidthFrom, 1), this.minWidthTo = e.changes.mapPos(this.minWidthTo, 1)) : this.minWidth = this.minWidthFrom = this.minWidthTo = 0), this.updateEditContextFormatting(e); let i = -1; - this.view.inputState.composing >= 0 && !this.view.observer.editContext && (!((r = this.domChanged) === null || r === void 0) && r.newSel ? i = this.domChanged.newSel.head : !cCe(e.changes, this.hasComposition) && !e.selectionSet && (i = e.state.selection.main.head)); - let s = i > -1 ? iCe(this.view, e.changes, i) : null; + this.view.inputState.composing >= 0 && !this.view.observer.editContext && (!((r = this.domChanged) === null || r === void 0) && r.newSel ? i = this.domChanged.newSel.head : !yCe(e.changes, this.hasComposition) && !e.selectionSet && (i = e.state.selection.main.head)); + let s = i > -1 ? dCe(this.view, e.changes, i) : null; if (this.domChanged = null, this.hasComposition) { this.markedForComposition.clear(); let { from: u, to: h } = this.hasComposition; - n = new oc(u, h, e.changes.mapPos(u, -1), e.changes.mapPos(h, 1)).addToSet(n.slice()); + n = new tc(u, h, e.changes.mapPos(u, -1), e.changes.mapPos(h, 1)).addToSet(n.slice()); } this.hasComposition = s ? { from: s.range.fromB, to: s.range.toB } : null, (nr.ie || nr.chrome) && !s && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0); - let a = this.decorations, o = this.updateDeco(), l = oCe(a, o, e.changes); - return n = oc.extendWithRanges(n, l), !(this.flags & 7) && n.length == 0 ? !1 : (this.updateInner(n, e.startState.doc.length, s), e.transactions.length && (this.lastUpdate = Date.now()), !0); + let a = this.decorations, o = this.updateDeco(), l = mCe(a, o, e.changes); + return n = tc.extendWithRanges(n, l), !(this.flags & 7) && n.length == 0 ? !1 : (this.updateInner(n, e.startState.doc.length, s), e.transactions.length && (this.lastUpdate = Date.now()), !0); } updateInner(e, r, n) { this.view.viewState.mustMeasureContent = !0, this.updateChildren(e, r, n); @@ -5960,7 +5960,7 @@ class FV extends Fn { let s = []; if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length) for (let a of this.children) - a instanceof mf && a.widget instanceof UM && s.push(a.dom); + a instanceof uf && a.widget instanceof _M && s.push(a.dom); i.updateGaps(s); } updateChildren(e, r, n) { @@ -5971,14 +5971,14 @@ class FV extends Fn { break; let { fromA: l, toA: u, fromB: h, toB: f } = o, d, p, g, m; if (n && n.range.fromB < f && n.range.toB > h) { - let O = ax.build(this.view.state.doc, h, n.range.fromB, this.decorations, this.dynamicDecorationMap), S = ax.build(this.view.state.doc, n.range.toB, f, this.decorations, this.dynamicDecorationMap); + let O = jb.build(this.view.state.doc, h, n.range.fromB, this.decorations, this.dynamicDecorationMap), S = jb.build(this.view.state.doc, n.range.toB, f, this.decorations, this.dynamicDecorationMap); p = O.breakAtStart, g = O.openStart, m = S.openEnd; let C = this.compositionView(n); S.breakAtStart ? C.breakAfter = 1 : S.content.length && C.merge(C.length, C.length, S.content[0], !1, S.openStart, 0) && (C.breakAfter = S.content[0].breakAfter, S.content.shift()), O.content.length && C.merge(0, 0, O.content[O.content.length - 1], !0, 0, O.openEnd) && O.content.pop(), d = O.content.concat(C).concat(S.content); } else - ({ content: d, breakAtStart: p, openStart: g, openEnd: m } = ax.build(this.view.state.doc, h, f, this.decorations, this.dynamicDecorationMap)); + ({ content: d, breakAtStart: p, openStart: g, openEnd: m } = jb.build(this.view.state.doc, h, f, this.decorations, this.dynamicDecorationMap)); let { i: v, off: y } = s.findPos(u, 1), { i: b, off: w } = s.findPos(l, -1); - mse(this, b, w, v, y, d, p, g, m); + gse(this, b, w, v, y, d, p, g, m); } n && this.fixCompositionDOM(n); } @@ -5986,20 +5986,20 @@ class FV extends Fn { this.editContextFormatting = this.editContextFormatting.map(e.changes); for (let r of e.transactions) for (let n of r.effects) - n.is(Bse) && (this.editContextFormatting = n.value); + n.is($se) && (this.editContextFormatting = n.value); } compositionView(e) { - let r = new su(e.text.nodeValue); + let r = new tu(e.text.nodeValue); r.flags |= 8; for (let { deco: i } of e.marks) - r = new Cf(i, [r], r.length); - let n = new Yi(); + r = new wf(i, [r], r.length); + let n = new Wi(); return n.append(r, 0), n; } fixCompositionDOM(e) { let r = (s, a) => { a.flags |= 8 | (a.children.some((l) => l.flags & 7) ? 1 : 0), this.markedForComposition.add(a); - let o = Fn.get(s); + let o = Bn.get(s); o && o != a && (o.dom = null), a.setDOM(s); }, n = this.childPos(e.range.fromB, 1), i = this.children[n.i]; r(e.line, i); @@ -6008,27 +6008,27 @@ class FV extends Fn { } updateSelection(e = !1, r = !1) { (e || !this.view.observer.selectionRange.focusNode) && this.view.observer.readSelectionRange(); - let n = this.view.root.activeElement, i = n == this.dom, s = !i && !(this.view.state.facet(sf) || this.dom.tabIndex > -1) && W5(this.dom, this.view.observer.selectionRange) && !(n && this.dom.contains(n)); + let n = this.view.root.activeElement, i = n == this.dom, s = !i && !(this.view.state.facet(Kh) || this.dom.tabIndex > -1) && L5(this.dom, this.view.observer.selectionRange) && !(n && this.dom.contains(n)); if (!(i || r || s)) return; let a = this.forceSelection; this.forceSelection = !1; let o = this.view.state.selection.main, l = this.moveToLine(this.domAtPos(o.anchor)), u = o.empty ? l : this.moveToLine(this.domAtPos(o.head)); - if (nr.gecko && o.empty && !this.hasComposition && nCe(l)) { + if (nr.gecko && o.empty && !this.hasComposition && fCe(l)) { let f = document.createTextNode(""); - this.view.observer.ignore(() => l.node.insertBefore(f, l.node.childNodes[l.offset] || null)), l = u = new Pa(f, 0), a = !0; + this.view.observer.ignore(() => l.node.insertBefore(f, l.node.childNodes[l.offset] || null)), l = u = new Ma(f, 0), a = !0; } let h = this.view.observer.selectionRange; - (a || !h.focusNode || (!sx(l.node, l.offset, h.anchorNode, h.anchorOffset) || !sx(u.node, u.offset, h.focusNode, h.focusOffset)) && !this.suppressWidgetCursorChange(h, o)) && (this.view.observer.ignore(() => { - nr.android && nr.chrome && this.dom.contains(h.focusNode) && lCe(h.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 })); - let f = zx(this.view.root); + (a || !h.focusNode || (!Zb(l.node, l.offset, h.anchorNode, h.anchorOffset) || !Zb(u.node, u.offset, h.focusNode, h.focusOffset)) && !this.suppressWidgetCursorChange(h, o)) && (this.view.observer.ignore(() => { + nr.android && nr.chrome && this.dom.contains(h.focusNode) && vCe(h.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 })); + let f = Lx(this.view.root); if (f) if (o.empty) { if (nr.gecko) { - let d = sCe(l.node, l.offset); + let d = pCe(l.node, l.offset); if (d && d != 3) { - let p = (d == 1 ? dse : pse)(l.node, l.offset); - p && (l = new Pa(p.node, p.offset)); + let p = (d == 1 ? fse : dse)(l.node, l.offset); + p && (l = new Ma(p.node, p.offset)); } } f.collapse(l.node, l.offset), o.bidiLevel != null && f.caretBidiLevel !== void 0 && (f.caretBidiLevel = o.bidiLevel); @@ -6043,18 +6043,18 @@ class FV extends Fn { o.anchor > o.head && ([l, u] = [u, l]), d.setEnd(u.node, u.offset), d.setStart(l.node, l.offset), f.removeAllRanges(), f.addRange(d); } s && this.view.root.activeElement == this.dom && (this.dom.blur(), n && n.focus()); - }), this.view.observer.setSelectionRange(l, u)), this.impreciseAnchor = l.precise ? null : new Pa(h.anchorNode, h.anchorOffset), this.impreciseHead = u.precise ? null : new Pa(h.focusNode, h.focusOffset); + }), this.view.observer.setSelectionRange(l, u)), this.impreciseAnchor = l.precise ? null : new Ma(h.anchorNode, h.anchorOffset), this.impreciseHead = u.precise ? null : new Ma(h.focusNode, h.focusOffset); } suppressWidgetCursorChange(e, r) { - return this.hasComposition && r.empty && sx(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset) && this.posFromDOM(e.focusNode, e.focusOffset) == r.head; + return this.hasComposition && r.empty && Zb(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset) && this.posFromDOM(e.focusNode, e.focusOffset) == r.head; } enforceCursorAssoc() { if (this.hasComposition) return; - let { view: e } = this, r = e.state.selection.main, n = zx(e.root), { anchorNode: i, anchorOffset: s } = e.observer.selectionRange; + let { view: e } = this, r = e.state.selection.main, n = Lx(e.root), { anchorNode: i, anchorOffset: s } = e.observer.selectionRange; if (!n || !r.empty || !r.assoc || !n.modify) return; - let a = Yi.find(this, r.head); + let a = Wi.find(this, r.head); if (!a) return; let o = a.posAtStart; @@ -6073,18 +6073,18 @@ class FV extends Fn { if (e.node != r) return e; for (let i = e.offset; !n && i < r.childNodes.length; i++) { - let s = Fn.get(r.childNodes[i]); - s instanceof Yi && (n = s.domAtPos(0)); + let s = Bn.get(r.childNodes[i]); + s instanceof Wi && (n = s.domAtPos(0)); } for (let i = e.offset - 1; !n && i >= 0; i--) { - let s = Fn.get(r.childNodes[i]); - s instanceof Yi && (n = s.domAtPos(s.length)); + let s = Bn.get(r.childNodes[i]); + s instanceof Wi && (n = s.domAtPos(s.length)); } - return n ? new Pa(n.node, n.offset, !0) : e; + return n ? new Ma(n.node, n.offset, !0) : e; } nearest(e) { for (let r = e; r; ) { - let n = Fn.get(r); + let n = Bn.get(r); if (n && n.rootView == this) return n; r = r.parentNode; @@ -6101,7 +6101,7 @@ class FV extends Fn { let { i: r, off: n } = this.childCursor().findPos(e, -1); for (; r < this.children.length - 1; ) { let i = this.children[r]; - if (n < i.length || i instanceof Yi) + if (n < i.length || i instanceof Wi) break; r++, n = 0; } @@ -6113,9 +6113,9 @@ class FV extends Fn { let o = this.children[a], l = s - o.breakAfter, u = l - o.length; if (l < e) break; - if (u <= e && (u < e || o.covers(-1)) && (l > e || o.covers(1)) && (!n || o instanceof Yi && !(n instanceof Yi && r >= 0))) + if (u <= e && (u < e || o.covers(-1)) && (l > e || o.covers(1)) && (!n || o instanceof Wi && !(n instanceof Wi && r >= 0))) n = o, i = u; - else if (n && u == e && l == e && o instanceof mf && Math.abs(r) < 2) { + else if (n && u == e && l == e && o instanceof uf && Math.abs(r) < 2) { if (o.deco.startSide < 0) break; a && (n = null); @@ -6126,7 +6126,7 @@ class FV extends Fn { } coordsForChar(e) { let { i: r, off: n } = this.childPos(e, 1), i = this.children[r]; - if (!(i instanceof Yi)) + if (!(i instanceof Wi)) return null; for (; i.children.length; ) { let { i: o, off: l } = i.childPos(n, 1); @@ -6138,9 +6138,9 @@ class FV extends Fn { } n = l; } - if (!(i instanceof su)) + if (!(i instanceof tu)) return null; - let s = oa(i.text, n); + let s = ra(i.text, n); if (s == n) return null; let a = fg(i.dom, n, s).getClientRects(); @@ -6152,7 +6152,7 @@ class FV extends Fn { return null; } measureVisibleLineHeights(e) { - let r = [], { from: n, to: i } = e, s = this.view.contentDOM.clientWidth, a = s > Math.max(this.view.scrollDOM.clientWidth, this.minWidth) + 1, o = -1, l = this.view.textDirection == Xn.LTR; + let r = [], { from: n, to: i } = e, s = this.view.contentDOM.clientWidth, a = s > Math.max(this.view.scrollDOM.clientWidth, this.minWidth) + 1, o = -1, l = this.view.textDirection == Gn.LTR; for (let u = 0, h = 0; h < this.children.length; h++) { let f = this.children[h], d = u + f.length; if (d > i) @@ -6160,7 +6160,7 @@ class FV extends Fn { if (u >= n) { let p = f.dom.getBoundingClientRect(); if (r.push(p.height), a) { - let g = f.dom.lastChild, m = g ? qx(g) : []; + let g = f.dom.lastChild, m = g ? Mx(g) : []; if (m.length) { let v = m[m.length - 1], y = l ? v.right - p.left : p.right - v.left; y > o && (o = y, this.minWidth = s, this.minWidthFrom = u, this.minWidthTo = d); @@ -6173,11 +6173,11 @@ class FV extends Fn { } textDirectionAt(e) { let { i: r } = this.childPos(e, 1); - return getComputedStyle(this.children[r].dom).direction == "rtl" ? Xn.RTL : Xn.LTR; + return getComputedStyle(this.children[r].dom).direction == "rtl" ? Gn.RTL : Gn.LTR; } measureTextSize() { for (let s of this.children) - if (s instanceof Yi) { + if (s instanceof Wi) { let a = s.measureTextSize(); if (a) return a; @@ -6185,13 +6185,13 @@ class FV extends Fn { let e = document.createElement("div"), r, n, i; return e.className = "cm-line", e.style.width = "99999px", e.style.position = "absolute", e.textContent = "abc def ghi jkl mno pqr stu", this.view.observer.ignore(() => { this.dom.appendChild(e); - let s = qx(e.firstChild)[0]; + let s = Mx(e.firstChild)[0]; r = e.getBoundingClientRect().height, n = s ? s.width / 27 : 7, i = s ? s.height : r, e.remove(); }), { lineHeight: r, charWidth: n, textHeight: i }; } childCursor(e = this.length) { let r = this.children.length; - return r && (e -= this.children[--r].length), new gse(this.children, e, r); + return r && (e -= this.children[--r].length), new pse(this.children, e, r); } computeBlockGapDeco() { let e = [], r = this.view.viewState; @@ -6199,8 +6199,8 @@ class FV extends Fn { let s = i == r.viewports.length ? null : r.viewports[i], a = s ? s.from - 1 : this.length; if (a > n) { let o = (r.lineBlockAt(a).bottom - r.lineBlockAt(n).top) / this.view.scaleY; - e.push(Ht.replace({ - widget: new UM(o), + e.push(Gt.replace({ + widget: new _M(o), block: !0, inclusive: !0, isBlockGap: !0 @@ -6210,14 +6210,14 @@ class FV extends Fn { break; n = s.to + 1; } - return Ht.set(e); + return Gt.set(e); } updateDeco() { - let e = 1, r = this.view.state.facet(Ux).map((s) => (this.dynamicDecorationMap[e++] = typeof s == "function") ? s(this.view) : s), n = !1, i = this.view.state.facet(zse).map((s, a) => { + let e = 1, r = this.view.state.facet(Dx).map((s) => (this.dynamicDecorationMap[e++] = typeof s == "function") ? s(this.view) : s), n = !1, i = this.view.state.facet(Fse).map((s, a) => { let o = typeof s == "function"; return o && (n = !0), o ? s(this.view) : s; }); - for (i.length && (this.dynamicDecorationMap[e++] = n, r.push(jr.join(i))), this.decorations = [ + for (i.length && (this.dynamicDecorationMap[e++] = n, r.push(Zr.join(i))), this.decorations = [ this.editContextFormatting, ...r, this.computeBlockGapDeco(), @@ -6232,12 +6232,12 @@ class FV extends Fn { this.view.scrollDOM.scrollTop = u.top - e.yMargin, this.view.scrollDOM.scrollLeft = e.xMargin; return; } - for (let u of this.view.state.facet($se)) + for (let u of this.view.state.facet(Ise)) try { if (u(this.view, e.range, e)) return !0; } catch (h) { - Wo(this.view.state, h, "scroll handler"); + qo(this.view.state, h, "scroll handler"); } let { range: r } = e, n = this.coordsAt(r.head, r.empty ? r.assoc : r.head > r.anchor ? -1 : 1), i; if (!n) @@ -6248,30 +6248,30 @@ class FV extends Fn { right: Math.max(n.right, i.right), bottom: Math.max(n.bottom, i.bottom) }); - let s = R$(this.view), a = { + let s = k$(this.view), a = { left: n.left - s.left, top: n.top - s.top, right: n.right + s.right, bottom: n.bottom + s.bottom }, { offsetWidth: o, offsetHeight: l } = this.view.scrollDOM; - $Te(this.view.scrollDOM, a, r.head < r.anchor ? -1 : 1, e.x, e.y, Math.max(Math.min(e.xMargin, o), -o), Math.max(Math.min(e.yMargin, l), -l), this.view.textDirection == Xn.LTR); + YTe(this.view.scrollDOM, a, r.head < r.anchor ? -1 : 1, e.x, e.y, Math.max(Math.min(e.xMargin, o), -o), Math.max(Math.min(e.yMargin, l), -l), this.view.textDirection == Gn.LTR); } } -function nCe(t) { +function fCe(t) { return t.node.nodeType == 1 && t.node.firstChild && (t.offset == 0 || t.node.childNodes[t.offset - 1].contentEditable == "false") && (t.offset == t.node.childNodes.length || t.node.childNodes[t.offset].contentEditable == "false"); } -function Qse(t, e) { +function Use(t, e) { let r = t.observer.selectionRange; if (!r.focusNode) return null; - let n = dse(r.focusNode, r.focusOffset), i = pse(r.focusNode, r.focusOffset), s = n || i; + let n = fse(r.focusNode, r.focusOffset), i = dse(r.focusNode, r.focusOffset), s = n || i; if (i && n && i.node != n.node) { - let o = Fn.get(i.node); - if (!o || o instanceof su && o.text != i.node.nodeValue) + let o = Bn.get(i.node); + if (!o || o instanceof tu && o.text != i.node.nodeValue) s = i; else if (t.docView.lastCompositionAfterCursor) { - let l = Fn.get(n.node); - !l || l instanceof su && l.text != n.node.nodeValue || (s = i); + let l = Bn.get(n.node); + !l || l instanceof tu && l.text != n.node.nodeValue || (s = i); } } if (t.docView.lastCompositionAfterCursor = s != n, !s) @@ -6279,25 +6279,25 @@ function Qse(t, e) { let a = e - s.offset; return { from: a, to: a + s.node.nodeValue.length, node: s.node }; } -function iCe(t, e, r) { - let n = Qse(t, r); +function dCe(t, e, r) { + let n = Use(t, r); if (!n) return null; let { node: i, from: s, to: a } = n, o = i.nodeValue; if (/[\n\r]/.test(o) || t.state.doc.sliceString(n.from, n.to) != o) return null; - let l = e.invertedDesc, u = new oc(l.mapPos(s), l.mapPos(a), s, a), h = []; + let l = e.invertedDesc, u = new tc(l.mapPos(s), l.mapPos(a), s, a), h = []; for (let f = i.parentNode; ; f = f.parentNode) { - let d = Fn.get(f); - if (d instanceof Cf) + let d = Bn.get(f); + if (d instanceof wf) h.push({ node: f, deco: d.mark }); else { - if (d instanceof Yi || f.nodeName == "DIV" && f.parentNode == t.contentDOM) + if (d instanceof Wi || f.nodeName == "DIV" && f.parentNode == t.contentDOM) return { range: u, text: i, marks: h, line: f }; if (f != t.contentDOM) - h.push({ node: f, deco: new mk({ + h.push({ node: f, deco: new lk({ inclusive: !0, - attributes: WTe(f), + attributes: eCe(f), tagName: f.tagName.toLowerCase() }) }); else @@ -6305,105 +6305,105 @@ function iCe(t, e, r) { } } } -function sCe(t, e) { +function pCe(t, e) { return t.nodeType != 1 ? 0 : (e && t.childNodes[e - 1].contentEditable == "false" ? 1 : 0) | (e < t.childNodes.length && t.childNodes[e].contentEditable == "false" ? 2 : 0); } -let aCe = class { +let gCe = class { constructor() { this.changes = []; } compareRange(e, r) { - Y5(e, r, this.changes); + M5(e, r, this.changes); } comparePoint(e, r) { - Y5(e, r, this.changes); + M5(e, r, this.changes); } boundChange(e) { - Y5(e, e, this.changes); + M5(e, e, this.changes); } }; -function oCe(t, e, r) { - let n = new aCe(); - return jr.compare(t, e, r, n), n.changes; +function mCe(t, e, r) { + let n = new gCe(); + return Zr.compare(t, e, r, n), n.changes; } -function lCe(t, e) { +function vCe(t, e) { for (let r = t; r && r != e; r = r.assignedSlot || r.parentNode) if (r.nodeType == 1 && r.contentEditable == "false") return !0; return !1; } -function cCe(t, e) { +function yCe(t, e) { let r = !1; return e && t.iterChangedRanges((n, i) => { n < e.to && i > e.from && (r = !0); }), r; } -function uCe(t, e, r = 1) { +function bCe(t, e, r = 1) { let n = t.charCategorizer(e), i = t.doc.lineAt(e), s = e - i.from; if (i.length == 0) - return ft.cursor(e); + return ut.cursor(e); s == 0 ? r = 1 : s == i.length && (r = -1); let a = s, o = s; - r < 0 ? a = oa(i.text, s, !1) : o = oa(i.text, s); + r < 0 ? a = ra(i.text, s, !1) : o = ra(i.text, s); let l = n(i.text.slice(a, o)); for (; a > 0; ) { - let u = oa(i.text, a, !1); + let u = ra(i.text, a, !1); if (n(i.text.slice(u, a)) != l) break; a = u; } for (; o < i.length; ) { - let u = oa(i.text, o); + let u = ra(i.text, o); if (n(i.text.slice(o, u)) != l) break; o = u; } - return ft.range(a + i.from, o + i.from); + return ut.range(a + i.from, o + i.from); } -function hCe(t, e) { +function xCe(t, e) { return e.left > t ? e.left - t : Math.max(0, t - e.right); } -function fCe(t, e) { +function wCe(t, e) { return e.top > t ? e.top - t : Math.max(0, t - e.bottom); } -function Y7(t, e) { +function D7(t, e) { return t.top < e.bottom - 1 && t.bottom > e.top + 1; } -function zV(t, e) { +function QV(t, e) { return e < t.top ? { top: e, left: t.left, right: t.right, bottom: t.bottom } : t; } -function qV(t, e) { +function VV(t, e) { return e > t.bottom ? { top: t.top, left: t.left, right: t.right, bottom: e } : t; } -function GM(t, e, r) { +function DM(t, e, r) { let n, i, s, a, o = !1, l, u, h, f; for (let g = t.firstChild; g; g = g.nextSibling) { - let m = qx(g); + let m = Mx(g); for (let v = 0; v < m.length; v++) { let y = m[v]; - i && Y7(i, y) && (y = zV(qV(y, i.bottom), i.top)); - let b = hCe(e, y), w = fCe(r, y); + i && D7(i, y) && (y = QV(VV(y, i.bottom), i.top)); + let b = xCe(e, y), w = wCe(r, y); if (b == 0 && w == 0) - return g.nodeType == 3 ? UV(g, e, r) : GM(g, e, r); + return g.nodeType == 3 ? WV(g, e, r) : DM(g, e, r); if (!n || a > w || a == w && s > b) { n = g, i = y, s = b, a = w; let O = w ? r < y.top ? -1 : 1 : b ? e < y.left ? -1 : 1 : 0; o = !O || (O > 0 ? v < m.length - 1 : v > 0); } - b == 0 ? r > y.bottom && (!h || h.bottom < y.bottom) ? (l = g, h = y) : r < y.top && (!f || f.top > y.top) && (u = g, f = y) : h && Y7(h, y) ? h = qV(h, y.bottom) : f && Y7(f, y) && (f = zV(f, y.top)); + b == 0 ? r > y.bottom && (!h || h.bottom < y.bottom) ? (l = g, h = y) : r < y.top && (!f || f.top > y.top) && (u = g, f = y) : h && D7(h, y) ? h = VV(h, y.bottom) : f && D7(f, y) && (f = QV(f, y.top)); } } if (h && h.bottom >= r ? (n = l, i = h) : f && f.top <= r && (n = u, i = f), !n) return { node: t, offset: 0 }; let d = Math.max(i.left, Math.min(i.right, e)); if (n.nodeType == 3) - return UV(n, d, r); + return WV(n, d, r); if (o && n.contentEditable != "false") - return GM(n, d, r); + return DM(n, d, r); let p = Array.prototype.indexOf.call(t.childNodes, n) + (e >= (i.left + i.right) / 2 ? 1 : 0); return { node: t, offset: p }; } -function UV(t, e, r) { +function WV(t, e, r) { let n = t.nodeValue.length, i = -1, s = 1e9, a = 0; for (let o = 0; o < n; o++) { let l = fg(t, o, o + 1).getClientRects(); @@ -6423,14 +6423,14 @@ function UV(t, e, r) { } return { node: t, offset: i > -1 ? i : a > 0 ? t.nodeValue.length : 0 }; } -function Vse(t, e, r, n = -1) { +function Qse(t, e, r, n = -1) { var i, s; let a = t.contentDOM.getBoundingClientRect(), o = a.top + t.viewState.paddingTop, l, { docHeight: u } = t.viewState, { x: h, y: f } = e, d = f - o; if (d < 0) return 0; if (d > u) return t.state.doc.length; - for (let O = t.viewState.heightOracle.textHeight / 2, S = !1; l = t.elementAtHeight(d), l.type != uo.Text; ) + for (let O = t.viewState.heightOracle.textHeight / 2, S = !1; l = t.elementAtHeight(d), l.type != lo.Text; ) for (; d = n > 0 ? l.bottom + O : l.top - O, !(d >= 0 && d <= u); ) { if (S) return r ? null : 0; @@ -6439,9 +6439,9 @@ function Vse(t, e, r, n = -1) { f = o + d; let p = l.from; if (p < t.viewport.from) - return t.viewport.from == 0 ? 0 : r ? null : QV(t, a, l, h, f); + return t.viewport.from == 0 ? 0 : r ? null : YV(t, a, l, h, f); if (p > t.viewport.to) - return t.viewport.to == t.state.doc.length ? t.state.doc.length : r ? null : QV(t, a, l, h, f); + return t.viewport.to == t.state.doc.length ? t.state.doc.length : r ? null : YV(t, a, l, h, f); let g = t.dom.ownerDocument, m = t.root.elementFromPoint ? t.root : g, v = m.elementFromPoint(h, f); v && !t.contentDOM.contains(v) && (v = null), v || (h = Math.max(a.left + 1, Math.min(a.right - 1, h)), v = m.elementFromPoint(h, f), v && !t.contentDOM.contains(v) && (v = null)); let y, b = -1; @@ -6451,15 +6451,15 @@ function Vse(t, e, r, n = -1) { O && ({ offsetNode: y, offset: b } = O); } else if (g.caretRangeFromPoint) { let O = g.caretRangeFromPoint(h, f); - O && ({ startContainer: y, startOffset: b } = O, (!t.contentDOM.contains(y) || nr.safari && dCe(y, b, h) || nr.chrome && pCe(y, b, h)) && (y = void 0)); + O && ({ startContainer: y, startOffset: b } = O, (!t.contentDOM.contains(y) || nr.safari && OCe(y, b, h) || nr.chrome && kCe(y, b, h)) && (y = void 0)); } - y && (b = Math.min(dh(y), b)); + y && (b = Math.min(lh(y), b)); } if (!y || !t.docView.dom.contains(y)) { - let O = Yi.find(t.docView, p); + let O = Wi.find(t.docView, p); if (!O) return d > l.top + l.height / 2 ? l.to : l.from; - ({ node: y, offset: b } = GM(O.dom, h, f)); + ({ node: y, offset: b } = DM(O.dom, h, f)); } let w = t.docView.nearest(y); if (!w) @@ -6470,16 +6470,16 @@ function Vse(t, e, r, n = -1) { } else return w.localPosFromDOM(y, b) + w.posAtStart; } -function QV(t, e, r, n, i) { +function YV(t, e, r, n, i) { let s = Math.round((n - e.left) * t.defaultCharacterWidth); if (t.lineWrapping && r.height > t.defaultLineHeight * 1.5) { let o = t.viewState.heightOracle.textHeight, l = Math.floor((i - r.top - (t.defaultLineHeight - o) * 0.5) / o); s += l * t.viewState.heightOracle.lineLength; } let a = t.state.sliceDoc(r.from, r.to); - return r.from + DM(a, s, t.state.tabSize); + return r.from + bM(a, s, t.state.tabSize); } -function dCe(t, e, r) { +function OCe(t, e, r) { let n; if (t.nodeType != 3 || e != (n = t.nodeValue.length)) return !1; @@ -6488,7 +6488,7 @@ function dCe(t, e, r) { return !1; return fg(t, n - 1, n).getBoundingClientRect().left > r; } -function pCe(t, e, r) { +function kCe(t, e, r) { if (e != 0) return !1; for (let i = t; ; ) { @@ -6502,31 +6502,31 @@ function pCe(t, e, r) { let n = t.nodeType == 1 ? t.getBoundingClientRect() : fg(t, 0, Math.max(t.nodeValue.length, 1)).getBoundingClientRect(); return r - n.left > 5; } -function HM(t, e) { +function PM(t, e) { let r = t.lineBlockAt(e); if (Array.isArray(r.type)) { for (let n of r.type) - if (n.to > e || n.to == e && (n.to == r.to || n.type == uo.Text)) + if (n.to > e || n.to == e && (n.to == r.to || n.type == lo.Text)) return n; } return r; } -function gCe(t, e, r, n) { - let i = HM(t, e.head), s = !n || i.type != uo.Text || !(t.lineWrapping || i.widgetLineBreaks) ? null : t.coordsAtPos(e.assoc < 0 && e.head > i.from ? e.head - 1 : e.head); +function SCe(t, e, r, n) { + let i = PM(t, e.head), s = !n || i.type != lo.Text || !(t.lineWrapping || i.widgetLineBreaks) ? null : t.coordsAtPos(e.assoc < 0 && e.head > i.from ? e.head - 1 : e.head); if (s) { let a = t.dom.getBoundingClientRect(), o = t.textDirectionAt(i.from), l = t.posAtCoords({ - x: r == (o == Xn.LTR) ? a.right - 1 : a.left + 1, + x: r == (o == Gn.LTR) ? a.right - 1 : a.left + 1, y: (s.top + s.bottom) / 2 }); if (l != null) - return ft.cursor(l, r ? -1 : 1); + return ut.cursor(l, r ? -1 : 1); } - return ft.cursor(r ? i.to : i.from, r ? -1 : 1); + return ut.cursor(r ? i.to : i.from, r ? -1 : 1); } -function VV(t, e, r, n) { +function GV(t, e, r, n) { let i = t.state.doc.lineAt(e.head), s = t.bidiSpans(i), a = t.textDirectionAt(i.from); for (let o = e, l = null; ; ) { - let u = eCe(i, s, a, o, r), h = _se; + let u = cCe(i, s, a, o, r), h = Ese; if (!u) { if (i.number == (r ? t.state.doc.lines : 1)) return o; @@ -6544,17 +6544,17 @@ function VV(t, e, r, n) { o = u; } } -function mCe(t, e, r) { +function TCe(t, e, r) { let n = t.state.charCategorizer(e), i = n(r); return (s) => { let a = n(s); - return i == li.Space && (i = a), i == a; + return i == ai.Space && (i = a), i == a; }; } -function vCe(t, e, r, n) { +function CCe(t, e, r, n) { let i = e.head, s = r ? 1 : -1; if (i == (r ? t.state.doc.length : 0)) - return ft.cursor(i, e.assoc); + return ut.cursor(i, e.assoc); let a = e.goalColumn, o, l = t.contentDOM.getBoundingClientRect(), u = t.coordsAtPos(i, e.assoc || -1), h = t.documentTop; if (u) a == null && (a = u.left - l.left), o = s < 0 ? u.top : u.bottom; @@ -6564,14 +6564,14 @@ function vCe(t, e, r, n) { } let f = l.left + a, d = n != null ? n : t.viewState.heightOracle.textHeight >> 1; for (let p = 0; ; p += 10) { - let g = o + (d + p) * s, m = Vse(t, { x: f, y: g }, !1, s); + let g = o + (d + p) * s, m = Qse(t, { x: f, y: g }, !1, s); if (g < l.top || g > l.bottom || (s < 0 ? m < i : m > i)) { let v = t.docView.coordsForChar(m), y = !v || g < v.top ? -1 : 1; - return ft.cursor(m, y, void 0, a); + return ut.cursor(m, y, void 0, a); } } } -function G5(t, e, r) { +function D5(t, e, r) { for (; ; ) { let n = 0; for (let i of t) @@ -6585,12 +6585,12 @@ function G5(t, e, r) { return e; } } -function G7(t, e, r) { - let n = G5(t.state.facet(A$).map((i) => i(t)), r.from, e.head > r.from ? -1 : 1); - return n == r.from ? r : ft.cursor(n, n < r.from ? 1 : -1); +function P7(t, e, r) { + let n = D5(t.state.facet(O$).map((i) => i(t)), r.from, e.head > r.from ? -1 : 1); + return n == r.from ? r : ut.cursor(n, n < r.from ? 1 : -1); } -const Eb = "\uFFFF"; -class yCe { +const vb = "\uFFFF"; +class ECe { constructor(e, r) { this.points = e, this.text = "", this.lineSeparator = r.facet(qr.lineSeparator); } @@ -6598,7 +6598,7 @@ class yCe { this.text += e; } lineBreak() { - this.text += Eb; + this.text += vb; } readRange(e, r) { if (!e) @@ -6611,8 +6611,8 @@ class yCe { let a = i.nextSibling; if (a == r) break; - let o = Fn.get(i), l = Fn.get(a); - (o && l ? o.breakAfter : (o ? o.breakAfter : lT(i)) || lT(a) && (i.nodeName != "BR" || i.cmIgnore) && this.text.length > s) && this.lineBreak(), i = a; + let o = Bn.get(i), l = Bn.get(a); + (o && l ? o.breakAfter : (o ? o.breakAfter : G3(i)) || G3(a) && (i.nodeName != "BR" || i.cmIgnore) && this.text.length > s) && this.lineBreak(), i = a; } return this.findPointBefore(n, r), this; } @@ -6633,7 +6633,7 @@ class yCe { readNode(e) { if (e.cmIgnore) return; - let r = Fn.get(e), n = r && r.overrideDOMText; + let r = Bn.get(e), n = r && r.overrideDOMText; if (n != null) { this.findPointInside(e, n.length); for (let i = n.iter(); !i.next().done; ) @@ -6647,82 +6647,82 @@ class yCe { } findPointInside(e, r) { for (let n of this.points) - (e.nodeType == 3 ? n.node == e : e.contains(n.node)) && (n.pos = this.text.length + (bCe(e, n.node, n.offset) ? r : 0)); + (e.nodeType == 3 ? n.node == e : e.contains(n.node)) && (n.pos = this.text.length + (_Ce(e, n.node, n.offset) ? r : 0)); } } -function bCe(t, e, r) { +function _Ce(t, e, r) { for (; ; ) { - if (!e || r < dh(e)) + if (!e || r < lh(e)) return !1; if (e == t) return !0; r = hg(e) + 1, e = e.parentNode; } } -class WV { +class HV { constructor(e, r) { this.node = e, this.offset = r, this.pos = -1; } } -class xCe { +class ACe { constructor(e, r, n, i) { this.typeOver = i, this.bounds = null, this.text = "", this.domChanged = r > -1; let { impreciseHead: s, impreciseAnchor: a } = e.docView; if (e.state.readOnly && r > -1) this.newSel = null; else if (r > -1 && (this.bounds = e.docView.domBoundsAround(r, n, 0))) { - let o = s || a ? [] : kCe(e), l = new yCe(o, e.state); - l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = SCe(o, this.bounds.from); + let o = s || a ? [] : MCe(e), l = new ECe(o, e.state); + l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = DCe(o, this.bounds.from); } else { - let o = e.observer.selectionRange, l = s && s.node == o.focusNode && s.offset == o.focusOffset || !IM(e.contentDOM, o.focusNode) ? e.state.selection.main.head : e.docView.posFromDOM(o.focusNode, o.focusOffset), u = a && a.node == o.anchorNode && a.offset == o.anchorOffset || !IM(e.contentDOM, o.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(o.anchorNode, o.anchorOffset), h = e.viewport; + let o = e.observer.selectionRange, l = s && s.node == o.focusNode && s.offset == o.focusOffset || !OM(e.contentDOM, o.focusNode) ? e.state.selection.main.head : e.docView.posFromDOM(o.focusNode, o.focusOffset), u = a && a.node == o.anchorNode && a.offset == o.anchorOffset || !OM(e.contentDOM, o.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(o.anchorNode, o.anchorOffset), h = e.viewport; if ((nr.ios || nr.chrome) && e.state.selection.main.empty && l != u && (h.from > 0 || h.to < e.state.doc.length)) { let f = Math.min(l, u), d = Math.max(l, u), p = h.from - f, g = h.to - d; (p == 0 || p == 1 || f == 0) && (g == 0 || g == -1 || d == e.state.doc.length) && (l = 0, u = e.state.doc.length); } - this.newSel = ft.single(u, l); + this.newSel = ut.single(u, l); } } } -function Wse(t, e) { +function Vse(t, e) { let r, { newSel: n } = e, i = t.state.selection.main, s = t.inputState.lastKeyTime > Date.now() - 100 ? t.inputState.lastKeyCode : -1; if (e.bounds) { let { from: a, to: o } = e.bounds, l = i.from, u = null; (s === 8 || nr.android && e.text.length < o - a) && (l = i.to, u = "end"); - let h = OCe(t.state.doc.sliceString(a, o, Eb), e.text, l - a, u); - h && (nr.chrome && s == 13 && h.toB == h.from + 2 && e.text.slice(h.from, h.toB) == Eb + Eb && h.toB--, r = { + let h = LCe(t.state.doc.sliceString(a, o, vb), e.text, l - a, u); + h && (nr.chrome && s == 13 && h.toB == h.from + 2 && e.text.slice(h.from, h.toB) == vb + vb && h.toB--, r = { from: a + h.from, to: a + h.toA, - insert: nn.of(e.text.slice(h.from, h.toB).split(Eb)) + insert: nn.of(e.text.slice(h.from, h.toB).split(vb)) }); } else - n && (!t.hasFocus && t.state.facet(sf) || n.main.eq(i)) && (n = null); + n && (!t.hasFocus && t.state.facet(Kh) || n.main.eq(i)) && (n = null); if (!r && !n) return !1; - if (!r && e.typeOver && !i.empty && n && n.main.empty ? r = { from: i.from, to: i.to, insert: t.state.doc.slice(i.from, i.to) } : (nr.mac || nr.android) && r && r.from == r.to && r.from == i.head - 1 && /^\. ?$/.test(r.insert.toString()) && t.contentDOM.getAttribute("autocorrect") == "off" ? (n && r.insert.length == 2 && (n = ft.single(n.main.anchor - 1, n.main.head - 1)), r = { from: r.from, to: r.to, insert: nn.of([r.insert.toString().replace(".", " ")]) }) : r && r.from >= i.from && r.to <= i.to && (r.from != i.from || r.to != i.to) && i.to - i.from - (r.to - r.from) <= 4 ? r = { + if (!r && e.typeOver && !i.empty && n && n.main.empty ? r = { from: i.from, to: i.to, insert: t.state.doc.slice(i.from, i.to) } : (nr.mac || nr.android) && r && r.from == r.to && r.from == i.head - 1 && /^\. ?$/.test(r.insert.toString()) && t.contentDOM.getAttribute("autocorrect") == "off" ? (n && r.insert.length == 2 && (n = ut.single(n.main.anchor - 1, n.main.head - 1)), r = { from: r.from, to: r.to, insert: nn.of([r.insert.toString().replace(".", " ")]) }) : r && r.from >= i.from && r.to <= i.to && (r.from != i.from || r.to != i.to) && i.to - i.from - (r.to - r.from) <= 4 ? r = { from: i.from, to: i.to, insert: t.state.doc.slice(i.from, r.from).append(r.insert).append(t.state.doc.slice(r.to, i.to)) } : nr.chrome && r && r.from == r.to && r.from == i.head && r.insert.toString() == ` - ` && t.lineWrapping && (n && (n = ft.single(n.main.anchor - 1, n.main.head - 1)), r = { from: i.from, to: i.to, insert: nn.of([" "]) }), r) - return L$(t, r, n, s); + ` && t.lineWrapping && (n && (n = ut.single(n.main.anchor - 1, n.main.head - 1)), r = { from: i.from, to: i.to, insert: nn.of([" "]) }), r) + return S$(t, r, n, s); if (n && !n.main.eq(i)) { let a = !1, o = "select"; return t.inputState.lastSelectionTime > Date.now() - 50 && (t.inputState.lastSelectionOrigin == "select" && (a = !0), o = t.inputState.lastSelectionOrigin), t.dispatch({ selection: n, scrollIntoView: a, userEvent: o }), !0; } else return !1; } -function L$(t, e, r, n = -1) { +function S$(t, e, r, n = -1) { if (nr.ios && t.inputState.flushIOSKey(e)) return !0; let i = t.state.selection.main; - if (nr.android && (e.to == i.to && (e.from == i.from || e.from == i.from - 1 && t.state.sliceDoc(e.from, i.from) == " ") && e.insert.length == 1 && e.insert.lines == 2 && R1(t.contentDOM, "Enter", 13) || (e.from == i.from - 1 && e.to == i.to && e.insert.length == 0 || n == 8 && e.insert.length < e.to - e.from && e.to > i.head) && R1(t.contentDOM, "Backspace", 8) || e.from == i.from && e.to == i.to + 1 && e.insert.length == 0 && R1(t.contentDOM, "Delete", 46))) + if (nr.android && (e.to == i.to && (e.from == i.from || e.from == i.from - 1 && t.state.sliceDoc(e.from, i.from) == " ") && e.insert.length == 1 && e.insert.lines == 2 && T1(t.contentDOM, "Enter", 13) || (e.from == i.from - 1 && e.to == i.to && e.insert.length == 0 || n == 8 && e.insert.length < e.to - e.from && e.to > i.head) && T1(t.contentDOM, "Backspace", 8) || e.from == i.from && e.to == i.to + 1 && e.insert.length == 0 && T1(t.contentDOM, "Delete", 46))) return !0; let s = e.insert.toString(); t.inputState.composing >= 0 && t.inputState.composing++; - let a, o = () => a || (a = wCe(t, e, r)); - return t.state.facet(Dse).some((l) => l(t, e.from, e.to, s, o)) || t.dispatch(o()), !0; + let a, o = () => a || (a = RCe(t, e, r)); + return t.state.facet(Mse).some((l) => l(t, e.from, e.to, s, o)) || t.dispatch(o()), !0; } -function wCe(t, e, r) { +function RCe(t, e, r) { let n, i = t.state, s = i.selection.main; if (e.from >= s.from && e.to <= s.to && e.to - e.from >= (s.to - s.from) / 3 && (!r || r.main.empty && r.main.from == e.from + e.insert.length) && t.inputState.composing < 0) { let o = s.from < e.from ? i.sliceDoc(s.from, e.from) : "", l = s.to > e.to ? i.sliceDoc(e.to, s.to) : ""; @@ -6730,7 +6730,7 @@ function wCe(t, e, r) { } else { let o = i.changes(e), l = r && r.main.to <= o.newLength ? r.main : void 0; if (i.selection.ranges.length > 1 && t.inputState.composing >= 0 && e.to <= s.to && e.to >= s.to - 10) { - let u = t.state.sliceDoc(e.from, e.to), h, f = r && Qse(t, r.main.head); + let u = t.state.sliceDoc(e.from, e.to), h, f = r && Use(t, r.main.head); if (f) { let g = e.insert.length - (e.to - e.from); h = { from: f.from, to: f.to - g }; @@ -6746,7 +6746,7 @@ function wCe(t, e, r) { let y = i.changes({ from: v, to: m, insert: e.insert }), b = g.to - s.to; return { changes: y, - range: l ? ft.range(Math.max(0, l.anchor + b), Math.max(0, l.head + b)) : g.map(y) + range: l ? ut.range(Math.max(0, l.anchor + b), Math.max(0, l.head + b)) : g.map(y) }; }); } else @@ -6758,7 +6758,7 @@ function wCe(t, e, r) { let a = "input.type"; return (t.composing || t.inputState.compositionPendingChange && t.inputState.compositionEndedAt > Date.now() - 50) && (t.inputState.compositionPendingChange = !1, a += ".compose", t.inputState.compositionFirstChange && (a += ".start", t.inputState.compositionFirstChange = !1)), i.update(n, { userEvent: a, scrollIntoView: !0 }); } -function OCe(t, e, r, n) { +function LCe(t, e, r, n) { let i = Math.min(t.length, e.length), s = 0; for (; s < i && t.charCodeAt(s) == e.charCodeAt(s); ) s++; @@ -6780,28 +6780,28 @@ function OCe(t, e, r, n) { } return { from: s, toA: a, toB: o }; } -function kCe(t) { +function MCe(t) { let e = []; if (t.root.activeElement != t.contentDOM) return e; let { anchorNode: r, anchorOffset: n, focusNode: i, focusOffset: s } = t.observer.selectionRange; - return r && (e.push(new WV(r, n)), (i != r || s != n) && e.push(new WV(i, s))), e; + return r && (e.push(new HV(r, n)), (i != r || s != n) && e.push(new HV(i, s))), e; } -function SCe(t, e) { +function DCe(t, e) { if (t.length == 0) return null; let r = t[0].pos, n = t.length == 2 ? t[1].pos : r; - return r > -1 && n > -1 ? ft.single(r + e, n + e) : null; + return r > -1 && n > -1 ? ut.single(r + e, n + e) : null; } -class TCe { +class PCe { setSelectionOrigin(e) { this.lastSelectionOrigin = e, this.lastSelectionTime = Date.now(); } constructor(e) { - this.view = e, this.lastKeyCode = 0, this.lastKeyTime = 0, this.lastTouchTime = 0, this.lastFocusTime = 0, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.pendingIOSKey = void 0, this.tabFocusMode = -1, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastContextMenu = 0, this.scrollHandlers = [], this.handlers = /* @__PURE__ */ Object.create(null), this.composing = -1, this.compositionFirstChange = null, this.compositionEndedAt = 0, this.compositionPendingKey = !1, this.compositionPendingChange = !1, this.mouseSelection = null, this.draggedContent = null, this.handleEvent = this.handleEvent.bind(this), this.notifiedFocused = e.hasFocus, nr.safari && e.contentDOM.addEventListener("input", () => null), nr.gecko && qCe(e.contentDOM.ownerDocument); + this.view = e, this.lastKeyCode = 0, this.lastKeyTime = 0, this.lastTouchTime = 0, this.lastFocusTime = 0, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.pendingIOSKey = void 0, this.tabFocusMode = -1, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastContextMenu = 0, this.scrollHandlers = [], this.handlers = /* @__PURE__ */ Object.create(null), this.composing = -1, this.compositionFirstChange = null, this.compositionEndedAt = 0, this.compositionPendingKey = !1, this.compositionPendingChange = !1, this.mouseSelection = null, this.draggedContent = null, this.handleEvent = this.handleEvent.bind(this), this.notifiedFocused = e.hasFocus, nr.safari && e.contentDOM.addEventListener("input", () => null), nr.gecko && ZCe(e.contentDOM.ownerDocument); } handleEvent(e) { - !DCe(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || this.runHandlers(e.type, e); + !UCe(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || this.runHandlers(e.type, e); } runHandlers(e, r) { let n = this.handlers[e]; @@ -6819,7 +6819,7 @@ class TCe { } } ensureHandlers(e) { - let r = CCe(e), n = this.handlers, i = this.view.contentDOM; + let r = NCe(e), n = this.handlers, i = this.view.contentDOM; for (let s in r) if (s != "scroll") { let a = !r[s].handlers.length, o = n[s]; @@ -6832,14 +6832,14 @@ class TCe { keydown(e) { if (this.lastKeyCode = e.keyCode, this.lastKeyTime = Date.now(), e.keyCode == 9 && this.tabFocusMode > -1 && (!this.tabFocusMode || Date.now() <= this.tabFocusMode)) return !0; - if (this.tabFocusMode > 0 && e.keyCode != 27 && Gse.indexOf(e.keyCode) < 0 && (this.tabFocusMode = -1), nr.android && nr.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8)) + if (this.tabFocusMode > 0 && e.keyCode != 27 && Yse.indexOf(e.keyCode) < 0 && (this.tabFocusMode = -1), nr.android && nr.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8)) return this.view.observer.delayAndroidKey(e.key, e.keyCode), !0; let r; - return nr.ios && !e.synthetic && !e.altKey && !e.metaKey && ((r = Yse.find((n) => n.keyCode == e.keyCode)) && !e.ctrlKey || ECe.indexOf(e.key) > -1 && e.ctrlKey && !e.shiftKey) ? (this.pendingIOSKey = r || e, setTimeout(() => this.flushIOSKey(), 250), !0) : (e.keyCode != 229 && this.view.observer.forceFlush(), !1); + return nr.ios && !e.synthetic && !e.altKey && !e.metaKey && ((r = Wse.find((n) => n.keyCode == e.keyCode)) && !e.ctrlKey || ICe.indexOf(e.key) > -1 && e.ctrlKey && !e.shiftKey) ? (this.pendingIOSKey = r || e, setTimeout(() => this.flushIOSKey(), 250), !0) : (e.keyCode != 229 && this.view.observer.forceFlush(), !1); } flushIOSKey(e) { let r = this.pendingIOSKey; - return !r || r.key == "Enter" && e && e.from < e.to && /^\S+$/.test(e.insert.toString()) ? !1 : (this.pendingIOSKey = void 0, R1(this.view.contentDOM, r.key, r.keyCode, r instanceof KeyboardEvent ? r : void 0)); + return !r || r.key == "Enter" && e && e.from < e.to && /^\S+$/.test(e.insert.toString()) ? !1 : (this.pendingIOSKey = void 0, T1(this.view.contentDOM, r.key, r.keyCode, r instanceof KeyboardEvent ? r : void 0)); } ignoreDuringComposition(e) { return /^key/.test(e.type) ? this.composing > 0 ? !0 : nr.safari && !nr.ios && this.compositionPendingKey && Date.now() - this.compositionEndedAt < 100 ? (this.compositionPendingKey = !1, !0) : !1 : !1; @@ -6854,16 +6854,16 @@ class TCe { this.mouseSelection && this.mouseSelection.destroy(); } } -function YV(t, e) { +function XV(t, e) { return (r, n) => { try { return e.call(t, n, r); } catch (i) { - Wo(r.state, i); + qo(r.state, i); } }; } -function CCe(t) { +function NCe(t) { let e = /* @__PURE__ */ Object.create(null); function r(n) { return e[n] || (e[n] = { observers: [], handlers: [] }); @@ -6873,37 +6873,37 @@ function CCe(t) { if (i && i.domEventHandlers) for (let s in i.domEventHandlers) { let a = i.domEventHandlers[s]; - a && r(s).handlers.push(YV(n.value, a)); + a && r(s).handlers.push(XV(n.value, a)); } if (i && i.domEventObservers) for (let s in i.domEventObservers) { let a = i.domEventObservers[s]; - a && r(s).observers.push(YV(n.value, a)); + a && r(s).observers.push(XV(n.value, a)); } } - for (let n in au) - r(n).handlers.push(au[n]); - for (let n in uc) - r(n).observers.push(uc[n]); + for (let n in ru) + r(n).handlers.push(ru[n]); + for (let n in ic) + r(n).observers.push(ic[n]); return e; } -const Yse = [ +const Wse = [ { key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" }, { key: "Enter", keyCode: 13, inputType: "insertParagraph" }, { key: "Enter", keyCode: 13, inputType: "insertLineBreak" }, { key: "Delete", keyCode: 46, inputType: "deleteContentForward" } -], ECe = "dthko", Gse = [16, 17, 18, 20, 91, 92, 224, 225], H4 = 6; -function X4(t) { +], ICe = "dthko", Yse = [16, 17, 18, 20, 91, 92, 224, 225], I4 = 6; +function $4(t) { return Math.max(0, t) * 0.7 + 8; } -function _Ce(t, e) { +function $Ce(t, e) { return Math.max(Math.abs(t.clientX - e.clientX), Math.abs(t.clientY - e.clientY)); } -class ACe { +class BCe { constructor(e, r, n, i) { - this.view = e, this.startEvent = r, this.style = n, this.mustSelect = i, this.scrollSpeed = { x: 0, y: 0 }, this.scrolling = -1, this.lastEvent = r, this.scrollParents = BTe(e.contentDOM), this.atoms = e.state.facet(A$).map((a) => a(e)); + this.view = e, this.startEvent = r, this.style = n, this.mustSelect = i, this.scrollSpeed = { x: 0, y: 0 }, this.scrolling = -1, this.lastEvent = r, this.scrollParents = GTe(e.contentDOM), this.atoms = e.state.facet(O$).map((a) => a(e)); let s = e.contentDOM.ownerDocument; - s.addEventListener("mousemove", this.move = this.move.bind(this)), s.addEventListener("mouseup", this.up = this.up.bind(this)), this.extend = r.shiftKey, this.multiple = e.state.facet(qr.allowMultipleSelections) && RCe(e, r), this.dragging = MCe(e, r) && jse(r) == 1 ? null : !1; + s.addEventListener("mousemove", this.move = this.move.bind(this)), s.addEventListener("mouseup", this.up = this.up.bind(this)), this.extend = r.shiftKey, this.multiple = e.state.facet(qr.allowMultipleSelections) && FCe(e, r), this.dragging = qCe(e, r) && Xse(r) == 1 ? null : !1; } start(e) { this.dragging === !1 && this.select(e); @@ -6911,13 +6911,13 @@ class ACe { move(e) { if (e.buttons == 0) return this.destroy(); - if (this.dragging || this.dragging == null && _Ce(this.startEvent, e) < 10) + if (this.dragging || this.dragging == null && $Ce(this.startEvent, e) < 10) return; this.select(this.lastEvent = e); let r = 0, n = 0, i = 0, s = 0, a = this.view.win.innerWidth, o = this.view.win.innerHeight; this.scrollParents.x && ({ left: i, right: a } = this.scrollParents.x.getBoundingClientRect()), this.scrollParents.y && ({ top: s, bottom: o } = this.scrollParents.y.getBoundingClientRect()); - let l = R$(this.view); - e.clientX - l.left <= i + H4 ? r = -X4(i - e.clientX) : e.clientX + l.right >= a - H4 && (r = X4(e.clientX - a)), e.clientY - l.top <= s + H4 ? n = -X4(s - e.clientY) : e.clientY + l.bottom >= o - H4 && (n = X4(e.clientY - o)), this.setScrollSpeed(r, n); + let l = k$(this.view); + e.clientX - l.left <= i + I4 ? r = -$4(i - e.clientX) : e.clientX + l.right >= a - I4 && (r = $4(e.clientX - a)), e.clientY - l.top <= s + I4 ? n = -$4(s - e.clientY) : e.clientY + l.bottom >= o - I4 && (n = $4(e.clientY - o)), this.setScrollSpeed(r, n); } up(e) { this.dragging == null && this.select(this.lastEvent), this.dragging || e.preventDefault(), this.destroy(); @@ -6939,15 +6939,15 @@ class ACe { for (let n = 0; n < e.ranges.length; n++) { let i = e.ranges[n], s = null; if (i.empty) { - let a = G5(this.atoms, i.from, 0); - a != i.from && (s = ft.cursor(a, -1)); + let a = D5(this.atoms, i.from, 0); + a != i.from && (s = ut.cursor(a, -1)); } else { - let a = G5(this.atoms, i.from, -1), o = G5(this.atoms, i.to, 1); - (a != i.from || o != i.to) && (s = ft.range(i.from == i.anchor ? a : o, i.from == i.head ? a : o)); + let a = D5(this.atoms, i.from, -1), o = D5(this.atoms, i.to, 1); + (a != i.from || o != i.to) && (s = ut.range(i.from == i.anchor ? a : o, i.from == i.head ? a : o)); } s && (r || (r = e.ranges.slice()), r[n] = s); } - return r ? ft.create(r, e.mainIndex) : e; + return r ? ut.create(r, e.mainIndex) : e; } select(e) { let { view: r } = this, n = this.skipAtoms(this.style.get(e, this.extend, this.multiple)); @@ -6960,19 +6960,19 @@ class ACe { e.transactions.some((r) => r.isUserEvent("input.type")) ? this.destroy() : this.style.update(e) && setTimeout(() => this.select(this.lastEvent), 20); } } -function RCe(t, e) { - let r = t.state.facet(Ase); +function FCe(t, e) { + let r = t.state.facet(_se); return r.length ? r[0](e) : nr.mac ? e.metaKey : e.ctrlKey; } -function LCe(t, e) { - let r = t.state.facet(Rse); +function zCe(t, e) { + let r = t.state.facet(Ase); return r.length ? r[0](e) : nr.mac ? !e.altKey : !e.ctrlKey; } -function MCe(t, e) { +function qCe(t, e) { let { main: r } = t.state.selection; if (r.empty) return !1; - let n = zx(t.root); + let n = Lx(t.root); if (!n || n.rangeCount == 0) return !0; let i = n.getRangeAt(0).getClientRects(); @@ -6983,35 +6983,35 @@ function MCe(t, e) { } return !1; } -function DCe(t, e) { +function UCe(t, e) { if (!e.bubbles) return !0; if (e.defaultPrevented) return !1; for (let r = e.target, n; r != t.contentDOM; r = r.parentNode) - if (!r || r.nodeType == 11 || (n = Fn.get(r)) && n.ignoreEvent(e)) + if (!r || r.nodeType == 11 || (n = Bn.get(r)) && n.ignoreEvent(e)) return !1; return !0; } -const au = /* @__PURE__ */ Object.create(null), uc = /* @__PURE__ */ Object.create(null), Hse = nr.ie && nr.ie_version < 15 || nr.ios && nr.webkit_version < 604; -function PCe(t) { +const ru = /* @__PURE__ */ Object.create(null), ic = /* @__PURE__ */ Object.create(null), Gse = nr.ie && nr.ie_version < 15 || nr.ios && nr.webkit_version < 604; +function QCe(t) { let e = t.dom.parentNode; if (!e) return; let r = e.appendChild(document.createElement("textarea")); r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.focus(), setTimeout(() => { - t.focus(), r.remove(), Xse(t, r.value); + t.focus(), r.remove(), Hse(t, r.value); }, 50); } -function W_(t, e, r) { +function L_(t, e, r) { for (let n of t.facet(e)) r = n(r, t); return r; } -function Xse(t, e) { - e = W_(t.state, C$, e); +function Hse(t, e) { + e = L_(t.state, b$, e); let { state: r } = t, n, i = 1, s = r.toText(e), a = s.lines == r.selection.ranges.length; - if (XM != null && r.selection.ranges.every((l) => l.empty) && XM == s.toString()) { + if (NM != null && r.selection.ranges.every((l) => l.empty) && NM == s.toString()) { let l = -1; n = r.changeByRange((u) => { let h = r.doc.lineAt(u.from); @@ -7021,7 +7021,7 @@ function Xse(t, e) { let f = r.toText((a ? s.line(i++).text : e) + r.lineBreak); return { changes: { from: h.from, insert: f }, - range: ft.cursor(u.from + f.length) + range: ut.cursor(u.from + f.length) }; }); } else @@ -7029,7 +7029,7 @@ function Xse(t, e) { let u = s.line(i++); return { changes: { from: l.from, to: l.to, insert: u.text }, - range: ft.cursor(l.from + u.length) + range: ut.cursor(l.from + u.length) }; }) : n = r.replaceSelection(s); t.dispatch(n, { @@ -7037,27 +7037,27 @@ function Xse(t, e) { scrollIntoView: !0 }); } -uc.scroll = (t) => { +ic.scroll = (t) => { t.inputState.lastScrollTop = t.scrollDOM.scrollTop, t.inputState.lastScrollLeft = t.scrollDOM.scrollLeft; }; -au.keydown = (t, e) => (t.inputState.setSelectionOrigin("select"), e.keyCode == 27 && t.inputState.tabFocusMode != 0 && (t.inputState.tabFocusMode = Date.now() + 2e3), !1); -uc.touchstart = (t, e) => { +ru.keydown = (t, e) => (t.inputState.setSelectionOrigin("select"), e.keyCode == 27 && t.inputState.tabFocusMode != 0 && (t.inputState.tabFocusMode = Date.now() + 2e3), !1); +ic.touchstart = (t, e) => { t.inputState.lastTouchTime = Date.now(), t.inputState.setSelectionOrigin("select.pointer"); }; -uc.touchmove = (t) => { +ic.touchmove = (t) => { t.inputState.setSelectionOrigin("select.pointer"); }; -au.mousedown = (t, e) => { +ru.mousedown = (t, e) => { if (t.observer.flush(), t.inputState.lastTouchTime > Date.now() - 2e3) return !1; let r = null; - for (let n of t.state.facet(Lse)) + for (let n of t.state.facet(Rse)) if (r = n(t, e), r) break; - if (!r && e.button == 0 && (r = $Ce(t, e)), r) { + if (!r && e.button == 0 && (r = YCe(t, e)), r) { let n = !t.hasFocus; - t.inputState.startMouseSelection(new ACe(t, e, r, n)), n && t.observer.ignore(() => { - use(t.contentDOM); + t.inputState.startMouseSelection(new BCe(t, e, r, n)), n && t.observer.ignore(() => { + cse(t.contentDOM); let s = t.root.activeElement; s && !s.contains(t.contentDOM) && s.blur(); }); @@ -7067,19 +7067,19 @@ au.mousedown = (t, e) => { } return !1; }; -function GV(t, e, r, n) { +function ZV(t, e, r, n) { if (n == 1) - return ft.cursor(e, r); + return ut.cursor(e, r); if (n == 2) - return uCe(t.state, e, r); + return bCe(t.state, e, r); { - let i = Yi.find(t.docView, e), s = t.state.doc.lineAt(i ? i.posAtEnd : e), a = i ? i.posAtStart : s.from, o = i ? i.posAtEnd : s.to; - return o < t.state.doc.length && o == s.to && o++, ft.range(a, o); + let i = Wi.find(t.docView, e), s = t.state.doc.lineAt(i ? i.posAtEnd : e), a = i ? i.posAtStart : s.from, o = i ? i.posAtEnd : s.to; + return o < t.state.doc.length && o == s.to && o++, ut.range(a, o); } } -let HV = (t, e, r) => e >= r.top && e <= r.bottom && t >= r.left && t <= r.right; -function NCe(t, e, r, n) { - let i = Yi.find(t.docView, e); +let jV = (t, e, r) => e >= r.top && e <= r.bottom && t >= r.left && t <= r.right; +function VCe(t, e, r, n) { + let i = Wi.find(t.docView, e); if (!i) return 1; let s = e - i.posAtStart; @@ -7088,71 +7088,71 @@ function NCe(t, e, r, n) { if (s == i.length) return -1; let a = i.coordsAt(s, -1); - if (a && HV(r, n, a)) + if (a && jV(r, n, a)) return -1; let o = i.coordsAt(s, 1); - return o && HV(r, n, o) ? 1 : a && a.bottom >= n ? -1 : 1; + return o && jV(r, n, o) ? 1 : a && a.bottom >= n ? -1 : 1; } -function XV(t, e) { +function KV(t, e) { let r = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1); - return { pos: r, bias: NCe(t, r, e.clientX, e.clientY) }; + return { pos: r, bias: VCe(t, r, e.clientX, e.clientY) }; } -const ICe = nr.ie && nr.ie_version <= 11; -let jV = null, ZV = 0, KV = 0; -function jse(t) { - if (!ICe) +const WCe = nr.ie && nr.ie_version <= 11; +let JV = null, eW = 0, tW = 0; +function Xse(t) { + if (!WCe) return t.detail; - let e = jV, r = KV; - return jV = t, KV = Date.now(), ZV = !e || r > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (ZV + 1) % 3 : 1; + let e = JV, r = tW; + return JV = t, tW = Date.now(), eW = !e || r > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (eW + 1) % 3 : 1; } -function $Ce(t, e) { - let r = XV(t, e), n = jse(e), i = t.state.selection; +function YCe(t, e) { + let r = KV(t, e), n = Xse(e), i = t.state.selection; return { update(s) { s.docChanged && (r.pos = s.changes.mapPos(r.pos), i = i.map(s.changes)); }, get(s, a, o) { - let l = XV(t, s), u, h = GV(t, l.pos, l.bias, n); + let l = KV(t, s), u, h = ZV(t, l.pos, l.bias, n); if (r.pos != l.pos && !a) { - let f = GV(t, r.pos, r.bias, n), d = Math.min(f.from, h.from), p = Math.max(f.to, h.to); - h = d < h.from ? ft.range(d, p) : ft.range(p, d); + let f = ZV(t, r.pos, r.bias, n), d = Math.min(f.from, h.from), p = Math.max(f.to, h.to); + h = d < h.from ? ut.range(d, p) : ut.range(p, d); } - return a ? i.replaceRange(i.main.extend(h.from, h.to)) : o && n == 1 && i.ranges.length > 1 && (u = BCe(i, l.pos)) ? u : o ? i.addRange(h) : ft.create([h]); + return a ? i.replaceRange(i.main.extend(h.from, h.to)) : o && n == 1 && i.ranges.length > 1 && (u = GCe(i, l.pos)) ? u : o ? i.addRange(h) : ut.create([h]); } }; } -function BCe(t, e) { +function GCe(t, e) { for (let r = 0; r < t.ranges.length; r++) { let { from: n, to: i } = t.ranges[r]; if (n <= e && i >= e) - return ft.create(t.ranges.slice(0, r).concat(t.ranges.slice(r + 1)), t.mainIndex == r ? 0 : t.mainIndex - (t.mainIndex > r ? 1 : 0)); + return ut.create(t.ranges.slice(0, r).concat(t.ranges.slice(r + 1)), t.mainIndex == r ? 0 : t.mainIndex - (t.mainIndex > r ? 1 : 0)); } return null; } -au.dragstart = (t, e) => { +ru.dragstart = (t, e) => { let { selection: { main: r } } = t.state; if (e.target.draggable) { let i = t.docView.nearest(e.target); if (i && i.isWidget) { let s = i.posAtStart, a = s + i.length; - (s >= r.to || a <= r.from) && (r = ft.range(s, a)); + (s >= r.to || a <= r.from) && (r = ut.range(s, a)); } } let { inputState: n } = t; - return n.mouseSelection && (n.mouseSelection.dragging = !0), n.draggedContent = r, e.dataTransfer && (e.dataTransfer.setData("Text", W_(t.state, E$, t.state.sliceDoc(r.from, r.to))), e.dataTransfer.effectAllowed = "copyMove"), !1; + return n.mouseSelection && (n.mouseSelection.dragging = !0), n.draggedContent = r, e.dataTransfer && (e.dataTransfer.setData("Text", L_(t.state, x$, t.state.sliceDoc(r.from, r.to))), e.dataTransfer.effectAllowed = "copyMove"), !1; }; -au.dragend = (t) => (t.inputState.draggedContent = null, !1); -function JV(t, e, r, n) { - if (r = W_(t.state, C$, r), !r) +ru.dragend = (t) => (t.inputState.draggedContent = null, !1); +function rW(t, e, r, n) { + if (r = L_(t.state, b$, r), !r) return; - let i = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), { draggedContent: s } = t.inputState, a = n && s && LCe(t, e) ? { from: s.from, to: s.to } : null, o = { from: i, insert: r }, l = t.state.changes(a ? [a, o] : o); + let i = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), { draggedContent: s } = t.inputState, a = n && s && zCe(t, e) ? { from: s.from, to: s.to } : null, o = { from: i, insert: r }, l = t.state.changes(a ? [a, o] : o); t.focus(), t.dispatch({ changes: l, selection: { anchor: l.mapPos(i, -1), head: l.mapPos(i, 1) }, userEvent: a ? "move.drop" : "input.drop" }), t.inputState.draggedContent = null; } -au.drop = (t, e) => { +ru.drop = (t, e) => { if (!e.dataTransfer) return !1; if (t.state.readOnly) @@ -7160,7 +7160,7 @@ au.drop = (t, e) => { let r = e.dataTransfer.files; if (r && r.length) { let n = Array(r.length), i = 0, s = () => { - ++i == r.length && JV(t, e, n.filter((a) => a != null).join(t.state.lineBreak), !1); + ++i == r.length && rW(t, e, n.filter((a) => a != null).join(t.state.lineBreak), !1); }; for (let a = 0; a < r.length; a++) { let o = new FileReader(); @@ -7172,18 +7172,18 @@ au.drop = (t, e) => { } else { let n = e.dataTransfer.getData("Text"); if (n) - return JV(t, e, n, !0), !0; + return rW(t, e, n, !0), !0; } return !1; }; -au.paste = (t, e) => { +ru.paste = (t, e) => { if (t.state.readOnly) return !0; t.observer.flush(); - let r = Hse ? null : e.clipboardData; - return r ? (Xse(t, r.getData("text/plain") || r.getData("text/uri-list")), !0) : (PCe(t), !1); + let r = Gse ? null : e.clipboardData; + return r ? (Hse(t, r.getData("text/plain") || r.getData("text/uri-list")), !0) : (QCe(t), !1); }; -function FCe(t, e) { +function HCe(t, e) { let r = t.dom.parentNode; if (!r) return; @@ -7192,7 +7192,7 @@ function FCe(t, e) { n.remove(), t.focus(); }, 50); } -function zCe(t) { +function XCe(t) { let e = [], r = [], n = !1; for (let i of t.selection.ranges) i.empty || (e.push(t.sliceDoc(i.from, i.to)), r.push(i)); @@ -7204,87 +7204,87 @@ function zCe(t) { } n = !0; } - return { text: W_(t, E$, e.join(t.lineBreak)), ranges: r, linewise: n }; + return { text: L_(t, x$, e.join(t.lineBreak)), ranges: r, linewise: n }; } -let XM = null; -au.copy = au.cut = (t, e) => { - let { text: r, ranges: n, linewise: i } = zCe(t.state); +let NM = null; +ru.copy = ru.cut = (t, e) => { + let { text: r, ranges: n, linewise: i } = XCe(t.state); if (!r && !i) return !1; - XM = i ? r : null, e.type == "cut" && !t.state.readOnly && t.dispatch({ + NM = i ? r : null, e.type == "cut" && !t.state.readOnly && t.dispatch({ changes: n, scrollIntoView: !0, userEvent: "delete.cut" }); - let s = Hse ? null : e.clipboardData; - return s ? (s.clearData(), s.setData("text/plain", r), !0) : (FCe(t, r), !1); + let s = Gse ? null : e.clipboardData; + return s ? (s.clearData(), s.setData("text/plain", r), !0) : (HCe(t, r), !1); }; -const Zse = /* @__PURE__ */ bo.define(); -function Kse(t, e) { +const Zse = /* @__PURE__ */ vo.define(); +function jse(t, e) { let r = []; - for (let n of t.facet(Pse)) { + for (let n of t.facet(Dse)) { let i = n(t, e); i && r.push(i); } return r ? t.update({ effects: r, annotations: Zse.of(!0) }) : null; } -function Jse(t) { +function Kse(t) { setTimeout(() => { let e = t.hasFocus; if (e != t.inputState.notifiedFocused) { - let r = Kse(t.state, e); + let r = jse(t.state, e); r ? t.dispatch(r) : t.update([]); } }, 10); } -uc.focus = (t) => { - t.inputState.lastFocusTime = Date.now(), !t.scrollDOM.scrollTop && (t.inputState.lastScrollTop || t.inputState.lastScrollLeft) && (t.scrollDOM.scrollTop = t.inputState.lastScrollTop, t.scrollDOM.scrollLeft = t.inputState.lastScrollLeft), Jse(t); +ic.focus = (t) => { + t.inputState.lastFocusTime = Date.now(), !t.scrollDOM.scrollTop && (t.inputState.lastScrollTop || t.inputState.lastScrollLeft) && (t.scrollDOM.scrollTop = t.inputState.lastScrollTop, t.scrollDOM.scrollLeft = t.inputState.lastScrollLeft), Kse(t); }; -uc.blur = (t) => { - t.observer.clearSelectionRange(), Jse(t); +ic.blur = (t) => { + t.observer.clearSelectionRange(), Kse(t); }; -uc.compositionstart = uc.compositionupdate = (t) => { +ic.compositionstart = ic.compositionupdate = (t) => { t.observer.editContext || (t.inputState.compositionFirstChange == null && (t.inputState.compositionFirstChange = !0), t.inputState.composing < 0 && (t.inputState.composing = 0)); }; -uc.compositionend = (t) => { +ic.compositionend = (t) => { t.observer.editContext || (t.inputState.composing = -1, t.inputState.compositionEndedAt = Date.now(), t.inputState.compositionPendingKey = !0, t.inputState.compositionPendingChange = t.observer.pendingRecords().length > 0, t.inputState.compositionFirstChange = null, nr.chrome && nr.android ? t.observer.flushSoon() : t.inputState.compositionPendingChange ? Promise.resolve().then(() => t.observer.flush()) : setTimeout(() => { t.inputState.composing < 0 && t.docView.hasComposition && t.update([]); }, 50)); }; -uc.contextmenu = (t) => { +ic.contextmenu = (t) => { t.inputState.lastContextMenu = Date.now(); }; -au.beforeinput = (t, e) => { +ru.beforeinput = (t, e) => { var r, n; if (e.inputType == "insertReplacementText" && t.observer.editContext) { let s = (r = e.dataTransfer) === null || r === void 0 ? void 0 : r.getData("text/plain"), a = e.getTargetRanges(); if (s && a.length) { let o = a[0], l = t.posAtDOM(o.startContainer, o.startOffset), u = t.posAtDOM(o.endContainer, o.endOffset); - return L$(t, { from: l, to: u, insert: t.state.toText(s) }, null), !0; + return S$(t, { from: l, to: u, insert: t.state.toText(s) }, null), !0; } } let i; - if (nr.chrome && nr.android && (i = Yse.find((s) => s.inputType == e.inputType)) && (t.observer.delayAndroidKey(i.key, i.keyCode), i.key == "Backspace" || i.key == "Delete")) { + if (nr.chrome && nr.android && (i = Wse.find((s) => s.inputType == e.inputType)) && (t.observer.delayAndroidKey(i.key, i.keyCode), i.key == "Backspace" || i.key == "Delete")) { let s = ((n = window.visualViewport) === null || n === void 0 ? void 0 : n.height) || 0; setTimeout(() => { var a; (((a = window.visualViewport) === null || a === void 0 ? void 0 : a.height) || 0) > s + 10 && t.hasFocus && (t.contentDOM.blur(), t.focus()); }, 100); } - return nr.ios && e.inputType == "deleteContentForward" && t.observer.flushSoon(), nr.safari && e.inputType == "insertText" && t.inputState.composing >= 0 && setTimeout(() => uc.compositionend(t, e), 20), !1; + return nr.ios && e.inputType == "deleteContentForward" && t.observer.flushSoon(), nr.safari && e.inputType == "insertText" && t.inputState.composing >= 0 && setTimeout(() => ic.compositionend(t, e), 20), !1; }; -const eW = /* @__PURE__ */ new Set(); -function qCe(t) { - eW.has(t) || (eW.add(t), t.addEventListener("copy", () => { +const nW = /* @__PURE__ */ new Set(); +function ZCe(t) { + nW.has(t) || (nW.add(t), t.addEventListener("copy", () => { }), t.addEventListener("cut", () => { })); } -const tW = ["pre-wrap", "normal", "pre-line", "break-spaces"]; -let dv = !1; -function rW() { - dv = !1; +const iW = ["pre-wrap", "normal", "pre-line", "break-spaces"]; +let cv = !1; +function sW() { + cv = !1; } -class UCe { +class jCe { constructor(e) { this.lineWrapping = e, this.doc = nn.empty, this.heightSamples = {}, this.lineHeight = 14, this.charWidth = 7, this.textHeight = 14, this.lineLength = 30; } @@ -7299,7 +7299,7 @@ class UCe { return this.doc = e, this; } mustRefreshForWrapping(e) { - return tW.indexOf(e) > -1 != this.lineWrapping; + return iW.indexOf(e) > -1 != this.lineWrapping; } mustRefreshForHeights(e) { let r = !1; @@ -7310,7 +7310,7 @@ class UCe { return r; } refresh(e, r, n, i, s, a) { - let o = tW.indexOf(e) > -1, l = Math.round(r) != Math.round(this.lineHeight) || this.lineWrapping != o; + let o = iW.indexOf(e) > -1, l = Math.round(r) != Math.round(this.lineHeight) || this.lineWrapping != o; if (this.lineWrapping = o, this.lineHeight = r, this.charWidth = n, this.textHeight = i, this.lineLength = s, l) { this.heightSamples = {}; for (let u = 0; u < a.length; u++) { @@ -7321,7 +7321,7 @@ class UCe { return l; } } -class QCe { +class KCe { constructor(e, r) { this.from = e, this.heights = r, this.index = 0; } @@ -7329,12 +7329,12 @@ class QCe { return this.index < this.heights.length; } } -class qu { +class Iu { constructor(e, r, n, i, s) { this.from = e, this.length = r, this.top = n, this.height = i, this._content = s; } get type() { - return typeof this._content == "number" ? uo.Text : Array.isArray(this._content) ? this._content : this._content.type; + return typeof this._content == "number" ? lo.Text : Array.isArray(this._content) ? this._content : this._content.type; } get to() { return this.from + this.length; @@ -7343,21 +7343,21 @@ class qu { return this.top + this.height; } get widget() { - return this._content instanceof ap ? this._content.widget : null; + return this._content instanceof sp ? this._content.widget : null; } get widgetLineBreaks() { return typeof this._content == "number" ? this._content : 0; } join(e) { let r = (Array.isArray(this._content) ? this._content : [this]).concat(Array.isArray(e._content) ? e._content : [e]); - return new qu(this.from, this.length + e.length, this.top, this.height + e.height, r); + return new Iu(this.from, this.length + e.length, this.top, this.height + e.height, r); } } -var ti = /* @__PURE__ */ function(t) { +var Jn = /* @__PURE__ */ function(t) { return t[t.ByPos = 0] = "ByPos", t[t.ByHeight = 1] = "ByHeight", t[t.ByPosNoHeight = 2] = "ByPosNoHeight", t; -}(ti || (ti = {})); -const H5 = 1e-3; -class ho { +}(Jn || (Jn = {})); +const P5 = 1e-3; +class co { constructor(e, r, n = 2) { this.length = e, this.height = r, this.flags = n; } @@ -7368,10 +7368,10 @@ class ho { this.flags = (e ? 2 : 0) | this.flags & -3; } setHeight(e) { - this.height != e && (Math.abs(this.height - e) > H5 && (dv = !0), this.height = e); + this.height != e && (Math.abs(this.height - e) > P5 && (cv = !0), this.height = e); } replace(e, r, n) { - return ho.of(n); + return co.of(n); } decomposeLeft(e, r) { r.push(this); @@ -7382,17 +7382,17 @@ class ho { applyChanges(e, r, n, i) { let s = this, a = n.doc; for (let o = i.length - 1; o >= 0; o--) { - let { fromA: l, toA: u, fromB: h, toB: f } = i[o], d = s.lineAt(l, ti.ByPosNoHeight, n.setDoc(r), 0, 0), p = d.to >= u ? d : s.lineAt(u, ti.ByPosNoHeight, n, 0, 0); + let { fromA: l, toA: u, fromB: h, toB: f } = i[o], d = s.lineAt(l, Jn.ByPosNoHeight, n.setDoc(r), 0, 0), p = d.to >= u ? d : s.lineAt(u, Jn.ByPosNoHeight, n, 0, 0); for (f += p.to - u, u = p.to; o > 0 && d.from <= i[o - 1].toA; ) - l = i[o - 1].fromA, h = i[o - 1].fromB, o--, l < d.from && (d = s.lineAt(l, ti.ByPosNoHeight, n, 0, 0)); + l = i[o - 1].fromA, h = i[o - 1].fromB, o--, l < d.from && (d = s.lineAt(l, Jn.ByPosNoHeight, n, 0, 0)); h += d.from - l, l = d.from; - let g = M$.build(n.setDoc(a), e, h, f); - s = hT(s, s.replace(l, u, g)); + let g = T$.build(n.setDoc(a), e, h, f); + s = Z3(s, s.replace(l, u, g)); } return s.updateHeight(n, 0); } static empty() { - return new fl(0, 0); + return new ll(0, 0); } static of(e) { if (e.length == 1) @@ -7416,19 +7416,19 @@ class ho { o && (s += o.size); } let a = 0; - return e[r - 1] == null ? (a = 1, r--) : e[r] == null && (a = 1, n++), new VCe(ho.of(e.slice(0, r)), a, ho.of(e.slice(n))); + return e[r - 1] == null ? (a = 1, r--) : e[r] == null && (a = 1, n++), new JCe(co.of(e.slice(0, r)), a, co.of(e.slice(n))); } } -function hT(t, e) { - return t == e ? t : (t.constructor != e.constructor && (dv = !0), e); +function Z3(t, e) { + return t == e ? t : (t.constructor != e.constructor && (cv = !0), e); } -ho.prototype.size = 1; -class eae extends ho { +co.prototype.size = 1; +class Jse extends co { constructor(e, r, n) { super(e, r), this.deco = n; } blockAt(e, r, n, i) { - return new qu(i, this.length, n, this.height, this.deco || 0); + return new Iu(i, this.length, n, this.height, this.deco || 0); } lineAt(e, r, n, i, s) { return this.blockAt(0, n, i, s); @@ -7443,16 +7443,16 @@ class eae extends ho { return `block(${this.length})`; } } -class fl extends eae { +class ll extends Jse { constructor(e, r) { super(e, r, null), this.collapsed = 0, this.widgetHeight = 0, this.breaks = 0; } blockAt(e, r, n, i) { - return new qu(i, this.length, n, this.height, this.breaks); + return new Iu(i, this.length, n, this.height, this.breaks); } replace(e, r, n) { let i = n[0]; - return n.length == 1 && (i instanceof fl || i instanceof ta && i.flags & 4) && Math.abs(this.length - i.length) < 10 ? (i instanceof ta ? i = new fl(i.length, this.height) : i.height = this.height, this.outdated || (i.outdated = !1), i) : ho.of(n); + return n.length == 1 && (i instanceof ll || i instanceof Zs && i.flags & 4) && Math.abs(this.length - i.length) < 10 ? (i instanceof Zs ? i = new ll(i.length, this.height) : i.height = this.height, this.outdated || (i.outdated = !1), i) : co.of(n); } updateHeight(e, r = 0, n = !1, i) { return i && i.from <= r && i.more ? this.setHeight(i.heights[i.index++]) : (n || this.outdated) && this.setHeight(Math.max(this.widgetHeight, e.heightForLine(this.length - this.collapsed)) + this.breaks * e.lineHeight), this.outdated = !1, this; @@ -7461,7 +7461,7 @@ class fl extends eae { return `line(${this.length}${this.collapsed ? -this.collapsed : ""}${this.widgetHeight ? ":" + this.widgetHeight : ""})`; } } -class ta extends ho { +class Zs extends co { constructor(e) { super(e, 0); } @@ -7478,21 +7478,21 @@ class ta extends ho { let { firstLine: s, lastLine: a, perLine: o, perChar: l } = this.heightMetrics(r, i); if (r.lineWrapping) { let u = i + (e < r.lineHeight ? 0 : Math.round(Math.max(0, Math.min(1, (e - n) / this.height)) * this.length)), h = r.doc.lineAt(u), f = o + h.length * l, d = Math.max(n, e - f / 2); - return new qu(h.from, h.length, d, f, 0); + return new Iu(h.from, h.length, d, f, 0); } else { let u = Math.max(0, Math.min(a - s, Math.floor((e - n) / o))), { from: h, length: f } = r.doc.line(s + u); - return new qu(h, f, n + o * u, o, 0); + return new Iu(h, f, n + o * u, o, 0); } } lineAt(e, r, n, i, s) { - if (r == ti.ByHeight) + if (r == Jn.ByHeight) return this.blockAt(e, n, i, s); - if (r == ti.ByPosNoHeight) { + if (r == Jn.ByPosNoHeight) { let { from: p, to: g } = n.doc.lineAt(e); - return new qu(p, g - p, 0, 0, 0); + return new Iu(p, g - p, 0, 0, 0); } let { firstLine: a, perLine: o, perChar: l } = this.heightMetrics(n, s), u = n.doc.lineAt(e), h = o + u.length * l, f = u.number - a, d = i + o * f + l * (u.from - s - f); - return new qu(u.from, u.length, Math.max(i, Math.min(d, i + this.height - h)), h, 0); + return new Iu(u.from, u.length, Math.max(i, Math.min(d, i + this.height - h)), h, 0); } forEachLine(e, r, n, i, s, a) { e = Math.max(e, s), r = Math.min(r, s + this.length); @@ -7504,42 +7504,42 @@ class ta extends ho { f += l * g + u * (e - s - g); } let p = l + u * d.length; - a(new qu(d.from, d.length, f, p, 0)), f += p, h = d.to + 1; + a(new Iu(d.from, d.length, f, p, 0)), f += p, h = d.to + 1; } } replace(e, r, n) { let i = this.length - r; if (i > 0) { let s = n[n.length - 1]; - s instanceof ta ? n[n.length - 1] = new ta(s.length + i) : n.push(null, new ta(i - 1)); + s instanceof Zs ? n[n.length - 1] = new Zs(s.length + i) : n.push(null, new Zs(i - 1)); } if (e > 0) { let s = n[0]; - s instanceof ta ? n[0] = new ta(e + s.length) : n.unshift(new ta(e - 1), null); + s instanceof Zs ? n[0] = new Zs(e + s.length) : n.unshift(new Zs(e - 1), null); } - return ho.of(n); + return co.of(n); } decomposeLeft(e, r) { - r.push(new ta(e - 1), null); + r.push(new Zs(e - 1), null); } decomposeRight(e, r) { - r.push(null, new ta(this.length - e - 1)); + r.push(null, new Zs(this.length - e - 1)); } updateHeight(e, r = 0, n = !1, i) { let s = r + this.length; if (i && i.from <= r + this.length && i.more) { let a = [], o = Math.max(r, i.from), l = -1; - for (i.from > r && a.push(new ta(i.from - r - 1).updateHeight(e, r)); o <= s && i.more; ) { + for (i.from > r && a.push(new Zs(i.from - r - 1).updateHeight(e, r)); o <= s && i.more; ) { let h = e.doc.lineAt(o).length; a.length && a.push(null); let f = i.heights[i.index++]; - l == -1 ? l = f : Math.abs(f - l) >= H5 && (l = -2); - let d = new fl(h, f); + l == -1 ? l = f : Math.abs(f - l) >= P5 && (l = -2); + let d = new ll(h, f); d.outdated = !1, a.push(d), o += h + 1; } - o <= s && a.push(null, new ta(s - o).updateHeight(e, o)); - let u = ho.of(a); - return (l < 0 || Math.abs(u.height - this.height) >= H5 || Math.abs(l - this.heightMetrics(e, r).perLine) >= H5) && (dv = !0), hT(this, u); + o <= s && a.push(null, new Zs(s - o).updateHeight(e, o)); + let u = co.of(a); + return (l < 0 || Math.abs(u.height - this.height) >= P5 || Math.abs(l - this.heightMetrics(e, r).perLine) >= P5) && (cv = !0), Z3(this, u); } else (n || this.outdated) && (this.setHeight(e.heightForGap(r, r + this.length)), this.outdated = !1); return this; @@ -7548,7 +7548,7 @@ class ta extends ho { return `gap(${this.length})`; } } -class VCe extends ho { +class JCe extends co { constructor(e, r, n) { super(e.length + r + n.length, e.height + n.height, r | (e.outdated || n.outdated ? 2 : 0)), this.left = e, this.right = n, this.size = e.size + n.size; } @@ -7560,10 +7560,10 @@ class VCe extends ho { return e < s ? this.left.blockAt(e, r, n, i) : this.right.blockAt(e, r, s, i + this.left.length + this.break); } lineAt(e, r, n, i, s) { - let a = i + this.left.height, o = s + this.left.length + this.break, l = r == ti.ByHeight ? e < a : e < o, u = l ? this.left.lineAt(e, r, n, i, s) : this.right.lineAt(e, r, n, a, o); + let a = i + this.left.height, o = s + this.left.length + this.break, l = r == Jn.ByHeight ? e < a : e < o, u = l ? this.left.lineAt(e, r, n, i, s) : this.right.lineAt(e, r, n, a, o); if (this.break || (l ? u.to < o : u.from > o)) return u; - let h = r == ti.ByPosNoHeight ? ti.ByPosNoHeight : ti.ByPos; + let h = r == Jn.ByPosNoHeight ? Jn.ByPosNoHeight : Jn.ByPos; return l ? u.join(this.right.lineAt(o, h, n, a, o)) : this.left.lineAt(o, h, n, i, s).join(u); } forEachLine(e, r, n, i, s, a) { @@ -7571,7 +7571,7 @@ class VCe extends ho { if (this.break) e < l && this.left.forEachLine(e, r, n, i, s, a), r >= l && this.right.forEachLine(e, r, n, o, l, a); else { - let u = this.lineAt(l, ti.ByPos, n, i, s); + let u = this.lineAt(l, Jn.ByPos, n, i, s); e < u.from && this.left.forEachLine(e, u.from - 1, n, i, s, a), u.to >= e && u.from <= r && a(u), r > u.to && this.right.forEachLine(u.to + 1, r, n, o, l, a); } } @@ -7586,11 +7586,11 @@ class VCe extends ho { let a = s.length; for (let o of n) s.push(o); - if (e > 0 && nW(s, a - 1), r < this.length) { + if (e > 0 && aW(s, a - 1), r < this.length) { let o = s.length; - this.decomposeRight(r, s), nW(s, o); + this.decomposeRight(r, s), aW(s, o); } - return ho.of(s); + return co.of(s); } decomposeLeft(e, r) { let n = this.left.length; @@ -7605,7 +7605,7 @@ class VCe extends ho { e < n && this.left.decomposeRight(e, r), this.break && e < i && r.push(null), r.push(this.right); } balanced(e, r) { - return e.size > 2 * r.size || r.size > 2 * e.size ? ho.of(this.break ? [e, null, r] : [e, r]) : (this.left = hT(this.left, e), this.right = hT(this.right, r), this.setHeight(e.height + r.height), this.outdated = e.outdated || r.outdated, this.size = e.size + r.size, this.length = e.length + this.break + r.length, this); + return e.size > 2 * r.size || r.size > 2 * e.size ? co.of(this.break ? [e, null, r] : [e, r]) : (this.left = Z3(this.left, e), this.right = Z3(this.right, r), this.setHeight(e.height + r.height), this.outdated = e.outdated || r.outdated, this.size = e.size + r.size, this.length = e.length + this.break + r.length, this); } updateHeight(e, r = 0, n = !1, i) { let { left: s, right: a } = this, o = r + s.length + this.break, l = null; @@ -7615,12 +7615,12 @@ class VCe extends ho { return this.left + (this.break ? " " : "-") + this.right; } } -function nW(t, e) { +function aW(t, e) { let r, n; - t[e] == null && (r = t[e - 1]) instanceof ta && (n = t[e + 1]) instanceof ta && t.splice(e - 1, 3, new ta(r.length + 1 + n.length)); + t[e] == null && (r = t[e - 1]) instanceof Zs && (n = t[e + 1]) instanceof Zs && t.splice(e - 1, 3, new Zs(r.length + 1 + n.length)); } -const WCe = 5; -class M$ { +const eEe = 5; +class T$ { constructor(e, r) { this.pos = e, this.oracle = r, this.nodes = [], this.lineStart = -1, this.lineEnd = -1, this.covering = null, this.writtenTo = e; } @@ -7630,7 +7630,7 @@ class M$ { span(e, r) { if (this.lineStart > -1) { let n = Math.min(r, this.lineEnd), i = this.nodes[this.nodes.length - 1]; - i instanceof fl ? i.length += n - this.pos : (n > this.pos || !this.isCovered) && this.nodes.push(new fl(n - this.pos, -1)), this.writtenTo = n, r > n && (this.nodes.push(null), this.writtenTo++, this.lineStart = -1); + i instanceof ll ? i.length += n - this.pos : (n > this.pos || !this.isCovered) && this.nodes.push(new ll(n - this.pos, -1)), this.writtenTo = n, r > n && (this.nodes.push(null), this.writtenTo++, this.lineStart = -1); } this.pos = r; } @@ -7639,7 +7639,7 @@ class M$ { let i = n.widget ? n.widget.estimatedHeight : 0, s = n.widget ? n.widget.lineBreaks : 0; i < 0 && (i = this.oracle.lineHeight); let a = r - e; - n.block ? this.addBlock(new eae(a, i, n)) : (a || s || i >= WCe) && this.addLineDeco(i, s, a); + n.block ? this.addBlock(new Jse(a, i, n)) : (a || s || i >= eEe) && this.addLineDeco(i, s, a); } else r > e && this.span(e, r); this.lineEnd > -1 && this.lineEnd < this.pos && (this.lineEnd = this.oracle.doc.lineAt(this.pos).to); @@ -7648,18 +7648,18 @@ class M$ { if (this.lineStart > -1) return; let { from: e, to: r } = this.oracle.doc.lineAt(this.pos); - this.lineStart = e, this.lineEnd = r, this.writtenTo < e && ((this.writtenTo < e - 1 || this.nodes[this.nodes.length - 1] == null) && this.nodes.push(this.blankContent(this.writtenTo, e - 1)), this.nodes.push(null)), this.pos > e && this.nodes.push(new fl(this.pos - e, -1)), this.writtenTo = this.pos; + this.lineStart = e, this.lineEnd = r, this.writtenTo < e && ((this.writtenTo < e - 1 || this.nodes[this.nodes.length - 1] == null) && this.nodes.push(this.blankContent(this.writtenTo, e - 1)), this.nodes.push(null)), this.pos > e && this.nodes.push(new ll(this.pos - e, -1)), this.writtenTo = this.pos; } blankContent(e, r) { - let n = new ta(r - e); + let n = new Zs(r - e); return this.oracle.doc.lineAt(e).to == r && (n.flags |= 4), n; } ensureLine() { this.enterLine(); let e = this.nodes.length ? this.nodes[this.nodes.length - 1] : null; - if (e instanceof fl) + if (e instanceof ll) return e; - let r = new fl(0, -1); + let r = new ll(0, -1); return this.nodes.push(r), r; } addBlock(e) { @@ -7673,32 +7673,32 @@ class M$ { } finish(e) { let r = this.nodes.length == 0 ? null : this.nodes[this.nodes.length - 1]; - this.lineStart > -1 && !(r instanceof fl) && !this.isCovered ? this.nodes.push(new fl(0, -1)) : (this.writtenTo < this.pos || r == null) && this.nodes.push(this.blankContent(this.writtenTo, this.pos)); + this.lineStart > -1 && !(r instanceof ll) && !this.isCovered ? this.nodes.push(new ll(0, -1)) : (this.writtenTo < this.pos || r == null) && this.nodes.push(this.blankContent(this.writtenTo, this.pos)); let n = e; for (let i of this.nodes) - i instanceof fl && i.updateHeight(this.oracle, n), n += i ? i.length : 1; + i instanceof ll && i.updateHeight(this.oracle, n), n += i ? i.length : 1; return this.nodes; } static build(e, r, n, i) { - let s = new M$(n, e); - return jr.spans(r, n, i, s, 0), s.finish(n); + let s = new T$(n, e); + return Zr.spans(r, n, i, s, 0), s.finish(n); } } -function YCe(t, e, r) { - let n = new GCe(); - return jr.compare(t, e, r, n, 0), n.changes; +function tEe(t, e, r) { + let n = new rEe(); + return Zr.compare(t, e, r, n, 0), n.changes; } -class GCe { +class rEe { constructor() { this.changes = []; } compareRange() { } comparePoint(e, r, n, i) { - (e < r || n && n.heightRelevant || i && i.heightRelevant) && Y5(e, r, this.changes, 5); + (e < r || n && n.heightRelevant || i && i.heightRelevant) && M5(e, r, this.changes, 5); } } -function HCe(t, e) { +function nEe(t, e) { let r = t.getBoundingClientRect(), n = t.ownerDocument, i = n.defaultView || window, s = Math.max(0, r.left), a = Math.min(i.innerWidth, r.right), o = Math.max(0, r.top), l = Math.min(i.innerHeight, r.bottom); for (let u = t.parentNode; u && u != n.body; ) if (u.nodeType == 1) { @@ -7719,11 +7719,11 @@ function HCe(t, e) { bottom: Math.max(o, l) - (r.top + e) }; } -function XCe(t) { +function iEe(t) { let e = t.getBoundingClientRect(), r = t.ownerDocument.defaultView || window; return e.left < r.innerWidth && e.right > 0 && e.top < r.innerHeight && e.bottom > 0; } -function jCe(t, e) { +function sEe(t, e) { let r = t.getBoundingClientRect(); return { left: 0, @@ -7732,7 +7732,7 @@ function jCe(t, e) { bottom: r.bottom - (r.top + e) }; } -class H7 { +class N7 { constructor(e, r, n, i) { this.from = e, this.to = r, this.size = n, this.displaySize = i; } @@ -7747,12 +7747,12 @@ class H7 { return !0; } draw(e, r) { - return Ht.replace({ - widget: new ZCe(this.displaySize * (r ? e.scaleY : e.scaleX), r) + return Gt.replace({ + widget: new aEe(this.displaySize * (r ? e.scaleY : e.scaleX), r) }).range(this.from, this.to); } } -class ZCe extends el { +class aEe extends Zo { constructor(e, r) { super(), this.size = e, this.vertical = r; } @@ -7767,14 +7767,14 @@ class ZCe extends el { return this.vertical ? this.size : -1; } } -class iW { +class oW { constructor(e) { - this.state = e, this.pixelViewport = { left: 0, right: window.innerWidth, top: 0, bottom: 0 }, this.inView = !0, this.paddingTop = 0, this.paddingBottom = 0, this.contentDOMWidth = 0, this.contentDOMHeight = 0, this.editorHeight = 0, this.editorWidth = 0, this.scrollTop = 0, this.scrolledToBottom = !1, this.scaleX = 1, this.scaleY = 1, this.scrollAnchorPos = 0, this.scrollAnchorHeight = -1, this.scaler = sW, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = Xn.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1; - let r = e.facet(_$).some((n) => typeof n != "function" && n.class == "cm-lineWrapping"); - this.heightOracle = new UCe(r), this.stateDeco = e.facet(Ux).filter((n) => typeof n != "function"), this.heightMap = ho.empty().applyChanges(this.stateDeco, nn.empty, this.heightOracle.setDoc(e.doc), [new oc(0, 0, 0, e.doc.length)]); + this.state = e, this.pixelViewport = { left: 0, right: window.innerWidth, top: 0, bottom: 0 }, this.inView = !0, this.paddingTop = 0, this.paddingBottom = 0, this.contentDOMWidth = 0, this.contentDOMHeight = 0, this.editorHeight = 0, this.editorWidth = 0, this.scrollTop = 0, this.scrolledToBottom = !1, this.scaleX = 1, this.scaleY = 1, this.scrollAnchorPos = 0, this.scrollAnchorHeight = -1, this.scaler = lW, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = Gn.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1; + let r = e.facet(w$).some((n) => typeof n != "function" && n.class == "cm-lineWrapping"); + this.heightOracle = new jCe(r), this.stateDeco = e.facet(Dx).filter((n) => typeof n != "function"), this.heightMap = co.empty().applyChanges(this.stateDeco, nn.empty, this.heightOracle.setDoc(e.doc), [new tc(0, 0, 0, e.doc.length)]); for (let n = 0; n < 2 && (this.viewport = this.getViewport(0, null), !!this.updateForViewport()); n++) ; - this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = Ht.set(this.lineGaps.map((n) => n.draw(this, !1))), this.computeVisibleRanges(); + this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = Gt.set(this.lineGaps.map((n) => n.draw(this, !1))), this.computeVisibleRanges(); } updateForViewport() { let e = [this.viewport], { main: r } = this.state.selection; @@ -7782,49 +7782,49 @@ class iW { let i = n ? r.head : r.anchor; if (!e.some(({ from: s, to: a }) => i >= s && i <= a)) { let { from: s, to: a } = this.lineBlockAt(i); - e.push(new j4(s, a)); + e.push(new B4(s, a)); } } return this.viewports = e.sort((n, i) => n.from - i.from), this.updateScaler(); } updateScaler() { let e = this.scaler; - return this.scaler = this.heightMap.height <= 7e6 ? sW : new D$(this.heightOracle, this.heightMap, this.viewports), e.eq(this.scaler) ? 0 : 2; + return this.scaler = this.heightMap.height <= 7e6 ? lW : new C$(this.heightOracle, this.heightMap, this.viewports), e.eq(this.scaler) ? 0 : 2; } updateViewportLines() { this.viewportLines = [], this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (e) => { - this.viewportLines.push(_b(e, this.scaler)); + this.viewportLines.push(yb(e, this.scaler)); }); } update(e, r = null) { this.state = e.state; let n = this.stateDeco; - this.stateDeco = this.state.facet(Ux).filter((h) => typeof h != "function"); - let i = e.changedRanges, s = oc.extendWithRanges(i, YCe(n, this.stateDeco, e ? e.changes : Gi.empty(this.state.doc.length))), a = this.heightMap.height, o = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop); - rW(), this.heightMap = this.heightMap.applyChanges(this.stateDeco, e.startState.doc, this.heightOracle.setDoc(this.state.doc), s), (this.heightMap.height != a || dv) && (e.flags |= 2), o ? (this.scrollAnchorPos = e.changes.mapPos(o.from, -1), this.scrollAnchorHeight = o.top) : (this.scrollAnchorPos = -1, this.scrollAnchorHeight = this.heightMap.height); + this.stateDeco = this.state.facet(Dx).filter((h) => typeof h != "function"); + let i = e.changedRanges, s = tc.extendWithRanges(i, tEe(n, this.stateDeco, e ? e.changes : Yi.empty(this.state.doc.length))), a = this.heightMap.height, o = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop); + sW(), this.heightMap = this.heightMap.applyChanges(this.stateDeco, e.startState.doc, this.heightOracle.setDoc(this.state.doc), s), (this.heightMap.height != a || cv) && (e.flags |= 2), o ? (this.scrollAnchorPos = e.changes.mapPos(o.from, -1), this.scrollAnchorHeight = o.top) : (this.scrollAnchorPos = -1, this.scrollAnchorHeight = this.heightMap.height); let l = s.length ? this.mapViewport(this.viewport, e.changes) : this.viewport; (r && (r.range.head < l.from || r.range.head > l.to) || !this.viewportIsAppropriate(l)) && (l = this.getViewport(0, r)); let u = l.from != this.viewport.from || l.to != this.viewport.to; - this.viewport = l, e.flags |= this.updateForViewport(), (u || !e.changes.empty || e.flags & 2) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 2e3 << 1) && this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, e.changes))), e.flags |= this.computeVisibleRanges(e.changes), r && (this.scrollTarget = r), !this.mustEnforceCursorAssoc && e.selectionSet && e.view.lineWrapping && e.state.selection.main.empty && e.state.selection.main.assoc && !e.state.facet(Ise) && (this.mustEnforceCursorAssoc = !0); + this.viewport = l, e.flags |= this.updateForViewport(), (u || !e.changes.empty || e.flags & 2) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 2e3 << 1) && this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, e.changes))), e.flags |= this.computeVisibleRanges(e.changes), r && (this.scrollTarget = r), !this.mustEnforceCursorAssoc && e.selectionSet && e.view.lineWrapping && e.state.selection.main.empty && e.state.selection.main.assoc && !e.state.facet(Nse) && (this.mustEnforceCursorAssoc = !0); } measure(e) { let r = e.contentDOM, n = window.getComputedStyle(r), i = this.heightOracle, s = n.whiteSpace; - this.defaultTextDirection = n.direction == "rtl" ? Xn.RTL : Xn.LTR; + this.defaultTextDirection = n.direction == "rtl" ? Gn.RTL : Gn.LTR; let a = this.heightOracle.mustRefreshForWrapping(s), o = r.getBoundingClientRect(), l = a || this.mustMeasureContent || this.contentDOMHeight != o.height; this.contentDOMHeight = o.height, this.mustMeasureContent = !1; let u = 0, h = 0; if (o.width && o.height) { - let { scaleX: O, scaleY: S } = cse(r, o); + let { scaleX: O, scaleY: S } = lse(r, o); (O > 5e-3 && Math.abs(this.scaleX - O) > 5e-3 || S > 5e-3 && Math.abs(this.scaleY - S) > 5e-3) && (this.scaleX = O, this.scaleY = S, u |= 16, a = l = !0); } let f = (parseInt(n.paddingTop) || 0) * this.scaleY, d = (parseInt(n.paddingBottom) || 0) * this.scaleY; (this.paddingTop != f || this.paddingBottom != d) && (this.paddingTop = f, this.paddingBottom = d, u |= 18), this.editorWidth != e.scrollDOM.clientWidth && (i.lineWrapping && (l = !0), this.editorWidth = e.scrollDOM.clientWidth, u |= 16); let p = e.scrollDOM.scrollTop * this.scaleY; - this.scrollTop != p && (this.scrollAnchorHeight = -1, this.scrollTop = p), this.scrolledToBottom = fse(e.scrollDOM); - let g = (this.printing ? jCe : HCe)(r, this.paddingTop), m = g.top - this.pixelViewport.top, v = g.bottom - this.pixelViewport.bottom; + this.scrollTop != p && (this.scrollAnchorHeight = -1, this.scrollTop = p), this.scrolledToBottom = hse(e.scrollDOM); + let g = (this.printing ? sEe : nEe)(r, this.paddingTop), m = g.top - this.pixelViewport.top, v = g.bottom - this.pixelViewport.bottom; this.pixelViewport = g; let y = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left; - if (y != this.inView && (this.inView = y, y && (l = !0)), !this.inView && !this.scrollTarget && !XCe(e.dom)) + if (y != this.inView && (this.inView = y, y && (l = !0)), !this.inView && !this.scrollTarget && !iEe(e.dom)) return 0; let b = o.width; if ((this.contentDOMWidth != b || this.editorHeight != e.scrollDOM.clientHeight) && (this.contentDOMWidth = o.width, this.editorHeight = e.scrollDOM.clientHeight, u |= 16), l) { @@ -7833,12 +7833,12 @@ class iW { let { lineHeight: S, charWidth: C, textHeight: T } = e.docView.measureTextSize(); a = S > 0 && i.refresh(s, S, C, T, b / C, O), a && (e.docView.minWidth = 0, u |= 16); } - m > 0 && v > 0 ? h = Math.max(m, v) : m < 0 && v < 0 && (h = Math.min(m, v)), rW(); + m > 0 && v > 0 ? h = Math.max(m, v) : m < 0 && v < 0 && (h = Math.min(m, v)), sW(); for (let S of this.viewports) { let C = S.from == this.viewport.from ? O : e.docView.measureVisibleLineHeights(S); - this.heightMap = (a ? ho.empty().applyChanges(this.stateDeco, nn.empty, this.heightOracle, [new oc(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, a, new QCe(S.from, C)); + this.heightMap = (a ? co.empty().applyChanges(this.stateDeco, nn.empty, this.heightOracle, [new tc(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, a, new KCe(S.from, C)); } - dv && (u |= 2); + cv && (u |= 2); } let w = !this.viewportIsAppropriate(this.viewport, h) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to); return w && (u & 2 && (u |= this.updateScaler()), this.viewport = this.getViewport(h, this.scrollTarget), u |= this.updateForViewport()), (u & 2 || w) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 2e3 << 1) && this.updateLineGaps(this.ensureLineGaps(a ? [] : this.lineGaps, e)), u |= this.computeVisibleRanges(), this.mustEnforceCursorAssoc && (this.mustEnforceCursorAssoc = !1, e.docView.enforceCursorAssoc()), u; @@ -7850,24 +7850,24 @@ class iW { return this.scaler.fromDOM(this.pixelViewport.bottom); } getViewport(e, r) { - let n = 0.5 - Math.max(-0.5, Math.min(0.5, e / 1e3 / 2)), i = this.heightMap, s = this.heightOracle, { visibleTop: a, visibleBottom: o } = this, l = new j4(i.lineAt(a - n * 1e3, ti.ByHeight, s, 0, 0).from, i.lineAt(o + (1 - n) * 1e3, ti.ByHeight, s, 0, 0).to); + let n = 0.5 - Math.max(-0.5, Math.min(0.5, e / 1e3 / 2)), i = this.heightMap, s = this.heightOracle, { visibleTop: a, visibleBottom: o } = this, l = new B4(i.lineAt(a - n * 1e3, Jn.ByHeight, s, 0, 0).from, i.lineAt(o + (1 - n) * 1e3, Jn.ByHeight, s, 0, 0).to); if (r) { let { head: u } = r.range; if (u < l.from || u > l.to) { - let h = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top), f = i.lineAt(u, ti.ByPos, s, 0, 0), d; - r.y == "center" ? d = (f.top + f.bottom) / 2 - h / 2 : r.y == "start" || r.y == "nearest" && u < l.from ? d = f.top : d = f.bottom - h, l = new j4(i.lineAt(d - 1e3 / 2, ti.ByHeight, s, 0, 0).from, i.lineAt(d + h + 1e3 / 2, ti.ByHeight, s, 0, 0).to); + let h = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top), f = i.lineAt(u, Jn.ByPos, s, 0, 0), d; + r.y == "center" ? d = (f.top + f.bottom) / 2 - h / 2 : r.y == "start" || r.y == "nearest" && u < l.from ? d = f.top : d = f.bottom - h, l = new B4(i.lineAt(d - 1e3 / 2, Jn.ByHeight, s, 0, 0).from, i.lineAt(d + h + 1e3 / 2, Jn.ByHeight, s, 0, 0).to); } } return l; } mapViewport(e, r) { let n = r.mapPos(e.from, -1), i = r.mapPos(e.to, 1); - return new j4(this.heightMap.lineAt(n, ti.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(i, ti.ByPos, this.heightOracle, 0, 0).to); + return new B4(this.heightMap.lineAt(n, Jn.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(i, Jn.ByPos, this.heightOracle, 0, 0).to); } viewportIsAppropriate({ from: e, to: r }, n = 0) { if (!this.inView) return !0; - let { top: i } = this.heightMap.lineAt(e, ti.ByPos, this.heightOracle, 0, 0), { bottom: s } = this.heightMap.lineAt(r, ti.ByPos, this.heightOracle, 0, 0), { visibleTop: a, visibleBottom: o } = this; + let { top: i } = this.heightMap.lineAt(e, Jn.ByPos, this.heightOracle, 0, 0), { bottom: s } = this.heightMap.lineAt(r, Jn.ByPos, this.heightOracle, 0, 0), { visibleTop: a, visibleBottom: o } = this; return (e == 0 || i <= a - Math.max(10, Math.min(-n, 250))) && (r == this.state.doc.length || s >= o + Math.max(10, Math.min(n, 250))) && i > a - 2 * 1e3 && s < o + 2 * 1e3; } mapLineGaps(e, r) { @@ -7875,12 +7875,12 @@ class iW { return e; let n = []; for (let i of e) - r.touchesRange(i.from, i.to) || n.push(new H7(r.mapPos(i.from), r.mapPos(i.to), i.size, i.displaySize)); + r.touchesRange(i.from, i.to) || n.push(new N7(r.mapPos(i.from), r.mapPos(i.to), i.size, i.displaySize)); return n; } ensureLineGaps(e, r) { let n = this.heightOracle.lineWrapping, i = n ? 1e4 : 2e3, s = i >> 1, a = i << 1; - if (this.defaultTextDirection != Xn.LTR && !n) + if (this.defaultTextDirection != Gn.LTR && !n) return []; let o = [], l = (h, f, d, p) => { if (f - h < s) @@ -7892,31 +7892,31 @@ class iW { l(h, y - 10, d, p), l(y + 10, f, d, p); return; } - let v = JCe(e, (y) => y.from >= d.from && y.to <= d.to && Math.abs(y.from - h) < s && Math.abs(y.to - f) < s && !m.some((b) => y.from < b && y.to > b)); + let v = lEe(e, (y) => y.from >= d.from && y.to <= d.to && Math.abs(y.from - h) < s && Math.abs(y.to - f) < s && !m.some((b) => y.from < b && y.to > b)); if (!v) { if (f < d.to && r && n && r.visibleRanges.some((w) => w.from <= f && w.to >= f)) { - let w = r.moveToLineBoundary(ft.cursor(f), !1, !0).head; + let w = r.moveToLineBoundary(ut.cursor(f), !1, !0).head; w > h && (f = w); } let y = this.gapSize(d, h, f, p), b = n || y < 2e6 ? y : 2e6; - v = new H7(h, f, y, b); + v = new N7(h, f, y, b); } o.push(v); }, u = (h) => { - if (h.length < a || h.type != uo.Text) + if (h.length < a || h.type != lo.Text) return; - let f = KCe(h.from, h.to, this.stateDeco); + let f = oEe(h.from, h.to, this.stateDeco); if (f.total < a) return; let d = this.scrollTarget ? this.scrollTarget.range.head : null, p, g; if (n) { let m = i / this.heightOracle.lineLength * this.heightOracle.lineHeight, v, y; if (d != null) { - let b = K4(f, d), w = ((this.visibleBottom - this.visibleTop) / 2 + m) / h.height; + let b = z4(f, d), w = ((this.visibleBottom - this.visibleTop) / 2 + m) / h.height; v = b - w, y = b + w; } else v = (this.visibleTop - h.top - m) / h.height, y = (this.visibleBottom - h.top + m) / h.height; - p = Z4(f, v), g = Z4(f, y); + p = F4(f, v), g = F4(f, y); } else { let m = f.total * this.heightOracle.charWidth, v = i * this.heightOracle.charWidth, y = 0; if (m > 2e6) @@ -7924,11 +7924,11 @@ class iW { C.from >= h.from && C.from < h.to && C.size != C.displaySize && C.from * this.heightOracle.charWidth + y < this.pixelViewport.left && (y = C.size - C.displaySize); let b = this.pixelViewport.left + y, w = this.pixelViewport.right + y, O, S; if (d != null) { - let C = K4(f, d), T = ((w - b) / 2 + v) / m; + let C = z4(f, d), T = ((w - b) / 2 + v) / m; O = C - T, S = C + T; } else O = (b - v) / m, S = (w + v) / m; - p = Z4(f, O), g = Z4(f, S); + p = F4(f, O), g = F4(f, S); } p > h.from && l(h.from, p, h, f), g < h.to && l(g, h.to, h, f); }; @@ -7937,17 +7937,17 @@ class iW { return o; } gapSize(e, r, n, i) { - let s = K4(i, n) - K4(i, r); + let s = z4(i, n) - z4(i, r); return this.heightOracle.lineWrapping ? e.height * s : i.total * this.heightOracle.charWidth * s; } updateLineGaps(e) { - H7.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = Ht.set(e.map((r) => r.draw(this, this.heightOracle.lineWrapping)))); + N7.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = Gt.set(e.map((r) => r.draw(this, this.heightOracle.lineWrapping)))); } computeVisibleRanges(e) { let r = this.stateDeco; this.lineGaps.length && (r = r.concat(this.lineGapDeco)); let n = []; - jr.spans(r, this.viewport.from, this.viewport.to, { + Zr.spans(r, this.viewport.from, this.viewport.to, { span(s, a) { n.push({ from: s, to: a }); }, @@ -7965,17 +7965,17 @@ class iW { return this.visibleRanges = n, i; } lineBlockAt(e) { - return e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((r) => r.from <= e && r.to >= e) || _b(this.heightMap.lineAt(e, ti.ByPos, this.heightOracle, 0, 0), this.scaler); + return e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((r) => r.from <= e && r.to >= e) || yb(this.heightMap.lineAt(e, Jn.ByPos, this.heightOracle, 0, 0), this.scaler); } lineBlockAtHeight(e) { - return e >= this.viewportLines[0].top && e <= this.viewportLines[this.viewportLines.length - 1].bottom && this.viewportLines.find((r) => r.top <= e && r.bottom >= e) || _b(this.heightMap.lineAt(this.scaler.fromDOM(e), ti.ByHeight, this.heightOracle, 0, 0), this.scaler); + return e >= this.viewportLines[0].top && e <= this.viewportLines[this.viewportLines.length - 1].bottom && this.viewportLines.find((r) => r.top <= e && r.bottom >= e) || yb(this.heightMap.lineAt(this.scaler.fromDOM(e), Jn.ByHeight, this.heightOracle, 0, 0), this.scaler); } scrollAnchorAt(e) { let r = this.lineBlockAtHeight(e + 8); return r.from >= this.viewport.from || this.viewportLines[0].top - e > 200 ? r : this.viewportLines[0]; } elementAtHeight(e) { - return _b(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler); + return yb(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler); } get docHeight() { return this.scaler.toDOM(this.heightMap.height); @@ -7984,14 +7984,14 @@ class iW { return this.docHeight + this.paddingTop + this.paddingBottom; } } -class j4 { +class B4 { constructor(e, r) { this.from = e, this.to = r; } } -function KCe(t, e, r) { +function oEe(t, e, r) { let n = [], i = t, s = 0; - return jr.spans(r, t, e, { + return Zr.spans(r, t, e, { span() { }, point(a, o) { @@ -7999,7 +7999,7 @@ function KCe(t, e, r) { } }, 20), i < e && (n.push({ from: i, to: e }), s += e - i), { total: s, ranges: n }; } -function Z4({ total: t, ranges: e }, r) { +function F4({ total: t, ranges: e }, r) { if (r <= 0) return e[0].from; if (r >= 1) @@ -8012,7 +8012,7 @@ function Z4({ total: t, ranges: e }, r) { n -= o; } } -function K4(t, e) { +function z4(t, e) { let r = 0; for (let { from: n, to: i } of t.ranges) { if (e <= i) { @@ -8023,12 +8023,12 @@ function K4(t, e) { } return r / t.total; } -function JCe(t, e) { +function lEe(t, e) { for (let r of t) if (e(r)) return r; } -const sW = { +const lW = { toDOM(t) { return t; }, @@ -8040,11 +8040,11 @@ const sW = { return t == this; } }; -class D$ { +class C$ { constructor(e, r, n) { let i = 0, s = 0, a = 0; this.viewports = n.map(({ from: o, to: l }) => { - let u = r.lineAt(o, ti.ByPos, e, 0, 0).top, h = r.lineAt(l, ti.ByPos, e, 0, 0).bottom; + let u = r.lineAt(o, Jn.ByPos, e, 0, 0).top, h = r.lineAt(l, Jn.ByPos, e, 0, 0).bottom; return i += h - u, { from: o, to: l, top: u, bottom: h, domTop: 0, domBottom: 0 }; }), this.scale = (7e6 - i) / (r.height - i); for (let o of this.viewports) @@ -8071,18 +8071,18 @@ class D$ { } } eq(e) { - return e instanceof D$ ? this.scale == e.scale && this.viewports.length == e.viewports.length && this.viewports.every((r, n) => r.from == e.viewports[n].from && r.to == e.viewports[n].to) : !1; + return e instanceof C$ ? this.scale == e.scale && this.viewports.length == e.viewports.length && this.viewports.every((r, n) => r.from == e.viewports[n].from && r.to == e.viewports[n].to) : !1; } } -function _b(t, e) { +function yb(t, e) { if (e.scale == 1) return t; let r = e.toDOM(t.top), n = e.toDOM(t.bottom); - return new qu(t.from, t.length, r, n - r, Array.isArray(t._content) ? t._content.map((i) => _b(i, e)) : t._content); + return new Iu(t.from, t.length, r, n - r, Array.isArray(t._content) ? t._content.map((i) => yb(i, e)) : t._content); } -const J4 = /* @__PURE__ */ Gt.define({ combine: (t) => t.join(" ") }), jM = /* @__PURE__ */ Gt.define({ combine: (t) => t.indexOf(!0) > -1 }), ZM = /* @__PURE__ */ Tf.newName(), tae = /* @__PURE__ */ Tf.newName(), rae = /* @__PURE__ */ Tf.newName(), nae = { "&light": "." + tae, "&dark": "." + rae }; -function KM(t, e, r) { - return new Tf(e, { +const q4 = /* @__PURE__ */ Yt.define({ combine: (t) => t.join(" ") }), IM = /* @__PURE__ */ Yt.define({ combine: (t) => t.indexOf(!0) > -1 }), $M = /* @__PURE__ */ xf.newName(), eae = /* @__PURE__ */ xf.newName(), tae = /* @__PURE__ */ xf.newName(), rae = { "&light": "." + eae, "&dark": "." + tae }; +function BM(t, e, r) { + return new xf(e, { finish(n) { return /&/.test(n) ? n.replace(/&\w*/, (i) => { if (i == "&") @@ -8094,7 +8094,7 @@ function KM(t, e, r) { } }); } -const eEe = /* @__PURE__ */ KM("." + ZM, { +const cEe = /* @__PURE__ */ BM("." + $M, { "&": { position: "relative !important", boxSizing: "border-box", @@ -8328,20 +8328,20 @@ const eEe = /* @__PURE__ */ KM("." + ZM, { border: "1px solid #555", backgroundColor: "inherit" } -}, nae), tEe = { +}, rae), uEe = { childList: !0, characterData: !0, subtree: !0, attributes: !0, characterDataOldValue: !0 -}, X7 = nr.ie && nr.ie_version <= 11; -class rEe { +}, I7 = nr.ie && nr.ie_version <= 11; +class hEe { constructor(e) { - this.view = e, this.active = !1, this.editContext = null, this.selectionRange = new FTe(), this.selectionChanged = !1, this.delayedFlush = -1, this.resizeTimeout = -1, this.queue = [], this.delayedAndroidKey = null, this.flushingAndroidKey = -1, this.lastChange = 0, this.scrollTargets = [], this.intersection = null, this.resizeScroll = null, this.intersecting = !1, this.gapIntersection = null, this.gaps = [], this.printQuery = null, this.parentCheck = -1, this.dom = e.contentDOM, this.observer = new MutationObserver((r) => { + this.view = e, this.active = !1, this.editContext = null, this.selectionRange = new HTe(), this.selectionChanged = !1, this.delayedFlush = -1, this.resizeTimeout = -1, this.queue = [], this.delayedAndroidKey = null, this.flushingAndroidKey = -1, this.lastChange = 0, this.scrollTargets = [], this.intersection = null, this.resizeScroll = null, this.intersecting = !1, this.gapIntersection = null, this.gaps = [], this.printQuery = null, this.parentCheck = -1, this.dom = e.contentDOM, this.observer = new MutationObserver((r) => { for (let n of r) this.queue.push(n); (nr.ie && nr.ie_version <= 11 || nr.ios && e.composing) && r.some((n) => n.type == "childList" && n.removedNodes.length || n.type == "characterData" && n.oldValue.length > n.target.nodeValue.length) ? this.flushSoon() : this.flush(); - }), window.EditContext && e.constructor.EDIT_CONTEXT !== !1 && !(nr.chrome && nr.chrome_version < 126) && (this.editContext = new iEe(e), e.state.facet(sf) && (e.contentDOM.editContext = this.editContext.editContext)), X7 && (this.onCharData = (r) => { + }), window.EditContext && e.constructor.EDIT_CONTEXT !== !1 && !(nr.chrome && nr.chrome_version < 126) && (this.editContext = new dEe(e), e.state.facet(Kh) && (e.contentDOM.editContext = this.editContext.editContext)), I7 && (this.onCharData = (r) => { this.queue.push({ target: r.target, type: "characterData", @@ -8385,24 +8385,24 @@ class rEe { if (!this.readSelectionRange() || this.delayedAndroidKey) return; let { view: n } = this, i = this.selectionRange; - if (n.state.facet(sf) ? n.root.activeElement != this.dom : !W5(this.dom, i)) + if (n.state.facet(Kh) ? n.root.activeElement != this.dom : !L5(this.dom, i)) return; let s = i.anchorNode && n.docView.nearest(i.anchorNode); if (s && s.ignoreEvent(e)) { r || (this.selectionChanged = !1); return; } - (nr.ie && nr.ie_version <= 11 || nr.android && nr.chrome) && !n.state.selection.main.empty && i.focusNode && sx(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset) ? this.flushSoon() : this.flush(!1); + (nr.ie && nr.ie_version <= 11 || nr.android && nr.chrome) && !n.state.selection.main.empty && i.focusNode && Zb(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset) ? this.flushSoon() : this.flush(!1); } readSelectionRange() { - let { view: e } = this, r = zx(e.root); + let { view: e } = this, r = Lx(e.root); if (!r) return !1; - let n = nr.safari && e.root.nodeType == 11 && e.root.activeElement == this.dom && nEe(this.view, r) || r; + let n = nr.safari && e.root.nodeType == 11 && e.root.activeElement == this.dom && fEe(this.view, r) || r; if (!n || this.selectionRange.eq(n)) return !1; - let i = W5(this.dom, n); - return i && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && qTe(this.dom, n) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(n), i && (this.selectionChanged = !0), !0); + let i = L5(this.dom, n); + return i && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && ZTe(this.dom, n) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(n), i && (this.selectionChanged = !0), !0); } setSelectionRange(e, r) { this.selectionRange.set(e.node, e.offset, r.node, r.offset), this.selectionChanged = !1; @@ -8437,10 +8437,10 @@ class rEe { } } start() { - this.active || (this.observer.observe(this.dom, tEe), X7 && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0); + this.active || (this.observer.observe(this.dom, uEe), I7 && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0); } stop() { - !this.active || (this.active = !1, this.observer.disconnect(), X7 && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData)); + !this.active || (this.active = !1, this.observer.disconnect(), I7 && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData)); } clear() { this.processRecords(), this.queue.length = 0, this.selectionChanged = !1; @@ -8450,7 +8450,7 @@ class rEe { if (!this.delayedAndroidKey) { let i = () => { let s = this.delayedAndroidKey; - s && (this.clearDelayedAndroidKey(), this.view.inputState.lastKeyCode = s.keyCode, this.view.inputState.lastKeyTime = Date.now(), !this.flush() && s.force && R1(this.dom, s.key, s.keyCode)); + s && (this.clearDelayedAndroidKey(), this.view.inputState.lastKeyCode = s.keyCode, this.view.inputState.lastKeyTime = Date.now(), !this.flush() && s.force && T1(this.dom, s.key, s.keyCode)); }; this.flushingAndroidKey = this.view.win.requestAnimationFrame(i); } @@ -8487,11 +8487,11 @@ class rEe { return { from: r, to: n, typeOver: i }; } readChange() { - let { from: e, to: r, typeOver: n } = this.processRecords(), i = this.selectionChanged && W5(this.dom, this.selectionRange); + let { from: e, to: r, typeOver: n } = this.processRecords(), i = this.selectionChanged && L5(this.dom, this.selectionRange); if (e < 0 && !i) return null; e > -1 && (this.lastChange = Date.now()), this.view.inputState.lastFocusTime = 0, this.selectionChanged = !1; - let s = new xCe(this.view, e, r, n); + let s = new ACe(this.view, e, r, n); return this.view.docView.domChanged = { newSel: s.newSel ? s.newSel.main : null }, s; } flush(e = !0) { @@ -8501,7 +8501,7 @@ class rEe { let r = this.readChange(); if (!r) return this.view.requestMeasure(), !1; - let n = this.view.state, i = Wse(this.view, r); + let n = this.view.state, i = Vse(this.view, r); return this.view.state == n && (r.domChanged || r.newSel && !r.newSel.main.eq(this.view.state.selection.main)) && this.view.update([]), i; } readMutation(e) { @@ -8509,7 +8509,7 @@ class rEe { if (!r || r.ignoreMutation(e)) return null; if (r.markDirty(e.type == "attributes"), e.type == "attributes" && (r.flags |= 4), e.type == "childList") { - let n = aW(r, e.previousSibling || e.target.previousSibling, -1), i = aW(r, e.nextSibling || e.target.nextSibling, 1); + let n = cW(r, e.previousSibling || e.target.previousSibling, -1), i = cW(r, e.nextSibling || e.target.nextSibling, 1); return { from: n ? r.posAfter(n) : r.posAtStart, to: i ? r.posBefore(i) : r.posAtEnd, @@ -8528,7 +8528,7 @@ class rEe { e.removeEventListener("scroll", this.onScroll), e.removeEventListener("resize", this.onResize), this.printQuery ? this.printQuery.removeEventListener ? this.printQuery.removeEventListener("change", this.onPrint) : this.printQuery.removeListener(this.onPrint) : e.removeEventListener("beforeprint", this.onPrint), e.document.removeEventListener("selectionchange", this.onSelectionChange); } update(e) { - this.editContext && (this.editContext.update(e), e.startState.facet(sf) != e.state.facet(sf) && (e.view.contentDOM.editContext = e.state.facet(sf) ? this.editContext.editContext : null)); + this.editContext && (this.editContext.update(e), e.startState.facet(Kh) != e.state.facet(Kh) && (e.view.contentDOM.editContext = e.state.facet(Kh) ? this.editContext.editContext : null)); } destroy() { var e, r, n; @@ -8538,9 +8538,9 @@ class rEe { this.removeWindowListeners(this.win), clearTimeout(this.parentCheck), clearTimeout(this.resizeTimeout), this.win.cancelAnimationFrame(this.delayedFlush), this.win.cancelAnimationFrame(this.flushingAndroidKey), this.editContext && (this.view.contentDOM.editContext = null, this.editContext.destroy()); } } -function aW(t, e, r) { +function cW(t, e, r) { for (; e; ) { - let n = Fn.get(e); + let n = Bn.get(e); if (n && n.parent == t) return n; let i = e.parentNode; @@ -8548,23 +8548,23 @@ function aW(t, e, r) { } return null; } -function oW(t, e) { +function uW(t, e) { let r = e.startContainer, n = e.startOffset, i = e.endContainer, s = e.endOffset, a = t.docView.domAtPos(t.state.selection.main.anchor); - return sx(a.node, a.offset, i, s) && ([r, n, i, s] = [i, s, r, n]), { anchorNode: r, anchorOffset: n, focusNode: i, focusOffset: s }; + return Zb(a.node, a.offset, i, s) && ([r, n, i, s] = [i, s, r, n]), { anchorNode: r, anchorOffset: n, focusNode: i, focusOffset: s }; } -function nEe(t, e) { +function fEe(t, e) { if (e.getComposedRanges) { let i = e.getComposedRanges(t.root)[0]; if (i) - return oW(t, i); + return uW(t, i); } let r = null; function n(i) { i.preventDefault(), i.stopImmediatePropagation(), r = i.getTargetRanges()[0]; } - return t.contentDOM.addEventListener("beforeinput", n, !0), t.dom.ownerDocument.execCommand("indent"), t.contentDOM.removeEventListener("beforeinput", n, !0), r ? oW(t, r) : null; + return t.contentDOM.addEventListener("beforeinput", n, !0), t.dom.ownerDocument.execCommand("indent"), t.contentDOM.removeEventListener("beforeinput", n, !0), r ? uW(t, r) : null; } -class iEe { +class dEe { constructor(e) { this.from = 0, this.to = 0, this.pendingContextChange = null, this.handlers = /* @__PURE__ */ Object.create(null), this.composing = null, this.resetRange(e.state); let r = this.editContext = new window.EditContext({ @@ -8578,13 +8578,13 @@ class iEe { let u = { from: o, to: l, insert: nn.of(n.text.split(` `)) }; if (u.from == this.from && s < this.from ? u.from = s : u.to == this.to && s > this.to && (u.to = s), u.from == u.to && !u.insert.length) { - let h = ft.single(this.toEditorPos(n.selectionStart), this.toEditorPos(n.selectionEnd)); + let h = ut.single(this.toEditorPos(n.selectionStart), this.toEditorPos(n.selectionEnd)); h.main.eq(i) || e.dispatch({ selection: h, userEvent: "select" }); return; } if ((nr.mac || nr.android) && u.from == a - 1 && /^\. ?$/.test(n.text) && e.contentDOM.getAttribute("autocorrect") == "off" && (u = { from: o, to: l, insert: nn.of([n.text.replace(".", " ")]) }), this.pendingContextChange = u, !e.state.readOnly) { let h = this.to - this.from + (u.to - u.from + u.insert.length); - L$(e, u, ft.single(this.toEditorPos(n.selectionStart, h), this.toEditorPos(n.selectionEnd, h))); + S$(e, u, ut.single(this.toEditorPos(n.selectionStart, h), this.toEditorPos(n.selectionEnd, h))); } this.pendingContextChange && (this.revertPending(e.state), this.setSelection(e.state)); }, this.handlers.characterboundsupdate = (n) => { @@ -8602,11 +8602,11 @@ class iEe { let l = this.toEditorPos(s.rangeStart), u = this.toEditorPos(s.rangeEnd); if (l < u) { let h = `text-decoration: underline ${a == "Dashed" ? "dashed " : a == "Squiggle" ? "wavy " : ""}${o == "Thin" ? 1 : 2}px`; - i.push(Ht.mark({ attributes: { style: h } }).range(l, u)); + i.push(Gt.mark({ attributes: { style: h } }).range(l, u)); } } } - e.dispatch({ effects: Bse.of(Ht.set(i)) }); + e.dispatch({ effects: $se.of(Gt.set(i)) }); }, this.handlers.compositionstart = () => { e.inputState.composing < 0 && (e.inputState.composing = 0, e.inputState.compositionFirstChange = !0); }, this.handlers.compositionend = () => { @@ -8619,7 +8619,7 @@ class iEe { r.addEventListener(n, this.handlers[n]); this.measureReq = { read: (n) => { this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect()); - let i = zx(n.root); + let i = Lx(n.root); i && i.rangeCount && this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect()); } }; } @@ -8684,7 +8684,7 @@ class iEe { this.editContext.removeEventListener(e, this.handlers[e]); } } -class Mt { +class Rt { get state() { return this.viewState.state; } @@ -8713,13 +8713,13 @@ class Mt { var r; this.plugins = [], this.pluginMap = /* @__PURE__ */ new Map(), this.editorAttrs = {}, this.contentAttrs = {}, this.bidiCache = [], this.destroyed = !1, this.updateState = 2, this.measureScheduled = -1, this.measureRequests = [], this.contentDOM = document.createElement("div"), this.scrollDOM = document.createElement("div"), this.scrollDOM.tabIndex = -1, this.scrollDOM.className = "cm-scroller", this.scrollDOM.appendChild(this.contentDOM), this.announceDOM = document.createElement("div"), this.announceDOM.className = "cm-announced", this.announceDOM.setAttribute("aria-live", "polite"), this.dom = document.createElement("div"), this.dom.appendChild(this.announceDOM), this.dom.appendChild(this.scrollDOM), e.parent && e.parent.appendChild(this.dom); let { dispatch: n } = e; - this.dispatchTransactions = e.dispatchTransactions || n && ((i) => i.forEach((s) => n(s, this))) || ((i) => this.update(i)), this.dispatch = this.dispatch.bind(this), this._root = e.root || zTe(e.parent) || document, this.viewState = new iW(e.state || qr.create(e)), e.scrollTo && e.scrollTo.is(G4) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(Tb).map((i) => new W7(i)); + this.dispatchTransactions = e.dispatchTransactions || n && ((i) => i.forEach((s) => n(s, this))) || ((i) => this.update(i)), this.dispatch = this.dispatch.bind(this), this._root = e.root || XTe(e.parent) || document, this.viewState = new oW(e.state || qr.create(e)), e.scrollTo && e.scrollTo.is(N4) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(gb).map((i) => new M7(i)); for (let i of this.plugins) i.update(this); - this.observer = new rEe(this), this.inputState = new TCe(this), this.inputState.ensureHandlers(this.plugins), this.docView = new FV(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure(), !((r = document.fonts) === null || r === void 0) && r.ready && document.fonts.ready.then(() => this.requestMeasure()); + this.observer = new hEe(this), this.inputState = new PCe(this), this.inputState.ensureHandlers(this.plugins), this.docView = new UV(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure(), !((r = document.fonts) === null || r === void 0) && r.ready && document.fonts.ready.then(() => this.requestMeasure()); } dispatch(...e) { - let r = e.length == 1 && e[0] instanceof Fi ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)]; + let r = e.length == 1 && e[0] instanceof Bi ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)]; this.dispatchTransactions(r, this); } update(e) { @@ -8736,35 +8736,35 @@ class Mt { return; } let a = this.hasFocus, o = 0, l = null; - e.some((d) => d.annotation(Zse)) ? (this.inputState.notifiedFocused = a, o = 1) : a != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = a, l = Kse(s, a), l || (o = 1)); + e.some((d) => d.annotation(Zse)) ? (this.inputState.notifiedFocused = a, o = 1) : a != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = a, l = jse(s, a), l || (o = 1)); let u = this.observer.delayedAndroidKey, h = null; if (u ? (this.observer.clearDelayedAndroidKey(), h = this.observer.readChange(), (h && !this.state.doc.eq(s.doc) || !this.state.selection.eq(s.selection)) && (h = null)) : this.observer.clear(), s.facet(qr.phrases) != this.state.facet(qr.phrases)) return this.setState(s); - i = uT.create(this, s, e), i.flags |= o; + i = X3.create(this, s, e), i.flags |= o; let f = this.viewState.scrollTarget; try { this.updateState = 2; for (let d of e) { if (f && (f = f.map(d.changes)), d.scrollIntoView) { let { main: p } = d.state.selection; - f = new L1(p.empty ? p : ft.cursor(p.head, p.head > p.anchor ? -1 : 1)); + f = new C1(p.empty ? p : ut.cursor(p.head, p.head > p.anchor ? -1 : 1)); } for (let p of d.effects) - p.is(G4) && (f = p.value.clip(this.state)); + p.is(N4) && (f = p.value.clip(this.state)); } - this.viewState.update(i, f), this.bidiCache = fT.update(this.bidiCache, i.changes), i.empty || (this.updatePlugins(i), this.inputState.update(i)), r = this.docView.update(i), this.state.facet(Cb) != this.styleModules && this.mountStyles(), n = this.updateAttrs(), this.showAnnouncements(e), this.docView.updateSelection(r, e.some((d) => d.isUserEvent("select.pointer"))); + this.viewState.update(i, f), this.bidiCache = j3.update(this.bidiCache, i.changes), i.empty || (this.updatePlugins(i), this.inputState.update(i)), r = this.docView.update(i), this.state.facet(mb) != this.styleModules && this.mountStyles(), n = this.updateAttrs(), this.showAnnouncements(e), this.docView.updateSelection(r, e.some((d) => d.isUserEvent("select.pointer"))); } finally { this.updateState = 0; } - if (i.startState.facet(J4) != i.state.facet(J4) && (this.viewState.mustMeasureContent = !0), (r || n || f || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), r && this.docViewUpdate(), !i.empty) - for (let d of this.state.facet(YM)) + if (i.startState.facet(q4) != i.state.facet(q4) && (this.viewState.mustMeasureContent = !0), (r || n || f || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), r && this.docViewUpdate(), !i.empty) + for (let d of this.state.facet(MM)) try { d(i); } catch (p) { - Wo(this.state, p, "update listener"); + qo(this.state, p, "update listener"); } (l || h) && Promise.resolve().then(() => { - l && this.state == l.startState && this.dispatch(l), h && !Wse(this, h) && u.force && R1(this.contentDOM, u.key, u.keyCode); + l && this.state == l.startState && this.dispatch(l), h && !Vse(this, h) && u.force && T1(this.contentDOM, u.key, u.keyCode); }); } setState(e) { @@ -8779,23 +8779,23 @@ class Mt { try { for (let n of this.plugins) n.destroy(this); - this.viewState = new iW(e), this.plugins = e.facet(Tb).map((n) => new W7(n)), this.pluginMap.clear(); + this.viewState = new oW(e), this.plugins = e.facet(gb).map((n) => new M7(n)), this.pluginMap.clear(); for (let n of this.plugins) n.update(this); - this.docView.destroy(), this.docView = new FV(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = []; + this.docView.destroy(), this.docView = new UV(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = []; } finally { this.updateState = 0; } r && this.focus(), this.requestMeasure(); } updatePlugins(e) { - let r = e.startState.facet(Tb), n = e.state.facet(Tb); + let r = e.startState.facet(gb), n = e.state.facet(gb); if (r != n) { let i = []; for (let s of n) { let a = r.indexOf(s); if (a < 0) - i.push(new W7(s)); + i.push(new M7(s)); else { let o = this.plugins[a]; o.mustUpdate = e, i.push(o); @@ -8818,7 +8818,7 @@ class Mt { try { r.docViewUpdate(this); } catch (n) { - Wo(this.state, n, "doc view update listener"); + qo(this.state, n, "doc view update listener"); } } } @@ -8835,7 +8835,7 @@ class Mt { try { for (let o = 0; ; o++) { if (a < 0) - if (fse(n)) + if (hse(n)) s = -1, a = this.viewState.heightMap.height; else { let p = this.viewState.scrollAnchorAt(i); @@ -8855,17 +8855,17 @@ class Mt { try { return p.read(this); } catch (g) { - return Wo(this.state, g), lW; + return qo(this.state, g), hW; } - }), f = uT.create(this, this.state, []), d = !1; + }), f = X3.create(this, this.state, []), d = !1; f.flags |= l, r ? r.flags |= l : r = f, this.updateState = 2, f.empty || (this.updatePlugins(f), this.inputState.update(f), this.updateAttrs(), d = this.docView.update(f), d && this.docViewUpdate()); for (let p = 0; p < u.length; p++) - if (h[p] != lW) + if (h[p] != hW) try { let g = u[p]; g.write && g.write(h[p], this); } catch (g) { - Wo(this.state, g); + qo(this.state, g); } if (d && this.docView.updateSelection(!0), !f.viewportChanged && this.measureRequests.length == 0) { if (this.viewState.editorHeight) @@ -8886,14 +8886,14 @@ class Mt { this.updateState = 0, this.measureScheduled = -1; } if (r && !r.empty) - for (let o of this.state.facet(YM)) + for (let o of this.state.facet(MM)) o(r); } get themeClasses() { - return ZM + " " + (this.state.facet(jM) ? rae : tae) + " " + this.state.facet(J4); + return $M + " " + (this.state.facet(IM) ? tae : eae) + " " + this.state.facet(q4); } updateAttrs() { - let e = cW(this, Fse, { + let e = fW(this, Bse, { class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses }), r = { spellcheck: "false", @@ -8901,15 +8901,15 @@ class Mt { autocapitalize: "off", writingsuggestions: "false", translate: "no", - contenteditable: this.state.facet(sf) ? "true" : "false", + contenteditable: this.state.facet(Kh) ? "true" : "false", class: "cm-content", style: `${nr.tabSize}: ${this.state.tabSize}`, role: "textbox", "aria-multiline": "true" }; - this.state.readOnly && (r["aria-readonly"] = "true"), cW(this, _$, r); + this.state.readOnly && (r["aria-readonly"] = "true"), fW(this, w$, r); let n = this.observer.ignore(() => { - let i = qM(this.contentDOM, this.contentAttrs, r), s = qM(this.dom, this.editorAttrs, e); + let i = EM(this.contentDOM, this.contentAttrs, r), s = EM(this.dom, this.editorAttrs, e); return i || s; }); return this.editorAttrs = e, this.contentAttrs = r, n; @@ -8918,16 +8918,16 @@ class Mt { let r = !0; for (let n of e) for (let i of n.effects) - if (i.is(Mt.announce)) { + if (i.is(Rt.announce)) { r && (this.announceDOM.textContent = ""), r = !1; let s = this.announceDOM.appendChild(document.createElement("div")); s.textContent = i.value; } } mountStyles() { - this.styleModules = this.state.facet(Cb); - let e = this.state.facet(Mt.cspNonce); - Tf.mount(this.root, this.styleModules.concat(eEe).reverse(), e ? { nonce: e } : void 0); + this.styleModules = this.state.facet(mb); + let e = this.state.facet(Rt.cspNonce); + xf.mount(this.root, this.styleModules.concat(cEe).reverse(), e ? { nonce: e } : void 0); } readMeasured() { if (this.updateState == 2) @@ -8980,20 +8980,20 @@ class Mt { return this.viewState.contentHeight; } moveByChar(e, r, n) { - return G7(this, e, VV(this, e, r, n)); + return P7(this, e, GV(this, e, r, n)); } moveByGroup(e, r) { - return G7(this, e, VV(this, e, r, (n) => mCe(this, e.head, n))); + return P7(this, e, GV(this, e, r, (n) => TCe(this, e.head, n))); } visualLineSide(e, r) { let n = this.bidiSpans(e), i = this.textDirectionAt(e.from), s = n[r ? n.length - 1 : 0]; - return ft.cursor(s.side(r, i) + e.from, s.forward(!r, i) ? 1 : -1); + return ut.cursor(s.side(r, i) + e.from, s.forward(!r, i) ? 1 : -1); } moveToLineBoundary(e, r, n = !0) { - return gCe(this, e, r, n); + return SCe(this, e, r, n); } moveVertically(e, r, n) { - return G7(this, e, vCe(this, e, r, n)); + return P7(this, e, CCe(this, e, r, n)); } domAtPos(e) { return this.docView.domAtPos(e); @@ -9002,15 +9002,15 @@ class Mt { return this.docView.posFromDOM(e, r); } posAtCoords(e, r = !0) { - return this.readMeasured(), Vse(this, e, r); + return this.readMeasured(), Qse(this, e, r); } coordsAtPos(e, r = 1) { this.readMeasured(); let n = this.docView.coordsAt(e, r); if (!n || n.left == n.right) return n; - let i = this.state.doc.lineAt(e), s = this.bidiSpans(i), a = s[Ld.find(s, e - i.from, -1, r)]; - return Q_(n, a.dir == Xn.LTR == r > 0); + let i = this.state.doc.lineAt(e), s = this.bidiSpans(i), a = s[Ed.find(s, e - i.from, -1, r)]; + return A_(n, a.dir == Gn.LTR == r > 0); } coordsForChar(e) { return this.readMeasured(), this.docView.coordsForChar(e); @@ -9025,21 +9025,21 @@ class Mt { return this.viewState.defaultTextDirection; } textDirectionAt(e) { - return !this.state.facet(Nse) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e)); + return !this.state.facet(Pse) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e)); } get lineWrapping() { return this.viewState.heightOracle.lineWrapping; } bidiSpans(e) { - if (e.length > sEe) - return Ese(e.length); + if (e.length > pEe) + return Cse(e.length); let r = this.textDirectionAt(e.from), n; for (let s of this.bidiCache) - if (s.from == e.from && s.dir == r && (s.fresh || Cse(s.isolates, n = BV(this, e)))) + if (s.from == e.from && s.dir == r && (s.fresh || Tse(s.isolates, n = qV(this, e)))) return s.order; - n || (n = BV(this, e)); - let i = JTe(e.text, r, n); - return this.bidiCache.push(new fT(e.from, e.to, r, n, !0, i)), i; + n || (n = qV(this, e)); + let i = lCe(e.text, r, n); + return this.bidiCache.push(new j3(e.from, e.to, r, n, !0, i)), i; } get hasFocus() { var e; @@ -9047,7 +9047,7 @@ class Mt { } focus() { this.observer.ignore(() => { - use(this.contentDOM), this.docView.updateSelection(); + cse(this.contentDOM), this.docView.updateSelection(); }); } setRoot(e) { @@ -9060,83 +9060,83 @@ class Mt { this.plugins = [], this.inputState.destroy(), this.docView.destroy(), this.dom.remove(), this.observer.destroy(), this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.destroyed = !0; } static scrollIntoView(e, r = {}) { - return G4.of(new L1(typeof e == "number" ? ft.cursor(e) : e, r.y, r.x, r.yMargin, r.xMargin)); + return N4.of(new C1(typeof e == "number" ? ut.cursor(e) : e, r.y, r.x, r.yMargin, r.xMargin)); } scrollSnapshot() { let { scrollTop: e, scrollLeft: r } = this.scrollDOM, n = this.viewState.scrollAnchorAt(e); - return G4.of(new L1(ft.cursor(n.from), "start", "start", n.top - e, r, !0)); + return N4.of(new C1(ut.cursor(n.from), "start", "start", n.top - e, r, !0)); } setTabFocusMode(e) { e == null ? this.inputState.tabFocusMode = this.inputState.tabFocusMode < 0 ? 0 : -1 : typeof e == "boolean" ? this.inputState.tabFocusMode = e ? 0 : -1 : this.inputState.tabFocusMode != 0 && (this.inputState.tabFocusMode = Date.now() + e); } static domEventHandlers(e) { - return fn.define(() => ({}), { eventHandlers: e }); + return hn.define(() => ({}), { eventHandlers: e }); } static domEventObservers(e) { - return fn.define(() => ({}), { eventObservers: e }); + return hn.define(() => ({}), { eventObservers: e }); } static theme(e, r) { - let n = Tf.newName(), i = [J4.of(n), Cb.of(KM(`.${n}`, e))]; - return r && r.dark && i.push(jM.of(!0)), i; + let n = xf.newName(), i = [q4.of(n), mb.of(BM(`.${n}`, e))]; + return r && r.dark && i.push(IM.of(!0)), i; } static baseTheme(e) { - return qa.lowest(Cb.of(KM("." + ZM, e, nae))); + return za.lowest(mb.of(BM("." + $M, e, rae))); } static findFromDOM(e) { var r; - let n = e.querySelector(".cm-content"), i = n && Fn.get(n) || Fn.get(e); + let n = e.querySelector(".cm-content"), i = n && Bn.get(n) || Bn.get(e); return ((r = i == null ? void 0 : i.rootView) === null || r === void 0 ? void 0 : r.view) || null; } } -Mt.styleModule = Cb; -Mt.inputHandler = Dse; -Mt.clipboardInputFilter = C$; -Mt.clipboardOutputFilter = E$; -Mt.scrollHandler = $se; -Mt.focusChangeEffect = Pse; -Mt.perLineTextDirection = Nse; -Mt.exceptionSink = Mse; -Mt.updateListener = YM; -Mt.editable = sf; -Mt.mouseSelectionStyle = Lse; -Mt.dragMovesSelection = Rse; -Mt.clickAddsSelectionRange = Ase; -Mt.decorations = Ux; -Mt.outerDecorations = zse; -Mt.atomicRanges = A$; -Mt.bidiIsolatedRanges = qse; -Mt.scrollMargins = Use; -Mt.darkTheme = jM; -Mt.cspNonce = /* @__PURE__ */ Gt.define({ combine: (t) => t.length ? t[0] : "" }); -Mt.contentAttributes = _$; -Mt.editorAttributes = Fse; -Mt.lineWrapping = /* @__PURE__ */ Mt.contentAttributes.of({ class: "cm-lineWrapping" }); -Mt.announce = /* @__PURE__ */ _r.define(); -const sEe = 4096, lW = {}; -class fT { +Rt.styleModule = mb; +Rt.inputHandler = Mse; +Rt.clipboardInputFilter = b$; +Rt.clipboardOutputFilter = x$; +Rt.scrollHandler = Ise; +Rt.focusChangeEffect = Dse; +Rt.perLineTextDirection = Pse; +Rt.exceptionSink = Lse; +Rt.updateListener = MM; +Rt.editable = Kh; +Rt.mouseSelectionStyle = Rse; +Rt.dragMovesSelection = Ase; +Rt.clickAddsSelectionRange = _se; +Rt.decorations = Dx; +Rt.outerDecorations = Fse; +Rt.atomicRanges = O$; +Rt.bidiIsolatedRanges = zse; +Rt.scrollMargins = qse; +Rt.darkTheme = IM; +Rt.cspNonce = /* @__PURE__ */ Yt.define({ combine: (t) => t.length ? t[0] : "" }); +Rt.contentAttributes = w$; +Rt.editorAttributes = Bse; +Rt.lineWrapping = /* @__PURE__ */ Rt.contentAttributes.of({ class: "cm-lineWrapping" }); +Rt.announce = /* @__PURE__ */ Tr.define(); +const pEe = 4096, hW = {}; +class j3 { constructor(e, r, n, i, s, a) { this.from = e, this.to = r, this.dir = n, this.isolates = i, this.fresh = s, this.order = a; } static update(e, r) { if (r.empty && !e.some((s) => s.fresh)) return e; - let n = [], i = e.length ? e[e.length - 1].dir : Xn.LTR; + let n = [], i = e.length ? e[e.length - 1].dir : Gn.LTR; for (let s = Math.max(0, e.length - 10); s < e.length; s++) { let a = e[s]; - a.dir == i && !r.touchesRange(a.from, a.to) && n.push(new fT(r.mapPos(a.from, 1), r.mapPos(a.to, -1), a.dir, a.isolates, !1, a.order)); + a.dir == i && !r.touchesRange(a.from, a.to) && n.push(new j3(r.mapPos(a.from, 1), r.mapPos(a.to, -1), a.dir, a.isolates, !1, a.order)); } return n; } } -function cW(t, e, r) { +function fW(t, e, r) { for (let n = t.state.facet(e), i = n.length - 1; i >= 0; i--) { let s = n[i], a = typeof s == "function" ? s(t) : s; - a && zM(a, r); + a && CM(a, r); } return r; } -const aEe = nr.mac ? "mac" : nr.windows ? "win" : nr.linux ? "linux" : "key"; -function oEe(t, e) { +const gEe = nr.mac ? "mac" : nr.windows ? "win" : nr.linux ? "linux" : "key"; +function mEe(t, e) { const r = t.split(/-(?!$)/); let n = r[r.length - 1]; n == "Space" && (n = " "); @@ -9158,24 +9158,24 @@ function oEe(t, e) { } return i && (n = "Alt-" + n), s && (n = "Ctrl-" + n), o && (n = "Meta-" + n), a && (n = "Shift-" + n), n; } -function eS(t, e, r) { +function U4(t, e, r) { return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), r !== !1 && e.shiftKey && (t = "Shift-" + t), t; } -const lEe = /* @__PURE__ */ qa.default(/* @__PURE__ */ Mt.domEventHandlers({ +const vEe = /* @__PURE__ */ za.default(/* @__PURE__ */ Rt.domEventHandlers({ keydown(t, e) { - return sae(iae(e.state), t, e, "editor"); + return iae(nae(e.state), t, e, "editor"); } -})), zc = /* @__PURE__ */ Gt.define({ enables: lEe }), uW = /* @__PURE__ */ new WeakMap(); -function iae(t) { - let e = t.facet(zc), r = uW.get(e); - return r || uW.set(e, r = hEe(e.reduce((n, i) => n.concat(i), []))), r; +})), Ic = /* @__PURE__ */ Yt.define({ enables: vEe }), dW = /* @__PURE__ */ new WeakMap(); +function nae(t) { + let e = t.facet(Ic), r = dW.get(e); + return r || dW.set(e, r = xEe(e.reduce((n, i) => n.concat(i), []))), r; } -function cEe(t, e, r) { - return sae(iae(t.state), e, t, r); +function yEe(t, e, r) { + return iae(nae(t.state), e, t, r); } -let Od = null; -const uEe = 4e3; -function hEe(t, e = aEe) { +let yd = null; +const bEe = 4e3; +function xEe(t, e = gEe) { let r = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null), i = (a, o) => { let l = n[a]; if (l == null) @@ -9184,17 +9184,17 @@ function hEe(t, e = aEe) { throw new Error("Key binding " + a + " is used both as a regular binding and as a multi-stroke prefix"); }, s = (a, o, l, u, h) => { var f, d; - let p = r[a] || (r[a] = /* @__PURE__ */ Object.create(null)), g = o.split(/ (?!$)/).map((y) => oEe(y, e)); + let p = r[a] || (r[a] = /* @__PURE__ */ Object.create(null)), g = o.split(/ (?!$)/).map((y) => mEe(y, e)); for (let y = 1; y < g.length; y++) { let b = g.slice(0, y).join(" "); i(b, !0), p[b] || (p[b] = { preventDefault: !0, stopPropagation: !1, run: [(w) => { - let O = Od = { view: w, prefix: b, scope: a }; + let O = yd = { view: w, prefix: b, scope: a }; return setTimeout(() => { - Od == O && (Od = null); - }, uEe), !0; + yd == O && (yd = null); + }, bEe), !0; }] }); } @@ -9215,7 +9215,7 @@ function hEe(t, e = aEe) { h._any || (h._any = { preventDefault: !1, stopPropagation: !1, run: [] }); let { any: f } = a; for (let d in h) - h[d].run.push((p) => f(p, JM)); + h[d].run.push((p) => f(p, FM)); } let l = a[e] || a.key; if (!!l) @@ -9224,11 +9224,11 @@ function hEe(t, e = aEe) { } return r; } -let JM = null; -function sae(t, e, r, n) { - JM = e; - let i = NTe(e), s = Vl(i, 0), a = nf(s) == i.length && i != " ", o = "", l = !1, u = !1, h = !1; - Od && Od.view == r && Od.scope == n && (o = Od.prefix + " ", Gse.indexOf(e.keyCode) < 0 && (u = !0, Od = null)); +let FM = null; +function iae(t, e, r, n) { + FM = e; + let i = VTe(e), s = Bl(i, 0), a = jh(s) == i.length && i != " ", o = "", l = !1, u = !1, h = !1; + yd && yd.view == r && yd.scope == n && (o = yd.prefix + " ", Yse.indexOf(e.keyCode) < 0 && (u = !0, yd = null)); let f = /* @__PURE__ */ new Set(), d = (v) => { if (v) { for (let y of v.run) @@ -9238,9 +9238,9 @@ function sae(t, e, r, n) { } return !1; }, p = t[n], g, m; - return p && (d(p[o + eS(i, e, !a)]) ? l = !0 : a && (e.altKey || e.metaKey || e.ctrlKey) && !(nr.windows && e.ctrlKey && e.altKey) && (g = sp[e.keyCode]) && g != i ? (d(p[o + eS(g, e, !0)]) || e.shiftKey && (m = Fx[e.keyCode]) != i && m != g && d(p[o + eS(m, e, !1)])) && (l = !0) : a && e.shiftKey && d(p[o + eS(i, e, !0)]) && (l = !0), !l && d(p._any) && (l = !0)), u && (l = !0), l && h && e.stopPropagation(), JM = null, l; + return p && (d(p[o + U4(i, e, !a)]) ? l = !0 : a && (e.altKey || e.metaKey || e.ctrlKey) && !(nr.windows && e.ctrlKey && e.altKey) && (g = ip[e.keyCode]) && g != i ? (d(p[o + U4(g, e, !0)]) || e.shiftKey && (m = Rx[e.keyCode]) != i && m != g && d(p[o + U4(m, e, !1)])) && (l = !0) : a && e.shiftKey && d(p[o + U4(i, e, !0)]) && (l = !0), !l && d(p._any) && (l = !0)), u && (l = !0), l && h && e.stopPropagation(), FM = null, l; } -class yk { +class uk { constructor(e, r, n, i, s) { this.className = e, this.left = r, this.top = n, this.width = i, this.height = s; } @@ -9262,84 +9262,84 @@ class yk { let i = e.coordsAtPos(n.head, n.assoc || 1); if (!i) return []; - let s = aae(e); - return [new yk(r, i.left - s.left, i.top - s.top, null, i.bottom - i.top)]; + let s = sae(e); + return [new uk(r, i.left - s.left, i.top - s.top, null, i.bottom - i.top)]; } else - return fEe(e, r, n); + return wEe(e, r, n); } } -function aae(t) { +function sae(t) { let e = t.scrollDOM.getBoundingClientRect(); - return { left: (t.textDirection == Xn.LTR ? e.left : e.right - t.scrollDOM.clientWidth * t.scaleX) - t.scrollDOM.scrollLeft * t.scaleX, top: e.top - t.scrollDOM.scrollTop * t.scaleY }; + return { left: (t.textDirection == Gn.LTR ? e.left : e.right - t.scrollDOM.clientWidth * t.scaleX) - t.scrollDOM.scrollLeft * t.scaleX, top: e.top - t.scrollDOM.scrollTop * t.scaleY }; } -function hW(t, e, r, n) { +function pW(t, e, r, n) { let i = t.coordsAtPos(e, r * 2); if (!i) return n; let s = t.dom.getBoundingClientRect(), a = (i.top + i.bottom) / 2, o = t.posAtCoords({ x: s.left + 1, y: a }), l = t.posAtCoords({ x: s.right - 1, y: a }); return o == null || l == null ? n : { from: Math.max(n.from, Math.min(o, l)), to: Math.min(n.to, Math.max(o, l)) }; } -function fEe(t, e, r) { +function wEe(t, e, r) { if (r.to <= t.viewport.from || r.from >= t.viewport.to) return []; - let n = Math.max(r.from, t.viewport.from), i = Math.min(r.to, t.viewport.to), s = t.textDirection == Xn.LTR, a = t.contentDOM, o = a.getBoundingClientRect(), l = aae(t), u = a.querySelector(".cm-line"), h = u && window.getComputedStyle(u), f = o.left + (h ? parseInt(h.paddingLeft) + Math.min(0, parseInt(h.textIndent)) : 0), d = o.right - (h ? parseInt(h.paddingRight) : 0), p = HM(t, n), g = HM(t, i), m = p.type == uo.Text ? p : null, v = g.type == uo.Text ? g : null; - if (m && (t.lineWrapping || p.widgetLineBreaks) && (m = hW(t, n, 1, m)), v && (t.lineWrapping || g.widgetLineBreaks) && (v = hW(t, i, -1, v)), m && v && m.from == v.from && m.to == v.to) + let n = Math.max(r.from, t.viewport.from), i = Math.min(r.to, t.viewport.to), s = t.textDirection == Gn.LTR, a = t.contentDOM, o = a.getBoundingClientRect(), l = sae(t), u = a.querySelector(".cm-line"), h = u && window.getComputedStyle(u), f = o.left + (h ? parseInt(h.paddingLeft) + Math.min(0, parseInt(h.textIndent)) : 0), d = o.right - (h ? parseInt(h.paddingRight) : 0), p = PM(t, n), g = PM(t, i), m = p.type == lo.Text ? p : null, v = g.type == lo.Text ? g : null; + if (m && (t.lineWrapping || p.widgetLineBreaks) && (m = pW(t, n, 1, m)), v && (t.lineWrapping || g.widgetLineBreaks) && (v = pW(t, i, -1, v)), m && v && m.from == v.from && m.to == v.to) return b(w(r.from, r.to, m)); { let S = m ? w(r.from, null, m) : O(p, !1), C = v ? w(null, r.to, v) : O(g, !0), T = []; - return (m || p).to < (v || g).from - (m && v ? 1 : 0) || p.widgetLineBreaks > 1 && S.bottom + t.defaultLineHeight / 2 < C.top ? T.push(y(f, S.bottom, d, C.top)) : S.bottom < C.top && t.elementAtHeight((S.bottom + C.top) / 2).type == uo.Text && (S.bottom = C.top = (S.bottom + C.top) / 2), b(S).concat(T).concat(b(C)); + return (m || p).to < (v || g).from - (m && v ? 1 : 0) || p.widgetLineBreaks > 1 && S.bottom + t.defaultLineHeight / 2 < C.top ? T.push(y(f, S.bottom, d, C.top)) : S.bottom < C.top && t.elementAtHeight((S.bottom + C.top) / 2).type == lo.Text && (S.bottom = C.top = (S.bottom + C.top) / 2), b(S).concat(T).concat(b(C)); } - function y(S, C, T, D) { - return new yk(e, S - l.left, C - l.top, T - S, D - C); + function y(S, C, T, M) { + return new uk(e, S - l.left, C - l.top, T - S, M - C); } function b({ top: S, bottom: C, horizontal: T }) { - let D = []; + let M = []; for (let E = 0; E < T.length; E += 2) - D.push(y(T[E], S, T[E + 1], C)); - return D; + M.push(y(T[E], S, T[E + 1], C)); + return M; } function w(S, C, T) { - let D = 1e9, E = -1e9, N = []; - function P(k, B, A, M, I) { - let q = t.coordsAtPos(k, k == T.to ? -2 : 2), Y = t.coordsAtPos(A, A == T.from ? 2 : -2); - !q || !Y || (D = Math.min(q.top, Y.top, D), E = Math.max(q.bottom, Y.bottom, E), I == Xn.LTR ? N.push(s && B ? f : q.left, s && M ? d : Y.right) : N.push(!s && M ? f : Y.left, !s && B ? d : q.right)); + let M = 1e9, E = -1e9, P = []; + function L(k, I, _, R, N) { + let $ = t.coordsAtPos(k, k == T.to ? -2 : 2), V = t.coordsAtPos(_, _ == T.from ? 2 : -2); + !$ || !V || (M = Math.min($.top, V.top, M), E = Math.max($.bottom, V.bottom, E), N == Gn.LTR ? P.push(s && I ? f : $.left, s && R ? d : V.right) : P.push(!s && R ? f : V.left, !s && I ? d : $.right)); } - let L = S != null ? S : T.from, F = C != null ? C : T.to; + let D = S != null ? S : T.from, F = C != null ? C : T.to; for (let k of t.visibleRanges) - if (k.to > L && k.from < F) - for (let B = Math.max(k.from, L), A = Math.min(k.to, F); ; ) { - let M = t.state.doc.lineAt(B); - for (let I of t.bidiSpans(M)) { - let q = I.from + M.from, Y = I.to + M.from; - if (q >= A) + if (k.to > D && k.from < F) + for (let I = Math.max(k.from, D), _ = Math.min(k.to, F); ; ) { + let R = t.state.doc.lineAt(I); + for (let N of t.bidiSpans(R)) { + let $ = N.from + R.from, V = N.to + R.from; + if ($ >= _) break; - Y > B && P(Math.max(q, B), S == null && q <= L, Math.min(Y, A), C == null && Y >= F, I.dir); + V > I && L(Math.max($, I), S == null && $ <= D, Math.min(V, _), C == null && V >= F, N.dir); } - if (B = M.to + 1, B >= A) + if (I = R.to + 1, I >= _) break; } - return N.length == 0 && P(L, S == null, F, C == null, t.textDirection), { top: D, bottom: E, horizontal: N }; + return P.length == 0 && L(D, S == null, F, C == null, t.textDirection), { top: M, bottom: E, horizontal: P }; } function O(S, C) { let T = o.top + (C ? S.top : S.bottom); return { top: T, bottom: T, horizontal: [] }; } } -function dEe(t, e) { +function OEe(t, e) { return t.constructor == e.constructor && t.eq(e); } -class pEe { +class kEe { constructor(e, r) { this.view = e, this.layer = r, this.drawn = [], this.scaleX = 1, this.scaleY = 1, this.measureReq = { read: this.measure.bind(this), write: this.draw.bind(this) }, this.dom = e.scrollDOM.appendChild(document.createElement("div")), this.dom.classList.add("cm-layer"), r.above && this.dom.classList.add("cm-layer-above"), r.class && this.dom.classList.add(r.class), this.scale(), this.dom.setAttribute("aria-hidden", "true"), this.setOrder(e.state), e.requestMeasure(this.measureReq), r.mount && r.mount(this.dom, e); } update(e) { - e.startState.facet(X5) != e.state.facet(X5) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && (this.scale(), e.view.requestMeasure(this.measureReq)); + e.startState.facet(N5) != e.state.facet(N5) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && (this.scale(), e.view.requestMeasure(this.measureReq)); } docViewUpdate(e) { this.layer.updateOnDocViewUpdate !== !1 && e.requestMeasure(this.measureReq); } setOrder(e) { - let r = 0, n = e.facet(X5); + let r = 0, n = e.facet(N5); for (; r < n.length && n[r] != this.layer; ) r++; this.dom.style.zIndex = String((this.layer.above ? 150 : -1) - r); @@ -9352,7 +9352,7 @@ class pEe { (e != this.scaleX || r != this.scaleY) && (this.scaleX = e, this.scaleY = r, this.dom.style.transform = `scale(${1 / e}, ${1 / r})`); } draw(e) { - if (e.length != this.drawn.length || e.some((r, n) => !dEe(r, this.drawn[n]))) { + if (e.length != this.drawn.length || e.some((r, n) => !OEe(r, this.drawn[n]))) { let r = this.dom.firstChild, n = 0; for (let i of e) i.update && r && i.constructor && this.drawn[n].constructor && i.update(r, this.drawn[n]) ? (r = r.nextSibling, n++) : this.dom.insertBefore(i.draw(), r); @@ -9367,16 +9367,16 @@ class pEe { this.layer.destroy && this.layer.destroy(this.dom, this.view), this.dom.remove(); } } -const X5 = /* @__PURE__ */ Gt.define(); -function oae(t) { +const N5 = /* @__PURE__ */ Yt.define(); +function aae(t) { return [ - fn.define((e) => new pEe(e, t)), - X5.of(t) + hn.define((e) => new kEe(e, t)), + N5.of(t) ]; } -const lae = !(nr.ios && nr.webkit && nr.webkit_version < 534), pv = /* @__PURE__ */ Gt.define({ +const oae = !(nr.ios && nr.webkit && nr.webkit_version < 534), uv = /* @__PURE__ */ Yt.define({ combine(t) { - return Th(t, { + return wh(t, { cursorBlinkRate: 1200, drawRangeCursor: !0 }, { @@ -9385,30 +9385,30 @@ const lae = !(nr.ios && nr.webkit && nr.webkit_version < 534), pv = /* @__PURE__ }); } }); -function fW(t = {}) { +function gW(t = {}) { return [ - pv.of(t), - mEe, - vEe, - yEe, - Ise.of(!0) + uv.of(t), + TEe, + CEe, + EEe, + Nse.of(!0) ]; } -function gEe(t) { - return t.facet(pv); +function SEe(t) { + return t.facet(uv); } -function cae(t) { - return t.startState.facet(pv) != t.state.facet(pv); +function lae(t) { + return t.startState.facet(uv) != t.state.facet(uv); } -const mEe = /* @__PURE__ */ oae({ +const TEe = /* @__PURE__ */ aae({ above: !0, markers(t) { - let { state: e } = t, r = e.facet(pv), n = []; + let { state: e } = t, r = e.facet(uv), n = []; for (let i of e.selection.ranges) { let s = i == e.selection.main; - if (i.empty ? !s || lae : r.drawRangeCursor) { - let a = s ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", o = i.empty ? i : ft.cursor(i.head, i.head > i.anchor ? -1 : 1); - for (let l of yk.forRange(t, a, o)) + if (i.empty ? !s || oae : r.drawRangeCursor) { + let a = s ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", o = i.empty ? i : ut.cursor(i.head, i.head > i.anchor ? -1 : 1); + for (let l of uk.forRange(t, a, o)) n.push(l); } } @@ -9416,27 +9416,27 @@ const mEe = /* @__PURE__ */ oae({ }, update(t, e) { t.transactions.some((n) => n.selection) && (e.style.animationName = e.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink"); - let r = cae(t); - return r && dW(t.state, e), t.docChanged || t.selectionSet || r; + let r = lae(t); + return r && mW(t.state, e), t.docChanged || t.selectionSet || r; }, mount(t, e) { - dW(e.state, t); + mW(e.state, t); }, class: "cm-cursorLayer" }); -function dW(t, e) { - e.style.animationDuration = t.facet(pv).cursorBlinkRate + "ms"; +function mW(t, e) { + e.style.animationDuration = t.facet(uv).cursorBlinkRate + "ms"; } -const vEe = /* @__PURE__ */ oae({ +const CEe = /* @__PURE__ */ aae({ above: !1, markers(t) { - return t.state.selection.ranges.map((e) => e.empty ? [] : yk.forRange(t, "cm-selectionBackground", e)).reduce((e, r) => e.concat(r)); + return t.state.selection.ranges.map((e) => e.empty ? [] : uk.forRange(t, "cm-selectionBackground", e)).reduce((e, r) => e.concat(r)); }, update(t, e) { - return t.docChanged || t.selectionSet || t.viewportChanged || cae(t); + return t.docChanged || t.selectionSet || t.viewportChanged || lae(t); }, class: "cm-selectionLayer" -}), e9 = { +}), zM = { ".cm-line": { "& ::selection, &::selection": { backgroundColor: "transparent !important" } }, @@ -9449,29 +9449,29 @@ const vEe = /* @__PURE__ */ oae({ } } }; -lae && (e9[".cm-line"].caretColor = e9[".cm-content"].caretColor = "transparent !important"); -const yEe = /* @__PURE__ */ qa.highest(/* @__PURE__ */ Mt.theme(e9)), uae = /* @__PURE__ */ _r.define({ +oae && (zM[".cm-line"].caretColor = zM[".cm-content"].caretColor = "transparent !important"); +const EEe = /* @__PURE__ */ za.highest(/* @__PURE__ */ Rt.theme(zM)), cae = /* @__PURE__ */ Tr.define({ map(t, e) { return t == null ? null : e.mapPos(t); } -}), Ab = /* @__PURE__ */ ai.define({ +}), bb = /* @__PURE__ */ ii.define({ create() { return null; }, update(t, e) { - return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((r, n) => n.is(uae) ? n.value : r, t); + return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((r, n) => n.is(cae) ? n.value : r, t); } -}), bEe = /* @__PURE__ */ fn.fromClass(class { +}), _Ee = /* @__PURE__ */ hn.fromClass(class { constructor(t) { this.view = t, this.cursor = null, this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) }; } update(t) { var e; - let r = t.state.field(Ab); - r == null ? this.cursor != null && ((e = this.cursor) === null || e === void 0 || e.remove(), this.cursor = null) : (this.cursor || (this.cursor = this.view.scrollDOM.appendChild(document.createElement("div")), this.cursor.className = "cm-dropCursor"), (t.startState.field(Ab) != r || t.docChanged || t.geometryChanged) && this.view.requestMeasure(this.measureReq)); + let r = t.state.field(bb); + r == null ? this.cursor != null && ((e = this.cursor) === null || e === void 0 || e.remove(), this.cursor = null) : (this.cursor || (this.cursor = this.view.scrollDOM.appendChild(document.createElement("div")), this.cursor.className = "cm-dropCursor"), (t.startState.field(bb) != r || t.docChanged || t.geometryChanged) && this.view.requestMeasure(this.measureReq)); } readPos() { - let { view: t } = this, e = t.state.field(Ab), r = e != null && t.coordsAtPos(e); + let { view: t } = this, e = t.state.field(bb), r = e != null && t.coordsAtPos(e); if (!r) return null; let n = t.scrollDOM.getBoundingClientRect(); @@ -9491,7 +9491,7 @@ const yEe = /* @__PURE__ */ qa.highest(/* @__PURE__ */ Mt.theme(e9)), uae = /* @ this.cursor && this.cursor.remove(); } setDropPos(t) { - this.view.state.field(Ab) != t && this.view.dispatch({ effects: uae.of(t) }); + this.view.state.field(bb) != t && this.view.dispatch({ effects: cae.of(t) }); } }, { eventObservers: { @@ -9509,17 +9509,17 @@ const yEe = /* @__PURE__ */ qa.highest(/* @__PURE__ */ Mt.theme(e9)), uae = /* @ } } }); -function xEe() { - return [Ab, bEe]; +function AEe() { + return [bb, _Ee]; } -function pW(t, e, r, n, i) { +function vW(t, e, r, n, i) { e.lastIndex = 0; for (let s = t.iterRange(r, n), a = r, o; !s.next().done; a += s.value.length) if (!s.lineBreak) for (; o = e.exec(s.value); ) i(a + o.index, o); } -function wEe(t, e) { +function REe(t, e) { let r = t.visibleRanges; if (r.length == 1 && r[0].from == t.viewport.from && r[0].to == t.viewport.to) return r; @@ -9528,7 +9528,7 @@ function wEe(t, e) { i = Math.max(t.state.doc.lineAt(i).from, i - e), s = Math.min(t.state.doc.lineAt(s).to, s + e), n.length && n[n.length - 1].to >= i ? n[n.length - 1].to = s : n.push({ from: i, to: s }); return n; } -class OEe { +class LEe { constructor(e) { const { regexp: r, decoration: n, decorate: i, boundary: s, maxLength: a = 1e3 } = e; if (!r.global) @@ -9547,9 +9547,9 @@ class OEe { this.boundary = s, this.maxLength = a; } createDeco(e) { - let r = new rs(), n = r.add.bind(r); - for (let { from: i, to: s } of wEe(e, this.maxLength)) - pW(e.state.doc, this.regexp, i, s, (a, o) => this.addMatch(o, e, a, n)); + let r = new es(), n = r.add.bind(r); + for (let { from: i, to: s } of REe(e, this.maxLength)) + vW(e.state.doc, this.regexp, i, s, (a, o) => this.addMatch(o, e, a, n)); return r.finish(); } updateDeco(e, r) { @@ -9580,15 +9580,15 @@ class OEe { for (this.regexp.lastIndex = h - l.from; (p = this.regexp.exec(l.text)) && p.index < f - l.from; ) this.addMatch(p, e, p.index + l.from, g); else - pW(e.state.doc, this.regexp, h, f, (m, v) => this.addMatch(v, e, m, g)); + vW(e.state.doc, this.regexp, h, f, (m, v) => this.addMatch(v, e, m, g)); r = r.update({ filterFrom: h, filterTo: f, filter: (m, v) => m < h || v > f, add: d }); } } return r; } } -const t9 = /x/.unicode != null ? "gu" : "g", kEe = /* @__PURE__ */ new RegExp(`[\0-\b --\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`, t9), SEe = { +const qM = /x/.unicode != null ? "gu" : "g", MEe = /* @__PURE__ */ new RegExp(`[\0-\b +-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`, qM), DEe = { 0: "null", 7: "bell", 8: "backspace", @@ -9611,63 +9611,63 @@ const t9 = /x/.unicode != null ? "gu" : "g", kEe = /* @__PURE__ */ new RegExp(`[ 65279: "zero width no-break space", 65532: "object replacement" }; -let j7 = null; -function TEe() { +let $7 = null; +function PEe() { var t; - if (j7 == null && typeof document < "u" && document.body) { + if ($7 == null && typeof document < "u" && document.body) { let e = document.body.style; - j7 = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null; + $7 = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null; } - return j7 || !1; + return $7 || !1; } -const j5 = /* @__PURE__ */ Gt.define({ +const I5 = /* @__PURE__ */ Yt.define({ combine(t) { - let e = Th(t, { + let e = wh(t, { render: null, - specialChars: kEe, + specialChars: MEe, addSpecialChars: null }); - return (e.replaceTabs = !TEe()) && (e.specialChars = new RegExp(" |" + e.specialChars.source, t9)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, t9)), e; + return (e.replaceTabs = !PEe()) && (e.specialChars = new RegExp(" |" + e.specialChars.source, qM)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, qM)), e; } }); -function gW(t = {}) { - return [j5.of(t), CEe()]; +function yW(t = {}) { + return [I5.of(t), NEe()]; } -let mW = null; -function CEe() { - return mW || (mW = fn.fromClass(class { +let bW = null; +function NEe() { + return bW || (bW = hn.fromClass(class { constructor(t) { - this.view = t, this.decorations = Ht.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t.state.facet(j5)), this.decorations = this.decorator.createDeco(t); + this.view = t, this.decorations = Gt.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t.state.facet(I5)), this.decorations = this.decorator.createDeco(t); } makeDecorator(t) { - return new OEe({ + return new LEe({ regexp: t.specialChars, decoration: (e, r, n) => { - let { doc: i } = r.state, s = Vl(e[0], 0); + let { doc: i } = r.state, s = Bl(e[0], 0); if (s == 9) { - let a = i.lineAt(n), o = r.state.tabSize, l = iu(a.text, o, n - a.from); - return Ht.replace({ - widget: new REe((o - l % o) * this.view.defaultCharacterWidth / this.view.scaleX) + let a = i.lineAt(n), o = r.state.tabSize, l = eu(a.text, o, n - a.from); + return Gt.replace({ + widget: new FEe((o - l % o) * this.view.defaultCharacterWidth / this.view.scaleX) }); } - return this.decorationCache[s] || (this.decorationCache[s] = Ht.replace({ widget: new AEe(t, s) })); + return this.decorationCache[s] || (this.decorationCache[s] = Gt.replace({ widget: new BEe(t, s) })); }, boundary: t.replaceTabs ? void 0 : /[^]/ }); } update(t) { - let e = t.state.facet(j5); - t.startState.facet(j5) != e ? (this.decorator = this.makeDecorator(e), this.decorations = this.decorator.createDeco(t.view)) : this.decorations = this.decorator.updateDeco(t, this.decorations); + let e = t.state.facet(I5); + t.startState.facet(I5) != e ? (this.decorator = this.makeDecorator(e), this.decorations = this.decorator.createDeco(t.view)) : this.decorations = this.decorator.updateDeco(t, this.decorations); } }, { decorations: (t) => t.decorations })); } -const EEe = "\u2022"; -function _Ee(t) { - return t >= 32 ? EEe : t == 10 ? "\u2424" : String.fromCharCode(9216 + t); +const IEe = "\u2022"; +function $Ee(t) { + return t >= 32 ? IEe : t == 10 ? "\u2424" : String.fromCharCode(9216 + t); } -class AEe extends el { +class BEe extends Zo { constructor(e, r) { super(), this.options = e, this.code = r; } @@ -9675,7 +9675,7 @@ class AEe extends el { return e.code == this.code; } toDOM(e) { - let r = _Ee(this.code), n = e.state.phrase("Control character") + " " + (SEe[this.code] || "0x" + this.code.toString(16)), i = this.options.render && this.options.render(this.code, n, r); + let r = $Ee(this.code), n = e.state.phrase("Control character") + " " + (DEe[this.code] || "0x" + this.code.toString(16)), i = this.options.render && this.options.render(this.code, n, r); if (i) return i; let s = document.createElement("span"); @@ -9685,7 +9685,7 @@ class AEe extends el { return !1; } } -class REe extends el { +class FEe extends Zo { constructor(e) { super(), this.width = e; } @@ -9700,10 +9700,10 @@ class REe extends el { return !1; } } -function vW() { - return MEe; +function xW() { + return qEe; } -const LEe = /* @__PURE__ */ Ht.line({ class: "cm-activeLine" }), MEe = /* @__PURE__ */ fn.fromClass(class { +const zEe = /* @__PURE__ */ Gt.line({ class: "cm-activeLine" }), qEe = /* @__PURE__ */ hn.fromClass(class { constructor(t) { this.decorations = this.getDeco(t); } @@ -9714,45 +9714,45 @@ const LEe = /* @__PURE__ */ Ht.line({ class: "cm-activeLine" }), MEe = /* @__PUR let e = -1, r = []; for (let n of t.state.selection.ranges) { let i = t.lineBlockAt(n.head); - i.from > e && (r.push(LEe.range(i.from)), e = i.from); + i.from > e && (r.push(zEe.range(i.from)), e = i.from); } - return Ht.set(r); + return Gt.set(r); } }, { decorations: (t) => t.decorations -}), r9 = 2e3; -function DEe(t, e, r) { +}), UM = 2e3; +function UEe(t, e, r) { let n = Math.min(e.line, r.line), i = Math.max(e.line, r.line), s = []; - if (e.off > r9 || r.off > r9 || e.col < 0 || r.col < 0) { + if (e.off > UM || r.off > UM || e.col < 0 || r.col < 0) { let a = Math.min(e.off, r.off), o = Math.max(e.off, r.off); for (let l = n; l <= i; l++) { let u = t.doc.line(l); - u.length <= o && s.push(ft.range(u.from + a, u.to + o)); + u.length <= o && s.push(ut.range(u.from + a, u.to + o)); } } else { let a = Math.min(e.col, r.col), o = Math.max(e.col, r.col); for (let l = n; l <= i; l++) { - let u = t.doc.line(l), h = DM(u.text, a, t.tabSize, !0); + let u = t.doc.line(l), h = bM(u.text, a, t.tabSize, !0); if (h < 0) - s.push(ft.cursor(u.to)); + s.push(ut.cursor(u.to)); else { - let f = DM(u.text, o, t.tabSize); - s.push(ft.range(u.from + h, u.from + f)); + let f = bM(u.text, o, t.tabSize); + s.push(ut.range(u.from + h, u.from + f)); } } } return s; } -function PEe(t, e) { +function QEe(t, e) { let r = t.coordsAtPos(t.viewport.from); return r ? Math.round(Math.abs((r.left - e) / t.defaultCharacterWidth)) : -1; } -function yW(t, e) { - let r = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), n = t.state.doc.lineAt(r), i = r - n.from, s = i > r9 ? -1 : i == n.length ? PEe(t, e.clientX) : iu(n.text, t.state.tabSize, r - n.from); +function wW(t, e) { + let r = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), n = t.state.doc.lineAt(r), i = r - n.from, s = i > UM ? -1 : i == n.length ? QEe(t, e.clientX) : eu(n.text, t.state.tabSize, r - n.from); return { line: n.number, col: s, off: i }; } -function NEe(t, e) { - let r = yW(t, e), n = t.state.selection; +function VEe(t, e) { + let r = wW(t, e), n = t.state.selection; return r ? { update(i) { if (i.docChanged) { @@ -9761,26 +9761,26 @@ function NEe(t, e) { } }, get(i, s, a) { - let o = yW(t, i); + let o = wW(t, i); if (!o) return n; - let l = DEe(t.state, r, o); - return l.length ? a ? ft.create(l.concat(n.ranges)) : ft.create(l) : n; + let l = UEe(t.state, r, o); + return l.length ? a ? ut.create(l.concat(n.ranges)) : ut.create(l) : n; } } : null; } -function IEe(t) { +function WEe(t) { let e = (t == null ? void 0 : t.eventFilter) || ((r) => r.altKey && r.button == 0); - return Mt.mouseSelectionStyle.of((r, n) => e(n) ? NEe(r, n) : null); + return Rt.mouseSelectionStyle.of((r, n) => e(n) ? VEe(r, n) : null); } -const $Ee = { +const YEe = { Alt: [18, (t) => !!t.altKey], Control: [17, (t) => !!t.ctrlKey], Shift: [16, (t) => !!t.shiftKey], Meta: [91, (t) => !!t.metaKey] -}, BEe = { style: "cursor: crosshair" }; -function FEe(t = {}) { - let [e, r] = $Ee[t.key || "Alt"], n = fn.fromClass(class { +}, GEe = { style: "cursor: crosshair" }; +function HEe(t = {}) { + let [e, r] = YEe[t.key || "Alt"], n = hn.fromClass(class { constructor(i) { this.view = i, this.isDown = !1; } @@ -9802,14 +9802,14 @@ function FEe(t = {}) { }); return [ n, - Mt.contentAttributes.of((i) => { + Rt.contentAttributes.of((i) => { var s; - return !((s = i.plugin(n)) === null || s === void 0) && s.isDown ? BEe : null; + return !((s = i.plugin(n)) === null || s === void 0) && s.isDown ? GEe : null; }) ]; } -const I2 = "-10000px"; -class hae { +const _2 = "-10000px"; +class uae { constructor(e, r, n, i) { this.facet = r, this.createTooltipView = n, this.removeTooltipView = i, this.input = e.state.facet(r), this.tooltips = this.input.filter((a) => a); let s = null; @@ -9844,24 +9844,24 @@ class hae { return r && (o.forEach((l, u) => r[u] = l), r.length = o.length), this.input = i, this.tooltips = s, this.tooltipViews = a, !0; } } -function zEe(t) { +function XEe(t) { let { win: e } = t; return { top: 0, left: 0, bottom: e.innerHeight, right: e.innerWidth }; } -const Z7 = /* @__PURE__ */ Gt.define({ +const B7 = /* @__PURE__ */ Yt.define({ combine: (t) => { var e, r, n; return { position: nr.ios ? "absolute" : ((e = t.find((i) => i.position)) === null || e === void 0 ? void 0 : e.position) || "fixed", parent: ((r = t.find((i) => i.parent)) === null || r === void 0 ? void 0 : r.parent) || null, - tooltipSpace: ((n = t.find((i) => i.tooltipSpace)) === null || n === void 0 ? void 0 : n.tooltipSpace) || zEe + tooltipSpace: ((n = t.find((i) => i.tooltipSpace)) === null || n === void 0 ? void 0 : n.tooltipSpace) || XEe }; } -}), bW = /* @__PURE__ */ new WeakMap(), P$ = /* @__PURE__ */ fn.fromClass(class { +}), OW = /* @__PURE__ */ new WeakMap(), E$ = /* @__PURE__ */ hn.fromClass(class { constructor(t) { this.view = t, this.above = [], this.inView = !0, this.madeAbsolute = !1, this.lastTransaction = 0, this.measureTimeout = -1; - let e = t.state.facet(Z7); - this.position = e.position, this.parent = e.parent, this.classes = t.themeClasses, this.createContainer(), this.measureReq = { read: this.readMeasure.bind(this), write: this.writeMeasure.bind(this), key: this }, this.resizeObserver = typeof ResizeObserver == "function" ? new ResizeObserver(() => this.measureSoon()) : null, this.manager = new hae(t, N$, (r, n) => this.createTooltip(r, n), (r) => { + let e = t.state.facet(B7); + this.position = e.position, this.parent = e.parent, this.classes = t.themeClasses, this.createContainer(), this.measureReq = { read: this.readMeasure.bind(this), write: this.writeMeasure.bind(this), key: this }, this.resizeObserver = typeof ResizeObserver == "function" ? new ResizeObserver(() => this.measureSoon()) : null, this.manager = new uae(t, _$, (r, n) => this.createTooltip(r, n), (r) => { this.resizeObserver && this.resizeObserver.unobserve(r.dom), r.dom.remove(); }), this.above = this.manager.tooltips.map((r) => !!r.above), this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver((r) => { Date.now() > this.lastTransaction - 50 && r.length > 0 && r[r.length - 1].intersectionRatio < 1 && this.measureSoon(); @@ -9886,7 +9886,7 @@ const Z7 = /* @__PURE__ */ Gt.define({ t.transactions.length && (this.lastTransaction = Date.now()); let e = this.manager.update(t, this.above); e && this.observeIntersection(); - let r = e || t.geometryChanged, n = t.state.facet(Z7); + let r = e || t.geometryChanged, n = t.state.facet(B7); if (n.position != this.position && !this.madeAbsolute) { this.position = n.position; for (let i of this.manager.tooltipViews) @@ -9908,7 +9908,7 @@ const Z7 = /* @__PURE__ */ Gt.define({ let i = document.createElement("div"); i.className = "cm-tooltip-arrow", r.dom.appendChild(i); } - return r.dom.style.position = this.position, r.dom.style.top = I2, r.dom.style.left = "0px", this.container.insertBefore(r.dom, n), r.mount && r.mount(this.view), this.resizeObserver && this.resizeObserver.observe(r.dom), r; + return r.dom.style.position = this.position, r.dom.style.top = _2, r.dom.style.left = "0px", this.container.insertBefore(r.dom, n), r.mount && r.mount(this.view), this.resizeObserver && this.resizeObserver.observe(r.dom), r; } destroy() { var t, e, r; @@ -9923,7 +9923,7 @@ const Z7 = /* @__PURE__ */ Gt.define({ let { dom: s } = this.manager.tooltipViews[0]; if (nr.gecko) r = s.offsetParent != this.container.ownerDocument.body; - else if (s.style.top == I2 && s.style.left == "0px") { + else if (s.style.top == _2 && s.style.left == "0px") { let a = s.getBoundingClientRect(); r = Math.abs(a.top + 1e4) > 1 || Math.abs(a.left) > 1; } @@ -9934,7 +9934,7 @@ const Z7 = /* @__PURE__ */ Gt.define({ s.width && s.height && (t = s.width / this.parent.offsetWidth, e = s.height / this.parent.offsetHeight); } else ({ scaleX: t, scaleY: e } = this.view.viewState); - let n = this.view.scrollDOM.getBoundingClientRect(), i = R$(this.view); + let n = this.view.scrollDOM.getBoundingClientRect(), i = k$(this.view); return { visible: { left: n.left + i.left, @@ -9948,7 +9948,7 @@ const Z7 = /* @__PURE__ */ Gt.define({ return o.getCoords ? o.getCoords(s.pos) : this.view.coordsAtPos(s.pos); }), size: this.manager.tooltipViews.map(({ dom: s }) => s.getBoundingClientRect()), - space: this.view.state.facet(Z7).tooltipSpace(this.view), + space: this.view.state.facet(B7).tooltipSpace(this.view), scaleX: t, scaleY: e, makeAbsolute: r @@ -9965,27 +9965,27 @@ const Z7 = /* @__PURE__ */ Gt.define({ for (let o = 0; o < this.manager.tooltips.length; o++) { let l = this.manager.tooltips[o], u = this.manager.tooltipViews[o], { dom: h } = u, f = t.pos[o], d = t.size[o]; if (!f || l.clip !== !1 && (f.bottom <= Math.max(r.top, n.top) || f.top >= Math.min(r.bottom, n.bottom) || f.right < Math.max(r.left, n.left) - 0.1 || f.left > Math.min(r.right, n.right) + 0.1)) { - h.style.top = I2; + h.style.top = _2; continue; } - let p = l.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, g = p ? 7 : 0, m = d.right - d.left, v = (e = bW.get(u)) !== null && e !== void 0 ? e : d.bottom - d.top, y = u.offset || UEe, b = this.view.textDirection == Xn.LTR, w = d.width > n.right - n.left ? b ? n.left : n.right - d.width : b ? Math.max(n.left, Math.min(f.left - (p ? 14 : 0) + y.x, n.right - m)) : Math.min(Math.max(n.left, f.left - m + (p ? 14 : 0) - y.x), n.right - m), O = this.above[o]; + let p = l.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, g = p ? 7 : 0, m = d.right - d.left, v = (e = OW.get(u)) !== null && e !== void 0 ? e : d.bottom - d.top, y = u.offset || jEe, b = this.view.textDirection == Gn.LTR, w = d.width > n.right - n.left ? b ? n.left : n.right - d.width : b ? Math.max(n.left, Math.min(f.left - (p ? 14 : 0) + y.x, n.right - m)) : Math.min(Math.max(n.left, f.left - m + (p ? 14 : 0) - y.x), n.right - m), O = this.above[o]; !l.strictSide && (O ? f.top - v - g - y.y < n.top : f.bottom + v + g + y.y > n.bottom) && O == n.bottom - f.bottom > f.top - n.top && (O = this.above[o] = !O); let S = (O ? f.top - n.top : n.bottom - f.bottom) - g; if (S < v && u.resize !== !1) { if (S < this.view.defaultLineHeight) { - h.style.top = I2; + h.style.top = _2; continue; } - bW.set(u, v), h.style.height = (v = S) / s + "px"; + OW.set(u, v), h.style.height = (v = S) / s + "px"; } else h.style.height && (h.style.height = ""); let C = O ? f.top - v - g - y.y : f.bottom + g + y.y, T = w + m; if (u.overlap !== !0) - for (let D of a) - D.left < T && D.right > w && D.top < C + v && D.bottom > C && (C = O ? D.top - v - 2 - g : D.bottom + g + 2); - if (this.position == "absolute" ? (h.style.top = (C - t.parent.top) / s + "px", xW(h, (w - t.parent.left) / i)) : (h.style.top = C / s + "px", xW(h, w / i)), p) { - let D = f.left + (b ? y.x : -y.x) - (w + 14 - 7); - p.style.left = D / i + "px"; + for (let M of a) + M.left < T && M.right > w && M.top < C + v && M.bottom > C && (C = O ? M.top - v - 2 - g : M.bottom + g + 2); + if (this.position == "absolute" ? (h.style.top = (C - t.parent.top) / s + "px", kW(h, (w - t.parent.left) / i)) : (h.style.top = C / s + "px", kW(h, w / i)), p) { + let M = f.left + (b ? y.x : -y.x) - (w + 14 - 7); + p.style.left = M / i + "px"; } u.overlap !== !0 && a.push({ left: w, top: C, right: T, bottom: C + v }), h.classList.toggle("cm-tooltip-above", O), h.classList.toggle("cm-tooltip-below", !O), u.positioned && u.positioned(t.space); } @@ -9993,7 +9993,7 @@ const Z7 = /* @__PURE__ */ Gt.define({ maybeMeasure() { if (this.manager.tooltips.length && (this.view.inView && this.view.requestMeasure(this.measureReq), this.inView != this.view.inView && (this.inView = this.view.inView, !this.inView))) for (let t of this.manager.tooltipViews) - t.dom.style.top = I2; + t.dom.style.top = _2; } }, { eventObservers: { @@ -10002,11 +10002,11 @@ const Z7 = /* @__PURE__ */ Gt.define({ } } }); -function xW(t, e) { +function kW(t, e) { let r = parseInt(t.style.left, 10); (isNaN(r) || Math.abs(e - r) > 1) && (t.style.left = e + "px"); } -const qEe = /* @__PURE__ */ Mt.baseTheme({ +const ZEe = /* @__PURE__ */ Rt.baseTheme({ ".cm-tooltip": { zIndex: 500, boxSizing: "border-box" @@ -10067,17 +10067,17 @@ const qEe = /* @__PURE__ */ Mt.baseTheme({ borderBottomColor: "transparent" } } -}), UEe = { x: 0, y: 0 }, N$ = /* @__PURE__ */ Gt.define({ - enables: [P$, qEe] -}), dT = /* @__PURE__ */ Gt.define({ +}), jEe = { x: 0, y: 0 }, _$ = /* @__PURE__ */ Yt.define({ + enables: [E$, ZEe] +}), K3 = /* @__PURE__ */ Yt.define({ combine: (t) => t.reduce((e, r) => e.concat(r), []) }); -class Y_ { +class M_ { static create(e) { - return new Y_(e); + return new M_(e); } constructor(e) { - this.view = e, this.mounted = !1, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new hae(e, dT, (r, n) => this.createHostedView(r, n), (r) => r.dom.remove()); + this.view = e, this.mounted = !1, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new uae(e, K3, (r, n) => this.createHostedView(r, n), (r) => r.dom.remove()); } createHostedView(e, r) { let n = e.create(this.view); @@ -10126,20 +10126,20 @@ class Y_ { return this.passProp("resize"); } } -const QEe = /* @__PURE__ */ N$.compute([dT], (t) => { - let e = t.facet(dT); +const KEe = /* @__PURE__ */ _$.compute([K3], (t) => { + let e = t.facet(K3); return e.length === 0 ? null : { pos: Math.min(...e.map((r) => r.pos)), end: Math.max(...e.map((r) => { var n; return (n = r.end) !== null && n !== void 0 ? n : r.pos; })), - create: Y_.create, + create: M_.create, above: e[0].above, arrow: e.some((r) => r.arrow) }; }); -class VEe { +class JEe { constructor(e, r, n, i, s) { this.view = e, this.source = r, this.field = n, this.setHover = i, this.hoverTime = s, this.hoverTimeout = -1, this.restartTimeout = -1, this.pending = null, this.lastMove = { x: 0, y: 0, target: e.dom, time: 0 }, this.checkHover = this.checkHover.bind(this), e.dom.addEventListener("mouseleave", this.mouseleave = this.mouseleave.bind(this)), e.dom.addEventListener("mousemove", this.mousemove = this.mousemove.bind(this)); } @@ -10161,7 +10161,7 @@ class VEe { if (!n) return; let i, s = 1; - if (n instanceof Rd) + if (n instanceof Cd) i = n.posAtStart; else { if (i = e.posAtCoords(r), i == null) @@ -10169,7 +10169,7 @@ class VEe { let o = e.coordsAtPos(i); if (!o || r.y < o.top || r.y > o.bottom || r.x < o.left - e.defaultCharacterWidth || r.x > o.right + e.defaultCharacterWidth) return; - let l = e.bidiSpans(e.state.doc.lineAt(i)).find((h) => h.from <= i && h.to >= i), u = l && l.dir == Xn.RTL ? -1 : 1; + let l = e.bidiSpans(e.state.doc.lineAt(i)).find((h) => h.from <= i && h.to >= i), u = l && l.dir == Gn.RTL ? -1 : 1; s = r.x < o.left ? -u : u; } let a = this.source(e, i, s); @@ -10177,21 +10177,21 @@ class VEe { let o = this.pending = { pos: i }; a.then((l) => { this.pending == o && (this.pending = null, l && !(Array.isArray(l) && !l.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(l) ? l : [l]) })); - }, (l) => Wo(e.state, l, "hover tooltip")); + }, (l) => qo(e.state, l, "hover tooltip")); } else a && !(Array.isArray(a) && !a.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(a) ? a : [a]) }); } get tooltip() { - let e = this.view.plugin(P$), r = e ? e.manager.tooltips.findIndex((n) => n.create == Y_.create) : -1; + let e = this.view.plugin(E$), r = e ? e.manager.tooltips.findIndex((n) => n.create == M_.create) : -1; return r > -1 ? e.manager.tooltipViews[r] : null; } mousemove(e) { var r, n; this.lastMove = { x: e.clientX, y: e.clientY, target: e.target, time: Date.now() }, this.hoverTimeout < 0 && (this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime)); let { active: i, tooltip: s } = this; - if (i.length && s && !WEe(s.dom, e) || this.pending) { + if (i.length && s && !e_e(s.dom, e) || this.pending) { let { pos: a } = i[0] || this.pending, o = (n = (r = i[0]) === null || r === void 0 ? void 0 : r.end) !== null && n !== void 0 ? n : a; - (a == o ? this.view.posAtCoords(this.lastMove) != a : !YEe(this.view, a, o, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of([]) }), this.pending = null); + (a == o ? this.view.posAtCoords(this.lastMove) != a : !t_e(this.view, a, o, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of([]) }), this.pending = null); } } mouseleave(e) { @@ -10212,24 +10212,24 @@ class VEe { clearTimeout(this.hoverTimeout), this.view.dom.removeEventListener("mouseleave", this.mouseleave), this.view.dom.removeEventListener("mousemove", this.mousemove); } } -const tS = 4; -function WEe(t, e) { +const Q4 = 4; +function e_e(t, e) { let { left: r, right: n, top: i, bottom: s } = t.getBoundingClientRect(), a; if (a = t.querySelector(".cm-tooltip-arrow")) { let o = a.getBoundingClientRect(); i = Math.min(o.top, i), s = Math.max(o.bottom, s); } - return e.clientX >= r - tS && e.clientX <= n + tS && e.clientY >= i - tS && e.clientY <= s + tS; + return e.clientX >= r - Q4 && e.clientX <= n + Q4 && e.clientY >= i - Q4 && e.clientY <= s + Q4; } -function YEe(t, e, r, n, i, s) { +function t_e(t, e, r, n, i, s) { let a = t.scrollDOM.getBoundingClientRect(), o = t.documentTop + t.documentPadding.top + t.contentHeight; if (a.left > n || a.right < n || a.top > i || Math.min(a.bottom, o) < i) return !1; let l = t.posAtCoords({ x: n, y: i }, !1); return l >= e && l <= r; } -function fae(t, e = {}) { - let r = _r.define(), n = ai.define({ +function hae(t, e = {}) { + let r = Tr.define(), n = ii.define({ create() { return []; }, @@ -10237,7 +10237,7 @@ function fae(t, e = {}) { if (i.length && (e.hideOnChange && (s.docChanged || s.selection) ? i = [] : e.hideOn && (i = i.filter((a) => !e.hideOn(s, a))), s.docChanged)) { let a = []; for (let o of i) { - let l = s.changes.mapPos(o.pos, -1, gi.TrackDel); + let l = s.changes.mapPos(o.pos, -1, pi.TrackDel); if (l != null) { let u = Object.assign(/* @__PURE__ */ Object.create(null), o); u.pos = l, u.end != null && (u.end = s.changes.mapPos(u.end)), a.push(u); @@ -10246,28 +10246,28 @@ function fae(t, e = {}) { i = a; } for (let a of s.effects) - a.is(r) && (i = a.value), a.is(GEe) && (i = []); + a.is(r) && (i = a.value), a.is(r_e) && (i = []); return i; }, - provide: (i) => dT.from(i) + provide: (i) => K3.from(i) }); return { active: n, extension: [ n, - fn.define((i) => new VEe(i, t, n, r, e.hoverTime || 300)), - QEe + hn.define((i) => new JEe(i, t, n, r, e.hoverTime || 300)), + KEe ] }; } -function dae(t, e) { - let r = t.plugin(P$); +function fae(t, e) { + let r = t.plugin(E$); if (!r) return null; let n = r.manager.tooltips.indexOf(e); return n < 0 ? null : r.manager.tooltipViews[n]; } -const GEe = /* @__PURE__ */ _r.define(), wW = /* @__PURE__ */ Gt.define({ +const r_e = /* @__PURE__ */ Tr.define(), SW = /* @__PURE__ */ Yt.define({ combine(t) { let e, r; for (let n of t) @@ -10275,21 +10275,21 @@ const GEe = /* @__PURE__ */ _r.define(), wW = /* @__PURE__ */ Gt.define({ return { topContainer: e, bottomContainer: r }; } }); -function Qx(t, e) { - let r = t.plugin(pae), n = r ? r.specs.indexOf(e) : -1; +function Px(t, e) { + let r = t.plugin(dae), n = r ? r.specs.indexOf(e) : -1; return n > -1 ? r.panels[n] : null; } -const pae = /* @__PURE__ */ fn.fromClass(class { +const dae = /* @__PURE__ */ hn.fromClass(class { constructor(t) { this.input = t.state.facet(pg), this.specs = this.input.filter((r) => r), this.panels = this.specs.map((r) => r(t)); - let e = t.state.facet(wW); - this.top = new rS(t, !0, e.topContainer), this.bottom = new rS(t, !1, e.bottomContainer), this.top.sync(this.panels.filter((r) => r.top)), this.bottom.sync(this.panels.filter((r) => !r.top)); + let e = t.state.facet(SW); + this.top = new V4(t, !0, e.topContainer), this.bottom = new V4(t, !1, e.bottomContainer), this.top.sync(this.panels.filter((r) => r.top)), this.bottom.sync(this.panels.filter((r) => !r.top)); for (let r of this.panels) r.dom.classList.add("cm-panel"), r.mount && r.mount(); } update(t) { - let e = t.state.facet(wW); - this.top.container != e.topContainer && (this.top.sync([]), this.top = new rS(t.view, !0, e.topContainer)), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), this.bottom = new rS(t.view, !1, e.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses(); + let e = t.state.facet(SW); + this.top.container != e.topContainer && (this.top.sync([]), this.top = new V4(t.view, !0, e.topContainer)), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), this.bottom = new V4(t.view, !1, e.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses(); let r = t.state.facet(pg); if (r != this.input) { let n = r.filter((l) => l), i = [], s = [], a = [], o = []; @@ -10308,12 +10308,12 @@ const pae = /* @__PURE__ */ fn.fromClass(class { this.top.sync([]), this.bottom.sync([]); } }, { - provide: (t) => Mt.scrollMargins.of((e) => { + provide: (t) => Rt.scrollMargins.of((e) => { let r = e.plugin(t); return r && { top: r.top.scrollMargin(), bottom: r.bottom.scrollMargin() }; }) }); -class rS { +class V4 { constructor(e, r, n) { this.view = e, this.top = r, this.container = n, this.dom = void 0, this.classes = "", this.panels = [], this.syncClasses(); } @@ -10336,12 +10336,12 @@ class rS { for (let r of this.panels) if (r.dom.parentNode == this.dom) { for (; e != r.dom; ) - e = OW(e); + e = TW(e); e = e.nextSibling; } else this.dom.insertBefore(r.dom, e); for (; e; ) - e = OW(e); + e = TW(e); } scrollMargin() { return !this.dom || this.container ? 0 : Math.max(0, this.top ? this.dom.getBoundingClientRect().bottom - Math.max(0, this.view.scrollDOM.getBoundingClientRect().top) : Math.min(innerHeight, this.view.scrollDOM.getBoundingClientRect().bottom) - this.dom.getBoundingClientRect().top); @@ -10355,14 +10355,14 @@ class rS { } } } -function OW(t) { +function TW(t) { let e = t.nextSibling; return t.remove(), e; } -const pg = /* @__PURE__ */ Gt.define({ - enables: pae +const pg = /* @__PURE__ */ Yt.define({ + enables: dae }); -class hc extends ug { +class sc extends ug { compare(e) { return this == e || this.constructor == e.constructor && this.eq(e); } @@ -10372,67 +10372,67 @@ class hc extends ug { destroy(e) { } } -hc.prototype.elementClass = ""; -hc.prototype.toDOM = void 0; -hc.prototype.mapMode = gi.TrackBefore; -hc.prototype.startSide = hc.prototype.endSide = -1; -hc.prototype.point = !0; -const Z5 = /* @__PURE__ */ Gt.define(), HEe = /* @__PURE__ */ Gt.define(), XEe = { +sc.prototype.elementClass = ""; +sc.prototype.toDOM = void 0; +sc.prototype.mapMode = pi.TrackBefore; +sc.prototype.startSide = sc.prototype.endSide = -1; +sc.prototype.point = !0; +const $5 = /* @__PURE__ */ Yt.define(), n_e = /* @__PURE__ */ Yt.define(), i_e = { class: "", renderEmptyElements: !1, elementStyle: "", - markers: () => jr.empty, + markers: () => Zr.empty, lineMarker: () => null, widgetMarker: () => null, lineMarkerChange: null, initialSpacer: null, updateSpacer: null, domEventHandlers: {} -}, ox = /* @__PURE__ */ Gt.define(); -function G_(t) { - return [gae(), ox.of(Object.assign(Object.assign({}, XEe), t))]; +}, Kb = /* @__PURE__ */ Yt.define(); +function D_(t) { + return [pae(), Kb.of(Object.assign(Object.assign({}, i_e), t))]; } -const n9 = /* @__PURE__ */ Gt.define({ +const QM = /* @__PURE__ */ Yt.define({ combine: (t) => t.some((e) => e) }); -function gae(t) { +function pae(t) { let e = [ - jEe + s_e ]; - return t && t.fixed === !1 && e.push(n9.of(!0)), e; + return t && t.fixed === !1 && e.push(QM.of(!0)), e; } -const jEe = /* @__PURE__ */ fn.fromClass(class { +const s_e = /* @__PURE__ */ hn.fromClass(class { constructor(t) { - this.view = t, this.prevViewport = t.viewport, this.dom = document.createElement("div"), this.dom.className = "cm-gutters", this.dom.setAttribute("aria-hidden", "true"), this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px", this.gutters = t.state.facet(ox).map((e) => new SW(t, e)); + this.view = t, this.prevViewport = t.viewport, this.dom = document.createElement("div"), this.dom.className = "cm-gutters", this.dom.setAttribute("aria-hidden", "true"), this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px", this.gutters = t.state.facet(Kb).map((e) => new EW(t, e)); for (let e of this.gutters) this.dom.appendChild(e.dom); - this.fixed = !t.state.facet(n9), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM); + this.fixed = !t.state.facet(QM), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM); } update(t) { if (this.updateGutters(t)) { let e = this.prevViewport, r = t.view.viewport, n = Math.min(e.to, r.to) - Math.max(e.from, r.from); this.syncGutters(n < (r.to - r.from) * 0.8); } - t.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px"), this.view.state.facet(n9) != !this.fixed && (this.fixed = !this.fixed, this.dom.style.position = this.fixed ? "sticky" : ""), this.prevViewport = t.view.viewport; + t.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px"), this.view.state.facet(QM) != !this.fixed && (this.fixed = !this.fixed, this.dom.style.position = this.fixed ? "sticky" : ""), this.prevViewport = t.view.viewport; } syncGutters(t) { let e = this.dom.nextSibling; t && this.dom.remove(); - let r = jr.iter(this.view.state.facet(Z5), this.view.viewport.from), n = [], i = this.gutters.map((s) => new ZEe(s, this.view.viewport, -this.view.documentPadding.top)); + let r = Zr.iter(this.view.state.facet($5), this.view.viewport.from), n = [], i = this.gutters.map((s) => new a_e(s, this.view.viewport, -this.view.documentPadding.top)); for (let s of this.view.viewportLineBlocks) if (n.length && (n = []), Array.isArray(s.type)) { let a = !0; for (let o of s.type) - if (o.type == uo.Text && a) { - i9(r, n, o.from); + if (o.type == lo.Text && a) { + VM(r, n, o.from); for (let l of i) l.line(this.view, o, n); a = !1; } else if (o.widget) for (let l of i) l.widget(this.view, o); - } else if (s.type == uo.Text) { - i9(r, n, s.from); + } else if (s.type == lo.Text) { + VM(r, n, s.from); for (let a of i) a.line(this.view, s, n); } else if (s.widget) @@ -10443,7 +10443,7 @@ const jEe = /* @__PURE__ */ fn.fromClass(class { t && this.view.scrollDOM.insertBefore(this.dom, e); } updateGutters(t) { - let e = t.startState.facet(ox), r = t.state.facet(ox), n = t.docChanged || t.heightChanged || t.viewportChanged || !jr.eq(t.startState.facet(Z5), t.state.facet(Z5), t.view.viewport.from, t.view.viewport.to); + let e = t.startState.facet(Kb), r = t.state.facet(Kb), n = t.docChanged || t.heightChanged || t.viewportChanged || !Zr.eq(t.startState.facet($5), t.state.facet($5), t.view.viewport.from, t.view.viewport.to); if (e == r) for (let i of this.gutters) i.update(t) && (n = !0); @@ -10452,7 +10452,7 @@ const jEe = /* @__PURE__ */ fn.fromClass(class { let i = []; for (let s of r) { let a = e.indexOf(s); - a < 0 ? i.push(new SW(this.view, s)) : (this.gutters[a].update(t), i.push(this.gutters[a])); + a < 0 ? i.push(new EW(this.view, s)) : (this.gutters[a].update(t), i.push(this.gutters[a])); } for (let s of this.gutters) s.dom.remove(), i.indexOf(s) < 0 && s.destroy(); @@ -10468,26 +10468,26 @@ const jEe = /* @__PURE__ */ fn.fromClass(class { this.dom.remove(); } }, { - provide: (t) => Mt.scrollMargins.of((e) => { + provide: (t) => Rt.scrollMargins.of((e) => { let r = e.plugin(t); - return !r || r.gutters.length == 0 || !r.fixed ? null : e.textDirection == Xn.LTR ? { left: r.dom.offsetWidth * e.scaleX } : { right: r.dom.offsetWidth * e.scaleX }; + return !r || r.gutters.length == 0 || !r.fixed ? null : e.textDirection == Gn.LTR ? { left: r.dom.offsetWidth * e.scaleX } : { right: r.dom.offsetWidth * e.scaleX }; }) }); -function kW(t) { +function CW(t) { return Array.isArray(t) ? t : [t]; } -function i9(t, e, r) { +function VM(t, e, r) { for (; t.value && t.from <= r; ) t.from == r && e.push(t.value), t.next(); } -class ZEe { +class a_e { constructor(e, r, n) { - this.gutter = e, this.height = n, this.i = 0, this.cursor = jr.iter(e.markers, r.from); + this.gutter = e, this.height = n, this.i = 0, this.cursor = Zr.iter(e.markers, r.from); } addElement(e, r, n) { let { gutter: i } = this, s = (r.top - this.height) / e.scaleY, a = r.height / e.scaleY; if (this.i == i.elements.length) { - let o = new mae(e, a, s, n); + let o = new gae(e, a, s, n); i.elements.push(o), i.dom.appendChild(o.dom); } else i.elements[this.i].update(e, a, s, n); @@ -10495,7 +10495,7 @@ class ZEe { } line(e, r, n) { let i = []; - i9(this.cursor, i, r.from), n.length && (i = i.concat(n)); + VM(this.cursor, i, r.from), n.length && (i = i.concat(n)); let s = this.gutter.config.lineMarker(e, r, i); s && i.unshift(s); let a = this.gutter; @@ -10503,7 +10503,7 @@ class ZEe { } widget(e, r) { let n = this.gutter.config.widgetMarker(e, r.widget, r), i = n ? [n] : null; - for (let s of e.state.facet(HEe)) { + for (let s of e.state.facet(n_e)) { let a = s(e, r.widget, r); a && (i || (i = [])).push(a); } @@ -10517,7 +10517,7 @@ class ZEe { } } } -class SW { +class EW { constructor(e, r) { this.view = e, this.config = r, this.elements = [], this.spacer = null, this.dom = document.createElement("div"), this.dom.className = "cm-gutter" + (this.config.class ? " " + this.config.class : ""); for (let n in r.domEventHandlers) @@ -10533,28 +10533,28 @@ class SW { let o = e.lineBlockAtHeight(a - e.documentTop); r.domEventHandlers[n](e, o, i) && i.preventDefault(); }); - this.markers = kW(r.markers(e)), r.initialSpacer && (this.spacer = new mae(e, 0, 0, [r.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none"); + this.markers = CW(r.markers(e)), r.initialSpacer && (this.spacer = new gae(e, 0, 0, [r.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none"); } update(e) { let r = this.markers; - if (this.markers = kW(this.config.markers(e.view)), this.spacer && this.config.updateSpacer) { + if (this.markers = CW(this.config.markers(e.view)), this.spacer && this.config.updateSpacer) { let i = this.config.updateSpacer(this.spacer.markers[0], e); i != this.spacer.markers[0] && this.spacer.update(e.view, 0, 0, [i]); } let n = e.view.viewport; - return !jr.eq(this.markers, r, n.from, n.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(e) : !1); + return !Zr.eq(this.markers, r, n.from, n.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(e) : !1); } destroy() { for (let e of this.elements) e.destroy(); } } -class mae { +class gae { constructor(e, r, n, i) { this.height = -1, this.above = 0, this.markers = [], this.dom = document.createElement("div"), this.dom.className = "cm-gutterElement", this.update(e, r, n, i); } update(e, r, n, i) { - this.height != r && (this.height = r, this.dom.style.height = r + "px"), this.above != n && (this.dom.style.marginTop = (this.above = n) ? n + "px" : ""), KEe(this.markers, i) || this.setMarkers(e, i); + this.height != r && (this.height = r, this.dom.style.height = r + "px"), this.above != n && (this.dom.style.marginTop = (this.above = n) ? n + "px" : ""), o_e(this.markers, i) || this.setMarkers(e, i); } setMarkers(e, r) { let n = "cm-gutterElement", i = this.dom.firstChild; @@ -10588,7 +10588,7 @@ class mae { this.setMarkers(null, []); } } -function KEe(t, e) { +function o_e(t, e) { if (t.length != e.length) return !1; for (let r = 0; r < t.length; r++) @@ -10596,9 +10596,9 @@ function KEe(t, e) { return !1; return !0; } -const JEe = /* @__PURE__ */ Gt.define(), e_e = /* @__PURE__ */ Gt.define(), d1 = /* @__PURE__ */ Gt.define({ +const l_e = /* @__PURE__ */ Yt.define(), c_e = /* @__PURE__ */ Yt.define(), l1 = /* @__PURE__ */ Yt.define({ combine(t) { - return Th(t, { formatNumber: String, domEventHandlers: {} }, { + return wh(t, { formatNumber: String, domEventHandlers: {} }, { domEventHandlers(e, r) { let n = Object.assign({}, e); for (let i in r) { @@ -10610,7 +10610,7 @@ const JEe = /* @__PURE__ */ Gt.define(), e_e = /* @__PURE__ */ Gt.define(), d1 = }); } }); -class K7 extends hc { +class F7 extends sc { constructor(e) { super(), this.number = e; } @@ -10621,112 +10621,112 @@ class K7 extends hc { return document.createTextNode(this.number); } } -function J7(t, e) { - return t.state.facet(d1).formatNumber(e, t.state); +function z7(t, e) { + return t.state.facet(l1).formatNumber(e, t.state); } -const t_e = /* @__PURE__ */ ox.compute([d1], (t) => ({ +const u_e = /* @__PURE__ */ Kb.compute([l1], (t) => ({ class: "cm-lineNumbers", renderEmptyElements: !1, markers(e) { - return e.state.facet(JEe); + return e.state.facet(l_e); }, lineMarker(e, r, n) { - return n.some((i) => i.toDOM) ? null : new K7(J7(e, e.state.doc.lineAt(r.from).number)); + return n.some((i) => i.toDOM) ? null : new F7(z7(e, e.state.doc.lineAt(r.from).number)); }, widgetMarker: (e, r, n) => { - for (let i of e.state.facet(e_e)) { + for (let i of e.state.facet(c_e)) { let s = i(e, r, n); if (s) return s; } return null; }, - lineMarkerChange: (e) => e.startState.facet(d1) != e.state.facet(d1), + lineMarkerChange: (e) => e.startState.facet(l1) != e.state.facet(l1), initialSpacer(e) { - return new K7(J7(e, TW(e.state.doc.lines))); + return new F7(z7(e, _W(e.state.doc.lines))); }, updateSpacer(e, r) { - let n = J7(r.view, TW(r.view.state.doc.lines)); - return n == e.number ? e : new K7(n); + let n = z7(r.view, _W(r.view.state.doc.lines)); + return n == e.number ? e : new F7(n); }, - domEventHandlers: t.facet(d1).domEventHandlers + domEventHandlers: t.facet(l1).domEventHandlers })); -function r_e(t = {}) { +function h_e(t = {}) { return [ - d1.of(t), - gae(), - t_e + l1.of(t), + pae(), + u_e ]; } -function TW(t) { +function _W(t) { let e = 9; for (; e < t; ) e = e * 10 + 9; return e; } -const n_e = /* @__PURE__ */ new class extends hc { +const f_e = /* @__PURE__ */ new class extends sc { constructor() { super(...arguments), this.elementClass = "cm-activeLineGutter"; } -}(), i_e = /* @__PURE__ */ Z5.compute(["selection"], (t) => { +}(), d_e = /* @__PURE__ */ $5.compute(["selection"], (t) => { let e = [], r = -1; for (let n of t.selection.ranges) { let i = t.doc.lineAt(n.head).from; - i > r && (r = i, e.push(n_e.range(i))); + i > r && (r = i, e.push(f_e.range(i))); } - return jr.of(e); + return Zr.of(e); }); -function s_e() { - return i_e; +function p_e() { + return d_e; } -const vae = 1024; -let a_e = 0; -class Zl { +const mae = 1024; +let g_e = 0; +class Wl { constructor(e, r) { this.from = e, this.to = r; } } -class Fr { +class Br { constructor(e = {}) { - this.id = a_e++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => { + this.id = g_e++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => { throw new Error("This node type doesn't define a deserialize function"); }); } add(e) { if (this.perNode) throw new RangeError("Can't add per-node props to node types"); - return typeof e != "function" && (e = ys.match(e)), (r) => { + return typeof e != "function" && (e = ms.match(e)), (r) => { let n = e(r); return n === void 0 ? null : [this, n]; }; } } -Fr.closedBy = new Fr({ deserialize: (t) => t.split(" ") }); -Fr.openedBy = new Fr({ deserialize: (t) => t.split(" ") }); -Fr.group = new Fr({ deserialize: (t) => t.split(" ") }); -Fr.isolate = new Fr({ deserialize: (t) => { +Br.closedBy = new Br({ deserialize: (t) => t.split(" ") }); +Br.openedBy = new Br({ deserialize: (t) => t.split(" ") }); +Br.group = new Br({ deserialize: (t) => t.split(" ") }); +Br.isolate = new Br({ deserialize: (t) => { if (t && t != "rtl" && t != "ltr" && t != "auto") throw new RangeError("Invalid value for isolate: " + t); return t || "auto"; } }); -Fr.contextHash = new Fr({ perNode: !0 }); -Fr.lookAhead = new Fr({ perNode: !0 }); -Fr.mounted = new Fr({ perNode: !0 }); -class Vx { +Br.contextHash = new Br({ perNode: !0 }); +Br.lookAhead = new Br({ perNode: !0 }); +Br.mounted = new Br({ perNode: !0 }); +class Nx { constructor(e, r, n) { this.tree = e, this.overlay = r, this.parser = n; } static get(e) { - return e && e.props && e.props[Fr.mounted.id]; + return e && e.props && e.props[Br.mounted.id]; } } -const o_e = /* @__PURE__ */ Object.create(null); -class ys { +const m_e = /* @__PURE__ */ Object.create(null); +class ms { constructor(e, r, n, i = 0) { this.name = e, this.props = r, this.id = n, this.flags = i; } static define(e) { - let r = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : o_e, n = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new ys(e.name || "", r, e.id, n); + let r = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : m_e, n = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new ms(e.name || "", r, e.id, n); if (e.props) { for (let s of e.props) if (Array.isArray(s) || (s = s(i)), s) { @@ -10756,7 +10756,7 @@ class ys { if (typeof e == "string") { if (this.name == e) return !0; - let r = this.prop(Fr.group); + let r = this.prop(Br.group); return r ? r.indexOf(e) > -1 : !1; } return this.id == e; @@ -10767,7 +10767,7 @@ class ys { for (let i of n.split(" ")) r[i] = e[n]; return (n) => { - for (let i = n.prop(Fr.group), s = -1; s < (i ? i.length : 0); s++) { + for (let i = n.prop(Br.group), s = -1; s < (i ? i.length : 0); s++) { let a = r[s < 0 ? n.name : i[s]]; if (a) return a; @@ -10775,8 +10775,8 @@ class ys { }; } } -ys.none = new ys("", /* @__PURE__ */ Object.create(null), 0, 8); -class bk { +ms.none = new ms("", /* @__PURE__ */ Object.create(null), 0, 8); +class hk { constructor(e) { this.types = e; for (let r = 0; r < e.length; r++) @@ -10791,16 +10791,16 @@ class bk { let a = s(n); a && (i || (i = Object.assign({}, n.props)), i[a[0].id] = a[1]); } - r.push(i ? new ys(n.name, i, n.id, n.flags) : n); + r.push(i ? new ms(n.name, i, n.id, n.flags) : n); } - return new bk(r); + return new hk(r); } } -const nS = /* @__PURE__ */ new WeakMap(), CW = /* @__PURE__ */ new WeakMap(); -var Hn; +const W4 = /* @__PURE__ */ new WeakMap(), AW = /* @__PURE__ */ new WeakMap(); +var Yn; (function(t) { t[t.ExcludeBuffers = 1] = "ExcludeBuffers", t[t.IncludeAnonymous = 2] = "IncludeAnonymous", t[t.IgnoreMounts = 4] = "IgnoreMounts", t[t.IgnoreOverlays = 8] = "IgnoreOverlays"; -})(Hn || (Hn = {})); +})(Yn || (Yn = {})); class kn { constructor(e, r, n, i, s) { if (this.type = e, this.children = r, this.positions = n, this.length = i, this.props = null, s && s.length) { @@ -10810,7 +10810,7 @@ class kn { } } toString() { - let e = Vx.get(this); + let e = Nx.get(this); if (e && !e.overlay) return e.tree.toString(); let r = ""; @@ -10821,29 +10821,29 @@ class kn { return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (r.length ? "(" + r + ")" : "") : r; } cursor(e = 0) { - return new pT(this.topNode, e); + return new J3(this.topNode, e); } cursorAt(e, r = 0, n = 0) { - let i = nS.get(this) || this.topNode, s = new pT(i); - return s.moveTo(e, r), nS.set(this, s._tree), s; + let i = W4.get(this) || this.topNode, s = new J3(i); + return s.moveTo(e, r), W4.set(this, s._tree), s; } get topNode() { - return new Ba(this, 0, 0, null); + return new Ia(this, 0, 0, null); } resolve(e, r = 0) { - let n = Wx(nS.get(this) || this.topNode, e, r, !1); - return nS.set(this, n), n; + let n = Ix(W4.get(this) || this.topNode, e, r, !1); + return W4.set(this, n), n; } resolveInner(e, r = 0) { - let n = Wx(CW.get(this) || this.topNode, e, r, !0); - return CW.set(this, n), n; + let n = Ix(AW.get(this) || this.topNode, e, r, !0); + return AW.set(this, n), n; } resolveStack(e, r = 0) { - return u_e(this, e, r); + return b_e(this, e, r); } iterate(e) { - let { enter: r, leave: n, from: i = 0, to: s = this.length } = e, a = e.mode || 0, o = (a & Hn.IncludeAnonymous) > 0; - for (let l = this.cursor(a | Hn.IncludeAnonymous); ; ) { + let { enter: r, leave: n, from: i = 0, to: s = this.length } = e, a = e.mode || 0, o = (a & Yn.IncludeAnonymous) > 0; + for (let l = this.cursor(a | Yn.IncludeAnonymous); ; ) { let u = !1; if (l.from <= s && l.to >= i && (!o && l.type.isAnonymous || r(l) !== !1)) { if (l.firstChild()) @@ -10868,14 +10868,14 @@ class kn { return e; } balance(e = {}) { - return this.children.length <= 8 ? this : B$(ys.none, this.children, this.positions, 0, this.children.length, 0, this.length, (r, n, i) => new kn(this.type, r, n, i, this.propValues), e.makeTree || ((r, n, i) => new kn(ys.none, r, n, i))); + return this.children.length <= 8 ? this : L$(ms.none, this.children, this.positions, 0, this.children.length, 0, this.length, (r, n, i) => new kn(this.type, r, n, i, this.propValues), e.makeTree || ((r, n, i) => new kn(ms.none, r, n, i))); } static build(e) { - return h_e(e); + return x_e(e); } } -kn.empty = new kn(ys.none, [], [], 0); -class I$ { +kn.empty = new kn(ms.none, [], [], 0); +class A$ { constructor(e, r) { this.buffer = e, this.index = r; } @@ -10898,15 +10898,15 @@ class I$ { this.index -= 4; } fork() { - return new I$(this.buffer, this.index); + return new A$(this.buffer, this.index); } } -class op { +class ap { constructor(e, r, n) { this.buffer = e, this.length = r, this.set = n; } get type() { - return ys.none; + return ms.none; } toString() { let e = []; @@ -10925,7 +10925,7 @@ class op { } findChild(e, r, n, i, s) { let { buffer: a } = this, o = -1; - for (let l = e; l != r && !(yae(s, i, a[l + 1], a[l + 2]) && (o = l, n > 0)); l = a[l + 3]) + for (let l = e; l != r && !(vae(s, i, a[l + 1], a[l + 2]) && (o = l, n > 0)); l = a[l + 3]) ; return o; } @@ -10936,10 +10936,10 @@ class op { let u = s[l++] = i[o++] - n; s[l++] = i[o++] - e, a = Math.max(a, u); } - return new op(s, a, this.set); + return new ap(s, a, this.set); } } -function yae(t, e, r, n) { +function vae(t, e, r, n) { switch (t) { case -2: return r < e; @@ -10955,17 +10955,17 @@ function yae(t, e, r, n) { return !0; } } -function Wx(t, e, r, n) { +function Ix(t, e, r, n) { for (var i; t.from == t.to || (r < 1 ? t.from >= e : t.from > e) || (r > -1 ? t.to <= e : t.to < e); ) { - let a = !n && t instanceof Ba && t.index < 0 ? null : t.parent; + let a = !n && t instanceof Ia && t.index < 0 ? null : t.parent; if (!a) return t; t = a; } - let s = n ? 0 : Hn.IgnoreOverlays; + let s = n ? 0 : Yn.IgnoreOverlays; if (n) for (let a = t, o = a.parent; o; a = o, o = a.parent) - a instanceof Ba && a.index < 0 && ((i = o.enter(e, r, s)) === null || i === void 0 ? void 0 : i.from) != a.from && (t = o); + a instanceof Ia && a.index < 0 && ((i = o.enter(e, r, s)) === null || i === void 0 ? void 0 : i.from) != a.from && (t = o); for (; ; ) { let a = t.enter(e, r, s); if (!a) @@ -10973,25 +10973,25 @@ function Wx(t, e, r, n) { t = a; } } -class bae { +class yae { cursor(e = 0) { - return new pT(this, e); + return new J3(this, e); } getChild(e, r = null, n = null) { - let i = EW(this, e, r, n); + let i = RW(this, e, r, n); return i.length ? i[0] : null; } getChildren(e, r = null, n = null) { - return EW(this, e, r, n); + return RW(this, e, r, n); } resolve(e, r = 0) { - return Wx(this, e, r, !1); + return Ix(this, e, r, !1); } resolveInner(e, r = 0) { - return Wx(this, e, r, !0); + return Ix(this, e, r, !0); } matchContext(e) { - return s9(this.parent, e); + return WM(this.parent, e); } enterUnfinishedNodesBefore(e) { let r = this.childBefore(e), n = this; @@ -11010,7 +11010,7 @@ class bae { return this.parent; } } -class Ba extends bae { +class Ia extends yae { constructor(e, r, n, i) { super(), this._tree = e, this.from = r, this.index = n, this._parent = i; } @@ -11027,23 +11027,23 @@ class Ba extends bae { for (let a = this; ; ) { for (let { children: o, positions: l } = a._tree, u = r > 0 ? o.length : -1; e != u; e += r) { let h = o[e], f = l[e] + a.from; - if (!!yae(i, n, f, f + h.length)) { - if (h instanceof op) { - if (s & Hn.ExcludeBuffers) + if (!!vae(i, n, f, f + h.length)) { + if (h instanceof ap) { + if (s & Yn.ExcludeBuffers) continue; let d = h.findChild(0, h.buffer.length, r, n - f, i); if (d > -1) - return new Yu(new l_e(a, h, e, f), null, d); - } else if (s & Hn.IncludeAnonymous || !h.type.isAnonymous || $$(h)) { + return new qu(new v_e(a, h, e, f), null, d); + } else if (s & Yn.IncludeAnonymous || !h.type.isAnonymous || R$(h)) { let d; - if (!(s & Hn.IgnoreMounts) && (d = Vx.get(h)) && !d.overlay) - return new Ba(d.tree, f, e, a); - let p = new Ba(h, f, e, a); - return s & Hn.IncludeAnonymous || !p.type.isAnonymous ? p : p.nextChild(r < 0 ? h.children.length - 1 : 0, r, n, i); + if (!(s & Yn.IgnoreMounts) && (d = Nx.get(h)) && !d.overlay) + return new Ia(d.tree, f, e, a); + let p = new Ia(h, f, e, a); + return s & Yn.IncludeAnonymous || !p.type.isAnonymous ? p : p.nextChild(r < 0 ? h.children.length - 1 : 0, r, n, i); } } } - if (s & Hn.IncludeAnonymous || !a.type.isAnonymous || (a.index >= 0 ? e = a.index + r : e = r < 0 ? -1 : a._parent._tree.children.length, a = a._parent, !a)) + if (s & Yn.IncludeAnonymous || !a.type.isAnonymous || (a.index >= 0 ? e = a.index + r : e = r < 0 ? -1 : a._parent._tree.children.length, a = a._parent, !a)) return null; } } @@ -11061,11 +11061,11 @@ class Ba extends bae { } enter(e, r, n = 0) { let i; - if (!(n & Hn.IgnoreOverlays) && (i = Vx.get(this._tree)) && i.overlay) { + if (!(n & Yn.IgnoreOverlays) && (i = Nx.get(this._tree)) && i.overlay) { let s = e - this.from; for (let { from: a, to: o } of i.overlay) if ((r > 0 ? a <= s : a < s) && (r < 0 ? o >= s : o > s)) - return new Ba(i.tree, i.overlay[0].from + this.from, -1, this); + return new Ia(i.tree, i.overlay[0].from + this.from, -1, this); } return this.nextChild(0, 1, e, r, n); } @@ -11094,7 +11094,7 @@ class Ba extends bae { return this._tree.toString(); } } -function EW(t, e, r, n) { +function RW(t, e, r, n) { let i = t.cursor(), s = []; if (!i.firstChild()) return s; @@ -11110,7 +11110,7 @@ function EW(t, e, r, n) { return n == null ? s : []; } } -function s9(t, e, r = e.length - 1) { +function WM(t, e, r = e.length - 1) { for (let n = t; r >= 0; n = n.parent) { if (!n) return !1; @@ -11122,12 +11122,12 @@ function s9(t, e, r = e.length - 1) { } return !0; } -class l_e { +class v_e { constructor(e, r, n, i) { this.parent = e, this.buffer = r, this.index = n, this.start = i; } } -class Yu extends bae { +class qu extends yae { get name() { return this.type.name; } @@ -11142,7 +11142,7 @@ class Yu extends bae { } child(e, r, n) { let { buffer: i } = this.context, s = i.findChild(this.index + 4, i.buffer[this.index + 3], e, r - this.context.start, n); - return s < 0 ? null : new Yu(this.context, this, s); + return s < 0 ? null : new qu(this.context, this, s); } get firstChild() { return this.child(1, 0, 4); @@ -11157,10 +11157,10 @@ class Yu extends bae { return this.child(-1, e, -2); } enter(e, r, n = 0) { - if (n & Hn.ExcludeBuffers) + if (n & Yn.ExcludeBuffers) return null; let { buffer: i } = this.context, s = i.findChild(this.index + 4, i.buffer[this.index + 3], r > 0 ? 1 : -1, e - this.context.start, r); - return s < 0 ? null : new Yu(this.context, this, s); + return s < 0 ? null : new qu(this.context, this, s); } get parent() { return this._parent || this.context.parent.nextSignificantParent(); @@ -11170,11 +11170,11 @@ class Yu extends bae { } get nextSibling() { let { buffer: e } = this.context, r = e.buffer[this.index + 3]; - return r < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new Yu(this.context, this._parent, r) : this.externalSibling(1); + return r < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new qu(this.context, this._parent, r) : this.externalSibling(1); } get prevSibling() { let { buffer: e } = this.context, r = this._parent ? this._parent.index + 4 : 0; - return this.index == r ? this.externalSibling(-1) : new Yu(this.context, this._parent, e.findChild(r, this.index, -1, 0, 4)); + return this.index == r ? this.externalSibling(-1) : new qu(this.context, this._parent, e.findChild(r, this.index, -1, 0, 4)); } get tree() { return null; @@ -11191,7 +11191,7 @@ class Yu extends bae { return this.context.buffer.childString(this.index); } } -function xae(t) { +function bae(t) { if (!t.length) return null; let e = 0, r = t[0]; @@ -11199,38 +11199,38 @@ function xae(t) { let a = t[s]; (a.from > r.from || a.to < r.to) && (r = a, e = s); } - let n = r instanceof Ba && r.index < 0 ? null : r.parent, i = t.slice(); - return n ? i[e] = n : i.splice(e, 1), new c_e(i, r); + let n = r instanceof Ia && r.index < 0 ? null : r.parent, i = t.slice(); + return n ? i[e] = n : i.splice(e, 1), new y_e(i, r); } -class c_e { +class y_e { constructor(e, r) { this.heads = e, this.node = r; } get next() { - return xae(this.heads); + return bae(this.heads); } } -function u_e(t, e, r) { +function b_e(t, e, r) { let n = t.resolveInner(e, r), i = null; - for (let s = n instanceof Ba ? n : n.context.parent; s; s = s.parent) + for (let s = n instanceof Ia ? n : n.context.parent; s; s = s.parent) if (s.index < 0) { let a = s.parent; (i || (i = [n])).push(a.resolve(e, r)), s = a; } else { - let a = Vx.get(s.tree); + let a = Nx.get(s.tree); if (a && a.overlay && a.overlay[0].from <= e && a.overlay[a.overlay.length - 1].to >= e) { - let o = new Ba(a.tree, a.overlay[0].from + s.from, -1, s); - (i || (i = [n])).push(Wx(o, e, r, !1)); + let o = new Ia(a.tree, a.overlay[0].from + s.from, -1, s); + (i || (i = [n])).push(Ix(o, e, r, !1)); } } - return i ? xae(i) : n; + return i ? bae(i) : n; } -class pT { +class J3 { get name() { return this.type.name; } constructor(e, r = 0) { - if (this.mode = r, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof Ba) + if (this.mode = r, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof Ia) this.yieldNode(e); else { this._tree = e.context.parent, this.buffer = e.context; @@ -11248,7 +11248,7 @@ class pT { return this.type = r || i.set.types[i.buffer[e]], this.from = n + i.buffer[e + 1], this.to = n + i.buffer[e + 2], !0; } yield(e) { - return e ? e instanceof Ba ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1; + return e ? e instanceof Ia ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1; } toString() { return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString(); @@ -11272,14 +11272,14 @@ class pT { return this.enterChild(-1, e, -2); } enter(e, r, n = this.mode) { - return this.buffer ? n & Hn.ExcludeBuffers ? !1 : this.enterChild(1, e, r) : this.yield(this._tree.enter(e, r, n)); + return this.buffer ? n & Yn.ExcludeBuffers ? !1 : this.enterChild(1, e, r) : this.yield(this._tree.enter(e, r, n)); } parent() { if (!this.buffer) - return this.yieldNode(this.mode & Hn.IncludeAnonymous ? this._tree._parent : this._tree.parent); + return this.yieldNode(this.mode & Yn.IncludeAnonymous ? this._tree._parent : this._tree.parent); if (this.stack.length) return this.yieldBuf(this.stack.pop()); - let e = this.mode & Hn.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent(); + let e = this.mode & Yn.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent(); return this.buffer = null, this.yieldNode(e); } sibling(e) { @@ -11320,7 +11320,7 @@ class pT { if (r > -1) for (let s = r + e, a = e < 0 ? -1 : n._tree.children.length; s != a; s += e) { let o = n._tree.children[s]; - if (this.mode & Hn.IncludeAnonymous || o instanceof op || !o.type.isAnonymous || $$(o)) + if (this.mode & Yn.IncludeAnonymous || o instanceof ap || !o.type.isAnonymous || R$(o)) return !1; } return !0; @@ -11366,8 +11366,8 @@ class pT { } } for (let i = n; i < this.stack.length; i++) - r = new Yu(this.buffer, r, this.stack[i]); - return this.bufferNode = new Yu(this.buffer, r, this.index); + r = new qu(this.buffer, r, this.stack[i]); + return this.bufferNode = new qu(this.buffer, r, this.index); } get tree() { return this.buffer ? null : this._tree._tree; @@ -11393,11 +11393,11 @@ class pT { } matchContext(e) { if (!this.buffer) - return s9(this.node.parent, e); + return WM(this.node.parent, e); let { buffer: r } = this.buffer, { types: n } = r.set; for (let i = e.length - 1, s = this.stack.length - 1; i >= 0; s--) { if (s < 0) - return s9(this._tree, e, i); + return WM(this._tree, e, i); let a = n[r.buffer[this.stack[s]]]; if (!a.isAnonymous) { if (e[i] && e[i] != a.name) @@ -11408,133 +11408,133 @@ class pT { return !0; } } -function $$(t) { - return t.children.some((e) => e instanceof op || !e.type.isAnonymous || $$(e)); +function R$(t) { + return t.children.some((e) => e instanceof ap || !e.type.isAnonymous || R$(e)); } -function h_e(t) { +function x_e(t) { var e; - let { buffer: r, nodeSet: n, maxBufferLength: i = vae, reused: s = [], minRepeatType: a = n.types.length } = t, o = Array.isArray(r) ? new I$(r, r.length) : r, l = n.types, u = 0, h = 0; - function f(S, C, T, D, E, N) { - let { id: P, start: L, end: F, size: k } = o, B = h, A = u; + let { buffer: r, nodeSet: n, maxBufferLength: i = mae, reused: s = [], minRepeatType: a = n.types.length } = t, o = Array.isArray(r) ? new A$(r, r.length) : r, l = n.types, u = 0, h = 0; + function f(S, C, T, M, E, P) { + let { id: L, start: D, end: F, size: k } = o, I = h, _ = u; for (; k < 0; ) if (o.next(), k == -1) { - let W = s[P]; - T.push(W), D.push(L - S); + let U = s[L]; + T.push(U), M.push(D - S); return; } else if (k == -3) { - u = P; + u = L; return; } else if (k == -4) { - h = P; + h = L; return; } else throw new RangeError(`Unrecognized record size: ${k}`); - let M = l[P], I, q, Y = L - S; - if (F - L <= i && (q = v(o.pos - C, E))) { - let W = new Uint16Array(q.size - q.skip), Z = o.pos - q.size, K = W.length; - for (; o.pos > Z; ) - K = y(q.start, W, K); - I = new op(W, F - q.start, n), Y = q.start - S; + let R = l[L], N, $, V = D - S; + if (F - D <= i && ($ = v(o.pos - C, E))) { + let U = new Uint16Array($.size - $.skip), X = o.pos - $.size, j = U.length; + for (; o.pos > X; ) + j = y($.start, U, j); + N = new ap(U, F - $.start, n), V = $.start - S; } else { - let W = o.pos - k; + let U = o.pos - k; o.next(); - let Z = [], K = [], re = P >= a ? P : -1, pe = 0, ne = F; - for (; o.pos > W; ) - re >= 0 && o.id == re && o.size >= 0 ? (o.end <= ne - i && (g(Z, K, L, pe, o.end, ne, re, B, A), pe = Z.length, ne = o.end), o.next()) : N > 2500 ? d(L, W, Z, K) : f(L, W, Z, K, re, N + 1); - if (re >= 0 && pe > 0 && pe < Z.length && g(Z, K, L, pe, L, ne, re, B, A), Z.reverse(), K.reverse(), re > -1 && pe > 0) { - let le = p(M, A); - I = B$(M, Z, K, 0, Z.length, 0, F - L, le, le); + let X = [], j = [], te = L >= a ? L : -1, fe = 0, re = F; + for (; o.pos > U; ) + te >= 0 && o.id == te && o.size >= 0 ? (o.end <= re - i && (g(X, j, D, fe, o.end, re, te, I, _), fe = X.length, re = o.end), o.next()) : P > 2500 ? d(D, U, X, j) : f(D, U, X, j, te, P + 1); + if (te >= 0 && fe > 0 && fe < X.length && g(X, j, D, fe, D, re, te, I, _), X.reverse(), j.reverse(), te > -1 && fe > 0) { + let ae = p(R, _); + N = L$(R, X, j, 0, X.length, 0, F - D, ae, ae); } else - I = m(M, Z, K, F - L, B - F, A); + N = m(R, X, j, F - D, I - F, _); } - T.push(I), D.push(Y); + T.push(N), M.push(V); } - function d(S, C, T, D) { - let E = [], N = 0, P = -1; + function d(S, C, T, M) { + let E = [], P = 0, L = -1; for (; o.pos > C; ) { - let { id: L, start: F, end: k, size: B } = o; - if (B > 4) + let { id: D, start: F, end: k, size: I } = o; + if (I > 4) o.next(); else { - if (P > -1 && F < P) + if (L > -1 && F < L) break; - P < 0 && (P = k - i), E.push(L, F, k), N++, o.next(); + L < 0 && (L = k - i), E.push(D, F, k), P++, o.next(); } } - if (N) { - let L = new Uint16Array(N * 4), F = E[E.length - 2]; - for (let k = E.length - 3, B = 0; k >= 0; k -= 3) - L[B++] = E[k], L[B++] = E[k + 1] - F, L[B++] = E[k + 2] - F, L[B++] = B; - T.push(new op(L, E[2] - F, n)), D.push(F - S); + if (P) { + let D = new Uint16Array(P * 4), F = E[E.length - 2]; + for (let k = E.length - 3, I = 0; k >= 0; k -= 3) + D[I++] = E[k], D[I++] = E[k + 1] - F, D[I++] = E[k + 2] - F, D[I++] = I; + T.push(new ap(D, E[2] - F, n)), M.push(F - S); } } function p(S, C) { - return (T, D, E) => { - let N = 0, P = T.length - 1, L, F; - if (P >= 0 && (L = T[P]) instanceof kn) { - if (!P && L.type == S && L.length == E) - return L; - (F = L.prop(Fr.lookAhead)) && (N = D[P] + L.length + F); + return (T, M, E) => { + let P = 0, L = T.length - 1, D, F; + if (L >= 0 && (D = T[L]) instanceof kn) { + if (!L && D.type == S && D.length == E) + return D; + (F = D.prop(Br.lookAhead)) && (P = M[L] + D.length + F); } - return m(S, T, D, E, N, C); + return m(S, T, M, E, P, C); }; } - function g(S, C, T, D, E, N, P, L, F) { - let k = [], B = []; - for (; S.length > D; ) - k.push(S.pop()), B.push(C.pop() + T - E); - S.push(m(n.types[P], k, B, N - E, L - N, F)), C.push(E - T); + function g(S, C, T, M, E, P, L, D, F) { + let k = [], I = []; + for (; S.length > M; ) + k.push(S.pop()), I.push(C.pop() + T - E); + S.push(m(n.types[L], k, I, P - E, D - P, F)), C.push(E - T); } - function m(S, C, T, D, E, N, P) { - if (N) { - let L = [Fr.contextHash, N]; - P = P ? [L].concat(P) : [L]; + function m(S, C, T, M, E, P, L) { + if (P) { + let D = [Br.contextHash, P]; + L = L ? [D].concat(L) : [D]; } if (E > 25) { - let L = [Fr.lookAhead, E]; - P = P ? [L].concat(P) : [L]; + let D = [Br.lookAhead, E]; + L = L ? [D].concat(L) : [D]; } - return new kn(S, C, T, D, P); + return new kn(S, C, T, M, L); } function v(S, C) { - let T = o.fork(), D = 0, E = 0, N = 0, P = T.end - i, L = { size: 0, start: 0, skip: 0 }; + let T = o.fork(), M = 0, E = 0, P = 0, L = T.end - i, D = { size: 0, start: 0, skip: 0 }; e: for (let F = T.pos - S; T.pos > F; ) { let k = T.size; if (T.id == C && k >= 0) { - L.size = D, L.start = E, L.skip = N, N += 4, D += 4, T.next(); + D.size = M, D.start = E, D.skip = P, P += 4, M += 4, T.next(); continue; } - let B = T.pos - k; - if (k < 0 || B < F || T.start < P) + let I = T.pos - k; + if (k < 0 || I < F || T.start < L) break; - let A = T.id >= a ? 4 : 0, M = T.start; - for (T.next(); T.pos > B; ) { + let _ = T.id >= a ? 4 : 0, R = T.start; + for (T.next(); T.pos > I; ) { if (T.size < 0) if (T.size == -3) - A += 4; + _ += 4; else break e; else - T.id >= a && (A += 4); + T.id >= a && (_ += 4); T.next(); } - E = M, D += k, N += A; + E = R, M += k, P += _; } - return (C < 0 || D == S) && (L.size = D, L.start = E, L.skip = N), L.size > 4 ? L : void 0; + return (C < 0 || M == S) && (D.size = M, D.start = E, D.skip = P), D.size > 4 ? D : void 0; } function y(S, C, T) { - let { id: D, start: E, end: N, size: P } = o; - if (o.next(), P >= 0 && D < a) { - let L = T; - if (P > 4) { - let F = o.pos - (P - 4); + let { id: M, start: E, end: P, size: L } = o; + if (o.next(), L >= 0 && M < a) { + let D = T; + if (L > 4) { + let F = o.pos - (L - 4); for (; o.pos > F; ) T = y(S, C, T); } - C[--T] = L, C[--T] = N - S, C[--T] = E - S, C[--T] = D; + C[--T] = D, C[--T] = P - S, C[--T] = E - S, C[--T] = M; } else - P == -3 ? u = D : P == -4 && (h = D); + L == -3 ? u = M : L == -4 && (h = M); return T; } let b = [], w = []; @@ -11543,11 +11543,11 @@ function h_e(t) { let O = (e = t.length) !== null && e !== void 0 ? e : b.length ? w[0] + b[0].length : 0; return new kn(l[t.topID], b.reverse(), w.reverse(), O); } -const _W = /* @__PURE__ */ new WeakMap(); -function K5(t, e) { - if (!t.isAnonymous || e instanceof op || e.type != t) +const LW = /* @__PURE__ */ new WeakMap(); +function B5(t, e) { + if (!t.isAnonymous || e instanceof ap || e.type != t) return 1; - let r = _W.get(e); + let r = LW.get(e); if (r == null) { r = 1; for (let n of e.children) { @@ -11555,22 +11555,22 @@ function K5(t, e) { r = 1; break; } - r += K5(t, n); + r += B5(t, n); } - _W.set(e, r); + LW.set(e, r); } return r; } -function B$(t, e, r, n, i, s, a, o, l) { +function L$(t, e, r, n, i, s, a, o, l) { let u = 0; for (let g = n; g < i; g++) - u += K5(t, e[g]); + u += B5(t, e[g]); let h = Math.ceil(u * 1.5 / 8), f = [], d = []; function p(g, m, v, y, b) { for (let w = v; w < y; ) { - let O = w, S = m[w], C = K5(t, g[w]); + let O = w, S = m[w], C = B5(t, g[w]); for (w++; w < y; w++) { - let T = K5(t, g[w]); + let T = B5(t, g[w]); if (C + T >= h) break; C += T; @@ -11584,14 +11584,14 @@ function B$(t, e, r, n, i, s, a, o, l) { f.push(g[O]); } else { let T = m[w - 1] + g[w - 1].length - S; - f.push(B$(t, g, m, O, w, S, T, null, l)); + f.push(L$(t, g, m, O, w, S, T, null, l)); } d.push(S + b - s); } } return p(e, r, n, i, 0), (o || l)(f, d, a); } -class wae { +class xae { constructor() { this.map = /* @__PURE__ */ new WeakMap(); } @@ -11604,10 +11604,10 @@ class wae { return n && n.get(r); } set(e, r) { - e instanceof Yu ? this.setBuffer(e.context.buffer, e.index, r) : e instanceof Ba && this.map.set(e.tree, r); + e instanceof qu ? this.setBuffer(e.context.buffer, e.index, r) : e instanceof Ia && this.map.set(e.tree, r); } get(e) { - return e instanceof Yu ? this.getBuffer(e.context.buffer, e.index) : e instanceof Ba ? this.map.get(e.tree) : void 0; + return e instanceof qu ? this.getBuffer(e.context.buffer, e.index) : e instanceof Ia ? this.map.get(e.tree) : void 0; } cursorSet(e, r) { e.buffer ? this.setBuffer(e.buffer.buffer, e.index, r) : this.map.set(e.tree, r); @@ -11616,7 +11616,7 @@ class wae { return e.buffer ? this.getBuffer(e.buffer.buffer, e.index) : this.map.get(e.tree); } } -class vf { +class hf { constructor(e, r, n, i, s = !1, a = !1) { this.from = e, this.to = r, this.tree = n, this.offset = i, this.open = (s ? 1 : 0) | (a ? 2 : 0); } @@ -11627,7 +11627,7 @@ class vf { return (this.open & 2) > 0; } static addTree(e, r = [], n = !1) { - let i = [new vf(0, e.length, e, 0, !1, n)]; + let i = [new hf(0, e.length, e, 0, !1, n)]; for (let s of r) s.to > e.length && i.push(s); return i; @@ -11643,7 +11643,7 @@ class vf { let d = a; if (l >= d.from || f <= d.to || u) { let p = Math.max(d.from, l) - u, g = Math.min(d.to, f) - u; - d = p >= g ? null : new vf(p, g, d.tree, d.offset + u, o > 0, !!h); + d = p >= g ? null : new hf(p, g, d.tree, d.offset + u, o > 0, !!h); } if (d && i.push(d), a.to > f) break; @@ -11656,9 +11656,9 @@ class vf { return i; } } -class F$ { +class M$ { startParse(e, r, n) { - return typeof e == "string" && (e = new f_e(e)), n = n ? n.length ? n.map((i) => new Zl(i.from, i.to)) : [new Zl(0, 0)] : [new Zl(0, e.length)], this.createParse(e, r || [], n); + return typeof e == "string" && (e = new w_e(e)), n = n ? n.length ? n.map((i) => new Wl(i.from, i.to)) : [new Wl(0, 0)] : [new Wl(0, e.length)], this.createParse(e, r || [], n); } parse(e, r, n) { let i = this.startParse(e, r, n); @@ -11669,7 +11669,7 @@ class F$ { } } } -class f_e { +class w_e { constructor(e) { this.string = e; } @@ -11686,25 +11686,25 @@ class f_e { return this.string.slice(e, r); } } -function Oae(t) { - return (e, r, n, i) => new p_e(e, t, r, n, i); +function wae(t) { + return (e, r, n, i) => new k_e(e, t, r, n, i); } -class AW { +class MW { constructor(e, r, n, i, s) { this.parser = e, this.parse = r, this.overlay = n, this.target = i, this.from = s; } } -function RW(t) { +function DW(t) { if (!t.length || t.some((e) => e.from >= e.to)) throw new RangeError("Invalid inner parse ranges given: " + JSON.stringify(t)); } -class d_e { +class O_e { constructor(e, r, n, i, s, a, o) { this.parser = e, this.predicate = r, this.mounts = n, this.index = i, this.start = s, this.target = a, this.prev = o, this.depth = 0, this.ranges = []; } } -const a9 = new Fr({ perNode: !0 }); -class p_e { +const YM = new Br({ perNode: !0 }); +class k_e { constructor(e, r, n, i, s) { this.nest = r, this.input = n, this.fragments = i, this.ranges = s, this.inner = [], this.innerDone = 0, this.baseTree = null, this.stoppedAt = null, this.baseParse = e; } @@ -11719,13 +11719,13 @@ class p_e { } if (this.innerDone == this.inner.length) { let n = this.baseTree; - return this.stoppedAt != null && (n = new kn(n.type, n.children, n.positions, n.length, n.propValues.concat([[a9, this.stoppedAt]]))), n; + return this.stoppedAt != null && (n = new kn(n.type, n.children, n.positions, n.length, n.propValues.concat([[YM, this.stoppedAt]]))), n; } let e = this.inner[this.innerDone], r = e.parse.advance(); if (r) { this.innerDone++; let n = Object.assign(/* @__PURE__ */ Object.create(null), e.target.props); - n[Fr.mounted.id] = new Vx(r, e.overlay, e.parser), e.target.props = n; + n[Br.mounted.id] = new Nx(r, e.overlay, e.parser), e.target.props = n; } return null; } @@ -11745,7 +11745,7 @@ class p_e { this.inner[r].parse.stopAt(e); } startInner() { - let e = new v_e(this.fragments), r = null, n = null, i = new pT(new Ba(this.baseTree, this.ranges[0].from, 0, null), Hn.IncludeAnonymous | Hn.IgnoreMounts); + let e = new C_e(this.fragments), r = null, n = null, i = new J3(new Ia(this.baseTree, this.ranges[0].from, 0, null), Yn.IncludeAnonymous | Yn.IgnoreMounts); e: for (let s, a; ; ) { let o = !0, l; @@ -11761,18 +11761,18 @@ class p_e { } } o = !1; - } else if (n && (a = g_e(n.ranges, i.from, i.to))) + } else if (n && (a = S_e(n.ranges, i.from, i.to))) o = a != 2; else if (!i.type.isAnonymous && (s = this.nest(i, this.input)) && (i.from < i.to || !s.overlay)) { - i.tree || m_e(i); + i.tree || T_e(i); let u = e.findMounts(i.from, s.parser); if (typeof s.overlay == "function") - r = new d_e(s.parser, s.overlay, u, this.inner.length, i.from, i.tree, r); + r = new O_e(s.parser, s.overlay, u, this.inner.length, i.from, i.tree, r); else { - let h = DW(this.ranges, s.overlay || (i.from < i.to ? [new Zl(i.from, i.to)] : [])); - h.length && RW(h), (h.length || !s.overlay) && this.inner.push(new AW(s.parser, h.length ? s.parser.startParse(this.input, PW(u, h), h) : s.parser.startParse(""), s.overlay ? s.overlay.map((f) => new Zl(f.from - i.from, f.to - i.from)) : null, i.tree, h.length ? h[0].from : i.from)), s.overlay ? h.length && (n = { ranges: h, depth: 0, prev: n }) : o = !1; + let h = IW(this.ranges, s.overlay || (i.from < i.to ? [new Wl(i.from, i.to)] : [])); + h.length && DW(h), (h.length || !s.overlay) && this.inner.push(new MW(s.parser, h.length ? s.parser.startParse(this.input, $W(u, h), h) : s.parser.startParse(""), s.overlay ? s.overlay.map((f) => new Wl(f.from - i.from, f.to - i.from)) : null, i.tree, h.length ? h[0].from : i.from)), s.overlay ? h.length && (n = { ranges: h, depth: 0, prev: n }) : o = !1; } - } else if (r && (l = r.predicate(i)) && (l === !0 && (l = new Zl(i.from, i.to)), l.from < l.to)) { + } else if (r && (l = r.predicate(i)) && (l === !0 && (l = new Wl(i.from, i.to)), l.from < l.to)) { let u = r.ranges.length - 1; u >= 0 && r.ranges[u].to == l.from ? r.ranges[u] = { from: r.ranges[u].from, to: l.to } : r.ranges.push(l); } @@ -11783,15 +11783,15 @@ class p_e { if (!i.parent()) break e; if (r && !--r.depth) { - let u = DW(this.ranges, r.ranges); - u.length && (RW(u), this.inner.splice(r.index, 0, new AW(r.parser, r.parser.startParse(this.input, PW(r.mounts, u), u), r.ranges.map((h) => new Zl(h.from - r.start, h.to - r.start)), r.target, u[0].from))), r = r.prev; + let u = IW(this.ranges, r.ranges); + u.length && (DW(u), this.inner.splice(r.index, 0, new MW(r.parser, r.parser.startParse(this.input, $W(r.mounts, u), u), r.ranges.map((h) => new Wl(h.from - r.start, h.to - r.start)), r.target, u[0].from))), r = r.prev; } n && !--n.depth && (n = n.prev); } } } } -function g_e(t, e, r) { +function S_e(t, e, r) { for (let n of t) { if (n.from >= r) break; @@ -11800,13 +11800,13 @@ function g_e(t, e, r) { } return 0; } -function LW(t, e, r, n, i, s) { +function PW(t, e, r, n, i, s) { if (e < r) { let a = t.buffer[e + 1]; n.push(t.slice(e, r, a)), i.push(a - s); } } -function m_e(t) { +function T_e(t) { let { node: e } = t, r = [], n = e.context.buffer; do r.push(t.index), t.parent(); @@ -11814,26 +11814,26 @@ function m_e(t) { let i = t.tree, s = i.children.indexOf(n), a = i.children[s], o = a.buffer, l = [s]; function u(h, f, d, p, g, m) { let v = r[m], y = [], b = []; - LW(a, h, v, y, b, p); + PW(a, h, v, y, b, p); let w = o[v + 1], O = o[v + 2]; l.push(y.length); let S = m ? u(v + 4, o[v + 3], a.set.types[o[v]], w, O - w, m - 1) : e.toTree(); - return y.push(S), b.push(w - p), LW(a, o[v + 3], f, y, b, p), new kn(d, y, b, g); + return y.push(S), b.push(w - p), PW(a, o[v + 3], f, y, b, p), new kn(d, y, b, g); } - i.children[s] = u(0, o.length, ys.none, 0, a.length, r.length - 1); + i.children[s] = u(0, o.length, ms.none, 0, a.length, r.length - 1); for (let h of l) { let f = t.tree.children[h], d = t.tree.positions[h]; - t.yield(new Ba(f, d + t.from, h, t._tree)); + t.yield(new Ia(f, d + t.from, h, t._tree)); } } -class MW { +class NW { constructor(e, r) { - this.offset = r, this.done = !1, this.cursor = e.cursor(Hn.IncludeAnonymous | Hn.IgnoreMounts); + this.offset = r, this.done = !1, this.cursor = e.cursor(Yn.IncludeAnonymous | Yn.IgnoreMounts); } moveTo(e) { let { cursor: r } = this, n = e - this.offset; for (; !this.done && r.from < n; ) - r.to >= e && r.enter(n, 1, Hn.IgnoreOverlays | Hn.ExcludeBuffers) || r.next(!1) || (this.done = !0); + r.to >= e && r.enter(n, 1, Yn.IgnoreOverlays | Yn.ExcludeBuffers) || r.next(!1) || (this.done = !0); } hasNode(e) { if (this.moveTo(e.from), !this.done && this.cursor.from + this.offset == e.from && this.cursor.tree) @@ -11848,12 +11848,12 @@ class MW { return !1; } } -class v_e { +class C_e { constructor(e) { var r; if (this.fragments = e, this.curTo = 0, this.fragI = 0, e.length) { let n = this.curFrag = e[0]; - this.curTo = (r = n.tree.prop(a9)) !== null && r !== void 0 ? r : n.to, this.inner = new MW(n.tree, -n.offset); + this.curTo = (r = n.tree.prop(YM)) !== null && r !== void 0 ? r : n.to, this.inner = new NW(n.tree, -n.offset); } else this.curFrag = this.inner = null; } @@ -11868,7 +11868,7 @@ class v_e { this.curFrag = this.inner = null; else { let r = this.curFrag = this.fragments[this.fragI]; - this.curTo = (e = r.tree.prop(a9)) !== null && e !== void 0 ? e : r.to, this.inner = new MW(r.tree, -r.offset); + this.curTo = (e = r.tree.prop(YM)) !== null && e !== void 0 ? e : r.to, this.inner = new NW(r.tree, -r.offset); } } findMounts(e, r) { @@ -11877,7 +11877,7 @@ class v_e { if (this.inner) { this.inner.cursor.moveTo(e, 1); for (let s = this.inner.cursor.node; s; s = s.parent) { - let a = (n = s.tree) === null || n === void 0 ? void 0 : n.prop(Fr.mounted); + let a = (n = s.tree) === null || n === void 0 ? void 0 : n.prop(Br.mounted); if (a && a.parser == r) for (let o = this.fragI; o < this.fragments.length; o++) { let l = this.fragments[o]; @@ -11894,7 +11894,7 @@ class v_e { return i; } } -function DW(t, e) { +function IW(t, e) { let r = null, n = e; for (let i = 1, s = 0; i < t.length; i++) { let a = t[i - 1].to, o = t[i].from; @@ -11902,18 +11902,18 @@ function DW(t, e) { let l = n[s]; if (l.from >= o) break; - l.to <= a || (r || (n = r = e.slice()), l.from < a ? (r[s] = new Zl(l.from, a), l.to > o && r.splice(s + 1, 0, new Zl(o, l.to))) : l.to > o ? r[s--] = new Zl(o, l.to) : r.splice(s--, 1)); + l.to <= a || (r || (n = r = e.slice()), l.from < a ? (r[s] = new Wl(l.from, a), l.to > o && r.splice(s + 1, 0, new Wl(o, l.to))) : l.to > o ? r[s--] = new Wl(o, l.to) : r.splice(s--, 1)); } } return n; } -function y_e(t, e, r, n) { +function E_e(t, e, r, n) { let i = 0, s = 0, a = !1, o = !1, l = -1e9, u = []; for (; ; ) { let h = i == t.length ? 1e9 : a ? t[i].to : t[i].from, f = s == e.length ? 1e9 : o ? e[s].to : e[s].from; if (a != o) { let d = Math.max(l, r), p = Math.min(h, f, n); - d < p && u.push(new Zl(d, p)); + d < p && u.push(new Wl(d, p)); } if (l = Math.min(h, f), l == 1e9) break; @@ -11921,75 +11921,75 @@ function y_e(t, e, r, n) { } return u; } -function PW(t, e) { +function $W(t, e) { let r = []; for (let { pos: n, mount: i, frag: s } of t) { let a = n + (i.overlay ? i.overlay[0].from : 0), o = a + i.tree.length, l = Math.max(s.from, a), u = Math.min(s.to, o); if (i.overlay) { - let h = i.overlay.map((d) => new Zl(d.from + n, d.to + n)), f = y_e(e, h, l, u); + let h = i.overlay.map((d) => new Wl(d.from + n, d.to + n)), f = E_e(e, h, l, u); for (let d = 0, p = l; ; d++) { let g = d == f.length, m = g ? u : f[d].from; - if (m > p && r.push(new vf(p, m, i.tree, -a, s.from >= p || s.openStart, s.to <= m || s.openEnd)), g) + if (m > p && r.push(new hf(p, m, i.tree, -a, s.from >= p || s.openStart, s.to <= m || s.openEnd)), g) break; p = f[d].to; } } else - r.push(new vf(l, u, i.tree, -a, s.from >= a || s.openStart, s.to <= o || s.openEnd)); + r.push(new hf(l, u, i.tree, -a, s.from >= a || s.openStart, s.to <= o || s.openEnd)); } return r; } -let b_e = 0; -class Ic { +let __e = 0; +class Mc { constructor(e, r, n) { - this.set = e, this.base = r, this.modified = n, this.id = b_e++; + this.set = e, this.base = r, this.modified = n, this.id = __e++; } static define(e) { if (e != null && e.base) throw new Error("Can not derive from a modified tag"); - let r = new Ic([], null, []); + let r = new Mc([], null, []); if (r.set.push(r), e) for (let n of e.set) r.set.push(n); return r; } static defineModifier() { - let e = new gT(); - return (r) => r.modified.indexOf(e) > -1 ? r : gT.get(r.base || r, r.modified.concat(e).sort((n, i) => n.id - i.id)); + let e = new eT(); + return (r) => r.modified.indexOf(e) > -1 ? r : eT.get(r.base || r, r.modified.concat(e).sort((n, i) => n.id - i.id)); } } -let x_e = 0; -class gT { +let A_e = 0; +class eT { constructor() { - this.instances = [], this.id = x_e++; + this.instances = [], this.id = A_e++; } static get(e, r) { if (!r.length) return e; - let n = r[0].instances.find((o) => o.base == e && w_e(r, o.modified)); + let n = r[0].instances.find((o) => o.base == e && R_e(r, o.modified)); if (n) return n; - let i = [], s = new Ic(i, e, r); + let i = [], s = new Mc(i, e, r); for (let o of r) o.instances.push(s); - let a = O_e(r); + let a = L_e(r); for (let o of e.set) if (!o.modified.length) for (let l of a) - i.push(gT.get(o, l)); + i.push(eT.get(o, l)); return s; } } -function w_e(t, e) { +function R_e(t, e) { return t.length == e.length && t.every((r, n) => r == e[n]); } -function O_e(t) { +function L_e(t) { let e = [[]]; for (let r = 0; r < t.length; r++) for (let n = 0, i = e.length; n < i; n++) e.push(e[n].concat(t[r])); return e.sort((r, n) => n.length - r.length); } -function Bp(t) { +function Fp(t) { let e = /* @__PURE__ */ Object.create(null); for (let r in t) { let n = t[r]; @@ -12019,14 +12019,14 @@ function Bp(t) { let l = s.length - 1, u = s[l]; if (!u) throw new RangeError("Invalid path: " + i); - let h = new mT(n, a, l > 0 ? s.slice(0, l) : null); + let h = new tT(n, a, l > 0 ? s.slice(0, l) : null); e[u] = h.sort(e[u]); } } - return kae.add(e); + return Oae.add(e); } -const kae = new Fr(); -class mT { +const Oae = new Br(); +class tT { constructor(e, r, n, i) { this.tags = e, this.mode = r, this.context = n, this.next = i; } @@ -12043,8 +12043,8 @@ class mT { return this.context ? this.context.length : 0; } } -mT.empty = new mT([], 2, null); -function Sae(t, e) { +tT.empty = new tT([], 2, null); +function kae(t, e) { let r = /* @__PURE__ */ Object.create(null); for (let s of t) if (!Array.isArray(s.tag)) @@ -12069,7 +12069,7 @@ function Sae(t, e) { scope: n }; } -function k_e(t, e) { +function M_e(t, e) { let r = null; for (let n of t) { let i = n.style(e); @@ -12077,11 +12077,11 @@ function k_e(t, e) { } return r; } -function S_e(t, e, r, n = 0, i = t.length) { - let s = new T_e(n, Array.isArray(e) ? e : [e], r); +function D_e(t, e, r, n = 0, i = t.length) { + let s = new P_e(n, Array.isArray(e) ? e : [e], r); s.highlightRange(t.cursor(), n, i, "", s.highlighters), s.flush(i); } -class T_e { +class P_e { constructor(e, r, n) { this.at = e, this.highlighters = r, this.span = n, this.class = ""; } @@ -12096,10 +12096,10 @@ class T_e { if (o >= n || l <= r) return; a.isTop && (s = this.highlighters.filter((p) => !p.scope || p.scope(a))); - let u = i, h = C_e(e) || mT.empty, f = k_e(s, h.tags); + let u = i, h = N_e(e) || tT.empty, f = M_e(s, h.tags); if (f && (u && (u += " "), u += f, h.mode == 1 && (i += (i ? " " : "") + f)), this.startSpan(Math.max(r, o), u), h.opaque) return; - let d = e.tree && e.tree.prop(Fr.mounted); + let d = e.tree && e.tree.prop(Br.mounted); if (d && d.overlay) { let p = e.node.enter(d.overlay[0].from + o, 1), g = this.highlighters.filter((v) => !v.scope || v.scope(d.tree.type)), m = e.firstChild(); for (let v = 0, y = o; ; v++) { @@ -12125,149 +12125,149 @@ class T_e { } } } -function C_e(t) { - let e = t.type.prop(kae); +function N_e(t) { + let e = t.type.prop(Oae); for (; e && e.context && !t.matchContext(e.context); ) e = e.next; return e || null; } -const Zt = Ic.define, iS = Zt(), yd = Zt(), NW = Zt(yd), IW = Zt(yd), bd = Zt(), sS = Zt(bd), e8 = Zt(bd), _u = Zt(), Kp = Zt(_u), ku = Zt(), Su = Zt(), o9 = Zt(), $2 = Zt(o9), aS = Zt(), ze = { - comment: iS, - lineComment: Zt(iS), - blockComment: Zt(iS), - docComment: Zt(iS), - name: yd, - variableName: Zt(yd), - typeName: NW, - tagName: Zt(NW), - propertyName: IW, - attributeName: Zt(IW), - className: Zt(yd), - labelName: Zt(yd), - namespace: Zt(yd), - macroName: Zt(yd), - literal: bd, - string: sS, - docString: Zt(sS), - character: Zt(sS), - attributeValue: Zt(sS), - number: e8, - integer: Zt(e8), - float: Zt(e8), - bool: Zt(bd), - regexp: Zt(bd), - escape: Zt(bd), - color: Zt(bd), - url: Zt(bd), - keyword: ku, - self: Zt(ku), - null: Zt(ku), - atom: Zt(ku), - unit: Zt(ku), - modifier: Zt(ku), - operatorKeyword: Zt(ku), - controlKeyword: Zt(ku), - definitionKeyword: Zt(ku), - moduleKeyword: Zt(ku), - operator: Su, - derefOperator: Zt(Su), - arithmeticOperator: Zt(Su), - logicOperator: Zt(Su), - bitwiseOperator: Zt(Su), - compareOperator: Zt(Su), - updateOperator: Zt(Su), - definitionOperator: Zt(Su), - typeOperator: Zt(Su), - controlOperator: Zt(Su), - punctuation: o9, - separator: Zt(o9), - bracket: $2, - angleBracket: Zt($2), - squareBracket: Zt($2), - paren: Zt($2), - brace: Zt($2), - content: _u, - heading: Kp, - heading1: Zt(Kp), - heading2: Zt(Kp), - heading3: Zt(Kp), - heading4: Zt(Kp), - heading5: Zt(Kp), - heading6: Zt(Kp), - contentSeparator: Zt(_u), - list: Zt(_u), - quote: Zt(_u), - emphasis: Zt(_u), - strong: Zt(_u), - link: Zt(_u), - monospace: Zt(_u), - strikethrough: Zt(_u), - inserted: Zt(), - deleted: Zt(), - changed: Zt(), - invalid: Zt(), - meta: aS, - documentMeta: Zt(aS), - annotation: Zt(aS), - processingInstruction: Zt(aS), - definition: Ic.defineModifier(), - constant: Ic.defineModifier(), - function: Ic.defineModifier(), - standard: Ic.defineModifier(), - local: Ic.defineModifier(), - special: Ic.defineModifier() -}; -Sae([ - { tag: ze.link, class: "tok-link" }, - { tag: ze.heading, class: "tok-heading" }, - { tag: ze.emphasis, class: "tok-emphasis" }, - { tag: ze.strong, class: "tok-strong" }, - { tag: ze.keyword, class: "tok-keyword" }, - { tag: ze.atom, class: "tok-atom" }, - { tag: ze.bool, class: "tok-bool" }, - { tag: ze.url, class: "tok-url" }, - { tag: ze.labelName, class: "tok-labelName" }, - { tag: ze.inserted, class: "tok-inserted" }, - { tag: ze.deleted, class: "tok-deleted" }, - { tag: ze.literal, class: "tok-literal" }, - { tag: ze.string, class: "tok-string" }, - { tag: ze.number, class: "tok-number" }, - { tag: [ze.regexp, ze.escape, ze.special(ze.string)], class: "tok-string2" }, - { tag: ze.variableName, class: "tok-variableName" }, - { tag: ze.local(ze.variableName), class: "tok-variableName tok-local" }, - { tag: ze.definition(ze.variableName), class: "tok-variableName tok-definition" }, - { tag: ze.special(ze.variableName), class: "tok-variableName2" }, - { tag: ze.definition(ze.propertyName), class: "tok-propertyName tok-definition" }, - { tag: ze.typeName, class: "tok-typeName" }, - { tag: ze.namespace, class: "tok-namespace" }, - { tag: ze.className, class: "tok-className" }, - { tag: ze.macroName, class: "tok-macroName" }, - { tag: ze.propertyName, class: "tok-propertyName" }, - { tag: ze.operator, class: "tok-operator" }, - { tag: ze.comment, class: "tok-comment" }, - { tag: ze.meta, class: "tok-meta" }, - { tag: ze.invalid, class: "tok-invalid" }, - { tag: ze.punctuation, class: "tok-punctuation" } +const Xt = Mc.define, Y4 = Xt(), pd = Xt(), BW = Xt(pd), FW = Xt(pd), gd = Xt(), G4 = Xt(gd), q7 = Xt(gd), ku = Xt(), e0 = Xt(ku), yu = Xt(), bu = Xt(), GM = Xt(), A2 = Xt(GM), H4 = Xt(), Be = { + comment: Y4, + lineComment: Xt(Y4), + blockComment: Xt(Y4), + docComment: Xt(Y4), + name: pd, + variableName: Xt(pd), + typeName: BW, + tagName: Xt(BW), + propertyName: FW, + attributeName: Xt(FW), + className: Xt(pd), + labelName: Xt(pd), + namespace: Xt(pd), + macroName: Xt(pd), + literal: gd, + string: G4, + docString: Xt(G4), + character: Xt(G4), + attributeValue: Xt(G4), + number: q7, + integer: Xt(q7), + float: Xt(q7), + bool: Xt(gd), + regexp: Xt(gd), + escape: Xt(gd), + color: Xt(gd), + url: Xt(gd), + keyword: yu, + self: Xt(yu), + null: Xt(yu), + atom: Xt(yu), + unit: Xt(yu), + modifier: Xt(yu), + operatorKeyword: Xt(yu), + controlKeyword: Xt(yu), + definitionKeyword: Xt(yu), + moduleKeyword: Xt(yu), + operator: bu, + derefOperator: Xt(bu), + arithmeticOperator: Xt(bu), + logicOperator: Xt(bu), + bitwiseOperator: Xt(bu), + compareOperator: Xt(bu), + updateOperator: Xt(bu), + definitionOperator: Xt(bu), + typeOperator: Xt(bu), + controlOperator: Xt(bu), + punctuation: GM, + separator: Xt(GM), + bracket: A2, + angleBracket: Xt(A2), + squareBracket: Xt(A2), + paren: Xt(A2), + brace: Xt(A2), + content: ku, + heading: e0, + heading1: Xt(e0), + heading2: Xt(e0), + heading3: Xt(e0), + heading4: Xt(e0), + heading5: Xt(e0), + heading6: Xt(e0), + contentSeparator: Xt(ku), + list: Xt(ku), + quote: Xt(ku), + emphasis: Xt(ku), + strong: Xt(ku), + link: Xt(ku), + monospace: Xt(ku), + strikethrough: Xt(ku), + inserted: Xt(), + deleted: Xt(), + changed: Xt(), + invalid: Xt(), + meta: H4, + documentMeta: Xt(H4), + annotation: Xt(H4), + processingInstruction: Xt(H4), + definition: Mc.defineModifier(), + constant: Mc.defineModifier(), + function: Mc.defineModifier(), + standard: Mc.defineModifier(), + local: Mc.defineModifier(), + special: Mc.defineModifier() +}; +kae([ + { tag: Be.link, class: "tok-link" }, + { tag: Be.heading, class: "tok-heading" }, + { tag: Be.emphasis, class: "tok-emphasis" }, + { tag: Be.strong, class: "tok-strong" }, + { tag: Be.keyword, class: "tok-keyword" }, + { tag: Be.atom, class: "tok-atom" }, + { tag: Be.bool, class: "tok-bool" }, + { tag: Be.url, class: "tok-url" }, + { tag: Be.labelName, class: "tok-labelName" }, + { tag: Be.inserted, class: "tok-inserted" }, + { tag: Be.deleted, class: "tok-deleted" }, + { tag: Be.literal, class: "tok-literal" }, + { tag: Be.string, class: "tok-string" }, + { tag: Be.number, class: "tok-number" }, + { tag: [Be.regexp, Be.escape, Be.special(Be.string)], class: "tok-string2" }, + { tag: Be.variableName, class: "tok-variableName" }, + { tag: Be.local(Be.variableName), class: "tok-variableName tok-local" }, + { tag: Be.definition(Be.variableName), class: "tok-variableName tok-definition" }, + { tag: Be.special(Be.variableName), class: "tok-variableName2" }, + { tag: Be.definition(Be.propertyName), class: "tok-propertyName tok-definition" }, + { tag: Be.typeName, class: "tok-typeName" }, + { tag: Be.namespace, class: "tok-namespace" }, + { tag: Be.className, class: "tok-className" }, + { tag: Be.macroName, class: "tok-macroName" }, + { tag: Be.propertyName, class: "tok-propertyName" }, + { tag: Be.operator, class: "tok-operator" }, + { tag: Be.comment, class: "tok-comment" }, + { tag: Be.meta, class: "tok-meta" }, + { tag: Be.invalid, class: "tok-invalid" }, + { tag: Be.punctuation, class: "tok-punctuation" } ]); -var t8; -const $0 = /* @__PURE__ */ new Fr(); -function z$(t) { - return Gt.define({ +var U7; +const $0 = /* @__PURE__ */ new Br(); +function D$(t) { + return Yt.define({ combine: t ? (e) => e.concat(t) : void 0 }); } -const q$ = /* @__PURE__ */ new Fr(); -class ml { +const P$ = /* @__PURE__ */ new Br(); +class fl { constructor(e, r, n = [], i = "") { this.data = e, this.name = i, qr.prototype.hasOwnProperty("tree") || Object.defineProperty(qr.prototype, "tree", { get() { - return Qn(this); + return Un(this); } }), this.parser = r, this.extension = [ - cp.of(this), + lp.of(this), qr.languageData.of((s, a, o) => { - let l = $W(s, a, o), u = l.type.prop($0); + let l = zW(s, a, o), u = l.type.prop($0); if (!u) return []; - let h = s.facet(u), f = l.type.prop(q$); + let h = s.facet(u), f = l.type.prop(P$); if (f) { let d = l.resolve(a - l.from, o); for (let p of f) @@ -12281,10 +12281,10 @@ class ml { ].concat(n); } isActiveAt(e, r, n = -1) { - return $W(e, r, n).type.prop($0) == this.data; + return zW(e, r, n).type.prop($0) == this.data; } findRegions(e) { - let r = e.facet(cp); + let r = e.facet(lp); if ((r == null ? void 0 : r.data) == this.data) return [{ from: 0, to: e.doc.length }]; if (!r || !r.allowsNesting) @@ -12294,7 +12294,7 @@ class ml { n.push({ from: a, to: a + s.length }); return; } - let o = s.prop(Fr.mounted); + let o = s.prop(Br.mounted); if (o) { if (o.tree.prop($0) == this.data) { if (o.overlay) @@ -12314,44 +12314,44 @@ class ml { u instanceof kn && i(u, s.positions[l] + a); } }; - return i(Qn(e), 0), n; + return i(Un(e), 0), n; } get allowsNesting() { return !0; } } -ml.setState = /* @__PURE__ */ _r.define(); -function $W(t, e, r) { - let n = t.facet(cp), i = Qn(t).topNode; +fl.setState = /* @__PURE__ */ Tr.define(); +function zW(t, e, r) { + let n = t.facet(lp), i = Un(t).topNode; if (!n || n.allowsNesting) - for (let s = i; s; s = s.enter(e, r, Hn.ExcludeBuffers)) + for (let s = i; s; s = s.enter(e, r, Yn.ExcludeBuffers)) s.type.isTop && (i = s); return i; } -class lp extends ml { +class op extends fl { constructor(e, r, n) { super(e, r, [], n), this.parser = r; } static define(e) { - let r = z$(e.languageData); - return new lp(r, e.parser.configure({ + let r = D$(e.languageData); + return new op(r, e.parser.configure({ props: [$0.add((n) => n.isTop ? r : void 0)] }), e.name); } configure(e, r) { - return new lp(this.data, this.parser.configure(e), r || this.name); + return new op(this.data, this.parser.configure(e), r || this.name); } get allowsNesting() { return this.parser.hasWrappers(); } } -function Qn(t) { - let e = t.field(ml.state, !1); +function Un(t) { + let e = t.field(fl.state, !1); return e ? e.tree : kn.empty; } -function U$(t, e, r = 50) { +function N$(t, e, r = 50) { var n; - let i = (n = t.field(ml.state, !1)) === null || n === void 0 ? void 0 : n.context; + let i = (n = t.field(fl.state, !1)) === null || n === void 0 ? void 0 : n.context; if (!i) return null; let s = i.viewport; @@ -12359,7 +12359,7 @@ function U$(t, e, r = 50) { let a = i.isDone(e) || i.work(r, e) ? i.tree : null; return i.updateViewport(s), a; } -class E_e { +class I_e { constructor(e) { this.doc = e, this.cursorPos = 0, this.string = "", this.cursor = e.iter(); } @@ -12380,16 +12380,16 @@ class E_e { return e < n || r >= this.cursorPos ? this.doc.sliceString(e, r) : this.string.slice(e - n, r - n); } } -let B2 = null; -class Yx { +let R2 = null; +class $x { constructor(e, r, n = [], i, s, a, o, l) { this.parser = e, this.state = r, this.fragments = n, this.tree = i, this.treeLen = s, this.viewport = a, this.skipped = o, this.scheduleOn = l, this.parse = null, this.tempSkipped = []; } static create(e, r, n) { - return new Yx(e, r, [], kn.empty, 0, n, [], null); + return new $x(e, r, [], kn.empty, 0, n, [], null); } startParse() { - return this.parser.startParse(new E_e(this.state.doc), this.fragments); + return this.parser.startParse(new I_e(this.state.doc), this.fragments); } work(e, r) { return r != null && r >= this.state.doc.length && (r = void 0), this.tree != kn.empty && this.isDone(r != null ? r : this.state.doc.length) ? (this.takeTree(), !0) : this.withContext(() => { @@ -12401,7 +12401,7 @@ class Yx { for (this.parse || (this.parse = this.startParse()), r != null && (this.parse.stoppedAt == null || this.parse.stoppedAt > r) && r < this.state.doc.length && this.parse.stopAt(r); ; ) { let i = this.parse.advance(); if (i) - if (this.fragments = this.withoutTempSkipped(vf.addTree(i, this.fragments, this.parse.stoppedAt != null)), this.treeLen = (n = this.parse.stoppedAt) !== null && n !== void 0 ? n : this.state.doc.length, this.tree = i, this.parse = null, this.treeLen < (r != null ? r : this.state.doc.length)) + if (this.fragments = this.withoutTempSkipped(hf.addTree(i, this.fragments, this.parse.stoppedAt != null)), this.treeLen = (n = this.parse.stoppedAt) !== null && n !== void 0 ? n : this.state.doc.length, this.tree = i, this.parse = null, this.treeLen < (r != null ? r : this.state.doc.length)) this.parse = this.startParse(); else return !0; @@ -12415,27 +12415,27 @@ class Yx { this.parse && (e = this.parse.parsedPos) >= this.treeLen && ((this.parse.stoppedAt == null || this.parse.stoppedAt > e) && this.parse.stopAt(e), this.withContext(() => { for (; !(r = this.parse.advance()); ) ; - }), this.treeLen = e, this.tree = r, this.fragments = this.withoutTempSkipped(vf.addTree(this.tree, this.fragments, !0)), this.parse = null); + }), this.treeLen = e, this.tree = r, this.fragments = this.withoutTempSkipped(hf.addTree(this.tree, this.fragments, !0)), this.parse = null); } withContext(e) { - let r = B2; - B2 = this; + let r = R2; + R2 = this; try { return e(); } finally { - B2 = r; + R2 = r; } } withoutTempSkipped(e) { for (let r; r = this.tempSkipped.pop(); ) - e = BW(e, r.from, r.to); + e = qW(e, r.from, r.to); return e; } changes(e, r) { let { fragments: n, tree: i, treeLen: s, viewport: a, skipped: o } = this; if (this.takeTree(), !e.empty) { let l = []; - if (e.iterChangedRanges((u, h, f, d) => l.push({ fromA: u, toA: h, fromB: f, toB: d })), n = vf.applyChanges(n, l), i = kn.empty, s = 0, a = { from: e.mapPos(a.from, -1), to: e.mapPos(a.to, 1) }, this.skipped.length) { + if (e.iterChangedRanges((u, h, f, d) => l.push({ fromA: u, toA: h, fromB: f, toB: d })), n = hf.applyChanges(n, l), i = kn.empty, s = 0, a = { from: e.mapPos(a.from, -1), to: e.mapPos(a.to, 1) }, this.skipped.length) { o = []; for (let u of this.skipped) { let h = e.mapPos(u.from, 1), f = e.mapPos(u.to, -1); @@ -12443,7 +12443,7 @@ class Yx { } } } - return new Yx(this.parser, r, n, i, s, a, o, this.scheduleOn); + return new $x(this.parser, r, n, i, s, a, o, this.scheduleOn); } updateViewport(e) { if (this.viewport.from == e.from && this.viewport.to == e.to) @@ -12452,7 +12452,7 @@ class Yx { let r = this.skipped.length; for (let n = 0; n < this.skipped.length; n++) { let { from: i, to: s } = this.skipped[n]; - i < e.to && s > e.from && (this.fragments = BW(this.fragments, i, s), this.skipped.splice(n--, 1)); + i < e.to && s > e.from && (this.fragments = qW(this.fragments, i, s), this.skipped.splice(n--, 1)); } return this.skipped.length >= r ? !1 : (this.reset(), !0); } @@ -12463,19 +12463,19 @@ class Yx { this.skipped.push({ from: e, to: r }); } static getSkippingParser(e) { - return new class extends F$ { + return new class extends M$ { createParse(r, n, i) { let s = i[0].from, a = i[i.length - 1].to; return { parsedPos: s, advance() { - let l = B2; + let l = R2; if (l) { for (let u of i) l.tempSkipped.push(u); e && (l.scheduleOn = l.scheduleOn ? Promise.all([l.scheduleOn, e]) : e); } - return this.parsedPos = a, new kn(ys.none, [], [], a - s); + return this.parsedPos = a, new kn(ms.none, [], [], a - s); }, stoppedAt: null, stopAt() { @@ -12490,13 +12490,13 @@ class Yx { return this.treeLen >= e && r.length && r[0].from == 0 && r[0].to >= e; } static get() { - return B2; + return R2; } } -function BW(t, e, r) { - return vf.applyChanges(t, [{ fromA: e, toA: r, fromB: e, toB: r }]); +function qW(t, e, r) { + return hf.applyChanges(t, [{ fromA: e, toA: r, fromB: e, toB: r }]); } -class gv { +class hv { constructor(e) { this.context = e, this.tree = e.tree; } @@ -12504,59 +12504,59 @@ class gv { if (!e.docChanged && this.tree == this.context.tree) return this; let r = this.context.changes(e.changes, e.state), n = this.context.treeLen == e.startState.doc.length ? void 0 : Math.max(e.changes.mapPos(this.context.treeLen), r.viewport.to); - return r.work(20, n) || r.takeTree(), new gv(r); + return r.work(20, n) || r.takeTree(), new hv(r); } static init(e) { - let r = Math.min(3e3, e.doc.length), n = Yx.create(e.facet(cp).parser, e, { from: 0, to: r }); - return n.work(20, r) || n.takeTree(), new gv(n); + let r = Math.min(3e3, e.doc.length), n = $x.create(e.facet(lp).parser, e, { from: 0, to: r }); + return n.work(20, r) || n.takeTree(), new hv(n); } } -ml.state = /* @__PURE__ */ ai.define({ - create: gv.init, +fl.state = /* @__PURE__ */ ii.define({ + create: hv.init, update(t, e) { for (let r of e.effects) - if (r.is(ml.setState)) + if (r.is(fl.setState)) return r.value; - return e.startState.facet(cp) != e.state.facet(cp) ? gv.init(e.state) : t.apply(e); + return e.startState.facet(lp) != e.state.facet(lp) ? hv.init(e.state) : t.apply(e); } }); -let Tae = (t) => { +let Sae = (t) => { let e = setTimeout(() => t(), 500); return () => clearTimeout(e); }; -typeof requestIdleCallback < "u" && (Tae = (t) => { +typeof requestIdleCallback < "u" && (Sae = (t) => { let e = -1, r = setTimeout(() => { e = requestIdleCallback(t, { timeout: 500 - 100 }); }, 100); return () => e < 0 ? clearTimeout(r) : cancelIdleCallback(e); }); -const r8 = typeof navigator < "u" && ((t8 = navigator.scheduling) === null || t8 === void 0 ? void 0 : t8.isInputPending) ? () => navigator.scheduling.isInputPending() : null, __e = /* @__PURE__ */ fn.fromClass(class { +const Q7 = typeof navigator < "u" && ((U7 = navigator.scheduling) === null || U7 === void 0 ? void 0 : U7.isInputPending) ? () => navigator.scheduling.isInputPending() : null, $_e = /* @__PURE__ */ hn.fromClass(class { constructor(e) { this.view = e, this.working = null, this.workScheduled = 0, this.chunkEnd = -1, this.chunkBudget = -1, this.work = this.work.bind(this), this.scheduleWork(); } update(e) { - let r = this.view.state.field(ml.state).context; + let r = this.view.state.field(fl.state).context; (r.updateViewport(e.view.viewport) || this.view.viewport.to > r.treeLen) && this.scheduleWork(), (e.docChanged || e.selectionSet) && (this.view.hasFocus && (this.chunkBudget += 50), this.scheduleWork()), this.checkAsyncSchedule(r); } scheduleWork() { if (this.working) return; - let { state: e } = this.view, r = e.field(ml.state); - (r.tree != r.context.tree || !r.context.isDone(e.doc.length)) && (this.working = Tae(this.work)); + let { state: e } = this.view, r = e.field(fl.state); + (r.tree != r.context.tree || !r.context.isDone(e.doc.length)) && (this.working = Sae(this.work)); } work(e) { this.working = null; let r = Date.now(); if (this.chunkEnd < r && (this.chunkEnd < 0 || this.view.hasFocus) && (this.chunkEnd = r + 3e4, this.chunkBudget = 3e3), this.chunkBudget <= 0) return; - let { state: n, viewport: { to: i } } = this.view, s = n.field(ml.state); + let { state: n, viewport: { to: i } } = this.view, s = n.field(fl.state); if (s.tree == s.context.tree && s.context.isDone(i + 1e5)) return; - let a = Date.now() + Math.min(this.chunkBudget, 100, e && !r8 ? Math.max(25, e.timeRemaining() - 5) : 1e9), o = s.context.treeLen < i && n.doc.length > i + 1e3, l = s.context.work(() => r8 && r8() || Date.now() > a, i + (o ? 0 : 1e5)); - this.chunkBudget -= Date.now() - r, (l || this.chunkBudget <= 0) && (s.context.takeTree(), this.view.dispatch({ effects: ml.setState.of(new gv(s.context)) })), this.chunkBudget > 0 && !(l && !o) && this.scheduleWork(), this.checkAsyncSchedule(s.context); + let a = Date.now() + Math.min(this.chunkBudget, 100, e && !Q7 ? Math.max(25, e.timeRemaining() - 5) : 1e9), o = s.context.treeLen < i && n.doc.length > i + 1e3, l = s.context.work(() => Q7 && Q7() || Date.now() > a, i + (o ? 0 : 1e5)); + this.chunkBudget -= Date.now() - r, (l || this.chunkBudget <= 0) && (s.context.takeTree(), this.view.dispatch({ effects: fl.setState.of(new hv(s.context)) })), this.chunkBudget > 0 && !(l && !o) && this.scheduleWork(), this.checkAsyncSchedule(s.context); } checkAsyncSchedule(e) { - e.scheduleOn && (this.workScheduled++, e.scheduleOn.then(() => this.scheduleWork()).catch((r) => Wo(this.view.state, r)).then(() => this.workScheduled--), e.scheduleOn = null); + e.scheduleOn && (this.workScheduled++, e.scheduleOn.then(() => this.scheduleWork()).catch((r) => qo(this.view.state, r)).then(() => this.workScheduled--), e.scheduleOn = null); } destroy() { this.working && this.working(); @@ -12568,25 +12568,25 @@ const r8 = typeof navigator < "u" && ((t8 = navigator.scheduling) === null || t8 eventHandlers: { focus() { this.scheduleWork(); } } -}), cp = /* @__PURE__ */ Gt.define({ +}), lp = /* @__PURE__ */ Yt.define({ combine(t) { return t.length ? t[0] : null; }, enables: (t) => [ - ml.state, - __e, - Mt.contentAttributes.compute([t], (e) => { + fl.state, + $_e, + Rt.contentAttributes.compute([t], (e) => { let r = e.facet(t); return r && r.name ? { "data-language": r.name } : {}; }) ] }); -class mv { +class fv { constructor(e, r = []) { this.language = e, this.support = r, this.extension = [e, r]; } } -class vT { +class rT { constructor(e, r, n, i, s, a = void 0) { this.name = e, this.alias = r, this.extensions = n, this.filename = i, this.loadFunc = s, this.support = a, this.loading = null; } @@ -12602,7 +12602,7 @@ class vT { throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of"); r = () => Promise.resolve(n); } - return new vT(e.name, (e.alias || []).concat(e.name).map((i) => i.toLowerCase()), e.extensions || [], e.filename, r, n); + return new rT(e.name, (e.alias || []).concat(e.name).map((i) => i.toLowerCase()), e.extensions || [], e.filename, r, n); } static matchFilename(e, r) { for (let i of e) @@ -12631,7 +12631,7 @@ class vT { return null; } } -const A_e = /* @__PURE__ */ Gt.define(), gg = /* @__PURE__ */ Gt.define({ +const B_e = /* @__PURE__ */ Yt.define(), gg = /* @__PURE__ */ Yt.define({ combine: (t) => { if (!t.length) return " "; @@ -12641,11 +12641,11 @@ const A_e = /* @__PURE__ */ Gt.define(), gg = /* @__PURE__ */ Gt.define({ return e; } }); -function yT(t) { +function nT(t) { let e = t.facet(gg); return e.charCodeAt(0) == 9 ? t.tabSize * e.length : e.length; } -function Gx(t, e) { +function Bx(t, e) { let r = "", n = t.tabSize, i = t.facet(gg)[0]; if (i == " ") { for (; e >= n; ) @@ -12656,19 +12656,19 @@ function Gx(t, e) { r += i; return r; } -function Q$(t, e) { - t instanceof qr && (t = new H_(t)); - for (let n of t.state.facet(A_e)) { +function I$(t, e) { + t instanceof qr && (t = new P_(t)); + for (let n of t.state.facet(B_e)) { let i = n(t, e); if (i !== void 0) return i; } - let r = Qn(t.state); - return r.length >= e ? R_e(t, r, e) : null; + let r = Un(t.state); + return r.length >= e ? F_e(t, r, e) : null; } -class H_ { +class P_ { constructor(e, r = {}) { - this.state = e, this.options = r, this.unit = yT(e); + this.state = e, this.options = r, this.unit = nT(e); } lineAt(e, r = 1) { let n = this.state.doc.lineAt(e), { simulateBreak: i, simulateDoubleBreak: s } = this.options; @@ -12685,7 +12685,7 @@ class H_ { return a > -1 && (s += a - this.countColumn(n, n.search(/\S|$/))), s; } countColumn(e, r = e.length) { - return iu(e, this.state.tabSize, r); + return eu(e, this.state.tabSize, r); } lineIndent(e, r = 1) { let { text: n, from: i } = this.lineAt(e, r), s = this.options.overrideIndentation; @@ -12700,8 +12700,8 @@ class H_ { return this.options.simulateBreak || null; } } -const My = /* @__PURE__ */ new Fr(); -function R_e(t, e, r) { +const Ay = /* @__PURE__ */ new Br(); +function F_e(t, e, r) { let n = e.resolveStack(r), i = e.resolveInner(r, -1).resolve(r, 0).enterUnfinishedNodesBefore(r); if (i != n.node) { let s = []; @@ -12710,34 +12710,34 @@ function R_e(t, e, r) { for (let a = s.length - 1; a >= 0; a--) n = { node: s[a], next: n }; } - return Cae(n, t, r); + return Tae(n, t, r); } -function Cae(t, e, r) { +function Tae(t, e, r) { for (let n = t; n; n = n.next) { - let i = M_e(n.node); + let i = q_e(n.node); if (i) - return i(V$.create(e, r, n)); + return i($$.create(e, r, n)); } return 0; } -function L_e(t) { +function z_e(t) { return t.pos == t.options.simulateBreak && t.options.simulateDoubleBreak; } -function M_e(t) { - let e = t.type.prop(My); +function q_e(t) { + let e = t.type.prop(Ay); if (e) return e; let r = t.firstChild, n; - if (r && (n = r.type.prop(Fr.closedBy))) { + if (r && (n = r.type.prop(Br.closedBy))) { let i = t.lastChild, s = i && n.indexOf(i.name) > -1; - return (a) => Eae(a, !0, 1, void 0, s && !L_e(a) ? i.from : void 0); + return (a) => Cae(a, !0, 1, void 0, s && !z_e(a) ? i.from : void 0); } - return t.parent == null ? D_e : null; + return t.parent == null ? U_e : null; } -function D_e() { +function U_e() { return 0; } -class V$ extends H_ { +class $$ extends P_ { constructor(e, r, n) { super(e.state, e.options), this.base = e, this.pos = r, this.context = n; } @@ -12745,7 +12745,7 @@ class V$ extends H_ { return this.context.node; } static create(e, r, n) { - return new V$(e, r, n); + return new $$(e, r, n); } get textAfter() { return this.textAfterPos(this.pos); @@ -12759,23 +12759,23 @@ class V$ extends H_ { let n = e.resolve(r.from); for (; n.parent && n.parent.from == n.from; ) n = n.parent; - if (P_e(n, e)) + if (Q_e(n, e)) break; r = this.state.doc.lineAt(n.from); } return this.lineIndent(r.from); } continue() { - return Cae(this.context.next, this.base, this.pos); + return Tae(this.context.next, this.base, this.pos); } } -function P_e(t, e) { +function Q_e(t, e) { for (let r = e; r; r = r.parent) if (t == r) return !0; return !1; } -function N_e(t) { +function V_e(t) { let e = t.node, r = e.childAfter(e.from), n = e.lastChild; if (!r) return null; @@ -12793,22 +12793,22 @@ function N_e(t) { o = l.to; } } -function l9({ closing: t, align: e = !0, units: r = 1 }) { - return (n) => Eae(n, e, r, t); +function HM({ closing: t, align: e = !0, units: r = 1 }) { + return (n) => Cae(n, e, r, t); } -function Eae(t, e, r, n, i) { - let s = t.textAfter, a = s.match(/^\s*/)[0].length, o = n && s.slice(a, a + n.length) == n || i == t.pos + a, l = e ? N_e(t) : null; +function Cae(t, e, r, n, i) { + let s = t.textAfter, a = s.match(/^\s*/)[0].length, o = n && s.slice(a, a + n.length) == n || i == t.pos + a, l = e ? V_e(t) : null; return l ? o ? t.column(l.from) : t.column(l.to) : t.baseIndent + (o ? 0 : t.unit * r); } -const I_e = (t) => t.baseIndent; -function J5({ except: t, units: e = 1 } = {}) { +const W_e = (t) => t.baseIndent; +function F5({ except: t, units: e = 1 } = {}) { return (r) => { let n = t && t.test(r.textAfter); return r.baseIndent + (n ? 0 : e * r.unit); }; } -const $_e = 200; -function B_e() { +const Y_e = 200; +function G_e() { return qr.transactionFilter.of((t) => { if (!t.docChanged || !t.isUserEvent("input.type") && !t.isUserEvent("input.complete")) return t; @@ -12816,7 +12816,7 @@ function B_e() { if (!e.length) return t; let r = t.newDoc, { head: n } = t.newSelection.main, i = r.lineAt(n); - if (n > i.from + $_e) + if (n > i.from + Y_e) return t; let s = r.sliceString(i.from, n); if (!e.some((u) => u.test(s))) @@ -12827,22 +12827,22 @@ function B_e() { if (h.from == o) continue; o = h.from; - let f = Q$(a, h.from); + let f = I$(a, h.from); if (f == null) continue; - let d = /^\s*/.exec(h.text)[0], p = Gx(a, f); + let d = /^\s*/.exec(h.text)[0], p = Bx(a, f); d != p && l.push({ from: h.from, to: h.from + d.length, insert: p }); } return l.length ? [t, { changes: l, sequential: !0 }] : t; }); } -const _ae = /* @__PURE__ */ Gt.define(), tm = /* @__PURE__ */ new Fr(); -function W$(t) { +const Eae = /* @__PURE__ */ Yt.define(), tm = /* @__PURE__ */ new Br(); +function B$(t) { let e = t.firstChild, r = t.lastChild; return e && e.to < r.from ? { from: e.to, to: r.type.isError ? t.to : r.from } : null; } -function F_e(t, e, r) { - let n = Qn(t); +function H_e(t, e, r) { + let n = Un(t); if (n.length < r) return null; let i = n.resolveStack(r, 1), s = null; @@ -12853,45 +12853,45 @@ function F_e(t, e, r) { if (s && o.from < e) break; let l = o.type.prop(tm); - if (l && (o.to < n.length - 50 || n.length == t.doc.length || !z_e(o))) { + if (l && (o.to < n.length - 50 || n.length == t.doc.length || !X_e(o))) { let u = l(o, t); u && u.from <= r && u.from >= e && u.to > r && (s = u); } } return s; } -function z_e(t) { +function X_e(t) { let e = t.lastChild; return e && e.to == t.to && e.type.isError; } -function Hx(t, e, r) { - for (let n of t.facet(_ae)) { +function Fx(t, e, r) { + for (let n of t.facet(Eae)) { let i = n(t, e, r); if (i) return i; } - return F_e(t, e, r); + return H_e(t, e, r); } -function Aae(t, e) { +function _ae(t, e) { let r = e.mapPos(t.from, 1), n = e.mapPos(t.to, -1); return r >= n ? void 0 : { from: r, to: n }; } -const Ef = /* @__PURE__ */ _r.define({ map: Aae }), rm = /* @__PURE__ */ _r.define({ map: Aae }); -function Rae(t) { +const Of = /* @__PURE__ */ Tr.define({ map: _ae }), rm = /* @__PURE__ */ Tr.define({ map: _ae }); +function Aae(t) { let e = []; for (let { head: r } of t.state.selection.ranges) e.some((n) => n.from <= r && n.to >= r) || e.push(t.lineBlockAt(r)); return e; } -const up = /* @__PURE__ */ ai.define({ +const cp = /* @__PURE__ */ ii.define({ create() { - return Ht.none; + return Gt.none; }, update(t, e) { t = t.map(e.changes); for (let r of e.effects) - if (r.is(Ef) && !U_e(t, r.value.from, r.value.to)) { - let { preparePlaceholder: n } = e.state.facet(Y$), i = n ? Ht.replace({ widget: new H_e(n(e.state, r.value)) }) : FW; + if (r.is(Of) && !j_e(t, r.value.from, r.value.to)) { + let { preparePlaceholder: n } = e.state.facet(F$), i = n ? Gt.replace({ widget: new n6e(n(e.state, r.value)) }) : UW; t = t.update({ add: [i.range(r.value.from, r.value.to)] }); } else r.is(rm) && (t = t.update({ @@ -12911,7 +12911,7 @@ const up = /* @__PURE__ */ ai.define({ } return t; }, - provide: (t) => Mt.decorations.from(t), + provide: (t) => Rt.decorations.from(t), toJSON(t, e) { let r = []; return t.between(0, e.doc.length, (n, i) => { @@ -12926,87 +12926,87 @@ const up = /* @__PURE__ */ ai.define({ let n = t[r++], i = t[r++]; if (typeof n != "number" || typeof i != "number") throw new RangeError("Invalid JSON for fold state"); - e.push(FW.range(n, i)); + e.push(UW.range(n, i)); } - return Ht.set(e, !0); + return Gt.set(e, !0); } }); -function q_e(t) { - return t.field(up, !1) || jr.empty; +function Z_e(t) { + return t.field(cp, !1) || Zr.empty; } -function bT(t, e, r) { +function iT(t, e, r) { var n; let i = null; - return (n = t.field(up, !1)) === null || n === void 0 || n.between(e, r, (s, a) => { + return (n = t.field(cp, !1)) === null || n === void 0 || n.between(e, r, (s, a) => { (!i || i.from > s) && (i = { from: s, to: a }); }), i; } -function U_e(t, e, r) { +function j_e(t, e, r) { let n = !1; return t.between(e, e, (i, s) => { i == e && s == r && (n = !0); }), n; } -function Lae(t, e) { - return t.field(up, !1) ? e : e.concat(_r.appendConfig.of(Pae())); +function Rae(t, e) { + return t.field(cp, !1) ? e : e.concat(Tr.appendConfig.of(Dae())); } -const Mae = (t) => { - for (let e of Rae(t)) { - let r = Hx(t.state, e.from, e.to); +const Lae = (t) => { + for (let e of Aae(t)) { + let r = Fx(t.state, e.from, e.to); if (r) - return t.dispatch({ effects: Lae(t.state, [Ef.of(r), Dae(t, r)]) }), !0; + return t.dispatch({ effects: Rae(t.state, [Of.of(r), Mae(t, r)]) }), !0; } return !1; -}, Q_e = (t) => { - if (!t.state.field(up, !1)) +}, K_e = (t) => { + if (!t.state.field(cp, !1)) return !1; let e = []; - for (let r of Rae(t)) { - let n = bT(t.state, r.from, r.to); - n && e.push(rm.of(n), Dae(t, n, !1)); + for (let r of Aae(t)) { + let n = iT(t.state, r.from, r.to); + n && e.push(rm.of(n), Mae(t, n, !1)); } return e.length && t.dispatch({ effects: e }), e.length > 0; }; -function Dae(t, e, r = !0) { +function Mae(t, e, r = !0) { let n = t.state.doc.lineAt(e.from).number, i = t.state.doc.lineAt(e.to).number; - return Mt.announce.of(`${t.state.phrase(r ? "Folded lines" : "Unfolded lines")} ${n} ${t.state.phrase("to")} ${i}.`); + return Rt.announce.of(`${t.state.phrase(r ? "Folded lines" : "Unfolded lines")} ${n} ${t.state.phrase("to")} ${i}.`); } -const V_e = (t) => { +const J_e = (t) => { let { state: e } = t, r = []; for (let n = 0; n < e.doc.length; ) { - let i = t.lineBlockAt(n), s = Hx(e, i.from, i.to); - s && r.push(Ef.of(s)), n = (s ? t.lineBlockAt(s.to) : i).to + 1; + let i = t.lineBlockAt(n), s = Fx(e, i.from, i.to); + s && r.push(Of.of(s)), n = (s ? t.lineBlockAt(s.to) : i).to + 1; } - return r.length && t.dispatch({ effects: Lae(t.state, r) }), !!r.length; -}, W_e = (t) => { - let e = t.state.field(up, !1); + return r.length && t.dispatch({ effects: Rae(t.state, r) }), !!r.length; +}, e6e = (t) => { + let e = t.state.field(cp, !1); if (!e || !e.size) return !1; let r = []; return e.between(0, t.state.doc.length, (n, i) => { r.push(rm.of({ from: n, to: i })); }), t.dispatch({ effects: r }), !0; -}, Y_e = [ - { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: Mae }, - { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: Q_e }, - { key: "Ctrl-Alt-[", run: V_e }, - { key: "Ctrl-Alt-]", run: W_e } -], G_e = { +}, t6e = [ + { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: Lae }, + { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: K_e }, + { key: "Ctrl-Alt-[", run: J_e }, + { key: "Ctrl-Alt-]", run: e6e } +], r6e = { placeholderDOM: null, preparePlaceholder: null, placeholderText: "\u2026" -}, Y$ = /* @__PURE__ */ Gt.define({ +}, F$ = /* @__PURE__ */ Yt.define({ combine(t) { - return Th(t, G_e); + return wh(t, r6e); } }); -function Pae(t) { - let e = [up, Z_e]; - return t && e.push(Y$.of(t)), e; +function Dae(t) { + let e = [cp, a6e]; + return t && e.push(F$.of(t)), e; } -function Nae(t, e) { - let { state: r } = t, n = r.facet(Y$), i = (a) => { - let o = t.lineBlockAt(t.posAtDOM(a.target)), l = bT(t.state, o.from, o.to); +function Pae(t, e) { + let { state: r } = t, n = r.facet(F$), i = (a) => { + let o = t.lineBlockAt(t.posAtDOM(a.target)), l = iT(t.state, o.from, o.to); l && t.dispatch({ effects: rm.of(l) }), a.preventDefault(); }; if (n.placeholderDOM) @@ -13014,12 +13014,12 @@ function Nae(t, e) { let s = document.createElement("span"); return s.textContent = n.placeholderText, s.setAttribute("aria-label", r.phrase("folded code")), s.title = r.phrase("unfold"), s.className = "cm-foldPlaceholder", s.onclick = i, s; } -const FW = /* @__PURE__ */ Ht.replace({ widget: /* @__PURE__ */ new class extends el { +const UW = /* @__PURE__ */ Gt.replace({ widget: /* @__PURE__ */ new class extends Zo { toDOM(t) { - return Nae(t, null); + return Pae(t, null); } }() }); -class H_e extends el { +class n6e extends Zo { constructor(e) { super(), this.value = e; } @@ -13027,17 +13027,17 @@ class H_e extends el { return this.value == e.value; } toDOM(e) { - return Nae(e, this.value); + return Pae(e, this.value); } } -const X_e = { +const i6e = { openText: "\u2304", closedText: "\u203A", markerDOM: null, domEventHandlers: {}, foldingChanged: () => !1 }; -class n8 extends hc { +class V7 extends sc { constructor(e, r) { super(), this.config = e, this.open = r; } @@ -13051,18 +13051,18 @@ class n8 extends hc { return r.textContent = this.open ? this.config.openText : this.config.closedText, r.title = e.state.phrase(this.open ? "Fold line" : "Unfold line"), r; } } -function j_e(t = {}) { - let e = Object.assign(Object.assign({}, X_e), t), r = new n8(e, !0), n = new n8(e, !1), i = fn.fromClass(class { +function s6e(t = {}) { + let e = Object.assign(Object.assign({}, i6e), t), r = new V7(e, !0), n = new V7(e, !1), i = hn.fromClass(class { constructor(a) { this.from = a.viewport.from, this.markers = this.buildMarkers(a); } update(a) { - (a.docChanged || a.viewportChanged || a.startState.facet(cp) != a.state.facet(cp) || a.startState.field(up, !1) != a.state.field(up, !1) || Qn(a.startState) != Qn(a.state) || e.foldingChanged(a)) && (this.markers = this.buildMarkers(a.view)); + (a.docChanged || a.viewportChanged || a.startState.facet(lp) != a.state.facet(lp) || a.startState.field(cp, !1) != a.state.field(cp, !1) || Un(a.startState) != Un(a.state) || e.foldingChanged(a)) && (this.markers = this.buildMarkers(a.view)); } buildMarkers(a) { - let o = new rs(); + let o = new es(); for (let l of a.viewportLineBlocks) { - let u = bT(a.state, l.from, l.to) ? n : Hx(a.state, l.from, l.to) ? r : null; + let u = iT(a.state, l.from, l.to) ? n : Fx(a.state, l.from, l.to) ? r : null; u && o.add(l.from, l.from, u); } return o.finish(); @@ -13070,29 +13070,29 @@ function j_e(t = {}) { }), { domEventHandlers: s } = e; return [ i, - G_({ + D_({ class: "cm-foldGutter", markers(a) { var o; - return ((o = a.plugin(i)) === null || o === void 0 ? void 0 : o.markers) || jr.empty; + return ((o = a.plugin(i)) === null || o === void 0 ? void 0 : o.markers) || Zr.empty; }, initialSpacer() { - return new n8(e, !1); + return new V7(e, !1); }, domEventHandlers: Object.assign(Object.assign({}, s), { click: (a, o, l) => { if (s.click && s.click(a, o, l)) return !0; - let u = bT(a.state, o.from, o.to); + let u = iT(a.state, o.from, o.to); if (u) return a.dispatch({ effects: rm.of(u) }), !0; - let h = Hx(a.state, o.from, o.to); - return h ? (a.dispatch({ effects: Ef.of(h) }), !0) : !1; + let h = Fx(a.state, o.from, o.to); + return h ? (a.dispatch({ effects: Of.of(h) }), !0) : !1; } }) }), - Pae() + Dae() ]; } -const Z_e = /* @__PURE__ */ Mt.baseTheme({ +const a6e = /* @__PURE__ */ Rt.baseTheme({ ".cm-foldPlaceholder": { backgroundColor: "#eee", border: "1px solid #ddd", @@ -13107,182 +13107,182 @@ const Z_e = /* @__PURE__ */ Mt.baseTheme({ cursor: "pointer" } }); -class X_ { +class N_ { constructor(e, r) { this.specs = e; let n; function i(o) { - let l = Tf.newName(); + let l = xf.newName(); return (n || (n = /* @__PURE__ */ Object.create(null)))["." + l] = o, l; } const s = typeof r.all == "string" ? r.all : r.all ? i(r.all) : void 0, a = r.scope; - this.scope = a instanceof ml ? (o) => o.prop($0) == a.data : a ? (o) => o == a : void 0, this.style = Sae(e.map((o) => ({ + this.scope = a instanceof fl ? (o) => o.prop($0) == a.data : a ? (o) => o == a : void 0, this.style = kae(e.map((o) => ({ tag: o.tag, class: o.class || i(Object.assign({}, o, { tag: null })) })), { all: s - }).style, this.module = n ? new Tf(n) : null, this.themeType = r.themeType; + }).style, this.module = n ? new xf(n) : null, this.themeType = r.themeType; } static define(e, r) { - return new X_(e, r || {}); + return new N_(e, r || {}); } } -const c9 = /* @__PURE__ */ Gt.define(), Iae = /* @__PURE__ */ Gt.define({ +const XM = /* @__PURE__ */ Yt.define(), Nae = /* @__PURE__ */ Yt.define({ combine(t) { return t.length ? [t[0]] : null; } }); -function i8(t) { - let e = t.facet(c9); - return e.length ? e : t.facet(Iae); +function W7(t) { + let e = t.facet(XM); + return e.length ? e : t.facet(Nae); } -function zW(t, e) { - let r = [J_e], n; - return t instanceof X_ && (t.module && r.push(Mt.styleModule.of(t.module)), n = t.themeType), e != null && e.fallback ? r.push(Iae.of(t)) : n ? r.push(c9.computeN([Mt.darkTheme], (i) => i.facet(Mt.darkTheme) == (n == "dark") ? [t] : [])) : r.push(c9.of(t)), r; +function QW(t, e) { + let r = [l6e], n; + return t instanceof N_ && (t.module && r.push(Rt.styleModule.of(t.module)), n = t.themeType), e != null && e.fallback ? r.push(Nae.of(t)) : n ? r.push(XM.computeN([Rt.darkTheme], (i) => i.facet(Rt.darkTheme) == (n == "dark") ? [t] : [])) : r.push(XM.of(t)), r; } -class K_e { +class o6e { constructor(e) { - this.markCache = /* @__PURE__ */ Object.create(null), this.tree = Qn(e.state), this.decorations = this.buildDeco(e, i8(e.state)), this.decoratedTo = e.viewport.to; + this.markCache = /* @__PURE__ */ Object.create(null), this.tree = Un(e.state), this.decorations = this.buildDeco(e, W7(e.state)), this.decoratedTo = e.viewport.to; } update(e) { - let r = Qn(e.state), n = i8(e.state), i = n != i8(e.startState), { viewport: s } = e.view, a = e.changes.mapPos(this.decoratedTo, 1); + let r = Un(e.state), n = W7(e.state), i = n != W7(e.startState), { viewport: s } = e.view, a = e.changes.mapPos(this.decoratedTo, 1); r.length < s.to && !i && r.type == this.tree.type && a >= s.to ? (this.decorations = this.decorations.map(e.changes), this.decoratedTo = a) : (r != this.tree || e.viewportChanged || i) && (this.tree = r, this.decorations = this.buildDeco(e.view, n), this.decoratedTo = s.to); } buildDeco(e, r) { if (!r || !this.tree.length) - return Ht.none; - let n = new rs(); + return Gt.none; + let n = new es(); for (let { from: i, to: s } of e.visibleRanges) - S_e(this.tree, r, (a, o, l) => { - n.add(a, o, this.markCache[l] || (this.markCache[l] = Ht.mark({ class: l }))); + D_e(this.tree, r, (a, o, l) => { + n.add(a, o, this.markCache[l] || (this.markCache[l] = Gt.mark({ class: l }))); }, i, s); return n.finish(); } } -const J_e = /* @__PURE__ */ qa.high(/* @__PURE__ */ fn.fromClass(K_e, { +const l6e = /* @__PURE__ */ za.high(/* @__PURE__ */ hn.fromClass(o6e, { decorations: (t) => t.decorations -})), qW = /* @__PURE__ */ X_.define([ +})), VW = /* @__PURE__ */ N_.define([ { - tag: ze.meta, + tag: Be.meta, color: "#404740" }, { - tag: ze.link, + tag: Be.link, textDecoration: "underline" }, { - tag: ze.heading, + tag: Be.heading, textDecoration: "underline", fontWeight: "bold" }, { - tag: ze.emphasis, + tag: Be.emphasis, fontStyle: "italic" }, { - tag: ze.strong, + tag: Be.strong, fontWeight: "bold" }, { - tag: ze.strikethrough, + tag: Be.strikethrough, textDecoration: "line-through" }, { - tag: ze.keyword, + tag: Be.keyword, color: "#708" }, { - tag: [ze.atom, ze.bool, ze.url, ze.contentSeparator, ze.labelName], + tag: [Be.atom, Be.bool, Be.url, Be.contentSeparator, Be.labelName], color: "#219" }, { - tag: [ze.literal, ze.inserted], + tag: [Be.literal, Be.inserted], color: "#164" }, { - tag: [ze.string, ze.deleted], + tag: [Be.string, Be.deleted], color: "#a11" }, { - tag: [ze.regexp, ze.escape, /* @__PURE__ */ ze.special(ze.string)], + tag: [Be.regexp, Be.escape, /* @__PURE__ */ Be.special(Be.string)], color: "#e40" }, { - tag: /* @__PURE__ */ ze.definition(ze.variableName), + tag: /* @__PURE__ */ Be.definition(Be.variableName), color: "#00f" }, { - tag: /* @__PURE__ */ ze.local(ze.variableName), + tag: /* @__PURE__ */ Be.local(Be.variableName), color: "#30a" }, { - tag: [ze.typeName, ze.namespace], + tag: [Be.typeName, Be.namespace], color: "#085" }, { - tag: ze.className, + tag: Be.className, color: "#167" }, { - tag: [/* @__PURE__ */ ze.special(ze.variableName), ze.macroName], + tag: [/* @__PURE__ */ Be.special(Be.variableName), Be.macroName], color: "#256" }, { - tag: /* @__PURE__ */ ze.definition(ze.propertyName), + tag: /* @__PURE__ */ Be.definition(Be.propertyName), color: "#00c" }, { - tag: ze.comment, + tag: Be.comment, color: "#940" }, { - tag: ze.invalid, + tag: Be.invalid, color: "#f00" } -]), e6e = /* @__PURE__ */ Mt.baseTheme({ +]), c6e = /* @__PURE__ */ Rt.baseTheme({ "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" }, "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" } -}), $ae = 1e4, Bae = "()[]{}", Fae = /* @__PURE__ */ Gt.define({ +}), Iae = 1e4, $ae = "()[]{}", Bae = /* @__PURE__ */ Yt.define({ combine(t) { - return Th(t, { + return wh(t, { afterCursor: !0, - brackets: Bae, - maxScanDistance: $ae, - renderMatch: n6e + brackets: $ae, + maxScanDistance: Iae, + renderMatch: f6e }); } -}), t6e = /* @__PURE__ */ Ht.mark({ class: "cm-matchingBracket" }), r6e = /* @__PURE__ */ Ht.mark({ class: "cm-nonmatchingBracket" }); -function n6e(t) { - let e = [], r = t.matched ? t6e : r6e; +}), u6e = /* @__PURE__ */ Gt.mark({ class: "cm-matchingBracket" }), h6e = /* @__PURE__ */ Gt.mark({ class: "cm-nonmatchingBracket" }); +function f6e(t) { + let e = [], r = t.matched ? u6e : h6e; return e.push(r.range(t.start.from, t.start.to)), t.end && e.push(r.range(t.end.from, t.end.to)), e; } -const i6e = /* @__PURE__ */ ai.define({ +const d6e = /* @__PURE__ */ ii.define({ create() { - return Ht.none; + return Gt.none; }, update(t, e) { if (!e.docChanged && !e.selection) return t; - let r = [], n = e.state.facet(Fae); + let r = [], n = e.state.facet(Bae); for (let i of e.state.selection.ranges) { if (!i.empty) continue; - let s = Kl(e.state, i.head, -1, n) || i.head > 0 && Kl(e.state, i.head - 1, 1, n) || n.afterCursor && (Kl(e.state, i.head, 1, n) || i.head < e.state.doc.length && Kl(e.state, i.head + 1, -1, n)); + let s = Yl(e.state, i.head, -1, n) || i.head > 0 && Yl(e.state, i.head - 1, 1, n) || n.afterCursor && (Yl(e.state, i.head, 1, n) || i.head < e.state.doc.length && Yl(e.state, i.head + 1, -1, n)); s && (r = r.concat(n.renderMatch(s, e.state))); } - return Ht.set(r, !0); + return Gt.set(r, !0); }, - provide: (t) => Mt.decorations.from(t) -}), s6e = [ - i6e, - e6e + provide: (t) => Rt.decorations.from(t) +}), p6e = [ + d6e, + c6e ]; -function a6e(t = {}) { - return [Fae.of(t), s6e]; +function g6e(t = {}) { + return [Bae.of(t), p6e]; } -const zae = /* @__PURE__ */ new Fr(); -function u9(t, e, r) { - let n = t.prop(e < 0 ? Fr.openedBy : Fr.closedBy); +const Fae = /* @__PURE__ */ new Br(); +function ZM(t, e, r) { + let n = t.prop(e < 0 ? Br.openedBy : Br.closedBy); if (n) return n; if (t.name.length == 1) { @@ -13292,35 +13292,35 @@ function u9(t, e, r) { } return null; } -function h9(t) { - let e = t.type.prop(zae); +function jM(t) { + let e = t.type.prop(Fae); return e ? e(t.node) : t; } -function Kl(t, e, r, n = {}) { - let i = n.maxScanDistance || $ae, s = n.brackets || Bae, a = Qn(t), o = a.resolveInner(e, r); +function Yl(t, e, r, n = {}) { + let i = n.maxScanDistance || Iae, s = n.brackets || $ae, a = Un(t), o = a.resolveInner(e, r); for (let l = o; l; l = l.parent) { - let u = u9(l.type, r, s); + let u = ZM(l.type, r, s); if (u && l.from < l.to) { - let h = h9(l); + let h = jM(l); if (h && (r > 0 ? e >= h.from && e < h.to : e > h.from && e <= h.to)) - return o6e(t, e, r, l, h, u, s); + return m6e(t, e, r, l, h, u, s); } } - return l6e(t, e, r, a, o.type, i, s); + return v6e(t, e, r, a, o.type, i, s); } -function o6e(t, e, r, n, i, s, a) { +function m6e(t, e, r, n, i, s, a) { let o = n.parent, l = { from: i.from, to: i.to }, u = 0, h = o == null ? void 0 : o.cursor(); if (h && (r < 0 ? h.childBefore(n.from) : h.childAfter(n.to))) do if (r < 0 ? h.to <= n.from : h.from >= n.to) { if (u == 0 && s.indexOf(h.type.name) > -1 && h.from < h.to) { - let f = h9(h); + let f = jM(h); return { start: l, end: f ? { from: f.from, to: f.to } : void 0, matched: !0 }; - } else if (u9(h.type, r, a)) + } else if (ZM(h.type, r, a)) u++; - else if (u9(h.type, -r, a)) { + else if (ZM(h.type, -r, a)) { if (u == 0) { - let f = h9(h); + let f = jM(h); return { start: l, end: f && f.from < f.to ? { from: f.from, to: f.to } : void 0, @@ -13333,7 +13333,7 @@ function o6e(t, e, r, n, i, s, a) { while (r < 0 ? h.prevSibling() : h.nextSibling()); return { start: l, matched: !1 }; } -function l6e(t, e, r, n, i, s, a) { +function v6e(t, e, r, n, i, s, a) { let o = r < 0 ? t.sliceDoc(e - 1, e) : t.sliceDoc(e, e + 1), l = a.indexOf(o); if (l < 0 || l % 2 == 0 != r > 0) return null; @@ -13357,14 +13357,14 @@ function l6e(t, e, r, n, i, s, a) { } return h.done ? { start: u, matched: !1 } : null; } -function UW(t, e, r, n = 0, i = 0) { +function WW(t, e, r, n = 0, i = 0) { e == null && (e = t.search(/[^\s\u00a0]/), e == -1 && (e = t.length)); let s = i; for (let a = n; a < e; a++) t.charCodeAt(a) == 9 ? s += r - s % r : s++; return s; } -class c6e { +class y6e { constructor(e, r, n, i) { this.string = e, this.tabSize = r, this.indentUnit = n, this.overrideIndent = i, this.pos = 0, this.start = 0, this.lastColumnPos = 0, this.lastColumnValue = 0; } @@ -13410,11 +13410,11 @@ class c6e { this.pos -= e; } column() { - return this.lastColumnPos < this.start && (this.lastColumnValue = UW(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue), this.lastColumnPos = this.start), this.lastColumnValue; + return this.lastColumnPos < this.start && (this.lastColumnValue = WW(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue), this.lastColumnPos = this.start), this.lastColumnValue; } indentation() { var e; - return (e = this.overrideIndent) !== null && e !== void 0 ? e : UW(this.string, null, this.tabSize); + return (e = this.overrideIndent) !== null && e !== void 0 ? e : WW(this.string, null, this.tabSize); } match(e, r, n) { if (typeof e == "string") { @@ -13429,7 +13429,7 @@ class c6e { return this.string.slice(this.start, this.pos); } } -const u6e = /* @__PURE__ */ Object.create(null), QW = [ys.none], VW = [], WW = /* @__PURE__ */ Object.create(null), h6e = /* @__PURE__ */ Object.create(null); +const b6e = /* @__PURE__ */ Object.create(null), YW = [ms.none], GW = [], HW = /* @__PURE__ */ Object.create(null), x6e = /* @__PURE__ */ Object.create(null); for (let [t, e] of [ ["variable", "variableName"], ["variable-2", "variableName.special"], @@ -13444,39 +13444,39 @@ for (let [t, e] of [ ["header", "heading"], ["property", "propertyName"] ]) - h6e[t] = /* @__PURE__ */ f6e(u6e, e); -function s8(t, e) { - VW.indexOf(t) > -1 || (VW.push(t), console.warn(e)); + x6e[t] = /* @__PURE__ */ w6e(b6e, e); +function Y7(t, e) { + GW.indexOf(t) > -1 || (GW.push(t), console.warn(e)); } -function f6e(t, e) { +function w6e(t, e) { let r = []; for (let o of e.split(" ")) { let l = []; for (let u of o.split(".")) { - let h = t[u] || ze[u]; - h ? typeof h == "function" ? l.length ? l = l.map(h) : s8(u, `Modifier ${u} used at start of tag`) : l.length ? s8(u, `Tag ${u} used as modifier`) : l = Array.isArray(h) ? h : [h] : s8(u, `Unknown highlighting tag ${u}`); + let h = t[u] || Be[u]; + h ? typeof h == "function" ? l.length ? l = l.map(h) : Y7(u, `Modifier ${u} used at start of tag`) : l.length ? Y7(u, `Tag ${u} used as modifier`) : l = Array.isArray(h) ? h : [h] : Y7(u, `Unknown highlighting tag ${u}`); } for (let u of l) r.push(u); } if (!r.length) return 0; - let n = e.replace(/ /g, "_"), i = n + " " + r.map((o) => o.id), s = WW[i]; + let n = e.replace(/ /g, "_"), i = n + " " + r.map((o) => o.id), s = HW[i]; if (s) return s.id; - let a = WW[i] = ys.define({ - id: QW.length, + let a = HW[i] = ms.define({ + id: YW.length, name: n, - props: [Bp({ [n]: r })] + props: [Fp({ [n]: r })] }); - return QW.push(a), a.id; + return YW.push(a), a.id; } -Xn.RTL, Xn.LTR; -const d6e = (t) => { - let { state: e } = t, r = e.doc.lineAt(e.selection.main.from), n = H$(t.state, r.from); - return n.line ? p6e(t) : n.block ? m6e(t) : !1; +Gn.RTL, Gn.LTR; +const O6e = (t) => { + let { state: e } = t, r = e.doc.lineAt(e.selection.main.from), n = q$(t.state, r.from); + return n.line ? k6e(t) : n.block ? T6e(t) : !1; }; -function G$(t, e) { +function z$(t, e) { return ({ state: r, dispatch: n }) => { if (r.readOnly) return !1; @@ -13484,21 +13484,21 @@ function G$(t, e) { return i ? (n(r.update(i)), !0) : !1; }; } -const p6e = /* @__PURE__ */ G$(b6e, 0), g6e = /* @__PURE__ */ G$(qae, 0), m6e = /* @__PURE__ */ G$((t, e) => qae(t, e, y6e(e)), 0); -function H$(t, e) { +const k6e = /* @__PURE__ */ z$(_6e, 0), S6e = /* @__PURE__ */ z$(zae, 0), T6e = /* @__PURE__ */ z$((t, e) => zae(t, e, E6e(e)), 0); +function q$(t, e) { let r = t.languageDataAt("commentTokens", e); return r.length ? r[0] : {}; } -const F2 = 50; -function v6e(t, { open: e, close: r }, n, i) { - let s = t.sliceDoc(n - F2, n), a = t.sliceDoc(i, i + F2), o = /\s*$/.exec(s)[0].length, l = /^\s*/.exec(a)[0].length, u = s.length - o; +const L2 = 50; +function C6e(t, { open: e, close: r }, n, i) { + let s = t.sliceDoc(n - L2, n), a = t.sliceDoc(i, i + L2), o = /\s*$/.exec(s)[0].length, l = /^\s*/.exec(a)[0].length, u = s.length - o; if (s.slice(u - e.length, u) == e && a.slice(l, l + r.length) == r) return { open: { pos: n - o, margin: o && 1 }, close: { pos: i + l, margin: l && 1 } }; let h, f; - i - n <= 2 * F2 ? h = f = t.sliceDoc(n, i) : (h = t.sliceDoc(n, n + F2), f = t.sliceDoc(i - F2, i)); + i - n <= 2 * L2 ? h = f = t.sliceDoc(n, i) : (h = t.sliceDoc(n, n + L2), f = t.sliceDoc(i - L2, i)); let d = /^\s*/.exec(h)[0].length, p = /\s*$/.exec(f)[0].length, g = f.length - p - r.length; return h.slice(d, d + e.length) == e && f.slice(g, g + r.length) == r ? { open: { @@ -13511,7 +13511,7 @@ function v6e(t, { open: e, close: r }, n, i) { } } : null; } -function y6e(t) { +function E6e(t) { let e = []; for (let r of t.selection.ranges) { let n = t.doc.lineAt(r.from), i = r.to <= n.to ? n : t.doc.lineAt(r.to), s = e.length - 1; @@ -13519,11 +13519,11 @@ function y6e(t) { } return e; } -function qae(t, e, r = e.selection.ranges) { - let n = r.map((s) => H$(e, s.from).block); +function zae(t, e, r = e.selection.ranges) { + let n = r.map((s) => q$(e, s.from).block); if (!n.every((s) => s)) return null; - let i = r.map((s, a) => v6e(e, n[a], s.from, s.to)); + let i = r.map((s, a) => C6e(e, n[a], s.from, s.to)); if (t != 2 && !i.every((s) => s)) return { changes: e.changes(r.map((s, a) => i[a] ? [] : [{ from: s.from, insert: n[a].open + " " }, { from: s.to, insert: " " + n[a].close }])) }; if (t != 1 && i.some((s) => s)) { @@ -13537,10 +13537,10 @@ function qae(t, e, r = e.selection.ranges) { } return null; } -function b6e(t, e, r = e.selection.ranges) { +function _6e(t, e, r = e.selection.ranges) { let n = [], i = -1; for (let { from: s, to: a } of r) { - let o = n.length, l = 1e9, u = H$(e, s).line; + let o = n.length, l = 1e9, u = q$(e, s).line; if (!!u) { for (let h = s; h <= a; ) { let f = e.doc.lineAt(h); @@ -13574,9 +13574,9 @@ function b6e(t, e, r = e.selection.ranges) { } return null; } -const f9 = /* @__PURE__ */ bo.define(), x6e = /* @__PURE__ */ bo.define(), w6e = /* @__PURE__ */ Gt.define(), Uae = /* @__PURE__ */ Gt.define({ +const KM = /* @__PURE__ */ vo.define(), A6e = /* @__PURE__ */ vo.define(), R6e = /* @__PURE__ */ Yt.define(), qae = /* @__PURE__ */ Yt.define({ combine(t) { - return Th(t, { + return wh(t, { minDepth: 100, newGroupDelay: 500, joinToEvent: (e, r) => r @@ -13586,59 +13586,59 @@ const f9 = /* @__PURE__ */ bo.define(), x6e = /* @__PURE__ */ bo.define(), w6e = joinToEvent: (e, r) => (n, i) => e(n, i) || r(n, i) }); } -}), Qae = /* @__PURE__ */ ai.define({ +}), Uae = /* @__PURE__ */ ii.define({ create() { - return Gu.empty; + return Uu.empty; }, update(t, e) { - let r = e.state.facet(Uae), n = e.annotation(f9); + let r = e.state.facet(qae), n = e.annotation(KM); if (n) { - let l = Yo.fromTransaction(e, n.selection), u = n.side, h = u == 0 ? t.undone : t.done; - return l ? h = xT(h, h.length, r.minDepth, l) : h = Wae(h, e.startState.selection), new Gu(u == 0 ? n.rest : h, u == 0 ? h : n.rest); + let l = Uo.fromTransaction(e, n.selection), u = n.side, h = u == 0 ? t.undone : t.done; + return l ? h = sT(h, h.length, r.minDepth, l) : h = Vae(h, e.startState.selection), new Uu(u == 0 ? n.rest : h, u == 0 ? h : n.rest); } - let i = e.annotation(x6e); - if ((i == "full" || i == "before") && (t = t.isolate()), e.annotation(Fi.addToHistory) === !1) + let i = e.annotation(A6e); + if ((i == "full" || i == "before") && (t = t.isolate()), e.annotation(Bi.addToHistory) === !1) return e.changes.empty ? t : t.addMapping(e.changes.desc); - let s = Yo.fromTransaction(e), a = e.annotation(Fi.time), o = e.annotation(Fi.userEvent); + let s = Uo.fromTransaction(e), a = e.annotation(Bi.time), o = e.annotation(Bi.userEvent); return s ? t = t.addChanges(s, a, o, r, e) : e.selection && (t = t.addSelection(e.startState.selection, a, o, r.newGroupDelay)), (i == "full" || i == "after") && (t = t.isolate()), t; }, toJSON(t) { return { done: t.done.map((e) => e.toJSON()), undone: t.undone.map((e) => e.toJSON()) }; }, fromJSON(t) { - return new Gu(t.done.map(Yo.fromJSON), t.undone.map(Yo.fromJSON)); + return new Uu(t.done.map(Uo.fromJSON), t.undone.map(Uo.fromJSON)); } }); -function O6e(t = {}) { +function L6e(t = {}) { return [ - Qae, - Uae.of(t), - Mt.domEventHandlers({ + Uae, + qae.of(t), + Rt.domEventHandlers({ beforeinput(e, r) { - let n = e.inputType == "historyUndo" ? X$ : e.inputType == "historyRedo" ? Xx : null; + let n = e.inputType == "historyUndo" ? U$ : e.inputType == "historyRedo" ? zx : null; return n ? (e.preventDefault(), n(r)) : !1; } }) ]; } -function j_(t, e) { +function I_(t, e) { return function({ state: r, dispatch: n }) { if (!e && r.readOnly) return !1; - let i = r.field(Qae, !1); + let i = r.field(Uae, !1); if (!i) return !1; let s = i.pop(t, r, e); return s ? (n(s), !0) : !1; }; } -const X$ = /* @__PURE__ */ j_(0, !1), Xx = /* @__PURE__ */ j_(1, !1), k6e = /* @__PURE__ */ j_(0, !0), S6e = /* @__PURE__ */ j_(1, !0); -class Yo { +const U$ = /* @__PURE__ */ I_(0, !1), zx = /* @__PURE__ */ I_(1, !1), M6e = /* @__PURE__ */ I_(0, !0), D6e = /* @__PURE__ */ I_(1, !0); +class Uo { constructor(e, r, n, i, s) { this.changes = e, this.effects = r, this.mapped = n, this.startSelection = i, this.selectionsAfter = s; } setSelAfter(e) { - return new Yo(this.changes, this.effects, this.mapped, this.startSelection, e); + return new Uo(this.changes, this.effects, this.mapped, this.startSelection, e); } toJSON() { var e, r, n; @@ -13650,25 +13650,25 @@ class Yo { }; } static fromJSON(e) { - return new Yo(e.changes && Gi.fromJSON(e.changes), [], e.mapped && nh.fromJSON(e.mapped), e.startSelection && ft.fromJSON(e.startSelection), e.selectionsAfter.map(ft.fromJSON)); + return new Uo(e.changes && Yi.fromJSON(e.changes), [], e.mapped && Ku.fromJSON(e.mapped), e.startSelection && ut.fromJSON(e.startSelection), e.selectionsAfter.map(ut.fromJSON)); } static fromTransaction(e, r) { - let n = Jl; - for (let i of e.startState.facet(w6e)) { + let n = Gl; + for (let i of e.startState.facet(R6e)) { let s = i(e); s.length && (n = n.concat(s)); } - return !n.length && e.changes.empty ? null : new Yo(e.changes.invert(e.startState.doc), n, void 0, r || e.startState.selection, Jl); + return !n.length && e.changes.empty ? null : new Uo(e.changes.invert(e.startState.doc), n, void 0, r || e.startState.selection, Gl); } static selection(e) { - return new Yo(void 0, Jl, void 0, void 0, e); + return new Uo(void 0, Gl, void 0, void 0, e); } } -function xT(t, e, r, n) { +function sT(t, e, r, n) { let i = e + 1 > r + 20 ? e - r - 1 : 0, s = t.slice(i, e); return s.push(n), s; } -function T6e(t, e) { +function P6e(t, e) { let r = [], n = !1; return t.iterChangedRanges((i, s) => r.push(i, s)), e.iterChangedRanges((i, s, a, o) => { for (let l = 0; l < r.length; ) { @@ -13677,63 +13677,63 @@ function T6e(t, e) { } }), n; } -function C6e(t, e) { +function N6e(t, e) { return t.ranges.length == e.ranges.length && t.ranges.filter((r, n) => r.empty != e.ranges[n].empty).length === 0; } -function Vae(t, e) { +function Qae(t, e) { return t.length ? e.length ? t.concat(e) : t : e; } -const Jl = [], E6e = 200; -function Wae(t, e) { +const Gl = [], I6e = 200; +function Vae(t, e) { if (t.length) { - let r = t[t.length - 1], n = r.selectionsAfter.slice(Math.max(0, r.selectionsAfter.length - E6e)); - return n.length && n[n.length - 1].eq(e) ? t : (n.push(e), xT(t, t.length - 1, 1e9, r.setSelAfter(n))); + let r = t[t.length - 1], n = r.selectionsAfter.slice(Math.max(0, r.selectionsAfter.length - I6e)); + return n.length && n[n.length - 1].eq(e) ? t : (n.push(e), sT(t, t.length - 1, 1e9, r.setSelAfter(n))); } else - return [Yo.selection([e])]; + return [Uo.selection([e])]; } -function _6e(t) { +function $6e(t) { let e = t[t.length - 1], r = t.slice(); return r[t.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1)), r; } -function a8(t, e) { +function G7(t, e) { if (!t.length) return t; - let r = t.length, n = Jl; + let r = t.length, n = Gl; for (; r; ) { - let i = A6e(t[r - 1], e, n); + let i = B6e(t[r - 1], e, n); if (i.changes && !i.changes.empty || i.effects.length) { let s = t.slice(0, r); return s[r - 1] = i, s; } else e = i.mapped, r--, n = i.selectionsAfter; } - return n.length ? [Yo.selection(n)] : Jl; + return n.length ? [Uo.selection(n)] : Gl; } -function A6e(t, e, r) { - let n = Vae(t.selectionsAfter.length ? t.selectionsAfter.map((o) => o.map(e)) : Jl, r); +function B6e(t, e, r) { + let n = Qae(t.selectionsAfter.length ? t.selectionsAfter.map((o) => o.map(e)) : Gl, r); if (!t.changes) - return Yo.selection(n); + return Uo.selection(n); let i = t.changes.map(e), s = e.mapDesc(t.changes, !0), a = t.mapped ? t.mapped.composeDesc(s) : s; - return new Yo(i, _r.mapEffects(t.effects, e), a, t.startSelection.map(s), n); + return new Uo(i, Tr.mapEffects(t.effects, e), a, t.startSelection.map(s), n); } -const R6e = /^(input\.type|delete)($|\.)/; -class Gu { +const F6e = /^(input\.type|delete)($|\.)/; +class Uu { constructor(e, r, n = 0, i = void 0) { this.done = e, this.undone = r, this.prevTime = n, this.prevUserEvent = i; } isolate() { - return this.prevTime ? new Gu(this.done, this.undone) : this; + return this.prevTime ? new Uu(this.done, this.undone) : this; } addChanges(e, r, n, i, s) { let a = this.done, o = a[a.length - 1]; - return o && o.changes && !o.changes.empty && e.changes && (!n || R6e.test(n)) && (!o.selectionsAfter.length && r - this.prevTime < i.newGroupDelay && i.joinToEvent(s, T6e(o.changes, e.changes)) || n == "input.type.compose") ? a = xT(a, a.length - 1, i.minDepth, new Yo(e.changes.compose(o.changes), Vae(e.effects, o.effects), o.mapped, o.startSelection, Jl)) : a = xT(a, a.length, i.minDepth, e), new Gu(a, Jl, r, n); + return o && o.changes && !o.changes.empty && e.changes && (!n || F6e.test(n)) && (!o.selectionsAfter.length && r - this.prevTime < i.newGroupDelay && i.joinToEvent(s, P6e(o.changes, e.changes)) || n == "input.type.compose") ? a = sT(a, a.length - 1, i.minDepth, new Uo(e.changes.compose(o.changes), Qae(e.effects, o.effects), o.mapped, o.startSelection, Gl)) : a = sT(a, a.length, i.minDepth, e), new Uu(a, Gl, r, n); } addSelection(e, r, n, i) { - let s = this.done.length ? this.done[this.done.length - 1].selectionsAfter : Jl; - return s.length > 0 && r - this.prevTime < i && n == this.prevUserEvent && n && /^select($|\.)/.test(n) && C6e(s[s.length - 1], e) ? this : new Gu(Wae(this.done, e), this.undone, r, n); + let s = this.done.length ? this.done[this.done.length - 1].selectionsAfter : Gl; + return s.length > 0 && r - this.prevTime < i && n == this.prevUserEvent && n && /^select($|\.)/.test(n) && N6e(s[s.length - 1], e) ? this : new Uu(Vae(this.done, e), this.undone, r, n); } addMapping(e) { - return new Gu(a8(this.done, e), a8(this.undone, e), this.prevTime, this.prevUserEvent); + return new Uu(G7(this.done, e), G7(this.undone, e), this.prevTime, this.prevUserEvent); } pop(e, r, n) { let i = e == 0 ? this.done : this.undone; @@ -13743,17 +13743,17 @@ class Gu { if (n && s.selectionsAfter.length) return r.update({ selection: s.selectionsAfter[s.selectionsAfter.length - 1], - annotations: f9.of({ side: e, rest: _6e(i), selection: a }), + annotations: KM.of({ side: e, rest: $6e(i), selection: a }), userEvent: e == 0 ? "select.undo" : "select.redo", scrollIntoView: !0 }); if (s.changes) { - let o = i.length == 1 ? Jl : i.slice(0, i.length - 1); - return s.mapped && (o = a8(o, s.mapped)), r.update({ + let o = i.length == 1 ? Gl : i.slice(0, i.length - 1); + return s.mapped && (o = G7(o, s.mapped)), r.update({ changes: s.changes, selection: s.startSelection, effects: s.effects, - annotations: f9.of({ side: e, rest: o, selection: a }), + annotations: KM.of({ side: e, rest: o, selection: a }), filter: !1, userEvent: e == 0 ? "undo" : "redo", scrollIntoView: !0 @@ -13762,69 +13762,69 @@ class Gu { return null; } } -Gu.empty = /* @__PURE__ */ new Gu(Jl, Jl); -const L6e = [ - { key: "Mod-z", run: X$, preventDefault: !0 }, - { key: "Mod-y", mac: "Mod-Shift-z", run: Xx, preventDefault: !0 }, - { linux: "Ctrl-Shift-z", run: Xx, preventDefault: !0 }, - { key: "Mod-u", run: k6e, preventDefault: !0 }, - { key: "Alt-u", mac: "Mod-Shift-u", run: S6e, preventDefault: !0 } +Uu.empty = /* @__PURE__ */ new Uu(Gl, Gl); +const z6e = [ + { key: "Mod-z", run: U$, preventDefault: !0 }, + { key: "Mod-y", mac: "Mod-Shift-z", run: zx, preventDefault: !0 }, + { linux: "Ctrl-Shift-z", run: zx, preventDefault: !0 }, + { key: "Mod-u", run: M6e, preventDefault: !0 }, + { key: "Alt-u", mac: "Mod-Shift-u", run: D6e, preventDefault: !0 } ]; -function Dy(t, e) { - return ft.create(t.ranges.map(e), t.mainIndex); +function Ry(t, e) { + return ut.create(t.ranges.map(e), t.mainIndex); } -function Ch(t, e) { +function Oh(t, e) { return t.update({ selection: e, scrollIntoView: !0, userEvent: "select" }); } -function fu({ state: t, dispatch: e }, r) { - let n = Dy(t.selection, r); - return n.eq(t.selection) ? !1 : (e(Ch(t, n)), !0); +function lu({ state: t, dispatch: e }, r) { + let n = Ry(t.selection, r); + return n.eq(t.selection) ? !1 : (e(Oh(t, n)), !0); } -function Z_(t, e) { - return ft.cursor(e ? t.to : t.from); +function $_(t, e) { + return ut.cursor(e ? t.to : t.from); } -function j$(t, e) { - return fu(t, (r) => r.empty ? t.moveByChar(r, e) : Z_(r, e)); +function Q$(t, e) { + return lu(t, (r) => r.empty ? t.moveByChar(r, e) : $_(r, e)); } -function Va(t) { - return t.textDirectionAt(t.state.selection.main.head) == Xn.LTR; +function Qa(t) { + return t.textDirectionAt(t.state.selection.main.head) == Gn.LTR; } -const Z$ = (t) => j$(t, !Va(t)), Yae = (t) => j$(t, Va(t)), M6e = (t) => j$(t, !1); -function Gae(t, e) { - return fu(t, (r) => r.empty ? t.moveByGroup(r, e) : Z_(r, e)); +const V$ = (t) => Q$(t, !Qa(t)), Wae = (t) => Q$(t, Qa(t)), q6e = (t) => Q$(t, !1); +function Yae(t, e) { + return lu(t, (r) => r.empty ? t.moveByGroup(r, e) : $_(r, e)); } -const D6e = (t) => Gae(t, !Va(t)), P6e = (t) => Gae(t, Va(t)); -function N6e(t, e, r) { +const U6e = (t) => Yae(t, !Qa(t)), Q6e = (t) => Yae(t, Qa(t)); +function V6e(t, e, r) { if (e.type.prop(r)) return !0; let n = e.to - e.from; return n && (n > 2 || /[^\s,.;:]/.test(t.sliceDoc(e.from, e.to))) || e.firstChild; } -function K_(t, e, r) { - let n = Qn(t).resolveInner(e.head), i = r ? Fr.closedBy : Fr.openedBy; +function B_(t, e, r) { + let n = Un(t).resolveInner(e.head), i = r ? Br.closedBy : Br.openedBy; for (let l = e.head; ; ) { let u = r ? n.childAfter(l) : n.childBefore(l); if (!u) break; - N6e(t, u, i) ? n = u : l = r ? u.to : u.from; + V6e(t, u, i) ? n = u : l = r ? u.to : u.from; } let s = n.type.prop(i), a, o; - return s && (a = r ? Kl(t, n.from, 1) : Kl(t, n.to, -1)) && a.matched ? o = r ? a.end.to : a.end.from : o = r ? n.to : n.from, ft.cursor(o, r ? -1 : 1); + return s && (a = r ? Yl(t, n.from, 1) : Yl(t, n.to, -1)) && a.matched ? o = r ? a.end.to : a.end.from : o = r ? n.to : n.from, ut.cursor(o, r ? -1 : 1); } -const I6e = (t) => fu(t, (e) => K_(t.state, e, !Va(t))), $6e = (t) => fu(t, (e) => K_(t.state, e, Va(t))); -function Hae(t, e) { - return fu(t, (r) => { +const W6e = (t) => lu(t, (e) => B_(t.state, e, !Qa(t))), Y6e = (t) => lu(t, (e) => B_(t.state, e, Qa(t))); +function Gae(t, e) { + return lu(t, (r) => { if (!r.empty) - return Z_(r, e); + return $_(r, e); let n = t.moveVertically(r, e); return n.head != r.head ? n : t.moveToLineBoundary(r, e); }); } -const Xae = (t) => Hae(t, !1), jae = (t) => Hae(t, !0); +const Hae = (t) => Gae(t, !1), Xae = (t) => Gae(t, !0); function Zae(t) { let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, r = 0, n = 0, i; if (e) { - for (let s of t.state.facet(Mt.scrollMargins)) { + for (let s of t.state.facet(Rt.scrollMargins)) { let a = s(t); a != null && a.top && (r = Math.max(a == null ? void 0 : a.top, r)), a != null && a.bottom && (n = Math.max(a == null ? void 0 : a.bottom, n)); } @@ -13838,163 +13838,163 @@ function Zae(t) { height: Math.max(t.defaultLineHeight, i - 5) }; } -function Kae(t, e) { - let r = Zae(t), { state: n } = t, i = Dy(n.selection, (a) => a.empty ? t.moveVertically(a, e, r.height) : Z_(a, e)); +function jae(t, e) { + let r = Zae(t), { state: n } = t, i = Ry(n.selection, (a) => a.empty ? t.moveVertically(a, e, r.height) : $_(a, e)); if (i.eq(n.selection)) return !1; let s; if (r.selfScroll) { let a = t.coordsAtPos(n.selection.main.head), o = t.scrollDOM.getBoundingClientRect(), l = o.top + r.marginTop, u = o.bottom - r.marginBottom; - a && a.top > l && a.bottom < u && (s = Mt.scrollIntoView(i.main.head, { y: "start", yMargin: a.top - l })); + a && a.top > l && a.bottom < u && (s = Rt.scrollIntoView(i.main.head, { y: "start", yMargin: a.top - l })); } - return t.dispatch(Ch(n, i), { effects: s }), !0; + return t.dispatch(Oh(n, i), { effects: s }), !0; } -const YW = (t) => Kae(t, !1), d9 = (t) => Kae(t, !0); -function Fp(t, e, r) { +const XW = (t) => jae(t, !1), JM = (t) => jae(t, !0); +function zp(t, e, r) { let n = t.lineBlockAt(e.head), i = t.moveToLineBoundary(e, r); if (i.head == e.head && i.head != (r ? n.to : n.from) && (i = t.moveToLineBoundary(e, r, !1)), !r && i.head == n.from && n.length) { let s = /^\s*/.exec(t.state.sliceDoc(n.from, Math.min(n.from + 100, n.to)))[0].length; - s && e.head != n.from + s && (i = ft.cursor(n.from + s)); + s && e.head != n.from + s && (i = ut.cursor(n.from + s)); } return i; } -const Jae = (t) => fu(t, (e) => Fp(t, e, !0)), eoe = (t) => fu(t, (e) => Fp(t, e, !1)), B6e = (t) => fu(t, (e) => Fp(t, e, !Va(t))), F6e = (t) => fu(t, (e) => Fp(t, e, Va(t))), z6e = (t) => fu(t, (e) => ft.cursor(t.lineBlockAt(e.head).from, 1)), q6e = (t) => fu(t, (e) => ft.cursor(t.lineBlockAt(e.head).to, -1)); -function U6e(t, e, r) { - let n = !1, i = Dy(t.selection, (s) => { - let a = Kl(t, s.head, -1) || Kl(t, s.head, 1) || s.head > 0 && Kl(t, s.head - 1, 1) || s.head < t.doc.length && Kl(t, s.head + 1, -1); +const Kae = (t) => lu(t, (e) => zp(t, e, !0)), Jae = (t) => lu(t, (e) => zp(t, e, !1)), G6e = (t) => lu(t, (e) => zp(t, e, !Qa(t))), H6e = (t) => lu(t, (e) => zp(t, e, Qa(t))), X6e = (t) => lu(t, (e) => ut.cursor(t.lineBlockAt(e.head).from, 1)), Z6e = (t) => lu(t, (e) => ut.cursor(t.lineBlockAt(e.head).to, -1)); +function j6e(t, e, r) { + let n = !1, i = Ry(t.selection, (s) => { + let a = Yl(t, s.head, -1) || Yl(t, s.head, 1) || s.head > 0 && Yl(t, s.head - 1, 1) || s.head < t.doc.length && Yl(t, s.head + 1, -1); if (!a || !a.end) return s; n = !0; let o = a.start.from == s.head ? a.end.to : a.end.from; - return r ? ft.range(s.anchor, o) : ft.cursor(o); + return r ? ut.range(s.anchor, o) : ut.cursor(o); }); - return n ? (e(Ch(t, i)), !0) : !1; + return n ? (e(Oh(t, i)), !0) : !1; } -const Q6e = ({ state: t, dispatch: e }) => U6e(t, e, !1); -function Tc(t, e) { - let r = Dy(t.state.selection, (n) => { +const K6e = ({ state: t, dispatch: e }) => j6e(t, e, !1); +function bc(t, e) { + let r = Ry(t.state.selection, (n) => { let i = e(n); - return ft.range(n.anchor, i.head, i.goalColumn, i.bidiLevel || void 0); + return ut.range(n.anchor, i.head, i.goalColumn, i.bidiLevel || void 0); }); - return r.eq(t.state.selection) ? !1 : (t.dispatch(Ch(t.state, r)), !0); + return r.eq(t.state.selection) ? !1 : (t.dispatch(Oh(t.state, r)), !0); } -function toe(t, e) { - return Tc(t, (r) => t.moveByChar(r, e)); +function eoe(t, e) { + return bc(t, (r) => t.moveByChar(r, e)); } -const roe = (t) => toe(t, !Va(t)), noe = (t) => toe(t, Va(t)); -function ioe(t, e) { - return Tc(t, (r) => t.moveByGroup(r, e)); +const toe = (t) => eoe(t, !Qa(t)), roe = (t) => eoe(t, Qa(t)); +function noe(t, e) { + return bc(t, (r) => t.moveByGroup(r, e)); } -const V6e = (t) => ioe(t, !Va(t)), W6e = (t) => ioe(t, Va(t)), Y6e = (t) => Tc(t, (e) => K_(t.state, e, !Va(t))), G6e = (t) => Tc(t, (e) => K_(t.state, e, Va(t))); -function soe(t, e) { - return Tc(t, (r) => t.moveVertically(r, e)); +const J6e = (t) => noe(t, !Qa(t)), eAe = (t) => noe(t, Qa(t)), tAe = (t) => bc(t, (e) => B_(t.state, e, !Qa(t))), rAe = (t) => bc(t, (e) => B_(t.state, e, Qa(t))); +function ioe(t, e) { + return bc(t, (r) => t.moveVertically(r, e)); } -const aoe = (t) => soe(t, !1), ooe = (t) => soe(t, !0); -function loe(t, e) { - return Tc(t, (r) => t.moveVertically(r, e, Zae(t).height)); +const soe = (t) => ioe(t, !1), aoe = (t) => ioe(t, !0); +function ooe(t, e) { + return bc(t, (r) => t.moveVertically(r, e, Zae(t).height)); } -const GW = (t) => loe(t, !1), HW = (t) => loe(t, !0), H6e = (t) => Tc(t, (e) => Fp(t, e, !0)), X6e = (t) => Tc(t, (e) => Fp(t, e, !1)), j6e = (t) => Tc(t, (e) => Fp(t, e, !Va(t))), Z6e = (t) => Tc(t, (e) => Fp(t, e, Va(t))), K6e = (t) => Tc(t, (e) => ft.cursor(t.lineBlockAt(e.head).from)), J6e = (t) => Tc(t, (e) => ft.cursor(t.lineBlockAt(e.head).to)), XW = ({ state: t, dispatch: e }) => (e(Ch(t, { anchor: 0 })), !0), jW = ({ state: t, dispatch: e }) => (e(Ch(t, { anchor: t.doc.length })), !0), ZW = ({ state: t, dispatch: e }) => (e(Ch(t, { anchor: t.selection.main.anchor, head: 0 })), !0), KW = ({ state: t, dispatch: e }) => (e(Ch(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), eAe = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), tAe = ({ state: t, dispatch: e }) => { - let r = J_(t).map(({ from: n, to: i }) => ft.range(n, Math.min(i + 1, t.doc.length))); - return e(t.update({ selection: ft.create(r), userEvent: "select" })), !0; -}, rAe = ({ state: t, dispatch: e }) => { - let r = Dy(t.selection, (n) => { +const ZW = (t) => ooe(t, !1), jW = (t) => ooe(t, !0), nAe = (t) => bc(t, (e) => zp(t, e, !0)), iAe = (t) => bc(t, (e) => zp(t, e, !1)), sAe = (t) => bc(t, (e) => zp(t, e, !Qa(t))), aAe = (t) => bc(t, (e) => zp(t, e, Qa(t))), oAe = (t) => bc(t, (e) => ut.cursor(t.lineBlockAt(e.head).from)), lAe = (t) => bc(t, (e) => ut.cursor(t.lineBlockAt(e.head).to)), KW = ({ state: t, dispatch: e }) => (e(Oh(t, { anchor: 0 })), !0), JW = ({ state: t, dispatch: e }) => (e(Oh(t, { anchor: t.doc.length })), !0), eY = ({ state: t, dispatch: e }) => (e(Oh(t, { anchor: t.selection.main.anchor, head: 0 })), !0), tY = ({ state: t, dispatch: e }) => (e(Oh(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), cAe = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), uAe = ({ state: t, dispatch: e }) => { + let r = F_(t).map(({ from: n, to: i }) => ut.range(n, Math.min(i + 1, t.doc.length))); + return e(t.update({ selection: ut.create(r), userEvent: "select" })), !0; +}, hAe = ({ state: t, dispatch: e }) => { + let r = Ry(t.selection, (n) => { var i; - let s = Qn(t).resolveStack(n.from, 1); + let s = Un(t).resolveStack(n.from, 1); for (let a = s; a; a = a.next) { let { node: o } = a; if ((o.from < n.from && o.to >= n.to || o.to > n.to && o.from <= n.from) && ((i = o.parent) === null || i === void 0 ? void 0 : i.parent)) - return ft.range(o.to, o.from); + return ut.range(o.to, o.from); } return n; }); - return e(Ch(t, r)), !0; -}, nAe = ({ state: t, dispatch: e }) => { + return e(Oh(t, r)), !0; +}, fAe = ({ state: t, dispatch: e }) => { let r = t.selection, n = null; - return r.ranges.length > 1 ? n = ft.create([r.main]) : r.main.empty || (n = ft.create([ft.cursor(r.main.head)])), n ? (e(Ch(t, n)), !0) : !1; + return r.ranges.length > 1 ? n = ut.create([r.main]) : r.main.empty || (n = ut.create([ut.cursor(r.main.head)])), n ? (e(Oh(t, n)), !0) : !1; }; -function xk(t, e) { +function fk(t, e) { if (t.state.readOnly) return !1; let r = "delete.selection", { state: n } = t, i = n.changeByRange((s) => { let { from: a, to: o } = s; if (a == o) { let l = e(s); - l < a ? (r = "delete.backward", l = oS(t, l, !1)) : l > a && (r = "delete.forward", l = oS(t, l, !0)), a = Math.min(a, l), o = Math.max(o, l); + l < a ? (r = "delete.backward", l = X4(t, l, !1)) : l > a && (r = "delete.forward", l = X4(t, l, !0)), a = Math.min(a, l), o = Math.max(o, l); } else - a = oS(t, a, !1), o = oS(t, o, !0); - return a == o ? { range: s } : { changes: { from: a, to: o }, range: ft.cursor(a, a < s.head ? -1 : 1) }; + a = X4(t, a, !1), o = X4(t, o, !0); + return a == o ? { range: s } : { changes: { from: a, to: o }, range: ut.cursor(a, a < s.head ? -1 : 1) }; }); return i.changes.empty ? !1 : (t.dispatch(n.update(i, { scrollIntoView: !0, userEvent: r, - effects: r == "delete.selection" ? Mt.announce.of(n.phrase("Selection deleted")) : void 0 + effects: r == "delete.selection" ? Rt.announce.of(n.phrase("Selection deleted")) : void 0 })), !0); } -function oS(t, e, r) { - if (t instanceof Mt) - for (let n of t.state.facet(Mt.atomicRanges).map((i) => i(t))) +function X4(t, e, r) { + if (t instanceof Rt) + for (let n of t.state.facet(Rt.atomicRanges).map((i) => i(t))) n.between(e, e, (i, s) => { i < e && s > e && (e = r ? s : i); }); return e; } -const coe = (t, e) => xk(t, (r) => { +const loe = (t, e) => fk(t, (r) => { let n = r.from, { state: i } = t, s = i.doc.lineAt(n), a, o; if (!e && n > s.from && n < s.from + 200 && !/[^ \t]/.test(a = s.text.slice(0, n - s.from))) { if (a[a.length - 1] == " ") return n - 1; - let l = iu(a, i.tabSize), u = l % yT(i) || yT(i); + let l = eu(a, i.tabSize), u = l % nT(i) || nT(i); for (let h = 0; h < u && a[a.length - 1 - h] == " "; h++) n--; o = n; } else - o = oa(s.text, n - s.from, e, e) + s.from, o == n && s.number != (e ? i.doc.lines : 1) ? o += e ? 1 : -1 : !e && /[\ufe00-\ufe0f]/.test(s.text.slice(o - s.from, n - s.from)) && (o = oa(s.text, o - s.from, !1, !1) + s.from); + o = ra(s.text, n - s.from, e, e) + s.from, o == n && s.number != (e ? i.doc.lines : 1) ? o += e ? 1 : -1 : !e && /[\ufe00-\ufe0f]/.test(s.text.slice(o - s.from, n - s.from)) && (o = ra(s.text, o - s.from, !1, !1) + s.from); return o; -}), p9 = (t) => coe(t, !1), uoe = (t) => coe(t, !0), hoe = (t, e) => xk(t, (r) => { +}), e9 = (t) => loe(t, !1), coe = (t) => loe(t, !0), uoe = (t, e) => fk(t, (r) => { let n = r.head, { state: i } = t, s = i.doc.lineAt(n), a = i.charCategorizer(n); for (let o = null; ; ) { if (n == (e ? s.to : s.from)) { n == r.head && s.number != (e ? i.doc.lines : 1) && (n += e ? 1 : -1); break; } - let l = oa(s.text, n - s.from, e) + s.from, u = s.text.slice(Math.min(n, l) - s.from, Math.max(n, l) - s.from), h = a(u); + let l = ra(s.text, n - s.from, e) + s.from, u = s.text.slice(Math.min(n, l) - s.from, Math.max(n, l) - s.from), h = a(u); if (o != null && h != o) break; (u != " " || n != r.head) && (o = h), n = l; } return n; -}), foe = (t) => hoe(t, !1), iAe = (t) => hoe(t, !0), sAe = (t) => xk(t, (e) => { +}), hoe = (t) => uoe(t, !1), dAe = (t) => uoe(t, !0), pAe = (t) => fk(t, (e) => { let r = t.lineBlockAt(e.head).to; return e.head < r ? r : Math.min(t.state.doc.length, e.head + 1); -}), aAe = (t) => xk(t, (e) => { +}), gAe = (t) => fk(t, (e) => { let r = t.moveToLineBoundary(e, !1).head; return e.head > r ? r : Math.max(0, e.head - 1); -}), oAe = (t) => xk(t, (e) => { +}), mAe = (t) => fk(t, (e) => { let r = t.moveToLineBoundary(e, !0).head; return e.head < r ? r : Math.min(t.state.doc.length, e.head + 1); -}), lAe = ({ state: t, dispatch: e }) => { +}), vAe = ({ state: t, dispatch: e }) => { if (t.readOnly) return !1; let r = t.changeByRange((n) => ({ changes: { from: n.from, to: n.to, insert: nn.of(["", ""]) }, - range: ft.cursor(n.from) + range: ut.cursor(n.from) })); return e(t.update(r, { scrollIntoView: !0, userEvent: "input" })), !0; -}, cAe = ({ state: t, dispatch: e }) => { +}, yAe = ({ state: t, dispatch: e }) => { if (t.readOnly) return !1; let r = t.changeByRange((n) => { if (!n.empty || n.from == 0 || n.from == t.doc.length) return { range: n }; - let i = n.from, s = t.doc.lineAt(i), a = i == s.from ? i - 1 : oa(s.text, i - s.from, !1) + s.from, o = i == s.to ? i + 1 : oa(s.text, i - s.from, !0) + s.from; + let i = n.from, s = t.doc.lineAt(i), a = i == s.from ? i - 1 : ra(s.text, i - s.from, !1) + s.from, o = i == s.to ? i + 1 : ra(s.text, i - s.from, !0) + s.from; return { changes: { from: a, to: o, insert: t.doc.slice(i, o).append(t.doc.slice(a, i)) }, - range: ft.cursor(o) + range: ut.cursor(o) }; }); return r.changes.empty ? !1 : (e(t.update(r, { scrollIntoView: !0, userEvent: "move.character" })), !0); }; -function J_(t) { +function F_(t) { let e = [], r = -1; for (let n of t.selection.ranges) { let i = t.doc.lineAt(n.from), s = t.doc.lineAt(n.to); @@ -14007,74 +14007,74 @@ function J_(t) { } return e; } -function doe(t, e, r) { +function foe(t, e, r) { if (t.readOnly) return !1; let n = [], i = []; - for (let s of J_(t)) { + for (let s of F_(t)) { if (r ? s.to == t.doc.length : s.from == 0) continue; let a = t.doc.lineAt(r ? s.to + 1 : s.from - 1), o = a.length + 1; if (r) { n.push({ from: s.to, to: a.to }, { from: s.from, insert: a.text + t.lineBreak }); for (let l of s.ranges) - i.push(ft.range(Math.min(t.doc.length, l.anchor + o), Math.min(t.doc.length, l.head + o))); + i.push(ut.range(Math.min(t.doc.length, l.anchor + o), Math.min(t.doc.length, l.head + o))); } else { n.push({ from: a.from, to: s.from }, { from: s.to, insert: t.lineBreak + a.text }); for (let l of s.ranges) - i.push(ft.range(l.anchor - o, l.head - o)); + i.push(ut.range(l.anchor - o, l.head - o)); } } return n.length ? (e(t.update({ changes: n, scrollIntoView: !0, - selection: ft.create(i, t.selection.mainIndex), + selection: ut.create(i, t.selection.mainIndex), userEvent: "move.line" })), !0) : !1; } -const uAe = ({ state: t, dispatch: e }) => doe(t, e, !1), hAe = ({ state: t, dispatch: e }) => doe(t, e, !0); -function poe(t, e, r) { +const bAe = ({ state: t, dispatch: e }) => foe(t, e, !1), xAe = ({ state: t, dispatch: e }) => foe(t, e, !0); +function doe(t, e, r) { if (t.readOnly) return !1; let n = []; - for (let i of J_(t)) + for (let i of F_(t)) r ? n.push({ from: i.from, insert: t.doc.slice(i.from, i.to) + t.lineBreak }) : n.push({ from: i.to, insert: t.lineBreak + t.doc.slice(i.from, i.to) }); return e(t.update({ changes: n, scrollIntoView: !0, userEvent: "input.copyline" })), !0; } -const fAe = ({ state: t, dispatch: e }) => poe(t, e, !1), dAe = ({ state: t, dispatch: e }) => poe(t, e, !0), pAe = (t) => { +const wAe = ({ state: t, dispatch: e }) => doe(t, e, !1), OAe = ({ state: t, dispatch: e }) => doe(t, e, !0), kAe = (t) => { if (t.state.readOnly) return !1; - let { state: e } = t, r = e.changes(J_(e).map(({ from: i, to: s }) => (i > 0 ? i-- : s < e.doc.length && s++, { from: i, to: s }))), n = Dy(e.selection, (i) => t.moveVertically(i, !0)).map(r); + let { state: e } = t, r = e.changes(F_(e).map(({ from: i, to: s }) => (i > 0 ? i-- : s < e.doc.length && s++, { from: i, to: s }))), n = Ry(e.selection, (i) => t.moveVertically(i, !0)).map(r); return t.dispatch({ changes: r, selection: n, scrollIntoView: !0, userEvent: "delete.line" }), !0; }; -function gAe(t, e) { +function SAe(t, e) { if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1))) return { from: e, to: e }; - let r = Qn(t).resolveInner(e), n = r.childBefore(e), i = r.childAfter(e), s; - return n && i && n.to <= e && i.from >= e && (s = n.type.prop(Fr.closedBy)) && s.indexOf(i.name) > -1 && t.doc.lineAt(n.to).from == t.doc.lineAt(i.from).from && !/\S/.test(t.sliceDoc(n.to, i.from)) ? { from: n.to, to: i.from } : null; + let r = Un(t).resolveInner(e), n = r.childBefore(e), i = r.childAfter(e), s; + return n && i && n.to <= e && i.from >= e && (s = n.type.prop(Br.closedBy)) && s.indexOf(i.name) > -1 && t.doc.lineAt(n.to).from == t.doc.lineAt(i.from).from && !/\S/.test(t.sliceDoc(n.to, i.from)) ? { from: n.to, to: i.from } : null; } -const goe = /* @__PURE__ */ moe(!1), mAe = /* @__PURE__ */ moe(!0); -function moe(t) { +const poe = /* @__PURE__ */ goe(!1), TAe = /* @__PURE__ */ goe(!0); +function goe(t) { return ({ state: e, dispatch: r }) => { if (e.readOnly) return !1; let n = e.changeByRange((i) => { - let { from: s, to: a } = i, o = e.doc.lineAt(s), l = !t && s == a && gAe(e, s); + let { from: s, to: a } = i, o = e.doc.lineAt(s), l = !t && s == a && SAe(e, s); t && (s = a = (a <= o.to ? o : e.doc.lineAt(a)).to); - let u = new H_(e, { simulateBreak: s, simulateDoubleBreak: !!l }), h = Q$(u, s); - for (h == null && (h = iu(/^\s*/.exec(e.doc.lineAt(s).text)[0], e.tabSize)); a < o.to && /\s/.test(o.text[a - o.from]); ) + let u = new P_(e, { simulateBreak: s, simulateDoubleBreak: !!l }), h = I$(u, s); + for (h == null && (h = eu(/^\s*/.exec(e.doc.lineAt(s).text)[0], e.tabSize)); a < o.to && /\s/.test(o.text[a - o.from]); ) a++; l ? { from: s, to: a } = l : s > o.from && s < o.from + 100 && !/\S/.test(o.text.slice(0, s)) && (s = o.from); - let f = ["", Gx(e, h)]; - return l && f.push(Gx(e, u.lineIndent(o.from, -1))), { + let f = ["", Bx(e, h)]; + return l && f.push(Bx(e, u.lineIndent(o.from, -1))), { changes: { from: s, to: a, insert: nn.of(f) }, - range: ft.cursor(s + 1 + f[1].length) + range: ut.cursor(s + 1 + f[1].length) }; }); return r(e.update(n, { scrollIntoView: !0, userEvent: "input" })), !0; }; } -function K$(t, e) { +function W$(t, e) { let r = -1; return t.changeByRange((n) => { let i = []; @@ -14085,96 +14085,96 @@ function K$(t, e) { let s = t.changes(i); return { changes: i, - range: ft.range(s.mapPos(n.anchor, 1), s.mapPos(n.head, 1)) + range: ut.range(s.mapPos(n.anchor, 1), s.mapPos(n.head, 1)) }; }); } -const voe = ({ state: t, dispatch: e }) => { +const moe = ({ state: t, dispatch: e }) => { if (t.readOnly) return !1; - let r = /* @__PURE__ */ Object.create(null), n = new H_(t, { overrideIndentation: (s) => { + let r = /* @__PURE__ */ Object.create(null), n = new P_(t, { overrideIndentation: (s) => { let a = r[s]; return a == null ? -1 : a; - } }), i = K$(t, (s, a, o) => { - let l = Q$(n, s.from); + } }), i = W$(t, (s, a, o) => { + let l = I$(n, s.from); if (l == null) return; /\S/.test(s.text) || (l = 0); - let u = /^\s*/.exec(s.text)[0], h = Gx(t, l); + let u = /^\s*/.exec(s.text)[0], h = Bx(t, l); (u != h || o.from < s.from + u.length) && (r[s.from] = l, a.push({ from: s.from, to: s.from + u.length, insert: h })); }); return i.changes.empty || e(t.update(i, { userEvent: "indent" })), !0; -}, J$ = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(K$(t, (r, n) => { +}, Y$ = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(W$(t, (r, n) => { n.push({ from: r.from, insert: t.facet(gg) }); -}), { userEvent: "input.indent" })), !0), eB = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(K$(t, (r, n) => { +}), { userEvent: "input.indent" })), !0), G$ = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(W$(t, (r, n) => { let i = /^\s*/.exec(r.text)[0]; if (!i) return; - let s = iu(i, t.tabSize), a = 0, o = Gx(t, Math.max(0, s - yT(t))); + let s = eu(i, t.tabSize), a = 0, o = Bx(t, Math.max(0, s - nT(t))); for (; a < i.length && a < o.length && i.charCodeAt(a) == o.charCodeAt(a); ) a++; n.push({ from: r.from + a, to: r.from + i.length, insert: o.slice(a) }); -}), { userEvent: "delete.dedent" })), !0), vAe = [ - { key: "Ctrl-b", run: Z$, shift: roe, preventDefault: !0 }, - { key: "Ctrl-f", run: Yae, shift: noe }, - { key: "Ctrl-p", run: Xae, shift: aoe }, - { key: "Ctrl-n", run: jae, shift: ooe }, - { key: "Ctrl-a", run: z6e, shift: K6e }, - { key: "Ctrl-e", run: q6e, shift: J6e }, - { key: "Ctrl-d", run: uoe }, - { key: "Ctrl-h", run: p9 }, - { key: "Ctrl-k", run: sAe }, - { key: "Ctrl-Alt-h", run: foe }, - { key: "Ctrl-o", run: lAe }, - { key: "Ctrl-t", run: cAe }, - { key: "Ctrl-v", run: d9 } -], yAe = /* @__PURE__ */ [ - { key: "ArrowLeft", run: Z$, shift: roe, preventDefault: !0 }, - { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: D6e, shift: V6e, preventDefault: !0 }, - { mac: "Cmd-ArrowLeft", run: B6e, shift: j6e, preventDefault: !0 }, - { key: "ArrowRight", run: Yae, shift: noe, preventDefault: !0 }, - { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: P6e, shift: W6e, preventDefault: !0 }, - { mac: "Cmd-ArrowRight", run: F6e, shift: Z6e, preventDefault: !0 }, - { key: "ArrowUp", run: Xae, shift: aoe, preventDefault: !0 }, - { mac: "Cmd-ArrowUp", run: XW, shift: ZW }, - { mac: "Ctrl-ArrowUp", run: YW, shift: GW }, - { key: "ArrowDown", run: jae, shift: ooe, preventDefault: !0 }, - { mac: "Cmd-ArrowDown", run: jW, shift: KW }, - { mac: "Ctrl-ArrowDown", run: d9, shift: HW }, - { key: "PageUp", run: YW, shift: GW }, - { key: "PageDown", run: d9, shift: HW }, - { key: "Home", run: eoe, shift: X6e, preventDefault: !0 }, - { key: "Mod-Home", run: XW, shift: ZW }, - { key: "End", run: Jae, shift: H6e, preventDefault: !0 }, - { key: "Mod-End", run: jW, shift: KW }, - { key: "Enter", run: goe }, - { key: "Mod-a", run: eAe }, - { key: "Backspace", run: p9, shift: p9 }, - { key: "Delete", run: uoe }, - { key: "Mod-Backspace", mac: "Alt-Backspace", run: foe }, - { key: "Mod-Delete", mac: "Alt-Delete", run: iAe }, - { mac: "Mod-Backspace", run: aAe }, - { mac: "Mod-Delete", run: oAe } -].concat(/* @__PURE__ */ vAe.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), JW = /* @__PURE__ */ [ - { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: I6e, shift: Y6e }, - { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: $6e, shift: G6e }, - { key: "Alt-ArrowUp", run: uAe }, - { key: "Shift-Alt-ArrowUp", run: fAe }, - { key: "Alt-ArrowDown", run: hAe }, - { key: "Shift-Alt-ArrowDown", run: dAe }, - { key: "Escape", run: nAe }, - { key: "Mod-Enter", run: mAe }, - { key: "Alt-l", mac: "Ctrl-l", run: tAe }, - { key: "Mod-i", run: rAe, preventDefault: !0 }, - { key: "Mod-[", run: eB }, - { key: "Mod-]", run: J$ }, - { key: "Mod-Alt-\\", run: voe }, - { key: "Shift-Mod-k", run: pAe }, - { key: "Shift-Mod-\\", run: Q6e }, - { key: "Mod-/", run: d6e }, - { key: "Alt-A", run: g6e } -].concat(yAe), bAe = { key: "Tab", run: J$, shift: eB }; -function Gn() { +}), { userEvent: "delete.dedent" })), !0), CAe = [ + { key: "Ctrl-b", run: V$, shift: toe, preventDefault: !0 }, + { key: "Ctrl-f", run: Wae, shift: roe }, + { key: "Ctrl-p", run: Hae, shift: soe }, + { key: "Ctrl-n", run: Xae, shift: aoe }, + { key: "Ctrl-a", run: X6e, shift: oAe }, + { key: "Ctrl-e", run: Z6e, shift: lAe }, + { key: "Ctrl-d", run: coe }, + { key: "Ctrl-h", run: e9 }, + { key: "Ctrl-k", run: pAe }, + { key: "Ctrl-Alt-h", run: hoe }, + { key: "Ctrl-o", run: vAe }, + { key: "Ctrl-t", run: yAe }, + { key: "Ctrl-v", run: JM } +], EAe = /* @__PURE__ */ [ + { key: "ArrowLeft", run: V$, shift: toe, preventDefault: !0 }, + { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: U6e, shift: J6e, preventDefault: !0 }, + { mac: "Cmd-ArrowLeft", run: G6e, shift: sAe, preventDefault: !0 }, + { key: "ArrowRight", run: Wae, shift: roe, preventDefault: !0 }, + { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: Q6e, shift: eAe, preventDefault: !0 }, + { mac: "Cmd-ArrowRight", run: H6e, shift: aAe, preventDefault: !0 }, + { key: "ArrowUp", run: Hae, shift: soe, preventDefault: !0 }, + { mac: "Cmd-ArrowUp", run: KW, shift: eY }, + { mac: "Ctrl-ArrowUp", run: XW, shift: ZW }, + { key: "ArrowDown", run: Xae, shift: aoe, preventDefault: !0 }, + { mac: "Cmd-ArrowDown", run: JW, shift: tY }, + { mac: "Ctrl-ArrowDown", run: JM, shift: jW }, + { key: "PageUp", run: XW, shift: ZW }, + { key: "PageDown", run: JM, shift: jW }, + { key: "Home", run: Jae, shift: iAe, preventDefault: !0 }, + { key: "Mod-Home", run: KW, shift: eY }, + { key: "End", run: Kae, shift: nAe, preventDefault: !0 }, + { key: "Mod-End", run: JW, shift: tY }, + { key: "Enter", run: poe }, + { key: "Mod-a", run: cAe }, + { key: "Backspace", run: e9, shift: e9 }, + { key: "Delete", run: coe }, + { key: "Mod-Backspace", mac: "Alt-Backspace", run: hoe }, + { key: "Mod-Delete", mac: "Alt-Delete", run: dAe }, + { mac: "Mod-Backspace", run: gAe }, + { mac: "Mod-Delete", run: mAe } +].concat(/* @__PURE__ */ CAe.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), rY = /* @__PURE__ */ [ + { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: W6e, shift: tAe }, + { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: Y6e, shift: rAe }, + { key: "Alt-ArrowUp", run: bAe }, + { key: "Shift-Alt-ArrowUp", run: wAe }, + { key: "Alt-ArrowDown", run: xAe }, + { key: "Shift-Alt-ArrowDown", run: OAe }, + { key: "Escape", run: fAe }, + { key: "Mod-Enter", run: TAe }, + { key: "Alt-l", mac: "Ctrl-l", run: uAe }, + { key: "Mod-i", run: hAe, preventDefault: !0 }, + { key: "Mod-[", run: G$ }, + { key: "Mod-]", run: Y$ }, + { key: "Mod-Alt-\\", run: moe }, + { key: "Shift-Mod-k", run: kAe }, + { key: "Shift-Mod-\\", run: K6e }, + { key: "Mod-/", run: O6e }, + { key: "Alt-A", run: S6e } +].concat(EAe), _Ae = { key: "Tab", run: Y$, shift: G$ }; +function Wn() { var t = arguments[0]; typeof t == "string" && (t = document.createElement(t)); var e = 1, r = arguments[1]; @@ -14187,10 +14187,10 @@ function Gn() { e++; } for (; e < arguments.length; e++) - yoe(t, arguments[e]); + voe(t, arguments[e]); return t; } -function yoe(t, e) { +function voe(t, e) { if (typeof e == "string") t.appendChild(document.createTextNode(e)); else if (e != null) @@ -14198,14 +14198,14 @@ function yoe(t, e) { t.appendChild(e); else if (Array.isArray(e)) for (var r = 0; r < e.length; r++) - yoe(t, e[r]); + voe(t, e[r]); else throw new RangeError("Unsupported child node: " + e); } -const eY = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t; -class vv { +const nY = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t; +class dv { constructor(e, r, n = 0, i = e.length, s, a) { - this.test = a, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(n, i), this.bufferStart = n, this.normalize = s ? (o) => s(eY(o)) : eY, this.query = this.normalize(r); + this.test = a, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(n, i), this.bufferStart = n, this.normalize = s ? (o) => s(nY(o)) : nY, this.query = this.normalize(r); } peek() { if (this.bufferPos == this.buffer.length) { @@ -14213,7 +14213,7 @@ class vv { return -1; this.bufferPos = 0, this.buffer = this.iter.value; } - return Vl(this.buffer, this.bufferPos); + return Bl(this.buffer, this.bufferPos); } next() { for (; this.matches.length; ) @@ -14225,8 +14225,8 @@ class vv { let e = this.peek(); if (e < 0) return this.done = !0, this; - let r = x$(e), n = this.bufferStart + this.bufferPos; - this.bufferPos += nf(e); + let r = d$(e), n = this.bufferStart + this.bufferPos; + this.bufferPos += jh(e); let i = this.normalize(r); for (let s = 0, a = n; ; s++) { let o = i.charCodeAt(s), l = this.match(o, a); @@ -14248,17 +14248,17 @@ class vv { return this.query.charCodeAt(0) == e && (this.query.length == 1 ? n = { from: r, to: r + 1 } : this.matches.push(1, r)), n && this.test && !this.test(n.from, n.to, this.buffer, this.bufferStart) && (n = null), n; } } -typeof Symbol < "u" && (vv.prototype[Symbol.iterator] = function() { +typeof Symbol < "u" && (dv.prototype[Symbol.iterator] = function() { return this; }); -const boe = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, tB = "gm" + (/x/.unicode == null ? "" : "u"); -class rB { +const yoe = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, H$ = "gm" + (/x/.unicode == null ? "" : "u"); +class X$ { constructor(e, r, n, i = 0, s = e.length) { - if (this.text = e, this.to = s, this.curLine = "", this.done = !1, this.value = boe, /\\[sWDnr]|\n|\r|\[\^/.test(r)) - return new xoe(e, r, n, i, s); - this.re = new RegExp(r, tB + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.iter = e.iter(); + if (this.text = e, this.to = s, this.curLine = "", this.done = !1, this.value = yoe, /\\[sWDnr]|\n|\r|\[\^/.test(r)) + return new boe(e, r, n, i, s); + this.re = new RegExp(r, H$ + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.iter = e.iter(); let a = e.lineAt(i); - this.curLineStart = a.from, this.matchPos = wT(e, i), this.getLine(this.curLineStart); + this.curLineStart = a.from, this.matchPos = aT(e, i), this.getLine(this.curLineStart); } getLine(e) { this.iter.next(e), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next()); @@ -14272,7 +14272,7 @@ class rB { let r = this.matchPos <= this.to && this.re.exec(this.curLine); if (r) { let n = this.curLineStart + r.index, i = n + r[0].length; - if (this.matchPos = wT(this.text, i + (n == i ? 1 : 0)), n == this.curLineStart + this.curLine.length && this.nextLine(), (n < i || n > this.value.to) && (!this.test || this.test(n, i, r))) + if (this.matchPos = aT(this.text, i + (n == i ? 1 : 0)), n == this.curLineStart + this.curLine.length && this.nextLine(), (n < i || n > this.value.to) && (!this.test || this.test(n, i, r))) return this.value = { from: n, to: i, match: r }, this; e = this.matchPos - this.curLineStart; } else if (this.curLineStart + this.curLine.length < this.to) @@ -14282,8 +14282,8 @@ class rB { } } } -const o8 = /* @__PURE__ */ new WeakMap(); -class M1 { +const H7 = /* @__PURE__ */ new WeakMap(); +class E1 { constructor(e, r) { this.from = e, this.text = r; } @@ -14291,20 +14291,20 @@ class M1 { return this.from + this.text.length; } static get(e, r, n) { - let i = o8.get(e); + let i = H7.get(e); if (!i || i.from >= n || i.to <= r) { - let o = new M1(r, e.sliceString(r, n)); - return o8.set(e, o), o; + let o = new E1(r, e.sliceString(r, n)); + return H7.set(e, o), o; } if (i.from == r && i.to == n) return i; let { text: s, from: a } = i; - return a > r && (s = e.sliceString(r, a) + s, a = r), i.to < n && (s += e.sliceString(i.to, n)), o8.set(e, new M1(a, s)), new M1(r, s.slice(r - a, n - a)); + return a > r && (s = e.sliceString(r, a) + s, a = r), i.to < n && (s += e.sliceString(i.to, n)), H7.set(e, new E1(a, s)), new E1(r, s.slice(r - a, n - a)); } } -class xoe { +class boe { constructor(e, r, n, i, s) { - this.text = e, this.to = s, this.done = !1, this.value = boe, this.matchPos = wT(e, i), this.re = new RegExp(r, tB + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = M1.get(e, i, this.chunkEnd(i + 5e3)); + this.text = e, this.to = s, this.done = !1, this.value = yoe, this.matchPos = aT(e, i), this.re = new RegExp(r, H$ + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = E1.get(e, i, this.chunkEnd(i + 5e3)); } chunkEnd(e) { return e >= this.to ? this.to : this.text.lineAt(e).to; @@ -14315,25 +14315,25 @@ class xoe { if (r && !r[0] && r.index == e && (this.re.lastIndex = e + 1, r = this.re.exec(this.flat.text)), r) { let n = this.flat.from + r.index, i = n + r[0].length; if ((this.flat.to >= this.to || r.index + r[0].length <= this.flat.text.length - 10) && (!this.test || this.test(n, i, r))) - return this.value = { from: n, to: i, match: r }, this.matchPos = wT(this.text, i + (n == i ? 1 : 0)), this; + return this.value = { from: n, to: i, match: r }, this.matchPos = aT(this.text, i + (n == i ? 1 : 0)), this; } if (this.flat.to == this.to) return this.done = !0, this; - this.flat = M1.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2)); + this.flat = E1.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2)); } } } -typeof Symbol < "u" && (rB.prototype[Symbol.iterator] = xoe.prototype[Symbol.iterator] = function() { +typeof Symbol < "u" && (X$.prototype[Symbol.iterator] = boe.prototype[Symbol.iterator] = function() { return this; }); -function xAe(t) { +function AAe(t) { try { - return new RegExp(t, tB), !0; + return new RegExp(t, H$), !0; } catch { return !1; } } -function wT(t, e) { +function aT(t, e) { if (e >= t.length) return e; let r = t.lineAt(e), n; @@ -14341,16 +14341,16 @@ function wT(t, e) { e++; return e; } -function g9(t) { - let e = String(t.state.doc.lineAt(t.state.selection.main.head).number), r = Gn("input", { class: "cm-textfield", name: "line", value: e }), n = Gn("form", { +function t9(t) { + let e = String(t.state.doc.lineAt(t.state.selection.main.head).number), r = Wn("input", { class: "cm-textfield", name: "line", value: e }), n = Wn("form", { class: "cm-gotoLine", onkeydown: (s) => { - s.keyCode == 27 ? (s.preventDefault(), t.dispatch({ effects: OT.of(!1) }), t.focus()) : s.keyCode == 13 && (s.preventDefault(), i()); + s.keyCode == 27 ? (s.preventDefault(), t.dispatch({ effects: oT.of(!1) }), t.focus()) : s.keyCode == 13 && (s.preventDefault(), i()); }, onsubmit: (s) => { s.preventDefault(), i(); } - }, Gn("label", t.state.phrase("Go to line"), ": ", r), " ", Gn("button", { class: "cm-button", type: "submit" }, t.state.phrase("go"))); + }, Wn("label", t.state.phrase("Go to line"), ": ", r), " ", Wn("button", { class: "cm-button", type: "submit" }, t.state.phrase("go"))); function i() { let s = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(r.value); if (!s) @@ -14361,62 +14361,62 @@ function g9(t) { l && (v = v * (l == "-" ? -1 : 1) + o.number / a.doc.lines), p = Math.round(a.doc.lines * v); } else u && l && (p = p * (l == "-" ? -1 : 1) + o.number); - let g = a.doc.line(Math.max(1, Math.min(a.doc.lines, p))), m = ft.cursor(g.from + Math.max(0, Math.min(d, g.length))); + let g = a.doc.line(Math.max(1, Math.min(a.doc.lines, p))), m = ut.cursor(g.from + Math.max(0, Math.min(d, g.length))); t.dispatch({ - effects: [OT.of(!1), Mt.scrollIntoView(m.from, { y: "center" })], + effects: [oT.of(!1), Rt.scrollIntoView(m.from, { y: "center" })], selection: m }), t.focus(); } return { dom: n }; } -const OT = /* @__PURE__ */ _r.define(), tY = /* @__PURE__ */ ai.define({ +const oT = /* @__PURE__ */ Tr.define(), iY = /* @__PURE__ */ ii.define({ create() { return !0; }, update(t, e) { for (let r of e.effects) - r.is(OT) && (t = r.value); + r.is(oT) && (t = r.value); return t; }, - provide: (t) => pg.from(t, (e) => e ? g9 : null) -}), wAe = (t) => { - let e = Qx(t, g9); + provide: (t) => pg.from(t, (e) => e ? t9 : null) +}), RAe = (t) => { + let e = Px(t, t9); if (!e) { - let r = [OT.of(!0)]; - t.state.field(tY, !1) == null && r.push(_r.appendConfig.of([tY, OAe])), t.dispatch({ effects: r }), e = Qx(t, g9); + let r = [oT.of(!0)]; + t.state.field(iY, !1) == null && r.push(Tr.appendConfig.of([iY, LAe])), t.dispatch({ effects: r }), e = Px(t, t9); } return e && e.dom.querySelector("input").select(), !0; -}, OAe = /* @__PURE__ */ Mt.baseTheme({ +}, LAe = /* @__PURE__ */ Rt.baseTheme({ ".cm-panel.cm-gotoLine": { padding: "2px 6px 4px", "& label": { fontSize: "80%" } } -}), kAe = { +}), MAe = { highlightWordAroundCursor: !1, minSelectionLength: 1, maxMatches: 100, wholeWords: !1 -}, woe = /* @__PURE__ */ Gt.define({ +}, xoe = /* @__PURE__ */ Yt.define({ combine(t) { - return Th(t, kAe, { + return wh(t, MAe, { highlightWordAroundCursor: (e, r) => e || r, minSelectionLength: Math.min, maxMatches: Math.min }); } }); -function SAe(t) { - let e = [AAe, _Ae]; - return t && e.push(woe.of(t)), e; +function DAe(t) { + let e = [BAe, $Ae]; + return t && e.push(xoe.of(t)), e; } -const TAe = /* @__PURE__ */ Ht.mark({ class: "cm-selectionMatch" }), CAe = /* @__PURE__ */ Ht.mark({ class: "cm-selectionMatch cm-selectionMatch-main" }); -function rY(t, e, r, n) { - return (r == 0 || t(e.sliceDoc(r - 1, r)) != li.Word) && (n == e.doc.length || t(e.sliceDoc(n, n + 1)) != li.Word); +const PAe = /* @__PURE__ */ Gt.mark({ class: "cm-selectionMatch" }), NAe = /* @__PURE__ */ Gt.mark({ class: "cm-selectionMatch cm-selectionMatch-main" }); +function sY(t, e, r, n) { + return (r == 0 || t(e.sliceDoc(r - 1, r)) != ai.Word) && (n == e.doc.length || t(e.sliceDoc(n, n + 1)) != ai.Word); } -function EAe(t, e, r, n) { - return t(e.sliceDoc(r, r + 1)) == li.Word && t(e.sliceDoc(n - 1, n)) == li.Word; +function IAe(t, e, r, n) { + return t(e.sliceDoc(r, r + 1)) == ai.Word && t(e.sliceDoc(n - 1, n)) == ai.Word; } -const _Ae = /* @__PURE__ */ fn.fromClass(class { +const $Ae = /* @__PURE__ */ hn.fromClass(class { constructor(t) { this.decorations = this.getDeco(t); } @@ -14424,54 +14424,54 @@ const _Ae = /* @__PURE__ */ fn.fromClass(class { (t.selectionSet || t.docChanged || t.viewportChanged) && (this.decorations = this.getDeco(t.view)); } getDeco(t) { - let e = t.state.facet(woe), { state: r } = t, n = r.selection; + let e = t.state.facet(xoe), { state: r } = t, n = r.selection; if (n.ranges.length > 1) - return Ht.none; + return Gt.none; let i = n.main, s, a = null; if (i.empty) { if (!e.highlightWordAroundCursor) - return Ht.none; + return Gt.none; let l = r.wordAt(i.head); if (!l) - return Ht.none; + return Gt.none; a = r.charCategorizer(i.head), s = r.sliceDoc(l.from, l.to); } else { let l = i.to - i.from; if (l < e.minSelectionLength || l > 200) - return Ht.none; + return Gt.none; if (e.wholeWords) { - if (s = r.sliceDoc(i.from, i.to), a = r.charCategorizer(i.head), !(rY(a, r, i.from, i.to) && EAe(a, r, i.from, i.to))) - return Ht.none; + if (s = r.sliceDoc(i.from, i.to), a = r.charCategorizer(i.head), !(sY(a, r, i.from, i.to) && IAe(a, r, i.from, i.to))) + return Gt.none; } else if (s = r.sliceDoc(i.from, i.to).trim(), !s) - return Ht.none; + return Gt.none; } let o = []; for (let l of t.visibleRanges) { - let u = new vv(r.doc, s, l.from, l.to); + let u = new dv(r.doc, s, l.from, l.to); for (; !u.next().done; ) { let { from: h, to: f } = u.value; - if ((!a || rY(a, r, h, f)) && (i.empty && h <= i.from && f >= i.to ? o.push(CAe.range(h, f)) : (h >= i.to || f <= i.from) && o.push(TAe.range(h, f)), o.length > e.maxMatches)) - return Ht.none; + if ((!a || sY(a, r, h, f)) && (i.empty && h <= i.from && f >= i.to ? o.push(NAe.range(h, f)) : (h >= i.to || f <= i.from) && o.push(PAe.range(h, f)), o.length > e.maxMatches)) + return Gt.none; } } - return Ht.set(o); + return Gt.set(o); } }, { decorations: (t) => t.decorations -}), AAe = /* @__PURE__ */ Mt.baseTheme({ +}), BAe = /* @__PURE__ */ Rt.baseTheme({ ".cm-selectionMatch": { backgroundColor: "#99ff7780" }, ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" } -}), RAe = ({ state: t, dispatch: e }) => { - let { selection: r } = t, n = ft.create(r.ranges.map((i) => t.wordAt(i.head) || ft.cursor(i.head)), r.mainIndex); +}), FAe = ({ state: t, dispatch: e }) => { + let { selection: r } = t, n = ut.create(r.ranges.map((i) => t.wordAt(i.head) || ut.cursor(i.head)), r.mainIndex); return n.eq(r) ? !1 : (e(t.update({ selection: n })), !0); }; -function LAe(t, e) { +function zAe(t, e) { let { main: r, ranges: n } = t.selection, i = t.wordAt(r.head), s = i && i.from == r.from && i.to == r.to; - for (let a = !1, o = new vv(t.doc, e, n[n.length - 1].to); ; ) + for (let a = !1, o = new dv(t.doc, e, n[n.length - 1].to); ; ) if (o.next(), o.done) { if (a) return null; - o = new vv(t.doc, e, 0, Math.max(0, n[n.length - 1].from - 1)), a = !0; + o = new dv(t.doc, e, 0, Math.max(0, n[n.length - 1].from - 1)), a = !0; } else { if (a && n.some((l) => l.from == o.value.from)) continue; @@ -14483,34 +14483,34 @@ function LAe(t, e) { return o.value; } } -const MAe = ({ state: t, dispatch: e }) => { +const qAe = ({ state: t, dispatch: e }) => { let { ranges: r } = t.selection; if (r.some((s) => s.from === s.to)) - return RAe({ state: t, dispatch: e }); + return FAe({ state: t, dispatch: e }); let n = t.sliceDoc(r[0].from, r[0].to); if (t.selection.ranges.some((s) => t.sliceDoc(s.from, s.to) != n)) return !1; - let i = LAe(t, n); + let i = zAe(t, n); return i ? (e(t.update({ - selection: t.selection.addRange(ft.range(i.from, i.to), !1), - effects: Mt.scrollIntoView(i.to) + selection: t.selection.addRange(ut.range(i.from, i.to), !1), + effects: Rt.scrollIntoView(i.to) })), !0) : !1; -}, Py = /* @__PURE__ */ Gt.define({ +}, Ly = /* @__PURE__ */ Yt.define({ combine(t) { - return Th(t, { + return wh(t, { top: !1, caseSensitive: !1, literal: !1, regexp: !1, wholeWord: !1, - createPanel: (e) => new VAe(e), - scrollToMatch: (e) => Mt.scrollIntoView(e) + createPanel: (e) => new JAe(e), + scrollToMatch: (e) => Rt.scrollIntoView(e) }); } }); -class nB { +class Z$ { constructor(e) { - this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp || xAe(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord; + this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp || AAe(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord; } unquote(e) { return this.literal ? e : e.replace(/\\([nrt\\])/g, (r, n) => n == "n" ? ` @@ -14520,35 +14520,35 @@ class nB { return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord; } create() { - return this.regexp ? new IAe(this) : new PAe(this); + return this.regexp ? new WAe(this) : new QAe(this); } getCursor(e, r = 0, n) { let i = e.doc ? e : qr.create({ doc: e }); - return n == null && (n = i.doc.length), this.regexp ? r1(this, i, r, n) : t1(this, i, r, n); + return n == null && (n = i.doc.length), this.regexp ? Zm(this, i, r, n) : Xm(this, i, r, n); } } -class Ooe { +class woe { constructor(e) { this.spec = e; } } -function t1(t, e, r, n) { - return new vv(e.doc, t.unquoted, r, n, t.caseSensitive ? void 0 : (i) => i.toLowerCase(), t.wholeWord ? DAe(e.doc, e.charCategorizer(e.selection.main.head)) : void 0); +function Xm(t, e, r, n) { + return new dv(e.doc, t.unquoted, r, n, t.caseSensitive ? void 0 : (i) => i.toLowerCase(), t.wholeWord ? UAe(e.doc, e.charCategorizer(e.selection.main.head)) : void 0); } -function DAe(t, e) { - return (r, n, i, s) => ((s > r || s + i.length < n) && (s = Math.max(0, r - 2), i = t.sliceString(s, Math.min(t.length, n + 2))), (e(kT(i, r - s)) != li.Word || e(ST(i, r - s)) != li.Word) && (e(ST(i, n - s)) != li.Word || e(kT(i, n - s)) != li.Word)); +function UAe(t, e) { + return (r, n, i, s) => ((s > r || s + i.length < n) && (s = Math.max(0, r - 2), i = t.sliceString(s, Math.min(t.length, n + 2))), (e(lT(i, r - s)) != ai.Word || e(cT(i, r - s)) != ai.Word) && (e(cT(i, n - s)) != ai.Word || e(lT(i, n - s)) != ai.Word)); } -class PAe extends Ooe { +class QAe extends woe { constructor(e) { super(e); } nextMatch(e, r, n) { - let i = t1(this.spec, e, n, e.doc.length).nextOverlapping(); - return i.done && (i = t1(this.spec, e, 0, r).nextOverlapping()), i.done ? null : i.value; + let i = Xm(this.spec, e, n, e.doc.length).nextOverlapping(); + return i.done && (i = Xm(this.spec, e, 0, r).nextOverlapping()), i.done ? null : i.value; } prevMatchInRange(e, r, n) { for (let i = n; ; ) { - let s = Math.max(r, i - 1e4 - this.spec.unquoted.length), a = t1(this.spec, e, s, i), o = null; + let s = Math.max(r, i - 1e4 - this.spec.unquoted.length), a = Xm(this.spec, e, s, i), o = null; for (; !a.nextOverlapping().done; ) o = a.value; if (o) @@ -14565,7 +14565,7 @@ class PAe extends Ooe { return this.spec.unquote(this.spec.replace); } matchAll(e, r) { - let n = t1(this.spec, e, 0, e.doc.length), i = []; + let n = Xm(this.spec, e, 0, e.doc.length), i = []; for (; !n.next().done; ) { if (i.length >= r) return null; @@ -14574,34 +14574,34 @@ class PAe extends Ooe { return i; } highlight(e, r, n, i) { - let s = t1(this.spec, e, Math.max(0, r - this.spec.unquoted.length), Math.min(n + this.spec.unquoted.length, e.doc.length)); + let s = Xm(this.spec, e, Math.max(0, r - this.spec.unquoted.length), Math.min(n + this.spec.unquoted.length, e.doc.length)); for (; !s.next().done; ) i(s.value.from, s.value.to); } } -function r1(t, e, r, n) { - return new rB(e.doc, t.search, { +function Zm(t, e, r, n) { + return new X$(e.doc, t.search, { ignoreCase: !t.caseSensitive, - test: t.wholeWord ? NAe(e.charCategorizer(e.selection.main.head)) : void 0 + test: t.wholeWord ? VAe(e.charCategorizer(e.selection.main.head)) : void 0 }, r, n); } -function kT(t, e) { - return t.slice(oa(t, e, !1), e); +function lT(t, e) { + return t.slice(ra(t, e, !1), e); } -function ST(t, e) { - return t.slice(e, oa(t, e)); +function cT(t, e) { + return t.slice(e, ra(t, e)); } -function NAe(t) { - return (e, r, n) => !n[0].length || (t(kT(n.input, n.index)) != li.Word || t(ST(n.input, n.index)) != li.Word) && (t(ST(n.input, n.index + n[0].length)) != li.Word || t(kT(n.input, n.index + n[0].length)) != li.Word); +function VAe(t) { + return (e, r, n) => !n[0].length || (t(lT(n.input, n.index)) != ai.Word || t(cT(n.input, n.index)) != ai.Word) && (t(cT(n.input, n.index + n[0].length)) != ai.Word || t(lT(n.input, n.index + n[0].length)) != ai.Word); } -class IAe extends Ooe { +class WAe extends woe { nextMatch(e, r, n) { - let i = r1(this.spec, e, n, e.doc.length).next(); - return i.done && (i = r1(this.spec, e, 0, r).next()), i.done ? null : i.value; + let i = Zm(this.spec, e, n, e.doc.length).next(); + return i.done && (i = Zm(this.spec, e, 0, r).next()), i.done ? null : i.value; } prevMatchInRange(e, r, n) { for (let i = 1; ; i++) { - let s = Math.max(r, n - i * 1e4), a = r1(this.spec, e, s, n), o = null; + let s = Math.max(r, n - i * 1e4), a = Zm(this.spec, e, s, n), o = null; for (; !a.next().done; ) o = a.value; if (o && (s == r || o.from > s + 10)) @@ -14617,7 +14617,7 @@ class IAe extends Ooe { return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g, (r, n) => n == "$" ? "$" : n == "&" ? e.match[0] : n != "0" && +n < e.match.length ? e.match[n] : r); } matchAll(e, r) { - let n = r1(this.spec, e, 0, e.doc.length), i = []; + let n = Zm(this.spec, e, 0, e.doc.length), i = []; for (; !n.next().done; ) { if (i.length >= r) return null; @@ -14626,46 +14626,46 @@ class IAe extends Ooe { return i; } highlight(e, r, n, i) { - let s = r1(this.spec, e, Math.max(0, r - 250), Math.min(n + 250, e.doc.length)); + let s = Zm(this.spec, e, Math.max(0, r - 250), Math.min(n + 250, e.doc.length)); for (; !s.next().done; ) i(s.value.from, s.value.to); } } -const hp = /* @__PURE__ */ _r.define(), iB = /* @__PURE__ */ _r.define(), Ud = /* @__PURE__ */ ai.define({ +const up = /* @__PURE__ */ Tr.define(), j$ = /* @__PURE__ */ Tr.define(), Bd = /* @__PURE__ */ ii.define({ create(t) { - return new l8(m9(t).create(), null); + return new X7(r9(t).create(), null); }, update(t, e) { for (let r of e.effects) - r.is(hp) ? t = new l8(r.value.create(), t.panel) : r.is(iB) && (t = new l8(t.query, r.value ? sB : null)); + r.is(up) ? t = new X7(r.value.create(), t.panel) : r.is(j$) && (t = new X7(t.query, r.value ? K$ : null)); return t; }, provide: (t) => pg.from(t, (e) => e.panel) }); -class l8 { +class X7 { constructor(e, r) { this.query = e, this.panel = r; } } -const $Ae = /* @__PURE__ */ Ht.mark({ class: "cm-searchMatch" }), BAe = /* @__PURE__ */ Ht.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), FAe = /* @__PURE__ */ fn.fromClass(class { +const YAe = /* @__PURE__ */ Gt.mark({ class: "cm-searchMatch" }), GAe = /* @__PURE__ */ Gt.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), HAe = /* @__PURE__ */ hn.fromClass(class { constructor(t) { - this.view = t, this.decorations = this.highlight(t.state.field(Ud)); + this.view = t, this.decorations = this.highlight(t.state.field(Bd)); } update(t) { - let e = t.state.field(Ud); - (e != t.startState.field(Ud) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e)); + let e = t.state.field(Bd); + (e != t.startState.field(Bd) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e)); } highlight({ query: t, panel: e }) { if (!e || !t.spec.valid) - return Ht.none; - let { view: r } = this, n = new rs(); + return Gt.none; + let { view: r } = this, n = new es(); for (let i = 0, s = r.visibleRanges, a = s.length; i < a; i++) { let { from: o, to: l } = s[i]; for (; i < a - 1 && l > s[i + 1].from - 2 * 250; ) l = s[++i].to; t.highlight(r.state, o, l, (u, h) => { let f = r.state.selection.ranges.some((d) => d.from == u && d.to == h); - n.add(u, h, f ? BAe : $Ae); + n.add(u, h, f ? GAe : YAe); }); } return n.finish(); @@ -14673,53 +14673,53 @@ const $Ae = /* @__PURE__ */ Ht.mark({ class: "cm-searchMatch" }), BAe = /* @__PU }, { decorations: (t) => t.decorations }); -function wk(t) { +function dk(t) { return (e) => { - let r = e.state.field(Ud, !1); - return r && r.query.spec.valid ? t(e, r) : Toe(e); + let r = e.state.field(Bd, !1); + return r && r.query.spec.valid ? t(e, r) : Soe(e); }; } -const TT = /* @__PURE__ */ wk((t, { query: e }) => { +const uT = /* @__PURE__ */ dk((t, { query: e }) => { let { to: r } = t.state.selection.main, n = e.nextMatch(t.state, r, r); if (!n) return !1; - let i = ft.single(n.from, n.to), s = t.state.facet(Py); + let i = ut.single(n.from, n.to), s = t.state.facet(Ly); return t.dispatch({ selection: i, - effects: [aB(t, n), s.scrollToMatch(i.main, t)], + effects: [J$(t, n), s.scrollToMatch(i.main, t)], userEvent: "select.search" - }), Soe(t), !0; -}), CT = /* @__PURE__ */ wk((t, { query: e }) => { + }), koe(t), !0; +}), hT = /* @__PURE__ */ dk((t, { query: e }) => { let { state: r } = t, { from: n } = r.selection.main, i = e.prevMatch(r, n, n); if (!i) return !1; - let s = ft.single(i.from, i.to), a = t.state.facet(Py); + let s = ut.single(i.from, i.to), a = t.state.facet(Ly); return t.dispatch({ selection: s, - effects: [aB(t, i), a.scrollToMatch(s.main, t)], + effects: [J$(t, i), a.scrollToMatch(s.main, t)], userEvent: "select.search" - }), Soe(t), !0; -}), zAe = /* @__PURE__ */ wk((t, { query: e }) => { + }), koe(t), !0; +}), XAe = /* @__PURE__ */ dk((t, { query: e }) => { let r = e.matchAll(t.state, 1e3); return !r || !r.length ? !1 : (t.dispatch({ - selection: ft.create(r.map((n) => ft.range(n.from, n.to))), + selection: ut.create(r.map((n) => ut.range(n.from, n.to))), userEvent: "select.search.matches" }), !0); -}), qAe = ({ state: t, dispatch: e }) => { +}), ZAe = ({ state: t, dispatch: e }) => { let r = t.selection; if (r.ranges.length > 1 || r.main.empty) return !1; let { from: n, to: i } = r.main, s = [], a = 0; - for (let o = new vv(t.doc, t.sliceDoc(n, i)); !o.next().done; ) { + for (let o = new dv(t.doc, t.sliceDoc(n, i)); !o.next().done; ) { if (s.length > 1e3) return !1; - o.value.from == n && (a = s.length), s.push(ft.range(o.value.from, o.value.to)); + o.value.from == n && (a = s.length), s.push(ut.range(o.value.from, o.value.to)); } return e(t.update({ - selection: ft.create(s, a), + selection: ut.create(s, a), userEvent: "select.search.matches" })), !0; -}, nY = /* @__PURE__ */ wk((t, { query: e }) => { +}, aY = /* @__PURE__ */ dk((t, { query: e }) => { let { state: r } = t, { from: n, to: i } = r.selection.main; if (r.readOnly) return !1; @@ -14727,9 +14727,9 @@ const TT = /* @__PURE__ */ wk((t, { query: e }) => { if (!s) return !1; let a = [], o, l, u = []; - if (s.from == n && s.to == i && (l = r.toText(e.getReplacement(s)), a.push({ from: s.from, to: s.to, insert: l }), s = e.nextMatch(r, s.from, s.to), u.push(Mt.announce.of(r.phrase("replaced match on line $", r.doc.lineAt(n).number) + "."))), s) { + if (s.from == n && s.to == i && (l = r.toText(e.getReplacement(s)), a.push({ from: s.from, to: s.to, insert: l }), s = e.nextMatch(r, s.from, s.to), u.push(Rt.announce.of(r.phrase("replaced match on line $", r.doc.lineAt(n).number) + "."))), s) { let h = a.length == 0 || a[0].from >= s.to ? 0 : s.to - s.from - l.length; - o = ft.single(s.from - h, s.to - h), u.push(aB(t, s)), u.push(r.facet(Py).scrollToMatch(o.main, t)); + o = ut.single(s.from - h, s.to - h), u.push(J$(t, s)), u.push(r.facet(Ly).scrollToMatch(o.main, t)); } return t.dispatch({ changes: a, @@ -14737,7 +14737,7 @@ const TT = /* @__PURE__ */ wk((t, { query: e }) => { effects: u, userEvent: "input.replace" }), !0; -}), UAe = /* @__PURE__ */ wk((t, { query: e }) => { +}), jAe = /* @__PURE__ */ dk((t, { query: e }) => { if (t.state.readOnly) return !1; let r = e.matchAll(t.state, 1e9).map((i) => { @@ -14749,20 +14749,20 @@ const TT = /* @__PURE__ */ wk((t, { query: e }) => { let n = t.state.phrase("replaced $ matches", r.length) + "."; return t.dispatch({ changes: r, - effects: Mt.announce.of(n), + effects: Rt.announce.of(n), userEvent: "input.replace.all" }), !0; }); -function sB(t) { - return t.state.facet(Py).createPanel(t); +function K$(t) { + return t.state.facet(Ly).createPanel(t); } -function m9(t, e) { +function r9(t, e) { var r, n, i, s, a; let o = t.selection.main, l = o.empty || o.to > o.from + 100 ? "" : t.sliceDoc(o.from, o.to); if (e && !l) return e; - let u = t.facet(Py); - return new nB({ + let u = t.facet(Ly); + return new Z$({ search: ((r = e == null ? void 0 : e.literal) !== null && r !== void 0 ? r : u.literal) ? l : l.replace(/\n/g, "\\n"), caseSensitive: (n = e == null ? void 0 : e.caseSensitive) !== null && n !== void 0 ? n : u.caseSensitive, literal: (i = e == null ? void 0 : e.literal) !== null && i !== void 0 ? i : u.literal, @@ -14770,79 +14770,79 @@ function m9(t, e) { wholeWord: (a = e == null ? void 0 : e.wholeWord) !== null && a !== void 0 ? a : u.wholeWord }); } -function koe(t) { - let e = Qx(t, sB); +function Ooe(t) { + let e = Px(t, K$); return e && e.dom.querySelector("[main-field]"); } -function Soe(t) { - let e = koe(t); +function koe(t) { + let e = Ooe(t); e && e == t.root.activeElement && e.select(); } -const Toe = (t) => { - let e = t.state.field(Ud, !1); +const Soe = (t) => { + let e = t.state.field(Bd, !1); if (e && e.panel) { - let r = koe(t); + let r = Ooe(t); if (r && r != t.root.activeElement) { - let n = m9(t.state, e.query.spec); - n.valid && t.dispatch({ effects: hp.of(n) }), r.focus(), r.select(); + let n = r9(t.state, e.query.spec); + n.valid && t.dispatch({ effects: up.of(n) }), r.focus(), r.select(); } } else t.dispatch({ effects: [ - iB.of(!0), - e ? hp.of(m9(t.state, e.query.spec)) : _r.appendConfig.of(YAe) + j$.of(!0), + e ? up.of(r9(t.state, e.query.spec)) : Tr.appendConfig.of(t7e) ] }); return !0; -}, Coe = (t) => { - let e = t.state.field(Ud, !1); +}, Toe = (t) => { + let e = t.state.field(Bd, !1); if (!e || !e.panel) return !1; - let r = Qx(t, sB); - return r && r.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: iB.of(!1) }), !0; -}, QAe = [ - { key: "Mod-f", run: Toe, scope: "editor search-panel" }, - { key: "F3", run: TT, shift: CT, scope: "editor search-panel", preventDefault: !0 }, - { key: "Mod-g", run: TT, shift: CT, scope: "editor search-panel", preventDefault: !0 }, - { key: "Escape", run: Coe, scope: "editor search-panel" }, - { key: "Mod-Shift-l", run: qAe }, - { key: "Mod-Alt-g", run: wAe }, - { key: "Mod-d", run: MAe, preventDefault: !0 } + let r = Px(t, K$); + return r && r.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: j$.of(!1) }), !0; +}, KAe = [ + { key: "Mod-f", run: Soe, scope: "editor search-panel" }, + { key: "F3", run: uT, shift: hT, scope: "editor search-panel", preventDefault: !0 }, + { key: "Mod-g", run: uT, shift: hT, scope: "editor search-panel", preventDefault: !0 }, + { key: "Escape", run: Toe, scope: "editor search-panel" }, + { key: "Mod-Shift-l", run: ZAe }, + { key: "Mod-Alt-g", run: RAe }, + { key: "Mod-d", run: qAe, preventDefault: !0 } ]; -class VAe { +class JAe { constructor(e) { this.view = e; - let r = this.query = e.state.field(Ud).query.spec; - this.commit = this.commit.bind(this), this.searchField = Gn("input", { + let r = this.query = e.state.field(Bd).query.spec; + this.commit = this.commit.bind(this), this.searchField = Wn("input", { value: r.search, - placeholder: al(e, "Find"), - "aria-label": al(e, "Find"), + placeholder: rl(e, "Find"), + "aria-label": rl(e, "Find"), class: "cm-textfield", name: "search", form: "", "main-field": "true", onchange: this.commit, onkeyup: this.commit - }), this.replaceField = Gn("input", { + }), this.replaceField = Wn("input", { value: r.replace, - placeholder: al(e, "Replace"), - "aria-label": al(e, "Replace"), + placeholder: rl(e, "Replace"), + "aria-label": rl(e, "Replace"), class: "cm-textfield", name: "replace", form: "", onchange: this.commit, onkeyup: this.commit - }), this.caseField = Gn("input", { + }), this.caseField = Wn("input", { type: "checkbox", name: "case", form: "", checked: r.caseSensitive, onchange: this.commit - }), this.reField = Gn("input", { + }), this.reField = Wn("input", { type: "checkbox", name: "re", form: "", checked: r.regexp, onchange: this.commit - }), this.wordField = Gn("input", { + }), this.wordField = Wn("input", { type: "checkbox", name: "word", form: "", @@ -14850,47 +14850,47 @@ class VAe { onchange: this.commit }); function n(i, s, a) { - return Gn("button", { class: "cm-button", name: i, onclick: s, type: "button" }, a); + return Wn("button", { class: "cm-button", name: i, onclick: s, type: "button" }, a); } - this.dom = Gn("div", { onkeydown: (i) => this.keydown(i), class: "cm-search" }, [ + this.dom = Wn("div", { onkeydown: (i) => this.keydown(i), class: "cm-search" }, [ this.searchField, - n("next", () => TT(e), [al(e, "next")]), - n("prev", () => CT(e), [al(e, "previous")]), - n("select", () => zAe(e), [al(e, "all")]), - Gn("label", null, [this.caseField, al(e, "match case")]), - Gn("label", null, [this.reField, al(e, "regexp")]), - Gn("label", null, [this.wordField, al(e, "by word")]), + n("next", () => uT(e), [rl(e, "next")]), + n("prev", () => hT(e), [rl(e, "previous")]), + n("select", () => XAe(e), [rl(e, "all")]), + Wn("label", null, [this.caseField, rl(e, "match case")]), + Wn("label", null, [this.reField, rl(e, "regexp")]), + Wn("label", null, [this.wordField, rl(e, "by word")]), ...e.state.readOnly ? [] : [ - Gn("br"), + Wn("br"), this.replaceField, - n("replace", () => nY(e), [al(e, "replace")]), - n("replaceAll", () => UAe(e), [al(e, "replace all")]) + n("replace", () => aY(e), [rl(e, "replace")]), + n("replaceAll", () => jAe(e), [rl(e, "replace all")]) ], - Gn("button", { + Wn("button", { name: "close", - onclick: () => Coe(e), - "aria-label": al(e, "close"), + onclick: () => Toe(e), + "aria-label": rl(e, "close"), type: "button" }, ["\xD7"]) ]); } commit() { - let e = new nB({ + let e = new Z$({ search: this.searchField.value, caseSensitive: this.caseField.checked, regexp: this.reField.checked, wholeWord: this.wordField.checked, replace: this.replaceField.value }); - e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: hp.of(e) })); + e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: up.of(e) })); } keydown(e) { - cEe(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? CT : TT)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), nY(this.view)); + yEe(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? hT : uT)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), aY(this.view)); } update(e) { for (let r of e.transactions) for (let n of r.effects) - n.is(hp) && !n.value.eq(this.query) && this.setQuery(n.value); + n.is(up) && !n.value.eq(this.query) && this.setQuery(n.value); } setQuery(e) { this.query = e, this.searchField.value = e.search, this.replaceField.value = e.replace, this.caseField.checked = e.caseSensitive, this.reField.checked = e.regexp, this.wordField.checked = e.wholeWord; @@ -14902,32 +14902,32 @@ class VAe { return 80; } get top() { - return this.view.state.facet(Py).top; + return this.view.state.facet(Ly).top; } } -function al(t, e) { +function rl(t, e) { return t.state.phrase(e); } -const lS = 30, cS = /[\s\.,:;?!]/; -function aB(t, { from: e, to: r }) { - let n = t.state.doc.lineAt(e), i = t.state.doc.lineAt(r).to, s = Math.max(n.from, e - lS), a = Math.min(i, r + lS), o = t.state.sliceDoc(s, a); +const Z4 = 30, j4 = /[\s\.,:;?!]/; +function J$(t, { from: e, to: r }) { + let n = t.state.doc.lineAt(e), i = t.state.doc.lineAt(r).to, s = Math.max(n.from, e - Z4), a = Math.min(i, r + Z4), o = t.state.sliceDoc(s, a); if (s != n.from) { - for (let l = 0; l < lS; l++) - if (!cS.test(o[l + 1]) && cS.test(o[l])) { + for (let l = 0; l < Z4; l++) + if (!j4.test(o[l + 1]) && j4.test(o[l])) { o = o.slice(l); break; } } if (a != i) { - for (let l = o.length - 1; l > o.length - lS; l--) - if (!cS.test(o[l - 1]) && cS.test(o[l])) { + for (let l = o.length - 1; l > o.length - Z4; l--) + if (!j4.test(o[l - 1]) && j4.test(o[l])) { o = o.slice(0, l); break; } } - return Mt.announce.of(`${t.state.phrase("current match")}. ${o} ${t.state.phrase("on line")} ${n.number}.`); + return Rt.announce.of(`${t.state.phrase("current match")}. ${o} ${t.state.phrase("on line")} ${n.number}.`); } -const WAe = /* @__PURE__ */ Mt.baseTheme({ +const e7e = /* @__PURE__ */ Rt.baseTheme({ ".cm-panel.cm-search": { padding: "2px 6px 4px", position: "relative", @@ -14956,17 +14956,17 @@ const WAe = /* @__PURE__ */ Mt.baseTheme({ "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" }, "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" }, "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" } -}), YAe = [ - Ud, - /* @__PURE__ */ qa.low(FAe), - WAe +}), t7e = [ + Bd, + /* @__PURE__ */ za.low(HAe), + e7e ]; -class e6 { +class z_ { constructor(e, r, n, i) { this.state = e, this.pos = r, this.explicit = n, this.view = i, this.abortListeners = [], this.abortOnDocChange = !1; } tokenBefore(e) { - let r = Qn(this.state).resolveInner(this.pos, -1); + let r = Un(this.state).resolveInner(this.pos, -1); for (; r && e.indexOf(r.name) < 0; ) r = r.parent; return r ? { @@ -14977,7 +14977,7 @@ class e6 { } : null; } matchBefore(e) { - let r = this.state.doc.lineAt(this.pos), n = Math.max(r.from, this.pos - 250), i = r.text.slice(n - r.from, this.pos - r.from), s = i.search(_oe(e, !1)); + let r = this.state.doc.lineAt(this.pos), n = Math.max(r.from, this.pos - 250), i = r.text.slice(n - r.from, this.pos - r.from), s = i.search(Eoe(e, !1)); return s < 0 ? null : { from: n + s, to: this.pos, text: i.slice(s) }; } get aborted() { @@ -14987,30 +14987,30 @@ class e6 { e == "abort" && this.abortListeners && (this.abortListeners.push(r), n && n.onDocChange && (this.abortOnDocChange = !0)); } } -function iY(t) { +function oY(t) { let e = Object.keys(t).join(""), r = /\w/.test(e); return r && (e = e.replace(/\w/g, "")), `[${r ? "\\w" : ""}${e.replace(/[^\w\s]/g, "\\$&")}]`; } -function GAe(t) { +function r7e(t) { let e = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null); for (let { label: i } of t) { e[i[0]] = !0; for (let s = 1; s < i.length; s++) r[i[s]] = !0; } - let n = iY(e) + iY(r) + "*$"; + let n = oY(e) + oY(r) + "*$"; return [new RegExp("^" + n), new RegExp(n)]; } -function Eoe(t) { - let e = t.map((i) => typeof i == "string" ? { label: i } : i), [r, n] = e.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : GAe(e); +function Coe(t) { + let e = t.map((i) => typeof i == "string" ? { label: i } : i), [r, n] = e.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : r7e(e); return (i) => { let s = i.matchBefore(n); return s || i.explicit ? { from: s ? s.from : i.pos, options: e, validFor: r } : null; }; } -function HAe(t, e) { +function n7e(t, e) { return (r) => { - for (let n = Qn(r.state).resolveInner(r.pos, -1); n; n = n.parent) { + for (let n = Un(r.state).resolveInner(r.pos, -1); n; n = n.parent) { if (t.indexOf(n.name) > -1) return null; if (n.type.isTop) @@ -15019,7 +15019,7 @@ function HAe(t, e) { return e(r); }; } -class sY { +class lY { constructor(e, r, n, i) { this.completion = e, this.source = r, this.match = n, this.score = i; } @@ -15027,13 +15027,13 @@ class sY { function K0(t) { return t.selection.main.from; } -function _oe(t, e) { +function Eoe(t, e) { var r; let { source: n } = t, i = e && n[0] != "^", s = n[n.length - 1] != "$"; return !i && !s ? t : new RegExp(`${i ? "^" : ""}(?:${n})${s ? "$" : ""}`, (r = t.flags) !== null && r !== void 0 ? r : t.ignoreCase ? "i" : ""); } -const oB = /* @__PURE__ */ bo.define(); -function XAe(t, e, r, n) { +const eB = /* @__PURE__ */ vo.define(); +function i7e(t, e, r, n) { let { main: i } = t.selection, s = r - i.from, a = n - i.from; return Object.assign(Object.assign({}, t.changeByRange((o) => { if (o != i && r != n && t.sliceDoc(o.from + s, o.from + a) != t.sliceDoc(r, n)) @@ -15041,26 +15041,26 @@ function XAe(t, e, r, n) { let l = t.toText(e); return { changes: { from: o.from + s, to: n == i.from ? o.to : o.from + a, insert: l }, - range: ft.cursor(o.from + s + l.length) + range: ut.cursor(o.from + s + l.length) }; })), { scrollIntoView: !0, userEvent: "input.complete" }); } -const aY = /* @__PURE__ */ new WeakMap(); -function jAe(t) { +const cY = /* @__PURE__ */ new WeakMap(); +function s7e(t) { if (!Array.isArray(t)) return t; - let e = aY.get(t); - return e || aY.set(t, e = Eoe(t)), e; + let e = cY.get(t); + return e || cY.set(t, e = Coe(t)), e; } -const ET = /* @__PURE__ */ _r.define(), jx = /* @__PURE__ */ _r.define(); -class ZAe { +const fT = /* @__PURE__ */ Tr.define(), qx = /* @__PURE__ */ Tr.define(); +class a7e { constructor(e) { this.pattern = e, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = [], this.score = 0, this.matched = []; for (let r = 0; r < e.length; ) { - let n = Vl(e, r), i = nf(n); + let n = Bl(e, r), i = jh(n); this.chars.push(n); let s = e.slice(r, r + i), a = s.toUpperCase(); - this.folded.push(Vl(a == s ? s.toLowerCase() : a, 0)), r += i; + this.folded.push(Bl(a == s ? s.toLowerCase() : a, 0)), r += i; } this.astral = e.length != this.chars.length; } @@ -15074,7 +15074,7 @@ class ZAe { return null; let { chars: r, folded: n, any: i, precise: s, byWord: a } = this; if (r.length == 1) { - let b = Vl(e, 0), w = nf(b), O = w == e.length ? 0 : -100; + let b = Bl(e, 0), w = jh(b), O = w == e.length ? 0 : -100; if (b != r[0]) if (b == n[0]) O += -200; @@ -15088,31 +15088,31 @@ class ZAe { let l = r.length, u = 0; if (o < 0) { for (let b = 0, w = Math.min(e.length, 200); b < w && u < l; ) { - let O = Vl(e, b); - (O == r[u] || O == n[u]) && (i[u++] = b), b += nf(O); + let O = Bl(e, b); + (O == r[u] || O == n[u]) && (i[u++] = b), b += jh(O); } if (u < l) return null; } let h = 0, f = 0, d = !1, p = 0, g = -1, m = -1, v = /[a-z]/.test(e), y = !0; for (let b = 0, w = Math.min(e.length, 200), O = 0; b < w && f < l; ) { - let S = Vl(e, b); + let S = Bl(e, b); o < 0 && (h < l && S == r[h] && (s[h++] = b), p < l && (S == r[p] || S == n[p] ? (p == 0 && (g = b), m = b + 1, p++) : p = 0)); - let C, T = S < 255 ? S >= 48 && S <= 57 || S >= 97 && S <= 122 ? 2 : S >= 65 && S <= 90 ? 1 : 0 : (C = x$(S)) != C.toLowerCase() ? 1 : C != C.toUpperCase() ? 2 : 0; - (!b || T == 1 && v || O == 0 && T != 0) && (r[f] == S || n[f] == S && (d = !0) ? a[f++] = b : a.length && (y = !1)), O = T, b += nf(S); + let C, T = S < 255 ? S >= 48 && S <= 57 || S >= 97 && S <= 122 ? 2 : S >= 65 && S <= 90 ? 1 : 0 : (C = d$(S)) != C.toLowerCase() ? 1 : C != C.toUpperCase() ? 2 : 0; + (!b || T == 1 && v || O == 0 && T != 0) && (r[f] == S || n[f] == S && (d = !0) ? a[f++] = b : a.length && (y = !1)), O = T, b += jh(S); } return f == l && a[0] == 0 && y ? this.result(-100 + (d ? -200 : 0), a, e) : p == l && g == 0 ? this.ret(-200 - e.length + (m == e.length ? 0 : -100), [0, m]) : o > -1 ? this.ret(-700 - e.length, [o, o + this.pattern.length]) : p == l ? this.ret(-200 + -700 - e.length, [g, m]) : f == l ? this.result(-100 + (d ? -200 : 0) + -700 + (y ? 0 : -1100), a, e) : r.length == 2 ? null : this.result((i[0] ? -700 : 0) + -200 + -1100, i, e); } result(e, r, n) { let i = [], s = 0; for (let a of r) { - let o = a + (this.astral ? nf(Vl(n, a)) : 1); + let o = a + (this.astral ? jh(Bl(n, a)) : 1); s && i[s - 1] == a ? i[s - 1] = o : (i[s++] = a, i[s++] = o); } return this.ret(e - n.length, i); } } -class KAe { +class o7e { constructor(e) { this.pattern = e, this.matched = [], this.score = 0, this.folded = e.toLowerCase(); } @@ -15123,9 +15123,9 @@ class KAe { return n == null ? null : (this.matched = [0, r.length], this.score = n + (e.length == this.pattern.length ? 0 : -100), this); } } -const Is = /* @__PURE__ */ Gt.define({ +const Ps = /* @__PURE__ */ Yt.define({ combine(t) { - return Th(t, { + return wh(t, { activateOnTyping: !0, activateOnCompletion: () => !1, activateOnTypingDelay: 100, @@ -15139,7 +15139,7 @@ const Is = /* @__PURE__ */ Gt.define({ aboveCursor: !1, icons: !0, addToOptions: [], - positionInfo: JAe, + positionInfo: l7e, filterStrict: !1, compareCompletions: (e, r) => e.label.localeCompare(r.label), interactionDelay: 75, @@ -15148,18 +15148,18 @@ const Is = /* @__PURE__ */ Gt.define({ defaultKeymap: (e, r) => e && r, closeOnBlur: (e, r) => e && r, icons: (e, r) => e && r, - tooltipClass: (e, r) => (n) => oY(e(n), r(n)), - optionClass: (e, r) => (n) => oY(e(n), r(n)), + tooltipClass: (e, r) => (n) => uY(e(n), r(n)), + optionClass: (e, r) => (n) => uY(e(n), r(n)), addToOptions: (e, r) => e.concat(r), filterStrict: (e, r) => e || r }); } }); -function oY(t, e) { +function uY(t, e) { return t ? e ? t + " " + e : t : e; } -function JAe(t, e, r, n, i, s) { - let a = t.textDirection == Xn.RTL, o = a, l = !1, u = "top", h, f, d = e.left - i.left, p = i.right - e.right, g = n.right - n.left, m = n.bottom - n.top; +function l7e(t, e, r, n, i, s) { + let a = t.textDirection == Gn.RTL, o = a, l = !1, u = "top", h, f, d = e.left - i.left, p = i.right - e.right, g = n.right - n.left, m = n.bottom - n.top; if (o && d < Math.min(g, p) ? o = !1 : !o && p < Math.min(g, d) && (o = !0), g <= (o ? d : p)) h = Math.max(i.top, Math.min(r.top, i.bottom - m)) - e.top, f = Math.min(400, o ? d : p); else { @@ -15173,7 +15173,7 @@ function JAe(t, e, r, n, i, s) { class: "cm-completionInfo-" + (l ? a ? "left-narrow" : "right-narrow" : o ? "left" : "right") }; } -function e7e(t) { +function c7e(t) { let e = t.addToOptions.slice(); return t.icons && e.push({ render(r) { @@ -15205,7 +15205,7 @@ function e7e(t) { position: 80 }), e.sort((r, n) => r.position - n.position).map((r) => r.render); } -function c8(t, e, r) { +function Z7(t, e, r) { if (t <= r) return { from: 0, to: t }; if (e < 0 && (e = 0), e <= t >> 1) { @@ -15215,15 +15215,15 @@ function c8(t, e, r) { let n = Math.floor((t - e) / r); return { from: t - (n + 1) * r, to: t - n * r }; } -class t7e { +class u7e { constructor(e, r, n) { this.view = e, this.stateField = r, this.applyCompletion = n, this.info = null, this.infoDestroy = null, this.placeInfoReq = { read: () => this.measureInfo(), write: (l) => this.placeInfo(l), key: this }, this.space = null, this.currentClass = ""; - let i = e.state.field(r), { options: s, selected: a } = i.open, o = e.state.facet(Is); - this.optionContent = e7e(o), this.optionClass = o.optionClass, this.tooltipClass = o.tooltipClass, this.range = c8(s.length, a, o.maxRenderedOptions), this.dom = document.createElement("div"), this.dom.className = "cm-tooltip-autocomplete", this.updateTooltipClass(e.state), this.dom.addEventListener("mousedown", (l) => { + let i = e.state.field(r), { options: s, selected: a } = i.open, o = e.state.facet(Ps); + this.optionContent = c7e(o), this.optionClass = o.optionClass, this.tooltipClass = o.tooltipClass, this.range = Z7(s.length, a, o.maxRenderedOptions), this.dom = document.createElement("div"), this.dom.className = "cm-tooltip-autocomplete", this.updateTooltipClass(e.state), this.dom.addEventListener("mousedown", (l) => { let { options: u } = e.state.field(r).open; for (let h = l.target, f; h && h != this.dom; h = h.parentNode) if (h.nodeName == "LI" && (f = /-(\d+)$/.exec(h.id)) && +f[1] < u.length) { @@ -15232,7 +15232,7 @@ class t7e { } }), this.dom.addEventListener("focusout", (l) => { let u = e.state.field(this.stateField, !1); - u && u.tooltip && e.state.facet(Is).closeOnBlur && l.relatedTarget != e.contentDOM && e.dispatch({ effects: jx.of(null) }); + u && u.tooltip && e.state.facet(Ps).closeOnBlur && l.relatedTarget != e.contentDOM && e.dispatch({ effects: qx.of(null) }); }), this.showOptions(s, i.id); } mount() { @@ -15248,7 +15248,7 @@ class t7e { let n = e.state.field(this.stateField), i = e.startState.field(this.stateField); if (this.updateTooltipClass(e.state), n != i) { let { options: s, selected: a, disabled: o } = n.open; - (!i.open || i.open.options != s) && (this.range = c8(s.length, a, e.state.facet(Is).maxRenderedOptions), this.showOptions(s, n.id)), this.updateSel(), o != ((r = i.open) === null || r === void 0 ? void 0 : r.disabled) && this.dom.classList.toggle("cm-tooltip-autocomplete-disabled", !!o); + (!i.open || i.open.options != s) && (this.range = Z7(s.length, a, e.state.facet(Ps).maxRenderedOptions), this.showOptions(s, n.id)), this.updateSel(), o != ((r = i.open) === null || r === void 0 ? void 0 : r.disabled) && this.dom.classList.toggle("cm-tooltip-autocomplete-disabled", !!o); } } updateTooltipClass(e) { @@ -15266,7 +15266,7 @@ class t7e { } updateSel() { let e = this.view.state.field(this.stateField), r = e.open; - if ((r.selected > -1 && r.selected < this.range.from || r.selected >= this.range.to) && (this.range = c8(r.options.length, r.selected, this.view.state.facet(Is).maxRenderedOptions), this.showOptions(r.options, e.id)), this.updateSelectedOption(r.selected)) { + if ((r.selected > -1 && r.selected < this.range.from || r.selected >= this.range.to) && (this.range = Z7(r.options.length, r.selected, this.view.state.facet(Ps).maxRenderedOptions), this.showOptions(r.options, e.id)), this.updateSelectedOption(r.selected)) { this.destroyInfo(); let { completion: n } = r.options[r.selected], { info: i } = n; if (!i) @@ -15276,7 +15276,7 @@ class t7e { return; "then" in s ? s.then((a) => { a && this.view.state.field(this.stateField, !1) == e && this.addInfoPane(a, n); - }).catch((a) => Wo(this.view.state, a, "completion info")) : this.addInfoPane(s, n); + }).catch((a) => qo(this.view.state, a, "completion info")) : this.addInfoPane(s, n); } } addInfoPane(e, r) { @@ -15294,7 +15294,7 @@ class t7e { let r = null; for (let n = this.list.firstChild, i = this.range.from; n; n = n.nextSibling, i++) n.nodeName != "LI" || !n.id ? i-- : i == e ? n.hasAttribute("aria-selected") || (n.setAttribute("aria-selected", "true"), r = n) : n.hasAttribute("aria-selected") && n.removeAttribute("aria-selected"); - return r && n7e(this.list, r), r; + return r && f7e(this.list, r), r; } measureInfo() { let e = this.dom.querySelector("[aria-selected]"); @@ -15305,7 +15305,7 @@ class t7e { let a = this.dom.ownerDocument.defaultView || window; s = { left: 0, top: 0, right: a.innerWidth, bottom: a.innerHeight }; } - return i.top > Math.min(s.bottom, r.bottom) - 10 || i.bottom < Math.max(s.top, r.top) + 10 ? null : this.view.state.facet(Is).positionInfo(this.view, r, i, n, s, this.dom); + return i.top > Math.min(s.bottom, r.bottom) - 10 || i.bottom < Math.max(s.top, r.top) + 10 ? null : this.view.state.facet(Ps).positionInfo(this.view, r, i, n, s, this.dom); } placeInfo(e) { this.info && (e ? (e.style && (this.info.style.cssText = e.style), this.info.className = "cm-tooltip cm-completionInfo " + (e.class || "")) : this.info.style.cssText = "top: -1e6px"); @@ -15344,17 +15344,17 @@ class t7e { this.destroyInfo(); } } -function r7e(t, e) { - return (r) => new t7e(r, t, e); +function h7e(t, e) { + return (r) => new u7e(r, t, e); } -function n7e(t, e) { +function f7e(t, e) { let r = t.getBoundingClientRect(), n = e.getBoundingClientRect(), i = r.height / t.offsetHeight; n.top < r.top ? t.scrollTop -= (r.top - n.top) / i : n.bottom > r.bottom && (t.scrollTop += (n.bottom - r.bottom) / i); } -function lY(t) { +function hY(t) { return (t.boost || 0) * 100 + (t.apply ? 10 : 0) + (t.info ? 5 : 0) + (t.type ? 1 : 0); } -function i7e(t, e) { +function d7e(t, e) { let r = [], n = null, i = (u) => { r.push(u); let { section: h } = u.completion; @@ -15363,19 +15363,19 @@ function i7e(t, e) { let f = typeof h == "string" ? h : h.name; n.some((d) => d.name == f) || n.push(typeof h == "string" ? { name: f } : h); } - }, s = e.facet(Is); + }, s = e.facet(Ps); for (let u of t) if (u.hasResult()) { let h = u.result.getMatch; if (u.result.filter === !1) for (let f of u.result.options) - i(new sY(f, u.source, h ? h(f) : [], 1e9 - r.length)); + i(new lY(f, u.source, h ? h(f) : [], 1e9 - r.length)); else { - let f = e.sliceDoc(u.from, u.to), d, p = s.filterStrict ? new KAe(f) : new ZAe(f); + let f = e.sliceDoc(u.from, u.to), d, p = s.filterStrict ? new o7e(f) : new a7e(f); for (let g of u.result.options) if (d = p.match(g.label)) { let m = g.displayLabel ? h ? h(g, d.matched) : [] : d.matched; - i(new sY(g, u.source, m, d.score + (g.boost || 0))); + i(new lY(g, u.source, m, d.score + (g.boost || 0))); } } } @@ -15394,24 +15394,24 @@ function i7e(t, e) { let a = [], o = null, l = s.compareCompletions; for (let u of r.sort((h, f) => f.score - h.score || l(h.completion, f.completion))) { let h = u.completion; - !o || o.label != h.label || o.detail != h.detail || o.type != null && h.type != null && o.type != h.type || o.apply != h.apply || o.boost != h.boost ? a.push(u) : lY(u.completion) > lY(o) && (a[a.length - 1] = u), o = u.completion; + !o || o.label != h.label || o.detail != h.detail || o.type != null && h.type != null && o.type != h.type || o.apply != h.apply || o.boost != h.boost ? a.push(u) : hY(u.completion) > hY(o) && (a[a.length - 1] = u), o = u.completion; } return a; } -class p1 { +class c1 { constructor(e, r, n, i, s, a) { this.options = e, this.attrs = r, this.tooltip = n, this.timestamp = i, this.selected = s, this.disabled = a; } setSelected(e, r) { - return e == this.selected || e >= this.options.length ? this : new p1(this.options, cY(r, e), this.tooltip, this.timestamp, e, this.disabled); + return e == this.selected || e >= this.options.length ? this : new c1(this.options, fY(r, e), this.tooltip, this.timestamp, e, this.disabled); } static build(e, r, n, i, s, a) { if (i && !a && e.some((u) => u.isPending)) return i.setDisabled(); - let o = i7e(e, r); + let o = d7e(e, r); if (!o.length) return i && e.some((u) => u.isPending) ? i.setDisabled() : null; - let l = r.facet(Is).selectOnOpen ? 0 : -1; + let l = r.facet(Ps).selectOnOpen ? 0 : -1; if (i && i.selected != l && i.selected != -1) { let u = i.options[i.selected].completion; for (let h = 0; h < o.length; h++) @@ -15420,43 +15420,43 @@ class p1 { break; } } - return new p1(o, cY(n, l), { + return new c1(o, fY(n, l), { pos: e.reduce((u, h) => h.hasResult() ? Math.min(u, h.from) : u, 1e8), - create: u7e, + create: b7e, above: s.aboveCursor }, i ? i.timestamp : Date.now(), l, !1); } map(e) { - return new p1(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: e.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled); + return new c1(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: e.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled); } setDisabled() { - return new p1(this.options, this.attrs, this.tooltip, this.timestamp, this.selected, !0); + return new c1(this.options, this.attrs, this.tooltip, this.timestamp, this.selected, !0); } } -class _T { +class dT { constructor(e, r, n) { this.active = e, this.id = r, this.open = n; } static start() { - return new _T(l7e, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null); + return new dT(v7e, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null); } update(e) { - let { state: r } = e, n = r.facet(Is), s = (n.override || r.languageDataAt("autocomplete", K0(r)).map(jAe)).map((l) => (this.active.find((h) => h.source == l) || new ec(l, this.active.some((h) => h.state != 0) ? 1 : 0)).update(e, n)); + let { state: r } = e, n = r.facet(Ps), s = (n.override || r.languageDataAt("autocomplete", K0(r)).map(s7e)).map((l) => (this.active.find((h) => h.source == l) || new Hl(l, this.active.some((h) => h.state != 0) ? 1 : 0)).update(e, n)); s.length == this.active.length && s.every((l, u) => l == this.active[u]) && (s = this.active); - let a = this.open, o = e.effects.some((l) => l.is(lB)); - a && e.docChanged && (a = a.map(e.changes)), e.selection || s.some((l) => l.hasResult() && e.changes.touchesRange(l.from, l.to)) || !s7e(s, this.active) || o ? a = p1.build(s, r, this.id, a, n, o) : a && a.disabled && !s.some((l) => l.isPending) && (a = null), !a && s.every((l) => !l.isPending) && s.some((l) => l.hasResult()) && (s = s.map((l) => l.hasResult() ? new ec(l.source, 0) : l)); + let a = this.open, o = e.effects.some((l) => l.is(tB)); + a && e.docChanged && (a = a.map(e.changes)), e.selection || s.some((l) => l.hasResult() && e.changes.touchesRange(l.from, l.to)) || !p7e(s, this.active) || o ? a = c1.build(s, r, this.id, a, n, o) : a && a.disabled && !s.some((l) => l.isPending) && (a = null), !a && s.every((l) => !l.isPending) && s.some((l) => l.hasResult()) && (s = s.map((l) => l.hasResult() ? new Hl(l.source, 0) : l)); for (let l of e.effects) - l.is(Roe) && (a = a && a.setSelected(l.value, this.id)); - return s == this.active && a == this.open ? this : new _T(s, this.id, a); + l.is(Aoe) && (a = a && a.setSelected(l.value, this.id)); + return s == this.active && a == this.open ? this : new dT(s, this.id, a); } get tooltip() { return this.open ? this.open.tooltip : null; } get attrs() { - return this.open ? this.open.attrs : this.active.length ? a7e : o7e; + return this.open ? this.open.attrs : this.active.length ? g7e : m7e; } } -function s7e(t, e) { +function p7e(t, e) { if (t == e) return !0; for (let r = 0, n = 0; ; ) { @@ -15471,10 +15471,10 @@ function s7e(t, e) { return !1; } } -const a7e = { +const g7e = { "aria-autocomplete": "list" -}, o7e = {}; -function cY(t, e) { +}, m7e = {}; +function fY(t, e) { let r = { "aria-autocomplete": "list", "aria-haspopup": "listbox", @@ -15482,17 +15482,17 @@ function cY(t, e) { }; return e > -1 && (r["aria-activedescendant"] = t + "-" + e), r; } -const l7e = []; -function Aoe(t, e) { +const v7e = []; +function _oe(t, e) { if (t.isUserEvent("input.complete")) { - let n = t.annotation(oB); + let n = t.annotation(eB); if (n && e.activateOnCompletion(n)) return 12; } let r = t.isUserEvent("input.type"); return r && e.activateOnTyping ? 5 : r ? 1 : t.isUserEvent("delete.backward") ? 2 : t.selection ? 8 : t.docChanged ? 16 : 0; } -class ec { +class Hl { constructor(e, r, n = !1) { this.source = e, this.state = r, this.explicit = n; } @@ -15503,14 +15503,14 @@ class ec { return this.state == 1; } update(e, r) { - let n = Aoe(e, r), i = this; - (n & 8 || n & 16 && this.touches(e)) && (i = new ec(i.source, 0)), n & 4 && i.state == 0 && (i = new ec(this.source, 1)), i = i.updateFor(e, n); + let n = _oe(e, r), i = this; + (n & 8 || n & 16 && this.touches(e)) && (i = new Hl(i.source, 0)), n & 4 && i.state == 0 && (i = new Hl(this.source, 1)), i = i.updateFor(e, n); for (let s of e.effects) - if (s.is(ET)) - i = new ec(i.source, 1, s.value); - else if (s.is(jx)) - i = new ec(i.source, 0); - else if (s.is(lB)) + if (s.is(fT)) + i = new Hl(i.source, 1, s.value); + else if (s.is(qx)) + i = new Hl(i.source, 0); + else if (s.is(tB)) for (let a of s.value) a.source == i.source && (i = a); return i; @@ -15525,7 +15525,7 @@ class ec { return e.changes.touchesRange(K0(e.state)); } } -class D1 extends ec { +class _1 extends Hl { constructor(e, r, n, i, s, a) { super(e, 3, r), this.limit = n, this.result = i, this.from = s, this.to = a; } @@ -15540,96 +15540,96 @@ class D1 extends ec { i.map && !e.changes.empty && (i = i.map(i, e.changes)); let s = e.changes.mapPos(this.from), a = e.changes.mapPos(this.to, 1), o = K0(e.state); if (o > a || !i || r & 2 && (K0(e.startState) == this.from || o < this.limit)) - return new ec(this.source, r & 4 ? 1 : 0); + return new Hl(this.source, r & 4 ? 1 : 0); let l = e.changes.mapPos(this.limit); - return c7e(i.validFor, e.state, s, a) ? new D1(this.source, this.explicit, l, i, s, a) : i.update && (i = i.update(i, s, a, new e6(e.state, o, !1))) ? new D1(this.source, this.explicit, l, i, i.from, (n = i.to) !== null && n !== void 0 ? n : K0(e.state)) : new ec(this.source, 1, this.explicit); + return y7e(i.validFor, e.state, s, a) ? new _1(this.source, this.explicit, l, i, s, a) : i.update && (i = i.update(i, s, a, new z_(e.state, o, !1))) ? new _1(this.source, this.explicit, l, i, i.from, (n = i.to) !== null && n !== void 0 ? n : K0(e.state)) : new Hl(this.source, 1, this.explicit); } map(e) { - return e.empty ? this : (this.result.map ? this.result.map(this.result, e) : this.result) ? new D1(this.source, this.explicit, e.mapPos(this.limit), this.result, e.mapPos(this.from), e.mapPos(this.to, 1)) : new ec(this.source, 0); + return e.empty ? this : (this.result.map ? this.result.map(this.result, e) : this.result) ? new _1(this.source, this.explicit, e.mapPos(this.limit), this.result, e.mapPos(this.from), e.mapPos(this.to, 1)) : new Hl(this.source, 0); } touches(e) { return e.changes.touchesRange(this.from, this.to); } } -function c7e(t, e, r, n) { +function y7e(t, e, r, n) { if (!t) return !1; let i = e.sliceDoc(r, n); - return typeof t == "function" ? t(i, r, n, e) : _oe(t, !0).test(i); + return typeof t == "function" ? t(i, r, n, e) : Eoe(t, !0).test(i); } -const lB = /* @__PURE__ */ _r.define({ +const tB = /* @__PURE__ */ Tr.define({ map(t, e) { return t.map((r) => r.map(e)); } -}), Roe = /* @__PURE__ */ _r.define(), Po = /* @__PURE__ */ ai.define({ +}), Aoe = /* @__PURE__ */ Tr.define(), Lo = /* @__PURE__ */ ii.define({ create() { - return _T.start(); + return dT.start(); }, update(t, e) { return t.update(e); }, provide: (t) => [ - N$.from(t, (e) => e.tooltip), - Mt.contentAttributes.from(t, (e) => e.attrs) + _$.from(t, (e) => e.tooltip), + Rt.contentAttributes.from(t, (e) => e.attrs) ] }); -function cB(t, e) { +function rB(t, e) { const r = e.completion.apply || e.completion.label; - let n = t.state.field(Po).active.find((i) => i.source == e.source); - return n instanceof D1 ? (typeof r == "string" ? t.dispatch(Object.assign(Object.assign({}, XAe(t.state, r, n.from, n.to)), { annotations: oB.of(e.completion) })) : r(t, e.completion, n.from, n.to), !0) : !1; + let n = t.state.field(Lo).active.find((i) => i.source == e.source); + return n instanceof _1 ? (typeof r == "string" ? t.dispatch(Object.assign(Object.assign({}, i7e(t.state, r, n.from, n.to)), { annotations: eB.of(e.completion) })) : r(t, e.completion, n.from, n.to), !0) : !1; } -const u7e = /* @__PURE__ */ r7e(Po, cB); -function uS(t, e = "option") { +const b7e = /* @__PURE__ */ h7e(Lo, rB); +function K4(t, e = "option") { return (r) => { - let n = r.state.field(Po, !1); - if (!n || !n.open || n.open.disabled || Date.now() - n.open.timestamp < r.state.facet(Is).interactionDelay) + let n = r.state.field(Lo, !1); + if (!n || !n.open || n.open.disabled || Date.now() - n.open.timestamp < r.state.facet(Ps).interactionDelay) return !1; let i = 1, s; - e == "page" && (s = dae(r, n.open.tooltip)) && (i = Math.max(2, Math.floor(s.dom.offsetHeight / s.dom.querySelector("li").offsetHeight) - 1)); + e == "page" && (s = fae(r, n.open.tooltip)) && (i = Math.max(2, Math.floor(s.dom.offsetHeight / s.dom.querySelector("li").offsetHeight) - 1)); let { length: a } = n.open.options, o = n.open.selected > -1 ? n.open.selected + i * (t ? 1 : -1) : t ? 0 : a - 1; - return o < 0 ? o = e == "page" ? 0 : a - 1 : o >= a && (o = e == "page" ? a - 1 : 0), r.dispatch({ effects: Roe.of(o) }), !0; + return o < 0 ? o = e == "page" ? 0 : a - 1 : o >= a && (o = e == "page" ? a - 1 : 0), r.dispatch({ effects: Aoe.of(o) }), !0; }; } -const Loe = (t) => { - let e = t.state.field(Po, !1); - return t.state.readOnly || !e || !e.open || e.open.selected < 0 || e.open.disabled || Date.now() - e.open.timestamp < t.state.facet(Is).interactionDelay ? !1 : cB(t, e.open.options[e.open.selected]); -}, uY = (t) => t.state.field(Po, !1) ? (t.dispatch({ effects: ET.of(!0) }), !0) : !1, h7e = (t) => { - let e = t.state.field(Po, !1); - return !e || !e.active.some((r) => r.state != 0) ? !1 : (t.dispatch({ effects: jx.of(null) }), !0); +const Roe = (t) => { + let e = t.state.field(Lo, !1); + return t.state.readOnly || !e || !e.open || e.open.selected < 0 || e.open.disabled || Date.now() - e.open.timestamp < t.state.facet(Ps).interactionDelay ? !1 : rB(t, e.open.options[e.open.selected]); +}, dY = (t) => t.state.field(Lo, !1) ? (t.dispatch({ effects: fT.of(!0) }), !0) : !1, x7e = (t) => { + let e = t.state.field(Lo, !1); + return !e || !e.active.some((r) => r.state != 0) ? !1 : (t.dispatch({ effects: qx.of(null) }), !0); }; -class f7e { +class w7e { constructor(e, r) { this.active = e, this.context = r, this.time = Date.now(), this.updates = [], this.done = void 0; } } -const d7e = 50, p7e = 1e3, g7e = /* @__PURE__ */ fn.fromClass(class { +const O7e = 50, k7e = 1e3, S7e = /* @__PURE__ */ hn.fromClass(class { constructor(t) { this.view = t, this.debounceUpdate = -1, this.running = [], this.debounceAccept = -1, this.pendingStart = !1, this.composing = 0; - for (let e of t.state.field(Po).active) + for (let e of t.state.field(Lo).active) e.isPending && this.startQuery(e); } update(t) { - let e = t.state.field(Po), r = t.state.facet(Is); - if (!t.selectionSet && !t.docChanged && t.startState.field(Po) == e) + let e = t.state.field(Lo), r = t.state.facet(Ps); + if (!t.selectionSet && !t.docChanged && t.startState.field(Lo) == e) return; let n = t.transactions.some((s) => { - let a = Aoe(s, r); + let a = _oe(s, r); return a & 8 || (s.selection || s.docChanged) && !(a & 3); }); for (let s = 0; s < this.running.length; s++) { let a = this.running[s]; - if (n || a.context.abortOnDocChange && t.docChanged || a.updates.length + t.transactions.length > d7e && Date.now() - a.time > p7e) { + if (n || a.context.abortOnDocChange && t.docChanged || a.updates.length + t.transactions.length > O7e && Date.now() - a.time > k7e) { for (let o of a.context.abortListeners) try { o(); } catch (l) { - Wo(this.view.state, l); + qo(this.view.state, l); } a.context.abortListeners = null, this.running.splice(s--, 1); } else a.updates.push(...t.transactions); } - this.debounceUpdate > -1 && clearTimeout(this.debounceUpdate), t.transactions.some((s) => s.effects.some((a) => a.is(ET))) && (this.pendingStart = !0); + this.debounceUpdate > -1 && clearTimeout(this.debounceUpdate), t.transactions.some((s) => s.effects.some((a) => a.is(fT))) && (this.pendingStart = !0); let i = this.pendingStart ? 50 : r.activateOnTypingDelay; if (this.debounceUpdate = e.active.some((s) => s.isPending && !this.running.some((a) => a.active.source == s.source)) ? setTimeout(() => this.startUpdate(), i) : -1, this.composing != 0) for (let s of t.transactions) @@ -15637,32 +15637,32 @@ const d7e = 50, p7e = 1e3, g7e = /* @__PURE__ */ fn.fromClass(class { } startUpdate() { this.debounceUpdate = -1, this.pendingStart = !1; - let { state: t } = this.view, e = t.field(Po); + let { state: t } = this.view, e = t.field(Lo); for (let r of e.active) r.isPending && !this.running.some((n) => n.active.source == r.source) && this.startQuery(r); - this.running.length && e.open && e.open.disabled && (this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(Is).updateSyncTime)); + this.running.length && e.open && e.open.disabled && (this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(Ps).updateSyncTime)); } startQuery(t) { - let { state: e } = this.view, r = K0(e), n = new e6(e, r, t.explicit, this.view), i = new f7e(t, n); + let { state: e } = this.view, r = K0(e), n = new z_(e, r, t.explicit, this.view), i = new w7e(t, n); this.running.push(i), Promise.resolve(t.source(n)).then((s) => { i.context.aborted || (i.done = s || null, this.scheduleAccept()); }, (s) => { - this.view.dispatch({ effects: jx.of(null) }), Wo(this.view.state, s); + this.view.dispatch({ effects: qx.of(null) }), qo(this.view.state, s); }); } scheduleAccept() { - this.running.every((t) => t.done !== void 0) ? this.accept() : this.debounceAccept < 0 && (this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(Is).updateSyncTime)); + this.running.every((t) => t.done !== void 0) ? this.accept() : this.debounceAccept < 0 && (this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(Ps).updateSyncTime)); } accept() { var t; this.debounceAccept > -1 && clearTimeout(this.debounceAccept), this.debounceAccept = -1; - let e = [], r = this.view.state.facet(Is), n = this.view.state.field(Po); + let e = [], r = this.view.state.facet(Ps), n = this.view.state.field(Lo); for (let i = 0; i < this.running.length; i++) { let s = this.running[i]; if (s.done === void 0) continue; if (this.running.splice(i--, 1), s.done) { - let o = K0(s.updates.length ? s.updates[0].startState : this.view.state), l = Math.min(o, s.done.from + (s.active.explicit ? 0 : 1)), u = new D1(s.active.source, s.active.explicit, l, s.done, s.done.from, (t = s.done.to) !== null && t !== void 0 ? t : o); + let o = K0(s.updates.length ? s.updates[0].startState : this.view.state), l = Math.min(o, s.done.from + (s.active.explicit ? 0 : 1)), u = new _1(s.active.source, s.active.explicit, l, s.done, s.done.from, (t = s.done.to) !== null && t !== void 0 ? t : o); for (let h of s.updates) u = u.update(h, r); if (u.hasResult()) { @@ -15673,40 +15673,40 @@ const d7e = 50, p7e = 1e3, g7e = /* @__PURE__ */ fn.fromClass(class { let a = n.active.find((o) => o.source == s.active.source); if (a && a.isPending) if (s.done == null) { - let o = new ec(s.active.source, 0); + let o = new Hl(s.active.source, 0); for (let l of s.updates) o = o.update(l, r); o.isPending || e.push(o); } else this.startQuery(a); } - (e.length || n.open && n.open.disabled) && this.view.dispatch({ effects: lB.of(e) }); + (e.length || n.open && n.open.disabled) && this.view.dispatch({ effects: tB.of(e) }); } }, { eventHandlers: { blur(t) { - let e = this.view.state.field(Po, !1); - if (e && e.tooltip && this.view.state.facet(Is).closeOnBlur) { - let r = e.open && dae(this.view, e.open.tooltip); - (!r || !r.dom.contains(t.relatedTarget)) && setTimeout(() => this.view.dispatch({ effects: jx.of(null) }), 10); + let e = this.view.state.field(Lo, !1); + if (e && e.tooltip && this.view.state.facet(Ps).closeOnBlur) { + let r = e.open && fae(this.view, e.open.tooltip); + (!r || !r.dom.contains(t.relatedTarget)) && setTimeout(() => this.view.dispatch({ effects: qx.of(null) }), 10); } }, compositionstart() { this.composing = 1; }, compositionend() { - this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: ET.of(!1) }), 20), this.composing = 0; + this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: fT.of(!1) }), 20), this.composing = 0; } } -}), m7e = typeof navigator == "object" && /* @__PURE__ */ /Win/.test(navigator.platform), v7e = /* @__PURE__ */ qa.highest(/* @__PURE__ */ Mt.domEventHandlers({ +}), T7e = typeof navigator == "object" && /* @__PURE__ */ /Win/.test(navigator.platform), C7e = /* @__PURE__ */ za.highest(/* @__PURE__ */ Rt.domEventHandlers({ keydown(t, e) { - let r = e.state.field(Po, !1); - if (!r || !r.open || r.open.disabled || r.open.selected < 0 || t.key.length > 1 || t.ctrlKey && !(m7e && t.altKey) || t.metaKey) + let r = e.state.field(Lo, !1); + if (!r || !r.open || r.open.disabled || r.open.selected < 0 || t.key.length > 1 || t.ctrlKey && !(T7e && t.altKey) || t.metaKey) return !1; let n = r.open.options[r.open.selected], i = r.active.find((a) => a.source == n.source), s = n.completion.commitCharacters || i.result.commitCharacters; - return s && s.indexOf(t.key) > -1 && cB(e, n), !1; + return s && s.indexOf(t.key) > -1 && rB(e, n), !1; } -})), Moe = /* @__PURE__ */ Mt.baseTheme({ +})), Loe = /* @__PURE__ */ Rt.baseTheme({ ".cm-tooltip.cm-tooltip-autocomplete": { "& > ul": { fontFamily: "monospace", @@ -15829,21 +15829,21 @@ const d7e = 50, p7e = 1e3, g7e = /* @__PURE__ */ fn.fromClass(class { "&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" } } }); -class y7e { +class E7e { constructor(e, r, n, i) { this.field = e, this.line = r, this.from = n, this.to = i; } } -class uB { +class nB { constructor(e, r, n) { this.field = e, this.from = r, this.to = n; } map(e) { - let r = e.mapPos(this.from, -1, gi.TrackDel), n = e.mapPos(this.to, 1, gi.TrackDel); - return r == null || n == null ? null : new uB(this.field, r, n); + let r = e.mapPos(this.from, -1, pi.TrackDel), n = e.mapPos(this.to, 1, pi.TrackDel); + return r == null || n == null ? null : new nB(this.field, r, n); } } -class hB { +class iB { constructor(e, r) { this.lines = e, this.fieldPositions = r; } @@ -15858,7 +15858,7 @@ class hB { } n.push(l), r += l.length + 1; } - let o = this.fieldPositions.map((l) => new uB(l.field, i[l.line] + l.from, i[l.line] + l.to)); + let o = this.fieldPositions.map((l) => new nB(l.field, i[l.line] + l.from, i[l.line] + l.to)); return { text: n, ranges: o }; } static parse(e) { @@ -15876,7 +15876,7 @@ class hB { for (let d of i) d.field >= u && d.field++; } - i.push(new y7e(u, n.length, s.index, s.index + h.length)), a = a.slice(0, s.index) + l + a.slice(s.index + s[0].length); + i.push(new E7e(u, n.length, s.index, s.index + h.length)), a = a.slice(0, s.index) + l + a.slice(s.index + s[0].length); } a = a.replace(/\\([{}])/g, (o, l, u) => { for (let h of i) @@ -15884,10 +15884,10 @@ class hB { return l; }), n.push(a); } - return new hB(n, i); + return new iB(n, i); } } -let b7e = /* @__PURE__ */ Ht.widget({ widget: /* @__PURE__ */ new class extends el { +let _7e = /* @__PURE__ */ Gt.widget({ widget: /* @__PURE__ */ new class extends Zo { toDOM() { let t = document.createElement("span"); return t.className = "cm-snippetFieldPosition", t; @@ -15895,10 +15895,10 @@ let b7e = /* @__PURE__ */ Ht.widget({ widget: /* @__PURE__ */ new class extends ignoreEvent() { return !1; } -}() }), x7e = /* @__PURE__ */ Ht.mark({ class: "cm-snippetField" }); -class Ny { +}() }), A7e = /* @__PURE__ */ Gt.mark({ class: "cm-snippetField" }); +class My { constructor(e, r) { - this.ranges = e, this.active = r, this.deco = Ht.set(e.map((n) => (n.from == n.to ? b7e : x7e).range(n.from, n.to))); + this.ranges = e, this.active = r, this.deco = Gt.set(e.map((n) => (n.from == n.to ? _7e : A7e).range(n.from, n.to))); } map(e) { let r = []; @@ -15908,101 +15908,101 @@ class Ny { return null; r.push(i); } - return new Ny(r, this.active); + return new My(r, this.active); } selectionInsideField(e) { return e.ranges.every((r) => this.ranges.some((n) => n.field == this.active && n.from <= r.from && n.to >= r.to)); } } -const Ok = /* @__PURE__ */ _r.define({ +const pk = /* @__PURE__ */ Tr.define({ map(t, e) { return t && t.map(e); } -}), w7e = /* @__PURE__ */ _r.define(), Zx = /* @__PURE__ */ ai.define({ +}), R7e = /* @__PURE__ */ Tr.define(), Ux = /* @__PURE__ */ ii.define({ create() { return null; }, update(t, e) { for (let r of e.effects) { - if (r.is(Ok)) + if (r.is(pk)) return r.value; - if (r.is(w7e) && t) - return new Ny(t.ranges, r.value); + if (r.is(R7e) && t) + return new My(t.ranges, r.value); } return t && e.docChanged && (t = t.map(e.changes)), t && e.selection && !t.selectionInsideField(e.selection) && (t = null), t; }, - provide: (t) => Mt.decorations.from(t, (e) => e ? e.deco : Ht.none) + provide: (t) => Rt.decorations.from(t, (e) => e ? e.deco : Gt.none) }); -function fB(t, e) { - return ft.create(t.filter((r) => r.field == e).map((r) => ft.range(r.from, r.to))); +function sB(t, e) { + return ut.create(t.filter((r) => r.field == e).map((r) => ut.range(r.from, r.to))); } -function O7e(t) { - let e = hB.parse(t); +function L7e(t) { + let e = iB.parse(t); return (r, n, i, s) => { let { text: a, ranges: o } = e.instantiate(r.state, i), { main: l } = r.state.selection, u = { changes: { from: i, to: s == l.from ? l.to : s, insert: nn.of(a) }, scrollIntoView: !0, - annotations: n ? [oB.of(n), Fi.userEvent.of("input.complete")] : void 0 + annotations: n ? [eB.of(n), Bi.userEvent.of("input.complete")] : void 0 }; - if (o.length && (u.selection = fB(o, 0)), o.some((h) => h.field > 0)) { - let h = new Ny(o, 0), f = u.effects = [Ok.of(h)]; - r.state.field(Zx, !1) === void 0 && f.push(_r.appendConfig.of([Zx, E7e, _7e, Moe])); + if (o.length && (u.selection = sB(o, 0)), o.some((h) => h.field > 0)) { + let h = new My(o, 0), f = u.effects = [pk.of(h)]; + r.state.field(Ux, !1) === void 0 && f.push(Tr.appendConfig.of([Ux, I7e, $7e, Loe])); } r.dispatch(r.state.update(u)); }; } -function Doe(t) { +function Moe(t) { return ({ state: e, dispatch: r }) => { - let n = e.field(Zx, !1); + let n = e.field(Ux, !1); if (!n || t < 0 && n.active == 0) return !1; let i = n.active + t, s = t > 0 && !n.ranges.some((a) => a.field == i + t); return r(e.update({ - selection: fB(n.ranges, i), - effects: Ok.of(s ? null : new Ny(n.ranges, i)), + selection: sB(n.ranges, i), + effects: pk.of(s ? null : new My(n.ranges, i)), scrollIntoView: !0 })), !0; }; } -const k7e = ({ state: t, dispatch: e }) => t.field(Zx, !1) ? (e(t.update({ effects: Ok.of(null) })), !0) : !1, S7e = /* @__PURE__ */ Doe(1), T7e = /* @__PURE__ */ Doe(-1), C7e = [ - { key: "Tab", run: S7e, shift: T7e }, - { key: "Escape", run: k7e } -], hY = /* @__PURE__ */ Gt.define({ +const M7e = ({ state: t, dispatch: e }) => t.field(Ux, !1) ? (e(t.update({ effects: pk.of(null) })), !0) : !1, D7e = /* @__PURE__ */ Moe(1), P7e = /* @__PURE__ */ Moe(-1), N7e = [ + { key: "Tab", run: D7e, shift: P7e }, + { key: "Escape", run: M7e } +], pY = /* @__PURE__ */ Yt.define({ combine(t) { - return t.length ? t[0] : C7e; + return t.length ? t[0] : N7e; } -}), E7e = /* @__PURE__ */ qa.highest(/* @__PURE__ */ zc.compute([hY], (t) => t.facet(hY))); -function _o(t, e) { - return Object.assign(Object.assign({}, e), { apply: O7e(t) }); +}), I7e = /* @__PURE__ */ za.highest(/* @__PURE__ */ Ic.compute([pY], (t) => t.facet(pY))); +function To(t, e) { + return Object.assign(Object.assign({}, e), { apply: L7e(t) }); } -const _7e = /* @__PURE__ */ Mt.domEventHandlers({ +const $7e = /* @__PURE__ */ Rt.domEventHandlers({ mousedown(t, e) { - let r = e.state.field(Zx, !1), n; + let r = e.state.field(Ux, !1), n; if (!r || (n = e.posAtCoords({ x: t.clientX, y: t.clientY })) == null) return !1; let i = r.ranges.find((s) => s.from <= n && s.to >= n); return !i || i.field == r.active ? !1 : (e.dispatch({ - selection: fB(r.ranges, i.field), - effects: Ok.of(r.ranges.some((s) => s.field > i.field) ? new Ny(r.ranges, i.field) : null), + selection: sB(r.ranges, i.field), + effects: pk.of(r.ranges.some((s) => s.field > i.field) ? new My(r.ranges, i.field) : null), scrollIntoView: !0 }), !0); } -}), AT = { +}), pT = { brackets: ["(", "[", "{", "'", '"'], before: ")]}:;>", stringPrefixes: [] -}, B0 = /* @__PURE__ */ _r.define({ +}, B0 = /* @__PURE__ */ Tr.define({ map(t, e) { - let r = e.mapPos(t, -1, gi.TrackAfter); + let r = e.mapPos(t, -1, pi.TrackAfter); return r == null ? void 0 : r; } -}), dB = /* @__PURE__ */ new class extends ug { +}), aB = /* @__PURE__ */ new class extends ug { }(); -dB.startSide = 1; -dB.endSide = -1; -const Poe = /* @__PURE__ */ ai.define({ +aB.startSide = 1; +aB.endSide = -1; +const Doe = /* @__PURE__ */ ii.define({ create() { - return jr.empty; + return Zr.empty; }, update(t, e) { if (t = t.map(e.changes), e.selection) { @@ -16010,66 +16010,66 @@ const Poe = /* @__PURE__ */ ai.define({ t = t.update({ filter: (n) => n >= r.from && n <= r.to }); } for (let r of e.effects) - r.is(B0) && (t = t.update({ add: [dB.range(r.value, r.value + 1)] })); + r.is(B0) && (t = t.update({ add: [aB.range(r.value, r.value + 1)] })); return t; } }); -function A7e() { - return [D7e, Poe]; +function B7e() { + return [U7e, Doe]; } -const u8 = "()[]{}<>"; -function R7e(t) { - for (let e = 0; e < u8.length; e += 2) - if (u8.charCodeAt(e) == t) - return u8.charAt(e + 1); - return x$(t < 128 ? t : t + 1); +const j7 = "()[]{}<>"; +function F7e(t) { + for (let e = 0; e < j7.length; e += 2) + if (j7.charCodeAt(e) == t) + return j7.charAt(e + 1); + return d$(t < 128 ? t : t + 1); } -function L7e(t, e) { - return t.languageDataAt("closeBrackets", e)[0] || AT; +function z7e(t, e) { + return t.languageDataAt("closeBrackets", e)[0] || pT; } -const M7e = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), D7e = /* @__PURE__ */ Mt.inputHandler.of((t, e, r, n) => { - if ((M7e ? t.composing : t.compositionStarted) || t.state.readOnly) +const q7e = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), U7e = /* @__PURE__ */ Rt.inputHandler.of((t, e, r, n) => { + if ((q7e ? t.composing : t.compositionStarted) || t.state.readOnly) return !1; let i = t.state.selection.main; - if (n.length > 2 || n.length == 2 && nf(Vl(n, 0)) == 1 || e != i.from || r != i.to) + if (n.length > 2 || n.length == 2 && jh(Bl(n, 0)) == 1 || e != i.from || r != i.to) return !1; - let s = P7e(t.state, n); + let s = Q7e(t.state, n); return s ? (t.dispatch(s), !0) : !1; }); -function P7e(t, e) { - let r = L7e(t, t.selection.main.head), n = r.brackets || AT.brackets; +function Q7e(t, e) { + let r = z7e(t, t.selection.main.head), n = r.brackets || pT.brackets; for (let i of n) { - let s = R7e(Vl(i, 0)); + let s = F7e(Bl(i, 0)); if (e == i) - return s == i ? $7e(t, i, n.indexOf(i + i + i) > -1, r) : N7e(t, i, s, r.before || AT.before); - if (e == s && Noe(t, t.selection.main.from)) - return I7e(t, i, s); + return s == i ? Y7e(t, i, n.indexOf(i + i + i) > -1, r) : V7e(t, i, s, r.before || pT.before); + if (e == s && Poe(t, t.selection.main.from)) + return W7e(t, i, s); } return null; } -function Noe(t, e) { +function Poe(t, e) { let r = !1; - return t.field(Poe).between(0, t.doc.length, (n) => { + return t.field(Doe).between(0, t.doc.length, (n) => { n == e && (r = !0); }), r; } -function pB(t, e) { +function oB(t, e) { let r = t.sliceString(e, e + 2); - return r.slice(0, nf(Vl(r, 0))); + return r.slice(0, jh(Bl(r, 0))); } -function N7e(t, e, r, n) { +function V7e(t, e, r, n) { let i = null, s = t.changeByRange((a) => { if (!a.empty) return { changes: [{ insert: e, from: a.from }, { insert: r, from: a.to }], effects: B0.of(a.to + e.length), - range: ft.range(a.anchor + e.length, a.head + e.length) + range: ut.range(a.anchor + e.length, a.head + e.length) }; - let o = pB(t.doc, a.head); + let o = oB(t.doc, a.head); return !o || /\s/.test(o) || n.indexOf(o) > -1 ? { changes: { insert: e + r, from: a.head }, effects: B0.of(a.head + e.length), - range: ft.cursor(a.head + e.length) + range: ut.cursor(a.head + e.length) } : { range: i = a }; }); return i ? null : t.update(s, { @@ -16077,51 +16077,51 @@ function N7e(t, e, r, n) { userEvent: "input.type" }); } -function I7e(t, e, r) { - let n = null, i = t.changeByRange((s) => s.empty && pB(t.doc, s.head) == r ? { +function W7e(t, e, r) { + let n = null, i = t.changeByRange((s) => s.empty && oB(t.doc, s.head) == r ? { changes: { from: s.head, to: s.head + r.length, insert: r }, - range: ft.cursor(s.head + r.length) + range: ut.cursor(s.head + r.length) } : n = { range: s }); return n ? null : t.update(i, { scrollIntoView: !0, userEvent: "input.type" }); } -function $7e(t, e, r, n) { - let i = n.stringPrefixes || AT.stringPrefixes, s = null, a = t.changeByRange((o) => { +function Y7e(t, e, r, n) { + let i = n.stringPrefixes || pT.stringPrefixes, s = null, a = t.changeByRange((o) => { if (!o.empty) return { changes: [{ insert: e, from: o.from }, { insert: e, from: o.to }], effects: B0.of(o.to + e.length), - range: ft.range(o.anchor + e.length, o.head + e.length) + range: ut.range(o.anchor + e.length, o.head + e.length) }; - let l = o.head, u = pB(t.doc, l), h; + let l = o.head, u = oB(t.doc, l), h; if (u == e) { - if (fY(t, l)) + if (gY(t, l)) return { changes: { insert: e + e, from: l }, effects: B0.of(l + e.length), - range: ft.cursor(l + e.length) + range: ut.cursor(l + e.length) }; - if (Noe(t, l)) { + if (Poe(t, l)) { let d = r && t.sliceDoc(l, l + e.length * 3) == e + e + e ? e + e + e : e; return { changes: { from: l, to: l + d.length, insert: d }, - range: ft.cursor(l + d.length) + range: ut.cursor(l + d.length) }; } } else { - if (r && t.sliceDoc(l - 2 * e.length, l) == e + e && (h = dY(t, l - 2 * e.length, i)) > -1 && fY(t, h)) + if (r && t.sliceDoc(l - 2 * e.length, l) == e + e && (h = mY(t, l - 2 * e.length, i)) > -1 && gY(t, h)) return { changes: { insert: e + e + e + e, from: l }, effects: B0.of(l + e.length), - range: ft.cursor(l + e.length) + range: ut.cursor(l + e.length) }; - if (t.charCategorizer(l)(u) != li.Word && dY(t, l, i) > -1 && !B7e(t, l, e, i)) + if (t.charCategorizer(l)(u) != ai.Word && mY(t, l, i) > -1 && !G7e(t, l, e, i)) return { changes: { insert: e + e, from: l }, effects: B0.of(l + e.length), - range: ft.cursor(l + e.length) + range: ut.cursor(l + e.length) }; } return { range: s = o }; @@ -16131,12 +16131,12 @@ function $7e(t, e, r, n) { userEvent: "input.type" }); } -function fY(t, e) { - let r = Qn(t).resolveInner(e + 1); +function gY(t, e) { + let r = Un(t).resolveInner(e + 1); return r.parent && r.from == e; } -function B7e(t, e, r, n) { - let i = Qn(t).resolveInner(e, -1), s = n.reduce((a, o) => Math.max(a, o.length), 0); +function G7e(t, e, r, n) { + let i = Un(t).resolveInner(e, -1), s = n.reduce((a, o) => Math.max(a, o.length), 0); for (let a = 0; a < 5; a++) { let o = t.sliceDoc(i.from, Math.min(i.to, i.from + r.length + s)), l = o.indexOf(r); if (!l || l > -1 && n.indexOf(o.slice(0, l)) > -1) { @@ -16155,38 +16155,38 @@ function B7e(t, e, r, n) { } return !1; } -function dY(t, e, r) { +function mY(t, e, r) { let n = t.charCategorizer(e); - if (n(t.sliceDoc(e - 1, e)) != li.Word) + if (n(t.sliceDoc(e - 1, e)) != ai.Word) return e; for (let i of r) { let s = e - i.length; - if (t.sliceDoc(s, e) == i && n(t.sliceDoc(s - 1, s)) != li.Word) + if (t.sliceDoc(s, e) == i && n(t.sliceDoc(s - 1, s)) != ai.Word) return s; } return -1; } -function Ioe(t = {}) { +function Noe(t = {}) { return [ - v7e, - Po, - Is.of(t), - g7e, - F7e, - Moe + C7e, + Lo, + Ps.of(t), + S7e, + H7e, + Loe ]; } -const $oe = [ - { key: "Ctrl-Space", run: uY }, - { mac: "Alt-`", run: uY }, - { key: "Escape", run: h7e }, - { key: "ArrowDown", run: /* @__PURE__ */ uS(!0) }, - { key: "ArrowUp", run: /* @__PURE__ */ uS(!1) }, - { key: "PageDown", run: /* @__PURE__ */ uS(!0, "page") }, - { key: "PageUp", run: /* @__PURE__ */ uS(!1, "page") }, - { key: "Enter", run: Loe } -], F7e = /* @__PURE__ */ qa.highest(/* @__PURE__ */ zc.computeN([Is], (t) => t.facet(Is).defaultKeymap ? [$oe] : [])); -class pY { +const Ioe = [ + { key: "Ctrl-Space", run: dY }, + { mac: "Alt-`", run: dY }, + { key: "Escape", run: x7e }, + { key: "ArrowDown", run: /* @__PURE__ */ K4(!0) }, + { key: "ArrowUp", run: /* @__PURE__ */ K4(!1) }, + { key: "PageDown", run: /* @__PURE__ */ K4(!0, "page") }, + { key: "PageUp", run: /* @__PURE__ */ K4(!1, "page") }, + { key: "Enter", run: Roe } +], H7e = /* @__PURE__ */ za.highest(/* @__PURE__ */ Ic.computeN([Ps], (t) => t.facet(Ps).defaultKeymap ? [Ioe] : [])); +class vY { constructor(e, r, n) { this.from = e, this.to = r, this.diagnostic = n; } @@ -16196,9 +16196,9 @@ class k0 { this.diagnostics = e, this.panel = r, this.selected = n; } static init(e, r, n) { - let i = e, s = n.facet(Jx).markerFilter; + let i = e, s = n.facet(Vx).markerFilter; s && (i = s(i, n)); - let a = e.slice().sort((f, d) => f.from - d.from || f.to - d.to), o = new rs(), l = [], u = 0; + let a = e.slice().sort((f, d) => f.from - d.from || f.to - d.to), o = new es(), l = [], u = 0; for (let f = 0; ; ) { let d = f == a.length ? null : a[f]; if (!d && !l.length) @@ -16213,15 +16213,15 @@ class k0 { break; } } - let m = Z7e(l); + let m = a8e(l); if (l.some((v) => v.from == v.to || v.from == v.to - 1 && n.doc.lineAt(v.from).to == v.from)) - o.add(p, p, Ht.widget({ - widget: new G7e(m), + o.add(p, p, Gt.widget({ + widget: new r8e(m), diagnostics: l.slice() })); else { let v = l.reduce((y, b) => b.markClass ? y + " " + b.markClass : y, ""); - o.add(p, g, Ht.mark({ + o.add(p, g, Gt.mark({ class: "cm-lintRange cm-lintRange-" + m + v, diagnostics: l.slice(), inclusiveEnd: l.some((y) => y.to > g) @@ -16232,102 +16232,102 @@ class k0 { l[v].to <= u && l.splice(v--, 1); } let h = o.finish(); - return new k0(h, r, yv(h)); + return new k0(h, r, pv(h)); } } -function yv(t, e = null, r = 0) { +function pv(t, e = null, r = 0) { let n = null; return t.between(r, 1e9, (i, s, { spec: a }) => { if (!(e && a.diagnostics.indexOf(e) < 0)) if (!n) - n = new pY(i, s, e || a.diagnostics[0]); + n = new vY(i, s, e || a.diagnostics[0]); else { if (a.diagnostics.indexOf(n.diagnostic) < 0) return !1; - n = new pY(n.from, s, n.diagnostic); + n = new vY(n.from, s, n.diagnostic); } }), n; } -function z7e(t, e) { - let r = e.pos, n = e.end || r, i = t.state.facet(Jx).hideOn(t, r, n); +function X7e(t, e) { + let r = e.pos, n = e.end || r, i = t.state.facet(Vx).hideOn(t, r, n); if (i != null) return i; let s = t.startState.doc.lineAt(e.pos); - return !!(t.effects.some((a) => a.is(Kx)) || t.changes.touchesRange(s.from, Math.max(s.to, n))); + return !!(t.effects.some((a) => a.is(Qx)) || t.changes.touchesRange(s.from, Math.max(s.to, n))); } -function Boe(t, e) { - return t.field(vl, !1) ? e : e.concat(_r.appendConfig.of(K7e)); +function $oe(t, e) { + return t.field(dl, !1) ? e : e.concat(Tr.appendConfig.of(o8e)); } -function v9(t, e) { +function n9(t, e) { return { - effects: Boe(t, [Kx.of(e)]) + effects: $oe(t, [Qx.of(e)]) }; } -const Kx = /* @__PURE__ */ _r.define(), gB = /* @__PURE__ */ _r.define(), Foe = /* @__PURE__ */ _r.define(), vl = /* @__PURE__ */ ai.define({ +const Qx = /* @__PURE__ */ Tr.define(), lB = /* @__PURE__ */ Tr.define(), Boe = /* @__PURE__ */ Tr.define(), dl = /* @__PURE__ */ ii.define({ create() { - return new k0(Ht.none, null, null); + return new k0(Gt.none, null, null); }, update(t, e) { if (e.docChanged && t.diagnostics.size) { let r = t.diagnostics.map(e.changes), n = null, i = t.panel; if (t.selected) { let s = e.changes.mapPos(t.selected.from, 1); - n = yv(r, t.selected.diagnostic, s) || yv(r, null, s); + n = pv(r, t.selected.diagnostic, s) || pv(r, null, s); } - !r.size && i && e.state.facet(Jx).autoPanel && (i = null), t = new k0(r, i, n); + !r.size && i && e.state.facet(Vx).autoPanel && (i = null), t = new k0(r, i, n); } for (let r of e.effects) - if (r.is(Kx)) { - let n = e.state.facet(Jx).autoPanel ? r.value.length ? ew.open : null : t.panel; + if (r.is(Qx)) { + let n = e.state.facet(Vx).autoPanel ? r.value.length ? Wx.open : null : t.panel; t = k0.init(r.value, n, e.state); } else - r.is(gB) ? t = new k0(t.diagnostics, r.value ? ew.open : null, t.selected) : r.is(Foe) && (t = new k0(t.diagnostics, t.panel, r.value)); + r.is(lB) ? t = new k0(t.diagnostics, r.value ? Wx.open : null, t.selected) : r.is(Boe) && (t = new k0(t.diagnostics, t.panel, r.value)); return t; }, provide: (t) => [ pg.from(t, (e) => e.panel), - Mt.decorations.from(t, (e) => e.diagnostics) + Rt.decorations.from(t, (e) => e.diagnostics) ] -}), q7e = /* @__PURE__ */ Ht.mark({ class: "cm-lintRange cm-lintRange-active" }); -function U7e(t, e, r) { - let { diagnostics: n } = t.state.field(vl), i, s = -1, a = -1; +}), Z7e = /* @__PURE__ */ Gt.mark({ class: "cm-lintRange cm-lintRange-active" }); +function j7e(t, e, r) { + let { diagnostics: n } = t.state.field(dl), i, s = -1, a = -1; n.between(e - (r < 0 ? 1 : 0), e + (r > 0 ? 1 : 0), (l, u, { spec: h }) => { if (e >= l && e <= u && (l == u || (e > l || r > 0) && (e < u || r < 0))) return i = h.diagnostics, s = l, a = u, !1; }); - let o = t.state.facet(Jx).tooltipFilter; + let o = t.state.facet(Vx).tooltipFilter; return i && o && (i = o(i, t.state)), i ? { pos: s, end: a, above: t.state.doc.lineAt(s).to < a, create() { - return { dom: Q7e(t, i) }; + return { dom: K7e(t, i) }; } } : null; } -function Q7e(t, e) { - return Gn("ul", { class: "cm-tooltip-lint" }, e.map((r) => qoe(t, r, !1))); +function K7e(t, e) { + return Wn("ul", { class: "cm-tooltip-lint" }, e.map((r) => zoe(t, r, !1))); } -const V7e = (t) => { - let e = t.state.field(vl, !1); - (!e || !e.panel) && t.dispatch({ effects: Boe(t.state, [gB.of(!0)]) }); - let r = Qx(t, ew.open); +const J7e = (t) => { + let e = t.state.field(dl, !1); + (!e || !e.panel) && t.dispatch({ effects: $oe(t.state, [lB.of(!0)]) }); + let r = Px(t, Wx.open); return r && r.dom.querySelector(".cm-panel-lint ul").focus(), !0; -}, gY = (t) => { - let e = t.state.field(vl, !1); - return !e || !e.panel ? !1 : (t.dispatch({ effects: gB.of(!1) }), !0); -}, W7e = (t) => { - let e = t.state.field(vl, !1); +}, yY = (t) => { + let e = t.state.field(dl, !1); + return !e || !e.panel ? !1 : (t.dispatch({ effects: lB.of(!1) }), !0); +}, e8e = (t) => { + let e = t.state.field(dl, !1); if (!e) return !1; let r = t.state.selection.main, n = e.diagnostics.iter(r.to + 1); return !n.value && (n = e.diagnostics.iter(0), !n.value || n.from == r.from && n.to == r.to) ? !1 : (t.dispatch({ selection: { anchor: n.from, head: n.to }, scrollIntoView: !0 }), !0); -}, Y7e = [ - { key: "Mod-Shift-m", run: V7e, preventDefault: !0 }, - { key: "F8", run: W7e } -], Jx = /* @__PURE__ */ Gt.define({ +}, t8e = [ + { key: "Mod-Shift-m", run: J7e, preventDefault: !0 }, + { key: "F8", run: e8e } +], Vx = /* @__PURE__ */ Yt.define({ combine(t) { - return Object.assign({ sources: t.map((e) => e.source).filter((e) => e != null) }, Th(t.map((e) => e.config), { + return Object.assign({ sources: t.map((e) => e.source).filter((e) => e != null) }, wh(t.map((e) => e.config), { delay: 750, markerFilter: null, tooltipFilter: null, @@ -16338,7 +16338,7 @@ const V7e = (t) => { })); } }); -function zoe(t) { +function Foe(t) { let e = []; if (t) e: @@ -16354,31 +16354,31 @@ function zoe(t) { } return e; } -function qoe(t, e, r) { +function zoe(t, e, r) { var n; - let i = r ? zoe(e.actions) : []; - return Gn("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, Gn("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage(t) : e.message), (n = e.actions) === null || n === void 0 ? void 0 : n.map((s, a) => { + let i = r ? Foe(e.actions) : []; + return Wn("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, Wn("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage(t) : e.message), (n = e.actions) === null || n === void 0 ? void 0 : n.map((s, a) => { let o = !1, l = (d) => { if (d.preventDefault(), o) return; o = !0; - let p = yv(t.state.field(vl).diagnostics, e); + let p = pv(t.state.field(dl).diagnostics, e); p && s.apply(t, p.from, p.to); }, { name: u } = s, h = i[a] ? u.indexOf(i[a]) : -1, f = h < 0 ? u : [ u.slice(0, h), - Gn("u", u.slice(h, h + 1)), + Wn("u", u.slice(h, h + 1)), u.slice(h + 1) ]; - return Gn("button", { + return Wn("button", { type: "button", class: "cm-diagnosticAction", onclick: l, onmousedown: l, "aria-label": ` Action: ${u}${h < 0 ? "" : ` (access key "${i[a]})"`}.` }, f); - }), e.source && Gn("div", { class: "cm-diagnosticSource" }, e.source)); + }), e.source && Wn("div", { class: "cm-diagnosticSource" }, e.source)); } -class G7e extends el { +class r8e extends Zo { constructor(e) { super(), this.sev = e; } @@ -16386,20 +16386,20 @@ class G7e extends el { return e.sev == this.sev; } toDOM() { - return Gn("span", { class: "cm-lintPoint cm-lintPoint-" + this.sev }); + return Wn("span", { class: "cm-lintPoint cm-lintPoint-" + this.sev }); } } -class mY { +class bY { constructor(e, r) { - this.diagnostic = r, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = qoe(e, r, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option"); + this.diagnostic = r, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = zoe(e, r, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option"); } } -class ew { +class Wx { constructor(e) { this.view = e, this.items = []; let r = (i) => { if (i.keyCode == 27) - gY(this.view), this.view.focus(); + yY(this.view), this.view.focus(); else if (i.keyCode == 38 || i.keyCode == 33) this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length); else if (i.keyCode == 40 || i.keyCode == 34) @@ -16411,10 +16411,10 @@ class ew { else if (i.keyCode == 13) this.view.focus(); else if (i.keyCode >= 65 && i.keyCode <= 90 && this.selectedIndex >= 0) { - let { diagnostic: s } = this.items[this.selectedIndex], a = zoe(s.actions); + let { diagnostic: s } = this.items[this.selectedIndex], a = Foe(s.actions); for (let o = 0; o < a.length; o++) if (a[o].toUpperCase().charCodeAt(0) == i.keyCode) { - let l = yv(this.view.state.field(vl).diagnostics, s); + let l = pv(this.view.state.field(dl).diagnostics, s); l && s.actions[o].apply(e, l.from, l.to); } } else @@ -16424,21 +16424,21 @@ class ew { for (let s = 0; s < this.items.length; s++) this.items[s].dom.contains(i.target) && this.moveSelection(s); }; - this.list = Gn("ul", { + this.list = Wn("ul", { tabIndex: 0, role: "listbox", "aria-label": this.view.state.phrase("Diagnostics"), onkeydown: r, onclick: n - }), this.dom = Gn("div", { class: "cm-panel-lint" }, this.list, Gn("button", { + }), this.dom = Wn("div", { class: "cm-panel-lint" }, this.list, Wn("button", { type: "button", name: "close", "aria-label": this.view.state.phrase("close"), - onclick: () => gY(this.view) + onclick: () => yY(this.view) }, "\xD7")), this.update(); } get selectedIndex() { - let e = this.view.state.field(vl).selected; + let e = this.view.state.field(dl).selected; if (!e) return -1; for (let r = 0; r < this.items.length; r++) @@ -16447,7 +16447,7 @@ class ew { return -1; } update() { - let { diagnostics: e, selected: r } = this.view.state.field(vl), n = 0, i = !1, s = null, a = /* @__PURE__ */ new Set(); + let { diagnostics: e, selected: r } = this.view.state.field(dl), n = 0, i = !1, s = null, a = /* @__PURE__ */ new Set(); for (e.between(0, this.view.state.doc.length, (o, l, { spec: u }) => { for (let h of u.diagnostics) { if (a.has(h)) @@ -16459,11 +16459,11 @@ class ew { f = p; break; } - f < 0 ? (d = new mY(this.view, h), this.items.splice(n, 0, d), i = !0) : (d = this.items[f], f > n && (this.items.splice(n, f - n), i = !0)), r && d.diagnostic == r.diagnostic ? d.dom.hasAttribute("aria-selected") || (d.dom.setAttribute("aria-selected", "true"), s = d) : d.dom.hasAttribute("aria-selected") && d.dom.removeAttribute("aria-selected"), n++; + f < 0 ? (d = new bY(this.view, h), this.items.splice(n, 0, d), i = !0) : (d = this.items[f], f > n && (this.items.splice(n, f - n), i = !0)), r && d.diagnostic == r.diagnostic ? d.dom.hasAttribute("aria-selected") || (d.dom.setAttribute("aria-selected", "true"), s = d) : d.dom.hasAttribute("aria-selected") && d.dom.removeAttribute("aria-selected"), n++; } }); n < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); ) i = !0, this.items.pop(); - this.items.length == 0 && (this.items.push(new mY(this.view, { + this.items.length == 0 && (this.items.push(new bY(this.view, { from: -1, to: -1, severity: "info", @@ -16496,24 +16496,24 @@ class ew { moveSelection(e) { if (this.selectedIndex < 0) return; - let r = this.view.state.field(vl), n = yv(r.diagnostics, this.items[e].diagnostic); + let r = this.view.state.field(dl), n = pv(r.diagnostics, this.items[e].diagnostic); !n || this.view.dispatch({ selection: { anchor: n.from, head: n.to }, scrollIntoView: !0, - effects: Foe.of(n) + effects: Boe.of(n) }); } static open(e) { - return new ew(e); + return new Wx(e); } } -function H7e(t, e = 'viewBox="0 0 40 40"') { +function n8e(t, e = 'viewBox="0 0 40 40"') { return `url('data:image/svg+xml,${encodeURIComponent(t)}')`; } -function hS(t) { - return H7e(``, 'width="6" height="3"'); +function J4(t) { + return n8e(``, 'width="6" height="3"'); } -const X7e = /* @__PURE__ */ Mt.baseTheme({ +const i8e = /* @__PURE__ */ Rt.baseTheme({ ".cm-diagnostic": { padding: "3px 6px 3px 8px", marginLeft: "-1px", @@ -16543,10 +16543,10 @@ const X7e = /* @__PURE__ */ Mt.baseTheme({ backgroundRepeat: "repeat-x", paddingBottom: "0.7px" }, - ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ hS("#d11") }, - ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ hS("orange") }, - ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ hS("#999") }, - ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ hS("#66d") }, + ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ J4("#d11") }, + ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ J4("orange") }, + ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ J4("#999") }, + ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ J4("#66d") }, ".cm-lintRange-active": { backgroundColor: "#ffdd9980" }, ".cm-tooltip-lint": { padding: 0, @@ -16604,60 +16604,60 @@ const X7e = /* @__PURE__ */ Mt.baseTheme({ } } }); -function j7e(t) { +function s8e(t) { return t == "error" ? 4 : t == "warning" ? 3 : t == "info" ? 2 : 1; } -function Z7e(t) { +function a8e(t) { let e = "hint", r = 1; for (let n of t) { - let i = j7e(n.severity); + let i = s8e(n.severity); i > r && (r = i, e = n.severity); } return e; } -const K7e = [ - vl, - /* @__PURE__ */ Mt.decorations.compute([vl], (t) => { - let { selected: e, panel: r } = t.field(vl); - return !e || !r || e.from == e.to ? Ht.none : Ht.set([ - q7e.range(e.from, e.to) +const o8e = [ + dl, + /* @__PURE__ */ Rt.decorations.compute([dl], (t) => { + let { selected: e, panel: r } = t.field(dl); + return !e || !r || e.from == e.to ? Gt.none : Gt.set([ + Z7e.range(e.from, e.to) ]); }), - /* @__PURE__ */ fae(U7e, { hideOn: z7e }), - X7e -], yl = globalThis || void 0 || self, Gc = () => /* @__PURE__ */ new Map(), y9 = (t) => { - const e = Gc(); + /* @__PURE__ */ hae(j7e, { hideOn: X7e }), + i8e +], pl = globalThis || void 0 || self, Qc = () => /* @__PURE__ */ new Map(), i9 = (t) => { + const e = Qc(); return t.forEach((r, n) => { e.set(n, r); }), e; -}, Xf = (t, e, r) => { +}, Vf = (t, e, r) => { let n = t.get(e); return n === void 0 && t.set(e, n = r()), n; -}, J7e = (t, e) => { +}, l8e = (t, e) => { const r = []; for (const [n, i] of t) r.push(e(i, n)); return r; -}, e8e = (t, e) => { +}, c8e = (t, e) => { for (const [r, n] of t) if (e(n, r)) return !0; return !1; -}, mg = () => /* @__PURE__ */ new Set(), h8 = (t) => t[t.length - 1], t8e = (t, e) => { +}, mg = () => /* @__PURE__ */ new Set(), K7 = (t) => t[t.length - 1], u8e = (t, e) => { for (let r = 0; r < e.length; r++) t.push(e[r]); -}, fp = Array.from, r8e = (t, e) => { +}, hp = Array.from, h8e = (t, e) => { for (let r = 0; r < t.length; r++) if (e(t[r], r, t)) return !0; return !1; -}, b9 = Array.isArray; -class t6 { +}, s9 = Array.isArray; +class q_ { constructor() { - this._observers = Gc(); + this._observers = Qc(); } on(e, r) { - Xf(this._observers, e, mg).add(r); + Vf(this._observers, e, mg).add(r); } once(e, r) { const n = (...i) => { @@ -16670,208 +16670,208 @@ class t6 { n !== void 0 && (n.delete(r), n.size === 0 && this._observers.delete(e)); } emit(e, r) { - return fp((this._observers.get(e) || Gc()).values()).forEach((n) => n(...r)); + return hp((this._observers.get(e) || Qc()).values()).forEach((n) => n(...r)); } destroy() { - this._observers = Gc(); + this._observers = Qc(); } } -const _f = Math.floor, e3 = Math.abs, r6 = (t, e) => t < e ? t : e, zp = (t, e) => t > e ? t : e, n8e = Math.pow, Uoe = (t) => t !== 0 ? t < 0 : 1 / t < 0, vY = 1, yY = 2, f8 = 4, d8 = 8, tw = 32, yf = 64, bl = 128, n6 = 31, x9 = 63, J0 = 127, i8e = 2147483647, Qoe = Number.MAX_SAFE_INTEGER, s8e = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && _f(t) === t), a8e = String.fromCharCode, o8e = (t) => t.toLowerCase(), l8e = /^\s*/g, c8e = (t) => t.replace(l8e, ""), u8e = /([A-Z])/g, bY = (t, e) => c8e(t.replace(u8e, (r) => `${e}${o8e(r)}`)), h8e = (t) => { +const kf = Math.floor, z5 = Math.abs, U_ = (t, e) => t < e ? t : e, qp = (t, e) => t > e ? t : e, f8e = Math.pow, qoe = (t) => t !== 0 ? t < 0 : 1 / t < 0, xY = 1, wY = 2, J7 = 4, e8 = 8, Yx = 32, ff = 64, gl = 128, Q_ = 31, a9 = 63, J0 = 127, d8e = 2147483647, Uoe = Number.MAX_SAFE_INTEGER, p8e = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && kf(t) === t), g8e = String.fromCharCode, m8e = (t) => t.toLowerCase(), v8e = /^\s*/g, y8e = (t) => t.replace(v8e, ""), b8e = /([A-Z])/g, OY = (t, e) => y8e(t.replace(b8e, (r) => `${e}${m8e(r)}`)), x8e = (t) => { const e = unescape(encodeURIComponent(t)), r = e.length, n = new Uint8Array(r); for (let i = 0; i < r; i++) n[i] = e.codePointAt(i); return n; -}, rw = typeof TextEncoder < "u" ? new TextEncoder() : null, f8e = (t) => rw.encode(t), d8e = rw ? f8e : h8e; -let lx = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 }); -lx && lx.decode(new Uint8Array()).length === 1 && (lx = null); -class kk { +}, Gx = typeof TextEncoder < "u" ? new TextEncoder() : null, w8e = (t) => Gx.encode(t), O8e = Gx ? w8e : x8e; +let Jb = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 }); +Jb && Jb.decode(new Uint8Array()).length === 1 && (Jb = null); +class gk { constructor() { this.cpos = 0, this.cbuf = new Uint8Array(100), this.bufs = []; } } -const Ra = () => new kk(), mB = (t) => { +const _a = () => new gk(), cB = (t) => { let e = t.cpos; for (let r = 0; r < t.bufs.length; r++) e += t.bufs[r].length; return e; -}, fi = (t) => { - const e = new Uint8Array(mB(t)); +}, hi = (t) => { + const e = new Uint8Array(cB(t)); let r = 0; for (let n = 0; n < t.bufs.length; n++) { const i = t.bufs[n]; e.set(i, r), r += i.length; } return e.set(new Uint8Array(t.cbuf.buffer, 0, t.cpos), r), e; -}, p8e = (t, e) => { +}, k8e = (t, e) => { const r = t.cbuf.length; - r - t.cpos < e && (t.bufs.push(new Uint8Array(t.cbuf.buffer, 0, t.cpos)), t.cbuf = new Uint8Array(zp(r, e) * 2), t.cpos = 0); -}, Ms = (t, e) => { + r - t.cpos < e && (t.bufs.push(new Uint8Array(t.cbuf.buffer, 0, t.cpos)), t.cbuf = new Uint8Array(qp(r, e) * 2), t.cpos = 0); +}, Rs = (t, e) => { const r = t.cbuf.length; t.cpos === r && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(r * 2), t.cpos = 0), t.cbuf[t.cpos++] = e; -}, w9 = Ms, Cr = (t, e) => { +}, o9 = Rs, kr = (t, e) => { for (; e > J0; ) - Ms(t, bl | J0 & e), e = _f(e / 128); - Ms(t, J0 & e); -}, vB = (t, e) => { - const r = Uoe(e); - for (r && (e = -e), Ms(t, (e > x9 ? bl : 0) | (r ? yf : 0) | x9 & e), e = _f(e / 64); e > 0; ) - Ms(t, (e > J0 ? bl : 0) | J0 & e), e = _f(e / 128); -}, O9 = new Uint8Array(3e4), g8e = O9.length / 3, m8e = (t, e) => { - if (e.length < g8e) { - const r = rw.encodeInto(e, O9).written || 0; - Cr(t, r); + Rs(t, gl | J0 & e), e = kf(e / 128); + Rs(t, J0 & e); +}, uB = (t, e) => { + const r = qoe(e); + for (r && (e = -e), Rs(t, (e > a9 ? gl : 0) | (r ? ff : 0) | a9 & e), e = kf(e / 64); e > 0; ) + Rs(t, (e > J0 ? gl : 0) | J0 & e), e = kf(e / 128); +}, l9 = new Uint8Array(3e4), S8e = l9.length / 3, T8e = (t, e) => { + if (e.length < S8e) { + const r = Gx.encodeInto(e, l9).written || 0; + kr(t, r); for (let n = 0; n < r; n++) - Ms(t, O9[n]); + Rs(t, l9[n]); } else - Di(t, d8e(e)); -}, v8e = (t, e) => { + Mi(t, O8e(e)); +}, C8e = (t, e) => { const r = unescape(encodeURIComponent(e)), n = r.length; - Cr(t, n); + kr(t, n); for (let i = 0; i < n; i++) - Ms(t, r.codePointAt(i)); -}, eg = rw && rw.encodeInto ? m8e : v8e, i6 = (t, e) => { - const r = t.cbuf.length, n = t.cpos, i = r6(r - n, e.length), s = e.length - i; - t.cbuf.set(e.subarray(0, i), n), t.cpos += i, s > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(zp(r * 2, s)), t.cbuf.set(e.subarray(i)), t.cpos = s); -}, Di = (t, e) => { - Cr(t, e.byteLength), i6(t, e); -}, yB = (t, e) => { - p8e(t, e); + Rs(t, r.codePointAt(i)); +}, eg = Gx && Gx.encodeInto ? T8e : C8e, V_ = (t, e) => { + const r = t.cbuf.length, n = t.cpos, i = U_(r - n, e.length), s = e.length - i; + t.cbuf.set(e.subarray(0, i), n), t.cpos += i, s > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(qp(r * 2, s)), t.cbuf.set(e.subarray(i)), t.cpos = s); +}, Mi = (t, e) => { + kr(t, e.byteLength), V_(t, e); +}, hB = (t, e) => { + k8e(t, e); const r = new DataView(t.cbuf.buffer, t.cpos, e); return t.cpos += e, r; -}, y8e = (t, e) => yB(t, 4).setFloat32(0, e, !1), b8e = (t, e) => yB(t, 8).setFloat64(0, e, !1), x8e = (t, e) => yB(t, 8).setBigInt64(0, e, !1), xY = new DataView(new ArrayBuffer(4)), w8e = (t) => (xY.setFloat32(0, t), xY.getFloat32(0) === t), nw = (t, e) => { +}, E8e = (t, e) => hB(t, 4).setFloat32(0, e, !1), _8e = (t, e) => hB(t, 8).setFloat64(0, e, !1), A8e = (t, e) => hB(t, 8).setBigInt64(0, e, !1), kY = new DataView(new ArrayBuffer(4)), R8e = (t) => (kY.setFloat32(0, t), kY.getFloat32(0) === t), Hx = (t, e) => { switch (typeof e) { case "string": - Ms(t, 119), eg(t, e); + Rs(t, 119), eg(t, e); break; case "number": - s8e(e) && e3(e) <= i8e ? (Ms(t, 125), vB(t, e)) : w8e(e) ? (Ms(t, 124), y8e(t, e)) : (Ms(t, 123), b8e(t, e)); + p8e(e) && z5(e) <= d8e ? (Rs(t, 125), uB(t, e)) : R8e(e) ? (Rs(t, 124), E8e(t, e)) : (Rs(t, 123), _8e(t, e)); break; case "bigint": - Ms(t, 122), x8e(t, e); + Rs(t, 122), A8e(t, e); break; case "object": if (e === null) - Ms(t, 126); - else if (b9(e)) { - Ms(t, 117), Cr(t, e.length); + Rs(t, 126); + else if (s9(e)) { + Rs(t, 117), kr(t, e.length); for (let r = 0; r < e.length; r++) - nw(t, e[r]); + Hx(t, e[r]); } else if (e instanceof Uint8Array) - Ms(t, 116), Di(t, e); + Rs(t, 116), Mi(t, e); else { - Ms(t, 118); + Rs(t, 118); const r = Object.keys(e); - Cr(t, r.length); + kr(t, r.length); for (let n = 0; n < r.length; n++) { const i = r[n]; - eg(t, i), nw(t, e[i]); + eg(t, i), Hx(t, e[i]); } } break; case "boolean": - Ms(t, e ? 120 : 121); + Rs(t, e ? 120 : 121); break; default: - Ms(t, 127); + Rs(t, 127); } }; -class wY extends kk { +class SY extends gk { constructor(e) { super(), this.w = e, this.s = null, this.count = 0; } write(e) { - this.s === e ? this.count++ : (this.count > 0 && Cr(this, this.count - 1), this.count = 1, this.w(this, e), this.s = e); + this.s === e ? this.count++ : (this.count > 0 && kr(this, this.count - 1), this.count = 1, this.w(this, e), this.s = e); } } -const OY = (t) => { - t.count > 0 && (vB(t.encoder, t.count === 1 ? t.s : -t.s), t.count > 1 && Cr(t.encoder, t.count - 2)); +const TY = (t) => { + t.count > 0 && (uB(t.encoder, t.count === 1 ? t.s : -t.s), t.count > 1 && kr(t.encoder, t.count - 2)); }; -class t3 { +class q5 { constructor() { - this.encoder = new kk(), this.s = 0, this.count = 0; + this.encoder = new gk(), this.s = 0, this.count = 0; } write(e) { - this.s === e ? this.count++ : (OY(this), this.count = 1, this.s = e); + this.s === e ? this.count++ : (TY(this), this.count = 1, this.s = e); } toUint8Array() { - return OY(this), fi(this.encoder); + return TY(this), hi(this.encoder); } } -const kY = (t) => { +const CY = (t) => { if (t.count > 0) { const e = t.diff * 2 + (t.count === 1 ? 0 : 1); - vB(t.encoder, e), t.count > 1 && Cr(t.encoder, t.count - 2); + uB(t.encoder, e), t.count > 1 && kr(t.encoder, t.count - 2); } }; -class p8 { +class t8 { constructor() { - this.encoder = new kk(), this.s = 0, this.count = 0, this.diff = 0; + this.encoder = new gk(), this.s = 0, this.count = 0, this.diff = 0; } write(e) { - this.diff === e - this.s ? (this.s = e, this.count++) : (kY(this), this.count = 1, this.diff = e - this.s, this.s = e); + this.diff === e - this.s ? (this.s = e, this.count++) : (CY(this), this.count = 1, this.diff = e - this.s, this.s = e); } toUint8Array() { - return kY(this), fi(this.encoder); + return CY(this), hi(this.encoder); } } -class O8e { +class L8e { constructor() { - this.sarr = [], this.s = "", this.lensE = new t3(); + this.sarr = [], this.s = "", this.lensE = new q5(); } write(e) { this.s += e, this.s.length > 19 && (this.sarr.push(this.s), this.s = ""), this.lensE.write(e.length); } toUint8Array() { - const e = new kk(); - return this.sarr.push(this.s), this.s = "", eg(e, this.sarr.join("")), i6(e, this.lensE.toUint8Array()), fi(e); + const e = new gk(); + return this.sarr.push(this.s), this.s = "", eg(e, this.sarr.join("")), V_(e, this.lensE.toUint8Array()), hi(e); } } -const dp = (t) => new Error(t), ih = () => { - throw dp("Method unimplemented"); -}, ou = () => { - throw dp("Unexpected case"); -}, Voe = dp("Unexpected end of array"), Woe = dp("Integer out of Range"); -class s6 { +const fp = (t) => new Error(t), Ju = () => { + throw fp("Method unimplemented"); +}, nu = () => { + throw fp("Unexpected case"); +}, Qoe = fp("Unexpected end of array"), Voe = fp("Integer out of Range"); +class W_ { constructor(e) { this.arr = e, this.pos = 0; } } -const qp = (t) => new s6(t), k8e = (t) => t.pos !== t.arr.length, S8e = (t, e) => { +const Up = (t) => new W_(t), M8e = (t) => t.pos !== t.arr.length, D8e = (t, e) => { const r = new Uint8Array(t.arr.buffer, t.pos + t.arr.byteOffset, e); return t.pos += e, r; -}, Aa = (t) => S8e(t, zr(t)), bv = (t) => t.arr[t.pos++], zr = (t) => { +}, Ea = (t) => D8e(t, zr(t)), gv = (t) => t.arr[t.pos++], zr = (t) => { let e = 0, r = 1; const n = t.arr.length; for (; t.pos < n; ) { const i = t.arr[t.pos++]; - if (e = e + (i & J0) * r, r *= 128, i < bl) + if (e = e + (i & J0) * r, r *= 128, i < gl) return e; - if (e > Qoe) - throw Woe; - } - throw Voe; -}, bB = (t) => { - let e = t.arr[t.pos++], r = e & x9, n = 64; - const i = (e & yf) > 0 ? -1 : 1; - if ((e & bl) === 0) + if (e > Uoe) + throw Voe; + } + throw Qoe; +}, fB = (t) => { + let e = t.arr[t.pos++], r = e & a9, n = 64; + const i = (e & ff) > 0 ? -1 : 1; + if ((e & gl) === 0) return i * r; const s = t.arr.length; for (; t.pos < s; ) { - if (e = t.arr[t.pos++], r = r + (e & J0) * n, n *= 128, e < bl) + if (e = t.arr[t.pos++], r = r + (e & J0) * n, n *= 128, e < gl) return i * r; - if (r > Qoe) - throw Woe; + if (r > Uoe) + throw Voe; } - throw Voe; -}, T8e = (t) => { + throw Qoe; +}, P8e = (t) => { let e = zr(t); if (e === 0) return ""; { - let r = String.fromCodePoint(bv(t)); + let r = String.fromCodePoint(gv(t)); if (--e < 100) for (; e--; ) - r += String.fromCodePoint(bv(t)); + r += String.fromCodePoint(gv(t)); else for (; e > 0; ) { const n = e < 1e4 ? e : 1e4, i = t.arr.subarray(t.pos, t.pos + n); @@ -16879,93 +16879,93 @@ const qp = (t) => new s6(t), k8e = (t) => t.pos !== t.arr.length, S8e = (t, e) = } return decodeURIComponent(escape(r)); } -}, C8e = (t) => lx.decode(Aa(t)), Qd = lx ? C8e : T8e, xB = (t, e) => { +}, N8e = (t) => Jb.decode(Ea(t)), Fd = Jb ? N8e : P8e, dB = (t, e) => { const r = new DataView(t.arr.buffer, t.arr.byteOffset + t.pos, e); return t.pos += e, r; -}, E8e = (t) => xB(t, 4).getFloat32(0, !1), _8e = (t) => xB(t, 8).getFloat64(0, !1), A8e = (t) => xB(t, 8).getBigInt64(0, !1), R8e = [ +}, I8e = (t) => dB(t, 4).getFloat32(0, !1), $8e = (t) => dB(t, 8).getFloat64(0, !1), B8e = (t) => dB(t, 8).getBigInt64(0, !1), F8e = [ (t) => { }, (t) => null, - bB, - E8e, - _8e, - A8e, + fB, + I8e, + $8e, + B8e, (t) => !1, (t) => !0, - Qd, + Fd, (t) => { const e = zr(t), r = {}; for (let n = 0; n < e; n++) { - const i = Qd(t); - r[i] = iw(t); + const i = Fd(t); + r[i] = Xx(t); } return r; }, (t) => { const e = zr(t), r = []; for (let n = 0; n < e; n++) - r.push(iw(t)); + r.push(Xx(t)); return r; }, - Aa -], iw = (t) => R8e[127 - bv(t)](t); -class SY extends s6 { + Ea +], Xx = (t) => F8e[127 - gv(t)](t); +class EY extends W_ { constructor(e, r) { super(e), this.reader = r, this.s = null, this.count = 0; } read() { - return this.count === 0 && (this.s = this.reader(this), k8e(this) ? this.count = zr(this) + 1 : this.count = -1), this.count--, this.s; + return this.count === 0 && (this.s = this.reader(this), M8e(this) ? this.count = zr(this) + 1 : this.count = -1), this.count--, this.s; } } -class r3 extends s6 { +class U5 extends W_ { constructor(e) { super(e), this.s = 0, this.count = 0; } read() { if (this.count === 0) { - this.s = bB(this); - const e = Uoe(this.s); + this.s = fB(this); + const e = qoe(this.s); this.count = 1, e && (this.s = -this.s, this.count = zr(this) + 2); } return this.count--, this.s; } } -class g8 extends s6 { +class r8 extends W_ { constructor(e) { super(e), this.s = 0, this.count = 0, this.diff = 0; } read() { if (this.count === 0) { - const e = bB(this), r = e & 1; - this.diff = _f(e / 2), this.count = 1, r && (this.count = zr(this) + 2); + const e = fB(this), r = e & 1; + this.diff = kf(e / 2), this.count = 1, r && (this.count = zr(this) + 2); } return this.s += this.diff, this.count--, this.s; } } -class L8e { +class z8e { constructor(e) { - this.decoder = new r3(e), this.str = Qd(this.decoder), this.spos = 0; + this.decoder = new U5(e), this.str = Fd(this.decoder), this.spos = 0; } read() { const e = this.spos + this.decoder.read(), r = this.str.slice(this.spos, e); return this.spos = e, r; } } -const M8e = crypto.getRandomValues.bind(crypto), Yoe = () => M8e(new Uint32Array(1))[0], D8e = [1e7] + -1e3 + -4e3 + -8e3 + -1e11, P8e = () => D8e.replace( +const q8e = crypto.getRandomValues.bind(crypto), Woe = () => q8e(new Uint32Array(1))[0], U8e = [1e7] + -1e3 + -4e3 + -8e3 + -1e11, Q8e = () => U8e.replace( /[018]/g, - (t) => (t ^ Yoe() & 15 >> t / 4).toString(16) -), pp = Date.now, TY = (t) => new Promise(t); + (t) => (t ^ Woe() & 15 >> t / 4).toString(16) +), dp = Date.now, _Y = (t) => new Promise(t); Promise.all.bind(Promise); -var Ts = {}, a6 = {}; -a6.byteLength = $8e; -a6.toByteArray = F8e; -a6.fromByteArray = U8e; -var Uu = [], Ul = [], N8e = typeof Uint8Array < "u" ? Uint8Array : Array, m8 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -for (var Bm = 0, I8e = m8.length; Bm < I8e; ++Bm) - Uu[Bm] = m8[Bm], Ul[m8.charCodeAt(Bm)] = Bm; -Ul["-".charCodeAt(0)] = 62; -Ul["_".charCodeAt(0)] = 63; -function Goe(t) { +var ks = {}, Y_ = {}; +Y_.byteLength = Y8e; +Y_.toByteArray = H8e; +Y_.fromByteArray = j8e; +var $u = [], Il = [], V8e = typeof Uint8Array < "u" ? Uint8Array : Array, n8 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +for (var Mm = 0, W8e = n8.length; Mm < W8e; ++Mm) + $u[Mm] = n8[Mm], Il[n8.charCodeAt(Mm)] = Mm; +Il["-".charCodeAt(0)] = 62; +Il["_".charCodeAt(0)] = 63; +function Yoe(t) { var e = t.length; if (e % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4"); @@ -16974,39 +16974,39 @@ function Goe(t) { var n = r === e ? 0 : 4 - r % 4; return [r, n]; } -function $8e(t) { - var e = Goe(t), r = e[0], n = e[1]; +function Y8e(t) { + var e = Yoe(t), r = e[0], n = e[1]; return (r + n) * 3 / 4 - n; } -function B8e(t, e, r) { +function G8e(t, e, r) { return (e + r) * 3 / 4 - r; } -function F8e(t) { - var e, r = Goe(t), n = r[0], i = r[1], s = new N8e(B8e(t, n, i)), a = 0, o = i > 0 ? n - 4 : n, l; +function H8e(t) { + var e, r = Yoe(t), n = r[0], i = r[1], s = new V8e(G8e(t, n, i)), a = 0, o = i > 0 ? n - 4 : n, l; for (l = 0; l < o; l += 4) - e = Ul[t.charCodeAt(l)] << 18 | Ul[t.charCodeAt(l + 1)] << 12 | Ul[t.charCodeAt(l + 2)] << 6 | Ul[t.charCodeAt(l + 3)], s[a++] = e >> 16 & 255, s[a++] = e >> 8 & 255, s[a++] = e & 255; - return i === 2 && (e = Ul[t.charCodeAt(l)] << 2 | Ul[t.charCodeAt(l + 1)] >> 4, s[a++] = e & 255), i === 1 && (e = Ul[t.charCodeAt(l)] << 10 | Ul[t.charCodeAt(l + 1)] << 4 | Ul[t.charCodeAt(l + 2)] >> 2, s[a++] = e >> 8 & 255, s[a++] = e & 255), s; + e = Il[t.charCodeAt(l)] << 18 | Il[t.charCodeAt(l + 1)] << 12 | Il[t.charCodeAt(l + 2)] << 6 | Il[t.charCodeAt(l + 3)], s[a++] = e >> 16 & 255, s[a++] = e >> 8 & 255, s[a++] = e & 255; + return i === 2 && (e = Il[t.charCodeAt(l)] << 2 | Il[t.charCodeAt(l + 1)] >> 4, s[a++] = e & 255), i === 1 && (e = Il[t.charCodeAt(l)] << 10 | Il[t.charCodeAt(l + 1)] << 4 | Il[t.charCodeAt(l + 2)] >> 2, s[a++] = e >> 8 & 255, s[a++] = e & 255), s; } -function z8e(t) { - return Uu[t >> 18 & 63] + Uu[t >> 12 & 63] + Uu[t >> 6 & 63] + Uu[t & 63]; +function X8e(t) { + return $u[t >> 18 & 63] + $u[t >> 12 & 63] + $u[t >> 6 & 63] + $u[t & 63]; } -function q8e(t, e, r) { +function Z8e(t, e, r) { for (var n, i = [], s = e; s < r; s += 3) - n = (t[s] << 16 & 16711680) + (t[s + 1] << 8 & 65280) + (t[s + 2] & 255), i.push(z8e(n)); + n = (t[s] << 16 & 16711680) + (t[s + 1] << 8 & 65280) + (t[s + 2] & 255), i.push(X8e(n)); return i.join(""); } -function U8e(t) { +function j8e(t) { for (var e, r = t.length, n = r % 3, i = [], s = 16383, a = 0, o = r - n; a < o; a += s) - i.push(q8e(t, a, a + s > o ? o : a + s)); + i.push(Z8e(t, a, a + s > o ? o : a + s)); return n === 1 ? (e = t[r - 1], i.push( - Uu[e >> 2] + Uu[e << 4 & 63] + "==" + $u[e >> 2] + $u[e << 4 & 63] + "==" )) : n === 2 && (e = (t[r - 2] << 8) + t[r - 1], i.push( - Uu[e >> 10] + Uu[e >> 4 & 63] + Uu[e << 2 & 63] + "=" + $u[e >> 10] + $u[e >> 4 & 63] + $u[e << 2 & 63] + "=" )), i.join(""); } -var wB = {}; +var pB = {}; /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -wB.read = function(t, e, r, n, i) { +pB.read = function(t, e, r, n, i) { var s, a, o = i * 8 - n - 1, l = (1 << o) - 1, u = l >> 1, h = -7, f = r ? i - 1 : 0, d = r ? -1 : 1, p = t[e + f]; for (f += d, s = p & (1 << -h) - 1, p >>= -h, h += o; h > 0; s = s * 256 + t[e + f], f += d, h -= 8) ; @@ -17021,7 +17021,7 @@ wB.read = function(t, e, r, n, i) { } return (p ? -1 : 1) * a * Math.pow(2, s - n); }; -wB.write = function(t, e, r, n, i, s) { +pB.write = function(t, e, r, n, i, s) { var a, o, l, u = s * 8 - i - 1, h = (1 << u) - 1, f = h >> 1, d = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : s - 1, g = n ? 1 : -1, m = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0; for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (o = isNaN(e) ? 1 : 0, a = h) : (a = Math.floor(Math.log(e) / Math.LN2), e * (l = Math.pow(2, -a)) < 1 && (a--, l *= 2), a + f >= 1 ? e += d / l : e += d * Math.pow(2, 1 - f), e * l >= 2 && (a++, l /= 2), a + f >= h ? (o = 0, a = h) : a + f >= 1 ? (o = (e * l - 1) * Math.pow(2, i), a = a + f) : (o = e * Math.pow(2, f - 1) * Math.pow(2, i), a = 0)); i >= 8; t[r + p] = o & 255, p += g, o /= 256, i -= 8) ; @@ -17036,7 +17036,7 @@ wB.write = function(t, e, r, n, i, s) { * @license MIT */ (function(t) { - const e = a6, r = wB, n = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null; + const e = Y_, r = pB, n = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null; t.Buffer = h, t.SlowBuffer = S, t.INSPECT_MAX_BYTES = 50; const i = 2147483647; t.kMaxLength = i; @@ -17046,10 +17046,10 @@ wB.write = function(t, e, r, n, i, s) { ); function l() { try { - const H = new s(1), U = { foo: function() { + const Y = new s(1), z = { foo: function() { return 42; } }; - return Object.setPrototypeOf(U, s.prototype), Object.setPrototypeOf(H, U), H.foo() === 42; + return Object.setPrototypeOf(z, s.prototype), Object.setPrototypeOf(Y, z), Y.foo() === 42; } catch { return !1; } @@ -17067,138 +17067,138 @@ wB.write = function(t, e, r, n, i, s) { return this.byteOffset; } }); - function u(H) { - if (H > i) - throw new RangeError('The value "' + H + '" is invalid for option "size"'); - const U = new s(H); - return Object.setPrototypeOf(U, h.prototype), U; - } - function h(H, U, Q) { - if (typeof H == "number") { - if (typeof U == "string") + function u(Y) { + if (Y > i) + throw new RangeError('The value "' + Y + '" is invalid for option "size"'); + const z = new s(Y); + return Object.setPrototypeOf(z, h.prototype), z; + } + function h(Y, z, q) { + if (typeof Y == "number") { + if (typeof z == "string") throw new TypeError( 'The "string" argument must be of type string. Received type number' ); - return g(H); + return g(Y); } - return f(H, U, Q); + return f(Y, z, q); } h.poolSize = 8192; - function f(H, U, Q) { - if (typeof H == "string") - return m(H, U); - if (a.isView(H)) - return y(H); - if (H == null) + function f(Y, z, q) { + if (typeof Y == "string") + return m(Y, z); + if (a.isView(Y)) + return y(Y); + if (Y == null) throw new TypeError( - "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof H + "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof Y ); - if (se(H, a) || H && se(H.buffer, a) || typeof o < "u" && (se(H, o) || H && se(H.buffer, o))) - return b(H, U, Q); - if (typeof H == "number") + if (ie(Y, a) || Y && ie(Y.buffer, a) || typeof o < "u" && (ie(Y, o) || Y && ie(Y.buffer, o))) + return b(Y, z, q); + if (typeof Y == "number") throw new TypeError( 'The "value" argument must not be of type number. Received type number' ); - const te = H.valueOf && H.valueOf(); - if (te != null && te !== H) - return h.from(te, U, Q); - const he = w(H); - if (he) - return he; - if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof H[Symbol.toPrimitive] == "function") - return h.from(H[Symbol.toPrimitive]("string"), U, Q); + const ee = Y.valueOf && Y.valueOf(); + if (ee != null && ee !== Y) + return h.from(ee, z, q); + const ce = w(Y); + if (ce) + return ce; + if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof Y[Symbol.toPrimitive] == "function") + return h.from(Y[Symbol.toPrimitive]("string"), z, q); throw new TypeError( - "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof H + "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof Y ); } - h.from = function(H, U, Q) { - return f(H, U, Q); + h.from = function(Y, z, q) { + return f(Y, z, q); }, Object.setPrototypeOf(h.prototype, s.prototype), Object.setPrototypeOf(h, s); - function d(H) { - if (typeof H != "number") + function d(Y) { + if (typeof Y != "number") throw new TypeError('"size" argument must be of type number'); - if (H < 0) - throw new RangeError('The value "' + H + '" is invalid for option "size"'); + if (Y < 0) + throw new RangeError('The value "' + Y + '" is invalid for option "size"'); } - function p(H, U, Q) { - return d(H), H <= 0 ? u(H) : U !== void 0 ? typeof Q == "string" ? u(H).fill(U, Q) : u(H).fill(U) : u(H); + function p(Y, z, q) { + return d(Y), Y <= 0 ? u(Y) : z !== void 0 ? typeof q == "string" ? u(Y).fill(z, q) : u(Y).fill(z) : u(Y); } - h.alloc = function(H, U, Q) { - return p(H, U, Q); + h.alloc = function(Y, z, q) { + return p(Y, z, q); }; - function g(H) { - return d(H), u(H < 0 ? 0 : O(H) | 0); + function g(Y) { + return d(Y), u(Y < 0 ? 0 : O(Y) | 0); } - h.allocUnsafe = function(H) { - return g(H); - }, h.allocUnsafeSlow = function(H) { - return g(H); + h.allocUnsafe = function(Y) { + return g(Y); + }, h.allocUnsafeSlow = function(Y) { + return g(Y); }; - function m(H, U) { - if ((typeof U != "string" || U === "") && (U = "utf8"), !h.isEncoding(U)) - throw new TypeError("Unknown encoding: " + U); - const Q = C(H, U) | 0; - let te = u(Q); - const he = te.write(H, U); - return he !== Q && (te = te.slice(0, he)), te; - } - function v(H) { - const U = H.length < 0 ? 0 : O(H.length) | 0, Q = u(U); - for (let te = 0; te < U; te += 1) - Q[te] = H[te] & 255; - return Q; - } - function y(H) { - if (se(H, s)) { - const U = new s(H); - return b(U.buffer, U.byteOffset, U.byteLength); - } - return v(H); - } - function b(H, U, Q) { - if (U < 0 || H.byteLength < U) + function m(Y, z) { + if ((typeof z != "string" || z === "") && (z = "utf8"), !h.isEncoding(z)) + throw new TypeError("Unknown encoding: " + z); + const q = C(Y, z) | 0; + let ee = u(q); + const ce = ee.write(Y, z); + return ce !== q && (ee = ee.slice(0, ce)), ee; + } + function v(Y) { + const z = Y.length < 0 ? 0 : O(Y.length) | 0, q = u(z); + for (let ee = 0; ee < z; ee += 1) + q[ee] = Y[ee] & 255; + return q; + } + function y(Y) { + if (ie(Y, s)) { + const z = new s(Y); + return b(z.buffer, z.byteOffset, z.byteLength); + } + return v(Y); + } + function b(Y, z, q) { + if (z < 0 || Y.byteLength < z) throw new RangeError('"offset" is outside of buffer bounds'); - if (H.byteLength < U + (Q || 0)) + if (Y.byteLength < z + (q || 0)) throw new RangeError('"length" is outside of buffer bounds'); - let te; - return U === void 0 && Q === void 0 ? te = new s(H) : Q === void 0 ? te = new s(H, U) : te = new s(H, U, Q), Object.setPrototypeOf(te, h.prototype), te; + let ee; + return z === void 0 && q === void 0 ? ee = new s(Y) : q === void 0 ? ee = new s(Y, z) : ee = new s(Y, z, q), Object.setPrototypeOf(ee, h.prototype), ee; } - function w(H) { - if (h.isBuffer(H)) { - const U = O(H.length) | 0, Q = u(U); - return Q.length === 0 || H.copy(Q, 0, 0, U), Q; + function w(Y) { + if (h.isBuffer(Y)) { + const z = O(Y.length) | 0, q = u(z); + return q.length === 0 || Y.copy(q, 0, 0, z), q; } - if (H.length !== void 0) - return typeof H.length != "number" || ve(H.length) ? u(0) : v(H); - if (H.type === "Buffer" && Array.isArray(H.data)) - return v(H.data); + if (Y.length !== void 0) + return typeof Y.length != "number" || pe(Y.length) ? u(0) : v(Y); + if (Y.type === "Buffer" && Array.isArray(Y.data)) + return v(Y.data); } - function O(H) { - if (H >= i) + function O(Y) { + if (Y >= i) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + i.toString(16) + " bytes"); - return H | 0; + return Y | 0; } - function S(H) { - return +H != H && (H = 0), h.alloc(+H); + function S(Y) { + return +Y != Y && (Y = 0), h.alloc(+Y); } - h.isBuffer = function(U) { - return U != null && U._isBuffer === !0 && U !== h.prototype; - }, h.compare = function(U, Q) { - if (se(U, s) && (U = h.from(U, U.offset, U.byteLength)), se(Q, s) && (Q = h.from(Q, Q.offset, Q.byteLength)), !h.isBuffer(U) || !h.isBuffer(Q)) + h.isBuffer = function(z) { + return z != null && z._isBuffer === !0 && z !== h.prototype; + }, h.compare = function(z, q) { + if (ie(z, s) && (z = h.from(z, z.offset, z.byteLength)), ie(q, s) && (q = h.from(q, q.offset, q.byteLength)), !h.isBuffer(z) || !h.isBuffer(q)) throw new TypeError( 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' ); - if (U === Q) + if (z === q) return 0; - let te = U.length, he = Q.length; - for (let Te = 0, Se = Math.min(te, he); Te < Se; ++Te) - if (U[Te] !== Q[Te]) { - te = U[Te], he = Q[Te]; + let ee = z.length, ce = q.length; + for (let Oe = 0, we = Math.min(ee, ce); Oe < we; ++Oe) + if (z[Oe] !== q[Oe]) { + ee = z[Oe], ce = q[Oe]; break; } - return te < he ? -1 : he < te ? 1 : 0; - }, h.isEncoding = function(U) { - switch (String(U).toLowerCase()) { + return ee < ce ? -1 : ce < ee ? 1 : 0; + }, h.isEncoding = function(z) { + switch (String(z).toLowerCase()) { case "hex": case "utf8": case "utf-8": @@ -17214,283 +17214,283 @@ wB.write = function(t, e, r, n, i, s) { default: return !1; } - }, h.concat = function(U, Q) { - if (!Array.isArray(U)) + }, h.concat = function(z, q) { + if (!Array.isArray(z)) throw new TypeError('"list" argument must be an Array of Buffers'); - if (U.length === 0) + if (z.length === 0) return h.alloc(0); - let te; - if (Q === void 0) - for (Q = 0, te = 0; te < U.length; ++te) - Q += U[te].length; - const he = h.allocUnsafe(Q); - let Te = 0; - for (te = 0; te < U.length; ++te) { - let Se = U[te]; - if (se(Se, s)) - Te + Se.length > he.length ? (h.isBuffer(Se) || (Se = h.from(Se)), Se.copy(he, Te)) : s.prototype.set.call( - he, - Se, - Te + let ee; + if (q === void 0) + for (q = 0, ee = 0; ee < z.length; ++ee) + q += z[ee].length; + const ce = h.allocUnsafe(q); + let Oe = 0; + for (ee = 0; ee < z.length; ++ee) { + let we = z[ee]; + if (ie(we, s)) + Oe + we.length > ce.length ? (h.isBuffer(we) || (we = h.from(we)), we.copy(ce, Oe)) : s.prototype.set.call( + ce, + we, + Oe ); - else if (h.isBuffer(Se)) - Se.copy(he, Te); + else if (h.isBuffer(we)) + we.copy(ce, Oe); else throw new TypeError('"list" argument must be an Array of Buffers'); - Te += Se.length; + Oe += we.length; } - return he; + return ce; }; - function C(H, U) { - if (h.isBuffer(H)) - return H.length; - if (a.isView(H) || se(H, a)) - return H.byteLength; - if (typeof H != "string") + function C(Y, z) { + if (h.isBuffer(Y)) + return Y.length; + if (a.isView(Y) || ie(Y, a)) + return Y.byteLength; + if (typeof Y != "string") throw new TypeError( - 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof H + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof Y ); - const Q = H.length, te = arguments.length > 2 && arguments[2] === !0; - if (!te && Q === 0) + const q = Y.length, ee = arguments.length > 2 && arguments[2] === !0; + if (!ee && q === 0) return 0; - let he = !1; + let ce = !1; for (; ; ) - switch (U) { + switch (z) { case "ascii": case "latin1": case "binary": - return Q; + return q; case "utf8": case "utf-8": - return je(H).length; + return et(Y).length; case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": - return Q * 2; + return q * 2; case "hex": - return Q >>> 1; + return q >>> 1; case "base64": - return Ge(H).length; + return Ye(Y).length; default: - if (he) - return te ? -1 : je(H).length; - U = ("" + U).toLowerCase(), he = !0; + if (ce) + return ee ? -1 : et(Y).length; + z = ("" + z).toLowerCase(), ce = !0; } } h.byteLength = C; - function T(H, U, Q) { - let te = !1; - if ((U === void 0 || U < 0) && (U = 0), U > this.length || ((Q === void 0 || Q > this.length) && (Q = this.length), Q <= 0) || (Q >>>= 0, U >>>= 0, Q <= U)) + function T(Y, z, q) { + let ee = !1; + if ((z === void 0 || z < 0) && (z = 0), z > this.length || ((q === void 0 || q > this.length) && (q = this.length), q <= 0) || (q >>>= 0, z >>>= 0, q <= z)) return ""; - for (H || (H = "utf8"); ; ) - switch (H) { + for (Y || (Y = "utf8"); ; ) + switch (Y) { case "hex": - return Z(this, U, Q); + return X(this, z, q); case "utf8": case "utf-8": - return M(this, U, Q); + return R(this, z, q); case "ascii": - return Y(this, U, Q); + return V(this, z, q); case "latin1": case "binary": - return W(this, U, Q); + return U(this, z, q); case "base64": - return A(this, U, Q); + return _(this, z, q); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": - return K(this, U, Q); + return j(this, z, q); default: - if (te) - throw new TypeError("Unknown encoding: " + H); - H = (H + "").toLowerCase(), te = !0; + if (ee) + throw new TypeError("Unknown encoding: " + Y); + Y = (Y + "").toLowerCase(), ee = !0; } } h.prototype._isBuffer = !0; - function D(H, U, Q) { - const te = H[U]; - H[U] = H[Q], H[Q] = te; + function M(Y, z, q) { + const ee = Y[z]; + Y[z] = Y[q], Y[q] = ee; } h.prototype.swap16 = function() { - const U = this.length; - if (U % 2 !== 0) + const z = this.length; + if (z % 2 !== 0) throw new RangeError("Buffer size must be a multiple of 16-bits"); - for (let Q = 0; Q < U; Q += 2) - D(this, Q, Q + 1); + for (let q = 0; q < z; q += 2) + M(this, q, q + 1); return this; }, h.prototype.swap32 = function() { - const U = this.length; - if (U % 4 !== 0) + const z = this.length; + if (z % 4 !== 0) throw new RangeError("Buffer size must be a multiple of 32-bits"); - for (let Q = 0; Q < U; Q += 4) - D(this, Q, Q + 3), D(this, Q + 1, Q + 2); + for (let q = 0; q < z; q += 4) + M(this, q, q + 3), M(this, q + 1, q + 2); return this; }, h.prototype.swap64 = function() { - const U = this.length; - if (U % 8 !== 0) + const z = this.length; + if (z % 8 !== 0) throw new RangeError("Buffer size must be a multiple of 64-bits"); - for (let Q = 0; Q < U; Q += 8) - D(this, Q, Q + 7), D(this, Q + 1, Q + 6), D(this, Q + 2, Q + 5), D(this, Q + 3, Q + 4); + for (let q = 0; q < z; q += 8) + M(this, q, q + 7), M(this, q + 1, q + 6), M(this, q + 2, q + 5), M(this, q + 3, q + 4); return this; }, h.prototype.toString = function() { - const U = this.length; - return U === 0 ? "" : arguments.length === 0 ? M(this, 0, U) : T.apply(this, arguments); - }, h.prototype.toLocaleString = h.prototype.toString, h.prototype.equals = function(U) { - if (!h.isBuffer(U)) + const z = this.length; + return z === 0 ? "" : arguments.length === 0 ? R(this, 0, z) : T.apply(this, arguments); + }, h.prototype.toLocaleString = h.prototype.toString, h.prototype.equals = function(z) { + if (!h.isBuffer(z)) throw new TypeError("Argument must be a Buffer"); - return this === U ? !0 : h.compare(this, U) === 0; + return this === z ? !0 : h.compare(this, z) === 0; }, h.prototype.inspect = function() { - let U = ""; - const Q = t.INSPECT_MAX_BYTES; - return U = this.toString("hex", 0, Q).replace(/(.{2})/g, "$1 ").trim(), this.length > Q && (U += " ... "), ""; - }, n && (h.prototype[n] = h.prototype.inspect), h.prototype.compare = function(U, Q, te, he, Te) { - if (se(U, s) && (U = h.from(U, U.offset, U.byteLength)), !h.isBuffer(U)) + let z = ""; + const q = t.INSPECT_MAX_BYTES; + return z = this.toString("hex", 0, q).replace(/(.{2})/g, "$1 ").trim(), this.length > q && (z += " ... "), ""; + }, n && (h.prototype[n] = h.prototype.inspect), h.prototype.compare = function(z, q, ee, ce, Oe) { + if (ie(z, s) && (z = h.from(z, z.offset, z.byteLength)), !h.isBuffer(z)) throw new TypeError( - 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof U + 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof z ); - if (Q === void 0 && (Q = 0), te === void 0 && (te = U ? U.length : 0), he === void 0 && (he = 0), Te === void 0 && (Te = this.length), Q < 0 || te > U.length || he < 0 || Te > this.length) + if (q === void 0 && (q = 0), ee === void 0 && (ee = z ? z.length : 0), ce === void 0 && (ce = 0), Oe === void 0 && (Oe = this.length), q < 0 || ee > z.length || ce < 0 || Oe > this.length) throw new RangeError("out of range index"); - if (he >= Te && Q >= te) + if (ce >= Oe && q >= ee) return 0; - if (he >= Te) + if (ce >= Oe) return -1; - if (Q >= te) + if (q >= ee) return 1; - if (Q >>>= 0, te >>>= 0, he >>>= 0, Te >>>= 0, this === U) + if (q >>>= 0, ee >>>= 0, ce >>>= 0, Oe >>>= 0, this === z) return 0; - let Se = Te - he, $e = te - Q; - const Ie = Math.min(Se, $e), ct = this.slice(he, Te), Ue = U.slice(Q, te); - for (let ut = 0; ut < Ie; ++ut) - if (ct[ut] !== Ue[ut]) { - Se = ct[ut], $e = Ue[ut]; + let we = Oe - ce, Ne = ee - q; + const Pe = Math.min(we, Ne), lt = this.slice(ce, Oe), Ue = z.slice(q, ee); + for (let at = 0; at < Pe; ++at) + if (lt[at] !== Ue[at]) { + we = lt[at], Ne = Ue[at]; break; } - return Se < $e ? -1 : $e < Se ? 1 : 0; + return we < Ne ? -1 : Ne < we ? 1 : 0; }; - function E(H, U, Q, te, he) { - if (H.length === 0) + function E(Y, z, q, ee, ce) { + if (Y.length === 0) return -1; - if (typeof Q == "string" ? (te = Q, Q = 0) : Q > 2147483647 ? Q = 2147483647 : Q < -2147483648 && (Q = -2147483648), Q = +Q, ve(Q) && (Q = he ? 0 : H.length - 1), Q < 0 && (Q = H.length + Q), Q >= H.length) { - if (he) + if (typeof q == "string" ? (ee = q, q = 0) : q > 2147483647 ? q = 2147483647 : q < -2147483648 && (q = -2147483648), q = +q, pe(q) && (q = ce ? 0 : Y.length - 1), q < 0 && (q = Y.length + q), q >= Y.length) { + if (ce) return -1; - Q = H.length - 1; - } else if (Q < 0) - if (he) - Q = 0; + q = Y.length - 1; + } else if (q < 0) + if (ce) + q = 0; else return -1; - if (typeof U == "string" && (U = h.from(U, te)), h.isBuffer(U)) - return U.length === 0 ? -1 : N(H, U, Q, te, he); - if (typeof U == "number") - return U = U & 255, typeof s.prototype.indexOf == "function" ? he ? s.prototype.indexOf.call(H, U, Q) : s.prototype.lastIndexOf.call(H, U, Q) : N(H, [U], Q, te, he); + if (typeof z == "string" && (z = h.from(z, ee)), h.isBuffer(z)) + return z.length === 0 ? -1 : P(Y, z, q, ee, ce); + if (typeof z == "number") + return z = z & 255, typeof s.prototype.indexOf == "function" ? ce ? s.prototype.indexOf.call(Y, z, q) : s.prototype.lastIndexOf.call(Y, z, q) : P(Y, [z], q, ee, ce); throw new TypeError("val must be string, number or Buffer"); } - function N(H, U, Q, te, he) { - let Te = 1, Se = H.length, $e = U.length; - if (te !== void 0 && (te = String(te).toLowerCase(), te === "ucs2" || te === "ucs-2" || te === "utf16le" || te === "utf-16le")) { - if (H.length < 2 || U.length < 2) + function P(Y, z, q, ee, ce) { + let Oe = 1, we = Y.length, Ne = z.length; + if (ee !== void 0 && (ee = String(ee).toLowerCase(), ee === "ucs2" || ee === "ucs-2" || ee === "utf16le" || ee === "utf-16le")) { + if (Y.length < 2 || z.length < 2) return -1; - Te = 2, Se /= 2, $e /= 2, Q /= 2; + Oe = 2, we /= 2, Ne /= 2, q /= 2; } - function Ie(Ue, ut) { - return Te === 1 ? Ue[ut] : Ue.readUInt16BE(ut * Te); + function Pe(Ue, at) { + return Oe === 1 ? Ue[at] : Ue.readUInt16BE(at * Oe); } - let ct; - if (he) { + let lt; + if (ce) { let Ue = -1; - for (ct = Q; ct < Se; ct++) - if (Ie(H, ct) === Ie(U, Ue === -1 ? 0 : ct - Ue)) { - if (Ue === -1 && (Ue = ct), ct - Ue + 1 === $e) - return Ue * Te; + for (lt = q; lt < we; lt++) + if (Pe(Y, lt) === Pe(z, Ue === -1 ? 0 : lt - Ue)) { + if (Ue === -1 && (Ue = lt), lt - Ue + 1 === Ne) + return Ue * Oe; } else - Ue !== -1 && (ct -= ct - Ue), Ue = -1; + Ue !== -1 && (lt -= lt - Ue), Ue = -1; } else - for (Q + $e > Se && (Q = Se - $e), ct = Q; ct >= 0; ct--) { + for (q + Ne > we && (q = we - Ne), lt = q; lt >= 0; lt--) { let Ue = !0; - for (let ut = 0; ut < $e; ut++) - if (Ie(H, ct + ut) !== Ie(U, ut)) { + for (let at = 0; at < Ne; at++) + if (Pe(Y, lt + at) !== Pe(z, at)) { Ue = !1; break; } if (Ue) - return ct; + return lt; } return -1; } - h.prototype.includes = function(U, Q, te) { - return this.indexOf(U, Q, te) !== -1; - }, h.prototype.indexOf = function(U, Q, te) { - return E(this, U, Q, te, !0); - }, h.prototype.lastIndexOf = function(U, Q, te) { - return E(this, U, Q, te, !1); + h.prototype.includes = function(z, q, ee) { + return this.indexOf(z, q, ee) !== -1; + }, h.prototype.indexOf = function(z, q, ee) { + return E(this, z, q, ee, !0); + }, h.prototype.lastIndexOf = function(z, q, ee) { + return E(this, z, q, ee, !1); }; - function P(H, U, Q, te) { - Q = Number(Q) || 0; - const he = H.length - Q; - te ? (te = Number(te), te > he && (te = he)) : te = he; - const Te = U.length; - te > Te / 2 && (te = Te / 2); - let Se; - for (Se = 0; Se < te; ++Se) { - const $e = parseInt(U.substr(Se * 2, 2), 16); - if (ve($e)) - return Se; - H[Q + Se] = $e; - } - return Se; - } - function L(H, U, Q, te) { - return Re(je(U, H.length - Q), H, Q, te); - } - function F(H, U, Q, te) { - return Re(at(U), H, Q, te); - } - function k(H, U, Q, te) { - return Re(Ge(U), H, Q, te); - } - function B(H, U, Q, te) { - return Re(tt(U, H.length - Q), H, Q, te); - } - h.prototype.write = function(U, Q, te, he) { - if (Q === void 0) - he = "utf8", te = this.length, Q = 0; - else if (te === void 0 && typeof Q == "string") - he = Q, te = this.length, Q = 0; - else if (isFinite(Q)) - Q = Q >>> 0, isFinite(te) ? (te = te >>> 0, he === void 0 && (he = "utf8")) : (he = te, te = void 0); + function L(Y, z, q, ee) { + q = Number(q) || 0; + const ce = Y.length - q; + ee ? (ee = Number(ee), ee > ce && (ee = ce)) : ee = ce; + const Oe = z.length; + ee > Oe / 2 && (ee = Oe / 2); + let we; + for (we = 0; we < ee; ++we) { + const Ne = parseInt(z.substr(we * 2, 2), 16); + if (pe(Ne)) + return we; + Y[q + we] = Ne; + } + return we; + } + function D(Y, z, q, ee) { + return Ee(et(z, Y.length - q), Y, q, ee); + } + function F(Y, z, q, ee) { + return Ee(rt(z), Y, q, ee); + } + function k(Y, z, q, ee) { + return Ee(Ye(z), Y, q, ee); + } + function I(Y, z, q, ee) { + return Ee(ft(z, Y.length - q), Y, q, ee); + } + h.prototype.write = function(z, q, ee, ce) { + if (q === void 0) + ce = "utf8", ee = this.length, q = 0; + else if (ee === void 0 && typeof q == "string") + ce = q, ee = this.length, q = 0; + else if (isFinite(q)) + q = q >>> 0, isFinite(ee) ? (ee = ee >>> 0, ce === void 0 && (ce = "utf8")) : (ce = ee, ee = void 0); else throw new Error( "Buffer.write(string, encoding, offset[, length]) is no longer supported" ); - const Te = this.length - Q; - if ((te === void 0 || te > Te) && (te = Te), U.length > 0 && (te < 0 || Q < 0) || Q > this.length) + const Oe = this.length - q; + if ((ee === void 0 || ee > Oe) && (ee = Oe), z.length > 0 && (ee < 0 || q < 0) || q > this.length) throw new RangeError("Attempt to write outside buffer bounds"); - he || (he = "utf8"); - let Se = !1; + ce || (ce = "utf8"); + let we = !1; for (; ; ) - switch (he) { + switch (ce) { case "hex": - return P(this, U, Q, te); + return L(this, z, q, ee); case "utf8": case "utf-8": - return L(this, U, Q, te); + return D(this, z, q, ee); case "ascii": case "latin1": case "binary": - return F(this, U, Q, te); + return F(this, z, q, ee); case "base64": - return k(this, U, Q, te); + return k(this, z, q, ee); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": - return B(this, U, Q, te); + return I(this, z, q, ee); default: - if (Se) - throw new TypeError("Unknown encoding: " + he); - he = ("" + he).toLowerCase(), Se = !0; + if (we) + throw new TypeError("Unknown encoding: " + ce); + ce = ("" + ce).toLowerCase(), we = !0; } }, h.prototype.toJSON = function() { return { @@ -17498,534 +17498,534 @@ wB.write = function(t, e, r, n, i, s) { data: Array.prototype.slice.call(this._arr || this, 0) }; }; - function A(H, U, Q) { - return U === 0 && Q === H.length ? e.fromByteArray(H) : e.fromByteArray(H.slice(U, Q)); - } - function M(H, U, Q) { - Q = Math.min(H.length, Q); - const te = []; - let he = U; - for (; he < Q; ) { - const Te = H[he]; - let Se = null, $e = Te > 239 ? 4 : Te > 223 ? 3 : Te > 191 ? 2 : 1; - if (he + $e <= Q) { - let Ie, ct, Ue, ut; - switch ($e) { + function _(Y, z, q) { + return z === 0 && q === Y.length ? e.fromByteArray(Y) : e.fromByteArray(Y.slice(z, q)); + } + function R(Y, z, q) { + q = Math.min(Y.length, q); + const ee = []; + let ce = z; + for (; ce < q; ) { + const Oe = Y[ce]; + let we = null, Ne = Oe > 239 ? 4 : Oe > 223 ? 3 : Oe > 191 ? 2 : 1; + if (ce + Ne <= q) { + let Pe, lt, Ue, at; + switch (Ne) { case 1: - Te < 128 && (Se = Te); + Oe < 128 && (we = Oe); break; case 2: - Ie = H[he + 1], (Ie & 192) === 128 && (ut = (Te & 31) << 6 | Ie & 63, ut > 127 && (Se = ut)); + Pe = Y[ce + 1], (Pe & 192) === 128 && (at = (Oe & 31) << 6 | Pe & 63, at > 127 && (we = at)); break; case 3: - Ie = H[he + 1], ct = H[he + 2], (Ie & 192) === 128 && (ct & 192) === 128 && (ut = (Te & 15) << 12 | (Ie & 63) << 6 | ct & 63, ut > 2047 && (ut < 55296 || ut > 57343) && (Se = ut)); + Pe = Y[ce + 1], lt = Y[ce + 2], (Pe & 192) === 128 && (lt & 192) === 128 && (at = (Oe & 15) << 12 | (Pe & 63) << 6 | lt & 63, at > 2047 && (at < 55296 || at > 57343) && (we = at)); break; case 4: - Ie = H[he + 1], ct = H[he + 2], Ue = H[he + 3], (Ie & 192) === 128 && (ct & 192) === 128 && (Ue & 192) === 128 && (ut = (Te & 15) << 18 | (Ie & 63) << 12 | (ct & 63) << 6 | Ue & 63, ut > 65535 && ut < 1114112 && (Se = ut)); + Pe = Y[ce + 1], lt = Y[ce + 2], Ue = Y[ce + 3], (Pe & 192) === 128 && (lt & 192) === 128 && (Ue & 192) === 128 && (at = (Oe & 15) << 18 | (Pe & 63) << 12 | (lt & 63) << 6 | Ue & 63, at > 65535 && at < 1114112 && (we = at)); } } - Se === null ? (Se = 65533, $e = 1) : Se > 65535 && (Se -= 65536, te.push(Se >>> 10 & 1023 | 55296), Se = 56320 | Se & 1023), te.push(Se), he += $e; + we === null ? (we = 65533, Ne = 1) : we > 65535 && (we -= 65536, ee.push(we >>> 10 & 1023 | 55296), we = 56320 | we & 1023), ee.push(we), ce += Ne; } - return q(te); + return $(ee); } - const I = 4096; - function q(H) { - const U = H.length; - if (U <= I) - return String.fromCharCode.apply(String, H); - let Q = "", te = 0; - for (; te < U; ) - Q += String.fromCharCode.apply( + const N = 4096; + function $(Y) { + const z = Y.length; + if (z <= N) + return String.fromCharCode.apply(String, Y); + let q = "", ee = 0; + for (; ee < z; ) + q += String.fromCharCode.apply( String, - H.slice(te, te += I) + Y.slice(ee, ee += N) ); - return Q; + return q; + } + function V(Y, z, q) { + let ee = ""; + q = Math.min(Y.length, q); + for (let ce = z; ce < q; ++ce) + ee += String.fromCharCode(Y[ce] & 127); + return ee; + } + function U(Y, z, q) { + let ee = ""; + q = Math.min(Y.length, q); + for (let ce = z; ce < q; ++ce) + ee += String.fromCharCode(Y[ce]); + return ee; + } + function X(Y, z, q) { + const ee = Y.length; + (!z || z < 0) && (z = 0), (!q || q < 0 || q > ee) && (q = ee); + let ce = ""; + for (let Oe = z; Oe < q; ++Oe) + ce += Te[Y[Oe]]; + return ce; + } + function j(Y, z, q) { + const ee = Y.slice(z, q); + let ce = ""; + for (let Oe = 0; Oe < ee.length - 1; Oe += 2) + ce += String.fromCharCode(ee[Oe] + ee[Oe + 1] * 256); + return ce; } - function Y(H, U, Q) { - let te = ""; - Q = Math.min(H.length, Q); - for (let he = U; he < Q; ++he) - te += String.fromCharCode(H[he] & 127); - return te; - } - function W(H, U, Q) { - let te = ""; - Q = Math.min(H.length, Q); - for (let he = U; he < Q; ++he) - te += String.fromCharCode(H[he]); - return te; - } - function Z(H, U, Q) { - const te = H.length; - (!U || U < 0) && (U = 0), (!Q || Q < 0 || Q > te) && (Q = te); - let he = ""; - for (let Te = U; Te < Q; ++Te) - he += Ee[H[Te]]; - return he; - } - function K(H, U, Q) { - const te = H.slice(U, Q); - let he = ""; - for (let Te = 0; Te < te.length - 1; Te += 2) - he += String.fromCharCode(te[Te] + te[Te + 1] * 256); - return he; - } - h.prototype.slice = function(U, Q) { - const te = this.length; - U = ~~U, Q = Q === void 0 ? te : ~~Q, U < 0 ? (U += te, U < 0 && (U = 0)) : U > te && (U = te), Q < 0 ? (Q += te, Q < 0 && (Q = 0)) : Q > te && (Q = te), Q < U && (Q = U); - const he = this.subarray(U, Q); - return Object.setPrototypeOf(he, h.prototype), he; + h.prototype.slice = function(z, q) { + const ee = this.length; + z = ~~z, q = q === void 0 ? ee : ~~q, z < 0 ? (z += ee, z < 0 && (z = 0)) : z > ee && (z = ee), q < 0 ? (q += ee, q < 0 && (q = 0)) : q > ee && (q = ee), q < z && (q = z); + const ce = this.subarray(z, q); + return Object.setPrototypeOf(ce, h.prototype), ce; }; - function re(H, U, Q) { - if (H % 1 !== 0 || H < 0) + function te(Y, z, q) { + if (Y % 1 !== 0 || Y < 0) throw new RangeError("offset is not uint"); - if (H + U > Q) + if (Y + z > q) throw new RangeError("Trying to access beyond buffer length"); } - h.prototype.readUintLE = h.prototype.readUIntLE = function(U, Q, te) { - U = U >>> 0, Q = Q >>> 0, te || re(U, Q, this.length); - let he = this[U], Te = 1, Se = 0; - for (; ++Se < Q && (Te *= 256); ) - he += this[U + Se] * Te; - return he; - }, h.prototype.readUintBE = h.prototype.readUIntBE = function(U, Q, te) { - U = U >>> 0, Q = Q >>> 0, te || re(U, Q, this.length); - let he = this[U + --Q], Te = 1; - for (; Q > 0 && (Te *= 256); ) - he += this[U + --Q] * Te; - return he; - }, h.prototype.readUint8 = h.prototype.readUInt8 = function(U, Q) { - return U = U >>> 0, Q || re(U, 1, this.length), this[U]; - }, h.prototype.readUint16LE = h.prototype.readUInt16LE = function(U, Q) { - return U = U >>> 0, Q || re(U, 2, this.length), this[U] | this[U + 1] << 8; - }, h.prototype.readUint16BE = h.prototype.readUInt16BE = function(U, Q) { - return U = U >>> 0, Q || re(U, 2, this.length), this[U] << 8 | this[U + 1]; - }, h.prototype.readUint32LE = h.prototype.readUInt32LE = function(U, Q) { - return U = U >>> 0, Q || re(U, 4, this.length), (this[U] | this[U + 1] << 8 | this[U + 2] << 16) + this[U + 3] * 16777216; - }, h.prototype.readUint32BE = h.prototype.readUInt32BE = function(U, Q) { - return U = U >>> 0, Q || re(U, 4, this.length), this[U] * 16777216 + (this[U + 1] << 16 | this[U + 2] << 8 | this[U + 3]); - }, h.prototype.readBigUInt64LE = de(function(U) { - U = U >>> 0, Ye(U, "offset"); - const Q = this[U], te = this[U + 7]; - (Q === void 0 || te === void 0) && Ce(U, this.length - 8); - const he = Q + this[++U] * 2 ** 8 + this[++U] * 2 ** 16 + this[++U] * 2 ** 24, Te = this[++U] + this[++U] * 2 ** 8 + this[++U] * 2 ** 16 + te * 2 ** 24; - return BigInt(he) + (BigInt(Te) << BigInt(32)); - }), h.prototype.readBigUInt64BE = de(function(U) { - U = U >>> 0, Ye(U, "offset"); - const Q = this[U], te = this[U + 7]; - (Q === void 0 || te === void 0) && Ce(U, this.length - 8); - const he = Q * 2 ** 24 + this[++U] * 2 ** 16 + this[++U] * 2 ** 8 + this[++U], Te = this[++U] * 2 ** 24 + this[++U] * 2 ** 16 + this[++U] * 2 ** 8 + te; - return (BigInt(he) << BigInt(32)) + BigInt(Te); - }), h.prototype.readIntLE = function(U, Q, te) { - U = U >>> 0, Q = Q >>> 0, te || re(U, Q, this.length); - let he = this[U], Te = 1, Se = 0; - for (; ++Se < Q && (Te *= 256); ) - he += this[U + Se] * Te; - return Te *= 128, he >= Te && (he -= Math.pow(2, 8 * Q)), he; - }, h.prototype.readIntBE = function(U, Q, te) { - U = U >>> 0, Q = Q >>> 0, te || re(U, Q, this.length); - let he = Q, Te = 1, Se = this[U + --he]; - for (; he > 0 && (Te *= 256); ) - Se += this[U + --he] * Te; - return Te *= 128, Se >= Te && (Se -= Math.pow(2, 8 * Q)), Se; - }, h.prototype.readInt8 = function(U, Q) { - return U = U >>> 0, Q || re(U, 1, this.length), this[U] & 128 ? (255 - this[U] + 1) * -1 : this[U]; - }, h.prototype.readInt16LE = function(U, Q) { - U = U >>> 0, Q || re(U, 2, this.length); - const te = this[U] | this[U + 1] << 8; - return te & 32768 ? te | 4294901760 : te; - }, h.prototype.readInt16BE = function(U, Q) { - U = U >>> 0, Q || re(U, 2, this.length); - const te = this[U + 1] | this[U] << 8; - return te & 32768 ? te | 4294901760 : te; - }, h.prototype.readInt32LE = function(U, Q) { - return U = U >>> 0, Q || re(U, 4, this.length), this[U] | this[U + 1] << 8 | this[U + 2] << 16 | this[U + 3] << 24; - }, h.prototype.readInt32BE = function(U, Q) { - return U = U >>> 0, Q || re(U, 4, this.length), this[U] << 24 | this[U + 1] << 16 | this[U + 2] << 8 | this[U + 3]; - }, h.prototype.readBigInt64LE = de(function(U) { - U = U >>> 0, Ye(U, "offset"); - const Q = this[U], te = this[U + 7]; - (Q === void 0 || te === void 0) && Ce(U, this.length - 8); - const he = this[U + 4] + this[U + 5] * 2 ** 8 + this[U + 6] * 2 ** 16 + (te << 24); - return (BigInt(he) << BigInt(32)) + BigInt(Q + this[++U] * 2 ** 8 + this[++U] * 2 ** 16 + this[++U] * 2 ** 24); - }), h.prototype.readBigInt64BE = de(function(U) { - U = U >>> 0, Ye(U, "offset"); - const Q = this[U], te = this[U + 7]; - (Q === void 0 || te === void 0) && Ce(U, this.length - 8); - const he = (Q << 24) + this[++U] * 2 ** 16 + this[++U] * 2 ** 8 + this[++U]; - return (BigInt(he) << BigInt(32)) + BigInt(this[++U] * 2 ** 24 + this[++U] * 2 ** 16 + this[++U] * 2 ** 8 + te); - }), h.prototype.readFloatLE = function(U, Q) { - return U = U >>> 0, Q || re(U, 4, this.length), r.read(this, U, !0, 23, 4); - }, h.prototype.readFloatBE = function(U, Q) { - return U = U >>> 0, Q || re(U, 4, this.length), r.read(this, U, !1, 23, 4); - }, h.prototype.readDoubleLE = function(U, Q) { - return U = U >>> 0, Q || re(U, 8, this.length), r.read(this, U, !0, 52, 8); - }, h.prototype.readDoubleBE = function(U, Q) { - return U = U >>> 0, Q || re(U, 8, this.length), r.read(this, U, !1, 52, 8); + h.prototype.readUintLE = h.prototype.readUIntLE = function(z, q, ee) { + z = z >>> 0, q = q >>> 0, ee || te(z, q, this.length); + let ce = this[z], Oe = 1, we = 0; + for (; ++we < q && (Oe *= 256); ) + ce += this[z + we] * Oe; + return ce; + }, h.prototype.readUintBE = h.prototype.readUIntBE = function(z, q, ee) { + z = z >>> 0, q = q >>> 0, ee || te(z, q, this.length); + let ce = this[z + --q], Oe = 1; + for (; q > 0 && (Oe *= 256); ) + ce += this[z + --q] * Oe; + return ce; + }, h.prototype.readUint8 = h.prototype.readUInt8 = function(z, q) { + return z = z >>> 0, q || te(z, 1, this.length), this[z]; + }, h.prototype.readUint16LE = h.prototype.readUInt16LE = function(z, q) { + return z = z >>> 0, q || te(z, 2, this.length), this[z] | this[z + 1] << 8; + }, h.prototype.readUint16BE = h.prototype.readUInt16BE = function(z, q) { + return z = z >>> 0, q || te(z, 2, this.length), this[z] << 8 | this[z + 1]; + }, h.prototype.readUint32LE = h.prototype.readUInt32LE = function(z, q) { + return z = z >>> 0, q || te(z, 4, this.length), (this[z] | this[z + 1] << 8 | this[z + 2] << 16) + this[z + 3] * 16777216; + }, h.prototype.readUint32BE = h.prototype.readUInt32BE = function(z, q) { + return z = z >>> 0, q || te(z, 4, this.length), this[z] * 16777216 + (this[z + 1] << 16 | this[z + 2] << 8 | this[z + 3]); + }, h.prototype.readBigUInt64LE = he(function(z) { + z = z >>> 0, Ve(z, "offset"); + const q = this[z], ee = this[z + 7]; + (q === void 0 || ee === void 0) && Se(z, this.length - 8); + const ce = q + this[++z] * 2 ** 8 + this[++z] * 2 ** 16 + this[++z] * 2 ** 24, Oe = this[++z] + this[++z] * 2 ** 8 + this[++z] * 2 ** 16 + ee * 2 ** 24; + return BigInt(ce) + (BigInt(Oe) << BigInt(32)); + }), h.prototype.readBigUInt64BE = he(function(z) { + z = z >>> 0, Ve(z, "offset"); + const q = this[z], ee = this[z + 7]; + (q === void 0 || ee === void 0) && Se(z, this.length - 8); + const ce = q * 2 ** 24 + this[++z] * 2 ** 16 + this[++z] * 2 ** 8 + this[++z], Oe = this[++z] * 2 ** 24 + this[++z] * 2 ** 16 + this[++z] * 2 ** 8 + ee; + return (BigInt(ce) << BigInt(32)) + BigInt(Oe); + }), h.prototype.readIntLE = function(z, q, ee) { + z = z >>> 0, q = q >>> 0, ee || te(z, q, this.length); + let ce = this[z], Oe = 1, we = 0; + for (; ++we < q && (Oe *= 256); ) + ce += this[z + we] * Oe; + return Oe *= 128, ce >= Oe && (ce -= Math.pow(2, 8 * q)), ce; + }, h.prototype.readIntBE = function(z, q, ee) { + z = z >>> 0, q = q >>> 0, ee || te(z, q, this.length); + let ce = q, Oe = 1, we = this[z + --ce]; + for (; ce > 0 && (Oe *= 256); ) + we += this[z + --ce] * Oe; + return Oe *= 128, we >= Oe && (we -= Math.pow(2, 8 * q)), we; + }, h.prototype.readInt8 = function(z, q) { + return z = z >>> 0, q || te(z, 1, this.length), this[z] & 128 ? (255 - this[z] + 1) * -1 : this[z]; + }, h.prototype.readInt16LE = function(z, q) { + z = z >>> 0, q || te(z, 2, this.length); + const ee = this[z] | this[z + 1] << 8; + return ee & 32768 ? ee | 4294901760 : ee; + }, h.prototype.readInt16BE = function(z, q) { + z = z >>> 0, q || te(z, 2, this.length); + const ee = this[z + 1] | this[z] << 8; + return ee & 32768 ? ee | 4294901760 : ee; + }, h.prototype.readInt32LE = function(z, q) { + return z = z >>> 0, q || te(z, 4, this.length), this[z] | this[z + 1] << 8 | this[z + 2] << 16 | this[z + 3] << 24; + }, h.prototype.readInt32BE = function(z, q) { + return z = z >>> 0, q || te(z, 4, this.length), this[z] << 24 | this[z + 1] << 16 | this[z + 2] << 8 | this[z + 3]; + }, h.prototype.readBigInt64LE = he(function(z) { + z = z >>> 0, Ve(z, "offset"); + const q = this[z], ee = this[z + 7]; + (q === void 0 || ee === void 0) && Se(z, this.length - 8); + const ce = this[z + 4] + this[z + 5] * 2 ** 8 + this[z + 6] * 2 ** 16 + (ee << 24); + return (BigInt(ce) << BigInt(32)) + BigInt(q + this[++z] * 2 ** 8 + this[++z] * 2 ** 16 + this[++z] * 2 ** 24); + }), h.prototype.readBigInt64BE = he(function(z) { + z = z >>> 0, Ve(z, "offset"); + const q = this[z], ee = this[z + 7]; + (q === void 0 || ee === void 0) && Se(z, this.length - 8); + const ce = (q << 24) + this[++z] * 2 ** 16 + this[++z] * 2 ** 8 + this[++z]; + return (BigInt(ce) << BigInt(32)) + BigInt(this[++z] * 2 ** 24 + this[++z] * 2 ** 16 + this[++z] * 2 ** 8 + ee); + }), h.prototype.readFloatLE = function(z, q) { + return z = z >>> 0, q || te(z, 4, this.length), r.read(this, z, !0, 23, 4); + }, h.prototype.readFloatBE = function(z, q) { + return z = z >>> 0, q || te(z, 4, this.length), r.read(this, z, !1, 23, 4); + }, h.prototype.readDoubleLE = function(z, q) { + return z = z >>> 0, q || te(z, 8, this.length), r.read(this, z, !0, 52, 8); + }, h.prototype.readDoubleBE = function(z, q) { + return z = z >>> 0, q || te(z, 8, this.length), r.read(this, z, !1, 52, 8); }; - function pe(H, U, Q, te, he, Te) { - if (!h.isBuffer(H)) + function fe(Y, z, q, ee, ce, Oe) { + if (!h.isBuffer(Y)) throw new TypeError('"buffer" argument must be a Buffer instance'); - if (U > he || U < Te) + if (z > ce || z < Oe) throw new RangeError('"value" argument is out of bounds'); - if (Q + te > H.length) + if (q + ee > Y.length) throw new RangeError("Index out of range"); } - h.prototype.writeUintLE = h.prototype.writeUIntLE = function(U, Q, te, he) { - if (U = +U, Q = Q >>> 0, te = te >>> 0, !he) { - const $e = Math.pow(2, 8 * te) - 1; - pe(this, U, Q, te, $e, 0); - } - let Te = 1, Se = 0; - for (this[Q] = U & 255; ++Se < te && (Te *= 256); ) - this[Q + Se] = U / Te & 255; - return Q + te; - }, h.prototype.writeUintBE = h.prototype.writeUIntBE = function(U, Q, te, he) { - if (U = +U, Q = Q >>> 0, te = te >>> 0, !he) { - const $e = Math.pow(2, 8 * te) - 1; - pe(this, U, Q, te, $e, 0); - } - let Te = te - 1, Se = 1; - for (this[Q + Te] = U & 255; --Te >= 0 && (Se *= 256); ) - this[Q + Te] = U / Se & 255; - return Q + te; - }, h.prototype.writeUint8 = h.prototype.writeUInt8 = function(U, Q, te) { - return U = +U, Q = Q >>> 0, te || pe(this, U, Q, 1, 255, 0), this[Q] = U & 255, Q + 1; - }, h.prototype.writeUint16LE = h.prototype.writeUInt16LE = function(U, Q, te) { - return U = +U, Q = Q >>> 0, te || pe(this, U, Q, 2, 65535, 0), this[Q] = U & 255, this[Q + 1] = U >>> 8, Q + 2; - }, h.prototype.writeUint16BE = h.prototype.writeUInt16BE = function(U, Q, te) { - return U = +U, Q = Q >>> 0, te || pe(this, U, Q, 2, 65535, 0), this[Q] = U >>> 8, this[Q + 1] = U & 255, Q + 2; - }, h.prototype.writeUint32LE = h.prototype.writeUInt32LE = function(U, Q, te) { - return U = +U, Q = Q >>> 0, te || pe(this, U, Q, 4, 4294967295, 0), this[Q + 3] = U >>> 24, this[Q + 2] = U >>> 16, this[Q + 1] = U >>> 8, this[Q] = U & 255, Q + 4; - }, h.prototype.writeUint32BE = h.prototype.writeUInt32BE = function(U, Q, te) { - return U = +U, Q = Q >>> 0, te || pe(this, U, Q, 4, 4294967295, 0), this[Q] = U >>> 24, this[Q + 1] = U >>> 16, this[Q + 2] = U >>> 8, this[Q + 3] = U & 255, Q + 4; + h.prototype.writeUintLE = h.prototype.writeUIntLE = function(z, q, ee, ce) { + if (z = +z, q = q >>> 0, ee = ee >>> 0, !ce) { + const Ne = Math.pow(2, 8 * ee) - 1; + fe(this, z, q, ee, Ne, 0); + } + let Oe = 1, we = 0; + for (this[q] = z & 255; ++we < ee && (Oe *= 256); ) + this[q + we] = z / Oe & 255; + return q + ee; + }, h.prototype.writeUintBE = h.prototype.writeUIntBE = function(z, q, ee, ce) { + if (z = +z, q = q >>> 0, ee = ee >>> 0, !ce) { + const Ne = Math.pow(2, 8 * ee) - 1; + fe(this, z, q, ee, Ne, 0); + } + let Oe = ee - 1, we = 1; + for (this[q + Oe] = z & 255; --Oe >= 0 && (we *= 256); ) + this[q + Oe] = z / we & 255; + return q + ee; + }, h.prototype.writeUint8 = h.prototype.writeUInt8 = function(z, q, ee) { + return z = +z, q = q >>> 0, ee || fe(this, z, q, 1, 255, 0), this[q] = z & 255, q + 1; + }, h.prototype.writeUint16LE = h.prototype.writeUInt16LE = function(z, q, ee) { + return z = +z, q = q >>> 0, ee || fe(this, z, q, 2, 65535, 0), this[q] = z & 255, this[q + 1] = z >>> 8, q + 2; + }, h.prototype.writeUint16BE = h.prototype.writeUInt16BE = function(z, q, ee) { + return z = +z, q = q >>> 0, ee || fe(this, z, q, 2, 65535, 0), this[q] = z >>> 8, this[q + 1] = z & 255, q + 2; + }, h.prototype.writeUint32LE = h.prototype.writeUInt32LE = function(z, q, ee) { + return z = +z, q = q >>> 0, ee || fe(this, z, q, 4, 4294967295, 0), this[q + 3] = z >>> 24, this[q + 2] = z >>> 16, this[q + 1] = z >>> 8, this[q] = z & 255, q + 4; + }, h.prototype.writeUint32BE = h.prototype.writeUInt32BE = function(z, q, ee) { + return z = +z, q = q >>> 0, ee || fe(this, z, q, 4, 4294967295, 0), this[q] = z >>> 24, this[q + 1] = z >>> 16, this[q + 2] = z >>> 8, this[q + 3] = z & 255, q + 4; }; - function ne(H, U, Q, te, he) { - fe(U, te, he, H, Q, 7); - let Te = Number(U & BigInt(4294967295)); - H[Q++] = Te, Te = Te >> 8, H[Q++] = Te, Te = Te >> 8, H[Q++] = Te, Te = Te >> 8, H[Q++] = Te; - let Se = Number(U >> BigInt(32) & BigInt(4294967295)); - return H[Q++] = Se, Se = Se >> 8, H[Q++] = Se, Se = Se >> 8, H[Q++] = Se, Se = Se >> 8, H[Q++] = Se, Q; - } - function le(H, U, Q, te, he) { - fe(U, te, he, H, Q, 7); - let Te = Number(U & BigInt(4294967295)); - H[Q + 7] = Te, Te = Te >> 8, H[Q + 6] = Te, Te = Te >> 8, H[Q + 5] = Te, Te = Te >> 8, H[Q + 4] = Te; - let Se = Number(U >> BigInt(32) & BigInt(4294967295)); - return H[Q + 3] = Se, Se = Se >> 8, H[Q + 2] = Se, Se = Se >> 8, H[Q + 1] = Se, Se = Se >> 8, H[Q] = Se, Q + 8; - } - h.prototype.writeBigUInt64LE = de(function(U, Q = 0) { - return ne(this, U, Q, BigInt(0), BigInt("0xffffffffffffffff")); - }), h.prototype.writeBigUInt64BE = de(function(U, Q = 0) { - return le(this, U, Q, BigInt(0), BigInt("0xffffffffffffffff")); - }), h.prototype.writeIntLE = function(U, Q, te, he) { - if (U = +U, Q = Q >>> 0, !he) { - const Ie = Math.pow(2, 8 * te - 1); - pe(this, U, Q, te, Ie - 1, -Ie); - } - let Te = 0, Se = 1, $e = 0; - for (this[Q] = U & 255; ++Te < te && (Se *= 256); ) - U < 0 && $e === 0 && this[Q + Te - 1] !== 0 && ($e = 1), this[Q + Te] = (U / Se >> 0) - $e & 255; - return Q + te; - }, h.prototype.writeIntBE = function(U, Q, te, he) { - if (U = +U, Q = Q >>> 0, !he) { - const Ie = Math.pow(2, 8 * te - 1); - pe(this, U, Q, te, Ie - 1, -Ie); - } - let Te = te - 1, Se = 1, $e = 0; - for (this[Q + Te] = U & 255; --Te >= 0 && (Se *= 256); ) - U < 0 && $e === 0 && this[Q + Te + 1] !== 0 && ($e = 1), this[Q + Te] = (U / Se >> 0) - $e & 255; - return Q + te; - }, h.prototype.writeInt8 = function(U, Q, te) { - return U = +U, Q = Q >>> 0, te || pe(this, U, Q, 1, 127, -128), U < 0 && (U = 255 + U + 1), this[Q] = U & 255, Q + 1; - }, h.prototype.writeInt16LE = function(U, Q, te) { - return U = +U, Q = Q >>> 0, te || pe(this, U, Q, 2, 32767, -32768), this[Q] = U & 255, this[Q + 1] = U >>> 8, Q + 2; - }, h.prototype.writeInt16BE = function(U, Q, te) { - return U = +U, Q = Q >>> 0, te || pe(this, U, Q, 2, 32767, -32768), this[Q] = U >>> 8, this[Q + 1] = U & 255, Q + 2; - }, h.prototype.writeInt32LE = function(U, Q, te) { - return U = +U, Q = Q >>> 0, te || pe(this, U, Q, 4, 2147483647, -2147483648), this[Q] = U & 255, this[Q + 1] = U >>> 8, this[Q + 2] = U >>> 16, this[Q + 3] = U >>> 24, Q + 4; - }, h.prototype.writeInt32BE = function(U, Q, te) { - return U = +U, Q = Q >>> 0, te || pe(this, U, Q, 4, 2147483647, -2147483648), U < 0 && (U = 4294967295 + U + 1), this[Q] = U >>> 24, this[Q + 1] = U >>> 16, this[Q + 2] = U >>> 8, this[Q + 3] = U & 255, Q + 4; - }, h.prototype.writeBigInt64LE = de(function(U, Q = 0) { - return ne(this, U, Q, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); - }), h.prototype.writeBigInt64BE = de(function(U, Q = 0) { - return le(this, U, Q, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); + function re(Y, z, q, ee, ce) { + ue(z, ee, ce, Y, q, 7); + let Oe = Number(z & BigInt(4294967295)); + Y[q++] = Oe, Oe = Oe >> 8, Y[q++] = Oe, Oe = Oe >> 8, Y[q++] = Oe, Oe = Oe >> 8, Y[q++] = Oe; + let we = Number(z >> BigInt(32) & BigInt(4294967295)); + return Y[q++] = we, we = we >> 8, Y[q++] = we, we = we >> 8, Y[q++] = we, we = we >> 8, Y[q++] = we, q; + } + function ae(Y, z, q, ee, ce) { + ue(z, ee, ce, Y, q, 7); + let Oe = Number(z & BigInt(4294967295)); + Y[q + 7] = Oe, Oe = Oe >> 8, Y[q + 6] = Oe, Oe = Oe >> 8, Y[q + 5] = Oe, Oe = Oe >> 8, Y[q + 4] = Oe; + let we = Number(z >> BigInt(32) & BigInt(4294967295)); + return Y[q + 3] = we, we = we >> 8, Y[q + 2] = we, we = we >> 8, Y[q + 1] = we, we = we >> 8, Y[q] = we, q + 8; + } + h.prototype.writeBigUInt64LE = he(function(z, q = 0) { + return re(this, z, q, BigInt(0), BigInt("0xffffffffffffffff")); + }), h.prototype.writeBigUInt64BE = he(function(z, q = 0) { + return ae(this, z, q, BigInt(0), BigInt("0xffffffffffffffff")); + }), h.prototype.writeIntLE = function(z, q, ee, ce) { + if (z = +z, q = q >>> 0, !ce) { + const Pe = Math.pow(2, 8 * ee - 1); + fe(this, z, q, ee, Pe - 1, -Pe); + } + let Oe = 0, we = 1, Ne = 0; + for (this[q] = z & 255; ++Oe < ee && (we *= 256); ) + z < 0 && Ne === 0 && this[q + Oe - 1] !== 0 && (Ne = 1), this[q + Oe] = (z / we >> 0) - Ne & 255; + return q + ee; + }, h.prototype.writeIntBE = function(z, q, ee, ce) { + if (z = +z, q = q >>> 0, !ce) { + const Pe = Math.pow(2, 8 * ee - 1); + fe(this, z, q, ee, Pe - 1, -Pe); + } + let Oe = ee - 1, we = 1, Ne = 0; + for (this[q + Oe] = z & 255; --Oe >= 0 && (we *= 256); ) + z < 0 && Ne === 0 && this[q + Oe + 1] !== 0 && (Ne = 1), this[q + Oe] = (z / we >> 0) - Ne & 255; + return q + ee; + }, h.prototype.writeInt8 = function(z, q, ee) { + return z = +z, q = q >>> 0, ee || fe(this, z, q, 1, 127, -128), z < 0 && (z = 255 + z + 1), this[q] = z & 255, q + 1; + }, h.prototype.writeInt16LE = function(z, q, ee) { + return z = +z, q = q >>> 0, ee || fe(this, z, q, 2, 32767, -32768), this[q] = z & 255, this[q + 1] = z >>> 8, q + 2; + }, h.prototype.writeInt16BE = function(z, q, ee) { + return z = +z, q = q >>> 0, ee || fe(this, z, q, 2, 32767, -32768), this[q] = z >>> 8, this[q + 1] = z & 255, q + 2; + }, h.prototype.writeInt32LE = function(z, q, ee) { + return z = +z, q = q >>> 0, ee || fe(this, z, q, 4, 2147483647, -2147483648), this[q] = z & 255, this[q + 1] = z >>> 8, this[q + 2] = z >>> 16, this[q + 3] = z >>> 24, q + 4; + }, h.prototype.writeInt32BE = function(z, q, ee) { + return z = +z, q = q >>> 0, ee || fe(this, z, q, 4, 2147483647, -2147483648), z < 0 && (z = 4294967295 + z + 1), this[q] = z >>> 24, this[q + 1] = z >>> 16, this[q + 2] = z >>> 8, this[q + 3] = z & 255, q + 4; + }, h.prototype.writeBigInt64LE = he(function(z, q = 0) { + return re(this, z, q, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); + }), h.prototype.writeBigInt64BE = he(function(z, q = 0) { + return ae(this, z, q, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); }); - function ge(H, U, Q, te, he, Te) { - if (Q + te > H.length) + function de(Y, z, q, ee, ce, Oe) { + if (q + ee > Y.length) throw new RangeError("Index out of range"); - if (Q < 0) + if (q < 0) throw new RangeError("Index out of range"); } - function j(H, U, Q, te, he) { - return U = +U, Q = Q >>> 0, he || ge(H, U, Q, 4), r.write(H, U, Q, te, 23, 4), Q + 4; + function H(Y, z, q, ee, ce) { + return z = +z, q = q >>> 0, ce || de(Y, z, q, 4), r.write(Y, z, q, ee, 23, 4), q + 4; } - h.prototype.writeFloatLE = function(U, Q, te) { - return j(this, U, Q, !0, te); - }, h.prototype.writeFloatBE = function(U, Q, te) { - return j(this, U, Q, !1, te); + h.prototype.writeFloatLE = function(z, q, ee) { + return H(this, z, q, !0, ee); + }, h.prototype.writeFloatBE = function(z, q, ee) { + return H(this, z, q, !1, ee); }; - function oe(H, U, Q, te, he) { - return U = +U, Q = Q >>> 0, he || ge(H, U, Q, 8), r.write(H, U, Q, te, 52, 8), Q + 8; - } - h.prototype.writeDoubleLE = function(U, Q, te) { - return oe(this, U, Q, !0, te); - }, h.prototype.writeDoubleBE = function(U, Q, te) { - return oe(this, U, Q, !1, te); - }, h.prototype.copy = function(U, Q, te, he) { - if (!h.isBuffer(U)) + function se(Y, z, q, ee, ce) { + return z = +z, q = q >>> 0, ce || de(Y, z, q, 8), r.write(Y, z, q, ee, 52, 8), q + 8; + } + h.prototype.writeDoubleLE = function(z, q, ee) { + return se(this, z, q, !0, ee); + }, h.prototype.writeDoubleBE = function(z, q, ee) { + return se(this, z, q, !1, ee); + }, h.prototype.copy = function(z, q, ee, ce) { + if (!h.isBuffer(z)) throw new TypeError("argument should be a Buffer"); - if (te || (te = 0), !he && he !== 0 && (he = this.length), Q >= U.length && (Q = U.length), Q || (Q = 0), he > 0 && he < te && (he = te), he === te || U.length === 0 || this.length === 0) + if (ee || (ee = 0), !ce && ce !== 0 && (ce = this.length), q >= z.length && (q = z.length), q || (q = 0), ce > 0 && ce < ee && (ce = ee), ce === ee || z.length === 0 || this.length === 0) return 0; - if (Q < 0) + if (q < 0) throw new RangeError("targetStart out of bounds"); - if (te < 0 || te >= this.length) + if (ee < 0 || ee >= this.length) throw new RangeError("Index out of range"); - if (he < 0) + if (ce < 0) throw new RangeError("sourceEnd out of bounds"); - he > this.length && (he = this.length), U.length - Q < he - te && (he = U.length - Q + te); - const Te = he - te; - return this === U && typeof s.prototype.copyWithin == "function" ? this.copyWithin(Q, te, he) : s.prototype.set.call( - U, - this.subarray(te, he), - Q - ), Te; - }, h.prototype.fill = function(U, Q, te, he) { - if (typeof U == "string") { - if (typeof Q == "string" ? (he = Q, Q = 0, te = this.length) : typeof te == "string" && (he = te, te = this.length), he !== void 0 && typeof he != "string") + ce > this.length && (ce = this.length), z.length - q < ce - ee && (ce = z.length - q + ee); + const Oe = ce - ee; + return this === z && typeof s.prototype.copyWithin == "function" ? this.copyWithin(q, ee, ce) : s.prototype.set.call( + z, + this.subarray(ee, ce), + q + ), Oe; + }, h.prototype.fill = function(z, q, ee, ce) { + if (typeof z == "string") { + if (typeof q == "string" ? (ce = q, q = 0, ee = this.length) : typeof ee == "string" && (ce = ee, ee = this.length), ce !== void 0 && typeof ce != "string") throw new TypeError("encoding must be a string"); - if (typeof he == "string" && !h.isEncoding(he)) - throw new TypeError("Unknown encoding: " + he); - if (U.length === 1) { - const Se = U.charCodeAt(0); - (he === "utf8" && Se < 128 || he === "latin1") && (U = Se); + if (typeof ce == "string" && !h.isEncoding(ce)) + throw new TypeError("Unknown encoding: " + ce); + if (z.length === 1) { + const we = z.charCodeAt(0); + (ce === "utf8" && we < 128 || ce === "latin1") && (z = we); } } else - typeof U == "number" ? U = U & 255 : typeof U == "boolean" && (U = Number(U)); - if (Q < 0 || this.length < Q || this.length < te) + typeof z == "number" ? z = z & 255 : typeof z == "boolean" && (z = Number(z)); + if (q < 0 || this.length < q || this.length < ee) throw new RangeError("Out of range index"); - if (te <= Q) + if (ee <= q) return this; - Q = Q >>> 0, te = te === void 0 ? this.length : te >>> 0, U || (U = 0); - let Te; - if (typeof U == "number") - for (Te = Q; Te < te; ++Te) - this[Te] = U; + q = q >>> 0, ee = ee === void 0 ? this.length : ee >>> 0, z || (z = 0); + let Oe; + if (typeof z == "number") + for (Oe = q; Oe < ee; ++Oe) + this[Oe] = z; else { - const Se = h.isBuffer(U) ? U : h.from(U, he), $e = Se.length; - if ($e === 0) - throw new TypeError('The value "' + U + '" is invalid for argument "value"'); - for (Te = 0; Te < te - Q; ++Te) - this[Te + Q] = Se[Te % $e]; + const we = h.isBuffer(z) ? z : h.from(z, ce), Ne = we.length; + if (Ne === 0) + throw new TypeError('The value "' + z + '" is invalid for argument "value"'); + for (Oe = 0; Oe < ee - q; ++Oe) + this[Oe + q] = we[Oe % Ne]; } return this; }; - const ie = {}; - function ce(H, U, Q) { - ie[H] = class extends Q { + const ne = {}; + function oe(Y, z, q) { + ne[Y] = class extends q { constructor() { super(), Object.defineProperty(this, "message", { - value: U.apply(this, arguments), + value: z.apply(this, arguments), writable: !0, configurable: !0 - }), this.name = `${this.name} [${H}]`, this.stack, delete this.name; + }), this.name = `${this.name} [${Y}]`, this.stack, delete this.name; } get code() { - return H; + return Y; } - set code(he) { + set code(ce) { Object.defineProperty(this, "code", { configurable: !0, enumerable: !0, - value: he, + value: ce, writable: !0 }); } toString() { - return `${this.name} [${H}]: ${this.message}`; + return `${this.name} [${Y}]: ${this.message}`; } }; } - ce( + oe( "ERR_BUFFER_OUT_OF_BOUNDS", - function(H) { - return H ? `${H} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds"; + function(Y) { + return Y ? `${Y} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds"; }, RangeError - ), ce( + ), oe( "ERR_INVALID_ARG_TYPE", - function(H, U) { - return `The "${H}" argument must be of type number. Received type ${typeof U}`; + function(Y, z) { + return `The "${Y}" argument must be of type number. Received type ${typeof z}`; }, TypeError - ), ce( + ), oe( "ERR_OUT_OF_RANGE", - function(H, U, Q) { - let te = `The value of "${H}" is out of range.`, he = Q; - return Number.isInteger(Q) && Math.abs(Q) > 2 ** 32 ? he = we(String(Q)) : typeof Q == "bigint" && (he = String(Q), (Q > BigInt(2) ** BigInt(32) || Q < -(BigInt(2) ** BigInt(32))) && (he = we(he)), he += "n"), te += ` It must be ${U}. Received ${he}`, te; + function(Y, z, q) { + let ee = `The value of "${Y}" is out of range.`, ce = q; + return Number.isInteger(q) && Math.abs(q) > 2 ** 32 ? ce = ye(String(q)) : typeof q == "bigint" && (ce = String(q), (q > BigInt(2) ** BigInt(32) || q < -(BigInt(2) ** BigInt(32))) && (ce = ye(ce)), ce += "n"), ee += ` It must be ${z}. Received ${ce}`, ee; }, RangeError ); - function we(H) { - let U = "", Q = H.length; - const te = H[0] === "-" ? 1 : 0; - for (; Q >= te + 4; Q -= 3) - U = `_${H.slice(Q - 3, Q)}${U}`; - return `${H.slice(0, Q)}${U}`; - } - function xe(H, U, Q) { - Ye(U, "offset"), (H[U] === void 0 || H[U + Q] === void 0) && Ce(U, H.length - (Q + 1)); - } - function fe(H, U, Q, te, he, Te) { - if (H > Q || H < U) { - const Se = typeof U == "bigint" ? "n" : ""; - let $e; - throw Te > 3 ? U === 0 || U === BigInt(0) ? $e = `>= 0${Se} and < 2${Se} ** ${(Te + 1) * 8}${Se}` : $e = `>= -(2${Se} ** ${(Te + 1) * 8 - 1}${Se}) and < 2 ** ${(Te + 1) * 8 - 1}${Se}` : $e = `>= ${U}${Se} and <= ${Q}${Se}`, new ie.ERR_OUT_OF_RANGE("value", $e, H); - } - xe(te, he, Te); - } - function Ye(H, U) { - if (typeof H != "number") - throw new ie.ERR_INVALID_ARG_TYPE(U, "number", H); - } - function Ce(H, U, Q) { - throw Math.floor(H) !== H ? (Ye(H, Q), new ie.ERR_OUT_OF_RANGE(Q || "offset", "an integer", H)) : U < 0 ? new ie.ERR_BUFFER_OUT_OF_BOUNDS() : new ie.ERR_OUT_OF_RANGE( - Q || "offset", - `>= ${Q ? 1 : 0} and <= ${U}`, - H + function ye(Y) { + let z = "", q = Y.length; + const ee = Y[0] === "-" ? 1 : 0; + for (; q >= ee + 4; q -= 3) + z = `_${Y.slice(q - 3, q)}${z}`; + return `${Y.slice(0, q)}${z}`; + } + function ve(Y, z, q) { + Ve(z, "offset"), (Y[z] === void 0 || Y[z + q] === void 0) && Se(z, Y.length - (q + 1)); + } + function ue(Y, z, q, ee, ce, Oe) { + if (Y > q || Y < z) { + const we = typeof z == "bigint" ? "n" : ""; + let Ne; + throw Oe > 3 ? z === 0 || z === BigInt(0) ? Ne = `>= 0${we} and < 2${we} ** ${(Oe + 1) * 8}${we}` : Ne = `>= -(2${we} ** ${(Oe + 1) * 8 - 1}${we}) and < 2 ** ${(Oe + 1) * 8 - 1}${we}` : Ne = `>= ${z}${we} and <= ${q}${we}`, new ne.ERR_OUT_OF_RANGE("value", Ne, Y); + } + ve(ee, ce, Oe); + } + function Ve(Y, z) { + if (typeof Y != "number") + throw new ne.ERR_INVALID_ARG_TYPE(z, "number", Y); + } + function Se(Y, z, q) { + throw Math.floor(Y) !== Y ? (Ve(Y, q), new ne.ERR_OUT_OF_RANGE(q || "offset", "an integer", Y)) : z < 0 ? new ne.ERR_BUFFER_OUT_OF_BOUNDS() : new ne.ERR_OUT_OF_RANGE( + q || "offset", + `>= ${q ? 1 : 0} and <= ${z}`, + Y ); } - const Le = /[^+/0-9A-Za-z-_]/g; - function We(H) { - if (H = H.split("=")[0], H = H.trim().replace(Le, ""), H.length < 2) + const Me = /[^+/0-9A-Za-z-_]/g; + function We(Y) { + if (Y = Y.split("=")[0], Y = Y.trim().replace(Me, ""), Y.length < 2) return ""; - for (; H.length % 4 !== 0; ) - H = H + "="; - return H; + for (; Y.length % 4 !== 0; ) + Y = Y + "="; + return Y; } - function je(H, U) { - U = U || 1 / 0; - let Q; - const te = H.length; - let he = null; - const Te = []; - for (let Se = 0; Se < te; ++Se) { - if (Q = H.charCodeAt(Se), Q > 55295 && Q < 57344) { - if (!he) { - if (Q > 56319) { - (U -= 3) > -1 && Te.push(239, 191, 189); + function et(Y, z) { + z = z || 1 / 0; + let q; + const ee = Y.length; + let ce = null; + const Oe = []; + for (let we = 0; we < ee; ++we) { + if (q = Y.charCodeAt(we), q > 55295 && q < 57344) { + if (!ce) { + if (q > 56319) { + (z -= 3) > -1 && Oe.push(239, 191, 189); continue; - } else if (Se + 1 === te) { - (U -= 3) > -1 && Te.push(239, 191, 189); + } else if (we + 1 === ee) { + (z -= 3) > -1 && Oe.push(239, 191, 189); continue; } - he = Q; + ce = q; continue; } - if (Q < 56320) { - (U -= 3) > -1 && Te.push(239, 191, 189), he = Q; + if (q < 56320) { + (z -= 3) > -1 && Oe.push(239, 191, 189), ce = q; continue; } - Q = (he - 55296 << 10 | Q - 56320) + 65536; + q = (ce - 55296 << 10 | q - 56320) + 65536; } else - he && (U -= 3) > -1 && Te.push(239, 191, 189); - if (he = null, Q < 128) { - if ((U -= 1) < 0) + ce && (z -= 3) > -1 && Oe.push(239, 191, 189); + if (ce = null, q < 128) { + if ((z -= 1) < 0) break; - Te.push(Q); - } else if (Q < 2048) { - if ((U -= 2) < 0) + Oe.push(q); + } else if (q < 2048) { + if ((z -= 2) < 0) break; - Te.push( - Q >> 6 | 192, - Q & 63 | 128 + Oe.push( + q >> 6 | 192, + q & 63 | 128 ); - } else if (Q < 65536) { - if ((U -= 3) < 0) + } else if (q < 65536) { + if ((z -= 3) < 0) break; - Te.push( - Q >> 12 | 224, - Q >> 6 & 63 | 128, - Q & 63 | 128 + Oe.push( + q >> 12 | 224, + q >> 6 & 63 | 128, + q & 63 | 128 ); - } else if (Q < 1114112) { - if ((U -= 4) < 0) - break; - Te.push( - Q >> 18 | 240, - Q >> 12 & 63 | 128, - Q >> 6 & 63 | 128, - Q & 63 | 128 + } else if (q < 1114112) { + if ((z -= 4) < 0) + break; + Oe.push( + q >> 18 | 240, + q >> 12 & 63 | 128, + q >> 6 & 63 | 128, + q & 63 | 128 ); } else throw new Error("Invalid code point"); } - return Te; + return Oe; } - function at(H) { - const U = []; - for (let Q = 0; Q < H.length; ++Q) - U.push(H.charCodeAt(Q) & 255); - return U; + function rt(Y) { + const z = []; + for (let q = 0; q < Y.length; ++q) + z.push(Y.charCodeAt(q) & 255); + return z; } - function tt(H, U) { - let Q, te, he; - const Te = []; - for (let Se = 0; Se < H.length && !((U -= 2) < 0); ++Se) - Q = H.charCodeAt(Se), te = Q >> 8, he = Q % 256, Te.push(he), Te.push(te); - return Te; + function ft(Y, z) { + let q, ee, ce; + const Oe = []; + for (let we = 0; we < Y.length && !((z -= 2) < 0); ++we) + q = Y.charCodeAt(we), ee = q >> 8, ce = q % 256, Oe.push(ce), Oe.push(ee); + return Oe; } - function Ge(H) { - return e.toByteArray(We(H)); + function Ye(Y) { + return e.toByteArray(We(Y)); } - function Re(H, U, Q, te) { - let he; - for (he = 0; he < te && !(he + Q >= U.length || he >= H.length); ++he) - U[he + Q] = H[he]; - return he; + function Ee(Y, z, q, ee) { + let ce; + for (ce = 0; ce < ee && !(ce + q >= z.length || ce >= Y.length); ++ce) + z[ce + q] = Y[ce]; + return ce; } - function se(H, U) { - return H instanceof U || H != null && H.constructor != null && H.constructor.name != null && H.constructor.name === U.name; + function ie(Y, z) { + return Y instanceof z || Y != null && Y.constructor != null && Y.constructor.name != null && Y.constructor.name === z.name; } - function ve(H) { - return H !== H; + function pe(Y) { + return Y !== Y; } - const Ee = function() { - const H = "0123456789abcdef", U = new Array(256); - for (let Q = 0; Q < 16; ++Q) { - const te = Q * 16; - for (let he = 0; he < 16; ++he) - U[te + he] = H[Q] + H[he]; + const Te = function() { + const Y = "0123456789abcdef", z = new Array(256); + for (let q = 0; q < 16; ++q) { + const ee = q * 16; + for (let ce = 0; ce < 16; ++ce) + z[ee + ce] = Y[q] + Y[ce]; } - return U; + return z; }(); - function de(H) { - return typeof BigInt > "u" ? ke : H; + function he(Y) { + return typeof BigInt > "u" ? be : Y; } - function ke() { + function be() { throw new Error("BigInt not supported"); } -})(Ts); -const Hoe = Ts.Buffer; -Ts.Blob; -Ts.BlobOptions; -Ts.Buffer; -Ts.File; -Ts.FileOptions; -Ts.INSPECT_MAX_BYTES; -Ts.SlowBuffer; -Ts.TranscodeEncoding; -Ts.atob; -Ts.btoa; -Ts.constants; -Ts.isAscii; -Ts.isUtf8; -Ts.kMaxLength; -Ts.kStringMaxLength; -Ts.resolveObjectURL; -Ts.transcode; -const CY = (t) => t === void 0 ? null : t; -class Q8e { +})(ks); +const Goe = ks.Buffer; +ks.Blob; +ks.BlobOptions; +ks.Buffer; +ks.File; +ks.FileOptions; +ks.INSPECT_MAX_BYTES; +ks.SlowBuffer; +ks.TranscodeEncoding; +ks.atob; +ks.btoa; +ks.constants; +ks.isAscii; +ks.isUtf8; +ks.kMaxLength; +ks.kStringMaxLength; +ks.resolveObjectURL; +ks.transcode; +const AY = (t) => t === void 0 ? null : t; +class K8e { constructor() { this.map = /* @__PURE__ */ new Map(); } @@ -18036,38 +18036,38 @@ class Q8e { return this.map.get(e); } } -let Xoe = new Q8e(), OB = !0; +let Hoe = new K8e(), gB = !0; try { - typeof localStorage < "u" && localStorage && (Xoe = localStorage, OB = !1); + typeof localStorage < "u" && localStorage && (Hoe = localStorage, gB = !1); } catch { } -const joe = Xoe, V8e = (t) => OB || addEventListener("storage", t), W8e = (t) => OB || removeEventListener("storage", t), Y8e = Object.assign, G8e = Object.keys, H8e = (t, e) => { +const Xoe = Hoe, J8e = (t) => gB || addEventListener("storage", t), eRe = (t) => gB || removeEventListener("storage", t), tRe = Object.assign, rRe = Object.keys, nRe = (t, e) => { for (const r in t) e(t[r], r); -}, X8e = (t, e) => { +}, iRe = (t, e) => { const r = []; for (const n in t) r.push(e(t[n], n)); return r; -}, RT = (t) => G8e(t).length, j8e = (t) => { +}, gT = (t) => rRe(t).length, sRe = (t) => { for (const e in t) return !1; return !0; -}, Z8e = (t, e) => { +}, aRe = (t, e) => { for (const r in t) if (!e(t[r], r)) return !1; return !0; -}, Zoe = (t, e) => Object.prototype.hasOwnProperty.call(t, e), K8e = (t, e) => t === e || RT(t) === RT(e) && Z8e(t, (r, n) => (r !== void 0 || Zoe(e, n)) && e[n] === r), kB = (t, e, r = 0) => { +}, Zoe = (t, e) => Object.prototype.hasOwnProperty.call(t, e), oRe = (t, e) => t === e || gT(t) === gT(e) && aRe(t, (r, n) => (r !== void 0 || Zoe(e, n)) && e[n] === r), mB = (t, e, r = 0) => { try { for (; r < t.length; r++) t[r](...e); } finally { - r < t.length && kB(t, e, r + 1); + r < t.length && mB(t, e, r + 1); } -}, J8e = (t) => t, eRe = (t, e) => t === e, cx = (t, e) => { +}, lRe = (t) => t, cRe = (t, e) => t === e, ex = (t, e) => { if (t == null || e == null) - return eRe(t, e); + return cRe(t, e); if (t.constructor !== e.constructor) return !1; if (t === e) @@ -18095,92 +18095,92 @@ const joe = Xoe, V8e = (t) => OB || addEventListener("storage", t), W8e = (t) => if (t.size !== e.size) return !1; for (const r of t.keys()) - if (!e.has(r) || !cx(t.get(r), e.get(r))) + if (!e.has(r) || !ex(t.get(r), e.get(r))) return !1; break; } case Object: - if (RT(t) !== RT(e)) + if (gT(t) !== gT(e)) return !1; for (const r in t) - if (!Zoe(t, r) || !cx(t[r], e[r])) + if (!Zoe(t, r) || !ex(t[r], e[r])) return !1; break; case Array: if (t.length !== e.length) return !1; for (let r = 0; r < t.length; r++) - if (!cx(t[r], e[r])) + if (!ex(t[r], e[r])) return !1; break; default: return !1; } return !0; -}, tRe = (t, e) => e.includes(t), xv = typeof Ns < "u" && Ns.release && /node|io\.js/.test(Ns.release.name) && Object.prototype.toString.call(typeof Ns < "u" ? Ns : 0) === "[object process]", Koe = typeof window < "u" && typeof document < "u" && !xv; +}, uRe = (t, e) => e.includes(t), mv = typeof Ds < "u" && Ds.release && /node|io\.js/.test(Ds.release.name) && Object.prototype.toString.call(typeof Ds < "u" ? Ds : 0) === "[object process]", joe = typeof window < "u" && typeof document < "u" && !mv; typeof navigator < "u" && /Mac/.test(navigator.platform); -let Tu; -const rRe = () => { - if (Tu === void 0) - if (xv) { - Tu = Gc(); - const t = Ns.argv; +let xu; +const hRe = () => { + if (xu === void 0) + if (mv) { + xu = Qc(); + const t = Ds.argv; let e = null; for (let r = 0; r < t.length; r++) { const n = t[r]; - n[0] === "-" ? (e !== null && Tu.set(e, ""), e = n) : e !== null && (Tu.set(e, n), e = null); + n[0] === "-" ? (e !== null && xu.set(e, ""), e = n) : e !== null && (xu.set(e, n), e = null); } - e !== null && Tu.set(e, ""); + e !== null && xu.set(e, ""); } else - typeof location == "object" ? (Tu = Gc(), (location.search || "?").slice(1).split("&").forEach((t) => { + typeof location == "object" ? (xu = Qc(), (location.search || "?").slice(1).split("&").forEach((t) => { if (t.length !== 0) { const [e, r] = t.split("="); - Tu.set(`--${bY(e, "-")}`, r), Tu.set(`-${bY(e, "-")}`, r); + xu.set(`--${OY(e, "-")}`, r), xu.set(`-${OY(e, "-")}`, r); } - })) : Tu = Gc(); - return Tu; -}, k9 = (t) => rRe().has(t), S9 = (t) => CY(xv ? {}[t.toUpperCase()] : joe.getItem(t)), nRe = (t) => k9("--" + t) || S9(t) !== null; -nRe("production"); -const EY = xv && tRe({}.FORCE_COLOR, ["true", "1", "2"]), iRe = !k9("no-colors") && (!xv || Ns.stdout.isTTY || EY) && (!xv || k9("color") || EY || S9("COLORTERM") !== null || (S9("TERM") || "").includes("color")), Joe = (t) => new Uint8Array(t), sRe = (t, e, r) => new Uint8Array(t, e, r), aRe = (t) => new Uint8Array(t), oRe = (t) => { + })) : xu = Qc(); + return xu; +}, c9 = (t) => hRe().has(t), u9 = (t) => AY(mv ? {}[t.toUpperCase()] : Xoe.getItem(t)), fRe = (t) => c9("--" + t) || u9(t) !== null; +fRe("production"); +const RY = mv && uRe({}.FORCE_COLOR, ["true", "1", "2"]), dRe = !c9("no-colors") && (!mv || Ds.stdout.isTTY || RY) && (!mv || c9("color") || RY || u9("COLORTERM") !== null || (u9("TERM") || "").includes("color")), Koe = (t) => new Uint8Array(t), pRe = (t, e, r) => new Uint8Array(t, e, r), gRe = (t) => new Uint8Array(t), mRe = (t) => { let e = ""; for (let r = 0; r < t.byteLength; r++) - e += a8e(t[r]); + e += g8e(t[r]); return btoa(e); -}, lRe = (t) => Hoe.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), cRe = (t) => { - const e = atob(t), r = Joe(e.length); +}, vRe = (t) => Goe.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), yRe = (t) => { + const e = atob(t), r = Koe(e.length); for (let n = 0; n < e.length; n++) r[n] = e.charCodeAt(n); return r; -}, uRe = (t) => { - const e = Hoe.from(t, "base64"); - return sRe(e.buffer, e.byteOffset, e.byteLength); -}, hRe = Koe ? oRe : lRe, fRe = Koe ? cRe : uRe, dRe = (t) => { - const e = Joe(t.byteLength); +}, bRe = (t) => { + const e = Goe.from(t, "base64"); + return pRe(e.buffer, e.byteOffset, e.byteLength); +}, xRe = joe ? mRe : vRe, wRe = joe ? yRe : bRe, ORe = (t) => { + const e = Koe(t.byteLength); return e.set(t), e; }; -class pRe { +class kRe { constructor(e, r) { this.left = e, this.right = r; } } -const hl = (t, e) => new pRe(t, e), gRe = (t, e) => t.forEach((r) => e(r.left, r.right)), Eh = typeof document < "u" ? document : {}, mRe = (t) => Eh.createElement(t), vRe = () => Eh.createDocumentFragment(), yRe = (t) => Eh.createTextNode(t); +const ol = (t, e) => new kRe(t, e), SRe = (t, e) => t.forEach((r) => e(r.left, r.right)), kh = typeof document < "u" ? document : {}, TRe = (t) => kh.createElement(t), CRe = () => kh.createDocumentFragment(), ERe = (t) => kh.createTextNode(t); typeof DOMParser < "u" && new DOMParser(); -const bRe = (t, e) => (gRe(e, (r, n) => { +const _Re = (t, e) => (SRe(e, (r, n) => { n === !1 ? t.removeAttribute(r) : n === !0 ? t.setAttribute(r, "") : t.setAttribute(r, n); -}), t), xRe = (t) => { - const e = vRe(); +}), t), ARe = (t) => { + const e = CRe(); for (let r = 0; r < t.length; r++) - ele(e, t[r]); + Joe(e, t[r]); return e; -}, wRe = (t, e) => (ele(t, xRe(e)), t), v8 = (t, e = [], r = []) => wRe(bRe(mRe(t), e), r), fS = yRe, ORe = (t) => J7e(t, (e, r) => `${r}:${e};`).join(""), ele = (t, e) => t.appendChild(e); -Eh.ELEMENT_NODE; -Eh.TEXT_NODE; -Eh.CDATA_SECTION_NODE; -Eh.COMMENT_NODE; -Eh.DOCUMENT_NODE; -Eh.DOCUMENT_TYPE_NODE; -Eh.DOCUMENT_FRAGMENT_NODE; -const jf = Symbol, tle = jf(), rle = jf(), kRe = jf(), SRe = jf(), TRe = jf(), nle = jf(), CRe = jf(), SB = jf(), ERe = jf(), _Re = (t) => { +}, RRe = (t, e) => (Joe(t, ARe(e)), t), i8 = (t, e = [], r = []) => RRe(_Re(TRe(t), e), r), eS = ERe, LRe = (t) => l8e(t, (e, r) => `${r}:${e};`).join(""), Joe = (t, e) => t.appendChild(e); +kh.ELEMENT_NODE; +kh.TEXT_NODE; +kh.CDATA_SECTION_NODE; +kh.COMMENT_NODE; +kh.DOCUMENT_NODE; +kh.DOCUMENT_TYPE_NODE; +kh.DOCUMENT_FRAGMENT_NODE; +const Wf = Symbol, ele = Wf(), tle = Wf(), MRe = Wf(), DRe = Wf(), PRe = Wf(), rle = Wf(), NRe = Wf(), vB = Wf(), IRe = Wf(), $Re = (t) => { const e = []; let r = 0; for (; r < t.length; r++) { @@ -18188,25 +18188,25 @@ const jf = Symbol, tle = jf(), rle = jf(), kRe = jf(), SRe = jf(), TRe = jf(), n n.constructor === String || n.constructor === Number || n.constructor === Object && e.push(JSON.stringify(n)); } return e; -}, ARe = { - [tle]: hl("font-weight", "bold"), - [rle]: hl("font-weight", "normal"), - [kRe]: hl("color", "blue"), - [TRe]: hl("color", "green"), - [SRe]: hl("color", "grey"), - [nle]: hl("color", "red"), - [CRe]: hl("color", "purple"), - [SB]: hl("color", "orange"), - [ERe]: hl("color", "black") -}, RRe = (t) => { - const e = [], r = [], n = Gc(); +}, BRe = { + [ele]: ol("font-weight", "bold"), + [tle]: ol("font-weight", "normal"), + [MRe]: ol("color", "blue"), + [PRe]: ol("color", "green"), + [DRe]: ol("color", "grey"), + [rle]: ol("color", "red"), + [NRe]: ol("color", "purple"), + [vB]: ol("color", "orange"), + [IRe]: ol("color", "black") +}, FRe = (t) => { + const e = [], r = [], n = Qc(); let i = [], s = 0; for (; s < t.length; s++) { - const a = t[s], o = ARe[a]; + const a = t[s], o = BRe[a]; if (o !== void 0) n.set(o.left, o.right); else if (a.constructor === String || a.constructor === Number) { - const l = ORe(n); + const l = LRe(n); s > 0 || l.length > 0 ? (e.push("%c" + a), r.push(l)) : e.push(a); } else break; @@ -18216,45 +18216,45 @@ const jf = Symbol, tle = jf(), rle = jf(), kRe = jf(), SRe = jf(), TRe = jf(), n a instanceof Symbol || i.push(a); } return i; -}, ile = iRe ? RRe : _Re, LRe = (...t) => { - console.log(...ile(t)), sle.forEach((e) => e.print(t)); -}, MRe = (...t) => { - console.warn(...ile(t)), t.unshift(SB), sle.forEach((e) => e.print(t)); -}, sle = mg(), ale = (t) => ({ +}, nle = dRe ? FRe : $Re, zRe = (...t) => { + console.log(...nle(t)), ile.forEach((e) => e.print(t)); +}, qRe = (...t) => { + console.warn(...nle(t)), t.unshift(vB), ile.forEach((e) => e.print(t)); +}, ile = mg(), sle = (t) => ({ [Symbol.iterator]() { return this; }, next: t -}), DRe = (t, e) => ale(() => { +}), URe = (t, e) => sle(() => { let r; do r = t.next(); while (!r.done && !e(r.value)); return r; -}), y8 = (t, e) => ale(() => { +}), s8 = (t, e) => sle(() => { const { done: r, value: n } = t.next(); return { done: r, value: r ? void 0 : e(n) }; }); -class TB { +class yB { constructor(e, r) { this.clock = e, this.len = r; } } -class Iy { +class Dy { constructor() { this.clients = /* @__PURE__ */ new Map(); } } -const wv = (t, e, r) => e.clients.forEach((n, i) => { +const vv = (t, e, r) => e.clients.forEach((n, i) => { const s = t.doc.store.clients.get(i); for (let a = 0; a < n.length; a++) { const o = n[a]; - wle(t, s, o.clock, o.len, r); + xle(t, s, o.clock, o.len, r); } -}), PRe = (t, e) => { +}), QRe = (t, e) => { let r = 0, n = t.length - 1; for (; r <= n; ) { - const i = _f((r + n) / 2), s = t[i], a = s.clock; + const i = kf((r + n) / 2), s = t[i], a = s.clock; if (a <= e) { if (e < a + s.len) return i; @@ -18263,35 +18263,35 @@ const wv = (t, e, r) => e.clients.forEach((n, i) => { n = i - 1; } return null; -}, Sk = (t, e) => { +}, mk = (t, e) => { const r = t.clients.get(e.client); - return r !== void 0 && PRe(r, e.clock) !== null; -}, CB = (t) => { + return r !== void 0 && QRe(r, e.clock) !== null; +}, bB = (t) => { t.clients.forEach((e) => { e.sort((i, s) => i.clock - s.clock); let r, n; for (r = 1, n = 1; r < e.length; r++) { const i = e[n - 1], s = e[r]; - i.clock + i.len >= s.clock ? i.len = zp(i.len, s.clock + s.len - i.clock) : (n < r && (e[n] = s), n++); + i.clock + i.len >= s.clock ? i.len = qp(i.len, s.clock + s.len - i.clock) : (n < r && (e[n] = s), n++); } e.length = n; }); -}, T9 = (t) => { - const e = new Iy(); +}, h9 = (t) => { + const e = new Dy(); for (let r = 0; r < t.length; r++) t[r].clients.forEach((n, i) => { if (!e.clients.has(i)) { const s = n.slice(); for (let a = r + 1; a < t.length; a++) - t8e(s, t[a].clients.get(i) || []); + u8e(s, t[a].clients.get(i) || []); e.clients.set(i, s); } }); - return CB(e), e; -}, sw = (t, e, r, n) => { - Xf(t.clients, e, () => []).push(new TB(r, n)); -}, ole = () => new Iy(), NRe = (t) => { - const e = ole(); + return bB(e), e; +}, Zx = (t, e, r, n) => { + Vf(t.clients, e, () => []).push(new yB(r, n)); +}, ale = () => new Dy(), VRe = (t) => { + const e = ale(); return t.clients.forEach((r, n) => { const i = []; for (let s = 0; s < r.length; s++) { @@ -18302,63 +18302,63 @@ const wv = (t, e, r) => e.clients.forEach((n, i) => { if (s + 1 < r.length) for (let u = r[s + 1]; s + 1 < r.length && u.deleted; u = r[++s + 1]) l += u.length; - i.push(new TB(o, l)); + i.push(new yB(o, l)); } } i.length > 0 && e.clients.set(n, i); }), e; -}, $y = (t, e) => { - Cr(t.restEncoder, e.clients.size), fp(e.clients.entries()).sort((r, n) => n[0] - r[0]).forEach(([r, n]) => { - t.resetDsCurVal(), Cr(t.restEncoder, r); +}, Py = (t, e) => { + kr(t.restEncoder, e.clients.size), hp(e.clients.entries()).sort((r, n) => n[0] - r[0]).forEach(([r, n]) => { + t.resetDsCurVal(), kr(t.restEncoder, r); const i = n.length; - Cr(t.restEncoder, i); + kr(t.restEncoder, i); for (let s = 0; s < i; s++) { const a = n[s]; t.writeDsClock(a.clock), t.writeDsLen(a.len); } }); -}, EB = (t) => { - const e = new Iy(), r = zr(t.restDecoder); +}, xB = (t) => { + const e = new Dy(), r = zr(t.restDecoder); for (let n = 0; n < r; n++) { t.resetDsCurVal(); const i = zr(t.restDecoder), s = zr(t.restDecoder); if (s > 0) { - const a = Xf(e.clients, i, () => []); + const a = Vf(e.clients, i, () => []); for (let o = 0; o < s; o++) - a.push(new TB(t.readDsClock(), t.readDsLen())); + a.push(new yB(t.readDsClock(), t.readDsLen())); } } return e; -}, _Y = (t, e, r) => { - const n = new Iy(), i = zr(t.restDecoder); +}, LY = (t, e, r) => { + const n = new Dy(), i = zr(t.restDecoder); for (let s = 0; s < i; s++) { t.resetDsCurVal(); - const a = zr(t.restDecoder), o = zr(t.restDecoder), l = r.clients.get(a) || [], u = zi(r, a); + const a = zr(t.restDecoder), o = zr(t.restDecoder), l = r.clients.get(a) || [], u = Fi(r, a); for (let h = 0; h < o; h++) { const f = t.readDsClock(), d = f + t.readDsLen(); if (f < u) { - u < d && sw(n, a, u, d - u); - let p = ph(l, f), g = l[p]; - for (!g.deleted && g.id.clock < f && (l.splice(p + 1, 0, BT(e, g, f - g.id.clock)), p++); p < l.length && (g = l[p++], g.id.clock < d); ) - g.deleted || (d < g.id.clock + g.length && l.splice(p, 0, BT(e, g, d - g.id.clock)), g.delete(e)); + u < d && Zx(n, a, u, d - u); + let p = ch(l, f), g = l[p]; + for (!g.deleted && g.id.clock < f && (l.splice(p + 1, 0, kT(e, g, f - g.id.clock)), p++); p < l.length && (g = l[p++], g.id.clock < d); ) + g.deleted || (d < g.id.clock + g.length && l.splice(p, 0, kT(e, g, d - g.id.clock)), g.delete(e)); } else - sw(n, a, f, d - f); + Zx(n, a, f, d - f); } } if (n.clients.size > 0) { const s = new vg(); - return Cr(s.restEncoder, 0), $y(s, n), s.toUint8Array(); + return kr(s.restEncoder, 0), Py(s, n), s.toUint8Array(); } return null; -}, lle = Yoe; -class By extends t6 { - constructor({ guid: e = P8e(), collectionid: r = null, gc: n = !0, gcFilter: i = () => !0, meta: s = null, autoLoad: a = !1, shouldLoad: o = !0 } = {}) { - super(), this.gc = n, this.gcFilter = i, this.clientID = lle(), this.guid = e, this.collectionid = r, this.share = /* @__PURE__ */ new Map(), this.store = new ble(), this._transaction = null, this._transactionCleanups = [], this.subdocs = /* @__PURE__ */ new Set(), this._item = null, this.shouldLoad = o, this.autoLoad = a, this.meta = s, this.isLoaded = !1, this.isSynced = !1, this.whenLoaded = TY((u) => { +}, ole = Woe; +class Ny extends q_ { + constructor({ guid: e = Q8e(), collectionid: r = null, gc: n = !0, gcFilter: i = () => !0, meta: s = null, autoLoad: a = !1, shouldLoad: o = !0 } = {}) { + super(), this.gc = n, this.gcFilter = i, this.clientID = ole(), this.guid = e, this.collectionid = r, this.share = /* @__PURE__ */ new Map(), this.store = new yle(), this._transaction = null, this._transactionCleanups = [], this.subdocs = /* @__PURE__ */ new Set(), this._item = null, this.shouldLoad = o, this.autoLoad = a, this.meta = s, this.isLoaded = !1, this.isSynced = !1, this.whenLoaded = _Y((u) => { this.on("load", () => { this.isLoaded = !0, u(this); }); }); - const l = () => TY((u) => { + const l = () => _Y((u) => { const h = (f) => { (f === void 0 || f === !0) && (this.off("sync", h), u()); }; @@ -18370,7 +18370,7 @@ class By extends t6 { } load() { const e = this._item; - e !== null && !this.shouldLoad && Bn(e.parent.doc, (r) => { + e !== null && !this.shouldLoad && $n(e.parent.doc, (r) => { r.subdocsLoaded.add(this); }, null, !0), this.shouldLoad = !0; } @@ -18378,18 +18378,18 @@ class By extends t6 { return this.subdocs; } getSubdocGuids() { - return new Set(fp(this.subdocs).map((e) => e.guid)); + return new Set(hp(this.subdocs).map((e) => e.guid)); } transact(e, r = null) { - return Bn(this, e, r); + return $n(this, e, r); } - get(e, r = ca) { - const n = Xf(this.share, e, () => { + get(e, r = ia) { + const n = Vf(this.share, e, () => { const s = new r(); return s._integrate(this, null), s; }), i = n.constructor; - if (r !== ca && i !== r) - if (i === ca) { + if (r !== ia && i !== r) + if (i === ia) { const s = new r(); s._map = n._map, n._map.forEach((a) => { for (; a !== null; a = a.left) @@ -18403,13 +18403,13 @@ class By extends t6 { return n; } getArray(e = "") { - return this.get(e, N1); + return this.get(e, R1); } getText(e = "") { - return this.get(e, kv); + return this.get(e, bv); } getMap(e = "") { - return this.get(e, sh); + return this.get(e, eh); } getXmlFragment(e = "") { return this.get(e, yg); @@ -18421,12 +18421,12 @@ class By extends t6 { }), e; } destroy() { - fp(this.subdocs).forEach((r) => r.destroy()); + hp(this.subdocs).forEach((r) => r.destroy()); const e = this._item; if (e !== null) { this._item = null; const r = e.content; - r.doc = new By({ guid: this.guid, ...r.opts, shouldLoad: !1 }), r.doc._item = e, Bn(e.parent.doc, (n) => { + r.doc = new Ny({ guid: this.guid, ...r.opts, shouldLoad: !1 }), r.doc._item = e, $n(e.parent.doc, (n) => { const i = r.doc; e.deleted || n.subdocsAdded.add(i), n.subdocsRemoved.add(this); }, null, !0); @@ -18440,7 +18440,7 @@ class By extends t6 { super.off(e, r); } } -class cle { +class lle { constructor(e) { this.restDecoder = e; } @@ -18453,7 +18453,7 @@ class cle { return zr(this.restDecoder); } } -class ule extends cle { +class cle extends lle { readLeftID() { return Wr(zr(this.restDecoder), zr(this.restDecoder)); } @@ -18464,10 +18464,10 @@ class ule extends cle { return zr(this.restDecoder); } readInfo() { - return bv(this.restDecoder); + return gv(this.restDecoder); } readString() { - return Qd(this.restDecoder); + return Fd(this.restDecoder); } readParentInfo() { return zr(this.restDecoder) === 1; @@ -18479,19 +18479,19 @@ class ule extends cle { return zr(this.restDecoder); } readAny() { - return iw(this.restDecoder); + return Xx(this.restDecoder); } readBuf() { - return dRe(Aa(this.restDecoder)); + return ORe(Ea(this.restDecoder)); } readJSON() { - return JSON.parse(Qd(this.restDecoder)); + return JSON.parse(Fd(this.restDecoder)); } readKey() { - return Qd(this.restDecoder); + return Fd(this.restDecoder); } } -class IRe { +class WRe { constructor(e) { this.dsCurrVal = 0, this.restDecoder = e; } @@ -18506,15 +18506,15 @@ class IRe { return this.dsCurrVal += e, e; } } -class Ov extends IRe { +class yv extends WRe { constructor(e) { - super(e), this.keys = [], zr(e), this.keyClockDecoder = new g8(Aa(e)), this.clientDecoder = new r3(Aa(e)), this.leftClockDecoder = new g8(Aa(e)), this.rightClockDecoder = new g8(Aa(e)), this.infoDecoder = new SY(Aa(e), bv), this.stringDecoder = new L8e(Aa(e)), this.parentInfoDecoder = new SY(Aa(e), bv), this.typeRefDecoder = new r3(Aa(e)), this.lenDecoder = new r3(Aa(e)); + super(e), this.keys = [], zr(e), this.keyClockDecoder = new r8(Ea(e)), this.clientDecoder = new U5(Ea(e)), this.leftClockDecoder = new r8(Ea(e)), this.rightClockDecoder = new r8(Ea(e)), this.infoDecoder = new EY(Ea(e), gv), this.stringDecoder = new z8e(Ea(e)), this.parentInfoDecoder = new EY(Ea(e), gv), this.typeRefDecoder = new U5(Ea(e)), this.lenDecoder = new U5(Ea(e)); } readLeftID() { - return new P1(this.clientDecoder.read(), this.leftClockDecoder.read()); + return new A1(this.clientDecoder.read(), this.leftClockDecoder.read()); } readRightID() { - return new P1(this.clientDecoder.read(), this.rightClockDecoder.read()); + return new A1(this.clientDecoder.read(), this.rightClockDecoder.read()); } readClient() { return this.clientDecoder.read(); @@ -18535,13 +18535,13 @@ class Ov extends IRe { return this.lenDecoder.read(); } readAny() { - return iw(this.restDecoder); + return Xx(this.restDecoder); } readBuf() { - return Aa(this.restDecoder); + return Ea(this.restDecoder); } readJSON() { - return iw(this.restDecoder); + return Xx(this.restDecoder); } readKey() { const e = this.keyClockDecoder.read(); @@ -18553,52 +18553,52 @@ class Ov extends IRe { } } } -class hle { +class ule { constructor() { - this.restEncoder = Ra(); + this.restEncoder = _a(); } toUint8Array() { - return fi(this.restEncoder); + return hi(this.restEncoder); } resetDsCurVal() { } writeDsClock(e) { - Cr(this.restEncoder, e); + kr(this.restEncoder, e); } writeDsLen(e) { - Cr(this.restEncoder, e); + kr(this.restEncoder, e); } } -class Tk extends hle { +class vk extends ule { writeLeftID(e) { - Cr(this.restEncoder, e.client), Cr(this.restEncoder, e.clock); + kr(this.restEncoder, e.client), kr(this.restEncoder, e.clock); } writeRightID(e) { - Cr(this.restEncoder, e.client), Cr(this.restEncoder, e.clock); + kr(this.restEncoder, e.client), kr(this.restEncoder, e.clock); } writeClient(e) { - Cr(this.restEncoder, e); + kr(this.restEncoder, e); } writeInfo(e) { - w9(this.restEncoder, e); + o9(this.restEncoder, e); } writeString(e) { eg(this.restEncoder, e); } writeParentInfo(e) { - Cr(this.restEncoder, e ? 1 : 0); + kr(this.restEncoder, e ? 1 : 0); } writeTypeRef(e) { - Cr(this.restEncoder, e); + kr(this.restEncoder, e); } writeLen(e) { - Cr(this.restEncoder, e); + kr(this.restEncoder, e); } writeAny(e) { - nw(this.restEncoder, e); + Hx(this.restEncoder, e); } writeBuf(e) { - Di(this.restEncoder, e); + Mi(this.restEncoder, e); } writeJSON(e) { eg(this.restEncoder, JSON.stringify(e)); @@ -18607,31 +18607,31 @@ class Tk extends hle { eg(this.restEncoder, e); } } -class fle { +class hle { constructor() { - this.restEncoder = Ra(), this.dsCurrVal = 0; + this.restEncoder = _a(), this.dsCurrVal = 0; } toUint8Array() { - return fi(this.restEncoder); + return hi(this.restEncoder); } resetDsCurVal() { this.dsCurrVal = 0; } writeDsClock(e) { const r = e - this.dsCurrVal; - this.dsCurrVal = e, Cr(this.restEncoder, r); + this.dsCurrVal = e, kr(this.restEncoder, r); } writeDsLen(e) { - e === 0 && ou(), Cr(this.restEncoder, e - 1), this.dsCurrVal += e; + e === 0 && nu(), kr(this.restEncoder, e - 1), this.dsCurrVal += e; } } -class vg extends fle { +class vg extends hle { constructor() { - super(), this.keyMap = /* @__PURE__ */ new Map(), this.keyClock = 0, this.keyClockEncoder = new p8(), this.clientEncoder = new t3(), this.leftClockEncoder = new p8(), this.rightClockEncoder = new p8(), this.infoEncoder = new wY(w9), this.stringEncoder = new O8e(), this.parentInfoEncoder = new wY(w9), this.typeRefEncoder = new t3(), this.lenEncoder = new t3(); + super(), this.keyMap = /* @__PURE__ */ new Map(), this.keyClock = 0, this.keyClockEncoder = new t8(), this.clientEncoder = new q5(), this.leftClockEncoder = new t8(), this.rightClockEncoder = new t8(), this.infoEncoder = new SY(o9), this.stringEncoder = new L8e(), this.parentInfoEncoder = new SY(o9), this.typeRefEncoder = new q5(), this.lenEncoder = new q5(); } toUint8Array() { - const e = Ra(); - return Cr(e, 0), Di(e, this.keyClockEncoder.toUint8Array()), Di(e, this.clientEncoder.toUint8Array()), Di(e, this.leftClockEncoder.toUint8Array()), Di(e, this.rightClockEncoder.toUint8Array()), Di(e, fi(this.infoEncoder)), Di(e, this.stringEncoder.toUint8Array()), Di(e, fi(this.parentInfoEncoder)), Di(e, this.typeRefEncoder.toUint8Array()), Di(e, this.lenEncoder.toUint8Array()), i6(e, fi(this.restEncoder)), fi(e); + const e = _a(); + return kr(e, 0), Mi(e, this.keyClockEncoder.toUint8Array()), Mi(e, this.clientEncoder.toUint8Array()), Mi(e, this.leftClockEncoder.toUint8Array()), Mi(e, this.rightClockEncoder.toUint8Array()), Mi(e, hi(this.infoEncoder)), Mi(e, this.stringEncoder.toUint8Array()), Mi(e, hi(this.parentInfoEncoder)), Mi(e, this.typeRefEncoder.toUint8Array()), Mi(e, this.lenEncoder.toUint8Array()), V_(e, hi(this.restEncoder)), hi(e); } writeLeftID(e) { this.clientEncoder.write(e.client), this.leftClockEncoder.write(e.clock); @@ -18658,65 +18658,65 @@ class vg extends fle { this.lenEncoder.write(e); } writeAny(e) { - nw(this.restEncoder, e); + Hx(this.restEncoder, e); } writeBuf(e) { - Di(this.restEncoder, e); + Mi(this.restEncoder, e); } writeJSON(e) { - nw(this.restEncoder, e); + Hx(this.restEncoder, e); } writeKey(e) { const r = this.keyMap.get(e); r === void 0 ? (this.keyClockEncoder.write(this.keyClock++), this.stringEncoder.write(e)) : this.keyClockEncoder.write(r); } } -const $Re = (t, e, r, n) => { - n = zp(n, e[0].id.clock); - const i = ph(e, n); - Cr(t.restEncoder, e.length - i), t.writeClient(r), Cr(t.restEncoder, n); +const YRe = (t, e, r, n) => { + n = qp(n, e[0].id.clock); + const i = ch(e, n); + kr(t.restEncoder, e.length - i), t.writeClient(r), kr(t.restEncoder, n); const s = e[i]; s.write(t, n - s.id.clock); for (let a = i + 1; a < e.length; a++) e[a].write(t, 0); -}, _B = (t, e, r) => { +}, wB = (t, e, r) => { const n = /* @__PURE__ */ new Map(); r.forEach((i, s) => { - zi(e, s) > i && n.set(s, i); - }), o6(e).forEach((i, s) => { + Fi(e, s) > i && n.set(s, i); + }), G_(e).forEach((i, s) => { r.has(s) || n.set(s, 0); - }), Cr(t.restEncoder, n.size), fp(n.entries()).sort((i, s) => s[0] - i[0]).forEach(([i, s]) => { - $Re(t, e.clients.get(i), i, s); + }), kr(t.restEncoder, n.size), hp(n.entries()).sort((i, s) => s[0] - i[0]).forEach(([i, s]) => { + YRe(t, e.clients.get(i), i, s); }); -}, BRe = (t, e) => { - const r = Gc(), n = zr(t.restDecoder); +}, GRe = (t, e) => { + const r = Qc(), n = zr(t.restDecoder); for (let i = 0; i < n; i++) { const s = zr(t.restDecoder), a = new Array(s), o = t.readClient(); let l = zr(t.restDecoder); r.set(o, { i: 0, refs: a }); for (let u = 0; u < s; u++) { const h = t.readInfo(); - switch (n6 & h) { + switch (Q_ & h) { case 0: { const f = t.readLen(); - a[u] = new Gl(Wr(o, l), f), l += f; + a[u] = new ql(Wr(o, l), f), l += f; break; } case 10: { const f = zr(t.restDecoder); - a[u] = new Hl(Wr(o, l), f), l += f; + a[u] = new Ul(Wr(o, l), f), l += f; break; } default: { - const f = (h & (yf | bl)) === 0, d = new zn( + const f = (h & (ff | gl)) === 0, d = new Fn( Wr(o, l), null, - (h & bl) === bl ? t.readLeftID() : null, + (h & gl) === gl ? t.readLeftID() : null, null, - (h & yf) === yf ? t.readRightID() : null, + (h & ff) === ff ? t.readRightID() : null, f ? t.readParentInfo() ? e.get(t.readString()) : t.readLeftID() : null, - f && (h & tw) === tw ? t.readString() : null, - qle(t, h) + f && (h & Yx) === Yx ? t.readString() : null, + zle(t, h) ); a[u] = d, l += d.length; } @@ -18724,9 +18724,9 @@ const $Re = (t, e, r, n) => { } } return r; -}, FRe = (t, e, r) => { +}, HRe = (t, e, r) => { const n = []; - let i = fp(r.keys()).sort((p, g) => p - g); + let i = hp(r.keys()).sort((p, g) => p - g); if (i.length === 0) return null; const s = () => { @@ -18743,7 +18743,7 @@ const $Re = (t, e, r, n) => { let a = s(); if (a === null) return null; - const o = new ble(), l = /* @__PURE__ */ new Map(), u = (p, g) => { + const o = new yle(), l = /* @__PURE__ */ new Map(), u = (p, g) => { const m = l.get(p); (m == null || m > g) && l.set(p, g); }; @@ -18756,8 +18756,8 @@ const $Re = (t, e, r, n) => { n.length = 0; }; for (; ; ) { - if (h.constructor !== Hl) { - const g = Xf(f, h.id.client, () => zi(e, h.id.client)) - h.id.clock; + if (h.constructor !== Ul) { + const g = Vf(f, h.id.client, () => Fi(e, h.id.client)) - h.id.clock; if (g < 0) n.push(h), u(h.id.client, h.id.clock - 1), d(); else { @@ -18766,7 +18766,7 @@ const $Re = (t, e, r, n) => { n.push(h); const v = r.get(m) || { refs: [], i: 0 }; if (v.refs.length === v.i) - u(m, zi(e, m)), d(); + u(m, Fi(e, m)), d(); else { h = v.refs[v.i++]; continue; @@ -18787,16 +18787,16 @@ const $Re = (t, e, r, n) => { } if (o.clients.size > 0) { const p = new vg(); - return _B(p, o, /* @__PURE__ */ new Map()), Cr(p.restEncoder, 0), { missing: l, update: p.toUint8Array() }; + return wB(p, o, /* @__PURE__ */ new Map()), kr(p.restEncoder, 0), { missing: l, update: p.toUint8Array() }; } return null; -}, zRe = (t, e) => _B(t, e.doc.store, e.beforeState), qRe = (t, e, r, n = new Ov(t)) => Bn(e, (i) => { +}, XRe = (t, e) => wB(t, e.doc.store, e.beforeState), ZRe = (t, e, r, n = new yv(t)) => $n(e, (i) => { i.local = !1; let s = !1; - const a = i.doc, o = a.store, l = BRe(n, a), u = FRe(i, o, l), h = o.pendingStructs; + const a = i.doc, o = a.store, l = GRe(n, a), u = HRe(i, o, l), h = o.pendingStructs; if (h) { for (const [d, p] of h.missing) - if (p < zi(o, d)) { + if (p < Fi(o, d)) { s = !0; break; } @@ -18805,68 +18805,68 @@ const $Re = (t, e, r, n) => { const g = h.missing.get(d); (g == null || g > p) && h.missing.set(d, p); } - h.update = MT([h.update, u.update]); + h.update = vT([h.update, u.update]); } } else o.pendingStructs = u; - const f = _Y(n, i, o); + const f = LY(n, i, o); if (o.pendingDs) { - const d = new Ov(qp(o.pendingDs)); + const d = new yv(Up(o.pendingDs)); zr(d.restDecoder); - const p = _Y(d, i, o); - f && p ? o.pendingDs = MT([f, p]) : o.pendingDs = f || p; + const p = LY(d, i, o); + f && p ? o.pendingDs = vT([f, p]) : o.pendingDs = f || p; } else o.pendingDs = f; if (s) { const d = o.pendingStructs.update; - o.pendingStructs = null, dle(i.doc, d); - } -}, r, !1), dle = (t, e, r, n = Ov) => { - const i = qp(e); - qRe(i, t, r, new n(i)); -}, URe = (t, e, r) => dle(t, e, r, ule), QRe = (t, e, r = /* @__PURE__ */ new Map()) => { - _B(t, e.store, r), $y(t, NRe(e.store)); -}, VRe = (t, e = new Uint8Array([0]), r = new vg()) => { - const n = ple(e); - QRe(r, t, n); + o.pendingStructs = null, fle(i.doc, d); + } +}, r, !1), fle = (t, e, r, n = yv) => { + const i = Up(e); + ZRe(i, t, r, new n(i)); +}, jRe = (t, e, r) => fle(t, e, r, cle), KRe = (t, e, r = /* @__PURE__ */ new Map()) => { + wB(t, e.store, r), Py(t, VRe(e.store)); +}, JRe = (t, e = new Uint8Array([0]), r = new vg()) => { + const n = dle(e); + KRe(r, t, n); const i = [r.toUint8Array()]; - if (t.store.pendingDs && i.push(t.store.pendingDs), t.store.pendingStructs && i.push(uLe(t.store.pendingStructs.update, e)), i.length > 1) { - if (r.constructor === Tk) - return lLe(i.map((s, a) => a === 0 ? s : fLe(s))); + if (t.store.pendingDs && i.push(t.store.pendingDs), t.store.pendingStructs && i.push(bLe(t.store.pendingStructs.update, e)), i.length > 1) { + if (r.constructor === vk) + return vLe(i.map((s, a) => a === 0 ? s : wLe(s))); if (r.constructor === vg) - return MT(i); + return vT(i); } return i[0]; -}, WRe = (t, e) => VRe(t, e, new Tk()), YRe = (t) => { +}, eLe = (t, e) => JRe(t, e, new vk()), tLe = (t) => { const e = /* @__PURE__ */ new Map(), r = zr(t.restDecoder); for (let n = 0; n < r; n++) { const i = zr(t.restDecoder), s = zr(t.restDecoder); e.set(i, s); } return e; -}, ple = (t) => YRe(new cle(qp(t))), gle = (t, e) => (Cr(t.restEncoder, e.size), fp(e.entries()).sort((r, n) => n[0] - r[0]).forEach(([r, n]) => { - Cr(t.restEncoder, r), Cr(t.restEncoder, n); -}), t), GRe = (t, e) => gle(t, o6(e.store)), HRe = (t, e = new fle()) => (t instanceof Map ? gle(e, t) : GRe(e, t), e.toUint8Array()), XRe = (t) => HRe(t, new hle()); -class jRe { +}, dle = (t) => tLe(new lle(Up(t))), ple = (t, e) => (kr(t.restEncoder, e.size), hp(e.entries()).sort((r, n) => n[0] - r[0]).forEach(([r, n]) => { + kr(t.restEncoder, r), kr(t.restEncoder, n); +}), t), rLe = (t, e) => ple(t, G_(e.store)), nLe = (t, e = new hle()) => (t instanceof Map ? ple(e, t) : rLe(e, t), e.toUint8Array()), iLe = (t) => nLe(t, new ule()); +class sLe { constructor() { this.l = []; } } -const AY = () => new jRe(), RY = (t, e) => t.l.push(e), LY = (t, e) => { +const MY = () => new sLe(), DY = (t, e) => t.l.push(e), PY = (t, e) => { const r = t.l, n = r.length; t.l = r.filter((i) => e !== i), n === t.l.length && console.error("[yjs] Tried to remove event handler that doesn't exist."); -}, mle = (t, e, r) => kB(t.l, [e, r]); -class P1 { +}, gle = (t, e, r) => mB(t.l, [e, r]); +class A1 { constructor(e, r) { this.client = e, this.clock = r; } } -const g1 = (t, e) => t === e || t !== null && e !== null && t.client === e.client && t.clock === e.clock, Wr = (t, e) => new P1(t, e), vle = (t) => { +const u1 = (t, e) => t === e || t !== null && e !== null && t.client === e.client && t.clock === e.clock, Wr = (t, e) => new A1(t, e), mle = (t) => { for (const [e, r] of t.doc.share.entries()) if (r === t) return e; - throw ou(); -}, LT = (t, e) => { + throw nu(); +}, mT = (t, e) => { for (; e !== null; ) { if (e.parent === t) return !0; @@ -18874,49 +18874,49 @@ const g1 = (t, e) => t === e || t !== null && e !== null && t.client === e.clien } return !1; }; -class yle { +class vle { constructor(e, r, n, i = 0) { this.type = e, this.tname = r, this.item = n, this.assoc = i; } } -const MY = (t) => { +const NY = (t) => { const e = {}; return t.type && (e.type = t.type), t.tname && (e.tname = t.tname), t.item && (e.item = t.item), t.assoc != null && (e.assoc = t.assoc), e; -}, aw = (t) => new yle(t.type == null ? null : Wr(t.type.client, t.type.clock), t.tname || null, t.item == null ? null : Wr(t.item.client, t.item.clock), t.assoc == null ? 0 : t.assoc); -class ZRe { +}, jx = (t) => new vle(t.type == null ? null : Wr(t.type.client, t.type.clock), t.tname || null, t.item == null ? null : Wr(t.item.client, t.item.clock), t.assoc == null ? 0 : t.assoc); +class aLe { constructor(e, r, n = 0) { this.type = e, this.index = r, this.assoc = n; } } -const KRe = (t, e, r = 0) => new ZRe(t, e, r), dS = (t, e, r) => { +const oLe = (t, e, r = 0) => new aLe(t, e, r), tS = (t, e, r) => { let n = null, i = null; - return t._item === null ? i = vle(t) : n = Wr(t._item.id.client, t._item.id.clock), new yle(n, i, e, r); -}, C9 = (t, e, r = 0) => { + return t._item === null ? i = mle(t) : n = Wr(t._item.id.client, t._item.id.clock), new vle(n, i, e, r); +}, f9 = (t, e, r = 0) => { let n = t._start; if (r < 0) { if (e === 0) - return dS(t, null, r); + return tS(t, null, r); e--; } for (; n !== null; ) { if (!n.deleted && n.countable) { if (n.length > e) - return dS(t, Wr(n.id.client, n.id.clock + e), r); + return tS(t, Wr(n.id.client, n.id.clock + e), r); e -= n.length; } if (n.right === null && r < 0) - return dS(t, n.lastId, r); + return tS(t, n.lastId, r); n = n.right; } - return dS(t, null, r); -}, E9 = (t, e) => { + return tS(t, null, r); +}, d9 = (t, e) => { const r = e.store, n = t.item, i = t.type, s = t.tname, a = t.assoc; let o = null, l = 0; if (n !== null) { - if (zi(r, n.client) <= n.clock) + if (Fi(r, n.client) <= n.clock) return null; - const u = L9(r, n), h = u.item; - if (!(h instanceof zn)) + const u = v9(r, n), h = u.item; + if (!(h instanceof Fn)) return null; if (o = h.parent, o._item === null || !o._item.deleted) { l = h.deleted || !h.countable ? 0 : u.diff + (a >= 0 ? 0 : 1); @@ -18928,65 +18928,65 @@ const KRe = (t, e, r = 0) => new ZRe(t, e, r), dS = (t, e, r) => { if (s !== null) o = e.get(s); else if (i !== null) { - if (zi(r, i.client) <= i.clock) + if (Fi(r, i.client) <= i.clock) return null; - const { item: u } = L9(r, i); - if (u instanceof zn && u.content instanceof _h) + const { item: u } = v9(r, i); + if (u instanceof Fn && u.content instanceof Sh) o = u.content.type; else return null; } else - throw ou(); + throw nu(); a >= 0 ? l = o._length : l = 0; } - return KRe(o, l, t.assoc); -}, DY = (t, e) => t === e || t !== null && e !== null && t.tname === e.tname && g1(t.item, e.item) && g1(t.type, e.type) && t.assoc === e.assoc; -class JRe { + return oLe(o, l, t.assoc); +}, IY = (t, e) => t === e || t !== null && e !== null && t.tname === e.tname && u1(t.item, e.item) && u1(t.type, e.type) && t.assoc === e.assoc; +class lLe { constructor(e, r) { this.ds = e, this.sv = r; } } -const eLe = (t, e) => new JRe(t, e); -eLe(ole(), /* @__PURE__ */ new Map()); -const n1 = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && (e.sv.get(t.id.client) || 0) > t.id.clock && !Sk(e.ds, t.id), _9 = (t, e) => { - const r = Xf(t.meta, _9, mg), n = t.doc.store; +const cLe = (t, e) => new lLe(t, e); +cLe(ale(), /* @__PURE__ */ new Map()); +const jm = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && (e.sv.get(t.id.client) || 0) > t.id.clock && !mk(e.ds, t.id), p9 = (t, e) => { + const r = Vf(t.meta, p9, mg), n = t.doc.store; r.has(e) || (e.sv.forEach((i, s) => { - i < zi(n, s) && Bo(t, Wr(s, i)); - }), wv(t, e.ds, (i) => { + i < Fi(n, s) && No(t, Wr(s, i)); + }), vv(t, e.ds, (i) => { }), r.add(e)); }; -class ble { +class yle { constructor() { this.clients = /* @__PURE__ */ new Map(), this.pendingStructs = null, this.pendingDs = null; } } -const o6 = (t) => { +const G_ = (t) => { const e = /* @__PURE__ */ new Map(); return t.clients.forEach((r, n) => { const i = r[r.length - 1]; e.set(n, i.id.clock + i.length); }), e; -}, zi = (t, e) => { +}, Fi = (t, e) => { const r = t.clients.get(e); if (r === void 0) return 0; const n = r[r.length - 1]; return n.id.clock + n.length; -}, xle = (t, e) => { +}, ble = (t, e) => { let r = t.clients.get(e.id.client); if (r === void 0) r = [], t.clients.set(e.id.client, r); else { const n = r[r.length - 1]; if (n.id.clock + n.length !== e.id.clock) - throw ou(); + throw nu(); } r.push(e); -}, ph = (t, e) => { +}, ch = (t, e) => { let r = 0, n = t.length - 1, i = t[n], s = i.id.clock; if (s === e) return n; - let a = _f(e / (s + i.length - 1) * n); + let a = kf(e / (s + i.length - 1) * n); for (; r <= n; ) { if (i = t[a], s = i.id.clock, s <= e) { if (e < s + i.length) @@ -18994,79 +18994,79 @@ const o6 = (t) => { r = a + 1; } else n = a - 1; - a = _f((r + n) / 2); + a = kf((r + n) / 2); } - throw ou(); -}, tLe = (t, e) => { + throw nu(); +}, uLe = (t, e) => { const r = t.clients.get(e.client); - return r[ph(r, e.clock)]; -}, n3 = tLe, A9 = (t, e, r) => { - const n = ph(e, r), i = e[n]; - return i.id.clock < r && i instanceof zn ? (e.splice(n + 1, 0, BT(t, i, r - i.id.clock)), n + 1) : n; -}, Bo = (t, e) => { + return r[ch(r, e.clock)]; +}, Q5 = uLe, g9 = (t, e, r) => { + const n = ch(e, r), i = e[n]; + return i.id.clock < r && i instanceof Fn ? (e.splice(n + 1, 0, kT(t, i, r - i.id.clock)), n + 1) : n; +}, No = (t, e) => { const r = t.doc.store.clients.get(e.client); - return r[A9(t, r, e.clock)]; -}, PY = (t, e, r) => { - const n = e.clients.get(r.client), i = ph(n, r.clock), s = n[i]; - return r.clock !== s.id.clock + s.length - 1 && s.constructor !== Gl && n.splice(i + 1, 0, BT(t, s, r.clock - s.id.clock + 1)), s; -}, rLe = (t, e, r) => { + return r[g9(t, r, e.clock)]; +}, $Y = (t, e, r) => { + const n = e.clients.get(r.client), i = ch(n, r.clock), s = n[i]; + return r.clock !== s.id.clock + s.length - 1 && s.constructor !== ql && n.splice(i + 1, 0, kT(t, s, r.clock - s.id.clock + 1)), s; +}, hLe = (t, e, r) => { const n = t.clients.get(e.id.client); - n[ph(n, e.id.clock)] = r; -}, wle = (t, e, r, n, i) => { + n[ch(n, e.id.clock)] = r; +}, xle = (t, e, r, n, i) => { if (n === 0) return; const s = r + n; - let a = A9(t, e, r), o; + let a = g9(t, e, r), o; do - o = e[a++], s < o.id.clock + o.length && A9(t, e, s), i(o); + o = e[a++], s < o.id.clock + o.length && g9(t, e, s), i(o); while (a < e.length && e[a].id.clock < s); }; -class nLe { +class fLe { constructor(e, r, n) { - this.doc = e, this.deleteSet = new Iy(), this.beforeState = o6(e.store), this.afterState = /* @__PURE__ */ new Map(), this.changed = /* @__PURE__ */ new Map(), this.changedParentTypes = /* @__PURE__ */ new Map(), this._mergeStructs = [], this.origin = r, this.meta = /* @__PURE__ */ new Map(), this.local = n, this.subdocsAdded = /* @__PURE__ */ new Set(), this.subdocsRemoved = /* @__PURE__ */ new Set(), this.subdocsLoaded = /* @__PURE__ */ new Set(), this._needFormattingCleanup = !1; + this.doc = e, this.deleteSet = new Dy(), this.beforeState = G_(e.store), this.afterState = /* @__PURE__ */ new Map(), this.changed = /* @__PURE__ */ new Map(), this.changedParentTypes = /* @__PURE__ */ new Map(), this._mergeStructs = [], this.origin = r, this.meta = /* @__PURE__ */ new Map(), this.local = n, this.subdocsAdded = /* @__PURE__ */ new Set(), this.subdocsRemoved = /* @__PURE__ */ new Set(), this.subdocsLoaded = /* @__PURE__ */ new Set(), this._needFormattingCleanup = !1; } } -const NY = (t, e) => e.deleteSet.clients.size === 0 && !e8e(e.afterState, (r, n) => e.beforeState.get(n) !== r) ? !1 : (CB(e.deleteSet), zRe(t, e), $y(t, e.deleteSet), !0), IY = (t, e, r) => { +const BY = (t, e) => e.deleteSet.clients.size === 0 && !c8e(e.afterState, (r, n) => e.beforeState.get(n) !== r) ? !1 : (bB(e.deleteSet), XRe(t, e), Py(t, e.deleteSet), !0), FY = (t, e, r) => { const n = e._item; - (n === null || n.id.clock < (t.beforeState.get(n.id.client) || 0) && !n.deleted) && Xf(t.changed, e, mg).add(r); -}, i3 = (t, e) => { + (n === null || n.id.clock < (t.beforeState.get(n.id.client) || 0) && !n.deleted) && Vf(t.changed, e, mg).add(r); +}, V5 = (t, e) => { let r = t[e], n = t[e - 1], i = e; for (; i > 0; r = n, n = t[--i - 1]) { if (n.deleted === r.deleted && n.constructor === r.constructor && n.mergeWith(r)) { - r instanceof zn && r.parentSub !== null && r.parent._map.get(r.parentSub) === r && r.parent._map.set(r.parentSub, n); + r instanceof Fn && r.parentSub !== null && r.parent._map.get(r.parentSub) === r && r.parent._map.set(r.parentSub, n); continue; } break; } const s = e - i; return s && t.splice(e + 1 - s, s), s; -}, iLe = (t, e, r) => { +}, dLe = (t, e, r) => { for (const [n, i] of t.clients.entries()) { const s = e.clients.get(n); for (let a = i.length - 1; a >= 0; a--) { const o = i[a], l = o.clock + o.len; - for (let u = ph(s, o.clock), h = s[u]; u < s.length && h.id.clock < l; h = s[++u]) { + for (let u = ch(s, o.clock), h = s[u]; u < s.length && h.id.clock < l; h = s[++u]) { const f = s[u]; if (o.clock + o.len <= f.id.clock) break; - f instanceof zn && f.deleted && !f.keep && r(f) && f.gc(e, !1); + f instanceof Fn && f.deleted && !f.keep && r(f) && f.gc(e, !1); } } } -}, sLe = (t, e) => { +}, pLe = (t, e) => { t.clients.forEach((r, n) => { const i = e.clients.get(n); for (let s = r.length - 1; s >= 0; s--) { - const a = r[s], o = r6(i.length - 1, 1 + ph(i, a.clock + a.len - 1)); + const a = r[s], o = U_(i.length - 1, 1 + ch(i, a.clock + a.len - 1)); for (let l = o, u = i[l]; l > 0 && u.id.clock >= a.clock; u = i[l]) - l -= 1 + i3(i, l); + l -= 1 + V5(i, l); } }); -}, Ole = (t, e) => { +}, wle = (t, e) => { if (e < t.length) { const r = t[e], n = r.doc, i = n.store, s = r.deleteSet, a = r._mergeStructs; try { - CB(s), r.afterState = o6(r.doc.store), n.emit("beforeObserverCalls", [r, n]); + bB(s), r.afterState = G_(r.doc.store), n.emit("beforeObserverCalls", [r, n]); const o = []; r.changed.forEach( (l, u) => o.push(() => { @@ -19078,78 +19078,78 @@ const NY = (t, e) => e.deleteSet.clients.size === 0 && !e8e(e.afterState, (r, n) (h) => h.target._item === null || !h.target._item.deleted ), l.forEach((h) => { h.currentTarget = u, h._path = null; - }), l.sort((h, f) => h.path.length - f.path.length), mle(u._dEH, l, r)); + }), l.sort((h, f) => h.path.length - f.path.length), gle(u._dEH, l, r)); }); - }), o.push(() => n.emit("afterTransaction", [r, n])), kB(o, []), r._needFormattingCleanup && CLe(r); + }), o.push(() => n.emit("afterTransaction", [r, n])), mB(o, []), r._needFormattingCleanup && NLe(r); } finally { - n.gc && iLe(s, i, n.gcFilter), sLe(s, i), r.afterState.forEach((h, f) => { + n.gc && dLe(s, i, n.gcFilter), pLe(s, i), r.afterState.forEach((h, f) => { const d = r.beforeState.get(f) || 0; if (d !== h) { - const p = i.clients.get(f), g = zp(ph(p, d), 1); + const p = i.clients.get(f), g = qp(ch(p, d), 1); for (let m = p.length - 1; m >= g; ) - m -= 1 + i3(p, m); + m -= 1 + V5(p, m); } }); for (let h = a.length - 1; h >= 0; h--) { - const { client: f, clock: d } = a[h].id, p = i.clients.get(f), g = ph(p, d); - g + 1 < p.length && i3(p, g + 1) > 1 || g > 0 && i3(p, g); + const { client: f, clock: d } = a[h].id, p = i.clients.get(f), g = ch(p, d); + g + 1 < p.length && V5(p, g + 1) > 1 || g > 0 && V5(p, g); } - if (!r.local && r.afterState.get(n.clientID) !== r.beforeState.get(n.clientID) && (LRe(SB, tle, "[yjs] ", rle, nle, "Changed the client-id because another client seems to be using it."), n.clientID = lle()), n.emit("afterTransactionCleanup", [r, n]), n._observers.has("update")) { - const h = new Tk(); - NY(h, r) && n.emit("update", [h.toUint8Array(), r.origin, n, r]); + if (!r.local && r.afterState.get(n.clientID) !== r.beforeState.get(n.clientID) && (zRe(vB, ele, "[yjs] ", tle, rle, "Changed the client-id because another client seems to be using it."), n.clientID = ole()), n.emit("afterTransactionCleanup", [r, n]), n._observers.has("update")) { + const h = new vk(); + BY(h, r) && n.emit("update", [h.toUint8Array(), r.origin, n, r]); } if (n._observers.has("updateV2")) { const h = new vg(); - NY(h, r) && n.emit("updateV2", [h.toUint8Array(), r.origin, n, r]); + BY(h, r) && n.emit("updateV2", [h.toUint8Array(), r.origin, n, r]); } const { subdocsAdded: o, subdocsLoaded: l, subdocsRemoved: u } = r; (o.size > 0 || u.size > 0 || l.size > 0) && (o.forEach((h) => { h.clientID = n.clientID, h.collectionid == null && (h.collectionid = n.collectionid), n.subdocs.add(h); - }), u.forEach((h) => n.subdocs.delete(h)), n.emit("subdocs", [{ loaded: l, added: o, removed: u }, n, r]), u.forEach((h) => h.destroy())), t.length <= e + 1 ? (n._transactionCleanups = [], n.emit("afterAllTransactions", [n, t])) : Ole(t, e + 1); + }), u.forEach((h) => n.subdocs.delete(h)), n.emit("subdocs", [{ loaded: l, added: o, removed: u }, n, r]), u.forEach((h) => h.destroy())), t.length <= e + 1 ? (n._transactionCleanups = [], n.emit("afterAllTransactions", [n, t])) : wle(t, e + 1); } } -}, Bn = (t, e, r = null, n = !0) => { +}, $n = (t, e, r = null, n = !0) => { const i = t._transactionCleanups; let s = !1, a = null; - t._transaction === null && (s = !0, t._transaction = new nLe(t, r, n), i.push(t._transaction), i.length === 1 && t.emit("beforeAllTransactions", [t]), t.emit("beforeTransaction", [t._transaction, t])); + t._transaction === null && (s = !0, t._transaction = new fLe(t, r, n), i.push(t._transaction), i.length === 1 && t.emit("beforeAllTransactions", [t]), t.emit("beforeTransaction", [t._transaction, t])); try { a = e(t._transaction); } finally { if (s) { const o = t._transaction === i[0]; - t._transaction = null, o && Ole(i, 0); + t._transaction = null, o && wle(i, 0); } } return a; }; -class aLe { +class gLe { constructor(e, r) { this.insertions = r, this.deletions = e, this.meta = /* @__PURE__ */ new Map(); } } -const $Y = (t, e, r) => { - wv(t, r.deletions, (n) => { - n instanceof zn && e.scope.some((i) => LT(i, n)) && $B(n, !1); +const zY = (t, e, r) => { + vv(t, r.deletions, (n) => { + n instanceof Fn && e.scope.some((i) => mT(i, n)) && RB(n, !1); }); -}, BY = (t, e, r) => { +}, qY = (t, e, r) => { let n = null, i = null; const s = t.doc, a = t.scope; - if (Bn(s, (o) => { + if ($n(s, (o) => { for (; e.length > 0 && n === null; ) { const l = s.store, u = e.pop(), h = /* @__PURE__ */ new Set(), f = []; let d = !1; - wv(o, u.insertions, (p) => { - if (p instanceof zn) { + vv(o, u.insertions, (p) => { + if (p instanceof Fn) { if (p.redone !== null) { - let { item: g, diff: m } = L9(l, p.id); - m > 0 && (g = Bo(o, Wr(g.id.client, g.id.clock + m))), p = g; + let { item: g, diff: m } = v9(l, p.id); + m > 0 && (g = No(o, Wr(g.id.client, g.id.clock + m))), p = g; } - !p.deleted && a.some((g) => LT(g, p)) && f.push(p); + !p.deleted && a.some((g) => mT(g, p)) && f.push(p); } - }), wv(o, u.deletions, (p) => { - p instanceof zn && a.some((g) => LT(g, p)) && !Sk(u.insertions, p.id) && h.add(p); + }), vv(o, u.deletions, (p) => { + p instanceof Fn && a.some((g) => mT(g, p)) && !mk(u.insertions, p.id) && h.add(p); }), h.forEach((p) => { - d = zle(o, p, h, u.insertions, t.ignoreRemoteMapChanges, t) !== null || d; + d = Fle(o, p, h, u.insertions, t.ignoreRemoteMapChanges, t) !== null || d; }); for (let p = f.length - 1; p >= 0; p--) { const g = f[p]; @@ -19166,34 +19166,34 @@ const $Y = (t, e, r) => { } return n; }; -class AB extends t6 { +class OB extends q_ { constructor(e, { captureTimeout: r = 500, captureTransaction: n = (l) => !0, deleteFilter: i = () => !0, trackedOrigins: s = /* @__PURE__ */ new Set([null]), ignoreRemoteMapChanges: a = !1, - doc: o = b9(e) ? e[0].doc : e.doc + doc: o = s9(e) ? e[0].doc : e.doc } = {}) { super(), this.scope = [], this.doc = o, this.addToScope(e), this.deleteFilter = i, s.add(this), this.trackedOrigins = s, this.captureTransaction = n, this.undoStack = [], this.redoStack = [], this.undoing = !1, this.redoing = !1, this.lastChange = 0, this.ignoreRemoteMapChanges = a, this.captureTimeout = r, this.afterTransactionHandler = (l) => { if (!this.captureTransaction(l) || !this.scope.some((v) => l.changedParentTypes.has(v)) || !this.trackedOrigins.has(l.origin) && (!l.origin || !this.trackedOrigins.has(l.origin.constructor))) return; const u = this.undoing, h = this.redoing, f = u ? this.redoStack : this.undoStack; u ? this.stopCapturing() : h || this.clear(!1, !0); - const d = new Iy(); + const d = new Dy(); l.afterState.forEach((v, y) => { const b = l.beforeState.get(y) || 0, w = v - b; - w > 0 && sw(d, y, b, w); + w > 0 && Zx(d, y, b, w); }); - const p = pp(); + const p = dp(); let g = !1; if (this.lastChange > 0 && p - this.lastChange < this.captureTimeout && f.length > 0 && !u && !h) { const v = f[f.length - 1]; - v.deletions = T9([v.deletions, l.deleteSet]), v.insertions = T9([v.insertions, d]); + v.deletions = h9([v.deletions, l.deleteSet]), v.insertions = h9([v.insertions, d]); } else - f.push(new aLe(l.deleteSet, d)), g = !0; - !u && !h && (this.lastChange = p), wv(l, l.deleteSet, (v) => { - v instanceof zn && this.scope.some((y) => LT(y, v)) && $B(v, !0); + f.push(new gLe(l.deleteSet, d)), g = !0; + !u && !h && (this.lastChange = p), vv(l, l.deleteSet, (v) => { + v instanceof Fn && this.scope.some((y) => mT(y, v)) && RB(v, !0); }); const m = [{ stackItem: f[f.length - 1], origin: l.origin, type: u ? "redo" : "undo", changedParentTypes: l.changedParentTypes }, this]; g ? this.emit("stack-item-added", m) : this.emit("stack-item-updated", m); @@ -19202,8 +19202,8 @@ class AB extends t6 { }); } addToScope(e) { - e = b9(e) ? e : [e], e.forEach((r) => { - this.scope.every((n) => n !== r) && (r.doc !== this.doc && MRe("[yjs#509] Not same Y.Doc"), this.scope.push(r)); + e = s9(e) ? e : [e], e.forEach((r) => { + this.scope.every((n) => n !== r) && (r.doc !== this.doc && qRe("[yjs#509] Not same Y.Doc"), this.scope.push(r)); }); } addTrackedOrigin(e) { @@ -19214,7 +19214,7 @@ class AB extends t6 { } clear(e = !0, r = !0) { (e && this.canUndo() || r && this.canRedo()) && this.doc.transact((n) => { - e && (this.undoStack.forEach((i) => $Y(n, this, i)), this.undoStack = []), r && (this.redoStack.forEach((i) => $Y(n, this, i)), this.redoStack = []), this.emit("stack-cleared", [{ undoStackCleared: e, redoStackCleared: r }]); + e && (this.undoStack.forEach((i) => zY(n, this, i)), this.undoStack = []), r && (this.redoStack.forEach((i) => zY(n, this, i)), this.redoStack = []), this.emit("stack-cleared", [{ undoStackCleared: e, redoStackCleared: r }]); }); } stopCapturing() { @@ -19224,7 +19224,7 @@ class AB extends t6 { this.undoing = !0; let e; try { - e = BY(this, this.undoStack, "undo"); + e = qY(this, this.undoStack, "undo"); } finally { this.undoing = !1; } @@ -19234,7 +19234,7 @@ class AB extends t6 { this.redoing = !0; let e; try { - e = BY(this, this.redoStack, "redo"); + e = qY(this, this.redoStack, "redo"); } finally { this.redoing = !1; } @@ -19250,7 +19250,7 @@ class AB extends t6 { this.trackedOrigins.delete(this), this.doc.off("afterTransaction", this.afterTransactionHandler), super.destroy(); } } -function* oLe(t) { +function* mLe(t) { const e = zr(t.restDecoder); for (let r = 0; r < e; r++) { const n = zr(t.restDecoder), i = t.readClient(); @@ -19259,52 +19259,52 @@ function* oLe(t) { const o = t.readInfo(); if (o === 10) { const l = zr(t.restDecoder); - yield new Hl(Wr(i, s), l), s += l; - } else if ((n6 & o) !== 0) { - const l = (o & (yf | bl)) === 0, u = new zn( + yield new Ul(Wr(i, s), l), s += l; + } else if ((Q_ & o) !== 0) { + const l = (o & (ff | gl)) === 0, u = new Fn( Wr(i, s), null, - (o & bl) === bl ? t.readLeftID() : null, + (o & gl) === gl ? t.readLeftID() : null, null, - (o & yf) === yf ? t.readRightID() : null, + (o & ff) === ff ? t.readRightID() : null, l ? t.readParentInfo() ? t.readString() : t.readLeftID() : null, - l && (o & tw) === tw ? t.readString() : null, - qle(t, o) + l && (o & Yx) === Yx ? t.readString() : null, + zle(t, o) ); yield u, s += u.length; } else { const l = t.readLen(); - yield new Gl(Wr(i, s), l), s += l; + yield new ql(Wr(i, s), l), s += l; } } } } -class RB { +class kB { constructor(e, r) { - this.gen = oLe(e), this.curr = null, this.done = !1, this.filterSkips = r, this.next(); + this.gen = mLe(e), this.curr = null, this.done = !1, this.filterSkips = r, this.next(); } next() { do this.curr = this.gen.next().value || null; - while (this.filterSkips && this.curr !== null && this.curr.constructor === Hl); + while (this.filterSkips && this.curr !== null && this.curr.constructor === Ul); return this.curr; } } -class LB { +class SB { constructor(e) { this.currClient = 0, this.startClock = 0, this.written = 0, this.encoder = e, this.clientStructs = []; } } -const lLe = (t) => MT(t, ule, Tk), cLe = (t, e) => { - if (t.constructor === Gl) { +const vLe = (t) => vT(t, cle, vk), yLe = (t, e) => { + if (t.constructor === ql) { const { client: r, clock: n } = t.id; - return new Gl(Wr(r, n + e), t.length - e); - } else if (t.constructor === Hl) { + return new ql(Wr(r, n + e), t.length - e); + } else if (t.constructor === Ul) { const { client: r, clock: n } = t.id; - return new Hl(Wr(r, n + e), t.length - e); + return new Ul(Wr(r, n + e), t.length - e); } else { const r = t, { client: n, clock: i } = r.id; - return new zn( + return new Fn( Wr(n, i + e), null, Wr(n, i + e - 1), @@ -19315,17 +19315,17 @@ const lLe = (t) => MT(t, ule, Tk), cLe = (t, e) => { r.content.splice(e) ); } -}, MT = (t, e = Ov, r = vg) => { +}, vT = (t, e = yv, r = vg) => { if (t.length === 1) return t[0]; - const n = t.map((h) => new e(qp(h))); - let i = n.map((h) => new RB(h, !0)), s = null; - const a = new r(), o = new LB(a); + const n = t.map((h) => new e(Up(h))); + let i = n.map((h) => new kB(h, !0)), s = null; + const a = new r(), o = new SB(a); for (; i = i.filter((d) => d.curr !== null), i.sort( (d, p) => { if (d.curr.id.client === p.curr.id.client) { const g = d.curr.id.clock - p.curr.id.clock; - return g === 0 ? d.curr.constructor === p.curr.constructor ? 0 : d.curr.constructor === Hl ? 1 : -1 : g; + return g === 0 ? d.curr.constructor === p.curr.constructor ? 0 : d.curr.constructor === Ul ? 1 : -1 : g; } else return p.curr.id.client - d.curr.id.client; } @@ -19338,79 +19338,79 @@ const lLe = (t) => MT(t, ule, Tk), cLe = (t, e) => { if (d === null || d.id.client !== f || p && d.id.clock > s.struct.id.clock + s.struct.length) continue; if (f !== s.struct.id.client) - kd(o, s.struct, s.offset), s = { struct: d, offset: 0 }, h.next(); + bd(o, s.struct, s.offset), s = { struct: d, offset: 0 }, h.next(); else if (s.struct.id.clock + s.struct.length < d.id.clock) - if (s.struct.constructor === Hl) + if (s.struct.constructor === Ul) s.struct.length = d.id.clock + d.length - s.struct.id.clock; else { - kd(o, s.struct, s.offset); + bd(o, s.struct, s.offset); const g = d.id.clock - s.struct.id.clock - s.struct.length; - s = { struct: new Hl(Wr(f, s.struct.id.clock + s.struct.length), g), offset: 0 }; + s = { struct: new Ul(Wr(f, s.struct.id.clock + s.struct.length), g), offset: 0 }; } else { const g = s.struct.id.clock + s.struct.length - d.id.clock; - g > 0 && (s.struct.constructor === Hl ? s.struct.length -= g : d = cLe(d, g)), s.struct.mergeWith(d) || (kd(o, s.struct, s.offset), s = { struct: d, offset: 0 }, h.next()); + g > 0 && (s.struct.constructor === Ul ? s.struct.length -= g : d = yLe(d, g)), s.struct.mergeWith(d) || (bd(o, s.struct, s.offset), s = { struct: d, offset: 0 }, h.next()); } } else s = { struct: h.curr, offset: 0 }, h.next(); - for (let d = h.curr; d !== null && d.id.client === f && d.id.clock === s.struct.id.clock + s.struct.length && d.constructor !== Hl; d = h.next()) - kd(o, s.struct, s.offset), s = { struct: d, offset: 0 }; - } - s !== null && (kd(o, s.struct, s.offset), s = null), MB(o); - const l = n.map((h) => EB(h)), u = T9(l); - return $y(a, u), a.toUint8Array(); -}, uLe = (t, e, r = Ov, n = vg) => { - const i = ple(e), s = new n(), a = new LB(s), o = new r(qp(t)), l = new RB(o, !1); + for (let d = h.curr; d !== null && d.id.client === f && d.id.clock === s.struct.id.clock + s.struct.length && d.constructor !== Ul; d = h.next()) + bd(o, s.struct, s.offset), s = { struct: d, offset: 0 }; + } + s !== null && (bd(o, s.struct, s.offset), s = null), TB(o); + const l = n.map((h) => xB(h)), u = h9(l); + return Py(a, u), a.toUint8Array(); +}, bLe = (t, e, r = yv, n = vg) => { + const i = dle(e), s = new n(), a = new SB(s), o = new r(Up(t)), l = new kB(o, !1); for (; l.curr; ) { const h = l.curr, f = h.id.client, d = i.get(f) || 0; - if (l.curr.constructor === Hl) { + if (l.curr.constructor === Ul) { l.next(); continue; } if (h.id.clock + h.length > d) - for (kd(a, h, zp(d - h.id.clock, 0)), l.next(); l.curr && l.curr.id.client === f; ) - kd(a, l.curr, 0), l.next(); + for (bd(a, h, qp(d - h.id.clock, 0)), l.next(); l.curr && l.curr.id.client === f; ) + bd(a, l.curr, 0), l.next(); else for (; l.curr && l.curr.id.client === f && l.curr.id.clock + l.curr.length <= d; ) l.next(); } - MB(a); - const u = EB(o); - return $y(s, u), s.toUint8Array(); -}, kle = (t) => { - t.written > 0 && (t.clientStructs.push({ written: t.written, restEncoder: fi(t.encoder.restEncoder) }), t.encoder.restEncoder = Ra(), t.written = 0); -}, kd = (t, e, r) => { - t.written > 0 && t.currClient !== e.id.client && kle(t), t.written === 0 && (t.currClient = e.id.client, t.encoder.writeClient(e.id.client), Cr(t.encoder.restEncoder, e.id.clock + r)), e.write(t.encoder, r), t.written++; -}, MB = (t) => { - kle(t); + TB(a); + const u = xB(o); + return Py(s, u), s.toUint8Array(); +}, Ole = (t) => { + t.written > 0 && (t.clientStructs.push({ written: t.written, restEncoder: hi(t.encoder.restEncoder) }), t.encoder.restEncoder = _a(), t.written = 0); +}, bd = (t, e, r) => { + t.written > 0 && t.currClient !== e.id.client && Ole(t), t.written === 0 && (t.currClient = e.id.client, t.encoder.writeClient(e.id.client), kr(t.encoder.restEncoder, e.id.clock + r)), e.write(t.encoder, r), t.written++; +}, TB = (t) => { + Ole(t); const e = t.encoder.restEncoder; - Cr(e, t.clientStructs.length); + kr(e, t.clientStructs.length); for (let r = 0; r < t.clientStructs.length; r++) { const n = t.clientStructs[r]; - Cr(e, n.written), i6(e, n.restEncoder); + kr(e, n.written), V_(e, n.restEncoder); } -}, hLe = (t, e, r, n) => { - const i = new r(qp(t)), s = new RB(i, !1), a = new n(), o = new LB(a); +}, xLe = (t, e, r, n) => { + const i = new r(Up(t)), s = new kB(i, !1), a = new n(), o = new SB(a); for (let u = s.curr; u !== null; u = s.next()) - kd(o, e(u), 0); - MB(o); - const l = EB(i); - return $y(a, l), a.toUint8Array(); -}, fLe = (t) => hLe(t, J8e, Ov, Tk), FY = "You must not compute changes after the event-handler fired."; -class l6 { + bd(o, e(u), 0); + TB(o); + const l = xB(i); + return Py(a, l), a.toUint8Array(); +}, wLe = (t) => xLe(t, lRe, yv, vk), UY = "You must not compute changes after the event-handler fired."; +class H_ { constructor(e, r) { this.target = e, this.currentTarget = e, this.transaction = r, this._changes = null, this._keys = null, this._delta = null, this._path = null; } get path() { - return this._path || (this._path = dLe(this.currentTarget, this.target)); + return this._path || (this._path = OLe(this.currentTarget, this.target)); } deletes(e) { - return Sk(this.transaction.deleteSet, e.id); + return mk(this.transaction.deleteSet, e.id); } get keys() { if (this._keys === null) { if (this.transaction.doc._transactionCleanups.length === 0) - throw dp(FY); + throw fp(UY); const e = /* @__PURE__ */ new Map(), r = this.target; this.transaction.changed.get(r).forEach((i) => { if (i !== null) { @@ -19422,13 +19422,13 @@ class l6 { l = l.left; if (this.deletes(s)) if (l !== null && this.deletes(l)) - a = "delete", o = h8(l.content.getContent()); + a = "delete", o = K7(l.content.getContent()); else return; else - l !== null && this.deletes(l) ? (a = "update", o = h8(l.content.getContent())) : (a = "add", o = void 0); + l !== null && this.deletes(l) ? (a = "update", o = K7(l.content.getContent())) : (a = "add", o = void 0); } else if (this.deletes(s)) - a = "delete", o = h8(s.content.getContent()); + a = "delete", o = K7(s.content.getContent()); else return; e.set(i, { action: a, oldValue: o }); @@ -19447,7 +19447,7 @@ class l6 { let e = this._changes; if (e === null) { if (this.transaction.doc._transactionCleanups.length === 0) - throw dp(FY); + throw fp(UY); const r = this.target, n = mg(), i = mg(), s = []; if (e = { added: n, @@ -19468,7 +19468,7 @@ class l6 { return e; } } -const dLe = (t, e) => { +const OLe = (t, e) => { const r = []; for (; e._item !== null && e !== t; ) { if (e._item.parentSub !== null) @@ -19482,31 +19482,31 @@ const dLe = (t, e) => { e = e._item.parent; } return r; -}, Sle = 80; -let DB = 0; -class pLe { +}, kle = 80; +let CB = 0; +class kLe { constructor(e, r) { - e.marker = !0, this.p = e, this.index = r, this.timestamp = DB++; + e.marker = !0, this.p = e, this.index = r, this.timestamp = CB++; } } -const gLe = (t) => { - t.timestamp = DB++; -}, Tle = (t, e, r) => { - t.p.marker = !1, t.p = e, e.marker = !0, t.index = r, t.timestamp = DB++; -}, mLe = (t, e, r) => { - if (t.length >= Sle) { +const SLe = (t) => { + t.timestamp = CB++; +}, Sle = (t, e, r) => { + t.p.marker = !1, t.p = e, e.marker = !0, t.index = r, t.timestamp = CB++; +}, TLe = (t, e, r) => { + if (t.length >= kle) { const n = t.reduce((i, s) => i.timestamp < s.timestamp ? i : s); - return Tle(n, e, r), n; + return Sle(n, e, r), n; } else { - const n = new pLe(e, r); + const n = new kLe(e, r); return t.push(n), n; } -}, c6 = (t, e) => { +}, X_ = (t, e) => { if (t._start === null || e === 0 || t._searchMarker === null) return null; - const r = t._searchMarker.length === 0 ? null : t._searchMarker.reduce((s, a) => e3(e - s.index) < e3(e - a.index) ? s : a); + const r = t._searchMarker.length === 0 ? null : t._searchMarker.reduce((s, a) => z5(e - s.index) < z5(e - a.index) ? s : a); let n = t._start, i = 0; - for (r !== null && (n = r.p, i = r.index, gLe(r)); n.right !== null && i < e; ) { + for (r !== null && (n = r.p, i = r.index, SLe(r)); n.right !== null && i < e; ) { if (!n.deleted && n.countable) { if (e < i + n.length) break; @@ -19518,8 +19518,8 @@ const gLe = (t) => { n = n.left, !n.deleted && n.countable && (i -= n.length); for (; n.left !== null && n.left.id.client === n.id.client && n.left.id.clock + n.left.length === n.id.clock; ) n = n.left, !n.deleted && n.countable && (i -= n.length); - return r !== null && e3(r.index - i) < n.parent.length / Sle ? (Tle(r, n, i), r) : mLe(t._searchMarker, n, i); -}, ow = (t, e, r) => { + return r !== null && z5(r.index - i) < n.parent.length / kle ? (Sle(r, n, i), r) : TLe(t._searchMarker, n, i); +}, Kx = (t, e, r) => { for (let n = t.length - 1; n >= 0; n--) { const i = t[n]; if (r > 0) { @@ -19532,17 +19532,17 @@ const gLe = (t) => { } i.p = s, s.marker = !0; } - (e < i.index || r > 0 && e === i.index) && (i.index = zp(e, i.index + r)); + (e < i.index || r > 0 && e === i.index) && (i.index = qp(e, i.index + r)); } -}, u6 = (t, e, r) => { +}, Z_ = (t, e, r) => { const n = t, i = e.changedParentTypes; - for (; Xf(i, t, () => []).push(r), t._item !== null; ) + for (; Vf(i, t, () => []).push(r), t._item !== null; ) t = t._item.parent; - mle(n._eH, r, e); + gle(n._eH, r, e); }; -class ca { +class ia { constructor() { - this._item = null, this._map = /* @__PURE__ */ new Map(), this._start = null, this.doc = null, this._length = 0, this._eH = AY(), this._dEH = AY(), this._searchMarker = null; + this._item = null, this._map = /* @__PURE__ */ new Map(), this._start = null, this.doc = null, this._length = 0, this._eH = MY(), this._dEH = MY(), this._searchMarker = null; } get parent() { return this._item ? this._item.parent : null; @@ -19551,10 +19551,10 @@ class ca { this.doc = e, this._item = r; } _copy() { - throw ih(); + throw Ju(); } clone() { - throw ih(); + throw Ju(); } _write(e) { } @@ -19568,21 +19568,21 @@ class ca { !e.local && this._searchMarker && (this._searchMarker.length = 0); } observe(e) { - RY(this._eH, e); + DY(this._eH, e); } observeDeep(e) { - RY(this._dEH, e); + DY(this._dEH, e); } unobserve(e) { - LY(this._eH, e); + PY(this._eH, e); } unobserveDeep(e) { - LY(this._dEH, e); + PY(this._dEH, e); } toJSON() { } } -const Cle = (t, e, r) => { +const Tle = (t, e, r) => { e < 0 && (e = t._length + e), r < 0 && (r = t._length + r); let n = r - e; const i = []; @@ -19601,7 +19601,7 @@ const Cle = (t, e, r) => { s = s.right; } return i; -}, Ele = (t) => { +}, Cle = (t) => { const e = []; let r = t._start; for (; r !== null; ) { @@ -19613,7 +19613,7 @@ const Cle = (t, e, r) => { r = r.right; } return e; -}, lw = (t, e) => { +}, Jx = (t, e) => { let r = 0, n = t._start; for (; n !== null; ) { if (n.countable && !n.deleted) { @@ -19623,12 +19623,12 @@ const Cle = (t, e, r) => { } n = n.right; } -}, _le = (t, e) => { +}, Ele = (t, e) => { const r = []; - return lw(t, (n, i) => { + return Jx(t, (n, i) => { r.push(e(n, i, t)); }), r; -}, vLe = (t) => { +}, CLe = (t) => { let e = t._start, r = null, n = 0; return { [Symbol.iterator]() { @@ -19652,8 +19652,8 @@ const Cle = (t, e, r) => { }; } }; -}, Ale = (t, e) => { - const r = c6(t, e); +}, _le = (t, e) => { + const r = X_(t, e); let n = t._start; for (r !== null && (n = r.p, e -= r.index); n !== null; n = n.right) if (!n.deleted && n.countable) { @@ -19661,12 +19661,12 @@ const Cle = (t, e, r) => { return n.content.getContent()[e]; e -= n.length; } -}, DT = (t, e, r, n) => { +}, yT = (t, e, r, n) => { let i = r; const s = t.doc, a = s.clientID, o = s.store, l = r === null ? e._start : r.right; let u = []; const h = () => { - u.length > 0 && (i = new zn(Wr(a, zi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new bg(u)), i.integrate(t, 0), u = []); + u.length > 0 && (i = new Fn(Wr(a, Fi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new bg(u)), i.integrate(t, 0), u = []); }; n.forEach((f) => { if (f === null) @@ -19684,57 +19684,57 @@ const Cle = (t, e, r) => { switch (h(), f.constructor) { case Uint8Array: case ArrayBuffer: - i = new zn(Wr(a, zi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new Ck(new Uint8Array(f))), i.integrate(t, 0); + i = new Fn(Wr(a, Fi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new yk(new Uint8Array(f))), i.integrate(t, 0); break; - case By: - i = new zn(Wr(a, zi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new Ek(f)), i.integrate(t, 0); + case Ny: + i = new Fn(Wr(a, Fi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new bk(f)), i.integrate(t, 0); break; default: - if (f instanceof ca) - i = new zn(Wr(a, zi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new _h(f)), i.integrate(t, 0); + if (f instanceof ia) + i = new Fn(Wr(a, Fi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new Sh(f)), i.integrate(t, 0); else throw new Error("Unexpected content type in insert operation"); } } }), h(); -}, Rle = () => dp("Length exceeded!"), Lle = (t, e, r, n) => { +}, Ale = () => fp("Length exceeded!"), Rle = (t, e, r, n) => { if (r > e._length) - throw Rle(); + throw Ale(); if (r === 0) - return e._searchMarker && ow(e._searchMarker, r, n.length), DT(t, e, null, n); - const i = r, s = c6(e, r); + return e._searchMarker && Kx(e._searchMarker, r, n.length), yT(t, e, null, n); + const i = r, s = X_(e, r); let a = e._start; for (s !== null && (a = s.p, r -= s.index, r === 0 && (a = a.prev, r += a && a.countable && !a.deleted ? a.length : 0)); a !== null; a = a.right) if (!a.deleted && a.countable) { if (r <= a.length) { - r < a.length && Bo(t, Wr(a.id.client, a.id.clock + r)); + r < a.length && No(t, Wr(a.id.client, a.id.clock + r)); break; } r -= a.length; } - return e._searchMarker && ow(e._searchMarker, i, n.length), DT(t, e, a, n); -}, yLe = (t, e, r) => { + return e._searchMarker && Kx(e._searchMarker, i, n.length), yT(t, e, a, n); +}, ELe = (t, e, r) => { let i = (e._searchMarker || []).reduce((s, a) => a.index > s.index ? a : s, { index: 0, p: e._start }).p; if (i) for (; i.right; ) i = i.right; - return DT(t, e, i, r); -}, Mle = (t, e, r, n) => { + return yT(t, e, i, r); +}, Lle = (t, e, r, n) => { if (n === 0) return; - const i = r, s = n, a = c6(e, r); + const i = r, s = n, a = X_(e, r); let o = e._start; for (a !== null && (o = a.p, r -= a.index); o !== null && r > 0; o = o.right) - !o.deleted && o.countable && (r < o.length && Bo(t, Wr(o.id.client, o.id.clock + r)), r -= o.length); + !o.deleted && o.countable && (r < o.length && No(t, Wr(o.id.client, o.id.clock + r)), r -= o.length); for (; n > 0 && o !== null; ) - o.deleted || (n < o.length && Bo(t, Wr(o.id.client, o.id.clock + n)), o.delete(t), n -= o.length), o = o.right; + o.deleted || (n < o.length && No(t, Wr(o.id.client, o.id.clock + n)), o.delete(t), n -= o.length), o = o.right; if (n > 0) - throw Rle(); - e._searchMarker && ow(e._searchMarker, i, -s + n); -}, PT = (t, e, r) => { + throw Ale(); + e._searchMarker && Kx(e._searchMarker, i, -s + n); +}, bT = (t, e, r) => { const n = e._map.get(r); n !== void 0 && n.delete(t); -}, PB = (t, e, r, n) => { +}, EB = (t, e, r, n) => { const i = e._map.get(r) || null, s = t.doc, a = s.clientID; let o; if (n == null) @@ -19749,119 +19749,119 @@ const Cle = (t, e, r) => { o = new bg([n]); break; case Uint8Array: - o = new Ck(n); + o = new yk(n); break; - case By: - o = new Ek(n); + case Ny: + o = new bk(n); break; default: - if (n instanceof ca) - o = new _h(n); + if (n instanceof ia) + o = new Sh(n); else throw new Error("Unexpected content type"); } - new zn(Wr(a, zi(s.store, a)), i, i && i.lastId, null, null, e, r, o).integrate(t, 0); -}, NB = (t, e) => { + new Fn(Wr(a, Fi(s.store, a)), i, i && i.lastId, null, null, e, r, o).integrate(t, 0); +}, _B = (t, e) => { const r = t._map.get(e); return r !== void 0 && !r.deleted ? r.content.getContent()[r.length - 1] : void 0; -}, Dle = (t) => { +}, Mle = (t) => { const e = {}; return t._map.forEach((r, n) => { r.deleted || (e[n] = r.content.getContent()[r.length - 1]); }), e; -}, Ple = (t, e) => { +}, Dle = (t, e) => { const r = t._map.get(e); return r !== void 0 && !r.deleted; -}, bLe = (t, e) => { +}, _Le = (t, e) => { const r = {}; return t._map.forEach((n, i) => { let s = n; for (; s !== null && (!e.sv.has(s.id.client) || s.id.clock >= (e.sv.get(s.id.client) || 0)); ) s = s.left; - s !== null && n1(s, e) && (r[i] = s.content.getContent()[s.length - 1]); + s !== null && jm(s, e) && (r[i] = s.content.getContent()[s.length - 1]); }), r; -}, pS = (t) => DRe(t.entries(), (e) => !e[1].deleted); -class xLe extends l6 { +}, rS = (t) => URe(t.entries(), (e) => !e[1].deleted); +class ALe extends H_ { constructor(e, r) { super(e, r), this._transaction = r; } } -class N1 extends ca { +class R1 extends ia { constructor() { super(), this._prelimContent = [], this._searchMarker = []; } static from(e) { - const r = new N1(); + const r = new R1(); return r.push(e), r; } _integrate(e, r) { super._integrate(e, r), this.insert(0, this._prelimContent), this._prelimContent = null; } _copy() { - return new N1(); + return new R1(); } clone() { - const e = new N1(); + const e = new R1(); return e.insert(0, this.toArray().map( - (r) => r instanceof ca ? r.clone() : r + (r) => r instanceof ia ? r.clone() : r )), e; } get length() { return this._prelimContent === null ? this._length : this._prelimContent.length; } _callObserver(e, r) { - super._callObserver(e, r), u6(this, e, new xLe(this, e)); + super._callObserver(e, r), Z_(this, e, new ALe(this, e)); } insert(e, r) { - this.doc !== null ? Bn(this.doc, (n) => { - Lle(n, this, e, r); + this.doc !== null ? $n(this.doc, (n) => { + Rle(n, this, e, r); }) : this._prelimContent.splice(e, 0, ...r); } push(e) { - this.doc !== null ? Bn(this.doc, (r) => { - yLe(r, this, e); + this.doc !== null ? $n(this.doc, (r) => { + ELe(r, this, e); }) : this._prelimContent.push(...e); } unshift(e) { this.insert(0, e); } delete(e, r = 1) { - this.doc !== null ? Bn(this.doc, (n) => { - Mle(n, this, e, r); + this.doc !== null ? $n(this.doc, (n) => { + Lle(n, this, e, r); }) : this._prelimContent.splice(e, r); } get(e) { - return Ale(this, e); + return _le(this, e); } toArray() { - return Ele(this); + return Cle(this); } slice(e = 0, r = this.length) { - return Cle(this, e, r); + return Tle(this, e, r); } toJSON() { - return this.map((e) => e instanceof ca ? e.toJSON() : e); + return this.map((e) => e instanceof ia ? e.toJSON() : e); } map(e) { - return _le(this, e); + return Ele(this, e); } forEach(e) { - lw(this, e); + Jx(this, e); } [Symbol.iterator]() { - return vLe(this); + return CLe(this); } _write(e) { - e.writeTypeRef(VLe); + e.writeTypeRef(JLe); } } -const wLe = (t) => new N1(); -class OLe extends l6 { +const RLe = (t) => new R1(); +class LLe extends H_ { constructor(e, r, n) { super(e, r), this.keysChanged = n; } } -class sh extends ca { +class eh extends ia { constructor(e) { super(), this._prelimContent = null, e === void 0 ? this._prelimContent = /* @__PURE__ */ new Map() : this._prelimContent = new Map(e); } @@ -19871,37 +19871,37 @@ class sh extends ca { }), this._prelimContent = null; } _copy() { - return new sh(); + return new eh(); } clone() { - const e = new sh(); + const e = new eh(); return this.forEach((r, n) => { - e.set(n, r instanceof ca ? r.clone() : r); + e.set(n, r instanceof ia ? r.clone() : r); }), e; } _callObserver(e, r) { - u6(this, e, new OLe(this, e, r)); + Z_(this, e, new LLe(this, e, r)); } toJSON() { const e = {}; return this._map.forEach((r, n) => { if (!r.deleted) { const i = r.content.getContent()[r.length - 1]; - e[n] = i instanceof ca ? i.toJSON() : i; + e[n] = i instanceof ia ? i.toJSON() : i; } }), e; } get size() { - return [...pS(this._map)].length; + return [...rS(this._map)].length; } keys() { - return y8(pS(this._map), (e) => e[0]); + return s8(rS(this._map), (e) => e[0]); } values() { - return y8(pS(this._map), (e) => e[1].content.getContent()[e[1].length - 1]); + return s8(rS(this._map), (e) => e[1].content.getContent()[e[1].length - 1]); } entries() { - return y8(pS(this._map), (e) => [e[0], e[1].content.getContent()[e[1].length - 1]]); + return s8(rS(this._map), (e) => [e[0], e[1].content.getContent()[e[1].length - 1]]); } forEach(e) { this._map.forEach((r, n) => { @@ -19912,41 +19912,41 @@ class sh extends ca { return this.entries(); } delete(e) { - this.doc !== null ? Bn(this.doc, (r) => { - PT(r, this, e); + this.doc !== null ? $n(this.doc, (r) => { + bT(r, this, e); }) : this._prelimContent.delete(e); } set(e, r) { - return this.doc !== null ? Bn(this.doc, (n) => { - PB(n, this, e, r); + return this.doc !== null ? $n(this.doc, (n) => { + EB(n, this, e, r); }) : this._prelimContent.set(e, r), r; } get(e) { - return NB(this, e); + return _B(this, e); } has(e) { - return Ple(this, e); + return Dle(this, e); } clear() { - this.doc !== null ? Bn(this.doc, (e) => { + this.doc !== null ? $n(this.doc, (e) => { this.forEach(function(r, n, i) { - PT(e, i, n); + bT(e, i, n); }); }) : this._prelimContent.clear(); } _write(e) { - e.writeTypeRef(WLe); + e.writeTypeRef(eMe); } } -const kLe = (t) => new sh(), Md = (t, e) => t === e || typeof t == "object" && typeof e == "object" && t && e && K8e(t, e); -class R9 { +const MLe = (t) => new eh(), _d = (t, e) => t === e || typeof t == "object" && typeof e == "object" && t && e && oRe(t, e); +class m9 { constructor(e, r, n, i) { this.left = e, this.right = r, this.index = n, this.currentAttributes = i; } forward() { - switch (this.right === null && ou(), this.right.content.constructor) { - case bs: - this.right.deleted || Fy(this.currentAttributes, this.right.content); + switch (this.right === null && nu(), this.right.content.constructor) { + case vs: + this.right.deleted || Iy(this.currentAttributes, this.right.content); break; default: this.right.deleted || (this.index += this.right.length); @@ -19955,77 +19955,77 @@ class R9 { this.left = this.right, this.right = this.right.right; } } -const zY = (t, e, r) => { +const QY = (t, e, r) => { for (; e.right !== null && r > 0; ) { switch (e.right.content.constructor) { - case bs: - e.right.deleted || Fy(e.currentAttributes, e.right.content); + case vs: + e.right.deleted || Iy(e.currentAttributes, e.right.content); break; default: - e.right.deleted || (r < e.right.length && Bo(t, Wr(e.right.id.client, e.right.id.clock + r)), e.index += e.right.length, r -= e.right.length); + e.right.deleted || (r < e.right.length && No(t, Wr(e.right.id.client, e.right.id.clock + r)), e.index += e.right.length, r -= e.right.length); break; } e.left = e.right, e.right = e.right.right; } return e; -}, gS = (t, e, r) => { - const n = /* @__PURE__ */ new Map(), i = c6(e, r); +}, nS = (t, e, r) => { + const n = /* @__PURE__ */ new Map(), i = X_(e, r); if (i) { - const s = new R9(i.p.left, i.p, i.index, n); - return zY(t, s, r - i.index); + const s = new m9(i.p.left, i.p, i.index, n); + return QY(t, s, r - i.index); } else { - const s = new R9(null, e._start, 0, n); - return zY(t, s, r); + const s = new m9(null, e._start, 0, n); + return QY(t, s, r); } -}, Nle = (t, e, r, n) => { - for (; r.right !== null && (r.right.deleted === !0 || r.right.content.constructor === bs && Md(n.get(r.right.content.key), r.right.content.value)); ) +}, Ple = (t, e, r, n) => { + for (; r.right !== null && (r.right.deleted === !0 || r.right.content.constructor === vs && _d(n.get(r.right.content.key), r.right.content.value)); ) r.right.deleted || n.delete(r.right.content.key), r.forward(); const i = t.doc, s = i.clientID; n.forEach((a, o) => { - const l = r.left, u = r.right, h = new zn(Wr(s, zi(i.store, s)), l, l && l.lastId, u, u && u.id, e, null, new bs(o, a)); + const l = r.left, u = r.right, h = new Fn(Wr(s, Fi(i.store, s)), l, l && l.lastId, u, u && u.id, e, null, new vs(o, a)); h.integrate(t, 0), r.right = h, r.forward(); }); -}, Fy = (t, e) => { +}, Iy = (t, e) => { const { key: r, value: n } = e; n === null ? t.delete(r) : t.set(r, n); -}, Ile = (t, e) => { +}, Nle = (t, e) => { for (; t.right !== null; ) { - if (!(t.right.deleted || t.right.content.constructor === bs && Md(e[t.right.content.key] || null, t.right.content.value))) + if (!(t.right.deleted || t.right.content.constructor === vs && _d(e[t.right.content.key] || null, t.right.content.value))) break; t.forward(); } -}, $le = (t, e, r, n) => { +}, Ile = (t, e, r, n) => { const i = t.doc, s = i.clientID, a = /* @__PURE__ */ new Map(); for (const o in n) { const l = n[o], u = r.currentAttributes.get(o) || null; - if (!Md(u, l)) { + if (!_d(u, l)) { a.set(o, u); const { left: h, right: f } = r; - r.right = new zn(Wr(s, zi(i.store, s)), h, h && h.lastId, f, f && f.id, e, null, new bs(o, l)), r.right.integrate(t, 0), r.forward(); + r.right = new Fn(Wr(s, Fi(i.store, s)), h, h && h.lastId, f, f && f.id, e, null, new vs(o, l)), r.right.integrate(t, 0), r.forward(); } } return a; -}, b8 = (t, e, r, n, i) => { +}, a8 = (t, e, r, n, i) => { r.currentAttributes.forEach((d, p) => { i[p] === void 0 && (i[p] = null); }); const s = t.doc, a = s.clientID; - Ile(r, i); - const o = $le(t, e, r, i), l = n.constructor === String ? new gh(n) : n instanceof ca ? new _h(n) : new nm(n); + Nle(r, i); + const o = Ile(t, e, r, i), l = n.constructor === String ? new uh(n) : n instanceof ia ? new Sh(n) : new nm(n); let { left: u, right: h, index: f } = r; - e._searchMarker && ow(e._searchMarker, r.index, l.getLength()), h = new zn(Wr(a, zi(s.store, a)), u, u && u.lastId, h, h && h.id, e, null, l), h.integrate(t, 0), r.right = h, r.index = f, r.forward(), Nle(t, e, r, o); -}, qY = (t, e, r, n, i) => { + e._searchMarker && Kx(e._searchMarker, r.index, l.getLength()), h = new Fn(Wr(a, Fi(s.store, a)), u, u && u.lastId, h, h && h.id, e, null, l), h.integrate(t, 0), r.right = h, r.index = f, r.forward(), Ple(t, e, r, o); +}, VY = (t, e, r, n, i) => { const s = t.doc, a = s.clientID; - Ile(r, i); - const o = $le(t, e, r, i); + Nle(r, i); + const o = Ile(t, e, r, i); e: - for (; r.right !== null && (n > 0 || o.size > 0 && (r.right.deleted || r.right.content.constructor === bs)); ) { + for (; r.right !== null && (n > 0 || o.size > 0 && (r.right.deleted || r.right.content.constructor === vs)); ) { if (!r.right.deleted) switch (r.right.content.constructor) { - case bs: { + case vs: { const { key: l, value: u } = r.right.content, h = i[l]; if (h !== void 0) { - if (Md(h, u)) + if (_d(h, u)) o.delete(l); else { if (n === 0) @@ -20038,7 +20038,7 @@ const zY = (t, e, r) => { break; } default: - n < r.right.length && Bo(t, Wr(r.right.id.client, r.right.id.clock + n)), n -= r.right.length; + n < r.right.length && No(t, Wr(r.right.id.client, r.right.id.clock + n)), n -= r.right.length; break; } r.forward(); @@ -20048,14 +20048,14 @@ const zY = (t, e, r) => { for (; n > 0; n--) l += ` `; - r.right = new zn(Wr(a, zi(s.store, a)), r.left, r.left && r.left.lastId, r.right, r.right && r.right.id, e, null, new gh(l)), r.right.integrate(t, 0), r.forward(); + r.right = new Fn(Wr(a, Fi(s.store, a)), r.left, r.left && r.left.lastId, r.right, r.right && r.right.id, e, null, new uh(l)), r.right.integrate(t, 0), r.forward(); } - Nle(t, e, r, o); -}, Ble = (t, e, r, n, i) => { + Ple(t, e, r, o); +}, $le = (t, e, r, n, i) => { let s = e; - const a = Gc(); + const a = Qc(); for (; s && (!s.countable || s.deleted); ) { - if (!s.deleted && s.content.constructor === bs) { + if (!s.deleted && s.content.constructor === vs) { const u = s.content; a.set(u.key, u); } @@ -20066,9 +20066,9 @@ const zY = (t, e, r) => { if (r === e && (l = !0), !e.deleted) { const u = e.content; switch (u.constructor) { - case bs: { + case vs: { const { key: h, value: f } = u, d = n.get(h) || null; - (a.get(h) !== u || d === f) && (e.delete(t), o++, !l && (i.get(h) || null) === f && d !== f && (d === null ? i.delete(h) : i.set(h, d))), !l && !e.deleted && Fy(i, u); + (a.get(h) !== u || d === f) && (e.delete(t), o++, !l && (i.get(h) || null) === f && d !== f && (d === null ? i.delete(h) : i.set(h, d))), !l && !e.deleted && Iy(i, u); break; } } @@ -20076,71 +20076,71 @@ const zY = (t, e, r) => { e = e.right; } return o; -}, SLe = (t, e) => { +}, DLe = (t, e) => { for (; e && e.right && (e.right.deleted || !e.right.countable); ) e = e.right; const r = /* @__PURE__ */ new Set(); for (; e && (e.deleted || !e.countable); ) { - if (!e.deleted && e.content.constructor === bs) { + if (!e.deleted && e.content.constructor === vs) { const n = e.content.key; r.has(n) ? e.delete(t) : r.add(n); } e = e.left; } -}, TLe = (t) => { +}, PLe = (t) => { let e = 0; - return Bn(t.doc, (r) => { - let n = t._start, i = t._start, s = Gc(); - const a = y9(s); + return $n(t.doc, (r) => { + let n = t._start, i = t._start, s = Qc(); + const a = i9(s); for (; i; ) { if (i.deleted === !1) switch (i.content.constructor) { - case bs: - Fy(a, i.content); + case vs: + Iy(a, i.content); break; default: - e += Ble(r, n, i, s, a), s = y9(a), n = i; + e += $le(r, n, i, s, a), s = i9(a), n = i; break; } i = i.right; } }), e; -}, CLe = (t) => { +}, NLe = (t) => { const e = /* @__PURE__ */ new Set(), r = t.doc; for (const [n, i] of t.afterState.entries()) { const s = t.beforeState.get(n) || 0; - i !== s && wle(t, r.store.clients.get(n), s, i, (a) => { - !a.deleted && a.content.constructor === bs && a.constructor !== Gl && e.add(a.parent); + i !== s && xle(t, r.store.clients.get(n), s, i, (a) => { + !a.deleted && a.content.constructor === vs && a.constructor !== ql && e.add(a.parent); }); } - Bn(r, (n) => { - wv(t, t.deleteSet, (i) => { - if (i instanceof Gl || !i.parent._hasFormatting || e.has(i.parent)) + $n(r, (n) => { + vv(t, t.deleteSet, (i) => { + if (i instanceof ql || !i.parent._hasFormatting || e.has(i.parent)) return; const s = i.parent; - i.content.constructor === bs ? e.add(s) : SLe(n, i); + i.content.constructor === vs ? e.add(s) : DLe(n, i); }); for (const i of e) - TLe(i); + PLe(i); }); -}, UY = (t, e, r) => { - const n = r, i = y9(e.currentAttributes), s = e.right; +}, WY = (t, e, r) => { + const n = r, i = i9(e.currentAttributes), s = e.right; for (; r > 0 && e.right !== null; ) { if (e.right.deleted === !1) switch (e.right.content.constructor) { - case _h: + case Sh: case nm: - case gh: - r < e.right.length && Bo(t, Wr(e.right.id.client, e.right.id.clock + r)), r -= e.right.length, e.right.delete(t); + case uh: + r < e.right.length && No(t, Wr(e.right.id.client, e.right.id.clock + r)), r -= e.right.length, e.right.delete(t); break; } e.forward(); } - s && Ble(t, s, e.right, i, e.currentAttributes); + s && $le(t, s, e.right, i, e.currentAttributes); const a = (e.left || e.right).parent; - return a._searchMarker && ow(a._searchMarker, e.index, -n + r), e; + return a._searchMarker && Kx(a._searchMarker, e.index, -n + r), e; }; -class ELe extends l6 { +class ILe extends H_ { constructor(e, r, n) { super(e, r), this.childListChanged = !1, this.keysChanged = /* @__PURE__ */ new Set(), n.forEach((i) => { i === null ? this.childListChanged = !0 : this.keysChanged.add(i); @@ -20161,7 +20161,7 @@ class ELe extends l6 { get delta() { if (this._delta === null) { const e = this.target.doc, r = []; - Bn(e, (n) => { + $n(e, (n) => { const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(); let a = this.target._start, o = null; const l = {}; @@ -20179,7 +20179,7 @@ class ELe extends l6 { }))), u = ""; break; case "retain": - h > 0 && (p = { retain: h }, j8e(l) || (p.attributes = Y8e({}, l))), h = 0; + h > 0 && (p = { retain: h }, sRe(l) || (p.attributes = tRe({}, l))), h = 0; break; } p && r.push(p), o = null; @@ -20187,30 +20187,30 @@ class ELe extends l6 { }; for (; a !== null; ) { switch (a.content.constructor) { - case _h: + case Sh: case nm: this.adds(a) ? this.deletes(a) || (d(), o = "insert", u = a.content.getContent()[0], d()) : this.deletes(a) ? (o !== "delete" && (d(), o = "delete"), f += 1) : a.deleted || (o !== "retain" && (d(), o = "retain"), h += 1); break; - case gh: + case uh: this.adds(a) ? this.deletes(a) || (o !== "insert" && (d(), o = "insert"), u += a.content.str) : this.deletes(a) ? (o !== "delete" && (d(), o = "delete"), f += a.length) : a.deleted || (o !== "retain" && (d(), o = "retain"), h += a.length); break; - case bs: { + case vs: { const { key: p, value: g } = a.content; if (this.adds(a)) { if (!this.deletes(a)) { const m = i.get(p) || null; - Md(m, g) ? g !== null && a.delete(n) : (o === "retain" && d(), Md(g, s.get(p) || null) ? delete l[p] : l[p] = g); + _d(m, g) ? g !== null && a.delete(n) : (o === "retain" && d(), _d(g, s.get(p) || null) ? delete l[p] : l[p] = g); } } else if (this.deletes(a)) { s.set(p, g); const m = i.get(p) || null; - Md(m, g) || (o === "retain" && d(), l[p] = m); + _d(m, g) || (o === "retain" && d(), l[p] = m); } else if (!a.deleted) { s.set(p, g); const m = l[p]; - m !== void 0 && (Md(m, g) ? m !== null && a.delete(n) : (o === "retain" && d(), g === null ? delete l[p] : l[p] = g)); + m !== void 0 && (_d(m, g) ? m !== null && a.delete(n) : (o === "retain" && d(), g === null ? delete l[p] : l[p] = g)); } - a.deleted || (o === "insert" && d(), Fy(i, a.content)); + a.deleted || (o === "insert" && d(), Iy(i, a.content)); break; } } @@ -20228,7 +20228,7 @@ class ELe extends l6 { return this._delta; } } -class kv extends ca { +class bv extends ia { constructor(e) { super(), this._pending = e !== void 0 ? [() => this.insert(0, e)] : [], this._searchMarker = [], this._hasFormatting = !1; } @@ -20245,37 +20245,37 @@ class kv extends ca { this._pending = null; } _copy() { - return new kv(); + return new bv(); } clone() { - const e = new kv(); + const e = new bv(); return e.applyDelta(this.toDelta()), e; } _callObserver(e, r) { super._callObserver(e, r); - const n = new ELe(this, e, r); - u6(this, e, n), !e.local && this._hasFormatting && (e._needFormattingCleanup = !0); + const n = new ILe(this, e, r); + Z_(this, e, n), !e.local && this._hasFormatting && (e._needFormattingCleanup = !0); } toString() { let e = "", r = this._start; for (; r !== null; ) - !r.deleted && r.countable && r.content.constructor === gh && (e += r.content.str), r = r.right; + !r.deleted && r.countable && r.content.constructor === uh && (e += r.content.str), r = r.right; return e; } toJSON() { return this.toString(); } applyDelta(e, { sanitize: r = !0 } = {}) { - this.doc !== null ? Bn(this.doc, (n) => { - const i = new R9(null, this._start, 0, /* @__PURE__ */ new Map()); + this.doc !== null ? $n(this.doc, (n) => { + const i = new m9(null, this._start, 0, /* @__PURE__ */ new Map()); for (let s = 0; s < e.length; s++) { const a = e[s]; if (a.insert !== void 0) { const o = !r && typeof a.insert == "string" && s === e.length - 1 && i.right === null && a.insert.slice(-1) === ` ` ? a.insert.slice(0, -1) : a.insert; - (typeof o != "string" || o.length > 0) && b8(n, this, i, o, a.attributes || {}); + (typeof o != "string" || o.length > 0) && a8(n, this, i, o, a.attributes || {}); } else - a.retain !== void 0 ? qY(n, this, i, a.retain, a.attributes || {}) : a.delete !== void 0 && UY(n, i, a.delete); + a.retain !== void 0 ? VY(n, this, i, a.retain, a.attributes || {}) : a.delete !== void 0 && WY(n, i, a.delete); } }) : this._pending.push(() => this.applyDelta(e)); } @@ -20295,14 +20295,14 @@ class kv extends ca { } const h = () => { for (; l !== null; ) { - if (n1(l, e) || r !== void 0 && n1(l, r)) + if (jm(l, e) || r !== void 0 && jm(l, r)) switch (l.content.constructor) { - case gh: { + case uh: { const f = s.get("ychange"); - e !== void 0 && !n1(l, e) ? (f === void 0 || f.user !== l.id.client || f.type !== "removed") && (u(), s.set("ychange", n ? n("removed", l.id) : { type: "removed" })) : r !== void 0 && !n1(l, r) ? (f === void 0 || f.user !== l.id.client || f.type !== "added") && (u(), s.set("ychange", n ? n("added", l.id) : { type: "added" })) : f !== void 0 && (u(), s.delete("ychange")), o += l.content.str; + e !== void 0 && !jm(l, e) ? (f === void 0 || f.user !== l.id.client || f.type !== "removed") && (u(), s.set("ychange", n ? n("removed", l.id) : { type: "removed" })) : r !== void 0 && !jm(l, r) ? (f === void 0 || f.user !== l.id.client || f.type !== "added") && (u(), s.set("ychange", n ? n("added", l.id) : { type: "added" })) : f !== void 0 && (u(), s.delete("ychange")), o += l.content.str; break; } - case _h: + case Sh: case nm: { u(); const f = { @@ -20317,75 +20317,75 @@ class kv extends ca { i.push(f); break; } - case bs: - n1(l, e) && (u(), Fy(s, l.content)); + case vs: + jm(l, e) && (u(), Iy(s, l.content)); break; } l = l.right; } u(); }; - return e || r ? Bn(a, (f) => { - e && _9(f, e), r && _9(f, r), h(); + return e || r ? $n(a, (f) => { + e && p9(f, e), r && p9(f, r), h(); }, "cleanup") : h(), i; } insert(e, r, n) { if (r.length <= 0) return; const i = this.doc; - i !== null ? Bn(i, (s) => { - const a = gS(s, this, e); + i !== null ? $n(i, (s) => { + const a = nS(s, this, e); n || (n = {}, a.currentAttributes.forEach((o, l) => { n[l] = o; - })), b8(s, this, a, r, n); + })), a8(s, this, a, r, n); }) : this._pending.push(() => this.insert(e, r, n)); } insertEmbed(e, r, n = {}) { const i = this.doc; - i !== null ? Bn(i, (s) => { - const a = gS(s, this, e); - b8(s, this, a, r, n); + i !== null ? $n(i, (s) => { + const a = nS(s, this, e); + a8(s, this, a, r, n); }) : this._pending.push(() => this.insertEmbed(e, r, n)); } delete(e, r) { if (r === 0) return; const n = this.doc; - n !== null ? Bn(n, (i) => { - UY(i, gS(i, this, e), r); + n !== null ? $n(n, (i) => { + WY(i, nS(i, this, e), r); }) : this._pending.push(() => this.delete(e, r)); } format(e, r, n) { if (r === 0) return; const i = this.doc; - i !== null ? Bn(i, (s) => { - const a = gS(s, this, e); - a.right !== null && qY(s, this, a, r, n); + i !== null ? $n(i, (s) => { + const a = nS(s, this, e); + a.right !== null && VY(s, this, a, r, n); }) : this._pending.push(() => this.format(e, r, n)); } removeAttribute(e) { - this.doc !== null ? Bn(this.doc, (r) => { - PT(r, this, e); + this.doc !== null ? $n(this.doc, (r) => { + bT(r, this, e); }) : this._pending.push(() => this.removeAttribute(e)); } setAttribute(e, r) { - this.doc !== null ? Bn(this.doc, (n) => { - PB(n, this, e, r); + this.doc !== null ? $n(this.doc, (n) => { + EB(n, this, e, r); }) : this._pending.push(() => this.setAttribute(e, r)); } getAttribute(e) { - return NB(this, e); + return _B(this, e); } getAttributes() { - return Dle(this); + return Mle(this); } _write(e) { - e.writeTypeRef(YLe); + e.writeTypeRef(tMe); } } -const _Le = (t) => new kv(); -class x8 { +const $Le = (t) => new bv(); +class o8 { constructor(e, r = () => !0) { this._filter = r, this._root = e, this._currentNode = e._start, this._firstCall = !0; } @@ -20396,7 +20396,7 @@ class x8 { let e = this._currentNode, r = e && e.content && e.content.type; if (e !== null && (!this._firstCall || e.deleted || !this._filter(r))) do - if (r = e.content.type, !e.deleted && (r.constructor === cw || r.constructor === yg) && r._start !== null) + if (r = e.content.type, !e.deleted && (r.constructor === ew || r.constructor === yg) && r._start !== null) e = r._start; else for (; e !== null; ) @@ -20409,7 +20409,7 @@ class x8 { return this._firstCall = !1, e === null ? { value: void 0, done: !0 } : (this._currentNode = e, { value: e.content.type, done: !1 }); } } -class yg extends ca { +class yg extends ia { constructor() { super(), this._prelimContent = []; } @@ -20425,62 +20425,62 @@ class yg extends ca { } clone() { const e = new yg(); - return e.insert(0, this.toArray().map((r) => r instanceof ca ? r.clone() : r)), e; + return e.insert(0, this.toArray().map((r) => r instanceof ia ? r.clone() : r)), e; } get length() { return this._prelimContent === null ? this._length : this._prelimContent.length; } createTreeWalker(e) { - return new x8(this, e); + return new o8(this, e); } querySelector(e) { e = e.toUpperCase(); - const n = new x8(this, (i) => i.nodeName && i.nodeName.toUpperCase() === e).next(); + const n = new o8(this, (i) => i.nodeName && i.nodeName.toUpperCase() === e).next(); return n.done ? null : n.value; } querySelectorAll(e) { - return e = e.toUpperCase(), fp(new x8(this, (r) => r.nodeName && r.nodeName.toUpperCase() === e)); + return e = e.toUpperCase(), hp(new o8(this, (r) => r.nodeName && r.nodeName.toUpperCase() === e)); } _callObserver(e, r) { - u6(this, e, new LLe(this, r, e)); + Z_(this, e, new zLe(this, r, e)); } toString() { - return _le(this, (e) => e.toString()).join(""); + return Ele(this, (e) => e.toString()).join(""); } toJSON() { return this.toString(); } toDOM(e = document, r = {}, n) { const i = e.createDocumentFragment(); - return n !== void 0 && n._createAssociation(i, this), lw(this, (s) => { + return n !== void 0 && n._createAssociation(i, this), Jx(this, (s) => { i.insertBefore(s.toDOM(e, r, n), null); }), i; } insert(e, r) { - this.doc !== null ? Bn(this.doc, (n) => { - Lle(n, this, e, r); + this.doc !== null ? $n(this.doc, (n) => { + Rle(n, this, e, r); }) : this._prelimContent.splice(e, 0, ...r); } insertAfter(e, r) { if (this.doc !== null) - Bn(this.doc, (n) => { - const i = e && e instanceof ca ? e._item : e; - DT(n, this, i, r); + $n(this.doc, (n) => { + const i = e && e instanceof ia ? e._item : e; + yT(n, this, i, r); }); else { const n = this._prelimContent, i = e === null ? 0 : n.findIndex((s) => s === e) + 1; if (i === 0 && e !== null) - throw dp("Reference item not found"); + throw fp("Reference item not found"); n.splice(i, 0, ...r); } } delete(e, r = 1) { - this.doc !== null ? Bn(this.doc, (n) => { - Mle(n, this, e, r); + this.doc !== null ? $n(this.doc, (n) => { + Lle(n, this, e, r); }) : this._prelimContent.splice(e, r); } toArray() { - return Ele(this); + return Cle(this); } push(e) { this.insert(this.length, e); @@ -20489,20 +20489,20 @@ class yg extends ca { this.insert(0, e); } get(e) { - return Ale(this, e); + return _le(this, e); } slice(e = 0, r = this.length) { - return Cle(this, e, r); + return Tle(this, e, r); } forEach(e) { - lw(this, e); + Jx(this, e); } _write(e) { - e.writeTypeRef(HLe); + e.writeTypeRef(nMe); } } -const ALe = (t) => new yg(); -class cw extends yg { +const BLe = (t) => new yg(); +class ew extends yg { constructor(e = "UNDEFINED") { super(), this.nodeName = e, this._prelimAttrs = /* @__PURE__ */ new Map(); } @@ -20520,13 +20520,13 @@ class cw extends yg { }), this._prelimAttrs = null; } _copy() { - return new cw(this.nodeName); + return new ew(this.nodeName); } clone() { - const e = new cw(this.nodeName), r = this.getAttributes(); - return H8e(r, (n, i) => { + const e = new ew(this.nodeName), r = this.getAttributes(); + return nRe(r, (n, i) => { typeof n == "string" && e.setAttribute(i, n); - }), e.insert(0, this.toArray().map((n) => n instanceof ca ? n.clone() : n)), e; + }), e.insert(0, this.toArray().map((n) => n instanceof ia ? n.clone() : n)), e; } toString() { const e = this.getAttributes(), r = [], n = []; @@ -20542,23 +20542,23 @@ class cw extends yg { return `<${s}${a}>${super.toString()}`; } removeAttribute(e) { - this.doc !== null ? Bn(this.doc, (r) => { - PT(r, this, e); + this.doc !== null ? $n(this.doc, (r) => { + bT(r, this, e); }) : this._prelimAttrs.delete(e); } setAttribute(e, r) { - this.doc !== null ? Bn(this.doc, (n) => { - PB(n, this, e, r); + this.doc !== null ? $n(this.doc, (n) => { + EB(n, this, e, r); }) : this._prelimAttrs.set(e, r); } getAttribute(e) { - return NB(this, e); + return _B(this, e); } hasAttribute(e) { - return Ple(this, e); + return Dle(this, e); } getAttributes(e) { - return e ? bLe(this, e) : Dle(this); + return e ? _Le(this, e) : Mle(this); } toDOM(e = document, r = {}, n) { const i = e.createElement(this.nodeName), s = this.getAttributes(); @@ -20566,31 +20566,31 @@ class cw extends yg { const o = s[a]; typeof o == "string" && i.setAttribute(a, o); } - return lw(this, (a) => { + return Jx(this, (a) => { i.appendChild(a.toDOM(e, r, n)); }), n !== void 0 && n._createAssociation(i, this), i; } _write(e) { - e.writeTypeRef(GLe), e.writeKey(this.nodeName); + e.writeTypeRef(rMe), e.writeKey(this.nodeName); } } -const RLe = (t) => new cw(t.readKey()); -class LLe extends l6 { +const FLe = (t) => new ew(t.readKey()); +class zLe extends H_ { constructor(e, r, n) { super(e, n), this.childListChanged = !1, this.attributesChanged = /* @__PURE__ */ new Set(), r.forEach((i) => { i === null ? this.childListChanged = !0 : this.attributesChanged.add(i); }); } } -class NT extends sh { +class xT extends eh { constructor(e) { super(), this.hookName = e; } _copy() { - return new NT(this.hookName); + return new xT(this.hookName); } clone() { - const e = new NT(this.hookName); + const e = new xT(this.hookName); return this.forEach((r, n) => { e.set(n, r); }), e; @@ -20601,11 +20601,11 @@ class NT extends sh { return i !== void 0 ? s = i.createDom(this) : s = document.createElement(this.hookName), s.setAttribute("data-yjs-hook", this.hookName), n !== void 0 && n._createAssociation(s, this), s; } _write(e) { - e.writeTypeRef(XLe), e.writeKey(this.hookName); + e.writeTypeRef(iMe), e.writeKey(this.hookName); } } -const MLe = (t) => new NT(t.readKey()); -class IT extends kv { +const qLe = (t) => new xT(t.readKey()); +class wT extends bv { get nextSibling() { const e = this._item ? this._item.next : null; return e ? e.content.type : null; @@ -20615,10 +20615,10 @@ class IT extends kv { return e ? e.content.type : null; } _copy() { - return new IT(); + return new wT(); } clone() { - const e = new IT(); + const e = new wT(); return e.applyDelta(this.toDelta()), e; } toDOM(e = document, r, n) { @@ -20655,29 +20655,29 @@ class IT extends kv { return this.toString(); } _write(e) { - e.writeTypeRef(jLe); + e.writeTypeRef(sMe); } } -const DLe = (t) => new IT(); -class IB { +const ULe = (t) => new wT(); +class AB { constructor(e, r) { this.id = e, this.length = r; } get deleted() { - throw ih(); + throw Ju(); } mergeWith(e) { return !1; } write(e, r, n) { - throw ih(); + throw Ju(); } integrate(e, r) { - throw ih(); + throw Ju(); } } -const PLe = 0; -class Gl extends IB { +const QLe = 0; +class ql extends AB { get deleted() { return !0; } @@ -20687,16 +20687,16 @@ class Gl extends IB { return this.constructor !== e.constructor ? !1 : (this.length += e.length, !0); } integrate(e, r) { - r > 0 && (this.id.clock += r, this.length -= r), xle(e.doc.store, this); + r > 0 && (this.id.clock += r, this.length -= r), ble(e.doc.store, this); } write(e, r) { - e.writeInfo(PLe), e.writeLen(this.length - r); + e.writeInfo(QLe), e.writeLen(this.length - r); } getMissing(e, r) { return null; } } -class Ck { +class yk { constructor(e) { this.content = e; } @@ -20710,10 +20710,10 @@ class Ck { return !0; } copy() { - return new Ck(this.content); + return new yk(this.content); } splice(e) { - throw ih(); + throw Ju(); } mergeWith(e) { return !1; @@ -20731,8 +20731,8 @@ class Ck { return 3; } } -const NLe = (t) => new Ck(t.readBuf()); -class uw { +const VLe = (t) => new yk(t.readBuf()); +class tw { constructor(e) { this.len = e; } @@ -20746,17 +20746,17 @@ class uw { return !1; } copy() { - return new uw(this.len); + return new tw(this.len); } splice(e) { - const r = new uw(this.len - e); + const r = new tw(this.len - e); return this.len = e, r; } mergeWith(e) { return this.len += e.len, !0; } integrate(e, r) { - sw(e.deleteSet, r.id.client, r.id.clock, this.len), r.markDeleted(); + Zx(e.deleteSet, r.id.client, r.id.clock, this.len), r.markDeleted(); } delete(e) { } @@ -20769,8 +20769,8 @@ class uw { return 1; } } -const ILe = (t) => new uw(t.readLen()), Fle = (t, e) => new By({ guid: t, ...e, shouldLoad: e.shouldLoad || e.autoLoad || !1 }); -class Ek { +const WLe = (t) => new tw(t.readLen()), Ble = (t, e) => new Ny({ guid: t, ...e, shouldLoad: e.shouldLoad || e.autoLoad || !1 }); +class bk { constructor(e) { e._item && console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."), this.doc = e; const r = {}; @@ -20786,10 +20786,10 @@ class Ek { return !0; } copy() { - return new Ek(Fle(this.doc.guid, this.opts)); + return new bk(Ble(this.doc.guid, this.opts)); } splice(e) { - throw ih(); + throw Ju(); } mergeWith(e) { return !1; @@ -20809,7 +20809,7 @@ class Ek { return 9; } } -const $Le = (t) => new Ek(Fle(t.readString(), t.readAny())); +const YLe = (t) => new bk(Ble(t.readString(), t.readAny())); class nm { constructor(e) { this.embed = e; @@ -20827,7 +20827,7 @@ class nm { return new nm(this.embed); } splice(e) { - throw ih(); + throw Ju(); } mergeWith(e) { return !1; @@ -20845,8 +20845,8 @@ class nm { return 5; } } -const BLe = (t) => new nm(t.readJSON()); -class bs { +const GLe = (t) => new nm(t.readJSON()); +class vs { constructor(e, r) { this.key = e, this.value = r; } @@ -20860,10 +20860,10 @@ class bs { return !1; } copy() { - return new bs(this.key, this.value); + return new vs(this.key, this.value); } splice(e) { - throw ih(); + throw Ju(); } mergeWith(e) { return !1; @@ -20883,8 +20883,8 @@ class bs { return 6; } } -const FLe = (t) => new bs(t.readKey(), t.readJSON()); -class $T { +const HLe = (t) => new vs(t.readKey(), t.readJSON()); +class OT { constructor(e) { this.arr = e; } @@ -20898,10 +20898,10 @@ class $T { return !0; } copy() { - return new $T(this.arr); + return new OT(this.arr); } splice(e) { - const r = new $T(this.arr.slice(e)); + const r = new OT(this.arr.slice(e)); return this.arr = this.arr.slice(0, e), r; } mergeWith(e) { @@ -20925,13 +20925,13 @@ class $T { return 2; } } -const zLe = (t) => { +const XLe = (t) => { const e = t.readLen(), r = []; for (let n = 0; n < e; n++) { const i = t.readString(); i === "undefined" ? r.push(void 0) : r.push(JSON.parse(i)); } - return new $T(r); + return new OT(r); }; class bg { constructor(e) { @@ -20974,13 +20974,13 @@ class bg { return 8; } } -const qLe = (t) => { +const ZLe = (t) => { const e = t.readLen(), r = []; for (let n = 0; n < e; n++) r.push(t.readAny()); return new bg(r); }; -class gh { +class uh { constructor(e) { this.str = e; } @@ -20994,10 +20994,10 @@ class gh { return !0; } copy() { - return new gh(this.str); + return new uh(this.str); } splice(e) { - const r = new gh(this.str.slice(e)); + const r = new uh(this.str.slice(e)); this.str = this.str.slice(0, e); const n = this.str.charCodeAt(e - 1); return n >= 55296 && n <= 56319 && (this.str = this.str.slice(0, e - 1) + "\uFFFD", r.str = "\uFFFD" + r.str.slice(1)), r; @@ -21018,16 +21018,16 @@ class gh { return 4; } } -const ULe = (t) => new gh(t.readString()), QLe = [ - wLe, - kLe, - _Le, +const jLe = (t) => new uh(t.readString()), KLe = [ RLe, - ALe, MLe, - DLe -], VLe = 0, WLe = 1, YLe = 2, GLe = 3, HLe = 4, XLe = 5, jLe = 6; -class _h { + $Le, + FLe, + BLe, + qLe, + ULe +], JLe = 0, eMe = 1, tMe = 2, rMe = 3, nMe = 4, iMe = 5, sMe = 6; +class Sh { constructor(e) { this.type = e; } @@ -21041,10 +21041,10 @@ class _h { return !0; } copy() { - return new _h(this.type._copy()); + return new Sh(this.type._copy()); } splice(e) { - throw ih(); + throw Ju(); } mergeWith(e) { return !1; @@ -21076,20 +21076,20 @@ class _h { return 7; } } -const ZLe = (t) => new _h(QLe[t.readTypeRef()](t)), L9 = (t, e) => { +const aMe = (t) => new Sh(KLe[t.readTypeRef()](t)), v9 = (t, e) => { let r = e, n = 0, i; do - n > 0 && (r = Wr(r.client, r.clock + n)), i = n3(t, r), n = r.clock - i.id.clock, r = i.redone; - while (r !== null && i instanceof zn); + n > 0 && (r = Wr(r.client, r.clock + n)), i = Q5(t, r), n = r.clock - i.id.clock, r = i.redone; + while (r !== null && i instanceof Fn); return { item: i, diff: n }; -}, $B = (t, e) => { +}, RB = (t, e) => { for (; t !== null && t.keep !== e; ) t.keep = e, t = t.parent._item; -}, BT = (t, e, r) => { - const { client: n, clock: i } = e.id, s = new zn( +}, kT = (t, e, r) => { + const { client: n, clock: i } = e.id, s = new Fn( Wr(n, i + r), e, Wr(n, i + r - 1), @@ -21100,23 +21100,23 @@ const ZLe = (t) => new _h(QLe[t.readTypeRef()](t)), L9 = (t, e) => { e.content.splice(r) ); return e.deleted && s.markDeleted(), e.keep && (s.keep = !0), e.redone !== null && (s.redone = Wr(e.redone.client, e.redone.clock + r)), e.right = s, s.right !== null && (s.right.left = s), t._mergeStructs.push(s), s.parentSub !== null && s.right === null && s.parent._map.set(s.parentSub, s), e.length = r, s; -}, QY = (t, e) => r8e(t, (r) => Sk(r.deletions, e)), zle = (t, e, r, n, i, s) => { +}, YY = (t, e) => h8e(t, (r) => mk(r.deletions, e)), Fle = (t, e, r, n, i, s) => { const a = t.doc, o = a.store, l = a.clientID, u = e.redone; if (u !== null) - return Bo(t, u); + return No(t, u); let h = e.parent._item, f = null, d; if (h !== null && h.deleted === !0) { - if (h.redone === null && (!r.has(h) || zle(t, h, r, n, i, s) === null)) + if (h.redone === null && (!r.has(h) || Fle(t, h, r, n, i, s) === null)) return null; for (; h.redone !== null; ) - h = Bo(t, h.redone); + h = No(t, h.redone); } const p = h === null ? e.parent : h.content.type; if (e.parentSub === null) { for (f = e.left, d = e; f !== null; ) { let y = f; for (; y !== null && y.parent._item !== h; ) - y = y.redone === null ? null : Bo(t, y.redone); + y = y.redone === null ? null : No(t, y.redone); if (y !== null && y.parent._item === h) { f = y; break; @@ -21126,7 +21126,7 @@ const ZLe = (t) => new _h(QLe[t.readTypeRef()](t)), L9 = (t, e) => { for (; d !== null; ) { let y = d; for (; y !== null && y.parent._item !== h; ) - y = y.redone === null ? null : Bo(t, y.redone); + y = y.redone === null ? null : No(t, y.redone); if (y !== null && y.parent._item === h) { d = y; break; @@ -21134,14 +21134,14 @@ const ZLe = (t) => new _h(QLe[t.readTypeRef()](t)), L9 = (t, e) => { d = d.right; } } else if (d = null, e.right && !i) { - for (f = e; f !== null && f.right !== null && (f.right.redone || Sk(n, f.right.id) || QY(s.undoStack, f.right.id) || QY(s.redoStack, f.right.id)); ) + for (f = e; f !== null && f.right !== null && (f.right.redone || mk(n, f.right.id) || YY(s.undoStack, f.right.id) || YY(s.redoStack, f.right.id)); ) for (f = f.right; f.redone; ) - f = Bo(t, f.redone); + f = No(t, f.redone); if (f && f.right !== null) return null; } else f = p._map.get(e.parentSub) || null; - const g = zi(o, l), m = Wr(l, g), v = new zn( + const g = Fi(o, l), m = Wr(l, g), v = new Fn( m, f, f && f.lastId, @@ -21151,55 +21151,55 @@ const ZLe = (t) => new _h(QLe[t.readTypeRef()](t)), L9 = (t, e) => { e.parentSub, e.content.copy() ); - return e.redone = m, $B(v, !0), v.integrate(t, 0), v; + return e.redone = m, RB(v, !0), v.integrate(t, 0), v; }; -class zn extends IB { +class Fn extends AB { constructor(e, r, n, i, s, a, o, l) { - super(e, l.getLength()), this.origin = n, this.left = r, this.right = i, this.rightOrigin = s, this.parent = a, this.parentSub = o, this.redone = null, this.content = l, this.info = this.content.isCountable() ? yY : 0; + super(e, l.getLength()), this.origin = n, this.left = r, this.right = i, this.rightOrigin = s, this.parent = a, this.parentSub = o, this.redone = null, this.content = l, this.info = this.content.isCountable() ? wY : 0; } set marker(e) { - (this.info & d8) > 0 !== e && (this.info ^= d8); + (this.info & e8) > 0 !== e && (this.info ^= e8); } get marker() { - return (this.info & d8) > 0; + return (this.info & e8) > 0; } get keep() { - return (this.info & vY) > 0; + return (this.info & xY) > 0; } set keep(e) { - this.keep !== e && (this.info ^= vY); + this.keep !== e && (this.info ^= xY); } get countable() { - return (this.info & yY) > 0; + return (this.info & wY) > 0; } get deleted() { - return (this.info & f8) > 0; + return (this.info & J7) > 0; } set deleted(e) { - this.deleted !== e && (this.info ^= f8); + this.deleted !== e && (this.info ^= J7); } markDeleted() { - this.info |= f8; + this.info |= J7; } getMissing(e, r) { - if (this.origin && this.origin.client !== this.id.client && this.origin.clock >= zi(r, this.origin.client)) + if (this.origin && this.origin.client !== this.id.client && this.origin.clock >= Fi(r, this.origin.client)) return this.origin.client; - if (this.rightOrigin && this.rightOrigin.client !== this.id.client && this.rightOrigin.clock >= zi(r, this.rightOrigin.client)) + if (this.rightOrigin && this.rightOrigin.client !== this.id.client && this.rightOrigin.clock >= Fi(r, this.rightOrigin.client)) return this.rightOrigin.client; - if (this.parent && this.parent.constructor === P1 && this.id.client !== this.parent.client && this.parent.clock >= zi(r, this.parent.client)) + if (this.parent && this.parent.constructor === A1 && this.id.client !== this.parent.client && this.parent.clock >= Fi(r, this.parent.client)) return this.parent.client; - if (this.origin && (this.left = PY(e, r, this.origin), this.origin = this.left.lastId), this.rightOrigin && (this.right = Bo(e, this.rightOrigin), this.rightOrigin = this.right.id), this.left && this.left.constructor === Gl || this.right && this.right.constructor === Gl) + if (this.origin && (this.left = $Y(e, r, this.origin), this.origin = this.left.lastId), this.rightOrigin && (this.right = No(e, this.rightOrigin), this.rightOrigin = this.right.id), this.left && this.left.constructor === ql || this.right && this.right.constructor === ql) this.parent = null; else if (!this.parent) - this.left && this.left.constructor === zn && (this.parent = this.left.parent, this.parentSub = this.left.parentSub), this.right && this.right.constructor === zn && (this.parent = this.right.parent, this.parentSub = this.right.parentSub); - else if (this.parent.constructor === P1) { - const n = n3(r, this.parent); - n.constructor === Gl ? this.parent = null : this.parent = n.content.type; + this.left && this.left.constructor === Fn && (this.parent = this.left.parent, this.parentSub = this.left.parentSub), this.right && this.right.constructor === Fn && (this.parent = this.right.parent, this.parentSub = this.right.parentSub); + else if (this.parent.constructor === A1) { + const n = Q5(r, this.parent); + n.constructor === ql ? this.parent = null : this.parent = n.content.type; } return null; } integrate(e, r) { - if (r > 0 && (this.id.clock += r, this.left = PY(e, e.doc.store, Wr(this.id.client, this.id.clock - 1)), this.origin = this.left.lastId, this.content = this.content.splice(r), this.length -= r), this.parent) { + if (r > 0 && (this.id.clock += r, this.left = $Y(e, e.doc.store, Wr(this.id.client, this.id.clock - 1)), this.origin = this.left.lastId, this.content = this.content.splice(r), this.length -= r), this.parent) { if (!this.left && (!this.right || this.right.left !== null) || this.left && this.left.right !== this.right) { let n = this.left, i; if (n !== null) @@ -21211,13 +21211,13 @@ class zn extends IB { i = this.parent._start; const s = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(); for (; i !== null && i !== this.right; ) { - if (a.add(i), s.add(i), g1(this.origin, i.origin)) { + if (a.add(i), s.add(i), u1(this.origin, i.origin)) { if (i.id.client < this.id.client) n = i, s.clear(); - else if (g1(this.rightOrigin, i.rightOrigin)) + else if (u1(this.rightOrigin, i.rightOrigin)) break; - } else if (i.origin !== null && a.has(n3(e.doc.store, i.origin))) - s.has(n3(e.doc.store, i.origin)) || (n = i, s.clear()); + } else if (i.origin !== null && a.has(Q5(e.doc.store, i.origin))) + s.has(Q5(e.doc.store, i.origin)) || (n = i, s.clear()); else break; i = i.right; @@ -21236,9 +21236,9 @@ class zn extends IB { n = this.parent._start, this.parent._start = this; this.right = n; } - this.right !== null ? this.right.left = this : this.parentSub !== null && (this.parent._map.set(this.parentSub, this), this.left !== null && this.left.delete(e)), this.parentSub === null && this.countable && !this.deleted && (this.parent._length += this.length), xle(e.doc.store, this), this.content.integrate(e, this), IY(e, this.parent, this.parentSub), (this.parent._item !== null && this.parent._item.deleted || this.parentSub !== null && this.right !== null) && this.delete(e); + this.right !== null ? this.right.left = this : this.parentSub !== null && (this.parent._map.set(this.parentSub, this), this.left !== null && this.left.delete(e)), this.parentSub === null && this.countable && !this.deleted && (this.parent._length += this.length), ble(e.doc.store, this), this.content.integrate(e, this), FY(e, this.parent, this.parentSub), (this.parent._item !== null && this.parent._item.deleted || this.parentSub !== null && this.right !== null) && this.delete(e); } else - new Gl(this.id, this.length).integrate(e, 0); + new ql(this.id, this.length).integrate(e, 0); } get next() { let e = this.right; @@ -21256,7 +21256,7 @@ class zn extends IB { return this.length === 1 ? this.id : Wr(this.id.client, this.id.clock + this.length - 1); } mergeWith(e) { - if (this.constructor === e.constructor && g1(e.origin, this.lastId) && this.right === e && g1(this.rightOrigin, e.rightOrigin) && this.id.client === e.id.client && this.id.clock + this.length === e.id.clock && this.deleted === e.deleted && this.redone === null && e.redone === null && this.content.constructor === e.content.constructor && this.content.mergeWith(e.content)) { + if (this.constructor === e.constructor && u1(e.origin, this.lastId) && this.right === e && u1(this.rightOrigin, e.rightOrigin) && this.id.client === e.id.client && this.id.clock + this.length === e.id.clock && this.deleted === e.deleted && this.redone === null && e.redone === null && this.content.constructor === e.content.constructor && this.content.mergeWith(e.content)) { const r = this.parent._searchMarker; return r && r.forEach((n) => { n.p === e && (n.p = this, !this.deleted && this.countable && (n.index -= this.length)); @@ -21267,50 +21267,50 @@ class zn extends IB { delete(e) { if (!this.deleted) { const r = this.parent; - this.countable && this.parentSub === null && (r._length -= this.length), this.markDeleted(), sw(e.deleteSet, this.id.client, this.id.clock, this.length), IY(e, r, this.parentSub), this.content.delete(e); + this.countable && this.parentSub === null && (r._length -= this.length), this.markDeleted(), Zx(e.deleteSet, this.id.client, this.id.clock, this.length), FY(e, r, this.parentSub), this.content.delete(e); } } gc(e, r) { if (!this.deleted) - throw ou(); - this.content.gc(e), r ? rLe(e, this, new Gl(this.id, this.length)) : this.content = new uw(this.length); + throw nu(); + this.content.gc(e), r ? hLe(e, this, new ql(this.id, this.length)) : this.content = new tw(this.length); } write(e, r) { - const n = r > 0 ? Wr(this.id.client, this.id.clock + r - 1) : this.origin, i = this.rightOrigin, s = this.parentSub, a = this.content.getRef() & n6 | (n === null ? 0 : bl) | (i === null ? 0 : yf) | (s === null ? 0 : tw); + const n = r > 0 ? Wr(this.id.client, this.id.clock + r - 1) : this.origin, i = this.rightOrigin, s = this.parentSub, a = this.content.getRef() & Q_ | (n === null ? 0 : gl) | (i === null ? 0 : ff) | (s === null ? 0 : Yx); if (e.writeInfo(a), n !== null && e.writeLeftID(n), i !== null && e.writeRightID(i), n === null && i === null) { const o = this.parent; if (o._item !== void 0) { const l = o._item; if (l === null) { - const u = vle(o); + const u = mle(o); e.writeParentInfo(!0), e.writeString(u); } else e.writeParentInfo(!1), e.writeLeftID(l.id); } else - o.constructor === String ? (e.writeParentInfo(!0), e.writeString(o)) : o.constructor === P1 ? (e.writeParentInfo(!1), e.writeLeftID(o)) : ou(); + o.constructor === String ? (e.writeParentInfo(!0), e.writeString(o)) : o.constructor === A1 ? (e.writeParentInfo(!1), e.writeLeftID(o)) : nu(); s !== null && e.writeString(s); } this.content.write(e, r); } } -const qle = (t, e) => KLe[e & n6](t), KLe = [ +const zle = (t, e) => oMe[e & Q_](t), oMe = [ () => { - ou(); - }, - ILe, - zLe, - NLe, - ULe, - BLe, - FLe, + nu(); + }, + WLe, + XLe, + VLe, + jLe, + GLe, + HLe, + aMe, ZLe, - qLe, - $Le, + YLe, () => { - ou(); + nu(); } -], JLe = 10; -class Hl extends IB { +], lMe = 10; +class Ul extends AB { get deleted() { return !0; } @@ -21320,41 +21320,41 @@ class Hl extends IB { return this.constructor !== e.constructor ? !1 : (this.length += e.length, !0); } integrate(e, r) { - ou(); + nu(); } write(e, r) { - e.writeInfo(JLe), Cr(e.restEncoder, this.length - r); + e.writeInfo(lMe), kr(e.restEncoder, this.length - r); } getMissing(e, r) { return null; } } -const Ule = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof yl < "u" ? yl : {}, Qle = "__ $YJS$ __"; -Ule[Qle] === !0 && console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438"); -Ule[Qle] = !0; -class BB { +const qle = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof pl < "u" ? pl : {}, Ule = "__ $YJS$ __"; +qle[Ule] === !0 && console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438"); +qle[Ule] = !0; +class LB { constructor(e, r) { this.yanchor = e, this.yhead = r; } toJSON() { return { - yanchor: MY(this.yanchor), - yhead: MY(this.yhead) + yanchor: NY(this.yanchor), + yhead: NY(this.yhead) }; } static fromJSON(e) { - return new BB(aw(e.yanchor), aw(e.yhead)); + return new LB(jx(e.yanchor), jx(e.yhead)); } } -class eMe { +class cMe { constructor(e, r) { - this.ytext = e, this.awareness = r, this.undoManager = new AB(e); + this.ytext = e, this.awareness = r, this.undoManager = new OB(e); } toYPos(e, r = 0) { - return C9(this.ytext, e, r); + return f9(this.ytext, e, r); } fromYPos(e) { - const r = E9(aw(e), this.ytext.doc); + const r = d9(jx(e), this.ytext.doc); if (r == null || r.type !== this.ytext) throw new Error("[y-codemirror] The position you want to retrieve was created by a different document"); return { @@ -21364,21 +21364,21 @@ class eMe { } toYRange(e) { const r = e.assoc, n = this.toYPos(e.anchor, r), i = this.toYPos(e.head, r); - return new BB(n, i); + return new LB(n, i); } fromYRange(e) { const r = this.fromYPos(e.yanchor), n = this.fromYPos(e.yhead); - return r.pos === n.pos ? ft.cursor(n.pos, n.assoc) : ft.range(r.pos, n.pos); + return r.pos === n.pos ? ut.cursor(n.pos, n.assoc) : ut.range(r.pos, n.pos); } } -const _k = Gt.define({ +const xk = Yt.define({ combine(t) { return t[t.length - 1]; } -}), M9 = bo.define(); -class tMe { +}), y9 = vo.define(); +class uMe { constructor(e) { - this.view = e, this.conf = e.state.facet(_k), this._observer = (r, n) => { + this.view = e, this.conf = e.state.facet(xk), this._observer = (r, n) => { if (n.origin !== this.conf) { const i = r.delta, s = []; let a = 0; @@ -21386,12 +21386,12 @@ class tMe { const l = i[o]; l.insert != null ? s.push({ from: a, to: a, insert: l.insert }) : l.delete != null ? (s.push({ from: a, to: a + l.delete, insert: "" }), a += l.delete) : a += l.retain; } - e.dispatch({ changes: s, annotations: [M9.of(this.conf)] }); + e.dispatch({ changes: s, annotations: [y9.of(this.conf)] }); } }, this._ytext = this.conf.ytext, this._ytext.observe(this._observer); } update(e) { - if (!e.docChanged || e.transactions.length > 0 && e.transactions[0].annotation(M9) === this.conf) + if (!e.docChanged || e.transactions.length > 0 && e.transactions[0].annotation(y9) === this.conf) return; const r = this.conf.ytext; r.doc.transact(() => { @@ -21407,7 +21407,7 @@ class tMe { this._ytext.unobserve(this._observer); } } -const rMe = fn.fromClass(tMe), nMe = Mt.baseTheme({ +const hMe = hn.fromClass(uMe), fMe = Rt.baseTheme({ ".cm-ySelection": {}, ".cm-yLineSelection": { padding: 0, @@ -21461,24 +21461,24 @@ const rMe = fn.fromClass(tMe), nMe = Mt.baseTheme({ opacity: 1, transitionDelay: "0s" } -}), iMe = bo.define(); -class sMe extends el { +}), dMe = vo.define(); +class pMe extends Zo { constructor(e, r) { super(), this.color = e, this.name = r; } toDOM() { - return v8("span", [hl("class", "cm-ySelectionCaret"), hl("style", `background-color: ${this.color}; border-color: ${this.color}`)], [ - fS("\u2060"), - v8("div", [ - hl("class", "cm-ySelectionCaretDot") + return i8("span", [ol("class", "cm-ySelectionCaret"), ol("style", `background-color: ${this.color}; border-color: ${this.color}`)], [ + eS("\u2060"), + i8("div", [ + ol("class", "cm-ySelectionCaretDot") ]), - fS("\u2060"), - v8("div", [ - hl("class", "cm-ySelectionInfo") + eS("\u2060"), + i8("div", [ + ol("class", "cm-ySelectionInfo") ], [ - fS(this.name) + eS(this.name) ]), - fS("\u2060") + eS("\u2060") ]); } eq(e) { @@ -21497,11 +21497,11 @@ class sMe extends el { return !0; } } -class aMe { +class gMe { constructor(e) { - this.conf = e.state.facet(_k), this._listener = ({ added: r, updated: n, removed: i }, s, a) => { - r.concat(n).concat(i).findIndex((l) => l !== this.conf.awareness.doc.clientID) >= 0 && e.dispatch({ annotations: [iMe.of([])] }); - }, this._awareness = this.conf.awareness, this._awareness.on("change", this._listener), this.decorations = jr.of([]); + this.conf = e.state.facet(xk), this._listener = ({ added: r, updated: n, removed: i }, s, a) => { + r.concat(n).concat(i).findIndex((l) => l !== this.conf.awareness.doc.clientID) >= 0 && e.dispatch({ annotations: [dMe.of([])] }); + }, this._awareness = this.conf.awareness, this._awareness.on("change", this._listener), this.decorations = Zr.of([]); } destroy() { this._awareness.off("change", this._listener); @@ -21509,10 +21509,10 @@ class aMe { update(e) { const r = this.conf.ytext, n = r.doc, i = this.conf.awareness, s = [], a = this.conf.awareness.getLocalState(); if (a != null) { - const o = e.view.hasFocus && e.view.dom.ownerDocument.hasFocus(), l = o ? e.state.selection.main : null, u = a.cursor == null ? null : aw(a.cursor.anchor), h = a.cursor == null ? null : aw(a.cursor.head); + const o = e.view.hasFocus && e.view.dom.ownerDocument.hasFocus(), l = o ? e.state.selection.main : null, u = a.cursor == null ? null : jx(a.cursor.anchor), h = a.cursor == null ? null : jx(a.cursor.head); if (l != null) { - const f = C9(r, l.anchor), d = C9(r, l.head); - (a.cursor == null || !DY(u, f) || !DY(h, d)) && i.setLocalStateField("cursor", { + const f = f9(r, l.anchor), d = f9(r, l.head); + (a.cursor == null || !IY(u, f) || !IY(h, d)) && i.setLocalStateField("cursor", { anchor: f, head: d }); @@ -21525,15 +21525,15 @@ class aMe { const u = o.cursor; if (u == null || u.anchor == null || u.head == null) return; - const h = E9(u.anchor, n), f = E9(u.head, n); + const h = d9(u.anchor, n), f = d9(u.head, n); if (h == null || f == null || h.type !== r || f.type !== r) return; - const { color: d = "#30bced", name: p = "Anonymous" } = o.user || {}, g = o.user && o.user.colorLight || d + "33", m = r6(h.index, f.index), v = zp(h.index, f.index), y = e.view.state.doc.lineAt(m), b = e.view.state.doc.lineAt(v); + const { color: d = "#30bced", name: p = "Anonymous" } = o.user || {}, g = o.user && o.user.colorLight || d + "33", m = U_(h.index, f.index), v = qp(h.index, f.index), y = e.view.state.doc.lineAt(m), b = e.view.state.doc.lineAt(v); if (y.number === b.number) s.push({ from: m, to: v, - value: Ht.mark({ + value: Gt.mark({ attributes: { style: `background-color: ${g}` }, class: "cm-ySelection" }) @@ -21542,14 +21542,14 @@ class aMe { s.push({ from: m, to: y.from + y.length, - value: Ht.mark({ + value: Gt.mark({ attributes: { style: `background-color: ${g}` }, class: "cm-ySelection" }) }), s.push({ from: b.from, to: v, - value: Ht.mark({ + value: Gt.mark({ attributes: { style: `background-color: ${g}` }, class: "cm-ySelection" }) @@ -21559,7 +21559,7 @@ class aMe { s.push({ from: O, to: O, - value: Ht.line({ + value: Gt.line({ attributes: { style: `background-color: ${g}`, class: "cm-yLineSelection" } }) }); @@ -21568,18 +21568,18 @@ class aMe { s.push({ from: f.index, to: f.index, - value: Ht.widget({ + value: Gt.widget({ side: f.index - h.index > 0 ? -1 : 1, block: !1, - widget: new sMe(d, p) + widget: new pMe(d, p) }) }); - }), this.decorations = Ht.set(s, !0); + }), this.decorations = Gt.set(s, !0); } } -const oMe = fn.fromClass(aMe, { +const mMe = hn.fromClass(gMe, { decorations: (t) => t.decorations -}), lMe = () => { +}), vMe = () => { let t = !0; return (e, r) => { if (t) { @@ -21593,7 +21593,7 @@ const oMe = fn.fromClass(aMe, { r !== void 0 && r(); }; }; -class cMe { +class yMe { constructor(e) { this.undoManager = e; } @@ -21610,14 +21610,14 @@ class cMe { return this.undoManager.redo() != null; } } -const h6 = Gt.define({ +const j_ = Yt.define({ combine(t) { return t[t.length - 1]; } }); -class uMe { +class bMe { constructor(e) { - this.view = e, this.conf = e.state.facet(h6), this._undoManager = this.conf.undoManager, this.syncConf = e.state.facet(_k), this._beforeChangeSelection = null, this._mux = lMe(), this._onStackItemAdded = ({ stackItem: r, changedParentTypes: n }) => { + this.view = e, this.conf = e.state.facet(j_), this._undoManager = this.conf.undoManager, this.syncConf = e.state.facet(xk), this._beforeChangeSelection = null, this._mux = vMe(), this._onStackItemAdded = ({ stackItem: r, changedParentTypes: n }) => { n.has(this.syncConf.ytext) && this._beforeChangeSelection && !r.meta.has(this) && r.meta.set(this, this._beforeChangeSelection); }, this._onStackItemPopped = ({ stackItem: r }) => { const n = r.meta.get(this); @@ -21630,58 +21630,58 @@ class uMe { }, this._undoManager.on("stack-item-added", this._onStackItemAdded), this._undoManager.on("stack-item-popped", this._onStackItemPopped), this._undoManager.addTrackedOrigin(this.syncConf); } update(e) { - e.selectionSet && (e.transactions.length === 0 || e.transactions[0].annotation(M9) !== this.syncConf) && this._storeSelection(); + e.selectionSet && (e.transactions.length === 0 || e.transactions[0].annotation(y9) !== this.syncConf) && this._storeSelection(); } destroy() { this._undoManager.off("stack-item-added", this._onStackItemAdded), this._undoManager.off("stack-item-popped", this._onStackItemPopped), this._undoManager.removeTrackedOrigin(this.syncConf); } } -const hMe = fn.fromClass(uMe), fMe = ({ state: t, dispatch: e }) => t.facet(h6).undo() || !0, dMe = ({ state: t, dispatch: e }) => t.facet(h6).redo() || !0, pMe = (t, e, { undoManager: r = new AB(t) } = {}) => { - const n = new eMe(t, e), i = [ - _k.of(n), - rMe +const xMe = hn.fromClass(bMe), wMe = ({ state: t, dispatch: e }) => t.facet(j_).undo() || !0, OMe = ({ state: t, dispatch: e }) => t.facet(j_).redo() || !0, kMe = (t, e, { undoManager: r = new OB(t) } = {}) => { + const n = new cMe(t, e), i = [ + xk.of(n), + hMe ]; return e && i.push( - nMe, - oMe + fMe, + mMe ), r !== !1 && i.push( - h6.of(new cMe(r)), - hMe, - Mt.domEventHandlers({ + j_.of(new yMe(r)), + xMe, + Rt.domEventHandlers({ beforeinput(s, a) { - return s.inputType === "historyUndo" ? fMe(a) : s.inputType === "historyRedo" ? dMe(a) : !1; + return s.inputType === "historyUndo" ? wMe(a) : s.inputType === "historyRedo" ? OMe(a) : !1; } }) ), i; }; -class FT { +class ST { static create(e, r, n, i, s) { let a = i + (i << 8) + e + (r << 4) | 0; - return new FT(e, r, n, a, s, [], []); + return new ST(e, r, n, a, s, [], []); } constructor(e, r, n, i, s, a, o) { - this.type = e, this.value = r, this.from = n, this.hash = i, this.end = s, this.children = a, this.positions = o, this.hashProp = [[Fr.contextHash, i]]; + this.type = e, this.value = r, this.from = n, this.hash = i, this.end = s, this.children = a, this.positions = o, this.hashProp = [[Br.contextHash, i]]; } addChild(e, r) { - e.prop(Fr.contextHash) != this.hash && (e = new kn(e.type, e.children, e.positions, e.length, this.hashProp)), this.children.push(e), this.positions.push(r); + e.prop(Br.contextHash) != this.hash && (e = new kn(e.type, e.children, e.positions, e.length, this.hashProp)), this.children.push(e), this.positions.push(r); } toTree(e, r = this.end) { let n = this.children.length - 1; return n >= 0 && (r = Math.max(r, this.positions[n] + this.children[n].length + this.from)), new kn(e.types[this.type], this.children, this.positions, r - this.from).balance({ - makeTree: (i, s, a) => new kn(ys.none, i, s, a, this.hashProp) + makeTree: (i, s, a) => new kn(ms.none, i, s, a, this.hashProp) }); } } -var Vt; +var Ut; (function(t) { t[t.Document = 1] = "Document", t[t.CodeBlock = 2] = "CodeBlock", t[t.FencedCode = 3] = "FencedCode", t[t.Blockquote = 4] = "Blockquote", t[t.HorizontalRule = 5] = "HorizontalRule", t[t.BulletList = 6] = "BulletList", t[t.OrderedList = 7] = "OrderedList", t[t.ListItem = 8] = "ListItem", t[t.ATXHeading1 = 9] = "ATXHeading1", t[t.ATXHeading2 = 10] = "ATXHeading2", t[t.ATXHeading3 = 11] = "ATXHeading3", t[t.ATXHeading4 = 12] = "ATXHeading4", t[t.ATXHeading5 = 13] = "ATXHeading5", t[t.ATXHeading6 = 14] = "ATXHeading6", t[t.SetextHeading1 = 15] = "SetextHeading1", t[t.SetextHeading2 = 16] = "SetextHeading2", t[t.HTMLBlock = 17] = "HTMLBlock", t[t.LinkReference = 18] = "LinkReference", t[t.Paragraph = 19] = "Paragraph", t[t.CommentBlock = 20] = "CommentBlock", t[t.ProcessingInstructionBlock = 21] = "ProcessingInstructionBlock", t[t.Escape = 22] = "Escape", t[t.Entity = 23] = "Entity", t[t.HardBreak = 24] = "HardBreak", t[t.Emphasis = 25] = "Emphasis", t[t.StrongEmphasis = 26] = "StrongEmphasis", t[t.Link = 27] = "Link", t[t.Image = 28] = "Image", t[t.InlineCode = 29] = "InlineCode", t[t.HTMLTag = 30] = "HTMLTag", t[t.Comment = 31] = "Comment", t[t.ProcessingInstruction = 32] = "ProcessingInstruction", t[t.URL = 33] = "URL", t[t.HeaderMark = 34] = "HeaderMark", t[t.QuoteMark = 35] = "QuoteMark", t[t.ListMark = 36] = "ListMark", t[t.LinkMark = 37] = "LinkMark", t[t.EmphasisMark = 38] = "EmphasisMark", t[t.CodeMark = 39] = "CodeMark", t[t.CodeText = 40] = "CodeText", t[t.CodeInfo = 41] = "CodeInfo", t[t.LinkTitle = 42] = "LinkTitle", t[t.LinkLabel = 43] = "LinkLabel"; -})(Vt || (Vt = {})); -class gMe { +})(Ut || (Ut = {})); +class SMe { constructor(e, r) { this.start = e, this.content = r, this.marks = [], this.parsers = []; } } -class mMe { +class TMe { constructor() { this.text = "", this.baseIndent = 0, this.basePos = 0, this.depth = 0, this.markers = [], this.pos = 0, this.indent = 0, this.next = -1; } @@ -21693,7 +21693,7 @@ class mMe { this.indent = this.countIndent(e, this.pos, this.indent), this.pos = e, this.next = e == this.text.length ? -1 : this.text.charCodeAt(e); } skipSpace(e) { - return ux(this.text, e); + return tx(this.text, e); } reset(e) { for (this.text = e, this.baseIndent = this.basePos = this.pos = this.indent = 0, this.forwardInner(), this.depth = 1; this.markers.length; ) @@ -21728,41 +21728,41 @@ class mMe { return e + this.text.slice(this.basePos); } } -function VY(t, e, r) { +function GY(t, e, r) { if (r.pos == r.text.length || t != e.block && r.indent >= e.stack[r.depth + 1].value + r.baseIndent) return !0; if (r.indent >= r.baseIndent + 4) return !1; - let n = (t.type == Vt.OrderedList ? qB : zB)(r, e, !1); - return n > 0 && (t.type != Vt.BulletList || FB(r, e, !1) < 0) && r.text.charCodeAt(r.pos + n - 1) == t.value; + let n = (t.type == Ut.OrderedList ? PB : DB)(r, e, !1); + return n > 0 && (t.type != Ut.BulletList || MB(r, e, !1) < 0) && r.text.charCodeAt(r.pos + n - 1) == t.value; } -const Vle = { - [Vt.Blockquote](t, e, r) { - return r.next != 62 ? !1 : (r.markers.push(gn(Vt.QuoteMark, e.lineStart + r.pos, e.lineStart + r.pos + 1)), r.moveBase(r.pos + (Cc(r.text.charCodeAt(r.pos + 1)) ? 2 : 1)), t.end = e.lineStart + r.text.length, !0); +const Qle = { + [Ut.Blockquote](t, e, r) { + return r.next != 62 ? !1 : (r.markers.push(pn(Ut.QuoteMark, e.lineStart + r.pos, e.lineStart + r.pos + 1)), r.moveBase(r.pos + (xc(r.text.charCodeAt(r.pos + 1)) ? 2 : 1)), t.end = e.lineStart + r.text.length, !0); }, - [Vt.ListItem](t, e, r) { + [Ut.ListItem](t, e, r) { return r.indent < r.baseIndent + t.value && r.next > -1 ? !1 : (r.moveBaseColumn(r.baseIndent + t.value), !0); }, - [Vt.OrderedList]: VY, - [Vt.BulletList]: VY, - [Vt.Document]() { + [Ut.OrderedList]: GY, + [Ut.BulletList]: GY, + [Ut.Document]() { return !0; } }; -function Cc(t) { +function xc(t) { return t == 32 || t == 9 || t == 10 || t == 13; } -function ux(t, e = 0) { - for (; e < t.length && Cc(t.charCodeAt(e)); ) +function tx(t, e = 0) { + for (; e < t.length && xc(t.charCodeAt(e)); ) e++; return e; } -function WY(t, e, r) { - for (; e > r && Cc(t.charCodeAt(e - 1)); ) +function HY(t, e, r) { + for (; e > r && xc(t.charCodeAt(e - 1)); ) e--; return e; } -function Wle(t) { +function Vle(t) { if (t.next != 96 && t.next != 126) return -1; let e = t.pos + 1; @@ -21777,10 +21777,10 @@ function Wle(t) { } return e; } -function Yle(t) { +function Wle(t) { return t.next != 62 ? -1 : t.text.charCodeAt(t.pos + 1) == 32 ? 2 : 1; } -function FB(t, e, r) { +function MB(t, e, r) { if (t.next != 42 && t.next != 45 && t.next != 95) return -1; let n = 1; @@ -21788,21 +21788,21 @@ function FB(t, e, r) { let s = t.text.charCodeAt(i); if (s == t.next) n++; - else if (!Cc(s)) + else if (!xc(s)) return -1; } - return r && t.next == 45 && Xle(t) > -1 && t.depth == e.stack.length || n < 3 ? -1 : 1; + return r && t.next == 45 && Hle(t) > -1 && t.depth == e.stack.length || n < 3 ? -1 : 1; } -function Gle(t, e) { +function Yle(t, e) { for (let r = t.stack.length - 1; r >= 0; r--) if (t.stack[r].type == e) return !0; return !1; } -function zB(t, e, r) { - return (t.next == 45 || t.next == 43 || t.next == 42) && (t.pos == t.text.length - 1 || Cc(t.text.charCodeAt(t.pos + 1))) && (!r || Gle(e, Vt.BulletList) || t.skipSpace(t.pos + 2) < t.text.length) ? 1 : -1; +function DB(t, e, r) { + return (t.next == 45 || t.next == 43 || t.next == 42) && (t.pos == t.text.length - 1 || xc(t.text.charCodeAt(t.pos + 1))) && (!r || Yle(e, Ut.BulletList) || t.skipSpace(t.pos + 2) < t.text.length) ? 1 : -1; } -function qB(t, e, r) { +function PB(t, e, r) { let n = t.pos, i = t.next; for (; i >= 48 && i <= 57; ) { n++; @@ -21810,9 +21810,9 @@ function qB(t, e, r) { return -1; i = t.text.charCodeAt(n); } - return n == t.pos || n > t.pos + 9 || i != 46 && i != 41 || n < t.text.length - 1 && !Cc(t.text.charCodeAt(n + 1)) || r && !Gle(e, Vt.OrderedList) && (t.skipSpace(n + 1) == t.text.length || n > t.pos + 1 || t.next != 49) ? -1 : n + 1 - t.pos; + return n == t.pos || n > t.pos + 9 || i != 46 && i != 41 || n < t.text.length - 1 && !xc(t.text.charCodeAt(n + 1)) || r && !Yle(e, Ut.OrderedList) && (t.skipSpace(n + 1) == t.text.length || n > t.pos + 1 || t.next != 49) ? -1 : n + 1 - t.pos; } -function Hle(t) { +function Gle(t) { if (t.next != 35) return -1; let e = t.pos + 1; @@ -21823,53 +21823,53 @@ function Hle(t) { let r = e - t.pos; return r > 6 ? -1 : r; } -function Xle(t) { +function Hle(t) { if (t.next != 45 && t.next != 61 || t.indent >= t.baseIndent + 4) return -1; let e = t.pos + 1; for (; e < t.text.length && t.text.charCodeAt(e) == t.next; ) e++; let r = e; - for (; e < t.text.length && Cc(t.text.charCodeAt(e)); ) + for (; e < t.text.length && xc(t.text.charCodeAt(e)); ) e++; return e == t.text.length ? r : -1; } -const D9 = /^[ \t]*$/, jle = /-->/, Zle = /\?>/, P9 = [ +const b9 = /^[ \t]*$/, Xle = /-->/, Zle = /\?>/, x9 = [ [/^<(?:script|pre|style)(?:\s|>|$)/i, /<\/(?:script|pre|style)>/i], - [/^\s*/i.exec(n); if (s) - return t.append(gn(Vt.Comment, r, r + 1 + s[0].length)); + return t.append(pn(Ut.Comment, r, r + 1 + s[0].length)); let a = /^\?[^]*?\?>/.exec(n); if (a) - return t.append(gn(Vt.ProcessingInstruction, r, r + 1 + a[0].length)); + return t.append(pn(Ut.ProcessingInstruction, r, r + 1 + a[0].length)); let o = /^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n); - return o ? t.append(gn(Vt.HTMLTag, r, r + 1 + o[0].length)) : -1; + return o ? t.append(pn(Ut.HTMLTag, r, r + 1 + o[0].length)) : -1; }, Emphasis(t, e, r) { if (e != 95 && e != 42) @@ -22499,40 +22499,40 @@ const O8 = { let n = r + 1; for (; t.char(n) == e; ) n++; - let i = t.slice(r - 1, r), s = t.slice(n, n + 1), a = fw.test(i), o = fw.test(s), l = /\s|^$/.test(i), u = /\s|^$/.test(s), h = !u && (!o || l || a), f = !l && (!a || u || o), d = h && (e == 42 || !f || a), p = f && (e == 42 || !h || o); - return t.append(new $c(e == 95 ? nce : ice, r, n, (d ? 1 : 0) | (p ? 2 : 0))); + let i = t.slice(r - 1, r), s = t.slice(n, n + 1), a = nw.test(i), o = nw.test(s), l = /\s|^$/.test(i), u = /\s|^$/.test(s), h = !u && (!o || l || a), f = !l && (!a || u || o), d = h && (e == 42 || !f || a), p = f && (e == 42 || !h || o); + return t.append(new Dc(e == 95 ? rce : nce, r, n, (d ? 1 : 0) | (p ? 2 : 0))); }, HardBreak(t, e, r) { if (e == 92 && t.char(r + 1) == 10) - return t.append(gn(Vt.HardBreak, r, r + 2)); + return t.append(pn(Ut.HardBreak, r, r + 2)); if (e == 32) { let n = r + 1; for (; t.char(n) == 32; ) n++; if (t.char(n) == 10 && n >= r + 2) - return t.append(gn(Vt.HardBreak, r, n + 1)); + return t.append(pn(Ut.HardBreak, r, n + 1)); } return -1; }, Link(t, e, r) { - return e == 91 ? t.append(new $c(q2, r, r + 1, 1)) : -1; + return e == 91 ? t.append(new Dc(D2, r, r + 1, 1)) : -1; }, Image(t, e, r) { - return e == 33 && t.char(r + 1) == 91 ? t.append(new $c(GY, r, r + 2, 1)) : -1; + return e == 33 && t.char(r + 1) == 91 ? t.append(new Dc(ZY, r, r + 2, 1)) : -1; }, LinkEnd(t, e, r) { if (e != 93) return -1; for (let n = t.parts.length - 1; n >= 0; n--) { let i = t.parts[n]; - if (i instanceof $c && (i.type == q2 || i.type == GY)) { + if (i instanceof Dc && (i.type == D2 || i.type == ZY)) { if (!i.side || t.skipSpace(i.to) == r && !/[(\[]/.test(t.slice(r + 1, r + 2))) return t.parts[n] = null, -1; - let s = t.takeContent(n), a = t.parts[n] = kMe(t, s, i.type == q2 ? Vt.Link : Vt.Image, i.from, r + 1); - if (i.type == q2) + let s = t.takeContent(n), a = t.parts[n] = MMe(t, s, i.type == D2 ? Ut.Link : Ut.Image, i.from, r + 1); + if (i.type == D2) for (let o = 0; o < n; o++) { let l = t.parts[o]; - l instanceof $c && l.type == q2 && (l.side = 0); + l instanceof Dc && l.type == D2 && (l.side = 0); } return a.to; } @@ -22540,23 +22540,23 @@ const O8 = { return -1; } }; -function kMe(t, e, r, n, i) { +function MMe(t, e, r, n, i) { let { text: s } = t, a = t.char(i), o = i; - if (e.unshift(gn(Vt.LinkMark, n, n + (r == Vt.Image ? 2 : 1))), e.push(gn(Vt.LinkMark, i - 1, i)), a == 40) { - let l = t.skipSpace(i + 1), u = sce(s, l - t.offset, t.offset), h; - u && (l = t.skipSpace(u.to), h = ace(s, l - t.offset, t.offset), h && (l = t.skipSpace(h.to))), t.char(l) == 41 && (e.push(gn(Vt.LinkMark, i, i + 1)), o = l + 1, u && e.push(u), h && e.push(h), e.push(gn(Vt.LinkMark, l, o))); + if (e.unshift(pn(Ut.LinkMark, n, n + (r == Ut.Image ? 2 : 1))), e.push(pn(Ut.LinkMark, i - 1, i)), a == 40) { + let l = t.skipSpace(i + 1), u = ice(s, l - t.offset, t.offset), h; + u && (l = t.skipSpace(u.to), h = sce(s, l - t.offset, t.offset), h && (l = t.skipSpace(h.to))), t.char(l) == 41 && (e.push(pn(Ut.LinkMark, i, i + 1)), o = l + 1, u && e.push(u), h && e.push(h), e.push(pn(Ut.LinkMark, l, o))); } else if (a == 91) { - let l = oce(s, i - t.offset, t.offset, !1); + let l = ace(s, i - t.offset, t.offset, !1); l && (e.push(l), o = l.to); } - return gn(r, n, o, e); + return pn(r, n, o, e); } -function sce(t, e, r) { +function ice(t, e, r) { if (t.charCodeAt(e) == 60) { for (let i = e + 1; i < t.length; i++) { let s = t.charCodeAt(i); if (s == 62) - return gn(Vt.URL, e + r, i + 1 + r); + return pn(Ut.URL, e + r, i + 1 + r); if (s == 60 || s == 10) return !1; } @@ -22565,7 +22565,7 @@ function sce(t, e, r) { let i = 0, s = e; for (let a = !1; s < t.length; s++) { let o = t.charCodeAt(s); - if (Cc(o)) + if (xc(o)) break; if (a) a = !1; @@ -22578,10 +22578,10 @@ function sce(t, e, r) { } else o == 92 && (a = !0); } - return s > e ? gn(Vt.URL, e + r, s + r) : s == t.length ? null : !1; + return s > e ? pn(Ut.URL, e + r, s + r) : s == t.length ? null : !1; } } -function ace(t, e, r) { +function sce(t, e, r) { let n = t.charCodeAt(e); if (n != 39 && n != 34 && n != 40) return !1; @@ -22592,28 +22592,28 @@ function ace(t, e, r) { a = !1; else { if (o == i) - return gn(Vt.LinkTitle, e + r, s + 1 + r); + return pn(Ut.LinkTitle, e + r, s + 1 + r); o == 92 && (a = !0); } } return null; } -function oce(t, e, r, n) { +function ace(t, e, r, n) { for (let i = !1, s = e + 1, a = Math.min(t.length, s + 999); s < a; s++) { let o = t.charCodeAt(s); if (i) i = !1; else { if (o == 93) - return n ? !1 : gn(Vt.LinkLabel, e + r, s + 1 + r); - if (n && !Cc(o) && (n = !1), o == 91) + return n ? !1 : pn(Ut.LinkLabel, e + r, s + 1 + r); + if (n && !xc(o) && (n = !1), o == 91) return !1; o == 92 && (i = !0); } } return null; } -class SMe { +class DMe { constructor(e, r, n) { this.parser = e, this.text = r, this.offset = n, this.parts = []; } @@ -22630,7 +22630,7 @@ class SMe { return this.parts.push(e), e.to; } addDelimiter(e, r, n, i, s) { - return this.append(new $c(e, r, n, (i ? 1 : 0) | (s ? 2 : 0))); + return this.append(new Dc(e, r, n, (i ? 1 : 0) | (s ? 2 : 0))); } addElement(e) { return this.append(e); @@ -22638,12 +22638,12 @@ class SMe { resolveMarkers(e) { for (let n = e; n < this.parts.length; n++) { let i = this.parts[n]; - if (!(i instanceof $c && i.type.resolve && i.side & 2)) + if (!(i instanceof Dc && i.type.resolve && i.side & 2)) continue; - let s = i.type == nce || i.type == ice, a = i.to - i.from, o, l = n - 1; + let s = i.type == rce || i.type == nce, a = i.to - i.from, o, l = n - 1; for (; l >= e; l--) { let m = this.parts[l]; - if (m instanceof $c && m.side & 1 && m.type == i.type && !(s && (i.side & 1 || m.side & 2) && (m.to - m.from + a) % 3 == 0 && ((m.to - m.from) % 3 || a % 3))) { + if (m instanceof Dc && m.side & 1 && m.type == i.type && !(s && (i.side & 1 || m.side & 2) && (m.to - m.from + a) % 3 == 0 && ((m.to - m.from) % 3 || a % 3))) { o = m; break; } @@ -22657,22 +22657,22 @@ class SMe { } o.type.mark && h.push(this.elt(o.type.mark, f, o.to)); for (let m = l + 1; m < n; m++) - this.parts[m] instanceof hw && h.push(this.parts[m]), this.parts[m] = null; + this.parts[m] instanceof rw && h.push(this.parts[m]), this.parts[m] = null; i.type.mark && h.push(this.elt(i.type.mark, i.from, d)); let p = this.elt(u, f, d, h); - this.parts[l] = s && o.from != f ? new $c(o.type, o.from, f, o.side) : null, (this.parts[n] = s && i.to != d ? new $c(i.type, d, i.to, i.side) : null) ? this.parts.splice(n, 0, p) : this.parts[n] = p; + this.parts[l] = s && o.from != f ? new Dc(o.type, o.from, f, o.side) : null, (this.parts[n] = s && i.to != d ? new Dc(i.type, d, i.to, i.side) : null) ? this.parts.splice(n, 0, p) : this.parts[n] = p; } let r = []; for (let n = e; n < this.parts.length; n++) { let i = this.parts[n]; - i instanceof hw && r.push(i); + i instanceof rw && r.push(i); } return r; } findOpeningDelimiter(e) { for (let r = this.parts.length - 1; r >= 0; r--) { let n = this.parts[r]; - if (n instanceof $c && n.type == e) + if (n instanceof Dc && n.type == e) return r; } return null; @@ -22682,13 +22682,13 @@ class SMe { return this.parts.length = e, r; } skipSpace(e) { - return ux(this.text, e - this.offset) + this.offset; + return tx(this.text, e - this.offset) + this.offset; } elt(e, r, n, i) { - return typeof e == "string" ? gn(this.parser.getNodeType(e), r, n, i) : new rce(e, r); + return typeof e == "string" ? pn(this.parser.getNodeType(e), r, n, i) : new tce(e, r); } } -function I9(t, e) { +function O9(t, e) { if (!e.length) return t; if (!t.length) @@ -22699,14 +22699,14 @@ function I9(t, e) { n++; if (n < r.length && r[n].from < i.from) { let s = r[n]; - s instanceof hw && (r[n] = new hw(s.type, s.from, s.to, I9(s.children, [i]))); + s instanceof rw && (r[n] = new rw(s.type, s.from, s.to, O9(s.children, [i]))); } else r.splice(n++, 0, i); } return r; } -const TMe = [Vt.CodeBlock, Vt.ListItem, Vt.OrderedList, Vt.BulletList]; -class CMe { +const PMe = [Ut.CodeBlock, Ut.ListItem, Ut.OrderedList, Ut.BulletList]; +class NMe { constructor(e, r) { this.fragments = e, this.input = r, this.i = 0, this.fragment = null, this.fragmentEnd = -1, this.cursor = null, e.length && (this.fragment = e[this.i++]); } @@ -22740,7 +22740,7 @@ class CMe { } matches(e) { let r = this.cursor.tree; - return r && r.prop(Fr.contextHash) == e; + return r && r.prop(Br.contextHash) == e; } takeNodes(e) { let r = this.cursor, n = this.fragment.offset, i = this.fragmentEnd - (this.fragment.openEnd ? 1 : 0), s = e.absoluteLineStart, a = s, o = e.block.children.length, l = a, u = o; @@ -22750,14 +22750,14 @@ class CMe { continue; break; } - let h = lce(r.from - n, e.ranges); + let h = oce(r.from - n, e.ranges); if (r.to - n <= e.ranges[e.rangeI].to) e.addNode(r.tree, h); else { - let f = new kn(e.parser.nodeSet.types[Vt.Paragraph], [], [], 0, e.block.hashProp); + let f = new kn(e.parser.nodeSet.types[Ut.Paragraph], [], [], 0, e.block.hashProp); e.reusePlaceholders.set(f, r.tree), e.addNode(f, h); } - if (r.type.is("Block") && (TMe.indexOf(r.type.id) < 0 ? (a = r.to - n, o = e.block.children.length) : (a = l, o = u, l = r.to - n, u = e.block.children.length)), !r.nextSibling()) + if (r.type.is("Block") && (PMe.indexOf(r.type.id) < 0 ? (a = r.to - n, o = e.block.children.length) : (a = l, o = u, l = r.to - n, u = e.block.children.length)), !r.nextSibling()) break; } for (; e.block.children.length > o; ) @@ -22765,7 +22765,7 @@ class CMe { return a - s; } } -function lce(t, e) { +function oce(t, e) { let r = t; for (let n = 1; n < e.length; n++) { let i = e[n - 1].to, s = e[n].from; @@ -22773,31 +22773,31 @@ function lce(t, e) { } return r; } -const EMe = Bp({ - "Blockquote/...": ze.quote, - HorizontalRule: ze.contentSeparator, - "ATXHeading1/... SetextHeading1/...": ze.heading1, - "ATXHeading2/... SetextHeading2/...": ze.heading2, - "ATXHeading3/...": ze.heading3, - "ATXHeading4/...": ze.heading4, - "ATXHeading5/...": ze.heading5, - "ATXHeading6/...": ze.heading6, - "Comment CommentBlock": ze.comment, - Escape: ze.escape, - Entity: ze.character, - "Emphasis/...": ze.emphasis, - "StrongEmphasis/...": ze.strong, - "Link/... Image/...": ze.link, - "OrderedList/... BulletList/...": ze.list, - "BlockQuote/...": ze.quote, - "InlineCode CodeText": ze.monospace, - URL: ze.url, - "HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark": ze.processingInstruction, - "CodeInfo LinkLabel": ze.labelName, - LinkTitle: ze.string, - Paragraph: ze.content -}), _Me = new f6(new bk(ece).extend(EMe), Object.keys(mS).map((t) => mS[t]), Object.keys(mS).map((t) => bMe[t]), Object.keys(mS), xMe, Vle, Object.keys(O8).map((t) => O8[t]), Object.keys(O8), []); -function AMe(t, e, r) { +const IMe = Fp({ + "Blockquote/...": Be.quote, + HorizontalRule: Be.contentSeparator, + "ATXHeading1/... SetextHeading1/...": Be.heading1, + "ATXHeading2/... SetextHeading2/...": Be.heading2, + "ATXHeading3/...": Be.heading3, + "ATXHeading4/...": Be.heading4, + "ATXHeading5/...": Be.heading5, + "ATXHeading6/...": Be.heading6, + "Comment CommentBlock": Be.comment, + Escape: Be.escape, + Entity: Be.character, + "Emphasis/...": Be.emphasis, + "StrongEmphasis/...": Be.strong, + "Link/... Image/...": Be.link, + "OrderedList/... BulletList/...": Be.list, + "BlockQuote/...": Be.quote, + "InlineCode CodeText": Be.monospace, + URL: Be.url, + "HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark": Be.processingInstruction, + "CodeInfo LinkLabel": Be.labelName, + LinkTitle: Be.string, + Paragraph: Be.content +}), $Me = new K_(new hk(Jle).extend(IMe), Object.keys(iS).map((t) => iS[t]), Object.keys(iS).map((t) => _Me[t]), Object.keys(iS), AMe, Qle, Object.keys(c8).map((t) => c8[t]), Object.keys(c8), []); +function BMe(t, e, r) { let n = []; for (let i = t.firstChild, s = e; ; i = i.nextSibling) { let a = i ? i.from : r; @@ -22807,44 +22807,44 @@ function AMe(t, e, r) { } return n; } -function RMe(t) { +function FMe(t) { let { codeParser: e, htmlParser: r } = t; - return { wrap: Oae((i, s) => { + return { wrap: wae((i, s) => { let a = i.type.id; - if (e && (a == Vt.CodeBlock || a == Vt.FencedCode)) { + if (e && (a == Ut.CodeBlock || a == Ut.FencedCode)) { let o = ""; - if (a == Vt.FencedCode) { - let u = i.node.getChild(Vt.CodeInfo); + if (a == Ut.FencedCode) { + let u = i.node.getChild(Ut.CodeInfo); u && (o = s.read(u.from, u.to)); } let l = e(o); if (l) - return { parser: l, overlay: (u) => u.type.id == Vt.CodeText }; - } else if (r && (a == Vt.HTMLBlock || a == Vt.HTMLTag)) - return { parser: r, overlay: AMe(i.node, i.from, i.to) }; + return { parser: l, overlay: (u) => u.type.id == Ut.CodeText }; + } else if (r && (a == Ut.HTMLBlock || a == Ut.HTMLTag)) + return { parser: r, overlay: BMe(i.node, i.from, i.to) }; return null; }) }; } -const LMe = { resolve: "Strikethrough", mark: "StrikethroughMark" }, MMe = { +const zMe = { resolve: "Strikethrough", mark: "StrikethroughMark" }, qMe = { defineNodes: [{ name: "Strikethrough", - style: { "Strikethrough/...": ze.strikethrough } + style: { "Strikethrough/...": Be.strikethrough } }, { name: "StrikethroughMark", - style: ze.processingInstruction + style: Be.processingInstruction }], parseInline: [{ name: "Strikethrough", parse(t, e, r) { if (e != 126 || t.char(r + 1) != 126 || t.char(r + 2) == 126) return -1; - let n = t.slice(r - 1, r), i = t.slice(r + 2, r + 3), s = /\s|^$/.test(n), a = /\s|^$/.test(i), o = fw.test(n), l = fw.test(i); - return t.addDelimiter(LMe, r, r + 2, !a && (!l || s || o), !s && (!o || a || l)); + let n = t.slice(r - 1, r), i = t.slice(r + 2, r + 3), s = /\s|^$/.test(n), a = /\s|^$/.test(i), o = nw.test(n), l = nw.test(i); + return t.addDelimiter(zMe, r, r + 2, !a && (!l || s || o), !s && (!o || a || l)); }, after: "Emphasis" }] }; -function hx(t, e, r = 0, n, i = 0) { +function rx(t, e, r = 0, n, i = 0) { let s = 0, a = !0, o = -1, l = -1, u = !1, h = () => { n.push(t.elt("TableCell", i + o, i + l, t.parser.parseInline(e.slice(o, l), i + o))); }; @@ -22854,7 +22854,7 @@ function hx(t, e, r = 0, n, i = 0) { } return o > -1 && (s++, n && h()), s; } -function XY(t, e) { +function KY(t, e) { for (let r = e; r < t.length; r++) { let n = t.charCodeAt(r); if (n == 124) @@ -22863,8 +22863,8 @@ function XY(t, e) { } return !1; } -const cce = /^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/; -class jY { +const lce = /^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/; +class JY { constructor() { this.rows = null; } @@ -22872,16 +22872,16 @@ class jY { if (this.rows == null) { this.rows = !1; let i; - if ((r.next == 45 || r.next == 58 || r.next == 124) && cce.test(i = r.text.slice(r.pos))) { + if ((r.next == 45 || r.next == 58 || r.next == 124) && lce.test(i = r.text.slice(r.pos))) { let s = []; - hx(e, n.content, 0, s, n.start) == hx(e, i, r.pos) && (this.rows = [ + rx(e, n.content, 0, s, n.start) == rx(e, i, r.pos) && (this.rows = [ e.elt("TableHeader", n.start, n.start + n.content.length, s), e.elt("TableDelimiter", e.lineStart + r.pos, e.lineStart + r.text.length) ]); } } else if (this.rows) { let i = []; - hx(e, r.text, r.pos, i, e.lineStart), this.rows.push(e.elt("TableRow", e.lineStart + r.pos, e.lineStart + r.text.length, i)); + rx(e, r.text, r.pos, i, e.lineStart), this.rows.push(e.elt("TableRow", e.lineStart + r.pos, e.lineStart + r.text.length, i)); } return !1; } @@ -22889,29 +22889,29 @@ class jY { return this.rows ? (e.addLeafElement(r, e.elt("Table", r.start, r.start + r.content.length, this.rows)), !0) : !1; } } -const DMe = { +const UMe = { defineNodes: [ { name: "Table", block: !0 }, - { name: "TableHeader", style: { "TableHeader/...": ze.heading } }, + { name: "TableHeader", style: { "TableHeader/...": Be.heading } }, "TableRow", - { name: "TableCell", style: ze.content }, - { name: "TableDelimiter", style: ze.processingInstruction } + { name: "TableCell", style: Be.content }, + { name: "TableDelimiter", style: Be.processingInstruction } ], parseBlock: [{ name: "Table", leaf(t, e) { - return XY(e.content, 0) ? new jY() : null; + return KY(e.content, 0) ? new JY() : null; }, endLeaf(t, e, r) { - if (r.parsers.some((i) => i instanceof jY) || !XY(e.text, e.basePos)) + if (r.parsers.some((i) => i instanceof JY) || !KY(e.text, e.basePos)) return !1; let n = t.scanLine(t.absoluteLineEnd + 1).text; - return cce.test(n) && hx(t, e.text, e.basePos) == hx(t, n, e.basePos); + return lce.test(n) && rx(t, e.text, e.basePos) == rx(t, n, e.basePos); }, before: "SetextHeading" }] }; -class PMe { +class QMe { nextLine() { return !1; } @@ -22922,34 +22922,34 @@ class PMe { ])), !0; } } -const NMe = { +const VMe = { defineNodes: [ - { name: "Task", block: !0, style: ze.list }, - { name: "TaskMarker", style: ze.atom } + { name: "Task", block: !0, style: Be.list }, + { name: "TaskMarker", style: Be.atom } ], parseBlock: [{ name: "TaskList", leaf(t, e) { - return /^\[[ xX]\][ \t]/.test(e.content) && t.parentType().name == "ListItem" ? new PMe() : null; + return /^\[[ xX]\][ \t]/.test(e.content) && t.parentType().name == "ListItem" ? new QMe() : null; }, after: "SetextHeading" }] -}, ZY = /(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy, KY = /[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy, IMe = /[\w-]+\.[\w-]+($|\/)/, JY = /[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy, eG = /\/[a-zA-Z\d@.]+/gy; -function tG(t, e, r, n) { +}, eG = /(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy, tG = /[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy, WMe = /[\w-]+\.[\w-]+($|\/)/, rG = /[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy, nG = /\/[a-zA-Z\d@.]+/gy; +function iG(t, e, r, n) { let i = 0; for (let s = e; s < r; s++) t[s] == n && i++; return i; } -function $Me(t, e) { - KY.lastIndex = e; - let r = KY.exec(t); - if (!r || IMe.exec(r[0])[0].indexOf("_") > -1) +function YMe(t, e) { + tG.lastIndex = e; + let r = tG.exec(t); + if (!r || WMe.exec(r[0])[0].indexOf("_") > -1) return -1; let n = e + r[0].length; for (; ; ) { let i = t[n - 1], s; - if (/[?!.,:*_~]/.test(i) || i == ")" && tG(t, e, n, ")") > tG(t, e, n, "(")) + if (/[?!.,:*_~]/.test(i) || i == ")" && iG(t, e, n, ")") > iG(t, e, n, "(")) n--; else if (i == ";" && (s = /&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e, n)))) n = e + s.index; @@ -22958,26 +22958,26 @@ function $Me(t, e) { } return n; } -function rG(t, e) { - JY.lastIndex = e; - let r = JY.exec(t); +function sG(t, e) { + rG.lastIndex = e; + let r = rG.exec(t); if (!r) return -1; let n = r[0][r[0].length - 1]; return n == "_" || n == "-" ? -1 : e + r[0].length - (n == "." ? 1 : 0); } -const BMe = { +const GMe = { parseInline: [{ name: "Autolink", parse(t, e, r) { let n = r - t.offset; - ZY.lastIndex = n; - let i = ZY.exec(t.text), s = -1; - return !i || (i[1] || i[2] ? s = $Me(t.text, n + i[0].length) : i[3] ? s = rG(t.text, n) : (s = rG(t.text, n + i[0].length), s > -1 && i[0] == "xmpp:" && (eG.lastIndex = s, i = eG.exec(t.text), i && (s = i.index + i[0].length))), s < 0) ? -1 : (t.addElement(t.elt("URL", r, s + t.offset)), s + t.offset); + eG.lastIndex = n; + let i = eG.exec(t.text), s = -1; + return !i || (i[1] || i[2] ? s = YMe(t.text, n + i[0].length) : i[3] ? s = sG(t.text, n) : (s = sG(t.text, n + i[0].length), s > -1 && i[0] == "xmpp:" && (nG.lastIndex = s, i = nG.exec(t.text), i && (s = i.index + i[0].length))), s < 0) ? -1 : (t.addElement(t.elt("URL", r, s + t.offset)), s + t.offset); } }] -}, FMe = [DMe, NMe, MMe, BMe]; -function uce(t, e, r) { +}, HMe = [UMe, VMe, qMe, GMe]; +function cce(t, e, r) { return (n, i, s) => { if (i != t || n.char(s + 1) == t) return -1; @@ -22986,32 +22986,32 @@ function uce(t, e, r) { let l = n.char(o); if (l == t) return n.addElement(n.elt(e, s, o + 1, a.concat(n.elt(r, o, o + 1)))); - if (l == 92 && a.push(n.elt("Escape", o, o++ + 2)), Cc(l)) + if (l == 92 && a.push(n.elt("Escape", o, o++ + 2)), xc(l)) break; } return -1; }; } -const zMe = { +const XMe = { defineNodes: [ - { name: "Superscript", style: ze.special(ze.content) }, - { name: "SuperscriptMark", style: ze.processingInstruction } + { name: "Superscript", style: Be.special(Be.content) }, + { name: "SuperscriptMark", style: Be.processingInstruction } ], parseInline: [{ name: "Superscript", - parse: uce(94, "Superscript", "SuperscriptMark") + parse: cce(94, "Superscript", "SuperscriptMark") }] -}, qMe = { +}, ZMe = { defineNodes: [ - { name: "Subscript", style: ze.special(ze.content) }, - { name: "SubscriptMark", style: ze.processingInstruction } + { name: "Subscript", style: Be.special(Be.content) }, + { name: "SubscriptMark", style: Be.processingInstruction } ], parseInline: [{ name: "Subscript", - parse: uce(126, "Subscript", "SubscriptMark") + parse: cce(126, "Subscript", "SubscriptMark") }] -}, UMe = { - defineNodes: [{ name: "Emoji", style: ze.character }], +}, jMe = { + defineNodes: [{ name: "Emoji", style: Be.character }], parseInline: [{ name: "Emoji", parse(t, e, r) { @@ -23020,7 +23020,7 @@ const zMe = { } }] }; -class zT { +class TT { constructor(e, r, n, i, s, a, o, l, u, h = 0, f) { this.p = e, this.stack = r, this.state = n, this.reducePos = i, this.pos = s, this.score = a, this.buffer = o, this.bufferBase = l, this.curContext = u, this.lookAhead = h, this.parent = f; } @@ -23029,7 +23029,7 @@ class zT { } static start(e, r, n = 0) { let i = e.parser.context; - return new zT(e, [], r, n, n, 0, [], 0, i ? new nG(i, i.start) : null, 0, null); + return new TT(e, [], r, n, n, 0, [], 0, i ? new aG(i, i.start) : null, 0, null); } get context() { return this.curContext ? this.curContext.context : null; @@ -23118,14 +23118,14 @@ class zT { let n = e.buffer.slice(r), i = e.bufferBase + r; for (; e && i == e.bufferBase; ) e = e.parent; - return new zT(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, n, i, this.curContext, this.lookAhead, e); + return new TT(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, n, i, this.curContext, this.lookAhead, e); } recoverByDelete(e, r) { let n = e <= this.p.parser.maxNode; n && this.storeNode(e, this.pos, r, 4), this.storeNode(0, this.pos, r, n ? 8 : 4), this.pos = this.reducePos = r, this.score -= 190; } canShift(e) { - for (let r = new QMe(this); ; ) { + for (let r = new KMe(this); ; ) { let n = this.p.parser.stateSlot(r.state, 4) || this.p.parser.hasAction(r.state, e); if (n == 0) return !1; @@ -23243,7 +23243,7 @@ class zT { } updateContext(e) { if (e != this.curContext.context) { - let r = new nG(this.curContext.tracker, e); + let r = new aG(this.curContext.tracker, e); r.hash != this.curContext.hash && this.emitContext(), this.curContext = r; } } @@ -23254,12 +23254,12 @@ class zT { this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead(); } } -class nG { +class aG { constructor(e, r) { this.tracker = e, this.context = r, this.hash = e.strict ? e.hash(r) : 0; } } -class QMe { +class KMe { constructor(e) { this.start = e, this.state = e.state, this.stack = e.stack, this.base = this.stack.length; } @@ -23270,12 +23270,12 @@ class QMe { this.state = i; } } -class qT { +class CT { constructor(e, r, n) { this.stack = e, this.pos = r, this.index = n, this.buffer = e.buffer, this.index == 0 && this.maybeNext(); } static create(e, r = e.bufferBase + e.buffer.length) { - return new qT(e, r, r - e.bufferBase); + return new CT(e, r, r - e.bufferBase); } maybeNext() { let e = this.stack.parent; @@ -23297,10 +23297,10 @@ class qT { this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext(); } fork() { - return new qT(this.stack, this.pos, this.index); + return new CT(this.stack, this.pos, this.index); } } -function Rb(t, e = Uint16Array) { +function xb(t, e = Uint16Array) { if (typeof t != "string") return t; let r = null; @@ -23322,15 +23322,15 @@ function Rb(t, e = Uint16Array) { } return r; } -class s3 { +class W5 { constructor() { this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0; } } -const iG = new s3(); -class VMe { +const oG = new W5(); +class JMe { constructor(e, r) { - this.input = e, this.ranges = r, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = iG, this.rangeIndex = 0, this.pos = this.chunkPos = r[0].from, this.range = r[0], this.end = r[r.length - 1].to, this.readNext(); + this.input = e, this.ranges = r, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = oG, this.rangeIndex = 0, this.pos = this.chunkPos = r[0].from, this.range = r[0], this.end = r[r.length - 1].to, this.readNext(); } resolveOffset(e, r) { let n = this.range, i = this.rangeIndex, s = this.pos + e; @@ -23409,7 +23409,7 @@ class VMe { return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1; } reset(e, r) { - if (r ? (this.token = r, r.start = e, r.lookAhead = e + 1, r.value = r.extended = -1) : this.token = iG, this.pos != e) { + if (r ? (this.token = r, r.start = e, r.lookAhead = e + 1, r.value = r.extended = -1) : this.token = oG, this.pos != e) { if (this.pos = e, e == this.end) return this.setDone(), this; for (; e < this.range.from; ) @@ -23436,25 +23436,25 @@ class VMe { return n; } } -class I1 { +class L1 { constructor(e, r) { this.data = e, this.id = r; } token(e, r) { let { parser: n } = r.p; - hce(this.data, e, r, this.id, n.data, n.tokenPrecTable); + uce(this.data, e, r, this.id, n.data, n.tokenPrecTable); } } -I1.prototype.contextual = I1.prototype.fallback = I1.prototype.extend = !1; -class UT { +L1.prototype.contextual = L1.prototype.fallback = L1.prototype.extend = !1; +class ET { constructor(e, r, n) { - this.precTable = r, this.elseToken = n, this.data = typeof e == "string" ? Rb(e) : e; + this.precTable = r, this.elseToken = n, this.data = typeof e == "string" ? xb(e) : e; } token(e, r) { let n = e.pos, i = 0; for (; ; ) { let s = e.next < 0, a = e.resolveOffset(1, 1); - if (hce(this.data, e, r, 0, this.data, this.precTable), e.token.value > -1) + if (uce(this.data, e, r, 0, this.data, this.precTable), e.token.value > -1) break; if (this.elseToken == null) return; @@ -23465,13 +23465,13 @@ class UT { i && (e.reset(n, e.token), e.acceptToken(this.elseToken, i)); } } -UT.prototype.contextual = I1.prototype.fallback = I1.prototype.extend = !1; -class xo { +ET.prototype.contextual = L1.prototype.fallback = L1.prototype.extend = !1; +class yo { constructor(e, r = {}) { this.token = e, this.contextual = !!r.contextual, this.fallback = !!r.fallback, this.extend = !!r.extend; } } -function hce(t, e, r, n, i, s) { +function uce(t, e, r, n, i, s) { let a = 0, o = 1 << n, { dialect: l } = r.p.parser; e: for (; (o & t[a]) != 0; ) { @@ -23479,7 +23479,7 @@ function hce(t, e, r, n, i, s) { for (let p = a + 3; p < u; p += 2) if ((t[p + 1] & o) > 0) { let g = t[p]; - if (l.allows(g) && (e.token.value == -1 || e.token.value == g || WMe(g, e.token.value, i, s))) { + if (l.allows(g) && (e.token.value == -1 || e.token.value == g || e9e(g, e.token.value, i, s))) { e.acceptToken(g); break; } @@ -23503,20 +23503,20 @@ function hce(t, e, r, n, i, s) { break; } } -function sG(t, e, r) { +function lG(t, e, r) { for (let n = e, i; (i = t[n]) != 65535; n++) if (i == r) return n - e; return -1; } -function WMe(t, e, r, n) { - let i = sG(r, n, e); - return i < 0 || sG(r, n, t) < i; +function e9e(t, e, r, n) { + let i = lG(r, n, e); + return i < 0 || lG(r, n, t) < i; } -const ol = typeof Ns < "u" && {} && /\bparse\b/.test({}.LOG); -let k8 = null; -function aG(t, e, r) { - let n = t.cursor(Hn.IncludeAnonymous); +const nl = typeof Ds < "u" && {} && /\bparse\b/.test({}.LOG); +let u8 = null; +function cG(t, e, r) { + let n = t.cursor(Yn.IncludeAnonymous); for (n.moveTo(e); ; ) if (!(r < 0 ? n.childBefore(e) : n.childAfter(e))) for (; ; ) { @@ -23528,14 +23528,14 @@ function aG(t, e, r) { return r < 0 ? 0 : t.length; } } -class YMe { +class t9e { constructor(e, r) { this.fragments = e, this.nodeSet = r, this.i = 0, this.fragment = null, this.safeFrom = -1, this.safeTo = -1, this.trees = [], this.start = [], this.index = [], this.nextFragment(); } nextFragment() { let e = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++]; if (e) { - for (this.safeFrom = e.openStart ? aG(e.tree, e.from + e.offset, 1) - e.offset : e.from, this.safeTo = e.openEnd ? aG(e.tree, e.to + e.offset, -1) - e.offset : e.to; this.trees.length; ) + for (this.safeFrom = e.openStart ? cG(e.tree, e.from + e.offset, 1) - e.offset : e.from, this.safeTo = e.openEnd ? cG(e.tree, e.to + e.offset, -1) - e.offset : e.to; this.trees.length; ) this.trees.pop(), this.start.pop(), this.index.pop(); this.trees.push(e.tree), this.start.push(-e.offset), this.index.push(0), this.nextStart = this.safeFrom; } else @@ -23566,7 +23566,7 @@ class YMe { return null; let o = a + s.length; if (o <= this.safeTo) { - let l = s.prop(Fr.lookAhead); + let l = s.prop(Br.lookAhead); if (!l || o + l < this.fragment.to) return s; } @@ -23577,9 +23577,9 @@ class YMe { } } } -class GMe { +class r9e { constructor(e, r) { - this.stream = r, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = e.tokenizers.map((n) => new s3()); + this.stream = r, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = e.tokenizers.map((n) => new W5()); } getActions(e) { let r = 0, n = null, { parser: i } = e.p, { tokenizers: s } = i, a = i.stateSlot(e.state, 3), o = e.curContext ? e.curContext.hash : 0, l = 0; @@ -23595,12 +23595,12 @@ class GMe { } for (; this.actions.length > r; ) this.actions.pop(); - return l && e.setLookAhead(l), !n && e.pos == this.stream.end && (n = new s3(), n.value = e.p.parser.eofTerm, n.start = n.end = e.pos, r = this.addActions(e, n.value, n.end, r)), this.mainToken = n, this.actions; + return l && e.setLookAhead(l), !n && e.pos == this.stream.end && (n = new W5(), n.value = e.p.parser.eofTerm, n.start = n.end = e.pos, r = this.addActions(e, n.value, n.end, r)), this.mainToken = n, this.actions; } getMainToken(e) { if (this.mainToken) return this.mainToken; - let r = new s3(), { pos: n, p: i } = e; + let r = new W5(), { pos: n, p: i } = e; return r.start = n, r.end = Math.min(n + 1, i.stream.end), r.value = n == i.stream.end ? i.parser.eofTerm : 0, r; } updateCachedToken(e, r, n) { @@ -23630,21 +23630,21 @@ class GMe { for (let u = a.stateSlot(s, l ? 2 : 1); ; u += 3) { if (o[u] == 65535) if (o[u + 1] == 1) - u = Jh(o, u + 2); + u = Gh(o, u + 2); else { - i == 0 && o[u + 1] == 2 && (i = this.putAction(Jh(o, u + 2), r, n, i)); + i == 0 && o[u + 1] == 2 && (i = this.putAction(Gh(o, u + 2), r, n, i)); break; } - o[u] == r && (i = this.putAction(Jh(o, u + 1), r, n, i)); + o[u] == r && (i = this.putAction(Gh(o, u + 1), r, n, i)); } return i; } } -class HMe { +class n9e { constructor(e, r, n, i) { - this.parser = e, this.input = r, this.ranges = i, this.recovering = 0, this.nextStackID = 9812, this.minStackPos = 0, this.reused = [], this.stoppedAt = null, this.lastBigReductionStart = -1, this.lastBigReductionSize = 0, this.bigReductionCount = 0, this.stream = new VMe(r, i), this.tokens = new GMe(e, this.stream), this.topTerm = e.top[1]; + this.parser = e, this.input = r, this.ranges = i, this.recovering = 0, this.nextStackID = 9812, this.minStackPos = 0, this.reused = [], this.stoppedAt = null, this.lastBigReductionStart = -1, this.lastBigReductionSize = 0, this.bigReductionCount = 0, this.stream = new JMe(r, i), this.tokens = new r9e(e, this.stream), this.topTerm = e.top[1]; let { from: s } = i[0]; - this.stacks = [zT.start(this, e.top[0], s)], this.fragments = n.length && this.stream.end - s > e.bufferLength * 4 ? new YMe(n, e.nodeSet) : null; + this.stacks = [TT.start(this, e.top[0], s)], this.fragments = n.length && this.stream.end - s > e.bufferLength * 4 ? new t9e(n, e.nodeSet) : null; } get parsedPos() { return this.minStackPos; @@ -23675,17 +23675,17 @@ class HMe { } } if (!n.length) { - let a = i && jMe(i); + let a = i && s9e(i); if (a) - return ol && console.log("Finish with " + this.stackID(a)), this.stackToTree(a); + return nl && console.log("Finish with " + this.stackID(a)), this.stackToTree(a); if (this.parser.strict) - throw ol && i && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + r); + throw nl && i && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + r); this.recovering || (this.recovering = 5); } if (this.recovering && i) { let a = this.stoppedAt != null && i[0].pos > this.stoppedAt ? i[0] : this.runRecovery(i, s, n); if (a) - return ol && console.log("Force-finish " + this.stackID(a)), this.stackToTree(a.forceAll()); + return nl && console.log("Force-finish " + this.stackID(a)), this.stackToTree(a.forceAll()); } if (this.recovering) { let a = this.recovering == 1 ? 1 : this.recovering * 3; @@ -23721,15 +23721,15 @@ class HMe { this.stoppedAt = e; } advanceStack(e, r, n) { - let i = e.pos, { parser: s } = this, a = ol ? this.stackID(e) + " -> " : ""; + let i = e.pos, { parser: s } = this, a = nl ? this.stackID(e) + " -> " : ""; if (this.stoppedAt != null && i > this.stoppedAt) return e.forceReduce() ? e : null; if (this.fragments) { let u = e.curContext && e.curContext.tracker.strict, h = u ? e.curContext.hash : 0; for (let f = this.fragments.nodeAt(i); f; ) { let d = this.parser.nodeSet.types[f.type.id] == f.type ? s.getGoto(e.state, f.type.id) : -1; - if (d > -1 && f.length && (!u || (f.prop(Fr.contextHash) || 0) == h)) - return e.useNode(f, d), ol && console.log(a + this.stackID(e) + ` (via reuse of ${s.getName(f.type.id)})`), !0; + if (d > -1 && f.length && (!u || (f.prop(Br.contextHash) || 0) == h)) + return e.useNode(f, d), nl && console.log(a + this.stackID(e) + ` (via reuse of ${s.getName(f.type.id)})`), !0; if (!(f instanceof kn) || f.children.length == 0 || f.positions[0] > 0) break; let p = f.children[0]; @@ -23741,14 +23741,14 @@ class HMe { } let o = s.stateSlot(e.state, 4); if (o > 0) - return e.reduce(o), ol && console.log(a + this.stackID(e) + ` (via always-reduce ${s.getName(o & 65535)})`), !0; + return e.reduce(o), nl && console.log(a + this.stackID(e) + ` (via always-reduce ${s.getName(o & 65535)})`), !0; if (e.stack.length >= 8400) for (; e.stack.length > 6e3 && e.forceReduce(); ) ; let l = this.tokens.getActions(e); for (let u = 0; u < l.length; ) { let h = l[u++], f = l[u++], d = l[u++], p = u == l.length || !n, g = p ? e : e.split(), m = this.tokens.mainToken; - if (g.apply(h, f, m ? m.start : g.pos, d), ol && console.log(a + this.stackID(g) + ` (via ${(h & 65536) == 0 ? "shift" : `reduce of ${s.getName(h & 65535)}`} for ${s.getName(f)} @ ${i}${g == e ? "" : ", split"})`), p) + if (g.apply(h, f, m ? m.start : g.pos, d), nl && console.log(a + this.stackID(g) + ` (via ${(h & 65536) == 0 ? "shift" : `reduce of ${s.getName(h & 65535)}`} for ${s.getName(f)} @ ${i}${g == e ? "" : ", split"})`), p) return !0; g.pos > i ? r.push(g) : n.push(g); } @@ -23760,27 +23760,27 @@ class HMe { if (!this.advanceStack(e, null, null)) return !1; if (e.pos > n) - return oG(e, r), !0; + return uG(e, r), !0; } } runRecovery(e, r, n) { let i = null, s = !1; for (let a = 0; a < e.length; a++) { - let o = e[a], l = r[a << 1], u = r[(a << 1) + 1], h = ol ? this.stackID(o) + " -> " : ""; - if (o.deadEnd && (s || (s = !0, o.restart(), ol && console.log(h + this.stackID(o) + " (restarted)"), this.advanceFully(o, n)))) + let o = e[a], l = r[a << 1], u = r[(a << 1) + 1], h = nl ? this.stackID(o) + " -> " : ""; + if (o.deadEnd && (s || (s = !0, o.restart(), nl && console.log(h + this.stackID(o) + " (restarted)"), this.advanceFully(o, n)))) continue; let f = o.split(), d = h; - for (let p = 0; f.forceReduce() && p < 10 && (ol && console.log(d + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, n)); p++) - ol && (d = this.stackID(f) + " -> "); + for (let p = 0; f.forceReduce() && p < 10 && (nl && console.log(d + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, n)); p++) + nl && (d = this.stackID(f) + " -> "); for (let p of o.recoverByInsert(l)) - ol && console.log(h + this.stackID(p) + " (via recover-insert)"), this.advanceFully(p, n); - this.stream.end > o.pos ? (u == o.pos && (u++, l = 0), o.recoverByDelete(l, u), ol && console.log(h + this.stackID(o) + ` (via recover-delete ${this.parser.getName(l)})`), oG(o, n)) : (!i || i.score < o.score) && (i = o); + nl && console.log(h + this.stackID(p) + " (via recover-insert)"), this.advanceFully(p, n); + this.stream.end > o.pos ? (u == o.pos && (u++, l = 0), o.recoverByDelete(l, u), nl && console.log(h + this.stackID(o) + ` (via recover-delete ${this.parser.getName(l)})`), uG(o, n)) : (!i || i.score < o.score) && (i = o); } return i; } stackToTree(e) { return e.close(), kn.build({ - buffer: qT.create(e), + buffer: CT.create(e), nodeSet: this.parser.nodeSet, topID: this.topTerm, maxBufferLength: this.parser.bufferLength, @@ -23791,11 +23791,11 @@ class HMe { }); } stackID(e) { - let r = (k8 || (k8 = /* @__PURE__ */ new WeakMap())).get(e); - return r || k8.set(e, r = String.fromCodePoint(this.nextStackID++)), r + e; + let r = (u8 || (u8 = /* @__PURE__ */ new WeakMap())).get(e); + return r || u8.set(e, r = String.fromCodePoint(this.nextStackID++)), r + e; } } -function oG(t, e) { +function uG(t, e) { for (let r = 0; r < e.length; r++) { let n = e[r]; if (n.pos == t.pos && n.sameState(t)) { @@ -23805,7 +23805,7 @@ function oG(t, e) { } e.push(t); } -class XMe { +class i9e { constructor(e, r, n) { this.source = e, this.flags = r, this.disabled = n; } @@ -23813,13 +23813,13 @@ class XMe { return !this.disabled || this.disabled[e] == 0; } } -const S8 = (t) => t; -class UB { +const h8 = (t) => t; +class NB { constructor(e) { - this.start = e.start, this.shift = e.shift || S8, this.reduce = e.reduce || S8, this.reuse = e.reuse || S8, this.hash = e.hash || (() => 0), this.strict = e.strict !== !1; + this.start = e.start, this.shift = e.shift || h8, this.reduce = e.reduce || h8, this.reuse = e.reuse || h8, this.hash = e.hash || (() => 0), this.strict = e.strict !== !1; } } -class gp extends F$ { +class pp extends M$ { constructor(e) { if (super(), this.wrappers = [], e.version != 14) throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (${14})`); @@ -23836,7 +23836,7 @@ class gp extends F$ { if (e.nodeProps) for (let o of e.nodeProps) { let l = o[0]; - typeof l == "string" && (l = Fr[l]); + typeof l == "string" && (l = Br[l]); for (let u = 1; u < o.length; ) { let h = o[u++]; if (h >= 0) @@ -23849,22 +23849,22 @@ class gp extends F$ { } } } - this.nodeSet = new bk(r.map((o, l) => ys.define({ + this.nodeSet = new hk(r.map((o, l) => ms.define({ name: l >= this.minRepeatTerm ? void 0 : o, id: l, props: i[l], top: n.indexOf(l) > -1, error: l == 0, skipped: e.skippedNodes && e.skippedNodes.indexOf(l) > -1 - }))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), this.strict = !1, this.bufferLength = vae; - let a = Rb(e.tokenData); + }))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), this.strict = !1, this.bufferLength = mae; + let a = xb(e.tokenData); this.context = e.context, this.specializerSpecs = e.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length); for (let o = 0; o < this.specializerSpecs.length; o++) this.specialized[o] = this.specializerSpecs[o].term; - this.specializers = this.specializerSpecs.map(lG), this.states = Rb(e.states, Uint32Array), this.data = Rb(e.stateData), this.goto = Rb(e.goto), this.maxTerm = e.maxTerm, this.tokenizers = e.tokenizers.map((o) => typeof o == "number" ? new I1(a, o) : o), this.topRules = e.topRules, this.dialects = e.dialects || {}, this.dynamicPrecedences = e.dynamicPrecedences || null, this.tokenPrecTable = e.tokenPrec, this.termNames = e.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]]; + this.specializers = this.specializerSpecs.map(hG), this.states = xb(e.states, Uint32Array), this.data = xb(e.stateData), this.goto = xb(e.goto), this.maxTerm = e.maxTerm, this.tokenizers = e.tokenizers.map((o) => typeof o == "number" ? new L1(a, o) : o), this.topRules = e.topRules, this.dialects = e.dialects || {}, this.dynamicPrecedences = e.dynamicPrecedences || null, this.tokenPrecTable = e.tokenPrec, this.termNames = e.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]]; } createParse(e, r, n) { - let i = new HMe(this, e, r, n); + let i = new n9e(this, e, r, n); for (let s of this.wrappers) i = s(i, e, r, n); return i; @@ -23890,14 +23890,14 @@ class gp extends F$ { for (let s = this.stateSlot(e, i ? 2 : 1), a; ; s += 3) { if ((a = n[s]) == 65535) if (n[s + 1] == 1) - a = n[s = Jh(n, s + 2)]; + a = n[s = Gh(n, s + 2)]; else { if (n[s + 1] == 2) - return Jh(n, s + 2); + return Gh(n, s + 2); break; } if (a == r || a == 0) - return Jh(n, s + 1); + return Gh(n, s + 1); } return 0; } @@ -23915,10 +23915,10 @@ class gp extends F$ { for (let s = this.stateSlot(e, 1); i == null; s += 3) { if (this.data[s] == 65535) if (this.data[s + 1] == 1) - s = Jh(this.data, s + 2); + s = Gh(this.data, s + 2); else break; - i = r(Jh(this.data, s + 1)); + i = r(Gh(this.data, s + 1)); } return i; } @@ -23927,7 +23927,7 @@ class gp extends F$ { for (let n = this.stateSlot(e, 1); ; n += 3) { if (this.data[n] == 65535) if (this.data[n + 1] == 1) - n = Jh(this.data, n + 2); + n = Gh(this.data, n + 2); else break; if ((this.data[n + 2] & 1) == 0) { @@ -23938,7 +23938,7 @@ class gp extends F$ { return r; } configure(e) { - let r = Object.assign(Object.create(gp.prototype), this); + let r = Object.assign(Object.create(pp.prototype), this); if (e.props && (r.nodeSet = this.nodeSet.extend(...e.props)), e.top) { let n = this.topRules[e.top]; if (!n) @@ -23953,7 +23953,7 @@ class gp extends F$ { if (!s) return n; let a = Object.assign(Object.assign({}, n), { external: s.to }); - return r.specializers[i] = lG(a), a; + return r.specializers[i] = hG(a), a; })), e.contextTracker && (r.context = e.contextTracker), e.dialect && (r.dialect = this.parseDialect(e.dialect)), e.strict != null && (r.strict = e.strict), e.wrap && (r.wrappers = r.wrappers.concat(e.wrap)), e.bufferLength != null && (r.bufferLength = e.bufferLength), r; } hasWrappers() { @@ -23984,16 +23984,16 @@ class gp extends F$ { if (!n[s]) for (let a = this.dialects[r[s]], o; (o = this.data[a++]) != 65535; ) (i || (i = new Uint8Array(this.maxTerm + 1)))[o] = 1; - return new XMe(e, n, i); + return new i9e(e, n, i); } static deserialize(e) { - return new gp(e); + return new pp(e); } } -function Jh(t, e) { +function Gh(t, e) { return t[e] | t[e + 1] << 16; } -function jMe(t) { +function s9e(t) { let e = null; for (let r of t) { let n = r.p.stoppedAt; @@ -24001,14 +24001,14 @@ function jMe(t) { } return e; } -function lG(t) { +function hG(t) { if (t.external) { let e = t.extend ? 1 : 0; return (r, n) => t.external(r, n) << 1 | e; } return t.get; } -const ZMe = 54, KMe = 1, JMe = 55, e9e = 2, t9e = 56, r9e = 3, cG = 4, n9e = 5, QT = 6, fce = 7, dce = 8, pce = 9, gce = 10, i9e = 11, s9e = 12, a9e = 13, T8 = 57, o9e = 14, uG = 58, mce = 20, l9e = 22, vce = 23, c9e = 24, $9 = 26, yce = 27, u9e = 28, h9e = 31, f9e = 34, d9e = 36, p9e = 37, g9e = 0, m9e = 1, v9e = { +const a9e = 54, o9e = 1, l9e = 55, c9e = 2, u9e = 56, h9e = 3, fG = 4, f9e = 5, _T = 6, hce = 7, fce = 8, dce = 9, pce = 10, d9e = 11, p9e = 12, g9e = 13, f8 = 57, m9e = 14, dG = 58, gce = 20, v9e = 22, mce = 23, y9e = 24, k9 = 26, vce = 27, b9e = 28, x9e = 31, w9e = 34, O9e = 36, k9e = 37, S9e = 0, T9e = 1, C9e = { area: !0, base: !0, br: !0, @@ -24027,7 +24027,7 @@ const ZMe = 54, KMe = 1, JMe = 55, e9e = 2, t9e = 56, r9e = 3, cG = 4, n9e = 5, track: !0, wbr: !0, menuitem: !0 -}, y9e = { +}, E9e = { dd: !0, li: !0, optgroup: !0, @@ -24040,7 +24040,7 @@ const ZMe = 54, KMe = 1, JMe = 55, e9e = 2, t9e = 56, r9e = 3, cG = 4, n9e = 5, tfoot: !0, th: !0, tr: !0 -}, hG = { +}, pG = { dd: { dd: !0, dt: !0 }, dt: { dd: !0, dt: !0 }, li: { li: !0 }, @@ -24084,125 +24084,125 @@ const ZMe = 54, KMe = 1, JMe = 55, e9e = 2, t9e = 56, r9e = 3, cG = 4, n9e = 5, thead: { tbody: !0, tfoot: !0 }, tr: { tr: !0 } }; -function b9e(t) { +function _9e(t) { return t == 45 || t == 46 || t == 58 || t >= 65 && t <= 90 || t == 95 || t >= 97 && t <= 122 || t >= 161; } -function bce(t) { +function yce(t) { return t == 9 || t == 10 || t == 13 || t == 32; } -let fG = null, dG = null, pG = 0; -function B9(t, e) { +let gG = null, mG = null, vG = 0; +function S9(t, e) { let r = t.pos + e; - if (pG == r && dG == t) - return fG; + if (vG == r && mG == t) + return gG; let n = t.peek(e); - for (; bce(n); ) + for (; yce(n); ) n = t.peek(++e); let i = ""; - for (; b9e(n); ) + for (; _9e(n); ) i += String.fromCharCode(n), n = t.peek(++e); - return dG = t, pG = r, fG = i ? i.toLowerCase() : n == x9e || n == w9e ? void 0 : null; + return mG = t, vG = r, gG = i ? i.toLowerCase() : n == A9e || n == R9e ? void 0 : null; } -const xce = 60, VT = 62, QB = 47, x9e = 63, w9e = 33, O9e = 45; -function gG(t, e) { +const bce = 60, AT = 62, IB = 47, A9e = 63, R9e = 33, L9e = 45; +function yG(t, e) { this.name = t, this.parent = e, this.hash = e ? e.hash : 0; for (let r = 0; r < t.length; r++) this.hash += (this.hash << 4) + t.charCodeAt(r) + (t.charCodeAt(r) << 8); } -const k9e = [QT, gce, fce, dce, pce], S9e = new UB({ +const M9e = [_T, pce, hce, fce, dce], D9e = new NB({ start: null, shift(t, e, r, n) { - return k9e.indexOf(e) > -1 ? new gG(B9(n, 1) || "", t) : t; + return M9e.indexOf(e) > -1 ? new yG(S9(n, 1) || "", t) : t; }, reduce(t, e) { - return e == mce && t ? t.parent : t; + return e == gce && t ? t.parent : t; }, reuse(t, e, r, n) { let i = e.type.id; - return i == QT || i == d9e ? new gG(B9(n, 1) || "", t) : t; + return i == _T || i == O9e ? new yG(S9(n, 1) || "", t) : t; }, hash(t) { return t ? t.hash : 0; }, strict: !1 -}), T9e = new xo((t, e) => { - if (t.next != xce) { - t.next < 0 && e.context && t.acceptToken(T8); +}), P9e = new yo((t, e) => { + if (t.next != bce) { + t.next < 0 && e.context && t.acceptToken(f8); return; } t.advance(); - let r = t.next == QB; + let r = t.next == IB; r && t.advance(); - let n = B9(t, 0); + let n = S9(t, 0); if (n === void 0) return; if (!n) - return t.acceptToken(r ? o9e : QT); + return t.acceptToken(r ? m9e : _T); let i = e.context ? e.context.name : null; if (r) { if (n == i) - return t.acceptToken(i9e); - if (i && y9e[i]) - return t.acceptToken(T8, -2); - if (e.dialectEnabled(g9e)) - return t.acceptToken(s9e); + return t.acceptToken(d9e); + if (i && E9e[i]) + return t.acceptToken(f8, -2); + if (e.dialectEnabled(S9e)) + return t.acceptToken(p9e); for (let s = e.context; s; s = s.parent) if (s.name == n) return; - t.acceptToken(a9e); + t.acceptToken(g9e); } else { if (n == "script") - return t.acceptToken(fce); + return t.acceptToken(hce); if (n == "style") - return t.acceptToken(dce); + return t.acceptToken(fce); if (n == "textarea") + return t.acceptToken(dce); + if (C9e.hasOwnProperty(n)) return t.acceptToken(pce); - if (v9e.hasOwnProperty(n)) - return t.acceptToken(gce); - i && hG[i] && hG[i][n] ? t.acceptToken(T8, -1) : t.acceptToken(QT); + i && pG[i] && pG[i][n] ? t.acceptToken(f8, -1) : t.acceptToken(_T); } -}, { contextual: !0 }), C9e = new xo((t) => { +}, { contextual: !0 }), N9e = new yo((t) => { for (let e = 0, r = 0; ; r++) { if (t.next < 0) { - r && t.acceptToken(uG); + r && t.acceptToken(dG); break; } - if (t.next == O9e) + if (t.next == L9e) e++; - else if (t.next == VT && e >= 2) { - r >= 3 && t.acceptToken(uG, -2); + else if (t.next == AT && e >= 2) { + r >= 3 && t.acceptToken(dG, -2); break; } else e = 0; t.advance(); } }); -function E9e(t) { +function I9e(t) { for (; t; t = t.parent) if (t.name == "svg" || t.name == "math") return !0; return !1; } -const _9e = new xo((t, e) => { - if (t.next == QB && t.peek(1) == VT) { - let r = e.dialectEnabled(m9e) || E9e(e.context); - t.acceptToken(r ? n9e : cG, 2); +const $9e = new yo((t, e) => { + if (t.next == IB && t.peek(1) == AT) { + let r = e.dialectEnabled(T9e) || I9e(e.context); + t.acceptToken(r ? f9e : fG, 2); } else - t.next == VT && t.acceptToken(cG, 1); + t.next == AT && t.acceptToken(fG, 1); }); -function VB(t, e, r) { +function $B(t, e, r) { let n = 2 + t.length; - return new xo((i) => { + return new yo((i) => { for (let s = 0, a = 0, o = 0; ; o++) { if (i.next < 0) { o && i.acceptToken(e); break; } - if (s == 0 && i.next == xce || s == 1 && i.next == QB || s >= 2 && s < n && i.next == t.charCodeAt(s - 2)) + if (s == 0 && i.next == bce || s == 1 && i.next == IB || s >= 2 && s < n && i.next == t.charCodeAt(s - 2)) s++, a++; - else if ((s == 2 || s == n) && bce(i.next)) + else if ((s == 2 || s == n) && yce(i.next)) a++; - else if (s == n && i.next == VT) { + else if (s == n && i.next == AT) { o > a ? i.acceptToken(e, -a) : i.acceptToken(r, -(a - 2)); break; } else if ((i.next == 10 || i.next == 13) && o) { @@ -24214,99 +24214,99 @@ function VB(t, e, r) { } }); } -const A9e = VB("script", ZMe, KMe), R9e = VB("style", JMe, e9e), L9e = VB("textarea", t9e, r9e), M9e = Bp({ - "Text RawText": ze.content, - "StartTag StartCloseTag SelfClosingEndTag EndTag": ze.angleBracket, - TagName: ze.tagName, - "MismatchedCloseTag/TagName": [ze.tagName, ze.invalid], - AttributeName: ze.attributeName, - "AttributeValue UnquotedAttributeValue": ze.attributeValue, - Is: ze.definitionOperator, - "EntityReference CharacterReference": ze.character, - Comment: ze.blockComment, - ProcessingInst: ze.processingInstruction, - DoctypeDecl: ze.documentMeta -}), D9e = gp.deserialize({ +const B9e = $B("script", a9e, o9e), F9e = $B("style", l9e, c9e), z9e = $B("textarea", u9e, h9e), q9e = Fp({ + "Text RawText": Be.content, + "StartTag StartCloseTag SelfClosingEndTag EndTag": Be.angleBracket, + TagName: Be.tagName, + "MismatchedCloseTag/TagName": [Be.tagName, Be.invalid], + AttributeName: Be.attributeName, + "AttributeValue UnquotedAttributeValue": Be.attributeValue, + Is: Be.definitionOperator, + "EntityReference CharacterReference": Be.character, + Comment: Be.blockComment, + ProcessingInst: Be.processingInstruction, + DoctypeDecl: Be.documentMeta +}), U9e = pp.deserialize({ version: 14, states: ",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z", stateData: "+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~", goto: "%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp", nodeNames: "\u26A0 StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl", maxTerm: 67, - context: S9e, + context: D9e, nodeProps: [ ["closedBy", -10, 1, 2, 3, 7, 8, 9, 10, 11, 12, 13, "EndTag", 6, "EndTag SelfClosingEndTag", -4, 21, 30, 33, 36, "CloseTag"], ["openedBy", 4, "StartTag StartCloseTag", 5, "StartTag", -4, 29, 32, 35, 37, "OpenTag"], ["group", -9, 14, 17, 18, 19, 20, 39, 40, 41, 42, "Entity", 16, "Entity TextContent", -3, 28, 31, 34, "TextContent Entity"] ], - propSources: [M9e], + propSources: [q9e], skippedNodes: [0], repeatNodeCount: 9, tokenData: "!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V! { + return wae((o, l) => { let u = o.type.id; - if (u == u9e) - return C8(o, l, r); - if (u == h9e) - return C8(o, l, n); - if (u == f9e) - return C8(o, l, i); - if (u == mce && s.length) { - let h = o.node, f = h.firstChild, d = f && mG(f, l), p; + if (u == b9e) + return d8(o, l, r); + if (u == x9e) + return d8(o, l, n); + if (u == w9e) + return d8(o, l, i); + if (u == gce && s.length) { + let h = o.node, f = h.firstChild, d = f && bG(f, l), p; if (d) { for (let g of s) - if (g.tag == d && (!g.attrs || g.attrs(p || (p = wce(h, l))))) { - let m = h.lastChild, v = m.type.id == p9e ? m.from : h.to; + if (g.tag == d && (!g.attrs || g.attrs(p || (p = xce(h, l))))) { + let m = h.lastChild, v = m.type.id == k9e ? m.from : h.to; if (v > f.to) return { parser: g.parser, overlay: [{ from: f.to, to: v }] }; } } } - if (a && u == vce) { + if (a && u == mce) { let h = o.node, f; if (f = h.firstChild) { let d = a[l.read(f.from, f.to)]; if (d) for (let p of d) { - if (p.tagName && p.tagName != mG(h.parent, l)) + if (p.tagName && p.tagName != bG(h.parent, l)) continue; let g = h.lastChild; - if (g.type.id == $9) { + if (g.type.id == k9) { let m = g.from + 1, v = g.lastChild, y = g.to - (v && v.isError ? 0 : 1); if (y > m) return { parser: p.parser, overlay: [{ from: m, to: y }] }; - } else if (g.type.id == yce) + } else if (g.type.id == vce) return { parser: p.parser, overlay: [{ from: g.from, to: g.to }] }; } } @@ -24314,7 +24314,7 @@ function Oce(t = [], e = []) { return null; }); } -const P9e = 96, vG = 1, N9e = 97, I9e = 98, yG = 2, kce = [ +const Q9e = 96, xG = 1, V9e = 97, W9e = 98, wG = 2, Oce = [ 9, 10, 11, @@ -24340,74 +24340,74 @@ const P9e = 96, vG = 1, N9e = 97, I9e = 98, yG = 2, kce = [ 8239, 8287, 12288 -], $9e = 58, B9e = 40, Sce = 95, F9e = 91, a3 = 45, z9e = 46, q9e = 35, U9e = 37, Q9e = 38, V9e = 92, W9e = 10; -function WT(t) { +], Y9e = 58, G9e = 40, kce = 95, H9e = 91, Y5 = 45, X9e = 46, Z9e = 35, j9e = 37, K9e = 38, J9e = 92, eDe = 10; +function RT(t) { return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t >= 161; } -function Y9e(t) { +function tDe(t) { return t >= 48 && t <= 57; } -const G9e = new xo((t, e) => { +const rDe = new yo((t, e) => { for (let r = !1, n = 0, i = 0; ; i++) { let { next: s } = t; - if (WT(s) || s == a3 || s == Sce || r && Y9e(s)) - !r && (s != a3 || i > 0) && (r = !0), n === i && s == a3 && n++, t.advance(); - else if (s == V9e && t.peek(1) != W9e) + if (RT(s) || s == Y5 || s == kce || r && tDe(s)) + !r && (s != Y5 || i > 0) && (r = !0), n === i && s == Y5 && n++, t.advance(); + else if (s == J9e && t.peek(1) != eDe) t.advance(), t.next > -1 && t.advance(), r = !0; else { - r && t.acceptToken(s == B9e ? N9e : n == 2 && e.canShift(yG) ? yG : I9e); + r && t.acceptToken(s == G9e ? V9e : n == 2 && e.canShift(wG) ? wG : W9e); break; } } -}), H9e = new xo((t) => { - if (kce.includes(t.peek(-1))) { +}), nDe = new yo((t) => { + if (Oce.includes(t.peek(-1))) { let { next: e } = t; - (WT(e) || e == Sce || e == q9e || e == z9e || e == F9e || e == $9e || e == a3 || e == Q9e) && t.acceptToken(P9e); + (RT(e) || e == kce || e == Z9e || e == X9e || e == H9e || e == Y9e || e == Y5 || e == K9e) && t.acceptToken(Q9e); } -}), X9e = new xo((t) => { - if (!kce.includes(t.peek(-1))) { +}), iDe = new yo((t) => { + if (!Oce.includes(t.peek(-1))) { let { next: e } = t; - if (e == U9e && (t.advance(), t.acceptToken(vG)), WT(e)) { + if (e == j9e && (t.advance(), t.acceptToken(xG)), RT(e)) { do t.advance(); - while (WT(t.next)); - t.acceptToken(vG); - } - } -}), j9e = Bp({ - "AtKeyword import charset namespace keyframes media supports": ze.definitionKeyword, - "from to selector": ze.keyword, - NamespaceName: ze.namespace, - KeyframeName: ze.labelName, - KeyframeRangeName: ze.operatorKeyword, - TagName: ze.tagName, - ClassName: ze.className, - PseudoClassName: ze.constant(ze.className), - IdName: ze.labelName, - "FeatureName PropertyName": ze.propertyName, - AttributeName: ze.attributeName, - NumberLiteral: ze.number, - KeywordQuery: ze.keyword, - UnaryQueryOp: ze.operatorKeyword, - "CallTag ValueName": ze.atom, - VariableName: ze.variableName, - Callee: ze.operatorKeyword, - Unit: ze.unit, - "UniversalSelector NestingSelector": ze.definitionOperator, - MatchOp: ze.compareOperator, - "ChildOp SiblingOp, LogicOp": ze.logicOperator, - BinOp: ze.arithmeticOperator, - Important: ze.modifier, - Comment: ze.blockComment, - ColorLiteral: ze.color, - "ParenthesizedContent StringLiteral": ze.string, - ":": ze.punctuation, - "PseudoOp #": ze.derefOperator, - "; ,": ze.separator, - "( )": ze.paren, - "[ ]": ze.squareBracket, - "{ }": ze.brace -}), Z9e = { __proto__: null, lang: 32, "nth-child": 32, "nth-last-child": 32, "nth-of-type": 32, "nth-last-of-type": 32, dir: 32, "host-context": 32, url: 60, "url-prefix": 60, domain: 60, regexp: 60, selector: 134 }, K9e = { __proto__: null, "@import": 114, "@media": 138, "@charset": 142, "@namespace": 146, "@keyframes": 152, "@supports": 164 }, J9e = { __proto__: null, not: 128, only: 128 }, eDe = gp.deserialize({ + while (RT(t.next)); + t.acceptToken(xG); + } + } +}), sDe = Fp({ + "AtKeyword import charset namespace keyframes media supports": Be.definitionKeyword, + "from to selector": Be.keyword, + NamespaceName: Be.namespace, + KeyframeName: Be.labelName, + KeyframeRangeName: Be.operatorKeyword, + TagName: Be.tagName, + ClassName: Be.className, + PseudoClassName: Be.constant(Be.className), + IdName: Be.labelName, + "FeatureName PropertyName": Be.propertyName, + AttributeName: Be.attributeName, + NumberLiteral: Be.number, + KeywordQuery: Be.keyword, + UnaryQueryOp: Be.operatorKeyword, + "CallTag ValueName": Be.atom, + VariableName: Be.variableName, + Callee: Be.operatorKeyword, + Unit: Be.unit, + "UniversalSelector NestingSelector": Be.definitionOperator, + MatchOp: Be.compareOperator, + "ChildOp SiblingOp, LogicOp": Be.logicOperator, + BinOp: Be.arithmeticOperator, + Important: Be.modifier, + Comment: Be.blockComment, + ColorLiteral: Be.color, + "ParenthesizedContent StringLiteral": Be.string, + ":": Be.punctuation, + "PseudoOp #": Be.derefOperator, + "; ,": Be.separator, + "( )": Be.paren, + "[ ]": Be.squareBracket, + "{ }": Be.brace +}), aDe = { __proto__: null, lang: 32, "nth-child": 32, "nth-last-child": 32, "nth-of-type": 32, "nth-last-of-type": 32, dir: 32, "host-context": 32, url: 60, "url-prefix": 60, domain: 60, regexp: 60, selector: 134 }, oDe = { __proto__: null, "@import": 114, "@media": 138, "@charset": 142, "@namespace": 146, "@keyframes": 152, "@supports": 164 }, lDe = { __proto__: null, not: 128, only: 128 }, cDe = pp.deserialize({ version: 14, states: "9bQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DPO$vQ[O'#DTOOQP'#Ej'#EjO${QdO'#DeO%gQ[O'#DrO${QdO'#DtO%xQ[O'#DvO&TQ[O'#DyO&]Q[O'#EPO&kQ[O'#EROOQS'#Ei'#EiOOQS'#EU'#EUQYQ[OOO&rQXO'#CdO'gQWO'#DaO'lQWO'#EpO'wQ[O'#EpQOQWOOP(RO#tO'#C_POOO)C@X)C@XOOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(^Q[O'#EXO(xQWO,58{O)QQ[O,59SO$qQ[O,59kO$vQ[O,59oO(^Q[O,59sO(^Q[O,59uO(^Q[O,59vO)]Q[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)dQWO,59SO)iQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)nQ`O,59oOOQS'#Cp'#CpO${QdO'#CqO)vQvO'#CsO+TQtO,5:POOQO'#Cx'#CxO)iQWO'#CwO+iQWO'#CyOOQS'#Em'#EmOOQO'#Dh'#DhO+nQ[O'#DoO+|QWO'#EqO&]Q[O'#DmO,[QWO'#DpOOQO'#Er'#ErO({QWO,5:^O,aQpO,5:`OOQS'#Dx'#DxO,iQWO,5:bO,nQ[O,5:bOOQO'#D{'#D{O,vQWO,5:eO,{QWO,5:kO-TQWO,5:mOOQS-E8S-E8SO${QdO,59{O-]Q[O'#EZO-jQWO,5;[O-jQWO,5;[POOO'#ET'#ETP-uO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO.lQXO,5:sOOQO-E8V-E8VOOQS1G.g1G.gOOQP1G.n1G.nO)dQWO1G.nO)iQWO1G.nOOQP1G/V1G/VO.yQ`O1G/ZO/dQXO1G/_O/zQXO1G/aO0bQXO1G/bO0xQWO,59zO0}Q[O'#DOO1UQdO'#CoOOQP1G/Z1G/ZO${QdO1G/ZO1]QpO,59]OOQS,59_,59_O${QdO,59aO1eQWO1G/kOOQS,59c,59cO1jQ!bO,59eO1rQWO'#DhO1}QWO,5:TO2SQWO,5:ZO&]Q[O,5:VO&]Q[O'#E[O2[QWO,5;]O2gQWO,5:XO(^Q[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2xQWO1G/|O2}QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO3YQtO1G/gOOQO,5:u,5:uO3pQ[O,5:uOOQO-E8X-E8XO3}QWO1G0vPOOO-E8R-E8RPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$u7+$uO${QdO7+$uOOQS1G/f1G/fO4YQXO'#EoO4aQWO,59jO4fQtO'#EVO5ZQdO'#ElO5eQWO,59ZO5jQpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5rQWO1G/PO${QdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5wQWO,5:vOOQO-E8Y-E8YO6VQXO1G/vOOQS7+%h7+%hO6^QYO'#CsOOQO'#EO'#EOO6iQ`O'#D}OOQO'#D}'#D}O6tQWO'#E]O6|QdO,5:hOOQS,5:h,5:hO7XQtO'#EYO${QdO'#EYO8VQdO7+%ROOQO7+%R7+%ROOQO1G0a1G0aO8jQpO< { ["openedBy", 17, "(", 48, "{"], ["closedBy", 18, ")", 49, "}"] ], - propSources: [j9e], + propSources: [sDe], skippedNodes: [0, 3, 85], repeatNodeCount: 10, tokenData: "J^~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Ab![!]B]!]!^CX!^!_$}!_!`Cj!`!aC{!a!b$}!b!cDw!c!}$}!}#OFa#O#P$}#P#QFr#Q#R6d#R#T$}#T#UGT#U#c$}#c#dHf#d#o$}#o#pH{#p#q6d#q#rI^#r#sIo#s#y$}#y#z%u#z$f$}$f$g%u$g#BY$}#BY#BZ%u#BZ$IS$}$IS$I_%u$I_$I|$}$I|$JO%u$JO$JT$}$JT$JU%u$JU$KV$}$KV$KW%u$KW&FU$}&FU&FV%u&FV;'S$};'S;=`JW<%lO$}`%QSOy%^z;'S%^;'S;=`%o<%lO%^`%cSo`Oy%^z;'S%^;'S;=`%o<%lO%^`%rP;=`<%l%^~%zh#W~OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^~'mh#W~o`OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^l)[UOy%^z#]%^#]#^)n#^;'S%^;'S;=`%o<%lO%^l)sUo`Oy%^z#a%^#a#b*V#b;'S%^;'S;=`%o<%lO%^l*[Uo`Oy%^z#d%^#d#e*n#e;'S%^;'S;=`%o<%lO%^l*sUo`Oy%^z#c%^#c#d+V#d;'S%^;'S;=`%o<%lO%^l+[Uo`Oy%^z#f%^#f#g+n#g;'S%^;'S;=`%o<%lO%^l+sUo`Oy%^z#h%^#h#i,V#i;'S%^;'S;=`%o<%lO%^l,[Uo`Oy%^z#T%^#T#U,n#U;'S%^;'S;=`%o<%lO%^l,sUo`Oy%^z#b%^#b#c-V#c;'S%^;'S;=`%o<%lO%^l-[Uo`Oy%^z#h%^#h#i-n#i;'S%^;'S;=`%o<%lO%^l-uS!V[o`Oy%^z;'S%^;'S;=`%o<%lO%^~.UWOY.RZr.Rrs.ns#O.R#O#P.s#P;'S.R;'S;=`/o<%lO.R~.sOh~~.vRO;'S.R;'S;=`/P;=`O.R~/SXOY.RZr.Rrs.ns#O.R#O#P.s#P;'S.R;'S;=`/o;=`<%l.R<%lO.R~/rP;=`<%l.Rn/zYtQOy%^z!Q%^!Q![0j![!c%^!c!i0j!i#T%^#T#Z0j#Z;'S%^;'S;=`%o<%lO%^l0oYo`Oy%^z!Q%^!Q![1_![!c%^!c!i1_!i#T%^#T#Z1_#Z;'S%^;'S;=`%o<%lO%^l1dYo`Oy%^z!Q%^!Q![2S![!c%^!c!i2S!i#T%^#T#Z2S#Z;'S%^;'S;=`%o<%lO%^l2ZYf[o`Oy%^z!Q%^!Q![2y![!c%^!c!i2y!i#T%^#T#Z2y#Z;'S%^;'S;=`%o<%lO%^l3QYf[o`Oy%^z!Q%^!Q![3p![!c%^!c!i3p!i#T%^#T#Z3p#Z;'S%^;'S;=`%o<%lO%^l3uYo`Oy%^z!Q%^!Q![4e![!c%^!c!i4e!i#T%^#T#Z4e#Z;'S%^;'S;=`%o<%lO%^l4lYf[o`Oy%^z!Q%^!Q![5[![!c%^!c!i5[!i#T%^#T#Z5[#Z;'S%^;'S;=`%o<%lO%^l5aYo`Oy%^z!Q%^!Q![6P![!c%^!c!i6P!i#T%^#T#Z6P#Z;'S%^;'S;=`%o<%lO%^l6WSf[o`Oy%^z;'S%^;'S;=`%o<%lO%^d6gUOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^d7QSzSo`Oy%^z;'S%^;'S;=`%o<%lO%^b7cSXQOy%^z;'S%^;'S;=`%o<%lO%^~7rWOY7oZw7owx.nx#O7o#O#P8[#P;'S7o;'S;=`9W<%lO7o~8_RO;'S7o;'S;=`8h;=`O7o~8kXOY7oZw7owx.nx#O7o#O#P8[#P;'S7o;'S;=`9W;=`<%l7o<%lO7o~9ZP;=`<%l7on9cSb^Oy%^z;'S%^;'S;=`%o<%lO%^~9tOa~n9{UUQjWOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^n:fWjW!PQOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#b[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#b[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSp^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#_QOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#X~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#b[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!W^Oy%^z;'S%^;'S;=`%o<%lO%^dCoSzSOy%^z;'S%^;'S;=`%o<%lO%^bDQU|QOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS|Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[!YQo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bFfSxQOy%^z;'S%^;'S;=`%o<%lO%^lFwSv[Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!`Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!RUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!Q^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!PQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}", - tokenizers: [H9e, X9e, G9e, 1, 2, 3, 4, new UT("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~", 28, 102)], + tokenizers: [nDe, iDe, rDe, 1, 2, 3, 4, new ET("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~", 28, 102)], topRules: { StyleSheet: [0, 4], Styles: [1, 84] }, - specialized: [{ term: 97, get: (t) => Z9e[t] || -1 }, { term: 56, get: (t) => K9e[t] || -1 }, { term: 98, get: (t) => J9e[t] || -1 }], + specialized: [{ term: 97, get: (t) => aDe[t] || -1 }, { term: 56, get: (t) => oDe[t] || -1 }, { term: 98, get: (t) => lDe[t] || -1 }], tokenPrec: 1169 }); -let E8 = null; -function _8() { - if (!E8 && typeof document == "object" && document.body) { +let p8 = null; +function g8() { + if (!p8 && typeof document == "object" && document.body) { let { style: t } = document.body, e = [], r = /* @__PURE__ */ new Set(); for (let n in t) n != "cssText" && n != "cssFloat" && typeof t[n] == "string" && (/[A-Z]/.test(n) && (n = n.replace(/[A-Z]/g, (i) => "-" + i.toLowerCase())), r.has(n) || (e.push(n), r.add(n))); - E8 = e.sort().map((n) => ({ type: "property", label: n })); + p8 = e.sort().map((n) => ({ type: "property", label: n })); } - return E8 || []; + return p8 || []; } -const bG = /* @__PURE__ */ [ +const OG = /* @__PURE__ */ [ "active", "after", "any-link", @@ -24501,7 +24501,7 @@ const bG = /* @__PURE__ */ [ "valid", "visited", "where" -].map((t) => ({ type: "class", label: t })), xG = /* @__PURE__ */ [ +].map((t) => ({ type: "class", label: t })), kG = /* @__PURE__ */ [ "above", "absolute", "activeborder", @@ -25064,7 +25064,7 @@ const bG = /* @__PURE__ */ [ "whitesmoke", "yellow", "yellowgreen" -].map((t) => ({ type: "constant", label: t }))), tDe = /* @__PURE__ */ [ +].map((t) => ({ type: "constant", label: t }))), uDe = /* @__PURE__ */ [ "a", "abbr", "address", @@ -25143,16 +25143,16 @@ const bG = /* @__PURE__ */ [ "tr", "u", "ul" -].map((t) => ({ type: "type", label: t })), cd = /^(\w[\w-]*|-\w[\w-]*|)$/, rDe = /^-(-[\w-]*)?$/; -function nDe(t, e) { +].map((t) => ({ type: "type", label: t })), sd = /^(\w[\w-]*|-\w[\w-]*|)$/, hDe = /^-(-[\w-]*)?$/; +function fDe(t, e) { var r; if ((t.name == "(" || t.type.isError) && (t = t.parent || t), t.name != "ArgList") return !1; let n = (r = t.parent) === null || r === void 0 ? void 0 : r.firstChild; return (n == null ? void 0 : n.name) != "Callee" ? !1 : e.sliceString(n.from, n.to) == "var"; } -const wG = /* @__PURE__ */ new wae(), iDe = ["Declaration"]; -function sDe(t) { +const SG = /* @__PURE__ */ new xae(), dDe = ["Declaration"]; +function pDe(t) { for (let e = t; ; ) { if (e.type.isTop) return e; @@ -25160,62 +25160,62 @@ function sDe(t) { return t; } } -function Tce(t, e, r) { +function Sce(t, e, r) { if (e.to - e.from > 4096) { - let n = wG.get(e); + let n = SG.get(e); if (n) return n; - let i = [], s = /* @__PURE__ */ new Set(), a = e.cursor(Hn.IncludeAnonymous); + let i = [], s = /* @__PURE__ */ new Set(), a = e.cursor(Yn.IncludeAnonymous); if (a.firstChild()) do - for (let o of Tce(t, a.node, r)) + for (let o of Sce(t, a.node, r)) s.has(o.label) || (s.add(o.label), i.push(o)); while (a.nextSibling()); - return wG.set(e, i), i; + return SG.set(e, i), i; } else { let n = [], i = /* @__PURE__ */ new Set(); return e.cursor().iterate((s) => { var a; - if (r(s) && s.matchContext(iDe) && ((a = s.node.nextSibling) === null || a === void 0 ? void 0 : a.name) == ":") { + if (r(s) && s.matchContext(dDe) && ((a = s.node.nextSibling) === null || a === void 0 ? void 0 : a.name) == ":") { let o = t.sliceString(s.from, s.to); i.has(o) || (i.add(o), n.push({ label: o, type: "variable" })); } }), n; } } -const aDe = (t) => (e) => { - let { state: r, pos: n } = e, i = Qn(r).resolveInner(n, -1), s = i.type.isError && i.from == i.to - 1 && r.doc.sliceString(i.from, i.to) == "-"; +const gDe = (t) => (e) => { + let { state: r, pos: n } = e, i = Un(r).resolveInner(n, -1), s = i.type.isError && i.from == i.to - 1 && r.doc.sliceString(i.from, i.to) == "-"; if (i.name == "PropertyName" || (s || i.name == "TagName") && /^(Block|Styles)$/.test(i.resolve(i.to).name)) - return { from: i.from, options: _8(), validFor: cd }; + return { from: i.from, options: g8(), validFor: sd }; if (i.name == "ValueName") - return { from: i.from, options: xG, validFor: cd }; + return { from: i.from, options: kG, validFor: sd }; if (i.name == "PseudoClassName") - return { from: i.from, options: bG, validFor: cd }; - if (t(i) || (e.explicit || s) && nDe(i, r.doc)) + return { from: i.from, options: OG, validFor: sd }; + if (t(i) || (e.explicit || s) && fDe(i, r.doc)) return { from: t(i) || s ? i.from : n, - options: Tce(r.doc, sDe(i), t), - validFor: rDe + options: Sce(r.doc, pDe(i), t), + validFor: hDe }; if (i.name == "TagName") { for (let { parent: l } = i; l; l = l.parent) if (l.name == "Block") - return { from: i.from, options: _8(), validFor: cd }; - return { from: i.from, options: tDe, validFor: cd }; + return { from: i.from, options: g8(), validFor: sd }; + return { from: i.from, options: uDe, validFor: sd }; } if (!e.explicit) return null; let a = i.resolve(n), o = a.childBefore(n); - return o && o.name == ":" && a.name == "PseudoClassSelector" ? { from: n, options: bG, validFor: cd } : o && o.name == ":" && a.name == "Declaration" || a.name == "ArgList" ? { from: n, options: xG, validFor: cd } : a.name == "Block" || a.name == "Styles" ? { from: n, options: _8(), validFor: cd } : null; -}, oDe = /* @__PURE__ */ aDe((t) => t.name == "VariableName"), YT = /* @__PURE__ */ lp.define({ + return o && o.name == ":" && a.name == "PseudoClassSelector" ? { from: n, options: OG, validFor: sd } : o && o.name == ":" && a.name == "Declaration" || a.name == "ArgList" ? { from: n, options: kG, validFor: sd } : a.name == "Block" || a.name == "Styles" ? { from: n, options: g8(), validFor: sd } : null; +}, mDe = /* @__PURE__ */ gDe((t) => t.name == "VariableName"), LT = /* @__PURE__ */ op.define({ name: "css", - parser: /* @__PURE__ */ eDe.configure({ + parser: /* @__PURE__ */ cDe.configure({ props: [ - /* @__PURE__ */ My.add({ - Declaration: /* @__PURE__ */ J5() + /* @__PURE__ */ Ay.add({ + Declaration: /* @__PURE__ */ F5() }), /* @__PURE__ */ tm.add({ - "Block KeyframeList": W$ + "Block KeyframeList": B$ }) ] }), @@ -25225,10 +25225,10 @@ const aDe = (t) => (e) => { wordChars: "-" } }); -function lDe() { - return new mv(YT, YT.data.of({ autocomplete: oDe })); +function vDe() { + return new fv(LT, LT.data.of({ autocomplete: mDe })); } -const cDe = 309, OG = 1, uDe = 2, hDe = 3, fDe = 310, dDe = 312, pDe = 313, gDe = 4, mDe = 5, vDe = 0, F9 = [ +const yDe = 309, TG = 1, bDe = 2, xDe = 3, wDe = 310, ODe = 312, kDe = 313, SDe = 4, TDe = 5, CDe = 0, T9 = [ 9, 10, 11, @@ -25254,45 +25254,45 @@ const cDe = 309, OG = 1, uDe = 2, hDe = 3, fDe = 310, dDe = 312, pDe = 313, gDe 8239, 8287, 12288 -], Cce = 125, yDe = 59, z9 = 47, bDe = 42, xDe = 43, wDe = 45, ODe = 60, kDe = 44, SDe = new UB({ +], Tce = 125, EDe = 59, C9 = 47, _De = 42, ADe = 43, RDe = 45, LDe = 60, MDe = 44, DDe = new NB({ start: !1, shift(t, e) { - return e == gDe || e == mDe || e == dDe ? t : e == pDe; + return e == SDe || e == TDe || e == ODe ? t : e == kDe; }, strict: !1 -}), TDe = new xo((t, e) => { +}), PDe = new yo((t, e) => { let { next: r } = t; - (r == Cce || r == -1 || e.context) && t.acceptToken(fDe); -}, { contextual: !0, fallback: !0 }), CDe = new xo((t, e) => { + (r == Tce || r == -1 || e.context) && t.acceptToken(wDe); +}, { contextual: !0, fallback: !0 }), NDe = new yo((t, e) => { let { next: r } = t, n; - F9.indexOf(r) > -1 || r == z9 && ((n = t.peek(1)) == z9 || n == bDe) || r != Cce && r != yDe && r != -1 && !e.context && t.acceptToken(cDe); -}, { contextual: !0 }), EDe = new xo((t, e) => { + T9.indexOf(r) > -1 || r == C9 && ((n = t.peek(1)) == C9 || n == _De) || r != Tce && r != EDe && r != -1 && !e.context && t.acceptToken(yDe); +}, { contextual: !0 }), IDe = new yo((t, e) => { let { next: r } = t; - if ((r == xDe || r == wDe) && (t.advance(), r == t.next)) { + if ((r == ADe || r == RDe) && (t.advance(), r == t.next)) { t.advance(); - let n = !e.context && e.canShift(OG); - t.acceptToken(n ? OG : uDe); + let n = !e.context && e.canShift(TG); + t.acceptToken(n ? TG : bDe); } }, { contextual: !0 }); -function A8(t, e) { +function m8(t, e) { return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t == 95 || t >= 192 || !e && t >= 48 && t <= 57; } -const _De = new xo((t, e) => { - if (t.next != ODe || !e.dialectEnabled(vDe) || (t.advance(), t.next == z9)) +const $De = new yo((t, e) => { + if (t.next != LDe || !e.dialectEnabled(CDe) || (t.advance(), t.next == C9)) return; let r = 0; - for (; F9.indexOf(t.next) > -1; ) + for (; T9.indexOf(t.next) > -1; ) t.advance(), r++; - if (A8(t.next, !0)) { - for (t.advance(), r++; A8(t.next, !1); ) + if (m8(t.next, !0)) { + for (t.advance(), r++; m8(t.next, !1); ) t.advance(), r++; - for (; F9.indexOf(t.next) > -1; ) + for (; T9.indexOf(t.next) > -1; ) t.advance(), r++; - if (t.next == kDe) + if (t.next == MDe) return; for (let n = 0; ; n++) { if (n == 7) { - if (!A8(t.next, !0)) + if (!m8(t.next, !0)) return; break; } @@ -25301,113 +25301,113 @@ const _De = new xo((t, e) => { t.advance(), r++; } } - t.acceptToken(hDe, -r); -}), ADe = Bp({ - "get set async static": ze.modifier, - "for while do if else switch try catch finally return throw break continue default case": ze.controlKeyword, - "in of await yield void typeof delete instanceof": ze.operatorKeyword, - "let var const using function class extends": ze.definitionKeyword, - "import export from": ze.moduleKeyword, - "with debugger as new": ze.keyword, - TemplateString: ze.special(ze.string), - super: ze.atom, - BooleanLiteral: ze.bool, - this: ze.self, - null: ze.null, - Star: ze.modifier, - VariableName: ze.variableName, - "CallExpression/VariableName TaggedTemplateExpression/VariableName": ze.function(ze.variableName), - VariableDefinition: ze.definition(ze.variableName), - Label: ze.labelName, - PropertyName: ze.propertyName, - PrivatePropertyName: ze.special(ze.propertyName), - "CallExpression/MemberExpression/PropertyName": ze.function(ze.propertyName), - "FunctionDeclaration/VariableDefinition": ze.function(ze.definition(ze.variableName)), - "ClassDeclaration/VariableDefinition": ze.definition(ze.className), - PropertyDefinition: ze.definition(ze.propertyName), - PrivatePropertyDefinition: ze.definition(ze.special(ze.propertyName)), - UpdateOp: ze.updateOperator, - "LineComment Hashbang": ze.lineComment, - BlockComment: ze.blockComment, - Number: ze.number, - String: ze.string, - Escape: ze.escape, - ArithOp: ze.arithmeticOperator, - LogicOp: ze.logicOperator, - BitOp: ze.bitwiseOperator, - CompareOp: ze.compareOperator, - RegExp: ze.regexp, - Equals: ze.definitionOperator, - Arrow: ze.function(ze.punctuation), - ": Spread": ze.punctuation, - "( )": ze.paren, - "[ ]": ze.squareBracket, - "{ }": ze.brace, - "InterpolationStart InterpolationEnd": ze.special(ze.brace), - ".": ze.derefOperator, - ", ;": ze.separator, - "@": ze.meta, - TypeName: ze.typeName, - TypeDefinition: ze.definition(ze.typeName), - "type enum interface implements namespace module declare": ze.definitionKeyword, - "abstract global Privacy readonly override": ze.modifier, - "is keyof unique infer": ze.operatorKeyword, - JSXAttributeValue: ze.attributeValue, - JSXText: ze.content, - "JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag": ze.angleBracket, - "JSXIdentifier JSXNameSpacedName": ze.tagName, - "JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName": ze.attributeName, - "JSXBuiltin/JSXIdentifier": ze.standard(ze.tagName) -}), RDe = { __proto__: null, export: 18, as: 23, from: 31, default: 34, async: 39, function: 40, extends: 52, this: 56, true: 64, false: 64, null: 76, void: 80, typeof: 84, super: 102, new: 136, delete: 152, yield: 161, await: 165, class: 170, public: 227, private: 227, protected: 227, readonly: 229, instanceof: 248, satisfies: 251, in: 252, const: 254, import: 286, keyof: 339, unique: 343, infer: 349, is: 385, abstract: 405, implements: 407, type: 409, let: 412, var: 414, using: 417, interface: 423, enum: 427, namespace: 433, module: 435, declare: 439, global: 443, for: 462, of: 471, while: 474, with: 478, do: 482, if: 486, else: 488, switch: 492, case: 498, try: 504, catch: 508, finally: 512, return: 516, throw: 520, break: 524, continue: 528, debugger: 532 }, LDe = { __proto__: null, async: 123, get: 125, set: 127, declare: 187, public: 189, private: 189, protected: 189, static: 191, abstract: 193, override: 195, readonly: 201, accessor: 203, new: 389 }, MDe = { __proto__: null, "<": 143 }, DDe = gp.deserialize({ + t.acceptToken(xDe, -r); +}), BDe = Fp({ + "get set async static": Be.modifier, + "for while do if else switch try catch finally return throw break continue default case": Be.controlKeyword, + "in of await yield void typeof delete instanceof": Be.operatorKeyword, + "let var const using function class extends": Be.definitionKeyword, + "import export from": Be.moduleKeyword, + "with debugger as new": Be.keyword, + TemplateString: Be.special(Be.string), + super: Be.atom, + BooleanLiteral: Be.bool, + this: Be.self, + null: Be.null, + Star: Be.modifier, + VariableName: Be.variableName, + "CallExpression/VariableName TaggedTemplateExpression/VariableName": Be.function(Be.variableName), + VariableDefinition: Be.definition(Be.variableName), + Label: Be.labelName, + PropertyName: Be.propertyName, + PrivatePropertyName: Be.special(Be.propertyName), + "CallExpression/MemberExpression/PropertyName": Be.function(Be.propertyName), + "FunctionDeclaration/VariableDefinition": Be.function(Be.definition(Be.variableName)), + "ClassDeclaration/VariableDefinition": Be.definition(Be.className), + PropertyDefinition: Be.definition(Be.propertyName), + PrivatePropertyDefinition: Be.definition(Be.special(Be.propertyName)), + UpdateOp: Be.updateOperator, + "LineComment Hashbang": Be.lineComment, + BlockComment: Be.blockComment, + Number: Be.number, + String: Be.string, + Escape: Be.escape, + ArithOp: Be.arithmeticOperator, + LogicOp: Be.logicOperator, + BitOp: Be.bitwiseOperator, + CompareOp: Be.compareOperator, + RegExp: Be.regexp, + Equals: Be.definitionOperator, + Arrow: Be.function(Be.punctuation), + ": Spread": Be.punctuation, + "( )": Be.paren, + "[ ]": Be.squareBracket, + "{ }": Be.brace, + "InterpolationStart InterpolationEnd": Be.special(Be.brace), + ".": Be.derefOperator, + ", ;": Be.separator, + "@": Be.meta, + TypeName: Be.typeName, + TypeDefinition: Be.definition(Be.typeName), + "type enum interface implements namespace module declare": Be.definitionKeyword, + "abstract global Privacy readonly override": Be.modifier, + "is keyof unique infer": Be.operatorKeyword, + JSXAttributeValue: Be.attributeValue, + JSXText: Be.content, + "JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag": Be.angleBracket, + "JSXIdentifier JSXNameSpacedName": Be.tagName, + "JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName": Be.attributeName, + "JSXBuiltin/JSXIdentifier": Be.standard(Be.tagName) +}), FDe = { __proto__: null, export: 18, as: 23, from: 31, default: 34, async: 39, function: 40, extends: 52, this: 56, true: 64, false: 64, null: 76, void: 80, typeof: 84, super: 102, new: 136, delete: 152, yield: 161, await: 165, class: 170, public: 227, private: 227, protected: 227, readonly: 229, instanceof: 248, satisfies: 251, in: 252, const: 254, import: 286, keyof: 339, unique: 343, infer: 349, is: 385, abstract: 405, implements: 407, type: 409, let: 412, var: 414, using: 417, interface: 423, enum: 427, namespace: 433, module: 435, declare: 439, global: 443, for: 462, of: 471, while: 474, with: 478, do: 482, if: 486, else: 488, switch: 492, case: 498, try: 504, catch: 508, finally: 512, return: 516, throw: 520, break: 524, continue: 528, debugger: 532 }, zDe = { __proto__: null, async: 123, get: 125, set: 127, declare: 187, public: 189, private: 189, protected: 189, static: 191, abstract: 193, override: 195, readonly: 201, accessor: 203, new: 389 }, qDe = { __proto__: null, "<": 143 }, UDe = pp.deserialize({ version: 14, states: "$RQWO'#CdO>cQWO'#H[O>kQWO'#HbO>kQWO'#HdO`Q^O'#HfO>kQWO'#HhO>kQWO'#HkO>pQWO'#HqO>uQ07iO'#HwO%[Q^O'#HyO?QQ07iO'#H{O?]Q07iO'#H}O9kQ07hO'#IPO?hQ08SO'#ChO@jQ`O'#DiQOQWOOO%[Q^O'#EPOAQQWO'#ESO:RQ7[O'#EjOA]QWO'#EjOAhQpO'#FbOOQU'#Cf'#CfOOQ07`'#Dn'#DnOOQ07`'#Jm'#JmO%[Q^O'#JmOOQO'#Jq'#JqOOQO'#Ib'#IbOBhQ`O'#EcOOQ07`'#Eb'#EbOCdQ07pO'#EcOCnQ`O'#EVOOQO'#Jp'#JpODSQ`O'#JqOEaQ`O'#EVOCnQ`O'#EcPEnO!0LbO'#CaPOOO)CDu)CDuOOOO'#IX'#IXOEyO!bO,59TOOQ07b,59T,59TOOOO'#IY'#IYOFXO#tO,59TO%[Q^O'#D`OOOO'#I['#I[OFgO?MpO,59xOOQ07b,59x,59xOFuQ^O'#I]OGYQWO'#JkOI[QrO'#JkO+}Q^O'#JkOIcQWO,5:OOIyQWO'#ElOJWQWO'#JyOJcQWO'#JxOJcQWO'#JxOJkQWO,5;YOJpQWO'#JwOOQ07f,5:Z,5:ZOJwQ^O,5:ZOLxQ08SO,5:eOMiQWO,5:mONSQ07hO'#JvONZQWO'#JuO9ZQWO'#JuONoQWO'#JuONwQWO,5;XON|QWO'#JuO!#UQrO'#JjOOQ07b'#Ch'#ChO%[Q^O'#ERO!#tQpO,5:rOOQO'#Jr'#JrOOQO-EmOOQU'#J`'#J`OOQU,5>n,5>nOOQU-EpQWO'#HQO9aQWO'#HSO!CgQWO'#HSO:RQ7[O'#HUO!ClQWO'#HUOOQU,5=j,5=jO!CqQWO'#HVO!DSQWO'#CnO!DXQWO,59OO!DcQWO,59OO!FhQ^O,59OOOQU,59O,59OO!FxQ07hO,59OO%[Q^O,59OO!ITQ^O'#H^OOQU'#H_'#H_OOQU'#H`'#H`O`Q^O,5=vO!IkQWO,5=vO`Q^O,5=|O`Q^O,5>OO!IpQWO,5>QO`Q^O,5>SO!IuQWO,5>VO!IzQ^O,5>]OOQU,5>c,5>cO%[Q^O,5>cO9kQ07hO,5>eOOQU,5>g,5>gO!NUQWO,5>gOOQU,5>i,5>iO!NUQWO,5>iOOQU,5>k,5>kO!NZQ`O'#D[O%[Q^O'#JmO!NxQ`O'#JmO# gQ`O'#DjO# xQ`O'#DjO#$ZQ^O'#DjO#$bQWO'#JlO#$jQWO,5:TO#$oQWO'#EpO#$}QWO'#JzO#%VQWO,5;ZO#%[Q`O'#DjO#%iQ`O'#EUOOQ07b,5:n,5:nO%[Q^O,5:nO#%pQWO,5:nO>pQWO,5;UO!@}Q`O,5;UO!AVQ7[O,5;UO:RQ7[O,5;UO#%xQWO,5@XO#%}Q$ISO,5:rOOQO-E<`-E<`O#'TQ07pO,5:}OCnQ`O,5:qO#'_Q`O,5:qOCnQ`O,5:}O!@rQ07hO,5:qOOQ07`'#Ef'#EfOOQO,5:},5:}O%[Q^O,5:}O#'lQ07hO,5:}O#'wQ07hO,5:}O!@}Q`O,5:qOOQO,5;T,5;TO#(VQ07hO,5:}POOO'#IV'#IVP#(kO!0LbO,58{POOO,58{,58{OOOO-EwO+}Q^O,5>wOOQO,5>},5>}O#)VQ^O'#I]OOQO-EpQ08SO1G0{O#>wQ08SO1G0{O#@oQ08SO1G0{O#CoQ(CYO'#ChO#EmQ(CYO1G1^O#EtQ(CYO'#JjO!,lQWO1G1dO#FUQ08SO,5?TOOQ07`-EkQWO1G3lO$2^Q^O1G3nO$6bQ^O'#HmOOQU1G3q1G3qO$6oQWO'#HsO>pQWO'#HuOOQU1G3w1G3wO$6wQ^O1G3wO9kQ07hO1G3}OOQU1G4P1G4POOQ07`'#GY'#GYO9kQ07hO1G4RO9kQ07hO1G4TO$;OQWO,5@XO!*fQ^O,5;[O9ZQWO,5;[O>pQWO,5:UO!*fQ^O,5:UO!@}Q`O,5:UO$;TQ(CYO,5:UOOQO,5;[,5;[O$;_Q`O'#I^O$;uQWO,5@WOOQ07b1G/o1G/oO$;}Q`O'#IdO$pQWO1G0pO!@}Q`O1G0pO!AVQ7[O1G0pOOQ07`1G5s1G5sO!@rQ07hO1G0]OOQO1G0i1G0iO%[Q^O1G0iO$wO$>TQWO1G5qO$>]QWO1G6OO$>eQrO1G6PO9ZQWO,5>}O$>oQ08SO1G5|O%[Q^O1G5|O$?PQ07hO1G5|O$?bQWO1G5{O$?bQWO1G5{O9ZQWO1G5{O$?jQWO,5?QO9ZQWO,5?QOOQO,5?Q,5?QO$@OQWO,5?QO$'TQWO,5?QOOQO-EXOOQU,5>X,5>XO%[Q^O'#HnO%7^QWO'#HpOOQU,5>_,5>_O9ZQWO,5>_OOQU,5>a,5>aOOQU7+)c7+)cOOQU7+)i7+)iOOQU7+)m7+)mOOQU7+)o7+)oO%7cQ`O1G5sO%7wQ(CYO1G0vO%8RQWO1G0vOOQO1G/p1G/pO%8^Q(CYO1G/pO>pQWO1G/pO!*fQ^O'#DjOOQO,5>x,5>xOOQO-E<[-E<[OOQO,5?O,5?OOOQO-EpQWO7+&[O!@}Q`O7+&[OOQO7+%w7+%wO$=gQ08SO7+&TOOQO7+&T7+&TO%[Q^O7+&TO%8hQ07hO7+&TO!@rQ07hO7+%wO!@}Q`O7+%wO%8sQ07hO7+&TO%9RQ08SO7++hO%[Q^O7++hO%9cQWO7++gO%9cQWO7++gOOQO1G4l1G4lO9ZQWO1G4lO%9kQWO1G4lOOQO7+%|7+%|O#%sQWO<tQ08SO1G2ZO%AVQ08SO1G2mO%CbQ08SO1G2oO%EmQ7[O,5>yOOQO-E<]-E<]O%EwQrO,5>zO%[Q^O,5>zOOQO-E<^-E<^O%FRQWO1G5uOOQ07b<YOOQU,5>[,5>[O&5cQWO1G3yO9ZQWO7+&bO!*fQ^O7+&bOOQO7+%[7+%[O&5hQ(CYO1G6PO>pQWO7+%[OOQ07b<pQWO<pQWO7+)eO'&gQWO<}AN>}O%[Q^OAN?ZOOQO<eQ(CYOG26}O!*fQ^O'#DyO1PQWO'#EWO'@ZQrO'#JiO!*fQ^O'#DqO'@bQ^O'#D}O'@iQrO'#ChO'CPQrO'#ChO!*fQ^O'#EPO'CaQ^O,5;VO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O'#IiO'EdQWO,5a#@O#@^#@d#Ax#BW#Cr#DQ#DW#D^#Dd#Dn#Dt#Dz#EU#Eh#EnPPPPPPPPPP#EtPPPPPPP#Fi#Ip#KP#KW#K`PPPP$!d$%Z$+r$+u$+x$,q$,t$,w$-O$-WPP$-^$-b$.Y$/X$/]$/qPP$/u$/{$0PP$0S$0W$0Z$1P$1h$2P$2T$2W$2Z$2a$2d$2h$2lR!{RoqOXst!Z#c%j&m&o&p&r,h,m1w1zY!uQ'Z-Y1[5]Q%pvQ%xyQ&P|Q&e!VS'R!e-QQ'a!iS'g!r!xS*c$|*hQ+f%yQ+s&RQ,X&_Q-W'YQ-b'bQ-j'hQ/|*jQ1f,YR;Y:g%OdOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%j%p%}&f&i&m&o&p&r&v'O']'m'}(P(V(^(r(v(z)y+O+S,e,h,m-^-f-t-z.l.s0[0a0q1_1o1p1r1t1w1z1|2m2s3Z5Y5d5t5u5x6]7w7|8]8gS#p]:d!r)[$[$m'S)n,y,|.{2]3p5W6S9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]Q*u%ZQ+k%{Q,Z&bQ,b&jQ.c;QQ0h+^Q0l+`Q0w+lQ1n,`Q2{.[Q4v0rQ5k1gQ6i3PQ6u;RQ7h4wR8m6j&|kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%j%p%}&f&i&j&m&o&p&r&v'O'S']'m'}(P(V(^(r(v(z)n)y+O+S+^,e,h,m,y,|-^-f-t-z.[.l.s.{0[0a0q1_1o1p1r1t1w1z1|2]2m2s3P3Z3p5W5Y5d5t5u5x6S6]6j7w7|8]8g9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]t!nQ!r!u!x!y'R'Y'Z'g'h'i-Q-W-Y-j1[5]5_$v$si#u#w$c$d$x${%O%Q%[%]%a)u){)}*P*R*Y*`*p*q+]+`+w+z.Z.i/Z/j/k/m0Q0S0^1R1U1^3O3x4S4[4f4n4p5c6g7T7^7y8j8w9[9n:O:W:y:z:|:};O;P;S;T;U;V;W;X;_;`;a;b;c;d;g;h;i;j;k;l;m;n;q;r < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem", maxTerm: 371, - context: SDe, + context: DDe, nodeProps: [ ["group", -26, 8, 16, 18, 65, 201, 205, 209, 210, 212, 215, 218, 228, 230, 236, 238, 240, 242, 245, 251, 257, 259, 261, 263, 265, 267, 268, "Statement", -32, 12, 13, 28, 31, 32, 38, 48, 51, 52, 54, 59, 67, 75, 79, 81, 83, 84, 106, 107, 116, 117, 134, 137, 139, 140, 141, 142, 144, 145, 164, 165, 167, "Expression", -23, 27, 29, 33, 37, 39, 41, 168, 170, 172, 173, 175, 176, 177, 179, 180, 181, 183, 184, 185, 195, 197, 199, 200, "Type", -3, 87, 99, 105, "ClassItem"], ["openedBy", 22, "<", 34, "InterpolationStart", 53, "[", 57, "{", 72, "(", 157, "JSXStartCloseTag"], ["closedBy", 23, ">", 36, "InterpolationEnd", 47, "]", 58, "}", 73, ")", 162, "JSXEndTag"] ], - propSources: [ADe], + propSources: [BDe], skippedNodes: [0, 4, 5, 271], repeatNodeCount: 37, tokenData: "$Fj(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#8g!R![#:v![!]#Gv!]!^#IS!^!_#J^!_!`#Ns!`!a$#_!a!b$(l!b!c$,k!c!}Er!}#O$-u#O#P$/P#P#Q$4h#Q#R$5r#R#SEr#S#T$7P#T#o$8Z#o#p$q#r#s$?}#s$f%Z$f$g+g$g#BYEr#BY#BZ$AX#BZ$ISEr$IS$I_$AX$I_$I|Er$I|$I}$Dd$I}$JO$Dd$JO$JTEr$JT$JU$AX$JU$KVEr$KV$KW$AX$KW&FUEr&FU&FV$AX&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$AX?HUOEr(n%d_$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$f&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$f&j(R!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(R!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$f&j(OpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(OpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Op(R!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$f&j(Op(R!b't(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST(P#S$f&j'u(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$f&j(Op(R!b'u(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$f&j!o$Ip(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#t$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#t$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/|3l_'}$(n$f&j(R!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$f&j(R!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$f&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$a`$f&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$a``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$a`$f&j(R!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(R!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$a`(R!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k#%|:hh$f&j(Op(R!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXVS$f&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSVSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWVS(R!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]VS$f&j(OpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWVS(OpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYVS(Op(R!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%lQ^$f&j!USOY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@Y!_!}!=y!}#O!Bw#O#P!Dj#P#o!=y#o#p!@Y#p;'S!=y;'S;=`!E[<%lO!=y&n!?Ta$f&j!USO!^&c!_#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&cS!@_X!USOY!@YZ!P!@Y!P!Q!@z!Q!}!@Y!}#O!Ac#O#P!Bb#P;'S!@Y;'S;=`!Bq<%lO!@YS!APU!US#Z#[!@z#]#^!@z#a#b!@z#g#h!@z#i#j!@z#m#n!@zS!AfVOY!AcZ#O!Ac#O#P!A{#P#Q!@Y#Q;'S!Ac;'S;=`!B[<%lO!AcS!BOSOY!AcZ;'S!Ac;'S;=`!B[<%lO!AcS!B_P;=`<%l!AcS!BeSOY!@YZ;'S!@Y;'S;=`!Bq<%lO!@YS!BtP;=`<%l!@Y&n!B|[$f&jOY!BwYZ&cZ!^!Bw!^!_!Ac!_#O!Bw#O#P!Cr#P#Q!=y#Q#o!Bw#o#p!Ac#p;'S!Bw;'S;=`!Dd<%lO!Bw&n!CwX$f&jOY!BwYZ&cZ!^!Bw!^!_!Ac!_#o!Bw#o#p!Ac#p;'S!Bw;'S;=`!Dd<%lO!Bw&n!DgP;=`<%l!Bw&n!DoX$f&jOY!=yYZ&cZ!^!=y!^!_!@Y!_#o!=y#o#p!@Y#p;'S!=y;'S;=`!E[<%lO!=y&n!E_P;=`<%l!=y(Q!Eki$f&j(R!b!USOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#Z&}#Z#[!Eb#[#]&}#]#^!Eb#^#a&}#a#b!Eb#b#g&}#g#h!Eb#h#i&}#i#j!Eb#j#m&}#m#n!Eb#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!f!GaZ(R!b!USOY!GYZw!GYwx!@Yx!P!GY!P!Q!HS!Q!}!GY!}#O!Ic#O#P!Bb#P;'S!GY;'S;=`!JZ<%lO!GY!f!HZb(R!b!USOY'}Zw'}x#O'}#P#Z'}#Z#[!HS#[#]'}#]#^!HS#^#a'}#a#b!HS#b#g'}#g#h!HS#h#i'}#i#j!HS#j#m'}#m#n!HS#n;'S'};'S;=`(f<%lO'}!f!IhX(R!bOY!IcZw!Icwx!Acx#O!Ic#O#P!A{#P#Q!GY#Q;'S!Ic;'S;=`!JT<%lO!Ic!f!JWP;=`<%l!Ic!f!J^P;=`<%l!GY(Q!Jh^$f&j(R!bOY!JaYZ&cZw!Jawx!Bwx!^!Ja!^!_!Ic!_#O!Ja#O#P!Cr#P#Q!Q#V#X%Z#X#Y!4|#Y#b%Z#b#c#Zd$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#?tf$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#b%Z#b#c# RDe[t] || -1 }, { term: 334, get: (t) => LDe[t] || -1 }, { term: 70, get: (t) => MDe[t] || -1 }], + specialized: [{ term: 319, get: (t) => FDe[t] || -1 }, { term: 334, get: (t) => zDe[t] || -1 }, { term: 70, get: (t) => qDe[t] || -1 }], tokenPrec: 14626 -}), Ece = [ - /* @__PURE__ */ _o("function ${name}(${params}) {\n ${}\n}", { +}), Cce = [ + /* @__PURE__ */ To("function ${name}(${params}) {\n ${}\n}", { label: "function", detail: "definition", type: "keyword" }), - /* @__PURE__ */ _o("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}", { + /* @__PURE__ */ To("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}", { label: "for", detail: "loop", type: "keyword" }), - /* @__PURE__ */ _o("for (let ${name} of ${collection}) {\n ${}\n}", { + /* @__PURE__ */ To("for (let ${name} of ${collection}) {\n ${}\n}", { label: "for", detail: "of loop", type: "keyword" }), - /* @__PURE__ */ _o("do {\n ${}\n} while (${})", { + /* @__PURE__ */ To("do {\n ${}\n} while (${})", { label: "do", detail: "loop", type: "keyword" }), - /* @__PURE__ */ _o("while (${}) {\n ${}\n}", { + /* @__PURE__ */ To("while (${}) {\n ${}\n}", { label: "while", detail: "loop", type: "keyword" }), - /* @__PURE__ */ _o(`try { + /* @__PURE__ */ To(`try { \${} } catch (\${error}) { \${} @@ -25416,12 +25416,12 @@ const _De = new xo((t, e) => { detail: "/ catch block", type: "keyword" }), - /* @__PURE__ */ _o("if (${}) {\n ${}\n}", { + /* @__PURE__ */ To("if (${}) {\n ${}\n}", { label: "if", detail: "block", type: "keyword" }), - /* @__PURE__ */ _o(`if (\${}) { + /* @__PURE__ */ To(`if (\${}) { \${} } else { \${} @@ -25430,7 +25430,7 @@ const _De = new xo((t, e) => { detail: "/ else block", type: "keyword" }), - /* @__PURE__ */ _o(`class \${name} { + /* @__PURE__ */ To(`class \${name} { constructor(\${params}) { \${} } @@ -25439,33 +25439,33 @@ const _De = new xo((t, e) => { detail: "definition", type: "keyword" }), - /* @__PURE__ */ _o('import {${names}} from "${module}"\n${}', { + /* @__PURE__ */ To('import {${names}} from "${module}"\n${}', { label: "import", detail: "named", type: "keyword" }), - /* @__PURE__ */ _o('import ${name} from "${module}"\n${}', { + /* @__PURE__ */ To('import ${name} from "${module}"\n${}', { label: "import", detail: "default", type: "keyword" }) -], PDe = /* @__PURE__ */ Ece.concat([ - /* @__PURE__ */ _o("interface ${name} {\n ${}\n}", { +], QDe = /* @__PURE__ */ Cce.concat([ + /* @__PURE__ */ To("interface ${name} {\n ${}\n}", { label: "interface", detail: "definition", type: "keyword" }), - /* @__PURE__ */ _o("type ${name} = ${type}", { + /* @__PURE__ */ To("type ${name} = ${type}", { label: "type", detail: "definition", type: "keyword" }), - /* @__PURE__ */ _o("enum ${name} {\n ${}\n}", { + /* @__PURE__ */ To("enum ${name} {\n ${}\n}", { label: "enum", detail: "definition", type: "keyword" }) -]), kG = /* @__PURE__ */ new wae(), _ce = /* @__PURE__ */ new Set([ +]), CG = /* @__PURE__ */ new xae(), Ece = /* @__PURE__ */ new Set([ "Script", "Block", "FunctionExpression", @@ -25474,29 +25474,29 @@ const _De = new xo((t, e) => { "MethodDeclaration", "ForStatement" ]); -function U2(t) { +function P2(t) { return (e, r) => { let n = e.node.getChild("VariableDefinition"); return n && r(n, t), !0; }; } -const NDe = ["FunctionDeclaration"], IDe = { - FunctionDeclaration: /* @__PURE__ */ U2("function"), - ClassDeclaration: /* @__PURE__ */ U2("class"), +const VDe = ["FunctionDeclaration"], WDe = { + FunctionDeclaration: /* @__PURE__ */ P2("function"), + ClassDeclaration: /* @__PURE__ */ P2("class"), ClassExpression: () => !0, - EnumDeclaration: /* @__PURE__ */ U2("constant"), - TypeAliasDeclaration: /* @__PURE__ */ U2("type"), - NamespaceDeclaration: /* @__PURE__ */ U2("namespace"), + EnumDeclaration: /* @__PURE__ */ P2("constant"), + TypeAliasDeclaration: /* @__PURE__ */ P2("type"), + NamespaceDeclaration: /* @__PURE__ */ P2("namespace"), VariableDefinition(t, e) { - t.matchContext(NDe) || e(t, "variable"); + t.matchContext(VDe) || e(t, "variable"); }, TypeDefinition(t, e) { e(t, "type"); }, __proto__: null }; -function Ace(t, e) { - let r = kG.get(e); +function _ce(t, e) { + let r = CG.get(e); if (r) return r; let n = [], i = !0; @@ -25504,21 +25504,21 @@ function Ace(t, e) { let l = t.sliceString(a.from, a.to); n.push({ label: l, type: o }); } - return e.cursor(Hn.IncludeAnonymous).iterate((a) => { + return e.cursor(Yn.IncludeAnonymous).iterate((a) => { if (i) i = !1; else if (a.name) { - let o = IDe[a.name]; - if (o && o(a, s) || _ce.has(a.name)) + let o = WDe[a.name]; + if (o && o(a, s) || Ece.has(a.name)) return !1; } else if (a.to - a.from > 8192) { - for (let o of Ace(t, a.node)) + for (let o of _ce(t, a.node)) n.push(o); return !1; } - }), kG.set(e, n), n; + }), CG.set(e, n), n; } -const SG = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, Rce = [ +const EG = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, Ace = [ "TemplateString", "String", "RegExp", @@ -25534,38 +25534,38 @@ const SG = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, Rce = [ ".", "?." ]; -function $De(t) { - let e = Qn(t.state).resolveInner(t.pos, -1); - if (Rce.indexOf(e.name) > -1) +function YDe(t) { + let e = Un(t.state).resolveInner(t.pos, -1); + if (Ace.indexOf(e.name) > -1) return null; - let r = e.name == "VariableName" || e.to - e.from < 20 && SG.test(t.state.sliceDoc(e.from, e.to)); + let r = e.name == "VariableName" || e.to - e.from < 20 && EG.test(t.state.sliceDoc(e.from, e.to)); if (!r && !t.explicit) return null; let n = []; for (let i = e; i; i = i.parent) - _ce.has(i.name) && (n = n.concat(Ace(t.state.doc, i))); + Ece.has(i.name) && (n = n.concat(_ce(t.state.doc, i))); return { options: n, from: r ? e.from : t.pos, - validFor: SG + validFor: EG }; } -const ah = /* @__PURE__ */ lp.define({ +const th = /* @__PURE__ */ op.define({ name: "javascript", - parser: /* @__PURE__ */ DDe.configure({ + parser: /* @__PURE__ */ UDe.configure({ props: [ - /* @__PURE__ */ My.add({ - IfStatement: /* @__PURE__ */ J5({ except: /^\s*({|else\b)/ }), - TryStatement: /* @__PURE__ */ J5({ except: /^\s*({|catch\b|finally\b)/ }), - LabeledStatement: I_e, + /* @__PURE__ */ Ay.add({ + IfStatement: /* @__PURE__ */ F5({ except: /^\s*({|else\b)/ }), + TryStatement: /* @__PURE__ */ F5({ except: /^\s*({|catch\b|finally\b)/ }), + LabeledStatement: W_e, SwitchBody: (t) => { let e = t.textAfter, r = /^\s*\}/.test(e), n = /^\s*(case|default)\b/.test(e); return t.baseIndent + (r ? 0 : n ? 1 : 2) * t.unit; }, - Block: /* @__PURE__ */ l9({ closing: "}" }), + Block: /* @__PURE__ */ HM({ closing: "}" }), ArrowFunction: (t) => t.baseIndent + t.unit, "TemplateString BlockComment": () => null, - "Statement Property": /* @__PURE__ */ J5({ except: /^{/ }), + "Statement Property": /* @__PURE__ */ F5({ except: /^{/ }), JSXElement(t) { let e = /^\s*<\//.test(t.textAfter); return t.lineIndent(t.node.from) + (e ? 0 : t.unit); @@ -25579,7 +25579,7 @@ const ah = /* @__PURE__ */ lp.define({ } }), /* @__PURE__ */ tm.add({ - "Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": W$, + "Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": B$, BlockComment(t) { return { from: t.from + 2, to: t.to - 2 }; } @@ -25592,31 +25592,31 @@ const ah = /* @__PURE__ */ lp.define({ indentOnInput: /^\s*(?:case |default:|\{|\}|<\/)$/, wordChars: "$" } -}), Lce = { +}), Rce = { test: (t) => /^JSX/.test(t.name), - facet: /* @__PURE__ */ z$({ commentTokens: { block: { open: "{/*", close: "*/}" } } }) -}, Mce = /* @__PURE__ */ ah.configure({ dialect: "ts" }, "typescript"), Dce = /* @__PURE__ */ ah.configure({ + facet: /* @__PURE__ */ D$({ commentTokens: { block: { open: "{/*", close: "*/}" } } }) +}, Lce = /* @__PURE__ */ th.configure({ dialect: "ts" }, "typescript"), Mce = /* @__PURE__ */ th.configure({ dialect: "jsx", - props: [/* @__PURE__ */ q$.add((t) => t.isTop ? [Lce] : void 0)] -}), Pce = /* @__PURE__ */ ah.configure({ + props: [/* @__PURE__ */ P$.add((t) => t.isTop ? [Rce] : void 0)] +}), Dce = /* @__PURE__ */ th.configure({ dialect: "jsx ts", - props: [/* @__PURE__ */ q$.add((t) => t.isTop ? [Lce] : void 0)] + props: [/* @__PURE__ */ P$.add((t) => t.isTop ? [Rce] : void 0)] }, "typescript"); -let Nce = (t) => ({ label: t, type: "keyword" }); -const Ice = /* @__PURE__ */ "break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Nce), BDe = /* @__PURE__ */ Ice.concat(/* @__PURE__ */ ["declare", "implements", "private", "protected", "public"].map(Nce)); -function FDe(t = {}) { - let e = t.jsx ? t.typescript ? Pce : Dce : t.typescript ? Mce : ah, r = t.typescript ? PDe.concat(BDe) : Ece.concat(Ice); - return new mv(e, [ - ah.data.of({ - autocomplete: HAe(Rce, Eoe(r)) +let Pce = (t) => ({ label: t, type: "keyword" }); +const Nce = /* @__PURE__ */ "break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Pce), GDe = /* @__PURE__ */ Nce.concat(/* @__PURE__ */ ["declare", "implements", "private", "protected", "public"].map(Pce)); +function HDe(t = {}) { + let e = t.jsx ? t.typescript ? Dce : Mce : t.typescript ? Lce : th, r = t.typescript ? QDe.concat(GDe) : Cce.concat(Nce); + return new fv(e, [ + th.data.of({ + autocomplete: n7e(Ace, Coe(r)) }), - ah.data.of({ - autocomplete: $De + th.data.of({ + autocomplete: YDe }), - t.jsx ? UDe : [] + t.jsx ? jDe : [] ]); } -function zDe(t) { +function XDe(t) { for (; ; ) { if (t.name == "JSXOpenTag" || t.name == "JSXSelfClosingTag" || t.name == "JSXFragmentTag") return t; @@ -25625,30 +25625,30 @@ function zDe(t) { t = t.parent; } } -function TG(t, e, r = t.length) { +function _G(t, e, r = t.length) { for (let n = e == null ? void 0 : e.firstChild; n; n = n.nextSibling) if (n.name == "JSXIdentifier" || n.name == "JSXBuiltin" || n.name == "JSXNamespacedName" || n.name == "JSXMemberExpression") return t.sliceString(n.from, Math.min(n.to, r)); return ""; } -const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), UDe = /* @__PURE__ */ Mt.inputHandler.of((t, e, r, n, i) => { - if ((qDe ? t.composing : t.compositionStarted) || t.state.readOnly || e != r || n != ">" && n != "/" || !ah.isActiveAt(t.state, e, -1)) +const ZDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), jDe = /* @__PURE__ */ Rt.inputHandler.of((t, e, r, n, i) => { + if ((ZDe ? t.composing : t.compositionStarted) || t.state.readOnly || e != r || n != ">" && n != "/" || !th.isActiveAt(t.state, e, -1)) return !1; let s = i(), { state: a } = s, o = a.changeByRange((l) => { var u; - let { head: h } = l, f = Qn(a).resolveInner(h - 1, -1), d; + let { head: h } = l, f = Un(a).resolveInner(h - 1, -1), d; if (f.name == "JSXStartTag" && (f = f.parent), !(a.doc.sliceString(h - 1, h) != n || f.name == "JSXAttributeValue" && f.to > h)) { if (n == ">" && f.name == "JSXFragmentTag") return { range: l, changes: { from: h, insert: "" } }; if (n == "/" && f.name == "JSXStartCloseTag") { let p = f.parent, g = p.parent; - if (g && p.from == h - 2 && ((d = TG(a.doc, g.firstChild, h)) || ((u = g.firstChild) === null || u === void 0 ? void 0 : u.name) == "JSXFragmentTag")) { + if (g && p.from == h - 2 && ((d = _G(a.doc, g.firstChild, h)) || ((u = g.firstChild) === null || u === void 0 ? void 0 : u.name) == "JSXFragmentTag")) { let m = `${d}>`; - return { range: ft.cursor(h + m.length, -1), changes: { from: h, insert: m } }; + return { range: ut.cursor(h + m.length, -1), changes: { from: h, insert: m } }; } } else if (n == ">") { - let p = zDe(f); - if (p && !/^\/?>|^<\//.test(a.doc.sliceString(h, h + 2)) && (d = TG(a.doc, p, h))) + let p = XDe(f); + if (p && !/^\/?>|^<\//.test(a.doc.sliceString(h, h + 2)) && (d = _G(a.doc, p, h))) return { range: l, changes: { from: h, insert: `` } }; } } @@ -25658,19 +25658,19 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav s, a.update(o, { userEvent: "input.complete", scrollIntoView: !0 }) ]), !0); -}), Q2 = ["_blank", "_self", "_top", "_parent"], R8 = ["ascii", "utf-8", "utf-16", "latin1", "latin1"], L8 = ["get", "post", "put", "delete"], M8 = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"], ll = ["true", "false"], mr = {}, QDe = { +}), N2 = ["_blank", "_self", "_top", "_parent"], v8 = ["ascii", "utf-8", "utf-16", "latin1", "latin1"], y8 = ["get", "post", "put", "delete"], b8 = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"], il = ["true", "false"], dr = {}, KDe = { a: { attrs: { href: null, ping: null, type: null, media: null, - target: Q2, + target: N2, hreflang: null } }, - abbr: mr, - address: mr, + abbr: dr, + address: dr, area: { attrs: { alt: null, @@ -25684,8 +25684,8 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav shape: ["default", "rect", "circle", "poly"] } }, - article: mr, - aside: mr, + article: dr, + aside: dr, audio: { attrs: { src: null, @@ -25697,13 +25697,13 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav controls: ["controls"] } }, - b: mr, - base: { attrs: { href: null, target: Q2 } }, - bdi: mr, - bdo: mr, + b: dr, + base: { attrs: { href: null, target: N2 } }, + bdi: dr, + bdo: dr, blockquote: { attrs: { cite: null } }, - body: mr, - br: mr, + body: dr, + br: dr, button: { attrs: { form: null, @@ -25712,18 +25712,18 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav value: null, autofocus: ["autofocus"], disabled: ["autofocus"], - formenctype: M8, - formmethod: L8, + formenctype: b8, + formmethod: y8, formnovalidate: ["novalidate"], - formtarget: Q2, + formtarget: N2, type: ["submit", "reset", "button"] } }, canvas: { attrs: { width: null, height: null } }, - caption: mr, - center: mr, - cite: mr, - code: mr, + caption: dr, + center: dr, + cite: dr, + code: dr, col: { attrs: { span: null } }, colgroup: { attrs: { span: null } }, command: { @@ -25741,48 +25741,48 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav data: { attrs: { value: null } }, datagrid: { attrs: { disabled: ["disabled"], multiple: ["multiple"] } }, datalist: { attrs: { data: null } }, - dd: mr, + dd: dr, del: { attrs: { cite: null, datetime: null } }, details: { attrs: { open: ["open"] } }, - dfn: mr, - div: mr, - dl: mr, - dt: mr, - em: mr, + dfn: dr, + div: dr, + dl: dr, + dt: dr, + em: dr, embed: { attrs: { src: null, type: null, width: null, height: null } }, eventsource: { attrs: { src: null } }, fieldset: { attrs: { disabled: ["disabled"], form: null, name: null } }, - figcaption: mr, - figure: mr, - footer: mr, + figcaption: dr, + figure: dr, + footer: dr, form: { attrs: { action: null, name: null, - "accept-charset": R8, + "accept-charset": v8, autocomplete: ["on", "off"], - enctype: M8, - method: L8, + enctype: b8, + method: y8, novalidate: ["novalidate"], - target: Q2 + target: N2 } }, - h1: mr, - h2: mr, - h3: mr, - h4: mr, - h5: mr, - h6: mr, + h1: dr, + h2: dr, + h3: dr, + h4: dr, + h5: dr, + h6: dr, head: { children: ["title", "base", "link", "style", "meta", "script", "noscript", "command"] }, - header: mr, - hgroup: mr, - hr: mr, + header: dr, + hgroup: dr, + hr: dr, html: { attrs: { manifest: null } }, - i: mr, + i: dr, iframe: { attrs: { src: null, @@ -25829,10 +25829,10 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav autofocus: ["autofocus"], checked: ["checked"], disabled: ["disabled"], - formenctype: M8, - formmethod: L8, + formenctype: b8, + formmethod: y8, formnovalidate: ["novalidate"], - formtarget: Q2, + formtarget: N2, multiple: ["multiple"], readonly: ["readonly"], required: ["required"], @@ -25864,7 +25864,7 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav } }, ins: { attrs: { cite: null, datetime: null } }, - kbd: mr, + kbd: dr, keygen: { attrs: { challenge: null, @@ -25876,7 +25876,7 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav } }, label: { attrs: { for: null, form: null } }, - legend: mr, + legend: dr, li: { attrs: { value: null } }, link: { attrs: { @@ -25888,19 +25888,19 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav } }, map: { attrs: { name: null } }, - mark: mr, + mark: dr, menu: { attrs: { label: null, type: ["list", "context", "toolbar"] } }, meta: { attrs: { content: null, - charset: R8, + charset: v8, name: ["viewport", "application-name", "author", "description", "generator", "keywords"], "http-equiv": ["content-language", "content-type", "default-style", "refresh"] } }, meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } }, - nav: mr, - noscript: mr, + nav: dr, + noscript: dr, object: { attrs: { data: null, @@ -25920,25 +25920,25 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav optgroup: { attrs: { disabled: ["disabled"], label: null } }, option: { attrs: { disabled: ["disabled"], label: null, selected: ["selected"], value: null } }, output: { attrs: { for: null, form: null, name: null } }, - p: mr, + p: dr, param: { attrs: { name: null, value: null } }, - pre: mr, + pre: dr, progress: { attrs: { value: null, max: null } }, q: { attrs: { cite: null } }, - rp: mr, - rt: mr, - ruby: mr, - samp: mr, + rp: dr, + rt: dr, + ruby: dr, + samp: dr, script: { attrs: { type: ["text/javascript"], src: null, async: ["async"], defer: ["defer"], - charset: R8 + charset: v8 } }, - section: mr, + section: dr, select: { attrs: { form: null, @@ -25950,10 +25950,10 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav } }, slot: { attrs: { name: null } }, - small: mr, + small: dr, source: { attrs: { src: null, type: null, media: null } }, - span: mr, - strong: mr, + span: dr, + strong: dr, style: { attrs: { type: ["text/css"], @@ -25961,13 +25961,13 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav scoped: null } }, - sub: mr, - summary: mr, - sup: mr, - table: mr, - tbody: mr, + sub: dr, + summary: dr, + sup: dr, + table: dr, + tbody: dr, td: { attrs: { colspan: null, rowspan: null, headers: null } }, - template: mr, + template: dr, textarea: { attrs: { dirname: null, @@ -25984,12 +25984,12 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav wrap: ["soft", "hard"] } }, - tfoot: mr, + tfoot: dr, th: { attrs: { colspan: null, rowspan: null, headers: null, scope: ["row", "col", "rowgroup", "colgroup"] } }, - thead: mr, + thead: dr, time: { attrs: { datetime: null } }, - title: mr, - tr: mr, + title: dr, + tr: dr, track: { attrs: { src: null, @@ -26000,7 +26000,7 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav } }, ul: { children: ["li", "script", "template", "ul", "ol"] }, - var: mr, + var: dr, video: { attrs: { src: null, @@ -26015,11 +26015,11 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav controls: ["controls"] } }, - wbr: mr -}, $ce = { + wbr: dr +}, Ice = { accesskey: null, class: null, - contenteditable: ll, + contenteditable: il, contextmenu: null, dir: ["ltr", "rtl", "auto"], draggable: ["true", "false", "auto"], @@ -26033,9 +26033,9 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav itemscope: ["itemscope"], itemtype: null, lang: ["ar", "bn", "de", "en-GB", "en-US", "es", "fr", "hi", "id", "ja", "pa", "pt", "ru", "tr", "zh"], - spellcheck: ll, - autocorrect: ll, - autocapitalize: ll, + spellcheck: il, + autocorrect: il, + autocapitalize: il, style: null, tabindex: null, title: null, @@ -26043,32 +26043,32 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav rel: ["stylesheet", "alternate", "author", "bookmark", "help", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "tag"], role: /* @__PURE__ */ "alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "), "aria-activedescendant": null, - "aria-atomic": ll, + "aria-atomic": il, "aria-autocomplete": ["inline", "list", "both", "none"], - "aria-busy": ll, + "aria-busy": il, "aria-checked": ["true", "false", "mixed", "undefined"], "aria-controls": null, "aria-describedby": null, - "aria-disabled": ll, + "aria-disabled": il, "aria-dropeffect": null, "aria-expanded": ["true", "false", "undefined"], "aria-flowto": null, "aria-grabbed": ["true", "false", "undefined"], - "aria-haspopup": ll, - "aria-hidden": ll, + "aria-haspopup": il, + "aria-hidden": il, "aria-invalid": ["true", "false", "grammar", "spelling"], "aria-label": null, "aria-labelledby": null, "aria-level": null, "aria-live": ["off", "polite", "assertive"], - "aria-multiline": ll, - "aria-multiselectable": ll, + "aria-multiline": il, + "aria-multiselectable": il, "aria-owns": null, "aria-posinset": null, "aria-pressed": ["true", "false", "mixed", "undefined"], - "aria-readonly": ll, + "aria-readonly": il, "aria-relevant": null, - "aria-required": ll, + "aria-required": il, "aria-selected": ["true", "false", "undefined"], "aria-setsize": null, "aria-sort": ["ascending", "descending", "none", "other"], @@ -26076,22 +26076,22 @@ const qDe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav "aria-valuemin": null, "aria-valuenow": null, "aria-valuetext": null -}, Bce = /* @__PURE__ */ "beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((t) => "on" + t); -for (let t of Bce) - $ce[t] = null; -class dw { +}, $ce = /* @__PURE__ */ "beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((t) => "on" + t); +for (let t of $ce) + Ice[t] = null; +class iw { constructor(e, r) { - this.tags = Object.assign(Object.assign({}, QDe), e), this.globalAttrs = Object.assign(Object.assign({}, $ce), r), this.allTags = Object.keys(this.tags), this.globalAttrNames = Object.keys(this.globalAttrs); + this.tags = Object.assign(Object.assign({}, KDe), e), this.globalAttrs = Object.assign(Object.assign({}, Ice), r), this.allTags = Object.keys(this.tags), this.globalAttrNames = Object.keys(this.globalAttrs); } } -dw.default = /* @__PURE__ */ new dw(); -function Tv(t, e, r = t.length) { +iw.default = /* @__PURE__ */ new iw(); +function wv(t, e, r = t.length) { if (!e) return ""; let n = e.firstChild, i = n && n.getChild("TagName"); return i ? t.sliceString(i.from, Math.min(i.to, r)) : ""; } -function Cv(t, e = !1) { +function Ov(t, e = !1) { for (; t; t = t.parent) if (t.name == "Element") if (e) @@ -26100,27 +26100,27 @@ function Cv(t, e = !1) { return t; return null; } -function Fce(t, e, r) { - let n = r.tags[Tv(t, Cv(e))]; +function Bce(t, e, r) { + let n = r.tags[wv(t, Ov(e))]; return (n == null ? void 0 : n.children) || r.allTags; } -function WB(t, e) { +function BB(t, e) { let r = []; - for (let n = Cv(e); n && !n.type.isTop; n = Cv(n.parent)) { - let i = Tv(t, n); + for (let n = Ov(e); n && !n.type.isTop; n = Ov(n.parent)) { + let i = wv(t, n); if (i && n.lastChild.name == "CloseTag") break; i && r.indexOf(i) < 0 && (e.name == "EndTag" || e.from >= n.firstChild.to) && r.push(i); } return r; } -const zce = /^[:\-\.\w\u00b7-\uffff]*$/; -function CG(t, e, r, n, i) { - let s = /\s*>/.test(t.sliceDoc(i, i + 5)) ? "" : ">", a = Cv(r, !0); +const Fce = /^[:\-\.\w\u00b7-\uffff]*$/; +function AG(t, e, r, n, i) { + let s = /\s*>/.test(t.sliceDoc(i, i + 5)) ? "" : ">", a = Ov(r, !0); return { from: n, to: i, - options: Fce(t.doc, a, e).map((o) => ({ label: o, type: "type" })).concat(WB(t.doc, r).map((o, l) => ({ + options: Bce(t.doc, a, e).map((o) => ({ label: o, type: "type" })).concat(BB(t.doc, r).map((o, l) => ({ label: "/" + o, apply: "/" + o + s, type: "type", @@ -26129,39 +26129,39 @@ function CG(t, e, r, n, i) { validFor: /^\/?[:\-\.\w\u00b7-\uffff]*$/ }; } -function EG(t, e, r, n) { +function RG(t, e, r, n) { let i = /\s*>/.test(t.sliceDoc(n, n + 5)) ? "" : ">"; return { from: r, to: n, - options: WB(t.doc, e).map((s, a) => ({ label: s, apply: s + i, type: "type", boost: 99 - a })), - validFor: zce + options: BB(t.doc, e).map((s, a) => ({ label: s, apply: s + i, type: "type", boost: 99 - a })), + validFor: Fce }; } -function VDe(t, e, r, n) { +function JDe(t, e, r, n) { let i = [], s = 0; - for (let a of Fce(t.doc, r, e)) + for (let a of Bce(t.doc, r, e)) i.push({ label: "<" + a, type: "type" }); - for (let a of WB(t.doc, r)) + for (let a of BB(t.doc, r)) i.push({ label: "", type: "type", boost: 99 - s++ }); return { from: n, to: n, options: i, validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/ }; } -function WDe(t, e, r, n, i) { - let s = Cv(r), a = s ? e.tags[Tv(t.doc, s)] : null, o = a && a.attrs ? Object.keys(a.attrs) : [], l = a && a.globalAttrs === !1 ? o : o.length ? o.concat(e.globalAttrNames) : e.globalAttrNames; +function ePe(t, e, r, n, i) { + let s = Ov(r), a = s ? e.tags[wv(t.doc, s)] : null, o = a && a.attrs ? Object.keys(a.attrs) : [], l = a && a.globalAttrs === !1 ? o : o.length ? o.concat(e.globalAttrNames) : e.globalAttrNames; return { from: n, to: i, options: l.map((u) => ({ label: u, type: "property" })), - validFor: zce + validFor: Fce }; } -function YDe(t, e, r, n, i) { +function tPe(t, e, r, n, i) { var s; let a = (s = r.parent) === null || s === void 0 ? void 0 : s.getChild("AttributeName"), o = [], l; if (a) { let u = t.sliceDoc(a.from, a.to), h = e.globalAttrs[u]; if (!h) { - let f = Cv(r), d = f ? e.tags[Tv(t.doc, f)] : null; + let f = Ov(r), d = f ? e.tags[wv(t.doc, f)] : null; h = (d == null ? void 0 : d.attrs) && d.attrs[u]; } if (h) { @@ -26173,70 +26173,70 @@ function YDe(t, e, r, n, i) { } return { from: n, to: i, options: o, validFor: l }; } -function qce(t, e) { - let { state: r, pos: n } = e, i = Qn(r).resolveInner(n, -1), s = i.resolve(n); +function zce(t, e) { + let { state: r, pos: n } = e, i = Un(r).resolveInner(n, -1), s = i.resolve(n); for (let a = n, o; s == i && (o = i.childBefore(a)); ) { let l = o.lastChild; if (!l || !l.type.isError || l.from < l.to) break; s = i = o, a = l.from; } - return i.name == "TagName" ? i.parent && /CloseTag$/.test(i.parent.name) ? EG(r, i, i.from, n) : CG(r, t, i, i.from, n) : i.name == "StartTag" ? CG(r, t, i, n, n) : i.name == "StartCloseTag" || i.name == "IncompleteCloseTag" ? EG(r, i, n, n) : e.explicit && (i.name == "OpenTag" || i.name == "SelfClosingTag") || i.name == "AttributeName" ? WDe(r, t, i, i.name == "AttributeName" ? i.from : n, n) : i.name == "Is" || i.name == "AttributeValue" || i.name == "UnquotedAttributeValue" ? YDe(r, t, i, i.name == "Is" ? n : i.from, n) : e.explicit && (s.name == "Element" || s.name == "Text" || s.name == "Document") ? VDe(r, t, i, n) : null; + return i.name == "TagName" ? i.parent && /CloseTag$/.test(i.parent.name) ? RG(r, i, i.from, n) : AG(r, t, i, i.from, n) : i.name == "StartTag" ? AG(r, t, i, n, n) : i.name == "StartCloseTag" || i.name == "IncompleteCloseTag" ? RG(r, i, n, n) : e.explicit && (i.name == "OpenTag" || i.name == "SelfClosingTag") || i.name == "AttributeName" ? ePe(r, t, i, i.name == "AttributeName" ? i.from : n, n) : i.name == "Is" || i.name == "AttributeValue" || i.name == "UnquotedAttributeValue" ? tPe(r, t, i, i.name == "Is" ? n : i.from, n) : e.explicit && (s.name == "Element" || s.name == "Text" || s.name == "Document") ? JDe(r, t, i, n) : null; } -function GDe(t) { - return qce(dw.default, t); +function rPe(t) { + return zce(iw.default, t); } -function HDe(t) { - let { extraTags: e, extraGlobalAttributes: r } = t, n = r || e ? new dw(e, r) : dw.default; - return (i) => qce(n, i); +function nPe(t) { + let { extraTags: e, extraGlobalAttributes: r } = t, n = r || e ? new iw(e, r) : iw.default; + return (i) => zce(n, i); } -const XDe = /* @__PURE__ */ ah.parser.configure({ top: "SingleExpression" }), Uce = [ +const iPe = /* @__PURE__ */ th.parser.configure({ top: "SingleExpression" }), qce = [ { tag: "script", attrs: (t) => t.type == "text/typescript" || t.lang == "ts", - parser: Mce.parser + parser: Lce.parser }, { tag: "script", attrs: (t) => t.type == "text/babel" || t.type == "text/jsx", - parser: Dce.parser + parser: Mce.parser }, { tag: "script", attrs: (t) => t.type == "text/typescript-jsx", - parser: Pce.parser + parser: Dce.parser }, { tag: "script", attrs(t) { return /^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type); }, - parser: XDe + parser: iPe }, { tag: "script", attrs(t) { return !t.type || /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type); }, - parser: ah.parser + parser: th.parser }, { tag: "style", attrs(t) { return (!t.lang || t.lang == "css") && (!t.type || /^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type)); }, - parser: YT.parser + parser: LT.parser } -], Qce = /* @__PURE__ */ [ +], Uce = /* @__PURE__ */ [ { name: "style", - parser: /* @__PURE__ */ YT.parser.configure({ top: "Styles" }) + parser: /* @__PURE__ */ LT.parser.configure({ top: "Styles" }) } -].concat(/* @__PURE__ */ Bce.map((t) => ({ name: t, parser: ah.parser }))), Vce = /* @__PURE__ */ lp.define({ +].concat(/* @__PURE__ */ $ce.map((t) => ({ name: t, parser: th.parser }))), Qce = /* @__PURE__ */ op.define({ name: "html", - parser: /* @__PURE__ */ D9e.configure({ + parser: /* @__PURE__ */ U9e.configure({ props: [ - /* @__PURE__ */ My.add({ + /* @__PURE__ */ Ay.add({ Element(t) { let e = /^(\s*)(<\/)?/.exec(t.textAfter); return t.node.to <= t.pos + e[0].length ? t.continue() : t.lineIndent(t.node.from) + (e[2] ? 0 : t.unit); @@ -26263,7 +26263,7 @@ const XDe = /* @__PURE__ */ ah.parser.configure({ top: "SingleExpression" }), Uc return !e || e.name != "OpenTag" ? null : { from: e.to, to: r.name == "CloseTag" ? r.from : t.to }; } }), - /* @__PURE__ */ zae.add({ + /* @__PURE__ */ Fae.add({ "OpenTag CloseTag": (t) => t.getChild("TagName") }) ] @@ -26273,37 +26273,37 @@ const XDe = /* @__PURE__ */ ah.parser.configure({ top: "SingleExpression" }), Uc indentOnInput: /^\s*<\/\w+\W$/, wordChars: "-._" } -}), o3 = /* @__PURE__ */ Vce.configure({ - wrap: /* @__PURE__ */ Oce(Uce, Qce) +}), G5 = /* @__PURE__ */ Qce.configure({ + wrap: /* @__PURE__ */ wce(qce, Uce) }); -function jDe(t = {}) { +function sPe(t = {}) { let e = "", r; - t.matchClosingTags === !1 && (e = "noMatch"), t.selfClosingTags === !0 && (e = (e ? e + " " : "") + "selfClosing"), (t.nestedLanguages && t.nestedLanguages.length || t.nestedAttributes && t.nestedAttributes.length) && (r = Oce((t.nestedLanguages || []).concat(Uce), (t.nestedAttributes || []).concat(Qce))); - let n = r ? Vce.configure({ wrap: r, dialect: e }) : e ? o3.configure({ dialect: e }) : o3; - return new mv(n, [ - o3.data.of({ autocomplete: HDe(t) }), - t.autoCloseTags !== !1 ? ZDe : [], - FDe().support, - lDe().support + t.matchClosingTags === !1 && (e = "noMatch"), t.selfClosingTags === !0 && (e = (e ? e + " " : "") + "selfClosing"), (t.nestedLanguages && t.nestedLanguages.length || t.nestedAttributes && t.nestedAttributes.length) && (r = wce((t.nestedLanguages || []).concat(qce), (t.nestedAttributes || []).concat(Uce))); + let n = r ? Qce.configure({ wrap: r, dialect: e }) : e ? G5.configure({ dialect: e }) : G5; + return new fv(n, [ + G5.data.of({ autocomplete: nPe(t) }), + t.autoCloseTags !== !1 ? aPe : [], + HDe().support, + vDe().support ]); } -const _G = /* @__PURE__ */ new Set(/* @__PURE__ */ "area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")), ZDe = /* @__PURE__ */ Mt.inputHandler.of((t, e, r, n, i) => { - if (t.composing || t.state.readOnly || e != r || n != ">" && n != "/" || !o3.isActiveAt(t.state, e, -1)) +const LG = /* @__PURE__ */ new Set(/* @__PURE__ */ "area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")), aPe = /* @__PURE__ */ Rt.inputHandler.of((t, e, r, n, i) => { + if (t.composing || t.state.readOnly || e != r || n != ">" && n != "/" || !G5.isActiveAt(t.state, e, -1)) return !1; let s = i(), { state: a } = s, o = a.changeByRange((l) => { var u, h, f; - let d = a.doc.sliceString(l.from - 1, l.to) == n, { head: p } = l, g = Qn(a).resolveInner(p - 1, -1), m; + let d = a.doc.sliceString(l.from - 1, l.to) == n, { head: p } = l, g = Un(a).resolveInner(p - 1, -1), m; if ((g.name == "TagName" || g.name == "StartTag") && (g = g.parent), d && n == ">" && g.name == "OpenTag") { - if (((h = (u = g.parent) === null || u === void 0 ? void 0 : u.lastChild) === null || h === void 0 ? void 0 : h.name) != "CloseTag" && (m = Tv(a.doc, g.parent, p)) && !_G.has(m)) { + if (((h = (u = g.parent) === null || u === void 0 ? void 0 : u.lastChild) === null || h === void 0 ? void 0 : h.name) != "CloseTag" && (m = wv(a.doc, g.parent, p)) && !LG.has(m)) { let v = p + (a.doc.sliceString(p, p + 1) === ">" ? 1 : 0), y = ``; return { range: l, changes: { from: p, to: v, insert: y } }; } } else if (d && n == "/" && g.name == "IncompleteCloseTag") { let v = g.parent; - if (g.from == p - 2 && ((f = v.lastChild) === null || f === void 0 ? void 0 : f.name) != "CloseTag" && (m = Tv(a.doc, v, p)) && !_G.has(m)) { + if (g.from == p - 2 && ((f = v.lastChild) === null || f === void 0 ? void 0 : f.name) != "CloseTag" && (m = wv(a.doc, v, p)) && !LG.has(m)) { let y = p + (a.doc.sliceString(p, p + 1) === ">" ? 1 : 0), b = `${m}>`; return { - range: ft.cursor(p + b.length, -1), + range: ut.cursor(p + b.length, -1), changes: { from: p, to: y, insert: b } }; } @@ -26317,66 +26317,66 @@ const _G = /* @__PURE__ */ new Set(/* @__PURE__ */ "area base br col command emb scrollIntoView: !0 }) ]), !0); -}), Wce = /* @__PURE__ */ z$({ commentTokens: { block: { open: "" } } }), Yce = /* @__PURE__ */ new Fr(), Gce = /* @__PURE__ */ _Me.configure({ +}), Vce = /* @__PURE__ */ D$({ commentTokens: { block: { open: "" } } }), Wce = /* @__PURE__ */ new Br(), Yce = /* @__PURE__ */ $Me.configure({ props: [ - /* @__PURE__ */ tm.add((t) => !t.is("Block") || t.is("Document") || q9(t) != null ? void 0 : (e, r) => ({ from: r.doc.lineAt(e.from).to, to: e.to })), - /* @__PURE__ */ Yce.add(q9), - /* @__PURE__ */ My.add({ + /* @__PURE__ */ tm.add((t) => !t.is("Block") || t.is("Document") || E9(t) != null ? void 0 : (e, r) => ({ from: r.doc.lineAt(e.from).to, to: e.to })), + /* @__PURE__ */ Wce.add(E9), + /* @__PURE__ */ Ay.add({ Document: () => null }), /* @__PURE__ */ $0.add({ - Document: Wce + Document: Vce }) ] }); -function q9(t) { +function E9(t) { let e = /^(?:ATX|Setext)Heading(\d)$/.exec(t.name); return e ? +e[1] : void 0; } -function KDe(t, e) { +function oPe(t, e) { let r = t; for (; ; ) { let n = r.nextSibling, i; - if (!n || (i = q9(n.type)) != null && i <= e) + if (!n || (i = E9(n.type)) != null && i <= e) break; r = n; } return r.to; } -const JDe = /* @__PURE__ */ _ae.of((t, e, r) => { - for (let n = Qn(t).resolveInner(r, -1); n && !(n.from < e); n = n.parent) { - let i = n.type.prop(Yce); +const lPe = /* @__PURE__ */ Eae.of((t, e, r) => { + for (let n = Un(t).resolveInner(r, -1); n && !(n.from < e); n = n.parent) { + let i = n.type.prop(Wce); if (i == null) continue; - let s = KDe(n, i); + let s = oPe(n, i); if (s > r) return { from: r, to: s }; } return null; }); -function YB(t) { - return new ml(Wce, t, [JDe], "markdown"); +function FB(t) { + return new fl(Vce, t, [lPe], "markdown"); } -const ePe = /* @__PURE__ */ YB(Gce), tPe = /* @__PURE__ */ Gce.configure([FMe, qMe, zMe, UMe, { +const cPe = /* @__PURE__ */ FB(Yce), uPe = /* @__PURE__ */ Yce.configure([HMe, ZMe, XMe, jMe, { props: [ /* @__PURE__ */ tm.add({ Table: (t, e) => ({ from: e.doc.lineAt(t.from).to, to: t.to }) }) ] -}]), Hce = /* @__PURE__ */ YB(tPe); -function rPe(t, e) { +}]), Gce = /* @__PURE__ */ FB(uPe); +function hPe(t, e) { return (r) => { if (r && t) { let n = null; - if (r = /\S*/.exec(r)[0], typeof t == "function" ? n = t(r) : n = vT.matchLanguageName(t, r, !0), n instanceof vT) - return n.support ? n.support.language.parser : Yx.getSkippingParser(n.load()); + if (r = /\S*/.exec(r)[0], typeof t == "function" ? n = t(r) : n = rT.matchLanguageName(t, r, !0), n instanceof rT) + return n.support ? n.support.language.parser : $x.getSkippingParser(n.load()); if (n) return n.parser; } return e ? e.parser : null; }; } -class yS { +class aS { constructor(e, r, n, i, s, a, o) { this.node = e, this.from = r, this.to = n, this.spaceBefore = i, this.spaceAfter = s, this.type = a, this.item = o; } @@ -26393,11 +26393,11 @@ class yS { } } marker(e, r) { - let n = this.node.name == "OrderedList" ? String(+jce(this.item, e)[2] + r) : ""; + let n = this.node.name == "OrderedList" ? String(+Xce(this.item, e)[2] + r) : ""; return this.spaceBefore + n + this.type + this.spaceAfter; } } -function Xce(t, e) { +function Hce(t, e) { let r = []; for (let i = t; i && i.name != "Document"; i = i.parent) (i.name == "ListItem" || i.name == "Blockquote" || i.name == "FencedCode") && r.push(i); @@ -26405,28 +26405,28 @@ function Xce(t, e) { for (let i = r.length - 1; i >= 0; i--) { let s = r[i], a, o = e.lineAt(s.from), l = s.from - o.from; if (s.name == "FencedCode") - n.push(new yS(s, l, l, "", "", "", null)); + n.push(new aS(s, l, l, "", "", "", null)); else if (s.name == "Blockquote" && (a = /^ *>( ?)/.exec(o.text.slice(l)))) - n.push(new yS(s, l, l + a[0].length, "", a[1], ">", null)); + n.push(new aS(s, l, l + a[0].length, "", a[1], ">", null)); else if (s.name == "ListItem" && s.parent.name == "OrderedList" && (a = /^( *)\d+([.)])( *)/.exec(o.text.slice(l)))) { let u = a[3], h = a[0].length; - u.length >= 4 && (u = u.slice(0, u.length - 4), h -= 4), n.push(new yS(s.parent, l, l + h, a[1], u, a[2], s)); + u.length >= 4 && (u = u.slice(0, u.length - 4), h -= 4), n.push(new aS(s.parent, l, l + h, a[1], u, a[2], s)); } else if (s.name == "ListItem" && s.parent.name == "BulletList" && (a = /^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(l)))) { let u = a[4], h = a[0].length; u.length > 4 && (u = u.slice(0, u.length - 4), h -= 4); let f = a[2]; - a[3] && (f += a[3].replace(/[xX]/, " ")), n.push(new yS(s.parent, l, l + h, a[1], u, f, s)); + a[3] && (f += a[3].replace(/[xX]/, " ")), n.push(new aS(s.parent, l, l + h, a[1], u, f, s)); } } return n; } -function jce(t, e) { +function Xce(t, e) { return /^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from, t.from + 10)); } -function D8(t, e, r, n = 0) { +function x8(t, e, r, n = 0) { for (let i = -1, s = t; ; ) { if (s.name == "ListItem") { - let o = jce(s, e), l = +o[2]; + let o = Xce(s, e), l = +o[2]; if (i >= 0) { if (l != i + 1) return; @@ -26440,20 +26440,20 @@ function D8(t, e, r, n = 0) { s = a; } } -function U9(t, e) { +function _9(t, e) { let r = /^[ \t]*/.exec(t)[0].length; if (!r || e.facet(gg) != " ") return t; - let n = iu(t, 4, r), i = ""; + let n = eu(t, 4, r), i = ""; for (let s = n; s > 0; ) s >= 4 ? (i += " ", s -= 4) : (i += " ", s--); return i + t.slice(r); } -const nPe = ({ state: t, dispatch: e }) => { - let r = Qn(t), { doc: n } = t, i = null, s = t.changeByRange((a) => { - if (!a.empty || !Hce.isActiveAt(t, a.from)) +const fPe = ({ state: t, dispatch: e }) => { + let r = Un(t), { doc: n } = t, i = null, s = t.changeByRange((a) => { + if (!a.empty || !Gce.isActiveAt(t, a.from)) return i = { range: a }; - let o = a.from, l = n.lineAt(o), u = Xce(r.resolveInner(o, -1), n); + let o = a.from, l = n.lineAt(o), u = Hce(r.resolveInner(o, -1), n); for (; u.length && u[u.length - 1].from > o - l.from; ) u.pop(); if (!u.length) @@ -26467,13 +26467,13 @@ const nPe = ({ state: t, dispatch: e }) => { let v = u.length > 1 ? u[u.length - 2] : null, y, b = ""; v && v.item ? (y = l.from + v.from, b = v.marker(n, 1)) : y = l.from + (v ? v.to : 0); let w = [{ from: y, to: o, insert: b }]; - return h.node.name == "OrderedList" && D8(h.item, n, w, -2), v && v.node.name == "OrderedList" && D8(v.item, n, w), { range: ft.cursor(y + b.length), changes: w }; + return h.node.name == "OrderedList" && x8(h.item, n, w, -2), v && v.node.name == "OrderedList" && x8(v.item, n, w), { range: ut.cursor(y + b.length), changes: w }; } else { let v = ""; for (let y = 0, b = u.length - 2; y <= b; y++) - v += u[y].blank(y < b ? iu(l.text, 4, u[y + 1].from) - v.length : null, y < b); - return v = U9(v, t), { - range: ft.cursor(o + v.length + 1), + v += u[y].blank(y < b ? eu(l.text, 4, u[y + 1].from) - v.length : null, y < b); + return v = _9(v, t), { + range: ut.cursor(o + v.length + 1), changes: { from: l.from, insert: v + t.lineBreak } }; } @@ -26488,26 +26488,26 @@ const nPe = ({ state: t, dispatch: e }) => { } } let d = []; - h.node.name == "OrderedList" && D8(h.item, n, d); + h.node.name == "OrderedList" && x8(h.item, n, d); let p = h.item && h.item.from < l.from, g = ""; if (!p || /^[\s\d.)\-+*>]*/.exec(l.text)[0].length >= h.to) for (let v = 0, y = u.length - 1; v <= y; v++) - g += v == y && !p ? u[v].marker(n, 1) : u[v].blank(v < y ? iu(l.text, 4, u[v + 1].from) - g.length : null); + g += v == y && !p ? u[v].marker(n, 1) : u[v].blank(v < y ? eu(l.text, 4, u[v + 1].from) - g.length : null); let m = o; for (; m > l.from && /\s/.test(l.text.charAt(m - l.from - 1)); ) m--; - return g = U9(g, t), d.push({ from: m, to: o, insert: t.lineBreak + g }), { range: ft.cursor(m + g.length + 1), changes: d }; + return g = _9(g, t), d.push({ from: m, to: o, insert: t.lineBreak + g }), { range: ut.cursor(m + g.length + 1), changes: d }; }); return i ? !1 : (e(t.update(s, { scrollIntoView: !0, userEvent: "input" })), !0); }; -function AG(t) { +function MG(t) { return t.name == "QuoteMark" || t.name == "ListMark"; } -function iPe(t, e) { +function dPe(t, e) { let r = t.resolveInner(e, -1), n = e; - AG(r) && (n = r.from, r = r.parent); + MG(r) && (n = r.from, r = r.parent); for (let i; i = r.childBefore(n); ) - if (AG(i)) + if (MG(i)) n = i.from; else if (i.name == "OrderedList" || i.name == "BulletList") r = i.lastChild, n = r.to; @@ -26515,29 +26515,29 @@ function iPe(t, e) { break; return r; } -const sPe = ({ state: t, dispatch: e }) => { - let r = Qn(t), n = null, i = t.changeByRange((s) => { +const pPe = ({ state: t, dispatch: e }) => { + let r = Un(t), n = null, i = t.changeByRange((s) => { let a = s.from, { doc: o } = t; - if (s.empty && Hce.isActiveAt(t, s.from)) { - let l = o.lineAt(a), u = Xce(iPe(r, a), o); + if (s.empty && Gce.isActiveAt(t, s.from)) { + let l = o.lineAt(a), u = Hce(dPe(r, a), o); if (u.length) { let h = u[u.length - 1], f = h.to - h.spaceAfter.length + (h.spaceAfter ? 1 : 0); if (a - l.from > f && !/\S/.test(l.text.slice(f, a - l.from))) return { - range: ft.cursor(l.from + f), + range: ut.cursor(l.from + f), changes: { from: l.from + f, to: a } }; if (a - l.from == f && (!h.item || l.from <= h.item.from || !/\S/.test(l.text.slice(0, h.to)))) { let d = l.from + h.from; if (h.item && h.node.from < h.item.from && /\S/.test(l.text.slice(h.from, h.to))) { - let p = h.blank(iu(l.text, 4, h.to) - iu(l.text, 4, h.from)); - return d == l.from && (p = U9(p, t)), { - range: ft.cursor(d + p.length), + let p = h.blank(eu(l.text, 4, h.to) - eu(l.text, 4, h.from)); + return d == l.from && (p = _9(p, t)), { + range: ut.cursor(d + p.length), changes: { from: d, to: l.from + h.to, insert: p } }; } if (d < a) - return { range: ft.cursor(d), changes: { from: d, to: a } }; + return { range: ut.cursor(d), changes: { from: d, to: a } }; } } } @@ -26545,25 +26545,25 @@ const sPe = ({ state: t, dispatch: e }) => { }); return n ? !1 : (e(t.update(i, { scrollIntoView: !0, userEvent: "delete" })), !0); }, Zce = [ - { key: "Enter", run: nPe }, - { key: "Backspace", run: sPe } -], Q9 = /* @__PURE__ */ jDe({ matchClosingTags: !1 }); -function aPe(t = {}) { - let { codeLanguages: e, defaultCodeLanguage: r, addKeymap: n = !0, base: { parser: i } = ePe, completeHTMLTags: s = !0 } = t; - if (!(i instanceof f6)) + { key: "Enter", run: fPe }, + { key: "Backspace", run: pPe } +], A9 = /* @__PURE__ */ sPe({ matchClosingTags: !1 }); +function gPe(t = {}) { + let { codeLanguages: e, defaultCodeLanguage: r, addKeymap: n = !0, base: { parser: i } = cPe, completeHTMLTags: s = !0 } = t; + if (!(i instanceof K_)) throw new RangeError("Base parser provided to `markdown` should be a Markdown parser"); - let a = t.extensions ? [t.extensions] : [], o = [Q9.support], l; - r instanceof mv ? (o.push(r.support), l = r.language) : r && (l = r); - let u = e || l ? rPe(e, l) : void 0; - a.push(RMe({ codeParser: u, htmlParser: Q9.language.parser })), n && o.push(qa.high(zc.of(Zce))); - let h = YB(i.configure(a)); - return s && o.push(h.data.of({ autocomplete: oPe })), new mv(h, o); -} -function oPe(t) { + let a = t.extensions ? [t.extensions] : [], o = [A9.support], l; + r instanceof fv ? (o.push(r.support), l = r.language) : r && (l = r); + let u = e || l ? hPe(e, l) : void 0; + a.push(FMe({ codeParser: u, htmlParser: A9.language.parser })), n && o.push(za.high(Ic.of(Zce))); + let h = FB(i.configure(a)); + return s && o.push(h.data.of({ autocomplete: mPe })), new fv(h, o); +} +function mPe(t) { let { state: e, pos: r } = t, n = /<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(r - 25, r)); if (!n) return null; - let i = Qn(e).resolveInner(r, -1); + let i = Un(e).resolveInner(r, -1); for (; i && !i.type.isTop; ) { if (i.name == "CodeBlock" || i.name == "FencedCode" || i.name == "ProcessingInstructionBlock" || i.name == "CommentBlock" || i.name == "Link" || i.name == "Image") return null; @@ -26572,25 +26572,25 @@ function oPe(t) { return { from: r - n[0].length, to: r, - options: lPe(), + options: vPe(), validFor: /^<[:\-\.\w\u00b7-\uffff]*$/ }; } -let P8 = null; -function lPe() { - if (P8) - return P8; - let t = GDe(new e6(qr.create({ extensions: Q9 }), 0, !0)); - return P8 = t ? t.options : []; +let w8 = null; +function vPe() { + if (w8) + return w8; + let t = rPe(new z_(qr.create({ extensions: A9 }), 0, !0)); + return w8 = t ? t.options : []; } -function cPe(t) { +function yPe(t) { throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); } -var Kce = { exports: {} }; -const uPe = {}, hPe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +var jce = { exports: {} }; +const bPe = {}, xPe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - default: uPe -}, Symbol.toStringTag, { value: "Module" })), fPe = /* @__PURE__ */ I_(hPe); + default: bPe +}, Symbol.toStringTag, { value: "Module" })), wPe = /* @__PURE__ */ O_(xPe); (function(t) { var e; (function() { @@ -26646,8 +26646,8 @@ const uPe = {}, hPe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin u(a.statusText); }; })), a.overrideMimeType && a.overrideMimeType("text/plain; charset=" + n), a.send(null), i ? s : a.responseText; - } else if (typeof cPe < "u") { - var o = fPe; + } else if (typeof yPe < "u") { + var o = wPe; try { if (o.existsSync(r)) return o.readFileSync(r, n); @@ -26689,8 +26689,8 @@ const uPe = {}, hPe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin _parseDIC: function(r) { r = this._removeDicComments(r); var n = r.split(/\r?\n/), i = {}; - function s(P, L) { - i.hasOwnProperty(P) || (i[P] = null), L.length > 0 && (i[P] === null && (i[P] = []), i[P].push(L)); + function s(L, D) { + i.hasOwnProperty(L) || (i[L] = null), D.length > 0 && (i[L] === null && (i[L] = []), i[L].push(D)); } for (var a = 1, o = n.length; a < o; a++) { var l = n[a]; @@ -26708,9 +26708,9 @@ const uPe = {}, hPe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin for (var O = d + 1; O < p; O++) { var S = f[O], C = this.rules[S]; if (C && C.combineable && m.type != C.type) - for (var T = this._applyRule(w, C), D = 0, E = T.length; D < E; D++) { - var N = T[D]; - s(N, []); + for (var T = this._applyRule(w, C), M = 0, E = T.length; M < E; M++) { + var P = T[M]; + s(P, []); } } } @@ -26841,16 +26841,16 @@ const uPe = {}, hPe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin for (y = 0, w = C.length + 1; y < w; y++) { var T = [C.substring(0, y), C.substring(y)]; if (T[1] && (O = T[0] + T[1].substring(1), (!m || f.check(O)) && (O in v ? v[O] += 1 : v[O] = 1)), T[1].length > 1 && T[1][1] !== T[1][0] && (O = T[0] + T[1][1] + T[1][0] + T[1].substring(2), (!m || f.check(O)) && (O in v ? v[O] += 1 : v[O] = 1)), T[1]) { - var D = T[1].substring(0, 1).toUpperCase() === T[1].substring(0, 1) ? "uppercase" : "lowercase"; + var M = T[1].substring(0, 1).toUpperCase() === T[1].substring(0, 1) ? "uppercase" : "lowercase"; for (b = 0; b < S; b++) { var E = f.alphabet[b]; - D === "uppercase" && (E = E.toUpperCase()), E != T[1].substring(0, 1) && (O = T[0] + E + T[1].substring(1), (!m || f.check(O)) && (O in v ? v[O] += 1 : v[O] = 1)); + M === "uppercase" && (E = E.toUpperCase()), E != T[1].substring(0, 1) && (O = T[0] + E + T[1].substring(1), (!m || f.check(O)) && (O in v ? v[O] += 1 : v[O] = 1)); } } if (T[1]) for (b = 0; b < S; b++) { - var D = T[0].substring(-1).toUpperCase() === T[0].substring(-1) && T[1].substring(0, 1).toUpperCase() === T[1].substring(0, 1) ? "uppercase" : "lowercase", E = f.alphabet[b]; - D === "uppercase" && (E = E.toUpperCase()), O = T[0] + E + T[1], (!m || f.check(O)) && (O in v ? v[O] += 1 : v[O] = 1); + var M = T[0].substring(-1).toUpperCase() === T[0].substring(-1) && T[1].substring(0, 1).toUpperCase() === T[1].substring(0, 1) ? "uppercase" : "lowercase", E = f.alphabet[b]; + M === "uppercase" && (E = E.toUpperCase()), O = T[0] + E + T[1], (!m || f.check(O)) && (O in v ? v[O] += 1 : v[O] = 1); } } return v; @@ -26862,16 +26862,16 @@ const uPe = {}, hPe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin var w, O = []; for (w in y) y.hasOwnProperty(w) && O.push([w, y[w]]); - function S(E, N) { - var P = E[1], L = N[1]; - return P < L ? -1 : P > L ? 1 : N[0].localeCompare(E[0]); + function S(E, P) { + var L = E[1], D = P[1]; + return L < D ? -1 : L > D ? 1 : P[0].localeCompare(E[0]); } O.sort(S).reverse(); var C = [], T = "lowercase"; g.toUpperCase() === g ? T = "uppercase" : g.substr(0, 1).toUpperCase() + g.substr(1).toLowerCase() === g && (T = "capitalized"); - var D = n; - for (w = 0; w < Math.min(D, O.length); w++) - T === "uppercase" ? O[w][0] = O[w][0].toUpperCase() : T === "capitalized" && (O[w][0] = O[w][0].substr(0, 1).toUpperCase() + O[w][0].substr(1)), !f.hasFlag(O[w][0], "NOSUGGEST") && C.indexOf(O[w][0]) == -1 ? C.push(O[w][0]) : D++; + var M = n; + for (w = 0; w < Math.min(M, O.length); w++) + T === "uppercase" ? O[w][0] = O[w][0].toUpperCase() : T === "capitalized" && (O[w][0] = O[w][0].substr(0, 1).toUpperCase() + O[w][0].substr(1)), !f.hasFlag(O[w][0], "NOSUGGEST") && C.indexOf(O[w][0]) == -1 ? C.push(O[w][0]) : M++; return C; } return this.memoized[r] = { @@ -26881,47 +26881,47 @@ const uPe = {}, hPe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin } }; })(), t.exports = e; -})(Kce); -const dPe = Kce.exports, Jce = Gt.define({ +})(jce); +const OPe = jce.exports, Kce = Yt.define({ combine: (t) => t[t.length - 1] -}), pPe = Ht.mark({ +}), kPe = Gt.mark({ class: "cm-error" -}), gPe = (t) => Object.keys(t.rules).length > 0; -function RG(t) { +}), SPe = (t) => Object.keys(t.rules).length > 0; +function DG(t) { var s, a; let e = ((s = t.visibleRanges[0]) == null ? void 0 : s.from) || 0, r = ((a = t.visibleRanges[0]) == null ? void 0 : a.to) || void 0; - const n = new rs(), i = t.state.facet(Jce); - return gPe(i) && t.state.doc.sliceString(e, r).replaceAll(/\w+/g, (o, l) => !i.check(o) && n.add(e + l, e + l + o.length, pPe)), n.finish(); + const n = new es(), i = t.state.facet(Kce); + return SPe(i) && t.state.doc.sliceString(e, r).replaceAll(/\w+/g, (o, l) => !i.check(o) && n.add(e + l, e + l + o.length, kPe)), n.finish(); } -const mPe = fn.fromClass(class { +const TPe = hn.fromClass(class { constructor(t) { - this.decorations = RG(t); + this.decorations = DG(t); } update(t) { - (t.docChanged || t.viewportChanged) && (this.decorations = RG(t.view)); + (t.docChanged || t.viewportChanged) && (this.decorations = DG(t.view)); } }, { decorations: (t) => t.decorations }); -function vPe(t) { +function CPe(t) { if (!t) return []; let { dict: e = "en_US", dictionaryPath: r = "/dictionaries" } = t; - return [Jce.of(new dPe(e, null, null, { + return [Kce.of(new OPe(e, null, null, { dictionaryPath: r - })), mPe]; + })), TPe]; } -const yPe = "cm-link", bPe = [{ +const EPe = "cm-link", _Pe = [{ target: /`[^`\n]+`/g, cssClass: "cm-mono" }]; -function LG(t, e, r, n) { +function PG(t, e, r, n) { var u, h; let i = ((u = t.visibleRanges[0]) == null ? void 0 : u.from) || 0, s = ((h = t.visibleRanges[0]) == null ? void 0 : h.to) || void 0; - const a = new rs(), o = t.state.doc.sliceString(i, s); + const a = new es(), o = t.state.doc.sliceString(i, s); let l = 0; return e.filter((f) => !f.id || parseInt(n.get(f.id)) <= t.state.doc.lines).flatMap((f) => { const d = f.id ? t.state.doc.line(parseInt(n.get(f.id))).text : o, p = f.id ? t.state.doc.line(parseInt(n.get(f.id))).from : i; @@ -26943,7 +26943,7 @@ function LG(t, e, r, n) { match: d }) => { let p = { - class: yPe + class: EPe }; f.cssClass && (p.class = f.cssClass); let g; @@ -26954,92 +26954,92 @@ function LG(t, e, r, n) { hl: f, markParams: p, view: t - })), f.remove || a.add(f.from + d.index, f.from + d.index + d[0].length, Ht.mark(p)), g == null || g(); + })), f.remove || a.add(f.from + d.index, f.from + d.index + d[0].length, Gt.mark(p)), g == null || g(); }), a.finish(); } -const GB = (t, e, r) => { +const zB = (t, e, r) => { t || (t = []); - const n = t.concat(bPe); - return fn.fromClass(class { + const n = t.concat(_Pe); + return hn.fromClass(class { constructor(i) { - this.decorations = LG(i, n, e, r); + this.decorations = PG(i, n, e, r); } update(i) { - (i.docChanged || i.viewportChanged) && (this.decorations = LG(i.view, n, e, r)); + (i.docChanged || i.viewportChanged) && (this.decorations = PG(i.view, n, e, r)); } }, { decorations: (i) => i.decorations }); -}, eue = /* @__PURE__ */ new Map(); -class xPe { +}, Jce = /* @__PURE__ */ new Map(); +class APe { constructor(e) { - this.room = e, this.onmessage = null, this._onChange = (r) => r.key === e && this.onmessage !== null && this.onmessage({ data: fRe(r.newValue || "") }), V8e(this._onChange); + this.room = e, this.onmessage = null, this._onChange = (r) => r.key === e && this.onmessage !== null && this.onmessage({ data: wRe(r.newValue || "") }), J8e(this._onChange); } postMessage(e) { - joe.setItem(this.room, hRe(aRe(e))); + Xoe.setItem(this.room, xRe(gRe(e))); } close() { - W8e(this._onChange); + eRe(this._onChange); } } -const wPe = typeof BroadcastChannel > "u" ? xPe : BroadcastChannel, HB = (t) => Xf(eue, t, () => { - const e = mg(), r = new wPe(t); +const RPe = typeof BroadcastChannel > "u" ? APe : BroadcastChannel, qB = (t) => Vf(Jce, t, () => { + const e = mg(), r = new RPe(t); return r.onmessage = (n) => e.forEach((i) => i(n.data, "broadcastchannel")), { bc: r, subs: e }; -}), OPe = (t, e) => (HB(t).subs.add(e), e), kPe = (t, e) => { - const r = HB(t), n = r.subs.delete(e); - return n && r.subs.size === 0 && (r.bc.close(), eue.delete(t)), n; -}, i1 = (t, e, r = null) => { - const n = HB(t); +}), LPe = (t, e) => (qB(t).subs.add(e), e), MPe = (t, e) => { + const r = qB(t), n = r.subs.delete(e); + return n && r.subs.size === 0 && (r.bc.close(), Jce.delete(t)), n; +}, Km = (t, e, r = null) => { + const n = qB(t); n.bc.postMessage(e), n.subs.forEach((i) => i(e, r)); -}, tue = 0, XB = 1, rue = 2, V9 = (t, e) => { - Cr(t, tue); - const r = XRe(e); - Di(t, r); -}, nue = (t, e, r) => { - Cr(t, XB), Di(t, WRe(e, r)); -}, SPe = (t, e, r) => nue(e, r, Aa(t)), iue = (t, e, r) => { +}, eue = 0, UB = 1, tue = 2, R9 = (t, e) => { + kr(t, eue); + const r = iLe(e); + Mi(t, r); +}, rue = (t, e, r) => { + kr(t, UB), Mi(t, eLe(e, r)); +}, DPe = (t, e, r) => rue(e, r, Ea(t)), nue = (t, e, r) => { try { - URe(e, Aa(t), r); + jRe(e, Ea(t), r); } catch (n) { console.error("Caught error while handling a Yjs update", n); } -}, TPe = (t, e) => { - Cr(t, rue), Di(t, e); -}, CPe = iue, EPe = (t, e, r, n) => { +}, PPe = (t, e) => { + kr(t, tue), Mi(t, e); +}, NPe = nue, IPe = (t, e, r, n) => { const i = zr(t); switch (i) { - case tue: - SPe(t, e, r); + case eue: + DPe(t, e, r); break; - case XB: - iue(t, r, n); + case UB: + nue(t, r, n); break; - case rue: - CPe(t, r, n); + case tue: + NPe(t, r, n); break; default: throw new Error("Unknown message type"); } return i; -}, _Pe = 0, APe = (t, e, r) => { +}, $Pe = 0, BPe = (t, e, r) => { switch (zr(t)) { - case _Pe: - r(e, Qd(t)); + case $Pe: + r(e, Fd(t)); } -}, N8 = 3e4; -class sue extends t6 { +}, O8 = 3e4; +class iue extends q_ { constructor(e) { super(), this.doc = e, this.clientID = e.clientID, this.states = /* @__PURE__ */ new Map(), this.meta = /* @__PURE__ */ new Map(), this._checkInterval = setInterval(() => { - const r = pp(); - this.getLocalState() !== null && N8 / 2 <= r - this.meta.get(this.clientID).lastUpdated && this.setLocalState(this.getLocalState()); + const r = dp(); + this.getLocalState() !== null && O8 / 2 <= r - this.meta.get(this.clientID).lastUpdated && this.setLocalState(this.getLocalState()); const n = []; this.meta.forEach((i, s) => { - s !== this.clientID && N8 <= r - i.lastUpdated && this.states.has(s) && n.push(s); - }), n.length > 0 && jB(this, n, "timeout"); - }, _f(N8 / 10)), e.on("destroy", () => { + s !== this.clientID && O8 <= r - i.lastUpdated && this.states.has(s) && n.push(s); + }), n.length > 0 && QB(this, n, "timeout"); + }, kf(O8 / 10)), e.on("destroy", () => { this.destroy(); }), this.setLocalState({}); } @@ -27053,10 +27053,10 @@ class sue extends t6 { const r = this.clientID, n = this.meta.get(r), i = n === void 0 ? 0 : n.clock + 1, s = this.states.get(r); e === null ? this.states.delete(r) : this.states.set(r, e), this.meta.set(r, { clock: i, - lastUpdated: pp() + lastUpdated: dp() }); const a = [], o = [], l = [], u = []; - e === null ? u.push(r) : s == null ? e != null && a.push(r) : (o.push(r), cx(s, e) || l.push(r)), (a.length > 0 || l.length > 0 || u.length > 0) && this.emit("change", [{ added: a, updated: l, removed: u }, "local"]), this.emit("update", [{ added: a, updated: o, removed: u }, "local"]); + e === null ? u.push(r) : s == null ? e != null && a.push(r) : (o.push(r), ex(s, e) || l.push(r)), (a.length > 0 || l.length > 0 || u.length > 0) && this.emit("change", [{ added: a, updated: l, removed: u }, "local"]), this.emit("update", [{ added: a, updated: o, removed: u }, "local"]); } setLocalStateField(e, r) { const n = this.getLocalState(); @@ -27069,7 +27069,7 @@ class sue extends t6 { return this.states; } } -const jB = (t, e, r) => { +const QB = (t, e, r) => { const n = []; for (let i = 0; i < e.length; i++) { const s = e[i]; @@ -27078,31 +27078,31 @@ const jB = (t, e, r) => { const a = t.meta.get(s); t.meta.set(s, { clock: a.clock + 1, - lastUpdated: pp() + lastUpdated: dp() }); } n.push(s); } } n.length > 0 && (t.emit("change", [{ added: [], updated: [], removed: n }, r]), t.emit("update", [{ added: [], updated: [], removed: n }, r])); -}, fx = (t, e, r = t.states) => { - const n = e.length, i = Ra(); - Cr(i, n); +}, nx = (t, e, r = t.states) => { + const n = e.length, i = _a(); + kr(i, n); for (let s = 0; s < n; s++) { const a = e[s], o = r.get(a) || null, l = t.meta.get(a).clock; - Cr(i, a), Cr(i, l), eg(i, JSON.stringify(o)); + kr(i, a), kr(i, l), eg(i, JSON.stringify(o)); } - return fi(i); -}, RPe = (t, e, r) => { - const n = qp(e), i = pp(), s = [], a = [], o = [], l = [], u = zr(n); + return hi(i); +}, FPe = (t, e, r) => { + const n = Up(e), i = dp(), s = [], a = [], o = [], l = [], u = zr(n); for (let h = 0; h < u; h++) { const f = zr(n); let d = zr(n); - const p = JSON.parse(Qd(n)), g = t.meta.get(f), m = t.states.get(f), v = g === void 0 ? 0 : g.clock; + const p = JSON.parse(Fd(n)), g = t.meta.get(f), m = t.states.get(f), v = g === void 0 ? 0 : g.clock; (v < d || v === d && p === null && t.states.has(f)) && (p === null ? f === t.clientID && t.getLocalState() != null ? d++ : t.states.delete(f) : t.states.set(f, p), t.meta.set(f, { clock: d, lastUpdated: i - }), g === void 0 && p !== null ? s.push(f) : g !== void 0 && p === null ? l.push(f) : p !== null && (cx(p, m) || o.push(f), a.push(f))); + }), g === void 0 && p !== null ? s.push(f) : g !== void 0 && p === null ? l.push(f) : p !== null && (ex(p, m) || o.push(f), a.push(f))); } (s.length > 0 || o.length > 0 || l.length > 0) && t.emit("change", [{ added: s, @@ -27113,55 +27113,55 @@ const jB = (t, e, r) => { updated: a, removed: l }, r]); -}, LPe = (t) => X8e(t, (e, r) => `${encodeURIComponent(r)}=${encodeURIComponent(e)}`).join("&"), F0 = 0, aue = 3, $1 = 1, MPe = 2, Ak = []; -Ak[F0] = (t, e, r, n, i) => { - Cr(t, F0); - const s = EPe( +}, zPe = (t) => iRe(t, (e, r) => `${encodeURIComponent(r)}=${encodeURIComponent(e)}`).join("&"), F0 = 0, sue = 3, M1 = 1, qPe = 2, wk = []; +wk[F0] = (t, e, r, n, i) => { + kr(t, F0); + const s = IPe( e, t, r.doc, r ); - n && s === XB && !r.synced && (r.synced = !0); + n && s === UB && !r.synced && (r.synced = !0); }; -Ak[aue] = (t, e, r, n, i) => { - Cr(t, $1), Di( +wk[sue] = (t, e, r, n, i) => { + kr(t, M1), Mi( t, - fx( + nx( r.awareness, Array.from(r.awareness.getStates().keys()) ) ); }; -Ak[$1] = (t, e, r, n, i) => { - RPe( +wk[M1] = (t, e, r, n, i) => { + FPe( r.awareness, - Aa(e), + Ea(e), r ); }; -Ak[MPe] = (t, e, r, n, i) => { - APe( +wk[qPe] = (t, e, r, n, i) => { + BPe( e, r.doc, - (s, a) => DPe(r, a) + (s, a) => UPe(r, a) ); }; -const MG = 3e4, DPe = (t, e) => console.warn(`Permission denied to access ${t.url}. -${e}`), oue = (t, e, r) => { - const n = qp(e), i = Ra(), s = zr(n), a = t.messageHandlers[s]; +const NG = 3e4, UPe = (t, e) => console.warn(`Permission denied to access ${t.url}. +${e}`), aue = (t, e, r) => { + const n = Up(e), i = _a(), s = zr(n), a = t.messageHandlers[s]; return a ? a(i, n, t, r, s) : console.error("Unable to compute message"), i; -}, lue = (t) => { +}, oue = (t) => { if (t.shouldConnect && t.ws === null) { const e = new t._WS(t.url); e.binaryType = "arraybuffer", t.ws = e, t.wsconnecting = !0, t.wsconnected = !1, t.synced = !1, e.onmessage = (r) => { - t.wsLastMessageReceived = pp(); - const n = oue(t, new Uint8Array(r.data), !0); - mB(n) > 1 && e.send(fi(n)); + t.wsLastMessageReceived = dp(); + const n = aue(t, new Uint8Array(r.data), !0); + cB(n) > 1 && e.send(hi(n)); }, e.onerror = (r) => { t.emit("connection-error", [r, t]); }, e.onclose = (r) => { - t.emit("connection-close", [r, t]), t.ws = null, t.wsconnecting = !1, t.wsconnected ? (t.wsconnected = !1, t.synced = !1, jB( + t.emit("connection-close", [r, t]), t.ws = null, t.wsconnecting = !1, t.wsconnected ? (t.wsconnected = !1, t.synced = !1, QB( t.awareness, Array.from(t.awareness.getStates().keys()).filter( (n) => n !== t.doc.clientID @@ -27170,39 +27170,39 @@ ${e}`), oue = (t, e, r) => { ), t.emit("status", [{ status: "disconnected" }])) : t.wsUnsuccessfulReconnects++, setTimeout( - lue, - r6( - n8e(2, t.wsUnsuccessfulReconnects) * 100, + oue, + U_( + f8e(2, t.wsUnsuccessfulReconnects) * 100, t.maxBackoffTime ), t ); }, e.onopen = () => { - t.wsLastMessageReceived = pp(), t.wsconnecting = !1, t.wsconnected = !0, t.wsUnsuccessfulReconnects = 0, t.emit("status", [{ + t.wsLastMessageReceived = dp(), t.wsconnecting = !1, t.wsconnected = !0, t.wsUnsuccessfulReconnects = 0, t.emit("status", [{ status: "connected" }]); - const r = Ra(); - if (Cr(r, F0), V9(r, t.doc), e.send(fi(r)), t.awareness.getLocalState() !== null) { - const n = Ra(); - Cr(n, $1), Di( + const r = _a(); + if (kr(r, F0), R9(r, t.doc), e.send(hi(r)), t.awareness.getLocalState() !== null) { + const n = _a(); + kr(n, M1), Mi( n, - fx(t.awareness, [ + nx(t.awareness, [ t.doc.clientID ]) - ), e.send(fi(n)); + ), e.send(hi(n)); } }, t.emit("status", [{ status: "connecting" }]); } -}, I8 = (t, e) => { +}, k8 = (t, e) => { const r = t.ws; - t.wsconnected && r && r.readyState === r.OPEN && r.send(e), t.bcconnected && i1(t.bcChannel, e, t); + t.wsconnected && r && r.readyState === r.OPEN && r.send(e), t.bcconnected && Km(t.bcChannel, e, t); }; -class cue extends t6 { +class lue extends q_ { constructor(e, r, n, { connect: i = !0, - awareness: s = new sue(n), + awareness: s = new iue(n), params: a = {}, WebSocketPolyfill: o = WebSocket, resyncInterval: l = -1, @@ -27211,37 +27211,37 @@ class cue extends t6 { } = {}) { for (super(); e[e.length - 1] === "/"; ) e = e.slice(0, e.length - 1); - const f = LPe(a); - this.maxBackoffTime = u, this.bcChannel = e + "/" + r, this.url = e + "/" + r + (f.length === 0 ? "" : "?" + f), this.roomname = r, this.doc = n, this._WS = o, this.awareness = s, this.wsconnected = !1, this.wsconnecting = !1, this.bcconnected = !1, this.disableBc = h, this.wsUnsuccessfulReconnects = 0, this.messageHandlers = Ak.slice(), this._synced = !1, this.ws = null, this.wsLastMessageReceived = 0, this.shouldConnect = i, this._resyncInterval = 0, l > 0 && (this._resyncInterval = setInterval(() => { + const f = zPe(a); + this.maxBackoffTime = u, this.bcChannel = e + "/" + r, this.url = e + "/" + r + (f.length === 0 ? "" : "?" + f), this.roomname = r, this.doc = n, this._WS = o, this.awareness = s, this.wsconnected = !1, this.wsconnecting = !1, this.bcconnected = !1, this.disableBc = h, this.wsUnsuccessfulReconnects = 0, this.messageHandlers = wk.slice(), this._synced = !1, this.ws = null, this.wsLastMessageReceived = 0, this.shouldConnect = i, this._resyncInterval = 0, l > 0 && (this._resyncInterval = setInterval(() => { if (this.ws && this.ws.readyState === WebSocket.OPEN) { - const d = Ra(); - Cr(d, F0), V9(d, n), this.ws.send(fi(d)); + const d = _a(); + kr(d, F0), R9(d, n), this.ws.send(hi(d)); } }, l)), this._bcSubscriber = (d, p) => { if (p !== this) { - const g = oue(this, new Uint8Array(d), !1); - mB(g) > 1 && i1(this.bcChannel, fi(g), this); + const g = aue(this, new Uint8Array(d), !1); + cB(g) > 1 && Km(this.bcChannel, hi(g), this); } }, this._updateHandler = (d, p) => { if (p !== this) { - const g = Ra(); - Cr(g, F0), TPe(g, d), I8(this, fi(g)); + const g = _a(); + kr(g, F0), PPe(g, d), k8(this, hi(g)); } }, this.doc.on("update", this._updateHandler), this._awarenessUpdateHandler = ({ added: d, updated: p, removed: g }, m) => { - const v = d.concat(p).concat(g), y = Ra(); - Cr(y, $1), Di( + const v = d.concat(p).concat(g), y = _a(); + kr(y, M1), Mi( y, - fx(s, v) - ), I8(this, fi(y)); + nx(s, v) + ), k8(this, hi(y)); }, this._unloadHandler = () => { - jB( + QB( this.awareness, [n.clientID], "window unload" ); - }, typeof window < "u" ? window.addEventListener("unload", this._unloadHandler) : typeof Ns < "u" && Ns.on("exit", this._unloadHandler), s.on("update", this._awarenessUpdateHandler), this._checkInterval = setInterval(() => { - this.wsconnected && MG < pp() - this.wsLastMessageReceived && this.ws.close(); - }, MG / 10), i && this.connect(); + }, typeof window < "u" ? window.addEventListener("unload", this._unloadHandler) : typeof Ds < "u" && Ds.on("exit", this._unloadHandler), s.on("update", this._awarenessUpdateHandler), this._checkInterval = setInterval(() => { + this.wsconnected && NG < dp() - this.wsLastMessageReceived && this.ws.close(); + }, NG / 10), i && this.connect(); } get synced() { return this._synced; @@ -27250,59 +27250,59 @@ class cue extends t6 { this._synced !== e && (this._synced = e, this.emit("synced", [e]), this.emit("sync", [e])); } destroy() { - this._resyncInterval !== 0 && clearInterval(this._resyncInterval), clearInterval(this._checkInterval), this.disconnect(), typeof window < "u" ? window.removeEventListener("unload", this._unloadHandler) : typeof Ns < "u" && Ns.off("exit", this._unloadHandler), this.awareness.off("update", this._awarenessUpdateHandler), this.doc.off("update", this._updateHandler), super.destroy(); + this._resyncInterval !== 0 && clearInterval(this._resyncInterval), clearInterval(this._checkInterval), this.disconnect(), typeof window < "u" ? window.removeEventListener("unload", this._unloadHandler) : typeof Ds < "u" && Ds.off("exit", this._unloadHandler), this.awareness.off("update", this._awarenessUpdateHandler), this.doc.off("update", this._updateHandler), super.destroy(); } connectBc() { if (this.disableBc) return; - this.bcconnected || (OPe(this.bcChannel, this._bcSubscriber), this.bcconnected = !0); - const e = Ra(); - Cr(e, F0), V9(e, this.doc), i1(this.bcChannel, fi(e), this); - const r = Ra(); - Cr(r, F0), nue(r, this.doc), i1(this.bcChannel, fi(r), this); - const n = Ra(); - Cr(n, aue), i1( + this.bcconnected || (LPe(this.bcChannel, this._bcSubscriber), this.bcconnected = !0); + const e = _a(); + kr(e, F0), R9(e, this.doc), Km(this.bcChannel, hi(e), this); + const r = _a(); + kr(r, F0), rue(r, this.doc), Km(this.bcChannel, hi(r), this); + const n = _a(); + kr(n, sue), Km( this.bcChannel, - fi(n), + hi(n), this ); - const i = Ra(); - Cr(i, $1), Di( + const i = _a(); + kr(i, M1), Mi( i, - fx(this.awareness, [ + nx(this.awareness, [ this.doc.clientID ]) - ), i1( + ), Km( this.bcChannel, - fi(i), + hi(i), this ); } disconnectBc() { - const e = Ra(); - Cr(e, $1), Di( + const e = _a(); + kr(e, M1), Mi( e, - fx(this.awareness, [ + nx(this.awareness, [ this.doc.clientID ], /* @__PURE__ */ new Map()) - ), I8(this, fi(e)), this.bcconnected && (kPe(this.bcChannel, this._bcSubscriber), this.bcconnected = !1); + ), k8(this, hi(e)), this.bcconnected && (MPe(this.bcChannel, this._bcSubscriber), this.bcconnected = !1); } disconnect() { this.shouldConnect = !1, this.disconnectBc(), this.ws !== null && this.ws.close(); } connect() { - this.shouldConnect = !0, !this.wsconnected && this.ws === null && (lue(this), this.connectBc()); + this.shouldConnect = !0, !this.wsconnected && this.ws === null && (oue(this), this.connectBc()); } } -const PPe = (t) => ["input", "delete", "undo", "redo"].some((e) => t.isUserEvent(e)), pw = Gt.define({ +const QPe = (t) => ["input", "delete", "undo", "redo"].some((e) => t.isUserEvent(e)), sw = Yt.define({ combine: (t) => t[t.length - 1], static: !0 -}), uue = _r.define(), NPe = fn.fromClass(class { +}), cue = Tr.define(), VPe = hn.fromClass(class { constructor(t) { this.decorations = this.colorEditorLines(t); } markAuthor(t, e) { - return Ht.line({ + return Gt.line({ attributes: { "data-line-number": e, style: ` @@ -27315,7 +27315,7 @@ const PPe = (t) => ["input", "delete", "undo", "redo"].some((e) => t.isUserEvent }); } colorEditorLines(t) { - const e = t.state.facet(pw), r = new rs(); + const e = t.state.facet(sw), r = new es(); for (let n = 1; n <= t.state.doc.lines; n++) { const i = t.state.doc.line(n), s = e.get(n); s && r.add(i.from, i.from, this.markAuthor(s, n)); @@ -27323,7 +27323,7 @@ const PPe = (t) => ["input", "delete", "undo", "redo"].some((e) => t.isUserEvent return r.finish(); } markLinesEditedInTransaction(t) { - const e = t.state.facet(pw); + const e = t.state.facet(sw); t.changes.iterChangedRanges((r, n, i, s) => { const a = t.newDoc.lineAt(i), o = t.newDoc.lineAt(s), l = t.newDoc.slice(i, s).toString().trim().length == 0, u = t.state.doc.lines - t.startState.doc.lines; if (u > 0 && (l && !o.length ? e.insert(a.number + 1, u) : a.from == i ? e.insert(a.number, u) : (e.insert(a.number, u), e.mark(o.number))), u < 0) { @@ -27334,29 +27334,29 @@ const PPe = (t) => ["input", "delete", "undo", "redo"].some((e) => t.isUserEvent }); } update(t) { - (t.docChanged || t.viewportChanged || t.transactions.some((e) => e.effects.some((r) => r.is(uue)))) && (t.transactions.filter(PPe).forEach((e) => this.markLinesEditedInTransaction(e)), this.decorations = this.colorEditorLines(t.view)), t.view.dom.onmouseleave = () => t.view.dispatch({ - effects: W9.of(null) + (t.docChanged || t.viewportChanged || t.transactions.some((e) => e.effects.some((r) => r.is(cue)))) && (t.transactions.filter(QPe).forEach((e) => this.markLinesEditedInTransaction(e)), this.decorations = this.colorEditorLines(t.view)), t.view.dom.onmouseleave = () => t.view.dispatch({ + effects: L9.of(null) }), t.view.dom.querySelectorAll(".cm-line").forEach((e) => { e.onmouseenter = (r) => t.view.dispatch({ - effects: W9.of(parseInt(r.target.dataset.lineNumber)) + effects: L9.of(parseInt(r.target.dataset.lineNumber)) }); }); } }, { decorations: (t) => t.decorations -}), W9 = _r.define(), GT = ai.define({ +}), L9 = Tr.define(), MT = ii.define({ create() { return null; }, update(t, e) { var i; - const r = e.state.facet(pw), n = (i = e.effects.find((s) => s.is(W9))) == null ? void 0 : i.value; + const r = e.state.facet(sw), n = (i = e.effects.find((s) => s.is(L9))) == null ? void 0 : i.value; return n ? r.firstLineOfSection(n) : null; } }); -class DG extends hc { +class IG extends sc { constructor(e, r) { - super(), r && e && (this.lineNumber = r.state.doc.lineAt(e.to).number, this.lineAuthors = r.state.facet(pw), this.selectedLine = r.state.facet(GT)); + super(), r && e && (this.lineNumber = r.state.doc.lineAt(e.to).number, this.lineAuthors = r.state.facet(sw), this.selectedLine = r.state.facet(MT)); } authorAvatar() { const { @@ -27369,11 +27369,11 @@ class DG extends hc { return this.selectedLine && this.selectedLine == this.lineNumber ? this.authorAvatar() : document.createElement("div"); } } -const IPe = G_({ - lineMarker: (t, e) => new DG(e, t), - lineMarkerChange: (t) => t.startState.field(GT) != t.state.field(GT), - initialSpacer: () => new DG(null, null) -}), $Pe = (t) => [pw.of(t), GT.init(null), IPe, NPe], im = gr.button` +const WPe = D_({ + lineMarker: (t, e) => new IG(e, t), + lineMarkerChange: (t) => t.startState.field(MT) != t.state.field(MT), + initialSpacer: () => new IG(null, null) +}), YPe = (t) => [sw.of(t), MT.init(null), WPe, VPe], gp = mr.button` &:focus { outline: 0 !important; } @@ -27403,12 +27403,12 @@ const IPe = G_({ padding: 0px 15px; } `; -_r.define(); -const hue = new Hf(); -function BPe(t) { +Tr.define(); +const uue = new Qf(); +function GPe(t) { return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } -function FPe({ +function HPe({ commentId: t, text: e, color: r @@ -27425,7 +27425,7 @@ function FPe({ l.length === 0 ? o = !0 : a = l, s = s.slice(0, s.indexOf("->")).trimEnd(); } s.length !== 0 && n.push({ - targetRegexSrc: `(?<=^|[ \\t\\r\\.]|\\W)${BPe(s)}(?=$|[\\s\\.]|\\W)`, + targetRegexSrc: `(?<=^|[ \\t\\r\\.]|\\W)${GPe(s)}(?=$|[\\s\\.]|\\W)`, targetRegexFlags: "gm", id: t, cssClass: "cm-suggestion", @@ -27436,7 +27436,7 @@ function FPe({ } return n; } -function zPe({ +function XPe({ builder: t, from: e, match: r, @@ -27448,8 +27448,8 @@ function zPe({ style: `color: ${n.color}` }), n.remove) return () => { - t.add(e + r.index, e + r.index + r[0].length, Ht.replace({ - widget: new PG({ + t.add(e + r.index, e + r.index + r[0].length, Gt.replace({ + widget: new $G({ text: s.state.doc.toString().slice(e + r.index, e + r.index + r[0].length), color: n.color, from: e + r.index, @@ -27461,8 +27461,8 @@ function zPe({ }; if (n.replacement) return i.class += " replaced", () => { - t.add(e + r.index + r[0].length, e + r.index + r[0].length, Ht.widget({ - widget: new PG({ + t.add(e + r.index + r[0].length, e + r.index + r[0].length, Gt.widget({ + widget: new $G({ text: n.replacement, color: n.color, from: e + r.index, @@ -27472,7 +27472,7 @@ function zPe({ })); }; } -class PG extends el { +class $G extends Zo { constructor({ text: e, color: r, @@ -27496,7 +27496,7 @@ class PG extends el { }), e; } } -function qPe(t, e, r) { +function ZPe(t, e, r) { const n = r.current.querySelector(".myst-add-suggestion"), i = t.state.selection.main, s = i.head === i.anchor, a = t.state.doc.lineAt(i.head).number !== t.state.doc.lineAt(i.anchor).number; if (!t.view.hasFocus || s || a) { n.style.display = "none"; @@ -27523,19 +27523,19 @@ function qPe(t, e, r) { ` + w : O = e.newComment(g.number), e.ydoc.transact(() => { const T = e.getTextForComment(O); T.insert(T.length, w); - const D = e.lineAuthors(O); - D.mark(D.lineAuthors.length); + const M = e.lineAuthors(O); + M.mark(M.lineAuthors.length); }, e.provider.awareness.clientID), e.display().updateComment(O, { isShown: !0 }), e.updateMainCodeMirror(); const S = await e.getEditorForComment(O); S.focus(), S.dispatch({ - selection: ft.create([ft.range(S.state.doc.length - 1, S.state.doc.length - 1)]), - effects: uue.of(null) + selection: ut.create([ut.range(S.state.doc.length - 1, S.state.doc.length - 1)]), + effects: cue.of(null) }); }; } -const UPe = gr(im)` +const jPe = mr(gp)` position: absolute; z-index: 10; display: none; @@ -27574,16 +27574,16 @@ const UPe = gr(im)` border-top: 10px solid var(--icon-border); } `; -var QPe = Symbol.for("preact-signals"); -function d6() { - if (Vd > 1) - Vd--; +var KPe = Symbol.for("preact-signals"); +function J_() { + if (zd > 1) + zd--; else { - for (var t, e = !1; dx !== void 0; ) { - var r = dx; - for (dx = void 0, Y9++; r !== void 0; ) { + for (var t, e = !1; ix !== void 0; ) { + var r = ix; + for (ix = void 0, M9++; r !== void 0; ) { var n = r.o; - if (r.o = void 0, r.f &= -3, !(8 & r.f) && due(r)) + if (r.o = void 0, r.f &= -3, !(8 & r.f) && fue(r)) try { r.c(); } catch (i) { @@ -27592,102 +27592,102 @@ function d6() { r = n; } } - if (Y9 = 0, Vd--, e) + if (M9 = 0, zd--, e) throw t; } } -function s1(t) { - if (Vd > 0) +function Jm(t) { + if (zd > 0) return t(); - Vd++; + zd++; try { return t(); } finally { - d6(); + J_(); } } -var In = void 0, dx = void 0, Vd = 0, Y9 = 0, HT = 0; -function fue(t) { - if (In !== void 0) { +var Nn = void 0, ix = void 0, zd = 0, M9 = 0, DT = 0; +function hue(t) { + if (Nn !== void 0) { var e = t.n; - if (e === void 0 || e.t !== In) - return e = { i: 0, S: t, p: In.s, n: void 0, t: In, e: void 0, x: void 0, r: e }, In.s !== void 0 && (In.s.n = e), In.s = e, t.n = e, 32 & In.f && t.S(e), e; + if (e === void 0 || e.t !== Nn) + return e = { i: 0, S: t, p: Nn.s, n: void 0, t: Nn, e: void 0, x: void 0, r: e }, Nn.s !== void 0 && (Nn.s.n = e), Nn.s = e, t.n = e, 32 & Nn.f && t.S(e), e; if (e.i === -1) - return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = In.s, e.n = void 0, In.s.n = e, In.s = e), e; + return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = Nn.s, e.n = void 0, Nn.s.n = e, Nn.s = e), e; } } -function ga(t) { +function ha(t) { this.v = t, this.i = 0, this.n = void 0, this.t = void 0; } -ga.prototype.brand = QPe; -ga.prototype.h = function() { +ha.prototype.brand = KPe; +ha.prototype.h = function() { return !0; }; -ga.prototype.S = function(t) { +ha.prototype.S = function(t) { this.t !== t && t.e === void 0 && (t.x = this.t, this.t !== void 0 && (this.t.e = t), this.t = t); }; -ga.prototype.U = function(t) { +ha.prototype.U = function(t) { if (this.t !== void 0) { var e = t.e, r = t.x; e !== void 0 && (e.x = r, t.e = void 0), r !== void 0 && (r.e = e, t.x = void 0), t === this.t && (this.t = r); } }; -ga.prototype.subscribe = function(t) { +ha.prototype.subscribe = function(t) { var e = this; - return Lk(function() { - var r = e.value, n = In; - In = void 0; + return qd(function() { + var r = e.value, n = Nn; + Nn = void 0; try { t(r); } finally { - In = n; + Nn = n; } }); }; -ga.prototype.valueOf = function() { +ha.prototype.valueOf = function() { return this.value; }; -ga.prototype.toString = function() { +ha.prototype.toString = function() { return this.value + ""; }; -ga.prototype.toJSON = function() { +ha.prototype.toJSON = function() { return this.value; }; -ga.prototype.peek = function() { - var t = In; - In = void 0; +ha.prototype.peek = function() { + var t = Nn; + Nn = void 0; try { return this.value; } finally { - In = t; + Nn = t; } }; -Object.defineProperty(ga.prototype, "value", { get: function() { - var t = fue(this); +Object.defineProperty(ha.prototype, "value", { get: function() { + var t = hue(this); return t !== void 0 && (t.i = this.i), this.v; }, set: function(t) { if (t !== this.v) { - if (Y9 > 100) + if (M9 > 100) throw new Error("Cycle detected"); - this.v = t, this.i++, HT++, Vd++; + this.v = t, this.i++, DT++, zd++; try { for (var e = this.t; e !== void 0; e = e.x) e.t.N(); } finally { - d6(); + J_(); } } } }); -function Fo(t) { - return new ga(t); +function ea(t) { + return new ha(t); } -function due(t) { +function fue(t) { for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0; return !1; } -function pue(t) { +function due(t) { for (var e = t.s; e !== void 0; e = e.n) { var r = e.S.n; if (r !== void 0 && (e.r = r), e.S.n = e, e.i = -1, e.n === void 0) { @@ -27696,95 +27696,95 @@ function pue(t) { } } } -function gue(t) { +function pue(t) { for (var e = t.s, r = void 0; e !== void 0; ) { var n = e.p; e.i === -1 ? (e.S.U(e), n !== void 0 && (n.n = e.n), e.n !== void 0 && (e.n.p = n)) : r = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = n; } t.s = r; } -function zy(t) { - ga.call(this, void 0), this.x = t, this.s = void 0, this.g = HT - 1, this.f = 4; +function $y(t) { + ha.call(this, void 0), this.x = t, this.s = void 0, this.g = DT - 1, this.f = 4; } -(zy.prototype = new ga()).h = function() { +($y.prototype = new ha()).h = function() { if (this.f &= -3, 1 & this.f) return !1; - if ((36 & this.f) == 32 || (this.f &= -5, this.g === HT)) + if ((36 & this.f) == 32 || (this.f &= -5, this.g === DT)) return !0; - if (this.g = HT, this.f |= 1, this.i > 0 && !due(this)) + if (this.g = DT, this.f |= 1, this.i > 0 && !fue(this)) return this.f &= -2, !0; - var t = In; + var t = Nn; try { - pue(this), In = this; + due(this), Nn = this; var e = this.x(); (16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++); } catch (r) { this.v = r, this.f |= 16, this.i++; } - return In = t, gue(this), this.f &= -2, !0; + return Nn = t, pue(this), this.f &= -2, !0; }; -zy.prototype.S = function(t) { +$y.prototype.S = function(t) { if (this.t === void 0) { this.f |= 36; for (var e = this.s; e !== void 0; e = e.n) e.S.S(e); } - ga.prototype.S.call(this, t); + ha.prototype.S.call(this, t); }; -zy.prototype.U = function(t) { - if (this.t !== void 0 && (ga.prototype.U.call(this, t), this.t === void 0)) { +$y.prototype.U = function(t) { + if (this.t !== void 0 && (ha.prototype.U.call(this, t), this.t === void 0)) { this.f &= -33; for (var e = this.s; e !== void 0; e = e.n) e.S.U(e); } }; -zy.prototype.N = function() { +$y.prototype.N = function() { if (!(2 & this.f)) { this.f |= 6; for (var t = this.t; t !== void 0; t = t.x) t.t.N(); } }; -Object.defineProperty(zy.prototype, "value", { get: function() { +Object.defineProperty($y.prototype, "value", { get: function() { if (1 & this.f) throw new Error("Cycle detected"); - var t = fue(this); + var t = hue(this); if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v; return this.v; } }); -function p6(t) { - return new zy(t); +function Ok(t) { + return new $y(t); } -function mue(t) { +function gue(t) { var e = t.u; if (t.u = void 0, typeof e == "function") { - Vd++; - var r = In; - In = void 0; + zd++; + var r = Nn; + Nn = void 0; try { e(); } catch (n) { - throw t.f &= -2, t.f |= 8, ZB(t), n; + throw t.f &= -2, t.f |= 8, VB(t), n; } finally { - In = r, d6(); + Nn = r, J_(); } } } -function ZB(t) { +function VB(t) { for (var e = t.s; e !== void 0; e = e.n) e.S.U(e); - t.x = void 0, t.s = void 0, mue(t); + t.x = void 0, t.s = void 0, gue(t); } -function VPe(t) { - if (In !== this) +function JPe(t) { + if (Nn !== this) throw new Error("Out-of-order effect"); - gue(this), In = t, this.f &= -2, 8 & this.f && ZB(this), d6(); + pue(this), Nn = t, this.f &= -2, 8 & this.f && VB(this), J_(); } -function Rk(t) { +function kk(t) { this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32; } -Rk.prototype.c = function() { +kk.prototype.c = function() { var t = this.S(); try { if (8 & this.f || this.x === void 0) @@ -27795,21 +27795,21 @@ Rk.prototype.c = function() { t(); } }; -Rk.prototype.S = function() { +kk.prototype.S = function() { if (1 & this.f) throw new Error("Cycle detected"); - this.f |= 1, this.f &= -9, mue(this), pue(this), Vd++; - var t = In; - return In = this, VPe.bind(this, t); + this.f |= 1, this.f &= -9, gue(this), due(this), zd++; + var t = Nn; + return Nn = this, JPe.bind(this, t); }; -Rk.prototype.N = function() { - 2 & this.f || (this.f |= 2, this.o = dx, dx = this); +kk.prototype.N = function() { + 2 & this.f || (this.f |= 2, this.o = ix, ix = this); }; -Rk.prototype.d = function() { - this.f |= 8, 1 & this.f || ZB(this); +kk.prototype.d = function() { + this.f |= 8, 1 & this.f || VB(this); }; -function Lk(t) { - var e = new Rk(t); +function qd(t) { + var e = new kk(t); try { e.c(); } catch (r) { @@ -27817,18 +27817,18 @@ function Lk(t) { } return e.d.bind(e); } -var g6, $8; -function qy(t, e) { +var e6, S8; +function By(t, e) { cr[t] = e.bind(null, cr[t] || function() { }); } -function XT(t) { - $8 && $8(), $8 = t && t.S(); +function PT(t) { + S8 && S8(), S8 = t && t.S(); } -function vue(t) { - var e = this, r = t.data, n = Pi(r); +function mue(t) { + var e = this, r = t.data, n = ui(r); n.value = r; - var i = $s(function() { + var i = Ns(function() { for (var s = e.__v; s = s.__; ) if (s.__c) { s.__c.__$f |= 4; @@ -27836,46 +27836,46 @@ function vue(t) { } return e.__$u.c = function() { var a; - !jne(i.peek()) && ((a = e.base) == null ? void 0 : a.nodeType) === 3 ? e.base.data = i.peek() : (e.__$f |= 1, e.setState({})); - }, p6(function() { + !Hne(i.peek()) && ((a = e.base) == null ? void 0 : a.nodeType) === 3 ? e.base.data = i.peek() : (e.__$f |= 1, e.setState({})); + }, Ok(function() { var a = n.value.value; return a === 0 ? 0 : a === !0 ? "" : a || ""; }); }, []); return i.value; } -vue.displayName = "_st"; -Object.defineProperties(ga.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: vue }, props: { configurable: !0, get: function() { +mue.displayName = "_st"; +Object.defineProperties(ha.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: mue }, props: { configurable: !0, get: function() { return { data: this }; } }, __b: { configurable: !0, value: 1 } }); -qy("__b", function(t, e) { +By("__b", function(t, e) { if (typeof e.type == "string") { var r, n = e.props; for (var i in n) if (i !== "children") { var s = n[i]; - s instanceof ga && (r || (e.__np = r = {}), r[i] = s, n[i] = s.peek()); + s instanceof ha && (r || (e.__np = r = {}), r[i] = s, n[i] = s.peek()); } } t(e); }); -qy("__r", function(t, e) { - XT(); +By("__r", function(t, e) { + PT(); var r, n = e.__c; n && (n.__$f &= -2, (r = n.__$u) === void 0 && (n.__$u = r = function(i) { var s; - return Lk(function() { + return qd(function() { s = this; }), s.c = function() { n.__$f |= 1, n.setState({}); }, s; - }())), g6 = n, XT(r), t(e); + }())), e6 = n, PT(r), t(e); }); -qy("__e", function(t, e, r, n) { - XT(), g6 = void 0, t(e, r, n); +By("__e", function(t, e, r, n) { + PT(), e6 = void 0, t(e, r, n); }); -qy("diffed", function(t, e) { - XT(), g6 = void 0; +By("diffed", function(t, e) { + PT(), e6 = void 0; var r; if (typeof e.type == "string" && (r = e.__e)) { var n = e.__np, i = e.props; @@ -27890,22 +27890,22 @@ qy("diffed", function(t, e) { r.U = s = {}; for (var l in n) { var u = s[l], h = n[l]; - u === void 0 ? (u = WPe(r, l, h, i), s[l] = u) : u.o(h, i); + u === void 0 ? (u = eNe(r, l, h, i), s[l] = u) : u.o(h, i); } } } t(e); }); -function WPe(t, e, r, n) { - var i = e in t && t.ownerSVGElement === void 0, s = Fo(r); +function eNe(t, e, r, n) { + var i = e in t && t.ownerSVGElement === void 0, s = ea(r); return { o: function(a, o) { s.value = a, n = o; - }, d: Lk(function() { + }, d: qd(function() { var a = s.value.value; n[e] !== a && (n[e] = a, i ? t[e] = a : a ? t.setAttribute(e, a) : t.removeAttribute(e)); }) }; } -qy("unmount", function(t, e) { +By("unmount", function(t, e) { if (typeof e.type == "string") { var r = e.__e; if (r) { @@ -27927,10 +27927,10 @@ qy("unmount", function(t, e) { } t(e); }); -qy("__h", function(t, e, r, n) { +By("__h", function(t, e, r, n) { (n < 3 || n === 9) && (e.__$f |= 2), t(e, r, n); }); -Wc.prototype.shouldComponentUpdate = function(t, e) { +qc.prototype.shouldComponentUpdate = function(t, e) { var r = this.__$u; if (!(r && r.s !== void 0 || 4 & this.__$f) || 3 & this.__$f) return !0; @@ -27944,34 +27944,34 @@ Wc.prototype.shouldComponentUpdate = function(t, e) { return !0; return !1; }; -function Pi(t) { - return $s(function() { - return Fo(t); +function ui(t) { + return Ns(function() { + return ea(t); }, []); } -function tg(t) { - var e = ts(t); - return e.current = t, g6.__$f |= 4, $s(function() { - return p6(function() { +function D1(t) { + var e = $i(t); + return e.current = t, e6.__$f |= 4, Ns(function() { + return Ok(function() { return e.current(); }); }, []); } -function Uc(t) { - var e = ts(t); - e.current = t, Ji(function() { - return Lk(function() { +function Bc(t) { + var e = $i(t); + e.current = t, ca(function() { + return qd(function() { return e.current(); }); }, []); } -const NG = bo.define(), yue = bo.define(), bue = bo.define(); -class YPe { +const BG = vo.define(), vue = vo.define(), yue = vo.define(); +class tNe { constructor(e) { - this.view = e, this.conf = e.state.facet(_k), this._observer = (r, n) => { + this.view = e, this.conf = e.state.facet(xk), this._observer = (r, n) => { if (n.origin !== this.conf) { - const i = [NG.of(this.conf)]; - n.local ? i.push(bue.of(!0)) : i.push(yue.of(!0)); + const i = [BG.of(this.conf)]; + n.local ? i.push(yue.of(!0)) : i.push(vue.of(!0)); const s = r.delta, a = []; let o = 0; for (let l = 0; l < s.length; l++) { @@ -27994,7 +27994,7 @@ class YPe { }, this._ytext = this.conf.ytext, this._ytext.observe(this._observer); } update(e) { - if (!e.docChanged || e.transactions.length > 0 && e.transactions[0].annotation(NG) === this.conf) + if (!e.docChanged || e.transactions.length > 0 && e.transactions[0].annotation(BG) === this.conf) return; const r = this.conf.ytext; r.doc.transact(() => { @@ -28010,8 +28010,8 @@ class YPe { this._ytext.unobserve(this._observer); } } -const GPe = fn.fromClass(YPe), HPe = () => "comment-" + Math.random().toString().replace(".", ""); -class XPe { +const rNe = hn.fromClass(tNe), nNe = () => "comment-" + Math.random().toString().replace(".", ""); +class iNe { constructor(e, r, n, i, s) { this.user = r.awareness.getLocalState().user, this.lineAuthors = e.getArray(s + "/commentLineAuthors"), this.ydoc = e, this.getAvatar = n, this.getUserUrl = i, this.commentId = s; } @@ -28029,7 +28029,7 @@ class XPe { } mark(e) { for (; e >= this.lineAuthors.length; ) - this.lineAuthors.push([new sh()]); + this.lineAuthors.push([new eh()]); this.lineAuthors.get(e - 1).set("author", this.user); } remove(e, r) { @@ -28037,8 +28037,8 @@ class XPe { } insert(e, r) { e - 1 > this.lineAuthors.length && this.lineAuthors.push( - [...Array(e - 1 - this.lineAuthors.length).keys()].map((n) => new sh()) - ), this.lineAuthors.insert(e - 1, [...Array(r).keys()].map((n) => new sh([["author", this.user]]))); + [...Array(e - 1 - this.lineAuthors.length).keys()].map((n) => new eh()) + ), this.lineAuthors.insert(e - 1, [...Array(r).keys()].map((n) => new eh([["author", this.user]]))); } firstLineOfSection(e) { const r = this.get(e).name; @@ -28054,9 +28054,9 @@ class XPe { ); } } -class jPe { +class sNe { constructor(e, r) { - this.syncedPositions = e.getMap(px.dataPath), this.positions = Fo([]), this.syncedPositions.observe(() => { + this.syncedPositions = e.getMap(sx.dataPath), this.positions = ea([]), this.syncedPositions.observe(() => { this.positions.value = [...this.syncedPositions.entries()].map(([n, i]) => ({ commentId: n, lineNumber: parseInt(i) @@ -28081,9 +28081,9 @@ class jPe { this.ydoc.transact(() => this.syncedPositions.delete(e), "comments"); } } -class ZPe { +class aNe { constructor() { - this.comments = Fo({}); + this.comments = ea({}); } switchVisibility(e) { const r = this.isShown(e); @@ -28121,7 +28121,7 @@ class ZPe { }; } } -class KPe { +class oNe { constructor(e, r) { this.user = e.awareness.getLocalState().user, this.resolvedComments = r.getMap("resolved-comments"), this.ydoc = r; } @@ -28153,9 +28153,9 @@ class KPe { this.resolvedComments.observe(() => e(this.resolved())); } } -const BQ = class { +const LQ = class { constructor(e, r, n, i) { - this.ydoc = e, this.provider = r, this.getAvatar = n, this.getUserUrl = i, this.mainCodeMirror = null, this.newLocalComment = !1, this.positionManager = new jPe(e, this), this.displayManager = new ZPe(r), this.commentResolver = new KPe(r, e), this.draggedComment = Fo(null), this.commentWithPopup = Fo(null), this.comments = p6(() => this.positions().positions.value.map(({ + this.ydoc = e, this.provider = r, this.getAvatar = n, this.getUserUrl = i, this.mainCodeMirror = null, this.newLocalComment = !1, this.positionManager = new sNe(e, this), this.displayManager = new aNe(r), this.commentResolver = new oNe(r, e), this.draggedComment = ea(null), this.commentWithPopup = ea(null), this.comments = Ok(() => this.positions().positions.value.map(({ commentId: s, lineNumber: a }) => ({ @@ -28170,13 +28170,13 @@ const BQ = class { target: new RegExp(a.targetRegexSrc, a.targetRegexFlags) })); this.mainCodeMirror.dispatch({ - effects: hue.reconfigure(GB(s, zPe, this.positions())), - annotations: Fi.userEvent.of("suggestion") + effects: uue.reconfigure(zB(s, XPe, this.positions())), + annotations: Bi.userEvent.of("suggestion") }); }), this.positionManager.syncedPositions.observeDeep(() => this.updateMainCodeMirror()); } lineAuthors(e) { - return new XPe(this.ydoc, this.provider, this.getAvatar, this.getUserUrl, e); + return new iNe(this.ydoc, this.provider, this.getAvatar, this.getUserUrl, e); } positions() { return this.positionManager; @@ -28194,14 +28194,14 @@ const BQ = class { return this.mainCodeMirror.dom.querySelector(".cm-gutters").offsetWidth; } getTextForComment(e) { - return this.ydoc.getText(BQ.commentsPrefix + e); + return this.ydoc.getText(LQ.commentsPrefix + e); } delText(e) { let r = this.getTextForComment(e); r != null && r.parent && r.delete(); } newComment(e) { - const r = HPe(); + const r = nNe(); return this.positions().set(r, e.toString()), this.display().new(r), this.lineAuthors(r).mark(1), this.newLocalComment = !0, r; } deleteComment(e) { @@ -28255,12 +28255,12 @@ const BQ = class { e.includes(r) || (this.display().del(r), this.suggestions.set(r, [])); } syncFoldedComments(e) { - if (!xN(e)) + if (!hN(e)) return; - const r = e.transactions[0].effects[0].is(Ef), { + const r = e.transactions[0].effects[0].is(Of), { from: n, to: i - } = e.transactions[0].effects[0].value, s = e.state.doc.lineAt(n).number, a = e.state.doc.lineAt(i).number, o = q_e(e.state).iter(0), l = []; + } = e.transactions[0].effects[0].value, s = e.state.doc.lineAt(n).number, a = e.state.doc.lineAt(i).number, o = Z_e(e.state).iter(0), l = []; for (let u = o; u.value != null; o.next()) (u.from != n || u.to != i) && l.push({ fromLine: e.state.doc.lineAt(u.from).number, @@ -28291,7 +28291,7 @@ const BQ = class { color: (h = (u = s.get(l + 1)) == null ? void 0 : u.color) != null ? h : "#111" }; }); - r[n] = a.flatMap(FPe); + r[n] = a.flatMap(HPe); } this.suggestions.doc.transact(() => { for (const [n, i] of Object.entries(r)) @@ -28300,11 +28300,11 @@ const BQ = class { } updateMainCodeMirror() { this.mainCodeMirror ? this.mainCodeMirror.dispatch({ - effects: gw.of(null) + effects: aw.of(null) }) : console.warn("[YComments] Failed to update the main CodeMirror instance since it doesn't exist."); } syncResolvedComments(e) { - const r = !e.docChanged || e.transactions.some((s) => s.annotation(yue)), n = e.transactions.some((s) => s.effects.some((a) => a.is(gw))); + const r = !e.docChanged || e.transactions.some((s) => s.annotation(vue)), n = e.transactions.some((s) => s.effects.some((a) => a.is(aw))); if (r && !n) return; const i = this.resolver().resolved(); @@ -28376,7 +28376,7 @@ const BQ = class { }); } mapThroughChanges(e, r, n = !1) { - const i = r.startState.doc.line(e.lineNumber).from, s = r.changes.mapPos(i, 1), a = r.changes.mapPos(i, 1, gi.TrackDel) == null, o = r.changes.mapPos(i, 1, gi.TrackBefore) == null && (!n || r.startState.doc.line(e.lineNumber).text == ""); + const i = r.startState.doc.line(e.lineNumber).from, s = r.changes.mapPos(i, 1), a = r.changes.mapPos(i, 1, pi.TrackDel) == null, o = r.changes.mapPos(i, 1, pi.TrackBefore) == null && (!n || r.startState.doc.line(e.lineNumber).text == ""); let l = !1; return r.changes.iterChangedRanges((u) => { u == i && (l = !0); @@ -28422,7 +28422,7 @@ const BQ = class { for (const a in i) { const o = this.lineAuthors(a); i[a].forEach((l) => { - const u = new sh(); + const u = new eh(); l.author && u.set("author", l.author), o.lineAuthors.push([u]); }); } @@ -28431,13 +28431,13 @@ const BQ = class { }); } }; -let px = BQ; -zt(px, "commentsPrefix", "comments/"); -const m6 = Gt.define({ +let sx = LQ; +zt(sx, "commentsPrefix", "comments/"); +const t6 = Yt.define({ combine: (t) => t[t.length - 1], static: !0 -}), gw = _r.define(); -class JPe extends el { +}), aw = Tr.define(); +class lNe extends Zo { constructor(e, r, n) { super(), this.height = e, this.commentId = r, this.isShown = n; } @@ -28449,12 +28449,12 @@ class JPe extends el { return e.id = this.commentId, e.classList = "comment-box", this.isShown || (e.classList += " comment-box-hidden"), e.style.height = this.height + "px", e; } } -const eNe = (t, e, r) => Ht.widget({ - widget: new JPe(t, e, r), +const cNe = (t, e, r) => Gt.widget({ + widget: new lNe(t, e, r), side: 1e4, inlineOrder: !1, block: r -}), tNe = (t, e) => t.lineNumber - e.lineNumber, rNe = (t) => t.docChanged || t.effects.some((e) => e.is(gw)), nNe = (t) => [(e, { +}), uNe = (t, e) => t.lineNumber - e.lineNumber, hNe = (t) => t.docChanged || t.effects.some((e) => e.is(aw)), fNe = (t) => [(e, { commentId: r, lineNumber: n, height: i, @@ -28464,13 +28464,13 @@ const eNe = (t, e, r) => Ht.widget({ return e; try { const a = t.newDoc.line(n).to; - e.add(a, a, eNe(i, r, s)); + e.add(a, a, cNe(i, r, s)); } catch (a) { console.warn(a), console.warn(`An error occured when rendering comment ${r}. Comment will not be shown.`); } return e; -}, new rs()], iNe = (t, e) => { - if ((t.isUserEvent("input") || t.isUserEvent("delete") || t.annotation(bue)) && t.startState.doc.lines != t.state.doc.lines) { +}, new es()], dNe = (t, e) => { + if ((t.isUserEvent("input") || t.isUserEvent("delete") || t.annotation(yue)) && t.startState.doc.lines != t.state.doc.lines) { const r = []; e.positions().positions.value.forEach((n) => { const { @@ -28482,24 +28482,24 @@ const eNe = (t, e, r) => Ht.widget({ i ? e.deleteComment(n.commentId) : s != a && (r.push(n.commentId), e.positions().move(n.commentId, o, !1)); }), e.syncSuggestions(...r); } -}, sNe = ai.define({ +}, pNe = ii.define({ create() { - return new rs().finish(); + return new es().finish(); }, update(t, e) { - if (rNe(e)) { - const r = e.state.facet(m6); - return iNe(e, r), r.comments.value.sort(tNe).reduce(...nNe(e)).finish(); + if (hNe(e)) { + const r = e.state.facet(t6); + return dNe(e, r), r.comments.value.sort(uNe).reduce(...fNe(e)).finish(); } return t; }, provide(t) { - return Mt.decorations.from(t); + return Rt.decorations.from(t); } -}), D0 = class extends hc { +}), D0 = class extends sc { constructor(e, r) { var n; - super(), this.gutterMarker = null, this.icon = null, r && e && (this.ycomments = r.state.facet(m6), this.lineNumber = r.state.doc.lineAt(e.to).number, this.commentId = (n = this.ycomments.findCommentOn(this.lineNumber)) == null ? void 0 : n.commentId); + super(), this.gutterMarker = null, this.icon = null, r && e && (this.ycomments = r.state.facet(t6), this.lineNumber = r.state.doc.lineAt(e.to).number, this.commentId = (n = this.ycomments.findCommentOn(this.lineNumber)) == null ? void 0 : n.commentId); } hasComments() { return Boolean(this.commentId); @@ -28521,6916 +28521,6590 @@ const eNe = (t, e, r) => Ht.widget({ }; let S0 = D0; zt(S0, "MAIN_CLASS", "comment-gutter"), zt(S0, "ICON_CLASS", "comment-gutter-icon"), zt(S0, "COMMENT_IMAGE_CLASS", "comment-image"); -const aNe = (t, e, r) => { +const gNe = (t, e, r) => { var s; const n = t.state.doc.lineAt(e.to).number, i = (s = r.findCommentOn(n)) == null ? void 0 : s.commentId; return i || r.newComment(n); -}, oNe = G_({ +}, mNe = D_({ lineMarker(t, e) { return new S0(e, t); }, - lineMarkerChange: (t) => t.transactions.some((e) => e.effects.some((r) => r.is(gw))), + lineMarkerChange: (t) => t.transactions.some((e) => e.effects.some((r) => r.is(aw))), initialSpacer: () => new S0(null, null), domEventHandlers: { click(t, e) { - let r = t.state.facet(m6.reader), n = aNe(t, e, r); + let r = t.state.facet(t6.reader), n = gNe(t, e, r); r.display().switchVisibility(n), t.dispatch({ - effects: gw.of(null) + effects: aw.of(null) }); } } -}), lNe = (t) => [m6.of(t), sNe, oNe, Mt.updateListener.of((e) => t.syncComments(e))]; -class Zf { - constructor(e) { - this.state = e; - } - run(e) { - return []; - } +}), vNe = (t) => [t6.of(t), pNe, mNe, Rt.updateListener.of((e) => t.syncComments(e))]; +var bue = { exports: {} }, mn = {}, WB = { exports: {} }; +const yNe = "\xC1", bNe = "\xE1", xNe = "\u0102", wNe = "\u0103", ONe = "\u223E", kNe = "\u223F", SNe = "\u223E\u0333", TNe = "\xC2", CNe = "\xE2", ENe = "\xB4", _Ne = "\u0410", ANe = "\u0430", RNe = "\xC6", LNe = "\xE6", MNe = "\u2061", DNe = "\u{1D504}", PNe = "\u{1D51E}", NNe = "\xC0", INe = "\xE0", $Ne = "\u2135", BNe = "\u2135", FNe = "\u0391", zNe = "\u03B1", qNe = "\u0100", UNe = "\u0101", QNe = "\u2A3F", VNe = "&", WNe = "&", YNe = "\u2A55", GNe = "\u2A53", HNe = "\u2227", XNe = "\u2A5C", ZNe = "\u2A58", jNe = "\u2A5A", KNe = "\u2220", JNe = "\u29A4", eIe = "\u2220", tIe = "\u29A8", rIe = "\u29A9", nIe = "\u29AA", iIe = "\u29AB", sIe = "\u29AC", aIe = "\u29AD", oIe = "\u29AE", lIe = "\u29AF", cIe = "\u2221", uIe = "\u221F", hIe = "\u22BE", fIe = "\u299D", dIe = "\u2222", pIe = "\xC5", gIe = "\u237C", mIe = "\u0104", vIe = "\u0105", yIe = "\u{1D538}", bIe = "\u{1D552}", xIe = "\u2A6F", wIe = "\u2248", OIe = "\u2A70", kIe = "\u224A", SIe = "\u224B", TIe = "'", CIe = "\u2061", EIe = "\u2248", _Ie = "\u224A", AIe = "\xC5", RIe = "\xE5", LIe = "\u{1D49C}", MIe = "\u{1D4B6}", DIe = "\u2254", PIe = "*", NIe = "\u2248", IIe = "\u224D", $Ie = "\xC3", BIe = "\xE3", FIe = "\xC4", zIe = "\xE4", qIe = "\u2233", UIe = "\u2A11", QIe = "\u224C", VIe = "\u03F6", WIe = "\u2035", YIe = "\u223D", GIe = "\u22CD", HIe = "\u2216", XIe = "\u2AE7", ZIe = "\u22BD", jIe = "\u2305", KIe = "\u2306", JIe = "\u2305", e$e = "\u23B5", t$e = "\u23B6", r$e = "\u224C", n$e = "\u0411", i$e = "\u0431", s$e = "\u201E", a$e = "\u2235", o$e = "\u2235", l$e = "\u2235", c$e = "\u29B0", u$e = "\u03F6", h$e = "\u212C", f$e = "\u212C", d$e = "\u0392", p$e = "\u03B2", g$e = "\u2136", m$e = "\u226C", v$e = "\u{1D505}", y$e = "\u{1D51F}", b$e = "\u22C2", x$e = "\u25EF", w$e = "\u22C3", O$e = "\u2A00", k$e = "\u2A01", S$e = "\u2A02", T$e = "\u2A06", C$e = "\u2605", E$e = "\u25BD", _$e = "\u25B3", A$e = "\u2A04", R$e = "\u22C1", L$e = "\u22C0", M$e = "\u290D", D$e = "\u29EB", P$e = "\u25AA", N$e = "\u25B4", I$e = "\u25BE", $$e = "\u25C2", B$e = "\u25B8", F$e = "\u2423", z$e = "\u2592", q$e = "\u2591", U$e = "\u2593", Q$e = "\u2588", V$e = "=\u20E5", W$e = "\u2261\u20E5", Y$e = "\u2AED", G$e = "\u2310", H$e = "\u{1D539}", X$e = "\u{1D553}", Z$e = "\u22A5", j$e = "\u22A5", K$e = "\u22C8", J$e = "\u29C9", eBe = "\u2510", tBe = "\u2555", rBe = "\u2556", nBe = "\u2557", iBe = "\u250C", sBe = "\u2552", aBe = "\u2553", oBe = "\u2554", lBe = "\u2500", cBe = "\u2550", uBe = "\u252C", hBe = "\u2564", fBe = "\u2565", dBe = "\u2566", pBe = "\u2534", gBe = "\u2567", mBe = "\u2568", vBe = "\u2569", yBe = "\u229F", bBe = "\u229E", xBe = "\u22A0", wBe = "\u2518", OBe = "\u255B", kBe = "\u255C", SBe = "\u255D", TBe = "\u2514", CBe = "\u2558", EBe = "\u2559", _Be = "\u255A", ABe = "\u2502", RBe = "\u2551", LBe = "\u253C", MBe = "\u256A", DBe = "\u256B", PBe = "\u256C", NBe = "\u2524", IBe = "\u2561", $Be = "\u2562", BBe = "\u2563", FBe = "\u251C", zBe = "\u255E", qBe = "\u255F", UBe = "\u2560", QBe = "\u2035", VBe = "\u02D8", WBe = "\u02D8", YBe = "\xA6", GBe = "\u{1D4B7}", HBe = "\u212C", XBe = "\u204F", ZBe = "\u223D", jBe = "\u22CD", KBe = "\u29C5", JBe = "\\", eFe = "\u27C8", tFe = "\u2022", rFe = "\u2022", nFe = "\u224E", iFe = "\u2AAE", sFe = "\u224F", aFe = "\u224E", oFe = "\u224F", lFe = "\u0106", cFe = "\u0107", uFe = "\u2A44", hFe = "\u2A49", fFe = "\u2A4B", dFe = "\u2229", pFe = "\u22D2", gFe = "\u2A47", mFe = "\u2A40", vFe = "\u2145", yFe = "\u2229\uFE00", bFe = "\u2041", xFe = "\u02C7", wFe = "\u212D", OFe = "\u2A4D", kFe = "\u010C", SFe = "\u010D", TFe = "\xC7", CFe = "\xE7", EFe = "\u0108", _Fe = "\u0109", AFe = "\u2230", RFe = "\u2A4C", LFe = "\u2A50", MFe = "\u010A", DFe = "\u010B", PFe = "\xB8", NFe = "\xB8", IFe = "\u29B2", $Fe = "\xA2", BFe = "\xB7", FFe = "\xB7", zFe = "\u{1D520}", qFe = "\u212D", UFe = "\u0427", QFe = "\u0447", VFe = "\u2713", WFe = "\u2713", YFe = "\u03A7", GFe = "\u03C7", HFe = "\u02C6", XFe = "\u2257", ZFe = "\u21BA", jFe = "\u21BB", KFe = "\u229B", JFe = "\u229A", eze = "\u229D", tze = "\u2299", rze = "\xAE", nze = "\u24C8", ize = "\u2296", sze = "\u2295", aze = "\u2297", oze = "\u25CB", lze = "\u29C3", cze = "\u2257", uze = "\u2A10", hze = "\u2AEF", fze = "\u29C2", dze = "\u2232", pze = "\u201D", gze = "\u2019", mze = "\u2663", vze = "\u2663", yze = ":", bze = "\u2237", xze = "\u2A74", wze = "\u2254", Oze = "\u2254", kze = ",", Sze = "@", Tze = "\u2201", Cze = "\u2218", Eze = "\u2201", _ze = "\u2102", Aze = "\u2245", Rze = "\u2A6D", Lze = "\u2261", Mze = "\u222E", Dze = "\u222F", Pze = "\u222E", Nze = "\u{1D554}", Ize = "\u2102", $ze = "\u2210", Bze = "\u2210", Fze = "\xA9", zze = "\xA9", qze = "\u2117", Uze = "\u2233", Qze = "\u21B5", Vze = "\u2717", Wze = "\u2A2F", Yze = "\u{1D49E}", Gze = "\u{1D4B8}", Hze = "\u2ACF", Xze = "\u2AD1", Zze = "\u2AD0", jze = "\u2AD2", Kze = "\u22EF", Jze = "\u2938", eqe = "\u2935", tqe = "\u22DE", rqe = "\u22DF", nqe = "\u21B6", iqe = "\u293D", sqe = "\u2A48", aqe = "\u2A46", oqe = "\u224D", lqe = "\u222A", cqe = "\u22D3", uqe = "\u2A4A", hqe = "\u228D", fqe = "\u2A45", dqe = "\u222A\uFE00", pqe = "\u21B7", gqe = "\u293C", mqe = "\u22DE", vqe = "\u22DF", yqe = "\u22CE", bqe = "\u22CF", xqe = "\xA4", wqe = "\u21B6", Oqe = "\u21B7", kqe = "\u22CE", Sqe = "\u22CF", Tqe = "\u2232", Cqe = "\u2231", Eqe = "\u232D", _qe = "\u2020", Aqe = "\u2021", Rqe = "\u2138", Lqe = "\u2193", Mqe = "\u21A1", Dqe = "\u21D3", Pqe = "\u2010", Nqe = "\u2AE4", Iqe = "\u22A3", $qe = "\u290F", Bqe = "\u02DD", Fqe = "\u010E", zqe = "\u010F", qqe = "\u0414", Uqe = "\u0434", Qqe = "\u2021", Vqe = "\u21CA", Wqe = "\u2145", Yqe = "\u2146", Gqe = "\u2911", Hqe = "\u2A77", Xqe = "\xB0", Zqe = "\u2207", jqe = "\u0394", Kqe = "\u03B4", Jqe = "\u29B1", eUe = "\u297F", tUe = "\u{1D507}", rUe = "\u{1D521}", nUe = "\u2965", iUe = "\u21C3", sUe = "\u21C2", aUe = "\xB4", oUe = "\u02D9", lUe = "\u02DD", cUe = "`", uUe = "\u02DC", hUe = "\u22C4", fUe = "\u22C4", dUe = "\u22C4", pUe = "\u2666", gUe = "\u2666", mUe = "\xA8", vUe = "\u2146", yUe = "\u03DD", bUe = "\u22F2", xUe = "\xF7", wUe = "\xF7", OUe = "\u22C7", kUe = "\u22C7", SUe = "\u0402", TUe = "\u0452", CUe = "\u231E", EUe = "\u230D", _Ue = "$", AUe = "\u{1D53B}", RUe = "\u{1D555}", LUe = "\xA8", MUe = "\u02D9", DUe = "\u20DC", PUe = "\u2250", NUe = "\u2251", IUe = "\u2250", $Ue = "\u2238", BUe = "\u2214", FUe = "\u22A1", zUe = "\u2306", qUe = "\u222F", UUe = "\xA8", QUe = "\u21D3", VUe = "\u21D0", WUe = "\u21D4", YUe = "\u2AE4", GUe = "\u27F8", HUe = "\u27FA", XUe = "\u27F9", ZUe = "\u21D2", jUe = "\u22A8", KUe = "\u21D1", JUe = "\u21D5", eQe = "\u2225", tQe = "\u2913", rQe = "\u2193", nQe = "\u2193", iQe = "\u21D3", sQe = "\u21F5", aQe = "\u0311", oQe = "\u21CA", lQe = "\u21C3", cQe = "\u21C2", uQe = "\u2950", hQe = "\u295E", fQe = "\u2956", dQe = "\u21BD", pQe = "\u295F", gQe = "\u2957", mQe = "\u21C1", vQe = "\u21A7", yQe = "\u22A4", bQe = "\u2910", xQe = "\u231F", wQe = "\u230C", OQe = "\u{1D49F}", kQe = "\u{1D4B9}", SQe = "\u0405", TQe = "\u0455", CQe = "\u29F6", EQe = "\u0110", _Qe = "\u0111", AQe = "\u22F1", RQe = "\u25BF", LQe = "\u25BE", MQe = "\u21F5", DQe = "\u296F", PQe = "\u29A6", NQe = "\u040F", IQe = "\u045F", $Qe = "\u27FF", BQe = "\xC9", FQe = "\xE9", zQe = "\u2A6E", qQe = "\u011A", UQe = "\u011B", QQe = "\xCA", VQe = "\xEA", WQe = "\u2256", YQe = "\u2255", GQe = "\u042D", HQe = "\u044D", XQe = "\u2A77", ZQe = "\u0116", jQe = "\u0117", KQe = "\u2251", JQe = "\u2147", eVe = "\u2252", tVe = "\u{1D508}", rVe = "\u{1D522}", nVe = "\u2A9A", iVe = "\xC8", sVe = "\xE8", aVe = "\u2A96", oVe = "\u2A98", lVe = "\u2A99", cVe = "\u2208", uVe = "\u23E7", hVe = "\u2113", fVe = "\u2A95", dVe = "\u2A97", pVe = "\u0112", gVe = "\u0113", mVe = "\u2205", vVe = "\u2205", yVe = "\u25FB", bVe = "\u2205", xVe = "\u25AB", wVe = "\u2004", OVe = "\u2005", kVe = "\u2003", SVe = "\u014A", TVe = "\u014B", CVe = "\u2002", EVe = "\u0118", _Ve = "\u0119", AVe = "\u{1D53C}", RVe = "\u{1D556}", LVe = "\u22D5", MVe = "\u29E3", DVe = "\u2A71", PVe = "\u03B5", NVe = "\u0395", IVe = "\u03B5", $Ve = "\u03F5", BVe = "\u2256", FVe = "\u2255", zVe = "\u2242", qVe = "\u2A96", UVe = "\u2A95", QVe = "\u2A75", VVe = "=", WVe = "\u2242", YVe = "\u225F", GVe = "\u21CC", HVe = "\u2261", XVe = "\u2A78", ZVe = "\u29E5", jVe = "\u2971", KVe = "\u2253", JVe = "\u212F", eWe = "\u2130", tWe = "\u2250", rWe = "\u2A73", nWe = "\u2242", iWe = "\u0397", sWe = "\u03B7", aWe = "\xD0", oWe = "\xF0", lWe = "\xCB", cWe = "\xEB", uWe = "\u20AC", hWe = "!", fWe = "\u2203", dWe = "\u2203", pWe = "\u2130", gWe = "\u2147", mWe = "\u2147", vWe = "\u2252", yWe = "\u0424", bWe = "\u0444", xWe = "\u2640", wWe = "\uFB03", OWe = "\uFB00", kWe = "\uFB04", SWe = "\u{1D509}", TWe = "\u{1D523}", CWe = "\uFB01", EWe = "\u25FC", _We = "\u25AA", AWe = "fj", RWe = "\u266D", LWe = "\uFB02", MWe = "\u25B1", DWe = "\u0192", PWe = "\u{1D53D}", NWe = "\u{1D557}", IWe = "\u2200", $We = "\u2200", BWe = "\u22D4", FWe = "\u2AD9", zWe = "\u2131", qWe = "\u2A0D", UWe = "\xBD", QWe = "\u2153", VWe = "\xBC", WWe = "\u2155", YWe = "\u2159", GWe = "\u215B", HWe = "\u2154", XWe = "\u2156", ZWe = "\xBE", jWe = "\u2157", KWe = "\u215C", JWe = "\u2158", eYe = "\u215A", tYe = "\u215D", rYe = "\u215E", nYe = "\u2044", iYe = "\u2322", sYe = "\u{1D4BB}", aYe = "\u2131", oYe = "\u01F5", lYe = "\u0393", cYe = "\u03B3", uYe = "\u03DC", hYe = "\u03DD", fYe = "\u2A86", dYe = "\u011E", pYe = "\u011F", gYe = "\u0122", mYe = "\u011C", vYe = "\u011D", yYe = "\u0413", bYe = "\u0433", xYe = "\u0120", wYe = "\u0121", OYe = "\u2265", kYe = "\u2267", SYe = "\u2A8C", TYe = "\u22DB", CYe = "\u2265", EYe = "\u2267", _Ye = "\u2A7E", AYe = "\u2AA9", RYe = "\u2A7E", LYe = "\u2A80", MYe = "\u2A82", DYe = "\u2A84", PYe = "\u22DB\uFE00", NYe = "\u2A94", IYe = "\u{1D50A}", $Ye = "\u{1D524}", BYe = "\u226B", FYe = "\u22D9", zYe = "\u22D9", qYe = "\u2137", UYe = "\u0403", QYe = "\u0453", VYe = "\u2AA5", WYe = "\u2277", YYe = "\u2A92", GYe = "\u2AA4", HYe = "\u2A8A", XYe = "\u2A8A", ZYe = "\u2A88", jYe = "\u2269", KYe = "\u2A88", JYe = "\u2269", eGe = "\u22E7", tGe = "\u{1D53E}", rGe = "\u{1D558}", nGe = "`", iGe = "\u2265", sGe = "\u22DB", aGe = "\u2267", oGe = "\u2AA2", lGe = "\u2277", cGe = "\u2A7E", uGe = "\u2273", hGe = "\u{1D4A2}", fGe = "\u210A", dGe = "\u2273", pGe = "\u2A8E", gGe = "\u2A90", mGe = "\u2AA7", vGe = "\u2A7A", yGe = ">", bGe = ">", xGe = "\u226B", wGe = "\u22D7", OGe = "\u2995", kGe = "\u2A7C", SGe = "\u2A86", TGe = "\u2978", CGe = "\u22D7", EGe = "\u22DB", _Ge = "\u2A8C", AGe = "\u2277", RGe = "\u2273", LGe = "\u2269\uFE00", MGe = "\u2269\uFE00", DGe = "\u02C7", PGe = "\u200A", NGe = "\xBD", IGe = "\u210B", $Ge = "\u042A", BGe = "\u044A", FGe = "\u2948", zGe = "\u2194", qGe = "\u21D4", UGe = "\u21AD", QGe = "^", VGe = "\u210F", WGe = "\u0124", YGe = "\u0125", GGe = "\u2665", HGe = "\u2665", XGe = "\u2026", ZGe = "\u22B9", jGe = "\u{1D525}", KGe = "\u210C", JGe = "\u210B", eHe = "\u2925", tHe = "\u2926", rHe = "\u21FF", nHe = "\u223B", iHe = "\u21A9", sHe = "\u21AA", aHe = "\u{1D559}", oHe = "\u210D", lHe = "\u2015", cHe = "\u2500", uHe = "\u{1D4BD}", hHe = "\u210B", fHe = "\u210F", dHe = "\u0126", pHe = "\u0127", gHe = "\u224E", mHe = "\u224F", vHe = "\u2043", yHe = "\u2010", bHe = "\xCD", xHe = "\xED", wHe = "\u2063", OHe = "\xCE", kHe = "\xEE", SHe = "\u0418", THe = "\u0438", CHe = "\u0130", EHe = "\u0415", _He = "\u0435", AHe = "\xA1", RHe = "\u21D4", LHe = "\u{1D526}", MHe = "\u2111", DHe = "\xCC", PHe = "\xEC", NHe = "\u2148", IHe = "\u2A0C", $He = "\u222D", BHe = "\u29DC", FHe = "\u2129", zHe = "\u0132", qHe = "\u0133", UHe = "\u012A", QHe = "\u012B", VHe = "\u2111", WHe = "\u2148", YHe = "\u2110", GHe = "\u2111", HHe = "\u0131", XHe = "\u2111", ZHe = "\u22B7", jHe = "\u01B5", KHe = "\u21D2", JHe = "\u2105", eXe = "\u221E", tXe = "\u29DD", rXe = "\u0131", nXe = "\u22BA", iXe = "\u222B", sXe = "\u222C", aXe = "\u2124", oXe = "\u222B", lXe = "\u22BA", cXe = "\u22C2", uXe = "\u2A17", hXe = "\u2A3C", fXe = "\u2063", dXe = "\u2062", pXe = "\u0401", gXe = "\u0451", mXe = "\u012E", vXe = "\u012F", yXe = "\u{1D540}", bXe = "\u{1D55A}", xXe = "\u0399", wXe = "\u03B9", OXe = "\u2A3C", kXe = "\xBF", SXe = "\u{1D4BE}", TXe = "\u2110", CXe = "\u2208", EXe = "\u22F5", _Xe = "\u22F9", AXe = "\u22F4", RXe = "\u22F3", LXe = "\u2208", MXe = "\u2062", DXe = "\u0128", PXe = "\u0129", NXe = "\u0406", IXe = "\u0456", $Xe = "\xCF", BXe = "\xEF", FXe = "\u0134", zXe = "\u0135", qXe = "\u0419", UXe = "\u0439", QXe = "\u{1D50D}", VXe = "\u{1D527}", WXe = "\u0237", YXe = "\u{1D541}", GXe = "\u{1D55B}", HXe = "\u{1D4A5}", XXe = "\u{1D4BF}", ZXe = "\u0408", jXe = "\u0458", KXe = "\u0404", JXe = "\u0454", eZe = "\u039A", tZe = "\u03BA", rZe = "\u03F0", nZe = "\u0136", iZe = "\u0137", sZe = "\u041A", aZe = "\u043A", oZe = "\u{1D50E}", lZe = "\u{1D528}", cZe = "\u0138", uZe = "\u0425", hZe = "\u0445", fZe = "\u040C", dZe = "\u045C", pZe = "\u{1D542}", gZe = "\u{1D55C}", mZe = "\u{1D4A6}", vZe = "\u{1D4C0}", yZe = "\u21DA", bZe = "\u0139", xZe = "\u013A", wZe = "\u29B4", OZe = "\u2112", kZe = "\u039B", SZe = "\u03BB", TZe = "\u27E8", CZe = "\u27EA", EZe = "\u2991", _Ze = "\u27E8", AZe = "\u2A85", RZe = "\u2112", LZe = "\xAB", MZe = "\u21E4", DZe = "\u291F", PZe = "\u2190", NZe = "\u219E", IZe = "\u21D0", $Ze = "\u291D", BZe = "\u21A9", FZe = "\u21AB", zZe = "\u2939", qZe = "\u2973", UZe = "\u21A2", QZe = "\u2919", VZe = "\u291B", WZe = "\u2AAB", YZe = "\u2AAD", GZe = "\u2AAD\uFE00", HZe = "\u290C", XZe = "\u290E", ZZe = "\u2772", jZe = "{", KZe = "[", JZe = "\u298B", eje = "\u298F", tje = "\u298D", rje = "\u013D", nje = "\u013E", ije = "\u013B", sje = "\u013C", aje = "\u2308", oje = "{", lje = "\u041B", cje = "\u043B", uje = "\u2936", hje = "\u201C", fje = "\u201E", dje = "\u2967", pje = "\u294B", gje = "\u21B2", mje = "\u2264", vje = "\u2266", yje = "\u27E8", bje = "\u21E4", xje = "\u2190", wje = "\u2190", Oje = "\u21D0", kje = "\u21C6", Sje = "\u21A2", Tje = "\u2308", Cje = "\u27E6", Eje = "\u2961", _je = "\u2959", Aje = "\u21C3", Rje = "\u230A", Lje = "\u21BD", Mje = "\u21BC", Dje = "\u21C7", Pje = "\u2194", Nje = "\u2194", Ije = "\u21D4", $je = "\u21C6", Bje = "\u21CB", Fje = "\u21AD", zje = "\u294E", qje = "\u21A4", Uje = "\u22A3", Qje = "\u295A", Vje = "\u22CB", Wje = "\u29CF", Yje = "\u22B2", Gje = "\u22B4", Hje = "\u2951", Xje = "\u2960", Zje = "\u2958", jje = "\u21BF", Kje = "\u2952", Jje = "\u21BC", eKe = "\u2A8B", tKe = "\u22DA", rKe = "\u2264", nKe = "\u2266", iKe = "\u2A7D", sKe = "\u2AA8", aKe = "\u2A7D", oKe = "\u2A7F", lKe = "\u2A81", cKe = "\u2A83", uKe = "\u22DA\uFE00", hKe = "\u2A93", fKe = "\u2A85", dKe = "\u22D6", pKe = "\u22DA", gKe = "\u2A8B", mKe = "\u22DA", vKe = "\u2266", yKe = "\u2276", bKe = "\u2276", xKe = "\u2AA1", wKe = "\u2272", OKe = "\u2A7D", kKe = "\u2272", SKe = "\u297C", TKe = "\u230A", CKe = "\u{1D50F}", EKe = "\u{1D529}", _Ke = "\u2276", AKe = "\u2A91", RKe = "\u2962", LKe = "\u21BD", MKe = "\u21BC", DKe = "\u296A", PKe = "\u2584", NKe = "\u0409", IKe = "\u0459", $Ke = "\u21C7", BKe = "\u226A", FKe = "\u22D8", zKe = "\u231E", qKe = "\u21DA", UKe = "\u296B", QKe = "\u25FA", VKe = "\u013F", WKe = "\u0140", YKe = "\u23B0", GKe = "\u23B0", HKe = "\u2A89", XKe = "\u2A89", ZKe = "\u2A87", jKe = "\u2268", KKe = "\u2A87", JKe = "\u2268", eJe = "\u22E6", tJe = "\u27EC", rJe = "\u21FD", nJe = "\u27E6", iJe = "\u27F5", sJe = "\u27F5", aJe = "\u27F8", oJe = "\u27F7", lJe = "\u27F7", cJe = "\u27FA", uJe = "\u27FC", hJe = "\u27F6", fJe = "\u27F6", dJe = "\u27F9", pJe = "\u21AB", gJe = "\u21AC", mJe = "\u2985", vJe = "\u{1D543}", yJe = "\u{1D55D}", bJe = "\u2A2D", xJe = "\u2A34", wJe = "\u2217", OJe = "_", kJe = "\u2199", SJe = "\u2198", TJe = "\u25CA", CJe = "\u25CA", EJe = "\u29EB", _Je = "(", AJe = "\u2993", RJe = "\u21C6", LJe = "\u231F", MJe = "\u21CB", DJe = "\u296D", PJe = "\u200E", NJe = "\u22BF", IJe = "\u2039", $Je = "\u{1D4C1}", BJe = "\u2112", FJe = "\u21B0", zJe = "\u21B0", qJe = "\u2272", UJe = "\u2A8D", QJe = "\u2A8F", VJe = "[", WJe = "\u2018", YJe = "\u201A", GJe = "\u0141", HJe = "\u0142", XJe = "\u2AA6", ZJe = "\u2A79", jJe = "<", KJe = "<", JJe = "\u226A", eet = "\u22D6", tet = "\u22CB", ret = "\u22C9", net = "\u2976", iet = "\u2A7B", set = "\u25C3", aet = "\u22B4", oet = "\u25C2", cet = "\u2996", uet = "\u294A", het = "\u2966", fet = "\u2268\uFE00", det = "\u2268\uFE00", pet = "\xAF", get = "\u2642", met = "\u2720", vet = "\u2720", yet = "\u21A6", bet = "\u21A6", xet = "\u21A7", wet = "\u21A4", Oet = "\u21A5", ket = "\u25AE", Tet = "\u2A29", Cet = "\u041C", Eet = "\u043C", _et = "\u2014", Aet = "\u223A", Ret = "\u2221", Let = "\u205F", Met = "\u2133", Det = "\u{1D510}", Pet = "\u{1D52A}", Net = "\u2127", Iet = "\xB5", $et = "*", Bet = "\u2AF0", Fet = "\u2223", zet = "\xB7", qet = "\u229F", Uet = "\u2212", Qet = "\u2238", Vet = "\u2A2A", Wet = "\u2213", Yet = "\u2ADB", Get = "\u2026", Het = "\u2213", Xet = "\u22A7", Zet = "\u{1D544}", jet = "\u{1D55E}", Ket = "\u2213", Jet = "\u{1D4C2}", ett = "\u2133", ttt = "\u223E", rtt = "\u039C", ntt = "\u03BC", itt = "\u22B8", stt = "\u22B8", att = "\u2207", ott = "\u0143", ltt = "\u0144", ctt = "\u2220\u20D2", utt = "\u2249", htt = "\u2A70\u0338", ftt = "\u224B\u0338", dtt = "\u0149", ptt = "\u2249", gtt = "\u266E", mtt = "\u2115", vtt = "\u266E", ytt = "\xA0", btt = "\u224E\u0338", xtt = "\u224F\u0338", wtt = "\u2A43", Ott = "\u0147", ktt = "\u0148", Stt = "\u0145", Ttt = "\u0146", Ctt = "\u2247", Ett = "\u2A6D\u0338", _tt = "\u2A42", Att = "\u041D", Rtt = "\u043D", Ltt = "\u2013", Mtt = "\u2924", Dtt = "\u2197", Ptt = "\u21D7", Ntt = "\u2197", Itt = "\u2260", $tt = "\u2250\u0338", Btt = "\u200B", Ftt = "\u200B", ztt = "\u200B", qtt = "\u200B", Utt = "\u2262", Qtt = "\u2928", Vtt = "\u2242\u0338", Wtt = "\u226B", Ytt = "\u226A", Gtt = ` +`, Htt = "\u2204", Xtt = "\u2204", Ztt = "\u{1D511}", jtt = "\u{1D52B}", Ktt = "\u2267\u0338", Jtt = "\u2271", ert = "\u2271", trt = "\u2267\u0338", rrt = "\u2A7E\u0338", nrt = "\u2A7E\u0338", irt = "\u22D9\u0338", srt = "\u2275", art = "\u226B\u20D2", ort = "\u226F", lrt = "\u226F", crt = "\u226B\u0338", urt = "\u21AE", hrt = "\u21CE", frt = "\u2AF2", drt = "\u220B", prt = "\u22FC", grt = "\u22FA", mrt = "\u220B", vrt = "\u040A", yrt = "\u045A", brt = "\u219A", xrt = "\u21CD", wrt = "\u2025", Ort = "\u2266\u0338", krt = "\u2270", Srt = "\u219A", Trt = "\u21CD", Crt = "\u21AE", Ert = "\u21CE", _rt = "\u2270", Art = "\u2266\u0338", Rrt = "\u2A7D\u0338", Lrt = "\u2A7D\u0338", Mrt = "\u226E", Drt = "\u22D8\u0338", Prt = "\u2274", Nrt = "\u226A\u20D2", Irt = "\u226E", $rt = "\u22EA", Brt = "\u22EC", Frt = "\u226A\u0338", zrt = "\u2224", qrt = "\u2060", Urt = "\xA0", Qrt = "\u{1D55F}", Vrt = "\u2115", Wrt = "\u2AEC", Yrt = "\xAC", Grt = "\u2262", Hrt = "\u226D", Xrt = "\u2226", Zrt = "\u2209", jrt = "\u2260", Krt = "\u2242\u0338", Jrt = "\u2204", ent = "\u226F", tnt = "\u2271", rnt = "\u2267\u0338", nnt = "\u226B\u0338", int = "\u2279", snt = "\u2A7E\u0338", ant = "\u2275", ont = "\u224E\u0338", lnt = "\u224F\u0338", cnt = "\u2209", unt = "\u22F5\u0338", hnt = "\u22F9\u0338", fnt = "\u2209", dnt = "\u22F7", pnt = "\u22F6", gnt = "\u29CF\u0338", mnt = "\u22EA", vnt = "\u22EC", ynt = "\u226E", bnt = "\u2270", xnt = "\u2278", wnt = "\u226A\u0338", Ont = "\u2A7D\u0338", knt = "\u2274", Snt = "\u2AA2\u0338", Tnt = "\u2AA1\u0338", Cnt = "\u220C", Ent = "\u220C", _nt = "\u22FE", Ant = "\u22FD", Rnt = "\u2280", Lnt = "\u2AAF\u0338", Mnt = "\u22E0", Dnt = "\u220C", Pnt = "\u29D0\u0338", Nnt = "\u22EB", Int = "\u22ED", $nt = "\u228F\u0338", Bnt = "\u22E2", Fnt = "\u2290\u0338", znt = "\u22E3", qnt = "\u2282\u20D2", Unt = "\u2288", Qnt = "\u2281", Vnt = "\u2AB0\u0338", Wnt = "\u22E1", Ynt = "\u227F\u0338", Gnt = "\u2283\u20D2", Hnt = "\u2289", Xnt = "\u2241", Znt = "\u2244", jnt = "\u2247", Knt = "\u2249", Jnt = "\u2224", eit = "\u2226", tit = "\u2226", rit = "\u2AFD\u20E5", nit = "\u2202\u0338", iit = "\u2A14", sit = "\u2280", ait = "\u22E0", oit = "\u2280", lit = "\u2AAF\u0338", cit = "\u2AAF\u0338", uit = "\u2933\u0338", hit = "\u219B", fit = "\u21CF", dit = "\u219D\u0338", pit = "\u219B", git = "\u21CF", mit = "\u22EB", vit = "\u22ED", yit = "\u2281", bit = "\u22E1", xit = "\u2AB0\u0338", wit = "\u{1D4A9}", Oit = "\u{1D4C3}", kit = "\u2224", Sit = "\u2226", Tit = "\u2241", Cit = "\u2244", Eit = "\u2244", _it = "\u2224", Ait = "\u2226", Rit = "\u22E2", Lit = "\u22E3", Mit = "\u2284", Dit = "\u2AC5\u0338", Pit = "\u2288", Nit = "\u2282\u20D2", Iit = "\u2288", $it = "\u2AC5\u0338", Bit = "\u2281", Fit = "\u2AB0\u0338", zit = "\u2285", qit = "\u2AC6\u0338", Uit = "\u2289", Qit = "\u2283\u20D2", Vit = "\u2289", Wit = "\u2AC6\u0338", Yit = "\u2279", Git = "\xD1", Hit = "\xF1", Xit = "\u2278", Zit = "\u22EA", jit = "\u22EC", Kit = "\u22EB", Jit = "\u22ED", est = "\u039D", tst = "\u03BD", rst = "#", nst = "\u2116", ist = "\u2007", sst = "\u224D\u20D2", ast = "\u22AC", ost = "\u22AD", lst = "\u22AE", cst = "\u22AF", ust = "\u2265\u20D2", hst = ">\u20D2", fst = "\u2904", dst = "\u29DE", pst = "\u2902", gst = "\u2264\u20D2", mst = "<\u20D2", vst = "\u22B4\u20D2", yst = "\u2903", bst = "\u22B5\u20D2", xst = "\u223C\u20D2", wst = "\u2923", Ost = "\u2196", kst = "\u21D6", Sst = "\u2196", Tst = "\u2927", Cst = "\xD3", Est = "\xF3", _st = "\u229B", Ast = "\xD4", Rst = "\xF4", Lst = "\u229A", Mst = "\u041E", Dst = "\u043E", Pst = "\u229D", Nst = "\u0150", Ist = "\u0151", $st = "\u2A38", Bst = "\u2299", Fst = "\u29BC", zst = "\u0152", qst = "\u0153", Ust = "\u29BF", Qst = "\u{1D512}", Vst = "\u{1D52C}", Wst = "\u02DB", Yst = "\xD2", Gst = "\xF2", Hst = "\u29C1", Xst = "\u29B5", Zst = "\u03A9", jst = "\u222E", Kst = "\u21BA", Jst = "\u29BE", eat = "\u29BB", tat = "\u203E", rat = "\u29C0", nat = "\u014C", iat = "\u014D", sat = "\u03A9", aat = "\u03C9", oat = "\u039F", lat = "\u03BF", cat = "\u29B6", uat = "\u2296", hat = "\u{1D546}", fat = "\u{1D560}", dat = "\u29B7", pat = "\u201C", gat = "\u2018", mat = "\u29B9", vat = "\u2295", yat = "\u21BB", bat = "\u2A54", xat = "\u2228", wat = "\u2A5D", Oat = "\u2134", kat = "\u2134", Sat = "\xAA", Tat = "\xBA", Cat = "\u22B6", Eat = "\u2A56", _at = "\u2A57", Aat = "\u2A5B", Rat = "\u24C8", Lat = "\u{1D4AA}", Mat = "\u2134", Dat = "\xD8", Pat = "\xF8", Nat = "\u2298", Iat = "\xD5", $at = "\xF5", Bat = "\u2A36", Fat = "\u2A37", zat = "\u2297", qat = "\xD6", Uat = "\xF6", Qat = "\u233D", Vat = "\u203E", Wat = "\u23DE", Yat = "\u23B4", Gat = "\u23DC", Hat = "\xB6", Xat = "\u2225", Zat = "\u2225", jat = "\u2AF3", Kat = "\u2AFD", Jat = "\u2202", eot = "\u2202", tot = "\u041F", rot = "\u043F", not = "%", iot = ".", sot = "\u2030", aot = "\u22A5", oot = "\u2031", lot = "\u{1D513}", cot = "\u{1D52D}", uot = "\u03A6", hot = "\u03C6", fot = "\u03D5", dot = "\u2133", pot = "\u260E", got = "\u03A0", mot = "\u03C0", vot = "\u22D4", yot = "\u03D6", bot = "\u210F", xot = "\u210E", wot = "\u210F", Oot = "\u2A23", kot = "\u229E", Sot = "\u2A22", Tot = "+", Cot = "\u2214", Eot = "\u2A25", _ot = "\u2A72", Aot = "\xB1", Rot = "\xB1", Lot = "\u2A26", Mot = "\u2A27", Dot = "\xB1", Pot = "\u210C", Not = "\u2A15", Iot = "\u{1D561}", $ot = "\u2119", Bot = "\xA3", Fot = "\u2AB7", zot = "\u2ABB", qot = "\u227A", Uot = "\u227C", Qot = "\u2AB7", Vot = "\u227A", Wot = "\u227C", Yot = "\u227A", Got = "\u2AAF", Hot = "\u227C", Xot = "\u227E", Zot = "\u2AAF", jot = "\u2AB9", Kot = "\u2AB5", Jot = "\u22E8", elt = "\u2AAF", tlt = "\u2AB3", rlt = "\u227E", nlt = "\u2032", ilt = "\u2033", slt = "\u2119", alt = "\u2AB9", olt = "\u2AB5", llt = "\u22E8", clt = "\u220F", ult = "\u220F", hlt = "\u232E", flt = "\u2312", dlt = "\u2313", plt = "\u221D", glt = "\u221D", mlt = "\u2237", vlt = "\u221D", ylt = "\u227E", blt = "\u22B0", xlt = "\u{1D4AB}", wlt = "\u{1D4C5}", Olt = "\u03A8", klt = "\u03C8", Slt = "\u2008", Tlt = "\u{1D514}", Clt = "\u{1D52E}", Elt = "\u2A0C", _lt = "\u{1D562}", Alt = "\u211A", Rlt = "\u2057", Llt = "\u{1D4AC}", Mlt = "\u{1D4C6}", Dlt = "\u210D", Plt = "\u2A16", Nlt = "?", Ilt = "\u225F", $lt = '"', Blt = '"', Flt = "\u21DB", zlt = "\u223D\u0331", qlt = "\u0154", Ult = "\u0155", Qlt = "\u221A", Vlt = "\u29B3", Wlt = "\u27E9", Ylt = "\u27EB", Glt = "\u2992", Hlt = "\u29A5", Xlt = "\u27E9", Zlt = "\xBB", jlt = "\u2975", Klt = "\u21E5", Jlt = "\u2920", ect = "\u2933", tct = "\u2192", rct = "\u21A0", nct = "\u21D2", ict = "\u291E", sct = "\u21AA", act = "\u21AC", oct = "\u2945", lct = "\u2974", cct = "\u2916", uct = "\u21A3", hct = "\u219D", fct = "\u291A", dct = "\u291C", pct = "\u2236", gct = "\u211A", mct = "\u290D", vct = "\u290F", yct = "\u2910", bct = "\u2773", xct = "}", wct = "]", Oct = "\u298C", kct = "\u298E", Sct = "\u2990", Tct = "\u0158", Cct = "\u0159", Ect = "\u0156", _ct = "\u0157", Act = "\u2309", Rct = "}", Lct = "\u0420", Mct = "\u0440", Dct = "\u2937", Pct = "\u2969", Nct = "\u201D", Ict = "\u201D", $ct = "\u21B3", Bct = "\u211C", Fct = "\u211B", zct = "\u211C", qct = "\u211D", Uct = "\u211C", Qct = "\u25AD", Vct = "\xAE", Wct = "\xAE", Yct = "\u220B", Gct = "\u21CB", Hct = "\u296F", Xct = "\u297D", Zct = "\u230B", jct = "\u{1D52F}", Kct = "\u211C", Jct = "\u2964", eut = "\u21C1", tut = "\u21C0", rut = "\u296C", nut = "\u03A1", iut = "\u03C1", sut = "\u03F1", aut = "\u27E9", out = "\u21E5", lut = "\u2192", cut = "\u2192", uut = "\u21D2", hut = "\u21C4", fut = "\u21A3", dut = "\u2309", put = "\u27E7", gut = "\u295D", mut = "\u2955", vut = "\u21C2", yut = "\u230B", but = "\u21C1", xut = "\u21C0", wut = "\u21C4", Out = "\u21CC", kut = "\u21C9", Sut = "\u219D", Tut = "\u21A6", Cut = "\u22A2", Eut = "\u295B", _ut = "\u22CC", Aut = "\u29D0", Rut = "\u22B3", Lut = "\u22B5", Mut = "\u294F", Dut = "\u295C", Put = "\u2954", Nut = "\u21BE", Iut = "\u2953", $ut = "\u21C0", But = "\u02DA", Fut = "\u2253", zut = "\u21C4", qut = "\u21CC", Uut = "\u200F", Qut = "\u23B1", Vut = "\u23B1", Wut = "\u2AEE", Yut = "\u27ED", Gut = "\u21FE", Hut = "\u27E7", Xut = "\u2986", Zut = "\u{1D563}", jut = "\u211D", Kut = "\u2A2E", Jut = "\u2A35", eht = "\u2970", tht = ")", rht = "\u2994", nht = "\u2A12", iht = "\u21C9", sht = "\u21DB", aht = "\u203A", oht = "\u{1D4C7}", lht = "\u211B", cht = "\u21B1", uht = "\u21B1", hht = "]", fht = "\u2019", dht = "\u2019", pht = "\u22CC", ght = "\u22CA", mht = "\u25B9", vht = "\u22B5", yht = "\u25B8", bht = "\u29CE", xht = "\u29F4", wht = "\u2968", Oht = "\u211E", kht = "\u015A", Sht = "\u015B", Tht = "\u201A", Cht = "\u2AB8", Eht = "\u0160", _ht = "\u0161", Aht = "\u2ABC", Rht = "\u227B", Lht = "\u227D", Mht = "\u2AB0", Dht = "\u2AB4", Pht = "\u015E", Nht = "\u015F", Iht = "\u015C", $ht = "\u015D", Bht = "\u2ABA", Fht = "\u2AB6", zht = "\u22E9", qht = "\u2A13", Uht = "\u227F", Qht = "\u0421", Vht = "\u0441", Wht = "\u22A1", Yht = "\u22C5", Ght = "\u2A66", Hht = "\u2925", Xht = "\u2198", Zht = "\u21D8", jht = "\u2198", Kht = "\xA7", Jht = ";", eft = "\u2929", tft = "\u2216", rft = "\u2216", nft = "\u2736", ift = "\u{1D516}", sft = "\u{1D530}", aft = "\u2322", oft = "\u266F", lft = "\u0429", cft = "\u0449", uft = "\u0428", hft = "\u0448", fft = "\u2193", dft = "\u2190", pft = "\u2223", gft = "\u2225", mft = "\u2192", vft = "\u2191", yft = "\xAD", bft = "\u03A3", xft = "\u03C3", wft = "\u03C2", Oft = "\u03C2", kft = "\u223C", Sft = "\u2A6A", Tft = "\u2243", Cft = "\u2243", Eft = "\u2A9E", _ft = "\u2AA0", Aft = "\u2A9D", Rft = "\u2A9F", Lft = "\u2246", Mft = "\u2A24", Dft = "\u2972", Pft = "\u2190", Nft = "\u2218", Ift = "\u2216", $ft = "\u2A33", Bft = "\u29E4", Fft = "\u2223", zft = "\u2323", qft = "\u2AAA", Uft = "\u2AAC", Qft = "\u2AAC\uFE00", Vft = "\u042C", Wft = "\u044C", Yft = "\u233F", Gft = "\u29C4", Hft = "/", Xft = "\u{1D54A}", Zft = "\u{1D564}", jft = "\u2660", Kft = "\u2660", Jft = "\u2225", edt = "\u2293", tdt = "\u2293\uFE00", rdt = "\u2294", ndt = "\u2294\uFE00", idt = "\u221A", sdt = "\u228F", adt = "\u2291", odt = "\u228F", ldt = "\u2291", cdt = "\u2290", udt = "\u2292", hdt = "\u2290", fdt = "\u2292", ddt = "\u25A1", pdt = "\u25A1", gdt = "\u2293", mdt = "\u228F", vdt = "\u2291", ydt = "\u2290", bdt = "\u2292", xdt = "\u2294", wdt = "\u25AA", Odt = "\u25A1", kdt = "\u25AA", Sdt = "\u2192", Tdt = "\u{1D4AE}", Cdt = "\u{1D4C8}", Edt = "\u2216", _dt = "\u2323", Adt = "\u22C6", Rdt = "\u22C6", Ldt = "\u2606", Mdt = "\u2605", Ddt = "\u03F5", Pdt = "\u03D5", Ndt = "\xAF", Idt = "\u2282", $dt = "\u22D0", Bdt = "\u2ABD", Fdt = "\u2AC5", zdt = "\u2286", qdt = "\u2AC3", Udt = "\u2AC1", Qdt = "\u2ACB", Vdt = "\u228A", Wdt = "\u2ABF", Ydt = "\u2979", Gdt = "\u2282", Hdt = "\u22D0", Xdt = "\u2286", Zdt = "\u2AC5", jdt = "\u2286", Kdt = "\u228A", Jdt = "\u2ACB", ept = "\u2AC7", tpt = "\u2AD5", rpt = "\u2AD3", npt = "\u2AB8", ipt = "\u227B", spt = "\u227D", apt = "\u227B", opt = "\u2AB0", lpt = "\u227D", cpt = "\u227F", upt = "\u2AB0", hpt = "\u2ABA", fpt = "\u2AB6", dpt = "\u22E9", ppt = "\u227F", gpt = "\u220B", mpt = "\u2211", vpt = "\u2211", ypt = "\u266A", bpt = "\xB9", xpt = "\xB2", wpt = "\xB3", Opt = "\u2283", kpt = "\u22D1", Spt = "\u2ABE", Tpt = "\u2AD8", Cpt = "\u2AC6", Ept = "\u2287", _pt = "\u2AC4", Apt = "\u2283", Rpt = "\u2287", Lpt = "\u27C9", Mpt = "\u2AD7", Dpt = "\u297B", Ppt = "\u2AC2", Npt = "\u2ACC", Ipt = "\u228B", $pt = "\u2AC0", Bpt = "\u2283", Fpt = "\u22D1", zpt = "\u2287", qpt = "\u2AC6", Upt = "\u228B", Qpt = "\u2ACC", Vpt = "\u2AC8", Wpt = "\u2AD4", Ypt = "\u2AD6", Gpt = "\u2926", Hpt = "\u2199", Xpt = "\u21D9", Zpt = "\u2199", jpt = "\u292A", Kpt = "\xDF", Jpt = " ", e0t = "\u2316", t0t = "\u03A4", r0t = "\u03C4", n0t = "\u23B4", i0t = "\u0164", s0t = "\u0165", a0t = "\u0162", o0t = "\u0163", l0t = "\u0422", c0t = "\u0442", u0t = "\u20DB", h0t = "\u2315", f0t = "\u{1D517}", d0t = "\u{1D531}", p0t = "\u2234", g0t = "\u2234", m0t = "\u2234", v0t = "\u0398", y0t = "\u03B8", b0t = "\u03D1", x0t = "\u03D1", w0t = "\u2248", O0t = "\u223C", k0t = "\u205F\u200A", S0t = "\u2009", T0t = "\u2009", C0t = "\u2248", E0t = "\u223C", _0t = "\xDE", A0t = "\xFE", R0t = "\u02DC", L0t = "\u223C", M0t = "\u2243", D0t = "\u2245", P0t = "\u2248", N0t = "\u2A31", I0t = "\u22A0", $0t = "\xD7", B0t = "\u2A30", F0t = "\u222D", z0t = "\u2928", q0t = "\u2336", U0t = "\u2AF1", Q0t = "\u22A4", V0t = "\u{1D54B}", W0t = "\u{1D565}", Y0t = "\u2ADA", G0t = "\u2929", H0t = "\u2034", X0t = "\u2122", Z0t = "\u2122", j0t = "\u25B5", K0t = "\u25BF", J0t = "\u25C3", egt = "\u22B4", tgt = "\u225C", rgt = "\u25B9", ngt = "\u22B5", igt = "\u25EC", sgt = "\u225C", agt = "\u2A3A", ogt = "\u20DB", lgt = "\u2A39", cgt = "\u29CD", ugt = "\u2A3B", hgt = "\u23E2", fgt = "\u{1D4AF}", dgt = "\u{1D4C9}", pgt = "\u0426", ggt = "\u0446", mgt = "\u040B", vgt = "\u045B", ygt = "\u0166", bgt = "\u0167", xgt = "\u226C", wgt = "\u219E", Ogt = "\u21A0", kgt = "\xDA", Sgt = "\xFA", Tgt = "\u2191", Cgt = "\u219F", Egt = "\u21D1", _gt = "\u2949", Agt = "\u040E", Rgt = "\u045E", Lgt = "\u016C", Mgt = "\u016D", Dgt = "\xDB", Pgt = "\xFB", Ngt = "\u0423", Igt = "\u0443", $gt = "\u21C5", Bgt = "\u0170", Fgt = "\u0171", zgt = "\u296E", qgt = "\u297E", Ugt = "\u{1D518}", Qgt = "\u{1D532}", Vgt = "\xD9", Wgt = "\xF9", Ygt = "\u2963", Ggt = "\u21BF", Hgt = "\u21BE", Xgt = "\u2580", Zgt = "\u231C", jgt = "\u231C", Kgt = "\u230F", Jgt = "\u25F8", emt = "\u016A", tmt = "\u016B", rmt = "\xA8", nmt = "_", imt = "\u23DF", smt = "\u23B5", amt = "\u23DD", omt = "\u22C3", lmt = "\u228E", cmt = "\u0172", umt = "\u0173", hmt = "\u{1D54C}", fmt = "\u{1D566}", dmt = "\u2912", pmt = "\u2191", gmt = "\u2191", mmt = "\u21D1", vmt = "\u21C5", ymt = "\u2195", bmt = "\u2195", xmt = "\u21D5", wmt = "\u296E", Omt = "\u21BF", kmt = "\u21BE", Smt = "\u228E", Tmt = "\u2196", Cmt = "\u2197", Emt = "\u03C5", _mt = "\u03D2", Amt = "\u03D2", Rmt = "\u03A5", Lmt = "\u03C5", Mmt = "\u21A5", Dmt = "\u22A5", Pmt = "\u21C8", Nmt = "\u231D", Imt = "\u231D", $mt = "\u230E", Bmt = "\u016E", Fmt = "\u016F", zmt = "\u25F9", qmt = "\u{1D4B0}", Umt = "\u{1D4CA}", Qmt = "\u22F0", Vmt = "\u0168", Wmt = "\u0169", Ymt = "\u25B5", Gmt = "\u25B4", Hmt = "\u21C8", Xmt = "\xDC", Zmt = "\xFC", jmt = "\u29A7", Kmt = "\u299C", Jmt = "\u03F5", e1t = "\u03F0", t1t = "\u2205", r1t = "\u03D5", n1t = "\u03D6", i1t = "\u221D", s1t = "\u2195", a1t = "\u21D5", o1t = "\u03F1", l1t = "\u03C2", c1t = "\u228A\uFE00", u1t = "\u2ACB\uFE00", h1t = "\u228B\uFE00", f1t = "\u2ACC\uFE00", d1t = "\u03D1", p1t = "\u22B2", g1t = "\u22B3", m1t = "\u2AE8", v1t = "\u2AEB", y1t = "\u2AE9", b1t = "\u0412", x1t = "\u0432", w1t = "\u22A2", O1t = "\u22A8", k1t = "\u22A9", S1t = "\u22AB", T1t = "\u2AE6", C1t = "\u22BB", E1t = "\u2228", _1t = "\u22C1", A1t = "\u225A", R1t = "\u22EE", L1t = "|", M1t = "\u2016", D1t = "|", P1t = "\u2016", N1t = "\u2223", I1t = "|", $1t = "\u2758", B1t = "\u2240", F1t = "\u200A", z1t = "\u{1D519}", q1t = "\u{1D533}", U1t = "\u22B2", Q1t = "\u2282\u20D2", V1t = "\u2283\u20D2", W1t = "\u{1D54D}", Y1t = "\u{1D567}", G1t = "\u221D", H1t = "\u22B3", X1t = "\u{1D4B1}", Z1t = "\u{1D4CB}", j1t = "\u2ACB\uFE00", K1t = "\u228A\uFE00", J1t = "\u2ACC\uFE00", evt = "\u228B\uFE00", tvt = "\u22AA", rvt = "\u299A", nvt = "\u0174", ivt = "\u0175", svt = "\u2A5F", avt = "\u2227", ovt = "\u22C0", lvt = "\u2259", cvt = "\u2118", uvt = "\u{1D51A}", hvt = "\u{1D534}", fvt = "\u{1D54E}", dvt = "\u{1D568}", pvt = "\u2118", gvt = "\u2240", mvt = "\u2240", vvt = "\u{1D4B2}", yvt = "\u{1D4CC}", bvt = "\u22C2", xvt = "\u25EF", wvt = "\u22C3", Ovt = "\u25BD", kvt = "\u{1D51B}", Svt = "\u{1D535}", Tvt = "\u27F7", Cvt = "\u27FA", Evt = "\u039E", _vt = "\u03BE", Avt = "\u27F5", Rvt = "\u27F8", Lvt = "\u27FC", Mvt = "\u22FB", Dvt = "\u2A00", Pvt = "\u{1D54F}", Nvt = "\u{1D569}", Ivt = "\u2A01", $vt = "\u2A02", Bvt = "\u27F6", Fvt = "\u27F9", zvt = "\u{1D4B3}", qvt = "\u{1D4CD}", Uvt = "\u2A06", Qvt = "\u2A04", Vvt = "\u25B3", Wvt = "\u22C1", Yvt = "\u22C0", Gvt = "\xDD", Hvt = "\xFD", Xvt = "\u042F", Zvt = "\u044F", jvt = "\u0176", Kvt = "\u0177", Jvt = "\u042B", eyt = "\u044B", tyt = "\xA5", ryt = "\u{1D51C}", nyt = "\u{1D536}", iyt = "\u0407", syt = "\u0457", ayt = "\u{1D550}", oyt = "\u{1D56A}", lyt = "\u{1D4B4}", cyt = "\u{1D4CE}", uyt = "\u042E", hyt = "\u044E", fyt = "\xFF", dyt = "\u0178", pyt = "\u0179", gyt = "\u017A", myt = "\u017D", vyt = "\u017E", yyt = "\u0417", byt = "\u0437", xyt = "\u017B", wyt = "\u017C", Oyt = "\u2128", kyt = "\u200B", Syt = "\u0396", Tyt = "\u03B6", Cyt = "\u{1D537}", Eyt = "\u2128", _yt = "\u0416", Ayt = "\u0436", Ryt = "\u21DD", Lyt = "\u{1D56B}", Myt = "\u2124", Dyt = "\u{1D4B5}", Pyt = "\u{1D4CF}", Nyt = "\u200D", Iyt = "\u200C", $yt = { + Aacute: yNe, + aacute: bNe, + Abreve: xNe, + abreve: wNe, + ac: ONe, + acd: kNe, + acE: SNe, + Acirc: TNe, + acirc: CNe, + acute: ENe, + Acy: _Ne, + acy: ANe, + AElig: RNe, + aelig: LNe, + af: MNe, + Afr: DNe, + afr: PNe, + Agrave: NNe, + agrave: INe, + alefsym: $Ne, + aleph: BNe, + Alpha: FNe, + alpha: zNe, + Amacr: qNe, + amacr: UNe, + amalg: QNe, + amp: VNe, + AMP: WNe, + andand: YNe, + And: GNe, + and: HNe, + andd: XNe, + andslope: ZNe, + andv: jNe, + ang: KNe, + ange: JNe, + angle: eIe, + angmsdaa: tIe, + angmsdab: rIe, + angmsdac: nIe, + angmsdad: iIe, + angmsdae: sIe, + angmsdaf: aIe, + angmsdag: oIe, + angmsdah: lIe, + angmsd: cIe, + angrt: uIe, + angrtvb: hIe, + angrtvbd: fIe, + angsph: dIe, + angst: pIe, + angzarr: gIe, + Aogon: mIe, + aogon: vIe, + Aopf: yIe, + aopf: bIe, + apacir: xIe, + ap: wIe, + apE: OIe, + ape: kIe, + apid: SIe, + apos: TIe, + ApplyFunction: CIe, + approx: EIe, + approxeq: _Ie, + Aring: AIe, + aring: RIe, + Ascr: LIe, + ascr: MIe, + Assign: DIe, + ast: PIe, + asymp: NIe, + asympeq: IIe, + Atilde: $Ie, + atilde: BIe, + Auml: FIe, + auml: zIe, + awconint: qIe, + awint: UIe, + backcong: QIe, + backepsilon: VIe, + backprime: WIe, + backsim: YIe, + backsimeq: GIe, + Backslash: HIe, + Barv: XIe, + barvee: ZIe, + barwed: jIe, + Barwed: KIe, + barwedge: JIe, + bbrk: e$e, + bbrktbrk: t$e, + bcong: r$e, + Bcy: n$e, + bcy: i$e, + bdquo: s$e, + becaus: a$e, + because: o$e, + Because: l$e, + bemptyv: c$e, + bepsi: u$e, + bernou: h$e, + Bernoullis: f$e, + Beta: d$e, + beta: p$e, + beth: g$e, + between: m$e, + Bfr: v$e, + bfr: y$e, + bigcap: b$e, + bigcirc: x$e, + bigcup: w$e, + bigodot: O$e, + bigoplus: k$e, + bigotimes: S$e, + bigsqcup: T$e, + bigstar: C$e, + bigtriangledown: E$e, + bigtriangleup: _$e, + biguplus: A$e, + bigvee: R$e, + bigwedge: L$e, + bkarow: M$e, + blacklozenge: D$e, + blacksquare: P$e, + blacktriangle: N$e, + blacktriangledown: I$e, + blacktriangleleft: $$e, + blacktriangleright: B$e, + blank: F$e, + blk12: z$e, + blk14: q$e, + blk34: U$e, + block: Q$e, + bne: V$e, + bnequiv: W$e, + bNot: Y$e, + bnot: G$e, + Bopf: H$e, + bopf: X$e, + bot: Z$e, + bottom: j$e, + bowtie: K$e, + boxbox: J$e, + boxdl: eBe, + boxdL: tBe, + boxDl: rBe, + boxDL: nBe, + boxdr: iBe, + boxdR: sBe, + boxDr: aBe, + boxDR: oBe, + boxh: lBe, + boxH: cBe, + boxhd: uBe, + boxHd: hBe, + boxhD: fBe, + boxHD: dBe, + boxhu: pBe, + boxHu: gBe, + boxhU: mBe, + boxHU: vBe, + boxminus: yBe, + boxplus: bBe, + boxtimes: xBe, + boxul: wBe, + boxuL: OBe, + boxUl: kBe, + boxUL: SBe, + boxur: TBe, + boxuR: CBe, + boxUr: EBe, + boxUR: _Be, + boxv: ABe, + boxV: RBe, + boxvh: LBe, + boxvH: MBe, + boxVh: DBe, + boxVH: PBe, + boxvl: NBe, + boxvL: IBe, + boxVl: $Be, + boxVL: BBe, + boxvr: FBe, + boxvR: zBe, + boxVr: qBe, + boxVR: UBe, + bprime: QBe, + breve: VBe, + Breve: WBe, + brvbar: YBe, + bscr: GBe, + Bscr: HBe, + bsemi: XBe, + bsim: ZBe, + bsime: jBe, + bsolb: KBe, + bsol: JBe, + bsolhsub: eFe, + bull: tFe, + bullet: rFe, + bump: nFe, + bumpE: iFe, + bumpe: sFe, + Bumpeq: aFe, + bumpeq: oFe, + Cacute: lFe, + cacute: cFe, + capand: uFe, + capbrcup: hFe, + capcap: fFe, + cap: dFe, + Cap: pFe, + capcup: gFe, + capdot: mFe, + CapitalDifferentialD: vFe, + caps: yFe, + caret: bFe, + caron: xFe, + Cayleys: wFe, + ccaps: OFe, + Ccaron: kFe, + ccaron: SFe, + Ccedil: TFe, + ccedil: CFe, + Ccirc: EFe, + ccirc: _Fe, + Cconint: AFe, + ccups: RFe, + ccupssm: LFe, + Cdot: MFe, + cdot: DFe, + cedil: PFe, + Cedilla: NFe, + cemptyv: IFe, + cent: $Fe, + centerdot: BFe, + CenterDot: FFe, + cfr: zFe, + Cfr: qFe, + CHcy: UFe, + chcy: QFe, + check: VFe, + checkmark: WFe, + Chi: YFe, + chi: GFe, + circ: HFe, + circeq: XFe, + circlearrowleft: ZFe, + circlearrowright: jFe, + circledast: KFe, + circledcirc: JFe, + circleddash: eze, + CircleDot: tze, + circledR: rze, + circledS: nze, + CircleMinus: ize, + CirclePlus: sze, + CircleTimes: aze, + cir: oze, + cirE: lze, + cire: cze, + cirfnint: uze, + cirmid: hze, + cirscir: fze, + ClockwiseContourIntegral: dze, + CloseCurlyDoubleQuote: pze, + CloseCurlyQuote: gze, + clubs: mze, + clubsuit: vze, + colon: yze, + Colon: bze, + Colone: xze, + colone: wze, + coloneq: Oze, + comma: kze, + commat: Sze, + comp: Tze, + compfn: Cze, + complement: Eze, + complexes: _ze, + cong: Aze, + congdot: Rze, + Congruent: Lze, + conint: Mze, + Conint: Dze, + ContourIntegral: Pze, + copf: Nze, + Copf: Ize, + coprod: $ze, + Coproduct: Bze, + copy: Fze, + COPY: zze, + copysr: qze, + CounterClockwiseContourIntegral: Uze, + crarr: Qze, + cross: Vze, + Cross: Wze, + Cscr: Yze, + cscr: Gze, + csub: Hze, + csube: Xze, + csup: Zze, + csupe: jze, + ctdot: Kze, + cudarrl: Jze, + cudarrr: eqe, + cuepr: tqe, + cuesc: rqe, + cularr: nqe, + cularrp: iqe, + cupbrcap: sqe, + cupcap: aqe, + CupCap: oqe, + cup: lqe, + Cup: cqe, + cupcup: uqe, + cupdot: hqe, + cupor: fqe, + cups: dqe, + curarr: pqe, + curarrm: gqe, + curlyeqprec: mqe, + curlyeqsucc: vqe, + curlyvee: yqe, + curlywedge: bqe, + curren: xqe, + curvearrowleft: wqe, + curvearrowright: Oqe, + cuvee: kqe, + cuwed: Sqe, + cwconint: Tqe, + cwint: Cqe, + cylcty: Eqe, + dagger: _qe, + Dagger: Aqe, + daleth: Rqe, + darr: Lqe, + Darr: Mqe, + dArr: Dqe, + dash: Pqe, + Dashv: Nqe, + dashv: Iqe, + dbkarow: $qe, + dblac: Bqe, + Dcaron: Fqe, + dcaron: zqe, + Dcy: qqe, + dcy: Uqe, + ddagger: Qqe, + ddarr: Vqe, + DD: Wqe, + dd: Yqe, + DDotrahd: Gqe, + ddotseq: Hqe, + deg: Xqe, + Del: Zqe, + Delta: jqe, + delta: Kqe, + demptyv: Jqe, + dfisht: eUe, + Dfr: tUe, + dfr: rUe, + dHar: nUe, + dharl: iUe, + dharr: sUe, + DiacriticalAcute: aUe, + DiacriticalDot: oUe, + DiacriticalDoubleAcute: lUe, + DiacriticalGrave: cUe, + DiacriticalTilde: uUe, + diam: hUe, + diamond: fUe, + Diamond: dUe, + diamondsuit: pUe, + diams: gUe, + die: mUe, + DifferentialD: vUe, + digamma: yUe, + disin: bUe, + div: xUe, + divide: wUe, + divideontimes: OUe, + divonx: kUe, + DJcy: SUe, + djcy: TUe, + dlcorn: CUe, + dlcrop: EUe, + dollar: _Ue, + Dopf: AUe, + dopf: RUe, + Dot: LUe, + dot: MUe, + DotDot: DUe, + doteq: PUe, + doteqdot: NUe, + DotEqual: IUe, + dotminus: $Ue, + dotplus: BUe, + dotsquare: FUe, + doublebarwedge: zUe, + DoubleContourIntegral: qUe, + DoubleDot: UUe, + DoubleDownArrow: QUe, + DoubleLeftArrow: VUe, + DoubleLeftRightArrow: WUe, + DoubleLeftTee: YUe, + DoubleLongLeftArrow: GUe, + DoubleLongLeftRightArrow: HUe, + DoubleLongRightArrow: XUe, + DoubleRightArrow: ZUe, + DoubleRightTee: jUe, + DoubleUpArrow: KUe, + DoubleUpDownArrow: JUe, + DoubleVerticalBar: eQe, + DownArrowBar: tQe, + downarrow: rQe, + DownArrow: nQe, + Downarrow: iQe, + DownArrowUpArrow: sQe, + DownBreve: aQe, + downdownarrows: oQe, + downharpoonleft: lQe, + downharpoonright: cQe, + DownLeftRightVector: uQe, + DownLeftTeeVector: hQe, + DownLeftVectorBar: fQe, + DownLeftVector: dQe, + DownRightTeeVector: pQe, + DownRightVectorBar: gQe, + DownRightVector: mQe, + DownTeeArrow: vQe, + DownTee: yQe, + drbkarow: bQe, + drcorn: xQe, + drcrop: wQe, + Dscr: OQe, + dscr: kQe, + DScy: SQe, + dscy: TQe, + dsol: CQe, + Dstrok: EQe, + dstrok: _Qe, + dtdot: AQe, + dtri: RQe, + dtrif: LQe, + duarr: MQe, + duhar: DQe, + dwangle: PQe, + DZcy: NQe, + dzcy: IQe, + dzigrarr: $Qe, + Eacute: BQe, + eacute: FQe, + easter: zQe, + Ecaron: qQe, + ecaron: UQe, + Ecirc: QQe, + ecirc: VQe, + ecir: WQe, + ecolon: YQe, + Ecy: GQe, + ecy: HQe, + eDDot: XQe, + Edot: ZQe, + edot: jQe, + eDot: KQe, + ee: JQe, + efDot: eVe, + Efr: tVe, + efr: rVe, + eg: nVe, + Egrave: iVe, + egrave: sVe, + egs: aVe, + egsdot: oVe, + el: lVe, + Element: cVe, + elinters: uVe, + ell: hVe, + els: fVe, + elsdot: dVe, + Emacr: pVe, + emacr: gVe, + empty: mVe, + emptyset: vVe, + EmptySmallSquare: yVe, + emptyv: bVe, + EmptyVerySmallSquare: xVe, + emsp13: wVe, + emsp14: OVe, + emsp: kVe, + ENG: SVe, + eng: TVe, + ensp: CVe, + Eogon: EVe, + eogon: _Ve, + Eopf: AVe, + eopf: RVe, + epar: LVe, + eparsl: MVe, + eplus: DVe, + epsi: PVe, + Epsilon: NVe, + epsilon: IVe, + epsiv: $Ve, + eqcirc: BVe, + eqcolon: FVe, + eqsim: zVe, + eqslantgtr: qVe, + eqslantless: UVe, + Equal: QVe, + equals: VVe, + EqualTilde: WVe, + equest: YVe, + Equilibrium: GVe, + equiv: HVe, + equivDD: XVe, + eqvparsl: ZVe, + erarr: jVe, + erDot: KVe, + escr: JVe, + Escr: eWe, + esdot: tWe, + Esim: rWe, + esim: nWe, + Eta: iWe, + eta: sWe, + ETH: aWe, + eth: oWe, + Euml: lWe, + euml: cWe, + euro: uWe, + excl: hWe, + exist: fWe, + Exists: dWe, + expectation: pWe, + exponentiale: gWe, + ExponentialE: mWe, + fallingdotseq: vWe, + Fcy: yWe, + fcy: bWe, + female: xWe, + ffilig: wWe, + fflig: OWe, + ffllig: kWe, + Ffr: SWe, + ffr: TWe, + filig: CWe, + FilledSmallSquare: EWe, + FilledVerySmallSquare: _We, + fjlig: AWe, + flat: RWe, + fllig: LWe, + fltns: MWe, + fnof: DWe, + Fopf: PWe, + fopf: NWe, + forall: IWe, + ForAll: $We, + fork: BWe, + forkv: FWe, + Fouriertrf: zWe, + fpartint: qWe, + frac12: UWe, + frac13: QWe, + frac14: VWe, + frac15: WWe, + frac16: YWe, + frac18: GWe, + frac23: HWe, + frac25: XWe, + frac34: ZWe, + frac35: jWe, + frac38: KWe, + frac45: JWe, + frac56: eYe, + frac58: tYe, + frac78: rYe, + frasl: nYe, + frown: iYe, + fscr: sYe, + Fscr: aYe, + gacute: oYe, + Gamma: lYe, + gamma: cYe, + Gammad: uYe, + gammad: hYe, + gap: fYe, + Gbreve: dYe, + gbreve: pYe, + Gcedil: gYe, + Gcirc: mYe, + gcirc: vYe, + Gcy: yYe, + gcy: bYe, + Gdot: xYe, + gdot: wYe, + ge: OYe, + gE: kYe, + gEl: SYe, + gel: TYe, + geq: CYe, + geqq: EYe, + geqslant: _Ye, + gescc: AYe, + ges: RYe, + gesdot: LYe, + gesdoto: MYe, + gesdotol: DYe, + gesl: PYe, + gesles: NYe, + Gfr: IYe, + gfr: $Ye, + gg: BYe, + Gg: FYe, + ggg: zYe, + gimel: qYe, + GJcy: UYe, + gjcy: QYe, + gla: VYe, + gl: WYe, + glE: YYe, + glj: GYe, + gnap: HYe, + gnapprox: XYe, + gne: ZYe, + gnE: jYe, + gneq: KYe, + gneqq: JYe, + gnsim: eGe, + Gopf: tGe, + gopf: rGe, + grave: nGe, + GreaterEqual: iGe, + GreaterEqualLess: sGe, + GreaterFullEqual: aGe, + GreaterGreater: oGe, + GreaterLess: lGe, + GreaterSlantEqual: cGe, + GreaterTilde: uGe, + Gscr: hGe, + gscr: fGe, + gsim: dGe, + gsime: pGe, + gsiml: gGe, + gtcc: mGe, + gtcir: vGe, + gt: yGe, + GT: bGe, + Gt: xGe, + gtdot: wGe, + gtlPar: OGe, + gtquest: kGe, + gtrapprox: SGe, + gtrarr: TGe, + gtrdot: CGe, + gtreqless: EGe, + gtreqqless: _Ge, + gtrless: AGe, + gtrsim: RGe, + gvertneqq: LGe, + gvnE: MGe, + Hacek: DGe, + hairsp: PGe, + half: NGe, + hamilt: IGe, + HARDcy: $Ge, + hardcy: BGe, + harrcir: FGe, + harr: zGe, + hArr: qGe, + harrw: UGe, + Hat: QGe, + hbar: VGe, + Hcirc: WGe, + hcirc: YGe, + hearts: GGe, + heartsuit: HGe, + hellip: XGe, + hercon: ZGe, + hfr: jGe, + Hfr: KGe, + HilbertSpace: JGe, + hksearow: eHe, + hkswarow: tHe, + hoarr: rHe, + homtht: nHe, + hookleftarrow: iHe, + hookrightarrow: sHe, + hopf: aHe, + Hopf: oHe, + horbar: lHe, + HorizontalLine: cHe, + hscr: uHe, + Hscr: hHe, + hslash: fHe, + Hstrok: dHe, + hstrok: pHe, + HumpDownHump: gHe, + HumpEqual: mHe, + hybull: vHe, + hyphen: yHe, + Iacute: bHe, + iacute: xHe, + ic: wHe, + Icirc: OHe, + icirc: kHe, + Icy: SHe, + icy: THe, + Idot: CHe, + IEcy: EHe, + iecy: _He, + iexcl: AHe, + iff: RHe, + ifr: LHe, + Ifr: MHe, + Igrave: DHe, + igrave: PHe, + ii: NHe, + iiiint: IHe, + iiint: $He, + iinfin: BHe, + iiota: FHe, + IJlig: zHe, + ijlig: qHe, + Imacr: UHe, + imacr: QHe, + image: VHe, + ImaginaryI: WHe, + imagline: YHe, + imagpart: GHe, + imath: HHe, + Im: XHe, + imof: ZHe, + imped: jHe, + Implies: KHe, + incare: JHe, + in: "\u2208", + infin: eXe, + infintie: tXe, + inodot: rXe, + intcal: nXe, + int: iXe, + Int: sXe, + integers: aXe, + Integral: oXe, + intercal: lXe, + Intersection: cXe, + intlarhk: uXe, + intprod: hXe, + InvisibleComma: fXe, + InvisibleTimes: dXe, + IOcy: pXe, + iocy: gXe, + Iogon: mXe, + iogon: vXe, + Iopf: yXe, + iopf: bXe, + Iota: xXe, + iota: wXe, + iprod: OXe, + iquest: kXe, + iscr: SXe, + Iscr: TXe, + isin: CXe, + isindot: EXe, + isinE: _Xe, + isins: AXe, + isinsv: RXe, + isinv: LXe, + it: MXe, + Itilde: DXe, + itilde: PXe, + Iukcy: NXe, + iukcy: IXe, + Iuml: $Xe, + iuml: BXe, + Jcirc: FXe, + jcirc: zXe, + Jcy: qXe, + jcy: UXe, + Jfr: QXe, + jfr: VXe, + jmath: WXe, + Jopf: YXe, + jopf: GXe, + Jscr: HXe, + jscr: XXe, + Jsercy: ZXe, + jsercy: jXe, + Jukcy: KXe, + jukcy: JXe, + Kappa: eZe, + kappa: tZe, + kappav: rZe, + Kcedil: nZe, + kcedil: iZe, + Kcy: sZe, + kcy: aZe, + Kfr: oZe, + kfr: lZe, + kgreen: cZe, + KHcy: uZe, + khcy: hZe, + KJcy: fZe, + kjcy: dZe, + Kopf: pZe, + kopf: gZe, + Kscr: mZe, + kscr: vZe, + lAarr: yZe, + Lacute: bZe, + lacute: xZe, + laemptyv: wZe, + lagran: OZe, + Lambda: kZe, + lambda: SZe, + lang: TZe, + Lang: CZe, + langd: EZe, + langle: _Ze, + lap: AZe, + Laplacetrf: RZe, + laquo: LZe, + larrb: MZe, + larrbfs: DZe, + larr: PZe, + Larr: NZe, + lArr: IZe, + larrfs: $Ze, + larrhk: BZe, + larrlp: FZe, + larrpl: zZe, + larrsim: qZe, + larrtl: UZe, + latail: QZe, + lAtail: VZe, + lat: WZe, + late: YZe, + lates: GZe, + lbarr: HZe, + lBarr: XZe, + lbbrk: ZZe, + lbrace: jZe, + lbrack: KZe, + lbrke: JZe, + lbrksld: eje, + lbrkslu: tje, + Lcaron: rje, + lcaron: nje, + Lcedil: ije, + lcedil: sje, + lceil: aje, + lcub: oje, + Lcy: lje, + lcy: cje, + ldca: uje, + ldquo: hje, + ldquor: fje, + ldrdhar: dje, + ldrushar: pje, + ldsh: gje, + le: mje, + lE: vje, + LeftAngleBracket: yje, + LeftArrowBar: bje, + leftarrow: xje, + LeftArrow: wje, + Leftarrow: Oje, + LeftArrowRightArrow: kje, + leftarrowtail: Sje, + LeftCeiling: Tje, + LeftDoubleBracket: Cje, + LeftDownTeeVector: Eje, + LeftDownVectorBar: _je, + LeftDownVector: Aje, + LeftFloor: Rje, + leftharpoondown: Lje, + leftharpoonup: Mje, + leftleftarrows: Dje, + leftrightarrow: Pje, + LeftRightArrow: Nje, + Leftrightarrow: Ije, + leftrightarrows: $je, + leftrightharpoons: Bje, + leftrightsquigarrow: Fje, + LeftRightVector: zje, + LeftTeeArrow: qje, + LeftTee: Uje, + LeftTeeVector: Qje, + leftthreetimes: Vje, + LeftTriangleBar: Wje, + LeftTriangle: Yje, + LeftTriangleEqual: Gje, + LeftUpDownVector: Hje, + LeftUpTeeVector: Xje, + LeftUpVectorBar: Zje, + LeftUpVector: jje, + LeftVectorBar: Kje, + LeftVector: Jje, + lEg: eKe, + leg: tKe, + leq: rKe, + leqq: nKe, + leqslant: iKe, + lescc: sKe, + les: aKe, + lesdot: oKe, + lesdoto: lKe, + lesdotor: cKe, + lesg: uKe, + lesges: hKe, + lessapprox: fKe, + lessdot: dKe, + lesseqgtr: pKe, + lesseqqgtr: gKe, + LessEqualGreater: mKe, + LessFullEqual: vKe, + LessGreater: yKe, + lessgtr: bKe, + LessLess: xKe, + lesssim: wKe, + LessSlantEqual: OKe, + LessTilde: kKe, + lfisht: SKe, + lfloor: TKe, + Lfr: CKe, + lfr: EKe, + lg: _Ke, + lgE: AKe, + lHar: RKe, + lhard: LKe, + lharu: MKe, + lharul: DKe, + lhblk: PKe, + LJcy: NKe, + ljcy: IKe, + llarr: $Ke, + ll: BKe, + Ll: FKe, + llcorner: zKe, + Lleftarrow: qKe, + llhard: UKe, + lltri: QKe, + Lmidot: VKe, + lmidot: WKe, + lmoustache: YKe, + lmoust: GKe, + lnap: HKe, + lnapprox: XKe, + lne: ZKe, + lnE: jKe, + lneq: KKe, + lneqq: JKe, + lnsim: eJe, + loang: tJe, + loarr: rJe, + lobrk: nJe, + longleftarrow: iJe, + LongLeftArrow: sJe, + Longleftarrow: aJe, + longleftrightarrow: oJe, + LongLeftRightArrow: lJe, + Longleftrightarrow: cJe, + longmapsto: uJe, + longrightarrow: hJe, + LongRightArrow: fJe, + Longrightarrow: dJe, + looparrowleft: pJe, + looparrowright: gJe, + lopar: mJe, + Lopf: vJe, + lopf: yJe, + loplus: bJe, + lotimes: xJe, + lowast: wJe, + lowbar: OJe, + LowerLeftArrow: kJe, + LowerRightArrow: SJe, + loz: TJe, + lozenge: CJe, + lozf: EJe, + lpar: _Je, + lparlt: AJe, + lrarr: RJe, + lrcorner: LJe, + lrhar: MJe, + lrhard: DJe, + lrm: PJe, + lrtri: NJe, + lsaquo: IJe, + lscr: $Je, + Lscr: BJe, + lsh: FJe, + Lsh: zJe, + lsim: qJe, + lsime: UJe, + lsimg: QJe, + lsqb: VJe, + lsquo: WJe, + lsquor: YJe, + Lstrok: GJe, + lstrok: HJe, + ltcc: XJe, + ltcir: ZJe, + lt: jJe, + LT: KJe, + Lt: JJe, + ltdot: eet, + lthree: tet, + ltimes: ret, + ltlarr: net, + ltquest: iet, + ltri: set, + ltrie: aet, + ltrif: oet, + ltrPar: cet, + lurdshar: uet, + luruhar: het, + lvertneqq: fet, + lvnE: det, + macr: pet, + male: get, + malt: met, + maltese: vet, + Map: "\u2905", + map: yet, + mapsto: bet, + mapstodown: xet, + mapstoleft: wet, + mapstoup: Oet, + marker: ket, + mcomma: Tet, + Mcy: Cet, + mcy: Eet, + mdash: _et, + mDDot: Aet, + measuredangle: Ret, + MediumSpace: Let, + Mellintrf: Met, + Mfr: Det, + mfr: Pet, + mho: Net, + micro: Iet, + midast: $et, + midcir: Bet, + mid: Fet, + middot: zet, + minusb: qet, + minus: Uet, + minusd: Qet, + minusdu: Vet, + MinusPlus: Wet, + mlcp: Yet, + mldr: Get, + mnplus: Het, + models: Xet, + Mopf: Zet, + mopf: jet, + mp: Ket, + mscr: Jet, + Mscr: ett, + mstpos: ttt, + Mu: rtt, + mu: ntt, + multimap: itt, + mumap: stt, + nabla: att, + Nacute: ott, + nacute: ltt, + nang: ctt, + nap: utt, + napE: htt, + napid: ftt, + napos: dtt, + napprox: ptt, + natural: gtt, + naturals: mtt, + natur: vtt, + nbsp: ytt, + nbump: btt, + nbumpe: xtt, + ncap: wtt, + Ncaron: Ott, + ncaron: ktt, + Ncedil: Stt, + ncedil: Ttt, + ncong: Ctt, + ncongdot: Ett, + ncup: _tt, + Ncy: Att, + ncy: Rtt, + ndash: Ltt, + nearhk: Mtt, + nearr: Dtt, + neArr: Ptt, + nearrow: Ntt, + ne: Itt, + nedot: $tt, + NegativeMediumSpace: Btt, + NegativeThickSpace: Ftt, + NegativeThinSpace: ztt, + NegativeVeryThinSpace: qtt, + nequiv: Utt, + nesear: Qtt, + nesim: Vtt, + NestedGreaterGreater: Wtt, + NestedLessLess: Ytt, + NewLine: Gtt, + nexist: Htt, + nexists: Xtt, + Nfr: Ztt, + nfr: jtt, + ngE: Ktt, + nge: Jtt, + ngeq: ert, + ngeqq: trt, + ngeqslant: rrt, + nges: nrt, + nGg: irt, + ngsim: srt, + nGt: art, + ngt: ort, + ngtr: lrt, + nGtv: crt, + nharr: urt, + nhArr: hrt, + nhpar: frt, + ni: drt, + nis: prt, + nisd: grt, + niv: mrt, + NJcy: vrt, + njcy: yrt, + nlarr: brt, + nlArr: xrt, + nldr: wrt, + nlE: Ort, + nle: krt, + nleftarrow: Srt, + nLeftarrow: Trt, + nleftrightarrow: Crt, + nLeftrightarrow: Ert, + nleq: _rt, + nleqq: Art, + nleqslant: Rrt, + nles: Lrt, + nless: Mrt, + nLl: Drt, + nlsim: Prt, + nLt: Nrt, + nlt: Irt, + nltri: $rt, + nltrie: Brt, + nLtv: Frt, + nmid: zrt, + NoBreak: qrt, + NonBreakingSpace: Urt, + nopf: Qrt, + Nopf: Vrt, + Not: Wrt, + not: Yrt, + NotCongruent: Grt, + NotCupCap: Hrt, + NotDoubleVerticalBar: Xrt, + NotElement: Zrt, + NotEqual: jrt, + NotEqualTilde: Krt, + NotExists: Jrt, + NotGreater: ent, + NotGreaterEqual: tnt, + NotGreaterFullEqual: rnt, + NotGreaterGreater: nnt, + NotGreaterLess: int, + NotGreaterSlantEqual: snt, + NotGreaterTilde: ant, + NotHumpDownHump: ont, + NotHumpEqual: lnt, + notin: cnt, + notindot: unt, + notinE: hnt, + notinva: fnt, + notinvb: dnt, + notinvc: pnt, + NotLeftTriangleBar: gnt, + NotLeftTriangle: mnt, + NotLeftTriangleEqual: vnt, + NotLess: ynt, + NotLessEqual: bnt, + NotLessGreater: xnt, + NotLessLess: wnt, + NotLessSlantEqual: Ont, + NotLessTilde: knt, + NotNestedGreaterGreater: Snt, + NotNestedLessLess: Tnt, + notni: Cnt, + notniva: Ent, + notnivb: _nt, + notnivc: Ant, + NotPrecedes: Rnt, + NotPrecedesEqual: Lnt, + NotPrecedesSlantEqual: Mnt, + NotReverseElement: Dnt, + NotRightTriangleBar: Pnt, + NotRightTriangle: Nnt, + NotRightTriangleEqual: Int, + NotSquareSubset: $nt, + NotSquareSubsetEqual: Bnt, + NotSquareSuperset: Fnt, + NotSquareSupersetEqual: znt, + NotSubset: qnt, + NotSubsetEqual: Unt, + NotSucceeds: Qnt, + NotSucceedsEqual: Vnt, + NotSucceedsSlantEqual: Wnt, + NotSucceedsTilde: Ynt, + NotSuperset: Gnt, + NotSupersetEqual: Hnt, + NotTilde: Xnt, + NotTildeEqual: Znt, + NotTildeFullEqual: jnt, + NotTildeTilde: Knt, + NotVerticalBar: Jnt, + nparallel: eit, + npar: tit, + nparsl: rit, + npart: nit, + npolint: iit, + npr: sit, + nprcue: ait, + nprec: oit, + npreceq: lit, + npre: cit, + nrarrc: uit, + nrarr: hit, + nrArr: fit, + nrarrw: dit, + nrightarrow: pit, + nRightarrow: git, + nrtri: mit, + nrtrie: vit, + nsc: yit, + nsccue: bit, + nsce: xit, + Nscr: wit, + nscr: Oit, + nshortmid: kit, + nshortparallel: Sit, + nsim: Tit, + nsime: Cit, + nsimeq: Eit, + nsmid: _it, + nspar: Ait, + nsqsube: Rit, + nsqsupe: Lit, + nsub: Mit, + nsubE: Dit, + nsube: Pit, + nsubset: Nit, + nsubseteq: Iit, + nsubseteqq: $it, + nsucc: Bit, + nsucceq: Fit, + nsup: zit, + nsupE: qit, + nsupe: Uit, + nsupset: Qit, + nsupseteq: Vit, + nsupseteqq: Wit, + ntgl: Yit, + Ntilde: Git, + ntilde: Hit, + ntlg: Xit, + ntriangleleft: Zit, + ntrianglelefteq: jit, + ntriangleright: Kit, + ntrianglerighteq: Jit, + Nu: est, + nu: tst, + num: rst, + numero: nst, + numsp: ist, + nvap: sst, + nvdash: ast, + nvDash: ost, + nVdash: lst, + nVDash: cst, + nvge: ust, + nvgt: hst, + nvHarr: fst, + nvinfin: dst, + nvlArr: pst, + nvle: gst, + nvlt: mst, + nvltrie: vst, + nvrArr: yst, + nvrtrie: bst, + nvsim: xst, + nwarhk: wst, + nwarr: Ost, + nwArr: kst, + nwarrow: Sst, + nwnear: Tst, + Oacute: Cst, + oacute: Est, + oast: _st, + Ocirc: Ast, + ocirc: Rst, + ocir: Lst, + Ocy: Mst, + ocy: Dst, + odash: Pst, + Odblac: Nst, + odblac: Ist, + odiv: $st, + odot: Bst, + odsold: Fst, + OElig: zst, + oelig: qst, + ofcir: Ust, + Ofr: Qst, + ofr: Vst, + ogon: Wst, + Ograve: Yst, + ograve: Gst, + ogt: Hst, + ohbar: Xst, + ohm: Zst, + oint: jst, + olarr: Kst, + olcir: Jst, + olcross: eat, + oline: tat, + olt: rat, + Omacr: nat, + omacr: iat, + Omega: sat, + omega: aat, + Omicron: oat, + omicron: lat, + omid: cat, + ominus: uat, + Oopf: hat, + oopf: fat, + opar: dat, + OpenCurlyDoubleQuote: pat, + OpenCurlyQuote: gat, + operp: mat, + oplus: vat, + orarr: yat, + Or: bat, + or: xat, + ord: wat, + order: Oat, + orderof: kat, + ordf: Sat, + ordm: Tat, + origof: Cat, + oror: Eat, + orslope: _at, + orv: Aat, + oS: Rat, + Oscr: Lat, + oscr: Mat, + Oslash: Dat, + oslash: Pat, + osol: Nat, + Otilde: Iat, + otilde: $at, + otimesas: Bat, + Otimes: Fat, + otimes: zat, + Ouml: qat, + ouml: Uat, + ovbar: Qat, + OverBar: Vat, + OverBrace: Wat, + OverBracket: Yat, + OverParenthesis: Gat, + para: Hat, + parallel: Xat, + par: Zat, + parsim: jat, + parsl: Kat, + part: Jat, + PartialD: eot, + Pcy: tot, + pcy: rot, + percnt: not, + period: iot, + permil: sot, + perp: aot, + pertenk: oot, + Pfr: lot, + pfr: cot, + Phi: uot, + phi: hot, + phiv: fot, + phmmat: dot, + phone: pot, + Pi: got, + pi: mot, + pitchfork: vot, + piv: yot, + planck: bot, + planckh: xot, + plankv: wot, + plusacir: Oot, + plusb: kot, + pluscir: Sot, + plus: Tot, + plusdo: Cot, + plusdu: Eot, + pluse: _ot, + PlusMinus: Aot, + plusmn: Rot, + plussim: Lot, + plustwo: Mot, + pm: Dot, + Poincareplane: Pot, + pointint: Not, + popf: Iot, + Popf: $ot, + pound: Bot, + prap: Fot, + Pr: zot, + pr: qot, + prcue: Uot, + precapprox: Qot, + prec: Vot, + preccurlyeq: Wot, + Precedes: Yot, + PrecedesEqual: Got, + PrecedesSlantEqual: Hot, + PrecedesTilde: Xot, + preceq: Zot, + precnapprox: jot, + precneqq: Kot, + precnsim: Jot, + pre: elt, + prE: tlt, + precsim: rlt, + prime: nlt, + Prime: ilt, + primes: slt, + prnap: alt, + prnE: olt, + prnsim: llt, + prod: clt, + Product: ult, + profalar: hlt, + profline: flt, + profsurf: dlt, + prop: plt, + Proportional: glt, + Proportion: mlt, + propto: vlt, + prsim: ylt, + prurel: blt, + Pscr: xlt, + pscr: wlt, + Psi: Olt, + psi: klt, + puncsp: Slt, + Qfr: Tlt, + qfr: Clt, + qint: Elt, + qopf: _lt, + Qopf: Alt, + qprime: Rlt, + Qscr: Llt, + qscr: Mlt, + quaternions: Dlt, + quatint: Plt, + quest: Nlt, + questeq: Ilt, + quot: $lt, + QUOT: Blt, + rAarr: Flt, + race: zlt, + Racute: qlt, + racute: Ult, + radic: Qlt, + raemptyv: Vlt, + rang: Wlt, + Rang: Ylt, + rangd: Glt, + range: Hlt, + rangle: Xlt, + raquo: Zlt, + rarrap: jlt, + rarrb: Klt, + rarrbfs: Jlt, + rarrc: ect, + rarr: tct, + Rarr: rct, + rArr: nct, + rarrfs: ict, + rarrhk: sct, + rarrlp: act, + rarrpl: oct, + rarrsim: lct, + Rarrtl: cct, + rarrtl: uct, + rarrw: hct, + ratail: fct, + rAtail: dct, + ratio: pct, + rationals: gct, + rbarr: mct, + rBarr: vct, + RBarr: yct, + rbbrk: bct, + rbrace: xct, + rbrack: wct, + rbrke: Oct, + rbrksld: kct, + rbrkslu: Sct, + Rcaron: Tct, + rcaron: Cct, + Rcedil: Ect, + rcedil: _ct, + rceil: Act, + rcub: Rct, + Rcy: Lct, + rcy: Mct, + rdca: Dct, + rdldhar: Pct, + rdquo: Nct, + rdquor: Ict, + rdsh: $ct, + real: Bct, + realine: Fct, + realpart: zct, + reals: qct, + Re: Uct, + rect: Qct, + reg: Vct, + REG: Wct, + ReverseElement: Yct, + ReverseEquilibrium: Gct, + ReverseUpEquilibrium: Hct, + rfisht: Xct, + rfloor: Zct, + rfr: jct, + Rfr: Kct, + rHar: Jct, + rhard: eut, + rharu: tut, + rharul: rut, + Rho: nut, + rho: iut, + rhov: sut, + RightAngleBracket: aut, + RightArrowBar: out, + rightarrow: lut, + RightArrow: cut, + Rightarrow: uut, + RightArrowLeftArrow: hut, + rightarrowtail: fut, + RightCeiling: dut, + RightDoubleBracket: put, + RightDownTeeVector: gut, + RightDownVectorBar: mut, + RightDownVector: vut, + RightFloor: yut, + rightharpoondown: but, + rightharpoonup: xut, + rightleftarrows: wut, + rightleftharpoons: Out, + rightrightarrows: kut, + rightsquigarrow: Sut, + RightTeeArrow: Tut, + RightTee: Cut, + RightTeeVector: Eut, + rightthreetimes: _ut, + RightTriangleBar: Aut, + RightTriangle: Rut, + RightTriangleEqual: Lut, + RightUpDownVector: Mut, + RightUpTeeVector: Dut, + RightUpVectorBar: Put, + RightUpVector: Nut, + RightVectorBar: Iut, + RightVector: $ut, + ring: But, + risingdotseq: Fut, + rlarr: zut, + rlhar: qut, + rlm: Uut, + rmoustache: Qut, + rmoust: Vut, + rnmid: Wut, + roang: Yut, + roarr: Gut, + robrk: Hut, + ropar: Xut, + ropf: Zut, + Ropf: jut, + roplus: Kut, + rotimes: Jut, + RoundImplies: eht, + rpar: tht, + rpargt: rht, + rppolint: nht, + rrarr: iht, + Rrightarrow: sht, + rsaquo: aht, + rscr: oht, + Rscr: lht, + rsh: cht, + Rsh: uht, + rsqb: hht, + rsquo: fht, + rsquor: dht, + rthree: pht, + rtimes: ght, + rtri: mht, + rtrie: vht, + rtrif: yht, + rtriltri: bht, + RuleDelayed: xht, + ruluhar: wht, + rx: Oht, + Sacute: kht, + sacute: Sht, + sbquo: Tht, + scap: Cht, + Scaron: Eht, + scaron: _ht, + Sc: Aht, + sc: Rht, + sccue: Lht, + sce: Mht, + scE: Dht, + Scedil: Pht, + scedil: Nht, + Scirc: Iht, + scirc: $ht, + scnap: Bht, + scnE: Fht, + scnsim: zht, + scpolint: qht, + scsim: Uht, + Scy: Qht, + scy: Vht, + sdotb: Wht, + sdot: Yht, + sdote: Ght, + searhk: Hht, + searr: Xht, + seArr: Zht, + searrow: jht, + sect: Kht, + semi: Jht, + seswar: eft, + setminus: tft, + setmn: rft, + sext: nft, + Sfr: ift, + sfr: sft, + sfrown: aft, + sharp: oft, + SHCHcy: lft, + shchcy: cft, + SHcy: uft, + shcy: hft, + ShortDownArrow: fft, + ShortLeftArrow: dft, + shortmid: pft, + shortparallel: gft, + ShortRightArrow: mft, + ShortUpArrow: vft, + shy: yft, + Sigma: bft, + sigma: xft, + sigmaf: wft, + sigmav: Oft, + sim: kft, + simdot: Sft, + sime: Tft, + simeq: Cft, + simg: Eft, + simgE: _ft, + siml: Aft, + simlE: Rft, + simne: Lft, + simplus: Mft, + simrarr: Dft, + slarr: Pft, + SmallCircle: Nft, + smallsetminus: Ift, + smashp: $ft, + smeparsl: Bft, + smid: Fft, + smile: zft, + smt: qft, + smte: Uft, + smtes: Qft, + SOFTcy: Vft, + softcy: Wft, + solbar: Yft, + solb: Gft, + sol: Hft, + Sopf: Xft, + sopf: Zft, + spades: jft, + spadesuit: Kft, + spar: Jft, + sqcap: edt, + sqcaps: tdt, + sqcup: rdt, + sqcups: ndt, + Sqrt: idt, + sqsub: sdt, + sqsube: adt, + sqsubset: odt, + sqsubseteq: ldt, + sqsup: cdt, + sqsupe: udt, + sqsupset: hdt, + sqsupseteq: fdt, + square: ddt, + Square: pdt, + SquareIntersection: gdt, + SquareSubset: mdt, + SquareSubsetEqual: vdt, + SquareSuperset: ydt, + SquareSupersetEqual: bdt, + SquareUnion: xdt, + squarf: wdt, + squ: Odt, + squf: kdt, + srarr: Sdt, + Sscr: Tdt, + sscr: Cdt, + ssetmn: Edt, + ssmile: _dt, + sstarf: Adt, + Star: Rdt, + star: Ldt, + starf: Mdt, + straightepsilon: Ddt, + straightphi: Pdt, + strns: Ndt, + sub: Idt, + Sub: $dt, + subdot: Bdt, + subE: Fdt, + sube: zdt, + subedot: qdt, + submult: Udt, + subnE: Qdt, + subne: Vdt, + subplus: Wdt, + subrarr: Ydt, + subset: Gdt, + Subset: Hdt, + subseteq: Xdt, + subseteqq: Zdt, + SubsetEqual: jdt, + subsetneq: Kdt, + subsetneqq: Jdt, + subsim: ept, + subsub: tpt, + subsup: rpt, + succapprox: npt, + succ: ipt, + succcurlyeq: spt, + Succeeds: apt, + SucceedsEqual: opt, + SucceedsSlantEqual: lpt, + SucceedsTilde: cpt, + succeq: upt, + succnapprox: hpt, + succneqq: fpt, + succnsim: dpt, + succsim: ppt, + SuchThat: gpt, + sum: mpt, + Sum: vpt, + sung: ypt, + sup1: bpt, + sup2: xpt, + sup3: wpt, + sup: Opt, + Sup: kpt, + supdot: Spt, + supdsub: Tpt, + supE: Cpt, + supe: Ept, + supedot: _pt, + Superset: Apt, + SupersetEqual: Rpt, + suphsol: Lpt, + suphsub: Mpt, + suplarr: Dpt, + supmult: Ppt, + supnE: Npt, + supne: Ipt, + supplus: $pt, + supset: Bpt, + Supset: Fpt, + supseteq: zpt, + supseteqq: qpt, + supsetneq: Upt, + supsetneqq: Qpt, + supsim: Vpt, + supsub: Wpt, + supsup: Ypt, + swarhk: Gpt, + swarr: Hpt, + swArr: Xpt, + swarrow: Zpt, + swnwar: jpt, + szlig: Kpt, + Tab: Jpt, + target: e0t, + Tau: t0t, + tau: r0t, + tbrk: n0t, + Tcaron: i0t, + tcaron: s0t, + Tcedil: a0t, + tcedil: o0t, + Tcy: l0t, + tcy: c0t, + tdot: u0t, + telrec: h0t, + Tfr: f0t, + tfr: d0t, + there4: p0t, + therefore: g0t, + Therefore: m0t, + Theta: v0t, + theta: y0t, + thetasym: b0t, + thetav: x0t, + thickapprox: w0t, + thicksim: O0t, + ThickSpace: k0t, + ThinSpace: S0t, + thinsp: T0t, + thkap: C0t, + thksim: E0t, + THORN: _0t, + thorn: A0t, + tilde: R0t, + Tilde: L0t, + TildeEqual: M0t, + TildeFullEqual: D0t, + TildeTilde: P0t, + timesbar: N0t, + timesb: I0t, + times: $0t, + timesd: B0t, + tint: F0t, + toea: z0t, + topbot: q0t, + topcir: U0t, + top: Q0t, + Topf: V0t, + topf: W0t, + topfork: Y0t, + tosa: G0t, + tprime: H0t, + trade: X0t, + TRADE: Z0t, + triangle: j0t, + triangledown: K0t, + triangleleft: J0t, + trianglelefteq: egt, + triangleq: tgt, + triangleright: rgt, + trianglerighteq: ngt, + tridot: igt, + trie: sgt, + triminus: agt, + TripleDot: ogt, + triplus: lgt, + trisb: cgt, + tritime: ugt, + trpezium: hgt, + Tscr: fgt, + tscr: dgt, + TScy: pgt, + tscy: ggt, + TSHcy: mgt, + tshcy: vgt, + Tstrok: ygt, + tstrok: bgt, + twixt: xgt, + twoheadleftarrow: wgt, + twoheadrightarrow: Ogt, + Uacute: kgt, + uacute: Sgt, + uarr: Tgt, + Uarr: Cgt, + uArr: Egt, + Uarrocir: _gt, + Ubrcy: Agt, + ubrcy: Rgt, + Ubreve: Lgt, + ubreve: Mgt, + Ucirc: Dgt, + ucirc: Pgt, + Ucy: Ngt, + ucy: Igt, + udarr: $gt, + Udblac: Bgt, + udblac: Fgt, + udhar: zgt, + ufisht: qgt, + Ufr: Ugt, + ufr: Qgt, + Ugrave: Vgt, + ugrave: Wgt, + uHar: Ygt, + uharl: Ggt, + uharr: Hgt, + uhblk: Xgt, + ulcorn: Zgt, + ulcorner: jgt, + ulcrop: Kgt, + ultri: Jgt, + Umacr: emt, + umacr: tmt, + uml: rmt, + UnderBar: nmt, + UnderBrace: imt, + UnderBracket: smt, + UnderParenthesis: amt, + Union: omt, + UnionPlus: lmt, + Uogon: cmt, + uogon: umt, + Uopf: hmt, + uopf: fmt, + UpArrowBar: dmt, + uparrow: pmt, + UpArrow: gmt, + Uparrow: mmt, + UpArrowDownArrow: vmt, + updownarrow: ymt, + UpDownArrow: bmt, + Updownarrow: xmt, + UpEquilibrium: wmt, + upharpoonleft: Omt, + upharpoonright: kmt, + uplus: Smt, + UpperLeftArrow: Tmt, + UpperRightArrow: Cmt, + upsi: Emt, + Upsi: _mt, + upsih: Amt, + Upsilon: Rmt, + upsilon: Lmt, + UpTeeArrow: Mmt, + UpTee: Dmt, + upuparrows: Pmt, + urcorn: Nmt, + urcorner: Imt, + urcrop: $mt, + Uring: Bmt, + uring: Fmt, + urtri: zmt, + Uscr: qmt, + uscr: Umt, + utdot: Qmt, + Utilde: Vmt, + utilde: Wmt, + utri: Ymt, + utrif: Gmt, + uuarr: Hmt, + Uuml: Xmt, + uuml: Zmt, + uwangle: jmt, + vangrt: Kmt, + varepsilon: Jmt, + varkappa: e1t, + varnothing: t1t, + varphi: r1t, + varpi: n1t, + varpropto: i1t, + varr: s1t, + vArr: a1t, + varrho: o1t, + varsigma: l1t, + varsubsetneq: c1t, + varsubsetneqq: u1t, + varsupsetneq: h1t, + varsupsetneqq: f1t, + vartheta: d1t, + vartriangleleft: p1t, + vartriangleright: g1t, + vBar: m1t, + Vbar: v1t, + vBarv: y1t, + Vcy: b1t, + vcy: x1t, + vdash: w1t, + vDash: O1t, + Vdash: k1t, + VDash: S1t, + Vdashl: T1t, + veebar: C1t, + vee: E1t, + Vee: _1t, + veeeq: A1t, + vellip: R1t, + verbar: L1t, + Verbar: M1t, + vert: D1t, + Vert: P1t, + VerticalBar: N1t, + VerticalLine: I1t, + VerticalSeparator: $1t, + VerticalTilde: B1t, + VeryThinSpace: F1t, + Vfr: z1t, + vfr: q1t, + vltri: U1t, + vnsub: Q1t, + vnsup: V1t, + Vopf: W1t, + vopf: Y1t, + vprop: G1t, + vrtri: H1t, + Vscr: X1t, + vscr: Z1t, + vsubnE: j1t, + vsubne: K1t, + vsupnE: J1t, + vsupne: evt, + Vvdash: tvt, + vzigzag: rvt, + Wcirc: nvt, + wcirc: ivt, + wedbar: svt, + wedge: avt, + Wedge: ovt, + wedgeq: lvt, + weierp: cvt, + Wfr: uvt, + wfr: hvt, + Wopf: fvt, + wopf: dvt, + wp: pvt, + wr: gvt, + wreath: mvt, + Wscr: vvt, + wscr: yvt, + xcap: bvt, + xcirc: xvt, + xcup: wvt, + xdtri: Ovt, + Xfr: kvt, + xfr: Svt, + xharr: Tvt, + xhArr: Cvt, + Xi: Evt, + xi: _vt, + xlarr: Avt, + xlArr: Rvt, + xmap: Lvt, + xnis: Mvt, + xodot: Dvt, + Xopf: Pvt, + xopf: Nvt, + xoplus: Ivt, + xotime: $vt, + xrarr: Bvt, + xrArr: Fvt, + Xscr: zvt, + xscr: qvt, + xsqcup: Uvt, + xuplus: Qvt, + xutri: Vvt, + xvee: Wvt, + xwedge: Yvt, + Yacute: Gvt, + yacute: Hvt, + YAcy: Xvt, + yacy: Zvt, + Ycirc: jvt, + ycirc: Kvt, + Ycy: Jvt, + ycy: eyt, + yen: tyt, + Yfr: ryt, + yfr: nyt, + YIcy: iyt, + yicy: syt, + Yopf: ayt, + yopf: oyt, + Yscr: lyt, + yscr: cyt, + YUcy: uyt, + yucy: hyt, + yuml: fyt, + Yuml: dyt, + Zacute: pyt, + zacute: gyt, + Zcaron: myt, + zcaron: vyt, + Zcy: yyt, + zcy: byt, + Zdot: xyt, + zdot: wyt, + zeetrf: Oyt, + ZeroWidthSpace: kyt, + Zeta: Syt, + zeta: Tyt, + zfr: Cyt, + Zfr: Eyt, + ZHcy: _yt, + zhcy: Ayt, + zigrarr: Ryt, + zopf: Lyt, + Zopf: Myt, + Zscr: Dyt, + zscr: Pyt, + zwj: Nyt, + zwnj: Iyt +}; +(function(t) { + t.exports = $yt; +})(WB); +var YB = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/, Fy = {}, FG = {}; +function Byt(t) { + var e, r, n = FG[t]; + if (n) + return n; + for (n = FG[t] = [], e = 0; e < 128; e++) + r = String.fromCharCode(e), /^[0-9a-z]$/i.test(r) ? n.push(r) : n.push("%" + ("0" + e.toString(16).toUpperCase()).slice(-2)); + for (e = 0; e < t.length; e++) + n[t.charCodeAt(e)] = t[e]; + return n; } -class cNe extends Zf { - run(e) { - const r = new this.state.Token("code_inline", "code", 0); - return r.content = e.content, [r]; +function r6(t, e, r) { + var n, i, s, a, o, l = ""; + for (typeof e != "string" && (r = e, e = r6.defaultChars), typeof r > "u" && (r = !0), o = Byt(e), n = 0, i = t.length; n < i; n++) { + if (s = t.charCodeAt(n), r && s === 37 && n + 2 < i && /^[0-9a-f]{2}$/i.test(t.slice(n + 1, n + 3))) { + l += t.slice(n, n + 3), n += 2; + continue; + } + if (s < 128) { + l += o[s]; + continue; + } + if (s >= 55296 && s <= 57343) { + if (s >= 55296 && s <= 56319 && n + 1 < i && (a = t.charCodeAt(n + 1), a >= 56320 && a <= 57343)) { + l += encodeURIComponent(t[n] + t[n + 1]), n++; + continue; + } + l += "%EF%BF%BD"; + continue; + } + l += encodeURIComponent(t[n]); } + return l; } -const uNe = { - raw: cNe -}, G9 = "math_inline"; -class hNe extends Zf { - run(e) { - const r = new this.state.Token(G9, "span", 0); - return r.attrSet("class", "math inline"), r.markup = "$", r.content = e.content, [r]; - } +r6.defaultChars = ";/?:@&=+$,-_.!~*'()#"; +r6.componentChars = "-_.!~*'()"; +var Fyt = r6, zG = {}; +function zyt(t) { + var e, r, n = zG[t]; + if (n) + return n; + for (n = zG[t] = [], e = 0; e < 128; e++) + r = String.fromCharCode(e), n.push(r); + for (e = 0; e < t.length; e++) + r = t.charCodeAt(e), n[r] = "%" + ("0" + r.toString(16).toUpperCase()).slice(-2); + return n; } -function fNe(t, e) { +function n6(t, e) { var r; - !(!((r = e == null ? void 0 : e.roles) === null || r === void 0) && r.math) || t.renderer.rules[G9] || (t.renderer.rules[G9] = (n, i) => { - var s, a, o; - const l = (o = (a = (s = e == null ? void 0 : e.opts) === null || s === void 0 ? void 0 : s.math) === null || a === void 0 ? void 0 : a.renderer) !== null && o !== void 0 ? o : (d) => t.utils.escapeHtml(d), u = n[i], h = u.content.trim(), f = l(h, { displayMode: !1 }); - return `${f}`; + return typeof e != "string" && (e = n6.defaultChars), r = zyt(e), t.replace(/(%[a-f0-9]{2})+/gi, function(n) { + var i, s, a, o, l, u, h, f = ""; + for (i = 0, s = n.length; i < s; i += 3) { + if (a = parseInt(n.slice(i + 1, i + 3), 16), a < 128) { + f += r[a]; + continue; + } + if ((a & 224) === 192 && i + 3 < s && (o = parseInt(n.slice(i + 4, i + 6), 16), (o & 192) === 128)) { + h = a << 6 & 1984 | o & 63, h < 128 ? f += "\uFFFD\uFFFD" : f += String.fromCharCode(h), i += 3; + continue; + } + if ((a & 240) === 224 && i + 6 < s && (o = parseInt(n.slice(i + 4, i + 6), 16), l = parseInt(n.slice(i + 7, i + 9), 16), (o & 192) === 128 && (l & 192) === 128)) { + h = a << 12 & 61440 | o << 6 & 4032 | l & 63, h < 2048 || h >= 55296 && h <= 57343 ? f += "\uFFFD\uFFFD\uFFFD" : f += String.fromCharCode(h), i += 6; + continue; + } + if ((a & 248) === 240 && i + 9 < s && (o = parseInt(n.slice(i + 4, i + 6), 16), l = parseInt(n.slice(i + 7, i + 9), 16), u = parseInt(n.slice(i + 10, i + 12), 16), (o & 192) === 128 && (l & 192) === 128 && (u & 192) === 128)) { + h = a << 18 & 1835008 | o << 12 & 258048 | l << 6 & 4032 | u & 63, h < 65536 || h > 1114111 ? f += "\uFFFD\uFFFD\uFFFD\uFFFD" : (h -= 65536, f += String.fromCharCode(55296 + (h >> 10), 56320 + (h & 1023))), i += 9; + continue; + } + f += "\uFFFD"; + } + return f; }); } -const dNe = { - math: hNe +n6.defaultChars = ";/?:@&=+$,#"; +n6.componentChars = ""; +var qyt = n6, Uyt = function(e) { + var r = ""; + return r += e.protocol || "", r += e.slashes ? "//" : "", r += e.auth ? e.auth + "@" : "", e.hostname && e.hostname.indexOf(":") !== -1 ? r += "[" + e.hostname + "]" : r += e.hostname || "", r += e.port ? ":" + e.port : "", r += e.pathname || "", r += e.search || "", r += e.hash || "", r; }; -function xue(t, e) { - e.parseRoles && t.inline.ruler.before("backticks", "parse_roles", pNe), t.core.ruler.after(e.rolesAfter || "inline", "run_roles", mNe(e.roles || {})), t.renderer.rules.role = (r, n) => { - const i = r[n]; - return `${i.meta.name}${i.content}`; - }, fNe(t, e); -} -function pNe(t, e) { - if (t.src.charCodeAt(t.pos - 1) === 92) - return !1; - const r = gNe.exec(t.src.slice(t.pos)); - if (r == null) - return !1; - const [n, i, , s] = r; - if (t.pos += n.length, !e) { - const a = t.push("role", "", 0); - a.meta = { name: i }, a.content = s; - } - return !0; -} -let H9; -try { - H9 = new RegExp("^\\{([a-zA-Z_\\-+:]{1,36})\\}(`+)(?!`)(.+?)(?", '"', "`", " ", "\r", ` +`, " "], Gyt = ["{", "}", "|", "\\", "^", "`"].concat(Yyt), Hyt = ["'"].concat(Gyt), qG = ["%", "/", "?", ";", "#"].concat(Hyt), UG = ["/", "?", "#"], Xyt = 255, QG = /^[+a-z0-9A-Z_-]{0,63}$/, Zyt = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, VG = { + javascript: !0, + "javascript:": !0 +}, WG = { + http: !0, + https: !0, + ftp: !0, + gopher: !0, + file: !0, + "http:": !0, + "https:": !0, + "ftp:": !0, + "gopher:": !0, + "file:": !0 +}; +function jyt(t, e) { + if (t && t instanceof NT) + return t; + var r = new NT(); + return r.parse(t, e), r; } -class $G extends Zf { - run(e) { - const r = new this.state.Token("sup_open", "sup", 1); - r.markup = "~"; - const n = new this.state.Token("text", "", 0); - n.content = e.content; - const i = new this.state.Token("sup_close", "sup", -1); - return i.markup = "~", [r, n, i]; +NT.prototype.parse = function(t, e) { + var r, n, i, s, a, o = t; + if (o = o.trim(), !e && t.split("#").length === 1) { + var l = Wyt.exec(o); + if (l) + return this.pathname = l[1], l[2] && (this.search = l[2]), this; } -} -const vNe = /^(.+?)\(([^()]+)\)$/; -class BG extends Zf { - run(e) { - var r, n, i, s; - const a = vNe.exec(e.content), o = (n = (r = a == null ? void 0 : a[1]) === null || r === void 0 ? void 0 : r.trim()) !== null && n !== void 0 ? n : e.content.trim(), l = (s = (i = a == null ? void 0 : a[2]) === null || i === void 0 ? void 0 : i.trim()) !== null && s !== void 0 ? s : null, u = new this.state.Token("abbr_open", "abbr", 1); - l && u.attrSet("title", l); - const h = new this.state.Token("text", "", 0); - h.content = o; - const f = new this.state.Token("abbr_close", "abbr", -1); - return [u, h, f]; + var u = Qyt.exec(o); + if (u && (u = u[0], i = u.toLowerCase(), this.protocol = u, o = o.substr(u.length)), (e || u || o.match(/^\/\/[^@\/]+@[^@\/]+/)) && (a = o.substr(0, 2) === "//", a && !(u && VG[u]) && (o = o.substr(2), this.slashes = !0)), !VG[u] && (a || u && !WG[u])) { + var h = -1; + for (r = 0; r < UG.length; r++) + s = o.indexOf(UG[r]), s !== -1 && (h === -1 || s < h) && (h = s); + var f, d; + for (h === -1 ? d = o.lastIndexOf("@") : d = o.lastIndexOf("@", h), d !== -1 && (f = o.slice(0, d), o = o.slice(d + 1), this.auth = f), h = -1, r = 0; r < qG.length; r++) + s = o.indexOf(qG[r]), s !== -1 && (h === -1 || s < h) && (h = s); + h === -1 && (h = o.length), o[h - 1] === ":" && h--; + var p = o.slice(0, h); + o = o.slice(h), this.parseHost(p), this.hostname = this.hostname || ""; + var g = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]"; + if (!g) { + var m = this.hostname.split(/\./); + for (r = 0, n = m.length; r < n; r++) { + var v = m[r]; + if (!!v && !v.match(QG)) { + for (var y = "", b = 0, w = v.length; b < w; b++) + v.charCodeAt(b) > 127 ? y += "x" : y += v[b]; + if (!y.match(QG)) { + var O = m.slice(0, r), S = m.slice(r + 1), C = v.match(Zyt); + C && (O.push(C[1]), S.unshift(C[2])), S.length && (o = S.join(".") + o), this.hostname = O.join("."); + break; + } + } + } + } + this.hostname.length > Xyt && (this.hostname = ""), g && (this.hostname = this.hostname.substr(1, this.hostname.length - 2)); } -} -const yNe = { - subscript: IG, - sub: IG, - superscript: $G, - sup: $G, - abbreviation: BG, - abbr: BG + var T = o.indexOf("#"); + T !== -1 && (this.hash = o.substr(T), o = o.slice(0, T)); + var M = o.indexOf("?"); + return M !== -1 && (this.search = o.substr(M), o = o.slice(0, M)), o && (this.pathname = o), WG[i] && this.hostname && !this.pathname && (this.pathname = ""), this; }; -var mw; -(function(t) { - t.equation = "eq", t.figure = "fig", t.table = "table", t.code = "code", t.section = "sec"; -})(mw || (mw = {})); -function v6(t) { - var e, r; - const n = (r = (e = t.env) === null || e === void 0 ? void 0 : e.docutils) !== null && r !== void 0 ? r : {}; - return n.targets || (n.targets = {}), n.references || (n.references = []), n.numbering || (n.numbering = {}), t.env.docutils || (t.env.docutils = n), n; +NT.prototype.parseHost = function(t) { + var e = Vyt.exec(t); + e && (e = e[0], e !== ":" && (this.port = e.substr(1)), t = t.substr(0, t.length - e.length)), t && (this.hostname = t); +}; +var Kyt = jyt; +Fy.encode = Fyt; +Fy.decode = qyt; +Fy.format = Uyt; +Fy.parse = Kyt; +var r0 = {}, T8, YG; +function xue() { + return YG || (YG = 1, T8 = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/), T8; } -function bNe(t) { - var e, r; - const n = (r = (e = t.meta) === null || e === void 0 ? void 0 : e.docutils) !== null && r !== void 0 ? r : {}; - return t.meta || (t.meta = {}), t.meta.docutils || (t.meta.docutils = n), n; +var C8, GG; +function wue() { + return GG || (GG = 1, C8 = /[\0-\x1F\x7F-\x9F]/), C8; } -function xNe(t, e) { - const r = v6(t); - return r.numbering[e] == null ? r.numbering[e] = 1 : r.numbering[e] += 1, r.numbering[e]; +var E8, HG; +function Jyt() { + return HG || (HG = 1, E8 = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/), E8; } -function wue(t, e, r, n, i, s = !1) { - const a = v6(t), o = xNe(t, r), l = { - label: n, - kind: r, - number: o, - title: i - }; - if (!s) { - const u = bNe(e); - u.target = l, e.attrSet("id", n), a.targets[n] = l; - } - return l; +var _8, XG; +function Oue() { + return XG || (XG = 1, _8 = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/), _8; } -function KB(t, e, r, n) { - var i; - e.open.meta = (i = e.open.meta) !== null && i !== void 0 ? i : {}, e.open.meta.kind = r.kind, e.open.meta.label = r.label, e.open.meta.value = r.value, v6(t).references.push(Object.assign({ label: r.label, tokens: e }, n)); +var ZG; +function e2t() { + return ZG || (ZG = 1, r0.Any = xue(), r0.Cc = wue(), r0.Cf = Jyt(), r0.P = YB, r0.Z = Oue()), r0; } -const Oue = /^(.+?)<([^<>]+)>$/; -class wNe extends Zf { - run(e) { - const r = new this.state.Token("ref_open", "a", 1), n = new this.state.Token("text", "", 0), i = new this.state.Token("ref_close", "a", -1); - return KB(this.state, { open: r, content: n, close: i }, { kind: "eq", label: e.content }, { - kind: mw.equation, - contentFromTarget: (s) => `(${s.number})` - }), [r, n, i]; +(function(t) { + function e(k) { + return Object.prototype.toString.call(k); } -} -class ONe extends Zf { - run(e) { - const r = Oue.exec(e.content), [, n, i] = r != null ? r : [], s = n == null ? void 0 : n.trim(), a = new this.state.Token("ref_open", "a", 1), o = new this.state.Token("text", "", 0), l = new this.state.Token("ref_close", "a", -1); - return KB(this.state, { open: a, content: o, close: l }, { kind: "numref", label: i || e.content, value: s }, { - contentFromTarget: (u) => r ? s.replace(/%s/g, String(u.number)).replace(/\{number\}/g, String(u.number)) : u.title.trim() - }), [a, o, l]; + function r(k) { + return e(k) === "[object String]"; } -} -class kNe extends Zf { - run(e) { - const r = Oue.exec(e.content), [, n, i] = r != null ? r : [], s = n == null ? void 0 : n.trim(), a = new this.state.Token("ref_open", "a", 1), o = new this.state.Token("text", "", 0), l = new this.state.Token("ref_close", "a", -1); - return KB(this.state, { open: a, content: o, close: l }, { kind: "ref", label: i || e.content, value: s }, { - contentFromTarget: (u) => s || u.title - }), [a, o, l]; + var n = Object.prototype.hasOwnProperty; + function i(k, I) { + return n.call(k, I); } -} -const SNe = { - eq: wNe, - ref: kNe, - numref: ONe -}, TNe = Object.assign(Object.assign(Object.assign(Object.assign({}, uNe), yNe), dNe), SNe); -/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ -function kue(t) { - return typeof t > "u" || t === null; -} -function CNe(t) { - return typeof t == "object" && t !== null; -} -function ENe(t) { - return Array.isArray(t) ? t : kue(t) ? [] : [t]; -} -function _Ne(t, e) { - var r, n, i, s; - if (e) - for (s = Object.keys(e), r = 0, n = s.length; r < n; r += 1) - i = s[r], t[i] = e[i]; - return t; -} -function ANe(t, e) { - var r = "", n; - for (n = 0; n < e; n += 1) - r += t; - return r; -} -function RNe(t) { - return t === 0 && Number.NEGATIVE_INFINITY === 1 / t; -} -var LNe = kue, MNe = CNe, DNe = ENe, PNe = ANe, NNe = RNe, INe = _Ne, ds = { - isNothing: LNe, - isObject: MNe, - toArray: DNe, - repeat: PNe, - isNegativeZero: NNe, - extend: INe -}; -function Sue(t, e) { - var r = "", n = t.reason || "(unknown reason)"; - return t.mark ? (t.mark.name && (r += 'in "' + t.mark.name + '" '), r += "(" + (t.mark.line + 1) + ":" + (t.mark.column + 1) + ")", !e && t.mark.snippet && (r += ` - -` + t.mark.snippet), n + " " + r) : n; -} -function vw(t, e) { - Error.call(this), this.name = "YAMLException", this.reason = t, this.mark = e, this.message = Sue(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || ""; -} -vw.prototype = Object.create(Error.prototype); -vw.prototype.constructor = vw; -vw.prototype.toString = function(e) { - return this.name + ": " + Sue(this, e); -}; -var so = vw; -function B8(t, e, r, n, i) { - var s = "", a = "", o = Math.floor(i / 2) - 1; - return n - e > o && (s = " ... ", e = n - o + s.length), r - n > o && (a = " ...", r = n + o - a.length), { - str: s + t.slice(e, r).replace(/\t/g, "\u2192") + a, - pos: n - e + s.length - }; -} -function F8(t, e) { - return ds.repeat(" ", e - t.length) + t; -} -function $Ne(t, e) { - if (e = Object.create(e || null), !t.buffer) - return null; - e.maxLength || (e.maxLength = 79), typeof e.indent != "number" && (e.indent = 1), typeof e.linesBefore != "number" && (e.linesBefore = 3), typeof e.linesAfter != "number" && (e.linesAfter = 2); - for (var r = /\r?\n|\r|\0/g, n = [0], i = [], s, a = -1; s = r.exec(t.buffer); ) - i.push(s.index), n.push(s.index + s[0].length), t.position <= s.index && a < 0 && (a = n.length - 2); - a < 0 && (a = n.length - 1); - var o = "", l, u, h = Math.min(t.line + e.linesAfter, i.length).toString().length, f = e.maxLength - (e.indent + h + 3); - for (l = 1; l <= e.linesBefore && !(a - l < 0); l++) - u = B8( - t.buffer, - n[a - l], - i[a - l], - t.position - (n[a] - n[a - l]), - f - ), o = ds.repeat(" ", e.indent) + F8((t.line - l + 1).toString(), h) + " | " + u.str + ` -` + o; - for (u = B8(t.buffer, n[a], i[a], t.position, f), o += ds.repeat(" ", e.indent) + F8((t.line + 1).toString(), h) + " | " + u.str + ` -`, o += ds.repeat("-", e.indent + h + 3 + u.pos) + `^ -`, l = 1; l <= e.linesAfter && !(a + l >= i.length); l++) - u = B8( - t.buffer, - n[a + l], - i[a + l], - t.position - (n[a] - n[a + l]), - f - ), o += ds.repeat(" ", e.indent) + F8((t.line + l + 1).toString(), h) + " | " + u.str + ` -`; - return o.replace(/\n$/, ""); -} -var BNe = $Ne, FNe = [ - "kind", - "multi", - "resolve", - "construct", - "instanceOf", - "predicate", - "represent", - "representName", - "defaultStyle", - "styleAliases" -], zNe = [ - "scalar", - "sequence", - "mapping" -]; -function qNe(t) { - var e = {}; - return t !== null && Object.keys(t).forEach(function(r) { - t[r].forEach(function(n) { - e[String(n)] = r; - }); - }), e; -} -function UNe(t, e) { - if (e = e || {}, Object.keys(e).forEach(function(r) { - if (FNe.indexOf(r) === -1) - throw new so('Unknown option "' + r + '" is met in definition of "' + t + '" YAML type.'); - }), this.options = e, this.tag = t, this.kind = e.kind || null, this.resolve = e.resolve || function() { - return !0; - }, this.construct = e.construct || function(r) { - return r; - }, this.instanceOf = e.instanceOf || null, this.predicate = e.predicate || null, this.represent = e.represent || null, this.representName = e.representName || null, this.defaultStyle = e.defaultStyle || null, this.multi = e.multi || !1, this.styleAliases = qNe(e.styleAliases || null), zNe.indexOf(this.kind) === -1) - throw new so('Unknown kind "' + this.kind + '" is specified for "' + t + '" YAML type.'); -} -var ua = UNe; -function FG(t, e) { - var r = []; - return t[e].forEach(function(n) { - var i = r.length; - r.forEach(function(s, a) { - s.tag === n.tag && s.kind === n.kind && s.multi === n.multi && (i = a); - }), r[i] = n; - }), r; -} -function QNe() { - var t = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] + function s(k) { + var I = Array.prototype.slice.call(arguments, 1); + return I.forEach(function(_) { + if (!!_) { + if (typeof _ != "object") + throw new TypeError(_ + "must be object"); + Object.keys(_).forEach(function(R) { + k[R] = _[R]; + }); + } + }), k; + } + function a(k, I, _) { + return [].concat(k.slice(0, I), _, k.slice(I + 1)); + } + function o(k) { + return !(k >= 55296 && k <= 57343 || k >= 64976 && k <= 65007 || (k & 65535) === 65535 || (k & 65535) === 65534 || k >= 0 && k <= 8 || k === 11 || k >= 14 && k <= 31 || k >= 127 && k <= 159 || k > 1114111); + } + function l(k) { + if (k > 65535) { + k -= 65536; + var I = 55296 + (k >> 10), _ = 56320 + (k & 1023); + return String.fromCharCode(I, _); } - }, e, r; - function n(i) { - i.multi ? (t.multi[i.kind].push(i), t.multi.fallback.push(i)) : t[i.kind][i.tag] = t.fallback[i.tag] = i; + return String.fromCharCode(k); } - for (e = 0, r = arguments.length; e < r; e += 1) - arguments[e].forEach(n); - return t; -} -function X9(t) { - return this.extend(t); -} -X9.prototype.extend = function(e) { - var r = [], n = []; - if (e instanceof ua) - n.push(e); - else if (Array.isArray(e)) - n = n.concat(e); - else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit))) - e.implicit && (r = r.concat(e.implicit)), e.explicit && (n = n.concat(e.explicit)); - else - throw new so("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); - r.forEach(function(s) { - if (!(s instanceof ua)) - throw new so("Specified list of YAML types (or a single Type object) contains a non-Type object."); - if (s.loadKind && s.loadKind !== "scalar") - throw new so("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); - if (s.multi) - throw new so("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); - }), n.forEach(function(s) { - if (!(s instanceof ua)) - throw new so("Specified list of YAML types (or a single Type object) contains a non-Type object."); - }); - var i = Object.create(X9.prototype); - return i.implicit = (this.implicit || []).concat(r), i.explicit = (this.explicit || []).concat(n), i.compiledImplicit = FG(i, "implicit"), i.compiledExplicit = FG(i, "explicit"), i.compiledTypeMap = QNe(i.compiledImplicit, i.compiledExplicit), i; -}; -var Tue = X9, Cue = new ua("tag:yaml.org,2002:str", { - kind: "scalar", - construct: function(t) { - return t !== null ? t : ""; + var u = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g, h = /&([a-z#][a-z0-9]{1,31});/gi, f = new RegExp(u.source + "|" + h.source, "gi"), d = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i, p = WB.exports; + function g(k, I) { + var _ = 0; + return i(p, I) ? p[I] : I.charCodeAt(0) === 35 && d.test(I) && (_ = I[1].toLowerCase() === "x" ? parseInt(I.slice(2), 16) : parseInt(I.slice(1), 10), o(_)) ? l(_) : k; } -}), Eue = new ua("tag:yaml.org,2002:seq", { - kind: "sequence", - construct: function(t) { - return t !== null ? t : []; + function m(k) { + return k.indexOf("\\") < 0 ? k : k.replace(u, "$1"); } -}), _ue = new ua("tag:yaml.org,2002:map", { - kind: "mapping", - construct: function(t) { - return t !== null ? t : {}; + function v(k) { + return k.indexOf("\\") < 0 && k.indexOf("&") < 0 ? k : k.replace(f, function(I, _, R) { + return _ || g(I, R); + }); } -}), Aue = new Tue({ - explicit: [ - Cue, - Eue, - _ue - ] -}); -function VNe(t) { - if (t === null) - return !0; - var e = t.length; - return e === 1 && t === "~" || e === 4 && (t === "null" || t === "Null" || t === "NULL"); -} -function WNe() { - return null; -} -function YNe(t) { - return t === null; -} -var Rue = new ua("tag:yaml.org,2002:null", { - kind: "scalar", - resolve: VNe, - construct: WNe, - predicate: YNe, - represent: { - canonical: function() { - return "~"; - }, - lowercase: function() { - return "null"; - }, - uppercase: function() { - return "NULL"; - }, - camelcase: function() { - return "Null"; - }, - empty: function() { - return ""; + var y = /[&<>"]/, b = /[&<>"]/g, w = { + "&": "&", + "<": "<", + ">": ">", + '"': """ + }; + function O(k) { + return w[k]; + } + function S(k) { + return y.test(k) ? k.replace(b, O) : k; + } + var C = /[.?*+^$[\]\\(){}|-]/g; + function T(k) { + return k.replace(C, "\\$&"); + } + function M(k) { + switch (k) { + case 9: + case 32: + return !0; } - }, - defaultStyle: "lowercase" -}); -function GNe(t) { - if (t === null) return !1; - var e = t.length; - return e === 4 && (t === "true" || t === "True" || t === "TRUE") || e === 5 && (t === "false" || t === "False" || t === "FALSE"); -} -function HNe(t) { - return t === "true" || t === "True" || t === "TRUE"; -} -function XNe(t) { - return Object.prototype.toString.call(t) === "[object Boolean]"; -} -var Lue = new ua("tag:yaml.org,2002:bool", { - kind: "scalar", - resolve: GNe, - construct: HNe, - predicate: XNe, - represent: { - lowercase: function(t) { - return t ? "true" : "false"; - }, - uppercase: function(t) { - return t ? "TRUE" : "FALSE"; - }, - camelcase: function(t) { - return t ? "True" : "False"; + } + function E(k) { + if (k >= 8192 && k <= 8202) + return !0; + switch (k) { + case 9: + case 10: + case 11: + case 12: + case 13: + case 32: + case 160: + case 5760: + case 8239: + case 8287: + case 12288: + return !0; } - }, - defaultStyle: "lowercase" -}); -function jNe(t) { - return 48 <= t && t <= 57 || 65 <= t && t <= 70 || 97 <= t && t <= 102; -} -function ZNe(t) { - return 48 <= t && t <= 55; -} -function KNe(t) { - return 48 <= t && t <= 57; -} -function JNe(t) { - if (t === null) - return !1; - var e = t.length, r = 0, n = !1, i; - if (!e) return !1; - if (i = t[r], (i === "-" || i === "+") && (i = t[++r]), i === "0") { - if (r + 1 === e) - return !0; - if (i = t[++r], i === "b") { - for (r++; r < e; r++) - if (i = t[r], i !== "_") { - if (i !== "0" && i !== "1") - return !1; - n = !0; - } - return n && i !== "_"; + } + var P = YB; + function L(k) { + return P.test(k); + } + function D(k) { + switch (k) { + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 94: + case 95: + case 96: + case 123: + case 124: + case 125: + case 126: + return !0; + default: + return !1; } - if (i === "x") { - for (r++; r < e; r++) - if (i = t[r], i !== "_") { - if (!jNe(t.charCodeAt(r))) - return !1; - n = !0; - } - return n && i !== "_"; + } + function F(k) { + return k = k.trim().replace(/\s+/g, " "), "\u1E9E".toLowerCase() === "\u1E7E" && (k = k.replace(/ẞ/g, "\xDF")), k.toLowerCase().toUpperCase(); + } + t.lib = {}, t.lib.mdurl = Fy, t.lib.ucmicro = e2t(), t.assign = s, t.isString = r, t.has = i, t.unescapeMd = m, t.unescapeAll = v, t.isValidEntityCode = o, t.fromCodePoint = l, t.escapeHtml = S, t.arrayReplaceAt = a, t.isSpace = M, t.isWhiteSpace = E, t.isMdAsciiPunct = D, t.isPunctChar = L, t.escapeRE = T, t.normalizeReference = F; +})(mn); +var i6 = {}, t2t = function(e, r, n) { + var i, s, a, o, l = -1, u = e.posMax, h = e.pos; + for (e.pos = r + 1, i = 1; e.pos < u; ) { + if (a = e.src.charCodeAt(e.pos), a === 93 && (i--, i === 0)) { + s = !0; + break; } - if (i === "o") { - for (r++; r < e; r++) - if (i = t[r], i !== "_") { - if (!ZNe(t.charCodeAt(r))) - return !1; - n = !0; - } - return n && i !== "_"; + if (o = e.pos, e.md.inline.skipToken(e), a === 91) { + if (o === e.pos - 1) + i++; + else if (n) + return e.pos = h, -1; } } - if (i === "_") - return !1; - for (; r < e; r++) - if (i = t[r], i !== "_") { - if (!KNe(t.charCodeAt(r))) - return !1; - n = !0; + return s && (l = e.pos), e.pos = h, l; +}, jG = mn.unescapeAll, r2t = function(e, r, n) { + var i, s, a = 0, o = r, l = { + ok: !1, + pos: 0, + lines: 0, + str: "" + }; + if (e.charCodeAt(r) === 60) { + for (r++; r < n; ) { + if (i = e.charCodeAt(r), i === 10 || i === 60) + return l; + if (i === 62) + return l.pos = r + 1, l.str = jG(e.slice(o + 1, r)), l.ok = !0, l; + if (i === 92 && r + 1 < n) { + r += 2; + continue; + } + r++; } - return !(!n || i === "_"); -} -function eIe(t) { - var e = t, r = 1, n; - if (e.indexOf("_") !== -1 && (e = e.replace(/_/g, "")), n = e[0], (n === "-" || n === "+") && (n === "-" && (r = -1), e = e.slice(1), n = e[0]), e === "0") - return 0; - if (n === "0") { - if (e[1] === "b") - return r * parseInt(e.slice(2), 2); - if (e[1] === "x") - return r * parseInt(e.slice(2), 16); - if (e[1] === "o") - return r * parseInt(e.slice(2), 8); + return l; } - return r * parseInt(e, 10); -} -function tIe(t) { - return Object.prototype.toString.call(t) === "[object Number]" && t % 1 === 0 && !ds.isNegativeZero(t); -} -var Mue = new ua("tag:yaml.org,2002:int", { - kind: "scalar", - resolve: JNe, - construct: eIe, - predicate: tIe, - represent: { - binary: function(t) { - return t >= 0 ? "0b" + t.toString(2) : "-0b" + t.toString(2).slice(1); - }, - octal: function(t) { - return t >= 0 ? "0o" + t.toString(8) : "-0o" + t.toString(8).slice(1); - }, - decimal: function(t) { - return t.toString(10); - }, - hexadecimal: function(t) { - return t >= 0 ? "0x" + t.toString(16).toUpperCase() : "-0x" + t.toString(16).toUpperCase().slice(1); + for (s = 0; r < n && (i = e.charCodeAt(r), !(i === 32 || i < 32 || i === 127)); ) { + if (i === 92 && r + 1 < n) { + if (e.charCodeAt(r + 1) === 32) + break; + r += 2; + continue; } - }, - defaultStyle: "decimal", - styleAliases: { - binary: [2, "bin"], - octal: [8, "oct"], - decimal: [10, "dec"], - hexadecimal: [16, "hex"] + if (i === 40 && (s++, s > 32)) + return l; + if (i === 41) { + if (s === 0) + break; + s--; + } + r++; } -}), rIe = new RegExp( - "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" -); -function nIe(t) { - return !(t === null || !rIe.test(t) || t[t.length - 1] === "_"); + return o === r || s !== 0 || (l.str = jG(e.slice(o, r)), l.lines = a, l.pos = r, l.ok = !0), l; +}, n2t = mn.unescapeAll, i2t = function(e, r, n) { + var i, s, a = 0, o = r, l = { + ok: !1, + pos: 0, + lines: 0, + str: "" + }; + if (r >= n || (s = e.charCodeAt(r), s !== 34 && s !== 39 && s !== 40)) + return l; + for (r++, s === 40 && (s = 41); r < n; ) { + if (i = e.charCodeAt(r), i === s) + return l.pos = r + 1, l.lines = a, l.str = n2t(e.slice(o + 1, r)), l.ok = !0, l; + if (i === 40 && s === 41) + return l; + i === 10 ? a++ : i === 92 && r + 1 < n && (r++, e.charCodeAt(r) === 10 && a++), r++; + } + return l; +}; +i6.parseLinkLabel = t2t; +i6.parseLinkDestination = r2t; +i6.parseLinkTitle = i2t; +var s2t = mn.assign, a2t = mn.unescapeAll, xg = mn.escapeHtml, Th = {}; +Th.code_inline = function(t, e, r, n, i) { + var s = t[e]; + return "" + xg(t[e].content) + ""; +}; +Th.code_block = function(t, e, r, n, i) { + var s = t[e]; + return "" + xg(t[e].content) + ` +`; +}; +Th.fence = function(t, e, r, n, i) { + var s = t[e], a = s.info ? a2t(s.info).trim() : "", o = "", l = "", u, h, f, d, p; + return a && (f = a.split(/(\s+)/g), o = f[0], l = f.slice(2).join("")), r.highlight ? u = r.highlight(s.content, o, l) || xg(s.content) : u = xg(s.content), u.indexOf("" + u + ` +`) : "
" + u + `
+`; +}; +Th.image = function(t, e, r, n, i) { + var s = t[e]; + return s.attrs[s.attrIndex("alt")][1] = i.renderInlineAsText(s.children, r, n), i.renderToken(t, e, r); +}; +Th.hardbreak = function(t, e, r) { + return r.xhtmlOut ? `
+` : `
+`; +}; +Th.softbreak = function(t, e, r) { + return r.breaks ? r.xhtmlOut ? `
+` : `
+` : ` +`; +}; +Th.text = function(t, e) { + return xg(t[e].content); +}; +Th.html_block = function(t, e) { + return t[e].content; +}; +Th.html_inline = function(t, e) { + return t[e].content; +}; +function zy() { + this.rules = s2t({}, Th); } -function iIe(t) { - var e, r; - return e = t.replace(/_/g, "").toLowerCase(), r = e[0] === "-" ? -1 : 1, "+-".indexOf(e[0]) >= 0 && (e = e.slice(1)), e === ".inf" ? r === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : e === ".nan" ? NaN : r * parseFloat(e, 10); +zy.prototype.renderAttrs = function(e) { + var r, n, i; + if (!e.attrs) + return ""; + for (i = "", r = 0, n = e.attrs.length; r < n; r++) + i += " " + xg(e.attrs[r][0]) + '="' + xg(e.attrs[r][1]) + '"'; + return i; +}; +zy.prototype.renderToken = function(e, r, n) { + var i, s = "", a = !1, o = e[r]; + return o.hidden ? "" : (o.block && o.nesting !== -1 && r && e[r - 1].hidden && (s += ` +`), s += (o.nesting === -1 ? " +` : ">", s); +}; +zy.prototype.renderInline = function(t, e, r) { + for (var n, i = "", s = this.rules, a = 0, o = t.length; a < o; a++) + n = t[a].type, typeof s[n] < "u" ? i += s[n](t, a, e, r, this) : i += this.renderToken(t, a, e); + return i; +}; +zy.prototype.renderInlineAsText = function(t, e, r) { + for (var n = "", i = 0, s = t.length; i < s; i++) + t[i].type === "text" ? n += t[i].content : t[i].type === "image" ? n += this.renderInlineAsText(t[i].children, e, r) : t[i].type === "softbreak" && (n += ` +`); + return n; +}; +zy.prototype.render = function(t, e, r) { + var n, i, s, a = "", o = this.rules; + for (n = 0, i = t.length; n < i; n++) + s = t[n].type, s === "inline" ? a += this.renderInline(t[n].children, e, r) : typeof o[s] < "u" ? a += o[t[n].type](t, n, e, r, this) : a += this.renderToken(t, n, e, r); + return a; +}; +var o2t = zy; +function cu() { + this.__rules__ = [], this.__cache__ = null; } -var sIe = /^[-+]?[0-9]+e/; -function aIe(t, e) { - var r; - if (isNaN(t)) - switch (e) { - case "lowercase": - return ".nan"; - case "uppercase": - return ".NAN"; - case "camelcase": - return ".NaN"; - } - else if (Number.POSITIVE_INFINITY === t) - switch (e) { - case "lowercase": - return ".inf"; - case "uppercase": - return ".INF"; - case "camelcase": - return ".Inf"; +cu.prototype.__find__ = function(t) { + for (var e = 0; e < this.__rules__.length; e++) + if (this.__rules__[e].name === t) + return e; + return -1; +}; +cu.prototype.__compile__ = function() { + var t = this, e = [""]; + t.__rules__.forEach(function(r) { + !r.enabled || r.alt.forEach(function(n) { + e.indexOf(n) < 0 && e.push(n); + }); + }), t.__cache__ = {}, e.forEach(function(r) { + t.__cache__[r] = [], t.__rules__.forEach(function(n) { + !n.enabled || r && n.alt.indexOf(r) < 0 || t.__cache__[r].push(n.fn); + }); + }); +}; +cu.prototype.at = function(t, e, r) { + var n = this.__find__(t), i = r || {}; + if (n === -1) + throw new Error("Parser rule not found: " + t); + this.__rules__[n].fn = e, this.__rules__[n].alt = i.alt || [], this.__cache__ = null; +}; +cu.prototype.before = function(t, e, r, n) { + var i = this.__find__(t), s = n || {}; + if (i === -1) + throw new Error("Parser rule not found: " + t); + this.__rules__.splice(i, 0, { + name: e, + enabled: !0, + fn: r, + alt: s.alt || [] + }), this.__cache__ = null; +}; +cu.prototype.after = function(t, e, r, n) { + var i = this.__find__(t), s = n || {}; + if (i === -1) + throw new Error("Parser rule not found: " + t); + this.__rules__.splice(i + 1, 0, { + name: e, + enabled: !0, + fn: r, + alt: s.alt || [] + }), this.__cache__ = null; +}; +cu.prototype.push = function(t, e, r) { + var n = r || {}; + this.__rules__.push({ + name: t, + enabled: !0, + fn: e, + alt: n.alt || [] + }), this.__cache__ = null; +}; +cu.prototype.enable = function(t, e) { + Array.isArray(t) || (t = [t]); + var r = []; + return t.forEach(function(n) { + var i = this.__find__(n); + if (i < 0) { + if (e) + return; + throw new Error("Rules manager: invalid rule name " + n); } - else if (Number.NEGATIVE_INFINITY === t) - switch (e) { - case "lowercase": - return "-.inf"; - case "uppercase": - return "-.INF"; - case "camelcase": - return "-.Inf"; + this.__rules__[i].enabled = !0, r.push(n); + }, this), this.__cache__ = null, r; +}; +cu.prototype.enableOnly = function(t, e) { + Array.isArray(t) || (t = [t]), this.__rules__.forEach(function(r) { + r.enabled = !1; + }), this.enable(t, e); +}; +cu.prototype.disable = function(t, e) { + Array.isArray(t) || (t = [t]); + var r = []; + return t.forEach(function(n) { + var i = this.__find__(n); + if (i < 0) { + if (e) + return; + throw new Error("Rules manager: invalid rule name " + n); } - else if (ds.isNegativeZero(t)) - return "-0.0"; - return r = t.toString(10), sIe.test(r) ? r.replace("e", ".e") : r; -} -function oIe(t) { - return Object.prototype.toString.call(t) === "[object Number]" && (t % 1 !== 0 || ds.isNegativeZero(t)); + this.__rules__[i].enabled = !1, r.push(n); + }, this), this.__cache__ = null, r; +}; +cu.prototype.getRules = function(t) { + return this.__cache__ === null && this.__compile__(), this.__cache__[t] || []; +}; +var GB = cu, l2t = /\r\n?|\n/g, c2t = /\0/g, u2t = function(e) { + var r; + r = e.src.replace(l2t, ` +`), r = r.replace(c2t, "\uFFFD"), e.src = r; +}, h2t = function(e) { + var r; + e.inlineMode ? (r = new e.Token("inline", "", 0), r.content = e.src, r.map = [0, 1], r.children = [], e.tokens.push(r)) : e.md.block.parse(e.src, e.md, e.env, e.tokens); +}, f2t = function(e) { + var r = e.tokens, n, i, s; + for (i = 0, s = r.length; i < s; i++) + n = r[i], n.type === "inline" && e.md.inline.parse(n.content, e.md, e.env, n.children); +}, d2t = mn.arrayReplaceAt; +function p2t(t) { + return /^\s]/i.test(t); } -var Due = new ua("tag:yaml.org,2002:float", { - kind: "scalar", - resolve: nIe, - construct: iIe, - predicate: oIe, - represent: aIe, - defaultStyle: "lowercase" -}), Pue = Aue.extend({ - implicit: [ - Rue, - Lue, - Mue, - Due - ] -}), Nue = Pue, Iue = new RegExp( - "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" -), $ue = new RegExp( - "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$" -); -function lIe(t) { - return t === null ? !1 : Iue.exec(t) !== null || $ue.exec(t) !== null; +function g2t(t) { + return /^<\/a\s*>/i.test(t); } -function cIe(t) { - var e, r, n, i, s, a, o, l = 0, u = null, h, f, d; - if (e = Iue.exec(t), e === null && (e = $ue.exec(t)), e === null) - throw new Error("Date resolve error"); - if (r = +e[1], n = +e[2] - 1, i = +e[3], !e[4]) - return new Date(Date.UTC(r, n, i)); - if (s = +e[4], a = +e[5], o = +e[6], e[7]) { - for (l = e[7].slice(0, 3); l.length < 3; ) - l += "0"; - l = +l; +var m2t = function(e) { + var r, n, i, s, a, o, l, u, h, f, d, p, g, m, v, y, b = e.tokens, w; + if (!!e.md.options.linkify) { + for (n = 0, i = b.length; n < i; n++) + if (!(b[n].type !== "inline" || !e.md.linkify.pretest(b[n].content))) + for (s = b[n].children, g = 0, r = s.length - 1; r >= 0; r--) { + if (o = s[r], o.type === "link_close") { + for (r--; s[r].level !== o.level && s[r].type !== "link_open"; ) + r--; + continue; + } + if (o.type === "html_inline" && (p2t(o.content) && g > 0 && g--, g2t(o.content) && g++), !(g > 0) && o.type === "text" && e.md.linkify.test(o.content)) { + for (h = o.content, w = e.md.linkify.match(h), l = [], p = o.level, d = 0, u = 0; u < w.length; u++) + m = w[u].url, v = e.md.normalizeLink(m), e.md.validateLink(v) && (y = w[u].text, w[u].schema ? w[u].schema === "mailto:" && !/^mailto:/i.test(y) ? y = e.md.normalizeLinkText("mailto:" + y).replace(/^mailto:/, "") : y = e.md.normalizeLinkText(y) : y = e.md.normalizeLinkText("http://" + y).replace(/^http:\/\//, ""), f = w[u].index, f > d && (a = new e.Token("text", "", 0), a.content = h.slice(d, f), a.level = p, l.push(a)), a = new e.Token("link_open", "a", 1), a.attrs = [["href", v]], a.level = p++, a.markup = "linkify", a.info = "auto", l.push(a), a = new e.Token("text", "", 0), a.content = y, a.level = p, l.push(a), a = new e.Token("link_close", "a", -1), a.level = --p, a.markup = "linkify", a.info = "auto", l.push(a), d = w[u].lastIndex); + d < h.length && (a = new e.Token("text", "", 0), a.content = h.slice(d), a.level = p, l.push(a)), b[n].children = s = d2t(s, r, l); + } + } } - return e[9] && (h = +e[10], f = +(e[11] || 0), u = (h * 60 + f) * 6e4, e[9] === "-" && (u = -u)), d = new Date(Date.UTC(r, n, i, s, a, o, l)), u && d.setTime(d.getTime() - u), d; -} -function uIe(t) { - return t.toISOString(); -} -var Bue = new ua("tag:yaml.org,2002:timestamp", { - kind: "scalar", - resolve: lIe, - construct: cIe, - instanceOf: Date, - represent: uIe -}); -function hIe(t) { - return t === "<<" || t === null; -} -var Fue = new ua("tag:yaml.org,2002:merge", { - kind: "scalar", - resolve: hIe -}), JB = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`; -function fIe(t) { - if (t === null) - return !1; - var e, r, n = 0, i = t.length, s = JB; - for (r = 0; r < i; r++) - if (e = s.indexOf(t.charAt(r)), !(e > 64)) { - if (e < 0) - return !1; - n += 6; - } - return n % 8 === 0; +}, kue = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, v2t = /\((c|tm|r|p)\)/i, y2t = /\((c|tm|r|p)\)/ig, b2t = { + c: "\xA9", + r: "\xAE", + p: "\xA7", + tm: "\u2122" +}; +function x2t(t, e) { + return b2t[e.toLowerCase()]; } -function dIe(t) { - var e, r, n = t.replace(/[\r\n=]/g, ""), i = n.length, s = JB, a = 0, o = []; - for (e = 0; e < i; e++) - e % 4 === 0 && e && (o.push(a >> 16 & 255), o.push(a >> 8 & 255), o.push(a & 255)), a = a << 6 | s.indexOf(n.charAt(e)); - return r = i % 4 * 6, r === 0 ? (o.push(a >> 16 & 255), o.push(a >> 8 & 255), o.push(a & 255)) : r === 18 ? (o.push(a >> 10 & 255), o.push(a >> 2 & 255)) : r === 12 && o.push(a >> 4 & 255), new Uint8Array(o); +function w2t(t) { + var e, r, n = 0; + for (e = t.length - 1; e >= 0; e--) + r = t[e], r.type === "text" && !n && (r.content = r.content.replace(y2t, x2t)), r.type === "link_open" && r.info === "auto" && n--, r.type === "link_close" && r.info === "auto" && n++; } -function pIe(t) { - var e = "", r = 0, n, i, s = t.length, a = JB; - for (n = 0; n < s; n++) - n % 3 === 0 && n && (e += a[r >> 18 & 63], e += a[r >> 12 & 63], e += a[r >> 6 & 63], e += a[r & 63]), r = (r << 8) + t[n]; - return i = s % 3, i === 0 ? (e += a[r >> 18 & 63], e += a[r >> 12 & 63], e += a[r >> 6 & 63], e += a[r & 63]) : i === 2 ? (e += a[r >> 10 & 63], e += a[r >> 4 & 63], e += a[r << 2 & 63], e += a[64]) : i === 1 && (e += a[r >> 2 & 63], e += a[r << 4 & 63], e += a[64], e += a[64]), e; +function O2t(t) { + var e, r, n = 0; + for (e = t.length - 1; e >= 0; e--) + r = t[e], r.type === "text" && !n && kue.test(r.content) && (r.content = r.content.replace(/\+-/g, "\xB1").replace(/\.{2,}/g, "\u2026").replace(/([?!])…/g, "$1..").replace(/([?!]){4,}/g, "$1$1$1").replace(/,{2,}/g, ",").replace(/(^|[^-])---(?=[^-]|$)/mg, "$1\u2014").replace(/(^|\s)--(?=\s|$)/mg, "$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg, "$1\u2013")), r.type === "link_open" && r.info === "auto" && n--, r.type === "link_close" && r.info === "auto" && n++; } -function gIe(t) { - return Object.prototype.toString.call(t) === "[object Uint8Array]"; +var k2t = function(e) { + var r; + if (!!e.md.options.typographer) + for (r = e.tokens.length - 1; r >= 0; r--) + e.tokens[r].type === "inline" && (v2t.test(e.tokens[r].content) && w2t(e.tokens[r].children), kue.test(e.tokens[r].content) && O2t(e.tokens[r].children)); +}, KG = mn.isWhiteSpace, JG = mn.isPunctChar, eH = mn.isMdAsciiPunct, S2t = /['"]/, tH = /['"]/g, rH = "\u2019"; +function oS(t, e, r) { + return t.substr(0, e) + r + t.substr(e + 1); } -var zue = new ua("tag:yaml.org,2002:binary", { - kind: "scalar", - resolve: fIe, - construct: dIe, - predicate: gIe, - represent: pIe -}), mIe = Object.prototype.hasOwnProperty, vIe = Object.prototype.toString; -function yIe(t) { - if (t === null) - return !0; - var e = [], r, n, i, s, a, o = t; - for (r = 0, n = o.length; r < n; r += 1) { - if (i = o[r], a = !1, vIe.call(i) !== "[object Object]") - return !1; - for (s in i) - if (mIe.call(i, s)) - if (!a) - a = !0; +function T2t(t, e) { + var r, n, i, s, a, o, l, u, h, f, d, p, g, m, v, y, b, w, O, S, C; + for (O = [], r = 0; r < t.length; r++) { + for (n = t[r], l = t[r].level, b = O.length - 1; b >= 0 && !(O[b].level <= l); b--) + ; + if (O.length = b + 1, n.type !== "text") + continue; + i = n.content, a = 0, o = i.length; + e: + for (; a < o && (tH.lastIndex = a, s = tH.exec(i), !!s); ) { + if (v = y = !0, a = s.index + 1, w = s[0] === "'", h = 32, s.index - 1 >= 0) + h = i.charCodeAt(s.index - 1); else - return !1; - if (!a) - return !1; - if (e.indexOf(s) === -1) - e.push(s); - else - return !1; + for (b = r - 1; b >= 0 && !(t[b].type === "softbreak" || t[b].type === "hardbreak"); b--) + if (!!t[b].content) { + h = t[b].content.charCodeAt(t[b].content.length - 1); + break; + } + if (f = 32, a < o) + f = i.charCodeAt(a); + else + for (b = r + 1; b < t.length && !(t[b].type === "softbreak" || t[b].type === "hardbreak"); b++) + if (!!t[b].content) { + f = t[b].content.charCodeAt(0); + break; + } + if (d = eH(h) || JG(String.fromCharCode(h)), p = eH(f) || JG(String.fromCharCode(f)), g = KG(h), m = KG(f), m ? v = !1 : p && (g || d || (v = !1)), g ? y = !1 : d && (m || p || (y = !1)), f === 34 && s[0] === '"' && h >= 48 && h <= 57 && (y = v = !1), v && y && (v = d, y = p), !v && !y) { + w && (n.content = oS(n.content, s.index, rH)); + continue; + } + if (y) { + for (b = O.length - 1; b >= 0 && (u = O[b], !(O[b].level < l)); b--) + if (u.single === w && O[b].level === l) { + u = O[b], w ? (S = e.md.options.quotes[2], C = e.md.options.quotes[3]) : (S = e.md.options.quotes[0], C = e.md.options.quotes[1]), n.content = oS(n.content, s.index, C), t[u.token].content = oS( + t[u.token].content, + u.pos, + S + ), a += C.length - 1, u.token === r && (a += S.length - 1), i = n.content, o = i.length, O.length = b; + continue e; + } + } + v ? O.push({ + token: r, + pos: s.index, + single: w, + level: l + }) : y && w && (n.content = oS(n.content, s.index, rH)); + } } - return !0; } -function bIe(t) { - return t !== null ? t : []; +var C2t = function(e) { + var r; + if (!!e.md.options.typographer) + for (r = e.tokens.length - 1; r >= 0; r--) + e.tokens[r].type !== "inline" || !S2t.test(e.tokens[r].content) || T2t(e.tokens[r].children, e); +}; +function qy(t, e, r) { + this.type = t, this.tag = e, this.attrs = null, this.map = null, this.nesting = r, this.level = 0, this.children = null, this.content = "", this.markup = "", this.info = "", this.meta = null, this.block = !1, this.hidden = !1; } -var que = new ua("tag:yaml.org,2002:omap", { - kind: "sequence", - resolve: yIe, - construct: bIe -}), xIe = Object.prototype.toString; -function wIe(t) { - if (t === null) - return !0; - var e, r, n, i, s, a = t; - for (s = new Array(a.length), e = 0, r = a.length; e < r; e += 1) { - if (n = a[e], xIe.call(n) !== "[object Object]" || (i = Object.keys(n), i.length !== 1)) - return !1; - s[e] = [i[0], n[i[0]]]; - } - return !0; +qy.prototype.attrIndex = function(e) { + var r, n, i; + if (!this.attrs) + return -1; + for (r = this.attrs, n = 0, i = r.length; n < i; n++) + if (r[n][0] === e) + return n; + return -1; +}; +qy.prototype.attrPush = function(e) { + this.attrs ? this.attrs.push(e) : this.attrs = [e]; +}; +qy.prototype.attrSet = function(e, r) { + var n = this.attrIndex(e), i = [e, r]; + n < 0 ? this.attrPush(i) : this.attrs[n] = i; +}; +qy.prototype.attrGet = function(e) { + var r = this.attrIndex(e), n = null; + return r >= 0 && (n = this.attrs[r][1]), n; +}; +qy.prototype.attrJoin = function(e, r) { + var n = this.attrIndex(e); + n < 0 ? this.attrPush([e, r]) : this.attrs[n][1] = this.attrs[n][1] + " " + r; +}; +var HB = qy, E2t = HB; +function Sue(t, e, r) { + this.src = t, this.env = r, this.tokens = [], this.inlineMode = !1, this.md = e; } -function OIe(t) { - if (t === null) - return []; - var e, r, n, i, s, a = t; - for (s = new Array(a.length), e = 0, r = a.length; e < r; e += 1) - n = a[e], i = Object.keys(n), s[e] = [i[0], n[i[0]]]; - return s; +Sue.prototype.Token = E2t; +var _2t = Sue, A2t = GB, A8 = [ + ["normalize", u2t], + ["block", h2t], + ["inline", f2t], + ["linkify", m2t], + ["replacements", k2t], + ["smartquotes", C2t] +]; +function XB() { + this.ruler = new A2t(); + for (var t = 0; t < A8.length; t++) + this.ruler.push(A8[t][0], A8[t][1]); } -var Uue = new ua("tag:yaml.org,2002:pairs", { - kind: "sequence", - resolve: wIe, - construct: OIe -}), kIe = Object.prototype.hasOwnProperty; -function SIe(t) { - if (t === null) - return !0; - var e, r = t; - for (e in r) - if (kIe.call(r, e) && r[e] !== null) - return !1; - return !0; -} -function TIe(t) { - return t !== null ? t : {}; -} -var Que = new ua("tag:yaml.org,2002:set", { - kind: "mapping", - resolve: SIe, - construct: TIe -}), eF = Nue.extend({ - implicit: [ - Bue, - Fue - ], - explicit: [ - zue, - que, - Uue, - Que - ] -}), mp = Object.prototype.hasOwnProperty, jT = 1, Vue = 2, Wue = 3, ZT = 4, z8 = 1, CIe = 2, zG = 3, EIe = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, _Ie = /[\x85\u2028\u2029]/, AIe = /[,\[\]\{\}]/, Yue = /^(?:!|!!|![a-z\-]+!)$/i, Gue = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; -function qG(t) { - return Object.prototype.toString.call(t); -} -function oh(t) { - return t === 10 || t === 13; -} -function rg(t) { - return t === 9 || t === 32; -} -function Go(t) { - return t === 9 || t === 32 || t === 10 || t === 13; -} -function m1(t) { - return t === 44 || t === 91 || t === 93 || t === 123 || t === 125; -} -function RIe(t) { - var e; - return 48 <= t && t <= 57 ? t - 48 : (e = t | 32, 97 <= e && e <= 102 ? e - 97 + 10 : -1); -} -function LIe(t) { - return t === 120 ? 2 : t === 117 ? 4 : t === 85 ? 8 : 0; -} -function MIe(t) { - return 48 <= t && t <= 57 ? t - 48 : -1; -} -function UG(t) { - return t === 48 ? "\0" : t === 97 ? "\x07" : t === 98 ? "\b" : t === 116 || t === 9 ? " " : t === 110 ? ` -` : t === 118 ? "\v" : t === 102 ? "\f" : t === 114 ? "\r" : t === 101 ? "\x1B" : t === 32 ? " " : t === 34 ? '"' : t === 47 ? "/" : t === 92 ? "\\" : t === 78 ? "\x85" : t === 95 ? "\xA0" : t === 76 ? "\u2028" : t === 80 ? "\u2029" : ""; -} -function DIe(t) { - return t <= 65535 ? String.fromCharCode(t) : String.fromCharCode( - (t - 65536 >> 10) + 55296, - (t - 65536 & 1023) + 56320 - ); -} -var Hue = new Array(256), Xue = new Array(256); -for (var Fm = 0; Fm < 256; Fm++) - Hue[Fm] = UG(Fm) ? 1 : 0, Xue[Fm] = UG(Fm); -function PIe(t, e) { - this.input = t, this.filename = e.filename || null, this.schema = e.schema || eF, this.onWarning = e.onWarning || null, this.legacy = e.legacy || !1, this.json = e.json || !1, this.listener = e.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = t.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = []; -} -function jue(t, e) { - var r = { - name: t.filename, - buffer: t.input.slice(0, -1), - position: t.position, - line: t.line, - column: t.position - t.lineStart - }; - return r.snippet = BNe(r), new so(e, r); -} -function wr(t, e) { - throw jue(t, e); -} -function KT(t, e) { - t.onWarning && t.onWarning.call(null, jue(t, e)); -} -var QG = { - YAML: function(e, r, n) { - var i, s, a; - e.version !== null && wr(e, "duplication of %YAML directive"), n.length !== 1 && wr(e, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), i === null && wr(e, "ill-formed argument of the YAML directive"), s = parseInt(i[1], 10), a = parseInt(i[2], 10), s !== 1 && wr(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && KT(e, "unsupported YAML version of the document"); - }, - TAG: function(e, r, n) { - var i, s; - n.length !== 2 && wr(e, "TAG directive accepts exactly two arguments"), i = n[0], s = n[1], Yue.test(i) || wr(e, "ill-formed tag handle (first argument) of the TAG directive"), mp.call(e.tagMap, i) && wr(e, 'there is a previously declared suffix for "' + i + '" tag handle'), Gue.test(s) || wr(e, "ill-formed tag prefix (second argument) of the TAG directive"); - try { - s = decodeURIComponent(s); - } catch { - wr(e, "tag prefix is malformed: " + s); - } - e.tagMap[i] = s; - } +XB.prototype.process = function(t) { + var e, r, n; + for (n = this.ruler.getRules(""), e = 0, r = n.length; e < r; e++) + n[e](t); }; -function Wd(t, e, r, n) { - var i, s, a, o; - if (e < r) { - if (o = t.input.slice(e, r), n) - for (i = 0, s = o.length; i < s; i += 1) - a = o.charCodeAt(i), a === 9 || 32 <= a && a <= 1114111 || wr(t, "expected valid JSON character"); - else - EIe.test(o) && wr(t, "the stream contains non-printable characters"); - t.result += o; - } -} -function VG(t, e, r, n) { - var i, s, a, o; - for (ds.isObject(r) || wr(t, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(r), a = 0, o = i.length; a < o; a += 1) - s = i[a], mp.call(e, s) || (e[s] = r[s], n[s] = !0); -} -function v1(t, e, r, n, i, s, a, o, l) { - var u, h; - if (Array.isArray(i)) - for (i = Array.prototype.slice.call(i), u = 0, h = i.length; u < h; u += 1) - Array.isArray(i[u]) && wr(t, "nested arrays are not supported inside keys"), typeof i == "object" && qG(i[u]) === "[object Object]" && (i[u] = "[object Object]"); - if (typeof i == "object" && qG(i) === "[object Object]" && (i = "[object Object]"), i = String(i), e === null && (e = {}), n === "tag:yaml.org,2002:merge") - if (Array.isArray(s)) - for (u = 0, h = s.length; u < h; u += 1) - VG(t, e, s[u], r); - else - VG(t, e, s, r); - else - !t.json && !mp.call(r, i) && mp.call(e, i) && (t.line = a || t.line, t.lineStart = o || t.lineStart, t.position = l || t.position, wr(t, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(e, i, { - configurable: !0, - enumerable: !0, - writable: !0, - value: s - }) : e[i] = s, delete r[i]; - return e; -} -function tF(t) { - var e; - e = t.input.charCodeAt(t.position), e === 10 ? t.position++ : e === 13 ? (t.position++, t.input.charCodeAt(t.position) === 10 && t.position++) : wr(t, "a line break is expected"), t.line += 1, t.lineStart = t.position, t.firstTabInLine = -1; -} -function Ki(t, e, r) { - for (var n = 0, i = t.input.charCodeAt(t.position); i !== 0; ) { - for (; rg(i); ) - i === 9 && t.firstTabInLine === -1 && (t.firstTabInLine = t.position), i = t.input.charCodeAt(++t.position); - if (e && i === 35) - do - i = t.input.charCodeAt(++t.position); - while (i !== 10 && i !== 13 && i !== 0); - if (oh(i)) - for (tF(t), i = t.input.charCodeAt(t.position), n++, t.lineIndent = 0; i === 32; ) - t.lineIndent++, i = t.input.charCodeAt(++t.position); - else - break; - } - return r !== -1 && n !== 0 && t.lineIndent < r && KT(t, "deficient indentation"), n; -} -function y6(t) { - var e = t.position, r; - return r = t.input.charCodeAt(e), !!((r === 45 || r === 46) && r === t.input.charCodeAt(e + 1) && r === t.input.charCodeAt(e + 2) && (e += 3, r = t.input.charCodeAt(e), r === 0 || Go(r))); +XB.prototype.State = _2t; +var R2t = XB, R8 = mn.isSpace; +function L8(t, e) { + var r = t.bMarks[e] + t.tShift[e], n = t.eMarks[e]; + return t.src.substr(r, n - r); } -function rF(t, e) { - e === 1 ? t.result += " " : e > 1 && (t.result += ds.repeat(` -`, e - 1)); +function nH(t) { + var e = [], r = 0, n = t.length, i, s = !1, a = 0, o = ""; + for (i = t.charCodeAt(r); r < n; ) + i === 124 && (s ? (o += t.substring(a, r - 1), a = r) : (e.push(o + t.substring(a, r)), o = "", a = r + 1)), s = i === 92, r++, i = t.charCodeAt(r); + return e.push(o + t.substring(a)), e; } -function NIe(t, e, r) { - var n, i, s, a, o, l, u, h, f = t.kind, d = t.result, p; - if (p = t.input.charCodeAt(t.position), Go(p) || m1(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (i = t.input.charCodeAt(t.position + 1), Go(i) || r && m1(i))) +var L2t = function(e, r, n, i) { + var s, a, o, l, u, h, f, d, p, g, m, v, y, b, w, O, S, C; + if (r + 2 > n || (h = r + 1, e.sCount[h] < e.blkIndent) || e.sCount[h] - e.blkIndent >= 4 || (o = e.bMarks[h] + e.tShift[h], o >= e.eMarks[h]) || (S = e.src.charCodeAt(o++), S !== 124 && S !== 45 && S !== 58) || o >= e.eMarks[h] || (C = e.src.charCodeAt(o++), C !== 124 && C !== 45 && C !== 58 && !R8(C)) || S === 45 && R8(C)) return !1; - for (t.kind = "scalar", t.result = "", s = a = t.position, o = !1; p !== 0; ) { - if (p === 58) { - if (i = t.input.charCodeAt(t.position + 1), Go(i) || r && m1(i)) - break; - } else if (p === 35) { - if (n = t.input.charCodeAt(t.position - 1), Go(n)) - break; - } else { - if (t.position === t.lineStart && y6(t) || r && m1(p)) - break; - if (oh(p)) - if (l = t.line, u = t.lineStart, h = t.lineIndent, Ki(t, !1, -1), t.lineIndent >= e) { - o = !0, p = t.input.charCodeAt(t.position); - continue; - } else { - t.position = a, t.line = l, t.lineStart = u, t.lineIndent = h; - break; - } + for (; o < e.eMarks[h]; ) { + if (s = e.src.charCodeAt(o), s !== 124 && s !== 45 && s !== 58 && !R8(s)) + return !1; + o++; + } + for (a = L8(e, r + 1), f = a.split("|"), g = [], l = 0; l < f.length; l++) { + if (m = f[l].trim(), !m) { + if (l === 0 || l === f.length - 1) + continue; + return !1; } - o && (Wd(t, s, a, !1), rF(t, t.line - l), s = a = t.position, o = !1), rg(p) || (a = t.position + 1), p = t.input.charCodeAt(++t.position); + if (!/^:?-+:?$/.test(m)) + return !1; + m.charCodeAt(m.length - 1) === 58 ? g.push(m.charCodeAt(0) === 58 ? "center" : "right") : m.charCodeAt(0) === 58 ? g.push("left") : g.push(""); } - return Wd(t, s, a, !1), t.result ? !0 : (t.kind = f, t.result = d, !1); -} -function IIe(t, e) { - var r, n, i; - if (r = t.input.charCodeAt(t.position), r !== 39) + if (a = L8(e, r).trim(), a.indexOf("|") === -1 || e.sCount[r] - e.blkIndent >= 4 || (f = nH(a), f.length && f[0] === "" && f.shift(), f.length && f[f.length - 1] === "" && f.pop(), d = f.length, d === 0 || d !== g.length)) return !1; - for (t.kind = "scalar", t.result = "", t.position++, n = i = t.position; (r = t.input.charCodeAt(t.position)) !== 0; ) - if (r === 39) - if (Wd(t, n, t.position, !0), r = t.input.charCodeAt(++t.position), r === 39) - n = t.position, t.position++, i = t.position; - else - return !0; - else - oh(r) ? (Wd(t, n, i, !0), rF(t, Ki(t, !1, e)), n = i = t.position) : t.position === t.lineStart && y6(t) ? wr(t, "unexpected end of the document within a single quoted scalar") : (t.position++, i = t.position); - wr(t, "unexpected end of the stream within a single quoted scalar"); -} -function $Ie(t, e) { - var r, n, i, s, a, o; - if (o = t.input.charCodeAt(t.position), o !== 34) - return !1; - for (t.kind = "scalar", t.result = "", t.position++, r = n = t.position; (o = t.input.charCodeAt(t.position)) !== 0; ) { - if (o === 34) - return Wd(t, r, t.position, !0), t.position++, !0; - if (o === 92) { - if (Wd(t, r, t.position, !0), o = t.input.charCodeAt(++t.position), oh(o)) - Ki(t, !1, e); - else if (o < 256 && Hue[o]) - t.result += Xue[o], t.position++; - else if ((a = LIe(o)) > 0) { - for (i = a, s = 0; i > 0; i--) - o = t.input.charCodeAt(++t.position), (a = RIe(o)) >= 0 ? s = (s << 4) + a : wr(t, "expected hexadecimal character"); - t.result += DIe(s), t.position++; - } else - wr(t, "unknown escape sequence"); - r = n = t.position; - } else - oh(o) ? (Wd(t, r, n, !0), rF(t, Ki(t, !1, e)), r = n = t.position) : t.position === t.lineStart && y6(t) ? wr(t, "unexpected end of the document within a double quoted scalar") : (t.position++, n = t.position); + if (i) + return !0; + for (b = e.parentType, e.parentType = "table", O = e.md.block.ruler.getRules("blockquote"), p = e.push("table_open", "table", 1), p.map = v = [r, 0], p = e.push("thead_open", "thead", 1), p.map = [r, r + 1], p = e.push("tr_open", "tr", 1), p.map = [r, r + 1], l = 0; l < f.length; l++) + p = e.push("th_open", "th", 1), g[l] && (p.attrs = [["style", "text-align:" + g[l]]]), p = e.push("inline", "", 0), p.content = f[l].trim(), p.children = [], p = e.push("th_close", "th", -1); + for (p = e.push("tr_close", "tr", -1), p = e.push("thead_close", "thead", -1), h = r + 2; h < n && !(e.sCount[h] < e.blkIndent); h++) { + for (w = !1, l = 0, u = O.length; l < u; l++) + if (O[l](e, h, n, !0)) { + w = !0; + break; + } + if (w || (a = L8(e, h).trim(), !a) || e.sCount[h] - e.blkIndent >= 4) + break; + for (f = nH(a), f.length && f[0] === "" && f.shift(), f.length && f[f.length - 1] === "" && f.pop(), h === r + 2 && (p = e.push("tbody_open", "tbody", 1), p.map = y = [r + 2, 0]), p = e.push("tr_open", "tr", 1), p.map = [h, h + 1], l = 0; l < d; l++) + p = e.push("td_open", "td", 1), g[l] && (p.attrs = [["style", "text-align:" + g[l]]]), p = e.push("inline", "", 0), p.content = f[l] ? f[l].trim() : "", p.children = [], p = e.push("td_close", "td", -1); + p = e.push("tr_close", "tr", -1); } - wr(t, "unexpected end of the stream within a double quoted scalar"); -} -function BIe(t, e) { - var r = !0, n, i, s, a = t.tag, o, l = t.anchor, u, h, f, d, p, g = /* @__PURE__ */ Object.create(null), m, v, y, b; - if (b = t.input.charCodeAt(t.position), b === 91) - h = 93, p = !1, o = []; - else if (b === 123) - h = 125, p = !0, o = {}; - else + return y && (p = e.push("tbody_close", "tbody", -1), y[1] = h), p = e.push("table_close", "table", -1), v[1] = h, e.parentType = b, e.line = h, !0; +}, M2t = function(e, r, n) { + var i, s, a; + if (e.sCount[r] - e.blkIndent < 4) return !1; - for (t.anchor !== null && (t.anchorMap[t.anchor] = o), b = t.input.charCodeAt(++t.position); b !== 0; ) { - if (Ki(t, !0, e), b = t.input.charCodeAt(t.position), b === h) - return t.position++, t.tag = a, t.anchor = l, t.kind = p ? "mapping" : "sequence", t.result = o, !0; - r ? b === 44 && wr(t, "expected the node content, but found ','") : wr(t, "missed comma between flow collection entries"), v = m = y = null, f = d = !1, b === 63 && (u = t.input.charCodeAt(t.position + 1), Go(u) && (f = d = !0, t.position++, Ki(t, !0, e))), n = t.line, i = t.lineStart, s = t.position, Ev(t, e, jT, !1, !0), v = t.tag, m = t.result, Ki(t, !0, e), b = t.input.charCodeAt(t.position), (d || t.line === n) && b === 58 && (f = !0, b = t.input.charCodeAt(++t.position), Ki(t, !0, e), Ev(t, e, jT, !1, !0), y = t.result), p ? v1(t, o, g, v, m, y, n, i, s) : f ? o.push(v1(t, null, g, v, m, y, n, i, s)) : o.push(m), Ki(t, !0, e), b = t.input.charCodeAt(t.position), b === 44 ? (r = !0, b = t.input.charCodeAt(++t.position)) : r = !1; + for (s = i = r + 1; i < n; ) { + if (e.isEmpty(i)) { + i++; + continue; + } + if (e.sCount[i] - e.blkIndent >= 4) { + i++, s = i; + continue; + } + break; } - wr(t, "unexpected end of the stream within a flow collection"); -} -function FIe(t, e) { - var r, n, i = z8, s = !1, a = !1, o = e, l = 0, u = !1, h, f; - if (f = t.input.charCodeAt(t.position), f === 124) - n = !1; - else if (f === 62) - n = !0; - else + return e.line = s, a = e.push("code_block", "code", 0), a.content = e.getLines(r, s, 4 + e.blkIndent, !1) + ` +`, a.map = [r, e.line], !0; +}, D2t = function(e, r, n, i) { + var s, a, o, l, u, h, f, d = !1, p = e.bMarks[r] + e.tShift[r], g = e.eMarks[r]; + if (e.sCount[r] - e.blkIndent >= 4 || p + 3 > g || (s = e.src.charCodeAt(p), s !== 126 && s !== 96) || (u = p, p = e.skipChars(p, s), a = p - u, a < 3) || (f = e.src.slice(u, p), o = e.src.slice(p, g), s === 96 && o.indexOf(String.fromCharCode(s)) >= 0)) return !1; - for (t.kind = "scalar", t.result = ""; f !== 0; ) - if (f = t.input.charCodeAt(++t.position), f === 43 || f === 45) - z8 === i ? i = f === 43 ? zG : CIe : wr(t, "repeat of a chomping mode identifier"); - else if ((h = MIe(f)) >= 0) - h === 0 ? wr(t, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? wr(t, "repeat of an indentation width identifier") : (o = e + h - 1, a = !0); - else + if (i) + return !0; + for (l = r; l++, !(l >= n || (p = u = e.bMarks[l] + e.tShift[l], g = e.eMarks[l], p < g && e.sCount[l] < e.blkIndent)); ) + if (e.src.charCodeAt(p) === s && !(e.sCount[l] - e.blkIndent >= 4) && (p = e.skipChars(p, s), !(p - u < a) && (p = e.skipSpaces(p), !(p < g)))) { + d = !0; break; - if (rg(f)) { - do - f = t.input.charCodeAt(++t.position); - while (rg(f)); - if (f === 35) - do - f = t.input.charCodeAt(++t.position); - while (!oh(f) && f !== 0); + } + return a = e.sCount[r], e.line = l + (d ? 1 : 0), h = e.push("fence", "code", 0), h.info = o, h.content = e.getLines(r + 1, l, a, !0), h.markup = f, h.map = [r, e.line], !0; +}, iH = mn.isSpace, P2t = function(e, r, n, i) { + var s, a, o, l, u, h, f, d, p, g, m, v, y, b, w, O, S, C, T, M, E = e.lineMax, P = e.bMarks[r] + e.tShift[r], L = e.eMarks[r]; + if (e.sCount[r] - e.blkIndent >= 4 || e.src.charCodeAt(P++) !== 62) + return !1; + if (i) + return !0; + for (l = p = e.sCount[r] + 1, e.src.charCodeAt(P) === 32 ? (P++, l++, p++, s = !1, O = !0) : e.src.charCodeAt(P) === 9 ? (O = !0, (e.bsCount[r] + p) % 4 === 3 ? (P++, l++, p++, s = !1) : s = !0) : O = !1, g = [e.bMarks[r]], e.bMarks[r] = P; P < L && (a = e.src.charCodeAt(P), iH(a)); ) { + a === 9 ? p += 4 - (p + e.bsCount[r] + (s ? 1 : 0)) % 4 : p++; + P++; } - for (; f !== 0; ) { - for (tF(t), t.lineIndent = 0, f = t.input.charCodeAt(t.position); (!a || t.lineIndent < o) && f === 32; ) - t.lineIndent++, f = t.input.charCodeAt(++t.position); - if (!a && t.lineIndent > o && (o = t.lineIndent), oh(f)) { - l++; + for (m = [e.bsCount[r]], e.bsCount[r] = e.sCount[r] + 1 + (O ? 1 : 0), h = P >= L, b = [e.sCount[r]], e.sCount[r] = p - l, w = [e.tShift[r]], e.tShift[r] = P - e.bMarks[r], C = e.md.block.ruler.getRules("blockquote"), y = e.parentType, e.parentType = "blockquote", d = r + 1; d < n && (M = e.sCount[d] < e.blkIndent, P = e.bMarks[d] + e.tShift[d], L = e.eMarks[d], !(P >= L)); d++) { + if (e.src.charCodeAt(P++) === 62 && !M) { + for (l = p = e.sCount[d] + 1, e.src.charCodeAt(P) === 32 ? (P++, l++, p++, s = !1, O = !0) : e.src.charCodeAt(P) === 9 ? (O = !0, (e.bsCount[d] + p) % 4 === 3 ? (P++, l++, p++, s = !1) : s = !0) : O = !1, g.push(e.bMarks[d]), e.bMarks[d] = P; P < L && (a = e.src.charCodeAt(P), iH(a)); ) { + a === 9 ? p += 4 - (p + e.bsCount[d] + (s ? 1 : 0)) % 4 : p++; + P++; + } + h = P >= L, m.push(e.bsCount[d]), e.bsCount[d] = e.sCount[d] + 1 + (O ? 1 : 0), b.push(e.sCount[d]), e.sCount[d] = p - l, w.push(e.tShift[d]), e.tShift[d] = P - e.bMarks[d]; continue; } - if (t.lineIndent < o) { - i === zG ? t.result += ds.repeat(` -`, s ? 1 + l : l) : i === z8 && s && (t.result += ` -`); + if (h) + break; + for (S = !1, o = 0, u = C.length; o < u; o++) + if (C[o](e, d, n, !0)) { + S = !0; + break; + } + if (S) { + e.lineMax = d, e.blkIndent !== 0 && (g.push(e.bMarks[d]), m.push(e.bsCount[d]), w.push(e.tShift[d]), b.push(e.sCount[d]), e.sCount[d] -= e.blkIndent); break; } - for (n ? rg(f) ? (u = !0, t.result += ds.repeat(` -`, s ? 1 + l : l)) : u ? (u = !1, t.result += ds.repeat(` -`, l + 1)) : l === 0 ? s && (t.result += " ") : t.result += ds.repeat(` -`, l) : t.result += ds.repeat(` -`, s ? 1 + l : l), s = !0, a = !0, l = 0, r = t.position; !oh(f) && f !== 0; ) - f = t.input.charCodeAt(++t.position); - Wd(t, r, t.position, !1); + g.push(e.bMarks[d]), m.push(e.bsCount[d]), w.push(e.tShift[d]), b.push(e.sCount[d]), e.sCount[d] = -1; } - return !0; -} -function WG(t, e) { - var r, n = t.tag, i = t.anchor, s = [], a, o = !1, l; - if (t.firstTabInLine !== -1) + for (v = e.blkIndent, e.blkIndent = 0, T = e.push("blockquote_open", "blockquote", 1), T.markup = ">", T.map = f = [r, 0], e.md.block.tokenize(e, r, d), T = e.push("blockquote_close", "blockquote", -1), T.markup = ">", e.lineMax = E, e.parentType = y, f[1] = e.line, o = 0; o < w.length; o++) + e.bMarks[o + r] = g[o], e.tShift[o + r] = w[o], e.sCount[o + r] = b[o], e.bsCount[o + r] = m[o]; + return e.blkIndent = v, !0; +}, N2t = mn.isSpace, I2t = function(e, r, n, i) { + var s, a, o, l, u = e.bMarks[r] + e.tShift[r], h = e.eMarks[r]; + if (e.sCount[r] - e.blkIndent >= 4 || (s = e.src.charCodeAt(u++), s !== 42 && s !== 45 && s !== 95)) return !1; - for (t.anchor !== null && (t.anchorMap[t.anchor] = s), l = t.input.charCodeAt(t.position); l !== 0 && (t.firstTabInLine !== -1 && (t.position = t.firstTabInLine, wr(t, "tab characters must not be used in indentation")), !(l !== 45 || (a = t.input.charCodeAt(t.position + 1), !Go(a)))); ) { - if (o = !0, t.position++, Ki(t, !0, -1) && t.lineIndent <= e) { - s.push(null), l = t.input.charCodeAt(t.position); + for (a = 1; u < h; ) { + if (o = e.src.charCodeAt(u++), o !== s && !N2t(o)) + return !1; + o === s && a++; + } + return a < 3 ? !1 : (i || (e.line = r + 1, l = e.push("hr", "hr", 0), l.map = [r, e.line], l.markup = Array(a + 1).join(String.fromCharCode(s))), !0); +}, Tue = mn.isSpace; +function sH(t, e) { + var r, n, i, s; + return n = t.bMarks[e] + t.tShift[e], i = t.eMarks[e], r = t.src.charCodeAt(n++), r !== 42 && r !== 45 && r !== 43 || n < i && (s = t.src.charCodeAt(n), !Tue(s)) ? -1 : n; +} +function aH(t, e) { + var r, n = t.bMarks[e] + t.tShift[e], i = n, s = t.eMarks[e]; + if (i + 1 >= s || (r = t.src.charCodeAt(i++), r < 48 || r > 57)) + return -1; + for (; ; ) { + if (i >= s) + return -1; + if (r = t.src.charCodeAt(i++), r >= 48 && r <= 57) { + if (i - n >= 10) + return -1; continue; } - if (r = t.line, Ev(t, e, Wue, !1, !0), s.push(t.result), Ki(t, !0, -1), l = t.input.charCodeAt(t.position), (t.line === r || t.lineIndent > e) && l !== 0) - wr(t, "bad indentation of a sequence entry"); - else if (t.lineIndent < e) + if (r === 41 || r === 46) break; + return -1; } - return o ? (t.tag = n, t.anchor = i, t.kind = "sequence", t.result = s, !0) : !1; + return i < s && (r = t.src.charCodeAt(i), !Tue(r)) ? -1 : i; } -function zIe(t, e, r) { - var n, i, s, a, o, l, u = t.tag, h = t.anchor, f = {}, d = /* @__PURE__ */ Object.create(null), p = null, g = null, m = null, v = !1, y = !1, b; - if (t.firstTabInLine !== -1) +function $2t(t, e) { + var r, n, i = t.level + 2; + for (r = e + 2, n = t.tokens.length - 2; r < n; r++) + t.tokens[r].level === i && t.tokens[r].type === "paragraph_open" && (t.tokens[r + 2].hidden = !0, t.tokens[r].hidden = !0, r += 2); +} +var B2t = function(e, r, n, i) { + var s, a, o, l, u, h, f, d, p, g, m, v, y, b, w, O, S, C, T, M, E, P, L, D, F, k, I, _, R = !1, N = !0; + if (e.sCount[r] - e.blkIndent >= 4 || e.listIndent >= 0 && e.sCount[r] - e.listIndent >= 4 && e.sCount[r] < e.blkIndent) return !1; - for (t.anchor !== null && (t.anchorMap[t.anchor] = f), b = t.input.charCodeAt(t.position); b !== 0; ) { - if (!v && t.firstTabInLine !== -1 && (t.position = t.firstTabInLine, wr(t, "tab characters must not be used in indentation")), n = t.input.charCodeAt(t.position + 1), s = t.line, (b === 63 || b === 58) && Go(n)) - b === 63 ? (v && (v1(t, f, d, p, g, null, a, o, l), p = g = m = null), y = !0, v = !0, i = !0) : v ? (v = !1, i = !0) : wr(t, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), t.position += 1, b = n; - else { - if (a = t.line, o = t.lineStart, l = t.position, !Ev(t, r, Vue, !1, !0)) - break; - if (t.line === s) { - for (b = t.input.charCodeAt(t.position); rg(b); ) - b = t.input.charCodeAt(++t.position); - if (b === 58) - b = t.input.charCodeAt(++t.position), Go(b) || wr(t, "a whitespace character is expected after the key-value separator within a block mapping"), v && (v1(t, f, d, p, g, null, a, o, l), p = g = m = null), y = !0, v = !1, i = !1, p = t.tag, g = t.result; - else if (y) - wr(t, "can not read an implicit mapping pair; a colon is missed"); - else - return t.tag = u, t.anchor = h, !0; - } else if (y) - wr(t, "can not read a block mapping entry; a multiline key may not be an implicit key"); + if (i && e.parentType === "paragraph" && e.sCount[r] >= e.blkIndent && (R = !0), (L = aH(e, r)) >= 0) { + if (f = !0, F = e.bMarks[r] + e.tShift[r], y = Number(e.src.slice(F, L - 1)), R && y !== 1) + return !1; + } else if ((L = sH(e, r)) >= 0) + f = !1; + else + return !1; + if (R && e.skipSpaces(L) >= e.eMarks[r]) + return !1; + if (v = e.src.charCodeAt(L - 1), i) + return !0; + for (m = e.tokens.length, f ? (_ = e.push("ordered_list_open", "ol", 1), y !== 1 && (_.attrs = [["start", y]])) : _ = e.push("bullet_list_open", "ul", 1), _.map = g = [r, 0], _.markup = String.fromCharCode(v), w = r, D = !1, I = e.md.block.ruler.getRules("list"), C = e.parentType, e.parentType = "list"; w < n; ) { + for (P = L, b = e.eMarks[w], h = O = e.sCount[w] + L - (e.bMarks[r] + e.tShift[r]); P < b; ) { + if (s = e.src.charCodeAt(P), s === 9) + O += 4 - (O + e.bsCount[w]) % 4; + else if (s === 32) + O++; else - return t.tag = u, t.anchor = h, !0; + break; + P++; } - if ((t.line === s || t.lineIndent > e) && (v && (a = t.line, o = t.lineStart, l = t.position), Ev(t, e, ZT, !0, i) && (v ? g = t.result : m = t.result), v || (v1(t, f, d, p, g, m, a, o, l), p = g = m = null), Ki(t, !0, -1), b = t.input.charCodeAt(t.position)), (t.line === s || t.lineIndent > e) && b !== 0) - wr(t, "bad indentation of a mapping entry"); - else if (t.lineIndent < e) + if (a = P, a >= b ? u = 1 : u = O - h, u > 4 && (u = 1), l = h + u, _ = e.push("list_item_open", "li", 1), _.markup = String.fromCharCode(v), _.map = d = [r, 0], f && (_.info = e.src.slice(F, L - 1)), E = e.tight, M = e.tShift[r], T = e.sCount[r], S = e.listIndent, e.listIndent = e.blkIndent, e.blkIndent = l, e.tight = !0, e.tShift[r] = a - e.bMarks[r], e.sCount[r] = O, a >= b && e.isEmpty(r + 1) ? e.line = Math.min(e.line + 2, n) : e.md.block.tokenize(e, r, n, !0), (!e.tight || D) && (N = !1), D = e.line - r > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = S, e.tShift[r] = M, e.sCount[r] = T, e.tight = E, _ = e.push("list_item_close", "li", -1), _.markup = String.fromCharCode(v), w = r = e.line, d[1] = w, a = e.bMarks[r], w >= n || e.sCount[w] < e.blkIndent || e.sCount[r] - e.blkIndent >= 4) + break; + for (k = !1, o = 0, p = I.length; o < p; o++) + if (I[o](e, w, n, !0)) { + k = !0; + break; + } + if (k) + break; + if (f) { + if (L = aH(e, w), L < 0) + break; + F = e.bMarks[w] + e.tShift[w]; + } else if (L = sH(e, w), L < 0) + break; + if (v !== e.src.charCodeAt(L - 1)) break; } - return v && v1(t, f, d, p, g, null, a, o, l), y && (t.tag = u, t.anchor = h, t.kind = "mapping", t.result = f), y; -} -function qIe(t) { - var e, r = !1, n = !1, i, s, a; - if (a = t.input.charCodeAt(t.position), a !== 33) + return f ? _ = e.push("ordered_list_close", "ol", -1) : _ = e.push("bullet_list_close", "ul", -1), _.markup = String.fromCharCode(v), g[1] = w, e.line = w, e.parentType = C, N && $2t(e, m), !0; +}, F2t = mn.normalizeReference, lS = mn.isSpace, z2t = function(e, r, n, i) { + var s, a, o, l, u, h, f, d, p, g, m, v, y, b, w, O, S = 0, C = e.bMarks[r] + e.tShift[r], T = e.eMarks[r], M = r + 1; + if (e.sCount[r] - e.blkIndent >= 4 || e.src.charCodeAt(C) !== 91) return !1; - if (t.tag !== null && wr(t, "duplication of a tag property"), a = t.input.charCodeAt(++t.position), a === 60 ? (r = !0, a = t.input.charCodeAt(++t.position)) : a === 33 ? (n = !0, i = "!!", a = t.input.charCodeAt(++t.position)) : i = "!", e = t.position, r) { - do - a = t.input.charCodeAt(++t.position); - while (a !== 0 && a !== 62); - t.position < t.length ? (s = t.input.slice(e, t.position), a = t.input.charCodeAt(++t.position)) : wr(t, "unexpected end of the stream within a verbatim tag"); - } else { - for (; a !== 0 && !Go(a); ) - a === 33 && (n ? wr(t, "tag suffix cannot contain exclamation marks") : (i = t.input.slice(e - 1, t.position + 1), Yue.test(i) || wr(t, "named tag handle cannot contain such characters"), n = !0, e = t.position + 1)), a = t.input.charCodeAt(++t.position); - s = t.input.slice(e, t.position), AIe.test(s) && wr(t, "tag suffix cannot contain flow indicator characters"); - } - s && !Gue.test(s) && wr(t, "tag name cannot contain such characters: " + s); - try { - s = decodeURIComponent(s); - } catch { - wr(t, "tag name is malformed: " + s); + for (; ++C < T; ) + if (e.src.charCodeAt(C) === 93 && e.src.charCodeAt(C - 1) !== 92) { + if (C + 1 === T || e.src.charCodeAt(C + 1) !== 58) + return !1; + break; + } + for (l = e.lineMax, w = e.md.block.ruler.getRules("reference"), g = e.parentType, e.parentType = "reference"; M < l && !e.isEmpty(M); M++) + if (!(e.sCount[M] - e.blkIndent > 3) && !(e.sCount[M] < 0)) { + for (b = !1, h = 0, f = w.length; h < f; h++) + if (w[h](e, M, l, !0)) { + b = !0; + break; + } + if (b) + break; + } + for (y = e.getLines(r, M, e.blkIndent, !1).trim(), T = y.length, C = 1; C < T; C++) { + if (s = y.charCodeAt(C), s === 91) + return !1; + if (s === 93) { + p = C; + break; + } else + s === 10 ? S++ : s === 92 && (C++, C < T && y.charCodeAt(C) === 10 && S++); } - return r ? t.tag = s : mp.call(t.tagMap, i) ? t.tag = t.tagMap[i] + s : i === "!" ? t.tag = "!" + s : i === "!!" ? t.tag = "tag:yaml.org,2002:" + s : wr(t, 'undeclared tag handle "' + i + '"'), !0; -} -function UIe(t) { - var e, r; - if (r = t.input.charCodeAt(t.position), r !== 38) + if (p < 0 || y.charCodeAt(p + 1) !== 58) return !1; - for (t.anchor !== null && wr(t, "duplication of an anchor property"), r = t.input.charCodeAt(++t.position), e = t.position; r !== 0 && !Go(r) && !m1(r); ) - r = t.input.charCodeAt(++t.position); - return t.position === e && wr(t, "name of an anchor node must contain at least one character"), t.anchor = t.input.slice(e, t.position), !0; -} -function QIe(t) { - var e, r, n; - if (n = t.input.charCodeAt(t.position), n !== 42) + for (C = p + 2; C < T; C++) + if (s = y.charCodeAt(C), s === 10) + S++; + else if (!lS(s)) + break; + if (m = e.md.helpers.parseLinkDestination(y, C, T), !m.ok || (u = e.md.normalizeLink(m.str), !e.md.validateLink(u))) return !1; - for (n = t.input.charCodeAt(++t.position), e = t.position; n !== 0 && !Go(n) && !m1(n); ) - n = t.input.charCodeAt(++t.position); - return t.position === e && wr(t, "name of an alias node must contain at least one character"), r = t.input.slice(e, t.position), mp.call(t.anchorMap, r) || wr(t, 'unidentified alias "' + r + '"'), t.result = t.anchorMap[r], Ki(t, !0, -1), !0; -} -function Ev(t, e, r, n, i) { - var s, a, o, l = 1, u = !1, h = !1, f, d, p, g, m, v; - if (t.listener !== null && t.listener("open", t), t.tag = null, t.anchor = null, t.kind = null, t.result = null, s = a = o = ZT === r || Wue === r, n && Ki(t, !0, -1) && (u = !0, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)), l === 1) - for (; qIe(t) || UIe(t); ) - Ki(t, !0, -1) ? (u = !0, o = s, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)) : o = !1; - if (o && (o = u || i), (l === 1 || ZT === r) && (jT === r || Vue === r ? m = e : m = e + 1, v = t.position - t.lineStart, l === 1 ? o && (WG(t, v) || zIe(t, v, m)) || BIe(t, m) ? h = !0 : (a && FIe(t, m) || IIe(t, m) || $Ie(t, m) ? h = !0 : QIe(t) ? (h = !0, (t.tag !== null || t.anchor !== null) && wr(t, "alias node should not have any properties")) : NIe(t, m, jT === r) && (h = !0, t.tag === null && (t.tag = "?")), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : l === 0 && (h = o && WG(t, v))), t.tag === null) - t.anchor !== null && (t.anchorMap[t.anchor] = t.result); - else if (t.tag === "?") { - for (t.result !== null && t.kind !== "scalar" && wr(t, 'unacceptable node kind for ! tag; it should be "scalar", not "' + t.kind + '"'), f = 0, d = t.implicitTypes.length; f < d; f += 1) - if (g = t.implicitTypes[f], g.resolve(t.result)) { - t.result = g.construct(t.result), t.tag = g.tag, t.anchor !== null && (t.anchorMap[t.anchor] = t.result); + for (C = m.pos, S += m.lines, a = C, o = S, v = C; C < T; C++) + if (s = y.charCodeAt(C), s === 10) + S++; + else if (!lS(s)) + break; + for (m = e.md.helpers.parseLinkTitle(y, C, T), C < T && v !== C && m.ok ? (O = m.str, C = m.pos, S += m.lines) : (O = "", C = a, S = o); C < T && (s = y.charCodeAt(C), !!lS(s)); ) + C++; + if (C < T && y.charCodeAt(C) !== 10 && O) + for (O = "", C = a, S = o; C < T && (s = y.charCodeAt(C), !!lS(s)); ) + C++; + return C < T && y.charCodeAt(C) !== 10 || (d = F2t(y.slice(1, p)), !d) ? !1 : (i || (typeof e.env.references > "u" && (e.env.references = {}), typeof e.env.references[d] > "u" && (e.env.references[d] = { title: O, href: u }), e.parentType = g, e.line = r + S + 1), !0); +}, q2t = [ + "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", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hr", + "html", + "iframe", + "legend", + "li", + "link", + "main", + "menu", + "menuitem", + "nav", + "noframes", + "ol", + "optgroup", + "option", + "p", + "param", + "section", + "source", + "summary", + "table", + "tbody", + "td", + "tfoot", + "th", + "thead", + "title", + "tr", + "track", + "ul" +], s6 = {}, U2t = "[a-zA-Z_:][a-zA-Z0-9:._-]*", Q2t = "[^\"'=<>`\\x00-\\x20]+", V2t = "'[^']*'", W2t = '"[^"]*"', Y2t = "(?:" + Q2t + "|" + V2t + "|" + W2t + ")", G2t = "(?:\\s+" + U2t + "(?:\\s*=\\s*" + Y2t + ")?)", Cue = "<[A-Za-z][A-Za-z0-9\\-]*" + G2t + "*\\s*\\/?>", Eue = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", H2t = "|", X2t = "<[?][\\s\\S]*?[?]>", Z2t = "]*>", j2t = "", K2t = new RegExp("^(?:" + Cue + "|" + Eue + "|" + H2t + "|" + X2t + "|" + Z2t + "|" + j2t + ")"), J2t = new RegExp("^(?:" + Cue + "|" + Eue + ")"); +s6.HTML_TAG_RE = K2t; +s6.HTML_OPEN_CLOSE_TAG_RE = J2t; +var ebt = q2t, tbt = s6.HTML_OPEN_CLOSE_TAG_RE, Dm = [ + [/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0], + [/^/, !0], + [/^<\?/, /\?>/, !0], + [/^/, !0], + [/^/, !0], + [new RegExp("^|$))", "i"), /^$/, !0], + [new RegExp(tbt.source + "\\s*$"), /^$/, !1] +], rbt = function(e, r, n, i) { + var s, a, o, l, u = e.bMarks[r] + e.tShift[r], h = e.eMarks[r]; + if (e.sCount[r] - e.blkIndent >= 4 || !e.md.options.html || e.src.charCodeAt(u) !== 60) + return !1; + for (l = e.src.slice(u, h), s = 0; s < Dm.length && !Dm[s][0].test(l); s++) + ; + if (s === Dm.length) + return !1; + if (i) + return Dm[s][2]; + if (a = r + 1, !Dm[s][1].test(l)) { + for (; a < n && !(e.sCount[a] < e.blkIndent); a++) + if (u = e.bMarks[a] + e.tShift[a], h = e.eMarks[a], l = e.src.slice(u, h), Dm[s][1].test(l)) { + l.length !== 0 && a++; break; } - } else if (t.tag !== "!") { - if (mp.call(t.typeMap[t.kind || "fallback"], t.tag)) - g = t.typeMap[t.kind || "fallback"][t.tag]; - else - for (g = null, p = t.typeMap.multi[t.kind || "fallback"], f = 0, d = p.length; f < d; f += 1) - if (t.tag.slice(0, p[f].tag.length) === p[f].tag) { - g = p[f]; - break; - } - g || wr(t, "unknown tag !<" + t.tag + ">"), t.result !== null && g.kind !== t.kind && wr(t, "unacceptable node kind for !<" + t.tag + '> tag; it should be "' + g.kind + '", not "' + t.kind + '"'), g.resolve(t.result, t.tag) ? (t.result = g.construct(t.result, t.tag), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : wr(t, "cannot resolve a node with !<" + t.tag + "> explicit tag"); } - return t.listener !== null && t.listener("close", t), t.tag !== null || t.anchor !== null || h; -} -function VIe(t) { - var e = t.position, r, n, i, s = !1, a; - for (t.version = null, t.checkLineBreaks = t.legacy, t.tagMap = /* @__PURE__ */ Object.create(null), t.anchorMap = /* @__PURE__ */ Object.create(null); (a = t.input.charCodeAt(t.position)) !== 0 && (Ki(t, !0, -1), a = t.input.charCodeAt(t.position), !(t.lineIndent > 0 || a !== 37)); ) { - for (s = !0, a = t.input.charCodeAt(++t.position), r = t.position; a !== 0 && !Go(a); ) - a = t.input.charCodeAt(++t.position); - for (n = t.input.slice(r, t.position), i = [], n.length < 1 && wr(t, "directive name must not be less than one character in length"); a !== 0; ) { - for (; rg(a); ) - a = t.input.charCodeAt(++t.position); - if (a === 35) { - do - a = t.input.charCodeAt(++t.position); - while (a !== 0 && !oh(a)); + return e.line = a, o = e.push("html_block", "", 0), o.map = [r, a], o.content = e.getLines(r, a, e.blkIndent, !0), !0; +}, oH = mn.isSpace, nbt = function(e, r, n, i) { + var s, a, o, l, u = e.bMarks[r] + e.tShift[r], h = e.eMarks[r]; + if (e.sCount[r] - e.blkIndent >= 4 || (s = e.src.charCodeAt(u), s !== 35 || u >= h)) + return !1; + for (a = 1, s = e.src.charCodeAt(++u); s === 35 && u < h && a <= 6; ) + a++, s = e.src.charCodeAt(++u); + return a > 6 || u < h && !oH(s) ? !1 : (i || (h = e.skipSpacesBack(h, u), o = e.skipCharsBack(h, 35, u), o > u && oH(e.src.charCodeAt(o - 1)) && (h = o), e.line = r + 1, l = e.push("heading_open", "h" + String(a), 1), l.markup = "########".slice(0, a), l.map = [r, e.line], l = e.push("inline", "", 0), l.content = e.src.slice(u, h).trim(), l.map = [r, e.line], l.children = [], l = e.push("heading_close", "h" + String(a), -1), l.markup = "########".slice(0, a)), !0); +}, ibt = function(e, r, n) { + var i, s, a, o, l, u, h, f, d, p = r + 1, g, m = e.md.block.ruler.getRules("paragraph"); + if (e.sCount[r] - e.blkIndent >= 4) + return !1; + for (g = e.parentType, e.parentType = "paragraph"; p < n && !e.isEmpty(p); p++) + if (!(e.sCount[p] - e.blkIndent > 3)) { + if (e.sCount[p] >= e.blkIndent && (u = e.bMarks[p] + e.tShift[p], h = e.eMarks[p], u < h && (d = e.src.charCodeAt(u), (d === 45 || d === 61) && (u = e.skipChars(u, d), u = e.skipSpaces(u), u >= h)))) { + f = d === 61 ? 1 : 2; break; } - if (oh(a)) + if (!(e.sCount[p] < 0)) { + for (s = !1, a = 0, o = m.length; a < o; a++) + if (m[a](e, p, n, !0)) { + s = !0; + break; + } + if (s) + break; + } + } + return f ? (i = e.getLines(r, p, e.blkIndent, !1).trim(), e.line = p + 1, l = e.push("heading_open", "h" + String(f), 1), l.markup = String.fromCharCode(d), l.map = [r, e.line], l = e.push("inline", "", 0), l.content = i, l.map = [r, e.line - 1], l.children = [], l = e.push("heading_close", "h" + String(f), -1), l.markup = String.fromCharCode(d), e.parentType = g, !0) : !1; +}, sbt = function(e, r) { + var n, i, s, a, o, l, u = r + 1, h = e.md.block.ruler.getRules("paragraph"), f = e.lineMax; + for (l = e.parentType, e.parentType = "paragraph"; u < f && !e.isEmpty(u); u++) + if (!(e.sCount[u] - e.blkIndent > 3) && !(e.sCount[u] < 0)) { + for (i = !1, s = 0, a = h.length; s < a; s++) + if (h[s](e, u, f, !0)) { + i = !0; + break; + } + if (i) break; - for (r = t.position; a !== 0 && !Go(a); ) - a = t.input.charCodeAt(++t.position); - i.push(t.input.slice(r, t.position)); } - a !== 0 && tF(t), mp.call(QG, n) ? QG[n](t, n, i) : KT(t, 'unknown document directive "' + n + '"'); - } - if (Ki(t, !0, -1), t.lineIndent === 0 && t.input.charCodeAt(t.position) === 45 && t.input.charCodeAt(t.position + 1) === 45 && t.input.charCodeAt(t.position + 2) === 45 ? (t.position += 3, Ki(t, !0, -1)) : s && wr(t, "directives end mark is expected"), Ev(t, t.lineIndent - 1, ZT, !1, !0), Ki(t, !0, -1), t.checkLineBreaks && _Ie.test(t.input.slice(e, t.position)) && KT(t, "non-ASCII line breaks are interpreted as content"), t.documents.push(t.result), t.position === t.lineStart && y6(t)) { - t.input.charCodeAt(t.position) === 46 && (t.position += 3, Ki(t, !0, -1)); - return; - } - if (t.position < t.length - 1) - wr(t, "end of the stream or a document separator is expected"); - else - return; + return n = e.getLines(r, u, e.blkIndent, !1).trim(), e.line = u, o = e.push("paragraph_open", "p", 1), o.map = [r, e.line], o = e.push("inline", "", 0), o.content = n, o.map = [r, e.line], o.children = [], o = e.push("paragraph_close", "p", -1), e.parentType = l, !0; +}, _ue = HB, a6 = mn.isSpace; +function Ch(t, e, r, n) { + var i, s, a, o, l, u, h, f; + for (this.src = t, this.md = e, this.env = r, this.tokens = n, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0, this.result = "", s = this.src, f = !1, a = o = u = h = 0, l = s.length; o < l; o++) { + if (i = s.charCodeAt(o), !f) + if (a6(i)) { + u++, i === 9 ? h += 4 - h % 4 : h++; + continue; + } else + f = !0; + (i === 10 || o === l - 1) && (i !== 10 && o++, this.bMarks.push(a), this.eMarks.push(o), this.tShift.push(u), this.sCount.push(h), this.bsCount.push(0), f = !1, u = 0, h = 0, a = o + 1); + } + this.bMarks.push(s.length), this.eMarks.push(s.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1; } -function Zue(t, e) { - t = String(t), e = e || {}, t.length !== 0 && (t.charCodeAt(t.length - 1) !== 10 && t.charCodeAt(t.length - 1) !== 13 && (t += ` -`), t.charCodeAt(0) === 65279 && (t = t.slice(1))); - var r = new PIe(t, e), n = t.indexOf("\0"); - for (n !== -1 && (r.position = n, wr(r, "null byte is not allowed in input")), r.input += "\0"; r.input.charCodeAt(r.position) === 32; ) - r.lineIndent += 1, r.position += 1; - for (; r.position < r.length - 1; ) - VIe(r); - return r.documents; +Ch.prototype.push = function(t, e, r) { + var n = new _ue(t, e, r); + return n.block = !0, r < 0 && this.level--, n.level = this.level, r > 0 && this.level++, this.tokens.push(n), n; +}; +Ch.prototype.isEmpty = function(e) { + return this.bMarks[e] + this.tShift[e] >= this.eMarks[e]; +}; +Ch.prototype.skipEmptyLines = function(e) { + for (var r = this.lineMax; e < r && !(this.bMarks[e] + this.tShift[e] < this.eMarks[e]); e++) + ; + return e; +}; +Ch.prototype.skipSpaces = function(e) { + for (var r, n = this.src.length; e < n && (r = this.src.charCodeAt(e), !!a6(r)); e++) + ; + return e; +}; +Ch.prototype.skipSpacesBack = function(e, r) { + if (e <= r) + return e; + for (; e > r; ) + if (!a6(this.src.charCodeAt(--e))) + return e + 1; + return e; +}; +Ch.prototype.skipChars = function(e, r) { + for (var n = this.src.length; e < n && this.src.charCodeAt(e) === r; e++) + ; + return e; +}; +Ch.prototype.skipCharsBack = function(e, r, n) { + if (e <= n) + return e; + for (; e > n; ) + if (r !== this.src.charCodeAt(--e)) + return e + 1; + return e; +}; +Ch.prototype.getLines = function(e, r, n, i) { + var s, a, o, l, u, h, f, d = e; + if (e >= r) + return ""; + for (h = new Array(r - e), s = 0; d < r; d++, s++) { + for (a = 0, f = l = this.bMarks[d], d + 1 < r || i ? u = this.eMarks[d] + 1 : u = this.eMarks[d]; l < u && a < n; ) { + if (o = this.src.charCodeAt(l), a6(o)) + o === 9 ? a += 4 - (a + this.bsCount[d]) % 4 : a++; + else if (l - f < this.tShift[d]) + a++; + else + break; + l++; + } + a > n ? h[s] = new Array(a - n + 1).join(" ") + this.src.slice(l, u) : h[s] = this.src.slice(l, u); + } + return h.join(""); +}; +Ch.prototype.Token = _ue; +var abt = Ch, obt = GB, cS = [ + ["table", L2t, ["paragraph", "reference"]], + ["code", M2t], + ["fence", D2t, ["paragraph", "reference", "blockquote", "list"]], + ["blockquote", P2t, ["paragraph", "reference", "blockquote", "list"]], + ["hr", I2t, ["paragraph", "reference", "blockquote", "list"]], + ["list", B2t, ["paragraph", "reference", "blockquote"]], + ["reference", z2t], + ["html_block", rbt, ["paragraph", "reference", "blockquote"]], + ["heading", nbt, ["paragraph", "reference", "blockquote"]], + ["lheading", ibt], + ["paragraph", sbt] +]; +function o6() { + this.ruler = new obt(); + for (var t = 0; t < cS.length; t++) + this.ruler.push(cS[t][0], cS[t][1], { alt: (cS[t][2] || []).slice() }); } -function WIe(t, e, r) { - e !== null && typeof e == "object" && typeof r > "u" && (r = e, e = null); - var n = Zue(t, r); - if (typeof e != "function") - return n; - for (var i = 0, s = n.length; i < s; i += 1) - e(n[i]); +o6.prototype.tokenize = function(t, e, r) { + for (var n, i, s = this.ruler.getRules(""), a = s.length, o = e, l = !1, u = t.md.options.maxNesting; o < r && (t.line = o = t.skipEmptyLines(o), !(o >= r || t.sCount[o] < t.blkIndent)); ) { + if (t.level >= u) { + t.line = r; + break; + } + for (i = 0; i < a && (n = s[i](t, o, r, !1), !n); i++) + ; + t.tight = !l, t.isEmpty(t.line - 1) && (l = !0), o = t.line, o < r && t.isEmpty(o) && (l = !0, o++, t.line = o); + } +}; +o6.prototype.parse = function(t, e, r, n) { + var i; + !t || (i = new this.State(t, e, r, n), this.tokenize(i, i.line, i.lineMax)); +}; +o6.prototype.State = abt; +var lbt = o6; +function cbt(t) { + switch (t) { + case 10: + case 33: + case 35: + case 36: + case 37: + case 38: + case 42: + case 43: + case 45: + case 58: + case 60: + case 61: + case 62: + case 64: + case 91: + case 92: + case 93: + case 94: + case 95: + case 96: + case 123: + case 125: + case 126: + return !0; + default: + return !1; + } } -function YIe(t, e) { - var r = Zue(t, e); - if (r.length !== 0) { - if (r.length === 1) - return r[0]; - throw new so("expected a single document in the stream, but found more"); - } -} -var GIe = WIe, HIe = YIe, Kue = { - loadAll: GIe, - load: HIe -}, Jue = Object.prototype.toString, ehe = Object.prototype.hasOwnProperty, nF = 65279, XIe = 9, yw = 10, jIe = 13, ZIe = 32, KIe = 33, JIe = 34, j9 = 35, e$e = 37, t$e = 38, r$e = 39, n$e = 42, the = 44, i$e = 45, JT = 58, s$e = 61, a$e = 62, o$e = 63, l$e = 64, rhe = 91, nhe = 93, c$e = 96, ihe = 123, u$e = 124, she = 125, Wa = {}; -Wa[0] = "\\0"; -Wa[7] = "\\a"; -Wa[8] = "\\b"; -Wa[9] = "\\t"; -Wa[10] = "\\n"; -Wa[11] = "\\v"; -Wa[12] = "\\f"; -Wa[13] = "\\r"; -Wa[27] = "\\e"; -Wa[34] = '\\"'; -Wa[92] = "\\\\"; -Wa[133] = "\\N"; -Wa[160] = "\\_"; -Wa[8232] = "\\L"; -Wa[8233] = "\\P"; -var h$e = [ - "y", - "Y", - "yes", - "Yes", - "YES", - "on", - "On", - "ON", - "n", - "N", - "no", - "No", - "NO", - "off", - "Off", - "OFF" -], f$e = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; -function d$e(t, e) { - var r, n, i, s, a, o, l; - if (e === null) - return {}; - for (r = {}, n = Object.keys(e), i = 0, s = n.length; i < s; i += 1) - a = n[i], o = String(e[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), l = t.compiledTypeMap.fallback[a], l && ehe.call(l.styleAliases, o) && (o = l.styleAliases[o]), r[a] = o; - return r; +var ubt = function(e, r) { + for (var n = e.pos; n < e.posMax && !cbt(e.src.charCodeAt(n)); ) + n++; + return n === e.pos ? !1 : (r || (e.pending += e.src.slice(e.pos, n)), e.pos = n, !0); +}, hbt = mn.isSpace, fbt = function(e, r) { + var n, i, s, a = e.pos; + if (e.src.charCodeAt(a) !== 10) + return !1; + if (n = e.pending.length - 1, i = e.posMax, !r) + if (n >= 0 && e.pending.charCodeAt(n) === 32) + if (n >= 1 && e.pending.charCodeAt(n - 1) === 32) { + for (s = n - 1; s >= 1 && e.pending.charCodeAt(s - 1) === 32; ) + s--; + e.pending = e.pending.slice(0, s), e.push("hardbreak", "br", 0); + } else + e.pending = e.pending.slice(0, -1), e.push("softbreak", "br", 0); + else + e.push("softbreak", "br", 0); + for (a++; a < i && hbt(e.src.charCodeAt(a)); ) + a++; + return e.pos = a, !0; +}, dbt = mn.isSpace, ZB = []; +for (var lH = 0; lH < 256; lH++) + ZB.push(0); +"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t) { + ZB[t.charCodeAt(0)] = 1; +}); +var pbt = function(e, r) { + var n, i = e.pos, s = e.posMax; + if (e.src.charCodeAt(i) !== 92) + return !1; + if (i++, i < s) { + if (n = e.src.charCodeAt(i), n < 256 && ZB[n] !== 0) + return r || (e.pending += e.src[i]), e.pos += 2, !0; + if (n === 10) { + for (r || e.push("hardbreak", "br", 0), i++; i < s && (n = e.src.charCodeAt(i), !!dbt(n)); ) + i++; + return e.pos = i, !0; + } + } + return r || (e.pending += "\\"), e.pos++, !0; +}, gbt = function(e, r) { + var n, i, s, a, o, l, u, h, f = e.pos, d = e.src.charCodeAt(f); + if (d !== 96) + return !1; + for (n = f, f++, i = e.posMax; f < i && e.src.charCodeAt(f) === 96; ) + f++; + if (s = e.src.slice(n, f), u = s.length, e.backticksScanned && (e.backticks[u] || 0) <= n) + return r || (e.pending += s), e.pos += u, !0; + for (o = l = f; (o = e.src.indexOf("`", l)) !== -1; ) { + for (l = o + 1; l < i && e.src.charCodeAt(l) === 96; ) + l++; + if (h = l - o, h === u) + return r || (a = e.push("code_inline", "code", 0), a.markup = s, a.content = e.src.slice(f, o).replace(/\n/g, " ").replace(/^ (.+) $/, "$1")), e.pos = l, !0; + e.backticks[h] = o; + } + return e.backticksScanned = !0, r || (e.pending += s), e.pos += u, !0; +}, l6 = {}; +l6.tokenize = function(e, r) { + var n, i, s, a, o, l = e.pos, u = e.src.charCodeAt(l); + if (r || u !== 126 || (i = e.scanDelims(e.pos, !0), a = i.length, o = String.fromCharCode(u), a < 2)) + return !1; + for (a % 2 && (s = e.push("text", "", 0), s.content = o, a--), n = 0; n < a; n += 2) + s = e.push("text", "", 0), s.content = o + o, e.delimiters.push({ + marker: u, + length: 0, + token: e.tokens.length - 1, + end: -1, + open: i.can_open, + close: i.can_close + }); + return e.pos += i.length, !0; +}; +function cH(t, e) { + var r, n, i, s, a, o = [], l = e.length; + for (r = 0; r < l; r++) + i = e[r], i.marker === 126 && i.end !== -1 && (s = e[i.end], a = t.tokens[i.token], a.type = "s_open", a.tag = "s", a.nesting = 1, a.markup = "~~", a.content = "", a = t.tokens[s.token], a.type = "s_close", a.tag = "s", a.nesting = -1, a.markup = "~~", a.content = "", t.tokens[s.token - 1].type === "text" && t.tokens[s.token - 1].content === "~" && o.push(s.token - 1)); + for (; o.length; ) { + for (r = o.pop(), n = r + 1; n < t.tokens.length && t.tokens[n].type === "s_close"; ) + n++; + n--, r !== n && (a = t.tokens[n], t.tokens[n] = t.tokens[r], t.tokens[r] = a); + } } -function p$e(t) { - var e, r, n; - if (e = t.toString(16).toUpperCase(), t <= 255) - r = "x", n = 2; - else if (t <= 65535) - r = "u", n = 4; - else if (t <= 4294967295) - r = "U", n = 8; - else - throw new so("code point within a string may not be greater than 0xFFFFFFFF"); - return "\\" + r + ds.repeat("0", n - e.length) + e; +l6.postProcess = function(e) { + var r, n = e.tokens_meta, i = e.tokens_meta.length; + for (cH(e, e.delimiters), r = 0; r < i; r++) + n[r] && n[r].delimiters && cH(e, n[r].delimiters); +}; +var c6 = {}; +c6.tokenize = function(e, r) { + var n, i, s, a = e.pos, o = e.src.charCodeAt(a); + if (r || o !== 95 && o !== 42) + return !1; + for (i = e.scanDelims(e.pos, o === 42), n = 0; n < i.length; n++) + s = e.push("text", "", 0), s.content = String.fromCharCode(o), e.delimiters.push({ + marker: o, + length: i.length, + token: e.tokens.length - 1, + end: -1, + open: i.can_open, + close: i.can_close + }); + return e.pos += i.length, !0; +}; +function uH(t, e) { + var r, n, i, s, a, o, l = e.length; + for (r = l - 1; r >= 0; r--) + n = e[r], !(n.marker !== 95 && n.marker !== 42) && n.end !== -1 && (i = e[n.end], o = r > 0 && e[r - 1].end === n.end + 1 && e[r - 1].marker === n.marker && e[r - 1].token === n.token - 1 && e[n.end + 1].token === i.token + 1, a = String.fromCharCode(n.marker), s = t.tokens[n.token], s.type = o ? "strong_open" : "em_open", s.tag = o ? "strong" : "em", s.nesting = 1, s.markup = o ? a + a : a, s.content = "", s = t.tokens[i.token], s.type = o ? "strong_close" : "em_close", s.tag = o ? "strong" : "em", s.nesting = -1, s.markup = o ? a + a : a, s.content = "", o && (t.tokens[e[r - 1].token].content = "", t.tokens[e[n.end + 1].token].content = "", r--)); +} +c6.postProcess = function(e) { + var r, n = e.tokens_meta, i = e.tokens_meta.length; + for (uH(e, e.delimiters), r = 0; r < i; r++) + n[r] && n[r].delimiters && uH(e, n[r].delimiters); +}; +var mbt = mn.normalizeReference, M8 = mn.isSpace, vbt = function(e, r) { + var n, i, s, a, o, l, u, h, f, d = "", p = "", g = e.pos, m = e.posMax, v = e.pos, y = !0; + if (e.src.charCodeAt(e.pos) !== 91 || (o = e.pos + 1, a = e.md.helpers.parseLinkLabel(e, e.pos, !0), a < 0)) + return !1; + if (l = a + 1, l < m && e.src.charCodeAt(l) === 40) { + for (y = !1, l++; l < m && (i = e.src.charCodeAt(l), !(!M8(i) && i !== 10)); l++) + ; + if (l >= m) + return !1; + if (v = l, u = e.md.helpers.parseLinkDestination(e.src, l, e.posMax), u.ok) { + for (d = e.md.normalizeLink(u.str), e.md.validateLink(d) ? l = u.pos : d = "", v = l; l < m && (i = e.src.charCodeAt(l), !(!M8(i) && i !== 10)); l++) + ; + if (u = e.md.helpers.parseLinkTitle(e.src, l, e.posMax), l < m && v !== l && u.ok) + for (p = u.str, l = u.pos; l < m && (i = e.src.charCodeAt(l), !(!M8(i) && i !== 10)); l++) + ; + } + (l >= m || e.src.charCodeAt(l) !== 41) && (y = !0), l++; + } + if (y) { + if (typeof e.env.references > "u") + return !1; + if (l < m && e.src.charCodeAt(l) === 91 ? (v = l + 1, l = e.md.helpers.parseLinkLabel(e, l), l >= 0 ? s = e.src.slice(v, l++) : l = a + 1) : l = a + 1, s || (s = e.src.slice(o, a)), h = e.env.references[mbt(s)], !h) + return e.pos = g, !1; + d = h.href, p = h.title; + } + return r || (e.pos = o, e.posMax = a, f = e.push("link_open", "a", 1), f.attrs = n = [["href", d]], p && n.push(["title", p]), e.md.inline.tokenize(e), f = e.push("link_close", "a", -1)), e.pos = l, e.posMax = m, !0; +}, ybt = mn.normalizeReference, D8 = mn.isSpace, bbt = function(e, r) { + var n, i, s, a, o, l, u, h, f, d, p, g, m, v = "", y = e.pos, b = e.posMax; + if (e.src.charCodeAt(e.pos) !== 33 || e.src.charCodeAt(e.pos + 1) !== 91 || (l = e.pos + 2, o = e.md.helpers.parseLinkLabel(e, e.pos + 1, !1), o < 0)) + return !1; + if (u = o + 1, u < b && e.src.charCodeAt(u) === 40) { + for (u++; u < b && (i = e.src.charCodeAt(u), !(!D8(i) && i !== 10)); u++) + ; + if (u >= b) + return !1; + for (m = u, f = e.md.helpers.parseLinkDestination(e.src, u, e.posMax), f.ok && (v = e.md.normalizeLink(f.str), e.md.validateLink(v) ? u = f.pos : v = ""), m = u; u < b && (i = e.src.charCodeAt(u), !(!D8(i) && i !== 10)); u++) + ; + if (f = e.md.helpers.parseLinkTitle(e.src, u, e.posMax), u < b && m !== u && f.ok) + for (d = f.str, u = f.pos; u < b && (i = e.src.charCodeAt(u), !(!D8(i) && i !== 10)); u++) + ; + else + d = ""; + if (u >= b || e.src.charCodeAt(u) !== 41) + return e.pos = y, !1; + u++; + } else { + if (typeof e.env.references > "u") + return !1; + if (u < b && e.src.charCodeAt(u) === 91 ? (m = u + 1, u = e.md.helpers.parseLinkLabel(e, u), u >= 0 ? a = e.src.slice(m, u++) : u = o + 1) : u = o + 1, a || (a = e.src.slice(l, o)), h = e.env.references[ybt(a)], !h) + return e.pos = y, !1; + v = h.href, d = h.title; + } + return r || (s = e.src.slice(l, o), e.md.inline.parse( + s, + e.md, + e.env, + g = [] + ), p = e.push("image", "img", 0), p.attrs = n = [["src", v], ["alt", ""]], p.children = g, p.content = s, d && n.push(["title", d])), e.pos = u, e.posMax = b, !0; +}, xbt = /^([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])?)*)$/, wbt = /^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/, Obt = function(e, r) { + var n, i, s, a, o, l, u = e.pos; + if (e.src.charCodeAt(u) !== 60) + return !1; + for (o = e.pos, l = e.posMax; ; ) { + if (++u >= l || (a = e.src.charCodeAt(u), a === 60)) + return !1; + if (a === 62) + break; + } + return n = e.src.slice(o + 1, u), wbt.test(n) ? (i = e.md.normalizeLink(n), e.md.validateLink(i) ? (r || (s = e.push("link_open", "a", 1), s.attrs = [["href", i]], s.markup = "autolink", s.info = "auto", s = e.push("text", "", 0), s.content = e.md.normalizeLinkText(n), s = e.push("link_close", "a", -1), s.markup = "autolink", s.info = "auto"), e.pos += n.length + 2, !0) : !1) : xbt.test(n) ? (i = e.md.normalizeLink("mailto:" + n), e.md.validateLink(i) ? (r || (s = e.push("link_open", "a", 1), s.attrs = [["href", i]], s.markup = "autolink", s.info = "auto", s = e.push("text", "", 0), s.content = e.md.normalizeLinkText(n), s = e.push("link_close", "a", -1), s.markup = "autolink", s.info = "auto"), e.pos += n.length + 2, !0) : !1) : !1; +}, kbt = s6.HTML_TAG_RE; +function Sbt(t) { + var e = t | 32; + return e >= 97 && e <= 122; } -var g$e = 1, bw = 2; -function m$e(t) { - this.schema = t.schema || eF, this.indent = Math.max(1, t.indent || 2), this.noArrayIndent = t.noArrayIndent || !1, this.skipInvalid = t.skipInvalid || !1, this.flowLevel = ds.isNothing(t.flowLevel) ? -1 : t.flowLevel, this.styleMap = d$e(this.schema, t.styles || null), this.sortKeys = t.sortKeys || !1, this.lineWidth = t.lineWidth || 80, this.noRefs = t.noRefs || !1, this.noCompatMode = t.noCompatMode || !1, this.condenseFlow = t.condenseFlow || !1, this.quotingType = t.quotingType === '"' ? bw : g$e, this.forceQuotes = t.forceQuotes || !1, this.replacer = typeof t.replacer == "function" ? t.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null; +var Tbt = function(e, r) { + var n, i, s, a, o = e.pos; + return !e.md.options.html || (s = e.posMax, e.src.charCodeAt(o) !== 60 || o + 2 >= s) || (n = e.src.charCodeAt(o + 1), n !== 33 && n !== 63 && n !== 47 && !Sbt(n)) || (i = e.src.slice(o).match(kbt), !i) ? !1 : (r || (a = e.push("html_inline", "", 0), a.content = e.src.slice(o, o + i[0].length)), e.pos += i[0].length, !0); +}, hH = WB.exports, Cbt = mn.has, Ebt = mn.isValidEntityCode, fH = mn.fromCodePoint, _bt = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, Abt = /^&([a-z][a-z0-9]{1,31});/i, Rbt = function(e, r) { + var n, i, s, a = e.pos, o = e.posMax; + if (e.src.charCodeAt(a) !== 38) + return !1; + if (a + 1 < o) { + if (n = e.src.charCodeAt(a + 1), n === 35) { + if (s = e.src.slice(a).match(_bt), s) + return r || (i = s[1][0].toLowerCase() === "x" ? parseInt(s[1].slice(1), 16) : parseInt(s[1], 10), e.pending += Ebt(i) ? fH(i) : fH(65533)), e.pos += s[0].length, !0; + } else if (s = e.src.slice(a).match(Abt), s && Cbt(hH, s[1])) + return r || (e.pending += hH[s[1]]), e.pos += s[0].length, !0; + } + return r || (e.pending += "&"), e.pos++, !0; +}; +function dH(t, e) { + var r, n, i, s, a, o, l, u, h = {}, f = e.length; + if (!!f) { + var d = 0, p = -2, g = []; + for (r = 0; r < f; r++) + if (i = e[r], g.push(0), (e[d].marker !== i.marker || p !== i.token - 1) && (d = r), p = i.token, i.length = i.length || 0, !!i.close) { + for (h.hasOwnProperty(i.marker) || (h[i.marker] = [-1, -1, -1, -1, -1, -1]), a = h[i.marker][(i.open ? 3 : 0) + i.length % 3], n = d - g[d] - 1, o = n; n > a; n -= g[n] + 1) + if (s = e[n], s.marker === i.marker && s.open && s.end < 0 && (l = !1, (s.close || i.open) && (s.length + i.length) % 3 === 0 && (s.length % 3 !== 0 || i.length % 3 !== 0) && (l = !0), !l)) { + u = n > 0 && !e[n - 1].open ? g[n - 1] + 1 : 0, g[r] = r - n + u, g[n] = u, i.open = !1, s.end = r, s.close = !1, o = -1, p = -2; + break; + } + o !== -1 && (h[i.marker][(i.open ? 3 : 0) + (i.length || 0) % 3] = o); + } + } } -function YG(t, e) { - for (var r = ds.repeat(" ", e), n = 0, i = -1, s = "", a, o = t.length; n < o; ) - i = t.indexOf(` -`, n), i === -1 ? (a = t.slice(n), n = o) : (a = t.slice(n, i + 1), n = i + 1), a.length && a !== ` -` && (s += r), s += a; - return s; +var Lbt = function(e) { + var r, n = e.tokens_meta, i = e.tokens_meta.length; + for (dH(e, e.delimiters), r = 0; r < i; r++) + n[r] && n[r].delimiters && dH(e, n[r].delimiters); +}, Mbt = function(e) { + var r, n, i = 0, s = e.tokens, a = e.tokens.length; + for (r = n = 0; r < a; r++) + s[r].nesting < 0 && i--, s[r].level = i, s[r].nesting > 0 && i++, s[r].type === "text" && r + 1 < a && s[r + 1].type === "text" ? s[r + 1].content = s[r].content + s[r + 1].content : (r !== n && (s[n] = s[r]), n++); + r !== n && (s.length = n); +}, jB = HB, pH = mn.isWhiteSpace, gH = mn.isPunctChar, mH = mn.isMdAsciiPunct; +function Sk(t, e, r, n) { + this.src = t, this.env = r, this.md = e, this.tokens = n, this.tokens_meta = Array(n.length), this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = [], this._prev_delimiters = [], this.backticks = {}, this.backticksScanned = !1; } -function Z9(t, e) { - return ` -` + ds.repeat(" ", t.indent * e); +Sk.prototype.pushPending = function() { + var t = new jB("text", "", 0); + return t.content = this.pending, t.level = this.pendingLevel, this.tokens.push(t), this.pending = "", t; +}; +Sk.prototype.push = function(t, e, r) { + this.pending && this.pushPending(); + var n = new jB(t, e, r), i = null; + return r < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), n.level = this.level, r > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], i = { delimiters: this.delimiters }), this.pendingLevel = this.level, this.tokens.push(n), this.tokens_meta.push(i), n; +}; +Sk.prototype.scanDelims = function(t, e) { + var r = t, n, i, s, a, o, l, u, h, f, d = !0, p = !0, g = this.posMax, m = this.src.charCodeAt(t); + for (n = t > 0 ? this.src.charCodeAt(t - 1) : 32; r < g && this.src.charCodeAt(r) === m; ) + r++; + return s = r - t, i = r < g ? this.src.charCodeAt(r) : 32, u = mH(n) || gH(String.fromCharCode(n)), f = mH(i) || gH(String.fromCharCode(i)), l = pH(n), h = pH(i), h ? d = !1 : f && (l || u || (d = !1)), l ? p = !1 : u && (h || f || (p = !1)), e ? (a = d, o = p) : (a = d && (!p || u), o = p && (!d || f)), { + can_open: a, + can_close: o, + length: s + }; +}; +Sk.prototype.Token = jB; +var Dbt = Sk, vH = GB, P8 = [ + ["text", ubt], + ["newline", fbt], + ["escape", pbt], + ["backticks", gbt], + ["strikethrough", l6.tokenize], + ["emphasis", c6.tokenize], + ["link", vbt], + ["image", bbt], + ["autolink", Obt], + ["html_inline", Tbt], + ["entity", Rbt] +], N8 = [ + ["balance_pairs", Lbt], + ["strikethrough", l6.postProcess], + ["emphasis", c6.postProcess], + ["text_collapse", Mbt] +]; +function Tk() { + var t; + for (this.ruler = new vH(), t = 0; t < P8.length; t++) + this.ruler.push(P8[t][0], P8[t][1]); + for (this.ruler2 = new vH(), t = 0; t < N8.length; t++) + this.ruler2.push(N8[t][0], N8[t][1]); } -function v$e(t, e) { - var r, n, i; - for (r = 0, n = t.implicitTypes.length; r < n; r += 1) - if (i = t.implicitTypes[r], i.resolve(e)) - return !0; - return !1; +Tk.prototype.skipToken = function(t) { + var e, r, n = t.pos, i = this.ruler.getRules(""), s = i.length, a = t.md.options.maxNesting, o = t.cache; + if (typeof o[n] < "u") { + t.pos = o[n]; + return; + } + if (t.level < a) + for (r = 0; r < s && (t.level++, e = i[r](t, !0), t.level--, !e); r++) + ; + else + t.pos = t.posMax; + e || t.pos++, o[n] = t.pos; +}; +Tk.prototype.tokenize = function(t) { + for (var e, r, n = this.ruler.getRules(""), i = n.length, s = t.posMax, a = t.md.options.maxNesting; t.pos < s; ) { + if (t.level < a) + for (r = 0; r < i && (e = n[r](t, !1), !e); r++) + ; + if (e) { + if (t.pos >= s) + break; + continue; + } + t.pending += t.src[t.pos++]; + } + t.pending && t.pushPending(); +}; +Tk.prototype.parse = function(t, e, r, n) { + var i, s, a, o = new this.State(t, e, r, n); + for (this.tokenize(o), s = this.ruler2.getRules(""), a = s.length, i = 0; i < a; i++) + s[i](o); +}; +Tk.prototype.State = Dbt; +var Pbt = Tk, I8, yH; +function Nbt() { + return yH || (yH = 1, I8 = function(t) { + var e = {}; + e.src_Any = xue().source, e.src_Cc = wue().source, e.src_Z = Oue().source, e.src_P = YB.source, e.src_ZPCc = [e.src_Z, e.src_P, e.src_Cc].join("|"), e.src_ZCc = [e.src_Z, e.src_Cc].join("|"); + var r = "[><\uFF5C]"; + return e.src_pseudo_letter = "(?:(?!" + r + "|" + e.src_ZPCc + ")" + e.src_Any + ")", e.src_ip4 = "(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)", e.src_auth = "(?:(?:(?!" + e.src_ZCc + "|[@/\\[\\]()]).)+@)?", e.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?", e.src_host_terminator = "(?=$|" + r + "|" + e.src_ZPCc + ")(?!-|_|:\\d|\\.-|\\.(?!$|" + e.src_ZPCc + "))", e.src_path = "(?:[/?#](?:(?!" + e.src_ZCc + "|" + r + `|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!` + e.src_ZCc + "|\\]).)*\\]|\\((?:(?!" + e.src_ZCc + "|[)]).)*\\)|\\{(?:(?!" + e.src_ZCc + '|[}]).)*\\}|\\"(?:(?!' + e.src_ZCc + `|["]).)+\\"|\\'(?:(?!` + e.src_ZCc + "|[']).)+\\'|\\'(?=" + e.src_pseudo_letter + "|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!" + e.src_ZCc + "|[.]).|" + (t && t["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") + ",(?!" + e.src_ZCc + ").|;(?!" + e.src_ZCc + ").|\\!+(?!" + e.src_ZCc + "|[!]).|\\?(?!" + e.src_ZCc + "|[?]).)+|\\/)?", e.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*', e.src_xn = "xn--[a-z0-9\\-]{1,59}", e.src_domain_root = "(?:" + e.src_xn + "|" + e.src_pseudo_letter + "{1,63})", e.src_domain = "(?:" + e.src_xn + "|(?:" + e.src_pseudo_letter + ")|(?:" + e.src_pseudo_letter + "(?:-|" + e.src_pseudo_letter + "){0,61}" + e.src_pseudo_letter + "))", e.src_host = "(?:(?:(?:(?:" + e.src_domain + ")\\.)*" + e.src_domain + "))", e.tpl_host_fuzzy = "(?:" + e.src_ip4 + "|(?:(?:(?:" + e.src_domain + ")\\.)+(?:%TLDS%)))", e.tpl_host_no_ip_fuzzy = "(?:(?:(?:" + e.src_domain + ")\\.)+(?:%TLDS%))", e.src_host_strict = e.src_host + e.src_host_terminator, e.tpl_host_fuzzy_strict = e.tpl_host_fuzzy + e.src_host_terminator, e.src_host_port_strict = e.src_host + e.src_port + e.src_host_terminator, e.tpl_host_port_fuzzy_strict = e.tpl_host_fuzzy + e.src_port + e.src_host_terminator, e.tpl_host_port_no_ip_fuzzy_strict = e.tpl_host_no_ip_fuzzy + e.src_port + e.src_host_terminator, e.tpl_host_fuzzy_test = "localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:" + e.src_ZPCc + "|>|$))", e.tpl_email_fuzzy = "(^|" + r + '|"|\\(|' + e.src_ZCc + ")(" + e.src_email_name + "@" + e.tpl_host_fuzzy_strict + ")", e.tpl_link_fuzzy = "(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|" + e.src_ZPCc + "))((?![$+<=>^`|\uFF5C])" + e.tpl_host_port_fuzzy_strict + e.src_path + ")", e.tpl_link_no_ip_fuzzy = "(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|" + e.src_ZPCc + "))((?![$+<=>^`|\uFF5C])" + e.tpl_host_port_no_ip_fuzzy_strict + e.src_path + ")", e; + }), I8; } -function eC(t) { - return t === ZIe || t === XIe; +function D9(t) { + var e = Array.prototype.slice.call(arguments, 1); + return e.forEach(function(r) { + !r || Object.keys(r).forEach(function(n) { + t[n] = r[n]; + }); + }), t; } -function xw(t) { - return 32 <= t && t <= 126 || 161 <= t && t <= 55295 && t !== 8232 && t !== 8233 || 57344 <= t && t <= 65533 && t !== nF || 65536 <= t && t <= 1114111; +function u6(t) { + return Object.prototype.toString.call(t); } -function GG(t) { - return xw(t) && t !== nF && t !== jIe && t !== yw; +function Ibt(t) { + return u6(t) === "[object String]"; } -function HG(t, e, r) { - var n = GG(t), i = n && !eC(t); - return (r ? n : n && t !== the && t !== rhe && t !== nhe && t !== ihe && t !== she) && t !== j9 && !(e === JT && !i) || GG(e) && !eC(e) && t === j9 || e === JT && i; +function $bt(t) { + return u6(t) === "[object Object]"; } -function y$e(t) { - return xw(t) && t !== nF && !eC(t) && t !== i$e && t !== o$e && t !== JT && t !== the && t !== rhe && t !== nhe && t !== ihe && t !== she && t !== j9 && t !== t$e && t !== n$e && t !== KIe && t !== u$e && t !== s$e && t !== a$e && t !== r$e && t !== JIe && t !== e$e && t !== l$e && t !== c$e; +function Bbt(t) { + return u6(t) === "[object RegExp]"; } -function b$e(t) { - return !eC(t) && t !== JT; +function bH(t) { + return u6(t) === "[object Function]"; } -function Lb(t, e) { - var r = t.charCodeAt(e), n; - return r >= 55296 && r <= 56319 && e + 1 < t.length && (n = t.charCodeAt(e + 1), n >= 56320 && n <= 57343) ? (r - 55296) * 1024 + n - 56320 + 65536 : r; +function Fbt(t) { + return t.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&"); } -function ahe(t) { - var e = /^\n* /; - return e.test(t); +var Aue = { + fuzzyLink: !0, + fuzzyEmail: !0, + fuzzyIP: !1 +}; +function zbt(t) { + return Object.keys(t || {}).reduce(function(e, r) { + return e || Aue.hasOwnProperty(r); + }, !1); } -var ohe = 1, K9 = 2, lhe = 3, che = 4, a1 = 5; -function x$e(t, e, r, n, i, s, a, o) { - var l, u = 0, h = null, f = !1, d = !1, p = n !== -1, g = -1, m = y$e(Lb(t, 0)) && b$e(Lb(t, t.length - 1)); - if (e || a) - for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) { - if (u = Lb(t, l), !xw(u)) - return a1; - m = m && HG(u, h, o), h = u; - } - else { - for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) { - if (u = Lb(t, l), u === yw) - f = !0, p && (d = d || l - g - 1 > n && t[g + 1] !== " ", g = l); - else if (!xw(u)) - return a1; - m = m && HG(u, h, o), h = u; +var qbt = { + "http:": { + validate: function(t, e, r) { + var n = t.slice(e); + return r.re.http || (r.re.http = new RegExp( + "^\\/\\/" + r.re.src_auth + r.re.src_host_port_strict + r.re.src_path, + "i" + )), r.re.http.test(n) ? n.match(r.re.http)[0].length : 0; } - d = d || p && l - g - 1 > n && t[g + 1] !== " "; - } - return !f && !d ? m && !a && !i(t) ? ohe : s === bw ? a1 : K9 : r > 9 && ahe(t) ? a1 : a ? s === bw ? a1 : K9 : d ? che : lhe; -} -function w$e(t, e, r, n, i) { - t.dump = function() { - if (e.length === 0) - return t.quotingType === bw ? '""' : "''"; - if (!t.noCompatMode && (h$e.indexOf(e) !== -1 || f$e.test(e))) - return t.quotingType === bw ? '"' + e + '"' : "'" + e + "'"; - var s = t.indent * Math.max(1, r), a = t.lineWidth === -1 ? -1 : Math.max(Math.min(t.lineWidth, 40), t.lineWidth - s), o = n || t.flowLevel > -1 && r >= t.flowLevel; - function l(u) { - return v$e(t, u); + }, + "https:": "http:", + "ftp:": "http:", + "//": { + validate: function(t, e, r) { + var n = t.slice(e); + return r.re.no_http || (r.re.no_http = new RegExp( + "^" + r.re.src_auth + "(?:localhost|(?:(?:" + r.re.src_domain + ")\\.)+" + r.re.src_domain_root + ")" + r.re.src_port + r.re.src_host_terminator + r.re.src_path, + "i" + )), r.re.no_http.test(n) ? e >= 3 && t[e - 3] === ":" || e >= 3 && t[e - 3] === "/" ? 0 : n.match(r.re.no_http)[0].length : 0; } - switch (x$e( - e, - o, - t.indent, - a, - l, - t.quotingType, - t.forceQuotes && !n, - i - )) { - case ohe: - return e; - case K9: - return "'" + e.replace(/'/g, "''") + "'"; - case lhe: - return "|" + XG(e, t.indent) + jG(YG(e, s)); - case che: - return ">" + XG(e, t.indent) + jG(YG(O$e(e, a), s)); - case a1: - return '"' + k$e(e) + '"'; - default: - throw new so("impossible error: invalid scalar style"); + }, + "mailto:": { + validate: function(t, e, r) { + var n = t.slice(e); + return r.re.mailto || (r.re.mailto = new RegExp( + "^" + r.re.src_email_name + "@" + r.re.src_host_strict, + "i" + )), r.re.mailto.test(n) ? n.match(r.re.mailto)[0].length : 0; } - }(); + } +}, Ubt = "a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]", Qbt = "biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|"); +function Vbt(t) { + t.__index__ = -1, t.__text_cache__ = ""; } -function XG(t, e) { - var r = ahe(t) ? String(e) : "", n = t[t.length - 1] === ` -`, i = n && (t[t.length - 2] === ` -` || t === ` -`), s = i ? "+" : n ? "" : "-"; - return r + s + ` -`; +function Wbt(t) { + return function(e, r) { + var n = e.slice(r); + return t.test(n) ? n.match(t)[0].length : 0; + }; } -function jG(t) { - return t[t.length - 1] === ` -` ? t.slice(0, -1) : t; +function xH() { + return function(t, e) { + e.normalize(t); + }; } -function O$e(t, e) { - for (var r = /(\n+)([^\n]*)/g, n = function() { - var u = t.indexOf(` -`); - return u = u !== -1 ? u : t.length, r.lastIndex = u, ZG(t.slice(0, u), e); - }(), i = t[0] === ` -` || t[0] === " ", s, a; a = r.exec(t); ) { - var o = a[1], l = a[2]; - s = l[0] === " ", n += o + (!i && !s && l !== "" ? ` -` : "") + ZG(l, e), i = s; +function IT(t) { + var e = t.re = Nbt()(t.__opts__), r = t.__tlds__.slice(); + t.onCompile(), t.__tlds_replaced__ || r.push(Ubt), r.push(e.src_xn), e.src_tlds = r.join("|"); + function n(o) { + return o.replace("%TLDS%", e.src_tlds); } - return n; + e.email_fuzzy = RegExp(n(e.tpl_email_fuzzy), "i"), e.link_fuzzy = RegExp(n(e.tpl_link_fuzzy), "i"), e.link_no_ip_fuzzy = RegExp(n(e.tpl_link_no_ip_fuzzy), "i"), e.host_fuzzy_test = RegExp(n(e.tpl_host_fuzzy_test), "i"); + var i = []; + t.__compiled__ = {}; + function s(o, l) { + throw new Error('(LinkifyIt) Invalid schema "' + o + '": ' + l); + } + Object.keys(t.__schemas__).forEach(function(o) { + var l = t.__schemas__[o]; + if (l !== null) { + var u = { validate: null, link: null }; + if (t.__compiled__[o] = u, $bt(l)) { + Bbt(l.validate) ? u.validate = Wbt(l.validate) : bH(l.validate) ? u.validate = l.validate : s(o, l), bH(l.normalize) ? u.normalize = l.normalize : l.normalize ? s(o, l) : u.normalize = xH(); + return; + } + if (Ibt(l)) { + i.push(o); + return; + } + s(o, l); + } + }), i.forEach(function(o) { + !t.__compiled__[t.__schemas__[o]] || (t.__compiled__[o].validate = t.__compiled__[t.__schemas__[o]].validate, t.__compiled__[o].normalize = t.__compiled__[t.__schemas__[o]].normalize); + }), t.__compiled__[""] = { validate: null, normalize: xH() }; + var a = Object.keys(t.__compiled__).filter(function(o) { + return o.length > 0 && t.__compiled__[o]; + }).map(Fbt).join("|"); + t.re.schema_test = RegExp("(^|(?!_)(?:[><\uFF5C]|" + e.src_ZPCc + "))(" + a + ")", "i"), t.re.schema_search = RegExp("(^|(?!_)(?:[><\uFF5C]|" + e.src_ZPCc + "))(" + a + ")", "ig"), t.re.pretest = RegExp( + "(" + t.re.schema_test.source + ")|(" + t.re.host_fuzzy_test.source + ")|@", + "i" + ), Vbt(t); } -function ZG(t, e) { - if (t === "" || t[0] === " ") - return t; - for (var r = / [^ ]/g, n, i = 0, s, a = 0, o = 0, l = ""; n = r.exec(t); ) - o = n.index, o - i > e && (s = a > i ? a : o, l += ` -` + t.slice(i, s), i = s + 1), a = o; - return l += ` -`, t.length - i > e && a > i ? l += t.slice(i, a) + ` -` + t.slice(a + 1) : l += t.slice(i), l.slice(1); +function Ybt(t, e) { + var r = t.__index__, n = t.__last_index__, i = t.__text_cache__.slice(r, n); + this.schema = t.__schema__.toLowerCase(), this.index = r + e, this.lastIndex = n + e, this.raw = i, this.text = i, this.url = i; } -function k$e(t) { - for (var e = "", r = 0, n, i = 0; i < t.length; r >= 65536 ? i += 2 : i++) - r = Lb(t, i), n = Wa[r], !n && xw(r) ? (e += t[i], r >= 65536 && (e += t[i + 1])) : e += n || p$e(r); - return e; +function wH(t, e) { + var r = new Ybt(t, e); + return t.__compiled__[r.schema].normalize(r, t), r; } -function S$e(t, e, r) { - var n = "", i = t.tag, s, a, o; - for (s = 0, a = r.length; s < a; s += 1) - o = r[s], t.replacer && (o = t.replacer.call(r, String(s), o)), (Af(t, e, o, !1, !1) || typeof o > "u" && Af(t, e, null, !1, !1)) && (n !== "" && (n += "," + (t.condenseFlow ? "" : " ")), n += t.dump); - t.tag = i, t.dump = "[" + n + "]"; +function ac(t, e) { + if (!(this instanceof ac)) + return new ac(t, e); + e || zbt(t) && (e = t, t = {}), this.__opts__ = D9({}, Aue, e), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = D9({}, qbt, t), this.__compiled__ = {}, this.__tlds__ = Qbt, this.__tlds_replaced__ = !1, this.re = {}, IT(this); } -function KG(t, e, r, n) { - var i = "", s = t.tag, a, o, l; - for (a = 0, o = r.length; a < o; a += 1) - l = r[a], t.replacer && (l = t.replacer.call(r, String(a), l)), (Af(t, e + 1, l, !0, !0, !1, !0) || typeof l > "u" && Af(t, e + 1, null, !0, !0, !1, !0)) && ((!n || i !== "") && (i += Z9(t, e)), t.dump && yw === t.dump.charCodeAt(0) ? i += "-" : i += "- ", i += t.dump); - t.tag = s, t.dump = i || "[]"; +ac.prototype.add = function(e, r) { + return this.__schemas__[e] = r, IT(this), this; +}; +ac.prototype.set = function(e) { + return this.__opts__ = D9(this.__opts__, e), this; +}; +ac.prototype.test = function(e) { + if (this.__text_cache__ = e, this.__index__ = -1, !e.length) + return !1; + var r, n, i, s, a, o, l, u, h; + if (this.re.schema_test.test(e)) { + for (l = this.re.schema_search, l.lastIndex = 0; (r = l.exec(e)) !== null; ) + if (s = this.testSchemaAt(e, r[2], l.lastIndex), s) { + this.__schema__ = r[2], this.__index__ = r.index + r[1].length, this.__last_index__ = r.index + r[0].length + s; + break; + } + } + return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (u = e.search(this.re.host_fuzzy_test), u >= 0 && (this.__index__ < 0 || u < this.__index__) && (n = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (a = n.index + n[1].length, (this.__index__ < 0 || a < this.__index__) && (this.__schema__ = "", this.__index__ = a, this.__last_index__ = n.index + n[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (h = e.indexOf("@"), h >= 0 && (i = e.match(this.re.email_fuzzy)) !== null && (a = i.index + i[1].length, o = i.index + i[0].length, (this.__index__ < 0 || a < this.__index__ || a === this.__index__ && o > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = a, this.__last_index__ = o))), this.__index__ >= 0; +}; +ac.prototype.pretest = function(e) { + return this.re.pretest.test(e); +}; +ac.prototype.testSchemaAt = function(e, r, n) { + return this.__compiled__[r.toLowerCase()] ? this.__compiled__[r.toLowerCase()].validate(e, n, this) : 0; +}; +ac.prototype.match = function(e) { + var r = 0, n = []; + this.__index__ >= 0 && this.__text_cache__ === e && (n.push(wH(this, r)), r = this.__last_index__); + for (var i = r ? e.slice(r) : e; this.test(i); ) + n.push(wH(this, r)), i = i.slice(this.__last_index__), r += this.__last_index__; + return n.length ? n : null; +}; +ac.prototype.tlds = function(e, r) { + return e = Array.isArray(e) ? e : [e], r ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function(n, i, s) { + return n !== s[i - 1]; + }).reverse(), IT(this), this) : (this.__tlds__ = e.slice(), this.__tlds_replaced__ = !0, IT(this), this); +}; +ac.prototype.normalize = function(e) { + e.schema || (e.url = "http://" + e.url), e.schema === "mailto:" && !/^mailto:/i.test(e.url) && (e.url = "mailto:" + e.url); +}; +ac.prototype.onCompile = function() { +}; +var Gbt = ac; +const P1 = 2147483647, Qu = 36, KB = 1, ow = 26, Hbt = 38, Xbt = 700, Rue = 72, Lue = 128, Mue = "-", Zbt = /^xn--/, jbt = /[^\0-\x7F]/, Kbt = /[\x2E\u3002\uFF0E\uFF61]/g, Jbt = { + overflow: "Overflow: input needs wider integers to process", + "not-basic": "Illegal input >= 0x80 (not a basic code point)", + "invalid-input": "Invalid input" +}, $8 = Qu - KB, Vu = Math.floor, B8 = String.fromCharCode; +function md(t) { + throw new RangeError(Jbt[t]); } -function T$e(t, e, r) { - var n = "", i = t.tag, s = Object.keys(r), a, o, l, u, h; - for (a = 0, o = s.length; a < o; a += 1) - h = "", n !== "" && (h += ", "), t.condenseFlow && (h += '"'), l = s[a], u = r[l], t.replacer && (u = t.replacer.call(r, l, u)), Af(t, e, l, !1, !1) && (t.dump.length > 1024 && (h += "? "), h += t.dump + (t.condenseFlow ? '"' : "") + ":" + (t.condenseFlow ? "" : " "), Af(t, e, u, !1, !1) && (h += t.dump, n += h)); - t.tag = i, t.dump = "{" + n + "}"; +function ext(t, e) { + const r = []; + let n = t.length; + for (; n--; ) + r[n] = e(t[n]); + return r; } -function C$e(t, e, r, n) { - var i = "", s = t.tag, a = Object.keys(r), o, l, u, h, f, d; - if (t.sortKeys === !0) - a.sort(); - else if (typeof t.sortKeys == "function") - a.sort(t.sortKeys); - else if (t.sortKeys) - throw new so("sortKeys must be a boolean or a function"); - for (o = 0, l = a.length; o < l; o += 1) - d = "", (!n || i !== "") && (d += Z9(t, e)), u = a[o], h = r[u], t.replacer && (h = t.replacer.call(r, u, h)), Af(t, e + 1, u, !0, !0, !0) && (f = t.tag !== null && t.tag !== "?" || t.dump && t.dump.length > 1024, f && (t.dump && yw === t.dump.charCodeAt(0) ? d += "?" : d += "? "), d += t.dump, f && (d += Z9(t, e)), Af(t, e + 1, h, !0, f) && (t.dump && yw === t.dump.charCodeAt(0) ? d += ":" : d += ": ", d += t.dump, i += d)); - t.tag = s, t.dump = i || "{}"; +function Due(t, e) { + const r = t.split("@"); + let n = ""; + r.length > 1 && (n = r[0] + "@", t = r[1]), t = t.replace(Kbt, "."); + const i = t.split("."), s = ext(i, e).join("."); + return n + s; } -function JG(t, e, r) { - var n, i, s, a, o, l; - for (i = r ? t.explicitTypes : t.implicitTypes, s = 0, a = i.length; s < a; s += 1) - if (o = i[s], (o.instanceOf || o.predicate) && (!o.instanceOf || typeof e == "object" && e instanceof o.instanceOf) && (!o.predicate || o.predicate(e))) { - if (r ? o.multi && o.representName ? t.tag = o.representName(e) : t.tag = o.tag : t.tag = "?", o.represent) { - if (l = t.styleMap[o.tag] || o.defaultStyle, Jue.call(o.represent) === "[object Function]") - n = o.represent(e, l); - else if (ehe.call(o.represent, l)) - n = o.represent[l](e, l); - else - throw new so("!<" + o.tag + '> tag resolver accepts not "' + l + '" style'); - t.dump = n; +function JB(t) { + const e = []; + let r = 0; + const n = t.length; + for (; r < n; ) { + const i = t.charCodeAt(r++); + if (i >= 55296 && i <= 56319 && r < n) { + const s = t.charCodeAt(r++); + (s & 64512) == 56320 ? e.push(((i & 1023) << 10) + (s & 1023) + 65536) : (e.push(i), r--); + } else + e.push(i); + } + return e; +} +const Pue = (t) => String.fromCodePoint(...t), txt = function(t) { + return t >= 48 && t < 58 ? 26 + (t - 48) : t >= 65 && t < 91 ? t - 65 : t >= 97 && t < 123 ? t - 97 : Qu; +}, OH = function(t, e) { + return t + 22 + 75 * (t < 26) - ((e != 0) << 5); +}, Nue = function(t, e, r) { + let n = 0; + for (t = r ? Vu(t / Xbt) : t >> 1, t += Vu(t / e); t > $8 * ow >> 1; n += Qu) + t = Vu(t / $8); + return Vu(n + ($8 + 1) * t / (t + Hbt)); +}, eF = function(t) { + const e = [], r = t.length; + let n = 0, i = Lue, s = Rue, a = t.lastIndexOf(Mue); + a < 0 && (a = 0); + for (let o = 0; o < a; ++o) + t.charCodeAt(o) >= 128 && md("not-basic"), e.push(t.charCodeAt(o)); + for (let o = a > 0 ? a + 1 : 0; o < r; ) { + const l = n; + for (let h = 1, f = Qu; ; f += Qu) { + o >= r && md("invalid-input"); + const d = txt(t.charCodeAt(o++)); + d >= Qu && md("invalid-input"), d > Vu((P1 - n) / h) && md("overflow"), n += d * h; + const p = f <= s ? KB : f >= s + ow ? ow : f - s; + if (d < p) + break; + const g = Qu - p; + h > Vu(P1 / g) && md("overflow"), h *= g; + } + const u = e.length + 1; + s = Nue(n - l, u, l == 0), Vu(n / u) > P1 - i && md("overflow"), i += Vu(n / u), n %= u, e.splice(n++, 0, i); + } + return String.fromCodePoint(...e); +}, tF = function(t) { + const e = []; + t = JB(t); + const r = t.length; + let n = Lue, i = 0, s = Rue; + for (const l of t) + l < 128 && e.push(B8(l)); + const a = e.length; + let o = a; + for (a && e.push(Mue); o < r; ) { + let l = P1; + for (const h of t) + h >= n && h < l && (l = h); + const u = o + 1; + l - n > Vu((P1 - i) / u) && md("overflow"), i += (l - n) * u, n = l; + for (const h of t) + if (h < n && ++i > P1 && md("overflow"), h === n) { + let f = i; + for (let d = Qu; ; d += Qu) { + const p = d <= s ? KB : d >= s + ow ? ow : d - s; + if (f < p) + break; + const g = f - p, m = Qu - p; + e.push( + B8(OH(p + g % m, 0)) + ), f = Vu(g / m); + } + e.push(B8(OH(f, 0))), s = Nue(i, u, o === a), i = 0, ++o; } - return !0; + ++i, ++n; + } + return e.join(""); +}, Iue = function(t) { + return Due(t, function(e) { + return Zbt.test(e) ? eF(e.slice(4).toLowerCase()) : e; + }); +}, $ue = function(t) { + return Due(t, function(e) { + return jbt.test(e) ? "xn--" + tF(e) : e; + }); +}, rxt = { + version: "2.3.1", + ucs2: { + decode: JB, + encode: Pue + }, + decode: eF, + encode: tF, + toASCII: $ue, + toUnicode: Iue +}, nxt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + ucs2decode: JB, + ucs2encode: Pue, + decode: eF, + encode: tF, + toASCII: $ue, + toUnicode: Iue, + default: rxt +}, Symbol.toStringTag, { value: "Module" })), ixt = /* @__PURE__ */ O_(nxt); +var sxt = { + options: { + html: !1, + xhtmlOut: !1, + breaks: !1, + langPrefix: "language-", + linkify: !1, + typographer: !1, + quotes: "\u201C\u201D\u2018\u2019", + highlight: null, + maxNesting: 100 + }, + components: { + core: {}, + block: {}, + inline: {} + } +}, axt = { + options: { + html: !1, + xhtmlOut: !1, + breaks: !1, + langPrefix: "language-", + linkify: !1, + typographer: !1, + quotes: "\u201C\u201D\u2018\u2019", + highlight: null, + maxNesting: 20 + }, + components: { + core: { + rules: [ + "normalize", + "block", + "inline" + ] + }, + block: { + rules: [ + "paragraph" + ] + }, + inline: { + rules: [ + "text" + ], + rules2: [ + "balance_pairs", + "text_collapse" + ] } - return !1; -} -function Af(t, e, r, n, i, s, a) { - t.tag = null, t.dump = r, JG(t, r, !1) || JG(t, r, !0); - var o = Jue.call(t.dump), l = n, u; - n && (n = t.flowLevel < 0 || t.flowLevel > e); - var h = o === "[object Object]" || o === "[object Array]", f, d; - if (h && (f = t.duplicates.indexOf(r), d = f !== -1), (t.tag !== null && t.tag !== "?" || d || t.indent !== 2 && e > 0) && (i = !1), d && t.usedDuplicates[f]) - t.dump = "*ref_" + f; - else { - if (h && d && !t.usedDuplicates[f] && (t.usedDuplicates[f] = !0), o === "[object Object]") - n && Object.keys(t.dump).length !== 0 ? (C$e(t, e, t.dump, i), d && (t.dump = "&ref_" + f + t.dump)) : (T$e(t, e, t.dump), d && (t.dump = "&ref_" + f + " " + t.dump)); - else if (o === "[object Array]") - n && t.dump.length !== 0 ? (t.noArrayIndent && !a && e > 0 ? KG(t, e - 1, t.dump, i) : KG(t, e, t.dump, i), d && (t.dump = "&ref_" + f + t.dump)) : (S$e(t, e, t.dump), d && (t.dump = "&ref_" + f + " " + t.dump)); - else if (o === "[object String]") - t.tag !== "?" && w$e(t, t.dump, e, s, l); - else { - if (o === "[object Undefined]") - return !1; - if (t.skipInvalid) - return !1; - throw new so("unacceptable kind of an object to dump " + o); + } +}, oxt = { + options: { + html: !0, + xhtmlOut: !0, + breaks: !1, + langPrefix: "language-", + linkify: !1, + typographer: !1, + quotes: "\u201C\u201D\u2018\u2019", + highlight: null, + maxNesting: 20 + }, + components: { + core: { + rules: [ + "normalize", + "block", + "inline" + ] + }, + block: { + rules: [ + "blockquote", + "code", + "fence", + "heading", + "hr", + "html_block", + "lheading", + "list", + "reference", + "paragraph" + ] + }, + inline: { + rules: [ + "autolink", + "backticks", + "emphasis", + "entity", + "escape", + "html_inline", + "image", + "link", + "newline", + "text" + ], + rules2: [ + "balance_pairs", + "emphasis", + "text_collapse" + ] } - t.tag !== null && t.tag !== "?" && (u = encodeURI( - t.tag[0] === "!" ? t.tag.slice(1) : t.tag - ).replace(/!/g, "%21"), t.tag[0] === "!" ? u = "!" + u : u.slice(0, 18) === "tag:yaml.org,2002:" ? u = "!!" + u.slice(18) : u = "!<" + u + ">", t.dump = u + " " + t.dump); } - return !0; +}, ax = mn, lxt = i6, cxt = o2t, uxt = R2t, hxt = lbt, fxt = Pbt, dxt = Gbt, z0 = Fy, Bue = ixt, pxt = { + default: sxt, + zero: axt, + commonmark: oxt +}, gxt = /^(vbscript|javascript|file|data):/, mxt = /^data:image\/(gif|png|jpeg|webp);/; +function vxt(t) { + var e = t.trim().toLowerCase(); + return gxt.test(e) ? !!mxt.test(e) : !0; } -function E$e(t, e) { - var r = [], n = [], i, s; - for (J9(t, r, n), i = 0, s = n.length; i < s; i += 1) - e.duplicates.push(r[n[i]]); - e.usedDuplicates = new Array(s); +var Fue = ["http:", "https:", "mailto:"]; +function yxt(t) { + var e = z0.parse(t, !0); + if (e.hostname && (!e.protocol || Fue.indexOf(e.protocol) >= 0)) + try { + e.hostname = Bue.toASCII(e.hostname); + } catch { + } + return z0.encode(z0.format(e)); } -function J9(t, e, r) { - var n, i, s; - if (t !== null && typeof t == "object") - if (i = e.indexOf(t), i !== -1) - r.indexOf(i) === -1 && r.push(i); - else if (e.push(t), Array.isArray(t)) - for (i = 0, s = t.length; i < s; i += 1) - J9(t[i], e, r); - else - for (n = Object.keys(t), i = 0, s = n.length; i < s; i += 1) - J9(t[n[i]], e, r); +function bxt(t) { + var e = z0.parse(t, !0); + if (e.hostname && (!e.protocol || Fue.indexOf(e.protocol) >= 0)) + try { + e.hostname = Bue.toUnicode(e.hostname); + } catch { + } + return z0.decode(z0.format(e), z0.decode.defaultChars + "%"); } -function _$e(t, e) { - e = e || {}; - var r = new m$e(e); - r.noRefs || E$e(t, r); - var n = t; - return r.replacer && (n = r.replacer.call({ "": n }, "", n)), Af(r, 0, n, !0, !0) ? r.dump + ` -` : ""; +function oc(t, e) { + if (!(this instanceof oc)) + return new oc(t, e); + e || ax.isString(t) || (e = t || {}, t = "default"), this.inline = new fxt(), this.block = new hxt(), this.core = new uxt(), this.renderer = new cxt(), this.linkify = new dxt(), this.validateLink = vxt, this.normalizeLink = yxt, this.normalizeLinkText = bxt, this.utils = ax, this.helpers = ax.assign({}, lxt), this.options = {}, this.configure(t), e && this.set(e); } -var A$e = _$e, R$e = { - dump: A$e +oc.prototype.set = function(t) { + return ax.assign(this.options, t), this; }; -function iF(t, e) { - return function() { - throw new Error("Function yaml." + t + " is removed in js-yaml 4. Use yaml." + e + " instead, which is now safe by default."); - }; -} -var L$e = ua, M$e = Tue, D$e = Aue, P$e = Pue, N$e = Nue, I$e = eF, $$e = Kue.load, B$e = Kue.loadAll, F$e = R$e.dump, z$e = so, q$e = { - binary: zue, - float: Due, - map: _ue, - null: Rue, - pairs: Uue, - set: Que, - timestamp: Bue, - bool: Lue, - int: Mue, - merge: Fue, - omap: que, - seq: Eue, - str: Cue -}, U$e = iF("safeLoad", "load"), Q$e = iF("safeLoadAll", "loadAll"), V$e = iF("safeDump", "dump"), W$e = { - Type: L$e, - Schema: M$e, - FAILSAFE_SCHEMA: D$e, - JSON_SCHEMA: P$e, - CORE_SCHEMA: N$e, - DEFAULT_SCHEMA: I$e, - load: $$e, - loadAll: B$e, - dump: F$e, - YAMLException: z$e, - types: q$e, - safeLoad: U$e, - safeLoadAll: Q$e, - safeDump: V$e -}; -function Y$e(t, e, r, n, i, s = !0) { - const a = []; - for (const l of [...t.core.ruler.__rules__].reverse()) { - if (l.name === e) { - s || a.push(l.name); - break; - } - l.name && a.push(l.name); - } - t.core.ruler.disable(a); - let o = []; - try { - o = t.parse(r, n); - } finally { - t.core.ruler.enable(a); - } - for (const l of o) - l.map = l.map !== null ? [l.map[0] + i, l.map[1] + i] : l.map; - return o; -} -class Kf { +oc.prototype.configure = function(t) { + var e = this, r; + if (ax.isString(t) && (r = t, t = pxt[r], !t)) + throw new Error('Wrong `markdown-it` preset "' + r + '", check name'); + if (!t) + throw new Error("Wrong `markdown-it` preset, can't be empty"); + return t.options && e.set(t.options), t.components && Object.keys(t.components).forEach(function(n) { + t.components[n].rules && e[n].ruler.enableOnly(t.components[n].rules), t.components[n].rules2 && e[n].ruler2.enableOnly(t.components[n].rules2); + }), this; +}; +oc.prototype.enable = function(t, e) { + var r = []; + Array.isArray(t) || (t = [t]), ["core", "block", "inline"].forEach(function(i) { + r = r.concat(this[i].ruler.enable(t, !0)); + }, this), r = r.concat(this.inline.ruler2.enable(t, !0)); + var n = t.filter(function(i) { + return r.indexOf(i) < 0; + }); + if (n.length && !e) + throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + n); + return this; +}; +oc.prototype.disable = function(t, e) { + var r = []; + Array.isArray(t) || (t = [t]), ["core", "block", "inline"].forEach(function(i) { + r = r.concat(this[i].ruler.disable(t, !0)); + }, this), r = r.concat(this.inline.ruler2.disable(t, !0)); + var n = t.filter(function(i) { + return r.indexOf(i) < 0; + }); + if (n.length && !e) + throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + n); + return this; +}; +oc.prototype.use = function(t) { + var e = [this].concat(Array.prototype.slice.call(arguments, 1)); + return t.apply(t, e), this; +}; +oc.prototype.parse = function(t, e) { + if (typeof t != "string") + throw new Error("Input data should be a String"); + var r = new this.core.State(t, this, e); + return this.core.process(r), r.tokens; +}; +oc.prototype.render = function(t, e) { + return e = e || {}, this.renderer.render(this.parse(t, e), this.options, e); +}; +oc.prototype.parseInline = function(t, e) { + var r = new this.core.State(t, this, e); + return r.inlineMode = !0, this.core.process(r), r.tokens; +}; +oc.prototype.renderInline = function(t, e) { + return e = e || {}, this.renderer.render(this.parseInline(t, e), this.options, e); +}; +var xxt = oc; +(function(t) { + t.exports = xxt; +})(bue); +const zue = /* @__PURE__ */ yie(bue.exports); +class Yf { constructor(e) { - this.required_arguments = 0, this.optional_arguments = 0, this.final_argument_whitespace = !1, this.has_content = !1, this.option_spec = {}, this.rawOptions = !1, this.state = e; + this.state = e; } run(e) { return []; } - assert(e, r) { - if (!e) - throw new Error(r); - } - assert_has_content(e) { - if (!e.body) - throw new Error("Content block expected, but none found."); - } - createToken(e, r, n, i) { - const s = new this.state.Token(e, r, n); - return (i == null ? void 0 : i.content) !== void 0 && (s.content = i.content), (i == null ? void 0 : i.level) !== void 0 && (s.level = i.level), (i == null ? void 0 : i.map) !== void 0 && (s.map = i.map), (i == null ? void 0 : i.block) !== void 0 && (s.block = i.block), (i == null ? void 0 : i.info) !== void 0 && (s.info = i.info), (i == null ? void 0 : i.meta) !== void 0 && (s.meta = i.meta), (i == null ? void 0 : i.children) !== void 0 && (s.children = i.children), s; - } - nestedParse(e, r) { - return Y$e(this.state.md, "run_directives", e, this.state.env, r, !0); - } } -class Dd extends Error { - constructor() { - super(...arguments), this.name = "DirectiveParsingError"; +class wxt extends Yf { + run(e) { + const r = new this.state.Token("code_inline", "code", 0); + return r.content = e.content, [r]; } } -function G$e(t, e) { - const r = t.meta.arg || "", n = t.content; - let i = n.trim() ? n.split(/\r?\n/) : [], s = 0, a = {}; - (Object.keys(e.option_spec || {}) || e.rawOptions) && ([i, a, s] = uhe(i, e)); - let o = []; - if (!e.required_arguments && !e.optional_arguments ? r && (s = 0, i = [r].concat(i)) : o = H$e(r, e), i.length && !i[0].trim() && (i.shift(), s++), i.length && !e.has_content) - throw new Dd("Has content but content not allowed"); - return { - map: t.map ? t.map : [0, 0], - args: o, - options: a, - body: i.join(` -`), - bodyMap: t.map ? [ - i.length > 0 ? t.map[0] + s : t.map[1], - i.length > 0 ? t.map[1] - 1 : t.map[1] - ] : [0, 0] - }; -} -function uhe(t, e) { - let r = 1, n = {}, i = null; - if (t.length && t[0].startsWith("---")) { - r++; - const s = []; - i = []; - let a = !1; - for (const o of t.slice(1)) { - if (o.startsWith("---")) { - r++, a = !0; - continue; - } - a ? s.push(o) : (r++, i.push(o)); - } - t = s; - } else if (t.length && t[0].startsWith(":")) { - const s = []; - i = []; - let a = !1; - for (const o of t) { - if (!a && !o.startsWith(":")) { - a = !0, s.push(o); - continue; - } - a ? s.push(o) : (r++, i.push(o.slice(1))); - } - t = s; - } - if (i !== null) - try { - const s = W$e.load(i.join(` -`)); - if (s !== null && typeof s == "object") - n = s; - else - throw new Dd(`not dict: ${s}`); - } catch (s) { - throw new Dd(`Invalid options YAML: ${s}`); - } - if (e.rawOptions) - return [t, n, r]; - for (const [s, a] of Object.entries(n)) { - const o = e.option_spec ? e.option_spec[s] : null; - if (!o) - throw new Dd(`Unknown option: ${s}`); - let l = a; - (a === null || a === !1) && (l = ""); - try { - l = o(`${l || ""}`); - } catch (u) { - throw new Dd(`Invalid option value: (option: '${s}'; value: ${a}) -${u}`); - } - n[s] = l; +const Oxt = { + raw: wxt +}, P9 = "math_inline"; +class kxt extends Yf { + run(e) { + const r = new this.state.Token(P9, "span", 0); + return r.attrSet("class", "math inline"), r.markup = "$", r.content = e.content, [r]; } - return [t, n, r]; } -function H$e(t, e) { +function Sxt(t, e) { var r; - let n = t.trim() ? (r = t.trim()) === null || r === void 0 ? void 0 : r.split(/\s+/) : []; - const i = (e.required_arguments || 0) + (e.optional_arguments || 0); - if (n.length < (e.required_arguments || 0)) - throw new Dd(`${e.required_arguments} argument(s) required, ${n.length} supplied`); - if (n.length > i) - if (e.final_argument_whitespace) { - const s = t.split(/\s+/); - n = s.splice(0, i - 1), n.push(s.join(" ")); - } else - throw new Dd(`maximum ${i} argument(s) allowed, ${n.length} supplied`); - return n; + !(!((r = e == null ? void 0 : e.roles) === null || r === void 0) && r.math) || t.renderer.rules[P9] || (t.renderer.rules[P9] = (n, i) => { + var s, a, o; + const l = (o = (a = (s = e == null ? void 0 : e.opts) === null || s === void 0 ? void 0 : s.math) === null || a === void 0 ? void 0 : a.renderer) !== null && o !== void 0 ? o : (d) => t.utils.escapeHtml(d), u = n[i], h = u.content.trim(), f = l(h, { displayMode: !1 }); + return `${f}`; + }); } -function hhe(t, e) { - var r; - let n = e.directivesAfter || "block"; - (!((r = e.replaceFences) !== null && r !== void 0) || r) && (t.core.ruler.after(n, "fence_to_directive", X$e), n = "fence_to_directive"), t.core.ruler.after(n, "run_directives", j$e(e.directives || {})), t.renderer.rules.directive = (i, s) => { - const a = i[s]; - return ` -`; - }, t.renderer.rules.directive_error = (i, s) => { - const a = i[s]; - let o = ""; - return a.content && (o = ` ---- -${a.content}`), ` -`; - }; +const Txt = { + math: kxt +}; +function que(t, e) { + e.parseRoles && t.inline.ruler.before("backticks", "parse_roles", Cxt), t.core.ruler.after(e.rolesAfter || "inline", "run_roles", _xt(e.roles || {})), t.renderer.rules.role = (r, n) => { + const i = r[n]; + return `${i.meta.name}${i.content}`; + }, Sxt(t, e); } -function X$e(t) { - for (const e of t.tokens) - if (e.type === "fence" || e.type === "colon_fence") { - const r = e.info.match(/^\{([^\s}]+)\}\s*(.*)$/); - r && (e.type = "directive", e.info = r[1], e.meta = { arg: r[2] }); - } +function Cxt(t, e) { + if (t.src.charCodeAt(t.pos - 1) === 92) + return !1; + const r = Ext.exec(t.src.slice(t.pos)); + if (r == null) + return !1; + const [n, i, , s] = r; + if (t.pos += n.length, !e) { + const a = t.push("role", "", 0); + a.meta = { name: i }, a.content = s; + } return !0; } -function j$e(t) { +let N9; +try { + N9 = new RegExp("^\\{([a-zA-Z_\\-+:]{1,36})\\}(`+)(?!`)(.+?)(? t, tC = (t) => { - if (!t) - throw new xg("Argument required but none supplied"); - return t; -}, eD = (t) => { - if (t.trim()) - throw new xg(`No argument is allowed: "${t}" supplied`); - return null; -}, Up = (t) => `${t || ""}`.split(/\s+/).map((e) => Z$e(e)); -function fhe(t) { - if (!t) - throw new xg("Value is not set"); - const e = Number.parseFloat(t); - if (Number.isNaN(e) || !Number.isInteger(e)) - throw new xg(`Value "${t}" is not an integer`); - return e; -} -function rC(t) { - const e = fhe(t); - if (e < 0) - throw new xg(`Value "${t}" must be positive or zero`); - return e; -} -const dhe = (t) => t ? rC(t) : null, phe = (t) => (t = `${t || ""}`.replace(/\s+%$/, ""), rC(t)); -function ghe(t, e) { - const n = new RegExp(`^(?[0-9.]+)\\s*(?${e.join("|")})$`).exec(t); - if (!n || !n.groups) - throw new xg(`not a positive measure of one of the following units: ${e.join("|")}`); - return n.groups.number + n.groups.units; -} -const mhe = ["em", "ex", "px", "in", "cm", "mm", "pt", "pc"], sF = (t) => ghe(t, [...mhe, ""]), b6 = (t, e = "") => { - try { - return ghe(t, [...mhe, "%"]); - } catch { - return sF(t) + e; - } -}, vhe = (t, e = "") => t.toLowerCase() === "image" ? "image" : b6(t, e); -function x6(t) { - return (e) => { - if (e = e.toLowerCase().trim(), t.includes(e)) - return e; - throw new xg(`must be in: ${t.join("|")}`); - }; -} -const K$e = (t) => t; -class du extends Kf { - constructor() { - super(...arguments), this.final_argument_whitespace = !0, this.has_content = !0, this.option_spec = { - class: Up, - name: mh - }, this.title = "", this.kind = ""; - } +class kH extends Yf { run(e) { - var r; - const n = [], i = this.createToken("admonition_open", "aside", 1, { - map: e.map, - block: !0, - meta: { kind: this.kind } - }); - ((r = e.options.class) === null || r === void 0 ? void 0 : r.length) >= 1 ? (i.attrSet("class", e.options.class.join(" ")), i.attrJoin("class", "admonition")) : i.attrSet("class", "admonition"), this.kind && i.attrJoin("class", this.kind), n.push(i); - const s = this.createToken("admonition_title_open", "header", 1); - s.attrSet("class", "admonition-title"), n.push(s); - const a = e.args[0] || this.title; - n.push(this.createToken("inline", "", 0, { - map: [e.map[0], e.map[0]], - content: a, - children: [] - })), n.push(this.createToken("admonition_title_close", "header", -1, { block: !0 })); - const o = this.nestedParse(e.body, e.bodyMap[0]); - return n.push(...o), n.push(this.createToken("admonition_close", "aside", -1, { block: !0 })), n; - } -} -class J$e extends du { - constructor() { - super(...arguments), this.required_arguments = 1; - } -} -class eBe extends du { - constructor() { - super(...arguments), this.title = "Attention", this.kind = "attention"; - } -} -class tBe extends du { - constructor() { - super(...arguments), this.title = "Caution", this.kind = "caution"; - } -} -class rBe extends du { - constructor() { - super(...arguments), this.title = "Danger", this.kind = "danger"; - } -} -class nBe extends du { - constructor() { - super(...arguments), this.title = "Error", this.kind = "error"; + const r = new this.state.Token("sub_open", "sub", 1); + r.markup = "~"; + const n = new this.state.Token("text", "", 0); + n.content = e.content; + const i = new this.state.Token("sub_close", "sub", -1); + return i.markup = "~", [r, n, i]; } } -class iBe extends du { - constructor() { - super(...arguments), this.title = "Important", this.kind = "important"; +class SH extends Yf { + run(e) { + const r = new this.state.Token("sup_open", "sup", 1); + r.markup = "~"; + const n = new this.state.Token("text", "", 0); + n.content = e.content; + const i = new this.state.Token("sup_close", "sup", -1); + return i.markup = "~", [r, n, i]; } } -class sBe extends du { - constructor() { - super(...arguments), this.title = "Hint", this.kind = "hint"; +const Axt = /^(.+?)\(([^()]+)\)$/; +class TH extends Yf { + run(e) { + var r, n, i, s; + const a = Axt.exec(e.content), o = (n = (r = a == null ? void 0 : a[1]) === null || r === void 0 ? void 0 : r.trim()) !== null && n !== void 0 ? n : e.content.trim(), l = (s = (i = a == null ? void 0 : a[2]) === null || i === void 0 ? void 0 : i.trim()) !== null && s !== void 0 ? s : null, u = new this.state.Token("abbr_open", "abbr", 1); + l && u.attrSet("title", l); + const h = new this.state.Token("text", "", 0); + h.content = o; + const f = new this.state.Token("abbr_close", "abbr", -1); + return [u, h, f]; } } -class aBe extends du { - constructor() { - super(...arguments), this.title = "Note", this.kind = "note"; - } +const Rxt = { + subscript: kH, + sub: kH, + superscript: SH, + sup: SH, + abbreviation: TH, + abbr: TH +}; +var lw; +(function(t) { + t.equation = "eq", t.figure = "fig", t.table = "table", t.code = "code", t.section = "sec"; +})(lw || (lw = {})); +function h6(t) { + var e, r; + const n = (r = (e = t.env) === null || e === void 0 ? void 0 : e.docutils) !== null && r !== void 0 ? r : {}; + return n.targets || (n.targets = {}), n.references || (n.references = []), n.numbering || (n.numbering = {}), t.env.docutils || (t.env.docutils = n), n; } -class oBe extends du { - constructor() { - super(...arguments), this.title = "See Also", this.kind = "seealso"; - } +function Lxt(t) { + var e, r; + const n = (r = (e = t.meta) === null || e === void 0 ? void 0 : e.docutils) !== null && r !== void 0 ? r : {}; + return t.meta || (t.meta = {}), t.meta.docutils || (t.meta.docutils = n), n; } -class lBe extends du { - constructor() { - super(...arguments), this.title = "Tip", this.kind = "tip"; - } +function Mxt(t, e) { + const r = h6(t); + return r.numbering[e] == null ? r.numbering[e] = 1 : r.numbering[e] += 1, r.numbering[e]; } -class cBe extends du { - constructor() { - super(...arguments), this.title = "Warning", this.kind = "warning"; +function Uue(t, e, r, n, i, s = !1) { + const a = h6(t), o = Mxt(t, r), l = { + label: n, + kind: r, + number: o, + title: i + }; + if (!s) { + const u = Lxt(e); + u.target = l, e.attrSet("id", n), a.targets[n] = l; } + return l; } -const uBe = { - admonition: J$e, - attention: eBe, - caution: tBe, - danger: rBe, - error: nBe, - important: iBe, - hint: sBe, - note: aBe, - seealso: oBe, - tip: lBe, - warning: cBe -}; -class hBe extends Kf { - constructor() { - super(...arguments), this.required_arguments = 0, this.optional_arguments = 1, this.final_argument_whitespace = !1, this.has_content = !0, this.option_spec = { - "number-lines": dhe, - force: eD, - name: mh, - class: Up - }; - } - run(e) { - return this.assert_has_content(e), [this.createToken("fence", "code", 0, { - info: e.args ? e.args[0] : "", - content: e.body, - map: e.bodyMap - })]; - } +function rF(t, e, r, n) { + var i; + e.open.meta = (i = e.open.meta) !== null && i !== void 0 ? i : {}, e.open.meta.kind = r.kind, e.open.meta.label = r.label, e.open.meta.value = r.value, h6(t).references.push(Object.assign({ label: r.label, tokens: e }, n)); } -class fBe extends Kf { - constructor() { - super(...arguments), this.required_arguments = 0, this.optional_arguments = 1, this.final_argument_whitespace = !1, this.has_content = !0, this.option_spec = { - linenos: eD, - "lineno-start": fhe, - dedent: dhe, - "emphasize-lines": tC, - caption: tC, - force: eD, - name: mh, - class: Up - }; - } +const Que = /^(.+?)<([^<>]+)>$/; +class Dxt extends Yf { run(e) { - return this.assert_has_content(e), [this.createToken("fence", "code", 0, { - info: e.args ? e.args[0] : "", - content: e.body, - map: e.bodyMap - })]; + const r = new this.state.Token("ref_open", "a", 1), n = new this.state.Token("text", "", 0), i = new this.state.Token("ref_close", "a", -1); + return rF(this.state, { open: r, content: n, close: i }, { kind: "eq", label: e.content }, { + kind: lw.equation, + contentFromTarget: (s) => `(${s.number})` + }), [r, n, i]; } } -class dBe extends Kf { - constructor() { - super(...arguments), this.required_arguments = 0, this.optional_arguments = 1, this.final_argument_whitespace = !1, this.has_content = !0, this.rawOptions = !0; - } +class Pxt extends Yf { run(e) { - return [this.createToken("fence", "code", 0, { - info: e.args ? e.args[0] : "", - content: e.body, - map: e.bodyMap - })]; + const r = Que.exec(e.content), [, n, i] = r != null ? r : [], s = n == null ? void 0 : n.trim(), a = new this.state.Token("ref_open", "a", 1), o = new this.state.Token("text", "", 0), l = new this.state.Token("ref_close", "a", -1); + return rF(this.state, { open: a, content: o, close: l }, { kind: "numref", label: i || e.content, value: s }, { + contentFromTarget: (u) => r ? s.replace(/%s/g, String(u.number)).replace(/\{number\}/g, String(u.number)) : u.title.trim() + }), [a, o, l]; } } -const pBe = { - code: hBe, - "code-block": fBe, - "code-cell": dBe -}, yhe = { - alt: mh, - height: sF, - width: b6, - scale: phe, - target: tC, - class: Up, - name: mh -}; -class bhe extends Kf { - constructor() { - super(...arguments), this.required_arguments = 1, this.optional_arguments = 0, this.final_argument_whitespace = !0, this.option_spec = Object.assign(Object.assign({}, yhe), { align: x6(["left", "center", "right", "top", "middle", "bottom"]) }); - } - create_image(e) { - const r = K$e(e.args[0] || ""), n = this.createToken("image", "img", 0, { map: e.map, block: !0 }); - n.attrSet("src", r), n.attrSet("alt", e.options.alt || ""); - const i = []; - return e.options.alt && this.state.md.inline.parse(e.options.alt, this.state.md, this.state.env, i), n.children = i, e.options.height && n.attrSet("height", e.options.height), e.options.width && n.attrSet("width", e.options.width), e.options.align && n.attrJoin("class", `align-${e.options.align}`), e.options.class && n.attrJoin("class", e.options.class.join(" ")), n; - } +class Nxt extends Yf { run(e) { - return [this.create_image(e)]; + const r = Que.exec(e.content), [, n, i] = r != null ? r : [], s = n == null ? void 0 : n.trim(), a = new this.state.Token("ref_open", "a", 1), o = new this.state.Token("text", "", 0), l = new this.state.Token("ref_close", "a", -1); + return rF(this.state, { open: a, content: o, close: l }, { kind: "ref", label: i || e.content, value: s }, { + contentFromTarget: (u) => s || u.title + }), [a, o, l]; } } -class gBe extends bhe { - constructor() { - super(...arguments), this.option_spec = Object.assign(Object.assign({}, yhe), { align: x6(["left", "center", "right"]), figwidth: vhe, figclass: Up }), this.has_content = !0; - } - run(e) { - const r = this.createToken("figure_open", "figure", 1, { - map: e.map, - block: !0 - }); - e.options.figclass && r.attrJoin("class", e.options.figclass.join(" ")), e.options.align && r.attrJoin("class", `align-${e.options.align}`), e.options.figwidth && e.options.figwidth !== "image" && r.attrSet("width", e.options.figwidth); - let n; - e.options.name && (n = wue( - this.state, - r, - mw.figure, - e.options.name, - e.body.trim() - ), r.attrJoin("class", "numbered")); - const i = this.create_image(e); - i.map = [e.map[0], e.map[0]]; - let s = [], a = []; - if (e.body) { - const [l, ...u] = e.body.split(` - -`), h = u.join(` - -`), f = e.bodyMap[0], d = this.createToken("figure_caption_open", "figcaption", 1, { - block: !0 - }); - n && d.attrSet("number", `${n.number}`); - const p = this.nestedParse(l, f), g = this.createToken("figure_caption_close", "figcaption", -1, { - block: !0 - }); - if (s = [d, ...p, g], h) { - const m = f + l.split(` -`).length + 1, v = this.createToken("figure_legend_open", "", 1, { - block: !0 - }), y = this.nestedParse(h, m), b = this.createToken("figure_legend_close", "", -1, { - block: !0 - }); - a = [v, ...y, b]; - } - } - const o = this.createToken("figure_close", "figure", -1, { block: !0 }); - return [r, i, ...s, ...a, o]; - } +const Ixt = { + eq: Dxt, + ref: Nxt, + numref: Pxt +}, $xt = Object.assign(Object.assign(Object.assign(Object.assign({}, Oxt), Rxt), Txt), Ixt); +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ +function Vue(t) { + return typeof t > "u" || t === null; } -const mBe = { - image: bhe, - figure: gBe -}; -class aF { - constructor(e, r = !0) { - if (this.children = [], this.children = [], r) { - this._set_children_from_tokens(e); - return; - } - if (e.length === 0) - throw new Error("Tree creation: Can only create root from empty token sequence."); - if (e.length === 1) { - const n = e[0]; - if (n.nesting) - throw new Error("Unequal nesting level at the start and end of token stream."); - this.token = n, n.children !== null && n.children.length > 0 && this._set_children_from_tokens(n.children); - } else - this.nester_tokens = { opening: e[0], closing: e[e.length - 1] }, this._set_children_from_tokens(e.slice(1, -1)); - } - _set_children_from_tokens(e) { - const r = [...e].reverse(); - let n; - for (; r.length > 0 && (n = r.pop(), !!n); ) { - if (!n.nesting) { - this._add_child([n]); - continue; - } - if (n.nesting !== 1) - throw new Error("Invalid token nesting"); - const i = [n]; - let s = 1; - for (; r.length > 0 && s !== 0; ) - n = r.pop(), n && (i.push(n), s += n.nesting); - if (s) - throw new Error(`unclosed tokens starting: ${i[0]}`); - this._add_child(i); - } - } - _add_child(e) { - const r = new aF(e, !1); - r.parent = this, this.children.push(r); - } - to_tokens() { - function e(n, i) { - if (n.type === "root") - for (const s of n.children) - e(s, i); - else if (n.token) - i.push(n.token); - else { - if (!n.nester_tokens) - throw new Error("No nested token available"); - i.push(n.nester_tokens.opening); - for (const s of n.children) - e(s, i); - i.push(n.nester_tokens.closing); - } - } - const r = []; - return e(this, r), r; - } - get is_root() { - return !(this.token || this.nester_tokens); - } - get is_nested() { - return !!this.nester_tokens; - } - get siblings() { - return this.parent ? this.parent.children : [this]; - } - *walk(e = !0) { - e && (yield this); - for (const r of this.children) - yield* r.walk(!0); - } - get type() { - var e, r, n; - if (this.is_root) - return "root"; - if (this.token) - return this.token.type; - if (!((e = this.nester_tokens) === null || e === void 0) && e.opening.type.endsWith("_open")) - return (r = this.nester_tokens) === null || r === void 0 ? void 0 : r.opening.type.slice(0, -5); - if (this.nester_tokens) - return (n = this.nester_tokens) === null || n === void 0 ? void 0 : n.opening.type; - throw new Error("no internal token"); - } - attribute_token() { - if (this.token) - return this.token; - if (this.nester_tokens) - return this.nester_tokens.opening; - throw new Error("Tree node does not have the accessed attribute"); - } - get tag() { - return this.attribute_token().tag; - } - get level() { - return this.attribute_token().level; - } - get content() { - return this.attribute_token().content; - } - get markup() { - return this.attribute_token().markup; - } - get info() { - return this.attribute_token().info; - } - get meta() { - return this.attribute_token().meta; - } - get block() { - return this.attribute_token().block; - } - get hidden() { - return this.attribute_token().hidden; - } - get map() { - return this.attribute_token().map; - } - get attrs() { - return this.attribute_token().attrs; - } +function Bxt(t) { + return typeof t == "object" && t !== null; } -class vBe extends Kf { - constructor() { - super(...arguments), this.required_arguments = 0, this.optional_arguments = 1, this.final_argument_whitespace = !0, this.has_content = !0, this.option_spec = { - "header-rows": rC, - "stub-columns": rC, - width: b6, - widths: mh, - class: Up, - name: mh, - align: x6(["left", "center", "right"]) - }; - } - run(e) { - this.assert_has_content(e); - const r = e.options["header-rows"] || 0, n = this.nestedParse(e.body, e.bodyMap[0]); - if (n.length < 2 || n[0].type !== "bullet_list_open" || n[n.length - 1].type !== "bullet_list_close") - throw new Dd("Content is not a single bullet list"); - const i = [], s = this.createToken("table_open", "table", 1, { map: e.bodyMap }); - e.options.align && s.attrJoin("class", `align-${e.options.align}`), e.options.class && s.attrJoin("class", e.options.class.join(" ")), i.push(s), e.args.length && e.args[0] && (i.push(this.createToken("table_caption_open", "caption", 1)), i.push(this.createToken("inline", "", 0, { - map: [e.map[0], e.map[0]], - content: e.args[0], - children: [] - })), i.push(this.createToken("table_caption_close", "caption", -1))); - let a = "th"; - r ? (i.push(this.createToken("thead_open", "thead", 1, { level: 1 })), a = "th") : (i.push(this.createToken("tbody_open", "tbody", 1, { level: 1 })), a = "td"); - let o, l = 0; - for (const u of new aF(n.slice(1, -1)).children) { - l += 1, this.assert(u.type === "list_item", `list item ${l} not of type 'list_item': ${u.type}`), this.assert(u.children.length === 1 && u.children[0].type === "bullet_list", `list item ${l} content not a nested bullet list`); - const h = u.children[0].children; - o === void 0 ? o = h.length : this.assert(h.length === o, `list item ${l} does not contain the same number of columns as previous items`), r && l === r + 1 && (i.push(this.createToken("thead_close", "thead", -1, { level: 1 })), i.push(this.createToken("tbody_open", "tbody", 1, { level: 1 })), a = "td"), i.push(this.createToken("tr_open", "tr", 1, { map: u.map, level: 2 })); - for (const f of h) - i.push(this.createToken(`${a}_open`, a, 1, { map: f.map, level: 3 })), i.push(...f.to_tokens().slice(1, -1)), i.push(this.createToken(`${a}_close`, a, -1, { level: 3 })); - i.push(this.createToken("tr_close", "tr", -1, { level: 2 })); - } - if (r && l < r) - throw new Error(`Insufficient rows (${l}) for required header rows (${r})`); - return a === "td" ? i.push(this.createToken("tbody_close", "tbody", -1, { level: 1 })) : i.push(this.createToken("thead_close", "thead", -1, { level: 1 })), i.push(this.createToken("table_close", "table", -1)), i; - } +function Fxt(t) { + return Array.isArray(t) ? t : Vue(t) ? [] : [t]; } -const yBe = { - "list-table": vBe -}; -class bBe extends Kf { - constructor() { - super(...arguments), this.required_arguments = 0, this.optional_arguments = 0, this.final_argument_whitespace = !1, this.has_content = !0, this.option_spec = { - label: mh - }; - } - run(e) { - this.assert_has_content(e); - const r = this.createToken("math_block", "div", 0, { - content: e.body, - map: e.bodyMap, - block: !0 - }); - if (r.attrSet("class", "math block"), e.options.label) { - r.attrSet("id", e.options.label); - const n = wue(this.state, r, mw.equation, e.options.label, ""); - r.attrSet("number", `${n.number}`), r.info = e.options.label, r.meta = { label: e.options.label, numbered: !0, number: n.number }; - } - return [r]; - } +function zxt(t, e) { + var r, n, i, s; + if (e) + for (s = Object.keys(e), r = 0, n = s.length; r < n; r += 1) + i = s[r], t[i] = e[i]; + return t; } -const xBe = { - math: bBe -}, oF = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, uBe), mBe), pBe), yBe), xBe); -function wBe(t) { - return (e) => { - const r = v6(e); - return r.references.forEach((n) => { - const { label: i, tokens: s, contentFromTarget: a } = n, o = (u, h) => (s.open.attrJoin("class", "error"), s.open.tag = s.close.tag = "code", a && h ? s.content.content = a(h) : s.content.content = u, !0), l = r.targets[i]; - if (!l) - return o(i, { - kind: n.kind || "", - label: i, - title: i, - number: `"${i}"` - }); - if (n.kind && l.kind !== n.kind) - return o(`Reference "${i}" does not match kind "${n.kind}"`); - s.open.attrSet("href", `#${l.label}`), l.title && s.open.attrSet("title", l.title), a && (s.content.content = a(l).trim()); - }), !0; - }; +function qxt(t, e) { + var r = "", n; + for (n = 0; n < e; n += 1) + r += t; + return r; } -function OBe(t, e) { - t.core.ruler.push("docutils_number", wBe()); +function Uxt(t) { + return t === 0 && Number.NEGATIVE_INFINITY === 1 / t; } -const kBe = { - parseRoles: !0, - replaceFences: !0, - rolesAfter: "inline", - directivesAfter: "block", - directives: oF, - roles: TNe +var Qxt = Vue, Vxt = Bxt, Wxt = Fxt, Yxt = qxt, Gxt = Uxt, Hxt = zxt, hs = { + isNothing: Qxt, + isObject: Vxt, + toArray: Wxt, + repeat: Yxt, + isNegativeZero: Gxt, + extend: Hxt }; -function SBe(t, e) { - const r = Object.assign(Object.assign({}, kBe), e); - t.use(xue, r), t.use(hhe, r), t.use(OBe, r); +function Wue(t, e) { + var r = "", n = t.reason || "(unknown reason)"; + return t.mark ? (t.mark.name && (r += 'in "' + t.mark.name + '" '), r += "(" + (t.mark.line + 1) + ":" + (t.mark.column + 1) + ")", !e && t.mark.snippet && (r += ` + +` + t.mark.snippet), n + " " + r) : n; } -/*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */ -function Sd(t) { - return Sd = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { - return typeof e; - } : function(e) { - return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; - }, Sd(t); +function cw(t, e) { + Error.call(this), this.name = "YAMLException", this.reason = t, this.mark = e, this.message = Wue(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || ""; } -function tD(t, e) { - return tD = Object.setPrototypeOf || function(n, i) { - return n.__proto__ = i, n; - }, tD(t, e); +cw.prototype = Object.create(Error.prototype); +cw.prototype.constructor = cw; +cw.prototype.toString = function(e) { + return this.name + ": " + Wue(this, e); +}; +var no = cw; +function F8(t, e, r, n, i) { + var s = "", a = "", o = Math.floor(i / 2) - 1; + return n - e > o && (s = " ... ", e = n - o + s.length), r - n > o && (a = " ...", r = n + o - a.length), { + str: s + t.slice(e, r).replace(/\t/g, "\u2192") + a, + pos: n - e + s.length + }; } -function TBe() { - if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) - return !1; - if (typeof Proxy == "function") - return !0; - try { - return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { - })), !0; - } catch { - return !1; - } +function z8(t, e) { + return hs.repeat(" ", e - t.length) + t; } -function l3(t, e, r) { - return TBe() ? l3 = Reflect.construct : l3 = function(i, s, a) { - var o = [null]; - o.push.apply(o, s); - var l = Function.bind.apply(i, o), u = new l(); - return a && tD(u, a.prototype), u; - }, l3.apply(null, arguments); +function Xxt(t, e) { + if (e = Object.create(e || null), !t.buffer) + return null; + e.maxLength || (e.maxLength = 79), typeof e.indent != "number" && (e.indent = 1), typeof e.linesBefore != "number" && (e.linesBefore = 3), typeof e.linesAfter != "number" && (e.linesAfter = 2); + for (var r = /\r?\n|\r|\0/g, n = [0], i = [], s, a = -1; s = r.exec(t.buffer); ) + i.push(s.index), n.push(s.index + s[0].length), t.position <= s.index && a < 0 && (a = n.length - 2); + a < 0 && (a = n.length - 1); + var o = "", l, u, h = Math.min(t.line + e.linesAfter, i.length).toString().length, f = e.maxLength - (e.indent + h + 3); + for (l = 1; l <= e.linesBefore && !(a - l < 0); l++) + u = F8( + t.buffer, + n[a - l], + i[a - l], + t.position - (n[a] - n[a - l]), + f + ), o = hs.repeat(" ", e.indent) + z8((t.line - l + 1).toString(), h) + " | " + u.str + ` +` + o; + for (u = F8(t.buffer, n[a], i[a], t.position, f), o += hs.repeat(" ", e.indent) + z8((t.line + 1).toString(), h) + " | " + u.str + ` +`, o += hs.repeat("-", e.indent + h + 3 + u.pos) + `^ +`, l = 1; l <= e.linesAfter && !(a + l >= i.length); l++) + u = F8( + t.buffer, + n[a + l], + i[a + l], + t.position - (n[a] - n[a + l]), + f + ), o += hs.repeat(" ", e.indent) + z8((t.line + l + 1).toString(), h) + " | " + u.str + ` +`; + return o.replace(/\n$/, ""); } -function _c(t) { - return CBe(t) || EBe(t) || _Be(t) || ABe(); +var Zxt = Xxt, jxt = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" +], Kxt = [ + "scalar", + "sequence", + "mapping" +]; +function Jxt(t) { + var e = {}; + return t !== null && Object.keys(t).forEach(function(r) { + t[r].forEach(function(n) { + e[String(n)] = r; + }); + }), e; } -function CBe(t) { - if (Array.isArray(t)) - return rD(t); +function ewt(t, e) { + if (e = e || {}, Object.keys(e).forEach(function(r) { + if (jxt.indexOf(r) === -1) + throw new no('Unknown option "' + r + '" is met in definition of "' + t + '" YAML type.'); + }), this.options = e, this.tag = t, this.kind = e.kind || null, this.resolve = e.resolve || function() { + return !0; + }, this.construct = e.construct || function(r) { + return r; + }, this.instanceOf = e.instanceOf || null, this.predicate = e.predicate || null, this.represent = e.represent || null, this.representName = e.representName || null, this.defaultStyle = e.defaultStyle || null, this.multi = e.multi || !1, this.styleAliases = Jxt(e.styleAliases || null), Kxt.indexOf(this.kind) === -1) + throw new no('Unknown kind "' + this.kind + '" is specified for "' + t + '" YAML type.'); } -function EBe(t) { - if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) - return Array.from(t); +var sa = ewt; +function CH(t, e) { + var r = []; + return t[e].forEach(function(n) { + var i = r.length; + r.forEach(function(s, a) { + s.tag === n.tag && s.kind === n.kind && s.multi === n.multi && (i = a); + }), r[i] = n; + }), r; } -function _Be(t, e) { - if (!!t) { - if (typeof t == "string") - return rD(t, e); - var r = Object.prototype.toString.call(t).slice(8, -1); - if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") - return Array.from(t); - if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) - return rD(t, e); +function twt() { + var t = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, e, r; + function n(i) { + i.multi ? (t.multi[i.kind].push(i), t.multi.fallback.push(i)) : t[i.kind][i.tag] = t.fallback[i.tag] = i; } + for (e = 0, r = arguments.length; e < r; e += 1) + arguments[e].forEach(n); + return t; } -function rD(t, e) { - (e == null || e > t.length) && (e = t.length); - for (var r = 0, n = new Array(e); r < e; r++) - n[r] = t[r]; - return n; -} -function ABe() { - throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); +function I9(t) { + return this.extend(t); } -var RBe = Object.hasOwnProperty, eH = Object.setPrototypeOf, LBe = Object.isFrozen, MBe = Object.getPrototypeOf, DBe = Object.getOwnPropertyDescriptor, po = Object.freeze, lu = Object.seal, PBe = Object.create, xhe = typeof Reflect < "u" && Reflect, nC = xhe.apply, nD = xhe.construct; -nC || (nC = function(e, r, n) { - return e.apply(r, n); -}); -po || (po = function(e) { - return e; -}); -lu || (lu = function(e) { - return e; -}); -nD || (nD = function(e, r) { - return l3(e, _c(r)); +I9.prototype.extend = function(e) { + var r = [], n = []; + if (e instanceof sa) + n.push(e); + else if (Array.isArray(e)) + n = n.concat(e); + else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit))) + e.implicit && (r = r.concat(e.implicit)), e.explicit && (n = n.concat(e.explicit)); + else + throw new no("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + r.forEach(function(s) { + if (!(s instanceof sa)) + throw new no("Specified list of YAML types (or a single Type object) contains a non-Type object."); + if (s.loadKind && s.loadKind !== "scalar") + throw new no("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + if (s.multi) + throw new no("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + }), n.forEach(function(s) { + if (!(s instanceof sa)) + throw new no("Specified list of YAML types (or a single Type object) contains a non-Type object."); + }); + var i = Object.create(I9.prototype); + return i.implicit = (this.implicit || []).concat(r), i.explicit = (this.explicit || []).concat(n), i.compiledImplicit = CH(i, "implicit"), i.compiledExplicit = CH(i, "explicit"), i.compiledTypeMap = twt(i.compiledImplicit, i.compiledExplicit), i; +}; +var Yue = I9, Gue = new sa("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(t) { + return t !== null ? t : ""; + } +}), Hue = new sa("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(t) { + return t !== null ? t : []; + } +}), Xue = new sa("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(t) { + return t !== null ? t : {}; + } +}), Zue = new Yue({ + explicit: [ + Gue, + Hue, + Xue + ] }); -var NBe = fc(Array.prototype.forEach), tH = fc(Array.prototype.pop), V2 = fc(Array.prototype.push), c3 = fc(String.prototype.toLowerCase), q8 = fc(String.prototype.toString), IBe = fc(String.prototype.match), Ec = fc(String.prototype.replace), $Be = fc(String.prototype.indexOf), BBe = fc(String.prototype.trim), Ja = fc(RegExp.prototype.test), U8 = FBe(TypeError); -function fc(t) { - return function(e) { - for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++) - n[i - 1] = arguments[i]; - return nC(t, e, n); - }; +function rwt(t) { + if (t === null) + return !0; + var e = t.length; + return e === 1 && t === "~" || e === 4 && (t === "null" || t === "Null" || t === "NULL"); } -function FBe(t) { - return function() { - for (var e = arguments.length, r = new Array(e), n = 0; n < e; n++) - r[n] = arguments[n]; - return nD(t, r); - }; +function nwt() { + return null; } -function Gr(t, e, r) { - var n; - r = (n = r) !== null && n !== void 0 ? n : c3, eH && eH(t, null); - for (var i = e.length; i--; ) { - var s = e[i]; - if (typeof s == "string") { - var a = r(s); - a !== s && (LBe(e) || (e[i] = a), s = a); +function iwt(t) { + return t === null; +} +var jue = new sa("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: rwt, + construct: nwt, + predicate: iwt, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; } - t[s] = !0; - } - return t; + }, + defaultStyle: "lowercase" +}); +function swt(t) { + if (t === null) + return !1; + var e = t.length; + return e === 4 && (t === "true" || t === "True" || t === "TRUE") || e === 5 && (t === "false" || t === "False" || t === "FALSE"); } -function e0(t) { - var e = PBe(null), r; - for (r in t) - nC(RBe, t, [r]) === !0 && (e[r] = t[r]); - return e; +function awt(t) { + return t === "true" || t === "True" || t === "TRUE"; } -function bS(t, e) { - for (; t !== null; ) { - var r = DBe(t, e); - if (r) { - if (r.get) - return fc(r.get); - if (typeof r.value == "function") - return fc(r.value); - } - t = MBe(t); - } - function n(i) { - return console.warn("fallback value for", i), null; - } - return n; +function owt(t) { + return Object.prototype.toString.call(t) === "[object Boolean]"; } -var rH = po(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Q8 = po(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), V8 = po(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), zBe = po(["animate", "color-profile", "cursor", "discard", "fedropshadow", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), W8 = po(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover"]), qBe = po(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), nH = po(["#text"]), iH = po(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), Y8 = po(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), sH = po(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), xS = po(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), UBe = lu(/\{\{[\w\W]*|[\w\W]*\}\}/gm), QBe = lu(/<%[\w\W]*|[\w\W]*%>/gm), VBe = lu(/\${[\w\W]*}/gm), WBe = lu(/^data-[\-\w.\u00B7-\uFFFF]/), YBe = lu(/^aria-[\-\w]+$/), GBe = lu( - /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i -), HBe = lu(/^(?:\w+script|data):/i), XBe = lu( - /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g -), jBe = lu(/^html$/i), ZBe = function() { - return typeof window > "u" ? null : window; -}, KBe = function(e, r) { - if (Sd(e) !== "object" || typeof e.createPolicy != "function") - return null; - var n = null, i = "data-tt-policy-suffix"; - r.currentScript && r.currentScript.hasAttribute(i) && (n = r.currentScript.getAttribute(i)); - var s = "dompurify" + (n ? "#" + n : ""); - try { - return e.createPolicy(s, { - createHTML: function(o) { - return o; - }, - createScriptURL: function(o) { - return o; - } - }); - } catch { - return console.warn("TrustedTypes policy " + s + " could not be created."), null; - } -}; -function whe() { - var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ZBe(), e = function(ye) { - return whe(ye); - }; - if (e.version = "2.4.7", e.removed = [], !t || !t.document || t.document.nodeType !== 9) - return e.isSupported = !1, e; - var r = t.document, n = t.document, i = t.DocumentFragment, s = t.HTMLTemplateElement, a = t.Node, o = t.Element, l = t.NodeFilter, u = t.NamedNodeMap, h = u === void 0 ? t.NamedNodeMap || t.MozNamedAttrMap : u, f = t.HTMLFormElement, d = t.DOMParser, p = t.trustedTypes, g = o.prototype, m = bS(g, "cloneNode"), v = bS(g, "nextSibling"), y = bS(g, "childNodes"), b = bS(g, "parentNode"); - if (typeof s == "function") { - var w = n.createElement("template"); - w.content && w.content.ownerDocument && (n = w.content.ownerDocument); - } - var O = KBe(p, r), S = O ? O.createHTML("") : "", C = n, T = C.implementation, D = C.createNodeIterator, E = C.createDocumentFragment, N = C.getElementsByTagName, P = r.importNode, L = {}; - try { - L = e0(n).documentMode ? n.documentMode : {}; - } catch { - } - var F = {}; - e.isSupported = typeof b == "function" && T && T.createHTMLDocument !== void 0 && L !== 9; - var k = UBe, B = QBe, A = VBe, M = WBe, I = YBe, q = HBe, Y = XBe, W = GBe, Z = null, K = Gr({}, [].concat(_c(rH), _c(Q8), _c(V8), _c(W8), _c(nH))), re = null, pe = Gr({}, [].concat(_c(iH), _c(Y8), _c(sH), _c(xS))), ne = Object.seal(Object.create(null, { - tagNameCheck: { - writable: !0, - configurable: !1, - enumerable: !0, - value: null +var Kue = new sa("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: swt, + construct: awt, + predicate: owt, + represent: { + lowercase: function(t) { + return t ? "true" : "false"; }, - attributeNameCheck: { - writable: !0, - configurable: !1, - enumerable: !0, - value: null + uppercase: function(t) { + return t ? "TRUE" : "FALSE"; }, - allowCustomizedBuiltInElements: { - writable: !0, - configurable: !1, - enumerable: !0, - value: !1 - } - })), le = null, ge = null, j = !0, oe = !0, ie = !1, ce = !0, we = !1, xe = !1, fe = !1, Ye = !1, Ce = !1, Le = !1, We = !1, je = !0, at = !1, tt = "user-content-", Ge = !0, Re = !1, se = {}, ve = null, Ee = Gr({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]), de = null, ke = Gr({}, ["audio", "video", "img", "source", "image", "track"]), H = null, U = Gr({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Q = "http://www.w3.org/1998/Math/MathML", te = "http://www.w3.org/2000/svg", he = "http://www.w3.org/1999/xhtml", Te = he, Se = !1, $e = null, Ie = Gr({}, [Q, te, he], q8), ct, Ue = ["application/xhtml+xml", "text/html"], ut = "text/html", bt, Pt = null, At = n.createElement("form"), Ct = function(ye) { - return ye instanceof RegExp || ye instanceof Function; - }, dt = function(ye) { - Pt && Pt === ye || ((!ye || Sd(ye) !== "object") && (ye = {}), ye = e0(ye), ct = Ue.indexOf(ye.PARSER_MEDIA_TYPE) === -1 ? ct = ut : ct = ye.PARSER_MEDIA_TYPE, bt = ct === "application/xhtml+xml" ? q8 : c3, Z = "ALLOWED_TAGS" in ye ? Gr({}, ye.ALLOWED_TAGS, bt) : K, re = "ALLOWED_ATTR" in ye ? Gr({}, ye.ALLOWED_ATTR, bt) : pe, $e = "ALLOWED_NAMESPACES" in ye ? Gr({}, ye.ALLOWED_NAMESPACES, q8) : Ie, H = "ADD_URI_SAFE_ATTR" in ye ? Gr( - e0(U), - ye.ADD_URI_SAFE_ATTR, - bt - ) : U, de = "ADD_DATA_URI_TAGS" in ye ? Gr( - e0(ke), - ye.ADD_DATA_URI_TAGS, - bt - ) : ke, ve = "FORBID_CONTENTS" in ye ? Gr({}, ye.FORBID_CONTENTS, bt) : Ee, le = "FORBID_TAGS" in ye ? Gr({}, ye.FORBID_TAGS, bt) : {}, ge = "FORBID_ATTR" in ye ? Gr({}, ye.FORBID_ATTR, bt) : {}, se = "USE_PROFILES" in ye ? ye.USE_PROFILES : !1, j = ye.ALLOW_ARIA_ATTR !== !1, oe = ye.ALLOW_DATA_ATTR !== !1, ie = ye.ALLOW_UNKNOWN_PROTOCOLS || !1, ce = ye.ALLOW_SELF_CLOSE_IN_ATTR !== !1, we = ye.SAFE_FOR_TEMPLATES || !1, xe = ye.WHOLE_DOCUMENT || !1, Ce = ye.RETURN_DOM || !1, Le = ye.RETURN_DOM_FRAGMENT || !1, We = ye.RETURN_TRUSTED_TYPE || !1, Ye = ye.FORCE_BODY || !1, je = ye.SANITIZE_DOM !== !1, at = ye.SANITIZE_NAMED_PROPS || !1, Ge = ye.KEEP_CONTENT !== !1, Re = ye.IN_PLACE || !1, W = ye.ALLOWED_URI_REGEXP || W, Te = ye.NAMESPACE || he, ne = ye.CUSTOM_ELEMENT_HANDLING || {}, ye.CUSTOM_ELEMENT_HANDLING && Ct(ye.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (ne.tagNameCheck = ye.CUSTOM_ELEMENT_HANDLING.tagNameCheck), ye.CUSTOM_ELEMENT_HANDLING && Ct(ye.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (ne.attributeNameCheck = ye.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), ye.CUSTOM_ELEMENT_HANDLING && typeof ye.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (ne.allowCustomizedBuiltInElements = ye.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), we && (oe = !1), Le && (Ce = !0), se && (Z = Gr({}, _c(nH)), re = [], se.html === !0 && (Gr(Z, rH), Gr(re, iH)), se.svg === !0 && (Gr(Z, Q8), Gr(re, Y8), Gr(re, xS)), se.svgFilters === !0 && (Gr(Z, V8), Gr(re, Y8), Gr(re, xS)), se.mathMl === !0 && (Gr(Z, W8), Gr(re, sH), Gr(re, xS))), ye.ADD_TAGS && (Z === K && (Z = e0(Z)), Gr(Z, ye.ADD_TAGS, bt)), ye.ADD_ATTR && (re === pe && (re = e0(re)), Gr(re, ye.ADD_ATTR, bt)), ye.ADD_URI_SAFE_ATTR && Gr(H, ye.ADD_URI_SAFE_ATTR, bt), ye.FORBID_CONTENTS && (ve === Ee && (ve = e0(ve)), Gr(ve, ye.FORBID_CONTENTS, bt)), Ge && (Z["#text"] = !0), xe && Gr(Z, ["html", "head", "body"]), Z.table && (Gr(Z, ["tbody"]), delete le.tbody), po && po(ye), Pt = ye); - }, pt = Gr({}, ["mi", "mo", "mn", "ms", "mtext"]), Rt = Gr({}, ["foreignobject", "desc", "title", "annotation-xml"]), Ot = Gr({}, ["title", "style", "font", "a", "script"]), vt = Gr({}, Q8); - Gr(vt, V8), Gr(vt, zBe); - var Ft = Gr({}, W8); - Gr(Ft, qBe); - var kt = function(ye) { - var Qe = b(ye); - (!Qe || !Qe.tagName) && (Qe = { - namespaceURI: Te, - tagName: "template" - }); - var et = c3(ye.tagName), Et = c3(Qe.tagName); - return $e[ye.namespaceURI] ? ye.namespaceURI === te ? Qe.namespaceURI === he ? et === "svg" : Qe.namespaceURI === Q ? et === "svg" && (Et === "annotation-xml" || pt[Et]) : Boolean(vt[et]) : ye.namespaceURI === Q ? Qe.namespaceURI === he ? et === "math" : Qe.namespaceURI === te ? et === "math" && Rt[Et] : Boolean(Ft[et]) : ye.namespaceURI === he ? Qe.namespaceURI === te && !Rt[Et] || Qe.namespaceURI === Q && !pt[Et] ? !1 : !Ft[et] && (Ot[et] || !vt[et]) : !!(ct === "application/xhtml+xml" && $e[ye.namespaceURI]) : !1; - }, gt = function(ye) { - V2(e.removed, { - element: ye - }); - try { - ye.parentNode.removeChild(ye); - } catch { - try { - ye.outerHTML = S; - } catch { - ye.remove(); - } - } - }, Oe = function(ye, Qe) { - try { - V2(e.removed, { - attribute: Qe.getAttributeNode(ye), - from: Qe - }); - } catch { - V2(e.removed, { - attribute: null, - from: Qe - }); + camelcase: function(t) { + return t ? "True" : "False"; } - if (Qe.removeAttribute(ye), ye === "is" && !re[ye]) - if (Ce || Le) - try { - gt(Qe); - } catch { - } - else - try { - Qe.setAttribute(ye, ""); - } catch { + }, + defaultStyle: "lowercase" +}); +function lwt(t) { + return 48 <= t && t <= 57 || 65 <= t && t <= 70 || 97 <= t && t <= 102; +} +function cwt(t) { + return 48 <= t && t <= 55; +} +function uwt(t) { + return 48 <= t && t <= 57; +} +function hwt(t) { + if (t === null) + return !1; + var e = t.length, r = 0, n = !1, i; + if (!e) + return !1; + if (i = t[r], (i === "-" || i === "+") && (i = t[++r]), i === "0") { + if (r + 1 === e) + return !0; + if (i = t[++r], i === "b") { + for (r++; r < e; r++) + if (i = t[r], i !== "_") { + if (i !== "0" && i !== "1") + return !1; + n = !0; } - }, Ut = function(ye) { - var Qe, et; - if (Ye) - ye = "" + ye; - else { - var Et = IBe(ye, /^[\r\n\t ]+/); - et = Et && Et[0]; - } - ct === "application/xhtml+xml" && Te === he && (ye = '' + ye + ""); - var or = O ? O.createHTML(ye) : ye; - if (Te === he) - try { - Qe = new d().parseFromString(or, ct); - } catch { - } - if (!Qe || !Qe.documentElement) { - Qe = T.createDocument(Te, "template", null); - try { - Qe.documentElement.innerHTML = Se ? S : or; - } catch { - } + return n && i !== "_"; } - var tr = Qe.body || Qe.documentElement; - return ye && et && tr.insertBefore(n.createTextNode(et), tr.childNodes[0] || null), Te === he ? N.call(Qe, xe ? "html" : "body")[0] : xe ? Qe.documentElement : tr; - }, er = function(ye) { - return D.call( - ye.ownerDocument || ye, - ye, - l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT, - null, - !1 - ); - }, xt = function(ye) { - return ye instanceof f && (typeof ye.nodeName != "string" || typeof ye.textContent != "string" || typeof ye.removeChild != "function" || !(ye.attributes instanceof h) || typeof ye.removeAttribute != "function" || typeof ye.setAttribute != "function" || typeof ye.namespaceURI != "string" || typeof ye.insertBefore != "function" || typeof ye.hasChildNodes != "function"); - }, Me = function(ye) { - return Sd(a) === "object" ? ye instanceof a : ye && Sd(ye) === "object" && typeof ye.nodeType == "number" && typeof ye.nodeName == "string"; - }, it = function(ye, Qe, et) { - !F[ye] || NBe(F[ye], function(Et) { - Et.call(e, Qe, et, Pt); - }); - }, St = function(ye) { - var Qe; - if (it("beforeSanitizeElements", ye, null), xt(ye) || Ja(/[\u0080-\uFFFF]/, ye.nodeName)) - return gt(ye), !0; - var et = bt(ye.nodeName); - if (it("uponSanitizeElement", ye, { - tagName: et, - allowedTags: Z - }), ye.hasChildNodes() && !Me(ye.firstElementChild) && (!Me(ye.content) || !Me(ye.content.firstElementChild)) && Ja(/<[/\w]/g, ye.innerHTML) && Ja(/<[/\w]/g, ye.textContent) || et === "select" && Ja(/