"use strict";function find_builtins(e){var n={},r="object"==typeof global?global:self;function t(n){push_uniq(e,n)}["Symbol","Map","Promise","Proxy","Reflect","Set","WeakMap","WeakSet"].forEach(function(e){n[e]=r[e]||new Function}),["null","true","false","Infinity","-Infinity","undefined"].forEach(t),[Object,Array,Function,Number,String,Boolean,Error,Math,Date,RegExp,n.Symbol,ArrayBuffer,DataView,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,eval,EvalError,Float32Array,Float64Array,Int8Array,Int16Array,Int32Array,isFinite,isNaN,JSON,n.Map,parseFloat,parseInt,n.Promise,n.Proxy,RangeError,ReferenceError,n.Reflect,n.Set,SyntaxError,TypeError,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,URIError,n.WeakMap,n.WeakSet].forEach(function(e){Object.getOwnPropertyNames(e).map(t),e.prototype&&Object.getOwnPropertyNames(e.prototype).map(t)})}function reserve_quoted_keys(e,n){function r(e){push_uniq(n,e)}e.walk(new TreeWalker(function(e){e instanceof AST_ObjectKeyVal&&e.quote?r(e.key):e instanceof AST_ObjectProperty&&e.quote?r(e.key.name):e instanceof AST_Sub&&addStrings(e.property,r)}))}function addStrings(e,n){e.walk(new TreeWalker(function(e){return e instanceof AST_Sequence?addStrings(e.tail_node(),n):e instanceof AST_String?n(e.value):e instanceof AST_Conditional&&(addStrings(e.consequent,n),addStrings(e.alternative,n)),!0}))}function mangle_properties(e,n){var r=(n=defaults(n,{builtins:!1,cache:null,debug:!1,keep_quoted:!1,only_cache:!1,regex:null,reserved:null},!0)).reserved;Array.isArray(r)||(r=[]),n.builtins||find_builtins(r);var t,a=-1;n.cache?(t=n.cache.props).each(function(e){push_uniq(r,e)}):t=new Dictionary;var o,i=n.regex,c=!1!==n.debug;c&&(o=!0===n.debug?"":n.debug);var s=[],u=[];return e.walk(new TreeWalker(function(e){e instanceof AST_ObjectKeyVal?p(e.key):e instanceof AST_ObjectProperty?p(e.key.name):e instanceof AST_Dot?p(e.property):e instanceof AST_Sub&&addStrings(e.property,p)})),e.transform(new TreeTransformer(function(e){e instanceof AST_ObjectKeyVal?e.key=y(e.key):e instanceof AST_ObjectProperty?e.key.name=y(e.key.name):e instanceof AST_Dot?e.property=y(e.property):!n.keep_quoted&&e instanceof AST_Sub&&(e.property=function e(n){return n.transform(new TreeTransformer(function(n){if(n instanceof AST_Sequence){var r=n.expressions.length-1;n.expressions[r]=e(n.expressions[r])}else n instanceof AST_String?n.value=y(n.value):n instanceof AST_Conditional&&(n.consequent=e(n.consequent),n.alternative=e(n.alternative));return n}))}(e.property))}));function f(e){return!(u.indexOf(e)>=0)&&(!(r.indexOf(e)>=0)&&(n.only_cache?t.has(e):!/^-?[0-9]+(\.[0-9]+)?(e[+-][0-9]+)?$/.test(e)))}function l(e){return!(i&&!i.test(e))&&(!(r.indexOf(e)>=0)&&(t.has(e)||s.indexOf(e)>=0))}function p(e){f(e)&&push_uniq(s,e),l(e)||push_uniq(u,e)}function y(e){if(!l(e))return e;var n=t.get(e);if(!n){if(c){var r="_$"+e+"$"+o+"_";f(r)&&(n=r)}if(!n)do{n=base54(++a)}while(!f(n));t.set(e,n)}return n}}