!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("source-map")):"function"==typeof define&&define.amd?define(["exports","source-map"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Terser={},e.sourceMap)}(this,function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(t);function r(e){return e.split("")}function o(e,t){return t.includes(e)}class a extends Error{constructor(e,t){super(),this.name="DefaultsError",this.message=e,this.defs=t}}function s(e,t,n){!0===e&&(e={});var i=e||{};if(n)for(var r in i)if(S(i,r)&&!S(t,r))throw new a("`"+r+"` is not a supported option",t);for(var r in t)S(t,r)&&(i[r]=e&&S(e,r)?e[r]:t[r]);return i}function u(){}function c(){return!1}function l(){return!0}function f(){return this}function p(){return null}var _=function(){function e(e,o,a){var s,u=[],c=[];function l(){var l=o(e[s],s),f=l instanceof r;return f&&(l=l.v),l instanceof n?(l=l.v)instanceof i?c.push.apply(c,a?l.v.slice().reverse():l.v):c.push(l):l!==t&&(l instanceof i?u.push.apply(u,a?l.v.slice().reverse():l.v):u.push(l)),f}if(Array.isArray(e))if(a){for(s=e.length;--s>=0&&!l(););u.reverse(),c.reverse()}else for(s=0;s=0;)e[n]===t&&e.splice(n,1)}function h(e,t){if(e.length<2)return e.slice();return function e(n){if(n.length<=1)return n;var i=Math.floor(n.length/2),r=n.slice(0,i),o=n.slice(i);return function(e,n){for(var i=[],r=0,o=0,a=0;r!?|~^")),O=/[0-9a-f]/i,F=/^0x[0-9a-f]+$/i,M=/^0[0-7]+$/,R=/^0o[0-7]+$/i,w=/^0b[01]+$/i,N=/^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i,x=/^(0[xob])?[0-9]+n$/i,k=D(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","^","*","**","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","/=","*=","**=","%=",">>=","<<=",">>>=","|=","^=","&=","&&","||"]),I=D(r("  \n\r\t\f\v​           \u2028\u2029   \ufeff")),L=D(r("\n\r\u2028\u2029")),V=D(r(";]),:")),P=D(r("[{(,;:")),B=D(r("[]{}(),;:")),K={ID_Start:/[A-Za-z\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\u08A0-\u08B4\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\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\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\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-\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\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\u2118-\u211D\u2124\u2126\u2128\u212A-\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\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\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\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\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[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\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]|\uD82C[\uDC00\uDC01]|\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]|\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]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\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\u08A0-\u08B4\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\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\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\u0C81-\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\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\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\u1369-\u1371\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-\u19DA\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\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u2118-\u211D\u2124\u2126\u2128\u212A-\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\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\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\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\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\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[\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\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\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]|\uD82C[\uDC00\uDC01]|\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]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\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]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function U(e,t){var n=e.charAt(t);if(G(n)){var i=e.charAt(t+1);if(H(i))return n+i}if(H(n)){var r=e.charAt(t-1);if(G(r))return r+n}return n}function G(e){return"string"==typeof e&&(e=e.charCodeAt(0)),e>=55296&&e<=56319}function H(e){return"string"==typeof e&&(e=e.charCodeAt(0)),e>=56320&&e<=57343}function X(e){return e>=48&&e<=57}function z(e){var t=e.charCodeAt(0);return K.ID_Start.test(e)||36==t||95==t}function W(e){var t=e.charCodeAt(0);return K.ID_Continue.test(e)||36==t||95==t||8204==t||8205==t}function Y(e){return/^[a-z_$][a-z0-9_$]*$/i.test(e)}class q extends Error{constructor(e,t,n,i,r){super(),this.name="SyntaxError",this.message=e,this.filename=t,this.line=n,this.col=i,this.pos=r}}function $(e,t,n,i,r){throw new q(e,t,n,i,r)}function j(e,t,n){return e.type==t&&(null==n||e.value==n)}var Z={};function Q(e,t,n,i){var r={text:e,filename:t,pos:0,tokpos:0,line:1,tokline:0,col:0,tokcol:0,newline_before:!1,regex_allowed:!1,brace_counter:0,template_braces:[],comments_before:[],directives:{},directive_stack:[]};function o(){return U(r.text,r.pos)}function a(e,t){var n=U(r.text,r.pos++);if(e&&!n)throw Z;return L.has(n)?(r.newline_before=r.newline_before||!t,++r.line,r.col=0,t||"\r"!=n||"\n"!=o()||(++r.pos,n="\n")):(n.length>1&&(++r.pos,++r.col),++r.col),n}function s(e){for(;e-- >0;)a()}function u(e){return r.text.substr(r.pos,e.length)==e}function c(e,t){var n=r.text.indexOf(e,r.pos);if(t&&-1==n)throw Z;return n}function l(){r.tokline=r.line,r.tokcol=r.col,r.tokpos=r.pos}var f=!1,p=null;function _(n,i,o){r.regex_allowed="operator"==n&&!ee.has(i)||"keyword"==n&&y.has(i)||"punc"==n&&P.has(i)||"arrow"==n,"punc"==n&&"."==i?f=!0:o||(f=!1);var a={type:n,value:i,line:r.tokline,col:r.tokcol,pos:r.tokpos,endline:r.line,endcol:r.col,endpos:r.pos,nlb:r.newline_before,file:t};return/^(?:num|string|regexp)$/i.test(n)&&(a.raw=e.substring(a.pos,a.endpos)),o||(a.comments_before=r.comments_before,a.comments_after=r.comments_before=[]),r.newline_before=!1,a=new ae(a),o||(p=a),a}function d(){for(;I.has(o());)a()}function m(e){$(e,t,r.tokline,r.tokcol,r.tokpos)}function E(e){var t=!1,n=!1,i=!1,r="."==e,s=!1,u=function(e){for(var t,n="",i=0;(t=o())&&e(t,i++);)n+=a();return n}(function(o,a){if(s)return!1;switch(o.charCodeAt(0)){case 98:case 66:return i=!0;case 111:case 79:case 120:case 88:return!i&&(i=!0);case 101:case 69:return!!i||!t&&(t=n=!0);case 45:return n||0==a&&!e;case 43:return n;case n=!1,46:return!(r||i||t)&&(r=!0)}return"n"===o?(s=!0,!0):O.test(o)});if(e&&(u=e+u),M.test(u)&&J.has_directive("use strict")&&m("Legacy octal literals are not allowed in strict mode"),u.endsWith("n")){if(!r&&x.test(u))return _("big_int",u.replace("n",""));m("Invalid or unexpected token")}var c=function(e){if(F.test(e))return parseInt(e.substr(2),16);if(M.test(e))return parseInt(e.substr(1),8);if(R.test(e))return parseInt(e.substr(2),8);if(w.test(e))return parseInt(e.substr(2),2);if(N.test(e))return parseFloat(e);var t=parseFloat(e);return t==e?t:void 0}(u);if(!isNaN(c))return _("num",c);m("Invalid syntax: "+u)}function h(e,t,n){var i,s=a(!0,e);switch(s.charCodeAt(0)){case 110:return"\n";case 114:return"\r";case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 120:return String.fromCharCode(D(2,t));case 117:if("{"==o()){for(a(!0),"}"===o()&&m("Expecting hex-character between {}");"0"==o();)a(!0);var u,l=c("}",!0)-r.pos;return(l>6||(u=D(l,t))>1114111)&&m("Unicode reference out of bounds"),a(!0),(i=u)>65535?(i-=65536,String.fromCharCode(55296+(i>>10))+String.fromCharCode(i%1024+56320)):String.fromCharCode(i)}return String.fromCharCode(D(4,t));case 10:return"";case 13:if("\n"==o())return a(!0,e),""}return s>="0"&&s<="7"?(n&&t&&m("Octal escape sequences are not allowed in template strings"),function(e,t){var n=o();n>="0"&&n<="7"&&(e+=a(!0))[0]<="3"&&(n=o())>="0"&&n<="7"&&(e+=a(!0));if("0"===e)return"\0";e.length>0&&J.has_directive("use strict")&&t&&m("Legacy octal escape sequences are not allowed in strict mode");return String.fromCharCode(parseInt(e,8))}(s,t)):s}function D(e,t){for(var n=0;e>0;--e){if(!t&&isNaN(parseInt(o(),16)))return parseInt(n,16)||"";var i=a(!0);isNaN(parseInt(i,16))&&m("Invalid hex-character pattern in string"),n+=i}return parseInt(n,16)}var g=Q("Unterminated string constant",function(){for(var e=a(),t="";;){var n=a(!0,!0);if("\\"==n)n=h(!0,!0);else if("\r"==n||"\n"==n)m("Unterminated string constant");else if(n==e)break;t+=n}var i=_("string",t);return i.quote=e,i}),S=Q("Unterminated template",function(e){e&&r.template_braces.push(r.brace_counter);var t,n,i="",s="";for(a(!0,!0);"`"!=(t=a(!0,!0));){if("\r"==t)"\n"==o()&&++r.pos,t="\n";else if("$"==t&&"{"==o())return a(!0,!0),r.brace_counter++,(n=_(e?"template_head":"template_substitution",i)).begin=e,n.raw=s,n.end=!1,n;if(s+=t,"\\"==t){var u=r.pos;t=h(!0,!(p&&("name"===p.type||"punc"===p.type&&(")"===p.value||"]"===p.value))),!0),s+=r.text.substr(u,r.pos-u)}i+=t}return r.template_braces.pop(),(n=_(e?"template_head":"template_substitution",i)).begin=e,n.raw=s,n.end=!0,n});function A(e){var t,n=r.regex_allowed,i=function(){for(var e=r.text,t=r.pos,n=r.text.length;t"===o()?(a(),_("arrow","=>")):q("=");case 96:return S(!0);case 123:r.brace_counter++;break;case 125:if(r.brace_counter--,r.template_braces.length>0&&r.template_braces[r.template_braces.length-1]===r.brace_counter)return S(!1)}if(X(c))return E();if(B.has(t))return _("punc",a());if(C.has(t))return q();if(92==c||z(t))return h=void 0,h=K(),f?_("name",h):T.has(h)?_("atom",h):v.has(h)?k.has(h)?_("operator",h):_("keyword",h):_("name",h);break}var h;m("Unexpected character '"+t+"'")}return J.next=a,J.peek=o,J.context=function(e){return e&&(r=e),r},J.add_directive=function(e){r.directive_stack[r.directive_stack.length-1].push(e),void 0===r.directives[e]?r.directives[e]=1:r.directives[e]++},J.push_directives_stack=function(){r.directive_stack.push([])},J.pop_directives_stack=function(){for(var e=r.directive_stack[r.directive_stack.length-1],t=0;t0},J}var J=D(["typeof","void","delete","--","++","!","~","-","+"]),ee=D(["--","++"]),te=D(["=","+=","-=","/=","*=","**=","%=",">>=","<<=",">>>=","|=","^=","&="]),ne=function(e,t){for(var n=0;n","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],{}),ie=D(["atom","num","big_int","string","regexp","name"]);function re(e,t){t=s(t,{bare_returns:!1,ecma:8,expression:!1,filename:null,html5_comments:!0,module:!1,shebang:!0,strict:!1,toplevel:null},!0);var n={input:"string"==typeof e?Q(e,t.filename,t.html5_comments,t.shebang):e,token:null,prev:null,peeked:null,in_function:0,in_async:-1,in_generator:-1,in_directives:!0,in_loop:0,labels:[]};function i(e,t){return j(n.token,e,t)}function r(){return n.peeked||(n.peeked=n.input())}function o(){return n.prev=n.token,n.peeked||r(),n.token=n.peeked,n.peeked=null,n.in_directives=n.in_directives&&("string"==n.token.type||i("punc",";")),n.token}function a(){return n.prev}function u(e,t,i,r){var o=n.input.context();$(e,o.filename,null!=t?t:o.tokline,null!=i?i:o.tokcol,null!=r?r:o.tokpos)}function c(e,t){u(t,e.line,e.col)}function l(e){null==e&&(e=n.token),c(e,"Unexpected token: "+e.type+" ("+e.value+")")}function f(e,t){if(i(e,t))return o();c(n.token,"Unexpected token "+n.token.type+" «"+n.token.value+"», expected "+e+" «"+t+"»")}function p(e){return f("punc",e)}function _(e){return e.nlb||!e.comments_before.every(e=>!e.nlb)}function d(){return!t.strict&&(i("eof")||i("punc","}")||_(n.token))}function m(){return n.in_generator===n.in_function}function E(){return n.in_async===n.in_function}function h(e){i("punc",";")?o():e||d()||l()}function D(){p("(");var e=wt(!0);return p(")"),e}function g(e){return function(){var t=n.token,i=e.apply(null,arguments),r=a();return i.start=t,i.end=r,i}}function A(){(i("operator","/")||i("operator","/="))&&(n.peeked=null,n.token=n.input(n.token.value.substr(1)))}n.token=o();var v=g(function(e,s,m){switch(A(),n.token.type){case"string":if(n.in_directives){var g=r();!n.token.raw.includes("\\")&&(j(g,"punc",";")||j(g,"punc","}")||_(g)||j(g,"eof"))?n.input.add_directive(n.token.value):n.in_directives=!1}var S=n.in_directives,b=T();return S&&b.body instanceof tn?new le(b.body):b;case"template_head":case"num":case"big_int":case"regexp":case"operator":case"atom":return T();case"name":if("async"==n.token.value&&j(r(),"keyword","function"))return o(),o(),s&&u("functions are not allowed as the body of a loop"),O(ke,!1,!0,e);if("import"==n.token.value&&!j(r(),"punc","(")){o();var C=function(){var e,t,r=a();i("name")&&(e=_e(zt));i("punc",",")&&o();((t=oe(!0))||e)&&f("name","from");var s=n.token;"string"!==s.type&&l();return o(),new ot({start:r,imported_name:e,imported_names:t,module_name:new tn({start:s,value:s.value,quote:s.quote,end:s}),end:n.token})}();return h(),C}return j(r(),"punc",":")?function(){var e=_e(Yt);"await"===e.name&&E()&&c(n.prev,"await cannot be used as label inside async function");n.labels.some(t=>t.name===e.name)&&u("Label "+e.name+" defined twice");p(":"),n.labels.push(e);var t=v();n.labels.pop(),t instanceof ge||e.references.forEach(function(t){t instanceof ze&&(t=t.label.start,u("Continue label `"+e.name+"` refers to non-IterationStatement.",t.line,t.col,t.pos))});return new De({body:t,label:e})}():T();case"punc":switch(n.token.value){case"{":return new me({start:n.token,body:N(),end:a()});case"[":case"(":return T();case";":return n.in_directives=!1,o(),new Ee;default:l()}case"keyword":switch(n.token.value){case"break":return o(),y(Xe);case"continue":return o(),y(ze);case"debugger":return o(),h(),new ce;case"do":o();var F=It(v);f("keyword","while");var R=D();return h(!0),new Ae({body:F,condition:R});case"while":return o(),new ve({condition:D(),body:It(function(){return v(!1,!0)})});case"for":return o(),function(){var e="`for await` invalid in this context",t=n.token;"name"==t.type&&"await"==t.value?(E()||c(t,e),o()):t=!1;p("(");var r=null;if(i("punc",";"))t&&c(t,e);else{r=i("keyword","var")?(o(),I(!0)):i("keyword","let")?(o(),L(!0)):i("keyword","const")?(o(),P(!0)):wt(!0,!0);var a=i("operator","in"),s=i("name","of");if(t&&!s&&c(t,e),a||s)return r instanceof et?r.definitions.length>1&&c(r.start,"Only one variable declaration allowed in for..in loop"):qe(r)||(r=dt(r))instanceof Ie||c(r.start,"Invalid left-hand side in for..in loop"),o(),a?function(e){var t=wt(!0);return p(")"),new be({init:e,object:t,body:It(function(){return v(!1,!0)})})}(r):function(e,t){var n=e instanceof et?e.definitions[0].name:null,i=wt(!0);return p(")"),new ye({await:t,init:e,name:n,object:i,body:It(function(){return v(!1,!0)})})}(r,!!t)}return function(e){p(";");var t=i("punc",";")?null:wt(!0);p(";");var n=i("punc",")")?null:wt(!0);return p(")"),new Te({init:e,condition:t,step:n,body:It(function(){return v(!1,!0)})})}(r)}();case"class":return o(),s&&u("classes are not allowed as the body of a loop"),m&&u("classes are not allowed as the body of an if"),Y(Mt);case"function":return o(),s&&u("functions are not allowed as the body of a loop"),O(ke,!1,!1,e);case"if":return o(),function(){var e=D(),t=v(!1,!1,!0),n=null;i("keyword","else")&&(o(),n=v(!1,!1,!0));return new We({condition:e,body:t,alternative:n})}();case"return":0!=n.in_function||t.bare_returns||u("'return' outside of function"),o();var w=null;return i("punc",";")?o():d()||(w=wt(!0),h()),new Ue({value:w});case"switch":return o(),new Ye({expression:D(),body:It(x)});case"throw":o(),_(n.token)&&u("Illegal newline after 'throw'");w=wt(!0);return h(),new Ge({value:w});case"try":return o(),function(){var e=N(),t=null,r=null;if(i("keyword","catch")){var s=n.token;if(o(),i("punc","{"))var c=null;else{p("(");var c=M(void 0,Xt);p(")")}t=new Qe({start:s,argname:c,body:N(),end:a()})}if(i("keyword","finally")){var s=n.token;o(),r=new Je({start:s,body:N(),end:a()})}t||r||u("Missing catch/finally blocks");return new Ze({body:e,bcatch:t,bfinally:r})}();case"var":o();C=I();return h(),C;case"let":o();C=L();return h(),C;case"const":o();C=P();return h(),C;case"with":return n.input.has_directive("use strict")&&u("Strict mode may not include a with statement"),o(),new Ce({expression:D(),body:v()});case"export":if(!j(r(),"punc","(")){o();C=function(){var e,t,s,u,c,f=n.token;if(i("keyword","default"))e=!0,o();else if(t=oe(!1)){if(i("name","from")){o();var p=n.token;return"string"!==p.type&&l(),o(),new at({start:f,is_default:e,exported_names:t,module_name:new tn({start:p,value:p.value,quote:p.quote,end:p}),end:a()})}return new at({start:f,is_default:e,exported_names:t,end:a()})}i("punc","{")||e&&(i("keyword","class")||i("keyword","function"))&&j(r(),"punc")?(u=wt(!1),h()):(s=v(e))instanceof et&&e?l(s.start):s instanceof et||s instanceof Re||s instanceof Mt?c=s:s instanceof fe?u=s.body:l(s.start);return new at({start:f,is_default:e,exported_value:u,exported_definition:c,end:a()})}();return i("punc",";")&&h(),C}}}l()});function T(e){return new fe({body:(e=wt(!0),h(),e)})}function y(e){var t,i=null;d()||(i=_e(Zt,!0)),null!=i?((t=n.labels.find(e=>e.name===i.name))||u("Undefined label "+i.name),i.thedef=t):0==n.in_loop&&u(e.TYPE+" not inside a loop or switch"),h();var r=new e({label:i});return t&&t.references.push(r),r}var C=function(e,t,r){_(n.token)&&u("Unexpected newline before arrow (=>)"),f("arrow","=>");var o=w(i("punc","{"),!1,r),a=o instanceof Array&&o.length?o[o.length-1].end:o instanceof Array?e:o.end;return new xe({start:e,end:a,async:r,argnames:t,body:o})},O=function(e,t,r,s){n.token;var u=e===ke,c=i("operator","*");c&&o();var f=i("name")?_e(u?Bt:Ut):null;u&&!f&&(s?e=Ne:l()),!f||e===we||f instanceof xt||l(a());var p=[],_=w(!0,c||t,r,f,p);return new e({start:p.start,end:_.end,is_generator:c,async:r,name:f,argnames:p,body:_})};function F(e,t){var n=new Set,i=!1,r=!1,o=!1,a=!!t,s={add_parameter:function(t){if(n.has(t.value))!1===i&&(i=t),s.check_strict();else if(n.add(t.value),e)switch(t.value){case"arguments":case"eval":case"yield":a&&c(t,"Unexpected "+t.value+" identifier as parameter inside strict mode");break;default:b.has(t.value)&&l()}},mark_default_assignment:function(e){!1===r&&(r=e)},mark_spread:function(e){!1===o&&(o=e)},mark_strict_mode:function(){a=!0},is_strict:function(){return!1!==r||!1!==o||a},check_strict:function(){s.is_strict()&&!1!==i&&c(i,"Parameter "+i.value+" was used already")}};return s}function M(e,t){var r,a=!1;return void 0===e&&(e=F(!0,n.input.has_directive("use strict"))),i("expand","...")&&(a=n.token,e.mark_spread(n.token),o()),r=R(e,t),i("operator","=")&&!1===a&&(e.mark_default_assignment(n.token),o(),r=new St({start:r.start,left:r,operator:"=",right:wt(!1),end:n.token})),!1!==a&&(i("punc",")")||l(),r=new Me({start:a,expression:r,end:a})),e.check_strict(),r}function R(e,t){var s,c=[],f=!0,_=!1,d=n.token;if(void 0===e&&(e=F(!1,n.input.has_directive("use strict"))),t=void 0===t?Pt:t,i("punc","[")){for(o();!i("punc","]");){if(f?f=!1:p(","),i("expand","...")&&(_=!0,s=n.token,e.mark_spread(n.token),o()),i("punc"))switch(n.token.value){case",":c.push(new ln({start:n.token,end:n.token}));continue;case"]":break;case"[":case"{":c.push(R(e,t));break;default:l()}else i("name")?(e.add_parameter(n.token),c.push(_e(t))):u("Invalid function parameter");i("operator","=")&&!1===_&&(e.mark_default_assignment(n.token),o(),c[c.length-1]=new St({start:c[c.length-1].start,left:c[c.length-1],operator:"=",right:wt(!1),end:n.token})),_&&(i("punc","]")||u("Rest element must be last element"),c[c.length-1]=new Me({start:s,expression:c[c.length-1],end:s}))}return p("]"),e.check_strict(),new Ie({start:d,names:c,is_array:!0,end:a()})}if(i("punc","{")){for(o();!i("punc","}");){if(f?f=!1:p(","),i("expand","...")&&(_=!0,s=n.token,e.mark_spread(n.token),o()),i("name")&&(j(r(),"punc")||j(r(),"operator"))&&[",","}","="].includes(r().value)){e.add_parameter(n.token);var m=a(),E=_e(t);_?c.push(new Me({start:s,expression:E,end:E.end})):c.push(new bt({start:m,key:E.name,value:E,end:E.end}))}else{if(i("punc","}"))continue;var h=n.token,D=ae();null===D?l(a()):"name"!==a().type||i("punc",":")?(p(":"),c.push(new bt({start:h,quote:h.quote,key:D,value:R(e,t),end:a()}))):c.push(new bt({start:a(),key:D,value:new t({start:a(),name:D,end:a()}),end:a()}))}_?i("punc","}")||u("Rest element must be last element"):i("operator","=")&&(e.mark_default_assignment(n.token),o(),c[c.length-1].value=new St({start:c[c.length-1].value.start,left:c[c.length-1].value,operator:"=",right:wt(!1),end:n.token}))}return p("}"),e.check_strict(),new Ie({start:d,names:c,is_array:!1,end:a()})}if(i("name"))return e.add_parameter(n.token),_e(t);u("Invalid function parameter")}function w(e,r,a,s,u){var c=n.in_loop,f=n.labels,_=n.in_generator,d=n.in_async;if(++n.in_function,r&&(n.in_generator=n.in_function),a&&(n.in_async=n.in_function),u&&function(e){n.token;var r=F(!0,n.input.has_directive("use strict"));for(p("(");!i("punc",")");){var a=M(r);if(e.push(a),i("punc",")")||(p(","),i("punc",")")&&t.ecma<8&&l()),a instanceof Me)break}o()}(u),e&&(n.in_directives=!0),n.in_loop=0,n.labels=[],e){n.input.push_directives_stack();var m=N();s&&pe(s),u&&u.forEach(pe),n.input.pop_directives_stack()}else m=wt(!1);return--n.in_function,n.in_loop=c,n.labels=f,n.in_generator=_,n.in_async=d,m}function N(){p("{");for(var e=[];!i("punc","}");)i("eof")&&l(),e.push(v());return o(),e}function x(){p("{");for(var e,t=[],r=null,s=null;!i("punc","}");)i("eof")&&l(),i("keyword","case")?(s&&(s.end=a()),r=[],s=new je({start:(e=n.token,o(),e),expression:wt(!0),body:r}),t.push(s),p(":")):i("keyword","default")?(s&&(s.end=a()),r=[],s=new $e({start:(e=n.token,o(),p(":"),e),body:r}),t.push(s)):(r||l(),r.push(v()));return s&&(s.end=a()),o(),t}function k(e,t){for(var r,s=[];;){var c="var"===t?kt:"const"===t?Lt:"let"===t?Vt:null;if(i("punc","{")||i("punc","[")?r=new st({start:n.token,name:R(void 0,c),value:i("operator","=")?(f("operator","="),wt(!1,e)):null,end:a()}):"import"==(r=new st({start:n.token,name:_e(c),value:i("operator","=")?(o(),wt(!1,e)):e||"const"!==t?null:u("Missing initializer in const declaration"),end:a()})).name.name&&u("Unexpected token: import"),s.push(r),!i("punc",","))break;o()}return s}var I=function(e){return new tt({start:a(),definitions:k(e,"var"),end:a()})},L=function(e){return new nt({start:a(),definitions:k(e,"let"),end:a()})},P=function(e){return new it({start:a(),definitions:k(e,"const"),end:a()})};function B(){var e,t=n.token;switch(t.type){case"name":e=ue(qt);break;case"num":e=new nn({start:t,end:t,value:t.value});break;case"big_int":e=new rn({start:t,end:t,value:t.value});break;case"string":e=new tn({start:t,end:t,value:t.value,quote:t.quote});break;case"regexp":e=new on({start:t,end:t,value:t.value});break;case"atom":switch(t.value){case"false":e=new _n({start:t,end:t});break;case"true":e=new dn({start:t,end:t});break;case"null":e=new sn({start:t,end:t})}}return o(),e}function K(e,t,n,i){var r=function(e,t){return t?new St({start:e.start,left:e,operator:"=",right:t,end:t.end}):e};return e instanceof vt?r(new Ie({start:e.start,end:e.end,is_array:!1,names:e.properties.map(K)}),i):e instanceof bt?(e.value=K(e.value,0,[e.key]),r(e,i)):e instanceof ln?e:e instanceof Ie?(e.names=e.names.map(K),r(e,i)):e instanceof qt?r(new Pt({name:e.name,start:e.start,end:e.end}),i):e instanceof Me?(e.expression=K(e.expression),r(e,i)):e instanceof At?r(new Ie({start:e.start,end:e.end,is_array:!0,names:e.elements.map(K)}),i):e instanceof gt?r(K(e.left,void 0,void 0,e.right),i):e instanceof St?(e.left=K(e.left,0,[e.left]),e):void u("Invalid function parameter",e.start.line,e.start.col)}var U=function(e,s){if(i("operator","new"))return function(e){var r=n.token;if(f("operator","new"),i("punc","."))return o(),f("name","target"),he(new Nt({start:r,end:a()}),e);var s,u=U(!1);i("punc","(")?(o(),s=H(")",t.ecma>=8)):s=[];var c=new ct({start:r,expression:u,args:s,end:a()});return de(c),he(c,e)}(e);var u,c=n.token,_=i("name","async")&&"["!=(u=r()).value&&"arrow"!=u.type&&B();if(i("punc")){switch(n.token.value){case"(":if(_&&!e)break;var d=function(e,r){var s,u,c,f=[];for(p("(");!i("punc",")");)s&&l(s),i("expand","...")?(s=n.token,r&&(u=n.token),o(),f.push(new Me({start:a(),expression:wt(),end:n.token}))):f.push(wt()),i("punc",")")||(p(","),i("punc",")")&&(t.ecma<8&&l(),c=a(),r&&(u=c)));return p(")"),e&&i("arrow","=>")?s&&c&&l(c):u&&l(u),f}(s,!_);if(s&&i("arrow","=>"))return C(c,d.map(K),!!_);var m=_?new ut({expression:_,args:d}):1==d.length?d[0]:new lt({expressions:d});if(m.start){var E=c.comments_before.length;if([].unshift.apply(m.start.comments_before,c.comments_before),c.comments_before=m.start.comments_before,c.comments_before_length=E,0==E&&c.comments_before.length>0){var h=c.comments_before[0];h.nlb||(h.nlb=c.nlb,c.nlb=!1)}c.comments_after=m.start.comments_after}m.start=c;var D=a();return m.end&&(D.comments_before=m.end.comments_before,[].push.apply(m.end.comments_after,D.comments_after),D.comments_after=m.end.comments_after),m.end=D,m instanceof ut&&de(m),he(m,e);case"[":return he(X(),e);case"{":return he(W(),e)}_||l()}if(s&&i("name")&&j(r(),"arrow")){var g=new Pt({name:n.token.value,start:c,end:c});return o(),C(c,[g],!!_)}if(i("keyword","function")){o();var S=O(Ne,!1,!!_);return S.start=c,S.end=a(),he(S,e)}if(_)return he(_,e);if(i("keyword","class")){o();var A=Y(Rt);return A.start=c,A.end=a(),he(A,e)}return i("template_head")?he(G(),e):ie.has(n.token.type)?he(B(),e):void l()};function G(e){var t=[],i=n.token;for(t.push(new Pe({start:n.token,raw:n.token.raw,value:n.token.value,end:n.token}));!1===n.token.end;)o(),A(),t.push(wt(!0)),j("template_substitution")||l(),t.push(new Pe({start:n.token,raw:n.token.raw,value:n.token.value,end:n.token}));return o(),new Ve({start:i,segments:t,end:n.token})}function H(e,t,r){for(var s=!0,u=[];!i("punc",e)&&(s?s=!1:p(","),!t||!i("punc",e));)i("punc",",")&&r?u.push(new ln({start:n.token,end:n.token})):i("expand","...")?(o(),u.push(new Me({start:a(),expression:wt(),end:n.token}))):u.push(wt(!1));return o(),u}var X=g(function(){return p("["),new At({elements:H("]",!t.strict,!0)})}),z=g(function(e,t){return O(we,e,t)}),W=g(function(){var e=n.token,r=!0,s=[];for(p("{");!i("punc","}")&&(r?r=!1:p(","),t.strict||!i("punc","}"));)if("expand"!=(e=n.token).type){var u,c=ae();if(i("punc",":"))null===c?l(a()):(o(),u=wt(!1));else{var f=q(c,e);if(f){s.push(f);continue}u=new qt({start:a(),name:c,end:a()})}i("operator","=")&&(o(),u=new gt({start:e,left:u,operator:"=",right:wt(!1),end:a()})),s.push(new bt({start:e,quote:e.quote,key:c instanceof se?c:""+c,value:u,end:a()}))}else o(),s.push(new Me({start:e,expression:wt(!1),end:a()}));return o(),new vt({properties:s})});function Y(e){var t,r,s,u,c=[];for(n.input.push_directives_stack(),n.input.add_directive("use strict"),"name"==n.token.type&&"extends"!=n.token.value&&(s=_e(e===Mt?Gt:Ht)),e!==Mt||s||l(),"extends"==n.token.value&&(o(),u=wt(!0)),p("{"),i("punc",";")&&o();!i("punc","}");)t=n.token,(r=q(ae(),t,!0))||l(),c.push(r),i("punc",";")&&o();return n.input.pop_directives_stack(),o(),new e({start:t,name:s,extends:u,properties:c,end:a()})}function q(e,t,r){var o=function(e,t){return"string"==typeof e||"number"==typeof e?new Kt({start:t,name:""+e,end:a()}):(null===e&&l(),e)},s=!1,u=!1,c=!1,f=t;if(r&&"static"===e&&!i("punc","(")&&(u=!0,f=n.token,e=ae()),"async"!==e||i("punc","(")||i("punc",",")||i("punc","}")||(s=!0,f=n.token,e=ae()),null===e&&(c=!0,f=n.token,null===(e=ae())&&l()),i("punc","("))return e=o(e,t),new Ot({start:t,static:u,is_generator:c,async:s,key:e,quote:e instanceof Kt?f.quote:void 0,value:z(c,s),end:a()});if(f=n.token,"get"==e){if(!i("punc")||i("punc","["))return e=o(ae(),t),new Ct({start:t,static:u,key:e,quote:e instanceof Kt?f.quote:void 0,value:z(),end:a()})}else if("set"==e&&(!i("punc")||i("punc","[")))return e=o(ae(),t),new yt({start:t,static:u,key:e,quote:e instanceof Kt?f.quote:void 0,value:z(),end:a()})}function Z(e){function t(e){return new e({name:ae(),start:a(),end:a()})}var r,s,u=e?Wt:jt,c=e?zt:$t,l=n.token;return e?r=t(u):s=t(c),i("name","as")?(o(),e?s=t(c):r=t(u)):e?s=new c(r):r=new u(s),new rt({start:l,foreign_name:r,name:s,end:a()})}function re(e,t){var i,r=e?Wt:jt,o=e?zt:$t,s=n.token,u=a();return t=t||new o({name:"*",start:s,end:u}),i=new r({name:"*",start:s,end:u}),new rt({start:s,foreign_name:i,name:t,end:u})}function oe(e){var t;if(i("punc","{")){for(o(),t=[];!i("punc","}");)t.push(Z(e)),i("punc",",")&&o();o()}else if(i("operator","*")){var n;o(),e&&i("name","as")&&(o(),n=_e(e?zt:jt)),t=[re(e,n)]}return t}function ae(){var e=n.token;switch(e.type){case"punc":if("["===e.value){o();var t=wt(!1);return p("]"),t}l(e);case"operator":if("*"===e.value)return o(),null;["delete","in","instanceof","new","typeof","void"].includes(e.value)||l(e);case"name":"yield"==e.value&&(m()?c(e,"Yield cannot be used as identifier inside generators"):j(r(),"punc",":")||j(r(),"punc","(")||!n.input.has_directive("use strict")||c(e,"Unexpected yield identifier inside strict mode"));case"string":case"num":case"big_int":case"keyword":case"atom":return o(),e.value;default:l(e)}}function ue(e){var t=n.token.value;return new("this"==t?Qt:"super"==t?Jt:e)({name:String(t),start:n.token,end:n.token})}function pe(e){var t=e.name;m()&&"yield"==t&&c(e.start,"Yield cannot be used as identifier inside generators"),n.input.has_directive("use strict")&&("yield"==t&&c(e.start,"Unexpected yield identifier inside strict mode"),e instanceof xt&&("arguments"==t||"eval"==t)&&c(e.start,"Unexpected "+t+" in strict mode"))}function _e(e,t){if(!i("name"))return t||u("Name expected"),null;var n=ue(e);return pe(n),o(),n}function de(e){for(var t=e.start,n=t.comments_before,i=S(t,"comments_before_length")?t.comments_before_length:n.length;--i>=0;){var r=n[i];if(/[@#]__PURE__/.test(r.value)){e.pure=r;break}}}var he=function(e,t){var r,s=e.start;if(i("punc","."))return o(),he(new pt({start:s,expression:e,property:(r=n.token,"name"!=r.type&&l(),o(),r.value),end:a()}),t);if(i("punc","[")){o();var u=wt(!0);return p("]"),he(new _t({start:s,expression:e,property:u,end:a()}),t)}if(t&&i("punc","(")){o();var c=new ut({start:s,expression:e,args:Se(),end:a()});return de(c),he(c,!0)}return i("template_head")?he(new Le({start:s,prefix:e,template_string:G(),end:a()}),t):e},Se=g(function(){for(var e=[];!i("punc",")");)i("expand","...")?(o(),e.push(new Me({start:a(),expression:wt(!1),end:a()}))):e.push(wt(!1)),i("punc",")")||(p(","),i("punc",")")&&t.ecma<8&&l());return o(),e}),Oe=function(e,t){var r=n.token;if("name"==r.type&&"await"==r.value){if(E())return o(),E()||u("Unexpected await expression outside async function",n.prev.line,n.prev.col,n.prev.pos),new mn({start:a(),end:n.token,expression:Oe(!0)});n.input.has_directive("use strict")&&c(n.token,"Unexpected await identifier inside strict mode")}if(i("operator")&&J.has(r.value)){o(),A();var s=Be(mt,r,Oe(e));return s.start=r,s.end=a(),s}for(var f=U(e,t);i("operator")&&ee.has(n.token.value)&&!_(n.token);)f instanceof xe&&l(),(f=Be(Et,n.token,f)).start=r,f.end=n.token,o();return f};function Be(e,t,i){var r=t.value;switch(r){case"++":case"--":qe(i)||u("Invalid use of "+r+" operator",t.line,t.col,t.pos);break;case"delete":i instanceof qt&&n.input.has_directive("use strict")&&u("Calling delete on expression not allowed in strict mode",i.start.line,i.start.col,i.start.pos)}return new e({operator:r,expression:i})}var Ke=function(e,t,r){var a=i("operator")?n.token.value:null;"in"==a&&r&&(a=null),"**"==a&&e instanceof mt&&!j(e.start,"punc","(")&&"--"!==e.operator&&"++"!==e.operator&&l(e.start);var s=null!=a?ne[a]:null;if(null!=s&&(s>t||"**"===a&&t===s)){o();var u=Ke(Oe(!0),s,r);return Ke(new ht({start:e.start,left:e,operator:a,right:u,end:u.end}),t,r)}return e};var He=function(e){var t=n.token,r=function(e){return Ke(Oe(!0,!0),0,e)}(e);if(i("operator","?")){o();var s=wt(!1);return p(":"),new Dt({start:t,condition:r,consequent:s,alternative:wt(!1,e),end:a()})}return r};function qe(e){return e instanceof ft||e instanceof qt}function dt(e){if(e instanceof vt)e=new Ie({start:e.start,names:e.properties.map(dt),is_array:!1,end:e.end});else if(e instanceof At){for(var t=[],n=0;n=0;)o+="this."+t[a]+" = props."+t[a]+";";var s=i&&new i;(s&&s.initialize||n&&n.initialize)&&(o+="this.initialize();"),o+="}}";var u=new Function(o)();if(s&&(u.prototype=s,u.BASE=i),i&&i.SUBCLASSES.push(u),u.prototype.CTOR=u,u.PROPS=t||null,u.SELF_PROPS=r,u.SUBCLASSES=[],e&&(u.prototype.TYPE=u.TYPE=e),n)for(a in n)S(n,a)&&("$"===a[0]?u[a.substr(1)]=n[a]:u.prototype[a]=n[a]);return u.DEFMETHOD=function(e,t){this.prototype[e]=t},u}var ae=oe("Token","type value line col pos endline endcol endpos nlb comments_before comments_after file raw",{},null),se=oe("Node","start end",{_clone:function(e){if(e){var t=this.clone();return t.transform(new Dn(function(e){if(e!==t)return e.clone(!0)}))}return new this.CTOR(this)},clone:function(e){return this._clone(e)},$documentation:"Base class of all AST nodes",$propdoc:{start:"[AST_Token] The first token of this node",end:"[AST_Token] The last token of this node"},_walk:function(e){return e._visit(this)},walk:function(e){return this._walk(e)}},null);se.warn_function=null,se.warn=function(e,t){se.warn_function&&se.warn_function(m(e,t))};var ue=oe("Statement",null,{$documentation:"Base class of all statements"}),ce=oe("Debugger",null,{$documentation:"Represents a debugger statement"},ue),le=oe("Directive","value quote",{$documentation:'Represents a directive, like "use strict";',$propdoc:{value:"[string] The value of this directive as a plain string (it's not an AST_String!)",quote:"[string] the original quote character"}},ue),fe=oe("SimpleStatement","body",{$documentation:"A statement consisting of an expression, i.e. a = 1 + 2",$propdoc:{body:"[AST_Node] an expression node (should not be instanceof AST_Statement)"},_walk:function(e){return e._visit(this,function(){this.body._walk(e)})}},ue);function pe(e,t){var n=e.body;if(n instanceof se)n._walk(t);else for(var i=0,r=n.length;i SymbolDef for all variables/functions defined in this scope",functions:"[Map/S] like `variables`, but only lists function declarations",uses_with:"[boolean/S] tells whether this scope uses the `with` statement",uses_eval:"[boolean/S] tells whether this scope contains a direct call to the global `eval`",parent_scope:"[AST_Scope?/S] link to the parent scope",enclosed:"[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes",cname:"[integer/S] current index for mangling variables (used internally by the mangler)"},get_defun_scope:function(){for(var e=this;e.is_block_scope();)e=e.parent_scope;return e},clone:function(e){var t=this._clone(e);return this.variables&&(t.variables=new Map(this.variables)),this.functions&&(t.functions=new Map(this.functions)),this.enclosed&&(t.enclosed=this.enclosed.slice()),t},pinned:function(){return this.uses_eval||this.uses_with}},de),Fe=oe("Toplevel","globals",{$documentation:"The toplevel scope",$propdoc:{globals:"[Map/S] a map of name -> SymbolDef for all undeclared names"},wrap_commonjs:function(e){var t=this.body,n="(function(exports){'$ORIG';})(typeof "+e+"=='undefined'?("+e+"={}):"+e+");";return n=(n=re(n)).transform(new Dn(function(e){if(e instanceof le&&"$ORIG"==e.value)return _.splice(t)}))},wrap_enclose:function(e){"string"!=typeof e&&(e="");var t=e.indexOf(":");t<0&&(t=e.length);var n=this.body;return re(["(function(",e.slice(0,t),'){"$ORIG"})(',e.slice(t+1),")"].join("")).transform(new Dn(function(e){if(e instanceof le&&"$ORIG"==e.value)return _.splice(n)}))}},Oe),Me=oe("Expansion","expression",{$documentation:"An expandible argument, such as ...rest, a splat, such as [1,2,...all], or an expansion in a variable declaration, such as var [first, ...rest] = list",$propdoc:{expression:"[AST_Node] the thing to be expanded"},_walk:function(e){var t=this;return e._visit(this,function(){t.expression.walk(e)})}}),Re=oe("Lambda","name argnames uses_arguments is_generator async",{$documentation:"Base class for functions",$propdoc:{name:"[AST_SymbolDeclaration?] the name of this function",argnames:"[AST_SymbolFunarg|AST_Destructuring|AST_Expansion|AST_DefaultAssign*] array of function arguments, destructurings, or expanding arguments",uses_arguments:"[boolean/S] tells whether this function accesses the arguments array",is_generator:"[boolean] is this a generator method",async:"[boolean] is this method async"},args_as_names:function(){for(var e=[],t=0;t b)"},Re),ke=oe("Defun","inlined",{$documentation:"A function definition"},Re),Ie=oe("Destructuring","names is_array",{$documentation:"A destructuring of several names. Used in destructuring assignment and with destructuring function argument names",$propdoc:{names:"[AST_Node*] Array of properties or elements",is_array:"[Boolean] Whether the destructuring represents an object or array"},_walk:function(e){return e._visit(this,function(){this.names.forEach(function(t){t._walk(e)})})},all_symbols:function(){var e=[];return this.walk(new hn(function(t){t instanceof wt&&e.push(t),t instanceof Me&&e.push(t.expression)})),e}}),Le=oe("PrefixedTemplateString","template_string prefix",{$documentation:"A templatestring with a prefix, such as String.raw`foobarbaz`",$propdoc:{template_string:"[AST_TemplateString] The template string",prefix:"[AST_SymbolRef|AST_PropAccess] The prefix, which can be a symbol such as `foo` or a dotted expression such as `String.raw`."},_walk:function(e){this.prefix._walk(e),this.template_string._walk(e)}}),Ve=oe("TemplateString","segments",{$documentation:"A template string literal",$propdoc:{segments:"[AST_Node*] One or more segments, starting with AST_TemplateSegment. AST_Node may follow AST_TemplateSegment, but each AST_Node must be followed by AST_TemplateSegment."},_walk:function(e){return e._visit(this,function(){this.segments.forEach(function(t){t._walk(e)})})}}),Pe=oe("TemplateSegment","value raw",{$documentation:"A segment of a template string literal",$propdoc:{value:"Content of the segment",raw:"Raw content of the segment"}}),Be=oe("Jump",null,{$documentation:"Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)"},ue),Ke=oe("Exit","value",{$documentation:"Base class for “exits” (`return` and `throw`)",$propdoc:{value:"[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return"},_walk:function(e){return e._visit(this,this.value&&function(){this.value._walk(e)})}},Be),Ue=oe("Return",null,{$documentation:"A `return` statement"},Ke),Ge=oe("Throw",null,{$documentation:"A `throw` statement"},Ke),He=oe("LoopControl","label",{$documentation:"Base class for loop control statements (`break` and `continue`)",$propdoc:{label:"[AST_LabelRef?] the label, or null if none"},_walk:function(e){return e._visit(this,this.label&&function(){this.label._walk(e)})}},Be),Xe=oe("Break",null,{$documentation:"A `break` statement"},He),ze=oe("Continue",null,{$documentation:"A `continue` statement"},He),We=oe("If","condition alternative",{$documentation:"A `if` statement",$propdoc:{condition:"[AST_Node] the `if` condition",alternative:"[AST_Statement?] the `else` part, or null if not present"},_walk:function(e){return e._visit(this,function(){this.condition._walk(e),this.body._walk(e),this.alternative&&this.alternative._walk(e)})}},he),Ye=oe("Switch","expression",{$documentation:"A `switch` statement",$propdoc:{expression:"[AST_Node] the `switch` “discriminant”"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e),pe(this,e)})}},de),qe=oe("SwitchBranch",null,{$documentation:"Base class for `switch` branches"},de),$e=oe("Default",null,{$documentation:"A `default` switch branch"},qe),je=oe("Case","expression",{$documentation:"A `case` switch branch",$propdoc:{expression:"[AST_Node] the `case` expression"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e),pe(this,e)})}},qe),Ze=oe("Try","bcatch bfinally",{$documentation:"A `try` statement",$propdoc:{bcatch:"[AST_Catch?] the catch block, or null if not present",bfinally:"[AST_Finally?] the finally block, or null if not present"},_walk:function(e){return e._visit(this,function(){pe(this,e),this.bcatch&&this.bcatch._walk(e),this.bfinally&&this.bfinally._walk(e)})}},de),Qe=oe("Catch","argname",{$documentation:"A `catch` node; only makes sense as part of a `try` statement",$propdoc:{argname:"[AST_SymbolCatch|AST_Destructuring|AST_Expansion|AST_DefaultAssign] symbol for the exception"},_walk:function(e){return e._visit(this,function(){this.argname&&this.argname._walk(e),pe(this,e)})}},de),Je=oe("Finally",null,{$documentation:"A `finally` node; only makes sense as part of a `try` statement"},de),et=oe("Definitions","definitions",{$documentation:"Base class for `var` or `const` nodes (variable declarations/initializations)",$propdoc:{definitions:"[AST_VarDef*] array of variable definitions"},_walk:function(e){return e._visit(this,function(){for(var t=this.definitions,n=0,i=t.length;n a`"},ht),At=oe("Array","elements",{$documentation:"An array literal",$propdoc:{elements:"[AST_Node*] array of elements"},_walk:function(e){return e._visit(this,function(){for(var t=this.elements,n=0,i=t.length;n=0;){var i=t[n];if(i instanceof e)return i}},has_directive:function(e){var t=this.directives[e];if(t)return t;var n=this.stack[this.stack.length-1];if(n instanceof Oe&&n.body)for(var i=0;i=0;){if((i=t[n])instanceof De&&i.label.name==e.label.name)return i.body}else for(n=t.length;--n>=0;){var i;if((i=t[n])instanceof ge||e instanceof Xe&&i instanceof Ye)return i}}};class Dn extends hn{constructor(e,t){super(),this.before=e,this.after=t}}var gn=Object.freeze({__proto__:null,AST_Accessor:we,AST_Array:At,AST_Arrow:xe,AST_Assign:gt,AST_Atom:an,AST_Await:mn,AST_BigInt:rn,AST_Binary:ht,AST_Block:de,AST_BlockStatement:me,AST_Boolean:pn,AST_Break:Xe,AST_Call:ut,AST_Case:je,AST_Catch:Qe,AST_Class:Ft,AST_ClassExpression:Rt,AST_ConciseMethod:Ot,AST_Conditional:Dt,AST_Const:it,AST_Constant:en,AST_Continue:ze,AST_Debugger:ce,AST_Default:$e,AST_DefaultAssign:St,AST_DefClass:Mt,AST_Definitions:et,AST_Defun:ke,AST_Destructuring:Ie,AST_Directive:le,AST_Do:Ae,AST_Dot:pt,AST_DWLoop:Se,AST_EmptyStatement:Ee,AST_Exit:Ke,AST_Expansion:Me,AST_Export:at,AST_False:_n,AST_Finally:Je,AST_For:Te,AST_ForIn:be,AST_ForOf:ye,AST_Function:Ne,AST_Hole:ln,AST_If:We,AST_Import:ot,AST_Infinity:fn,AST_IterationStatement:ge,AST_Jump:Be,AST_Label:Yt,AST_LabeledStatement:De,AST_LabelRef:Zt,AST_Lambda:Re,AST_Let:nt,AST_LoopControl:He,AST_NameMapping:rt,AST_NaN:un,AST_New:ct,AST_NewTarget:Nt,AST_Node:se,AST_Null:sn,AST_Number:nn,AST_Object:vt,AST_ObjectGetter:Ct,AST_ObjectKeyVal:bt,AST_ObjectProperty:Tt,AST_ObjectSetter:yt,AST_PrefixedTemplateString:Le,AST_PropAccess:ft,AST_RegExp:on,AST_Return:Ue,AST_Scope:Oe,AST_Sequence:lt,AST_SimpleStatement:fe,AST_Statement:ue,AST_StatementWithBody:he,AST_String:tn,AST_Sub:_t,AST_Super:Jt,AST_Switch:Ye,AST_SwitchBranch:qe,AST_Symbol:wt,AST_SymbolBlockDeclaration:It,AST_SymbolCatch:Xt,AST_SymbolClass:Ht,AST_SymbolConst:Lt,AST_SymbolDeclaration:xt,AST_SymbolDefClass:Gt,AST_SymbolDefun:Bt,AST_SymbolExport:$t,AST_SymbolExportForeign:jt,AST_SymbolFunarg:Pt,AST_SymbolImport:zt,AST_SymbolImportForeign:Wt,AST_SymbolLambda:Ut,AST_SymbolLet:Vt,AST_SymbolMethod:Kt,AST_SymbolRef:qt,AST_SymbolVar:kt,AST_TemplateSegment:Pe,AST_TemplateString:Ve,AST_This:Qt,AST_Throw:Ge,AST_Token:ae,AST_Toplevel:Fe,AST_True:dn,AST_Try:Ze,AST_Unary:dt,AST_UnaryPostfix:Et,AST_UnaryPrefix:mt,AST_Undefined:cn,AST_Var:tt,AST_VarDef:st,AST_While:ve,AST_With:Ce,AST_Yield:En,TreeTransformer:Dn,TreeWalker:hn,walk_body:pe});function Sn(e){let t=e.parent(-1);for(let n,i=0;n=e.parent(i);i++){if(n instanceof ue&&n.body===t)return!0;if(!(n instanceof lt&&n.expressions[0]===t||"Call"===n.TYPE&&n.expression===t||n instanceof pt&&n.expression===t||n instanceof _t&&n.expression===t||n instanceof Dt&&n.condition===t||n instanceof ht&&n.left===t||n instanceof Et&&n.expression===t))return!1;t=n}}!function(){function e(e,t){e.DEFMETHOD("transform",function(e,n){var i,r;return e.push(this),e.before&&(i=e.before(this,t,n)),void 0===i&&(t(i=this,e),e.after&&void 0!==(r=e.after(i,n))&&(i=r)),e.pop(),i})}function t(e,t){return _(e,function(e){return e.transform(t,!0)})}e(se,u),e(De,function(e,t){e.label=e.label.transform(t),e.body=e.body.transform(t)}),e(fe,function(e,t){e.body=e.body.transform(t)}),e(de,function(e,n){e.body=t(e.body,n)}),e(Ae,function(e,t){e.body=e.body.transform(t),e.condition=e.condition.transform(t)}),e(ve,function(e,t){e.condition=e.condition.transform(t),e.body=e.body.transform(t)}),e(Te,function(e,t){e.init&&(e.init=e.init.transform(t)),e.condition&&(e.condition=e.condition.transform(t)),e.step&&(e.step=e.step.transform(t)),e.body=e.body.transform(t)}),e(be,function(e,t){e.init=e.init.transform(t),e.object=e.object.transform(t),e.body=e.body.transform(t)}),e(Ce,function(e,t){e.expression=e.expression.transform(t),e.body=e.body.transform(t)}),e(Ke,function(e,t){e.value&&(e.value=e.value.transform(t))}),e(He,function(e,t){e.label&&(e.label=e.label.transform(t))}),e(We,function(e,t){e.condition=e.condition.transform(t),e.body=e.body.transform(t),e.alternative&&(e.alternative=e.alternative.transform(t))}),e(Ye,function(e,n){e.expression=e.expression.transform(n),e.body=t(e.body,n)}),e(je,function(e,n){e.expression=e.expression.transform(n),e.body=t(e.body,n)}),e(Ze,function(e,n){e.body=t(e.body,n),e.bcatch&&(e.bcatch=e.bcatch.transform(n)),e.bfinally&&(e.bfinally=e.bfinally.transform(n))}),e(Qe,function(e,n){e.argname&&(e.argname=e.argname.transform(n)),e.body=t(e.body,n)}),e(et,function(e,n){e.definitions=t(e.definitions,n)}),e(st,function(e,t){e.name=e.name.transform(t),e.value&&(e.value=e.value.transform(t))}),e(Ie,function(e,n){e.names=t(e.names,n)}),e(Re,function(e,n){e.name&&(e.name=e.name.transform(n)),e.argnames=t(e.argnames,n),e.body instanceof se?e.body=e.body.transform(n):e.body=t(e.body,n)}),e(ut,function(e,n){e.expression=e.expression.transform(n),e.args=t(e.args,n)}),e(lt,function(e,n){e.expressions=t(e.expressions,n)}),e(pt,function(e,t){e.expression=e.expression.transform(t)}),e(_t,function(e,t){e.expression=e.expression.transform(t),e.property=e.property.transform(t)}),e(En,function(e,t){e.expression&&(e.expression=e.expression.transform(t))}),e(mn,function(e,t){e.expression=e.expression.transform(t)}),e(dt,function(e,t){e.expression=e.expression.transform(t)}),e(ht,function(e,t){e.left=e.left.transform(t),e.right=e.right.transform(t)}),e(Dt,function(e,t){e.condition=e.condition.transform(t),e.consequent=e.consequent.transform(t),e.alternative=e.alternative.transform(t)}),e(At,function(e,n){e.elements=t(e.elements,n)}),e(vt,function(e,n){e.properties=t(e.properties,n)}),e(Tt,function(e,t){e.key instanceof se&&(e.key=e.key.transform(t)),e.value=e.value.transform(t)}),e(Ft,function(e,n){e.name&&(e.name=e.name.transform(n)),e.extends&&(e.extends=e.extends.transform(n)),e.properties=t(e.properties,n)}),e(Me,function(e,t){e.expression=e.expression.transform(t)}),e(rt,function(e,t){e.foreign_name=e.foreign_name.transform(t),e.name=e.name.transform(t)}),e(ot,function(e,n){e.imported_name&&(e.imported_name=e.imported_name.transform(n)),e.imported_names&&t(e.imported_names,n),e.module_name=e.module_name.transform(n)}),e(at,function(e,n){e.exported_definition&&(e.exported_definition=e.exported_definition.transform(n)),e.exported_value&&(e.exported_value=e.exported_value.transform(n)),e.exported_names&&t(e.exported_names,n),e.module_name&&(e.module_name=e.module_name.transform(n))}),e(Ve,function(e,n){e.segments=t(e.segments,n)}),e(Le,function(e,t){e.prefix=e.prefix.transform(t),e.template_string=e.template_string.transform(t)})}();var An=/^$|[;{][\s\n]*$/;const vn=10,Tn=32;function bn(e){return"comment2"==e.type&&/@preserve|@license|@cc_on/i.test(e.value)}function yn(e){var t=!e;void 0===(e=s(e,{ascii_only:!1,beautify:!1,braces:!1,comments:!1,ecma:5,ie8:!1,indent_level:4,indent_start:0,inline_script:!0,keep_quoted_props:!1,max_line_len:!1,preamble:null,quote_keys:!1,quote_style:0,safari10:!1,semicolons:!0,shebang:!0,shorthand:void 0,source_map:null,webkit:!1,width:80,wrap_iife:!1},!0)).shorthand&&(e.shorthand=e.ecma>5);var n=c;if(e.comments){var i=e.comments;if("string"==typeof e.comments&&/^\/.*\/[a-zA-Z]*$/.test(e.comments)){var r=e.comments.lastIndexOf("/");i=new RegExp(e.comments.substr(1,r-1),e.comments.substr(r+1))}n=i instanceof RegExp?function(e){return"comment5"!=e.type&&i.test(e.value)}:"function"==typeof i?function(e){return"comment5"!=e.type&&i(this,e)}:"some"===i?bn:l}var o=0,a=0,f=1,p=0,_="",d=e.ascii_only?function(t,n){return e.ecma>=6&&(t=t.replace(/[\ud800-\udbff][\udc00-\udfff]/g,function(e){return"\\u{"+function(e,t){return G(e.charAt(t))?65536+(e.charCodeAt(t)-55296<<10)+e.charCodeAt(t+1)-56320:e.charCodeAt(t)}(e,0).toString(16)+"}"})),t.replace(/[\u0000-\u001f\u007f-\uffff]/g,function(e){var t=e.charCodeAt(0).toString(16);if(t.length<=2&&!n){for(;t.length<2;)t="0"+t;return"\\x"+t}for(;t.length<4;)t="0"+t;return"\\u"+t})}:function(e){for(var t="",n=0,i=e.length;nr?o():a()}}(t,n);return e.inline_script&&(i=(i=(i=i.replace(/<\x2f(script)([>\/\t\n\f\r ])/gi,"<\\/$1$2")).replace(/\x3c!--/g,"\\x3c!--")).replace(/--\x3e/g,"--\\x3e")),i}var E,h,g=!1,S=!1,A=!1,v=0,T=!1,b=!1,y=-1,C="",O=e.source_map&&[],F=O?function(){O.forEach(function(t){try{e.source_map.add(t.token.file,t.line,t.col,t.token.line,t.token.col,t.name||"name"!=t.token.type?t.name:t.token.value)}catch(e){null!=t.token.file&&se.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]",{file:t.token.file,line:t.token.line,col:t.token.col,cline:t.line,ccol:t.col,name:t.name||""})}}),O=[]}:u,M=e.max_line_len?function(){if(a>e.max_line_len){if(v){var t=_.slice(0,v),n=_.slice(v);if(O){var i=n.length-a;O.forEach(function(e){e.line++,e.col+=i})}_=t+"\n"+n,f++,p++,a=n.length}a>e.max_line_len&&se.warn("Output exceeds {max_line_len} characters",e)}v&&(v=0,F())}:u,R=D("( [ + * / - , . `");function w(t){var n=U(t=String(t),0);T&&n&&(T=!1,"\n"!==n&&(w("\n"),x())),b&&n&&(b=!1,/[\s;})]/.test(n)||N()),y=-1;var i=C.charAt(C.length-1);A&&(A=!1,(":"!==i||"}"!==n)&&(n&&";}".includes(n)||";"===i)||(e.semicolons||R.has(n)?(_+=";",a++,p++):(M(),a>0&&(_+="\n",p++,f++,a=0),/^\s+$/.test(t)&&(A=!0)),e.beautify||(S=!1))),S&&((W(i)&&(W(n)||"\\"==n)||"/"==n&&n==i||("+"==n||"-"==n)&&n==C)&&(_+=" ",a++,p++),S=!1),E&&(O.push({token:E,name:h,line:f,col:a}),E=!1,v||F()),_+=t,g="("==t[t.length-1],p+=t.length;var r=t.split(/\r?\n/),o=r.length-1;f+=o,a+=r[0].length,o>0&&(M(),a=r[o].length),C=t}var N=e.beautify?function(){w(" ")}:function(){S=!0},x=e.beautify?function(t){var n;e.beautify&&w((n=t?.5:0," ".repeat(e.indent_start+o-n*e.indent_level)))}:u,k=e.beautify?function(e,t){!0===e&&(e=P());var n=o;o=e;var i=t();return o=n,i}:function(e,t){return t()},I=e.beautify?function(){if(y<0)return w("\n");"\n"!=_[y]&&(_=_.slice(0,y)+"\n"+_.slice(y),p++,f++),y++}:e.max_line_len?function(){M(),v=_.length}:u,L=e.beautify?function(){w(";")}:function(){A=!0};function V(){A=!1,w(";")}function P(){return o+e.indent_level}function B(){return v&&M(),_}function K(){let e=_.length-1;for(;e>=0;){const t=_.charCodeAt(e);if(t===vn)return!0;if(t!==Tn)return!1;e--}return!0}var X=[];return{get:B,toString:B,indent:x,indentation:function(){return o},current_width:function(){return a-o},should_break:function(){return e.width&&this.current_width()>=e.width},has_parens:function(){return g},newline:I,print:w,star:function(){w("*")},space:N,comma:function(){w(","),N()},colon:function(){w(":"),N()},last:function(){return C},semicolon:L,force_semicolon:V,to_utf8:d,print_name:function(e){w(function(e){return e=e.toString(),e=d(e,!0)}(e))},print_string:function(e,t,n){var i=m(e,t);!0!==n||i.includes("\\")||(An.test(_)||V(),V()),w(i)},print_template_string_chars:function(e){var t=m(e,"`").replace(/\${/g,"\\${");return w(t.substr(1,t.length-2))},encode_string:m,next_indent:P,with_indent:k,with_block:function(e){var t;return w("{"),I(),k(P(),function(){t=e()}),x(),w("}"),t},with_parens:function(e){w("(");var t=e();return w(")"),t},with_square:function(e){w("[");var t=e();return w("]"),t},add_mapping:O?function(e,t){E=e,h=t}:u,option:function(t){return e[t]},prepend_comments:t?u:function(t){var i=this,r=t.start;if(r&&(!r.comments_before||r.comments_before._dumped!==i)){var o=r.comments_before;if(o||(o=r.comments_before=[]),o._dumped=i,t instanceof Ke&&t.value){var a=new hn(function(e){var t=a.parent();if(!(t instanceof Ke||t instanceof ht&&t.left===e||"Call"==t.TYPE&&t.expression===e||t instanceof Dt&&t.condition===e||t instanceof pt&&t.expression===e||t instanceof lt&&t.expressions[0]===e||t instanceof _t&&t.expression===e||t instanceof Et))return!0;if(e.start){var n=e.start.comments_before;n&&n._dumped!==i&&(n._dumped=i,o=o.concat(n))}});a.push(t),t.value.walk(a)}if(0==p){o.length>0&&e.shebang&&"comment5"==o[0].type&&(w("#!"+o.shift().value+"\n"),x());var s=e.preamble;s&&w(s.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g,"\n"))}if(0!=(o=o.filter(n,t)).length){var u=K();o.forEach(function(e,t){u||(e.nlb?(w("\n"),x(),u=!0):t>0&&N()),/comment[134]/.test(e.type)?(w("//"+e.value.replace(/[@#]__PURE__/g," ")+"\n"),x(),u=!0):"comment2"==e.type&&(w("/*"+e.value.replace(/[@#]__PURE__/g," ")+"*/"),u=!1)}),u||(r.nlb?(w("\n"),x()):N())}}},append_comments:t||n===c?u:function(e,t){var i=e.end;if(i){var r=i[t?"comments_before":"comments_after"];if(r&&r._dumped!==this&&(e instanceof ue||r.every(e=>!/comment[134]/.test(e.type)))){r._dumped=this;var o=_.length;r.filter(n,e).forEach(function(e,n){b=!1,T?(w("\n"),x(),T=!1):e.nlb&&(n>0||!K())?(w("\n"),x()):(n>0||!t)&&N(),/comment[134]/.test(e.type)?(w("//"+e.value.replace(/[@#]__PURE__/g," ")),T=!0):"comment2"==e.type&&(w("/*"+e.value.replace(/[@#]__PURE__/g," ")+"*/"),b=!0)}),_.length>o&&(y=o)}}},line:function(){return f},col:function(){return a},pos:function(){return p},push_node:function(e){X.push(e)},pop_node:function(){return X.pop()},parent:function(e){return X[X.length-2-(e||0)]}}}function Cn(e,t,n){this.name=t.name,this.orig=[t],this.init=n,this.eliminated=0,this.scope=e,this.references=[],this.replaced=0,this.global=!1,this.export=!1,this.mangled_name=null,this.undeclared=!1,this.id=Cn.next_id++}!function(){function e(e,t){e.DEFMETHOD("_codegen",t)}var t=!1,n=null,i=null;function r(e,t){Array.isArray(e)?e.forEach(function(e){r(e,t)}):e.DEFMETHOD("needs_parens",t)}function o(e,n,i,r){var o=e.length-1;t=r,e.forEach(function(e,r){!0!==t||e instanceof le||e instanceof Ee||e instanceof fe&&e.body instanceof tn||(t=!1),e instanceof Ee||(i.indent(),e.print(i),r==o&&n||(i.newline(),n&&i.newline())),!0===t&&e instanceof fe&&e.body instanceof tn&&(t=!1)}),t=!1}function a(e,t){t.print("{"),t.with_indent(t.next_indent(),function(){t.append_comments(e,!0)}),t.print("}")}function s(e,t,n){e.body.length>0?t.with_block(function(){o(e.body,!1,t,n)}):a(e,t)}function l(e,t,n){var i=!1;n&&e.walk(new hn(function(e){return!!(i||e instanceof Oe)||(e instanceof ht&&"in"==e.operator?(i=!0,!0):void 0)})),e.print(t,i)}function f(e,t,n){n.option("quote_keys")?n.print_string(e):""+ +e==e&&e>=0?n.print(d(e)):(b.has(e)?!n.option("ie8"):Y(e))?t&&n.option("keep_quoted_props")?n.print_string(e,t):n.print_name(e):n.print_string(e,t)}function p(e,t){t.option("braces")?m(e,t):!e||e instanceof Ee?t.force_semicolon():e.print(t)}function _(e,t){return e.args.length>0||t.option("beautify")}function d(e){var t,n,i,r=e.toString(10).replace(/^0\./,".").replace("e+","e"),o=[r];return Math.floor(e)===e&&(e<0?o.push("-0x"+(-e).toString(16).toLowerCase()):o.push("0x"+e.toString(16).toLowerCase())),(t=/^\.0+/.exec(r))?(n=t[0].length,i=r.slice(n),o.push(i+"e-"+(i.length+n-1))):(t=/0+$/.exec(r))?(n=t[0].length,o.push(r.slice(0,-n)+"e"+n)):(t=/^(\d)\.(\d+)e(-?\d+)$/.exec(r))&&o.push(t[1]+t[2]+"e"+(t[3]-t[2].length)),function(e){for(var t=e[0],n=t.length,i=1;io||i==o&&(this===t.right||"**"==n))return!0}}),r(En,function(e){var t=e.parent();return t instanceof ht&&"="!==t.operator||(t instanceof ut&&t.expression===this||(t instanceof Dt&&t.condition===this||(t instanceof dt||(t instanceof ft&&t.expression===this||void 0))))}),r(ft,function(e){var t=e.parent();if(t instanceof ct&&t.expression===this){var n=!1;return this.walk(new hn(function(e){return!!(n||e instanceof Oe)||(e instanceof ut?(n=!0,!0):void 0)})),n}}),r(ut,function(e){var t,n=e.parent();return!!(n instanceof ct&&n.expression===this||n instanceof at&&n.is_default&&this.expression instanceof Ne)||this.expression instanceof Ne&&n instanceof ft&&n.expression===this&&(t=e.parent(1))instanceof gt&&t.left===n}),r(ct,function(e){var t=e.parent();if(!_(this,e)&&(t instanceof ft||t instanceof ut&&t.expression===this))return!0}),r(nn,function(e){var t=e.parent();if(t instanceof ft&&t.expression===this){var n=this.getValue();if(n<0||/^0/.test(d(n)))return!0}}),r(rn,function(e){var t=e.parent();if(t instanceof ft&&t.expression===this&&this.getValue().startsWith("-"))return!0}),r([gt,Dt],function(e){var t=e.parent();return t instanceof dt||(t instanceof ht&&!(t instanceof gt)||(t instanceof ut&&t.expression===this||(t instanceof Dt&&t.condition===this||(t instanceof ft&&t.expression===this||(this instanceof gt&&this.left instanceof Ie&&!1===this.left.is_array||void 0)))))}),e(le,function(e,t){t.print_string(e.value,e.quote),t.semicolon()}),e(Me,function(e,t){t.print("..."),e.expression.print(t)}),e(Ie,function(e,t){t.print(e.is_array?"[":"{");var n=e.names.length;e.names.forEach(function(e,i){i>0&&t.comma(),e.print(t),i==n-1&&e instanceof ln&&t.comma()}),t.print(e.is_array?"]":"}")}),e(ce,function(e,t){t.print("debugger"),t.semicolon()}),he.DEFMETHOD("_do_print_body",function(e){p(this.body,e)}),e(ue,function(e,t){e.body.print(t),t.semicolon()}),e(Fe,function(e,t){o(e.body,!0,t,!0),t.print("")}),e(De,function(e,t){e.label.print(t),t.colon(),e.body.print(t)}),e(fe,function(e,t){e.body.print(t),t.semicolon()}),e(me,function(e,t){s(e,t)}),e(Ee,function(e,t){t.semicolon()}),e(Ae,function(e,t){t.print("do"),t.space(),m(e.body,t),t.space(),t.print("while"),t.space(),t.with_parens(function(){e.condition.print(t)}),t.semicolon()}),e(ve,function(e,t){t.print("while"),t.space(),t.with_parens(function(){e.condition.print(t)}),t.space(),e._do_print_body(t)}),e(Te,function(e,t){t.print("for"),t.space(),t.with_parens(function(){e.init?(e.init instanceof et?e.init.print(t):l(e.init,t,!0),t.print(";"),t.space()):t.print(";"),e.condition?(e.condition.print(t),t.print(";"),t.space()):t.print(";"),e.step&&e.step.print(t)}),t.space(),e._do_print_body(t)}),e(be,function(e,t){t.print("for"),e.await&&(t.space(),t.print("await")),t.space(),t.with_parens(function(){e.init.print(t),t.space(),t.print(e instanceof ye?"of":"in"),t.space(),e.object.print(t)}),t.space(),e._do_print_body(t)}),e(Ce,function(e,t){t.print("with"),t.space(),t.with_parens(function(){e.expression.print(t)}),t.space(),e._do_print_body(t)}),Re.DEFMETHOD("_do_print",function(e,t){var n=this;t||(n.async&&(e.print("async"),e.space()),e.print("function"),n.is_generator&&e.star(),n.name&&e.space()),n.name instanceof wt?n.name.print(e):t&&n.name instanceof se&&e.with_square(function(){n.name.print(e)}),e.with_parens(function(){n.argnames.forEach(function(t,n){n&&e.comma(),t.print(e)})}),e.space(),s(n,e,!0)}),e(Re,function(e,t){e._do_print(t)}),e(Le,function(e,t){var n=e.prefix,i=n instanceof xe||n instanceof ht||n instanceof Dt||n instanceof lt||n instanceof dt;i&&t.print("("),e.prefix.print(t),i&&t.print(")"),e.template_string.print(t)}),e(Ve,function(e,t){var n=t.parent()instanceof Le;t.print("`");for(var i=0;i"),e.space(),t.body instanceof se?t.body.print(e):s(t,e),i&&e.print(")")}),Ke.DEFMETHOD("_do_print",function(e,t){e.print(t),this.value&&(e.space(),this.value.print(e)),e.semicolon()}),e(Ue,function(e,t){e._do_print(t,"return")}),e(Ge,function(e,t){e._do_print(t,"throw")}),e(En,function(e,t){var n=e.is_star?"*":"";t.print("yield"+n),e.expression&&(t.space(),e.expression.print(t))}),e(mn,function(e,t){t.print("await"),t.space();var n=e.expression,i=!(n instanceof ut||n instanceof qt||n instanceof ft||n instanceof dt||n instanceof en);i&&t.print("("),e.expression.print(t),i&&t.print(")")}),He.DEFMETHOD("_do_print",function(e,t){e.print(t),this.label&&(e.space(),this.label.print(e)),e.semicolon()}),e(Xe,function(e,t){e._do_print(t,"break")}),e(ze,function(e,t){e._do_print(t,"continue")}),e(We,function(e,t){t.print("if"),t.space(),t.with_parens(function(){e.condition.print(t)}),t.space(),e.alternative?(!function(e,t){var n=e.body;if(t.option("braces")||t.option("ie8")&&n instanceof Ae)return m(n,t);if(!n)return t.force_semicolon();for(;;)if(n instanceof We){if(!n.alternative)return void m(e.body,t);n=n.alternative}else{if(!(n instanceof he))break;n=n.body}p(e.body,t)}(e,t),t.space(),t.print("else"),t.space(),e.alternative instanceof We?e.alternative.print(t):p(e.alternative,t)):e._do_print_body(t)}),e(Ye,function(e,t){t.print("switch"),t.space(),t.with_parens(function(){e.expression.print(t)}),t.space();var n=e.body.length-1;n<0?a(e,t):t.with_block(function(){e.body.forEach(function(e,i){t.indent(!0),e.print(t),i0&&t.newline()})})}),qe.DEFMETHOD("_do_print_body",function(e){e.newline(),this.body.forEach(function(t){e.indent(),t.print(e),e.newline()})}),e($e,function(e,t){t.print("default:"),e._do_print_body(t)}),e(je,function(e,t){t.print("case"),t.space(),e.expression.print(t),t.print(":"),e._do_print_body(t)}),e(Ze,function(e,t){t.print("try"),t.space(),s(e,t),e.bcatch&&(t.space(),e.bcatch.print(t)),e.bfinally&&(t.space(),e.bfinally.print(t))}),e(Qe,function(e,t){t.print("catch"),e.argname&&(t.space(),t.with_parens(function(){e.argname.print(t)})),t.space(),s(e,t)}),e(Je,function(e,t){t.print("finally"),t.space(),s(e,t)}),et.DEFMETHOD("_do_print",function(e,t){e.print(t),e.space(),this.definitions.forEach(function(t,n){n&&e.comma(),t.print(e)});var n=e.parent();(!(n instanceof Te||n instanceof be)||n&&n.init!==this)&&e.semicolon()}),e(nt,function(e,t){e._do_print(t,"let")}),e(tt,function(e,t){e._do_print(t,"var")}),e(it,function(e,t){e._do_print(t,"const")}),e(ot,function(e,t){t.print("import"),t.space(),e.imported_name&&e.imported_name.print(t),e.imported_name&&e.imported_names&&(t.print(","),t.space()),e.imported_names&&(1===e.imported_names.length&&"*"===e.imported_names[0].foreign_name.name?e.imported_names[0].print(t):(t.print("{"),e.imported_names.forEach(function(n,i){t.space(),n.print(t),i0&&(e.comma(),e.should_break()&&(e.newline(),e.indent())),t.print(e)})}),e(lt,function(e,t){e._do_print(t)}),e(pt,function(e,t){var n=e.expression;n.print(t);var i=e.property;t.option("ie8")&&b.has(i)?(t.print("["),t.add_mapping(e.end),t.print_string(i),t.print("]")):(n instanceof nn&&n.getValue()>=0&&(/[xa-f.)]/i.test(t.last())||t.print(".")),t.print("."),t.add_mapping(e.end),t.print_name(i))}),e(_t,function(e,t){e.expression.print(t),t.print("["),e.property.print(t),t.print("]")}),e(mt,function(e,t){var n=e.operator;t.print(n),(/^[a-z]/i.test(n)||/[+-]$/.test(n)&&e.expression instanceof mt&&/^[+-]/.test(e.expression.operator))&&t.space(),e.expression.print(t)}),e(Et,function(e,t){e.expression.print(t),t.print(e.operator)}),e(ht,function(e,t){var n=e.operator;e.left.print(t),">"==n[0]&&e.left instanceof Et&&"--"==e.left.operator?t.print(" "):t.space(),t.print(n),("<"==n||"<<"==n)&&e.right instanceof mt&&"!"==e.right.operator&&e.right.expression instanceof mt&&"--"==e.right.expression.operator?t.print(" "):t.space(),e.right.print(t)}),e(Dt,function(e,t){e.condition.print(t),t.space(),t.print("?"),t.space(),e.consequent.print(t),t.space(),t.colon(),e.alternative.print(t)}),e(At,function(e,t){t.with_square(function(){var n=e.elements,i=n.length;i>0&&t.space(),n.forEach(function(e,n){n&&t.comma(),e.print(t),n===i-1&&e instanceof ln&&t.comma()}),i>0&&t.space()})}),e(vt,function(e,t){e.properties.length>0?t.with_block(function(){e.properties.forEach(function(e,n){n&&(t.print(","),t.newline()),t.indent(),e.print(t)}),t.newline()}):a(e,t)}),e(Ft,function(e,t){if(t.print("class"),t.space(),e.name&&(e.name.print(t),t.space()),e.extends){var n=!(e.extends instanceof qt||e.extends instanceof ft||e.extends instanceof Rt||e.extends instanceof Ne);t.print("extends"),n?t.print("("):t.space(),e.extends.print(t),n?t.print(")"):t.space()}e.properties.length>0?t.with_block(function(){e.properties.forEach(function(e,n){n&&t.newline(),t.indent(),e.print(t)}),t.newline()}):t.print("{}")}),e(Nt,function(e,t){t.print("new.target")}),e(bt,function(e,t){function n(e){var t=e.definition();return t?t.mangled_name||t.name:e.name}var i=t.option("shorthand");i&&e.value instanceof wt&&Y(e.key)&&n(e.value)===e.key&&!b.has(e.key)?f(e.key,e.quote,t):i&&e.value instanceof St&&e.value.left instanceof wt&&Y(e.key)&&n(e.value.left)===e.key?(f(e.key,e.quote,t),t.space(),t.print("="),t.space(),e.value.right.print(t)):(e.key instanceof se?t.with_square(function(){e.key.print(t)}):f(e.key,e.quote,t),t.colon(),e.value.print(t))}),Tt.DEFMETHOD("_print_getter_setter",function(e,t){var n=this;n.static&&(t.print("static"),t.space()),e&&(t.print(e),t.space()),n.key instanceof Kt?f(n.key.name,n.quote,t):t.with_square(function(){n.key.print(t)}),n.value._do_print(t,!0)}),e(yt,function(e,t){e._print_getter_setter("set",t)}),e(Ct,function(e,t){e._print_getter_setter("get",t)}),e(Ot,function(e,t){var n;e.is_generator&&e.async?n="async*":e.is_generator?n="*":e.async&&(n="async"),e._print_getter_setter(n,t)}),wt.DEFMETHOD("_do_print",function(e){var t=this.definition();e.print_name(t?t.mangled_name||t.name:this.name)}),e(wt,function(e,t){e._do_print(t)}),e(ln,u),e(Qt,function(e,t){t.print("this")}),e(Jt,function(e,t){t.print("super")}),e(en,function(e,t){t.print(e.getValue())}),e(tn,function(e,n){n.print_string(e.getValue(),e.quote,t)}),e(nn,function(e,t){i&&e.start&&null!=e.start.raw?t.print(e.start.raw):t.print(d(e.getValue()))}),e(rn,function(e,t){t.print(e.getValue()+"n")}),e(on,function(e,t){var n=e.getValue().toString();n=t.to_utf8(n),t.print(n);var i=t.parent();i instanceof ht&&/^in/.test(i.operator)&&i.left===e&&t.print(" ")}),E([se,De,Fe],u),E([At,me,Qe,Ft,en,ce,et,le,Je,Be,Re,ct,vt,he,wt,Ye,qe,Ze],function(e){e.add_mapping(this.start)}),E([Ct,yt],function(e){e.add_mapping(this.start,this.key.name)}),E([Tt],function(e){e.add_mapping(this.start,this.key)})}(),Cn.next_id=1;var On=1,Fn=2;function Mn(e,t){var n=e.enclosed;e:for(;;){var i=Rn(++e.cname);if(!b.has(i)&&!o(i,t.reserved)){for(var r=n.length;--r>=0;){var a=n[r];if(i==(a.mangled_name||a.unmangleable(t)&&a.name))continue e}return i}}}Cn.prototype={unmangleable:function(e){return e||(e={}),this.global&&!e.toplevel||this.export&On||this.undeclared||!e.eval&&this.scope.pinned()||(this.orig[0]instanceof Ut||this.orig[0]instanceof Bt)&&A(e.keep_fnames,this.orig[0].name)||this.orig[0]instanceof Kt||(this.orig[0]instanceof Ht||this.orig[0]instanceof Gt)&&A(e.keep_classnames,this.orig[0].name)},mangle:function(e){var t=e.cache&&e.cache.props;if(this.global&&t&&t.has(this.name))this.mangled_name=t.get(this.name);else if(!this.mangled_name&&!this.unmangleable(e)){var n,i=this.scope,r=this.orig[0];e.ie8&&r instanceof Ut&&(i=i.parent_scope),(n=this.redefined())?this.mangled_name=n.mangled_name||n.name:this.mangled_name=i.next_mangled(e,this),this.global&&t&&t.set(this.name,this.mangled_name)}},redefined:function(){return this.defun&&this.defun.variables.get(this.name)}},Fe.DEFMETHOD("figure_out_scope",function(e){e=s(e,{cache:null,ie8:!1,safari10:!1});var t=this,n=t.parent_scope=null,i=new Map,r=null,o=null,a=[],u=new hn(function(t,s){if(t.is_block_scope()){var c=n;return t.block_scope=n=new Oe(t),n.init_scope_vars(c),t instanceof Oe||(n.uses_with=c.uses_with,n.uses_eval=c.uses_eval,n.directives=c.directives),e.safari10&&(t instanceof Te||t instanceof be)&&a.push(n),s(),n=c,!0}if(t instanceof Ie)return o=t,s(),o=null,!0;if(t instanceof Oe){t.init_scope_vars(n);c=n;var l=r,f=i;return r=n=t,i=new Map,s(),n=c,r=l,i=f,!0}if(t instanceof De){var p=t.label;if(i.has(p.name))throw new Error(m("Label {name} defined twice",p));return i.set(p.name,p),s(),i.delete(p.name),!0}if(t instanceof Ce)for(var _=n;_;_=_.parent_scope)_.uses_with=!0;else{if(t instanceof wt&&(t.scope=n),t instanceof Yt&&(t.thedef=t,t.references=[]),t instanceof Ut)r.def_function(t,"arguments"==t.name?void 0:r);else if(t instanceof Bt)h((t.scope=r.parent_scope.get_defun_scope()).def_function(t,r),1);else if(t instanceof Ht)h(r.def_variable(t,r),1);else if(t instanceof zt)n.def_variable(t);else if(t instanceof Gt)h((t.scope=r.parent_scope).def_function(t,r),1);else if(t instanceof kt||t instanceof Vt||t instanceof Lt){if((d=t instanceof It?n.def_variable(t,null):r.def_variable(t,"SymbolVar"==t.TYPE?null:void 0)).orig.every(e=>e===t||(t instanceof It?e instanceof Ut:!(e instanceof Vt||e instanceof Lt)))||$(t.name+" redeclared",t.start.file,t.start.line,t.start.col,t.start.pos),t instanceof Pt||h(d,2),d.destructuring=o,r!==n){t.mark_enclosed(e);var d=n.find_variable(t);t.thedef!==d&&(t.thedef=d,t.reference(e))}}else if(t instanceof Xt)n.def_variable(t).defun=r;else if(t instanceof Zt){var E=i.get(t.name);if(!E)throw new Error(m("Undefined label {name} [{line},{col}]",{name:t.name,line:t.start.line,col:t.start.col}));t.thedef=E}n instanceof Fe||!(t instanceof at||t instanceof ot)||$(t.TYPE+" statement may only appear at top level",t.start.file,t.start.line,t.start.col,t.start.pos)}function h(e,t){if(o){var n=0;do{t++}while(u.parent(n++)!==o)}var i=u.parent(t);if(e.export=i instanceof at&&On){var r=i.exported_definition;(r instanceof ke||r instanceof Mt)&&i.is_default&&(e.export=Fn)}}});t.walk(u),t.globals=new Map;u=new hn(function(n,i){if(n instanceof He&&n.label)return n.label.thedef.references.push(n),!0;if(n instanceof qt){var r,o=n.name;if("eval"==o&&u.parent()instanceof ut)for(var a=n.scope;a&&!a.uses_eval;a=a.parent_scope)a.uses_eval=!0;return u.parent()instanceof rt&&u.parent(1).module_name||!(r=n.scope.find_variable(o))?(r=t.def_global(n),n instanceof $t&&(r.export=On)):r.scope instanceof Re&&"arguments"==o&&(r.scope.uses_arguments=!0),n.thedef=r,n.reference(e),!n.scope.is_block_scope()||r.orig[0]instanceof It||(n.scope=n.scope.get_defun_scope()),!0}var s;if(n instanceof Xt&&(s=n.definition().redefined()))for(a=n.scope;a&&(d(a.enclosed,s),a!==s.scope);)a=a.parent_scope});if(t.walk(u),(e.ie8||e.safari10)&&t.walk(new hn(function(n,i){if(n instanceof Xt){var r=n.name,o=n.thedef.references,a=n.thedef.defun,s=a.find_variable(r)||t.globals.get(r)||a.def_variable(n);return o.forEach(function(t){t.thedef=s,t.reference(e)}),n.thedef=s,n.reference(e),!0}})),e.safari10)for(var c=0;c0);return n}return a.consider=function(e,n){for(var i=e.length;--i>=0;)t.set(e[i],t.get(e[i])+n)},a.sort=function(){e=h(n,o).concat(h(i,o))},a.reset=r,r(),a}();class wn extends hn{constructor(e,t){super(),void 0===e.defaults||e.defaults||(t=!0),this.options=s(e,{arguments:!1,arrows:!t,booleans:!t,booleans_as_integers:!1,collapse_vars:!t,comparisons:!t,computed_props:!t,conditionals:!t,dead_code:!t,defaults:!0,directives:!t,drop_console:!1,drop_debugger:!t,ecma:5,evaluate:!t,expression:!1,global_defs:!1,hoist_funs:!1,hoist_props:!t,hoist_vars:!1,ie8:!1,if_return:!t,inline:!t,join_vars:!t,keep_classnames:!1,keep_fargs:!0,keep_fnames:!1,keep_infinity:!1,loops:!t,module:!1,negate_iife:!t,passes:1,properties:!t,pure_getters:!t&&"strict",pure_funcs:null,reduce_funcs:!t,reduce_vars:!t,sequences:!t,side_effects:!t,switches:!t,top_retain:null,toplevel:!(!e||!e.top_retain),typeofs:!t,unsafe:!1,unsafe_arrows:!1,unsafe_comps:!1,unsafe_Function:!1,unsafe_math:!1,unsafe_methods:!1,unsafe_proto:!1,unsafe_regexp:!1,unsafe_undefined:!1,unused:!t,warnings:!1},!0);var n=this.options.global_defs;if("object"==typeof n)for(var i in n)"@"===i[0]&&S(n,i)&&(n[i.slice(1)]=re(n[i],{expression:!0}));!0===this.options.inline&&(this.options.inline=3);var r=this.options.pure_funcs;this.pure_funcs="function"==typeof r?r:r?function(e){return!r.includes(e.expression.print_to_string())}:l;var o=this.options.top_retain;o instanceof RegExp?this.top_retain=function(e){return o.test(e.name)}:"function"==typeof o?this.top_retain=o:o&&("string"==typeof o&&(o=o.split(/,/)),this.top_retain=function(e){return o.includes(e.name)}),this.options.module&&(this.directives["use strict"]=!0,this.options.toplevel=!0);var a=this.options.toplevel;this.toplevel="string"==typeof a?{funcs:/funcs/.test(a),vars:/vars/.test(a)}:{funcs:a,vars:a};var u=this.options.sequences;this.sequences_limit=1==u?800:0|u,this.warnings_produced={}}option(e){return this.options[e]}exposed(e){if(e.export)return!0;if(e.global)for(var t=0,n=e.orig.length;t0||this.option("reduce_vars"))&&e.reset_opt_flags(this),e=e.transform(this),t>1){var a=0;if(e.walk(new hn(function(){a++})),this.info("pass "+o+": last_count: "+n+", count: "+a),a=0;){if(!(r[o]instanceof bt))return;n||r[o].key!==t||(n=r[o].value)}}return n instanceof qt&&n.fixed_value()||n}}function n(e,i,r,o,a,s){var u=i.parent(a),c=U(r,u);if(c)return c;if(!s&&u instanceof ut&&u.expression===r&&!(o instanceof xe)&&!(o instanceof Ft)&&!u.is_expr_pure(e)&&(!(o instanceof Ne)||!(u instanceof ct)&&o.contains_this()))return!0;if(u instanceof At)return n(e,i,u,u,a+1);if(u instanceof bt&&r===u.value){var l=i.parent(a+1);return n(e,i,l,l,a+2)}if(u instanceof ft&&u.expression===r){var f=t(o,u.property);return!s&&n(e,i,u,f,a+1)}}function i(e){return e instanceof xe||e instanceof Ne}function r(e){if(e instanceof Qt)return!0;if(e instanceof qt)return e.definition().orig[0]instanceof Ut;if(e instanceof ft){if((e=e.expression)instanceof qt){if(e.is_immutable())return!1;e=e.fixed_value()}return!e||!(e instanceof on)&&(e instanceof en||r(e))}return!1}function a(e,t){if(!(e instanceof qt))return!1;for(var n=e.definition().orig,i=n.length;--i>=0;)if(n[i]instanceof t)return!0}function s(e,t){for(var n,i=0;(n=e.parent(i++))&&!(n instanceof Oe);)if(n instanceof Qe&&n.argname){n=n.argname.definition().scope;break}return n.find_variable(t)}function d(e,t,n){return n||(n={}),t&&(n.start||(n.start=t.start),n.end||(n.end=t.end)),new e(n)}function h(e,t){return 1==t.length?t[0]:d(lt,e,{expressions:t.reduce(b,[])})}function v(e,t){switch(typeof e){case"string":return d(tn,t,{value:e});case"number":return isNaN(e)?d(un,t):isFinite(e)?1/e<0?d(mt,t,{operator:"-",expression:d(nn,t,{value:-e})}):d(nn,t,{value:e}):e<0?d(mt,t,{operator:"-",expression:d(fn,t)}):d(fn,t);case"boolean":return d(e?dn:_n,t);case"undefined":return d(cn,t);default:if(null===e)return d(sn,t,{value:null});if(e instanceof RegExp)return d(on,t,{value:e});throw new Error(m("Can't handle constant of type: {type}",{type:typeof e}))}}function T(e,t,n){return e instanceof mt&&"delete"==e.operator||e instanceof ut&&e.expression===t&&(n instanceof ft||n instanceof qt&&"eval"==n.name)?h(t,[d(nn,t,{value:0}),n]):n}function b(e,t){return t instanceof lt?e.push.apply(e,t.expressions):e.push(t),e}function y(e){if(null===e)return[];if(e instanceof me)return e.body;if(e instanceof Ee)return[];if(e instanceof ue)return[e];throw new Error("Can't convert thing to statement array")}function C(e){return null===e||(e instanceof Ee||e instanceof me&&0==e.body.length)}function O(e){return!(e instanceof Mt||e instanceof ke||e instanceof nt||e instanceof it||e instanceof at||e instanceof ot)}function F(e){return e instanceof ge&&e.body instanceof me?e.body:e}function M(e){return"Call"==e.TYPE&&(e.expression instanceof Ne||M(e.expression))}function R(e){return e instanceof qt&&e.definition().undeclared}e(se,function(e,t){return e}),Fe.DEFMETHOD("drop_console",function(){return this.transform(new Dn(function(e){if("Call"==e.TYPE){var t=e.expression;if(t instanceof ft){for(var n=t.expression;n.expression;)n=n.expression;if(R(n)&&"console"==n.name)return d(cn,e)}}}))}),se.DEFMETHOD("equivalent_to",function(e){return this.TYPE==e.TYPE&&this.print_to_string()==e.print_to_string()}),Oe.DEFMETHOD("process_expression",function(e,t){var n=this,i=new Dn(function(r){if(e&&r instanceof fe)return d(Ue,r,{value:r.body});if(!e&&r instanceof Ue){if(t){var o=r.value&&r.value.drop_side_effect_free(t,!0);return o?d(fe,r,{body:o}):d(Ee,r)}return d(fe,r,{body:r.value||d(mt,r,{operator:"void",expression:d(nn,r,{value:0})})})}if(r instanceof Ft||r instanceof Re&&r!==n)return r;if(r instanceof de){var a=r.body.length-1;a>=0&&(r.body[a]=r.body[a].transform(i))}else r instanceof We?(r.body=r.body.transform(i),r.alternative&&(r.alternative=r.alternative.transform(i))):r instanceof Ce&&(r.body=r.body.transform(i));return r});n.transform(i)}),function(e){function i(e,t){t.assignments=0,t.chained=!1,t.direct_access=!1,t.escaped=!1,t.scope.pinned()?t.fixed=!1:t.orig[0]instanceof Lt||!e.exposed(t)?t.fixed=t.init:t.fixed=!1,t.recursive_refs=0,t.references=[],t.should_replace=void 0,t.single_use=void 0}function r(e,t,n){n.variables.forEach(function(n){i(t,n),null===n.fixed?(n.safe_ids=e.safe_ids,c(e,n,!0)):n.fixed&&(e.loop_ids[n.id]=e.in_loop,c(e,n,!0))})}function o(e,t){t.block_scope&&t.block_scope.variables.forEach(function(t){i(e,t)})}function a(e){e.safe_ids=Object.create(e.safe_ids)}function s(e){e.safe_ids=Object.getPrototypeOf(e.safe_ids)}function c(e,t,n){e.safe_ids[t.id]=n}function l(e,t){if("m"==t.single_use)return!1;if(e.safe_ids[t.id]){if(null==t.fixed){var n=t.orig[0];if(n instanceof Pt||"arguments"==n.name)return!1;t.fixed=d(cn,n)}return!0}return t.fixed instanceof ke}function f(e,t,n){return void 0===t.fixed||(null===t.fixed&&t.safe_ids?(t.safe_ids[t.id]=!1,delete t.safe_ids,!0):!!S(e.safe_ids,t.id)&&(!!l(e,t)&&(!1!==t.fixed&&(!(null!=t.fixed&&(!n||t.references.length>t.assignments))&&t.orig.every(e=>!(e instanceof Lt||e instanceof Bt||e instanceof Ut))))))}function p(e,n,i,r,o,a,s){var u=e.parent(a);if(o){if(o.is_constant())return;if(o instanceof Rt)return}if(u instanceof gt&&"="==u.operator&&r===u.right||u instanceof ut&&(r!==u.expression||u instanceof ct)||u instanceof Ke&&r===u.value&&r.scope!==n.scope||u instanceof st&&r===u.value||u instanceof En&&r===u.value&&r.scope!==n.scope)return!(s>1)||o&&o.is_constant_expression(i)||(s=1),void((!n.escaped||n.escaped>s)&&(n.escaped=s));if(u instanceof At||u instanceof mn||u instanceof ht&&B.has(u.operator)||u instanceof Dt&&r!==u.condition||u instanceof Me||u instanceof lt&&r===u.tail_node())p(e,n,i,u,u,a+1,s);else if(u instanceof bt&&r===u.value){var c=e.parent(a+1);p(e,n,i,c,c,a+2,s)}else if(u instanceof ft&&r===u.expression&&(p(e,n,i,u,o=t(o,u.property),a+1,s+1),o))return;a>0||u instanceof lt&&r!==u.tail_node()||u instanceof fe||(n.direct_access=!0)}e(se,u);var _=new hn(function(e){if(e instanceof wt){var t=e.definition();t&&(e instanceof qt&&t.references.push(e),t.fixed=!1)}});function m(e,t,n){this.inlined=!1;var i=e.safe_ids;return e.safe_ids=Object.create(null),r(e,n,this),t(),e.safe_ids=i,!0}function E(e,t,n){var i,o=this;return o.inlined=!1,a(e),r(e,n,o),o.uses_arguments?(t(),void s(e)):(!o.name&&(i=e.parent())instanceof ut&&i.expression===o&&o.argnames.forEach(function(t,n){if(t.definition){var r=t.definition();r.orig.length>1||(void 0!==r.fixed||o.uses_arguments&&!e.has_directive("use strict")?r.fixed=!1:(r.fixed=function(){return i.args[n]||d(cn,i)},e.loop_ids[r.id]=e.in_loop,c(e,r,!0)))}}),t(),s(e),!0)}e(we,function(e,t,n){return a(e),r(e,n,this),t(),s(e),!0}),e(xe,E),e(gt,function(e,t,i){var r=this;if(r.left instanceof Ie)r.left.walk(_);else{var o=r.left;if(o instanceof qt){var a=o.definition(),s=f(e,a,o.scope,r.right);if(a.assignments++,s){var u=a.fixed;if(u||"="==r.operator){var l="="==r.operator,m=l?r.right:r;if(!n(i,e,r,m,0))return a.references.push(o),l||(a.chained=!0),a.fixed=l?function(){return r.right}:function(){return d(ht,r,{operator:r.operator.slice(0,-1),left:u instanceof se?u:u(),right:r.right})},c(e,a,!1),r.right.walk(e),c(e,a,!0),p(e,a,o.scope,r,m,0,1),!0}}}}}),e(ht,function(e){if(B.has(this.operator))return this.left.walk(e),a(e),this.right.walk(e),s(e),!0}),e(de,function(e,t,n){o(n,this)}),e(je,function(e){return a(e),this.expression.walk(e),s(e),a(e),pe(this,e),s(e),!0}),e(Rt,function(e,t){return this.inlined=!1,a(e),t(),s(e),!0}),e(Dt,function(e){return this.condition.walk(e),a(e),this.consequent.walk(e),s(e),a(e),this.alternative.walk(e),s(e),!0}),e($e,function(e,t){return a(e),t(),s(e),!0}),e(Mt,m),e(ke,m),e(Ae,function(e,t,n){o(n,this);var i=e.in_loop;return e.in_loop=this,a(e),this.body.walk(e),te(this)&&(s(e),a(e)),this.condition.walk(e),s(e),e.in_loop=i,!0}),e(Te,function(e,t,n){o(n,this),this.init&&this.init.walk(e);var i=e.in_loop;return e.in_loop=this,a(e),this.condition&&this.condition.walk(e),this.body.walk(e),this.step&&(te(this)&&(s(e),a(e)),this.step.walk(e)),s(e),e.in_loop=i,!0}),e(be,function(e,t,n){o(n,this),this.init.walk(_),this.object.walk(e);var i=e.in_loop;return e.in_loop=this,a(e),this.body.walk(e),s(e),e.in_loop=i,!0}),e(Ne,E),e(We,function(e){return this.condition.walk(e),a(e),this.body.walk(e),s(e),this.alternative&&(a(e),this.alternative.walk(e),s(e)),!0}),e(De,function(e){return a(e),this.body.walk(e),s(e),!0}),e(Xt,function(){this.definition().fixed=!1}),e(qt,function(e,t,i){var r,o=this.definition();o.references.push(this),1==o.references.length&&!o.fixed&&o.orig[0]instanceof Bt&&(e.loop_ids[o.id]=e.in_loop),void 0!==o.fixed&&l(e,o)?o.fixed&&((r=this.fixed_value())instanceof Re&&ae(e,o)?o.recursive_refs++:r&&!i.exposed(o)&&function(e,t,n){return t.option("unused")&&!n.scope.pinned()&&n.references.length-n.recursive_refs==1&&e.loop_ids[n.id]===e.in_loop}(e,i,o)?o.single_use=r instanceof Re&&!r.pinned()||r instanceof Ft||o.scope===this.scope&&r.is_constant_expression():o.single_use=!1,n(i,e,this,r,0,function(e){return!!e&&(e.is_constant()||e instanceof Re||e instanceof Qt)}(r))&&(o.single_use?o.single_use="m":o.fixed=!1)):o.fixed=!1,p(e,o,this.scope,this,r,0,1)}),e(Fe,function(e,t,n){this.globals.forEach(function(e){i(n,e)}),r(e,n,this)}),e(Ze,function(e,t,n){return o(n,this),a(e),pe(this,e),s(e),this.bcatch&&(a(e),this.bcatch.walk(e),s(e)),this.bfinally&&this.bfinally.walk(e),!0}),e(dt,function(e,t){var n=this;if("++"==n.operator||"--"==n.operator){var i=n.expression;if(i instanceof qt){var r=i.definition(),o=f(e,r,!0);if(r.assignments++,o){var a=r.fixed;if(a)return r.references.push(i),r.chained=!0,r.fixed=function(){return d(ht,n,{operator:n.operator.slice(0,-1),left:d(mt,n,{operator:"+",expression:a instanceof se?a:a()}),right:d(nn,n,{value:1})})},c(e,r,!0),!0}}}}),e(st,function(e,t){var n=this;if(n.name instanceof Ie)n.name.walk(_);else{var i=n.name.definition();if(n.value){if(f(e,i,n.value))return i.fixed=function(){return n.value},e.loop_ids[i.id]=e.in_loop,c(e,i,!1),t(),c(e,i,!0),!0;i.fixed=!1}}}),e(ve,function(e,t,n){o(n,this);var i=e.in_loop;return e.in_loop=this,a(e),t(),s(e),e.in_loop=i,!0})}(function(e,t){e.DEFMETHOD("reduce_vars",t)}),Fe.DEFMETHOD("reset_opt_flags",function(e){var t=this,n=e.option("reduce_vars"),i=new hn(function(r,o){if(r._squeezed=!1,r._optimized=!1,n)return e.top_retain&&(i.parent()===t?r._top=!0:delete r._top),r.reduce_vars(i,o,e)});i.safe_ids=Object.create(null),i.in_loop=null,i.loop_ids=Object.create(null),t.walk(i)}),wt.DEFMETHOD("fixed_value",function(){var e=this.definition().fixed;return!e||e instanceof se?e:e()}),qt.DEFMETHOD("is_immutable",function(){var e=this.definition().orig;return 1==e.length&&e[0]instanceof Ut});var w=D("Array Boolean clearInterval clearTimeout console Date decodeURI decodeURIComponent encodeURI encodeURIComponent Error escape eval EvalError Function isFinite isNaN JSON Math Number parseFloat parseInt RangeError ReferenceError RegExp Object setInterval setTimeout String SyntaxError TypeError unescape URIError");qt.DEFMETHOD("is_declared",function(e){return!this.definition().undeclared||e.option("unsafe")&&w.has(this.name)});var N,x=D("Infinity NaN undefined");function k(e){return e instanceof fn||e instanceof un||e instanceof cn}function I(e,t){var s,u,c=t.find_parent(Oe).get_defun_scope();!function(){var e=t.self(),n=0;do{if(e instanceof Qe||e instanceof Je)n++;else if(e instanceof ge)s=!0;else{if(e instanceof Oe){c=e;break}e instanceof Ze&&(u=!0)}}while(e=t.parent(n++))}();var l,f=10;do{l=!1,m(e),t.option("dead_code")&&g(e,t),t.option("if_return")&&D(e,t),t.sequences_limit>0&&(A(e,t),C(e,t)),t.option("join_vars")&&R(e),t.option("collapse_vars")&&p(e,t)}while(l&&f-- >0);function p(e,t){if(c.pinned())return e;for(var f,p=[],m=e.length,E=new Dn(function(e,n){if(x)return e;if(!N)return e!==D[g]?e:++g=0;){0==m&&t.option("unused")&&X();var D=[];for(z(e[m]);p.length>0;){D=p.pop();var g=0,S=D[D.length-1],A=null,v=null,b=null,y=W(S);if(y&&!r(y)&&!y.has_side_effects(t)){var C=q(S),O=j(y);y instanceof qt&&C.set(y.name,!1);var F=Z(S),M=Q(),R=S.may_throw(t),w=S.name instanceof Pt,N=w,x=!1,I=0,L=!f||!N;if(!L){for(var V=t.self().argnames.lastIndexOf(S.name)+1;!x&&VI)I=!1;else{x=!1,g=0,N=w;for(P=m;!x&&P!(e instanceof Me))){var r=t.has_directive("use strict");r&&!o(r,n.body)&&(r=!1);var a=n.argnames.length;f=e.args.slice(a);for(var s=new Set,u=a;--u>=0;){var c=n.argnames[u],l=e.args[u];if(f.unshift(d(st,c,{name:c,value:l})),!s.has(c.name))if(s.add(c.name),c instanceof Me){var _=e.args.slice(u);_.every(e=>!H(n,e,r))&&p.unshift([d(st,c,{name:c.expression,value:d(At,e,{elements:_})})])}else l?(l instanceof Re&&l.pinned()||H(n,l,r))&&(l=null):l=d(cn,c).transform(t),l&&p.unshift([d(st,c,{name:c,value:l})])}}}function z(e){if(D.push(e),e instanceof gt)e.left.has_side_effects(t)||p.push(D.slice()),z(e.right);else if(e instanceof ht)z(e.left),z(e.right);else if(e instanceof ut)z(e.expression),e.args.forEach(z);else if(e instanceof je)z(e.expression);else if(e instanceof Dt)z(e.condition),z(e.consequent),z(e.alternative);else if(!(e instanceof et)||!t.option("unused")&&e instanceof it)e instanceof Se?(z(e.condition),e.body instanceof de||z(e.body)):e instanceof Ke?e.value&&z(e.value):e instanceof Te?(e.init&&z(e.init),e.condition&&z(e.condition),e.step&&z(e.step),e.body instanceof de||z(e.body)):e instanceof be?(z(e.object),e.body instanceof de||z(e.body)):e instanceof We?(z(e.condition),e.body instanceof de||z(e.body),!e.alternative||e.alternative instanceof de||z(e.alternative)):e instanceof lt?e.expressions.forEach(z):e instanceof fe?z(e.body):e instanceof Ye?(z(e.expression),e.body.forEach(z)):e instanceof dt?"++"!=e.operator&&"--"!=e.operator||p.push(D.slice()):e instanceof st&&e.value&&(p.push(D.slice()),z(e.value));else{var n=e.definitions.length,i=n-200;for(i<0&&(i=0);i1&&!(e.name instanceof Pt)||(r>1?function(e){var t=e.value;if(t instanceof qt&&"arguments"!=t.name){var n=t.definition();if(!n.undeclared)return A=n}}(e):!t.exposed(i))?d(qt,e.name,e.name):void 0}}function Y(e){return e[e instanceof gt?"right":"value"]}function q(e){var i=new Map;if(e instanceof dt)return i;var r=new hn(function(e,o){for(var a=e;a instanceof ft;)a=a.expression;(a instanceof qt||a instanceof Qt)&&i.set(a.name,i.get(a.name)||n(t,r,e,e,0))});return Y(e).walk(r),i}function $(n){if(n.name instanceof Pt){var i=t.parent(),r=t.self().argnames,o=r.indexOf(n.name);if(o<0)i.args.length=Math.min(i.args.length,r.length-1);else{var a=i.args;a[o]&&(a[o]=d(nn,a[o],{value:0}))}return!0}var s=!1;return e[m].transform(new Dn(function(e,t,i){return s?e:e===n||e.body===n?(s=!0,e instanceof st?(e.value=null,e):i?_.skip:null):void 0},function(e){if(e instanceof lt)switch(e.expressions.length){case 0:return null;case 1:return e.expressions[0]}}))}function j(e){for(;e instanceof ft;)e=e.expression;return e instanceof qt&&e.definition().scope===c&&!(s&&(C.has(e.name)||S instanceof dt||S instanceof gt&&"="!=S.operator))}function Z(e){return!(e instanceof dt)&&Y(e).has_side_effects(t)}function Q(){if(F)return!1;if(A)return!0;if(y instanceof qt){var e=y.definition();if(e.references.length-e.replaced==(S instanceof st?1:2))return!0}return!1}function J(e){if(!e.definition)return!0;var t=e.definition();return!(1==t.orig.length&&t.orig[0]instanceof Bt)&&(t.scope.get_defun_scope()!==c||!t.references.every(e=>{var t=e.scope.get_defun_scope();return"Scope"==t.TYPE&&(t=t.parent_scope),t===c}))}}function m(e){for(var t=[],n=0;n=0;){var i=e[n];if(i instanceof We&&i.body instanceof Ue&&++t>1)return!0}return!1}(e),r=n instanceof Re,o=e.length;--o>=0;){var a=e[o],s=g(o),u=e[s];if(r&&!u&&a instanceof Ue){if(!a.value){l=!0,e.splice(o,1);continue}if(a.value instanceof mt&&"void"==a.value.operator){l=!0,e[o]=d(fe,a,{body:a.value.expression});continue}}if(a instanceof We){var c;if(m(c=Z(a.body))){c.label&&E(c.label.thedef.references,c),l=!0,(a=a.clone()).condition=a.condition.negate(t);var f=D(a.body,c);a.body=d(me,a,{body:y(a.alternative).concat(h())}),a.alternative=d(me,a,{body:f}),e[o]=a.transform(t);continue}if(m(c=Z(a.alternative))){c.label&&E(c.label.thedef.references,c),l=!0,(a=a.clone()).body=d(me,a.body,{body:y(a.body).concat(h())});f=D(a.alternative,c);a.alternative=d(me,a.alternative,{body:f}),e[o]=a.transform(t);continue}}if(a instanceof We&&a.body instanceof Ue){var p=a.body.value;if(!p&&!a.alternative&&(r&&!u||u instanceof Ue&&!u.value)){l=!0,e[o]=d(fe,a.condition,{body:a.condition});continue}if(p&&!a.alternative&&u instanceof Ue&&u.value){l=!0,(a=a.clone()).alternative=u,e[o]=a.transform(t),e.splice(s,1);continue}if(p&&!a.alternative&&(!u&&r&&i||u instanceof Ue)){l=!0,(a=a.clone()).alternative=u||d(Ue,a,{value:null}),e[o]=a.transform(t),u&&e.splice(s,1);continue}var _=e[A(o)];if(t.option("sequences")&&r&&!a.alternative&&_ instanceof We&&_.body instanceof Ue&&g(s)==e.length&&u instanceof fe){l=!0,(a=a.clone()).alternative=d(me,u,{body:[u,d(Ue,u,{value:null})]}),e[o]=a.transform(t),e.splice(s,1);continue}}}function m(i){if(!i)return!1;for(var a=o+1,s=e.length;a=0;){var i=e[n];if(!(i instanceof tt&&S(i)))break}return n}}function g(e,t){for(var n,i=t.self(),r=0,o=0,a=e.length;r!e.value)}function A(e,t){if(!(e.length<2)){for(var n=[],i=0,r=0,o=e.length;r=t.sequences_limit&&u();var s=a.body;n.length>0&&(s=s.drop_side_effect_free(t)),s&&b(n,s)}else a instanceof et&&S(a)||a instanceof ke?e[i++]=a:(u(),e[i++]=a)}u(),e.length=i,i!=o&&(l=!0)}function u(){if(n.length){var t=h(n[0],n);e[i++]=d(fe,t,{body:t}),n=[]}}}function v(e,t){if(!(e instanceof me))return e;for(var n=null,i=0,r=e.body.length;i0){var p=u.length;u.push(d(We,a,{condition:a.condition,body:c||d(Ee,a.body),alternative:f})),u.unshift(r,1),[].splice.apply(e,u),o+=p,r+=p+1,i=null,l=!0;continue}}e[r++]=a,i=a instanceof fe?a:null}e.length=r}function M(e,n){if(e instanceof et){var i,r=e.definitions[e.definitions.length-1];if(r.value instanceof vt)if(n instanceof gt?i=[n]:n instanceof lt&&(i=n.expressions.slice()),i){var o=!1;do{var a=i[0];if(!(a instanceof gt))break;if("="!=a.operator)break;if(!(a.left instanceof ft))break;var s=a.left.expression;if(!(s instanceof qt))break;if(r.name.name!=s.name)break;if(!a.right.is_constant_expression(c))break;var u=a.left.property;if(u instanceof se&&(u=u.evaluate(t)),u instanceof se)break;u=""+u;var l=t.option("ecma")<6&&t.has_directive("use strict")?function(e){return e.key!=u&&e.key&&e.key.name!=u}:function(e){return e.key&&e.key.name!=u};if(!r.value.properties.every(l))break;var f=r.value.properties.filter(function(e){return e.key===u})[0];f?f.value=new lt({start:f.start,expressions:[f.value.clone(),a.right.clone()],end:f.end}):r.value.properties.push(d(bt,a,{key:u,value:a.right})),i.shift(),o=!0}while(i.length);return o&&i}}}function R(e){for(var t,n=0,i=-1,r=e.length;n=0;)if(this.properties[n]._dot_throw(e))return!0;return!1}),e(Tt,c),e(Ct,l),e(Me,function(e){return this.expression._dot_throw(e)}),e(Ne,c),e(xe,c),e(Et,c),e(mt,function(){return"void"==this.operator}),e(ht,function(e){return("&&"==this.operator||"||"==this.operator)&&(this.left._dot_throw(e)||this.right._dot_throw(e))}),e(gt,function(e){return"="==this.operator&&this.right._dot_throw(e)}),e(Dt,function(e){return this.consequent._dot_throw(e)||this.alternative._dot_throw(e)}),e(pt,function(e){return!!t(e)&&!(this.expression instanceof Ne&&"prototype"==this.property)}),e(lt,function(e){return this.tail_node()._dot_throw(e)}),e(qt,function(e){if(this.is_undefined)return!0;if(!t(e))return!1;if(R(this)&&this.is_declared(e))return!1;if(this.is_immutable())return!1;var n=this.fixed_value();return!n||n._dot_throw(e)})}(function(e,t){e.DEFMETHOD("_dot_throw",t)}),function(e){const t=D("! delete"),n=D("in instanceof == != === !== < <= >= >");e(se,c),e(mt,function(){return t.has(this.operator)}),e(ht,function(){return n.has(this.operator)||B.has(this.operator)&&this.left.is_boolean()&&this.right.is_boolean()}),e(Dt,function(){return this.consequent.is_boolean()&&this.alternative.is_boolean()}),e(gt,function(){return"="==this.operator&&this.right.is_boolean()}),e(lt,function(){return this.tail_node().is_boolean()}),e(dn,l),e(_n,l)}(function(e,t){e.DEFMETHOD("is_boolean",t)}),function(e){e(se,c),e(nn,l);var t=D("+ - ~ ++ --");e(dt,function(){return t.has(this.operator)});var n=D("- * / % & | ^ << >> >>>");e(ht,function(e){return n.has(this.operator)||"+"==this.operator&&this.left.is_number(e)&&this.right.is_number(e)}),e(gt,function(e){return n.has(this.operator.slice(0,-1))||"="==this.operator&&this.right.is_number(e)}),e(lt,function(e){return this.tail_node().is_number(e)}),e(Dt,function(e){return this.consequent.is_number(e)&&this.alternative.is_number(e)})}(function(e,t){e.DEFMETHOD("is_number",t)}),(N=function(e,t){e.DEFMETHOD("is_string",t)})(se,c),N(tn,l),N(Ve,function(){return 1===this.segments.length}),N(mt,function(){return"typeof"==this.operator}),N(ht,function(e){return"+"==this.operator&&(this.left.is_string(e)||this.right.is_string(e))}),N(gt,function(e){return("="==this.operator||"+="==this.operator)&&this.right.is_string(e)}),N(lt,function(e){return this.tail_node().is_string(e)}),N(Dt,function(e){return this.consequent.is_string(e)&&this.alternative.is_string(e)});var B=D("&& ||"),K=D("delete ++ --");function U(e,t){return t instanceof dt&&K.has(t.operator)?t.expression:t instanceof gt&&t.left===e?e:void 0}function G(e,t){return e.print_to_string().length>t.print_to_string().length?t:e}function H(e,t,n){return(Sn(e)?function(e,t){return G(d(fe,e,{body:e}),d(fe,t,{body:t})).body}:G)(t,n)}function X(e){for(var t of Object.keys(e))e[t]=D(e[t])}!function(e){function t(e,t){e.warn("global_defs "+t.print_to_string()+" redefined [{file}:{line},{col}]",t.start)}Fe.DEFMETHOD("resolve_defines",function(e){return e.option("global_defs")?(this.figure_out_scope({ie8:e.option("ie8")}),this.transform(new Dn(function(n){var i=n._find_defs(e,"");if(i){for(var r,o=0,a=n;(r=this.parent(o++))&&r instanceof ft&&r.expression===a;)a=r;if(!U(a,r))return i;t(e,n)}}))):this}),e(se,u),e(pt,function(e,t){return this.expression._find_defs(e,"."+this.property+t)}),e(xt,function(e){this.global()&&S(e.option("global_defs"),this.name)&&t(e,this)}),e(qt,function(e,t){if(this.global()){var n=e.option("global_defs"),i=this.name+t;return S(n,i)?function e(t,n){if(t instanceof se)return d(t.CTOR,n,t);if(Array.isArray(t))return d(At,n,{elements:t.map(function(t){return e(t,n)})});if(t&&"object"==typeof t){var i=[];for(var r in t)S(t,r)&&i.push(d(bt,n,{key:r,value:e(t[r],n)}));return d(vt,n,{properties:i})}return v(t,n)}(n[i],this):void 0}})}(function(e,t){e.DEFMETHOD("_find_defs",t)});var z=["constructor","toString","valueOf"],W={Array:["indexOf","join","lastIndexOf","slice"].concat(z),Boolean:z,Function:z,Number:["toExponential","toFixed","toPrecision"].concat(z),Object:z,RegExp:["test"].concat(z),String:["charAt","charCodeAt","concat","indexOf","italics","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","trim"].concat(z)};X(W);var $={Array:["isArray"],Math:["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan","atan2","pow","max","min"],Number:["isFinite","isNaN"],Object:["create","getOwnPropertyDescriptor","getOwnPropertyNames","getPrototypeOf","isExtensible","isFrozen","isSealed","keys"],String:["fromCharCode"]};X($),function(e){se.DEFMETHOD("evaluate",function(e){if(!e.option("evaluate"))return this;var t=this._eval(e,1);return!t||t instanceof RegExp?t:"function"==typeof t||"object"==typeof t?this:t});var t=D("! ~ - + void");se.DEFMETHOD("is_constant",function(){return this instanceof en?!(this instanceof on):this instanceof mt&&this.expression instanceof en&&t.has(this.operator)}),e(ue,function(){throw new Error(m("Cannot evaluate a statement [{file}:{line},{col}]",this.start))}),e(Re,f),e(Ft,f),e(se,f),e(en,function(){return this.getValue()}),e(Ve,function(){return 1!==this.segments.length?this:this.segments[0].value}),e(Ne,function(e){if(e.option("unsafe")){var t=function(){};return t.node=this,t.toString=function(){return this.node.print_to_string()},t}return this}),e(At,function(e,t){if(e.option("unsafe")){for(var n=[],i=0,r=this.elements.length;i>":r=n>>o;break;case">>>":r=n>>>o;break;case"==":r=n==o;break;case"===":r=n===o;break;case"!=":r=n!=o;break;case"!==":r=n!==o;break;case"<":r=n":r=n>o;break;case">=":r=n>=o;break;default:return this}return isNaN(r)&&e.find_parent(Ce)?this:r}),e(Dt,function(e,t){var n=this.condition._eval(e,t);if(n===this.condition)return this;var i=n?this.consequent:this.alternative,r=i._eval(e,t);return r===i?this:r}),e(qt,function(e,t){var n,i=this.fixed_value();if(!i)return this;if(S(i,"_eval"))n=i._eval();else{if(this._eval=f,n=i._eval(e,t),delete this._eval,n===i)return this;i._eval=function(){return n}}if(n&&"object"==typeof n){var r=this.definition().escaped;if(r&&t>r)return this}return n});var r={Array:Array,Math:Math,Number:Number,Object:Object,String:String},o={Math:["E","LN10","LN2","LOG2E","LOG10E","PI","SQRT1_2","SQRT2"],Number:["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"]};X(o),e(ft,function(e,t){if(e.option("unsafe")){var n=this.property;if(n instanceof se&&(n=n._eval(e,t))===this.property)return this;var i,a=this.expression;if(R(a)){var s,u="hasOwnProperty"===a.name&&"call"===n&&(s=e.parent()&&e.parent().args)&&s&&s[0]&&s[0].evaluate(e);if(null==(u=u instanceof pt?u.expression:u)||u.thedef&&u.thedef.undeclared)return this.clone();var c=o[a.name];if(!c||!c.has(n))return this;i=r[a.name]}else{if(!(i=a._eval(e,t+1))||i===a||!S(i,n))return this;if("function"==typeof i)switch(n){case"name":return i.node.name?i.node.name.name:"";case"length":return i.node.argnames.length;default:return this}}return i[n]}return this}),e(ut,function(e,t){var n=this.expression;if(e.option("unsafe")&&n instanceof ft){var i,o=n.property;if(o instanceof se&&(o=o._eval(e,t))===n.property)return this;var a=n.expression;if(R(a)){var s="hasOwnProperty"===a.name&&"call"===o&&this.args[0]&&this.args[0].evaluate(e);if(null==(s=s instanceof pt?s.expression:s)||s.thedef&&s.thedef.undeclared)return this.clone();var u=$[a.name];if(!u||!u.has(o))return this;i=r[a.name]}else{if((i=a._eval(e,t+1))===a||!i)return this;var c=W[i.constructor.name];if(!c||!c.has(o))return this}for(var l=[],f=0,p=this.args.length;f=":return r.operator="<",r;case">":return r.operator="<=",r}switch(o){case"==":return r.operator="!=",r;case"!=":return r.operator="==",r;case"===":return r.operator="!==",r;case"!==":return r.operator="===",r;case"&&":return r.operator="||",r.left=r.left.negate(e,i),r.right=r.right.negate(e),n(this,r,i);case"||":return r.operator="&&",r.left=r.left.negate(e,i),r.right=r.right.negate(e),n(this,r,i)}return t(this)})}(function(e,t){e.DEFMETHOD("negate",function(e,n){return t.call(this,e,n)})});var j=D("Boolean decodeURI decodeURIComponent Date encodeURI encodeURIComponent Error escape EvalError isFinite isNaN Number Object parseFloat parseInt RangeError ReferenceError String SyntaxError TypeError unescape URIError");function Z(e){return e&&e.aborts()}ut.DEFMETHOD("is_expr_pure",function(e){if(e.option("unsafe")){var t=this.expression,n=this.args&&this.args[0]&&this.args[0].evaluate(e);if(t.expression&&"hasOwnProperty"===t.expression.name&&(null==n||n.thedef&&n.thedef.undeclared))return!1;if(R(t)&&j.has(t.name))return!0;if(t instanceof pt&&R(t.expression)&&$.hasOwnProperty(t.expression.name)&&$[t.expression.name].has(t.property))return!0}return this.pure||!e.pure_funcs(this)}),se.DEFMETHOD("is_call_pure",c),pt.DEFMETHOD("is_call_pure",function(e){if(!e.option("unsafe"))return;const t=this.expression;let n;return t instanceof At?n=W.Array:t.is_boolean()?n=W.Boolean:t.is_number(e)?n=W.Number:t instanceof on?n=W.RegExp:t.is_string(e)?n=W.String:this.may_throw_on_access(e)||(n=W.Object),n&&n.has(this.property)}),function(e){function t(e,t){for(var n=e.length;--n>=0;)if(e[n].has_side_effects(t))return!0;return!1}e(se,l),e(Ee,c),e(en,c),e(Qt,c),e(de,function(e){return t(this.body,e)}),e(ut,function(e){return!(this.is_expr_pure(e)||this.expression.is_call_pure(e)&&!this.expression.has_side_effects(e))||t(this.args,e)}),e(Ye,function(e){return this.expression.has_side_effects(e)||t(this.body,e)}),e(je,function(e){return this.expression.has_side_effects(e)||t(this.body,e)}),e(Ze,function(e){return t(this.body,e)||this.bcatch&&this.bcatch.has_side_effects(e)||this.bfinally&&this.bfinally.has_side_effects(e)}),e(We,function(e){return this.condition.has_side_effects(e)||this.body&&this.body.has_side_effects(e)||this.alternative&&this.alternative.has_side_effects(e)}),e(De,function(e){return this.body.has_side_effects(e)}),e(fe,function(e){return this.body.has_side_effects(e)}),e(Re,c),e(Ft,c),e(Mt,l),e(ht,function(e){return this.left.has_side_effects(e)||this.right.has_side_effects(e)}),e(gt,l),e(Dt,function(e){return this.condition.has_side_effects(e)||this.consequent.has_side_effects(e)||this.alternative.has_side_effects(e)}),e(dt,function(e){return K.has(this.operator)||this.expression.has_side_effects(e)}),e(qt,function(e){return!this.is_declared(e)}),e(xt,c),e(vt,function(e){return t(this.properties,e)}),e(Tt,function(e){return!!(this.key instanceof bt&&this.key.has_side_effects(e))||this.value.has_side_effects(e)}),e(At,function(e){return t(this.elements,e)}),e(pt,function(e){return this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)}),e(_t,function(e){return this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)||this.property.has_side_effects(e)}),e(lt,function(e){return t(this.expressions,e)}),e(et,function(e){return t(this.definitions,e)}),e(st,function(e){return this.value}),e(Pe,c),e(Ve,function(e){return t(this.segments,e)})}(function(e,t){e.DEFMETHOD("has_side_effects",t)}),function(e){function t(e,t){for(var n=e.length;--n>=0;)if(e[n].may_throw(t))return!0;return!1}e(se,l),e(Ft,c),e(en,c),e(Ee,c),e(Re,c),e(xt,c),e(Qt,c),e(At,function(e){return t(this.elements,e)}),e(gt,function(e){return!!this.right.may_throw(e)||!(!e.has_directive("use strict")&&"="==this.operator&&this.left instanceof qt)&&this.left.may_throw(e)}),e(ht,function(e){return this.left.may_throw(e)||this.right.may_throw(e)}),e(de,function(e){return t(this.body,e)}),e(ut,function(e){return!!t(this.args,e)||!this.is_expr_pure(e)&&(!!this.expression.may_throw(e)||(!(this.expression instanceof Re)||t(this.expression.body,e)))}),e(je,function(e){return this.expression.may_throw(e)||t(this.body,e)}),e(Dt,function(e){return this.condition.may_throw(e)||this.consequent.may_throw(e)||this.alternative.may_throw(e)}),e(et,function(e){return t(this.definitions,e)}),e(pt,function(e){return this.expression.may_throw_on_access(e)||this.expression.may_throw(e)}),e(We,function(e){return this.condition.may_throw(e)||this.body&&this.body.may_throw(e)||this.alternative&&this.alternative.may_throw(e)}),e(De,function(e){return this.body.may_throw(e)}),e(vt,function(e){return t(this.properties,e)}),e(Tt,function(e){return this.value.may_throw(e)}),e(Ue,function(e){return this.value&&this.value.may_throw(e)}),e(lt,function(e){return t(this.expressions,e)}),e(fe,function(e){return this.body.may_throw(e)}),e(_t,function(e){return this.expression.may_throw_on_access(e)||this.expression.may_throw(e)||this.property.may_throw(e)}),e(Ye,function(e){return this.expression.may_throw(e)||t(this.body,e)}),e(qt,function(e){return!this.is_declared(e)}),e(Ze,function(e){return this.bcatch?this.bcatch.may_throw(e):t(this.body,e)||this.bfinally&&this.bfinally.may_throw(e)}),e(dt,function(e){return!("typeof"==this.operator&&this.expression instanceof qt)&&this.expression.may_throw(e)}),e(st,function(e){return!!this.value&&this.value.may_throw(e)})}(function(e,t){e.DEFMETHOD("may_throw",t)}),function(e){function t(e){var t=this,n=!0;return t.walk(new hn(function(i){if(!n)return!0;if(i instanceof qt){if(t.inlined)return n=!1,!0;var r=i.definition();if(o(r,t.enclosed)&&!t.variables.has(r.name)){if(e){var a=e.find_variable(i);if(r.undeclared?!a:a===r)return n="f",!0}n=!1}return!0}return i instanceof Qt&&t instanceof xe?(n=!1,!0):void 0})),n}e(se,c),e(en,l),e(Ft,function(e){return!(this.extends&&!this.extends.is_constant_expression(e))&&t.call(this,e)}),e(Re,t),e(dt,function(){return this.expression.is_constant_expression()}),e(ht,function(){return this.left.is_constant_expression()&&this.right.is_constant_expression()}),e(At,function(){return this.elements.every(e=>e.is_constant_expression())}),e(vt,function(){return this.properties.every(e=>e.is_constant_expression())}),e(Tt,function(){return!(this.key instanceof se)&&this.value.is_constant_expression()})}(function(e,t){e.DEFMETHOD("is_constant_expression",t)}),function(e){function t(){for(var e=0;e1)&&(a.name=null),a instanceof Re&&!(a instanceof we))for(var S=!e.option("keep_fargs"),v=a.argnames,b=v.length;--b>=0;){var y;(y=v[b])instanceof Me&&(y=y.expression),y instanceof St&&(y=y.left),y instanceof Ie||o.has(y.definition().id)?S=!1:(y.__unused=!0,S&&(v.pop(),e[y.unreferenced()?"warn":"info"]("Dropping unused function argument {name} [{file}:{line},{col}]",I(y))))}if((a instanceof ke||a instanceof Mt)&&a!==t){m=a.name.definition();if(!(o.has(m.id)||!n&&m.global))return e[a.name.unreferenced()?"warn":"info"]("Dropping unused function {name} [{file}:{line},{col}]",I(a.name)),m.eliminated++,d(Ee,a)}if(a instanceof et&&!(f instanceof be&&f.init===a)){var F=!(f instanceof Fe||a instanceof tt),M=[],R=[],w=[],N=[];switch(a.definitions.forEach(function(t){t.value&&(t.value=t.value.transform(D));var n=t.name instanceof Ie,r=n?new Cn(null,{name:""}):t.name.definition();if(F&&r.global)return w.push(t);if(!i&&!F||n&&(t.name.names.length||t.name.is_array||1!=e.option("pure_getters"))||o.has(r.id)){if(t.value&&s.has(r.id)&&s.get(r.id)!==t&&(t.value=t.value.drop_side_effect_free(e)),t.name instanceof kt){var c=u.get(r.id);if(c.length>1&&(!t.value||r.orig.indexOf(t.name)>r.eliminated)){if(e.warn("Dropping duplicated definition of variable {name} [{file}:{line},{col}]",I(t.name)),t.value){var l=d(qt,t.name,t.name);r.references.push(l);var f=d(gt,t,{operator:"=",left:l,right:t.value});s.get(r.id)===t&&s.set(r.id,f),N.push(f.transform(D))}return E(c,t),void r.eliminated++}}t.value?(N.length>0&&(w.length>0?(N.push(t.value),t.value=h(t.value,N)):M.push(d(fe,a,{body:h(a,N)})),N=[]),w.push(t)):R.push(t)}else if(r.orig[0]instanceof Xt){(p=t.value&&t.value.drop_side_effect_free(e))&&N.push(p),t.value=null,R.push(t)}else{var p;(p=t.value&&t.value.drop_side_effect_free(e))?(n||e.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]",I(t.name)),N.push(p)):n||e[t.name.unreferenced()?"warn":"info"]("Dropping unused variable {name} [{file}:{line},{col}]",I(t.name)),r.eliminated++}}),(R.length>0||w.length>0)&&(a.definitions=R.concat(w),M.push(a)),N.length>0&&M.push(d(fe,a,{body:h(a,N)})),M.length){case 0:return l?_.skip:d(Ee,a);case 1:return M[0];default:return l?_.splice(M):d(me,a,{body:M})}}if(a instanceof Te)return c(a,this),a.init instanceof me&&(x=a.init,a.init=x.body.pop(),x.body.push(a)),a.init instanceof fe?a.init=a.init.body:C(a.init)&&(a.init=null),x?l?_.splice(x.body):x:a;if(a instanceof De&&a.body instanceof Te){if(c(a,this),a.body instanceof me){var x=a.body;return a.body=x.body.pop(),x.body.push(a),l?_.splice(x.body):x}return a}if(a instanceof me)return c(a,this),l&&a.body.every(O)?_.splice(a.body):a;if(a instanceof Oe){var k=p;return p=a,c(a,this),p=k,a}}function I(e){return{name:e.name,file:e.start.file,line:e.start.line,col:e.start.col}}});t.transform(D)}}function S(e,n){var i,u=r(e);if(u instanceof qt&&!a(e.left,It)&&t.variables.get(u.name)===(i=u.definition()))return e instanceof gt&&(e.right.walk(m),i.chained||e.left.fixed_value()!==e.right||s.set(i.id,e)),!0;if(e instanceof qt)return i=e.definition(),o.has(i.id)||(o.set(i.id,i),(i=i.redefined())&&o.set(i.id,i)),!0;if(e instanceof Oe){var c=p;return p=e,n(),p=c,!0}}}),Oe.DEFMETHOD("hoist_declarations",function(e){var t=this;if(e.has_directive("use asm"))return t;if(!Array.isArray(t.body))return t;var n=e.option("hoist_funs"),i=e.option("hoist_vars");if(n||i){var r=[],o=[],a=new Map,s=0,u=0;t.walk(new hn(function(e){return e instanceof Oe&&e!==t||(e instanceof tt?(++u,!0):void 0)})),i=i&&u>1;var c=new Dn(function(u){if(u!==t){if(u instanceof le)return r.push(u),d(Ee,u);if(n&&u instanceof ke&&!(c.parent()instanceof at)&&c.parent()===t)return o.push(u),d(Ee,u);if(i&&u instanceof tt){u.definitions.forEach(function(e){e.name instanceof Ie||(a.set(e.name.name,e),++s)});var l=u.to_assignments(e),f=c.parent();if(f instanceof be&&f.init===u){if(null==l){var p=u.definitions[0].name;return d(qt,p,p)}return l}return f instanceof Te&&f.init===u?l:l?d(fe,u,{body:l}):d(Ee,u)}if(u instanceof Oe)return u}});if(t=t.transform(c),s>0){var l=[];const e=t instanceof Re,n=e?t.args_as_names():null;if(a.forEach((t,i)=>{e&&n.some(e=>e.name===t.name.name)?a.delete(i):((t=t.clone()).value=null,l.push(t),a.set(i,t))}),l.length>0){for(var f=0;f0&&(u[0].body=s.concat(u[0].body)),e.body=u;n=u[u.length-1];){var _=n.body[n.body.length-1];if(_ instanceof Xe&&t.loopcontrol_target(_)===e&&n.body.pop(),n.body.length||n instanceof je&&(o||n.expression.has_side_effects(t)))break;u.pop()===o&&(o=null)}if(0==u.length)return d(me,e,{body:s.concat(d(fe,e.expression,{body:e.expression}))}).optimize(t);if(1==u.length&&(u[0]===a||u[0]===o)){var m=!1,E=new hn(function(t){if(m||t instanceof Re||t instanceof fe)return!0;t instanceof Xe&&E.loopcontrol_target(t)===e&&(m=!0)});if(e.walk(E),!m){var h,D=u[0].body.slice();return(h=u[0].expression)&&D.unshift(d(fe,h,{body:h})),D.unshift(d(fe,e.expression,{body:e.expression})),d(me,e,{body:D}).optimize(t)}}return e;function g(e,n){n&&!Z(n)?n.body=n.body.concat(e.body):L(t,e,s)}}),e(Ze,function(e,t){if(I(e.body,t),e.bcatch&&e.bfinally&&e.bfinally.body.every(C)&&(e.bfinally=null),t.option("dead_code")&&e.body.every(C)){var n=[];return e.bcatch&&(L(t,e.bcatch,n),n.forEach(function(e){e instanceof et&&e.definitions.forEach(function(e){var t=e.name.definition().redefined();t&&(e.name=e.name.clone(),e.name.thedef=t)})})),e.bfinally&&(n=n.concat(e.bfinally.body)),d(me,e,{body:n}).optimize(t)}return e}),et.DEFMETHOD("remove_initializers",function(){var e=[];this.definitions.forEach(function(t){t.name instanceof xt?(t.value=null,e.push(t)):t.name.walk(new hn(function(n){n instanceof xt&&e.push(d(st,t,{name:n,value:null}))}))}),this.definitions=e}),et.DEFMETHOD("to_assignments",function(e){var t=e.option("reduce_vars"),n=this.definitions.reduce(function(e,n){if(!n.value||n.name instanceof Ie){if(n.value){var i=d(st,n,{name:n.name,value:n.value}),r=d(tt,n,{definitions:[i]});e.push(r)}}else{var o=d(qt,n.name,n.name);e.push(d(gt,n,{operator:"=",left:o,right:n.value})),t&&(o.definition().fixed=!1)}return(n=n.name.definition()).eliminated++,n.replaced--,e},[]);return 0==n.length?null:h(this,n)}),e(et,function(e,t){return 0==e.definitions.length?d(Ee,e):e}),e(ot,function(e,t){return e}),e(ut,function(e,t){var n=e.expression,r=n;Nt(e,t,e.args);var o=e.args.every(e=>!(e instanceof Me));t.option("reduce_vars")&&r instanceof qt&&ie(r=r.fixed_value(),t)&&(r=n);var a=r instanceof Re;if(t.option("unused")&&o&&a&&!r.uses_arguments&&!r.pinned()){for(var s=0,u=0,c=0,l=e.args.length;c=r.argnames.length;if(f||r.argnames[c].__unused){if(S=e.args[c].drop_side_effect_free(t))e.args[s++]=S;else if(!f){e.args[s++]=d(nn,e.args[c],{value:0});continue}}else e.args[s++]=e.args[c];u=s}e.args.length=u}if(t.option("unsafe"))if(R(n))switch(n.name){case"Array":if(1!=e.args.length)return d(At,e,{elements:e.args}).optimize(t);if(e.args[0]instanceof nn&&e.args[0].value<=11){const t=[];for(let n=0;n{var n=e.evaluate(t);return p.push(n),e!==n}))try{return H(t,e,d(on,e,{value:RegExp.apply(RegExp,p)}))}catch(n){t.warn("Error converting {expr} [{file}:{line},{col}]",{expr:e.print_to_string(),file:e.start.file,line:e.start.line,col:e.start.col})}}else if(n instanceof pt)switch(n.property){case"toString":if(0==e.args.length&&!n.expression.may_throw_on_access(t))return d(ht,e,{left:d(tn,e,{value:""}),operator:"+",right:n.expression}).optimize(t);break;case"join":if(n.expression instanceof At)e:{var _;if(!(e.args.length>0&&(_=e.args[0].evaluate(t))===e.args[0])){var m,E=[],D=[];for(c=0,l=n.expression.elements.length;c0&&(E.push(d(tn,e,{value:D.join(_)})),D.length=0),E.push(g))}return D.length>0&&E.push(d(tn,e,{value:D.join(_)})),0==E.length?d(tn,e,{value:""}):1==E.length?E[0].is_string(t)?E[0]:d(ht,E[0],{operator:"+",left:d(tn,e,{value:""}),right:E[0]}):""==_?(m=E[0].is_string(t)||E[1].is_string(t)?E.shift():d(tn,e,{value:""}),E.reduce(function(e,t){return d(ht,t,{operator:"+",left:e,right:t})},m).optimize(t)):((S=e.clone()).expression=S.expression.clone(),S.expression.expression=S.expression.expression.clone(),S.expression.expression.elements=E,H(t,e,S));var S}}break;case"charAt":if(n.expression.is_string(t)){var A=e.args[0],T=A?A.evaluate(t):0;if(T!==A)return d(_t,n,{expression:n.expression,property:v(0|T,A||n)}).optimize(t)}break;case"apply":if(2==e.args.length&&e.args[1]instanceof At)return(V=e.args[1].elements.slice()).unshift(e.args[0]),d(ut,e,{expression:d(pt,n,{expression:n.expression,property:"call"}),args:V}).optimize(t);break;case"call":var b=n.expression;if(b instanceof qt&&(b=b.fixed_value()),b instanceof Re&&!b.contains_this())return(e.args.length?h(this,[e.args[0],d(ut,e,{expression:n.expression,args:e.args.slice(1)})]):d(ut,e,{expression:n.expression,args:[]})).optimize(t)}if(t.option("unsafe_Function")&&R(n)&&"Function"==n.name){if(0==e.args.length)return d(Ne,e,{argnames:[],body:[]}).optimize(t);if(e.args.every(e=>e instanceof tn))try{var y=re(N="n(function("+e.args.slice(0,-1).map(function(e){return e.value}).join(",")+"){"+e.args[e.args.length-1].value+"})"),O={ie8:t.option("ie8")};y.figure_out_scope(O);var F,w=new wn(t.options);(y=y.transform(w)).figure_out_scope(O),Rn.reset(),y.compute_char_frequency(O),y.mangle_names(O),y.walk(new hn(function(e){return!!F||(i(e)?(F=e,!0):void 0)})),F.body instanceof se&&(F.body=[d(Ue,F.body,{value:F.body})]);var N=yn();return me.prototype._codegen.call(F,F,N),e.args=[d(tn,e,{value:F.argnames.map(function(e){return e.print_to_string()}).join(",")}),d(tn,e.args[e.args.length-1],{value:N.get().replace(/^{|}$/g,"")})],e}catch(n){if(!(n instanceof q))throw n;t.warn("Error parsing code passed to new Function [{file}:{line},{col}]",e.args[e.args.length-1].start),t.warn(n.toString())}}var k=a&&r.body;k instanceof se?k=d(Ue,k,{value:k}):k&&(k=k[0]);var I=a&&!r.is_generator&&!r.async,L=t.option("inline")&&!e.is_expr_pure(t);if(L&&k instanceof Ue&&I&&(!(B=k.value)||B.is_constant_expression())){B=B?B.clone(!0):d(cn,e);var V=e.args.concat(B);return h(e,V).optimize(t)}if(I){var P,B,K,U,G=-1;if(L&&o&&!r.uses_arguments&&!r.pinned()&&!(t.parent()instanceof Ft)&&!(r.name&&r instanceof Ne)&&(!(t.find_parent(Re)instanceof xe)||0==r.argnames.length&&(r.body instanceof se||1==r.body.length))&&(B=function(e){var n=r.body instanceof se?[r.body]:r.body,i=n.length;if(t.option("inline")<3)return 1==i&&z(e);e=null;for(var o=0;o!e.value))return!1}else{if(e)return!1;a instanceof Ee||(e=a)}}return z(e)}(k))&&(n===r||t.option("unused")&&1==(P=n.definition()).references.length&&!ae(t,P)&&r.is_constant_expression(n.scope))&&!e.pure&&!r.contains_this()&&function(){var n=new Set;do{if(!(K=t.parent(++G)).is_block_scope()||t.parent(G-1)instanceof Oe||K.block_scope&&K.block_scope.variables.forEach(function(e){n.add(e.name)}),K instanceof Qe)K.argname&&n.add(K.argname.name);else if(K instanceof ge)U=[];else if(K instanceof qt&&K.fixed_value()instanceof Oe)return!1}while(!(K instanceof Oe)||K instanceof xe);var i=!(K instanceof Fe)||t.toplevel.vars,o=t.option("inline");return!(!function(e,t){for(var n=r.body.length,i=0;i=0;){var s=o.definitions[a].name;if(s instanceof Ie||e.has(s.name)||x.has(s.name)||K.var_names().has(s.name))return!1;U&&U.push(s.definition())}}}return!0}(n,o>=3&&i)||!function(e,t){for(var n=0,i=r.argnames.length;n=2&&i)||!function(){var t=new Set,n=new hn(function(e){if(e instanceof Oe){var n=new Set;return e.enclosed.forEach(function(e){n.add(e.name)}),e.variables.forEach(function(e){n.delete(e)}),n.forEach(function(e){t.add(e)}),!0}return!1});if(e.args.forEach(function(e){e.walk(n)}),0==t.size)return!0;for(var i=0,o=r.argnames.length;i=0;){var c=s.definitions[u].name;if(c instanceof Ie||t.has(c.name))return!1}}return!0}()||U&&0!=U.length&&he(r,U))}()&&!(K instanceof Ft))return r._squeezed=!0,h(e,function(){var n=[],i=[];(function(t,n){for(var i=r.argnames.length,o=e.args.length;--o>=i;)n.push(e.args[o]);for(o=i;--o>=0;){var a=r.argnames[o],s=e.args[o];if(a.__unused||!a.name||K.var_names().has(a.name))s&&n.push(s);else{var u=d(kt,a,a);a.definition().orig.push(u),!s&&U&&(s=d(cn,e)),W(t,n,u,s)}}t.reverse(),n.reverse()})(n,i),function(e,t){for(var n=t.length,i=0,o=r.body.length;ie.name!=l.name)){var f=r.variables.get(l.name),p=d(qt,l,l);f.references.push(p),t.splice(n++,0,d(gt,c,{operator:"=",left:p,right:d(cn,l)}))}}}}(n,i),i.push(B),n.length&&(c=K.body.indexOf(t.parent(G-1))+1,K.body.splice(c,0,d(tt,r,{definitions:n})));return i}()).optimize(t);if(t.option("side_effects")&&!(r.body instanceof se)&&r.body.every(C)){V=e.args.concat(d(cn,e));return h(e,V).optimize(t)}}if(t.option("negate_iife")&&t.parent()instanceof fe&&M(e))return e.negate(t,!0);var X=e.evaluate(t);return X!==e?(X=v(X,e).optimize(t),H(t,X,e)):e;function z(t){return t?t instanceof Ue?t.value?t.value.clone(!0):d(cn,e):t instanceof fe?d(mt,t,{operator:"void",expression:t.body.clone(!0)}):void 0:d(cn,e)}function W(t,n,i,r){var o=i.definition();K.variables.set(i.name,o),K.enclosed.push(o),K.var_names().has(i.name)||(K.var_names().add(i.name),t.push(d(st,i,{name:i,value:null})));var a=d(qt,i,i);o.references.push(a),r&&n.push(d(gt,e,{operator:"=",left:a,right:r.clone()}))}}),e(ct,function(e,t){return t.option("unsafe")&&R(e.expression)&&["Object","RegExp","Function","Error","Array"].includes(e.expression.name)?d(ut,e,e).transform(t):e}),e(lt,function(e,t){if(!t.option("side_effects"))return e;var n,i,r=[];n=Sn(t),i=e.expressions.length-1,e.expressions.forEach(function(e,o){o0&&P(r[o],t);)o--;o0)return(n=this.clone()).right=h(this.right,t.slice(o)),(t=t.slice(0,o)).push(n),h(this,t).optimize(e)}}return this});var oe=D("== === != !== * & | ^");function ae(e,t){for(var n,i=0;n=e.parent(i);i++)if(n instanceof Re){var r=n.name;if(r&&r.definition()===t)break}return n}function _e(e,t){return e instanceof qt||e.TYPE===t.TYPE}function he(e,t){var n=!1,i=new hn(function(e){return!!n||(e instanceof qt&&o(e.definition(),t)?n=!0:void 0)}),r=new hn(function(t){if(n)return!0;if(t instanceof Oe&&t!==e){var o=r.parent();if(o instanceof ut&&o.expression===t)return;return t.walk(i),!0}});return e.walk(r),n}e(ht,function(e,t){function n(){return e.left.is_constant()||e.right.is_constant()||!e.left.has_side_effects(t)&&!e.right.has_side_effects(t)}function i(t){if(n()){t&&(e.operator=t);var i=e.left;e.left=e.right,e.right=i}}if(oe.has(e.operator)&&e.right.is_constant()&&!e.left.is_constant()&&(e.left instanceof ht&&ne[e.left.operator]>=ne[e.operator]||i()),e=e.lift_sequences(t),t.option("comparisons"))switch(e.operator){case"===":case"!==":var r=!0;(e.left.is_string(t)&&e.right.is_string(t)||e.left.is_number(t)&&e.right.is_number(t)||e.left.is_boolean()&&e.right.is_boolean()||e.left.equivalent_to(e.right))&&(e.operator=e.operator.substr(0,2));case"==":case"!=":if(!r&&P(e.left,t))e.left=d(sn,e.left);else if(t.option("typeofs")&&e.left instanceof tn&&"undefined"==e.left.value&&e.right instanceof mt&&"typeof"==e.right.operator){var o=e.right.expression;(o instanceof qt?!o.is_declared(t):o instanceof ft&&t.option("ie8"))||(e.right=o,e.left=d(cn,e.left).optimize(t),2==e.operator.length&&(e.operator+="="))}else if(e.left instanceof qt&&e.right instanceof qt&&e.left.definition()===e.right.definition()&&((u=e.left.fixed_value())instanceof At||u instanceof Re||u instanceof vt||u instanceof Ft))return d("="==e.operator[0]?dn:_n,e);break;case"&&":case"||":var a=e.left;if(a.operator==e.operator&&(a=a.right),a instanceof ht&&a.operator==("&&"==e.operator?"!==":"===")&&e.right instanceof ht&&a.operator==e.right.operator&&(P(a.left,t)&&e.right.left instanceof sn||a.left instanceof sn&&P(e.right.left,t))&&!a.right.has_side_effects(t)&&a.right.equivalent_to(e.right.right)){var s=d(ht,e,{operator:a.operator.slice(0,-1),left:d(sn,e),right:a.right});return a!==e.left&&(s=d(ht,e,{operator:e.operator,left:e.left.left,right:s})),s}}var u;if("+"==e.operator&&t.in_boolean_context()){var c=e.left.evaluate(t),l=e.right.evaluate(t);if(c&&"string"==typeof c)return t.warn("+ in boolean context always true [{file}:{line},{col}]",e.start),h(e,[e.right,d(dn,e)]).optimize(t);if(l&&"string"==typeof l)return t.warn("+ in boolean context always true [{file}:{line},{col}]",e.start),h(e,[e.left,d(dn,e)]).optimize(t)}if(t.option("comparisons")&&e.is_boolean()){if(!(t.parent()instanceof ht)||t.parent()instanceof gt){var f=d(mt,e,{operator:"!",expression:e.negate(t,Sn(t))});e=H(t,e,f)}if(t.option("unsafe_comps"))switch(e.operator){case"<":i(">");break;case"<=":i(">=")}}if("+"==e.operator){if(e.right instanceof tn&&""==e.right.getValue()&&e.left.is_string(t))return e.left;if(e.left instanceof tn&&""==e.left.getValue()&&e.right.is_string(t))return e.right;if(e.left instanceof ht&&"+"==e.left.operator&&e.left.left instanceof tn&&""==e.left.left.getValue()&&e.right.is_string(t))return e.left=e.left.right,e.transform(t)}if(t.option("evaluate")){switch(e.operator){case"&&":if(!(c=!!e.left.truthy||!e.left.falsy&&e.left.evaluate(t)))return t.warn("Condition left of && always false [{file}:{line},{col}]",e.start),T(t.parent(),t.self(),e.left).optimize(t);if(!(c instanceof se))return t.warn("Condition left of && always true [{file}:{line},{col}]",e.start),h(e,[e.left,e.right]).optimize(t);if(l=e.right.evaluate(t)){if(!(l instanceof se)){if("&&"==(p=t.parent()).operator&&p.left===t.self()||t.in_boolean_context())return t.warn("Dropping side-effect-free && [{file}:{line},{col}]",e.start),e.left.optimize(t)}}else{if(t.in_boolean_context())return t.warn("Boolean && always false [{file}:{line},{col}]",e.start),h(e,[e.left,d(_n,e)]).optimize(t);e.falsy=!0}if("||"==e.left.operator)if(!(_=e.left.right.evaluate(t)))return d(Dt,e,{condition:e.left.left,consequent:e.right,alternative:e.left.right}).optimize(t);break;case"||":var p,_;if(!(c=!!e.left.truthy||!e.left.falsy&&e.left.evaluate(t)))return t.warn("Condition left of || always false [{file}:{line},{col}]",e.start),h(e,[e.left,e.right]).optimize(t);if(!(c instanceof se))return t.warn("Condition left of || always true [{file}:{line},{col}]",e.start),T(t.parent(),t.self(),e.left).optimize(t);if(l=e.right.evaluate(t)){if(!(l instanceof se)){if(t.in_boolean_context())return t.warn("Boolean || always true [{file}:{line},{col}]",e.start),h(e,[e.left,d(dn,e)]).optimize(t);e.truthy=!0}}else if("||"==(p=t.parent()).operator&&p.left===t.self()||t.in_boolean_context())return t.warn("Dropping side-effect-free || [{file}:{line},{col}]",e.start),e.left.optimize(t);if("&&"==e.left.operator)if((_=e.left.right.evaluate(t))&&!(_ instanceof se))return d(Dt,e,{condition:e.left.left,consequent:e.left.right,alternative:e.right}).optimize(t)}var m=!0;switch(e.operator){case"+":if(e.left instanceof en&&e.right instanceof ht&&"+"==e.right.operator&&e.right.left instanceof en&&e.right.is_string(t)&&(e=d(ht,e,{operator:"+",left:d(tn,e.left,{value:""+e.left.getValue()+e.right.left.getValue(),start:e.left.start,end:e.right.left.end}),right:e.right.right})),e.right instanceof en&&e.left instanceof ht&&"+"==e.left.operator&&e.left.right instanceof en&&e.left.is_string(t)&&(e=d(ht,e,{operator:"+",left:e.left.left,right:d(tn,e.right,{value:""+e.left.right.getValue()+e.right.getValue(),start:e.left.right.start,end:e.right.end})})),e.left instanceof ht&&"+"==e.left.operator&&e.left.is_string(t)&&e.left.right instanceof en&&e.right instanceof ht&&"+"==e.right.operator&&e.right.left instanceof en&&e.right.is_string(t)&&(e=d(ht,e,{operator:"+",left:d(ht,e.left,{operator:"+",left:e.left.left,right:d(tn,e.left.right,{value:""+e.left.right.getValue()+e.right.left.getValue(),start:e.left.right.start,end:e.right.left.end})}),right:e.right.right})),e.right instanceof mt&&"-"==e.right.operator&&e.left.is_number(t)){e=d(ht,e,{operator:"-",left:e.left,right:e.right.expression});break}if(e.left instanceof mt&&"-"==e.left.operator&&n()&&e.right.is_number(t)){e=d(ht,e,{operator:"-",left:e.right,right:e.left.expression});break}case"*":m=t.option("unsafe_math");case"&":case"|":case"^":if(e.left.is_number(t)&&e.right.is_number(t)&&n()&&!(e.left instanceof ht&&e.left.operator!=e.operator&&ne[e.left.operator]>=ne[e.operator])){var E=d(ht,e,{operator:e.operator,left:e.right,right:e.left});e=e.right instanceof en&&!(e.left instanceof en)?H(t,E,e):H(t,e,E)}m&&e.is_number(t)&&(e.right instanceof ht&&e.right.operator==e.operator&&(e=d(ht,e,{operator:e.operator,left:d(ht,e.left,{operator:e.operator,left:e.left,right:e.right.left,start:e.left.start,end:e.right.left.end}),right:e.right.right})),e.right instanceof en&&e.left instanceof ht&&e.left.operator==e.operator&&(e.left.left instanceof en?e=d(ht,e,{operator:e.operator,left:d(ht,e.left,{operator:e.operator,left:e.left.left,right:e.right,start:e.left.left.start,end:e.right.end}),right:e.left.right}):e.left.right instanceof en&&(e=d(ht,e,{operator:e.operator,left:d(ht,e.left,{operator:e.operator,left:e.left.right,right:e.right,start:e.left.right.start,end:e.right.end}),right:e.left.left}))),e.left instanceof ht&&e.left.operator==e.operator&&e.left.right instanceof en&&e.right instanceof ht&&e.right.operator==e.operator&&e.right.left instanceof en&&(e=d(ht,e,{operator:e.operator,left:d(ht,e.left,{operator:e.operator,left:d(ht,e.left.left,{operator:e.operator,left:e.left.right,right:e.right.left,start:e.left.right.start,end:e.right.left.end}),right:e.left.left}),right:e.right.right})))}}if(e.right instanceof ht&&e.right.operator==e.operator&&(B.has(e.operator)||"+"==e.operator&&(e.right.left.is_string(t)||e.left.is_string(t)&&e.right.right.is_string(t))))return e.left=d(ht,e.left,{operator:e.operator,left:e.left,right:e.right.left}),e.right=e.right.right,e.transform(t);var D=e.evaluate(t);return D!==e?(D=v(D,e).optimize(t),H(t,D,e)):e}),e($t,function(e,t){return e}),e(qt,function(e,t){if(!t.option("ie8")&&R(e)&&(!e.scope.uses_with||!t.find_parent(Ce)))switch(e.name){case"undefined":return d(cn,e).optimize(t);case"NaN":return d(un,e).optimize(t);case"Infinity":return d(fn,e).optimize(t)}var n=t.parent();if(t.option("reduce_vars")&&U(e,n)!==e){var r=e.definition();if(t.top_retain&&r.global&&t.top_retain(r))return r.fixed=!1,r.should_replace=!1,r.single_use=!1,e;var o=e.fixed_value(),a=r.single_use&&!(n instanceof ut&&n.is_expr_pure(t));if(a&&(o instanceof Re||o instanceof Ft))if(ie(o,t))a=!1;else if(r.scope!==e.scope&&(!t.option("reduce_funcs")&&o instanceof Re||1==r.escaped||o.inlined||function(e){for(var t,n=0;t=e.parent(n++);){if(t instanceof ue)return!1;if(t instanceof At||t instanceof bt||t instanceof vt)return!0}return!1}(t)))a=!1;else if(ae(t,r))a=!1;else if((r.scope!==e.scope||r.orig[0]instanceof Pt)&&"f"==(a=o.is_constant_expression(e.scope))){var s=e.scope;do{(s instanceof ke||i(s))&&(s.inlined=!0)}while(s=s.parent_scope)}if(a&&o){var u;if(o instanceof Mt&&(o=d(Rt,o,o)),o instanceof ke&&(o._squeezed=!0,o=d(Ne,o,o)),r.recursive_refs>0&&o.name instanceof Bt){var c=(u=o.clone(!0)).name.definition(),l=u.variables.get(u.name.name),f=l&&l.orig[0];f instanceof Ut||((f=d(Ut,u.name,u.name)).scope=u,u.name=f,l=u.def_function(f)),u.walk(new hn(function(e){e instanceof qt&&e.definition()===c&&(e.thedef=l,l.references.push(e))}))}else(u=o.optimize(t))===o&&(u=o.clone(!0));return u}if(o&&void 0===r.should_replace){var p;if(o instanceof Qt)r.orig[0]instanceof Pt||!r.references.every(e=>r.scope===e.scope)||(p=o);else{var _=o.evaluate(t);_===o||!t.option("unsafe_regexp")&&_ instanceof RegExp||(p=v(_,o))}if(p){var m,E=p.optimize(t).print_to_string().length;!function(e){var t;return e.walk(new hn(function(e){if(e instanceof qt&&(t=!0),t)return!0})),t}(o)?(E=Math.min(E,o.print_to_string().length),m=function(){var e=G(p.optimize(t),o);return e===p||e===o?e.clone(!0):e}):m=function(){var e=p.optimize(t);return e===p?e.clone(!0):e};var h=r.name.length,D=0;t.option("unused")&&!t.exposed(r)&&(D=(h+2+E)/(r.references.length-r.assignments)),r.should_replace=E<=h+D&&m}else r.should_replace=!1}if(r.should_replace)return r.should_replace()}return e}),e(cn,function(e,t){if(t.option("unsafe_undefined")){var n=s(t,"undefined");if(n){var i=d(qt,e,{name:"undefined",scope:n.scope,thedef:n});return i.is_undefined=!0,i}}var r=U(t.self(),t.parent());return r&&_e(r,e)?e:d(mt,e,{operator:"void",expression:d(nn,e,{value:0})})}),e(fn,function(e,t){var n=U(t.self(),t.parent());return n&&_e(n,e)?e:!t.option("keep_infinity")||n&&!_e(n,e)||s(t,"Infinity")?d(ht,e,{operator:"/",left:d(nn,e,{value:1}),right:d(nn,e,{value:0})}):e}),e(un,function(e,t){var n=U(t.self(),t.parent());return n&&!_e(n,e)||s(t,"NaN")?d(ht,e,{operator:"/",left:d(nn,e,{value:0}),right:d(nn,e,{value:0})}):e});const ye=D("+ - / * % >> << >>> | ^ &"),Ge=D("* | ^ &");function rt(e,t){return e instanceof qt&&(e=e.fixed_value()),!!e&&(!(e instanceof Re||e instanceof Ft)||t.parent()instanceof ct||!e.contains_this())}function yt(e,t){return t.in_boolean_context()?H(t,e,h(e,[e,d(dn,e)]).optimize(t)):e}function Nt(e,t,n){for(var i=0;i0&&s.args.length==u.args.length&&s.expression.equivalent_to(u.expression)&&!e.condition.has_side_effects(t)&&!s.expression.has_side_effects(t)&&"number"==typeof(o=function(){for(var e=s.args,t=u.args,n=0,i=e.length;n1)&&(p=null)}else if(!p&&!t.option("keep_fargs")&&s=n.argnames.length;)p=d(Pt,n,{name:n.make_var_name("argument_"+n.argnames.length),scope:n}),n.argnames.push(p),n.enclosed.push(n.def_variable(p));if(p){var m=d(qt,e,p);return m.reference({}),delete p.__unused,m}}if(U(e,t.parent()))return e;if(o!==r){var E=e.flatten_object(a,t);E&&(i=e.expression=E.expression,r=e.property=E.property)}if(t.option("properties")&&t.option("side_effects")&&r instanceof nn&&i instanceof At){s=r.getValue();var D=i.elements,g=D[s];e:if(rt(g,t)){for(var S=!0,A=[],T=D.length;--T>s;){(b=D[T].drop_side_effect_free(t))&&(A.unshift(b),S&&b.has_side_effects(t)&&(S=!1))}if(g instanceof Me)break e;for(g=g instanceof ln?d(cn,g):g,S||A.unshift(g);--T>=0;){var b;if((b=D[T])instanceof Me)break e;(b=b.drop_side_effect_free(t))?A.unshift(b):s--}return S?(A.push(g),h(e,A).optimize(t)):d(_t,e,{expression:d(At,i,{elements:A}),property:d(nn,r,{value:s})})}}var y=e.evaluate(t);return y!==e?H(t,y=v(y,e).optimize(t),e):e}),Re.DEFMETHOD("contains_this",function(){var e,t=this;return t.walk(new hn(function(n){return!!e||(n instanceof Qt?e=!0:n!==t&&n instanceof Oe&&!(n instanceof xe)||void 0)})),e}),ft.DEFMETHOD("flatten_object",function(e,t){if(t.option("properties")){var n=t.option("unsafe_arrows")&&t.option("ecma")>=6,i=this.expression;if(i instanceof vt)for(var r=i.properties,o=r.length;--o>=0;){var a=r[o];if(""+(a instanceof Ot?a.key.name:a.key)==e){if(!r.every(e=>e instanceof bt||n&&e instanceof Ot&&!e.is_generator))break;if(!rt(a.value,t))break;return d(_t,this,{expression:d(At,i,{elements:r.map(function(e){var t=e.value;t instanceof we&&(t=d(Ne,t,t));var n=e.key;return n instanceof se&&!(n instanceof Kt)?h(e,[n,t]):t})}),property:d(nn,this,{value:o})})}}}}),e(pt,function(e,t){if("arguments"!=e.property&&"caller"!=e.property||t.warn("Function.prototype.{prop} not supported [{file}:{line},{col}]",{prop:e.property,file:e.start.file,line:e.start.line,col:e.start.col}),U(e,t.parent()))return e;if(t.option("unsafe_proto")&&e.expression instanceof pt&&"prototype"==e.expression.property){var n=e.expression.expression;if(R(n))switch(n.name){case"Array":e.expression=d(At,e.expression,{elements:[]});break;case"Function":e.expression=d(Ne,e.expression,{argnames:[],body:[]});break;case"Number":e.expression=d(nn,e.expression,{value:0});break;case"Object":e.expression=d(vt,e.expression,{properties:[]});break;case"RegExp":e.expression=d(on,e.expression,{value:/t/});break;case"String":e.expression=d(tn,e.expression,{value:""})}}var i=e.flatten_object(e.property,t);if(i)return i.optimize(t);var r=e.evaluate(t);return r!==e?H(t,r=v(r,e).optimize(t),e):e}),e(At,function(e,t){var n=yt(e,t);return n!==e?n:Nt(e,0,e.elements)}),e(vt,function(e,t){var n=yt(e,t);if(n!==e)return n;for(var i=e.properties,r=0;r=6&&!e.name&&!e.is_generator&&!e.uses_arguments&&!e.pinned()){var n=!1;if(e.walk(new hn(function(e){return!!n||(e instanceof Qt?(n=!0,!0):void 0)})),!n)return d(xe,e,e).optimize(t)}return e}),e(Ft,function(e,t){return e}),e(En,function(e,t){return e.expression&&!e.is_star&&P(e.expression,t)&&(e.expression=null),e}),e(Ve,function(e,t){if(!t.option("evaluate")||t.parent()instanceof Le)return e;for(var n=[],i=0;i=6&&(!(n instanceof RegExp)||n.test(e.key+""))){var i=e.key,r=e.value;if((r instanceof xe&&Array.isArray(r.body)&&!r.contains_this()||r instanceof Ne)&&!r.name)return d(Ot,e,{async:r.async,is_generator:r.is_generator,key:i instanceof se?i:d(Kt,e,{name:i}),value:d(we,r,r),quote:e.quote})}return e}),e(Ie,function(e,t){if(1==t.option("pure_getters")&&t.option("unused")&&!e.is_array&&Array.isArray(e.names)&&!function(e){for(var t=[/^VarDef$/,/^(Const|Let|Var)$/,/^Export$/],n=0,i=0,r=t.length;n1)throw new Error("inline source map only works with singular input");t.sourceMap.content=(n=e[f],r=void 0,(r=/(?:^|[^.])\/\/# sourceMappingURL=data:application\/json(;[\w=-]*)?;base64,([+/0-9A-Za-z]*=*)\s*$/.exec(n))?Ln(r[2]):(se.warn("inline source map not found"),null))}c=t.parse.toplevel}a&&"strict"!==t.mangle.properties.keep_quoted&&xn(c,a),t.wrap&&(c=c.wrap_commonjs(t.wrap)),t.enclose&&(c=c.wrap_enclose(t.enclose)),u&&(u.rename=Date.now()),u&&(u.compress=Date.now()),t.compress&&(c=new wn(t.compress).compress(c)),u&&(u.scope=Date.now()),t.mangle&&c.figure_out_scope(t.mangle),u&&(u.mangle=Date.now()),t.mangle&&(Rn.reset(),c.compute_char_frequency(t.mangle),c.mangle_names(t.mangle)),u&&(u.properties=Date.now()),t.mangle&&t.mangle.properties&&(c=In(c,t.mangle.properties)),u&&(u.output=Date.now());var p={};if(t.output.ast&&(p.ast=c),!S(t.output,"code")||t.output.code){if(t.sourceMap&&("string"==typeof t.sourceMap.content&&(t.sourceMap.content=JSON.parse(t.sourceMap.content)),t.output.source_map=function(e){e=s(e,{file:null,root:null,orig:null,orig_line_diff:0,dest_line_diff:0});var t=new i.default.SourceMapGenerator({file:e.file,sourceRoot:e.root}),n=e.orig&&new i.default.SourceMapConsumer(e.orig);return n&&n.sources.forEach(function(e){var i=n.sourceContentFor(e,!0);i&&t.setSourceContent(e,i)}),{add:function(i,r,o,a,s,u){if(n){var c=n.originalPositionFor({line:a,column:s});if(null===c.source)return;i=c.source,a=c.line,s=c.column,u=c.name||u}t.addMapping({generated:{line:r+e.dest_line_diff,column:o},original:{line:a+e.orig_line_diff,column:s},source:i,name:u})},get:function(){return t},toString:function(){return JSON.stringify(t.toJSON())}}}({file:t.sourceMap.filename,orig:t.sourceMap.content,root:t.sourceMap.root}),t.sourceMap.includeSources)){if(e instanceof Fe)throw new Error("original source content unavailable");for(var f in e)S(e,f)&&t.output.source_map.get().setSourceContent(f,e[f])}delete t.output.ast,delete t.output.code;var _=yn(t.output);c.print(_),p.code=_.get(),t.sourceMap&&(p.map=t.output.source_map.toString(),"inline"==t.sourceMap.url?p.code+="\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+Vn(p.map):t.sourceMap.url&&(p.code+="\n//# sourceMappingURL="+t.sourceMap.url))}return t.nameCache&&t.mangle&&(t.mangle.cache&&(t.nameCache.vars=Kn(t.mangle.cache)),t.mangle.properties&&t.mangle.properties.cache&&(t.nameCache.props=Kn(t.mangle.properties.cache))),u&&(u.end=Date.now(),p.timings={parse:.001*(u.rename-u.parse),rename:.001*(u.compress-u.rename),compress:.001*(u.scope-u.compress),scope:.001*(u.mangle-u.scope),mangle:.001*(u.properties-u.mangle),properties:.001*(u.output-u.properties),output:.001*(u.end-u.output),total:.001*(u.end-u.start)}),l.length&&(p.warnings=l),p}catch(e){return{error:e}}finally{se.warn_function=o}}function Gn(e){var t=Un("",e);return t.error&&t.error.defs}!function(){var e=function(e){for(var t=!0,n=0;n2){var n=a[a.length-2];"FunctionDeclaration"!==n.type&&"FunctionExpression"!==n.type&&"ArrowFunctionExpression"!==n.type||(t=St)}return new t({start:i(e),end:r(e),left:s(e.left),operator:"=",right:s(e.right)})},SpreadElement:function(e){return new Me({start:i(e),end:r(e),expression:s(e.argument)})},RestElement:function(e){return new Me({start:i(e),end:r(e),expression:s(e.argument)})},TemplateElement:function(e){return new Pe({start:i(e),end:r(e),value:e.value.cooked,raw:e.value.raw})},TemplateLiteral:function(e){for(var t=[],n=0;n1||e.guardedHandlers&&e.guardedHandlers.length)throw new Error("Multiple catch clauses are not supported.");return new Ze({start:i(e),end:r(e),body:s(e.block).body,bcatch:s(t[0]),bfinally:e.finalizer?new Je(s(e.finalizer)):null})},Property:function(e){var t=e.key,n={start:i(t||e.value),end:r(e.value),key:"Identifier"==t.type?t.name:t.value,value:s(e.value)};return e.computed&&(n.key=s(e.key)),e.method?(n.is_generator=e.value.generator,n.async=e.value.async,e.computed?n.key=s(e.key):n.key=new Kt({name:n.key}),new Ot(n)):"init"==e.kind?("Identifier"!=t.type&&"Literal"!=t.type&&(n.key=s(t)),new bt(n)):("string"!=typeof n.key&&"number"!=typeof n.key||(n.key=new Kt({name:n.key})),n.value=new we(n.value),"get"==e.kind?new Ct(n):"set"==e.kind?new yt(n):"method"==e.kind?(n.async=e.value.async,n.is_generator=e.value.generator,n.quote=e.computed?'"':null,new Ot(n)):void 0)},MethodDefinition:function(e){var t={start:i(e),end:r(e),key:e.computed?s(e.key):new Kt({name:e.key.name||e.key.value}),value:s(e.value),static:e.static};return"get"==e.kind?new Ct(t):"set"==e.kind?new yt(t):(t.is_generator=e.value.generator,t.async=e.value.async,new Ot(t))},ArrayExpression:function(e){return new At({start:i(e),end:r(e),elements:e.elements.map(function(e){return null===e?new ln:s(e)})})},ObjectExpression:function(e){return new vt({start:i(e),end:r(e),properties:e.properties.map(function(e){return"SpreadElement"===e.type?s(e):(e.type="Property",s(e))})})},SequenceExpression:function(e){return new lt({start:i(e),end:r(e),expressions:e.expressions.map(s)})},MemberExpression:function(e){return new(e.computed?_t:pt)({start:i(e),end:r(e),property:e.computed?s(e.property):e.property.name,expression:s(e.object)})},SwitchCase:function(e){return new(e.test?je:$e)({start:i(e),end:r(e),expression:s(e.test),body:e.consequent.map(s)})},VariableDeclaration:function(e){return new("const"===e.kind?it:"let"===e.kind?nt:tt)({start:i(e),end:r(e),definitions:e.declarations.map(s)})},ImportDeclaration:function(e){var t=null,n=null;return e.specifiers.forEach(function(e){"ImportSpecifier"===e.type?(n||(n=[]),n.push(new rt({start:i(e),end:r(e),foreign_name:s(e.imported),name:s(e.local)}))):"ImportDefaultSpecifier"===e.type?t=s(e.local):"ImportNamespaceSpecifier"===e.type&&(n||(n=[]),n.push(new rt({start:i(e),end:r(e),foreign_name:new Wt({name:"*"}),name:s(e.local)})))}),new ot({start:i(e),end:r(e),imported_name:t,imported_names:n,module_name:s(e.source)})},ExportAllDeclaration:function(e){return new at({start:i(e),end:r(e),exported_names:[new rt({name:new jt({name:"*"}),foreign_name:new jt({name:"*"})})],module_name:s(e.source)})},ExportNamedDeclaration:function(e){return new at({start:i(e),end:r(e),exported_definition:s(e.declaration),exported_names:e.specifiers&&e.specifiers.length?e.specifiers.map(function(e){return new rt({foreign_name:s(e.exported),name:s(e.local)})}):null,module_name:s(e.source)})},ExportDefaultDeclaration:function(e){return new at({start:i(e),end:r(e),exported_value:s(e.declaration),is_default:!0})},Literal:function(e){var t=e.value,n={start:i(e),end:r(e)};if(null===t)return new sn(n);var o=e.regex;if(o&&o.pattern){n.value=new RegExp(o.pattern,o.flags);var a=n.value.toString();return n.value.raw_source=o.flags?a.substring(0,a.length-o.flags.length)+o.flags:a,new on(n)}if(o)return n.value=e.regex&&e.raw?e.raw:t,new on(n);switch(typeof t){case"string":return n.value=t,new tn(n);case"number":return n.value=t,new nn(n);case"boolean":return new(t?dn:_n)(n)}},MetaProperty:function(e){if("new"===e.meta.name&&"target"===e.property.name)return new Nt({start:i(e),end:r(e)})},Identifier:function(e){var t=a[a.length-2];return new("LabeledStatement"==t.type?Yt:"VariableDeclarator"==t.type&&t.id===e?"const"==t.kind?Lt:"let"==t.kind?Vt:kt:/Import.*Specifier/.test(t.type)?t.local===e?zt:Wt:"ExportSpecifier"==t.type?t.local===e?$t:jt:"FunctionExpression"==t.type?t.id===e?Ut:Pt:"FunctionDeclaration"==t.type?t.id===e?Bt:Pt:"ArrowFunctionExpression"==t.type?t.params.includes(e)?Pt:qt:"ClassExpression"==t.type?t.id===e?Ht:qt:"Property"==t.type?t.key===e&&t.computed||t.value===e?qt:Kt:"ClassDeclaration"==t.type?t.id===e?Gt:qt:"MethodDefinition"==t.type?t.computed?qt:Kt:"CatchClause"==t.type?Xt:"BreakStatement"==t.type||"ContinueStatement"==t.type?Zt:qt)({start:i(e),end:r(e),name:e.name})},BigIntLiteral:e=>new rn({start:i(e),end:r(e),value:e.value})};function n(e){if("Literal"==e.type)return null!=e.raw?e.raw:e.value+""}function i(e){var t=e.loc,i=t&&t.start,r=e.range;return new ae({file:t&&t.source,line:i&&i.line,col:i&&i.column,pos:r?r[0]:e.start,endline:i&&i.line,endcol:i&&i.column,endpos:r?r[0]:e.start,raw:n(e)})}function r(e){var t=e.loc,i=t&&t.end,r=e.range;return new ae({file:t&&t.source,line:i&&i.line,col:i&&i.column,pos:r?r[1]:e.end,endline:i&&i.line,endcol:i&&i.column,endpos:r?r[1]:e.end,raw:n(e)})}function o(e,n,o){var a="function From_Moz_"+e+"(M){\n";a+="return new U2."+n.name+"({\nstart: my_start_token(M),\nend: my_end_token(M)";var c="function To_Moz_"+e+"(M){\n";c+="return {\ntype: "+JSON.stringify(e),o&&o.split(/\s*,\s*/).forEach(function(e){var t=/([a-z0-9$_]+)([=@>%])([a-z0-9$_]+)/i.exec(e);if(!t)throw new Error("Can't understand property map: "+e);var n=t[1],i=t[2],r=t[3];switch(a+=",\n"+r+": ",c+=",\n"+n+": ",i){case"@":a+="M."+n+".map(from_moz)",c+="M."+r+".map(to_moz)";break;case">":a+="from_moz(M."+n+")",c+="to_moz(M."+r+")";break;case"=":a+="M."+n,c+="M."+r;break;case"%":a+="from_moz(M."+n+").body",c+="to_moz_block(M)";break;default:throw new Error("Can't understand operator in propmap: "+e)}}),a+="\n})\n}",c+="\n}\n}",a=new Function("U2","my_start_token","my_end_token","from_moz","return("+a+")")(gn,i,r,s),c=new Function("to_moz","to_moz_block","to_moz_scope","return("+c+")")(l,p,_),t[e]=a,u(n,c)}t.UpdateExpression=t.UnaryExpression=function(e){return new(("prefix"in e?e.prefix:"UnaryExpression"==e.type)?mt:Et)({start:i(e),end:r(e),operator:e.operator,expression:s(e.argument)})},t.ClassDeclaration=t.ClassExpression=function(e){return new("ClassDeclaration"===e.type?Mt:Rt)({start:i(e),end:r(e),name:s(e.id),extends:s(e.superClass),properties:e.body.body.map(s)})},o("EmptyStatement",Ee),o("BlockStatement",me,"body@body"),o("IfStatement",We,"test>condition, consequent>body, alternate>alternative"),o("LabeledStatement",De,"label>label, body>body"),o("BreakStatement",Xe,"label>label"),o("ContinueStatement",ze,"label>label"),o("WithStatement",Ce,"object>expression, body>body"),o("SwitchStatement",Ye,"discriminant>expression, cases@body"),o("ReturnStatement",Ue,"argument>value"),o("ThrowStatement",Ge,"argument>value"),o("WhileStatement",ve,"test>condition, body>body"),o("DoWhileStatement",Ae,"test>condition, body>body"),o("ForStatement",Te,"init>init, test>condition, update>step, body>body"),o("ForInStatement",be,"left>init, right>object, body>body"),o("ForOfStatement",ye,"left>init, right>object, body>body, await=await"),o("AwaitExpression",mn,"argument>expression"),o("YieldExpression",En,"argument>expression, delegate=is_star"),o("DebuggerStatement",ce),o("VariableDeclarator",st,"id>name, init>value"),o("CatchClause",Qe,"param>argname, body%body"),o("ThisExpression",Qt),o("Super",Jt),o("BinaryExpression",ht,"operator=operator, left>left, right>right"),o("LogicalExpression",ht,"operator=operator, left>left, right>right"),o("AssignmentExpression",gt,"operator=operator, left>left, right>right"),o("ConditionalExpression",Dt,"test>condition, consequent>consequent, alternate>alternative"),o("NewExpression",ct,"callee>expression, arguments@args"),o("CallExpression",ut,"callee>expression, arguments@args"),u(Fe,function(e){return _("Program",e)}),u(Me,function(e,t){return{type:f()?"RestElement":"SpreadElement",argument:l(e.expression)}}),u(Le,function(e){return{type:"TaggedTemplateExpression",tag:l(e.prefix),quasi:l(e.template_string)}}),u(Ve,function(e){for(var t=[],n=[],i=0;i({type:"BigIntLiteral",value:e.value})),pn.DEFMETHOD("to_mozilla_ast",en.prototype.to_mozilla_ast),sn.DEFMETHOD("to_mozilla_ast",en.prototype.to_mozilla_ast),ln.DEFMETHOD("to_mozilla_ast",function(){return null}),de.DEFMETHOD("to_mozilla_ast",me.prototype.to_mozilla_ast),Re.DEFMETHOD("to_mozilla_ast",Ne.prototype.to_mozilla_ast);var a=null;function s(e){a.push(e);var n=null!=e?t[e.type](e):null;return a.pop(),n}function u(e,t){e.DEFMETHOD("to_mozilla_ast",function(e){return n=this,i=t(this,e),r=n.start,o=n.end,null!=r.pos&&null!=o.endpos&&(i.range=[r.pos,o.endpos]),r.line&&(i.loc={start:{line:r.line,column:r.col},end:o.endline?{line:o.endline,column:o.endcol}:null},r.file&&(i.loc.source=r.file)),i;var n,i,r,o})}se.from_mozilla_ast=function(e){var t=a;a=[];var n=s(e);return a=t,n};var c=null;function l(e){null===c&&(c=[]),c.push(e);var t=null!=e?e.to_mozilla_ast(c[c.length-2]):null;return c.pop(),0===c.length&&(c=null),t}function f(){for(var e=c.length;e--;)if(c[e]instanceof Ie)return!0;return!1}function p(e){return{type:"BlockStatement",body:e.body.map(l)}}function _(e,t){var n=t.body.map(l);return t.body[0]instanceof fe&&t.body[0].body instanceof tn&&n.unshift(l(new Ee(t.body[0]))),{type:e,body:n}}}(),e.AST_Accessor=we,e.AST_Array=At,e.AST_Arrow=xe,e.AST_Assign=gt,e.AST_Atom=an,e.AST_Await=mn,e.AST_Binary=ht,e.AST_Block=de,e.AST_BlockStatement=me,e.AST_Boolean=pn,e.AST_Break=Xe,e.AST_Call=ut,e.AST_Case=je,e.AST_Catch=Qe,e.AST_Class=Ft,e.AST_ClassExpression=Rt,e.AST_ConciseMethod=Ot,e.AST_Conditional=Dt,e.AST_Const=it,e.AST_Constant=en,e.AST_Continue=ze,e.AST_DWLoop=Se,e.AST_Debugger=ce,e.AST_DefClass=Mt,e.AST_Default=$e,e.AST_DefaultAssign=St,e.AST_Definitions=et,e.AST_Defun=ke,e.AST_Destructuring=Ie,e.AST_Directive=le,e.AST_Do=Ae,e.AST_Dot=pt,e.AST_EmptyStatement=Ee,e.AST_Exit=Ke,e.AST_Expansion=Me,e.AST_Export=at,e.AST_False=_n,e.AST_Finally=Je,e.AST_For=Te,e.AST_ForIn=be,e.AST_ForOf=ye,e.AST_Function=Ne,e.AST_Hole=ln,e.AST_If=We,e.AST_Import=ot,e.AST_Infinity=fn,e.AST_IterationStatement=ge,e.AST_Jump=Be,e.AST_Label=Yt,e.AST_LabelRef=Zt,e.AST_LabeledStatement=De,e.AST_Lambda=Re,e.AST_Let=nt,e.AST_LoopControl=He,e.AST_NaN=un,e.AST_NameMapping=rt,e.AST_New=ct,e.AST_NewTarget=Nt,e.AST_Node=se,e.AST_Null=sn,e.AST_Number=nn,e.AST_Object=vt,e.AST_ObjectGetter=Ct,e.AST_ObjectKeyVal=bt,e.AST_ObjectProperty=Tt,e.AST_ObjectSetter=yt,e.AST_PrefixedTemplateString=Le,e.AST_PropAccess=ft,e.AST_RegExp=on,e.AST_Return=Ue,e.AST_Scope=Oe,e.AST_Sequence=lt,e.AST_SimpleStatement=fe,e.AST_Statement=ue,e.AST_StatementWithBody=he,e.AST_String=tn,e.AST_Sub=_t,e.AST_Super=Jt,e.AST_Switch=Ye,e.AST_SwitchBranch=qe,e.AST_Symbol=wt,e.AST_SymbolBlockDeclaration=It,e.AST_SymbolCatch=Xt,e.AST_SymbolClass=Ht,e.AST_SymbolConst=Lt,e.AST_SymbolDeclaration=xt,e.AST_SymbolDefClass=Gt,e.AST_SymbolDefun=Bt,e.AST_SymbolExport=$t,e.AST_SymbolExportForeign=jt,e.AST_SymbolFunarg=Pt,e.AST_SymbolImport=zt,e.AST_SymbolImportForeign=Wt,e.AST_SymbolLambda=Ut,e.AST_SymbolLet=Vt,e.AST_SymbolMethod=Kt,e.AST_SymbolRef=qt,e.AST_SymbolVar=kt,e.AST_TemplateSegment=Pe,e.AST_TemplateString=Ve,e.AST_This=Qt,e.AST_Throw=Ge,e.AST_Token=ae,e.AST_Toplevel=Fe,e.AST_True=dn,e.AST_Try=Ze,e.AST_Unary=dt,e.AST_UnaryPostfix=Et,e.AST_UnaryPrefix=mt,e.AST_Undefined=cn,e.AST_Var=tt,e.AST_VarDef=st,e.AST_While=ve,e.AST_With=Ce,e.AST_Yield=En,e.Compressor=wn,e.OutputStream=yn,e.TreeTransformer=Dn,e.TreeWalker=hn,e.base54=Rn,e.default_options=function(){const e={};return Object.keys(Gn({0:0})).forEach(t=>{const n=Gn({[t]:{0:0}});n&&(e[t]=n)}),e},e.defaults=s,e.mangle_properties=In,e.minify=Un,e.parse=re,e.push_uniq=d,e.reserve_quoted_keys=xn,e.string_template=m,e.to_ascii=Ln});