md-editor-v3 7.0.0-0 → 7.1.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- "use strict";const tu=require("@vavt/util");var ru=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,iu=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,nu=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Q={Space_Separator:ru,ID_Start:iu,ID_Continue:nu},c={isSpaceSeparator(D){return typeof D=="string"&&Q.Space_Separator.test(D)},isIdStartChar(D){return typeof D=="string"&&(D>="a"&&D<="z"||D>="A"&&D<="Z"||D==="$"||D==="_"||Q.ID_Start.test(D))},isIdContinueChar(D){return typeof D=="string"&&(D>="a"&&D<="z"||D>="A"&&D<="Z"||D>="0"&&D<="9"||D==="$"||D==="_"||D==="‌"||D==="‍"||Q.ID_Continue.test(D))},isDigit(D){return typeof D=="string"&&/[0-9]/.test(D)},isHexDigit(D){return typeof D=="string"&&/[0-9A-Fa-f]/.test(D)}};let q,m,w,H,x,y,d,G,P;var su=function(i,F){q=String(i),m="start",w=[],H=0,x=1,y=0,d=void 0,G=void 0,P=void 0;do d=Fu(),Au[m]();while(d.type!=="eof");return typeof F=="function"?J({"":P},"",F):P};function J(D,i,F){const a=D[i];if(a!=null&&typeof a=="object")if(Array.isArray(a))for(let p=0;p<a.length;p++){const B=String(p),v=J(a,B,F);v===void 0?delete a[B]:Object.defineProperty(a,B,{value:v,writable:!0,enumerable:!0,configurable:!0})}else for(const p in a){const B=J(a,p,F);B===void 0?delete a[p]:Object.defineProperty(a,p,{value:B,writable:!0,enumerable:!0,configurable:!0})}return F.call(D,i,a)}let r,e,N,b,n;function Fu(){for(r="default",e="",N=!1,b=1;;){n=k();const D=Z[r]();if(D)return D}}function k(){if(q[H])return String.fromCodePoint(q.codePointAt(H))}function u(){const D=k();return D===`
2
- `?(x++,y=0):D?y+=D.length:y++,D&&(H+=D.length),D}const Z={default(){switch(n){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
3
- `:case"\r":case"\u2028":case"\u2029":u();return;case"/":u(),r="comment";return;case void 0:return u(),A("eof")}if(c.isSpaceSeparator(n)){u();return}return Z[m]()},comment(){switch(n){case"*":u(),r="multiLineComment";return;case"/":u(),r="singleLineComment";return}throw o(u())},multiLineComment(){switch(n){case"*":u(),r="multiLineCommentAsterisk";return;case void 0:throw o(u())}u()},multiLineCommentAsterisk(){switch(n){case"*":u();return;case"/":u(),r="default";return;case void 0:throw o(u())}u(),r="multiLineComment"},singleLineComment(){switch(n){case`
4
- `:case"\r":case"\u2028":case"\u2029":u(),r="default";return;case void 0:return u(),A("eof")}u()},value(){switch(n){case"{":case"[":return A("punctuator",u());case"n":return u(),O("ull"),A("null",null);case"t":return u(),O("rue"),A("boolean",!0);case"f":return u(),O("alse"),A("boolean",!1);case"-":case"+":u()==="-"&&(b=-1),r="sign";return;case".":e=u(),r="decimalPointLeading";return;case"0":e=u(),r="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":e=u(),r="decimalInteger";return;case"I":return u(),O("nfinity"),A("numeric",1/0);case"N":return u(),O("aN"),A("numeric",NaN);case'"':case"'":N=u()==='"',e="",r="string";return}throw o(u())},identifierNameStartEscape(){if(n!=="u")throw o(u());u();const D=W();switch(D){case"$":case"_":break;default:if(!c.isIdStartChar(D))throw V();break}e+=D,r="identifierName"},identifierName(){switch(n){case"$":case"_":case"‌":case"‍":e+=u();return;case"\\":u(),r="identifierNameEscape";return}if(c.isIdContinueChar(n)){e+=u();return}return A("identifier",e)},identifierNameEscape(){if(n!=="u")throw o(u());u();const D=W();switch(D){case"$":case"_":case"‌":case"‍":break;default:if(!c.isIdContinueChar(D))throw V();break}e+=D,r="identifierName"},sign(){switch(n){case".":e=u(),r="decimalPointLeading";return;case"0":e=u(),r="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":e=u(),r="decimalInteger";return;case"I":return u(),O("nfinity"),A("numeric",b*(1/0));case"N":return u(),O("aN"),A("numeric",NaN)}throw o(u())},zero(){switch(n){case".":e+=u(),r="decimalPoint";return;case"e":case"E":e+=u(),r="decimalExponent";return;case"x":case"X":e+=u(),r="hexadecimal";return}return A("numeric",b*0)},decimalInteger(){switch(n){case".":e+=u(),r="decimalPoint";return;case"e":case"E":e+=u(),r="decimalExponent";return}if(c.isDigit(n)){e+=u();return}return A("numeric",b*Number(e))},decimalPointLeading(){if(c.isDigit(n)){e+=u(),r="decimalFraction";return}throw o(u())},decimalPoint(){switch(n){case"e":case"E":e+=u(),r="decimalExponent";return}if(c.isDigit(n)){e+=u(),r="decimalFraction";return}return A("numeric",b*Number(e))},decimalFraction(){switch(n){case"e":case"E":e+=u(),r="decimalExponent";return}if(c.isDigit(n)){e+=u();return}return A("numeric",b*Number(e))},decimalExponent(){switch(n){case"+":case"-":e+=u(),r="decimalExponentSign";return}if(c.isDigit(n)){e+=u(),r="decimalExponentInteger";return}throw o(u())},decimalExponentSign(){if(c.isDigit(n)){e+=u(),r="decimalExponentInteger";return}throw o(u())},decimalExponentInteger(){if(c.isDigit(n)){e+=u();return}return A("numeric",b*Number(e))},hexadecimal(){if(c.isHexDigit(n)){e+=u(),r="hexadecimalInteger";return}throw o(u())},hexadecimalInteger(){if(c.isHexDigit(n)){e+=u();return}return A("numeric",b*Number(e))},string(){switch(n){case"\\":u(),e+=au();return;case'"':if(N)return u(),A("string",e);e+=u();return;case"'":if(!N)return u(),A("string",e);e+=u();return;case`
5
- `:case"\r":throw o(u());case"\u2028":case"\u2029":ou(n);break;case void 0:throw o(u())}e+=u()},start(){switch(n){case"{":case"[":return A("punctuator",u())}r="value"},beforePropertyName(){switch(n){case"$":case"_":e=u(),r="identifierName";return;case"\\":u(),r="identifierNameStartEscape";return;case"}":return A("punctuator",u());case'"':case"'":N=u()==='"',r="string";return}if(c.isIdStartChar(n)){e+=u(),r="identifierName";return}throw o(u())},afterPropertyName(){if(n===":")return A("punctuator",u());throw o(u())},beforePropertyValue(){r="value"},afterPropertyValue(){switch(n){case",":case"}":return A("punctuator",u())}throw o(u())},beforeArrayValue(){if(n==="]")return A("punctuator",u());r="value"},afterArrayValue(){switch(n){case",":case"]":return A("punctuator",u())}throw o(u())},end(){throw o(u())}};function A(D,i){return{type:D,value:i,line:x,column:y}}function O(D){for(const i of D){if(k()!==i)throw o(u());u()}}function au(){switch(k()){case"b":return u(),"\b";case"f":return u(),"\f";case"n":return u(),`
6
- `;case"r":return u(),"\r";case"t":return u()," ";case"v":return u(),"\v";case"0":if(u(),c.isDigit(k()))throw o(u());return"\0";case"x":return u(),Cu();case"u":return u(),W();case`
7
- `:case"\u2028":case"\u2029":return u(),"";case"\r":return u(),k()===`
8
- `&&u(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw o(u());case void 0:throw o(u())}return u()}function Cu(){let D="",i=k();if(!c.isHexDigit(i)||(D+=u(),i=k(),!c.isHexDigit(i)))throw o(u());return D+=u(),String.fromCodePoint(parseInt(D,16))}function W(){let D="",i=4;for(;i-- >0;){const F=k();if(!c.isHexDigit(F))throw o(u());D+=u()}return String.fromCodePoint(parseInt(D,16))}const Au={start(){if(d.type==="eof")throw j();z()},beforePropertyName(){switch(d.type){case"identifier":case"string":G=d.value,m="afterPropertyName";return;case"punctuator":L();return;case"eof":throw j()}},afterPropertyName(){if(d.type==="eof")throw j();m="beforePropertyValue"},beforePropertyValue(){if(d.type==="eof")throw j();z()},beforeArrayValue(){if(d.type==="eof")throw j();if(d.type==="punctuator"&&d.value==="]"){L();return}z()},afterPropertyValue(){if(d.type==="eof")throw j();switch(d.value){case",":m="beforePropertyName";return;case"}":L()}},afterArrayValue(){if(d.type==="eof")throw j();switch(d.value){case",":m="beforeArrayValue";return;case"]":L()}},end(){}};function z(){let D;switch(d.type){case"punctuator":switch(d.value){case"{":D={};break;case"[":D=[];break}break;case"null":case"boolean":case"numeric":case"string":D=d.value;break}if(P===void 0)P=D;else{const i=w[w.length-1];Array.isArray(i)?i.push(D):Object.defineProperty(i,G,{value:D,writable:!0,enumerable:!0,configurable:!0})}if(D!==null&&typeof D=="object")w.push(D),Array.isArray(D)?m="beforeArrayValue":m="beforePropertyName";else{const i=w[w.length-1];i==null?m="end":Array.isArray(i)?m="afterArrayValue":m="afterPropertyValue"}}function L(){w.pop();const D=w[w.length-1];D==null?m="end":Array.isArray(D)?m="afterArrayValue":m="afterPropertyValue"}function o(D){return U(D===void 0?`JSON5: invalid end of input at ${x}:${y}`:`JSON5: invalid character '${X(D)}' at ${x}:${y}`)}function j(){return U(`JSON5: invalid end of input at ${x}:${y}`)}function V(){return y-=5,U(`JSON5: invalid identifier character at ${x}:${y}`)}function ou(D){console.warn(`JSON5: '${X(D)}' in strings is not valid ECMAScript; consider escaping`)}function X(D){const i={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(i[D])return i[D];if(D<" "){const F=D.charCodeAt(0).toString(16);return"\\x"+("00"+F).substring(F.length)}return D}function U(D){const i=new SyntaxError(D);return i.lineNumber=x,i.columnNumber=y,i}var Eu=function(i,F,a){const p=[];let B="",v,$,S="",K;if(F!=null&&typeof F=="object"&&!Array.isArray(F)&&(a=F.space,K=F.quote,F=F.replacer),typeof F=="function")$=F;else if(Array.isArray(F)){v=[];for(const s of F){let E;typeof s=="string"?E=s:(typeof s=="number"||s instanceof String||s instanceof Number)&&(E=String(s)),E!==void 0&&v.indexOf(E)<0&&v.push(E)}}return a instanceof Number?a=Number(a):a instanceof String&&(a=String(a)),typeof a=="number"?a>0&&(a=Math.min(10,Math.floor(a)),S=" ".substr(0,a)):typeof a=="string"&&(S=a.substr(0,10)),M("",{"":i});function M(s,E){let t=E[s];switch(t!=null&&(typeof t.toJSON5=="function"?t=t.toJSON5(s):typeof t.toJSON=="function"&&(t=t.toJSON(s))),$&&(t=$.call(E,s,t)),t instanceof Number?t=Number(t):t instanceof String?t=String(t):t instanceof Boolean&&(t=t.valueOf()),t){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof t=="string")return T(t);if(typeof t=="number")return String(t);if(typeof t=="object")return Array.isArray(t)?eu(t):uu(t)}function T(s){const E={"'":.1,'"':.2},t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let f="";for(let l=0;l<s.length;l++){const h=s[l];switch(h){case"'":case'"':E[h]++,f+=h;continue;case"\0":if(c.isDigit(s[l+1])){f+="\\x00";continue}}if(t[h]){f+=t[h];continue}if(h<" "){let I=h.charCodeAt(0).toString(16);f+="\\x"+("00"+I).substring(I.length);continue}f+=h}const g=K||Object.keys(E).reduce((l,h)=>E[l]<E[h]?l:h);return f=f.replace(new RegExp(g,"g"),t[g]),g+f+g}function uu(s){if(p.indexOf(s)>=0)throw TypeError("Converting circular structure to JSON5");p.push(s);let E=B;B=B+S;let t=v||Object.keys(s),f=[];for(const l of t){const h=M(l,s);if(h!==void 0){let I=Du(l)+":";S!==""&&(I+=" "),I+=h,f.push(I)}}let g;if(f.length===0)g="{}";else{let l;if(S==="")l=f.join(","),g="{"+l+"}";else{let h=`,
9
- `+B;l=f.join(h),g=`{
10
- `+B+l+`,
11
- `+E+"}"}}return p.pop(),B=E,g}function Du(s){if(s.length===0)return T(s);const E=String.fromCodePoint(s.codePointAt(0));if(!c.isIdStartChar(E))return T(s);for(let t=E.length;t<s.length;t++)if(!c.isIdContinueChar(String.fromCodePoint(s.codePointAt(t))))return T(s);return s}function eu(s){if(p.indexOf(s)>=0)throw TypeError("Converting circular structure to JSON5");p.push(s);let E=B;B=B+S;let t=[];for(let g=0;g<s.length;g++){const l=M(String(g),s);t.push(l!==void 0?l:"null")}let f;if(t.length===0)f="[]";else if(S==="")f="["+t.join(",")+"]";else{let g=`,
12
- `+B,l=t.join(g);f=`[
13
- `+B+l+`,
14
- `+E+"]"}return p.pop(),B=E,f}};const cu={parse:su,stringify:Eu};var lu=cu;const Bu="md-editor",fu="MdEditor",C="https://unpkg.com",du=`${C}/@highlightjs/cdn-assets@11.12.0/highlight.min.js`,R={main:`${C}/prettier@3.9.6/standalone.js`,markdown:`${C}/prettier@3.9.6/plugins/markdown.js`},gu={css:`${C}/cropperjs@1.6.3/dist/cropper.min.css`,js:`${C}/cropperjs@1.6.3/dist/cropper.min.js`},hu=`${C}/screenfull@5.2.0/dist/screenfull.js`,mu=`${C}/mermaid@11.17.2/dist/mermaid.min.js`,pu={js:`${C}/katex@0.18.5/dist/katex.min.js`,css:`${C}/katex@0.18.5/dist/katex.min.css`},Y={a11y:{light:`${C}/@highlightjs/cdn-assets@11.12.0/styles/a11y-light.min.css`,dark:`${C}/@highlightjs/cdn-assets@11.12.0/styles/a11y-dark.min.css`},atom:{light:`${C}/@highlightjs/cdn-assets@11.12.0/styles/atom-one-light.min.css`,dark:`${C}/@highlightjs/cdn-assets@11.12.0/styles/atom-one-dark.min.css`},github:{light:`${C}/@highlightjs/cdn-assets@11.12.0/styles/github.min.css`,dark:`${C}/@highlightjs/cdn-assets@11.12.0/styles/github-dark.min.css`},gradient:{light:`${C}/@highlightjs/cdn-assets@11.12.0/styles/gradient-light.min.css`,dark:`${C}/@highlightjs/cdn-assets@11.12.0/styles/gradient-dark.min.css`},kimbie:{light:`${C}/@highlightjs/cdn-assets@11.12.0/styles/kimbie-light.min.css`,dark:`${C}/@highlightjs/cdn-assets@11.12.0/styles/kimbie-dark.min.css`},paraiso:{light:`${C}/@highlightjs/cdn-assets@11.12.0/styles/paraiso-light.min.css`,dark:`${C}/@highlightjs/cdn-assets@11.12.0/styles/paraiso-dark.min.css`},qtcreator:{light:`${C}/@highlightjs/cdn-assets@11.12.0/styles/qtcreator-light.min.css`,dark:`${C}/@highlightjs/cdn-assets@11.12.0/styles/qtcreator-dark.min.css`},stackoverflow:{light:`${C}/@highlightjs/cdn-assets@11.12.0/styles/stackoverflow-light.min.css`,dark:`${C}/@highlightjs/cdn-assets@11.12.0/styles/stackoverflow-dark.min.css`}},yu=`${C}/echarts@6.1.0/dist/echarts.min.js`,bu={highlight:{js:{integrity:"sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix",crossOrigin:"anonymous"},css:{a11y:{light:{integrity:"sha384-qdZDAN3jffvh670RHw1wxLekabidEFaNRninYgIzBvMbL6WlHdXeHS/Bt+vx33lN",crossOrigin:"anonymous"},dark:{integrity:"sha384-2QAAjX8pqaM5azX68KWI2wExF6Q13kY4kEiQFY4b/1zPe6rpgmTByNpDEllH3sb+",crossOrigin:"anonymous"}},atom:{light:{integrity:"sha384-w6Ujm1VWa9HYFqGc89oAPn/DWDi2gUamjNrq9DRvEYm2X3ClItg9Y9xs1ViVo5b5",crossOrigin:"anonymous"},dark:{integrity:"sha384-oaMLBGEzBOJx3UHwac0cVndtX5fxGQIfnAeFZ35RTgqPcYlbprH9o9PUV/F8Le07",crossOrigin:"anonymous"}},github:{light:{integrity:"sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L",crossOrigin:"anonymous"},dark:{integrity:"sha384-wH75j6z1lH97ZOpMOInqhgKzFkAInZPPSPlZpYKYTOqsaizPvhQZmAtLcPKXpLyH",crossOrigin:"anonymous"}},gradient:{light:{integrity:"sha384-yErHBR8aEZPxRl3XmR8dGSRAclMlnSRRw8sXQLcmPWzWUvb56BzQmBw3EWHl7QGI",crossOrigin:"anonymous"},dark:{integrity:"sha384-lUCvtSOdvDbp5hLWKgwz/taFu1HxlpqES2OVP5UG2JMTfnU481gXcBhGF9lAGoSr",crossOrigin:"anonymous"}},kimbie:{light:{integrity:"sha384-tloeSLUPczAvoZ48TUz+OxRie0oYLCRwlkadUXovGzzJEIbNQB2TkfUuvJ6SW5Mi",crossOrigin:"anonymous"},dark:{integrity:"sha384-o5F1vUaMNOmou1sQrsWiFo4/QUGSV0svqNZW+EesmKxWC8MpFJcveBhAyfvTHbGb",crossOrigin:"anonymous"}},paraiso:{light:{integrity:"sha384-5j6QHU2Hwg1ehtlIQNDebhETDB8bga3/88hzBFsMRaGmgQHCftqIN7GZNDNw0vTL",crossOrigin:"anonymous"},dark:{integrity:"sha384-I5vnnMQu0LWDQnHpT61xyoMwKarAB8jpZkB2ioFOlmzUFnIFaV4QbUwlBBOMKhTH",crossOrigin:"anonymous"}},qtcreator:{light:{integrity:"sha384-iEBgHrwi8Hv4dSZBz+MOGvS05rF7I7fGKM2fASQyE9jn2Istg9Qd5dSoK18WyRTB",crossOrigin:"anonymous"},dark:{integrity:"sha384-D6LXJGWNR4QV7gnpuP3ccbvOYoR02td3cU0y7lESABPg/tzCSC4m+y+M2TtrmpHc",crossOrigin:"anonymous"}},stackoverflow:{light:{integrity:"sha384-FMwt7cTGo4aLxZnno5k0xTj0W4gmi48Kwept+y/oQmE6cFk36Kr+QJZOKNOQwORe",crossOrigin:"anonymous"},dark:{integrity:"sha384-iL+x+BroCyHm/p2c6sMA9umXhdCWp2cKe4QUjPeMzHgwXAk+ZxHyIGP3NZTZensU",crossOrigin:"anonymous"}}}},prettier:{standaloneJs:{integrity:"sha384-+W7xqeAu5I/86lmhtNbTUhXsleRqShVIHN475c2jis2jC/2u7yauvSMLvoWpOcRR",crossOrigin:"anonymous"},parserMarkdownJs:{integrity:"sha384-i4vYrgvZzKDF8P9xog44TQUyDL6uIGMYBrmvTQSgClA0mKyxAHAv9ACYN+FgJLWc",crossOrigin:"anonymous"}},cropper:{js:{integrity:"sha384-aKBOyDyHi7nysLl4xSArmbTpotGkhOQNGnSQaljyIveY3ofQZ3GWak4U9F5NcPxI",crossOrigin:"anonymous"},css:{integrity:"sha384-4B0iRmDz7QrXJK2xob77YvAC46zoUOJDr2MOKrkWWR7QoJg9i63rGSnCwIjGYGHs",crossOrigin:"anonymous"}},screenfull:{js:{integrity:"sha384-Qfbv8upMDu/ikv42M0Jnym2hahbDQ77Nm8PGU0G+iA6UIwt1+scE6P1qKXA0anWU",crossOrigin:"anonymous"}},mermaid:{js:{integrity:"sha384-EOXBFmc3gx5mb+vn0vPvvGqACToJD24hhacX5Yx+8NUUQrHIle/Qi5Bg9o3zKwW2",crossOrigin:"anonymous"}},katex:{js:{integrity:"sha384-TTF8eEsEKInX2meLzP5V1z/npGYIElXYGksx93f0qBZHu6IL3PdzVB8objytx+TR",crossOrigin:"anonymous"},css:{integrity:"sha384-2dNi/m6JtSiviznrOIZ5fTiZ5As0In2QwkuXSgoqcQtCNplvJAbt+jveeN+8en73",crossOrigin:"anonymous"}},echarts:{js:{integrity:"sha384-C2iskrW/uPW46KzOjrvJIQo4YkV8lkD+QS0CrDN18IIPIpT/g2USu8bTP3nvmIAD",crossOrigin:"anonymous"}}},wu=["bold","underline","italic","strikeThrough","-","title","sub","sup","quote","unorderedList","orderedList","task","-","codeRow","code","link","image","table","mermaid","katex","-","revoke","next","save","=","prettier","pageFullscreen","fullscreen","preview","previewOnly","htmlPreview","catalog","github"],ku=["markdownTotal","=","scrollSwitch"],xu={"zh-CN":{toolbarTips:{bold:"加粗",underline:"下划线",italic:"斜体",strikeThrough:"删除线",title:"标题",sub:"下标",sup:"上标",quote:"引用",unorderedList:"无序列表",orderedList:"有序列表",task:"任务列表",codeRow:"行内代码",code:"块级代码",link:"链接",image:"图片",table:"表格",mermaid:"mermaid图",katex:"katex公式",revoke:"后退",next:"前进",save:"保存",prettier:"美化",pageFullscreen:"浏览器全屏",fullscreen:"屏幕全屏",preview:"预览",previewOnly:"仅预览",htmlPreview:"html代码预览",catalog:"目录",github:"源码地址"},titleItem:{h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题"},imgTitleItem:{link:"添加链接",upload:"上传图片",clip2upload:"裁剪上传"},linkModalTips:{linkTitle:"添加链接",imageTitle:"添加图片",descLabel:"链接描述:",descLabelPlaceHolder:"请输入描述...",urlLabel:"链接地址:",urlLabelPlaceHolder:"请输入链接...",buttonOK:"确定"},clipModalTips:{title:"裁剪图片上传",buttonUpload:"上传"},copyCode:{text:"复制代码",successTips:"已复制!",failTips:"复制失败!"},mermaid:{flow:"流程图",sequence:"时序图",gantt:"甘特图",class:"类图",state:"状态图",pie:"饼图",relationship:"关系图",journey:"旅程图"},katex:{inline:"行内公式",block:"块级公式"},footer:{markdownTotal:"字数",scrollAuto:"同步滚动"}},"en-US":{toolbarTips:{bold:"bold",underline:"underline",italic:"italic",strikeThrough:"strikeThrough",title:"title",sub:"subscript",sup:"superscript",quote:"quote",unorderedList:"unordered list",orderedList:"ordered list",task:"task list",codeRow:"inline code",code:"block-level code",link:"link",image:"image",table:"table",mermaid:"mermaid",katex:"formula",revoke:"revoke",next:"undo revoke",save:"save",prettier:"prettier",pageFullscreen:"fullscreen in page",fullscreen:"fullscreen",preview:"preview",previewOnly:"preview only",htmlPreview:"html preview",catalog:"catalog",github:"source code"},titleItem:{h1:"Lv1 Heading",h2:"Lv2 Heading",h3:"Lv3 Heading",h4:"Lv4 Heading",h5:"Lv5 Heading",h6:"Lv6 Heading"},imgTitleItem:{link:"Add Image Link",upload:"Upload Images",clip2upload:"Crop And Upload"},linkModalTips:{linkTitle:"Add Link",imageTitle:"Add Image",descLabel:"Desc:",descLabelPlaceHolder:"Enter a description...",urlLabel:"Link:",urlLabelPlaceHolder:"Enter a link...",buttonOK:"OK"},clipModalTips:{title:"Crop Image",buttonUpload:"Upload"},copyCode:{text:"Copy",successTips:"Copied!",failTips:"Copy failed!"},mermaid:{flow:"flow",sequence:"sequence",gantt:"gantt",class:"class",state:"state",pie:"pie",relationship:"relationship",journey:"journey"},katex:{inline:"inline",block:"block"},footer:{markdownTotal:"Character Count",scrollAuto:"Scroll Auto"}}},_={editorExtensions:{highlight:{js:du,css:Y},prettier:{standaloneJs:R.main,parserMarkdownJs:R.markdown},cropper:{...gu},screenfull:{js:hu},mermaid:{js:mu,enableZoom:!0},katex:{...pu},echarts:{js:yu,parseOption:D=>{let i;try{i=lu.parse(D)}catch(F){const a=F instanceof Error?F.message:String(F);throw new SyntaxError(`Invalid ECharts option: ${a}`,{cause:F})}if(!i||typeof i!="object"||Array.isArray(i))throw new TypeError("ECharts option must be an object.");return i}}},editorExtensionsAttrs:{},editorConfig:{languageUserDefined:{},mermaidTemplate:{},renderDelay:500,zIndex:2e4},codeMirrorExtensions:D=>D,markdownItConfig:()=>{},markdownItPlugins:D=>D,mermaidConfig:D=>D,katexConfig:D=>D,echartsConfig:D=>D},vu=D=>tu.deepMerge(_,D,{excludeKeys(i){return/[iI]{1}nstance/.test(i)}}),Su=.1;exports.MinInputBoxWidth=Su;exports.allFooter=ku;exports.allToolbar=wu;exports.codeCss=Y;exports.config=vu;exports.editorExtensionsAttrs=bu;exports.globalConfig=_;exports.prefix=Bu;exports.prefixHump=fu;exports.staticTextDefault=xu;
1
+ "use strict";const Cu=require("@vavt/util");var Au=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,cu=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Eu=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,K={Space_Separator:Au,ID_Start:cu,ID_Continue:Eu},g={isSpaceSeparator(u){return typeof u=="string"&&K.Space_Separator.test(u)},isIdStartChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||K.ID_Start.test(u))},isIdContinueChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||u==="$"||u==="_"||u==="‌"||u==="‍"||K.ID_Continue.test(u))},isDigit(u){return typeof u=="string"&&/[0-9]/.test(u)},isHexDigit(u){return typeof u=="string"&&/[0-9A-Fa-f]/.test(u)}};let X,x,N,J,P,O,y,Du,M;var lu=function(e,t){X=String(e),x="start",N=[],J=0,P=1,O=0,y=void 0,Du=void 0,M=void 0;do y=Bu(),gu[x]();while(y.type!=="eof");return typeof t=="function"?Y({"":M},"",t):M};function Y(u,e,t){const r=u[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let F=0;F<r.length;F++){const C=String(F),n=Y(r,C,t);n===void 0?delete r[C]:Object.defineProperty(r,C,{value:n,writable:!0,enumerable:!0,configurable:!0})}else for(const F in r){const C=Y(r,F,t);C===void 0?delete r[F]:Object.defineProperty(r,F,{value:C,writable:!0,enumerable:!0,configurable:!0})}return t.call(u,e,r)}let o,s,U,j,A;function Bu(){for(o="default",s="",U=!1,j=1;;){A=T();const u=su[o]();if(u)return u}}function T(){if(X[J])return String.fromCodePoint(X.codePointAt(J))}function D(){const u=T();return u===`
2
+ `?(P++,O=0):u?O+=u.length:O++,u&&(J+=u.length),u}const su={default(){switch(A){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
3
+ `:case"\r":case"\u2028":case"\u2029":D();return;case"/":D(),o="comment";return;case void 0:return D(),l("eof")}if(g.isSpaceSeparator(A)){D();return}return su[x]()},comment(){switch(A){case"*":D(),o="multiLineComment";return;case"/":D(),o="singleLineComment";return}throw B(D())},multiLineComment(){switch(A){case"*":D(),o="multiLineCommentAsterisk";return;case void 0:throw B(D())}D()},multiLineCommentAsterisk(){switch(A){case"*":D();return;case"/":D(),o="default";return;case void 0:throw B(D())}D(),o="multiLineComment"},singleLineComment(){switch(A){case`
4
+ `:case"\r":case"\u2028":case"\u2029":D(),o="default";return;case void 0:return D(),l("eof")}D()},value(){switch(A){case"{":case"[":return l("punctuator",D());case"n":return D(),L("ull"),l("null",null);case"t":return D(),L("rue"),l("boolean",!0);case"f":return D(),L("alse"),l("boolean",!1);case"-":case"+":D()==="-"&&(j=-1),o="sign";return;case".":s=D(),o="decimalPointLeading";return;case"0":s=D(),o="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s=D(),o="decimalInteger";return;case"I":return D(),L("nfinity"),l("numeric",1/0);case"N":return D(),L("aN"),l("numeric",NaN);case'"':case"'":U=D()==='"',s="",o="string";return}throw B(D())},identifierNameStartEscape(){if(A!=="u")throw B(D());D();const u=_();switch(u){case"$":case"_":break;default:if(!g.isIdStartChar(u))throw eu();break}s+=u,o="identifierName"},identifierName(){switch(A){case"$":case"_":case"‌":case"‍":s+=D();return;case"\\":D(),o="identifierNameEscape";return}if(g.isIdContinueChar(A)){s+=D();return}return l("identifier",s)},identifierNameEscape(){if(A!=="u")throw B(D());D();const u=_();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!g.isIdContinueChar(u))throw eu();break}s+=u,o="identifierName"},sign(){switch(A){case".":s=D(),o="decimalPointLeading";return;case"0":s=D(),o="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s=D(),o="decimalInteger";return;case"I":return D(),L("nfinity"),l("numeric",j*(1/0));case"N":return D(),L("aN"),l("numeric",NaN)}throw B(D())},zero(){switch(A){case".":s+=D(),o="decimalPoint";return;case"e":case"E":s+=D(),o="decimalExponent";return;case"x":case"X":s+=D(),o="hexadecimal";return}return l("numeric",j*0)},decimalInteger(){switch(A){case".":s+=D(),o="decimalPoint";return;case"e":case"E":s+=D(),o="decimalExponent";return}if(g.isDigit(A)){s+=D();return}return l("numeric",j*Number(s))},decimalPointLeading(){if(g.isDigit(A)){s+=D(),o="decimalFraction";return}throw B(D())},decimalPoint(){switch(A){case"e":case"E":s+=D(),o="decimalExponent";return}if(g.isDigit(A)){s+=D(),o="decimalFraction";return}return l("numeric",j*Number(s))},decimalFraction(){switch(A){case"e":case"E":s+=D(),o="decimalExponent";return}if(g.isDigit(A)){s+=D();return}return l("numeric",j*Number(s))},decimalExponent(){switch(A){case"+":case"-":s+=D(),o="decimalExponentSign";return}if(g.isDigit(A)){s+=D(),o="decimalExponentInteger";return}throw B(D())},decimalExponentSign(){if(g.isDigit(A)){s+=D(),o="decimalExponentInteger";return}throw B(D())},decimalExponentInteger(){if(g.isDigit(A)){s+=D();return}return l("numeric",j*Number(s))},hexadecimal(){if(g.isHexDigit(A)){s+=D(),o="hexadecimalInteger";return}throw B(D())},hexadecimalInteger(){if(g.isHexDigit(A)){s+=D();return}return l("numeric",j*Number(s))},string(){switch(A){case"\\":D(),s+=fu();return;case'"':if(U)return D(),l("string",s);s+=D();return;case"'":if(!U)return D(),l("string",s);s+=D();return;case`
5
+ `:case"\r":throw B(D());case"\u2028":case"\u2029":hu(A);break;case void 0:throw B(D())}s+=D()},start(){switch(A){case"{":case"[":return l("punctuator",D())}o="value"},beforePropertyName(){switch(A){case"$":case"_":s=D(),o="identifierName";return;case"\\":D(),o="identifierNameStartEscape";return;case"}":return l("punctuator",D());case'"':case"'":U=D()==='"',o="string";return}if(g.isIdStartChar(A)){s+=D(),o="identifierName";return}throw B(D())},afterPropertyName(){if(A===":")return l("punctuator",D());throw B(D())},beforePropertyValue(){o="value"},afterPropertyValue(){switch(A){case",":case"}":return l("punctuator",D())}throw B(D())},beforeArrayValue(){if(A==="]")return l("punctuator",D());o="value"},afterArrayValue(){switch(A){case",":case"]":return l("punctuator",D())}throw B(D())},end(){throw B(D())}};function l(u,e){return{type:u,value:e,line:P,column:O}}function L(u){for(const e of u){if(T()!==e)throw B(D());D()}}function fu(){switch(T()){case"b":return D(),"\b";case"f":return D(),"\f";case"n":return D(),`
6
+ `;case"r":return D(),"\r";case"t":return D()," ";case"v":return D(),"\v";case"0":if(D(),g.isDigit(T()))throw B(D());return"\0";case"x":return D(),du();case"u":return D(),_();case`
7
+ `:case"\u2028":case"\u2029":return D(),"";case"\r":return D(),T()===`
8
+ `&&D(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw B(D());case void 0:throw B(D())}return D()}function du(){let u="",e=T();if(!g.isHexDigit(e)||(u+=D(),e=T(),!g.isHexDigit(e)))throw B(D());return u+=D(),String.fromCodePoint(parseInt(u,16))}function _(){let u="",e=4;for(;e-- >0;){const t=T();if(!g.isHexDigit(t))throw B(D());u+=D()}return String.fromCodePoint(parseInt(u,16))}const gu={start(){if(y.type==="eof")throw H();Z()},beforePropertyName(){switch(y.type){case"identifier":case"string":Du=y.value,x="afterPropertyName";return;case"punctuator":Q();return;case"eof":throw H()}},afterPropertyName(){if(y.type==="eof")throw H();x="beforePropertyValue"},beforePropertyValue(){if(y.type==="eof")throw H();Z()},beforeArrayValue(){if(y.type==="eof")throw H();if(y.type==="punctuator"&&y.value==="]"){Q();return}Z()},afterPropertyValue(){if(y.type==="eof")throw H();switch(y.value){case",":x="beforePropertyName";return;case"}":Q()}},afterArrayValue(){if(y.type==="eof")throw H();switch(y.value){case",":x="beforeArrayValue";return;case"]":Q()}},end(){}};function Z(){let u;switch(y.type){case"punctuator":switch(y.value){case"{":u={};break;case"[":u=[];break}break;case"null":case"boolean":case"numeric":case"string":u=y.value;break}if(M===void 0)M=u;else{const e=N[N.length-1];Array.isArray(e)?e.push(u):Object.defineProperty(e,Du,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(u!==null&&typeof u=="object")N.push(u),Array.isArray(u)?x="beforeArrayValue":x="beforePropertyName";else{const e=N[N.length-1];e==null?x="end":Array.isArray(e)?x="afterArrayValue":x="afterPropertyValue"}}function Q(){N.pop();const u=N[N.length-1];u==null?x="end":Array.isArray(u)?x="afterArrayValue":x="afterPropertyValue"}function B(u){return W(u===void 0?`JSON5: invalid end of input at ${P}:${O}`:`JSON5: invalid character '${au(u)}' at ${P}:${O}`)}function H(){return W(`JSON5: invalid end of input at ${P}:${O}`)}function eu(){return O-=5,W(`JSON5: invalid identifier character at ${P}:${O}`)}function hu(u){console.warn(`JSON5: '${au(u)}' in strings is not valid ECMAScript; consider escaping`)}function au(u){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[u])return e[u];if(u<" "){const t=u.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return u}function W(u){const e=new SyntaxError(u);return e.lineNumber=P,e.columnNumber=O,e}var pu=function(e,t,r){const F=[];let C="",n,b,i="",f;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(r=t.space,f=t.quote,t=t.replacer),typeof t=="function")b=t;else if(Array.isArray(t)){n=[];for(const c of t){let d;typeof c=="string"?d=c:(typeof c=="number"||c instanceof String||c instanceof Number)&&(d=String(c)),d!==void 0&&n.indexOf(d)<0&&n.push(d)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r=="number"?r>0&&(r=Math.min(10,Math.floor(r)),i=" ".substr(0,r)):typeof r=="string"&&(i=r.substr(0,10)),p("",{"":e});function p(c,d){let a=d[c];switch(a!=null&&(typeof a.toJSON5=="function"?a=a.toJSON5(c):typeof a.toJSON=="function"&&(a=a.toJSON(c))),b&&(a=b.call(d,c,a)),a instanceof Number?a=Number(a):a instanceof String?a=String(a):a instanceof Boolean&&(a=a.valueOf()),a){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof a=="string")return S(a);if(typeof a=="number")return String(a);if(typeof a=="object")return Array.isArray(a)?R(a):I(a)}function S(c){const d={"'":.1,'"':.2},a={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let m="";for(let h=0;h<c.length;h++){const k=c[h];switch(k){case"'":case'"':d[k]++,m+=k;continue;case"\0":if(g.isDigit(c[h+1])){m+="\\x00";continue}}if(a[k]){m+=a[k];continue}if(k<" "){let $=k.charCodeAt(0).toString(16);m+="\\x"+("00"+$).substring($.length);continue}m+=k}const w=f||Object.keys(d).reduce((h,k)=>d[h]<d[k]?h:k);return m=m.replace(new RegExp(w,"g"),a[w]),w+m+w}function I(c){if(F.indexOf(c)>=0)throw TypeError("Converting circular structure to JSON5");F.push(c);let d=C;C=C+i;let a=n||Object.keys(c),m=[];for(const h of a){const k=p(h,c);if(k!==void 0){let $=q(h)+":";i!==""&&($+=" "),$+=k,m.push($)}}let w;if(m.length===0)w="{}";else{let h;if(i==="")h=m.join(","),w="{"+h+"}";else{let k=`,
9
+ `+C;h=m.join(k),w=`{
10
+ `+C+h+`,
11
+ `+d+"}"}}return F.pop(),C=d,w}function q(c){if(c.length===0)return S(c);const d=String.fromCodePoint(c.codePointAt(0));if(!g.isIdStartChar(d))return S(c);for(let a=d.length;a<c.length;a++)if(!g.isIdContinueChar(String.fromCodePoint(c.codePointAt(a))))return S(c);return c}function R(c){if(F.indexOf(c)>=0)throw TypeError("Converting circular structure to JSON5");F.push(c);let d=C;C=C+i;let a=[];for(let w=0;w<c.length;w++){const h=p(String(w),c);a.push(h!==void 0?h:"null")}let m;if(a.length===0)m="[]";else if(i==="")m="["+a.join(",")+"]";else{let w=`,
12
+ `+C,h=a.join(w);m=`[
13
+ `+C+h+`,
14
+ `+d+"]"}return F.pop(),C=d,m}};const mu={parse:lu,stringify:pu};var yu=mu;const G=u=>u.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;"),bu=/^\s*\d+(?:\s*-\s*\d+)?(?:\s*,\s*\d+(?:\s*-\s*\d+)?)*\s*$/,wu=u=>{const e=u.search(/\s/);let t="",r=!1;for(let F=0;F<u.length;F+=1){const C=u[F];if(t){if(r){r=!1;continue}if(C==="\\"){r=!0;continue}C===t&&(t="");continue}if(C==='"'||C==="'"||C==="`"){t=C;continue}if(C!=="{")continue;const n=u.indexOf("}",F+1);if(n===-1)break;const b=u.slice(F+1,n);if(!bu.test(b))continue;const i=u[F-1]||"",f=u[n+1]||"",p=!f||/\s/.test(f),S=(e===-1||F<e)&&(!i||!/[\s="'`]/.test(i))&&p,I=(!i||/\s/.test(i))&&p;if(S||I)return{endIndex:n+1,startIndex:F,value:b}}return null},ku=(u,e="")=>{const t=`${u}${e?` ${e}`:""}`.trim(),r=wu(t),F=r?`${t.slice(0,r.startIndex)} ${t.slice(r.endIndex)}`.trim():t,C=F.search(/\s/),n=C===-1?F:F.slice(0,C),b=C===-1?"":F.slice(C).trim(),i=r?r.value.split(",").reduce((f,p)=>{const[S,I]=p.split("-").map(R=>Number.parseInt(R.trim(),10)),q=I??S;return S>0&&q>=S&&f.push({start:S,end:q}),f},[]):[];return{attrs:b,language:n,lineHighlightRanges:i}},xu=(u,e,t)=>`<${u.tag}${t.renderAttrs(u)}>${e}</${u.tag}>`,vu=(u,e)=>{const t=u.attrs?u.attrs.slice():[];return e.forEach(r=>{const F=u.attrIndex(r[0]);F<0?t.push(r):(t[F]=t[F].slice(),t[F][1]+=` ${r[1]}`)}),t},v=u=>u!==null&&typeof u=="object"&&!Array.isArray(u),z=(u,e)=>Array.isArray(u)?u.map(t=>v(t)?e(t):t):v(u)?e(u):u,uu=u=>{if(typeof u!="string")return"";try{const e=new URL(u,"https://md-editor.invalid/");return["http:","https:","mailto:","tel:"].includes(e.protocol)?u:""}catch{return""}},tu=u=>[0,1,2].map(e=>{const t=u[e];return t==null?t:G(String(t))}),ru=u=>{const e={...u};u.lang!=null&&(e.lang=tu(u.lang));const t=u.feature?.dataView;if(v(t)){const r={...t};t.title!=null&&(r.title=G(String(t.title))),t.lang!=null&&(r.lang=tu(t.lang)),e.feature={...u.feature,dataView:r}}return e},V=u=>{const e={...u};return Object.hasOwn(u,"link")&&(e.link=uu(u.link)),u.children&&(e.children=z(u.children,V)),e},nu=u=>{const e=u.id;return typeof e=="string"||typeof e=="number"?String(e):void 0},Su=u=>{if(!v(u))throw new TypeError("ECharts option must be an object.");const e=[v(u.baseOption)?u.baseOption:u];Array.isArray(u.options)&&e.push(...u.options.filter(v)),Array.isArray(u.media)&&u.media.forEach(n=>{v(n)&&v(n.option)&&e.push(n.option)});const t=new Map;let r=!1;for(const n of e){const b=Array.isArray(n.series)?n.series:[n.series];for(const i of b){if(!v(i)||!i.type)continue;const f=i.type==="treemap"||i.type==="sunburst";r||=f;const p=nu(i);p!==void 0&&t.set(p,t.get(p)===!0||f)}}const F=n=>{const b=ru(n);for(const i of["link","sublink"])Object.hasOwn(n,i)&&(b[i]=uu(n[i]));if(n.tooltip!=null){const i=f=>({...v(f)?f:{},...f===!1?{show:!1}:{},renderMode:"richText"});b.tooltip=Array.isArray(n.tooltip)?n.tooltip.map(i):i(n.tooltip)}return n.title&&(b.title=z(n.title,i=>{const f={...i};for(const p of["link","sublink"])Object.hasOwn(i,p)&&(f[p]=uu(i[p]));return f})),n.toolbox&&(b.toolbox=z(n.toolbox,i=>{const f=ru(i);return i.title!=null&&(f.title=G(String(i.title))),f})),n.series&&(b.series=z(n.series,i=>{const f=nu(i),p=f===void 0?void 0:t.get(f);if(!(i.type?i.type==="treemap"||i.type==="sunburst":p??r))return i;const I=V(i);return i.data&&(I.data=z(i.data,V)),i.levels&&(I.levels=z(i.levels,V)),I})),b},C=F(u);return v(u.baseOption)&&(C.baseOption=F(u.baseOption)),Array.isArray(u.options)&&(C.options=u.options.map(n=>v(n)?F(n):n)),Array.isArray(u.media)&&(C.media=u.media.map(n=>v(n)&&v(n.option)?{...n,option:F(n.option)}:n)),C},Ou="md-editor",Iu="MdEditor",E="https://unpkg.com",ju=`${E}/@highlightjs/cdn-assets@11.12.0/highlight.min.js`,iu={main:`${E}/prettier@3.9.6/standalone.js`,markdown:`${E}/prettier@3.9.6/plugins/markdown.js`},Nu={css:`${E}/cropperjs@1.6.3/dist/cropper.min.css`,js:`${E}/cropperjs@1.6.3/dist/cropper.min.js`},Tu=`${E}/screenfull@5.2.0/dist/screenfull.js`,Pu=`${E}/mermaid@11.17.2/dist/mermaid.min.js`,Lu={js:`${E}/katex@0.18.5/dist/katex.min.js`,css:`${E}/katex@0.18.5/dist/katex.min.css`},ou={a11y:{light:`${E}/@highlightjs/cdn-assets@11.12.0/styles/a11y-light.min.css`,dark:`${E}/@highlightjs/cdn-assets@11.12.0/styles/a11y-dark.min.css`},atom:{light:`${E}/@highlightjs/cdn-assets@11.12.0/styles/atom-one-light.min.css`,dark:`${E}/@highlightjs/cdn-assets@11.12.0/styles/atom-one-dark.min.css`},github:{light:`${E}/@highlightjs/cdn-assets@11.12.0/styles/github.min.css`,dark:`${E}/@highlightjs/cdn-assets@11.12.0/styles/github-dark.min.css`},gradient:{light:`${E}/@highlightjs/cdn-assets@11.12.0/styles/gradient-light.min.css`,dark:`${E}/@highlightjs/cdn-assets@11.12.0/styles/gradient-dark.min.css`},kimbie:{light:`${E}/@highlightjs/cdn-assets@11.12.0/styles/kimbie-light.min.css`,dark:`${E}/@highlightjs/cdn-assets@11.12.0/styles/kimbie-dark.min.css`},paraiso:{light:`${E}/@highlightjs/cdn-assets@11.12.0/styles/paraiso-light.min.css`,dark:`${E}/@highlightjs/cdn-assets@11.12.0/styles/paraiso-dark.min.css`},qtcreator:{light:`${E}/@highlightjs/cdn-assets@11.12.0/styles/qtcreator-light.min.css`,dark:`${E}/@highlightjs/cdn-assets@11.12.0/styles/qtcreator-dark.min.css`},stackoverflow:{light:`${E}/@highlightjs/cdn-assets@11.12.0/styles/stackoverflow-light.min.css`,dark:`${E}/@highlightjs/cdn-assets@11.12.0/styles/stackoverflow-dark.min.css`}},Hu=`${E}/echarts@6.1.0/dist/echarts.min.js`,$u={highlight:{js:{integrity:"sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix",crossOrigin:"anonymous"},css:{a11y:{light:{integrity:"sha384-qdZDAN3jffvh670RHw1wxLekabidEFaNRninYgIzBvMbL6WlHdXeHS/Bt+vx33lN",crossOrigin:"anonymous"},dark:{integrity:"sha384-2QAAjX8pqaM5azX68KWI2wExF6Q13kY4kEiQFY4b/1zPe6rpgmTByNpDEllH3sb+",crossOrigin:"anonymous"}},atom:{light:{integrity:"sha384-w6Ujm1VWa9HYFqGc89oAPn/DWDi2gUamjNrq9DRvEYm2X3ClItg9Y9xs1ViVo5b5",crossOrigin:"anonymous"},dark:{integrity:"sha384-oaMLBGEzBOJx3UHwac0cVndtX5fxGQIfnAeFZ35RTgqPcYlbprH9o9PUV/F8Le07",crossOrigin:"anonymous"}},github:{light:{integrity:"sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L",crossOrigin:"anonymous"},dark:{integrity:"sha384-wH75j6z1lH97ZOpMOInqhgKzFkAInZPPSPlZpYKYTOqsaizPvhQZmAtLcPKXpLyH",crossOrigin:"anonymous"}},gradient:{light:{integrity:"sha384-yErHBR8aEZPxRl3XmR8dGSRAclMlnSRRw8sXQLcmPWzWUvb56BzQmBw3EWHl7QGI",crossOrigin:"anonymous"},dark:{integrity:"sha384-lUCvtSOdvDbp5hLWKgwz/taFu1HxlpqES2OVP5UG2JMTfnU481gXcBhGF9lAGoSr",crossOrigin:"anonymous"}},kimbie:{light:{integrity:"sha384-tloeSLUPczAvoZ48TUz+OxRie0oYLCRwlkadUXovGzzJEIbNQB2TkfUuvJ6SW5Mi",crossOrigin:"anonymous"},dark:{integrity:"sha384-o5F1vUaMNOmou1sQrsWiFo4/QUGSV0svqNZW+EesmKxWC8MpFJcveBhAyfvTHbGb",crossOrigin:"anonymous"}},paraiso:{light:{integrity:"sha384-5j6QHU2Hwg1ehtlIQNDebhETDB8bga3/88hzBFsMRaGmgQHCftqIN7GZNDNw0vTL",crossOrigin:"anonymous"},dark:{integrity:"sha384-I5vnnMQu0LWDQnHpT61xyoMwKarAB8jpZkB2ioFOlmzUFnIFaV4QbUwlBBOMKhTH",crossOrigin:"anonymous"}},qtcreator:{light:{integrity:"sha384-iEBgHrwi8Hv4dSZBz+MOGvS05rF7I7fGKM2fASQyE9jn2Istg9Qd5dSoK18WyRTB",crossOrigin:"anonymous"},dark:{integrity:"sha384-D6LXJGWNR4QV7gnpuP3ccbvOYoR02td3cU0y7lESABPg/tzCSC4m+y+M2TtrmpHc",crossOrigin:"anonymous"}},stackoverflow:{light:{integrity:"sha384-FMwt7cTGo4aLxZnno5k0xTj0W4gmi48Kwept+y/oQmE6cFk36Kr+QJZOKNOQwORe",crossOrigin:"anonymous"},dark:{integrity:"sha384-iL+x+BroCyHm/p2c6sMA9umXhdCWp2cKe4QUjPeMzHgwXAk+ZxHyIGP3NZTZensU",crossOrigin:"anonymous"}}}},prettier:{standaloneJs:{integrity:"sha384-+W7xqeAu5I/86lmhtNbTUhXsleRqShVIHN475c2jis2jC/2u7yauvSMLvoWpOcRR",crossOrigin:"anonymous"},parserMarkdownJs:{integrity:"sha384-i4vYrgvZzKDF8P9xog44TQUyDL6uIGMYBrmvTQSgClA0mKyxAHAv9ACYN+FgJLWc",crossOrigin:"anonymous"}},cropper:{js:{integrity:"sha384-aKBOyDyHi7nysLl4xSArmbTpotGkhOQNGnSQaljyIveY3ofQZ3GWak4U9F5NcPxI",crossOrigin:"anonymous"},css:{integrity:"sha384-4B0iRmDz7QrXJK2xob77YvAC46zoUOJDr2MOKrkWWR7QoJg9i63rGSnCwIjGYGHs",crossOrigin:"anonymous"}},screenfull:{js:{integrity:"sha384-Qfbv8upMDu/ikv42M0Jnym2hahbDQ77Nm8PGU0G+iA6UIwt1+scE6P1qKXA0anWU",crossOrigin:"anonymous"}},mermaid:{js:{integrity:"sha384-EOXBFmc3gx5mb+vn0vPvvGqACToJD24hhacX5Yx+8NUUQrHIle/Qi5Bg9o3zKwW2",crossOrigin:"anonymous"}},katex:{js:{integrity:"sha384-TTF8eEsEKInX2meLzP5V1z/npGYIElXYGksx93f0qBZHu6IL3PdzVB8objytx+TR",crossOrigin:"anonymous"},css:{integrity:"sha384-2dNi/m6JtSiviznrOIZ5fTiZ5As0In2QwkuXSgoqcQtCNplvJAbt+jveeN+8en73",crossOrigin:"anonymous"}},echarts:{js:{integrity:"sha384-C2iskrW/uPW46KzOjrvJIQo4YkV8lkD+QS0CrDN18IIPIpT/g2USu8bTP3nvmIAD",crossOrigin:"anonymous"}}},zu=["bold","underline","italic","strikeThrough","-","title","sub","sup","quote","unorderedList","orderedList","task","-","codeRow","code","link","image","table","mermaid","katex","-","revoke","next","save","=","prettier","pageFullscreen","fullscreen","preview","previewOnly","htmlPreview","catalog","github"],Uu=["markdownTotal","=","scrollSwitch"],Mu={"zh-CN":{toolbarTips:{bold:"加粗",underline:"下划线",italic:"斜体",strikeThrough:"删除线",title:"标题",sub:"下标",sup:"上标",quote:"引用",unorderedList:"无序列表",orderedList:"有序列表",task:"任务列表",codeRow:"行内代码",code:"块级代码",link:"链接",image:"图片",table:"表格",mermaid:"mermaid图",katex:"katex公式",revoke:"后退",next:"前进",save:"保存",prettier:"美化",pageFullscreen:"浏览器全屏",fullscreen:"屏幕全屏",preview:"预览",previewOnly:"仅预览",htmlPreview:"html代码预览",catalog:"目录",github:"源码地址"},titleItem:{h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题"},imgTitleItem:{link:"添加链接",upload:"上传图片",clip2upload:"裁剪上传"},linkModalTips:{linkTitle:"添加链接",imageTitle:"添加图片",descLabel:"链接描述:",descLabelPlaceHolder:"请输入描述...",urlLabel:"链接地址:",urlLabelPlaceHolder:"请输入链接...",buttonOK:"确定"},clipModalTips:{title:"裁剪图片上传",buttonUpload:"上传"},copyCode:{text:"复制代码",successTips:"已复制!",failTips:"复制失败!"},mermaid:{flow:"流程图",sequence:"时序图",gantt:"甘特图",class:"类图",state:"状态图",pie:"饼图",relationship:"关系图",journey:"旅程图"},katex:{inline:"行内公式",block:"块级公式"},footer:{markdownTotal:"字数",scrollAuto:"同步滚动"}},"en-US":{toolbarTips:{bold:"bold",underline:"underline",italic:"italic",strikeThrough:"strikeThrough",title:"title",sub:"subscript",sup:"superscript",quote:"quote",unorderedList:"unordered list",orderedList:"ordered list",task:"task list",codeRow:"inline code",code:"block-level code",link:"link",image:"image",table:"table",mermaid:"mermaid",katex:"formula",revoke:"revoke",next:"undo revoke",save:"save",prettier:"prettier",pageFullscreen:"fullscreen in page",fullscreen:"fullscreen",preview:"preview",previewOnly:"preview only",htmlPreview:"html preview",catalog:"catalog",github:"source code"},titleItem:{h1:"Lv1 Heading",h2:"Lv2 Heading",h3:"Lv3 Heading",h4:"Lv4 Heading",h5:"Lv5 Heading",h6:"Lv6 Heading"},imgTitleItem:{link:"Add Image Link",upload:"Upload Images",clip2upload:"Crop And Upload"},linkModalTips:{linkTitle:"Add Link",imageTitle:"Add Image",descLabel:"Desc:",descLabelPlaceHolder:"Enter a description...",urlLabel:"Link:",urlLabelPlaceHolder:"Enter a link...",buttonOK:"OK"},clipModalTips:{title:"Crop Image",buttonUpload:"Upload"},copyCode:{text:"Copy",successTips:"Copied!",failTips:"Copy failed!"},mermaid:{flow:"flow",sequence:"sequence",gantt:"gantt",class:"class",state:"state",pie:"pie",relationship:"relationship",journey:"journey"},katex:{inline:"inline",block:"block"},footer:{markdownTotal:"Character Count",scrollAuto:"Scroll Auto"}}},Fu={editorExtensions:{highlight:{js:ju,css:ou},prettier:{standaloneJs:iu.main,parserMarkdownJs:iu.markdown},cropper:{...Nu},screenfull:{js:Tu},mermaid:{js:Pu,enableZoom:!0},katex:{...Lu},echarts:{js:Hu,parseOption:u=>{let e;try{e=yu.parse(u)}catch(t){const r=t instanceof Error?t.message:String(t);throw new SyntaxError(`Invalid ECharts option: ${r}`,{cause:t})}if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError("ECharts option must be an object.");return e},sanitizeOption:Su}},editorExtensionsAttrs:{},editorConfig:{languageUserDefined:{},mermaidTemplate:{},renderDelay:500,zIndex:2e4},codeMirrorExtensions:u=>u,markdownItConfig:()=>{},markdownItPlugins:u=>u,mermaidConfig:u=>u,katexConfig:u=>u,echartsConfig:u=>u},qu=u=>Cu.deepMerge(Fu,u,{excludeKeys(e){return/[iI]{1}nstance/.test(e)}}),Qu=.1;exports.MinInputBoxWidth=Qu;exports.allFooter=Uu;exports.allToolbar=zu;exports.codeCss=ou;exports.config=qu;exports.editorExtensionsAttrs=$u;exports.escapeHtml=G;exports.globalConfig=Fu;exports.mergeAttrs=vu;exports.parseCodeBlockInfo=ku;exports.prefix=Ou;exports.prefixHump=Iu;exports.renderTokenContent=xu;exports.staticTextDefault=Mu;
@@ -1,65 +1,68 @@
1
- "use strict";const r=require("vue"),h=require("./event-bus.cjs"),O=require("@vavt/util"),p=require("./config.cjs"),H=require("./dom.cjs"),ve=require("@vavt/copy2clipboard"),be=require("markdown-it"),ye=require("markdown-it-image-figures"),xe=require("markdown-it-sub"),Ce=require("markdown-it-sup"),ne=require("./index5.cjs"),we=require("medium-zoom"),Ee=(e,t,a)=>{const{editorId:o}=a,n={rerender(){h.bus.emit(o,h.RERENDER)}};t.expose(n)},A={hljs:`${p.prefix}-hljs`,hlcss:`${p.prefix}-hlCss`,prettier:`${p.prefix}-prettier`,prettierMD:`${p.prefix}-prettierMD`,cropperjs:`${p.prefix}-cropper`,croppercss:`${p.prefix}-cropperCss`,screenfull:`${p.prefix}-screenfull`,mermaidM:`${p.prefix}-mermaid-m`,mermaid:`${p.prefix}-mermaid`,katexjs:`${p.prefix}-katex`,katexcss:`${p.prefix}-katexCss`,echarts:`${p.prefix}-echarts`},Y=(e,t)=>{h.bus.emit(e,h.REPLACE,t)},Ie=(e,t,a)=>{const{editorId:o}=a,n=r.reactive({buildFinished:!1,html:""});r.watch(()=>e.modelValue,()=>{n.buildFinished=!1}),r.onMounted(()=>{h.bus.on(o,{name:h.BUILD_FINISHED,callback(d){n.buildFinished=!0,n.html=d}}),h.bus.on(o,{name:h.ON_SAVE,callback(){const d=new Promise(c=>{if(n.buildFinished)c(n.html);else{const u=f=>{c(f),h.bus.remove(o,h.BUILD_FINISHED,u)};h.bus.on(o,{name:h.BUILD_FINISHED,callback:u})}});e.onSave?e.onSave(e.modelValue,d):t.emit("onSave",e.modelValue,d)}})})},se=(e,{editorId:t,rootRef:a,setting:o})=>{const n=p.globalConfig.editorExtensions.highlight,d=p.globalConfig.editorExtensionsAttrs.highlight;r.provide("editorId",t),r.provide("rootRef",a),r.provide("theme",r.computed(()=>e.theme)),r.provide("language",r.computed(()=>e.language)),r.provide("highlight",r.computed(()=>{const{js:u}=n,f={...p.codeCss,...n.css},{js:i,css:s={}}=d||{},l=e.codeStyleReverse&&e.codeStyleReverseList.includes(e.previewTheme)?"dark":e.theme,m=f[e.codeTheme]?f[e.codeTheme][l]:p.codeCss.atom[l],g=f[e.codeTheme]&&s[e.codeTheme]?s[e.codeTheme][l]:s.atom?s.atom[l]:{};return{js:{src:u,...i},css:{href:m,...g}}})),r.provide("showCodeRowNumber",e.showCodeRowNumber);const c=r.computed(()=>{const u={...p.staticTextDefault,...p.globalConfig.editorConfig.languageUserDefined};return O.deepMerge(O.deepClone(p.staticTextDefault["en-US"]),u[e.language]||{})});return r.provide("usedLanguageText",c),r.provide("previewTheme",r.computed(()=>e.previewTheme)),r.provide("customIcon",r.computed(()=>e.customIcon)),r.provide("setting",r.computed(()=>o?{...o}:{preview:!0,htmlPreview:!1,previewOnly:!1,pageFullscreen:!1,fullscreen:!1})),{editorId:t}},$e=(e,t)=>(r.provide("tabWidth",e.tabWidth),r.provide("disabled",r.computed(()=>e.disabled)),r.provide("contentDisabled",r.computed(()=>e.disabled||e.readOnly)),r.provide("showToolbarName",r.computed(()=>e.showToolbarName)),r.provide("noUploadImg",e.noUploadImg),r.provide("tableShape",r.computed(()=>e.tableShape)),r.provide("noPrettier",e.noPrettier),r.provide("codeTheme",r.computed(()=>e.codeTheme)),r.provide("updateSetting",t.updateSetting),r.provide("catalogVisible",r.computed(()=>t.catalogVisible.value)),r.provide("defToolbars",t.defToolbars),r.provide("floatingToolbars",r.computed(()=>e.floatingToolbars)),se(e,t)),Te=e=>{const{noPrettier:t,noUploadImg:a}=e,{editorExtensions:o,editorExtensionsAttrs:n}=p.globalConfig,d=t||o.prettier.prettierInstance,c=t||o.prettier.parserMarkdownInstance,u=a||o.cropper.instance;r.onMounted(()=>{if(!u){const{js:f={},css:i={}}=n.cropper||{};H.appendHandler("link",{...i,rel:"stylesheet",href:o.cropper.css,id:A.croppercss}),H.appendHandler("script",{...f,src:o.cropper.js,id:A.cropperjs})}if(!d){const{standaloneJs:f={}}=n.prettier||{};H.appendHandler("script",{...f,src:o.prettier.standaloneJs,id:A.prettier})}if(!c){const{parserMarkdownJs:f={}}=n.prettier||{};H.appendHandler("script",{...f,src:o.prettier.parserMarkdownJs,id:A.prettierMD})}})},Se=(e,t,a)=>{const{editorId:o}=a;r.onMounted(()=>{h.bus.on(o,{name:h.ERROR_CATCHER,callback:n=>{e.onError?.(n),t.emit("onError",n)}})})},ke=(e,t,a)=>{const{editorId:o}=a,n=r.reactive({pageFullscreen:e.pageFullscreen,fullscreen:!1,preview:e.preview,htmlPreview:e.preview?!1:e.htmlPreview,previewOnly:!1}),d=r.reactive({...n}),c=(i,s)=>{const l=s===void 0?!n[i]:s;switch(i){case"preview":{n.htmlPreview=!1,n.previewOnly=!1;break}case"htmlPreview":{n.preview=!1,n.previewOnly=!1;break}case"previewOnly":{l?!n.preview&&!n.htmlPreview&&(n.preview=!0):(d.preview||(n.preview=!1),d.htmlPreview||(n.htmlPreview=!1));break}}d[i]=l,n[i]=l};let u="";const f=()=>{n.pageFullscreen||n.fullscreen?document.body.style.overflow="hidden":document.body.style.overflow=u};return r.watch(()=>[n.pageFullscreen,n.fullscreen],f),r.onMounted(()=>{h.bus.on(o,{name:h.UPLOAD_IMAGE,callback(i,s){const l=m=>{Y(o,{direct:"image",params:{desc:"",urls:m}}),s?.()};e.onUploadImg?e.onUploadImg(i,l):t.emit("onUploadImg",i,l)}}),u=document.body.style.overflow,f()}),[n,c]},He=(e,t)=>{const{editorId:a}=t,o=r.ref(!1);return r.onMounted(()=>{h.bus.on(a,{name:h.CHANGE_CATALOG_VISIBLE,callback:n=>{n===void 0?o.value=!o.value:o.value=n}})}),o},Re=(e,t,a)=>{const{editorId:o,catalogVisible:n,setting:d,updateSetting:c,codeRef:u}=a;r.watch(()=>d.pageFullscreen,i=>{h.bus.emit(o,h.PAGE_FULL_SCREEN_CHANGED,i)}),r.watch(()=>d.fullscreen,i=>{h.bus.emit(o,h.FULL_SCREEN_CHANGED,i)}),r.watch(()=>d.preview,i=>{h.bus.emit(o,h.PREVIEW_CHANGED,i)}),r.watch(()=>d.previewOnly,i=>{h.bus.emit(o,h.PREVIEW_ONLY_CHANGED,i)}),r.watch(()=>d.htmlPreview,i=>{h.bus.emit(o,h.HTML_PREVIEW_CHANGED,i)}),r.watch(n,i=>{h.bus.emit(o,h.CATALOG_VISIBLE_CHANGED,i)});const f={on(i,s){switch(i){case"pageFullscreen":{h.bus.on(o,{name:h.PAGE_FULL_SCREEN_CHANGED,callback(l){s(l)}});break}case"fullscreen":{h.bus.on(o,{name:h.FULL_SCREEN_CHANGED,callback(l){s(l)}});break}case"preview":{h.bus.on(o,{name:h.PREVIEW_CHANGED,callback(l){s(l)}});break}case"previewOnly":{h.bus.on(o,{name:h.PREVIEW_ONLY_CHANGED,callback(l){s(l)}});break}case"htmlPreview":{h.bus.on(o,{name:h.HTML_PREVIEW_CHANGED,callback(l){s(l)}});break}case"catalog":{h.bus.on(o,{name:h.CATALOG_VISIBLE_CHANGED,callback(l){s(l)}});break}}},togglePageFullscreen(i){c("pageFullscreen",i)},toggleFullscreen(i){h.bus.emit(o,h.CHANGE_FULL_SCREEN,i)},togglePreview(i){c("preview",i)},togglePreviewOnly(i){c("previewOnly",i)},toggleHtmlPreview(i){c("htmlPreview",i)},toggleCatalog(i){h.bus.emit(o,h.CHANGE_CATALOG_VISIBLE,i)},triggerSave(){h.bus.emit(o,h.ON_SAVE)},insert(i){Y(o,{direct:"universal",params:{generate:i},source:"programmatic"})},focus(i){u.value?.focus(i)},rerender(){h.bus.emit(o,h.RERENDER)},getSelectedText(){return u.value?.getSelectedText()},resetHistory(){u.value?.resetHistory()},domEventHandlers(i){h.bus.emit(o,h.EVENT_LISTENER,i)},execCommand(i){Y(o,{direct:i,source:"programmatic"})},getEditorView(){return u.value?.getEditorView()}};t.expose(f)},ce=e=>{const t=r.useId();return e.id||e.editorId||`${p.prefix}-${t}`},Ae=(e,t,a)=>{const o=r.inject("editorId"),n=r.inject("rootRef"),d=r.inject("usedLanguageText"),c=r.inject("setting"),u=()=>{n.value.querySelectorAll(`#${o} .${p.prefix}-preview .${p.prefix}-code`).forEach(s=>{let l=-1;const m=s.querySelector(`.${p.prefix}-copy-button:not([data-processed])`);m&&(m.onclick=g=>{g.preventDefault(),clearTimeout(l);const b=(s.querySelector("input:checked + pre code")||s.querySelector("pre code")).textContent,{text:y,successTips:E,failTips:x}=d.value.copyCode;let C=E;ve(e.formatCopiedText(b||"")).catch(()=>{C=x}).finally(()=>{m.dataset.isIcon?m.dataset.tips=C:m.textContent=C,l=window.setTimeout(()=>{m.dataset.isIcon?m.dataset.tips=y:m.textContent=y},1500)})},m.setAttribute("data-processed","true"))})},f=()=>{r.nextTick(u)},i=s=>{s&&r.nextTick(u)};r.watch([t,a],f),r.watch(()=>c.value.preview,i),r.watch(()=>c.value.htmlPreview,i),r.onMounted(u)},Le=e=>{const t=r.inject("editorId"),a=r.inject("theme"),o=r.inject("rootRef"),{editorExtensions:n,editorExtensionsAttrs:d,echartsConfig:c}=p.globalConfig;let u=n.echarts.instance;const f=r.shallowRef(-1),i=()=>{!e.noEcharts&&u&&(f.value=f.value+1)};r.watch(()=>a.value,()=>{i()}),r.onMounted(()=>{if(e.noEcharts||u)return;const b=n.echarts.js;H.appendHandler("script",{...d.echarts?.js,src:b,id:A.echarts,onload(){u=window.echarts,i()}},"echarts")});let s=[],l=[],m=[];const g=(b=!1)=>{if(!s.length){b&&(l.forEach(C=>{C.dispose?.()}),m.forEach(C=>{C.disconnect?.()}),l=[],m=[]);return}const y=[],E=[],x=[];s.forEach((C,I)=>{const w=l[I],T=m[I];if(b||!C||!C.isConnected||(o?.value?!o.value.contains(C):!1)){w?.dispose?.(),T?.disconnect?.();return}y.push(C),w&&E.push(w),T&&x.push(T)}),s=y,l=E,m=x},v=()=>{if(g(),!e.noEcharts&&u){const b=o.value;if(!b)return;Array.from(b.querySelectorAll(`#${t} div.${p.prefix}-echarts:not([data-processed])`)).forEach(E=>{if(E.dataset.closed==="false")return!1;try{const x=n.echarts.parseOption(E.innerText,{editorId:t,element:E}),C=c(x),I=u.init(E,a.value);I.setOption(C),E.setAttribute("data-processed",""),s.push(E),l.push(I);const w=new ResizeObserver(()=>{I.resize()});w.observe(E),m.push(w)}catch(x){h.bus.emit(t,h.ERROR_CATCHER,{name:"echarts",message:x?.message,error:x})}})}};return r.onBeforeUnmount(()=>{g(!0)}),{reRenderEcharts:f,replaceEcharts:v}},_e=e=>{const t=r.inject("highlight"),a=r.shallowRef(p.globalConfig.editorExtensions.highlight.instance);return r.onMounted(()=>{e.noHighlight||a.value||(H.appendHandler("link",{...t.value.css,rel:"stylesheet",id:A.hlcss}),H.appendHandler("script",{...t.value.js,id:A.hljs,onload(){a.value=window.hljs}},"hljs"))}),r.watch(()=>t.value.css,()=>{e.noHighlight||p.globalConfig.editorExtensions.highlight.instance||H.updateHandler("link",{...t.value.css,rel:"stylesheet",id:A.hlcss})}),a},Fe=e=>{const t=r.shallowRef(p.globalConfig.editorExtensions.katex.instance);return r.onMounted(()=>{if(e.noKatex||t.value)return;const{editorExtensions:a,editorExtensionsAttrs:o}=p.globalConfig;H.appendHandler("script",{...o.katex?.js,src:a.katex.js,id:A.katexjs,onload(){t.value=window.katex}},"katex"),H.appendHandler("link",{...o.katex?.css,rel:"stylesheet",href:a.katex.css,id:A.katexcss})}),t};class Me{constructor(t){this.options=t}options;cache=new Map;isExpired(t){return t.expiresAt<=Date.now()}deleteExpired(t,a){const o=a??this.cache.get(t);return!o||!this.isExpired(o)?!1:(this.cache.delete(t),!0)}trim(){for(const[t,a]of this.cache)if(!this.deleteExpired(t,a))break;for(;this.cache.size>this.options.max;){const t=this.cache.keys().next().value;if(t===void 0)break;this.cache.delete(t)}}get(t){const a=this.cache.get(t);if(!(!a||this.deleteExpired(t,a)))return this.cache.delete(t),this.cache.set(t,a),a.value}set(t,a){this.cache.delete(t),this.cache.set(t,{value:a,expiresAt:Date.now()+this.options.ttl}),this.trim()}clear(){this.cache.clear()}}const Z=new Me({max:1e3,ttl:6e5}),Pe=e=>{const t=r.inject("editorId"),a=r.inject("theme"),o=r.inject("rootRef"),{editorExtensions:n,editorExtensionsAttrs:d,mermaidConfig:c}=p.globalConfig;let u=n.mermaid.instance;const f=r.shallowRef(-1),i=()=>{if(!e.noMermaid&&u){const l=a.value==="dark"?{startOnLoad:!1,theme:"dark"}:{startOnLoad:!1,theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ffffff",primaryTextColor:"#1f2329",primaryBorderColor:"#b7c0cc",secondaryColor:"#f7f8fa",tertiaryColor:"#f7f8fa",lineColor:"#596273",edgeLabelBackground:"#ffffff",clusterBkg:"#ffffff",clusterBorder:"#b7c0cc"}};u.initialize(c(l)),f.value=f.value+1}};return r.watch(()=>a.value,()=>{Z.clear(),i()}),r.onMounted(()=>{if(e.noMermaid||u)return;const l=n.mermaid.js;/\.mjs/.test(l)?(H.appendHandler("link",{...d.mermaid?.js,rel:"modulepreload",href:l,id:A.mermaidM}),import(l).then(m=>{u=m.default,i()}).catch(m=>{h.bus.emit(t,h.ERROR_CATCHER,{name:"mermaid",message:`Failed to load mermaid module: ${m.message}`,error:m})})):H.appendHandler("script",{...d.mermaid?.js,src:l,id:A.mermaid,onload(){u=window.mermaid,i()}},"mermaid")}),{reRenderRef:f,replaceMermaid:async()=>{if(!e.noMermaid&&u){const l=o.value;if(!l)return;const m=l.querySelectorAll(`div.${p.prefix}-mermaid`);if(m.length===0)return;const g=document.createElement("div"),v=document.body.offsetWidth>1366?document.body.offsetWidth:1366,b=document.body.offsetHeight>768?document.body.offsetHeight:768;g.style.width=v+"px",g.style.height=b+"px",g.style.position="fixed",g.style.zIndex="-10000",g.style.top="-10000px",g.style.left="-10000px",document.body.appendChild(g);try{await Promise.allSettled(Array.from(m).map(y=>(async x=>{if(x.dataset.closed==="false")return!1;const C=x.innerText;let I=Z.get(C);if(!I){const w=O.randomId();let T={svg:""};try{T=await u.render(w,C,g),I=await e.sanitizeMermaid(T.svg);const $=document.createElement("p");$.className=`${p.prefix}-mermaid`,$.setAttribute("data-processed",""),$.setAttribute("data-content",C),$.innerHTML=I,$.children[0]?.removeAttribute("height"),Z.set(C,$.innerHTML),x.dataset.line!==void 0&&($.dataset.line=x.dataset.line),x.replaceWith($)}catch($){h.bus.emit(t,h.ERROR_CATCHER,{name:"mermaid",message:$.message,error:$})}}})(y)))}finally{g.remove()}}}}},Ne=(e,t)=>{t=t||{};const a=3,o=t.marker||"!",n=o.charCodeAt(0),d=o.length;let c="",u="";const f=(s,l,m,g,v)=>{const b=s[l];return b.type==="admonition_open"?s[l].attrPush(["class",`${p.prefix}-admonition ${p.prefix}-admonition-${b.info}`]):b.type==="admonition_title_open"&&s[l].attrPush(["class",`${p.prefix}-admonition-title`]),v.renderToken(s,l,m)},i=s=>{const l=s.trim().split(" ",2);u="",c=l[0],l.length>1&&(u=s.substring(c.length+2))};e.block.ruler.before("code","admonition",(s,l,m,g)=>{let v,b,y,E=!1,x=s.bMarks[l]+s.tShift[l],C=s.eMarks[l];if(n!==s.src.charCodeAt(x))return!1;for(v=x+1;v<=C&&o[(v-x)%d]===s.src[v];v++);const I=Math.floor((v-x)/d);if(I!==a)return!1;v-=(v-x)%d;const w=s.src.slice(x,v),T=s.src.slice(v,C);if(i(T),g)return!0;for(b=l;b++,!(b>=m||(x=s.bMarks[b]+s.tShift[b],C=s.eMarks[b],x<C&&s.sCount[b]<s.blkIndent));)if(n===s.src.charCodeAt(x)&&!(s.sCount[b]-s.blkIndent>=4)){for(v=x+1;v<=C&&o[(v-x)%d]===s.src[v];v++);if(!(Math.floor((v-x)/d)<I)&&(v-=(v-x)%d,v=s.skipSpaces(v),!(v<C))){E=!0;break}}const $=s.parentType,R=s.lineMax;return s.parentType="root",s.lineMax=b,y=s.push("admonition_open","div",1),y.markup=w,y.block=!0,y.info=c,y.map=[l,b],u&&(y=s.push("admonition_title_open","p",1),y.markup=w+" "+c,y.map=[l,b],y=s.push("inline","",0),y.content=u,y.map=[l,s.line-1],y.children=[],y=s.push("admonition_title_close","p",-1),y.markup=w+" "+c),s.md.block.tokenize(s,l+1,b),y=s.push("admonition_close","div",-1),y.markup=s.src.slice(x,v),y.block=!0,s.parentType=$,s.lineMax=R,s.line=b+(E?1:0),!0},{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.admonition_open=f,e.renderer.rules.admonition_title_open=f,e.renderer.rules.admonition_title_close=f,e.renderer.rules.admonition_close=f},je=/^\s*\d+(?:\s*-\s*\d+)?(?:\s*,\s*\d+(?:\s*-\s*\d+)?)*\s*$/,Oe=e=>{const t=e.search(/\s/);let a="",o=!1;for(let n=0;n<e.length;n+=1){const d=e[n];if(a){if(o){o=!1;continue}if(d==="\\"){o=!0;continue}d===a&&(a="");continue}if(d==='"'||d==="'"||d==="`"){a=d;continue}if(d!=="{")continue;const c=e.indexOf("}",n+1);if(c===-1)break;const u=e.slice(n+1,c);if(!je.test(u))continue;const f=e[n-1]||"",i=e[c+1]||"",s=!i||/\s/.test(i),l=(t===-1||n<t)&&(!f||!/[\s="'`]/.test(f))&&s,m=(!f||/\s/.test(f))&&s;if(l||m)return{endIndex:c+1,startIndex:n,value:u}}return null},J=(e,t="")=>{const a=`${e}${t?` ${t}`:""}`.trim(),o=Oe(a),n=o?`${a.slice(0,o.startIndex)} ${a.slice(o.endIndex)}`.trim():a,d=n.search(/\s/),c=d===-1?n:n.slice(0,d),u=d===-1?"":n.slice(d).trim(),f=o?o.value.split(",").reduce((i,s)=>{const[l,m]=s.split("-").map(v=>Number.parseInt(v.trim(),10)),g=m??l;return l>0&&g>=l&&i.push({start:l,end:g}),i},[]):[];return{attrs:u,language:c,lineHighlightRanges:f}},K=(e,t,a)=>`<${e.tag}${a.renderAttrs(e)}>${t}</${e.tag}>`,oe=(e,t)=>{const a=e.attrs?e.attrs.slice():[];return t.forEach(o=>{const n=e.attrIndex(o[0]);n<0?a.push(o):(a[n]=a[n].slice(),a[n][1]+=` ${o[1]}`)}),a},De=e=>Array.from(e).map(t=>/[A-Za-z0-9_-]/.test(t)?t:`_${t.codePointAt(0).toString(16)}_`).join(""),Be=(e,t)=>{const a=e.renderer.rules.fence,o=e.utils.unescapeAll,n=/\[(\w*)(?::([\w ]*))?\]/,d=/::(open|close)/,c=De(t.editorId),u=m=>m.info?o(m.info).trim():"",f=m=>{const g=u(m),[v=null,b=""]=(n.exec(g)||[]).slice(1);return[v,b]},i=m=>J(u(m)).language,s=m=>{const g=m.info.match(d)||[],v=g[1]==="open"||g[1]!=="close"&&t.codeFoldable&&m.content.trim().split(`
2
- `).length<t.autoFoldThreshold,b=g[1]||t.codeFoldable?"details":"div",y=g[1]||t.codeFoldable?"summary":"div";return{open:v,tagContainer:b,tagHeader:y}},l=(m,g,v,b,y)=>{if(m[g].hidden)return"";const E=t.usedLanguageTextRef.value?.copyCode.text||"",x=t.customIconRef.value.copy,C=e.utils.escapeHtml(E),I=x||C,w=!!x,T=`<span class="${p.prefix}-collapse-tips">${H.StrIcon("collapse-tips",t.customIconRef.value)}</span>`,[$]=f(m[g]);if($===null){const{open:S,tagContainer:L,tagHeader:z}=s(m[g]),j=[["class",`${p.prefix}-code`]];S&&j.push(["open",""]);const W={attrs:oe(m[g],j)};m[g].info=m[g].info.replace(d,"");const{attrs:pe,language:he}=J(u(m[g])),te=[he,pe].filter(Boolean).join(" "),ge=a(m,g,v,b,y);return`
3
- <${L} ${y.renderAttrs(W)}>
4
- <${z} class="${p.prefix}-code-head">
1
+ "use strict";const o=require("vue"),h=require("./event-bus.cjs"),q=require("@vavt/util"),p=require("./config.cjs"),M=require("./dom.cjs"),ge=require("@vavt/copy2clipboard"),ve=require("markdown-it"),be=require("markdown-it-image-figures"),ye=require("markdown-it-sub"),Ce=require("markdown-it-sup"),te=require("./index5.cjs"),xe=require("medium-zoom"),we=(e,t,a)=>{const{editorId:r}=a,n={rerender(){h.bus.emit(r,h.RERENDER)}};t.expose(n)},_={hljs:`${p.prefix}-hljs`,hlcss:`${p.prefix}-hlCss`,prettier:`${p.prefix}-prettier`,prettierMD:`${p.prefix}-prettierMD`,cropperjs:`${p.prefix}-cropper`,croppercss:`${p.prefix}-cropperCss`,screenfull:`${p.prefix}-screenfull`,mermaidM:`${p.prefix}-mermaid-m`,mermaid:`${p.prefix}-mermaid`,katexjs:`${p.prefix}-katex`,katexcss:`${p.prefix}-katexCss`,echarts:`${p.prefix}-echarts`},Q=(e,t)=>{h.bus.emit(e,h.REPLACE,t)},Ee=(e,t,a)=>{const{editorId:r}=a,n=o.reactive({buildFinished:!1,html:""});o.watch(()=>e.modelValue,()=>{n.buildFinished=!1}),o.onMounted(()=>{h.bus.on(r,{name:h.BUILD_FINISHED,callback(s){n.buildFinished=!0,n.html=s}}),h.bus.on(r,{name:h.ON_SAVE,callback(){const s=new Promise(d=>{if(n.buildFinished)d(n.html);else{const f=u=>{d(u),h.bus.remove(r,h.BUILD_FINISHED,f)};h.bus.on(r,{name:h.BUILD_FINISHED,callback:f})}});e.onSave?e.onSave(e.modelValue,s):t.emit("onSave",e.modelValue,s)}})})},ce=(e,{editorId:t,rootRef:a,setting:r})=>{const n=p.globalConfig.editorExtensions.highlight,s=p.globalConfig.editorExtensionsAttrs.highlight;o.provide("editorId",t),o.provide("rootRef",a),o.provide("theme",o.computed(()=>e.theme)),o.provide("language",o.computed(()=>e.language)),o.provide("highlight",o.computed(()=>{const{js:f}=n,u={...p.codeCss,...n.css},{js:i,css:l={}}=s||{},c=e.codeStyleReverse&&e.codeStyleReverseList.includes(e.previewTheme)?"dark":e.theme,m=u[e.codeTheme]?u[e.codeTheme][c]:p.codeCss.atom[c],g=u[e.codeTheme]&&l[e.codeTheme]?l[e.codeTheme][c]:l.atom?l.atom[c]:{};return{js:{src:f,...i},css:{href:m,...g}}})),o.provide("showCodeRowNumber",e.showCodeRowNumber);const d=o.computed(()=>{const f={...p.staticTextDefault,...p.globalConfig.editorConfig.languageUserDefined};return q.deepMerge(q.deepClone(p.staticTextDefault["en-US"]),f[e.language]||{})});return o.provide("usedLanguageText",d),o.provide("previewTheme",o.computed(()=>e.previewTheme)),o.provide("customIcon",o.computed(()=>e.customIcon)),o.provide("setting",o.computed(()=>r?{...r}:{preview:!0,htmlPreview:!1,previewOnly:!1,pageFullscreen:!1,fullscreen:!1})),{editorId:t}},Ie=(e,t)=>(o.provide("tabWidth",e.tabWidth),o.provide("disabled",o.computed(()=>e.disabled)),o.provide("contentDisabled",o.computed(()=>e.disabled||e.readOnly)),o.provide("showToolbarName",o.computed(()=>e.showToolbarName)),o.provide("noUploadImg",e.noUploadImg),o.provide("tableShape",o.computed(()=>e.tableShape)),o.provide("noPrettier",e.noPrettier),o.provide("codeTheme",o.computed(()=>e.codeTheme)),o.provide("updateSetting",t.updateSetting),o.provide("catalogVisible",o.computed(()=>t.catalogVisible.value)),o.provide("defToolbars",t.defToolbars),o.provide("floatingToolbars",o.computed(()=>e.floatingToolbars)),ce(e,t)),Se=e=>{const{noPrettier:t,noUploadImg:a}=e,{editorExtensions:r,editorExtensionsAttrs:n}=p.globalConfig,s=t||r.prettier.prettierInstance,d=t||r.prettier.parserMarkdownInstance,f=a||r.cropper.instance;o.onMounted(()=>{if(!f){const{js:u={},css:i={}}=n.cropper||{};M.appendHandler("link",{...i,rel:"stylesheet",href:r.cropper.css,id:_.croppercss}),M.appendHandler("script",{...u,src:r.cropper.js,id:_.cropperjs})}if(!s){const{standaloneJs:u={}}=n.prettier||{};M.appendHandler("script",{...u,src:r.prettier.standaloneJs,id:_.prettier})}if(!d){const{parserMarkdownJs:u={}}=n.prettier||{};M.appendHandler("script",{...u,src:r.prettier.parserMarkdownJs,id:_.prettierMD})}})},Te=(e,t,a)=>{const{editorId:r}=a;o.onMounted(()=>{h.bus.on(r,{name:h.ERROR_CATCHER,callback:n=>{e.onError?.(n),t.emit("onError",n)}})})},$e=(e,t,a)=>{const{editorId:r}=a,n=o.reactive({pageFullscreen:e.pageFullscreen,fullscreen:!1,preview:e.preview,htmlPreview:e.preview?!1:e.htmlPreview,previewOnly:!1}),s=o.reactive({...n}),d=(i,l)=>{const c=l===void 0?!n[i]:l;switch(i){case"preview":{n.htmlPreview=!1,n.previewOnly=!1;break}case"htmlPreview":{n.preview=!1,n.previewOnly=!1;break}case"previewOnly":{c?!n.preview&&!n.htmlPreview&&(n.preview=!0):(s.preview||(n.preview=!1),s.htmlPreview||(n.htmlPreview=!1));break}}s[i]=c,n[i]=c};let f="";const u=()=>{n.pageFullscreen||n.fullscreen?document.body.style.overflow="hidden":document.body.style.overflow=f};return o.watch(()=>[n.pageFullscreen,n.fullscreen],u),o.onMounted(()=>{h.bus.on(r,{name:h.UPLOAD_IMAGE,callback(i,l){const c=m=>{Q(r,{direct:"image",params:{desc:"",urls:m}}),l?.()};e.onUploadImg?e.onUploadImg(i,c):t.emit("onUploadImg",i,c)}}),f=document.body.style.overflow,u()}),[n,d]},ke=(e,t)=>{const{editorId:a}=t,r=o.ref(!1);return o.onMounted(()=>{h.bus.on(a,{name:h.CHANGE_CATALOG_VISIBLE,callback:n=>{n===void 0?r.value=!r.value:r.value=n}})}),r},Ae=(e,t,a)=>{const{editorId:r,catalogVisible:n,setting:s,updateSetting:d,codeRef:f}=a;o.watch(()=>s.pageFullscreen,i=>{h.bus.emit(r,h.PAGE_FULL_SCREEN_CHANGED,i)}),o.watch(()=>s.fullscreen,i=>{h.bus.emit(r,h.FULL_SCREEN_CHANGED,i)}),o.watch(()=>s.preview,i=>{h.bus.emit(r,h.PREVIEW_CHANGED,i)}),o.watch(()=>s.previewOnly,i=>{h.bus.emit(r,h.PREVIEW_ONLY_CHANGED,i)}),o.watch(()=>s.htmlPreview,i=>{h.bus.emit(r,h.HTML_PREVIEW_CHANGED,i)}),o.watch(n,i=>{h.bus.emit(r,h.CATALOG_VISIBLE_CHANGED,i)});const u={on(i,l){switch(i){case"pageFullscreen":{h.bus.on(r,{name:h.PAGE_FULL_SCREEN_CHANGED,callback(c){l(c)}});break}case"fullscreen":{h.bus.on(r,{name:h.FULL_SCREEN_CHANGED,callback(c){l(c)}});break}case"preview":{h.bus.on(r,{name:h.PREVIEW_CHANGED,callback(c){l(c)}});break}case"previewOnly":{h.bus.on(r,{name:h.PREVIEW_ONLY_CHANGED,callback(c){l(c)}});break}case"htmlPreview":{h.bus.on(r,{name:h.HTML_PREVIEW_CHANGED,callback(c){l(c)}});break}case"catalog":{h.bus.on(r,{name:h.CATALOG_VISIBLE_CHANGED,callback(c){l(c)}});break}}},togglePageFullscreen(i){d("pageFullscreen",i)},toggleFullscreen(i){h.bus.emit(r,h.CHANGE_FULL_SCREEN,i)},togglePreview(i){d("preview",i)},togglePreviewOnly(i){d("previewOnly",i)},toggleHtmlPreview(i){d("htmlPreview",i)},toggleCatalog(i){h.bus.emit(r,h.CHANGE_CATALOG_VISIBLE,i)},triggerSave(){h.bus.emit(r,h.ON_SAVE)},insert(i){Q(r,{direct:"universal",params:{generate:i},source:"programmatic"})},focus(i){f.value?.focus(i)},rerender(){h.bus.emit(r,h.RERENDER)},getSelectedText(){return f.value?.getSelectedText()},resetHistory(){f.value?.resetHistory()},domEventHandlers(i){h.bus.emit(r,h.EVENT_LISTENER,i)},execCommand(i){Q(r,{direct:i,source:"programmatic"})},getEditorView(){return f.value?.getEditorView()}};t.expose(u)},de=e=>{const t=o.useId();return e.id||e.editorId||`${p.prefix}-${t}`},Re=(e,t,a)=>{const r=o.inject("editorId"),n=o.inject("rootRef"),s=o.inject("usedLanguageText"),d=o.inject("setting"),f=()=>{n.value.querySelectorAll(`#${r} .${p.prefix}-preview .${p.prefix}-code`).forEach(l=>{let c=-1;const m=l.querySelector(`.${p.prefix}-copy-button:not([data-processed])`);m&&(m.onclick=g=>{g.preventDefault(),clearTimeout(c);const v=(l.querySelector("input:checked + pre code")||l.querySelector("pre code")).textContent,{text:y,successTips:E,failTips:C}=s.value.copyCode;let x=E;ge(e.formatCopiedText(v||"")).catch(()=>{x=C}).finally(()=>{m.dataset.isIcon?m.dataset.tips=x:m.textContent=x,c=window.setTimeout(()=>{m.dataset.isIcon?m.dataset.tips=y:m.textContent=y},1500)})},m.setAttribute("data-processed","true"))})},u=()=>{o.nextTick(f)},i=l=>{l&&o.nextTick(f)};o.watch([t,a],u),o.watch(()=>d.value.preview,i),o.watch(()=>d.value.htmlPreview,i),o.onMounted(f)},He=e=>{const t=o.inject("editorId"),a=o.inject("theme"),r=o.inject("rootRef"),{editorExtensions:n,editorExtensionsAttrs:s,echartsConfig:d}=p.globalConfig;let f=n.echarts.instance;const u=o.shallowRef(-1),i=()=>{!e.noEcharts&&f&&(u.value=u.value+1)};o.watch(()=>a.value,()=>{i()}),o.onMounted(()=>{if(e.noEcharts||f)return;const v=n.echarts.js;M.appendHandler("script",{...s.echarts?.js,src:v,id:_.echarts,onload(){f=window.echarts,i()}},"echarts")});let l=[],c=[],m=[];const g=(v=!1)=>{if(!l.length){v&&(c.forEach(x=>{x.dispose?.()}),m.forEach(x=>{x.disconnect?.()}),c=[],m=[]);return}const y=[],E=[],C=[];l.forEach((x,w)=>{const I=c[w],k=m[w];if(v||!x||!x.isConnected||(r?.value?!r.value.contains(x):!1)){I?.dispose?.(),k?.disconnect?.();return}y.push(x),I&&E.push(I),k&&C.push(k)}),l=y,c=E,m=C},b=()=>{if(g(),!e.noEcharts&&f){const v=r.value;if(!v)return;Array.from(v.querySelectorAll(`div.${p.prefix}-echarts:not([data-processed])`)).forEach(E=>{if(E.dataset.closed==="false")return!1;const C=E.textContent||"";let x,w;try{const I={editorId:t,element:E},k=n.echarts.parseOption(C,I),S=n.echarts.sanitizeOption(d(k),I);x=f.init(E,a.value),x.setOption(S),w=new ResizeObserver(()=>{x.resize()}),w.observe(E),E.setAttribute("data-processed",""),l.push(E),c.push(x),m.push(w)}catch(I){x&&(w?.disconnect(),x.dispose(),E.textContent=C),h.bus.emit(t,h.ERROR_CATCHER,{name:"echarts",message:I?.message,error:I})}})}};return o.onBeforeUnmount(()=>{g(!0)}),{reRenderEcharts:u,replaceEcharts:b}},Le=e=>{const t=o.inject("highlight"),a=o.shallowRef(p.globalConfig.editorExtensions.highlight.instance);return o.onMounted(()=>{e.noHighlight||a.value||(M.appendHandler("link",{...t.value.css,rel:"stylesheet",id:_.hlcss}),M.appendHandler("script",{...t.value.js,id:_.hljs,onload(){a.value=window.hljs}},"hljs"))}),o.watch(()=>t.value.css,()=>{e.noHighlight||p.globalConfig.editorExtensions.highlight.instance||M.updateHandler("link",{...t.value.css,rel:"stylesheet",id:_.hlcss})}),a},Me=e=>{const t=o.shallowRef(p.globalConfig.editorExtensions.katex.instance);return o.onMounted(()=>{if(e.noKatex||t.value)return;const{editorExtensions:a,editorExtensionsAttrs:r}=p.globalConfig;M.appendHandler("script",{...r.katex?.js,src:a.katex.js,id:_.katexjs,onload(){t.value=window.katex}},"katex"),M.appendHandler("link",{...r.katex?.css,rel:"stylesheet",href:a.katex.css,id:_.katexcss})}),t};class Fe{constructor(t){this.options=t}options;cache=new Map;isExpired(t){return t.expiresAt<=Date.now()}deleteExpired(t,a){const r=a??this.cache.get(t);return!r||!this.isExpired(r)?!1:(this.cache.delete(t),!0)}trim(){for(const[t,a]of this.cache)if(!this.deleteExpired(t,a))break;for(;this.cache.size>this.options.max;){const t=this.cache.keys().next().value;if(t===void 0)break;this.cache.delete(t)}}get(t){const a=this.cache.get(t);if(!(!a||this.deleteExpired(t,a)))return this.cache.delete(t),this.cache.set(t,a),a.value}set(t,a){this.cache.delete(t),this.cache.set(t,{value:a,expiresAt:Date.now()+this.options.ttl}),this.trim()}clear(){this.cache.clear()}}const ne=new WeakMap,_e=(e,t)=>{const a=(ne.get(e)||Promise.resolve()).then(t);return ne.set(e,a.then(()=>{},()=>{})),a},Pe=e=>{const t=o.inject("editorId"),a=o.inject("theme"),r=o.inject("rootRef"),{editorExtensions:n,editorExtensionsAttrs:s,mermaidConfig:d}=p.globalConfig;let f=n.mermaid.instance;const u=o.shallowRef(0),i=new Fe({max:1e3,ttl:6e5}),l=new WeakSet,c=new WeakMap;let m=0,g=!1;const b=(E,C)=>i.get(JSON.stringify([u.value,E,C])),v=()=>{m+=1,i.clear(),u.value+=1};o.watch([a,()=>e.sanitizeMermaid],v,{flush:"sync"}),o.watch(()=>e.modelValue,()=>{m+=1},{flush:"sync"}),o.onMounted(()=>{if(e.noMermaid||f)return;const E=n.mermaid.js,C=x=>{g||(f=x,v())};/\.mjs/.test(E)?(M.appendHandler("link",{...s.mermaid?.js,rel:"modulepreload",href:E,id:_.mermaidM}),import(E).then(x=>C(x.default)).catch(x=>{g||h.bus.emit(t,h.ERROR_CATCHER,{name:"mermaid",message:`Failed to load mermaid module: ${x.message}`,error:x})})):M.appendHandler("script",{...s.mermaid?.js,src:E,id:_.mermaid,onload(){C(window.mermaid)}},"mermaid")});const y=async()=>{const E=r.value;if(g||e.noMermaid||!f||!E)return;const C=f,x=E.querySelectorAll(`div.${p.prefix}-mermaid, p.${p.prefix}-mermaid[data-processed]`);await Promise.all(Array.from(x).filter(w=>w.dataset.closed!=="false"&&w.dataset.mermaidRevision===String(u.value)&&!l.has(w)).map(w=>{const I=c.get(w);if(I?.generation===m)return I.promise;const S=(async()=>{const A=m,U=u.value,N=w.dataset.content??w.textContent??"",P=w.dataset.mermaidBlock,B=JSON.stringify([U,P,N]),D=e.sanitizeMermaid,z=a.value,O=()=>!g&&m===A&&w.isConnected&&E.contains(w);if(O())try{let H=i.get(B);if(H&&w.dataset.processed!==void 0){H.bindFunctions?.(w),l.add(w);return}if(!H){const F=await _e(C,async()=>{if(!O())return;const G={startOnLoad:!1,securityLevel:"strict",secure:Array.from(new Set([...C.mermaidAPI?.defaultConfig?.secure||[],"secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges","dompurifyConfig"]))},W={...G,...z==="dark"?{theme:"dark"}:{theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ffffff",primaryTextColor:"#1f2329",primaryBorderColor:"#b7c0cc",secondaryColor:"#f7f8fa",tertiaryColor:"#f7f8fa",lineColor:"#596273",edgeLabelBackground:"#ffffff",clusterBkg:"#ffffff",clusterBorder:"#b7c0cc"}}},T=d(W);C.initialize({...T,startOnLoad:T?.startOnLoad??!1,securityLevel:T?.securityLevel??"strict",secure:T?.secure??G.secure});const $=document.createElement("div");$.style.cssText="position:fixed;z-index:-10000;top:-10000px;left:-10000px;",$.style.width=Math.max(document.body.offsetWidth,1366)+"px",$.style.height=Math.max(document.body.offsetHeight,768)+"px",document.body.appendChild($);try{return await C.render(q.randomId(),N,$)}finally{$.remove()}});if(!F||!O())return;const V=D?await D(F.svg):F.svg;if(!O())return;if(typeof V!="string")throw new TypeError("Mermaid sanitizer must return a string.");H={svg:V,bindFunctions:F.bindFunctions}}if(!O())return;const L=document.createElement("p");for(const F of Array.from(w.attributes))L.setAttribute(F.name,F.value);L.setAttribute("data-processed",""),L.setAttribute("data-content",N),L.innerHTML=H.svg,L.children[0]?.removeAttribute("height");const R={...H,svg:L.innerHTML};w.replaceWith(L);try{H.bindFunctions?.(L),l.add(L)}catch(F){throw L.replaceWith(w),F}i.set(B,R)}catch(H){if(!O())return;w.dataset.processed!==void 0&&(w.textContent=N,w.removeAttribute("data-processed")),h.bus.emit(t,h.ERROR_CATCHER,{name:"mermaid",message:H?.message,error:H})}})().finally(()=>{c.get(w)?.promise===S&&c.delete(w)});return c.set(w,{generation:m,promise:S}),S}))};return o.onBeforeUnmount(()=>{g=!0,m+=1,i.clear()}),{reRenderRef:u,replaceMermaid:y,invalidateMermaid:v,getCachedMermaid:b}},Ne=(e,t)=>{t=t||{};const a=3,r=t.marker||"!",n=r.charCodeAt(0),s=r.length;let d="",f="";const u=(l,c,m,g,b)=>{const v=l[c];return v.type==="admonition_open"?l[c].attrPush(["class",`${p.prefix}-admonition ${p.prefix}-admonition-${v.info}`]):v.type==="admonition_title_open"&&l[c].attrPush(["class",`${p.prefix}-admonition-title`]),b.renderToken(l,c,m)},i=l=>{const c=l.trim().split(" ",2);f="",d=c[0],c.length>1&&(f=l.substring(d.length+2))};e.block.ruler.before("code","admonition",(l,c,m,g)=>{let b,v,y,E=!1,C=l.bMarks[c]+l.tShift[c],x=l.eMarks[c];if(n!==l.src.charCodeAt(C))return!1;for(b=C+1;b<=x&&r[(b-C)%s]===l.src[b];b++);const w=Math.floor((b-C)/s);if(w!==a)return!1;b-=(b-C)%s;const I=l.src.slice(C,b),k=l.src.slice(b,x);if(i(k),g)return!0;for(v=c;v++,!(v>=m||(C=l.bMarks[v]+l.tShift[v],x=l.eMarks[v],C<x&&l.sCount[v]<l.blkIndent));)if(n===l.src.charCodeAt(C)&&!(l.sCount[v]-l.blkIndent>=4)){for(b=C+1;b<=x&&r[(b-C)%s]===l.src[b];b++);if(!(Math.floor((b-C)/s)<w)&&(b-=(b-C)%s,b=l.skipSpaces(b),!(b<x))){E=!0;break}}const S=l.parentType,A=l.lineMax;return l.parentType="root",l.lineMax=v,y=l.push("admonition_open","div",1),y.markup=I,y.block=!0,y.info=d,y.map=[c,v],f&&(y=l.push("admonition_title_open","p",1),y.markup=I+" "+d,y.map=[c,v],y=l.push("inline","",0),y.content=f,y.map=[c,l.line-1],y.children=[],y=l.push("admonition_title_close","p",-1),y.markup=I+" "+d),l.md.block.tokenize(l,c+1,v),y=l.push("admonition_close","div",-1),y.markup=l.src.slice(C,b),y.block=!0,l.parentType=S,l.lineMax=A,l.line=v+(E?1:0),!0},{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.admonition_open=u,e.renderer.rules.admonition_title_open=u,e.renderer.rules.admonition_title_close=u,e.renderer.rules.admonition_close=u},Oe=e=>Array.from(e).map(t=>/[A-Za-z0-9_-]/.test(t)?t:`_${t.codePointAt(0).toString(16)}_`).join(""),je=(e,t)=>{const a=e.renderer.rules.fence,r=e.utils.unescapeAll,n=/\[(\w*)(?::([\w ]*))?\]/,s=/::(open|close)/,d=Oe(t.editorId),f=m=>m.info?r(m.info).trim():"",u=m=>{const g=f(m),[b=null,v=""]=(n.exec(g)||[]).slice(1);return[b,v]},i=m=>p.parseCodeBlockInfo(f(m)).language,l=m=>{const g=m.info.match(s)||[],b=g[1]==="open"||g[1]!=="close"&&t.codeFoldable&&m.content.trim().split(`
2
+ `).length<t.autoFoldThreshold,v=g[1]||t.codeFoldable?"details":"div",y=g[1]||t.codeFoldable?"summary":"div";return{open:b,tagContainer:v,tagHeader:y}},c=(m,g,b,v,y)=>{if(m[g].hidden)return"";const E=t.usedLanguageTextRef.value?.copyCode.text||"",C=t.customIconRef.value.copy,x=e.utils.escapeHtml(E),w=C||x,I=!!C,k=`<span class="${p.prefix}-collapse-tips">${M.StrIcon("collapse-tips",t.customIconRef.value)}</span>`,[S]=u(m[g]);if(S===null){const{open:T,tagContainer:$,tagHeader:j}=l(m[g]),K=[["class",`${p.prefix}-code`]];T&&K.push(["open",""]);const X={attrs:p.mergeAttrs(m[g],K)};m[g].info=m[g].info.replace(s,"");const{attrs:Z,language:J}=p.parseCodeBlockInfo(f(m[g])),ee=[J,Z].filter(Boolean).join(" "),he=a(m,g,b,v,y);return`
3
+ <${$} ${y.renderAttrs(X)}>
4
+ <${j} class="${p.prefix}-code-head">
5
5
  <div class="${p.prefix}-code-flag"><span></span><span></span><span></span></div>
6
6
  <div class="${p.prefix}-code-action">
7
- <span class="${p.prefix}-code-lang">${e.utils.escapeHtml(te)}</span>
8
- <span class="${p.prefix}-copy-button" data-tips="${C}"${w?" data-is-icon=true":""}>${I}</span>
9
- ${t.extraTools instanceof Function?t.extraTools({lang:te}):t.extraTools||""}
10
- ${L==="details"?T:""}
7
+ <span class="${p.prefix}-code-lang">${e.utils.escapeHtml(ee)}</span>
8
+ <span class="${p.prefix}-copy-button" data-tips="${x}"${I?" data-is-icon=true":""}>${w}</span>
9
+ ${t.extraTools instanceof Function?t.extraTools({lang:ee}):t.extraTools||""}
10
+ ${$==="details"?k:""}
11
11
  </div>
12
- </${z}>
13
- ${ge}
14
- </${L}>
15
- `}let R,_,M,F,D="",B="",V="";const{open:Q,tagContainer:k,tagHeader:G}=s(m[g]),P=[["class",`${p.prefix}-code`]];Q&&P.push(["open",""]);const U={attrs:oe(m[g],P)};for(let S=g;S<m.length&&(R=m[S],[_,M]=f(R),_===$);S++){R.info=R.info.replace(n,"").replace(d,""),R.hidden=!0;const L=`${p.prefix}-codetab-${c}-${g}-${S-g}`;F=S-g>0?"":"checked",D+=`
12
+ </${j}>
13
+ ${he}
14
+ </${$}>
15
+ `}let A,U,N,P,B="",D="",z="";const{open:O,tagContainer:H,tagHeader:L}=l(m[g]),R=[["class",`${p.prefix}-code`]];O&&R.push(["open",""]);const F={attrs:p.mergeAttrs(m[g],R)};for(let T=g;T<m.length&&(A=m[T],[U,N]=u(A),U===S);T++){A.info=A.info.replace(n,"").replace(s,""),A.hidden=!0;const $=`${p.prefix}-codetab-${d}-${g}-${T-g}`;P=T-g>0?"":"checked",B+=`
16
16
  <li>
17
17
  <input
18
18
  type="radio"
19
- id="label-${p.prefix}-codetab-label-1-${c}-${g}-${S-g}"
20
- name="${p.prefix}-codetab-label-${c}-${g}"
21
- class="${L}"
22
- ${F}
19
+ id="label-${p.prefix}-codetab-label-1-${d}-${g}-${T-g}"
20
+ name="${p.prefix}-codetab-label-${d}-${g}"
21
+ class="${$}"
22
+ ${P}
23
23
  >
24
24
  <label
25
- for="label-${p.prefix}-codetab-label-1-${c}-${g}-${S-g}"
26
- onclick="this.getRootNode().querySelectorAll('.${L}').forEach(e => e.click())"
25
+ for="label-${p.prefix}-codetab-label-1-${d}-${g}-${T-g}"
26
+ onclick="this.getRootNode().querySelectorAll('.${$}').forEach(e => e.click())"
27
27
  >
28
- ${e.utils.escapeHtml(M||i(R))}
28
+ ${e.utils.escapeHtml(N||i(A))}
29
29
  </label>
30
- </li>`,B+=`
30
+ </li>`,D+=`
31
31
  <div role="tabpanel">
32
32
  <input
33
33
  type="radio"
34
- name="${p.prefix}-codetab-pre-${c}-${g}"
35
- class="${L}"
36
- ${F}
34
+ name="${p.prefix}-codetab-pre-${d}-${g}"
35
+ class="${$}"
36
+ ${P}
37
37
  role="presentation">
38
- ${a(m,S,v,b,y)}
39
- </div>`,V+=`
38
+ ${a(m,T,b,v,y)}
39
+ </div>`,z+=`
40
40
  <input
41
41
  type="radio"
42
- name="${p.prefix}-codetab-lang-${c}-${g}"
43
- class="${L}"
44
- ${F}
42
+ name="${p.prefix}-codetab-lang-${d}-${g}"
43
+ class="${$}"
44
+ ${P}
45
45
  role="presentation">
46
- <span class=${p.prefix}-code-lang role="note">${e.utils.escapeHtml(i(R))}</span>`}const{attrs:ee,language:N}=J(u(m[g])),q=[N,ee].filter(Boolean).join(" ");return`
47
- <${k} ${y.renderAttrs(U)}>
48
- <${G} class="${p.prefix}-code-head">
46
+ <span class=${p.prefix}-code-lang role="note">${e.utils.escapeHtml(i(A))}</span>`}const{attrs:V,language:G}=p.parseCodeBlockInfo(f(m[g])),W=[G,V].filter(Boolean).join(" ");return`
47
+ <${H} ${y.renderAttrs(F)}>
48
+ <${L} class="${p.prefix}-code-head">
49
49
  <div class="${p.prefix}-code-flag">
50
- <ul class="${p.prefix}-codetab-label" role="tablist">${D}</ul>
50
+ <ul class="${p.prefix}-codetab-label" role="tablist">${B}</ul>
51
51
  </div>
52
52
  <div class="${p.prefix}-code-action">
53
- <span class="${p.prefix}-codetab-lang">${V}</span>
54
- <span class="${p.prefix}-copy-button" data-tips="${C}"${w?" data-is-icon=true":""}>${I}</span>
55
- ${t.extraTools instanceof Function?t.extraTools({lang:q}):t.extraTools||""}
56
- ${k==="details"?T:""}
53
+ <span class="${p.prefix}-codetab-lang">${z}</span>
54
+ <span class="${p.prefix}-copy-button" data-tips="${x}"${I?" data-is-icon=true":""}>${w}</span>
55
+ ${t.extraTools instanceof Function?t.extraTools({lang:W}):t.extraTools||""}
56
+ ${H==="details"?k:""}
57
57
  </div>
58
- </${G}>
59
- ${B}
60
- </${k}>
61
- `};e.renderer.rules.fence=l,e.renderer.rules.code_block=l},Ve=(e,t)=>{e.core.ruler.after("block","echarts-token-attrs",o=>{o.tokens.forEach(n=>{if(!(n.type!=="fence"||n.info!=="echarts")&&(n.tag="div",n.attrJoin("class",`${p.prefix}-echarts`),n.attrSet("data-echarts-theme",t.themeRef.value),n.attrSet("style","width: 100%; aspect-ratio: 4 / 3;"),n.map&&n.level===0)){const d=n.map[1]-1,u=!!o.env.srcLines?.[d]?.trim()?.startsWith("```");n.attrSet("data-closed",`${u}`),n.attrSet("data-line",String(n.map[0]))}})});const a=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(o,n,d,c,u)=>{const f=o[n],i=f.content.trim();return f.info==="echarts"?K(f,e.utils.escapeHtml(i),u):a(o,n,d,c,u)}},Ge=(e,t)=>{e.renderer.rules.heading_open=(a,o)=>{const n=a[o],d=a[o+1].children?.reduce((u,f)=>u+(["text","code_inline","math_inline"].includes(f.type)&&f.content||""),"")||"",c=n.markup.length;return t.headsRef.value.push({text:d,level:c,line:n.map[0],currentToken:n,nextToken:a[o+1]}),n.map&&n.level===0&&n.attrSet("id",t.mdHeadingId({text:d,level:c,index:t.headsRef.value.length,currentToken:n,nextToken:a[o+1]})),e.renderer.renderToken(a,o,t)},e.renderer.rules.heading_close=(a,o,n,d,c)=>c.renderToken(a,o,n)},re={block:[{open:"$$",close:"$$"},{open:"\\[",close:"\\]"}],inline:[{open:"$$",close:"$$"},{open:"$",close:"$"},{open:"\\[",close:"\\]"},{open:"\\(",close:"\\)"}]},Ue=e=>(t,a)=>{const o=e.delimiters;for(const n of o){if(!t.src.startsWith(n.open,t.pos))continue;const d=t.pos+n.open.length;let c=d;for(;(c=t.src.indexOf(n.close,c))!==-1;){let u=0,f=c-1;for(;f>=0&&t.src[f]==="\\";)u++,f--;if(u%2===0)break;c+=n.close.length}if(c!==-1){if(c-d===0)return a||(t.pending+=n.open+n.close),t.pos=c+n.close.length,!0;if(!a){const u=t.push("math_inline",e.tag,0);u.attrSet("class",e.className),u.markup=n.open,u.content=t.src.slice(d,c)}return t.pos=c+n.close.length,!0}}return!1},qe=e=>(t,a,o,n)=>{const d=e.delimiters,c=t.bMarks[a]+t.tShift[a],u=t.eMarks[a],f=(i,s,l)=>{t.line=s;const m=t.push("math_block",e.tag,0);return m.attrSet("class",e.className),m.block=!0,m.content=i,m.map=[a,t.line],m.markup=l,!0};for(const i of d){const s=c;if(t.src.slice(s,s+i.open.length)!==i.open)continue;const l=s+i.open.length,m=t.src.slice(l,u).trim(),g=m==="",v=m===i.close,b=m.endsWith(i.close);if(!g&&!v&&!b)continue;if(n)return!0;if(v)return f("",a+1,i.open);if(!g&&b){const w=m.slice(0,-i.close.length);return f(w,a+1,i.open)}let y=a+1,E=!1,x="";for(;y<o;y++){const w=t.bMarks[y]+t.tShift[y],T=t.eMarks[y];if(w<T&&t.tShift[y]<t.blkIndent)break;if(t.src.slice(w,T).trim().endsWith(i.close)){const R=t.src.slice(0,T).lastIndexOf(i.close);x=t.src.slice(w,R),E=!0;break}}if(!E)continue;const I=t.getLines(a+1,y,t.tShift[a],!0)+(x.trim()?x:"");return f(I,y+1,i.open)}return!1},ze=(e,{katexRef:t,inlineDelimiters:a,blockDelimiters:o})=>{const n=(u,f,i=!1)=>{if(!t.value)return K(u,e.utils.escapeHtml(u.content),f);const s=t.value.renderToString(u.content,p.globalConfig.katexConfig({throwOnError:!1,displayMode:i}));return u.attrSet("data-processed",""),K(u,String(s),f)},d=(u,f,i,s,l)=>n(u[f],l),c=(u,f,i,s,l)=>n(u[f],l,!0);e.inline.ruler.before("escape","math_inline",Ue({delimiters:a||re.inline,className:`${p.prefix}-katex-inline`,tag:"span"})),e.block.ruler.after("blockquote","math_block",qe({delimiters:o||re.block,className:`${p.prefix}-katex-block`,tag:"p"}),{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=d,e.renderer.rules.math_block=c},We=(e,t)=>{e.core.ruler.after("block","mermaid-token-attrs",o=>{o.tokens.forEach(n=>{if(!(n.type!=="fence"||n.info!=="mermaid")&&(n.tag="div",n.attrJoin("class",`${p.prefix}-mermaid`),n.attrSet("data-mermaid-theme",t.themeRef.value),n.map&&n.level===0)){const d=n.map[1]-1,u=!!o.env.srcLines?.[d]?.trim()?.startsWith("```");n.attrSet("data-closed",`${u}`),n.attrSet("data-line",String(n.map[0]))}})});const a=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(o,n,d,c,u)=>{const f=o[n],i=f.content.trim();if(f.info==="mermaid"){const s=Z.get(i);return s?(f.tag="p",f.attrSet("data-processed",""),f.attrSet("data-content",i),K(f,s,u)):K(f,e.utils.escapeHtml(i),u)}return a(o,n,d,c,u)}},ae=(e,t,a)=>{const o=e.attrIndex(t),n=[t,a];o<0?e.attrPush(n):(e.attrs=e.attrs||[],e.attrs[o]=n)},Ke=e=>e.type==="inline",Ze=e=>e.type==="paragraph_open",Je=e=>e.type==="list_item_open",Xe=e=>e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0,Ye=(e,t)=>Ke(e[t])&&Ze(e[t-1])&&Je(e[t-2])&&Xe(e[t]),Qe=(e,t)=>{const a=e[t].level-1;for(let o=t-1;o>=0;o--)if(e[o].level===a)return o;return-1},et=e=>{const t=new e("html_inline","",0);return t.content="<label>",t},tt=e=>{const t=new e("html_inline","",0);return t.content="</label>",t},nt=(e,t,a)=>{const o=new a("html_inline","",0);return o.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",o.attrs=[["for",t]],o},ot=(e,t,a)=>{const o=new t("html_inline","",0),n=a.enabled?" ":' disabled="" ';return e.content.indexOf("[ ] ")===0?o.content='<input class="task-list-item-checkbox"'+n+'type="checkbox">':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(o.content='<input class="task-list-item-checkbox" checked=""'+n+'type="checkbox">'),o},rt=(e,t,a)=>{if(e.children=e.children||[],e.children.unshift(ot(e,t,a)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),a.label)if(a.labelAfter){e.children.pop();const o="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+o+'">',e.children.push(nt(e.content,o,t))}else e.children.unshift(et(t)),e.children.push(tt(t))},at=(e,t={})=>{e.core.ruler.after("inline","github-task-lists",a=>{const o=a.tokens;for(let n=2;n<o.length;n++)Ye(o,n)&&(rt(o[n],a.Token,t),ae(o[n-2],"class","task-list-item"+(t.enabled?" enabled":" ")),ae(o[Qe(o,n-2)],"class","contains-task-list"))})},it=e=>{e.core.ruler.push("init-line-number",t=>(t.tokens.forEach(a=>{a.map&&a.attrSet("data-line",a.map[0].toString())}),!0))},lt=(e,t)=>{const{editorConfig:a,markdownItConfig:o,markdownItPlugins:n,editorExtensions:d}=p.globalConfig,c=r.inject("editorId"),u=r.inject("language"),f=r.inject("usedLanguageText"),i=r.inject("showCodeRowNumber"),s=r.inject("theme"),l=r.inject("customIcon"),m=r.inject("rootRef"),g=r.inject("setting"),v=r.ref([]),b=_e(e),y=Fe(e),{reRenderRef:E,replaceMermaid:x}=Pe(e),{reRenderEcharts:C,replaceEcharts:I}=Le(e),w=be({html:!1,breaks:!0,linkify:!0});o(w,{editorId:c});const T=[{type:"image",plugin:ye,options:{figcaption:!0,classes:"md-zoom"}},{type:"admonition",plugin:Ne,options:{}},{type:"taskList",plugin:at,options:{}},{type:"heading",plugin:Ge,options:{mdHeadingId:e.mdHeadingId,headsRef:v}},{type:"code",plugin:Be,options:{editorId:c,usedLanguageTextRef:f,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,customIconRef:l}},{type:"sub",plugin:xe,options:{}},{type:"sup",plugin:Ce,options:{}}];e.noKatex||T.push({type:"katex",plugin:ze,options:{katexRef:y}}),e.noMermaid||T.push({type:"mermaid",plugin:We,options:{themeRef:s}}),e.noEcharts||T.push({type:"echarts",plugin:Ve,options:{themeRef:s}}),n(T,{editorId:c}).forEach(k=>{w.use(k.plugin,k.options)});const $=w.options.highlight;w.set({highlight:(k,G,P)=>{const U=J(G,P),{attrs:ee,language:N,lineHighlightRanges:q}=U;let S="";if($){const j=$(k,N,ee);if(j){const W=ne.prepareCustomCodeHighlight(j,k,{lineHighlightRanges:q,showLineNumber:i});if(W.shouldReturnDirectly)return W.html;S=W.html}}S||(!e.noHighlight&&b.value?b.value.getLanguage(N)?S=b.value.highlight(k,{language:N,ignoreIllegals:!0}).value:S=b.value.highlightAuto(k).value:S=w.utils.escapeHtml(k));const L=w.utils.escapeHtml(N);let z=`<span class="${p.prefix}-code-block">${S.replace(/^\n+|\n+$/g,"")}</span>`;return(i||q.length)&&(z=ne.generateCodeBlock(S,k,{lineHighlightRanges:q,showLineNumber:i})),`<pre><code class="language-${L}" language="${L}">${z}</code></pre>`}}),it(w);const R=r.ref(`_article-key_${O.randomId()}`),_=r.ref(e.sanitize(w.render(e.modelValue,{srcLines:e.modelValue.split(`
62
- `)})));let M=()=>{},F=()=>{};const D=()=>{const k=m.value?.querySelectorAll(`#${c} p.${p.prefix}-mermaid:not([data-closed=false])`);F(),F=H.copyMermaid(k,{customIcon:l.value}),d.mermaid?.enableZoom&&(M(),M=H.zoomMermaid(k,{customIcon:l.value}))},B=()=>{h.bus.emit(c,h.BUILD_FINISHED,_.value),e.onHtmlChanged(_.value),e.onGetCatalog(v.value),h.bus.emit(c,h.CATALOG_CHANGED,v.value),r.nextTick(()=>{x().then(D),I()})},V=()=>{v.value=[],_.value=e.sanitize(w.render(e.modelValue,{srcLines:e.modelValue.split(`
63
- `)}))},Q=r.computed(()=>(e.noKatex||!!y.value)&&(e.noHighlight||!!b.value));return r.watch([r.toRef(e,"modelValue"),Q,E,u],(k,G,P)=>{const U=window.setTimeout(()=>{V()},t?0:a.renderDelay);P(()=>{clearTimeout(U)})}),r.watch(()=>g.value.preview,()=>{g.value.preview&&r.nextTick(()=>{x().then(D),I(),h.bus.emit(c,h.CATALOG_CHANGED,v.value)})}),r.watch([_,C],()=>{B()}),r.onMounted(B),r.onMounted(()=>{h.bus.on(c,{name:h.PUSH_CATALOG,callback(){h.bus.emit(c,h.CATALOG_CHANGED,v.value)}}),h.bus.on(c,{name:h.RERENDER,callback:()=>{R.value=`_article-key_${O.randomId()}`,V()}})}),r.onBeforeUnmount(()=>{M(),F()}),{html:_,key:R}},st=(e,t)=>{const a=r.inject("editorId"),o=r.inject("setting"),{noImgZoomIn:n}=e,d=O.debounce(()=>{const c=document.querySelectorAll(`#${a}-preview img:not(.not-zoom):not(.medium-zoom-image)`);c.length!==0&&we(c,{background:"#00000073"})});r.onMounted(async()=>{!n&&o.value.preview&&await d()}),r.watch([t,()=>o.value.preview],async()=>{!n&&o.value.preview&&await d()})},ie={checked:{regexp:/- \[x\]/,value:"- [ ]"},unChecked:{regexp:/- \[\s\]/,value:"- [x]"}},ct=(e,t)=>{const a=r.inject("editorId"),o=r.inject("rootRef");let n=()=>{};const d=()=>{if(!o.value)return!1;const c=o.value.querySelectorAll(".task-list-item.enabled"),u=f=>{f.preventDefault();const i=f.target.checked?"unChecked":"checked",s=f.target.parentElement?.dataset.line;if(!s)return;const l=Number(s),m=e.modelValue.split(`
64
- `),g=m[Number(l)].replace(ie[i].regexp,ie[i].value);e.previewOnly?(m[Number(l)]=g,e.onChange(m.join(`
65
- `))):h.bus.emit(a,h.TASK_STATE_CHANGED,l+1,g)};c.forEach(f=>{f.addEventListener("click",u)}),n=()=>{c.forEach(f=>{f.removeEventListener("click",u)})}};r.onBeforeUnmount(()=>{n()}),r.watch([t],()=>{n(),r.nextTick(d)},{immediate:!0})},dt=(e,t,a)=>{const o=r.inject("setting"),n=()=>{r.nextTick(()=>{e.onRemount?.()})},d=c=>{c&&n()};r.watch([t,a],n),r.watch(()=>o.value.preview,d),r.watch(()=>o.value.htmlPreview,d),r.onMounted(n)},de={modelValue:{type:String,default:""},onChange:{type:Function,default:()=>{}},onHtmlChanged:{type:Function,default:()=>{}},onGetCatalog:{type:Function,default:()=>{}},mdHeadingId:{type:Function,default:()=>""},noMermaid:{type:Boolean,default:!1},sanitize:{type:Function,default:e=>e},noKatex:{type:Boolean,default:!1},formatCopiedText:{type:Function,default:e=>e},noHighlight:{type:Boolean,default:!1},previewOnly:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean},sanitizeMermaid:{type:Function},codeFoldable:{type:Boolean},autoFoldThreshold:{type:Number},onRemount:{type:Function},noEcharts:{type:Boolean},previewComponent:{type:[Object,Function],default:void 0}},ut={...de,updateModelValue:{type:Function,default:()=>{}},placeholder:{type:String,default:""},scrollAuto:{type:Boolean},autofocus:{type:Boolean},readonly:{type:Boolean},maxlength:{type:Number},autoDetectCode:{type:Boolean},onBlur:{type:Function,default:()=>{}},onFocus:{type:Function,default:()=>{}},completions:{type:Array},onInput:{type:Function},onDrop:{type:Function,default:()=>{}},inputBoxWidth:{type:String},onInputBoxWidthChange:{type:Function},transformImgUrl:{type:Function,default:e=>e},catalogLayout:{type:String},catalogMaxDepth:{type:Number}},le=e=>{const a=new DOMParser().parseFromString(e,"text/html");return Array.from(a.body.childNodes)},ft=(e,t)=>e.nodeType!==t.nodeType?!1:e.nodeType===Node.TEXT_NODE||e.nodeType===Node.COMMENT_NODE?e.textContent===t.textContent:e.nodeType===Node.ELEMENT_NODE?e.outerHTML===t.outerHTML:e.isEqualNode?e.isEqualNode(t):!1,mt=r.defineComponent({name:"UpdateOnDemand",props:{id:{type:String,required:!0},class:{type:[String,Array,Object],required:!0},html:{type:String,required:!0}},setup(e){const t=r.ref(),a=e.html,o=(n,d)=>{if(!t.value)return;const c=t.value,u=Array.from(c.childNodes),f=Math.min(n.length,d.length);let i=-1;for(let l=0;l<f;l++)if(!ft(n[l],d[l])){i=l;break}if(i===-1)if(d.length>n.length)i=n.length;else if(n.length>d.length)i=d.length;else return;const s=Math.min(i,u.length);for(let l=u.length-1;l>=s;l--)u[l].remove();for(let l=i;l<n.length;l++)c.appendChild(n[l].cloneNode(!0))};return r.watch(()=>e.html,(n,d)=>{const c=le(n),u=le(d||"");o(c,u)}),()=>r.createVNode("div",{id:e.id,class:e.class,innerHTML:a,ref:t},null)}}),ue=r.defineComponent({name:"ContentPreview",props:de,setup(e){const t=r.inject("editorId"),a=r.inject("setting"),o=r.inject("previewTheme"),n=r.inject("showCodeRowNumber"),{html:d,key:c}=lt(e,e.previewOnly);Ae(e,d,c),st(e,d),ct(e,d),dt(e,d,c);const u=r.computed(()=>[`${p.prefix}-preview`,`${o?.value}-theme`,n&&`${p.prefix}-scrn`].filter(Boolean)),f=()=>{const i=`${t}-preview`;return e.previewComponent?r.h(e.previewComponent,{key:c.value,html:d.value,id:i,class:u.value}):r.createVNode(mt,{key:c.value,html:d.value,id:i,class:u.value},null)};return()=>r.createVNode(r.Fragment,null,[a.value.preview&&(e.previewOnly?f():r.createVNode("div",{id:`${t}-preview-wrapper`,class:`${p.prefix}-preview-wrapper`,key:"content-preview-wrapper"},[f()])),a.value.htmlPreview&&r.createVNode("div",{id:`${t}-html-wrapper`,class:`${p.prefix}-preview-wrapper`,key:"html-preview-wrapper"},[r.createVNode("div",{class:`${p.prefix}-html`},[d.value])])])}}),pt=({text:e})=>e,fe={modelValue:{type:String,default:""},onChange:{type:Function,default:void 0},theme:{type:String,default:"light"},class:{type:String,default:""},language:{type:String,default:"zh-CN"},onHtmlChanged:{type:Function,default:void 0},onGetCatalog:{type:Function,default:void 0},editorId:{type:String,default:void 0},id:{type:String,default:void 0},showCodeRowNumber:{type:Boolean,default:!0},previewTheme:{type:String,default:"default"},style:{type:Object,default:()=>({})},mdHeadingId:{type:Function,default:pt},sanitize:{type:Function,default:e=>e},noMermaid:{type:Boolean,default:!1},noKatex:{type:Boolean,default:!1},codeTheme:{type:String,default:"atom"},formatCopiedText:{type:Function,default:e=>e},codeStyleReverse:{type:Boolean,default:!0},codeStyleReverseList:{type:Array,default:["default","mk-cute"]},noHighlight:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean,default:!1},customIcon:{type:Object,default:{}},sanitizeMermaid:{type:Function,default:e=>Promise.resolve(e)},codeFoldable:{type:Boolean,default:!0},autoFoldThreshold:{type:Number,default:30},onRemount:{type:Function,default:void 0},noEcharts:{type:Boolean,default:!1},previewComponent:{type:[Object,Function],default:void 0}},ht={...fe,onSave:{type:Function,default:void 0},onUploadImg:{type:Function,default:void 0},pageFullscreen:{type:Boolean,default:!1},preview:{type:Boolean,default:!0},htmlPreview:{type:Boolean,default:!1},toolbars:{type:Array,default:p.allToolbar},floatingToolbars:{type:Array,default:[]},toolbarsExclude:{type:Array,default:[]},noPrettier:{type:Boolean,default:!1},tabWidth:{type:Number,default:2},tableShape:{type:Array,default:[6,4]},placeholder:{type:String,default:""},defToolbars:{type:[String,Object],default:void 0},onError:{type:Function,default:void 0},footers:{type:Array,default:p.allFooter},scrollAuto:{type:Boolean,default:!0},defFooters:{type:[String,Object],default:void 0},noUploadImg:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},maxLength:{type:Number,default:void 0},autoDetectCode:{type:Boolean,default:!1},onBlur:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},completions:{type:Array,default:void 0},showToolbarName:{type:Boolean,default:!1},onInput:{type:Function,default:void 0},onDrop:{type:Function,default:void 0},inputBoxWidth:{type:String,default:"50%"},onInputBoxWidthChange:{type:Function,default:void 0},transformImgUrl:{type:Function,default:e=>e},catalogLayout:{type:String,default:"fixed"},catalogMaxDepth:{type:Number,default:void 0}},me=["onHtmlChanged","onGetCatalog","onChange","onRemount","update:modelValue"],gt=[...me,"onSave","onUploadImg","onError","onBlur","onFocus","onInput","onDrop","onInputBoxWidthChange"],X=r.defineComponent({name:"MdPreview",props:fe,emits:me,setup(e,t){const{noKatex:a,noMermaid:o,noHighlight:n}=e,d=r.ref(),c=ce(e);se(e,{rootRef:d,editorId:c}),Ee(e,t,{editorId:c}),r.onBeforeUnmount(()=>{h.bus.clear(c)});const u=l=>{e.onChange?.(l),t.emit("onChange",l),t.emit("update:modelValue",l)},f=l=>{e.onHtmlChanged?.(l),t.emit("onHtmlChanged",l)},i=l=>{e.onGetCatalog?.(l),t.emit("onGetCatalog",l)},s=()=>{e.onRemount?.(),t.emit("onRemount")};return()=>r.createVNode("div",{id:c,class:[p.prefix,e.class,`${p.prefix}-previewOnly`],"data-theme":e.theme,style:e.style,ref:d},[r.createVNode(ue,{modelValue:e.modelValue,onChange:u,onHtmlChanged:f,onGetCatalog:i,mdHeadingId:e.mdHeadingId,noMermaid:o,sanitize:e.sanitize,noKatex:a,formatCopiedText:e.formatCopiedText,noHighlight:n,noImgZoomIn:e.noImgZoomIn,previewOnly:!0,sanitizeMermaid:e.sanitizeMermaid,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,onRemount:s,noEcharts:e.noEcharts,previewComponent:e.previewComponent},null)])}});X.install=e=>(e.component(X.name,X),e);exports.CDN_IDS=A;exports.ContentPreview=ue;exports.MdPreview=X;exports.contentProps=ut;exports.editorEmits=gt;exports.editorProps=ht;exports.emitReplace=Y;exports.useCatalog=He;exports.useConfig=ke;exports.useEditorId=ce;exports.useErrorCatcher=Se;exports.useExpansion=Te;exports.useExpose=Re;exports.useOnSave=Ie;exports.useProvide=$e;
58
+ </${L}>
59
+ ${D}
60
+ </${H}>
61
+ `};e.renderer.rules.fence=c,e.renderer.rules.code_block=c},Be=(e,t)=>{e.core.ruler.after("block","echarts-token-attrs",r=>{let n;r.tokens.forEach(s=>{if(!(s.type!=="fence"||s.info.trim()!=="echarts")&&(s.tag="div",s.attrJoin("class",`${p.prefix}-echarts`),s.attrSet("data-echarts-theme",t.themeRef.value),s.attrSet("style","width: 100%; aspect-ratio: 4 / 3;"),s.map)){n??=r.src.split(`
62
+ `);const d=s.content?s.content.split(`
63
+ `).length-Number(s.content.endsWith(`
64
+ `)):0,f=n[s.map[1]-1].trimEnd(),u=s.map[1]-s.map[0]===d+2&&f.endsWith(s.markup);s.attrSet("data-closed",`${u}`),s.level===0&&s.attrSet("data-line",String(s.map[0]))}})});const a=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(r,n,s,d,f)=>{const u=r[n];return u.info.trim()==="echarts"?p.renderTokenContent(u,e.utils.escapeHtml(u.content.trim()),f):a(r,n,s,d,f)}},De=(e,t)=>{e.renderer.rules.heading_open=(a,r)=>{const n=a[r],s=a[r+1].children?.reduce((f,u)=>f+(["text","code_inline","math_inline"].includes(u.type)&&u.content||""),"")||"",d=n.markup.length;return t.headsRef.value.push({text:s,level:d,line:n.map[0],currentToken:n,nextToken:a[r+1]}),n.map&&n.level===0&&n.attrSet("id",t.mdHeadingId({text:s,level:d,index:t.headsRef.value.length,currentToken:n,nextToken:a[r+1]})),e.renderer.renderToken(a,r,t)},e.renderer.rules.heading_close=(a,r,n,s,d)=>d.renderToken(a,r,n)},oe={block:[{open:"$$",close:"$$"},{open:"\\[",close:"\\]"}],inline:[{open:"$$",close:"$$"},{open:"$",close:"$"},{open:"\\[",close:"\\]"},{open:"\\(",close:"\\)"}]},Ve=e=>(t,a)=>{const r=e.delimiters;for(const n of r){if(!t.src.startsWith(n.open,t.pos))continue;const s=t.pos+n.open.length;let d=s;for(;(d=t.src.indexOf(n.close,d))!==-1;){let f=0,u=d-1;for(;u>=0&&t.src[u]==="\\";)f++,u--;if(f%2===0)break;d+=n.close.length}if(d!==-1){if(d-s===0)return a||(t.pending+=n.open+n.close),t.pos=d+n.close.length,!0;if(!a){const f=t.push("math_inline",e.tag,0);f.attrSet("class",e.className),f.markup=n.open,f.content=t.src.slice(s,d)}return t.pos=d+n.close.length,!0}}return!1},Ge=e=>(t,a,r,n)=>{const s=e.delimiters,d=t.bMarks[a]+t.tShift[a],f=t.eMarks[a],u=(i,l,c)=>{t.line=l;const m=t.push("math_block",e.tag,0);return m.attrSet("class",e.className),m.block=!0,m.content=i,m.map=[a,t.line],m.markup=c,!0};for(const i of s){const l=d;if(t.src.slice(l,l+i.open.length)!==i.open)continue;const c=l+i.open.length,m=t.src.slice(c,f).trim(),g=m==="",b=m===i.close,v=m.endsWith(i.close);if(!g&&!b&&!v)continue;if(n)return!0;if(b)return u("",a+1,i.open);if(!g&&v){const I=m.slice(0,-i.close.length);return u(I,a+1,i.open)}let y=a+1,E=!1,C="";for(;y<r;y++){const I=t.bMarks[y]+t.tShift[y],k=t.eMarks[y];if(I<k&&t.tShift[y]<t.blkIndent)break;if(t.src.slice(I,k).trim().endsWith(i.close)){const A=t.src.slice(0,k).lastIndexOf(i.close);C=t.src.slice(I,A),E=!0;break}}if(!E)continue;const w=t.getLines(a+1,y,t.tShift[a],!0)+(C.trim()?C:"");return u(w,y+1,i.open)}return!1},Ue=(e,{katexRef:t,inlineDelimiters:a,blockDelimiters:r})=>{const n=(f,u,i=!1)=>{if(!t.value)return p.renderTokenContent(f,e.utils.escapeHtml(f.content),u);const l={throwOnError:!1,displayMode:i,trust:!1},c=p.globalConfig.katexConfig(l),m=t.value.renderToString(f.content,{...l,...c,trust:c?.trust??!1});return f.attrSet("data-processed",""),p.renderTokenContent(f,String(m),u)},s=(f,u,i,l,c)=>n(f[u],c),d=(f,u,i,l,c)=>n(f[u],c,!0);e.inline.ruler.before("escape","math_inline",Ve({delimiters:a||oe.inline,className:`${p.prefix}-katex-inline`,tag:"span"})),e.block.ruler.after("blockquote","math_block",Ge({delimiters:r||oe.block,className:`${p.prefix}-katex-block`,tag:"p"}),{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=s,e.renderer.rules.math_block=d},ze=(e,t)=>{e.core.ruler.after("block","mermaid-token-attrs",r=>{r.tokens.forEach((n,s)=>{if(!(n.type!=="fence"||n.info!=="mermaid")&&(n.tag="div",n.attrJoin("class",`${p.prefix}-mermaid`),n.attrSet("data-mermaid-theme",t.themeRef.value),n.attrSet("data-mermaid-block",String(n.map?.[0]??s)),n.attrSet("data-mermaid-revision",String(t.revision?.value??0)),n.map&&n.level===0)){const d=n.map[1]-1,u=!!r.env.srcLines?.[d]?.trim()?.startsWith("```");n.attrSet("data-closed",`${u}`),n.attrSet("data-line",String(n.map[0]))}})});const a=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(r,n,s,d,f)=>{const u=r[n],i=u.content.trim();if(u.info==="mermaid"){const l=u.attrGet("data-closed")!=="false"?t.getCached?.(u.attrGet("data-mermaid-block")??void 0,i):void 0;return l?(u.tag="p",u.attrSet("data-processed",""),u.attrSet("data-content",i),p.renderTokenContent(u,l.svg,f)):p.renderTokenContent(u,e.utils.escapeHtml(i),f)}return a(r,n,s,d,f)}},re=(e,t,a)=>{const r=e.attrIndex(t),n=[t,a];r<0?e.attrPush(n):(e.attrs=e.attrs||[],e.attrs[r]=n)},qe=e=>e.type==="inline",We=e=>e.type==="paragraph_open",Ke=e=>e.type==="list_item_open",Ze=e=>e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0,Je=(e,t)=>qe(e[t])&&We(e[t-1])&&Ke(e[t-2])&&Ze(e[t]),Xe=(e,t)=>{const a=e[t].level-1;for(let r=t-1;r>=0;r--)if(e[r].level===a)return r;return-1},ae=e=>new e("label_open","label",1),ie=e=>new e("label_close","label",-1),Ye=(e,t,a)=>{const r=new t("html_inline","",0),n=a.enabled?" ":' disabled="" ';return e.content.indexOf("[ ] ")===0?r.content='<input class="task-list-item-checkbox"'+n+'type="checkbox">':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(r.content='<input class="task-list-item-checkbox" checked=""'+n+'type="checkbox">'),r},Qe=(e,t,a)=>{if(e.children=e.children||[],e.children.unshift(Ye(e,t,a)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),a.label)if(a.labelAfter){const r="task-item-"+Math.ceil(Math.random()*1e7-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+r+'">';const n=ae(t);n.attrSet("class","task-list-item-label"),n.attrSet("for",r),e.children.splice(1,0,n),e.children.push(ie(t))}else e.children.unshift(ae(t)),e.children.push(ie(t))},et=(e,t={})=>{e.core.ruler.after("inline","github-task-lists",a=>{const r=a.tokens;for(let n=2;n<r.length;n++)Je(r,n)&&(Qe(r[n],a.Token,t),re(r[n-2],"class","task-list-item"+(t.enabled?" enabled":" ")),re(r[Xe(r,n-2)],"class","contains-task-list"))})},tt=e=>{e.core.ruler.push("init-line-number",t=>(t.tokens.forEach(a=>{a.map&&a.attrSet("data-line",a.map[0].toString())}),!0))},nt=(e,t)=>{const{editorConfig:a,markdownItConfig:r,markdownItPlugins:n,editorExtensions:s}=p.globalConfig,d=o.inject("editorId"),f=o.inject("language"),u=o.inject("usedLanguageText"),i=o.inject("showCodeRowNumber"),l=o.inject("theme"),c=o.inject("customIcon"),m=o.inject("rootRef"),g=o.inject("setting"),b=o.ref([]),v=Le(e),y=Me(e),{reRenderRef:E,replaceMermaid:C,invalidateMermaid:x,getCachedMermaid:w}=Pe(e),{reRenderEcharts:I,replaceEcharts:k}=He(e),S=ve({html:!1,breaks:!0,linkify:!0});r(S,{editorId:d});const A=[{type:"image",plugin:be,options:{figcaption:!0,classes:"md-zoom"}},{type:"admonition",plugin:Ne,options:{}},{type:"taskList",plugin:et,options:{}},{type:"heading",plugin:De,options:{mdHeadingId:e.mdHeadingId,headsRef:b}},{type:"code",plugin:je,options:{editorId:d,usedLanguageTextRef:u,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,customIconRef:c}},{type:"sub",plugin:ye,options:{}},{type:"sup",plugin:Ce,options:{}}];e.noKatex||A.push({type:"katex",plugin:Ue,options:{katexRef:y}}),e.noMermaid||A.push({type:"mermaid",plugin:ze,options:{themeRef:l,revision:E,getCached:w}}),e.noEcharts||A.push({type:"echarts",plugin:Be,options:{themeRef:l}}),n(A,{editorId:d}).forEach(R=>{S.use(R.plugin,R.options)});const U=S.options.highlight;S.set({highlight:(R,F,V)=>{const G=p.parseCodeBlockInfo(F,V),{attrs:W,language:T,lineHighlightRanges:$}=G;let j="";if(U){const Z=U(R,T,W);if(Z){const J=te.prepareCustomCodeHighlight(Z,R,{lineHighlightRanges:$,showLineNumber:i});if(J.shouldReturnDirectly)return J.html;j=J.html}}j||(!e.noHighlight&&v.value?v.value.getLanguage(T)?j=v.value.highlight(R,{language:T,ignoreIllegals:!0}).value:j=v.value.highlightAuto(R).value:j=S.utils.escapeHtml(R));const K=S.utils.escapeHtml(T);let X=`<span class="${p.prefix}-code-block">${j.replace(/^\n+|\n+$/g,"")}</span>`;return(i||$.length)&&(X=te.generateCodeBlock(j,R,{lineHighlightRanges:$,showLineNumber:i})),`<pre><code class="language-${K}" language="${K}">${X}</code></pre>`}}),tt(S);const N=o.ref(`_article-key_${q.randomId()}`),P=o.ref(e.sanitize(S.render(e.modelValue,{srcLines:e.modelValue.split(`
65
+ `)})));let B=()=>{},D=()=>{};const z=()=>{const R=m.value?.querySelectorAll(`#${d} p.${p.prefix}-mermaid:not([data-closed=false])`);D(),D=M.copyMermaid(R,{customIcon:c.value}),s.mermaid?.enableZoom&&(B(),B=M.zoomMermaid(R,{customIcon:c.value}))},O=()=>{h.bus.emit(d,h.BUILD_FINISHED,P.value),e.onHtmlChanged(P.value),e.onGetCatalog(b.value),h.bus.emit(d,h.CATALOG_CHANGED,b.value),o.nextTick(()=>{C().then(z),k()})},H=()=>{b.value=[],P.value=e.sanitize(S.render(e.modelValue,{srcLines:e.modelValue.split(`
66
+ `)}))},L=o.computed(()=>(e.noKatex||!!y.value)&&(e.noHighlight||!!v.value));return o.watch([o.toRef(e,"modelValue"),o.toRef(e,"sanitize"),L,E,f],(R,F,V)=>{const G=window.setTimeout(()=>{H()},t?0:a.renderDelay);V(()=>{clearTimeout(G)})}),o.watch(()=>g.value.preview,()=>{g.value.preview&&o.nextTick(()=>{C().then(z),k(),h.bus.emit(d,h.CATALOG_CHANGED,b.value)})}),o.watch([P,I,N],()=>{O()}),o.onMounted(O),o.onMounted(()=>{h.bus.on(d,{name:h.PUSH_CATALOG,callback(){h.bus.emit(d,h.CATALOG_CHANGED,b.value)}}),h.bus.on(d,{name:h.RERENDER,callback:()=>{x(),N.value=`_article-key_${q.randomId()}`,H()}})}),o.onBeforeUnmount(()=>{B(),D()}),{html:P,key:N}},ot=(e,t)=>{const a=o.inject("editorId"),r=o.inject("setting"),{noImgZoomIn:n}=e,s=q.debounce(()=>{const d=document.querySelectorAll(`#${a}-preview img:not(.not-zoom):not(.medium-zoom-image)`);d.length!==0&&xe(d,{background:"#00000073"})});o.onMounted(async()=>{!n&&r.value.preview&&await s()}),o.watch([t,()=>r.value.preview],async()=>{!n&&r.value.preview&&await s()})},se={checked:{regexp:/- \[x\]/,value:"- [ ]"},unChecked:{regexp:/- \[\s\]/,value:"- [x]"}},rt=(e,t)=>{const a=o.inject("editorId"),r=o.inject("rootRef");let n=()=>{};const s=()=>{if(!r.value)return!1;const d=r.value.querySelectorAll(".task-list-item.enabled"),f=u=>{u.preventDefault();const i=u.target.checked?"unChecked":"checked",l=u.target.parentElement?.dataset.line;if(!l)return;const c=Number(l),m=e.modelValue.split(`
67
+ `),g=m[Number(c)].replace(se[i].regexp,se[i].value);e.previewOnly?(m[Number(c)]=g,e.onChange(m.join(`
68
+ `))):h.bus.emit(a,h.TASK_STATE_CHANGED,c+1,g)};d.forEach(u=>{u.addEventListener("click",f)}),n=()=>{d.forEach(u=>{u.removeEventListener("click",f)})}};o.onBeforeUnmount(()=>{n()}),o.watch([t],()=>{n(),o.nextTick(s)},{immediate:!0})},at=(e,t,a)=>{const r=o.inject("setting"),n=()=>{o.nextTick(()=>{e.onRemount?.()})},s=d=>{d&&n()};o.watch([t,a],n),o.watch(()=>r.value.preview,s),o.watch(()=>r.value.htmlPreview,s),o.onMounted(n)},ue={modelValue:{type:String,default:""},onChange:{type:Function,default:()=>{}},onHtmlChanged:{type:Function,default:()=>{}},onGetCatalog:{type:Function,default:()=>{}},mdHeadingId:{type:Function,default:()=>""},noMermaid:{type:Boolean,default:!1},sanitize:{type:Function,default:e=>e},noKatex:{type:Boolean,default:!1},formatCopiedText:{type:Function,default:e=>e},noHighlight:{type:Boolean,default:!1},previewOnly:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean},sanitizeMermaid:{type:Function},codeFoldable:{type:Boolean},autoFoldThreshold:{type:Number},onRemount:{type:Function},noEcharts:{type:Boolean},previewComponent:{type:[Object,Function],default:void 0}},it={...ue,updateModelValue:{type:Function,default:()=>{}},placeholder:{type:String,default:""},scrollAuto:{type:Boolean},autofocus:{type:Boolean},readonly:{type:Boolean},maxlength:{type:Number},autoDetectCode:{type:Boolean},onBlur:{type:Function,default:()=>{}},onFocus:{type:Function,default:()=>{}},completions:{type:Array},onInput:{type:Function},onDrop:{type:Function,default:()=>{}},inputBoxWidth:{type:String},onInputBoxWidthChange:{type:Function},transformImgUrl:{type:Function,default:e=>e},catalogLayout:{type:String},catalogMaxDepth:{type:Number}},le=e=>{const a=new DOMParser().parseFromString(e,"text/html");return Array.from(a.body.childNodes)},st=(e,t)=>e.nodeType!==t.nodeType?!1:e.nodeType===Node.TEXT_NODE||e.nodeType===Node.COMMENT_NODE?e.textContent===t.textContent:e.nodeType===Node.ELEMENT_NODE?e.outerHTML===t.outerHTML:e.isEqualNode?e.isEqualNode(t):!1,lt=o.defineComponent({name:"UpdateOnDemand",props:{id:{type:String,required:!0},class:{type:[String,Array,Object],required:!0},html:{type:String,required:!0}},setup(e){const t=o.ref(),a=e.html,r=(n,s)=>{if(!t.value)return;const d=t.value,f=Array.from(d.childNodes),u=Math.min(n.length,s.length);let i=-1;for(let c=0;c<u;c++)if(!st(n[c],s[c])){i=c;break}if(i===-1)if(s.length>n.length)i=n.length;else if(n.length>s.length)i=s.length;else return;const l=Math.min(i,f.length);for(let c=f.length-1;c>=l;c--)f[c].remove();for(let c=i;c<n.length;c++)d.appendChild(n[c].cloneNode(!0))};return o.watch(()=>e.html,(n,s)=>{const d=le(n),f=le(s||"");r(d,f)}),()=>o.createVNode("div",{id:e.id,class:e.class,innerHTML:a,ref:t},null)}}),fe=o.defineComponent({name:"ContentPreview",props:ue,setup(e){const t=o.inject("editorId"),a=o.inject("setting"),r=o.inject("previewTheme"),n=o.inject("showCodeRowNumber"),{html:s,key:d}=nt(e,e.previewOnly);Re(e,s,d),ot(e,s),rt(e,s),at(e,s,d);const f=o.computed(()=>[`${p.prefix}-preview`,`${r?.value}-theme`,n&&`${p.prefix}-scrn`].filter(Boolean)),u=()=>{const i=`${t}-preview`;return e.previewComponent?o.h(e.previewComponent,{key:d.value,html:s.value,id:i,class:f.value}):o.createVNode(lt,{key:d.value,html:s.value,id:i,class:f.value},null)};return()=>o.createVNode(o.Fragment,null,[a.value.preview&&(e.previewOnly?u():o.createVNode("div",{id:`${t}-preview-wrapper`,class:`${p.prefix}-preview-wrapper`,key:"content-preview-wrapper"},[u()])),a.value.htmlPreview&&o.createVNode("div",{id:`${t}-html-wrapper`,class:`${p.prefix}-preview-wrapper`,key:"html-preview-wrapper"},[o.createVNode("div",{class:`${p.prefix}-html`},[s.value])])])}}),ct=({text:e})=>e,pe={modelValue:{type:String,default:""},onChange:{type:Function,default:void 0},theme:{type:String,default:"light"},class:{type:String,default:""},language:{type:String,default:"zh-CN"},onHtmlChanged:{type:Function,default:void 0},onGetCatalog:{type:Function,default:void 0},editorId:{type:String,default:void 0},id:{type:String,default:void 0},showCodeRowNumber:{type:Boolean,default:!0},previewTheme:{type:String,default:"default"},style:{type:Object,default:()=>({})},mdHeadingId:{type:Function,default:ct},sanitize:{type:Function,default:e=>e},noMermaid:{type:Boolean,default:!1},noKatex:{type:Boolean,default:!1},codeTheme:{type:String,default:"atom"},formatCopiedText:{type:Function,default:e=>e},codeStyleReverse:{type:Boolean,default:!0},codeStyleReverseList:{type:Array,default:["default","mk-cute"]},noHighlight:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean,default:!1},customIcon:{type:Object,default:{}},sanitizeMermaid:{type:Function,default:e=>Promise.resolve(e)},codeFoldable:{type:Boolean,default:!0},autoFoldThreshold:{type:Number,default:30},onRemount:{type:Function,default:void 0},noEcharts:{type:Boolean,default:!1},previewComponent:{type:[Object,Function],default:void 0}},dt={...pe,onSave:{type:Function,default:void 0},onUploadImg:{type:Function,default:void 0},pageFullscreen:{type:Boolean,default:!1},preview:{type:Boolean,default:!0},htmlPreview:{type:Boolean,default:!1},toolbars:{type:Array,default:p.allToolbar},floatingToolbars:{type:Array,default:[]},toolbarsExclude:{type:Array,default:[]},noPrettier:{type:Boolean,default:!1},tabWidth:{type:Number,default:2},tableShape:{type:Array,default:[6,4]},placeholder:{type:String,default:""},defToolbars:{type:[String,Object],default:void 0},onError:{type:Function,default:void 0},footers:{type:Array,default:p.allFooter},scrollAuto:{type:Boolean,default:!0},defFooters:{type:[String,Object],default:void 0},noUploadImg:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},maxLength:{type:Number,default:void 0},autoDetectCode:{type:Boolean,default:!1},onBlur:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},completions:{type:Array,default:void 0},showToolbarName:{type:Boolean,default:!1},onInput:{type:Function,default:void 0},onDrop:{type:Function,default:void 0},inputBoxWidth:{type:String,default:"50%"},onInputBoxWidthChange:{type:Function,default:void 0},transformImgUrl:{type:Function,default:e=>e},catalogLayout:{type:String,default:"fixed"},catalogMaxDepth:{type:Number,default:void 0}},me=["onHtmlChanged","onGetCatalog","onChange","onRemount","update:modelValue"],ut=[...me,"onSave","onUploadImg","onError","onBlur","onFocus","onInput","onDrop","onInputBoxWidthChange"],Y=o.defineComponent({name:"MdPreview",props:pe,emits:me,setup(e,t){const{noKatex:a,noMermaid:r,noHighlight:n}=e,s=o.ref(),d=de(e);ce(e,{rootRef:s,editorId:d}),we(e,t,{editorId:d}),o.onBeforeUnmount(()=>{h.bus.clear(d)});const f=c=>{e.onChange?.(c),t.emit("onChange",c),t.emit("update:modelValue",c)},u=c=>{e.onHtmlChanged?.(c),t.emit("onHtmlChanged",c)},i=c=>{e.onGetCatalog?.(c),t.emit("onGetCatalog",c)},l=()=>{e.onRemount?.(),t.emit("onRemount")};return()=>o.createVNode("div",{id:d,class:[p.prefix,e.class,`${p.prefix}-previewOnly`],"data-theme":e.theme,style:e.style,ref:s},[o.createVNode(fe,{modelValue:e.modelValue,onChange:f,onHtmlChanged:u,onGetCatalog:i,mdHeadingId:e.mdHeadingId,noMermaid:r,sanitize:e.sanitize,noKatex:a,formatCopiedText:e.formatCopiedText,noHighlight:n,noImgZoomIn:e.noImgZoomIn,previewOnly:!0,sanitizeMermaid:e.sanitizeMermaid,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,onRemount:l,noEcharts:e.noEcharts,previewComponent:e.previewComponent},null)])}});Y.install=e=>(e.component(Y.name,Y),e);exports.CDN_IDS=_;exports.ContentPreview=fe;exports.MdPreview=Y;exports.contentProps=it;exports.editorEmits=ut;exports.editorProps=dt;exports.emitReplace=Q;exports.useCatalog=ke;exports.useConfig=$e;exports.useEditorId=de;exports.useErrorCatcher=Te;exports.useExpansion=Se;exports.useExpose=Ae;exports.useOnSave=Ee;exports.useProvide=Ie;