!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=e||self).Terser={},e.sourceMap)}(this,(function(e,t){"use strict";function n(e){return e.split("")}function i(e,t){return t.includes(e)}t=t&&t.hasOwnProperty("default")?t.default:t;class o extends Error{constructor(e,t){super(),this.name="DefaultsError",this.message=e,this.defs=t}}function r(e,t,n){!0===e&&(e={});const i=e||{};if(n)for(const e in i)if(D(i,e)&&!D(t,e))throw new o("`"+e+"` is not a supported option",t);for(const n in t)if(D(t,n))if(e&&D(e,n))if("ecma"===n){let t=0|e[n];t>5&&t<2015&&(t+=2009),i[n]=t}else i[n]=e&&D(e,n)?e[n]:t[n];else i[n]=t[n];return i}function a(){}function s(){return!1}function u(){return!0}function c(){return this}function l(){return null}var f=function(){function e(e,r,a){var s,u=[],c=[];function l(){var l=r(e[s],s),f=l instanceof o;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),o=n.slice(0,i),r=n.slice(i);return function(e,n){for(var i=[],o=0,r=0,a=0;o!?|~^")),R=/[0-9a-f]/i,w=/^0x[0-9a-f]+$/i,x=/^0[0-7]+$/,N=/^0o[0-7]+$/i,k=/^0b[01]+$/i,I=/^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i,L=/^(0[xob])?[0-9a-f]+n$/i,V=E(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","^","*","**","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","/=","*=","**=","%=",">>=","<<=",">>>=","|=","^=","&=","&&","||"]),P=E(n("  \n\r\t\f\v​           \u2028\u2029   \ufeff")),B=E(n("\n\r\u2028\u2029")),K=E(n(";]),:")),U=E(n("[{(,;:")),G=E(n("[]{}(),;:")),H={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 X(e,t){if(z(e.charCodeAt(t))){if(W(e.charCodeAt(t+1)))return e.charAt(t)+e.charAt(t+1)}else if(W(e.charCodeAt(t))&&z(e.charCodeAt(t-1)))return e.charAt(t-1)+e.charAt(t);return e.charAt(t)}function z(e){return e>=55296&&e<=56319}function W(e){return e>=56320&&e<=57343}function Y(e){return e>=48&&e<=57}function q(e){var t=e.charCodeAt(0);return H.ID_Start.test(e)||36==t||95==t}function $(e){var t=e.charCodeAt(0);return H.ID_Continue.test(e)||36==t||95==t||8204==t||8205==t}function j(e){return/^[a-z_$][a-z0-9_$]*$/i.test(e)}function Z(e,t=!0){if(!t&&e.includes("e"))return NaN;if(w.test(e))return parseInt(e.substr(2),16);if(x.test(e))return parseInt(e.substr(1),8);if(N.test(e))return parseInt(e.substr(2),8);if(k.test(e))return parseInt(e.substr(2),2);if(I.test(e))return parseFloat(e);var n=parseFloat(e);return n==e?n:void 0}class J extends Error{constructor(e,t,n,i,o){super(),this.name="SyntaxError",this.message=e,this.filename=t,this.line=n,this.col=i,this.pos=o}}function Q(e,t,n,i,o){throw new J(e,t,n,i,o)}function ee(e,t,n){return e.type==t&&(null==n||e.value==n)}var te={};function ne(e,t,n,i){var o={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 r(){return X(o.text,o.pos)}function a(e,t){var n=X(o.text,o.pos++);if(e&&!n)throw te;return B.has(n)?(o.newline_before=o.newline_before||!t,++o.line,o.col=0,"\r"==n&&"\n"==r()&&(++o.pos,n="\n")):(n.length>1&&(++o.pos,++o.col),++o.col),n}function s(e){for(;e--;)a()}function u(e){return o.text.substr(o.pos,e.length)==e}function c(e,t){var n=o.text.indexOf(e,o.pos);if(t&&-1==n)throw te;return n}function l(){o.tokline=o.line,o.tokcol=o.col,o.tokpos=o.pos}var f=!1,p=null;function _(n,i,r){o.regex_allowed="operator"==n&&!oe.has(i)||"keyword"==n&&F.has(i)||"punc"==n&&U.has(i)||"arrow"==n,"punc"==n&&"."==i?f=!0:r||(f=!1);var a={type:n,value:i,line:o.tokline,col:o.tokcol,pos:o.tokpos,endline:o.line,endcol:o.col,endpos:o.pos,nlb:o.newline_before,file:t};return/^(?:num|string|regexp)$/i.test(n)&&(a.raw=e.substring(a.pos,a.endpos)),r||(a.comments_before=o.comments_before,a.comments_after=o.comments_before=[]),o.newline_before=!1,a=new le(a),r||(p=a),a}function d(){for(;P.has(r());)a()}function m(e){Q(e,t,o.tokline,o.tokcol,o.tokpos)}function h(e){var t=!1,n=!1,i=!1,o="."==e,s=!1,u=function(e){for(var t,n="",i=0;(t=r())&&e(t,i++);)n+=a();return n}((function(r,a){if(s)return!1;switch(r.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!(o||i||t)&&(o=!0)}return"n"===r?(s=!0,!0):R.test(r)}));if(e&&(u=e+u),x.test(u)&&K.has_directive("use strict")&&m("Legacy octal literals are not allowed in strict mode"),u.endsWith("n")){const e=u.slice(0,-1),t=Z(e,!1);if(!o&&L.test(u)&&!isNaN(t))return _("big_int",e);m("Invalid or unexpected token")}var c=Z(u);if(!isNaN(c))return _("num",c);m("Invalid syntax: "+u)}function E(e){return e>="0"&&e<="7"}function g(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("{"==r()){for(a(!0),"}"===r()&&m("Expecting hex-character between {}");"0"==r();)a(!0);var u,l=c("}",!0)-o.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"==r())return a(!0,e),""}if(E(s)){if(n&&t){"0"===s&&!E(r())||m("Octal escape sequences are not allowed in template strings")}return function(e,t){var n=r();n>="0"&&n<="7"&&(e+=a(!0))[0]<="3"&&(n=r())>="0"&&n<="7"&&(e+=a(!0));if("0"===e)return"\0";e.length>0&&K.has_directive("use strict")&&t&&m("Legacy octal escape sequences are not allowed in strict mode");return String.fromCharCode(parseInt(e,8))}(s,t)}return s}function D(e,t){for(var n=0;e>0;--e){if(!t&&isNaN(parseInt(r(),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 S=I("Unterminated string constant",(function(){for(var e=a(),t="";;){var n=a(!0,!0);if("\\"==n)n=g(!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})),v=I("Unterminated template",(function(e){e&&o.template_braces.push(o.brace_counter);var t,n,i="",s="";for(a(!0,!0);"`"!=(t=a(!0,!0));){if("\r"==t)"\n"==r()&&++o.pos,t="\n";else if("$"==t&&"{"==r())return a(!0,!0),o.brace_counter++,(n=_(e?"template_head":"template_substitution",i)).raw=s,n;if(s+=t,"\\"==t){var u=o.pos;t=g(!0,!(p&&("name"===p.type||"punc"===p.type&&(")"===p.value||"]"===p.value))),!0),s+=o.text.substr(u,o.pos-u)}i+=t}return o.template_braces.pop(),(n=_(e?"template_head":"template_substitution",i)).raw=s,n.end=!0,n}));function A(e){var t,n=o.regex_allowed,i=function(){for(var e=o.text,t=o.pos,n=o.text.length;t"===r()?(a(),_("arrow","=>")):N("=");case 96:return v(!0);case 123:o.brace_counter++;break;case 125:if(o.brace_counter--,o.template_braces.length>0&&o.template_braces[o.template_braces.length-1]===o.brace_counter)return v(!1)}if(Y(c))return h();if(G.has(t))return _("punc",a());if(M.has(t))return N();if(92==c||q(t))return E=void 0,E=y(),f?_("name",E):C.has(E)?_("atom",E):b.has(E)?V.has(E)?_("operator",E):_("keyword",E):_("name",E);break}var E;m("Unexpected character '"+t+"'")}return K.next=a,K.peek=r,K.context=function(e){return e&&(o=e),o},K.add_directive=function(e){o.directive_stack[o.directive_stack.length-1].push(e),void 0===o.directives[e]?o.directives[e]=1:o.directives[e]++},K.push_directives_stack=function(){o.directive_stack.push([])},K.pop_directives_stack=function(){for(var e=o.directive_stack[o.directive_stack.length-1],t=0;t0},K}var ie=E(["typeof","void","delete","--","++","!","~","-","+"]),oe=E(["--","++"]),re=E(["=","+=","-=","/=","*=","**=","%=",">>=","<<=",">>>=","|=","^=","&="]),ae=function(e,t){for(var n=0;n","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],{}),se=E(["atom","num","big_int","string","regexp","name"]);function ue(e,t){const n=new Map;t=r(t,{bare_returns:!1,ecma:2017,expression:!1,filename:null,html5_comments:!0,module:!1,shebang:!0,strict:!1,toplevel:null},!0);var i={input:"string"==typeof e?ne(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 o(e,t){return ee(i.token,e,t)}function a(){return i.peeked||(i.peeked=i.input())}function s(){return i.prev=i.token,i.peeked||a(),i.token=i.peeked,i.peeked=null,i.in_directives=i.in_directives&&("string"==i.token.type||o("punc",";")),i.token}function u(){return i.prev}function c(e,t,n,o){var r=i.input.context();Q(e,r.filename,null!=t?t:r.tokline,null!=n?n:r.tokcol,null!=o?o:r.tokpos)}function l(e,t){c(t,e.line,e.col)}function f(e){null==e&&(e=i.token),l(e,"Unexpected token: "+e.type+" ("+e.value+")")}function p(e,t){if(o(e,t))return s();l(i.token,"Unexpected token "+i.token.type+" «"+i.token.value+"», expected "+e+" «"+t+"»")}function _(e){return p("punc",e)}function d(e){return e.nlb||!e.comments_before.every(e=>!e.nlb)}function m(){return!t.strict&&(o("eof")||o("punc","}")||d(i.token))}function h(){return i.in_generator===i.in_function}function E(){return i.in_async===i.in_function}function g(e){o("punc",";")?s():e||m()||f()}function D(){_("(");var e=et(!0);return _(")"),e}function S(e){return function(...t){const n=i.token,o=e(...t);return o.start=n,o.end=u(),o}}function v(){(o("operator","/")||o("operator","/="))&&(i.peeked=null,i.token=i.input(i.token.value.substr(1)))}i.token=s();var A=S((function(e,n,r){switch(v(),i.token.type){case"string":if(i.in_directives){var h=a();!i.token.raw.includes("\\")&&(ee(h,"punc",";")||ee(h,"punc","}")||d(h)||ee(h,"eof"))?i.input.add_directive(i.token.value):i.in_directives=!1}var S=i.in_directives,y=T();return S&&y.body instanceof ln?new de(y.body):y;case"template_head":case"num":case"big_int":case"regexp":case"operator":case"atom":return T();case"name":if("async"==i.token.value&&ee(a(),"keyword","function"))return s(),s(),n&&c("functions are not allowed as the body of a loop"),F(Pe,!1,!0,e);if("import"==i.token.value&&!ee(a(),"punc","(")){s();var C=function(){var e,t,n=u();o("name")&&(e=le(Qt));o("punc",",")&&s();((t=J(!0))||e)&&p("name","from");var r=i.token;"string"!==r.type&&f();return s(),new pt({start:n,imported_name:e,imported_names:t,module_name:new ln({start:r,value:r.value,quote:r.quote,end:r}),end:i.token})}();return g(),C}return ee(a(),"punc",":")?function(){var e=le(tn);"await"===e.name&&E()&&l(i.prev,"await cannot be used as label inside async function");i.labels.some(t=>t.name===e.name)&&c("Label "+e.name+" defined twice");_(":"),i.labels.push(e);var t=A();i.labels.pop(),t instanceof Te||e.references.forEach((function(t){t instanceof $e&&(t=t.label.start,c("Continue label `"+e.name+"` refers to non-IterationStatement.",t.line,t.col,t.pos))}));return new Ae({body:t,label:e})}():T();case"punc":switch(i.token.value){case"{":return new De({start:i.token,body:N(),end:u()});case"[":case"(":return T();case";":return i.in_directives=!1,s(),new Se;default:f()}case"keyword":switch(i.token.value){case"break":return s(),b(qe);case"continue":return s(),b($e);case"debugger":return s(),g(),new _e;case"do":s();var O=St(A);p("keyword","while");var M=D();return g(!0),new be({body:O,condition:M});case"while":return s(),new Ce({condition:D(),body:St((function(){return A(!1,!0)}))});case"for":return s(),function(){var e="`for await` invalid in this context",t=i.token;"name"==t.type&&"await"==t.value?(E()||l(t,e),s()):t=!1;_("(");var n=null;if(o("punc",";"))t&&l(t,e);else{n=o("keyword","var")?(s(),L(!0)):o("keyword","let")?(s(),V(!0)):o("keyword","const")?(s(),P(!0)):et(!0,!0);var r=o("operator","in"),a=o("name","of");if(t&&!a&&l(t,e),r||a)return n instanceof at?n.definitions.length>1&&l(n.start,"Only one variable declaration allowed in for..in loop"):He(n)||(n=Xe(n))instanceof Be||l(n.start,"Invalid left-hand side in for..in loop"),s(),r?function(e){var t=et(!0);return _(")"),new Fe({init:e,object:t,body:St((function(){return A(!1,!0)}))})}(n):function(e,t){var n=e instanceof at?e.definitions[0].name:null,i=et(!0);return _(")"),new Me({await:t,init:e,name:n,object:i,body:St((function(){return A(!1,!0)}))})}(n,!!t)}return function(e){_(";");var t=o("punc",";")?null:et(!0);_(";");var n=o("punc",")")?null:et(!0);return _(")"),new Oe({init:e,condition:t,step:n,body:St((function(){return A(!1,!0)}))})}(n)}();case"class":return s(),n&&c("classes are not allowed as the body of a loop"),r&&c("classes are not allowed as the body of an if"),q(Lt);case"function":return s(),n&&c("functions are not allowed as the body of a loop"),F(Pe,!1,!1,e);case"if":return s(),function(){var e=D(),t=A(!1,!1,!0),n=null;o("keyword","else")&&(s(),n=A(!1,!1,!0));return new Je({condition:e,body:t,alternative:n})}();case"return":0!=i.in_function||t.bare_returns||c("'return' outside of function"),s();var w=null;return o("punc",";")?s():m()||(w=et(!0),g()),new ze({value:w});case"switch":return s(),new Qe({expression:D(),body:St(k)});case"throw":s(),d(i.token)&&c("Illegal newline after 'throw'");w=et(!0);return g(),new We({value:w});case"try":return s(),function(){var e=N(),t=null,n=null;if(o("keyword","catch")){var r=i.token;if(s(),o("punc","{"))var a=null;else{_("(");a=R(void 0,Jt);_(")")}t=new ot({start:r,argname:a,body:N(),end:u()})}if(o("keyword","finally")){r=i.token;s(),n=new rt({start:r,body:N(),end:u()})}t||n||c("Missing catch/finally blocks");return new it({body:e,bcatch:t,bfinally:n})}();case"var":s();C=L();return g(),C;case"let":s();C=V();return g(),C;case"const":s();C=P();return g(),C;case"with":return i.input.has_directive("use strict")&&c("Strict mode may not include a with statement"),s(),new Re({expression:D(),body:A()});case"export":if(!ee(a(),"punc","(")){s();C=function(){var e,t,n,r,c,l=i.token;if(o("keyword","default"))e=!0,s();else if(t=J(!1)){if(o("name","from")){s();var p=i.token;return"string"!==p.type&&f(),s(),new _t({start:l,is_default:e,exported_names:t,module_name:new ln({start:p,value:p.value,quote:p.quote,end:p}),end:u()})}return new _t({start:l,is_default:e,exported_names:t,end:u()})}o("punc","{")||e&&(o("keyword","class")||o("keyword","function"))&&ee(a(),"punc")?(r=et(!1),g()):(n=A(e))instanceof at&&e?f(n.start):n instanceof at||n instanceof ke||n instanceof Lt?c=n:n instanceof me?r=n.body:f(n.start);return new _t({start:l,is_default:e,exported_value:r,exported_definition:c,end:u()})}();return o("punc",";")&&g(),C}}}f()}));function T(e){return new me({body:(e=et(!0),g(),e)})}function b(e){var t,n=null;m()||(n=le(an,!0)),null!=n?((t=i.labels.find(e=>e.name===n.name))||c("Undefined label "+n.name),n.thedef=t):0==i.in_loop&&c(e.TYPE+" not inside a loop or switch"),g();var o=new e({label:n});return t&&t.references.push(o),o}var C=function(e,t,n){d(i.token)&&c("Unexpected newline before arrow (=>)"),p("arrow","=>");var r=x(o("punc","{"),!1,n),a=r instanceof Array&&r.length?r[r.length-1].end:r instanceof Array?e:r.end;return new Ve({start:e,end:a,async:n,argnames:t,body:r})},F=function(e,t,n,i){var r=e===Pe,a=o("operator","*");a&&s();var c=o("name")?le(r?Wt:$t):null;r&&!c&&(i?e=Le:f()),!c||e===Ie||c instanceof Kt||f(u());var l=[],p=x(!0,a||t,n,c,l);return new e({start:l.start,end:p.end,is_generator:a,async:n,name:c,argnames:l,body:p})};function M(e,t){var n=new Set,i=!1,o=!1,r=!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&&l(t,"Unexpected "+t.value+" identifier as parameter inside strict mode");break;default:O.has(t.value)&&f()}},mark_default_assignment:function(e){!1===o&&(o=e)},mark_spread:function(e){!1===r&&(r=e)},mark_strict_mode:function(){a=!0},is_strict:function(){return!1!==o||!1!==r||a},check_strict:function(){s.is_strict()&&!1!==i&&l(i,"Parameter "+i.value+" was used already")}};return s}function R(e,t){var n,r=!1;return void 0===e&&(e=M(!0,i.input.has_directive("use strict"))),o("expand","...")&&(r=i.token,e.mark_spread(i.token),s()),n=w(e,t),o("operator","=")&&!1===r&&(e.mark_default_assignment(i.token),s(),n=new Ct({start:n.start,left:n,operator:"=",right:et(!1),end:i.token})),!1!==r&&(o("punc",")")||f(),n=new Ne({start:r,expression:n,end:r})),e.check_strict(),n}function w(e,t){var n,r=[],l=!0,p=!1,d=i.token;if(void 0===e&&(e=M(!1,i.input.has_directive("use strict"))),t=void 0===t?zt:t,o("punc","[")){for(s();!o("punc","]");){if(l?l=!1:_(","),o("expand","...")&&(p=!0,n=i.token,e.mark_spread(i.token),s()),o("punc"))switch(i.token.value){case",":r.push(new gn({start:i.token,end:i.token}));continue;case"]":break;case"[":case"{":r.push(w(e,t));break;default:f()}else o("name")?(e.add_parameter(i.token),r.push(le(t))):c("Invalid function parameter");o("operator","=")&&!1===p&&(e.mark_default_assignment(i.token),s(),r[r.length-1]=new Ct({start:r[r.length-1].start,left:r[r.length-1],operator:"=",right:et(!1),end:i.token})),p&&(o("punc","]")||c("Rest element must be last element"),r[r.length-1]=new Ne({start:n,expression:r[r.length-1],end:n}))}return _("]"),e.check_strict(),new Be({start:d,names:r,is_array:!0,end:u()})}if(o("punc","{")){for(s();!o("punc","}");){if(l?l=!1:_(","),o("expand","...")&&(p=!0,n=i.token,e.mark_spread(i.token),s()),o("name")&&(ee(a(),"punc")||ee(a(),"operator"))&&[",","}","="].includes(a().value)){e.add_parameter(i.token);var m=u(),h=le(t);p?r.push(new Ne({start:n,expression:h,end:h.end})):r.push(new Rt({start:m,key:h.name,value:h,end:h.end}))}else{if(o("punc","}"))continue;var E=i.token,g=te();null===g?f(u()):"name"!==u().type||o("punc",":")?(_(":"),r.push(new Rt({start:E,quote:E.quote,key:g,value:w(e,t),end:u()}))):r.push(new Rt({start:u(),key:g,value:new t({start:u(),name:g,end:u()}),end:u()}))}p?o("punc","}")||c("Rest element must be last element"):o("operator","=")&&(e.mark_default_assignment(i.token),s(),r[r.length-1].value=new Ct({start:r[r.length-1].value.start,left:r[r.length-1].value,operator:"=",right:et(!1),end:i.token}))}return _("}"),e.check_strict(),new Be({start:d,names:r,is_array:!1,end:u()})}if(o("name"))return e.add_parameter(i.token),le(t);c("Invalid function parameter")}function x(e,n,r,a,u){var c=i.in_loop,l=i.labels,p=i.in_generator,d=i.in_async;if(++i.in_function,n&&(i.in_generator=i.in_function),r&&(i.in_async=i.in_function),u&&function(e){var n=M(!0,i.input.has_directive("use strict"));for(_("(");!o("punc",")");){var r=R(n);if(e.push(r),o("punc",")")||(_(","),o("punc",")")&&t.ecma<2017&&f()),r instanceof Ne)break}s()}(u),e&&(i.in_directives=!0),i.in_loop=0,i.labels=[],e){i.input.push_directives_stack();var m=N();a&&ce(a),u&&u.forEach(ce),i.input.pop_directives_stack()}else m=[new ze({start:i.token,value:et(!1),end:i.token})];return--i.in_function,i.in_loop=c,i.labels=l,i.in_generator=p,i.in_async=d,m}function N(){_("{");for(var e=[];!o("punc","}");)o("eof")&&f(),e.push(A());return s(),e}function k(){_("{");for(var e,t=[],n=null,r=null;!o("punc","}");)o("eof")&&f(),o("keyword","case")?(r&&(r.end=u()),n=[],r=new nt({start:(e=i.token,s(),e),expression:et(!0),body:n}),t.push(r),_(":")):o("keyword","default")?(r&&(r.end=u()),n=[],r=new tt({start:(e=i.token,s(),_(":"),e),body:n}),t.push(r)):(n||f(),n.push(A()));return r&&(r.end=u()),s(),t}function I(e,t){for(var n,r=[];;){var a="var"===t?Ut:"const"===t?Ht:"let"===t?Xt:null;if(o("punc","{")||o("punc","[")?n=new lt({start:i.token,name:w(void 0,a),value:o("operator","=")?(p("operator","="),et(!1,e)):null,end:u()}):"import"==(n=new lt({start:i.token,name:le(a),value:o("operator","=")?(s(),et(!1,e)):e||"const"!==t?null:c("Missing initializer in const declaration"),end:u()})).name.name&&c("Unexpected token: import"),r.push(n),!o("punc",","))break;s()}return r}var L=function(e){return new st({start:u(),definitions:I(e,"var"),end:u()})},V=function(e){return new ut({start:u(),definitions:I(e,"let"),end:u()})},P=function(e){return new ct({start:u(),definitions:I(e,"const"),end:u()})};function B(){var e,t=i.token;switch(t.type){case"name":e=ue(nn);break;case"num":e=new fn({start:t,end:t,value:t.value});break;case"big_int":e=new pn({start:t,end:t,value:t.value});break;case"string":e=new ln({start:t,end:t,value:t.value,quote:t.quote});break;case"regexp":e=new _n({start:t,end:t,value:t.value});break;case"atom":switch(t.value){case"false":e=new vn({start:t,end:t});break;case"true":e=new An({start:t,end:t});break;case"null":e=new mn({start:t,end:t})}}return s(),e}function U(e,t,n,i){var o=function(e,t){return t?new Ct({start:e.start,left:e,operator:"=",right:t,end:t.end}):e};return e instanceof Ft?o(new Be({start:e.start,end:e.end,is_array:!1,names:e.properties.map(U)}),i):e instanceof Rt?(e.value=U(e.value,0,[e.key]),o(e,i)):e instanceof gn?e:e instanceof Be?(e.names=e.names.map(U),o(e,i)):e instanceof nn?o(new zt({name:e.name,start:e.start,end:e.end}),i):e instanceof Ne?(e.expression=U(e.expression),o(e,i)):e instanceof Ot?o(new Be({start:e.start,end:e.end,is_array:!0,names:e.elements.map(U)}),i):e instanceof bt?o(U(e.left,void 0,void 0,e.right),i):e instanceof Ct?(e.left=U(e.left,0,[e.left]),e):void c("Invalid function parameter",e.start.line,e.start.col)}var G=function(e,r){if(o("operator","new"))return function(e){var n=i.token;if(p("operator","new"),o("punc","."))return s(),p("name","target"),he(new Bt({start:n,end:u()}),e);var r,a=G(!1);o("punc","(")?(s(),r=X(")",t.ecma>=2017)):r=[];var c=new mt({start:n,expression:a,args:r,end:u()});return pe(c),he(c,e)}(e);var c,l=i.token,d=o("name","async")&&"["!=(c=a()).value&&"arrow"!=c.type&&B();if(o("punc")){switch(i.token.value){case"(":if(d&&!e)break;var m=function(e,n){var r,a,c,l=[];for(_("(");!o("punc",")");)r&&f(r),o("expand","...")?(r=i.token,n&&(a=i.token),s(),l.push(new Ne({start:u(),expression:et(),end:i.token}))):l.push(et()),o("punc",")")||(_(","),o("punc",")")&&(t.ecma<2017&&f(),c=u(),n&&(a=c)));return _(")"),e&&o("arrow","=>")?r&&c&&f(c):a&&f(a),l}(r,!d);if(r&&o("arrow","=>"))return C(l,m.map(U),!!d);var h=d?new dt({expression:d,args:m}):1==m.length?m[0]:new ht({expressions:m});if(h.start){const e=l.comments_before.length;if(n.set(l,e),h.start.comments_before.unshift(...l.comments_before),l.comments_before=h.start.comments_before,0==e&&l.comments_before.length>0){var E=l.comments_before[0];E.nlb||(E.nlb=l.nlb,l.nlb=!1)}l.comments_after=h.start.comments_after}h.start=l;var g=u();return h.end&&(g.comments_before=h.end.comments_before,h.end.comments_after.push(...g.comments_after),g.comments_after=h.end.comments_after),h.end=g,h instanceof dt&&pe(h),he(h,e);case"[":return he(z(),e);case"{":return he(Y(),e)}d||f()}if(r&&o("name")&&ee(a(),"arrow")){var D=new zt({name:i.token.value,start:l,end:l});return s(),C(l,[D],!!d)}if(o("keyword","function")){s();var S=F(Le,!1,!!d);return S.start=l,S.end=u(),he(S,e)}if(d)return he(d,e);if(o("keyword","class")){s();var v=q(Vt);return v.start=l,v.end=u(),he(v,e)}return o("template_head")?he(H(),e):se.has(i.token.type)?he(B(),e):void f()};function H(){var e=[],t=i.token;for(e.push(new Ge({start:i.token,raw:i.token.raw,value:i.token.value,end:i.token}));!i.token.end;)s(),v(),e.push(et(!0)),ee("template_substitution")||f(),e.push(new Ge({start:i.token,raw:i.token.raw,value:i.token.value,end:i.token}));return s(),new Ue({start:t,segments:e,end:i.token})}function X(e,t,n){for(var r=!0,a=[];!o("punc",e)&&(r?r=!1:_(","),!t||!o("punc",e));)o("punc",",")&&n?a.push(new gn({start:i.token,end:i.token})):o("expand","...")?(s(),a.push(new Ne({start:u(),expression:et(),end:i.token}))):a.push(et(!1));return s(),a}var z=S((function(){return _("["),new Ot({elements:X("]",!t.strict,!0)})})),W=S((e,t)=>F(Ie,e,t)),Y=S((function(){var e=i.token,n=!0,r=[];for(_("{");!o("punc","}")&&(n?n=!1:_(","),t.strict||!o("punc","}"));)if("expand"!=(e=i.token).type){var a,c=te();if(o("punc",":"))null===c?f(u()):(s(),a=et(!1));else{var l=$(c,e);if(l){r.push(l);continue}a=new nn({start:u(),name:c,end:u()})}o("operator","=")&&(s(),a=new bt({start:e,left:a,operator:"=",right:et(!1),end:u()})),r.push(new Rt({start:e,quote:e.quote,key:c instanceof fe?c:""+c,value:a,end:u()}))}else s(),r.push(new Ne({start:e,expression:et(!1),end:u()}));return s(),new Ft({properties:r})}));function q(e){var t,n,r,a,c=[];for(i.input.push_directives_stack(),i.input.add_directive("use strict"),"name"==i.token.type&&"extends"!=i.token.value&&(r=le(e===Lt?jt:Zt)),e!==Lt||r||f(),"extends"==i.token.value&&(s(),a=et(!0)),_("{");o("punc",";");)s();for(;!o("punc","}");)for(t=i.token,(n=$(te(),t,!0))||f(),c.push(n);o("punc",";");)s();return i.input.pop_directives_stack(),s(),new e({start:t,name:r,extends:a,properties:c,end:u()})}function $(e,t,n){var r=function(e,t){return"string"==typeof e||"number"==typeof e?new Yt({start:t,name:""+e,end:u()}):(null===e&&f(),e)};var a=!1,c=!1,l=!1,p=t;if(n&&"static"===e&&!o("punc","(")&&(c=!0,p=i.token,e=te()),"async"!==e||o("punc","(")||o("punc",",")||o("punc","}")||o("operator","=")||(a=!0,p=i.token,e=te()),null===e&&(l=!0,p=i.token,null===(e=te())&&f()),o("punc","("))return e=r(e,t),new Nt({start:t,static:c,is_generator:l,async:a,key:e,quote:e instanceof Yt?p.quote:void 0,value:W(l,a),end:u()});const _=i.token;if("get"==e){if(!o("punc")||o("punc","["))return e=r(te(),t),new xt({start:t,static:c,key:e,quote:e instanceof Yt?_.quote:void 0,value:W(),end:u()})}else if("set"==e&&(!o("punc")||o("punc","[")))return e=r(te(),t),new wt({start:t,static:c,key:e,quote:e instanceof Yt?_.quote:void 0,value:W(),end:u()});if(n){const n=(e=>"string"==typeof e||"number"==typeof e?new qt({start:p,end:p,name:""+e}):(null===e&&f(),e))(e),i=n instanceof qt?p.quote:void 0;if(o("operator","="))return s(),new It({start:t,static:c,quote:i,key:n,value:et(!1),end:u()});if(o("name")||o("punc",";")||o("punc","}"))return new It({start:t,static:c,quote:i,key:n,end:u()})}}function j(e){function t(e){return new e({name:te(),start:u(),end:u()})}var n,r,a=e?en:rn,c=e?Qt:on,l=i.token;return e?n=t(a):r=t(c),o("name","as")?(s(),e?r=t(c):n=t(a)):e?r=new c(n):n=new a(r),new ft({start:l,foreign_name:n,name:r,end:u()})}function Z(e,t){var n,o=e?en:rn,r=e?Qt:on,a=i.token,s=u();return t=t||new r({name:"*",start:a,end:s}),n=new o({name:"*",start:a,end:s}),new ft({start:a,foreign_name:n,name:t,end:s})}function J(e){var t;if(o("punc","{")){for(s(),t=[];!o("punc","}");)t.push(j(e)),o("punc",",")&&s();s()}else if(o("operator","*")){var n;s(),e&&o("name","as")&&(s(),n=le(e?Qt:rn)),t=[Z(e,n)]}return t}function te(){var e=i.token;switch(e.type){case"punc":if("["===e.value){s();var t=et(!1);return _("]"),t}f(e);case"operator":if("*"===e.value)return s(),null;["delete","in","instanceof","new","typeof","void"].includes(e.value)||f(e);case"name":"yield"==e.value&&(h()?l(e,"Yield cannot be used as identifier inside generators"):ee(a(),"punc",":")||ee(a(),"punc","(")||!i.input.has_directive("use strict")||l(e,"Unexpected yield identifier inside strict mode"));case"string":case"num":case"big_int":case"keyword":case"atom":return s(),e.value;default:f(e)}}function ue(e){var t=i.token.value;return new("this"==t?sn:"super"==t?un:e)({name:String(t),start:i.token,end:i.token})}function ce(e){var t=e.name;h()&&"yield"==t&&l(e.start,"Yield cannot be used as identifier inside generators"),i.input.has_directive("use strict")&&("yield"==t&&l(e.start,"Unexpected yield identifier inside strict mode"),e instanceof Kt&&("arguments"==t||"eval"==t)&&l(e.start,"Unexpected "+t+" in strict mode"))}function le(e,t){if(!o("name"))return t||c("Name expected"),null;var n=ue(e);return ce(n),s(),n}function pe(e){var t=e.start,i=t.comments_before;const o=n.get(t);for(var r=null!=o?o:i.length;--r>=0;){var a=i[r];if(/[@#]__/.test(a.value)){if(/[@#]__PURE__/.test(a.value)){y(e,Fn);break}if(/[@#]__INLINE__/.test(a.value)){y(e,Mn);break}if(/[@#]__NOINLINE__/.test(a.value)){y(e,Rn);break}}}}var he=function(e,t){var n,r=e.start;if(o("punc","."))return s(),he(new gt({start:r,expression:e,property:(n=i.token,"name"!=n.type&&f(),s(),n.value),end:u()}),t);if(o("punc","[")){s();var a=et(!0);return _("]"),he(new Dt({start:r,expression:e,property:a,end:u()}),t)}if(t&&o("punc","(")){s();var c=new dt({start:r,expression:e,args:Ee(),end:u()});return pe(c),he(c,!0)}return o("template_head")?he(new Ke({start:r,prefix:e,template_string:H(),end:u()}),t):e};function Ee(){for(var e=[];!o("punc",")");)o("expand","...")?(s(),e.push(new Ne({start:u(),expression:et(!1),end:u()}))):e.push(et(!1)),o("punc",")")||(_(","),o("punc",")")&&t.ecma<2017&&f());return s(),e}var ge=function(e,t){var n=i.token;if("name"==n.type&&"await"==n.value){if(E())return s(),E()||c("Unexpected await expression outside async function",i.prev.line,i.prev.col,i.prev.pos),new je({start:u(),end:i.token,expression:ge(!0)});i.input.has_directive("use strict")&&l(i.token,"Unexpected await identifier inside strict mode")}if(o("operator")&&ie.has(n.value)){s(),v();var r=ve(vt,n,ge(e));return r.start=n,r.end=u(),r}for(var a=G(e,t);o("operator")&&oe.has(i.token.value)&&!d(i.token);)a instanceof Ve&&f(),(a=ve(At,i.token,a)).start=n,a.end=i.token,s();return a};function ve(e,t,n){var o=t.value;switch(o){case"++":case"--":He(n)||c("Invalid use of "+o+" operator",t.line,t.col,t.pos);break;case"delete":n instanceof nn&&i.input.has_directive("use strict")&&c("Calling delete on expression not allowed in strict mode",n.start.line,n.start.col,n.start.pos)}return new e({operator:o,expression:n})}var ye=function(e,t,n){var r=o("operator")?i.token.value:null;"in"==r&&n&&(r=null),"**"==r&&e instanceof vt&&!ee(e.start,"punc","(")&&"--"!==e.operator&&"++"!==e.operator&&f(e.start);var a=null!=r?ae[r]:null;if(null!=a&&(a>t||"**"===r&&t===a)){s();var u=ye(ge(!0),a,n);return ye(new Tt({start:e.start,left:e,operator:r,right:u,end:u.end}),t,n)}return e};var we=function(e){var t=i.token,n=function(e){return ye(ge(!0,!0),0,e)}(e);if(o("operator","?")){s();var r=et(!1);return _(":"),new yt({start:t,condition:n,consequent:r,alternative:et(!1,e),end:u()})}return n};function He(e){return e instanceof Et||e instanceof nn}function Xe(e){if(e instanceof Ft)e=new Be({start:e.start,names:e.properties.map(Xe),is_array:!1,end:e.end});else if(e instanceof Ot){for(var t=[],n=0;n=0;)r+="this."+t[a]+" = props."+t[a]+";";const s=i&&Object.create(i.prototype);(s&&s.initialize||n&&n.initialize)&&(r+="this.initialize();"),r+="}",r+="this.flags = 0;",r+="}";var u=new Function(r)();if(s&&(u.prototype=s,u.BASE=i),i&&i.SUBCLASSES.push(u),u.prototype.CTOR=u,u.prototype.constructor=u,u.PROPS=t||null,u.SELF_PROPS=o,u.SUBCLASSES=[],e&&(u.prototype.TYPE=u.TYPE=e),n)for(a in n)D(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 le=ce("Token","type value line col pos endline endcol endpos nlb comments_before comments_after file raw quote end",{},null),fe=ce("Node","start end",{_clone:function(e){if(e){var t=this.clone();return t.transform(new On((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)},_children_backwards:()=>{}},null);fe.warn_function=null,fe.warn=function(e,t){fe.warn_function&&fe.warn_function(d(e,t))};var pe=ce("Statement",null,{$documentation:"Base class of all statements"}),_e=ce("Debugger",null,{$documentation:"Represents a debugger statement"},pe),de=ce("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"}},pe),me=ce("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)}))},_children_backwards(e){e(this.body)}},pe);function he(e,t){const n=e.body;for(var i=0,o=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()),this._block_scope&&(t._block_scope=this._block_scope),t},pinned:function(){return this.uses_eval||this.uses_with}},ge),xe=ce("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=ue(n)).transform(new On((function(e){if(e instanceof de&&"$ORIG"==e.value)return f.splice(t)})))},wrap_enclose:function(e){"string"!=typeof e&&(e="");var t=e.indexOf(":");t<0&&(t=e.length);var n=this.body;return ue(["(function(",e.slice(0,t),'){"$ORIG"})(',e.slice(t+1),")"].join("")).transform(new On((function(e){if(e instanceof de&&"$ORIG"==e.value)return f.splice(n)})))}},we),Ne=ce("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){return e._visit(this,(function(){this.expression.walk(e)}))},_children_backwards(e){e(this.expression)}}),ke=ce("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)"},ke),Pe=ce("Defun",null,{$documentation:"A function definition"},ke),Be=ce("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)}))}))},_children_backwards(e){let t=this.names.length;for(;t--;)e(this.names[t])},all_symbols:function(){var e=[];return this.walk(new Cn((function(t){t instanceof Pt&&e.push(t)}))),e}}),Ke=ce("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){return e._visit(this,(function(){this.prefix._walk(e),this.template_string._walk(e)}))},_children_backwards(e){e(this.template_string),e(this.prefix)}}),Ue=ce("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)}))}))},_children_backwards(e){let t=this.segments.length;for(;t--;)e(this.segments[t])}}),Ge=ce("TemplateSegment","value raw",{$documentation:"A segment of a template string literal",$propdoc:{value:"Content of the segment",raw:"Raw content of the segment"}}),He=ce("Jump",null,{$documentation:"Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)"},pe),Xe=ce("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)})},_children_backwards(e){this.value&&e(this.value)}},He),ze=ce("Return",null,{$documentation:"A `return` statement"},Xe),We=ce("Throw",null,{$documentation:"A `throw` statement"},Xe),Ye=ce("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)})},_children_backwards(e){this.label&&e(this.label)}},He),qe=ce("Break",null,{$documentation:"A `break` statement"},Ye),$e=ce("Continue",null,{$documentation:"A `continue` statement"},Ye),je=ce("Await","expression",{$documentation:"An `await` statement",$propdoc:{expression:"[AST_Node] the mandatory expression being awaited"},_walk:function(e){return e._visit(this,(function(){this.expression._walk(e)}))},_children_backwards(e){e(this.expression)}}),Ze=ce("Yield","expression is_star",{$documentation:"A `yield` statement",$propdoc:{expression:"[AST_Node?] the value returned or thrown by this statement; could be null (representing undefined) but only when is_star is set to false",is_star:"[Boolean] Whether this is a yield or yield* statement"},_walk:function(e){return e._visit(this,this.expression&&function(){this.expression._walk(e)})},_children_backwards(e){this.expression&&e(this.expression)}}),Je=ce("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)}))},_children_backwards(e){this.alternative&&e(this.alternative),e(this.body),e(this.condition)}},ve),Qe=ce("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),he(this,e)}))},_children_backwards(e){let t=this.body.length;for(;t--;)e(this.body[t]);e(this.expression)}},ge),et=ce("SwitchBranch",null,{$documentation:"Base class for `switch` branches"},ge),tt=ce("Default",null,{$documentation:"A `default` switch branch"},et),nt=ce("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),he(this,e)}))},_children_backwards(e){let t=this.body.length;for(;t--;)e(this.body[t]);e(this.expression)}},et),it=ce("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(){he(this,e),this.bcatch&&this.bcatch._walk(e),this.bfinally&&this.bfinally._walk(e)}))},_children_backwards(e){this.bfinally&&e(this.bfinally),this.bcatch&&e(this.bcatch);let t=this.body.length;for(;t--;)e(this.body[t])}},ge),ot=ce("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),he(this,e)}))},_children_backwards(e){let t=this.body.length;for(;t--;)e(this.body[t]);this.argname&&e(this.argname)}},ge),rt=ce("Finally",null,{$documentation:"A `finally` node; only makes sense as part of a `try` statement"},ge),at=ce("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`"},Tt),Ot=ce("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;nt._walk(e))}))},_children_backwards(e){let t=this.properties.length;for(;t--;)e(this.properties[t]);this.extends&&e(this.extends),this.name&&e(this.name)}},we),It=ce("ClassProperty","static quote",{$documentation:"A class property",$propdoc:{static:"[boolean] whether this is a static key",quote:"[string] which quote is being used"},_walk:function(e){return e._visit(this,(function(){this.key instanceof fe&&this.key._walk(e),this.value instanceof fe&&this.value._walk(e)}))},_children_backwards(e){this.value instanceof fe&&e(this.value),this.key instanceof fe&&e(this.key)},computed_key(){return!(this.key instanceof qt)}},Mt),Lt=ce("DefClass",null,{$documentation:"A class definition"},kt),Vt=ce("ClassExpression",null,{$documentation:"A class expression."},kt),Pt=ce("Symbol","scope name thedef",{$propdoc:{name:"[string] name of this symbol",scope:"[AST_Scope/S] the current scope (not necessarily the definition scope)",thedef:"[SymbolDef/S] the definition of this symbol"},$documentation:"Base class for all symbols"}),Bt=ce("NewTarget",null,{$documentation:"A reference to new.target"}),Kt=ce("SymbolDeclaration","init",{$documentation:"A declaration symbol (symbol in var/const, function name or argument, symbol in catch)"},Pt),Ut=ce("SymbolVar",null,{$documentation:"Symbol defining a variable"},Kt),Gt=ce("SymbolBlockDeclaration",null,{$documentation:"Base class for block-scoped declaration symbols"},Kt),Ht=ce("SymbolConst",null,{$documentation:"A constant declaration"},Gt),Xt=ce("SymbolLet",null,{$documentation:"A block-scoped `let` declaration"},Gt),zt=ce("SymbolFunarg",null,{$documentation:"Symbol naming a function argument"},Ut),Wt=ce("SymbolDefun",null,{$documentation:"Symbol defining a function"},Kt),Yt=ce("SymbolMethod",null,{$documentation:"Symbol in an object defining a method"},Pt),qt=ce("SymbolClassProperty",null,{$documentation:"Symbol for a class property"},Pt),$t=ce("SymbolLambda",null,{$documentation:"Symbol naming a function expression"},Kt),jt=ce("SymbolDefClass",null,{$documentation:"Symbol naming a class's name in a class declaration. Lexically scoped to its containing scope, and accessible within the class."},Gt),Zt=ce("SymbolClass",null,{$documentation:"Symbol naming a class's name. Lexically scoped to the class."},Kt),Jt=ce("SymbolCatch",null,{$documentation:"Symbol naming the exception in catch"},Gt),Qt=ce("SymbolImport",null,{$documentation:"Symbol referring to an imported name"},Gt),en=ce("SymbolImportForeign",null,{$documentation:"A symbol imported from a module, but it is defined in the other module, and its real name is irrelevant for this module's purposes"},Pt),tn=ce("Label","references",{$documentation:"Symbol naming a label (declaration)",$propdoc:{references:"[AST_LoopControl*] a list of nodes referring to this label"},initialize:function(){this.references=[],this.thedef=this}},Pt),nn=ce("SymbolRef",null,{$documentation:"Reference to some symbol (not definition/declaration)"},Pt),on=ce("SymbolExport",null,{$documentation:"Symbol referring to a name to export"},nn),rn=ce("SymbolExportForeign",null,{$documentation:"A symbol exported from this module, but it is used in the other module, and its real name is irrelevant for this module's purposes"},Pt),an=ce("LabelRef",null,{$documentation:"Reference to a label symbol"},Pt),sn=ce("This",null,{$documentation:"The `this` symbol"},Pt),un=ce("Super",null,{$documentation:"The `super` symbol"},sn),cn=ce("Constant",null,{$documentation:"Base class for all constants",getValue:function(){return this.value}}),ln=ce("String","value quote",{$documentation:"A string literal",$propdoc:{value:"[string] the contents of this string",quote:"[string] the original quote character"}},cn),fn=ce("Number","value literal",{$documentation:"A number literal",$propdoc:{value:"[number] the numeric value",literal:"[string] numeric value as string (optional)"}},cn),pn=ce("BigInt","value",{$documentation:"A big int literal",$propdoc:{value:"[string] big int value"}},cn),_n=ce("RegExp","value",{$documentation:"A regexp literal",$propdoc:{value:"[RegExp] the actual regexp"}},cn),dn=ce("Atom",null,{$documentation:"Base class for atoms"},cn),mn=ce("Null",null,{$documentation:"The `null` atom",value:null},dn),hn=ce("NaN",null,{$documentation:"The impossible value",value:NaN},dn),En=ce("Undefined",null,{$documentation:"The `undefined` value",value:void 0},dn),gn=ce("Hole",null,{$documentation:"A hole in an array",value:void 0},dn),Dn=ce("Infinity",null,{$documentation:"The `Infinity` value",value:1/0},dn),Sn=ce("Boolean",null,{$documentation:"Base class for booleans"},dn),vn=ce("False",null,{$documentation:"The `false` atom",value:!1},Sn),An=ce("True",null,{$documentation:"The `true` atom",value:!0},Sn);function Tn(e,t,n=[e]){const i=n.push.bind(n);for(;n.length;){const e=n.pop(),o=t(e,n);if(o){if(o===bn)return!0}else e._children_backwards(i)}return!1}function yn(e,t,n){const i=[e],o=i.push.bind(i),r=n?n.slice():[],a=[];let s;const u={parent:(e=0)=>-1===e?s:n&&e>=r.length?(e-=r.length,n[n.length-(e+1)]):r[r.length-(1+e)]};for(;i.length;){for(s=i.pop();a.length&&i.length==a[a.length-1];)r.pop(),a.pop();const e=t(s,u);if(e){if(e===bn)return!0;continue}const n=i.length;s._children_backwards(o),i.length>n&&(r.push(s),a.push(n-1))}return!1}const bn=Symbol("abort walk");class Cn{constructor(e){this.visit=e,this.stack=[],this.directives=Object.create(null)}_visit(e,t){this.push(e);var n=this.visit(e,t?function(){t.call(e)}:a);return!n&&t&&t.call(e),this.pop(),n}parent(e){return this.stack[this.stack.length-2-(e||0)]}push(e){e instanceof ke?this.directives=Object.create(this.directives):e instanceof de&&!this.directives[e.value]?this.directives[e.value]=e:e instanceof kt&&(this.directives=Object.create(this.directives),this.directives["use strict"]||(this.directives["use strict"]=e)),this.stack.push(e)}pop(){var e=this.stack.pop();(e instanceof ke||e instanceof kt)&&(this.directives=Object.getPrototypeOf(this.directives))}self(){return this.stack[this.stack.length-1]}find_parent(e){for(var t=this.stack,n=t.length;--n>=0;){var i=t[n];if(i instanceof e)return i}}has_directive(e){var t=this.directives[e];if(t)return t;var n=this.stack[this.stack.length-1];if(n instanceof we&&n.body)for(var i=0;i=0;){if((i=t[n])instanceof Ae&&i.label.name==e.label.name)return i.body}else for(n=t.length;--n>=0;){var i;if((i=t[n])instanceof Te||e instanceof qe&&i instanceof Qe)return i}}}class On extends Cn{constructor(e,t){super(),this.before=e,this.after=t}}const Fn=1,Mn=2,Rn=4;var wn=Object.freeze({__proto__:null,AST_Accessor:Ie,AST_Array:Ot,AST_Arrow:Ve,AST_Assign:bt,AST_Atom:dn,AST_Await:je,AST_BigInt:pn,AST_Binary:Tt,AST_Block:ge,AST_BlockStatement:De,AST_Boolean:Sn,AST_Break:qe,AST_Call:dt,AST_Case:nt,AST_Catch:ot,AST_Class:kt,AST_ClassExpression:Vt,AST_ClassProperty:It,AST_ConciseMethod:Nt,AST_Conditional:yt,AST_Const:ct,AST_Constant:cn,AST_Continue:$e,AST_Debugger:_e,AST_Default:tt,AST_DefaultAssign:Ct,AST_DefClass:Lt,AST_Definitions:at,AST_Defun:Pe,AST_Destructuring:Be,AST_Directive:de,AST_Do:be,AST_Dot:gt,AST_DWLoop:ye,AST_EmptyStatement:Se,AST_Exit:Xe,AST_Expansion:Ne,AST_Export:_t,AST_False:vn,AST_Finally:rt,AST_For:Oe,AST_ForIn:Fe,AST_ForOf:Me,AST_Function:Le,AST_Hole:gn,AST_If:Je,AST_Import:pt,AST_Infinity:Dn,AST_IterationStatement:Te,AST_Jump:He,AST_Label:tn,AST_LabeledStatement:Ae,AST_LabelRef:an,AST_Lambda:ke,AST_Let:ut,AST_LoopControl:Ye,AST_NameMapping:ft,AST_NaN:hn,AST_New:mt,AST_NewTarget:Bt,AST_Node:fe,AST_Null:mn,AST_Number:fn,AST_Object:Ft,AST_ObjectGetter:xt,AST_ObjectKeyVal:Rt,AST_ObjectProperty:Mt,AST_ObjectSetter:wt,AST_PrefixedTemplateString:Ke,AST_PropAccess:Et,AST_RegExp:_n,AST_Return:ze,AST_Scope:we,AST_Sequence:ht,AST_SimpleStatement:me,AST_Statement:pe,AST_StatementWithBody:ve,AST_String:ln,AST_Sub:Dt,AST_Super:un,AST_Switch:Qe,AST_SwitchBranch:et,AST_Symbol:Pt,AST_SymbolBlockDeclaration:Gt,AST_SymbolCatch:Jt,AST_SymbolClass:Zt,AST_SymbolClassProperty:qt,AST_SymbolConst:Ht,AST_SymbolDeclaration:Kt,AST_SymbolDefClass:jt,AST_SymbolDefun:Wt,AST_SymbolExport:on,AST_SymbolExportForeign:rn,AST_SymbolFunarg:zt,AST_SymbolImport:Qt,AST_SymbolImportForeign:en,AST_SymbolLambda:$t,AST_SymbolLet:Xt,AST_SymbolMethod:Yt,AST_SymbolRef:nn,AST_SymbolVar:Ut,AST_TemplateSegment:Ge,AST_TemplateString:Ue,AST_This:sn,AST_Throw:We,AST_Token:le,AST_Toplevel:xe,AST_True:An,AST_Try:it,AST_Unary:St,AST_UnaryPostfix:At,AST_UnaryPrefix:vt,AST_Undefined:En,AST_Var:st,AST_VarDef:lt,AST_While:Ce,AST_With:Re,AST_Yield:Ze,TreeTransformer:On,TreeWalker:Cn,walk:Tn,walk_abort:bn,walk_body:he,walk_parent:yn,_INLINE:Mn,_NOINLINE:Rn,_PURE:Fn});function xn(e,t){e.DEFMETHOD("transform",(function(e,n){let i=void 0;if(e.push(this),e.before&&(i=e.before(this,t,n)),void 0===i&&(i=this,t(i,e),e.after)){const t=e.after(i,n);void 0!==t&&(i=t)}return e.pop(),i}))}function Nn(e,t){return f(e,(function(e){return e.transform(t,!0)}))}function kn(e){let t=e.parent(-1);for(let n,i=0;n=e.parent(i);i++){if(n instanceof pe&&n.body===t)return!0;if(!(n instanceof ht&&n.expressions[0]===t||"Call"===n.TYPE&&n.expression===t||n instanceof Ke&&n.prefix===t||n instanceof gt&&n.expression===t||n instanceof Dt&&n.expression===t||n instanceof yt&&n.condition===t||n instanceof Tt&&n.left===t||n instanceof At&&n.expression===t))return!1;t=n}}xn(fe,a),xn(Ae,(function(e,t){e.label=e.label.transform(t),e.body=e.body.transform(t)})),xn(me,(function(e,t){e.body=e.body.transform(t)})),xn(ge,(function(e,t){e.body=Nn(e.body,t)})),xn(be,(function(e,t){e.body=e.body.transform(t),e.condition=e.condition.transform(t)})),xn(Ce,(function(e,t){e.condition=e.condition.transform(t),e.body=e.body.transform(t)})),xn(Oe,(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)})),xn(Fe,(function(e,t){e.init=e.init.transform(t),e.object=e.object.transform(t),e.body=e.body.transform(t)})),xn(Re,(function(e,t){e.expression=e.expression.transform(t),e.body=e.body.transform(t)})),xn(Xe,(function(e,t){e.value&&(e.value=e.value.transform(t))})),xn(Ye,(function(e,t){e.label&&(e.label=e.label.transform(t))})),xn(Je,(function(e,t){e.condition=e.condition.transform(t),e.body=e.body.transform(t),e.alternative&&(e.alternative=e.alternative.transform(t))})),xn(Qe,(function(e,t){e.expression=e.expression.transform(t),e.body=Nn(e.body,t)})),xn(nt,(function(e,t){e.expression=e.expression.transform(t),e.body=Nn(e.body,t)})),xn(it,(function(e,t){e.body=Nn(e.body,t),e.bcatch&&(e.bcatch=e.bcatch.transform(t)),e.bfinally&&(e.bfinally=e.bfinally.transform(t))})),xn(ot,(function(e,t){e.argname&&(e.argname=e.argname.transform(t)),e.body=Nn(e.body,t)})),xn(at,(function(e,t){e.definitions=Nn(e.definitions,t)})),xn(lt,(function(e,t){e.name=e.name.transform(t),e.value&&(e.value=e.value.transform(t))})),xn(Be,(function(e,t){e.names=Nn(e.names,t)})),xn(ke,(function(e,t){e.name&&(e.name=e.name.transform(t)),e.argnames=Nn(e.argnames,t),e.body instanceof fe?e.body=e.body.transform(t):e.body=Nn(e.body,t)})),xn(dt,(function(e,t){e.expression=e.expression.transform(t),e.args=Nn(e.args,t)})),xn(ht,(function(e,t){const n=Nn(e.expressions,t);e.expressions=n.length?n:[new fn({value:0})]})),xn(gt,(function(e,t){e.expression=e.expression.transform(t)})),xn(Dt,(function(e,t){e.expression=e.expression.transform(t),e.property=e.property.transform(t)})),xn(Ze,(function(e,t){e.expression&&(e.expression=e.expression.transform(t))})),xn(je,(function(e,t){e.expression=e.expression.transform(t)})),xn(St,(function(e,t){e.expression=e.expression.transform(t)})),xn(Tt,(function(e,t){e.left=e.left.transform(t),e.right=e.right.transform(t)})),xn(yt,(function(e,t){e.condition=e.condition.transform(t),e.consequent=e.consequent.transform(t),e.alternative=e.alternative.transform(t)})),xn(Ot,(function(e,t){e.elements=Nn(e.elements,t)})),xn(Ft,(function(e,t){e.properties=Nn(e.properties,t)})),xn(Mt,(function(e,t){e.key instanceof fe&&(e.key=e.key.transform(t)),e.value&&(e.value=e.value.transform(t))})),xn(kt,(function(e,t){e.name&&(e.name=e.name.transform(t)),e.extends&&(e.extends=e.extends.transform(t)),e.properties=Nn(e.properties,t)})),xn(Ne,(function(e,t){e.expression=e.expression.transform(t)})),xn(ft,(function(e,t){e.foreign_name=e.foreign_name.transform(t),e.name=e.name.transform(t)})),xn(pt,(function(e,t){e.imported_name&&(e.imported_name=e.imported_name.transform(t)),e.imported_names&&Nn(e.imported_names,t),e.module_name=e.module_name.transform(t)})),xn(_t,(function(e,t){e.exported_definition&&(e.exported_definition=e.exported_definition.transform(t)),e.exported_value&&(e.exported_value=e.exported_value.transform(t)),e.exported_names&&Nn(e.exported_names,t),e.module_name&&(e.module_name=e.module_name.transform(t))})),xn(Ue,(function(e,t){e.segments=Nn(e.segments,t)})),xn(Ke,(function(e,t){e.prefix=e.prefix.transform(t),e.template_string=e.template_string.transform(t)}));const In=/^$|[;{][\s\n]*$/,Ln=/[@#]__(PURE|INLINE|NOINLINE)__/g;function Vn(e){return("comment2"===e.type||"comment1"===e.type)&&/@preserve|@lic|@cc_on|^\**!/i.test(e.value)}function Pn(e){var t=!e;void 0===(e=r(e,{ascii_only:!1,beautify:!1,braces:!1,comments:"some",ecma:5,ie8:!1,indent_level:4,indent_start:0,inline_script:!0,keep_numbers:!1,keep_quoted_props:!1,max_line_len:!1,preamble:null,preserve_annotations:!1,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,wrap_func_args:!0},!0)).shorthand&&(e.shorthand=e.ecma>5);var n=s;if(e.comments){let t=e.comments;if("string"==typeof e.comments&&/^\/.*\/[a-zA-Z]*$/.test(e.comments)){var i=e.comments.lastIndexOf("/");t=new RegExp(e.comments.substr(1,i-1),e.comments.substr(i+1))}n=t instanceof RegExp?function(e){return"comment5"!=e.type&&t.test(e.value)}:"function"==typeof t?function(e){return"comment5"!=e.type&&t(this,e)}:"some"===t?Vn:u}var o=0,c=0,l=1,f=0,p="";let _=new Set;var d=e.ascii_only?function(t,n){return e.ecma>=2015&&(t=t.replace(/[\ud800-\udbff][\udc00-\udfff]/g,(function(e){return"\\u{"+function(e,t){return z(e.charCodeAt(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;no?r():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 h,g,D=!1,S=!1,v=!1,A=0,T=!1,y=!1,b=-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&&fe.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=[]}:a,M=e.max_line_len?function(){if(c>e.max_line_len){if(A){var t=p.slice(0,A),n=p.slice(A);if(O){var i=n.length-c;O.forEach((function(e){e.line++,e.col+=i}))}p=t+"\n"+n,l++,f++,c=n.length}c>e.max_line_len&&fe.warn("Output exceeds {max_line_len} characters",e)}A&&(A=0,F())}:a,R=E("( [ + * / - , . `");function w(t){var n=X(t=String(t),0);T&&n&&(T=!1,"\n"!==n&&(w("\n"),N())),y&&n&&(y=!1,/[\s;})]/.test(n)||x()),b=-1;var i=C.charAt(C.length-1);v&&(v=!1,(":"!==i||"}"!==n)&&(n&&";}".includes(n)||";"===i)||(e.semicolons||R.has(n)?(p+=";",c++,f++):(M(),c>0&&(p+="\n",f++,l++,c=0),/^\s+$/.test(t)&&(v=!0)),e.beautify||(S=!1))),S&&(($(i)&&($(n)||"\\"==n)||"/"==n&&n==i||("+"==n||"-"==n)&&n==C)&&(p+=" ",c++,f++),S=!1),h&&(O.push({token:h,name:g,line:l,col:c}),h=!1,A||F()),p+=t,D="("==t[t.length-1],f+=t.length;var o=t.split(/\r?\n/),r=o.length-1;l+=r,c+=o[0].length,r>0&&(M(),c=o[r].length),C=t}var x=e.beautify?function(){w(" ")}:function(){S=!0},N=e.beautify?function(t){var n;e.beautify&&w((n=t?.5:0," ".repeat(e.indent_start+o-n*e.indent_level)))}:a,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(b<0)return w("\n");"\n"!=p[b]&&(p=p.slice(0,b)+"\n"+p.slice(b),f++,l++),b++}:e.max_line_len?function(){M(),A=p.length}:a,L=e.beautify?function(){w(";")}:function(){v=!0};function V(){v=!1,w(";")}function P(){return o+e.indent_level}function B(){return A&&M(),p}function K(){let e=p.length-1;for(;e>=0;){const t=p.charCodeAt(e);if(10===t)return!0;if(32!==t)return!1;e--}return!0}function U(t){return e.preserve_annotations||(t=t.replace(Ln," ")),/^\s*$/.test(t)?"":t.replace(/(<\s*\/\s*)(script)/i,"<\\/$2")}var G=[];return{get:B,toString:B,indent:N,in_directive:!1,use_asm:null,active_scope:null,indentation:function(){return o},current_width:function(){return c-o},should_break:function(){return e.width&&this.current_width()>=e.width},has_parens:function(){return D},newline:I,print:w,star:function(){w("*")},space:x,comma:function(){w(","),x()},colon:function(){w(":"),x()},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("\\")||(In.test(p)||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()})),N(),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){h=e,g=t}:a,option:function(t){return e[t]},printed_comments:_,prepend_comments:t?a:function(t){var i=t.start;if(!i)return;var o=this.printed_comments;const r=t instanceof Xe&&t.value;if(i.comments_before&&o.has(i.comments_before)){if(!r)return;i.comments_before=[]}var a=i.comments_before;if(a||(a=i.comments_before=[]),o.add(a),r){var s=new Cn((function(e){var t=s.parent();if(!(t instanceof Xe||t instanceof Tt&&t.left===e||"Call"==t.TYPE&&t.expression===e||t instanceof yt&&t.condition===e||t instanceof gt&&t.expression===e||t instanceof ht&&t.expressions[0]===e||t instanceof Dt&&t.expression===e||t instanceof At))return!0;if(e.start){var n=e.start.comments_before;n&&!o.has(n)&&(o.add(n),a=a.concat(n))}}));s.push(t),t.value.walk(s)}if(0==f){a.length>0&&e.shebang&&"comment5"===a[0].type&&!o.has(a[0])&&(w("#!"+a.shift().value+"\n"),N());var u=e.preamble;u&&w(u.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g,"\n"))}if(0!=(a=a.filter(n,t).filter(e=>!o.has(e))).length){var c=K();a.forEach((function(e,t){if(o.add(e),c||(e.nlb?(w("\n"),N(),c=!0):t>0&&x()),/comment[134]/.test(e.type))(n=U(e.value))&&(w("//"+n+"\n"),N()),c=!0;else if("comment2"==e.type){var n;(n=U(e.value))&&w("/*"+n+"*/"),c=!1}})),c||(i.nlb?(w("\n"),N()):x())}},append_comments:t||n===s?a:function(e,t){var i=e.end;if(i){var o=this.printed_comments,r=i[t?"comments_before":"comments_after"];if(r&&!o.has(r)&&(e instanceof pe||r.every(e=>!/comment[134]/.test(e.type)))){o.add(r);var a=p.length;r.filter(n,e).forEach((function(e,n){if(!o.has(e))if(o.add(e),y=!1,T?(w("\n"),N(),T=!1):e.nlb&&(n>0||!K())?(w("\n"),N()):(n>0||!t)&&x(),/comment[134]/.test(e.type)){const t=U(e.value);t&&w("//"+t),T=!0}else if("comment2"==e.type){const t=U(e.value);t&&w("/*"+t+"*/"),y=!0}})),p.length>a&&(b=a)}}},line:function(){return l},col:function(){return c},pos:function(){return f},push_node:function(e){G.push(e)},pop_node:function(){return G.pop()},parent:function(e){return G[G.length-2-(e||0)]}}}!function(){function e(e,t){e.DEFMETHOD("_codegen",t)}function t(e,n){Array.isArray(e)?e.forEach((function(e){t(e,n)})):e.DEFMETHOD("needs_parens",n)}function n(e,t,n,i){var o=e.length-1;n.in_directive=i,e.forEach((function(e,i){!0!==n.in_directive||e instanceof de||e instanceof Se||e instanceof me&&e.body instanceof ln||(n.in_directive=!1),e instanceof Se||(n.indent(),e.print(n),i==o&&t||(n.newline(),t&&n.newline())),!0===n.in_directive&&e instanceof me&&e.body instanceof ln&&(n.in_directive=!1)})),n.in_directive=!1}function i(e,t){t.print("{"),t.with_indent(t.next_indent(),(function(){t.append_comments(e,!0)})),t.print("}")}function o(e,t,o){e.body.length>0?t.with_block((function(){n(e.body,!1,t,o)})):i(e,t)}function r(e,t,n){var i=!1;n&&(i=Tn(e,e=>e instanceof we||(e instanceof Tt&&"in"==e.operator?bn:void 0))),e.print(t,i)}function u(e,t,n){return n.option("quote_keys")?n.print_string(e):""+ +e==e&&e>=0?n.option("keep_numbers")?n.print(e):n.print(p(e)):(O.has(e)?!n.option("ie8"):j(e))?t&&n.option("keep_quoted_props")?n.print_string(e,t):n.print_name(e):n.print_string(e,t)}fe.DEFMETHOD("print",(function(e,t){var n=this,i=n._codegen;function o(){e.prepend_comments(n),n.add_source_map(e),i(n,e),e.append_comments(n)}n instanceof we?e.active_scope=n:!e.use_asm&&n instanceof de&&"use asm"==n.value&&(e.use_asm=e.active_scope),e.push_node(n),t||n.needs_parens(e)?e.with_parens(o):o(),e.pop_node(),n===e.use_asm&&(e.use_asm=null)})),fe.DEFMETHOD("_print",fe.prototype.print),fe.DEFMETHOD("print_to_string",(function(e){var t=Pn(e);return this.print(t),t.get()})),t(fe,s),t(Le,(function(e){if(!e.has_parens()&&kn(e))return!0;var t;if(e.option("webkit")&&((t=e.parent())instanceof Et&&t.expression===this))return!0;if(e.option("wrap_iife")&&((t=e.parent())instanceof dt&&t.expression===this))return!0;if(e.option("wrap_func_args")&&((t=e.parent())instanceof dt&&t.args.includes(this)))return!0;return!1})),t(Ve,(function(e){var t=e.parent();return t instanceof Et&&t.expression===this})),t(Ft,(function(e){return!e.has_parens()&&kn(e)})),t(Vt,kn),t(St,(function(e){var t=e.parent();return t instanceof Et&&t.expression===this||t instanceof dt&&t.expression===this||t instanceof Tt&&"**"===t.operator&&this instanceof vt&&t.left===this&&"++"!==this.operator&&"--"!==this.operator})),t(je,(function(e){var t=e.parent();return t instanceof Et&&t.expression===this||t instanceof dt&&t.expression===this||e.option("safari10")&&t instanceof vt})),t(ht,(function(e){var t=e.parent();return t instanceof dt||t instanceof St||t instanceof Tt||t instanceof lt||t instanceof Et||t instanceof Ot||t instanceof Mt||t instanceof yt||t instanceof Ve||t instanceof Ct||t instanceof Ne||t instanceof Me&&this===t.object||t instanceof Ze||t instanceof _t})),t(Tt,(function(e){var t=e.parent();if(t instanceof dt&&t.expression===this)return!0;if(t instanceof St)return!0;if(t instanceof Et&&t.expression===this)return!0;if(t instanceof Tt){var n=t.operator,i=ae[n],o=this.operator,r=ae[o];if(i>r||i==r&&(this===t.right||"**"==n))return!0}})),t(Ze,(function(e){var t=e.parent();return t instanceof Tt&&"="!==t.operator||(t instanceof dt&&t.expression===this||(t instanceof yt&&t.condition===this||(t instanceof St||(t instanceof Et&&t.expression===this||void 0))))})),t(Et,(function(e){var t=e.parent();if(t instanceof mt&&t.expression===this)return Tn(this,e=>e instanceof we||(e instanceof dt?bn:void 0))})),t(dt,(function(e){var t,n=e.parent();return!!(n instanceof mt&&n.expression===this||n instanceof _t&&n.is_default&&this.expression instanceof Le)||this.expression instanceof Le&&n instanceof Et&&n.expression===this&&(t=e.parent(1))instanceof bt&&t.left===n})),t(mt,(function(e){var t=e.parent();if(0===this.args.length&&(t instanceof Et||t instanceof dt&&t.expression===this))return!0})),t(fn,(function(e){var t=e.parent();if(t instanceof Et&&t.expression===this){var n=this.getValue();if(n<0||/^0/.test(p(n)))return!0}})),t(pn,(function(e){var t=e.parent();if(t instanceof Et&&t.expression===this&&this.getValue().startsWith("-"))return!0})),t([bt,yt],(function(e){var t=e.parent();return t instanceof St||(t instanceof Tt&&!(t instanceof bt)||(t instanceof dt&&t.expression===this||(t instanceof yt&&t.condition===this||(t instanceof Et&&t.expression===this||(this instanceof bt&&this.left instanceof Be&&!1===this.left.is_array||void 0)))))})),e(de,(function(e,t){t.print_string(e.value,e.quote),t.semicolon()})),e(Ne,(function(e,t){t.print("..."),e.expression.print(t)})),e(Be,(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 gn&&t.comma()})),t.print(e.is_array?"]":"}")})),e(_e,(function(e,t){t.print("debugger"),t.semicolon()})),ve.DEFMETHOD("_do_print_body",(function(e){f(this.body,e)})),e(pe,(function(e,t){e.body.print(t),t.semicolon()})),e(xe,(function(e,t){n(e.body,!0,t,!0),t.print("")})),e(Ae,(function(e,t){e.label.print(t),t.colon(),e.body.print(t)})),e(me,(function(e,t){e.body.print(t),t.semicolon()})),e(De,(function(e,t){o(e,t)})),e(Se,(function(e,t){t.semicolon()})),e(be,(function(e,t){t.print("do"),t.space(),_(e.body,t),t.space(),t.print("while"),t.space(),t.with_parens((function(){e.condition.print(t)})),t.semicolon()})),e(Ce,(function(e,t){t.print("while"),t.space(),t.with_parens((function(){e.condition.print(t)})),t.space(),e._do_print_body(t)})),e(Oe,(function(e,t){t.print("for"),t.space(),t.with_parens((function(){e.init?(e.init instanceof at?e.init.print(t):r(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(Fe,(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 Me?"of":"in"),t.space(),e.object.print(t)})),t.space(),e._do_print_body(t)})),e(Re,(function(e,t){t.print("with"),t.space(),t.with_parens((function(){e.expression.print(t)})),t.space(),e._do_print_body(t)})),ke.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 Pt?n.name.print(e):t&&n.name instanceof fe&&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(),o(n,e,!0)})),e(ke,(function(e,t){e._do_print(t)})),e(Ke,(function(e,t){var n=e.prefix,i=n instanceof ke||n instanceof Tt||n instanceof yt||n instanceof ht||n instanceof St||n instanceof gt&&n.expression instanceof Ft;i&&t.print("("),e.prefix.print(t),i&&t.print(")"),e.template_string.print(t)})),e(Ue,(function(e,t){var n=t.parent()instanceof Ke;t.print("`");for(var i=0;i"),e.space();const r=t.body[0];if(1===t.body.length&&r instanceof ze){const t=r.value;t?!function e(t){return t instanceof Ft||(t instanceof ht?e(t.expressions[0]):"Call"===t.TYPE?e(t.expression):t instanceof Ke?e(t.prefix):t instanceof gt||t instanceof Dt?e(t.expression):t instanceof yt?e(t.condition):t instanceof Tt?e(t.left):t instanceof At&&e(t.expression))}(t)?t.print(e):(e.print("("),t.print(e),e.print(")")):e.print("{}")}else o(t,e);i&&e.print(")")})),Xe.DEFMETHOD("_do_print",(function(e,t){if(e.print(t),this.value){e.space();const t=this.value.start.comments_before;t&&t.length&&!e.printed_comments.has(t)?(e.print("("),this.value.print(e),e.print(")")):this.value.print(e)}e.semicolon()})),e(ze,(function(e,t){e._do_print(t,"return")})),e(We,(function(e,t){e._do_print(t,"throw")})),e(Ze,(function(e,t){var n=e.is_star?"*":"";t.print("yield"+n),e.expression&&(t.space(),e.expression.print(t))})),e(je,(function(e,t){t.print("await"),t.space();var n=e.expression,i=!(n instanceof dt||n instanceof nn||n instanceof Et||n instanceof St||n instanceof cn);i&&t.print("("),e.expression.print(t),i&&t.print(")")})),Ye.DEFMETHOD("_do_print",(function(e,t){e.print(t),this.label&&(e.space(),this.label.print(e)),e.semicolon()})),e(qe,(function(e,t){e._do_print(t,"break")})),e($e,(function(e,t){e._do_print(t,"continue")})),e(Je,(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 be)return _(n,t);if(!n)return t.force_semicolon();for(;;)if(n instanceof Je){if(!n.alternative)return void _(e.body,t);n=n.alternative}else{if(!(n instanceof ve))break;n=n.body}f(e.body,t)}(e,t),t.space(),t.print("else"),t.space(),e.alternative instanceof Je?e.alternative.print(t):f(e.alternative,t)):e._do_print_body(t)})),e(Qe,(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?i(e,t):t.with_block((function(){e.body.forEach((function(e,i){t.indent(!0),e.print(t),i0&&t.newline()}))}))})),et.DEFMETHOD("_do_print_body",(function(e){e.newline(),this.body.forEach((function(t){e.indent(),t.print(e),e.newline()}))})),e(tt,(function(e,t){t.print("default:"),e._do_print_body(t)})),e(nt,(function(e,t){t.print("case"),t.space(),e.expression.print(t),t.print(":"),e._do_print_body(t)})),e(it,(function(e,t){t.print("try"),t.space(),o(e,t),e.bcatch&&(t.space(),e.bcatch.print(t)),e.bfinally&&(t.space(),e.bfinally.print(t))})),e(ot,(function(e,t){t.print("catch"),e.argname&&(t.space(),t.with_parens((function(){e.argname.print(t)}))),t.space(),o(e,t)})),e(rt,(function(e,t){t.print("finally"),t.space(),o(e,t)})),at.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 Oe||n instanceof Fe)||n&&n.init!==this)&&e.semicolon()})),e(ut,(function(e,t){e._do_print(t,"let")})),e(st,(function(e,t){e._do_print(t,"var")})),e(ct,(function(e,t){e._do_print(t,"const")})),e(pt,(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(ht,(function(e,t){e._do_print(t)})),e(gt,(function(e,t){var n=e.expression;n.print(t);var i=e.property;t.option("ie8")&&O.has(i)?(t.print("["),t.add_mapping(e.end),t.print_string(i),t.print("]")):(n instanceof fn&&n.getValue()>=0&&(/[xa-f.)]/i.test(t.last())||t.print(".")),t.print("."),t.add_mapping(e.end),t.print_name(i))})),e(Dt,(function(e,t){e.expression.print(t),t.print("["),e.property.print(t),t.print("]")})),e(vt,(function(e,t){var n=e.operator;t.print(n),(/^[a-z]/i.test(n)||/[+-]$/.test(n)&&e.expression instanceof vt&&/^[+-]/.test(e.expression.operator))&&t.space(),e.expression.print(t)})),e(At,(function(e,t){e.expression.print(t),t.print(e.operator)})),e(Tt,(function(e,t){var n=e.operator;e.left.print(t),">"==n[0]&&e.left instanceof At&&"--"==e.left.operator?t.print(" "):t.space(),t.print(n),("<"==n||"<<"==n)&&e.right instanceof vt&&"!"==e.right.operator&&e.right.expression instanceof vt&&"--"==e.right.expression.operator?t.print(" "):t.space(),e.right.print(t)})),e(yt,(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(Ot,(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 gn&&t.comma()})),i>0&&t.space()}))})),e(Ft,(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()})):i(e,t)})),e(kt,(function(e,t){if(t.print("class"),t.space(),e.name&&(e.name.print(t),t.space()),e.extends){var n=!(e.extends instanceof nn||e.extends instanceof Et||e.extends instanceof Vt||e.extends instanceof Le);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(Bt,(function(e,t){t.print("new.target")})),e(Rt,(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 Pt&&j(e.key)&&n(e.value)===e.key&&!O.has(e.key)?u(e.key,e.quote,t):i&&e.value instanceof Ct&&e.value.left instanceof Pt&&j(e.key)&&n(e.value.left)===e.key?(u(e.key,e.quote,t),t.space(),t.print("="),t.space(),e.value.right.print(t)):(e.key instanceof fe?t.with_square((function(){e.key.print(t)})):u(e.key,e.quote,t),t.colon(),e.value.print(t))})),e(It,(e,t)=>{e.static&&(t.print("static"),t.space()),e.key instanceof qt?u(e.key.name,e.quote,t):(t.print("["),e.key.print(t),t.print("]")),e.value&&(t.print("="),e.value.print(t)),t.semicolon()}),Mt.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 Yt?u(n.key.name,n.quote,t):t.with_square((function(){n.key.print(t)})),n.value._do_print(t,!0)})),e(wt,(function(e,t){e._print_getter_setter("set",t)})),e(xt,(function(e,t){e._print_getter_setter("get",t)})),e(Nt,(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)})),Pt.DEFMETHOD("_do_print",(function(e){var t=this.definition();e.print_name(t?t.mangled_name||t.name:this.name)})),e(Pt,(function(e,t){e._do_print(t)})),e(gn,a),e(sn,(function(e,t){t.print("this")})),e(un,(function(e,t){t.print("super")})),e(cn,(function(e,t){t.print(e.getValue())})),e(ln,(function(e,t){t.print_string(e.getValue(),e.quote,t.in_directive)})),e(fn,(function(e,t){(t.option("keep_numbers")||t.use_asm)&&e.start&&null!=e.start.raw?t.print(e.start.raw):t.print(p(e.getValue()))})),e(pn,(function(e,t){t.print(e.getValue()+"n")}));const c=/(<\s*\/\s*script)/i,l=(e,t)=>t.replace("/","\\/");function f(e,t){t.option("braces")?_(e,t):!e||e instanceof Se?t.force_semicolon():e.print(t)}function p(e){var t,n,i,o=e.toString(10).replace(/^0\./,".").replace("e+","e"),r=[o];return Math.floor(e)===e&&(e<0?r.push("-0x"+(-e).toString(16).toLowerCase()):r.push("0x"+e.toString(16).toLowerCase())),(t=/^\.0+/.exec(o))?(n=t[0].length,i=o.slice(n),r.push(i+"e-"+(i.length+n-1))):(t=/0+$/.exec(o))?(n=t[0].length,r.push(o.slice(0,-n)+"e"+n)):(t=/^(\d)\.(\d+)e(-?\d+)$/.exec(o))&&r.push(t[1]+t[2]+"e"+(t[3]-t[2].length)),function(e){for(var t=e[0],n=t.length,i=1;i{n+=e}),n}(i):"",n=n.replace(c,l),t.print(t.to_utf8(`/${n}/${i}`));const o=t.parent();o instanceof Tt&&/^\w/.test(o.operator)&&o.left===e&&t.print(" ")})),d([fe,Ae,xe],a),d([Ot,De,ot,kt,cn,_e,at,de,rt,He,ke,mt,Ft,ve,Pt,Qe,et,Ue,Ge,it],(function(e){e.add_mapping(this.start)})),d([xt,wt],(function(e){e.add_mapping(this.start,this.key.name)})),d([Mt],(function(e){e.add_mapping(this.start,this.key)}))}();const Bn=(e,t)=>e.TYPE===t.TYPE&&e.shallow_cmp(t),Kn=e=>{const t=Object.keys(e).map(t=>{if("eq"===e[t])return`this.${t} === other.${t}`;if("exist"===e[t])return`(this.${t} == null ? other.${t} == null : this.${t} === other.${t})`;throw new Error(`mkshallow: Unexpected instruction: ${e[t]}`)}).join(" && ");return new Function("other","return "+t)},Un=()=>!0;fe.prototype.shallow_cmp=function(){throw new Error("did not find a shallow_cmp function for "+this.constructor.name)},_e.prototype.shallow_cmp=Un,de.prototype.shallow_cmp=Kn({value:"eq"}),me.prototype.shallow_cmp=Un,ge.prototype.shallow_cmp=Un,Se.prototype.shallow_cmp=Un,Ae.prototype.shallow_cmp=Kn({"label.name":"eq"}),be.prototype.shallow_cmp=Un,Ce.prototype.shallow_cmp=Un,Oe.prototype.shallow_cmp=Kn({init:"exist",condition:"exist",step:"exist"}),Fe.prototype.shallow_cmp=Un,Me.prototype.shallow_cmp=Un,Re.prototype.shallow_cmp=Un,xe.prototype.shallow_cmp=Un,Ne.prototype.shallow_cmp=Un,ke.prototype.shallow_cmp=Kn({is_generator:"eq",async:"eq"}),Be.prototype.shallow_cmp=Kn({is_array:"eq"}),Ke.prototype.shallow_cmp=Un,Ue.prototype.shallow_cmp=Un,Ge.prototype.shallow_cmp=Kn({value:"eq"}),He.prototype.shallow_cmp=Un,Ye.prototype.shallow_cmp=Un,je.prototype.shallow_cmp=Un,Ze.prototype.shallow_cmp=Kn({is_star:"eq"}),Je.prototype.shallow_cmp=Kn({alternative:"exist"}),Qe.prototype.shallow_cmp=Un,et.prototype.shallow_cmp=Un,it.prototype.shallow_cmp=Kn({bcatch:"exist",bfinally:"exist"}),ot.prototype.shallow_cmp=Kn({argname:"exist"}),rt.prototype.shallow_cmp=Un,at.prototype.shallow_cmp=Un,lt.prototype.shallow_cmp=Kn({value:"exist"}),ft.prototype.shallow_cmp=Un,pt.prototype.shallow_cmp=Kn({imported_name:"exist",imported_names:"exist"}),_t.prototype.shallow_cmp=Kn({exported_definition:"exist",exported_value:"exist",exported_names:"exist",module_name:"eq",is_default:"eq"}),dt.prototype.shallow_cmp=Un,ht.prototype.shallow_cmp=Un,Et.prototype.shallow_cmp=Un,gt.prototype.shallow_cmp=Kn({property:"eq"}),St.prototype.shallow_cmp=Kn({operator:"eq"}),Tt.prototype.shallow_cmp=Kn({operator:"eq"}),yt.prototype.shallow_cmp=Un,Ot.prototype.shallow_cmp=Un,Ft.prototype.shallow_cmp=Un,Mt.prototype.shallow_cmp=Un,Rt.prototype.shallow_cmp=Kn({key:"eq"}),wt.prototype.shallow_cmp=Kn({static:"eq"}),xt.prototype.shallow_cmp=Kn({static:"eq"}),Nt.prototype.shallow_cmp=Kn({static:"eq",is_generator:"eq",async:"eq"}),kt.prototype.shallow_cmp=Kn({name:"exist",extends:"exist"}),It.prototype.shallow_cmp=Kn({static:"eq"}),Pt.prototype.shallow_cmp=Kn({name:"eq"}),Bt.prototype.shallow_cmp=Un,sn.prototype.shallow_cmp=Un,un.prototype.shallow_cmp=Un,ln.prototype.shallow_cmp=Kn({value:"eq"}),fn.prototype.shallow_cmp=Kn({value:"eq"}),pn.prototype.shallow_cmp=Kn({value:"eq"}),_n.prototype.shallow_cmp=function(e){return this.value.flags===e.value.flags&&this.value.source===e.value.source},dn.prototype.shallow_cmp=Un;let Gn=null,Hn=null;class Xn{constructor(e,t,n){this.name=t.name,this.orig=[t],this.init=n,this.eliminated=0,this.assignments=0,this.scope=e,this.replaced=0,this.global=!1,this.export=0,this.mangled_name=null,this.undeclared=!1,this.id=Xn.next_id++,this.chained=!1,this.direct_access=!1,this.escaped=0,this.recursive_refs=0,this.references=[],this.should_replace=void 0,this.single_use=!1,this.fixed=!1,Object.seal(this)}fixed_value(){return!this.fixed||this.fixed instanceof fe?this.fixed:this.fixed()}unmangleable(e){return e||(e={}),!!(Gn&&Gn.has(this.id)&&S(e.keep_fnames,this.orig[0].name))||(this.global&&!e.toplevel||1&this.export||this.undeclared||!e.eval&&this.scope.pinned()||(this.orig[0]instanceof $t||this.orig[0]instanceof Wt)&&S(e.keep_fnames,this.orig[0].name)||this.orig[0]instanceof Yt||(this.orig[0]instanceof Zt||this.orig[0]instanceof jt)&&S(e.keep_classnames,this.orig[0].name))}mangle(e){const 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=this.scope,i=this.orig[0];e.ie8&&i instanceof $t&&(n=n.parent_scope);const o=zn(this);this.mangled_name=o?o.mangled_name||o.name:n.next_mangled(e,this),this.global&&t&&t.set(this.name,this.mangled_name)}}}function zn(e){if(e.orig[0]instanceof Jt&&e.scope.is_block_scope())return e.scope.get_defun_scope().variables.get(e.name)}function Wn(e,t){var n=e.enclosed;e:for(;;){var i=Yn(++e.cname);if(!O.has(i)&&!(t.reserved.has(i)||Hn&&Hn.has(i))){for(let e=n.length;--e>=0;){const o=n[e];if(i==(o.mangled_name||o.unmangleable(t)&&o.name))continue e}return i}}}Xn.next_id=1,xe.DEFMETHOD("figure_out_scope",(function(e){e=r(e,{cache:null,ie8:!1,safari10:!1});var t=this.parent_scope=null,n=new Map,i=null,o=null,a=[],s=new Cn((r,c)=>{if(r.is_block_scope()){const n=t;r.block_scope=t=new we(r),t._block_scope=!0;const i=r instanceof ot?n.parent_scope:n;if(t.init_scope_vars(i),t.uses_with=n.uses_with,t.uses_eval=n.uses_eval,e.safari10&&(r instanceof Oe||r instanceof Fe)&&a.push(t),r instanceof Qe){const e=t;t=n,r.expression.walk(s),t=e;for(let e=0;ee===r||(r instanceof Gt?e instanceof $t:!(e instanceof Xt||e instanceof Ht)))||Q(`"${r.name}" is redeclared`,r.start.file,r.start.line,r.start.col,r.start.pos),r instanceof zt||u(h,2),i!==t){r.mark_enclosed();var h=t.find_variable(r);r.thedef!==h&&(r.thedef=h,r.reference())}}else if(r instanceof an){var E=n.get(r.name);if(!E)throw new Error(d("Undefined label {name} [{line},{col}]",{name:r.name,line:r.start.line,col:r.start.col}));r.thedef=E}t instanceof xe||!(r instanceof _t||r instanceof pt)||Q(`"${r.TYPE}" statement may only appear at the top level`,r.start.file,r.start.line,r.start.col,r.start.pos)}});function u(e,t){if(o){var n=0;do{t++}while(s.parent(n++)!==o)}var i=s.parent(t);if(e.export=i instanceof _t?1:0){var r=i.exported_definition;(r instanceof Pe||r instanceof Lt)&&i.is_default&&(e.export=2)}}this.walk(s),this.globals=new Map;s=new Cn(e=>{if(e instanceof Ye&&e.label)return e.label.thedef.references.push(e),!0;if(e instanceof nn){var t,n=e.name;if("eval"==n&&s.parent()instanceof dt)for(var i=e.scope;i&&!i.uses_eval;i=i.parent_scope)i.uses_eval=!0;return s.parent()instanceof ft&&s.parent(1).module_name||!(t=e.scope.find_variable(n))?(t=this.def_global(e),e instanceof on&&(t.export=1)):t.scope instanceof ke&&"arguments"==n&&(t.scope.uses_arguments=!0),e.thedef=t,e.reference(),!e.scope.is_block_scope()||t.orig[0]instanceof Gt||(e.scope=e.scope.get_defun_scope()),!0}var o;if(e instanceof Jt&&(o=zn(e.definition())))for(i=e.scope;i&&(_(i.enclosed,o),i!==o.scope);)i=i.parent_scope});if(this.walk(s),(e.ie8||e.safari10)&&Tn(this,e=>{if(e instanceof Jt){var t=e.name,n=e.thedef.references,i=e.scope.get_defun_scope(),o=i.find_variable(t)||this.globals.get(t)||i.def_variable(e);return n.forEach((function(e){e.thedef=o,e.reference()})),e.thedef=o,e.reference(),!0}}),e.safari10)for(const e of a)e.parent_scope.variables.forEach((function(t){_(e.enclosed,t)}))})),xe.DEFMETHOD("def_global",(function(e){var t=this.globals,n=e.name;if(t.has(n))return t.get(n);var i=new Xn(this,e);return i.undeclared=!0,i.global=!0,t.set(n,i),i})),we.DEFMETHOD("init_scope_vars",(function(e){this.variables=new Map,this.functions=new Map,this.uses_with=!1,this.uses_eval=!1,this.parent_scope=e,this.enclosed=[],this.cname=-1,this._var_name_cache=null})),we.DEFMETHOD("var_names",(function e(){var t=this._var_name_cache;return t||(this._var_name_cache=t=new Set(this.parent_scope?e.call(this.parent_scope):null),this._added_var_names&&this._added_var_names.forEach(e=>{t.add(e)}),this.enclosed.forEach((function(e){t.add(e.name)})),this.variables.forEach((function(e,n){t.add(n)}))),t})),we.DEFMETHOD("add_var_name",(function(e){this._added_var_names||(this._added_var_names=new Set),this._added_var_names.add(e),this._var_name_cache||this.var_names(),this._var_name_cache.add(e)})),we.DEFMETHOD("add_child_scope",(function(e){if(e.parent_scope===this)return;e.parent_scope=this,e._var_name_cache=null,e._added_var_names&&e._added_var_names.forEach(t=>e.add_var_name(t));const t=new Set(e.enclosed),n=(()=>{const e=[];let t=this;do{e.push(t)}while(t=t.parent_scope);return e.reverse(),e})(),i=[];for(const e of n){i.forEach(t=>_(e.enclosed,t));for(const n of e.variables.values())t.has(n)&&(_(i,n),_(e.enclosed,n))}})),fe.DEFMETHOD("is_block_scope",s),kt.DEFMETHOD("is_block_scope",s),ke.DEFMETHOD("is_block_scope",s),xe.DEFMETHOD("is_block_scope",s),et.DEFMETHOD("is_block_scope",s),ge.DEFMETHOD("is_block_scope",u),we.DEFMETHOD("is_block_scope",(function(){return this._block_scope||!1})),Te.DEFMETHOD("is_block_scope",u),ke.DEFMETHOD("init_scope_vars",(function(){we.prototype.init_scope_vars.apply(this,arguments),this.uses_arguments=!1,this.def_variable(new zt({name:"arguments",start:this.start,end:this.end}))})),Ve.DEFMETHOD("init_scope_vars",(function(){we.prototype.init_scope_vars.apply(this,arguments),this.uses_arguments=!1})),Pt.DEFMETHOD("mark_enclosed",(function(){for(var e=this.definition(),t=this.scope;t&&(_(t.enclosed,e),t!==e.scope);)t=t.parent_scope})),Pt.DEFMETHOD("reference",(function(){this.definition().references.push(this),this.mark_enclosed()})),we.DEFMETHOD("find_variable",(function(e){return e instanceof Pt&&(e=e.name),this.variables.get(e)||this.parent_scope&&this.parent_scope.find_variable(e)})),we.DEFMETHOD("def_function",(function(e,t){var n=this.def_variable(e,t);return(!n.init||n.init instanceof Pe)&&(n.init=t),this.functions.set(e.name,n),n})),we.DEFMETHOD("def_variable",(function(e,t){var n=this.variables.get(e.name);return n?(n.orig.push(e),n.init&&(n.scope!==e.scope||n.init instanceof Le)&&(n.init=t)):(n=new Xn(this,e,t),this.variables.set(e.name,n),n.global=!this.parent_scope),e.thedef=n})),we.DEFMETHOD("next_mangled",(function(e){return Wn(this,e)})),xe.DEFMETHOD("next_mangled",(function(e){let t;const n=this.mangled_names;do{t=Wn(this,e)}while(n.has(t));return t})),Le.DEFMETHOD("next_mangled",(function(e,t){for(var n=t.orig[0]instanceof zt&&this.name&&this.name.definition(),i=n?n.mangled_name||n.name:null;;){var o=Wn(this,e);if(!i||i!=o)return o}})),Pt.DEFMETHOD("unmangleable",(function(e){var t=this.definition();return!t||t.unmangleable(e)})),tn.DEFMETHOD("unmangleable",s),Pt.DEFMETHOD("unreferenced",(function(){return!this.definition().references.length&&!this.scope.pinned()})),Pt.DEFMETHOD("definition",(function(){return this.thedef})),Pt.DEFMETHOD("global",(function(){return this.thedef.global})),xe.DEFMETHOD("_default_mangler_options",(function(e){return(e=r(e,{eval:!1,ie8:!1,keep_classnames:!1,keep_fnames:!1,module:!1,reserved:[],toplevel:!1})).module&&(e.toplevel=!0),Array.isArray(e.reserved)||e.reserved instanceof Set||(e.reserved=[]),e.reserved=new Set(e.reserved),e.reserved.add("arguments"),e})),xe.DEFMETHOD("mangle_names",(function(e){e=this._default_mangler_options(e);var t=-1,n=[];e.keep_fnames&&(Gn=new Set);const i=this.mangled_names=new Set;e.cache&&(this.globals.forEach(r),e.cache.props&&e.cache.props.forEach((function(e){i.add(e)})));var o=new Cn((function(i,o){if(i instanceof Ae){var a=t;return o(),t=a,!0}if(i instanceof we)i.variables.forEach(r);else if(i.is_block_scope())i.block_scope.variables.forEach(r);else if(Gn&&i instanceof lt&&i.value instanceof ke&&!i.value.name&&S(e.keep_fnames,i.name.name))Gn.add(i.name.definition().id);else{if(i instanceof tn){let e;do{e=Yn(++t)}while(O.has(e));return i.mangled_name=e,!0}!e.ie8&&!e.safari10&&i instanceof Jt&&n.push(i.definition())}}));function r(t){!(e.reserved.has(t.name)||1&t.export)&&n.push(t)}this.walk(o),(e.keep_fnames||e.keep_classnames)&&(Hn=new Set,n.forEach(t=>{t.name.length<6&&t.unmangleable(e)&&Hn.add(t.name)})),n.forEach(t=>{t.mangle(e)}),Gn=null,Hn=null})),xe.DEFMETHOD("find_colliding_names",(function(e){const t=e.cache&&e.cache.props,n=new Set;return e.reserved.forEach(i),this.globals.forEach(o),this.walk(new Cn((function(e){e instanceof we&&e.variables.forEach(o),e instanceof Jt&&o(e.definition())}))),n;function i(e){n.add(e)}function o(n){var o=n.name;if(n.global&&t&&t.has(o))o=t.get(o);else if(!n.unmangleable(e))return;i(o)}})),xe.DEFMETHOD("expand_names",(function(e){Yn.reset(),Yn.sort(),e=this._default_mangler_options(e);var t=this.find_colliding_names(e),n=0;function i(i){if(i.global&&e.cache)return;if(i.unmangleable(e))return;if(e.reserved.has(i.name))return;const o=zn(i),r=i.name=o?o.name:function(){var e;do{e=Yn(n++)}while(t.has(e)||O.has(e));return e}();i.orig.forEach((function(e){e.name=r})),i.references.forEach((function(e){e.name=r}))}this.globals.forEach(i),this.walk(new Cn((function(e){e instanceof we&&e.variables.forEach(i),e instanceof Jt&&i(e.definition())})))})),fe.DEFMETHOD("tail_node",c),ht.DEFMETHOD("tail_node",(function(){return this.expressions[this.expressions.length-1]})),xe.DEFMETHOD("compute_char_frequency",(function(e){e=this._default_mangler_options(e);try{fe.prototype.print=function(t,n){this._print(t,n),this instanceof Pt&&!this.unmangleable(e)?Yn.consider(this.name,-1):e.properties&&(this instanceof gt?Yn.consider(this.property,-1):this instanceof Dt&&function e(t){t instanceof ln?Yn.consider(t.value,-1):t instanceof yt?(e(t.consequent),e(t.alternative)):t instanceof ht&&e(t.tail_node())}(this.property))},Yn.consider(this.print_to_string(),1)}finally{fe.prototype.print=fe.prototype._print}Yn.sort()}));const Yn=(()=>{const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_".split(""),t="0123456789".split("");let n,i;function o(){i=new Map,e.forEach((function(e){i.set(e,0)})),t.forEach((function(e){i.set(e,0)}))}function r(e,t){return i.get(t)-i.get(e)}function a(e){var t="",i=54;e++;do{e--,t+=n[e%i],e=Math.floor(e/i),i=64}while(e>0);return t}return a.consider=function(e,t){for(var n=e.length;--n>=0;)i.set(e[n],i.get(e[n])+t)},a.sort=function(){n=h(e,r).concat(h(t,r))},a.reset=o,o(),a})();function qn(){const e={};return Object.keys($n({0:0})).forEach(t=>{const n=$n({[t]:{0:0}});n&&(e[t]=n)}),e}function $n(e){var t=Eo("",e);return t.error&&t.error.defs}let jn=void 0;fe.prototype.size=function(e,t){jn=qn.mangle;let n=0;return yn(this,(e,t)=>{n+=e._size(t)},t||e&&e.stack),jn=void 0,n},fe.prototype._size=()=>0,_e.prototype._size=()=>8,de.prototype._size=function(){return 2+this.value.length};const Zn=e=>e.length&&e.length-1;ge.prototype._size=function(){return 2+Zn(this.body)},xe.prototype._size=function(){return Zn(this.body)},Se.prototype._size=()=>1,Ae.prototype._size=()=>2,be.prototype._size=()=>9,Ce.prototype._size=()=>7,Oe.prototype._size=()=>8,Fe.prototype._size=()=>8,Re.prototype._size=()=>6,Ne.prototype._size=()=>3;const Jn=e=>(e.is_generator?1:0)+(e.async?6:0);Ie.prototype._size=function(){return Jn(this)+4+Zn(this.argnames)+Zn(this.body)},Le.prototype._size=function(e){return 2*!!kn(e)+Jn(this)+12+Zn(this.argnames)+Zn(this.body)},Pe.prototype._size=function(){return Jn(this)+13+Zn(this.argnames)+Zn(this.body)},Ve.prototype._size=function(){let e=2+Zn(this.argnames);return 1===this.argnames.length&&this.argnames[0]instanceof Pt||(e+=2),Jn(this)+e+Array.isArray(this.body)?Zn(this.body):this.body._size()},Be.prototype._size=()=>2,Ue.prototype._size=function(){return 2+3*Math.floor(this.segments.length/2)},Ge.prototype._size=function(){return this.value.length},ze.prototype._size=function(){return this.value?7:6},We.prototype._size=()=>6,qe.prototype._size=function(){return this.label?6:5},$e.prototype._size=function(){return this.label?9:8},Je.prototype._size=()=>4,Qe.prototype._size=function(){return 8+Zn(this.body)},nt.prototype._size=function(){return 5+Zn(this.body)},tt.prototype._size=function(){return 8+Zn(this.body)},it.prototype._size=function(){return 3+Zn(this.body)},ot.prototype._size=function(){let e=7+Zn(this.body);return this.argname&&(e+=2),e},rt.prototype._size=function(){return 7+Zn(this.body)};const Qn=(e,t)=>e+Zn(t.definitions);st.prototype._size=function(){return Qn(4,this)},ut.prototype._size=function(){return Qn(4,this)},ct.prototype._size=function(){return Qn(6,this)},lt.prototype._size=function(){return this.value?1:0},ft.prototype._size=function(){return this.name?4:0},pt.prototype._size=function(){let e=6;return this.imported_name&&(e+=1),(this.imported_name||this.imported_names)&&(e+=5),this.imported_names&&(e+=2+Zn(this.imported_names)),e},_t.prototype._size=function(){let e=7+(this.is_default?8:0);return this.exported_value&&(e+=this.exported_value._size()),this.exported_names&&(e+=2+Zn(this.exported_names)),this.module_name&&(e+=5),e},dt.prototype._size=function(){return 2+Zn(this.args)},mt.prototype._size=function(){return 6+Zn(this.args)},ht.prototype._size=function(){return Zn(this.expressions)},gt.prototype._size=function(){return this.property.length+1},Dt.prototype._size=()=>2,St.prototype._size=function(){return"typeof"===this.operator?7:"void"===this.operator?5:this.operator.length},Tt.prototype._size=function(e){if("in"===this.operator)return 4;let t=this.operator.length;return("+"===this.operator||"-"===this.operator)&&this.right instanceof St&&this.right.operator===this.operator&&(t+=1),this.needs_parens(e)&&(t+=2),t},yt.prototype._size=()=>3,Ot.prototype._size=function(){return 2+Zn(this.elements)},Ft.prototype._size=function(e){let t=2;return kn(e)&&(t+=2),t+Zn(this.properties)};const ei=e=>"string"==typeof e?e.length:0;Rt.prototype._size=function(){return ei(this.key)+1};const ti=e=>e?7:0;xt.prototype._size=function(){return 5+ti(this.static)+ei(this.key)},wt.prototype._size=function(){return 5+ti(this.static)+ei(this.key)},Nt.prototype._size=function(){return ti(this.static)+ei(this.key)+Jn(this)},kt.prototype._size=function(){return(this.name?8:7)+(this.extends?8:0)},It.prototype._size=function(){return ti(this.static)+("string"==typeof this.key?this.key.length+2:0)+(this.value?1:0)},Pt.prototype._size=function(){return!jn||this.definition().unmangleable(jn)?this.name.length:2},qt.prototype._size=function(){return this.name.length},nn.prototype._size=function(){const{name:e,thedef:t}=this;return t&&t.global?e.length:"arguments"===e?9:2},Bt.prototype._size=()=>10,en.prototype._size=function(){return this.name.length},rn.prototype._size=function(){return this.name.length},sn.prototype._size=()=>4,un.prototype._size=()=>5,ln.prototype._size=function(){return this.value.length+2},fn.prototype._size=function(){const{value:e}=this;return 0===e?1:e>0&&Math.floor(e)===e?Math.floor(Math.log10(e)+1):e.toString().length},pn.prototype._size=function(){return this.value.length},_n.prototype._size=function(){return this.value.toString().length},mn.prototype._size=()=>4,hn.prototype._size=()=>3,En.prototype._size=()=>6,gn.prototype._size=()=>0,Dn.prototype._size=()=>8,An.prototype._size=()=>4,vn.prototype._size=()=>5,je.prototype._size=()=>6,Ze.prototype._size=()=>6;const ni=(e,t)=>e.flags&t,ii=(e,t)=>{e.flags|=t},oi=(e,t)=>{e.flags&=~t};class ri extends Cn{constructor(e,t){super(),void 0===e.defaults||e.defaults||(t=!0),this.options=r(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:null,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_symbols:!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]&&D(n,i)&&(n[i.slice(1)]=ue(n[i],{expression:!0}));!0===this.options.inline&&(this.options.inline=3);var o=this.options.pure_funcs;this.pure_funcs="function"==typeof o?o:o?function(e){return!o.includes(e.expression.print_to_string())}:u;var a=this.options.top_retain;a instanceof RegExp?this.top_retain=function(e){return a.test(e.name)}:"function"==typeof a?this.top_retain=a:a&&("string"==typeof a&&(a=a.split(/,/)),this.top_retain=function(e){return a.includes(e.name)}),this.options.module&&(this.directives["use strict"]=!0,this.options.toplevel=!0);var s=this.options.toplevel;this.toplevel="string"==typeof s?{funcs:/funcs/.test(s),vars:/vars/.test(s)}:{funcs:s,vars:s};var c=this.options.sequences;this.sequences_limit=1==c?800:0|c,this.warnings_produced={},this.evaluated_regexps=new Map}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){let t=0;if(Tn(e,()=>{t++}),this.info("pass "+r+": last_count: "+n+", count: "+t),t=0;){if(!(o[r]instanceof Rt))return;n||o[r].key!==t||(n=o[r].value)}}return n instanceof nn&&n.fixed_value()||n}}function ui(e,t,n,i,o,r){var a=t.parent(o),s=ki(n,a);if(s)return s;if(!r&&a instanceof dt&&a.expression===n&&!(i instanceof Ve)&&!(i instanceof kt)&&!a.is_expr_pure(e)&&(!(i instanceof Le)||!(a instanceof mt)&&i.contains_this()))return!0;if(a instanceof Ot)return ui(e,t,a,a,o+1);if(a instanceof Rt&&n===a.value){var u=t.parent(o+1);return ui(e,t,u,u,o+2)}if(a instanceof Et&&a.expression===n){var c=si(i,a.property);return!r&&ui(e,t,a,c,o+1)}}function ci(e){return e instanceof Ve||e instanceof Le}function li(e){if(e instanceof sn)return!0;if(e instanceof nn)return e.definition().orig[0]instanceof $t;if(e instanceof Et){if((e=e.expression)instanceof nn){if(e.is_immutable())return!1;e=e.fixed_value()}return!e||!(e instanceof _n)&&(e instanceof cn||li(e))}return!1}function fi(e,t){if(!(e instanceof nn))return!1;for(var n=e.definition().orig,i=n.length;--i>=0;)if(n[i]instanceof t)return!0}function pi(e,t){for(let n=0;;n++){const i=e.parent(n);if(i instanceof xe)return t?i:void 0;if(i instanceof ke)return i;if(i.block_scope)return i.block_scope}}function _i(e,t){for(var n,i=0;(n=e.parent(i++))&&!(n instanceof we);)if(n instanceof ot&&n.argname){n=n.argname.definition().scope;break}return n.find_variable(t)}function di(e,t){if(1==t.length)return t[0];if(0==t.length)throw new Error("trying to create a sequence with length zero!");return p(ht,e,{expressions:t.reduce(Ei,[])})}function mi(e,t){switch(typeof e){case"string":return p(ln,t,{value:e});case"number":return isNaN(e)?p(hn,t):isFinite(e)?1/e<0?p(vt,t,{operator:"-",expression:p(fn,t,{value:-e})}):p(fn,t,{value:e}):e<0?p(vt,t,{operator:"-",expression:p(Dn,t)}):p(Dn,t);case"boolean":return p(e?An:vn,t);case"undefined":return p(En,t);default:if(null===e)return p(mn,t,{value:null});if(e instanceof RegExp)return p(_n,t,{value:{source:A(e.source),flags:e.flags}});throw new Error(d("Can't handle constant of type: {type}",{type:typeof e}))}}function hi(e,t,n){return e instanceof vt&&"delete"==e.operator||e instanceof dt&&e.expression===t&&(n instanceof Et||n instanceof nn&&"eval"==n.name)?di(t,[p(fn,t,{value:0}),n]):n}function Ei(e,t){return t instanceof ht?e.push(...t.expressions):e.push(t),e}function gi(e){if(null===e)return[];if(e instanceof De)return e.body;if(e instanceof Se)return[];if(e instanceof pe)return[e];throw new Error("Can't convert thing to statement array")}function Di(e){return null===e||(e instanceof Se||e instanceof De&&0==e.body.length)}function Si(e){return!(e instanceof Lt||e instanceof Pe||e instanceof ut||e instanceof ct||e instanceof _t||e instanceof pt)}function vi(e){return e instanceof Te&&e.body instanceof De?e.body:e}function Ai(e){return"Call"==e.TYPE&&(e.expression instanceof Le||Ai(e.expression))}function Ti(e){return e instanceof nn&&e.definition().undeclared}ai(fe,(function(e){return e})),xe.DEFMETHOD("drop_console",(function(){return this.transform(new On((function(e){if("Call"==e.TYPE){var t=e.expression;if(t instanceof Et){for(var n=t.expression;n.expression;)n=n.expression;if(Ti(n)&&"console"==n.name)return p(En,e)}}})))})),fe.DEFMETHOD("equivalent_to",(function(e){return((e,t)=>{if(!Bn(e,t))return!1;const n=[e],i=[t],o=n.push.bind(n),r=i.push.bind(i);for(;n.length&&i.length;){const e=n.pop(),t=i.pop();if(!Bn(e,t))return!1;e._children_backwards(o),t._children_backwards(r)}return 0==n.length&&0==i.length})(this,e)})),we.DEFMETHOD("process_expression",(function(e,t){var n=this,i=new On((function(o){if(e&&o instanceof me)return p(ze,o,{value:o.body});if(!e&&o instanceof ze){if(t){var r=o.value&&o.value.drop_side_effect_free(t,!0);return r?p(me,o,{body:r}):p(Se,o)}return p(me,o,{body:o.value||p(vt,o,{operator:"void",expression:p(fn,o,{value:0})})})}if(o instanceof kt||o instanceof ke&&o!==n)return o;if(o instanceof ge){var a=o.body.length-1;a>=0&&(o.body[a]=o.body[a].transform(i))}else o instanceof Je?(o.body=o.body.transform(i),o.alternative&&(o.alternative=o.alternative.transform(i))):o instanceof Re&&(o.body=o.body.transform(i));return o}));n.transform(i)})),function(e){function t(e,t){t.assignments=0,t.chained=!1,t.direct_access=!1,t.escaped=0,t.recursive_refs=0,t.references=[],t.should_replace=void 0,t.single_use=void 0,t.scope.pinned()?t.fixed=!1:t.orig[0]instanceof Ht||!e.exposed(t)?t.fixed=t.init:t.fixed=!1}function n(e,n,i){i.variables.forEach((function(i){t(n,i),null===i.fixed?(e.defs_to_safe_ids.set(i.id,e.safe_ids),s(e,i,!0)):i.fixed&&(e.loop_ids.set(i.id,e.in_loop),s(e,i,!0))}))}function i(e,n){n.block_scope&&n.block_scope.variables.forEach(n=>{t(e,n)})}function o(e){e.safe_ids=Object.create(e.safe_ids)}function r(e){e.safe_ids=Object.getPrototypeOf(e.safe_ids)}function s(e,t,n){e.safe_ids[t.id]=n}function u(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 zt||"arguments"==n.name)return!1;t.fixed=p(En,n)}return!0}return t.fixed instanceof Pe}function c(e,t,n,i){if(void 0===t.fixed)return!0;let o;return null===t.fixed&&(o=e.defs_to_safe_ids.get(t.id))?(o[t.id]=!1,e.defs_to_safe_ids.delete(t.id),!0):!!D(e.safe_ids,t.id)&&(!!u(e,t)&&(!1!==t.fixed&&(!(null!=t.fixed&&(!i||t.references.length>t.assignments))&&(t.fixed instanceof Pe?i instanceof fe&&t.fixed.parent_scope===n:t.orig.every(e=>!(e instanceof Ht||e instanceof Wt||e instanceof $t))))))}function l(e,t,n,i,o,r,a){var s=e.parent(r);if(o){if(o.is_constant())return;if(o instanceof Vt)return}if(s instanceof bt&&"="==s.operator&&i===s.right||s instanceof dt&&(i!==s.expression||s instanceof mt)||s instanceof Xe&&i===s.value&&i.scope!==t.scope||s instanceof lt&&i===s.value||s instanceof Ze&&i===s.value&&i.scope!==t.scope)return!(a>1)||o&&o.is_constant_expression(n)||(a=1),void((!t.escaped||t.escaped>a)&&(t.escaped=a));if(s instanceof Ot||s instanceof je||s instanceof Tt&&xi.has(s.operator)||s instanceof yt&&i!==s.condition||s instanceof Ne||s instanceof ht&&i===s.tail_node())l(e,t,n,s,s,r+1,a);else if(s instanceof Rt&&i===s.value){var u=e.parent(r+1);l(e,t,n,u,u,r+2,a)}else if(s instanceof Et&&i===s.expression&&(l(e,t,n,s,o=si(o,s.property),r+1,a+1),o))return;r>0||s instanceof ht&&i!==s.tail_node()||s instanceof me||(t.direct_access=!0)}e(fe,a);const f=e=>Tn(e,e=>{if(e instanceof Pt){var t=e.definition();t&&(e instanceof nn&&t.references.push(e),t.fixed=!1)}});e(Ie,(function(e,t,i){return o(e),n(e,i,this),t(),r(e),!0})),e(bt,(function(e,t,n){var i=this;if(i.left instanceof Be)f(i.left);else{var o=i.left;if(o instanceof nn){var r=o.definition(),a=c(e,r,o.scope,i.right);if(r.assignments++,a){var u=r.fixed;if(u||"="==i.operator){var _="="==i.operator,d=_?i.right:i;if(!ui(n,e,i,d,0))return r.references.push(o),_||(r.chained=!0),r.fixed=_?function(){return i.right}:function(){return p(Tt,i,{operator:i.operator.slice(0,-1),left:u instanceof fe?u:u(),right:i.right})},s(e,r,!1),i.right.walk(e),s(e,r,!0),l(e,r,o.scope,i,d,0,1),!0}}}}})),e(Tt,(function(e){if(xi.has(this.operator))return this.left.walk(e),o(e),this.right.walk(e),r(e),!0})),e(ge,(function(e,t,n){i(n,this)})),e(nt,(function(e){return o(e),this.expression.walk(e),r(e),o(e),he(this,e),r(e),!0})),e(kt,(function(e,t){return oi(this,16),o(e),t(),r(e),!0})),e(yt,(function(e){return this.condition.walk(e),o(e),this.consequent.walk(e),r(e),o(e),this.alternative.walk(e),r(e),!0})),e(tt,(function(e,t){return o(e),t(),r(e),!0})),e(ke,(function(e,t,i){return oi(this,16),o(e),n(e,i,this),this.uses_arguments?(t(),void r(e)):(!this.name&&(a=e.parent())instanceof dt&&a.expression===this&&!a.args.some(e=>e instanceof Ne)&&this.argnames.every(e=>e instanceof Pt)&&this.argnames.forEach((t,n)=>{if(t.definition){var i=t.definition();i.orig.length>1||(void 0!==i.fixed||this.uses_arguments&&!e.has_directive("use strict")?i.fixed=!1:(i.fixed=function(){return a.args[n]||p(En,a)},e.loop_ids.set(i.id,e.in_loop),s(e,i,!0)))}}),t(),r(e),!0);var a})),e(be,(function(e,t,n){i(n,this);const a=e.in_loop;return e.in_loop=this,o(e),this.body.walk(e),qi(this)&&(r(e),o(e)),this.condition.walk(e),r(e),e.in_loop=a,!0})),e(Oe,(function(e,t,n){i(n,this),this.init&&this.init.walk(e);const a=e.in_loop;return e.in_loop=this,o(e),this.condition&&this.condition.walk(e),this.body.walk(e),this.step&&(qi(this)&&(r(e),o(e)),this.step.walk(e)),r(e),e.in_loop=a,!0})),e(Fe,(function(e,t,n){i(n,this),f(this.init),this.object.walk(e);const a=e.in_loop;return e.in_loop=this,o(e),this.body.walk(e),r(e),e.in_loop=a,!0})),e(Je,(function(e){return this.condition.walk(e),o(e),this.body.walk(e),r(e),this.alternative&&(o(e),this.alternative.walk(e),r(e)),!0})),e(Ae,(function(e){return o(e),this.body.walk(e),r(e),!0})),e(Jt,(function(){this.definition().fixed=!1})),e(nn,(function(e,t,n){var i,o,r=this.definition();r.references.push(this),1==r.references.length&&!r.fixed&&r.orig[0]instanceof Wt&&e.loop_ids.set(r.id,e.in_loop),void 0!==r.fixed&&u(e,r)?r.fixed&&((i=this.fixed_value())instanceof ke&&Zi(e,r)?r.recursive_refs++:i&&!n.exposed(r)&&function(e,t,n){return t.option("unused")&&!n.scope.pinned()&&n.references.length-n.recursive_refs==1&&e.loop_ids.get(n.id)===e.in_loop}(e,n,r)?r.single_use=i instanceof ke&&!i.pinned()||i instanceof kt||r.scope===this.scope&&i.is_constant_expression():r.single_use=!1,ui(n,e,this,i,0,!!(o=i)&&(o.is_constant()||o instanceof ke||o instanceof sn))&&(r.single_use?r.single_use="m":r.fixed=!1)):r.fixed=!1,l(e,r,this.scope,this,i,0,1)})),e(xe,(function(e,i,o){this.globals.forEach((function(e){t(o,e)})),n(e,o,this)})),e(it,(function(e,t,n){return i(n,this),o(e),he(this,e),r(e),this.bcatch&&(o(e),this.bcatch.walk(e),r(e)),this.bfinally&&this.bfinally.walk(e),!0})),e(St,(function(e){var t=this;if("++"===t.operator||"--"===t.operator){var n=t.expression;if(n instanceof nn){var i=n.definition(),o=c(e,i,n.scope,!0);if(i.assignments++,o){var r=i.fixed;if(r)return i.references.push(n),i.chained=!0,i.fixed=function(){return p(Tt,t,{operator:t.operator.slice(0,-1),left:p(vt,t,{operator:"+",expression:r instanceof fe?r:r()}),right:p(fn,t,{value:1})})},s(e,i,!0),!0}}}})),e(lt,(function(e,t){var n=this;if(n.name instanceof Be)f(n.name);else{var i=n.name.definition();if(n.value){if(c(e,i,n.name.scope,n.value))return i.fixed=function(){return n.value},e.loop_ids.set(i.id,e.in_loop),s(e,i,!1),t(),s(e,i,!0),!0;i.fixed=!1}}})),e(Ce,(function(e,t,n){i(n,this);const a=e.in_loop;return e.in_loop=this,o(e),t(),r(e),e.in_loop=a,!0}))}((function(e,t){e.DEFMETHOD("reduce_vars",t)})),xe.DEFMETHOD("reset_opt_flags",(function(e){const t=this,n=e.option("reduce_vars"),i=new Cn((function(o,r){if(oi(o,1792),n)return e.top_retain&&o instanceof Pe&&i.parent()===t&&ii(o,1024),o.reduce_vars(i,r,e)}));i.safe_ids=Object.create(null),i.in_loop=null,i.loop_ids=new Map,i.defs_to_safe_ids=new Map,t.walk(i)})),Pt.DEFMETHOD("fixed_value",(function(){var e=this.thedef.fixed;return!e||e instanceof fe?e:e()})),nn.DEFMETHOD("is_immutable",(function(){var e=this.definition().orig;return 1==e.length&&e[0]instanceof $t}));var yi=E("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");nn.DEFMETHOD("is_declared",(function(e){return!this.definition().undeclared||e.option("unsafe")&&yi.has(this.name)}));var bi,Ci=E("Infinity NaN undefined");function Oi(e){return e instanceof Dn||e instanceof hn||e instanceof En}function Fi(e,t){var n,o,r=t.find_parent(we).get_defun_scope();!function(){var e=t.self(),i=0;do{if(e instanceof ot||e instanceof rt)i++;else if(e instanceof Te)n=!0;else{if(e instanceof we){r=e;break}e instanceof it&&(o=!0)}}while(e=t.parent(i++))}();var a,s=10;do{a=!1,c(e),t.option("dead_code")&&_(e,t),t.option("if_return")&&l(e,t),t.sequences_limit>0&&(h(e,t),g(e,t)),t.option("join_vars")&&S(e),t.option("collapse_vars")&&u(e,t)}while(a&&s-- >0);function u(e,t){if(r.pinned())return e;for(var s,u=[],c=e.length,l=new On((function(e){if(M)return e;if(!F)return e!==d[m]?e:++m=0;){0==c&&t.option("unused")&&V();var d=[];for(P(e[c]);u.length>0;){d=u.pop();var m=0,h=d[d.length-1],E=null,g=null,D=null,S=B(h);if(S&&!li(S)&&!S.has_side_effects(t)){var v=U(h),A=H(S);S instanceof nn&&v.set(S.name,!1);var y=X(h),b=z(),C=h.may_throw(t),O=h.name instanceof zt,F=O,M=!1,R=0,w=!s||!F;if(!w){for(var x=t.self().argnames.lastIndexOf(h.name)+1;!M&&xR)R=!1;else{M=!1,m=0,F=O;for(N=c;!M&&N!(e instanceof Ne))){var o=t.has_directive("use strict");o&&!i(o,n.body)&&(o=!1);var r=n.argnames.length;s=e.args.slice(r);for(var a=new Set,c=r;--c>=0;){var l=n.argnames[c],f=e.args[c];const i=l.definition&&l.definition();if(!(i&&i.orig.length>1)&&(s.unshift(p(lt,l,{name:l,value:f})),!a.has(l.name)))if(a.add(l.name),l instanceof Ne){var _=e.args.slice(c);_.every(e=>!L(n,e,o))&&u.unshift([p(lt,l,{name:l.expression,value:p(Ot,e,{elements:_})})])}else f?(f instanceof ke&&f.pinned()||L(n,f,o))&&(f=null):f=p(En,l).transform(t),f&&u.unshift([p(lt,l,{name:l,value:f})])}}}function P(e){if(d.push(e),e instanceof bt)e.left.has_side_effects(t)||u.push(d.slice()),P(e.right);else if(e instanceof Tt)P(e.left),P(e.right);else if(e instanceof dt&&!T(e,Rn))P(e.expression),e.args.forEach(P);else if(e instanceof nt)P(e.expression);else if(e instanceof yt)P(e.condition),P(e.consequent),P(e.alternative);else if(!(e instanceof at)||!t.option("unused")&&e instanceof ct)e instanceof ye?(P(e.condition),e.body instanceof ge||P(e.body)):e instanceof Xe?e.value&&P(e.value):e instanceof Oe?(e.init&&P(e.init),e.condition&&P(e.condition),e.step&&P(e.step),e.body instanceof ge||P(e.body)):e instanceof Fe?(P(e.object),e.body instanceof ge||P(e.body)):e instanceof Je?(P(e.condition),e.body instanceof ge||P(e.body),!e.alternative||e.alternative instanceof ge||P(e.alternative)):e instanceof ht?e.expressions.forEach(P):e instanceof me?P(e.body):e instanceof Qe?(P(e.expression),e.body.forEach(P)):e instanceof St?"++"!=e.operator&&"--"!=e.operator||u.push(d.slice()):e instanceof lt&&e.value&&(u.push(d.slice()),P(e.value));else{var n=e.definitions.length,i=n-200;for(i<0&&(i=0);i1&&!(e.name instanceof zt)||(o>1?function(e){var t=e.value;if(t instanceof nn&&"arguments"!=t.name){var n=t.definition();if(!n.undeclared)return E=n}}(e):!t.exposed(n))?p(nn,e.name,e.name):void 0}}function K(e){return e[e instanceof bt?"right":"value"]}function U(e){var n=new Map;if(e instanceof St)return n;var i=new Cn((function(e){for(var o=e;o instanceof Et;)o=o.expression;(o instanceof nn||o instanceof sn)&&n.set(o.name,n.get(o.name)||ui(t,i,e,e,0))}));return K(e).walk(i),n}function G(n){if(n.name instanceof zt){var i=t.parent(),o=t.self().argnames,r=o.indexOf(n.name);if(r<0)i.args.length=Math.min(i.args.length,o.length-1);else{var a=i.args;a[r]&&(a[r]=p(fn,a[r],{value:0}))}return!0}var s=!1;return e[c].transform(new On((function(e,t,i){return s?e:e===n||e.body===n?(s=!0,e instanceof lt?(e.value=null,e):i?f.skip:null):void 0}),(function(e){if(e instanceof ht)switch(e.expressions.length){case 0:return null;case 1:return e.expressions[0]}})))}function H(e){for(;e instanceof Et;)e=e.expression;return e instanceof nn&&e.definition().scope===r&&!(n&&(v.has(e.name)||h instanceof St||h instanceof bt&&"="!=h.operator))}function X(e){return e instanceof St?Ni.has(e.operator):K(e).has_side_effects(t)}function z(){if(y)return!1;if(E)return!0;if(S instanceof nn){var e=S.definition();if(e.references.length-e.replaced==(h instanceof lt?1:2))return!0}return!1}function W(e){if(!e.definition)return!0;var t=e.definition();return!(1==t.orig.length&&t.orig[0]instanceof Wt)&&(t.scope.get_defun_scope()!==r||!t.references.every(e=>{var t=e.scope.get_defun_scope();return"Scope"==t.TYPE&&(t=t.parent_scope),t===r}))}}function c(e){for(var t=[],n=0;n=0;){var i=e[n];if(i instanceof Je&&i.body instanceof ze&&++t>1)return!0}return!1}(e),o=n instanceof ke,r=e.length;--r>=0;){var s=e[r],u=S(r),c=e[u];if(o&&!c&&s instanceof ze){if(!s.value){a=!0,e.splice(r,1);continue}if(s.value instanceof vt&&"void"==s.value.operator){a=!0,e[r]=p(me,s,{body:s.value.expression});continue}}if(s instanceof Je){var l;if(E(l=Xi(s.body))){l.label&&m(l.label.thedef.references,l),a=!0,(s=s.clone()).condition=s.condition.negate(t);var f=D(s.body,l);s.body=p(De,s,{body:gi(s.alternative).concat(g())}),s.alternative=p(De,s,{body:f}),e[r]=s.transform(t);continue}if(E(l=Xi(s.alternative))){l.label&&m(l.label.thedef.references,l),a=!0,(s=s.clone()).body=p(De,s.body,{body:gi(s.body).concat(g())});f=D(s.alternative,l);s.alternative=p(De,s.alternative,{body:f}),e[r]=s.transform(t);continue}}if(s instanceof Je&&s.body instanceof ze){var _=s.body.value;if(!_&&!s.alternative&&(o&&!c||c instanceof ze&&!c.value)){a=!0,e[r]=p(me,s.condition,{body:s.condition});continue}if(_&&!s.alternative&&c instanceof ze&&c.value){a=!0,(s=s.clone()).alternative=c,e[r]=s.transform(t),e.splice(u,1);continue}if(_&&!s.alternative&&(!c&&o&&i||c instanceof ze)){a=!0,(s=s.clone()).alternative=c||p(ze,s,{value:null}),e[r]=s.transform(t),c&&e.splice(u,1);continue}var h=e[v(r)];if(t.option("sequences")&&o&&!s.alternative&&h instanceof Je&&h.body instanceof ze&&S(u)==e.length&&c instanceof me){a=!0,(s=s.clone()).alternative=p(De,c,{body:[c,p(ze,c,{value:null})]}),e[r]=s.transform(t),e.splice(u,1);continue}}}function E(i){if(!i)return!1;for(var a=r+1,s=e.length;a=0;){var i=e[n];if(!(i instanceof st&&d(i)))break}return n}}function _(e,t){for(var n,i=t.self(),o=0,r=0,s=e.length;o!e.value)}function h(e,t){if(!(e.length<2)){for(var n=[],i=0,o=0,r=e.length;o=t.sequences_limit&&c();var u=s.body;n.length>0&&(u=u.drop_side_effect_free(t)),u&&Ei(n,u)}else s instanceof at&&d(s)||s instanceof Pe||c(),e[i++]=s}c(),e.length=i,i!=r&&(a=!0)}function c(){if(n.length){var t=di(n[0],n);e[i++]=p(me,t,{body:t}),n=[]}}}function E(e,t){if(!(e instanceof De))return e;for(var n=null,i=0,o=e.body.length;ie instanceof we||(e instanceof Tt&&"in"===e.operator?bn:void 0))||(s.init?s.init=n(s.init):(s.init=i.body,o--,a=!0))}}else s instanceof Fe?s.init instanceof ct||s.init instanceof ut||(s.object=n(s.object)):s instanceof Je?s.condition=n(s.condition):(s instanceof Qe||s instanceof Re)&&(s.expression=n(s.expression));if(t.option("conditionals")&&s instanceof Je){var u=[],c=E(s.body,u),l=E(s.alternative,u);if(!1!==c&&!1!==l&&u.length>0){var f=u.length;u.push(p(Je,s,{condition:s.condition,body:c||p(Se,s.body),alternative:l})),u.unshift(o,1),[].splice.apply(e,u),r+=f,o+=f+1,i=null,a=!0;continue}}e[o++]=s,i=s instanceof me?s:null}e.length=o}function D(e,n){if(e instanceof at){var i,o=e.definitions[e.definitions.length-1];if(o.value instanceof Ft)if(n instanceof bt?i=[n]:n instanceof ht&&(i=n.expressions.slice()),i){var a=!1;do{var s=i[0];if(!(s instanceof bt))break;if("="!=s.operator)break;if(!(s.left instanceof Et))break;var u=s.left.expression;if(!(u instanceof nn))break;if(o.name.name!=u.name)break;if(!s.right.is_constant_expression(r))break;var c=s.left.property;if(c instanceof fe&&(c=c.evaluate(t)),c instanceof fe)break;c=""+c;var l=t.option("ecma")<2015&&t.has_directive("use strict")?function(e){return e.key!=c&&e.key&&e.key.name!=c}:function(e){return e.key&&e.key.name!=c};if(!o.value.properties.every(l))break;var f=o.value.properties.filter((function(e){return e.key===c}))[0];f?f.value=new ht({start:f.start,expressions:[f.value.clone(),s.right.clone()],end:f.end}):o.value.properties.push(p(Rt,s,{key:c,value:s.right})),i.shift(),a=!0}while(i.length);return a&&i}}}function S(e){for(var t,n=0,i=-1,o=e.length;ni instanceof st?(e.warn("Declarations in unreachable code! [{file}:{line},{col}]",i.start),i.remove_initializers(),n.push(i),!0):i instanceof Pe&&(i===t||!e.has_directive("use strict"))?(n.push(i===t?i:p(st,i,{definitions:[p(lt,i,{name:p(Ut,i.name,i.name),value:null})]})),!0):i instanceof we||void 0)}function Ri(e){return e instanceof cn?e.getValue():e instanceof vt&&"void"==e.operator&&e.expression instanceof cn?void 0:e}function wi(e,t){return ni(e,8)||e instanceof En||e instanceof vt&&"void"==e.operator&&!e.expression.has_side_effects(t)}!function(e){function t(e){return/strict/.test(e.option("pure_getters"))}fe.DEFMETHOD("may_throw_on_access",(function(e){return!e.option("pure_getters")||this._dot_throw(e)})),e(fe,t),e(mn,u),e(En,u),e(cn,s),e(Ot,s),e(Ft,(function(e){if(!t(e))return!1;for(var n=this.properties.length;--n>=0;)if(this.properties[n]._dot_throw(e))return!0;return!1})),e(Mt,s),e(xt,u),e(Ne,(function(e){return this.expression._dot_throw(e)})),e(Le,s),e(Ve,s),e(At,s),e(vt,(function(){return"void"==this.operator})),e(Tt,(function(e){return("&&"==this.operator||"||"==this.operator)&&(this.left._dot_throw(e)||this.right._dot_throw(e))})),e(bt,(function(e){return"="==this.operator&&this.right._dot_throw(e)})),e(yt,(function(e){return this.consequent._dot_throw(e)||this.alternative._dot_throw(e)})),e(gt,(function(e){return!!t(e)&&!(this.expression instanceof Le&&"prototype"==this.property)})),e(ht,(function(e){return this.tail_node()._dot_throw(e)})),e(nn,(function(e){if(ni(this,8))return!0;if(!t(e))return!1;if(Ti(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=E("! delete"),n=E("in instanceof == != === !== < <= >= >");e(fe,s),e(vt,(function(){return t.has(this.operator)})),e(Tt,(function(){return n.has(this.operator)||xi.has(this.operator)&&this.left.is_boolean()&&this.right.is_boolean()})),e(yt,(function(){return this.consequent.is_boolean()&&this.alternative.is_boolean()})),e(bt,(function(){return"="==this.operator&&this.right.is_boolean()})),e(ht,(function(){return this.tail_node().is_boolean()})),e(An,u),e(vn,u)}((function(e,t){e.DEFMETHOD("is_boolean",t)})),function(e){e(fe,s),e(fn,u);var t=E("+ - ~ ++ --");e(St,(function(){return t.has(this.operator)}));var n=E("- * / % & | ^ << >> >>>");e(Tt,(function(e){return n.has(this.operator)||"+"==this.operator&&this.left.is_number(e)&&this.right.is_number(e)})),e(bt,(function(e){return n.has(this.operator.slice(0,-1))||"="==this.operator&&this.right.is_number(e)})),e(ht,(function(e){return this.tail_node().is_number(e)})),e(yt,(function(e){return this.consequent.is_number(e)&&this.alternative.is_number(e)}))}((function(e,t){e.DEFMETHOD("is_number",t)})),(bi=function(e,t){e.DEFMETHOD("is_string",t)})(fe,s),bi(ln,u),bi(Ue,(function(){return 1===this.segments.length})),bi(vt,(function(){return"typeof"==this.operator})),bi(Tt,(function(e){return"+"==this.operator&&(this.left.is_string(e)||this.right.is_string(e))})),bi(bt,(function(e){return("="==this.operator||"+="==this.operator)&&this.right.is_string(e)})),bi(ht,(function(e){return this.tail_node().is_string(e)})),bi(yt,(function(e){return this.consequent.is_string(e)&&this.alternative.is_string(e)}));var xi=E("&& ||"),Ni=E("delete ++ --");function ki(e,t){return t instanceof St&&Ni.has(t.operator)?t.expression:t instanceof bt&&t.left===e?e:void 0}function Ii(e,t){return e.size()>t.size()?t:e}function Li(e,t){return Ii(p(me,e,{body:e}),p(me,t,{body:t})).body}function Vi(e,t,n){return(kn(e)?Li:Ii)(t,n)}function Pi(e){const t=new Map;for(var n of Object.keys(e))t.set(n,E(e[n]));return t}!function(e){function t(e,t){e.warn("global_defs "+t.print_to_string()+" redefined [{file}:{line},{col}]",t.start)}xe.DEFMETHOD("resolve_defines",(function(e){return e.option("global_defs")?(this.figure_out_scope({ie8:e.option("ie8")}),this.transform(new On((function(n){var i=n._find_defs(e,"");if(i){for(var o,r=0,a=n;(o=this.parent(r++))&&o instanceof Et&&o.expression===a;)a=o;if(!ki(a,o))return i;t(e,n)}})))):this})),e(fe,a),e(gt,(function(e,t){return this.expression._find_defs(e,"."+this.property+t)})),e(Kt,(function(e){this.global()&&D(e.option("global_defs"),this.name)&&t(e,this)})),e(nn,(function(e,t){if(this.global()){var n=e.option("global_defs"),i=this.name+t;return D(n,i)?function e(t,n){if(t instanceof fe)return p(t.CTOR,n,t);if(Array.isArray(t))return p(Ot,n,{elements:t.map((function(t){return e(t,n)}))});if(t&&"object"==typeof t){var i=[];for(var o in t)D(t,o)&&i.push(p(Rt,n,{key:o,value:e(t[o],n)}));return p(Ft,n,{properties:i})}return mi(t,n)}(n[i],this):void 0}}))}((function(e,t){e.DEFMETHOD("_find_defs",t)}));var Bi=["constructor","toString","valueOf"],Ki=Pi({Array:["indexOf","join","lastIndexOf","slice"].concat(Bi),Boolean:Bi,Function:Bi,Number:["toExponential","toFixed","toPrecision"].concat(Bi),Object:Bi,RegExp:["test"].concat(Bi),String:["charAt","charCodeAt","concat","indexOf","italics","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","trim"].concat(Bi)}),Ui=Pi({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"]});!function(e){fe.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=E("! ~ - + void");fe.DEFMETHOD("is_constant",(function(){return this instanceof cn?!(this instanceof _n):this instanceof vt&&this.expression instanceof cn&&t.has(this.operator)})),e(pe,(function(){throw new Error(d("Cannot evaluate a statement [{file}:{line},{col}]",this.start))})),e(ke,c),e(kt,c),e(fe,c),e(cn,(function(){return this.getValue()})),e(pn,c),e(_n,(function(e){let t=e.evaluated_regexps.get(this);if(void 0===t){try{t=(0,eval)(this.print_to_string())}catch(e){t=null}e.evaluated_regexps.set(this,t)}return t||this})),e(Ue,(function(){return 1!==this.segments.length?this:this.segments[0].value})),e(Le,(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(Ot,(function(e,t){if(e.option("unsafe")){for(var n=[],i=0,o=this.elements.length;i>":o=n>>r;break;case">>>":o=n>>>r;break;case"==":o=n==r;break;case"===":o=n===r;break;case"!=":o=n!=r;break;case"!==":o=n!==r;break;case"<":o=n":o=n>r;break;case">=":o=n>=r;break;default:return this}return isNaN(o)&&e.find_parent(Re)?this:o})),e(yt,(function(e,t){var n=this.condition._eval(e,t);if(n===this.condition)return this;var i=n?this.consequent:this.alternative,o=i._eval(e,t);return o===i?this:o})),e(nn,(function(e,t){var n,i=this.fixed_value();if(!i)return this;if(D(i,"_eval"))n=i._eval();else{if(this._eval=c,n=i._eval(e,t),delete this._eval,n===i)return this;i._eval=function(){return n}}if(n&&"object"==typeof n){var o=this.definition().escaped;if(o&&t>o)return this}return n}));var o={Array:Array,Math:Math,Number:Number,Object:Object,String:String},r=Pi({Math:["E","LN10","LN2","LOG2E","LOG10E","PI","SQRT1_2","SQRT2"],Number:["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"]});e(Et,(function(e,t){if(e.option("unsafe")){var n=this.property;if(n instanceof fe&&(n=n._eval(e,t))===this.property)return this;var i,a=this.expression;if(Ti(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 gt?u.expression:u)||u.thedef&&u.thedef.undeclared)return this.clone();var c=r.get(a.name);if(!c||!c.has(n))return this;i=o[a.name]}else{if(!(i=a._eval(e,t+1))||i===a||!D(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(dt,(function(e,t){var n=this.expression;if(e.option("unsafe")&&n instanceof Et){var i,r=n.property;if(r instanceof fe&&(r=r._eval(e,t))===n.property)return this;var a=n.expression;if(Ti(a)){var s="hasOwnProperty"===a.name&&"call"===r&&this.args[0]&&this.args[0].evaluate(e);if(null==(s=s instanceof gt?s.expression:s)||s.thedef&&s.thedef.undeclared)return this.clone();var u=Ui.get(a.name);if(!u||!u.has(r))return this;i=o[a.name]}else{if((i=a._eval(e,t+1))===a||!i)return this;var c=Ki.get(i.constructor.name);if(!c||!c.has(r))return this}for(var l=[],f=0,p=this.args.length;f=":return o.operator="<",o;case">":return o.operator="<=",o}switch(r){case"==":return o.operator="!=",o;case"!=":return o.operator="==",o;case"===":return o.operator="!==",o;case"!==":return o.operator="===",o;case"&&":return o.operator="||",o.left=o.left.negate(e,i),o.right=o.right.negate(e),n(this,o,i);case"||":return o.operator="&&",o.left=o.left.negate(e,i),o.right=o.right.negate(e),n(this,o,i)}return t(this)}))}((function(e,t){e.DEFMETHOD("negate",(function(e,n){return t.call(this,e,n)}))}));var Gi=E("Boolean decodeURI decodeURIComponent Date encodeURI encodeURIComponent Error escape EvalError isFinite isNaN Number Object parseFloat parseInt RangeError ReferenceError String SyntaxError TypeError unescape URIError");dt.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(Ti(t)&&Gi.has(t.name))return!0;let i;if(t instanceof gt&&Ti(t.expression)&&(i=Ui.get(t.expression.name))&&i.has(t.property))return!0}return!!T(this,Fn)||!e.pure_funcs(this)})),fe.DEFMETHOD("is_call_pure",s),gt.DEFMETHOD("is_call_pure",(function(e){if(!e.option("unsafe"))return;const t=this.expression;let n;return t instanceof Ot?n=Ki.get("Array"):t.is_boolean()?n=Ki.get("Boolean"):t.is_number(e)?n=Ki.get("Number"):t instanceof _n?n=Ki.get("RegExp"):t.is_string(e)?n=Ki.get("String"):this.may_throw_on_access(e)||(n=Ki.get("Object")),n&&n.has(this.property)}));const Hi=new Set(["Number","String","Array","Object","Function","Promise"]);function Xi(e){return e&&e.aborts()}!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(fe,u),e(Se,s),e(cn,s),e(sn,s),e(ge,(function(e){return t(this.body,e)})),e(dt,(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(Qe,(function(e){return this.expression.has_side_effects(e)||t(this.body,e)})),e(nt,(function(e){return this.expression.has_side_effects(e)||t(this.body,e)})),e(it,(function(e){return t(this.body,e)||this.bcatch&&this.bcatch.has_side_effects(e)||this.bfinally&&this.bfinally.has_side_effects(e)})),e(Je,(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(Ae,(function(e){return this.body.has_side_effects(e)})),e(me,(function(e){return this.body.has_side_effects(e)})),e(ke,s),e(kt,(function(e){return!(!this.extends||!this.extends.has_side_effects(e))||t(this.properties,e)})),e(Tt,(function(e){return this.left.has_side_effects(e)||this.right.has_side_effects(e)})),e(bt,u),e(yt,(function(e){return this.condition.has_side_effects(e)||this.consequent.has_side_effects(e)||this.alternative.has_side_effects(e)})),e(St,(function(e){return Ni.has(this.operator)||this.expression.has_side_effects(e)})),e(nn,(function(e){return!this.is_declared(e)&&!Hi.has(this.name)})),e(qt,s),e(Kt,s),e(Ft,(function(e){return t(this.properties,e)})),e(Mt,(function(e){return this.computed_key()&&this.key.has_side_effects(e)||this.value.has_side_effects(e)})),e(It,(function(e){return this.computed_key()&&this.key.has_side_effects(e)||this.static&&this.value&&this.value.has_side_effects(e)})),e(Nt,(function(e){return this.computed_key()&&this.key.has_side_effects(e)})),e(xt,(function(e){return this.computed_key()&&this.key.has_side_effects(e)})),e(wt,(function(e){return this.computed_key()&&this.key.has_side_effects(e)})),e(Ot,(function(e){return t(this.elements,e)})),e(gt,(function(e){return this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)})),e(Dt,(function(e){return this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)||this.property.has_side_effects(e)})),e(ht,(function(e){return t(this.expressions,e)})),e(at,(function(e){return t(this.definitions,e)})),e(lt,(function(){return this.value})),e(Ge,s),e(Ue,(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(fe,u),e(cn,s),e(Se,s),e(ke,s),e(Kt,s),e(sn,s),e(kt,(function(e){return!(!this.extends||!this.extends.may_throw(e))||t(this.properties,e)})),e(Ot,(function(e){return t(this.elements,e)})),e(bt,(function(e){return!!this.right.may_throw(e)||!(!e.has_directive("use strict")&&"="==this.operator&&this.left instanceof nn)&&this.left.may_throw(e)})),e(Tt,(function(e){return this.left.may_throw(e)||this.right.may_throw(e)})),e(ge,(function(e){return t(this.body,e)})),e(dt,(function(e){return!!t(this.args,e)||!this.is_expr_pure(e)&&(!!this.expression.may_throw(e)||(!(this.expression instanceof ke)||t(this.expression.body,e)))})),e(nt,(function(e){return this.expression.may_throw(e)||t(this.body,e)})),e(yt,(function(e){return this.condition.may_throw(e)||this.consequent.may_throw(e)||this.alternative.may_throw(e)})),e(at,(function(e){return t(this.definitions,e)})),e(gt,(function(e){return this.expression.may_throw_on_access(e)||this.expression.may_throw(e)})),e(Je,(function(e){return this.condition.may_throw(e)||this.body&&this.body.may_throw(e)||this.alternative&&this.alternative.may_throw(e)})),e(Ae,(function(e){return this.body.may_throw(e)})),e(Ft,(function(e){return t(this.properties,e)})),e(Mt,(function(e){return this.value.may_throw(e)})),e(It,(function(e){return this.computed_key()&&this.key.may_throw(e)||this.static&&this.value&&this.value.may_throw(e)})),e(Nt,(function(e){return this.computed_key()&&this.key.may_throw(e)})),e(xt,(function(e){return this.computed_key()&&this.key.may_throw(e)})),e(wt,(function(e){return this.computed_key()&&this.key.may_throw(e)})),e(ze,(function(e){return this.value&&this.value.may_throw(e)})),e(ht,(function(e){return t(this.expressions,e)})),e(me,(function(e){return this.body.may_throw(e)})),e(Dt,(function(e){return this.expression.may_throw_on_access(e)||this.expression.may_throw(e)||this.property.may_throw(e)})),e(Qe,(function(e){return this.expression.may_throw(e)||t(this.body,e)})),e(nn,(function(e){return!this.is_declared(e)&&!Hi.has(this.name)})),e(qt,s),e(it,(function(e){return this.bcatch?this.bcatch.may_throw(e):t(this.body,e)||this.bfinally&&this.bfinally.may_throw(e)})),e(St,(function(e){return!("typeof"==this.operator&&this.expression instanceof nn)&&this.expression.may_throw(e)})),e(lt,(function(e){return!!this.value&&this.value.may_throw(e)}))}((function(e,t){e.DEFMETHOD("may_throw",t)})),function(e){function t(e){let t=!0;return Tn(this,n=>{if(n instanceof nn){if(ni(this,16))return t=!1,bn;var o=n.definition();if(i(o,this.enclosed)&&!this.variables.has(o.name)){if(e){var r=e.find_variable(n);if(o.undeclared?!r:r===o)return t="f",!0}return t=!1,bn}return!0}if(n instanceof sn&&this instanceof Ve)return t=!1,bn}),t}e(fe,s),e(cn,u),e(kt,(function(e){return!(this.extends&&!this.extends.is_constant_expression(e))&&t.call(this,e)})),e(ke,t),e(St,(function(){return this.expression.is_constant_expression()})),e(Tt,(function(){return this.left.is_constant_expression()&&this.right.is_constant_expression()})),e(Ot,(function(){return this.elements.every(e=>e.is_constant_expression())})),e(Ft,(function(){return this.properties.every(e=>e.is_constant_expression())})),e(Mt,(function(){return!(this.key instanceof fe)&&this.value.is_constant_expression()}))}((function(e,t){e.DEFMETHOD("is_constant_expression",t)})),function(e){function t(){for(var e=0;e{if(e instanceof Kt){const n=e.definition();!t&&!n.global||r.has(n.id)||r.set(n.id,n)}}),n.value){if(n.name instanceof Be)n.walk(_);else{var o=n.name.definition();g(c,o.id,n.value),o.chained||n.name.fixed_value()!==n.value||a.set(o.id,n)}n.value.has_side_effects(e)&&n.value.walk(_)}})),!0}return h(o,s)}}));t.walk(_),_=new Cn(h),r.forEach((function(e){var t=c.get(e.id);t&&t.forEach((function(e){e.walk(_)}))}));var d=new On((function(s,c,_){var h=d.parent();if(i){const e=o(s);if(e instanceof nn){var E=e.definition(),g=r.has(E.id);if(s instanceof bt){if(!g||a.has(E.id)&&a.get(E.id)!==s)return hi(h,s,s.right.transform(d))}else if(!g)return _?f.skip:p(fn,s,{value:0})}}if(l===t){if(s.name&&(s instanceof Vt&&!S(e.option("keep_classnames"),(E=s.name.definition()).name)||s instanceof Le&&!S(e.option("keep_fnames"),(E=s.name.definition()).name))&&(!r.has(E.id)||E.orig.length>1)&&(s.name=null),s instanceof ke&&!(s instanceof Ie))for(var D=!e.option("keep_fargs"),v=s.argnames,A=v.length;--A>=0;){var T=v[A];T instanceof Ne&&(T=T.expression),T instanceof Ct&&(T=T.left),T instanceof Be||r.has(T.definition().id)?D=!1:(ii(T,1),D&&(v.pop(),e[T.unreferenced()?"warn":"info"]("Dropping unused function argument {name} [{file}:{line},{col}]",R(T))))}if((s instanceof Pe||s instanceof Lt)&&s!==t){const t=s.name.definition();if(!(t.global&&!n||r.has(t.id))){if(e[s.name.unreferenced()?"warn":"info"]("Dropping unused function {name} [{file}:{line},{col}]",R(s.name)),t.eliminated++,s instanceof Lt){const t=s.drop_side_effect_free(e);if(t)return p(me,s,{body:t})}return _?f.skip:p(Se,s)}}if(s instanceof at&&!(h instanceof Fe&&h.init===s)){var y=!(h instanceof xe||s instanceof st),b=[],C=[],O=[],F=[];switch(s.definitions.forEach((function(t){t.value&&(t.value=t.value.transform(d));var n=t.name instanceof Be,o=n?new Xn(null,{name:""}):t.name.definition();if(y&&o.global)return O.push(t);if(!i&&!y||n&&(t.name.names.length||t.name.is_array||1!=e.option("pure_getters"))||r.has(o.id)){if(t.value&&a.has(o.id)&&a.get(o.id)!==t&&(t.value=t.value.drop_side_effect_free(e)),t.name instanceof Ut){var c=u.get(o.id);if(c.length>1&&(!t.value||o.orig.indexOf(t.name)>o.eliminated)){if(e.warn("Dropping duplicated definition of variable {name} [{file}:{line},{col}]",R(t.name)),t.value){var l=p(nn,t.name,t.name);o.references.push(l);var f=p(bt,t,{operator:"=",left:l,right:t.value});a.get(o.id)===t&&a.set(o.id,f),F.push(f.transform(d))}return m(c,t),void o.eliminated++}}t.value?(F.length>0&&(O.length>0?(F.push(t.value),t.value=di(t.value,F)):b.push(p(me,s,{body:di(s,F)})),F=[]),O.push(t)):C.push(t)}else if(o.orig[0]instanceof Jt){(_=t.value&&t.value.drop_side_effect_free(e))&&F.push(_),t.value=null,C.push(t)}else{var _;(_=t.value&&t.value.drop_side_effect_free(e))?(n||e.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]",R(t.name)),F.push(_)):n||e[t.name.unreferenced()?"warn":"info"]("Dropping unused variable {name} [{file}:{line},{col}]",R(t.name)),o.eliminated++}})),(C.length>0||O.length>0)&&(s.definitions=C.concat(O),b.push(s)),F.length>0&&b.push(p(me,s,{body:di(s,F)})),b.length){case 0:return _?f.skip:p(Se,s);case 1:return b[0];default:return _?f.splice(b):p(De,s,{body:b})}}if(s instanceof Oe)return c(s,this),s.init instanceof De&&(M=s.init,s.init=M.body.pop(),M.body.push(s)),s.init instanceof me?s.init=s.init.body:Di(s.init)&&(s.init=null),M?_?f.splice(M.body):M:s;if(s instanceof Ae&&s.body instanceof Oe){if(c(s,this),s.body instanceof De){var M=s.body;return s.body=M.body.pop(),M.body.push(s),_?f.splice(M.body):M}return s}if(s instanceof De)return c(s,this),_&&s.body.every(Si)?f.splice(s.body):s;if(s instanceof we){const e=l;return l=s,c(s,this),l=e,s}}function R(e){return{name:e.name,file:e.start.file,line:e.start.line,col:e.start.col}}}));function h(e,n){var i;const s=o(e);if(s instanceof nn&&!fi(e.left,Gt)&&t.variables.get(s.name)===(i=s.definition()))return e instanceof bt&&(e.right.walk(_),i.chained||e.left.fixed_value()!==e.right||a.set(i.id,e)),!0;if(e instanceof nn){if(i=e.definition(),!r.has(i.id)&&(r.set(i.id,i),i.orig[0]instanceof Jt)){const e=i.scope.is_block_scope()&&i.scope.get_defun_scope().variables.get(i.name);e&&r.set(e.id,e)}return!0}if(e instanceof we){var u=l;return l=e,n(),l=u,!0}}t.transform(d)})),we.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 o=[],r=[],a=new Map,s=0,u=0;Tn(t,e=>e instanceof we&&e!==t||(e instanceof st?(++u,!0):void 0)),i=i&&u>1;var c=new On((function(u){if(u!==t){if(u instanceof de)return o.push(u),p(Se,u);if(n&&u instanceof Pe&&!(c.parent()instanceof _t)&&c.parent()===t)return r.push(u),p(Se,u);if(i&&u instanceof st){u.definitions.forEach((function(e){e.name instanceof Be||(a.set(e.name.name,e),++s)}));var l=u.to_assignments(e),f=c.parent();if(f instanceof Fe&&f.init===u){if(null==l){var _=u.definitions[0].name;return p(nn,_,_)}return l}return f instanceof Oe&&f.init===u?l:l?p(me,u,{body:l}):p(Se,u)}if(u instanceof we)return u}}));if(t=t.transform(c),s>0){var l=[];const e=t instanceof ke,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;f"string"==typeof e.key)){a(r,this);const e=new Map,t=[];return c.properties.forEach((function(n){t.push(p(lt,r,{name:s(o,n.key,e),value:n.value}))})),i.set(u.id,e),f.splice(t)}}else if(r instanceof Et&&r.expression instanceof nn){const e=i.get(r.expression.definition().id);if(e){const t=e.get(String(Ri(r.property))),n=p(nn,r,{name:t.name,scope:r.expression.scope,thedef:t});return n.reference({}),n}}function s(e,n,i){const o=p(e.CTOR,e,{name:t.make_var_name(e.name+"_"+n),scope:t}),r=t.def_variable(o);return i.set(String(n),r),t.enclosed.push(r),o}}));return t.transform(o)})),function(e){function t(e,t,n){var i=e.length;if(!i)return null;for(var o=[],r=!1,a=0;a0&&(u[0].body=s.concat(u[0].body)),e.body=u;n=u[u.length-1];){var d=n.body[n.body.length-1];if(d instanceof qe&&t.loopcontrol_target(d)===e&&n.body.pop(),n.body.length||n instanceof nt&&(r||n.expression.has_side_effects(t)))break;u.pop()===r&&(r=null)}if(0==u.length)return p(De,e,{body:s.concat(p(me,e.expression,{body:e.expression}))}).optimize(t);if(1==u.length&&(u[0]===a||u[0]===r)){var m=!1,h=new Cn((function(t){if(m||t instanceof ke||t instanceof me)return!0;t instanceof qe&&h.loopcontrol_target(t)===e&&(m=!0)}));if(e.walk(h),!m){var E,g=u[0].body.slice();return(E=u[0].expression)&&g.unshift(p(me,E,{body:E})),g.unshift(p(me,e.expression,{body:e.expression})),p(De,e,{body:g}).optimize(t)}}return e;function D(e,n){n&&!Xi(n)?n.body=n.body.concat(e.body):Mi(t,e,s)}})),ai(it,(function(e,t){if(Fi(e.body,t),e.bcatch&&e.bfinally&&e.bfinally.body.every(Di)&&(e.bfinally=null),t.option("dead_code")&&e.body.every(Di)){var n=[];return e.bcatch&&Mi(t,e.bcatch,n),e.bfinally&&n.push(...e.bfinally.body),p(De,e,{body:n}).optimize(t)}return e})),at.DEFMETHOD("remove_initializers",(function(){var e=[];this.definitions.forEach((function(t){t.name instanceof Kt?(t.value=null,e.push(t)):Tn(t.name,n=>{n instanceof Kt&&e.push(p(lt,t,{name:n,value:null}))})})),this.definitions=e})),at.DEFMETHOD("to_assignments",(function(e){var t=e.option("reduce_vars"),n=this.definitions.reduce((function(e,n){if(!n.value||n.name instanceof Be){if(n.value){var i=p(lt,n,{name:n.name,value:n.value}),o=p(st,n,{definitions:[i]});e.push(o)}}else{var r=p(nn,n.name,n.name);e.push(p(bt,n,{operator:"=",left:r,right:n.value})),t&&(r.definition().fixed=!1)}return(n=n.name.definition()).eliminated++,n.replaced--,e}),[]);return 0==n.length?null:di(this,n)})),ai(at,(function(e){return 0==e.definitions.length?p(Se,e):e})),ai(pt,(function(e){return e})),ai(dt,(function(e,t){var n=e.expression,i=n;ro(e,t,e.args);var o=e.args.every(e=>!(e instanceof Ne));if(t.option("reduce_vars")&&i instanceof nn&&!T(e,Rn)){const e=i.fixed_value();$i(e,t)||(i=e)}var r=i instanceof ke;if(t.option("unused")&&o&&r&&!i.uses_arguments&&!i.pinned()){for(var a=0,s=0,u=0,c=e.args.length;u=i.argnames.length;if(l||ni(i.argnames[u],1)){if(D=e.args[u].drop_side_effect_free(t))e.args[a++]=D;else if(!l){e.args[a++]=p(fn,e.args[u],{value:0});continue}}else e.args[a++]=e.args[u];s=a}e.args.length=s}if(t.option("unsafe"))if(Ti(n))switch(n.name){case"Array":if(1!=e.args.length)return p(Ot,e,{elements:e.args}).optimize(t);if(e.args[0]instanceof fn&&e.args[0].value<=11){const t=[];for(let n=0;n=1&&e.args.length<=2&&e.args.every(e=>{var n=e.evaluate(t);return f.push(n),e!==n})){let[n,i]=f;n=A(new RegExp(n).source);const o=p(_n,e,{value:{source:n,flags:i}});if(o._eval(t)!==o)return o;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 gt)switch(n.property){case"toString":if(0==e.args.length&&!n.expression.may_throw_on_access(t))return p(Tt,e,{left:p(ln,e,{value:""}),operator:"+",right:n.expression}).optimize(t);break;case"join":if(n.expression instanceof Ot)e:{var _;if(!(e.args.length>0&&(_=e.args[0].evaluate(t))===e.args[0])){var d,m=[],h=[];for(u=0,c=n.expression.elements.length;u0&&(m.push(p(ln,e,{value:h.join(_)})),h.length=0),m.push(E))}return h.length>0&&m.push(p(ln,e,{value:h.join(_)})),0==m.length?p(ln,e,{value:""}):1==m.length?m[0].is_string(t)?m[0]:p(Tt,m[0],{operator:"+",left:p(ln,e,{value:""}),right:m[0]}):""==_?(d=m[0].is_string(t)||m[1].is_string(t)?m.shift():p(ln,e,{value:""}),m.reduce((function(e,t){return p(Tt,t,{operator:"+",left:e,right:t})}),d).optimize(t)):((D=e.clone()).expression=D.expression.clone(),D.expression.expression=D.expression.expression.clone(),D.expression.expression.elements=m,Vi(t,e,D));var D}}break;case"charAt":if(n.expression.is_string(t)){var S=e.args[0],v=S?S.evaluate(t):0;if(v!==S)return p(Dt,n,{expression:n.expression,property:mi(0|v,S||n)}).optimize(t)}break;case"apply":if(2==e.args.length&&e.args[1]instanceof Ot)return(L=e.args[1].elements.slice()).unshift(e.args[0]),p(dt,e,{expression:p(gt,n,{expression:n.expression,property:"call"}),args:L}).optimize(t);break;case"call":var y=n.expression;if(y instanceof nn&&(y=y.fixed_value()),y instanceof ke&&!y.contains_this())return(e.args.length?di(this,[e.args[0],p(dt,e,{expression:n.expression,args:e.args.slice(1)})]):p(dt,e,{expression:n.expression,args:[]})).optimize(t)}if(t.option("unsafe_Function")&&Ti(n)&&"Function"==n.name){if(0==e.args.length)return p(Le,e,{argnames:[],body:[]}).optimize(t);if(e.args.every(e=>e instanceof ln))try{var b=ue(M="n(function("+e.args.slice(0,-1).map((function(e){return e.value})).join(",")+"){"+e.args[e.args.length-1].value+"})"),C={ie8:t.option("ie8")};b.figure_out_scope(C);var O,F=new ri(t.options);(b=b.transform(F)).figure_out_scope(C),Yn.reset(),b.compute_char_frequency(C),b.mangle_names(C),Tn(b,e=>{if(ci(e))return O=e,bn});var M=Pn();return De.prototype._codegen.call(O,O,M),e.args=[p(ln,e,{value:O.argnames.map((function(e){return e.print_to_string()})).join(",")}),p(ln,e.args[e.args.length-1],{value:M.get().replace(/^{|}$/g,"")})],e}catch(n){if(!(n instanceof J))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 R=r&&i.body[0],w=r&&!i.is_generator&&!i.async,x=w&&t.option("inline")&&!e.is_expr_pure(t);if(x&&R instanceof ze){let n=R.value;if(!n||n.is_constant_expression()){n=n?n.clone(!0):p(En,e);const i=e.args.concat(n);return di(e,i).optimize(t)}if(1===i.argnames.length&&i.argnames[0]instanceof zt&&e.args.length<2&&n instanceof nn&&n.name===i.argnames[0].name)return(e.args[0]||p(En)).optimize(t)}if(x){var N,k,I=-1;let r,a;if(o&&!i.uses_arguments&&!i.pinned()&&!(t.parent()instanceof kt)&&!(i.name&&i instanceof Le)&&(a=function(e){var n=i.body,o=n.length;if(t.option("inline")<3)return 1==o&&P(e);e=null;for(var r=0;r!e.value))return!1}else{if(e)return!1;a instanceof Se||(e=a)}}return P(e)}(R))&&(n===i||T(e,Mn)||t.option("unused")&&1==(r=n.definition()).references.length&&!Zi(t,r)&&i.is_constant_expression(n.scope))&&!T(e,Fn|Rn)&&!i.contains_this()&&function(){var n=new Set;do{if((N=t.parent(++I)).is_block_scope()&&N.block_scope&&N.block_scope.variables.forEach((function(e){n.add(e.name)})),N instanceof ot)N.argname&&n.add(N.argname.name);else if(N instanceof Te)k=[];else if(N instanceof nn&&N.fixed_value()instanceof we)return!1}while(!(N instanceof we));var o=!(N instanceof xe)||t.toplevel.vars,r=t.option("inline");return!!function(e,t){for(var n=i.body.length,o=0;o=0;){var s=r.definitions[a].name;if(s instanceof Be||e.has(s.name)||Ci.has(s.name)||N.var_names().has(s.name))return!1;k&&k.push(s.definition())}}}return!0}(n,r>=3&&o)&&(!!function(e,t){for(var n=0,o=i.argnames.length;n=2&&o)&&(!!function(){var t=new Set;const n=e=>{if(e instanceof we){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}};for(let t=0;t=0;){var s=r.definitions[a].name;if(s instanceof Be||t.has(s.name))return!1}}return!0}()&&(!k||0==k.length||!eo(i,k))))}()&&!Ji(N,i)&&!(N instanceof kt))return ii(i,256),pi(t,!0).add_child_scope(i),di(e,function(n){var o=[],r=[];if(function(t,n){for(var o=i.argnames.length,r=e.args.length;--r>=o;)n.push(e.args[r]);for(r=o;--r>=0;){var a=i.argnames[r],s=e.args[r];if(ni(a,1)||!a.name||N.var_names().has(a.name))s&&n.push(s);else{var u=p(Ut,a,a);a.definition().orig.push(u),!s&&k&&(s=p(En,e)),B(t,n,u,s)}}t.reverse(),n.reverse()}(o,r),function(e,t){for(var n=t.length,o=0,r=i.body.length;oe.name!=l.name)){var f=i.variables.get(l.name),_=p(nn,l,l);f.references.push(_),t.splice(n++,0,p(bt,c,{operator:"=",left:_,right:p(En,l)}))}}}}(o,r),r.push(n),o.length){const e=N.body.indexOf(t.parent(I-1))+1;N.body.splice(e,0,p(st,i,{definitions:o}))}return r.map(e=>e.clone(!0))}(a)).optimize(t)}if(w&&t.option("side_effects")&&i.body.every(Di)){var L=e.args.concat(p(En,e));return di(e,L).optimize(t)}if(t.option("negate_iife")&&t.parent()instanceof me&&Ai(e))return e.negate(t,!0);var V=e.evaluate(t);return V!==e?(V=mi(V,e).optimize(t),Vi(t,V,e)):e;function P(t){return t?t instanceof ze?t.value?t.value.clone(!0):p(En,e):t instanceof me?p(vt,t,{operator:"void",expression:t.body.clone(!0)}):void 0:p(En,e)}function B(t,n,i,o){var r=i.definition();N.variables.set(i.name,r),N.enclosed.push(r),N.var_names().has(i.name)||(N.add_var_name(i.name),t.push(p(lt,i,{name:i,value:null})));var a=p(nn,i,i);r.references.push(a),o&&n.push(p(bt,e,{operator:"=",left:a,right:o.clone()}))}})),ai(mt,(function(e,t){return t.option("unsafe")&&Ti(e.expression)&&["Object","RegExp","Function","Error","Array"].includes(e.expression.name)?p(dt,e,e).transform(t):e})),ai(ht,(function(e,t){if(!t.option("side_effects"))return e;var n,i,o=[];n=kn(t),i=e.expressions.length-1,e.expressions.forEach((function(e,r){r0&&wi(o[r],t);)r--;r0)return(n=this.clone()).right=di(this.right,t.slice(r)),(t=t.slice(0,r)).push(n),di(this,t).optimize(e)}}return this}));var ji=E("== === != !== * & | ^");function Zi(e,t){for(var n,i=0;n=e.parent(i);i++)if(n instanceof ke||n instanceof kt){var o=n.name;if(o&&o.definition()===t)break}return n}function Ji(e,t){for(const n of t.enclosed){if(t.variables.has(n.name))continue;const i=e.find_variable(n.name);if(i){if(i===n)continue;return!0}}return!1}function Qi(e,t){return e instanceof nn||e.TYPE===t.TYPE}function eo(e,t){const n=e=>{if(e instanceof nn&&i(e.definition(),t))return bn};return yn(e,(t,i)=>{if(t instanceof we&&t!==e){var o=i.parent();if(o instanceof dt&&o.expression===t)return;return!Tn(t,n)||bn}})}ai(Tt,(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(ji.has(e.operator)&&e.right.is_constant()&&!e.left.is_constant()&&(e.left instanceof Tt&&ae[e.left.operator]>=ae[e.operator]||i()),e=e.lift_sequences(t),t.option("comparisons"))switch(e.operator){case"===":case"!==":var o=!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(!o&&wi(e.left,t))e.left=p(mn,e.left);else if(t.option("typeofs")&&e.left instanceof ln&&"undefined"==e.left.value&&e.right instanceof vt&&"typeof"==e.right.operator){var r=e.right.expression;(r instanceof nn?!r.is_declared(t):r instanceof Et&&t.option("ie8"))||(e.right=r,e.left=p(En,e.left).optimize(t),2==e.operator.length&&(e.operator+="="))}else if(e.left instanceof nn&&e.right instanceof nn&&e.left.definition()===e.right.definition()&&((u=e.left.fixed_value())instanceof Ot||u instanceof ke||u instanceof Ft||u instanceof kt))return p("="==e.operator[0]?An:vn,e);break;case"&&":case"||":var a=e.left;if(a.operator==e.operator&&(a=a.right),a instanceof Tt&&a.operator==("&&"==e.operator?"!==":"===")&&e.right instanceof Tt&&a.operator==e.right.operator&&(wi(a.left,t)&&e.right.left instanceof mn||a.left instanceof mn&&wi(e.right.left,t))&&!a.right.has_side_effects(t)&&a.right.equivalent_to(e.right.right)){var s=p(Tt,e,{operator:a.operator.slice(0,-1),left:p(mn,e),right:a.right});return a!==e.left&&(s=p(Tt,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),di(e,[e.right,p(An,e)]).optimize(t);if(l&&"string"==typeof l)return t.warn("+ in boolean context always true [{file}:{line},{col}]",e.start),di(e,[e.left,p(An,e)]).optimize(t)}if(t.option("comparisons")&&e.is_boolean()){if(!(t.parent()instanceof Tt)||t.parent()instanceof bt){var f=p(vt,e,{operator:"!",expression:e.negate(t,kn(t))});e=Vi(t,e,f)}if(t.option("unsafe_comps"))switch(e.operator){case"<":i(">");break;case"<=":i(">=")}}if("+"==e.operator){if(e.right instanceof ln&&""==e.right.getValue()&&e.left.is_string(t))return e.left;if(e.left instanceof ln&&""==e.left.getValue()&&e.right.is_string(t))return e.right;if(e.left instanceof Tt&&"+"==e.left.operator&&e.left.left instanceof ln&&""==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=!!ni(e.left,2)||!ni(e.left,4)&&e.left.evaluate(t)))return t.warn("Condition left of && always false [{file}:{line},{col}]",e.start),hi(t.parent(),t.self(),e.left).optimize(t);if(!(c instanceof fe))return t.warn("Condition left of && always true [{file}:{line},{col}]",e.start),di(e,[e.left,e.right]).optimize(t);if(l=e.right.evaluate(t)){if(!(l instanceof fe)){if("&&"==(_=t.parent()).operator&&_.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),di(e,[e.left,p(vn,e)]).optimize(t);ii(e,4)}if("||"==e.left.operator)if(!(d=e.left.right.evaluate(t)))return p(yt,e,{condition:e.left.left,consequent:e.right,alternative:e.left.right}).optimize(t);break;case"||":var _,d;if(!(c=!!ni(e.left,2)||!ni(e.left,4)&&e.left.evaluate(t)))return t.warn("Condition left of || always false [{file}:{line},{col}]",e.start),di(e,[e.left,e.right]).optimize(t);if(!(c instanceof fe))return t.warn("Condition left of || always true [{file}:{line},{col}]",e.start),hi(t.parent(),t.self(),e.left).optimize(t);if(l=e.right.evaluate(t)){if(!(l instanceof fe)){if(t.in_boolean_context())return t.warn("Boolean || always true [{file}:{line},{col}]",e.start),di(e,[e.left,p(An,e)]).optimize(t);ii(e,2)}}else if("||"==(_=t.parent()).operator&&_.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((d=e.left.right.evaluate(t))&&!(d instanceof fe))return p(yt,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 cn&&e.right instanceof Tt&&"+"==e.right.operator&&e.right.left instanceof cn&&e.right.is_string(t)&&(e=p(Tt,e,{operator:"+",left:p(ln,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 cn&&e.left instanceof Tt&&"+"==e.left.operator&&e.left.right instanceof cn&&e.left.is_string(t)&&(e=p(Tt,e,{operator:"+",left:e.left.left,right:p(ln,e.right,{value:""+e.left.right.getValue()+e.right.getValue(),start:e.left.right.start,end:e.right.end})})),e.left instanceof Tt&&"+"==e.left.operator&&e.left.is_string(t)&&e.left.right instanceof cn&&e.right instanceof Tt&&"+"==e.right.operator&&e.right.left instanceof cn&&e.right.is_string(t)&&(e=p(Tt,e,{operator:"+",left:p(Tt,e.left,{operator:"+",left:e.left.left,right:p(ln,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 vt&&"-"==e.right.operator&&e.left.is_number(t)){e=p(Tt,e,{operator:"-",left:e.left,right:e.right.expression});break}if(e.left instanceof vt&&"-"==e.left.operator&&n()&&e.right.is_number(t)){e=p(Tt,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 Tt&&e.left.operator!=e.operator&&ae[e.left.operator]>=ae[e.operator])){var h=p(Tt,e,{operator:e.operator,left:e.right,right:e.left});e=e.right instanceof cn&&!(e.left instanceof cn)?Vi(t,h,e):Vi(t,e,h)}m&&e.is_number(t)&&(e.right instanceof Tt&&e.right.operator==e.operator&&(e=p(Tt,e,{operator:e.operator,left:p(Tt,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 cn&&e.left instanceof Tt&&e.left.operator==e.operator&&(e.left.left instanceof cn?e=p(Tt,e,{operator:e.operator,left:p(Tt,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 cn&&(e=p(Tt,e,{operator:e.operator,left:p(Tt,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 Tt&&e.left.operator==e.operator&&e.left.right instanceof cn&&e.right instanceof Tt&&e.right.operator==e.operator&&e.right.left instanceof cn&&(e=p(Tt,e,{operator:e.operator,left:p(Tt,e.left,{operator:e.operator,left:p(Tt,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 Tt&&e.right.operator==e.operator&&(xi.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=p(Tt,e.left,{operator:e.operator,left:e.left,right:e.right.left}),e.right=e.right.right,e.transform(t);var E=e.evaluate(t);return E!==e?(E=mi(E,e).optimize(t),Vi(t,E,e)):e})),ai(on,(function(e){return e})),ai(nn,(function(e,t){if(!t.option("ie8")&&Ti(e)&&(!e.scope.uses_with||!t.find_parent(Re)))switch(e.name){case"undefined":return p(En,e).optimize(t);case"NaN":return p(hn,e).optimize(t);case"Infinity":return p(Dn,e).optimize(t)}var n=t.parent();if(t.option("reduce_vars")&&ki(e,n)!==e){const f=e.definition();if(t.top_retain&&f.global&&t.top_retain(f))return f.fixed=!1,f.should_replace=!1,f.single_use=!1,e;var i=e.fixed_value(),o=f.single_use&&!(n instanceof dt&&n.is_expr_pure(t)||T(n,Rn));if(o&&(i instanceof ke||i instanceof kt))if($i(i,t))o=!1;else if(f.scope!==e.scope&&(1==f.escaped||ni(i,16)||function(e){for(var t,n=0;t=e.parent(n++);){if(t instanceof pe)return!1;if(t instanceof Ot||t instanceof Rt||t instanceof Ft)return!0}return!1}(t)))o=!1;else if(Zi(t,f))o=!1;else if((f.scope!==e.scope||f.orig[0]instanceof zt)&&"f"==(o=i.is_constant_expression(e.scope))){var r=e.scope;do{(r instanceof Pe||ci(r))&&ii(r,16)}while(r=r.parent_scope)}if(o&&i instanceof ke){const r=pi(t,!0);o=f.scope===e.scope&&!Ji(r,i)||n instanceof dt&&n.expression===e&&!Ji(r,i)}if(o&&i instanceof kt){o=(!i.extends||!i.extends.may_throw(t)&&!i.extends.has_side_effects(t))&&!i.properties.some(e=>e.may_throw(t)||e.has_side_effects(t))}if(o&&i){if(i instanceof Lt&&(ii(i,256),i=p(Vt,i,i)),i instanceof Pe&&(ii(i,256),i=p(Le,i,i)),f.recursive_refs>0&&i.name instanceof Wt){const e=i.name.definition();let t=i.variables.get(i.name.name),n=t&&t.orig[0];n instanceof $t||(n=p($t,i.name,i.name),n.scope=i,i.name=n,t=i.def_function(n)),Tn(i,n=>{n instanceof nn&&n.definition()===e&&(n.thedef=t,t.references.push(n))})}return(i instanceof ke||i instanceof kt)&&pi(t,!0).add_child_scope(i),i.optimize(t)}if(i&&void 0===f.should_replace){let e;if(i instanceof sn)f.orig[0]instanceof zt||!f.references.every(e=>f.scope===e.scope)||(e=i);else{var a=i.evaluate(t);a===i||!t.option("unsafe_regexp")&&a instanceof RegExp||(e=mi(a,i))}if(e){var s,u=e.optimize(t).size();Tn(i,e=>{if(e instanceof nn)return bn})?s=function(){var n=e.optimize(t);return n===e?n.clone(!0):n}:(u=Math.min(u,i.size()),s=function(){var n=Ii(e.optimize(t),i);return n===e||n===i?n.clone(!0):n});var c=f.name.length,l=0;t.option("unused")&&!t.exposed(f)&&(l=(c+2+u)/(f.references.length-f.assignments)),f.should_replace=u<=c+l&&s}else f.should_replace=!1}if(f.should_replace)return f.should_replace()}return e})),ai(En,(function(e,t){if(t.option("unsafe_undefined")){var n=_i(t,"undefined");if(n){var i=p(nn,e,{name:"undefined",scope:n.scope,thedef:n});return ii(i,8),i}}var o=ki(t.self(),t.parent());return o&&Qi(o,e)?e:p(vt,e,{operator:"void",expression:p(fn,e,{value:0})})})),ai(Dn,(function(e,t){var n=ki(t.self(),t.parent());return n&&Qi(n,e)?e:!t.option("keep_infinity")||n&&!Qi(n,e)||_i(t,"Infinity")?p(Tt,e,{operator:"/",left:p(fn,e,{value:1}),right:p(fn,e,{value:0})}):e})),ai(hn,(function(e,t){var n=ki(t.self(),t.parent());return n&&!Qi(n,e)||_i(t,"NaN")?p(Tt,e,{operator:"/",left:p(fn,e,{value:0}),right:p(fn,e,{value:0})}):e}));const to=E("+ - / * % >> << >>> | ^ &"),no=E("* | ^ &");function io(e,t){return e instanceof nn&&(e=e.fixed_value()),!!e&&(!(e instanceof ke||e instanceof kt)||(!(e instanceof ke&&e.contains_this())||t.parent()instanceof mt))}function oo(e,t){return t.in_boolean_context()?Vi(t,e,di(e,[e,p(An,e)]).optimize(t)):e}function ro(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(r=function(){for(var e=s.args,t=u.args,n=0,i=e.length;n1)&&(_=null)}else if(!_&&!t.option("keep_fargs")&&s=n.argnames.length;)_=p(zt,n,{name:n.make_var_name("argument_"+n.argnames.length),scope:n}),n.argnames.push(_),n.enclosed.push(n.def_variable(_));if(_){var m=p(nn,e,_);return m.reference({}),oi(_,1),m}}if(ki(e,t.parent()))return e;if(r!==o){var h=e.flatten_object(a,t);h&&(i=e.expression=h.expression,o=e.property=h.property)}if(t.option("properties")&&t.option("side_effects")&&o instanceof fn&&i instanceof Ot){s=o.getValue();var E=i.elements,g=E[s];e:if(io(g,t)){for(var D=!0,S=[],v=E.length;--v>s;){(A=E[v].drop_side_effect_free(t))&&(S.unshift(A),D&&A.has_side_effects(t)&&(D=!1))}if(g instanceof Ne)break e;for(g=g instanceof gn?p(En,g):g,D||S.unshift(g);--v>=0;){var A;if((A=E[v])instanceof Ne)break e;(A=A.drop_side_effect_free(t))?S.unshift(A):s--}return D?(S.push(g),di(e,S).optimize(t)):p(Dt,e,{expression:p(Ot,i,{elements:S}),property:p(fn,o,{value:s})})}}var T=e.evaluate(t);return T!==e?Vi(t,T=mi(T,e).optimize(t),e):e})),ke.DEFMETHOD("contains_this",(function(){return Tn(this,e=>e instanceof sn?bn:e!==this&&e instanceof we&&!(e instanceof Ve)||void 0)})),Et.DEFMETHOD("flatten_object",(function(e,t){if(t.option("properties")){var n=t.option("unsafe_arrows")&&t.option("ecma")>=2015,i=this.expression;if(i instanceof Ft)for(var o=i.properties,r=o.length;--r>=0;){var a=o[r];if(""+(a instanceof Nt?a.key.name:a.key)==e){if(!o.every(e=>e instanceof Rt||n&&e instanceof Nt&&!e.is_generator))break;if(!io(a.value,t))break;return p(Dt,this,{expression:p(Ot,i,{elements:o.map((function(e){var t=e.value;t instanceof Ie&&(t=p(Le,t,t));var n=e.key;return n instanceof fe&&!(n instanceof Yt)?di(e,[n,t]):t}))}),property:p(fn,this,{value:r})})}}}})),ai(gt,(function(e,t){"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});const n=t.parent();if(ki(e,n))return e;if(t.option("unsafe_proto")&&e.expression instanceof gt&&"prototype"==e.expression.property){var i=e.expression.expression;if(Ti(i))switch(i.name){case"Array":e.expression=p(Ot,e.expression,{elements:[]});break;case"Function":e.expression=p(Le,e.expression,{argnames:[],body:[]});break;case"Number":e.expression=p(fn,e.expression,{value:0});break;case"Object":e.expression=p(Ft,e.expression,{properties:[]});break;case"RegExp":e.expression=p(_n,e.expression,{value:{source:"t",flags:""}});break;case"String":e.expression=p(ln,e.expression,{value:""})}}if(!(n instanceof dt&&T(n,Rn))){const n=e.flatten_object(e.property,t);if(n)return n.optimize(t)}let o=e.evaluate(t);return o!==e?(o=mi(o,e).optimize(t),Vi(t,o,e)):e})),ai(Ot,(function(e,t){var n=oo(e,t);return n!==e?n:ro(e,0,e.elements)})),ai(Ft,(function(e,t){var n=oo(e,t);if(n!==e)return n;for(var i=e.properties,o=0;o=2015&&!e.name&&!e.is_generator&&!e.uses_arguments&&!e.pinned()){if(!Tn(e,e=>{if(e instanceof sn)return bn}))return p(Ve,e,e).optimize(t)}return e})),ai(kt,(function(e){return e})),ai(Ze,(function(e,t){return e.expression&&!e.is_star&&wi(e.expression,t)&&(e.expression=null),e})),ai(Ue,(function(e,t){if(!t.option("evaluate")||t.parent()instanceof Ke)return e;for(var n=[],i=0;i=2015&&(!(n instanceof RegExp)||n.test(e.key+""))){var i=e.key,o=e.value;if((o instanceof Ve&&Array.isArray(o.body)&&!o.contains_this()||o instanceof Le)&&!o.name)return p(Nt,e,{async:o.async,is_generator:o.is_generator,key:i instanceof fe?i:p(Yt,e,{name:i}),value:p(Ie,o,o),quote:e.quote})}return e})),ai(Be,(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,o=t.length;n1)throw new Error("inline source map only works with singular input");n.sourceMap.content=(i=e[f],o=void 0,(o=/(?:^|[^.])\/\/# sourceMappingURL=data:application\/json(;[\w=-]*)?;base64,([+/0-9A-Za-z]*=*)\s*$/.exec(i))?fo(o[2]):(fe.warn("inline source map not found"),null))}c=n.parse.toplevel}s&&"strict"!==n.mangle.properties.keep_quoted&&uo(c,s),n.wrap&&(c=c.wrap_commonjs(n.wrap)),n.enclose&&(c=c.wrap_enclose(n.enclose)),u&&(u.rename=Date.now()),u&&(u.compress=Date.now()),n.compress&&(c=new ri(n.compress).compress(c)),u&&(u.scope=Date.now()),n.mangle&&c.figure_out_scope(n.mangle),u&&(u.mangle=Date.now()),n.mangle&&(Yn.reset(),c.compute_char_frequency(n.mangle),c.mangle_names(n.mangle)),u&&(u.properties=Date.now()),n.mangle&&n.mangle.properties&&(c=lo(c,n.mangle.properties)),u&&(u.output=Date.now());var p={};if(n.output.ast&&(p.ast=c),!D(n.output,"code")||n.output.code){if(n.sourceMap&&("string"==typeof n.sourceMap.content&&(n.sourceMap.content=JSON.parse(n.sourceMap.content)),n.output.source_map=function(e){e=r(e,{file:null,root:null,orig:null,orig_line_diff:0,dest_line_diff:0});var n=new t.SourceMapGenerator({file:e.file,sourceRoot:e.root}),i=e.orig&&new t.SourceMapConsumer(e.orig);return i&&i.sources.forEach((function(e){var t=i.sourceContentFor(e,!0);t&&n.setSourceContent(e,t)})),{add:function(t,o,r,a,s,u){if(i){var c=i.originalPositionFor({line:a,column:s});if(null===c.source)return;t=c.source,a=c.line,s=c.column,u=c.name||u}n.addMapping({generated:{line:o+e.dest_line_diff,column:r},original:{line:a+e.orig_line_diff,column:s},source:t,name:u})},get:function(){return n},toString:function(){return JSON.stringify(n.toJSON())}}}({file:n.sourceMap.filename,orig:n.sourceMap.content,root:n.sourceMap.root}),n.sourceMap.includeSources)){if(e instanceof xe)throw new Error("original source content unavailable");for(var f in e)D(e,f)&&n.output.source_map.get().setSourceContent(f,e[f])}delete n.output.ast,delete n.output.code;var _=Pn(n.output);if(c.print(_),p.code=_.get(),n.sourceMap)if(n.sourceMap.asObject?p.map=n.output.source_map.get().toJSON():p.map=n.output.source_map.toString(),"inline"==n.sourceMap.url){var d="object"==typeof p.map?JSON.stringify(p.map):p.map;p.code+="\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+po(d)}else n.sourceMap.url&&(p.code+="\n//# sourceMappingURL="+n.sourceMap.url)}return n.nameCache&&n.mangle&&(n.mangle.cache&&(n.nameCache.vars=ho(n.mangle.cache)),n.mangle.properties&&n.mangle.properties.cache&&(n.nameCache.props=ho(n.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{fe.warn_function=a}}!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=Ct)}return new t({start:i(e),end:o(e),left:s(e.left),operator:"=",right:s(e.right)})},SpreadElement:function(e){return new Ne({start:i(e),end:o(e),expression:s(e.argument)})},RestElement:function(e){return new Ne({start:i(e),end:o(e),expression:s(e.argument)})},TemplateElement:function(e){return new Ge({start:i(e),end:o(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 it({start:i(e),end:o(e),body:s(e.block).body,bcatch:s(t[0]),bfinally:e.finalizer?new rt(s(e.finalizer)):null})},Property:function(e){var t=e.key,n={start:i(t||e.value),end:o(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 Yt({name:n.key}),new Nt(n)):"init"==e.kind?("Identifier"!=t.type&&"Literal"!=t.type&&(n.key=s(t)),new Rt(n)):("string"!=typeof n.key&&"number"!=typeof n.key||(n.key=new Yt({name:n.key})),n.value=new Ie(n.value),"get"==e.kind?new xt(n):"set"==e.kind?new wt(n):"method"==e.kind?(n.async=e.value.async,n.is_generator=e.value.generator,n.quote=e.computed?'"':null,new Nt(n)):void 0)},MethodDefinition:function(e){var t={start:i(e),end:o(e),key:e.computed?s(e.key):new Yt({name:e.key.name||e.key.value}),value:s(e.value),static:e.static};return"get"==e.kind?new xt(t):"set"==e.kind?new wt(t):(t.is_generator=e.value.generator,t.async=e.value.async,new Nt(t))},FieldDefinition:function(e){let t;if(e.computed)t=s(e.key);else{if("Identifier"!==e.key.type)throw new Error("Non-Identifier key in FieldDefinition");t=s(e.key)}return new It({start:i(e),end:o(e),key:t,value:s(e.value),static:e.static})},ArrayExpression:function(e){return new Ot({start:i(e),end:o(e),elements:e.elements.map((function(e){return null===e?new gn:s(e)}))})},ObjectExpression:function(e){return new Ft({start:i(e),end:o(e),properties:e.properties.map((function(e){return"SpreadElement"===e.type||(e.type="Property"),s(e)}))})},SequenceExpression:function(e){return new ht({start:i(e),end:o(e),expressions:e.expressions.map(s)})},MemberExpression:function(e){return new(e.computed?Dt:gt)({start:i(e),end:o(e),property:e.computed?s(e.property):e.property.name,expression:s(e.object)})},SwitchCase:function(e){return new(e.test?nt:tt)({start:i(e),end:o(e),expression:s(e.test),body:e.consequent.map(s)})},VariableDeclaration:function(e){return new("const"===e.kind?ct:"let"===e.kind?ut:st)({start:i(e),end:o(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 ft({start:i(e),end:o(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 ft({start:i(e),end:o(e),foreign_name:new en({name:"*"}),name:s(e.local)})))})),new pt({start:i(e),end:o(e),imported_name:t,imported_names:n,module_name:s(e.source)})},ExportAllDeclaration:function(e){return new _t({start:i(e),end:o(e),exported_names:[new ft({name:new rn({name:"*"}),foreign_name:new rn({name:"*"})})],module_name:s(e.source)})},ExportNamedDeclaration:function(e){return new _t({start:i(e),end:o(e),exported_definition:s(e.declaration),exported_names:e.specifiers&&e.specifiers.length?e.specifiers.map((function(e){return new ft({foreign_name:s(e.exported),name:s(e.local)})})):null,module_name:s(e.source)})},ExportDefaultDeclaration:function(e){return new _t({start:i(e),end:o(e),exported_value:s(e.declaration),is_default:!0})},Literal:function(e){var t=e.value,n={start:i(e),end:o(e)},r=e.regex;if(r&&r.pattern)return n.value={source:r.pattern,flags:r.flags},new _n(n);if(r){const i=e.raw||t,o=i.match(/^\/(.*)\/(\w*)$/);if(!o)throw new Error("Invalid regex source "+i);const[r,a,s]=o;return n.value={source:a,flags:s},new _n(n)}if(null===t)return new mn(n);switch(typeof t){case"string":return n.value=t,new ln(n);case"number":return n.value=t,new fn(n);case"boolean":return new(t?An:vn)(n)}},MetaProperty:function(e){if("new"===e.meta.name&&"target"===e.property.name)return new Bt({start:i(e),end:o(e)})},Identifier:function(e){var t=a[a.length-2];return new("LabeledStatement"==t.type?tn:"VariableDeclarator"==t.type&&t.id===e?"const"==t.kind?Ht:"let"==t.kind?Xt:Ut:/Import.*Specifier/.test(t.type)?t.local===e?Qt:en:"ExportSpecifier"==t.type?t.local===e?on:rn:"FunctionExpression"==t.type?t.id===e?$t:zt:"FunctionDeclaration"==t.type?t.id===e?Wt:zt:"ArrowFunctionExpression"==t.type?t.params.includes(e)?zt:nn:"ClassExpression"==t.type?t.id===e?Zt:nn:"Property"==t.type?t.key===e&&t.computed||t.value===e?nn:Yt:"FieldDefinition"==t.type?t.key===e&&t.computed||t.value===e?nn:qt:"ClassDeclaration"==t.type?t.id===e?jt:nn:"MethodDefinition"==t.type?t.computed?nn:Yt:"CatchClause"==t.type?Jt:"BreakStatement"==t.type||"ContinueStatement"==t.type?an:nn)({start:i(e),end:o(e),name:e.name})},BigIntLiteral:e=>new pn({start:i(e),end:o(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,o=e.range;return new le({file:t&&t.source,line:i&&i.line,col:i&&i.column,pos:o?o[0]:e.start,endline:i&&i.line,endcol:i&&i.column,endpos:o?o[0]:e.start,raw:n(e)})}function o(e){var t=e.loc,i=t&&t.end,o=e.range;return new le({file:t&&t.source,line:i&&i.line,col:i&&i.column,pos:o?o[1]:e.end,endline:i&&i.line,endcol:i&&i.column,endpos:o?o[1]:e.end,raw:n(e)})}function r(e,n,r){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),r&&r.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],o=t[3];switch(a+=",\n"+o+": ",c+=",\n"+n+": ",i){case"@":a+="M."+n+".map(from_moz)",c+="M."+o+".map(to_moz)";break;case">":a+="from_moz(M."+n+")",c+="to_moz(M."+o+")";break;case"=":a+="M."+n,c+="M."+o;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+")")(wn,i,o,s),c=new Function("to_moz","to_moz_block","to_moz_scope","return("+c+")")(l,_,d),t[e]=a,u(n,c)}t.UpdateExpression=t.UnaryExpression=function(e){return new(("prefix"in e?e.prefix:"UnaryExpression"==e.type)?vt:At)({start:i(e),end:o(e),operator:e.operator,expression:s(e.argument)})},t.ClassDeclaration=t.ClassExpression=function(e){return new("ClassDeclaration"===e.type?Lt:Vt)({start:i(e),end:o(e),name:s(e.id),extends:s(e.superClass),properties:e.body.body.map(s)})},r("EmptyStatement",Se),r("BlockStatement",De,"body@body"),r("IfStatement",Je,"test>condition, consequent>body, alternate>alternative"),r("LabeledStatement",Ae,"label>label, body>body"),r("BreakStatement",qe,"label>label"),r("ContinueStatement",$e,"label>label"),r("WithStatement",Re,"object>expression, body>body"),r("SwitchStatement",Qe,"discriminant>expression, cases@body"),r("ReturnStatement",ze,"argument>value"),r("ThrowStatement",We,"argument>value"),r("WhileStatement",Ce,"test>condition, body>body"),r("DoWhileStatement",be,"test>condition, body>body"),r("ForStatement",Oe,"init>init, test>condition, update>step, body>body"),r("ForInStatement",Fe,"left>init, right>object, body>body"),r("ForOfStatement",Me,"left>init, right>object, body>body, await=await"),r("AwaitExpression",je,"argument>expression"),r("YieldExpression",Ze,"argument>expression, delegate=is_star"),r("DebuggerStatement",_e),r("VariableDeclarator",lt,"id>name, init>value"),r("CatchClause",ot,"param>argname, body%body"),r("ThisExpression",sn),r("Super",un),r("BinaryExpression",Tt,"operator=operator, left>left, right>right"),r("LogicalExpression",Tt,"operator=operator, left>left, right>right"),r("AssignmentExpression",bt,"operator=operator, left>left, right>right"),r("ConditionalExpression",yt,"test>condition, consequent>consequent, alternate>alternative"),r("NewExpression",mt,"callee>expression, arguments@args"),r("CallExpression",dt,"callee>expression, arguments@args"),u(xe,(function(e){return d("Program",e)})),u(Ne,(function(e){return{type:f()?"RestElement":"SpreadElement",argument:l(e.expression)}})),u(Ke,(function(e){return{type:"TaggedTemplateExpression",tag:l(e.prefix),quasi:l(e.template_string)}})),u(Ue,(function(e){for(var t=[],n=[],i=0;i({type:"BigIntLiteral",value:e.value})),Sn.DEFMETHOD("to_mozilla_ast",cn.prototype.to_mozilla_ast),mn.DEFMETHOD("to_mozilla_ast",cn.prototype.to_mozilla_ast),gn.DEFMETHOD("to_mozilla_ast",(function(){return null})),ge.DEFMETHOD("to_mozilla_ast",De.prototype.to_mozilla_ast),ke.DEFMETHOD("to_mozilla_ast",Le.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),o=n.start,r=n.end,o&&r?(null!=o.pos&&null!=r.endpos&&(i.range=[o.pos,r.endpos]),o.line&&(i.loc={start:{line:o.line,column:o.col},end:r.endline?{line:r.endline,column:r.endcol}:null},o.file&&(i.loc.source=o.file)),i):i;var n,i,o,r}))}fe.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 Be)return!0;return!1}function _(e){return{type:"BlockStatement",body:e.body.map(l)}}function d(e,t){var n=t.body.map(l);return t.body[0]instanceof me&&t.body[0].body instanceof ln&&n.unshift(l(new Se(t.body[0]))),{type:e,body:n}}}(),e.AST_Accessor=Ie,e.AST_Array=Ot,e.AST_Arrow=Ve,e.AST_Assign=bt,e.AST_Atom=dn,e.AST_Await=je,e.AST_Binary=Tt,e.AST_Block=ge,e.AST_BlockStatement=De,e.AST_Boolean=Sn,e.AST_Break=qe,e.AST_Call=dt,e.AST_Case=nt,e.AST_Catch=ot,e.AST_Class=kt,e.AST_ClassExpression=Vt,e.AST_ConciseMethod=Nt,e.AST_Conditional=yt,e.AST_Const=ct,e.AST_Constant=cn,e.AST_Continue=$e,e.AST_DWLoop=ye,e.AST_Debugger=_e,e.AST_DefClass=Lt,e.AST_Default=tt,e.AST_DefaultAssign=Ct,e.AST_Definitions=at,e.AST_Defun=Pe,e.AST_Destructuring=Be,e.AST_Directive=de,e.AST_Do=be,e.AST_Dot=gt,e.AST_EmptyStatement=Se,e.AST_Exit=Xe,e.AST_Expansion=Ne,e.AST_Export=_t,e.AST_False=vn,e.AST_Finally=rt,e.AST_For=Oe,e.AST_ForIn=Fe,e.AST_ForOf=Me,e.AST_Function=Le,e.AST_Hole=gn,e.AST_If=Je,e.AST_Import=pt,e.AST_Infinity=Dn,e.AST_IterationStatement=Te,e.AST_Jump=He,e.AST_Label=tn,e.AST_LabelRef=an,e.AST_LabeledStatement=Ae,e.AST_Lambda=ke,e.AST_Let=ut,e.AST_LoopControl=Ye,e.AST_NaN=hn,e.AST_NameMapping=ft,e.AST_New=mt,e.AST_NewTarget=Bt,e.AST_Node=fe,e.AST_Null=mn,e.AST_Number=fn,e.AST_Object=Ft,e.AST_ObjectGetter=xt,e.AST_ObjectKeyVal=Rt,e.AST_ObjectProperty=Mt,e.AST_ObjectSetter=wt,e.AST_PrefixedTemplateString=Ke,e.AST_PropAccess=Et,e.AST_RegExp=_n,e.AST_Return=ze,e.AST_Scope=we,e.AST_Sequence=ht,e.AST_SimpleStatement=me,e.AST_Statement=pe,e.AST_StatementWithBody=ve,e.AST_String=ln,e.AST_Sub=Dt,e.AST_Super=un,e.AST_Switch=Qe,e.AST_SwitchBranch=et,e.AST_Symbol=Pt,e.AST_SymbolBlockDeclaration=Gt,e.AST_SymbolCatch=Jt,e.AST_SymbolClass=Zt,e.AST_SymbolConst=Ht,e.AST_SymbolDeclaration=Kt,e.AST_SymbolDefClass=jt,e.AST_SymbolDefun=Wt,e.AST_SymbolExport=on,e.AST_SymbolExportForeign=rn,e.AST_SymbolFunarg=zt,e.AST_SymbolImport=Qt,e.AST_SymbolImportForeign=en,e.AST_SymbolLambda=$t,e.AST_SymbolLet=Xt,e.AST_SymbolMethod=Yt,e.AST_SymbolRef=nn,e.AST_SymbolVar=Ut,e.AST_TemplateSegment=Ge,e.AST_TemplateString=Ue,e.AST_This=sn,e.AST_Throw=We,e.AST_Token=le,e.AST_Toplevel=xe,e.AST_True=An,e.AST_Try=it,e.AST_Unary=St,e.AST_UnaryPostfix=At,e.AST_UnaryPrefix=vt,e.AST_Undefined=En,e.AST_Var=st,e.AST_VarDef=lt,e.AST_While=Ce,e.AST_With=Re,e.AST_Yield=Ze,e.Compressor=ri,e.OutputStream=Pn,e.TreeTransformer=On,e.TreeWalker=Cn,e._INLINE=Mn,e._JS_Parse_Error=J,e._NOINLINE=Rn,e._PURE=Fn,e._has_annotation=T,e._tokenizer=ne,e.base54=Yn,e.default_options=qn,e.defaults=r,e.mangle_properties=lo,e.minify=Eo,e.parse=ue,e.push_uniq=_,e.reserve_quoted_keys=uo,e.string_template=d,e.to_ascii=fo})); //# sourceMappingURL=bundle.min.js.map