@drincs/pixi-vn-ink 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-54QJQIS3.mjs → chunk-2T6YY6WR.mjs} +67 -67
- package/dist/{chunk-HE25JM4E.mjs → chunk-RBEZEIB4.mjs} +1 -1
- package/dist/index.cjs +68 -68
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/mapper.cjs +16 -16
- package/dist/mapper.mjs +16 -16
- package/dist/parser.cjs +54 -54
- package/dist/parser.d.cts +36 -3
- package/dist/parser.d.ts +36 -3
- package/dist/parser.mjs +54 -54
- package/dist/{type-Br1aIqKp.d.cts → type-BP8kOOSc.d.cts} +1 -1
- package/dist/{type-DIFR_5pl.d.ts → type-dq-kyUrF.d.ts} +1 -1
- package/dist/{types-B7f5EzP5.d.cts → types-C31N1m1a.d.cts} +27 -1
- package/dist/{types-B7f5EzP5.d.ts → types-C31N1m1a.d.ts} +27 -1
- package/dist/vite-listener.cjs +58 -58
- package/dist/vite-listener.d.cts +2 -2
- package/dist/vite-listener.d.ts +2 -2
- package/dist/vite-listener.mjs +1 -1
- package/dist/vite.cjs +65 -65
- package/dist/vite.d.cts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.mjs +5 -5
- package/package.json +2 -2
package/dist/mapper.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {ZodType}from'zod';import {PIXIVNJSON_SCHEMA_URL,PixiVNJsonComparationOperators}from'@drincs/pixi-vn-json';import {RegisteredCharacters}from'@drincs/pixi-vn/characters';var te="global decl",z="___external_value___",xe=/\[([^\]]+)\]/;var P;(a=>(a.log=(n,...o)=>console.log(`[Pixi\u2019VN Ink] ${n}`,...o),a.warn=(n,...o)=>console.warn(`[Pixi\u2019VN Ink] ${n}`,...o),a.error=(n,...o)=>console.error(`[Pixi\u2019VN Ink] ${n}`,...o),a.info=(n,...o)=>console.info(`[Pixi\u2019VN Ink] ${n}`,...o)))(P||={});var $e=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ze=/[\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\u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-\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]/,Ue=/[\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\u0AE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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-\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DE3A\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]/,ae={Space_Separator:$e,ID_Start:ze,ID_Continue:Ue},w={isSpaceSeparator(e){return typeof e=="string"&&ae.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||ae.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||ae.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}},le,J,j,ie,H,M,k,fe,K,qe=function(u,i){le=String(u),J="start",j=[],ie=0,H=1,M=0,k=void 0,fe=void 0,K=void 0;do k=Ge(),Xe[J]();while(k.type!=="eof");return typeof i=="function"?De({"":K},"",i):K};function De(e,u,i){let r=e[u];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a<r.length;a++){let n=String(a),o=De(r,n,i);o===void 0?delete r[n]:Object.defineProperty(r,n,{value:o,writable:true,enumerable:true,configurable:true});}else for(let a in r){let n=De(r,a,i);n===void 0?delete r[a]:Object.defineProperty(r,a,{value:n,writable:true,enumerable:true,configurable:true});}return i.call(e,u,r)}var v,B,Z,_,S;function Ge(){for(v="default",B="",Z=false,_=1;;){S=I();let e=be[v]();if(e)return e}}function I(){if(le[ie])return String.fromCodePoint(le.codePointAt(ie))}function p(){let e=I();return e===`
|
|
2
|
-
`?(
|
|
3
|
-
`:case "\r":case "\u2028":case "\u2029":p();return;case "/":p(),
|
|
4
|
-
`:case "\r":case "\u2028":case "\u2029":p(),
|
|
5
|
-
`:case "\r":throw N(p());case "\u2028":case "\u2029":Ze(
|
|
6
|
-
`;case "r":return p(),"\r";case "t":return p()," ";case "v":return p(),"\v";case "0":if(p(),
|
|
7
|
-
`:case "\u2028":case "\u2029":return p(),"";case "\r":return p(),
|
|
8
|
-
`&&p(),"";case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":throw N(p());case void 0:throw N(p())}return p()}function Qe(){let e="",u=
|
|
9
|
-
`+
|
|
10
|
-
`+
|
|
11
|
-
`+
|
|
12
|
-
`+
|
|
13
|
-
`+
|
|
14
|
-
`+
|
|
15
|
-
`),e=e.replaceAll("\\t"," "),e=e.replaceAll(" "," "),e=e.replaceAll(je,"\\\\"),e}function W(e,u,i,r){let{functions:a}=r;e=e.map(o=>{if(typeof o=="string")switch(o){case "rnd":return "RANDOM";case "?":return "CONTAINS"}return o});let n=[];return e.forEach(o=>{if(typeof o=="string")switch(o){case "&&":case "||":if(n.length>=2){let c={type:"union",unionType:o==="&&"?"and":"or",conditions:[n[n.length-2],n[n.length-1]]};n.pop(),n.pop(),n.push(c);}break;case "!":if(n.length===0)P.error("Error parsing ink file: Conditional statement is not valid",e);else {let c={type:"union",unionType:"not",condition:n[n.length-1]};n[n.length-1]=c;}break;case "!?":if(n.length>1){let c={type:"union",unionType:"not",condition:{type:"compare",operator:"CONTAINS",leftValue:n[n.length-2],rightValue:n[n.length-1]}};n.pop(),n.pop(),n.push(c);}else P.error("Error parsing ink file: Conditional statement is not valid",e);break;default:if(PixiVNJsonComparationOperators.includes(o))if(n.length<2)P.error("Error parsing ink file: Conditional statement is not valid",e);else {let c={type:"compare",operator:o,rightValue:n[n.length-1],leftValue:n[n.length-2]};n.pop(),n.pop(),n.push(c);}else if(Le.includes(o))if(n.length<2)P.error("Error parsing ink file: Conditional statement is not valid",e);else {o==="L^"&&(o="INTERSECTION");let c={type:"arithmetic",operator:o,rightValue:n[n.length-1],leftValue:n[n.length-2]};n.pop(),n.pop(),n.push(c);}else if(_e.includes(o)){let c={type:"arithmeticsingle",operator:o,leftValue:n[n.length-1]};n.pop(),n.push(c);}else o.startsWith("^")&&n.push(L(o));}else if(typeof o=="object"&&"CNT?"in o)if(new RegExp(/.*\.[0-9]\..*/).test(o["CNT?"])){let c=o["CNT?"].split("."),C=c.pop(),s=c.pop();if(s===void 0||C===void 0){P.error("Error parsing ink file: Conditional statement is not valid",e);return}let D=Number(s),f=c.join(".");if(f.includes("^.")){let h=f.split("."),y=h[h.length-1].replaceAll(".","_|_");h.pop(),f=`${h.join(".")}.${y}`,C.includes("c-")&&(f=f+"_|_"+C);}else f=f.replaceAll(".","_|_");let d=Y(f,u);if(!d)return;n.push({type:"compare",leftValue:Ae(d),operator:">=",rightValue:{type:"value",value:D}});}else {let c=Y(o["CNT?"],u);if(!c)return;n.push(Ae(c));}else if(typeof o=="object"&&"VAR?"in o)n.push(G({key:o["VAR?"],defaultType:"storage"},i));else if(typeof o=="object"&&"f()"in o){let c=o["f()"],C=a.find(D=>D.name===c);if(!C){P.error(`Error parsing ink file: Function ${c} is not defined`,e);return}let s=[];for(let D=0;D<C.args;D++)n.length!==0&&s.push(n.pop());n.push({type:"function",functionName:c,args:s.reverse()});}else if(typeof o=="object"&&"^->"in o)o["^->"].includes("$r")||n.push(o["^->"]);else if(typeof o=="object"&&"list"in o){let c=Object.values(o.list).map(C=>C);n.push(c);}else n.push(o);}),n}function ge(e,u,i,r){return W(e,u,i,r)}function G(e,u,i){let{key:r,defaultType:a}=e,n=u.indexOf(r);return n>=0?{type:"value",storageType:"params",storageOperationType:"get",key:n}:{type:"value",storageOperationType:"get",storageType:a,key:r}}function ue(e,u,i){let{key:r,value:a,defaultType:n,artmeticValue:o}=e,c=u.indexOf(r);if(c>=0)return [{type:"value",storageType:"params",storageOperationType:"set",key:c,value:a}];if(o){if(typeof a=="object"&&"list"in a){let C=Object.values(a.list).map(s=>s);return [{type:"value",storageOperationType:"set",storageType:n,key:r,value:C}]}return [{type:"value",storageOperationType:"set",storageType:n,key:r,value:a}]}else if(typeof a=="object"){if("list"in a&&typeof a.list=="object"){if("origins"in a&&Array.isArray(a.origins)&&a.origins.length>0)return a.origins.reduce(C=>(C.push({type:"value",storageOperationType:"set",storageType:n,key:r,value:Object.values(i.enums[r])}),Object.entries(i.enums[r]).forEach(([s,D])=>{C.push({type:"value",storageOperationType:"set",storageType:n,key:`${r}.${s}`,value:D});}),C),[]);{let C=new Set,s=Object.entries(a.list).reduce((D,[f,d])=>{let[h,y]=f.split(".");return D.push({type:"value",storageOperationType:"set",storageType:n,key:y,value:d}),C.add(h),D},[]);return C.forEach(D=>{s.push({type:"value",storageOperationType:"set",storageType:n,key:D,value:Object.values(i.enums[D])});}),r in i.enums?Object.entries(i.enums[r]).forEach(([D,f])=>{s.push({type:"value",storageOperationType:"set",storageType:n,key:`${r}.${D}`,value:f});}):s.push({type:"value",storageOperationType:"set",storageType:n,key:r,value:Object.values(a.list)}),s}}else if(typeof a=="object"&&"VAR?"in a){if(typeof a["VAR?"]=="string"&&a["VAR?"].includes(".")){let[C,s]=a["VAR?"].split(".");if(C in i.enums&&s in i.enums[C])return [{type:"value",storageOperationType:"set",storageType:n,key:r,value:i.enums[C][s]}]}return [{type:"value",storageOperationType:"set",storageType:n,key:r,value:G({key:a["VAR?"],defaultType:"storage"},u)}]}}return [{type:"value",storageOperationType:"set",storageType:n,key:r,value:a}]}function Ae(e){return {type:"value",storageType:"label",storageOperationType:"get",label:e}}function Fe(e,u){return u||new RegExp(`${"_|_".replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}c-\\d+$`).test(e)?"call":"jump"}function se(e,u){if(u){if(typeof u=="string")u.startsWith("^")&&e.push(L(u));else if(typeof u=="object"&&"type"in u)switch(u.type){case "value":case "function":console.warn("Warning: trying to add a value or function operation as text. This is likely a mistake, so it will be ignored.");break;default:e.push(u);}}}function he(e,u,i,r,a,n={}){let{isNewLine:o=true,isHashtagScript:c=false,isThreads:C=false}=n;return ru(e,u,i,r,a,{isNewLine:o,isHashtagScript:c,isThreads:C})}function ru(e,u,i,r,a,n){if(!u)return;let{isNewLine:o,isHashtagScript:c=false,isThreads:C}=n;if(c){if(Array.isArray(u)&&u.length>0){let s={goNextStep:true},D=[];try{if(u.length===1&&typeof u[0]=="string"&&!u[0].match(xe)){let f=u[0],d=ee.convertTagTolist(f),h=ee.convertOperation(d,s,{silent:!0});h&&(h.$origin=f,D.push(h));}}catch{}D.length===0&&D.push({type:"operationtoconvert",values:u}),e.push({...s,operations:D});}}else if(typeof u=="string"&&u.startsWith("^")||u&&typeof u=="object"&&"type"in u&&u.type==="value"&&u.storageOperationType==="get"){if(!o&&e.length>0){let s=e[e.length-1];!s.glueEnabled&&!s.operations&&!s.labelToOpen&&(s.glueEnabled=true,s.labelToOpen||(s.goNextStep=true)),e[e.length-1]=s;}typeof u=="string"?e.push(su(L(u),r.characterIds)):e.push({dialogue:u});}else if(typeof u=="string"){if(u==="end")e.push({end:"game_end"});else if(u==="done")e.push({end:"label_end",goNextStep:true});else if(u==="<>")if(e.length>0){let s=e[e.length-1];s.glueEnabled=true,s.labelToOpen||(s.goNextStep=true),e[e.length-1]=s;}else e.push({glueEnabled:true,goNextStep:false});}else if(typeof u=="object"){if("type"in u)switch(u.type){case "value":u.storageOperationType==="set"?(typeof u.value=="string"&&u.value.startsWith("^")&&(u.value=L(u.value)),e.push({goNextStep:true,operations:[u]})):console.warn("Warning: trying to add a value get operation as step. This is likely a mistake, so it will be ignored.");break;case "function":e.push({goNextStep:true,operations:[u]});break;default:if(!o&&e.length>0){let s=e[e.length-1];!s.glueEnabled&&!s.operations&&(s.glueEnabled=true,s.labelToOpen||(s.goNextStep=true)),e[e.length-1]=s;}e.push({conditionalStep:u});}else if("->"in u){let s=o?void 0:true;if(s&&i.includes("c-")&&e.length>0&&e[e.length-1]?.dialogue===void 0&&(s=void 0),!o&&e.length>0){let D=e[e.length-1];D.labelToOpen||(D.goNextStep=true),e[e.length-1]=D;}if(u.params&&u.params.length===0&&delete u.params,u.var)e.push({labelToOpen:{label:G({key:u["->"],defaultType:"storage"},a),type:C?"call":"jump",params:u.params},glueEnabled:s});else {let D=Y(u["->"],i);if(!D)return;e.push({labelToOpen:{label:D,type:Fe(D,C),params:u.params},glueEnabled:s});}}else if("->t->"in u){let s=o?void 0:true;if(s&&i.includes("c-")&&e.length>0&&e[e.length-1]?.dialogue===void 0&&(s=void 0),!o&&e.length>0){let f=e[e.length-1];f.labelToOpen||(f.goNextStep=true),e[e.length-1]=f;}u.params&&u.params.length===0&&delete u.params;let D=Y(u["->t->"],i);if(!D)return;e.push({labelToOpen:{label:D,type:"call",params:u.params},glueEnabled:s});}}}function su(e,u){let i;if(e.includes(": ")){let r=e.split(": "),a=r[0],n=r.slice(1).join(": ");(u?.has(a)||RegisteredCharacters.has(a))&&(i=a,e=n);}return i?{dialogue:{character:i,text:e}}:{dialogue:e}}function Ee(e,u,i,r=true,a=false){return ou(e,u,i,r,a)}function ou(e,u,i,r,a=false){u&&(typeof u=="string"&&u.startsWith("^")||u&&typeof u=="object"&&"type"in u&&u.type==="value"&&u.storageOperationType==="get"?typeof u=="string"?e.push(L(u)):e.push(u):typeof u=="object"&&"type"in u&&e.push(u));}function oe(e,u,i,r){if(e.length===0){P.error("Error parsing ink file: Arithmetic statement is not valid",e);return}let a=W(e,u,i,r);if(a.length===1){let n=a[0];return n&&typeof n=="object"&&"type"in n?{type:"value",storageType:"logic",storageOperationType:"get",operation:n}:n}}function Q(e,u,i,r="",a,n,o=void 0){let c=[],C="sequential",s=false,D=true;e.forEach(h=>{h==="%"&&(C="loop"),h==="seq"&&(C="random"),h==="MIN"&&(s=true);});let f=e[e.length-1];return Object.keys(f).forEach(h=>{let y=f[h];if(Array.isArray(y)&&y.length>3){y=y.slice(1,y.length-2);let A=[];$(y,r,a,A,u,u,i,X,o,true,n),A.length===1?c.push(A[0]):c.push({type:"resulttocombine",combine:"cross",secondConditionalItem:A});}else Array.isArray(y)&&y.length===3&&(D=false);}),C==="sequential"?{type:"stepswitch",elements:c,choiceType:C,end:D?"lastItem":void 0,nestedId:o}:s&&C==="random"?{type:"stepswitch",elements:c,choiceType:"sequentialrandom",end:D?"lastItem":void 0,nestedId:o}:{type:"stepswitch",elements:c,choiceType:C}}function $(e,u,i,r=[],a,n,o,c,C=void 0,s=true,D=[]){let f=false,d=[],h=false,y=false,A=false,T=[],m=[];if(i.preDialog[u]&&(s=false,a(r,`^${i.preDialog[u].text}`,u,i,D,{isNewLine:s,isHashtagScript:y,isThreads:A}),i.preDialog[u].glue&&a(r,"<>",u,i,D,{isNewLine:s,isHashtagScript:y,isThreads:A}),delete i.preDialog[u]),e.includes("visit")){let t=Q(e,n,o,u,i,D,C);t&&(!s&&r.length>0&&a(r,"<>",u,i,D,{isNewLine:s,isHashtagScript:y,isThreads:A}),a(r,t,u,i,D,{isNewLine:s,isHashtagScript:y,isThreads:A}));return}let b=e[0];if(b&&typeof b=="object"&&"temp="in b){for(;e[0]&&typeof e[0]=="object"&&"temp="in e[0];)D.push(e[0]["temp="]),e.shift();D=D.reverse();}if(e.forEach((t,F)=>{if(y){if(typeof t=="string"&&t==="/#"){let l=[];$(m,u,i,l,Ee,Ee,o,c,C,s),a(r,l,u,i,D,{isNewLine:s,isHashtagScript:y,isThreads:A}),y=false,m=[];}else m.push(t);return}else if(f)if(Array.isArray(t))d.push(t);else if(t&&typeof t=="object")"CNT?"in t?F>0&&e[F-1]==="ev"?(h=true,T.push(t)):h?T.push(t):(d.push(t),s=false):"VAR="in t||"temp="in t?ue({key:"VAR="in t?t["VAR="]:t["temp="],value:e[F-1],defaultType:"VAR="in t?"storage":"tempstorage"},D,i).forEach(g=>{if(g.value&&typeof g.value=="string"&&g.value==="/str"&&(g.value=e[F-2]),g.value&&typeof g.value=="object"&&"^->"in g.value&&(g.value=g.value["^->"]),d.length>1){let E=oe(d,u,D,i);d=[],E&&typeof E=="object"&&"type"in E&&E.type==="value"&&"storageType"in E&&E.storageType==="logic"&&(g.value=E.operation);}(typeof g.key!="string"||!g.key.includes("$r"))&&(a(r,g,u,i,D,{isNewLine:s,isHashtagScript:y,isThreads:A}),s=true);}):"VAR?"in t?d.push(t):"^->"in t?t["^->"].includes("$r")||d.push(t):("f()"in t||"list"in t&&typeof t.list=="object")&&d.push(t);else switch(t){case "/ev":h&&T.push(t),f=false,d.push(t);break;case "out":if(d.length>0){let l=d[d.length-1];if(l&&typeof l=="object"&&"VAR?"in l){d.pop();let g=G({key:l["VAR?"],defaultType:"storage"},D);a(r,g,u,i,D,{isNewLine:s,isHashtagScript:y,isThreads:A});}else {let g=[];for(;d.length>0&&d[d.length-1]!=="/ev";)g.push(d.pop());g=g.reverse();let E=oe(g,u,D,i);d=[],E&&typeof E=="object"&&"type"in E&&E.type==="value"&&"storageType"in E&&E.storageType==="logic"?a(r,{storageOperationType:"get",storageType:"logic",operation:E.operation,type:"value"},u,i,D,{isNewLine:s,isHashtagScript:y,isThreads:A}):(a(r,"<>",u,i,D,{isNewLine:s,isHashtagScript:y,isThreads:A}),E=`^${E}`,a(r,E,u,i,D,{isNewLine:s,isHashtagScript:y,isThreads:A}));}s=false;}break;case "pop":{let l=d[d.length-1];if(l&&typeof l=="object"&&"f()"in l){let g=[];for(;d.length>0&&d[d.length-1]!=="/ev";)g.push(d.pop());g=g.reverse();let E=W(g,u,D,i);d=[],E.forEach(x=>{x&&typeof x=="object"&&"type"in x&&x.type==="function"?a(r,x,u,i,D,{isNewLine:s,isHashtagScript:y,isThreads:A}):P.warn("Unhandled case: value is not a function",x);}),s=false;}else d.push(t);return}default:d.push(t);}else if(typeof t=="string")if(t.startsWith("^"))a(r,t,u,i,D,{isNewLine:s,isHashtagScript:y,isThreads:A}),s=false;else if(t==="ev")f=true;else if(t===`
|
|
16
|
-
`)
|
|
1
|
+
import {ZodType}from'zod';import {PIXIVNJSON_SCHEMA_URL,PixiVNJsonComparationOperators}from'@drincs/pixi-vn-json';import {RegisteredCharacters}from'@drincs/pixi-vn/characters';var ne="global decl",U="___external_value___";var O;(l=>(l.log=(t,...a)=>console.log(`[Pixi\u2019VN Ink] ${t}`,...a),l.warn=(t,...a)=>console.warn(`[Pixi\u2019VN Ink] ${t}`,...a),l.error=(t,...a)=>console.error(`[Pixi\u2019VN Ink] ${t}`,...a),l.info=(t,...a)=>console.info(`[Pixi\u2019VN Ink] ${t}`,...a)))(O||={});var We=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ze=/[\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\u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0F88-\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\uFB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\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]/,Ue=/[\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-\uD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6C\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]/,le={Space_Separator:We,ID_Start:ze,ID_Continue:Ue},k={isSpaceSeparator(e){return typeof e=="string"&&le.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||le.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||le.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}},De,M,I,re,$,L,R,de,ee,qe=function(u,n){De=String(u),M="start",I=[],re=0,$=1,L=0,R=void 0,de=void 0,ee=void 0;do R=Ge(),Xe[M]();while(R.type!=="eof");return typeof n=="function"?ce({"":ee},"",n):ee};function ce(e,u,n){let s=e[u];if(s!=null&&typeof s=="object")if(Array.isArray(s))for(let l=0;l<s.length;l++){let t=String(l),a=ce(s,t,n);a===void 0?delete s[t]:Object.defineProperty(s,t,{value:a,writable:true,enumerable:true,configurable:true});}else for(let l in s){let t=ce(s,l,n);t===void 0?delete s[l]:Object.defineProperty(s,l,{value:t,writable:true,enumerable:true,configurable:true});}return n.call(e,u,s)}var S,B,K,j,b;function Ge(){for(S="default",B="",K=false,j=1;;){b=H();let e=be[S]();if(e)return e}}function H(){if(De[re])return String.fromCodePoint(De.codePointAt(re))}function p(){let e=H();return e===`
|
|
2
|
+
`?($++,L=0):e?L+=e.length:L++,e&&(re+=e.length),e}var be={default(){switch(b){case " ":case "\v":case "\f":case " ":case "\xA0":case "\uFEFF":case `
|
|
3
|
+
`:case "\r":case "\u2028":case "\u2029":p();return;case "/":p(),S="comment";return;case void 0:return p(),w("eof")}if(k.isSpaceSeparator(b)){p();return}return be[M]()},comment(){switch(b){case "*":p(),S="multiLineComment";return;case "/":p(),S="singleLineComment";return}throw N(p())},multiLineComment(){switch(b){case "*":p(),S="multiLineCommentAsterisk";return;case void 0:throw N(p())}p();},multiLineCommentAsterisk(){switch(b){case "*":p();return;case "/":p(),S="default";return;case void 0:throw N(p())}p(),S="multiLineComment";},singleLineComment(){switch(b){case `
|
|
4
|
+
`:case "\r":case "\u2028":case "\u2029":p(),S="default";return;case void 0:return p(),w("eof")}p();},value(){switch(b){case "{":case "[":return w("punctuator",p());case "n":return p(),q("ull"),w("null",null);case "t":return p(),q("rue"),w("boolean",true);case "f":return p(),q("alse"),w("boolean",false);case "-":case "+":p()==="-"&&(j=-1),S="sign";return;case ".":B=p(),S="decimalPointLeading";return;case "0":B=p(),S="zero";return;case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":B=p(),S="decimalInteger";return;case "I":return p(),q("nfinity"),w("numeric",1/0);case "N":return p(),q("aN"),w("numeric",NaN);case '"':case "'":K=p()==='"',B="",S="string";return}throw N(p())},identifierNameStartEscape(){if(b!=="u")throw N(p());p();let e=fe();switch(e){case "$":case "_":break;default:if(!k.isIdStartChar(e))throw Se();break}B+=e,S="identifierName";},identifierName(){switch(b){case "$":case "_":case "\u200C":case "\u200D":B+=p();return;case "\\":p(),S="identifierNameEscape";return}if(k.isIdContinueChar(b)){B+=p();return}return w("identifier",B)},identifierNameEscape(){if(b!=="u")throw N(p());p();let e=fe();switch(e){case "$":case "_":case "\u200C":case "\u200D":break;default:if(!k.isIdContinueChar(e))throw Se();break}B+=e,S="identifierName";},sign(){switch(b){case ".":B=p(),S="decimalPointLeading";return;case "0":B=p(),S="zero";return;case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":B=p(),S="decimalInteger";return;case "I":return p(),q("nfinity"),w("numeric",j*(1/0));case "N":return p(),q("aN"),w("numeric",NaN)}throw N(p())},zero(){switch(b){case ".":B+=p(),S="decimalPoint";return;case "e":case "E":B+=p(),S="decimalExponent";return;case "x":case "X":B+=p(),S="hexadecimal";return}return w("numeric",j*0)},decimalInteger(){switch(b){case ".":B+=p(),S="decimalPoint";return;case "e":case "E":B+=p(),S="decimalExponent";return}if(k.isDigit(b)){B+=p();return}return w("numeric",j*Number(B))},decimalPointLeading(){if(k.isDigit(b)){B+=p(),S="decimalFraction";return}throw N(p())},decimalPoint(){switch(b){case "e":case "E":B+=p(),S="decimalExponent";return}if(k.isDigit(b)){B+=p(),S="decimalFraction";return}return w("numeric",j*Number(B))},decimalFraction(){switch(b){case "e":case "E":B+=p(),S="decimalExponent";return}if(k.isDigit(b)){B+=p();return}return w("numeric",j*Number(B))},decimalExponent(){switch(b){case "+":case "-":B+=p(),S="decimalExponentSign";return}if(k.isDigit(b)){B+=p(),S="decimalExponentInteger";return}throw N(p())},decimalExponentSign(){if(k.isDigit(b)){B+=p(),S="decimalExponentInteger";return}throw N(p())},decimalExponentInteger(){if(k.isDigit(b)){B+=p();return}return w("numeric",j*Number(B))},hexadecimal(){if(k.isHexDigit(b)){B+=p(),S="hexadecimalInteger";return}throw N(p())},hexadecimalInteger(){if(k.isHexDigit(b)){B+=p();return}return w("numeric",j*Number(B))},string(){switch(b){case "\\":p(),B+=Ye();return;case '"':if(K)return p(),w("string",B);B+=p();return;case "'":if(!K)return p(),w("string",B);B+=p();return;case `
|
|
5
|
+
`:case "\r":throw N(p());case "\u2028":case "\u2029":Ze(b);break;case void 0:throw N(p())}B+=p();},start(){switch(b){case "{":case "[":return w("punctuator",p())}S="value";},beforePropertyName(){switch(b){case "$":case "_":B=p(),S="identifierName";return;case "\\":p(),S="identifierNameStartEscape";return;case "}":return w("punctuator",p());case '"':case "'":K=p()==='"',S="string";return}if(k.isIdStartChar(b)){B+=p(),S="identifierName";return}throw N(p())},afterPropertyName(){if(b===":")return w("punctuator",p());throw N(p())},beforePropertyValue(){S="value";},afterPropertyValue(){switch(b){case ",":case "}":return w("punctuator",p())}throw N(p())},beforeArrayValue(){if(b==="]")return w("punctuator",p());S="value";},afterArrayValue(){switch(b){case ",":case "]":return w("punctuator",p())}throw N(p())},end(){throw N(p())}};function w(e,u){return {type:e,value:u,line:$,column:L}}function q(e){for(let u of e){if(H()!==u)throw N(p());p();}}function Ye(){switch(H()){case "b":return p(),"\b";case "f":return p(),"\f";case "n":return p(),`
|
|
6
|
+
`;case "r":return p(),"\r";case "t":return p()," ";case "v":return p(),"\v";case "0":if(p(),k.isDigit(H()))throw N(p());return "\0";case "x":return p(),Qe();case "u":return p(),fe();case `
|
|
7
|
+
`:case "\u2028":case "\u2029":return p(),"";case "\r":return p(),H()===`
|
|
8
|
+
`&&p(),"";case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":throw N(p());case void 0:throw N(p())}return p()}function Qe(){let e="",u=H();if(!k.isHexDigit(u)||(e+=p(),u=H(),!k.isHexDigit(u)))throw N(p());return e+=p(),String.fromCodePoint(parseInt(e,16))}function fe(){let e="",u=4;for(;u-- >0;){let n=H();if(!k.isHexDigit(n))throw N(p());e+=p();}return String.fromCodePoint(parseInt(e,16))}var Xe={start(){if(R.type==="eof")throw G();pe();},beforePropertyName(){switch(R.type){case "identifier":case "string":de=R.value,M="afterPropertyName";return;case "punctuator":ie();return;case "eof":throw G()}},afterPropertyName(){if(R.type==="eof")throw G();M="beforePropertyValue";},beforePropertyValue(){if(R.type==="eof")throw G();pe();},beforeArrayValue(){if(R.type==="eof")throw G();if(R.type==="punctuator"&&R.value==="]"){ie();return}pe();},afterPropertyValue(){if(R.type==="eof")throw G();switch(R.value){case ",":M="beforePropertyName";return;case "}":ie();}},afterArrayValue(){if(R.type==="eof")throw G();switch(R.value){case ",":M="beforeArrayValue";return;case "]":ie();}},end(){}};function pe(){let e;switch(R.type){case "punctuator":switch(R.value){case "{":e={};break;case "[":e=[];break}break;case "null":case "boolean":case "numeric":case "string":e=R.value;break}if(ee===void 0)ee=e;else {let u=I[I.length-1];Array.isArray(u)?u.push(e):Object.defineProperty(u,de,{value:e,writable:true,enumerable:true,configurable:true});}if(e!==null&&typeof e=="object")I.push(e),Array.isArray(e)?M="beforeArrayValue":M="beforePropertyName";else {let u=I[I.length-1];u==null?M="end":Array.isArray(u)?M="afterArrayValue":M="afterPropertyValue";}}function ie(){I.pop();let e=I[I.length-1];e==null?M="end":Array.isArray(e)?M="afterArrayValue":M="afterPropertyValue";}function N(e){return se(e===void 0?`JSON5: invalid end of input at ${$}:${L}`:`JSON5: invalid character '${Ve(e)}' at ${$}:${L}`)}function G(){return se(`JSON5: invalid end of input at ${$}:${L}`)}function Se(){return L-=5,se(`JSON5: invalid identifier character at ${$}:${L}`)}function Ze(e){console.warn(`JSON5: '${Ve(e)}' in strings is not valid ECMAScript; consider escaping`);}function Ve(e){let u={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(u[e])return u[e];if(e<" "){let n=e.charCodeAt(0).toString(16);return "\\x"+("00"+n).substring(n.length)}return e}function se(e){let u=new SyntaxError(e);return u.lineNumber=$,u.columnNumber=L,u}var Ke=function(u,n,s){let l=[],t="",a,f,g="",o;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(s=n.space,o=n.quote,n=n.replacer),typeof n=="function")f=n;else if(Array.isArray(n)){a=[];for(let h of n){let v;typeof h=="string"?v=h:(typeof h=="number"||h instanceof String||h instanceof Number)&&(v=String(h)),v!==void 0&&a.indexOf(v)<0&&a.push(v);}}return s instanceof Number?s=Number(s):s instanceof String&&(s=String(s)),typeof s=="number"?s>0&&(s=Math.min(10,Math.floor(s)),g=" ".substr(0,s)):typeof s=="string"&&(g=s.substr(0,10)),c("",{"":u});function c(h,v){let m=v[h];switch(m!=null&&(typeof m.toJSON5=="function"?m=m.toJSON5(h):typeof m.toJSON=="function"&&(m=m.toJSON(h))),f&&(m=f.call(v,h,m)),m instanceof Number?m=Number(m):m instanceof String?m=String(m):m instanceof Boolean&&(m=m.valueOf()),m){case null:return "null";case true:return "true";case false:return "false"}if(typeof m=="string")return C(m);if(typeof m=="number")return String(m);if(typeof m=="object")return Array.isArray(m)?y(m):A(m)}function C(h){let v={"'":.1,'"':.2},m={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},V="";for(let r=0;r<h.length;r++){let d=h[r];switch(d){case "'":case '"':v[d]++,V+=d;continue;case "\0":if(k.isDigit(h[r+1])){V+="\\x00";continue}}if(m[d]){V+=m[d];continue}if(d<" "){let D=d.charCodeAt(0).toString(16);V+="\\x"+("00"+D).substring(D.length);continue}V+=d;}let i=o||Object.keys(v).reduce((r,d)=>v[r]<v[d]?r:d);return V=V.replace(new RegExp(i,"g"),m[i]),i+V+i}function A(h){if(l.indexOf(h)>=0)throw TypeError("Converting circular structure to JSON5");l.push(h);let v=t;t=t+g;let m=a||Object.keys(h),V=[];for(let r of m){let d=c(r,h);if(d!==void 0){let D=E(r)+":";g!==""&&(D+=" "),D+=d,V.push(D);}}let i;if(V.length===0)i="{}";else {let r;if(g==="")r=V.join(","),i="{"+r+"}";else {let d=`,
|
|
9
|
+
`+t;r=V.join(d),i=`{
|
|
10
|
+
`+t+r+`,
|
|
11
|
+
`+v+"}";}}return l.pop(),t=v,i}function E(h){if(h.length===0)return C(h);let v=String.fromCodePoint(h.codePointAt(0));if(!k.isIdStartChar(v))return C(h);for(let m=v.length;m<h.length;m++)if(!k.isIdContinueChar(String.fromCodePoint(h.codePointAt(m))))return C(h);return h}function y(h){if(l.indexOf(h)>=0)throw TypeError("Converting circular structure to JSON5");l.push(h);let v=t;t=t+g;let m=[];for(let i=0;i<h.length;i++){let r=c(String(i),h);m.push(r!==void 0?r:"null");}let V;if(m.length===0)V="[]";else if(g==="")V="["+m.join(",")+"]";else {let i=`,
|
|
12
|
+
`+t,r=m.join(i);V=`[
|
|
13
|
+
`+t+r+`,
|
|
14
|
+
`+v+"]";}return l.pop(),t=v,V}},eu={parse:qe,stringify:Ke},uu=eu,Ce=uu;var Oe="\xA7SPACE\xA7",we="\xA7DOUBLE_QUOTES\xA7",Ne="\xA7QUOTES\xA7",ke="SPECIAL_\xA7QUOTES\xA7",Re="\xA7CURLY_BRACKETS1\xA7",tu="\xA7INK_VAR\xA7",Je="\xA7CURLY_BRACKETS2\xA7",ue;(i=>{let e=[],u=[];async function n(r,d){for(let D=0;D<e.length;D++)try{let{validation:F}=e[D].opts;if(F instanceof RegExp){if(!F.test(r.join(" ")))continue}else if(F instanceof ZodType&&!F.safeParse(r).success)continue;let T=await e[D].fn(r,d,C);if(T===!0||typeof T=="string")return T}catch{}return false}function s(r,d={name:"custom-command",validation:/^/}){e.unshift({fn:r,opts:d});}i.add=s;function l(){return [...u.map(r=>r.opts),...e.map(r=>r.opts)]}i.info=l;function t(r,d){u.unshift({fn:r,opts:d});}i.addMapper=t;function a(){e.length=0;}i.clear=a;function f(){u.length=0;}i.clearMappers=f;async function g(r,d,D){try{let F=o(r),T=await n(F,D);return T===!0?void 0:typeof T=="string"?(T.startsWith("#")&&(T=T.substring(1)),await i.run(T,d,D)):c(F,d)}catch(F){throw O.error("Error parsing ink hashtag-command",r),F}}i.run=g;function o(r,d){if(r=r.replaceAll('\\"',we),r=r.replaceAll("\\'",Ne),r=r.replaceAll("\\`",ke),r=r.replaceAll("\\{",Re),r=r.replaceAll("\\}",Je),d?.mergeInkVariables){let x;do x=r,r=r.replace(/\{[^{}:]*\}/g,tu);while(r!==x)}r=r.replaceAll("{"," { "),r=r.replaceAll("}"," } "),r=r.replaceAll(Re,"{"),r=r.replaceAll(Je,"}");let D=[],F,T="";for(let x=0;x<r.length;x++){let J=r[x];J==='"'||J==="'"||J==="`"?F===void 0?(D.push(T),T="",F=J,T+=J):F===J?(F=void 0,T+=J,D.push(T),T=""):T+=J:T+=J;}return T!==""&&D.push(T),D.forEach((x,J)=>{J%2===1&&(D[J]=x.replaceAll(" ",Oe));}),r=D.join(""),D=r.split(" ").filter(x=>x!==""),D=D.map(x=>x.replaceAll(Oe," ").replaceAll(we,'"').replaceAll(Ne,"'").replaceAll(ke,"`")),D=h(D),D=D.flatMap(x=>V(x)),D=D.map(x=>x.startsWith('"')&&x.endsWith('"')||x.startsWith("'")&&x.endsWith("'")||x.startsWith("`")&&x.endsWith("`")?x.slice(1,-1):x),D}i.convertTagTolist=o;function c(r,d,D){for(let F of u){let{validation:T}=F.opts,x=false;if(T instanceof RegExp?x=T.test(r.join(" ")):T instanceof ZodType&&(x=T.safeParse(r).success),x)return F.fn(r,d)}D?.silent||O.error("The operation is not valid",r);}i.convertOperation=c;function C(r){return A(r)}i.convertListStringToObj=C;function A(r){if(r.length===0)return {};if(r.length%2!==0)throw O.error("The props list must have a pair number of elements",r),new Error("The props list must have a pair number of elements");let d="{";r.forEach((D,F)=>{if(F%2===0)d+=`"${D}": `;else {switch(D){case "null":case "undefined":case "true":case "false":d+=`${D}`;break;default:y(D)?(D=E(D),d+=`"${D}"`):D.startsWith("{")&&D.endsWith("}")?d+=`${D}`:D.startsWith('"')&&D.endsWith('"')?d+=`${D}`:Number.isNaN(parseFloat(D))?d+=`"${D}"`:d+=`${D}`;}F<r.length-1&&(d+=", ");}}),d+="}";try{return Ce.parse(d)}catch(D){throw O.error("Error parsing ink json",d),D}}function E(r){return r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'")||r.startsWith("`")&&r.endsWith("`")?r.substring(1,r.length-1):r}function y(r){return !!(r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'")||r.startsWith("`")&&r.endsWith("`"))}function h(r){return v(r).tokens}i.mergeJsonBlocks=h;function v(r){let d=[],D=false;for(let F=0;F<r.length;F++){let T=r[F];if(T!=="{"){d.push(T);continue}let x=m(r,F);if(x===-1){d.push(T);continue}let J=v(r.slice(F+1,x)),Te=["{",...J.tokens,"}"],xe=Te.join(" ");if(!J.hasInvalidMatchedBlock)try{Ce.parse(xe),d.push(xe),F=x;continue}catch{}D=true,d.push(...Te),F=x;}return {tokens:d,hasInvalidMatchedBlock:D}}function m(r,d){let D=0;for(let F=d;F<r.length;F++)if(r[F]==="{")D++;else if(r[F]==="}"&&(D--,D===0))return F;return -1}function V(r){if(r==="["||r==="]")return [r];let d=0,D=r.length,F=[];for(;d<D&&r[d]==="[";)F.push("["),d++;let T=[];for(;D>d&&r[D-1]==="]";)T.unshift("]"),D--;let x=r.slice(d,D);return x===""?[...F,...T]:[...F,x,...T]}})(ue||={});var Me=["+","-","/","*","%","_","==",">","<",">=","<=","!=","!","&&","||","MIN","MAX"],Le=["+","-","/","*","%","POW","RANDOM","L^"],_e=["INT","FLOOR","FLOAT"];function Q(e,u){if(e.endsWith(".s"))return;if(new RegExp(/.*\.[0-9]+\..*$/).test(e)&&(e=e.split(".").filter(l=>!l.match(/^[0-9]+$/)).join("."),!e.startsWith(".")))return e.replaceAll(".","_|_");if(!new RegExp(/^\.\^.*$/).test(e)&&e.includes("g-")){let s=e.split("g-");return Ae(u)+"_|_"+"g-"+s[s.length-1]}let n=0;for(;new RegExp(/^\.\^.*$/).test(e);)n++,e=e.substring(2);if(n=n-1,new RegExp(/^\..*$/).test(e)&&u){let s=e.substring(1);return Ae(u,n)+"_|_"+s.replaceAll(".","_|_")}return e.replaceAll(".","_|_")||Ae(u,n).replaceAll(".","_|_")}function Ae(e,u=0){let n=e.split("_|_");for(;n.length>1&&u>0;)n.pop()?.includes("g-")&&u--,u--;return n.join("_|_")}var je="\xA7DOUBLE_SLASH_CONVERTOR\xA7";function _(e){return e.startsWith("^")&&(e=e.substring(1)),e=e.replaceAll("\\\\",je),e=e.replaceAll("\\n",`
|
|
15
|
+
`),e=e.replaceAll("\\t"," "),e=e.replaceAll(" "," "),e=e.replaceAll(je,"\\\\"),e}function W(e,u,n,s){let{functions:l}=s;e=e.map(a=>{if(typeof a=="string")switch(a){case "rnd":return "RANDOM";case "?":return "CONTAINS"}return a});let t=[];return e.forEach(a=>{if(typeof a=="string")switch(a){case "&&":case "||":if(t.length>=2){let f={type:"union",unionType:a==="&&"?"and":"or",conditions:[t[t.length-2],t[t.length-1]]};t.pop(),t.pop(),t.push(f);}break;case "!":if(t.length===0)O.error("Error parsing ink file: Conditional statement is not valid",e);else {let f={type:"union",unionType:"not",condition:t[t.length-1]};t[t.length-1]=f;}break;case "!?":if(t.length>1){let f={type:"union",unionType:"not",condition:{type:"compare",operator:"CONTAINS",leftValue:t[t.length-2],rightValue:t[t.length-1]}};t.pop(),t.pop(),t.push(f);}else O.error("Error parsing ink file: Conditional statement is not valid",e);break;default:if(PixiVNJsonComparationOperators.includes(a))if(t.length<2)O.error("Error parsing ink file: Conditional statement is not valid",e);else {let f={type:"compare",operator:a,rightValue:t[t.length-1],leftValue:t[t.length-2]};t.pop(),t.pop(),t.push(f);}else if(Le.includes(a))if(t.length<2)O.error("Error parsing ink file: Conditional statement is not valid",e);else {a==="L^"&&(a="INTERSECTION");let f={type:"arithmetic",operator:a,rightValue:t[t.length-1],leftValue:t[t.length-2]};t.pop(),t.pop(),t.push(f);}else if(_e.includes(a)){let f={type:"arithmeticsingle",operator:a,leftValue:t[t.length-1]};t.pop(),t.push(f);}else a.startsWith("^")&&t.push(_(a));}else if(typeof a=="object"&&"CNT?"in a)if(new RegExp(/.*\.[0-9]\..*/).test(a["CNT?"])){let f=a["CNT?"].split("."),g=f.pop(),o=f.pop();if(o===void 0||g===void 0){O.error("Error parsing ink file: Conditional statement is not valid",e);return}let c=Number(o),C=f.join(".");if(C.includes("^.")){let E=C.split("."),y=E[E.length-1].replaceAll(".","_|_");E.pop(),C=`${E.join(".")}.${y}`,g.includes("c-")&&(C=C+"_|_"+g);}else C=C.replaceAll(".","_|_");let A=Q(C,u);if(!A)return;t.push({type:"compare",leftValue:ge(A),operator:">=",rightValue:{type:"value",value:c}});}else {let f=Q(a["CNT?"],u);if(!f)return;t.push(ge(f));}else if(typeof a=="object"&&"VAR?"in a)t.push(Y({key:a["VAR?"],defaultType:"storage"},n));else if(typeof a=="object"&&"f()"in a){let f=a["f()"],g=l.find(c=>c.name===f);if(!g){O.error(`Error parsing ink file: Function ${f} is not defined`,e);return}let o=[];for(let c=0;c<g.args;c++)t.length!==0&&o.push(t.pop());t.push({type:"function",functionName:f,args:o.reverse()});}else if(typeof a=="object"&&"^->"in a)a["^->"].includes("$r")||t.push(a["^->"]);else if(typeof a=="object"&&"list"in a){let f=Object.values(a.list).map(g=>g);t.push(f);}else t.push(a);}),t}function he(e,u,n,s){return W(e,u,n,s)}function Y(e,u,n){let{key:s,defaultType:l}=e,t=u.indexOf(s);return t>=0?{type:"value",storageType:"params",storageOperationType:"get",key:t}:{type:"value",storageOperationType:"get",storageType:l,key:s}}function te(e,u,n){let{key:s,value:l,defaultType:t,artmeticValue:a}=e,f=u.indexOf(s);if(f>=0)return [{type:"value",storageType:"params",storageOperationType:"set",key:f,value:l}];if(a){if(typeof l=="object"&&"list"in l){let g=Object.values(l.list).map(o=>o);return [{type:"value",storageOperationType:"set",storageType:t,key:s,value:g}]}return [{type:"value",storageOperationType:"set",storageType:t,key:s,value:l}]}else if(typeof l=="object"){if("list"in l&&typeof l.list=="object"){if("origins"in l&&Array.isArray(l.origins)&&l.origins.length>0)return l.origins.reduce(g=>(g.push({type:"value",storageOperationType:"set",storageType:t,key:s,value:Object.values(n.enums[s])}),Object.entries(n.enums[s]).forEach(([o,c])=>{g.push({type:"value",storageOperationType:"set",storageType:t,key:`${s}.${o}`,value:c});}),g),[]);{let g=new Set,o=Object.entries(l.list).reduce((c,[C,A])=>{let[E,y]=C.split(".");return c.push({type:"value",storageOperationType:"set",storageType:t,key:y,value:A}),g.add(E),c},[]);return g.forEach(c=>{o.push({type:"value",storageOperationType:"set",storageType:t,key:c,value:Object.values(n.enums[c])});}),s in n.enums?Object.entries(n.enums[s]).forEach(([c,C])=>{o.push({type:"value",storageOperationType:"set",storageType:t,key:`${s}.${c}`,value:C});}):o.push({type:"value",storageOperationType:"set",storageType:t,key:s,value:Object.values(l.list)}),o}}else if(typeof l=="object"&&"VAR?"in l){if(typeof l["VAR?"]=="string"&&l["VAR?"].includes(".")){let[g,o]=l["VAR?"].split(".");if(g in n.enums&&o in n.enums[g])return [{type:"value",storageOperationType:"set",storageType:t,key:s,value:n.enums[g][o]}]}return [{type:"value",storageOperationType:"set",storageType:t,key:s,value:Y({key:l["VAR?"],defaultType:"storage"},u)}]}}return [{type:"value",storageOperationType:"set",storageType:t,key:s,value:l}]}function ge(e){return {type:"value",storageType:"label",storageOperationType:"get",label:e}}function Fe(e,u){return u||new RegExp(`${"_|_".replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}c-\\d+$`).test(e)?"call":"jump"}function oe(e,u){if(u){if(typeof u=="string")u.startsWith("^")&&e.push(_(u));else if(typeof u=="object"&&"type"in u)switch(u.type){case "value":case "function":console.warn("Warning: trying to add a value or function operation as text. This is likely a mistake, so it will be ignored.");break;default:e.push(u);}}}function Ee(e,u,n,s,l,t={}){let{isNewLine:a=true,isHashtagScript:f=false,isThreads:g=false}=t;return ru(e,u,n,s,l,{isNewLine:a,isHashtagScript:f,isThreads:g})}function ru(e,u,n,s,l,t){if(!u)return;let{isNewLine:a,isHashtagScript:f=false,isThreads:g}=t;if(f){if(Array.isArray(u)&&u.length>0){let o={goNextStep:true},c=[];try{if(u.length===1&&typeof u[0]=="string"){let C=u[0],A=ue.convertTagTolist(C),E=ue.convertOperation(A,o,{silent:!0});E&&(E.$origin=C,c.push(E));}}catch{}c.length===0&&c.push({type:"operationtoconvert",values:u}),e.push({...o,operations:c});}}else if(typeof u=="string"&&u.startsWith("^")||u&&typeof u=="object"&&"type"in u&&u.type==="value"&&u.storageOperationType==="get"){if(!a&&e.length>0){let o=e[e.length-1];!o.glueEnabled&&!o.operations&&!o.labelToOpen&&(o.glueEnabled=true,o.labelToOpen||(o.goNextStep=true)),e[e.length-1]=o;}typeof u=="string"?e.push(su(_(u),s.characterIds)):e.push({dialogue:u});}else if(typeof u=="string"){if(u==="end")e.push({end:"game_end"});else if(u==="done")e.push({end:"label_end",goNextStep:true});else if(u==="<>")if(e.length>0){let o=e[e.length-1];o.glueEnabled=true,o.labelToOpen||(o.goNextStep=true),e[e.length-1]=o;}else e.push({glueEnabled:true,goNextStep:false});}else if(typeof u=="object"){if("type"in u)switch(u.type){case "value":u.storageOperationType==="set"?(typeof u.value=="string"&&u.value.startsWith("^")&&(u.value=_(u.value)),e.push({goNextStep:true,operations:[u]})):console.warn("Warning: trying to add a value get operation as step. This is likely a mistake, so it will be ignored.");break;case "function":e.push({goNextStep:true,operations:[u]});break;default:if(!a&&e.length>0){let o=e[e.length-1];!o.glueEnabled&&!o.operations&&(o.glueEnabled=true,o.labelToOpen||(o.goNextStep=true)),e[e.length-1]=o;}e.push({conditionalStep:u});}else if("->"in u){let o=a?void 0:true;if(o&&n.includes("c-")&&e.length>0&&e[e.length-1]?.dialogue===void 0&&(o=void 0),!a&&e.length>0){let c=e[e.length-1];c.labelToOpen||(c.goNextStep=true),e[e.length-1]=c;}if(u.params&&u.params.length===0&&delete u.params,u.var)e.push({labelToOpen:{label:Y({key:u["->"],defaultType:"storage"},l),type:g?"call":"jump",params:u.params},glueEnabled:o});else {let c=Q(u["->"],n);if(!c)return;e.push({labelToOpen:{label:c,type:Fe(c,g),params:u.params},glueEnabled:o});}}else if("->t->"in u){let o=a?void 0:true;if(o&&n.includes("c-")&&e.length>0&&e[e.length-1]?.dialogue===void 0&&(o=void 0),!a&&e.length>0){let C=e[e.length-1];C.labelToOpen||(C.goNextStep=true),e[e.length-1]=C;}u.params&&u.params.length===0&&delete u.params;let c=Q(u["->t->"],n);if(!c)return;e.push({labelToOpen:{label:c,type:"call",params:u.params},glueEnabled:o});}}}function su(e,u){let n;if(e.includes(": ")){let s=e.split(": "),l=s[0],t=s.slice(1).join(": ");(u?.has(l)||RegisteredCharacters.has(l))&&(n=l,e=t);}return n?{dialogue:{character:n,text:e}}:{dialogue:e}}function ye(e,u,n,s=true,l=false){return ou(e,u,n,s,l)}function ou(e,u,n,s,l=false){u&&(typeof u=="string"&&u.startsWith("^")||u&&typeof u=="object"&&"type"in u&&u.type==="value"&&u.storageOperationType==="get"?typeof u=="string"?e.push(_(u)):e.push(u):typeof u=="object"&&"type"in u&&e.push(u));}function ae(e,u,n,s){if(e.length===0){O.error("Error parsing ink file: Arithmetic statement is not valid",e);return}let l=W(e,u,n,s);if(l.length===1){let t=l[0];return t&&typeof t=="object"&&"type"in t?{type:"value",storageType:"logic",storageOperationType:"get",operation:t}:t}}function X(e,u,n,s="",l,t,a=void 0){let f=[],g="sequential",o=false,c=true;e.forEach(E=>{E==="%"&&(g="loop"),E==="seq"&&(g="random"),E==="MIN"&&(o=true);});let C=e[e.length-1];return Object.keys(C).forEach(E=>{let y=C[E];if(Array.isArray(y)&&y.length>3){y=y.slice(1,y.length-2);let h=[];z(y,s,l,h,u,u,n,Z,a,true,t),h.length===1?f.push(h[0]):f.push({type:"resulttocombine",combine:"cross",secondConditionalItem:h});}else Array.isArray(y)&&y.length===3&&(c=false);}),g==="sequential"?{type:"stepswitch",elements:f,choiceType:g,end:c?"lastItem":void 0,nestedId:a}:o&&g==="random"?{type:"stepswitch",elements:f,choiceType:"sequentialrandom",end:c?"lastItem":void 0,nestedId:a}:{type:"stepswitch",elements:f,choiceType:g}}function z(e,u,n,s=[],l,t,a,f,g=void 0,o=true,c=[]){let C=false,A=[],E=false,y=false,h=false,v=[],m=[];if(n.preDialog[u]&&(o=false,l(s,`^${n.preDialog[u].text}`,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),n.preDialog[u].glue&&l(s,"<>",u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),delete n.preDialog[u]),e.includes("visit")){let i=X(e,t,a,u,n,c,g);i&&(!o&&s.length>0&&l(s,"<>",u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),l(s,i,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}));return}let V=e[0];if(V&&typeof V=="object"&&"temp="in V){for(;e[0]&&typeof e[0]=="object"&&"temp="in e[0];)c.push(e[0]["temp="]),e.shift();c=c.reverse();}if(e.forEach((i,r)=>{if(y){if(typeof i=="string"&&i==="/#"){let d=[];z(m,u,n,d,ye,ye,a,f,g,o),l(s,d,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),y=false,m=[];}else m.push(i);return}else if(C)if(Array.isArray(i))A.push(i);else if(i&&typeof i=="object")"CNT?"in i?r>0&&e[r-1]==="ev"?(E=true,v.push(i)):E?v.push(i):(A.push(i),o=false):"VAR="in i||"temp="in i?te({key:"VAR="in i?i["VAR="]:i["temp="],value:e[r-1],defaultType:"VAR="in i?"storage":"tempstorage"},c,n).forEach(D=>{if(D.value&&typeof D.value=="string"&&D.value==="/str"&&(D.value=e[r-2]),D.value&&typeof D.value=="object"&&"^->"in D.value&&(D.value=D.value["^->"]),A.length>1){let F=ae(A,u,c,n);A=[],F&&typeof F=="object"&&"type"in F&&F.type==="value"&&"storageType"in F&&F.storageType==="logic"&&(D.value=F.operation);}(typeof D.key!="string"||!D.key.includes("$r"))&&(l(s,D,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),o=true);}):"VAR?"in i?A.push(i):"^->"in i?i["^->"].includes("$r")||A.push(i):("f()"in i||"list"in i&&typeof i.list=="object")&&A.push(i);else switch(i){case "/ev":E&&v.push(i),C=false,A.push(i);break;case "out":if(A.length>0){let d=A[A.length-1];if(d&&typeof d=="object"&&"VAR?"in d){A.pop();let D=Y({key:d["VAR?"],defaultType:"storage"},c);l(s,D,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h});}else {let D=[];for(;A.length>0&&A[A.length-1]!=="/ev";)D.push(A.pop());D=D.reverse();let F=ae(D,u,c,n);A=[],F&&typeof F=="object"&&"type"in F&&F.type==="value"&&"storageType"in F&&F.storageType==="logic"?l(s,{storageOperationType:"get",storageType:"logic",operation:F.operation,type:"value"},u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}):(l(s,"<>",u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),F=`^${F}`,l(s,F,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}));}o=false;}break;case "pop":{let d=A[A.length-1];if(d&&typeof d=="object"&&"f()"in d){let D=[];for(;A.length>0&&A[A.length-1]!=="/ev";)D.push(A.pop());D=D.reverse();let F=W(D,u,c,n);A=[],F.forEach(T=>{T&&typeof T=="object"&&"type"in T&&T.type==="function"?l(s,T,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}):O.warn("Unhandled case: value is not a function",T);}),o=false;}else A.push(i);return}default:A.push(i);}else if(typeof i=="string")if(i.startsWith("^"))l(s,i,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),o=false;else if(i==="ev")C=true;else if(i===`
|
|
16
|
+
`)o=true;else if(i==="done"||i==="end")l(s,i,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),o=false;else if(i==="<>")l(s,i,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),o=false;else if(i==="nop"&&E){let d=Ie(v,t,a,u,n,c,g);d&&l(s,d,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),E=false,v=[];}else i==="#"?y=true:i==="thread"&&(h=true);else if(Array.isArray(i))if(E)v.push(i);else if(i.length>1&&typeof i[i.length-2]=="object"&&i[i.length-2]&&"c"in i[i.length-2]&&typeof i[i.length-1]=="object"&&i[i.length-1]&&"b"in i[i.length-1]){A.pop();let d=[],D=[];for(;A.length>0&&A[A.length-1]!=="/ev";)d.push(A.pop());v=[...v,...d.reverse()],E=true,D.push(i.pop()),D.push(i.pop()),v=[...v,...i],v.push(D);}else if(i.length>1&&typeof i[i.length-1]=="object"&&i[i.length-1]&&"#n"in i[i.length-1]){let d=i.pop();if(!d){O.error("Error parsing ink file: el is undefined");return}let D=d["#n"];delete d["#n"],i.push(d),l(s,{"->":u?u+"_|_"+D:D},u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),a({[D]:i},u,n);}else z(i,u,n,s,l,t,a,f,g,o,c);else if(i&&typeof i=="object")if("->"in i&&typeof i["->"]=="string"&&!new RegExp(/^\.\^\.\^\.\d\.s$/).test(i["->"])){let d=[];A.length>0&&(d=he(["ev",...A],u,c,n)),i.params=d,l(s,i,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),o=false;}else if("->t->"in i&&typeof i["->t->"]=="string"&&!new RegExp(/^\.\^\.\^\.\d\.s$/).test(i["->t->"])){let d=[];A.length>0&&(d=he(["ev",...A],u,c,n)),i.params=d,l(s,i,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h}),o=false;}else if("*"in i&&typeof i["*"]=="string")i["*"].includes("c")&&(A.push(i),o=false);else if("s"in i&&Array.isArray(i.s))A.push(i),o=false;else if("CNT?"in i)A.push(i),o=false;else if("VAR="in i||"temp="in i){let d="VAR="in i?i["VAR="]:i["temp="],D,F=[];if(d!=="$r"){for(A.pop(),A[A.length-1]==="/ev"&&A.pop();A.length>0&&A[A.length-1]!=="/ev";)F.push(A.pop());F=F.reverse(),D=ae(F,u,c,n),A=[],te({key:d,value:D,defaultType:"VAR="in i?"storage":"tempstorage",artmeticValue:true},c,n).forEach(x=>{(x.value!==void 0||x.value!==null)&&l(s,x,u,n,c,{isNewLine:o,isHashtagScript:y,isThreads:h});}),o=false;}}else a(i,u,n);}),f(A,s,u,n,c),u.includes("_|_")&&s.length===2){let i=s[0],r=s[1];i&&r&&typeof i=="object"&&"dialogue"in i&&typeof r=="object"&&"labelToOpen"in r&&i.dialogue===" "&&r.labelToOpen&&(s.shift(),delete r.glueEnabled,s[0]=r);}}function Be(e,u,n,s,l,t){if(u.length===0)return;let a=W(u,s,n,l);if(a.length===1){let f={type:"ifelse",condition:a[0],then:e,else:t};return f.else||delete f.else,f}else if(a.length>1){let f={type:"ifelse",condition:{type:"union",unionType:"and",conditions:a},then:e,else:t};return f.else||delete f.else,f}}function Ie(e,u,n,s,l,t,a=void 0){if(e.length===0){O.error("Error parsing ink file: Conditional statement is not valid",e);return}let f=[],g=[];if(e.forEach(C=>{Array.isArray(C)?g.push(C):typeof C=="string"&&C==="du"?l.du?f.push(l.du):l.du=f[f.length-1]:(typeof C!="string"||C!=="/ev")&&f.push(C);}),g.length===0){O.error("Error parsing ink file: Conditional statement is not valid",g);return}let o=me(g[0],u,n,`${s}${"_|_"}then`,l,t,`${a||""}then`),c;return g.length===2?c=me(g[1],u,n,`${s}${"_|_"}else`,l,t,`${a||""}else`):g.length>2?(g.shift(),g.push("nop"),g=[{b:g}],c=me(g,u,n,s,l,t,`${a||""}else`)):c=void 0,l.du=void 0,Be(o,f,t,s,l,c)}function me(e,u,n,s,l,t,a=void 0){let f=[];for(let o of e)typeof o=="object"&&"b"in o&&(o.b=o.b.filter(c=>c!==null&&!(typeof c=="object"&&"->"in c&&new RegExp(/.*\.[0-9]/).test(c["->"]))),z(o.b,s,l,f,u,u,n,Z,a,true,t));return f.length===1?f[0]:{type:"resulttocombine",combine:"cross",secondConditionalItem:f}}function ve(e="",u=""){let n=Array.isArray(e)?e:[e],s=Array.isArray(u)?u:[u];return [...new Set([...n,...s])]}function Z(e,u,n,s,l){if(e.length>0){let t={};He(e,t,l,s);for(let[a,f]of Object.entries(t)){let g=n+"_|_"+a,o={text:f.text.length===1?f.text[0]:f.text,label:g,props:{},type:Fe(g,false),oneTime:f.onetime};f.text.length===0&&(o.onlyHaveNoChoice=true,o.autoSelect=true),o.oneTime===false&&delete o.oneTime;let c=Be(o,f.conditions,l,n,s)||o,C=u[u.length-1];if(typeof C=="object"&&C&&"type"in C&&(C={conditionalStep:C}),u.length>0&&typeof C=="object"&&C&&"choices"in C&&C.choices){let A=C.choices;A&&Array.isArray(A)?A.push(c):O.error("Unhandled case: choices is PixiVNJsonConditionalStatements<PixiVNJsonChoices> | undefined",f,A),C.choices=A.sort((E,y)=>{try{let h=E.label.split("."),v=h[h.length-1].replaceAll(".","_|_"),m=y.label.split("."),V=m[m.length-1].replaceAll(".","_|_");if(v.includes("c-")&&V.includes("c-")){let i=v.split("c-")[1],r=Number(i),d=V.split("c-")[1],D=Number(d);return r-D}}catch{}return 0});}else u.push({choices:[c]});f.preDialog&&(s.preDialog[g]={...f.preDialog});}}}function He(e,u,n,s,l){let t=[],a="",f="",g=false,o=[];for(let c=0;c<e.length;c++){let C=e[c];if(typeof C=="string")C.startsWith("^")?t.push(_(C)):Me.includes(C)&&o.push(C);else if(Array.isArray(C)&&C.includes("visit")){let A=X(C,oe,(E,y,h)=>{},l,s,n);t.push(A);}else if(C&&typeof C=="object")if("*"in C&&typeof C["*"]&&typeof C["*"]=="string")C["*"].includes("c")&&(a=`c${C["*"].split("c")[1]}`,C.flg&16&&(g=true));else if("s"in C&&Array.isArray(C.s)){let A=$e(C.s),E=C.s.includes("<>");A&&(l&&u[l]?(u[l].preDialog={text:A,glue:E},u[l].text=ve(A,u[l].text)):(t.push(A),f=A));}else ("CNT?"in C||"VAR?"in C)&&o.push(C);else o.push(C);if(a){u[a]?u[a].text=ve(t,u[a].text):u[a]={text:t,onetime:g,conditions:o},f&&(u[a].preDialog={text:f,glue:false});let A=e.slice(c+1);He(A,u,n,s,a);return}}}function $e(e){for(let u of e)if(typeof u=="string"){if(u.startsWith("^"))return _(u)}else if(Array.isArray(u)){let n=$e(u);if(n)return n}}var lu;(l=>{function e(t,a={}){let{labelToRemove:f=[],initialVarsToRemove:g=[],enums:o={},functions:c=[],preDialog:C={},characterIds:A}=a,E={$schema:PIXIVNJSON_SCHEMA_URL};if(E.labels=u(t.root,{labelToRemove:f,initialVarsToRemove:g,enums:o,functions:c,preDialog:C,characterIds:A}),E.labels&&ne in E.labels){let y=E.labels[ne];delete E.labels[ne],y.forEach(h=>{h.operations&&(E.initialOperations=E.initialOperations?[...E.initialOperations,...h.operations]:[...h.operations]);});}if(E.labels&&U in E.labels){let y=E.labels[U];delete E.labels[U],y.forEach(h=>{h.operations&&(E.initialOperations=E.initialOperations?[...E.initialOperations,...h.operations]:[...h.operations]);});}return f.forEach(y=>{E.labels&&y in E.labels&&delete E.labels[y];}),g.forEach(y=>{E.initialOperations&&(E.initialOperations=E.initialOperations.filter(h=>!(h.type==="value"&&h.key===y)));}),E}l.inkToJson=e;function u(t,a){try{let f={};return n(t,f,a),f}catch(f){O.error("Error parsing ink file",f);}}function n(t,a,f){for(let g of t)if(g)if(Array.isArray(g))if(g.includes("visit")){let o=X(g,oe,(c,C,A)=>{},"",f,[]);o&&(f.externalSwitch=o);}else n(g,a,f);else typeof g=="object"&&(g&&"VAR="in g&&f.externalSwitch&&(a[U]||(a[U]=[]),a[U].push({operations:te({defaultType:"storage",key:g["VAR="],value:f.externalSwitch},[],f)})),s(g,a,"",f));}function s(t,a,f="",g){if(t!==null){for(let[o,c]of Object.entries(t))if(Array.isArray(c)){let C=[],A={},E=(f?f+"_|_":"")+o;z(c,E,g,C,Ee,Ee,(y,h,v)=>{s(y,A,h,v);},Z);for(let[y,h]of Object.entries(A))a[y]=h;C.length>0&&(a[E]=C);}}}})(lu||={});export{lu as InkMapper};
|