diff --git a/.pylon/index.js b/.pylon/index.js
index 98a418a..cb1bc13 100644
--- a/.pylon/index.js
+++ b/.pylon/index.js
@@ -43995,6 +43995,13578 @@ module.exports = function boolval(mixedVar) {
};
//# sourceMappingURL=boolval.js.map
+/***/ }),
+
+/***/ 5094:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+var replaceBase64Images = __nccwpck_require__(6562);
+var crypto = __nccwpck_require__(6113);
+
+var plugin = function(options) {
+ options = options || {};
+ return function(mail, done) {
+ if (!mail || !mail.data || !mail.data.html) {
+ return done();
+ }
+
+ mail.resolveContent(mail.data, 'html', function(err, html) {
+ if (err) return done(err);
+
+ var attachments = {};
+
+ html = replaceBase64Images(html, function(mimeType, base64) {
+ if (attachments[base64]) return attachments[base64].cid;
+
+ var randomCid = (options.cidPrefix || '') + crypto.randomBytes(8).toString('hex');
+
+ attachments[base64] = {
+ contentType: mimeType,
+ cid: randomCid,
+ content: base64,
+ encoding: 'base64',
+ contentDisposition: 'inline'
+ };
+ return randomCid;
+ });
+
+ mail.data.html = html;
+
+ if (!mail.data.attachments) mail.data.attachments = [];
+
+ Object.keys(attachments).forEach(function(cid) {
+ mail.data.attachments.push(attachments[cid]);
+ });
+
+ done();
+ });
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 6562:
+/***/ ((module) => {
+
+var replaceBase64Images = function(html, getCid) {
+ //Replace html base64 images
+ var result = html.replace(/()/g, function(g, start, mimeType, base64, end) {
+ return start + 'cid:' + getCid(mimeType, base64) + end;
+ });
+
+ //Replace css base64 images
+ return result.replace(
+ /(url\(\s*('|"|"|"|'|[49];|[xX]2[27];)?)data:(image\/(?:png|jpe?g|gif));base64,([\s\S]*?)(\2\s*\))/g,
+ function(g, start, quot, mimeType, base64, end) {
+ return start + 'cid:' + getCid(mimeType, base64) + end;
+ }
+ );
+};
+
+module.exports = replaceBase64Images;
+
+
+/***/ }),
+
+/***/ 7382:
+/***/ ((module) => {
+
+
+
+/**
+ * Converts tokens for a single address into an address object
+ *
+ * @param {Array} tokens Tokens object
+ * @return {Object} Address object
+ */
+function _handleAddress(tokens) {
+ let token;
+ let isGroup = false;
+ let state = 'text';
+ let address;
+ let addresses = [];
+ let data = {
+ address: [],
+ comment: [],
+ group: [],
+ text: []
+ };
+ let i;
+ let len;
+
+ // Filter out , (comments) and regular text
+ for (i = 0, len = tokens.length; i < len; i++) {
+ token = tokens[i];
+ if (token.type === 'operator') {
+ switch (token.value) {
+ case '<':
+ state = 'address';
+ break;
+ case '(':
+ state = 'comment';
+ break;
+ case ':':
+ state = 'group';
+ isGroup = true;
+ break;
+ default:
+ state = 'text';
+ }
+ } else if (token.value) {
+ if (state === 'address') {
+ // handle use case where unquoted name includes a "<"
+ // Apple Mail truncates everything between an unexpected < and an address
+ // and so will we
+ token.value = token.value.replace(/^[^<]*<\s*/, '');
+ }
+ data[state].push(token.value);
+ }
+ }
+
+ // If there is no text but a comment, replace the two
+ if (!data.text.length && data.comment.length) {
+ data.text = data.comment;
+ data.comment = [];
+ }
+
+ if (isGroup) {
+ // http://tools.ietf.org/html/rfc2822#appendix-A.1.3
+ data.text = data.text.join(' ');
+ addresses.push({
+ name: data.text || (address && address.name),
+ group: data.group.length ? addressparser(data.group.join(',')) : []
+ });
+ } else {
+ // If no address was found, try to detect one from regular text
+ if (!data.address.length && data.text.length) {
+ for (i = data.text.length - 1; i >= 0; i--) {
+ if (data.text[i].match(/^[^@\s]+@[^@\s]+$/)) {
+ data.address = data.text.splice(i, 1);
+ break;
+ }
+ }
+
+ let _regexHandler = function (address) {
+ if (!data.address.length) {
+ data.address = [address.trim()];
+ return ' ';
+ } else {
+ return address;
+ }
+ };
+
+ // still no address
+ if (!data.address.length) {
+ for (i = data.text.length - 1; i >= 0; i--) {
+ // fixed the regex to parse email address correctly when email address has more than one @
+ data.text[i] = data.text[i].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/, _regexHandler).trim();
+ if (data.address.length) {
+ break;
+ }
+ }
+ }
+ }
+
+ // If there's still is no text but a comment exixts, replace the two
+ if (!data.text.length && data.comment.length) {
+ data.text = data.comment;
+ data.comment = [];
+ }
+
+ // Keep only the first address occurence, push others to regular text
+ if (data.address.length > 1) {
+ data.text = data.text.concat(data.address.splice(1));
+ }
+
+ // Join values with spaces
+ data.text = data.text.join(' ');
+ data.address = data.address.join(' ');
+
+ if (!data.address && isGroup) {
+ return [];
+ } else {
+ address = {
+ address: data.address || data.text || '',
+ name: data.text || data.address || ''
+ };
+
+ if (address.address === address.name) {
+ if ((address.address || '').match(/@/)) {
+ address.name = '';
+ } else {
+ address.address = '';
+ }
+ }
+
+ addresses.push(address);
+ }
+ }
+
+ return addresses;
+}
+
+/**
+ * Creates a Tokenizer object for tokenizing address field strings
+ *
+ * @constructor
+ * @param {String} str Address field string
+ */
+class Tokenizer {
+ constructor(str) {
+ this.str = (str || '').toString();
+ this.operatorCurrent = '';
+ this.operatorExpecting = '';
+ this.node = null;
+ this.escaped = false;
+
+ this.list = [];
+ /**
+ * Operator tokens and which tokens are expected to end the sequence
+ */
+ this.operators = {
+ '"': '"',
+ '(': ')',
+ '<': '>',
+ ',': '',
+ ':': ';',
+ // Semicolons are not a legal delimiter per the RFC2822 grammar other
+ // than for terminating a group, but they are also not valid for any
+ // other use in this context. Given that some mail clients have
+ // historically allowed the semicolon as a delimiter equivalent to the
+ // comma in their UI, it makes sense to treat them the same as a comma
+ // when used outside of a group.
+ ';': ''
+ };
+ }
+
+ /**
+ * Tokenizes the original input string
+ *
+ * @return {Array} An array of operator|text tokens
+ */
+ tokenize() {
+ let chr,
+ list = [];
+ for (let i = 0, len = this.str.length; i < len; i++) {
+ chr = this.str.charAt(i);
+ this.checkChar(chr);
+ }
+
+ this.list.forEach(node => {
+ node.value = (node.value || '').toString().trim();
+ if (node.value) {
+ list.push(node);
+ }
+ });
+
+ return list;
+ }
+
+ /**
+ * Checks if a character is an operator or text and acts accordingly
+ *
+ * @param {String} chr Character from the address field
+ */
+ checkChar(chr) {
+ if (this.escaped) {
+ // ignore next condition blocks
+ } else if (chr === this.operatorExpecting) {
+ this.node = {
+ type: 'operator',
+ value: chr
+ };
+ this.list.push(this.node);
+ this.node = null;
+ this.operatorExpecting = '';
+ this.escaped = false;
+ return;
+ } else if (!this.operatorExpecting && chr in this.operators) {
+ this.node = {
+ type: 'operator',
+ value: chr
+ };
+ this.list.push(this.node);
+ this.node = null;
+ this.operatorExpecting = this.operators[chr];
+ this.escaped = false;
+ return;
+ } else if (['"', "'"].includes(this.operatorExpecting) && chr === '\\') {
+ this.escaped = true;
+ return;
+ }
+
+ if (!this.node) {
+ this.node = {
+ type: 'text',
+ value: ''
+ };
+ this.list.push(this.node);
+ }
+
+ if (chr === '\n') {
+ // Convert newlines to spaces. Carriage return is ignored as \r and \n usually
+ // go together anyway and there already is a WS for \n. Lone \r means something is fishy.
+ chr = ' ';
+ }
+
+ if (chr.charCodeAt(0) >= 0x21 || [' ', '\t'].includes(chr)) {
+ // skip command bytes
+ this.node.value += chr;
+ }
+
+ this.escaped = false;
+ }
+}
+
+/**
+ * Parses structured e-mail addresses from an address field
+ *
+ * Example:
+ *
+ * 'Name '
+ *
+ * will be converted to
+ *
+ * [{name: 'Name', address: 'address@domain'}]
+ *
+ * @param {String} str Address field
+ * @return {Array} An array of address objects
+ */
+function addressparser(str, options) {
+ options = options || {};
+
+ let tokenizer = new Tokenizer(str);
+ let tokens = tokenizer.tokenize();
+
+ let addresses = [];
+ let address = [];
+ let parsedAddresses = [];
+
+ tokens.forEach(token => {
+ if (token.type === 'operator' && (token.value === ',' || token.value === ';')) {
+ if (address.length) {
+ addresses.push(address);
+ }
+ address = [];
+ } else {
+ address.push(token);
+ }
+ });
+
+ if (address.length) {
+ addresses.push(address);
+ }
+
+ addresses.forEach(address => {
+ address = _handleAddress(address);
+ if (address.length) {
+ parsedAddresses = parsedAddresses.concat(address);
+ }
+ });
+
+ if (options.flatten) {
+ let addresses = [];
+ let walkAddressList = list => {
+ list.forEach(address => {
+ if (address.group) {
+ return walkAddressList(address.group);
+ } else {
+ addresses.push(address);
+ }
+ });
+ };
+ walkAddressList(parsedAddresses);
+ return addresses;
+ }
+
+ return parsedAddresses;
+}
+
+// expose to the world
+module.exports = addressparser;
+
+
+/***/ }),
+
+/***/ 4017:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const Transform = (__nccwpck_require__(2781).Transform);
+
+/**
+ * Encodes a Buffer into a base64 encoded string
+ *
+ * @param {Buffer} buffer Buffer to convert
+ * @returns {String} base64 encoded string
+ */
+function encode(buffer) {
+ if (typeof buffer === 'string') {
+ buffer = Buffer.from(buffer, 'utf-8');
+ }
+
+ return buffer.toString('base64');
+}
+
+/**
+ * Adds soft line breaks to a base64 string
+ *
+ * @param {String} str base64 encoded string that might need line wrapping
+ * @param {Number} [lineLength=76] Maximum allowed length for a line
+ * @returns {String} Soft-wrapped base64 encoded string
+ */
+function wrap(str, lineLength) {
+ str = (str || '').toString();
+ lineLength = lineLength || 76;
+
+ if (str.length <= lineLength) {
+ return str;
+ }
+
+ let result = [];
+ let pos = 0;
+ let chunkLength = lineLength * 1024;
+ while (pos < str.length) {
+ let wrappedLines = str
+ .substr(pos, chunkLength)
+ .replace(new RegExp('.{' + lineLength + '}', 'g'), '$&\r\n')
+ .trim();
+ result.push(wrappedLines);
+ pos += chunkLength;
+ }
+
+ return result.join('\r\n').trim();
+}
+
+/**
+ * Creates a transform stream for encoding data to base64 encoding
+ *
+ * @constructor
+ * @param {Object} options Stream options
+ * @param {Number} [options.lineLength=76] Maximum length for lines, set to false to disable wrapping
+ */
+class Encoder extends Transform {
+ constructor(options) {
+ super();
+ // init Transform
+ this.options = options || {};
+
+ if (this.options.lineLength !== false) {
+ this.options.lineLength = this.options.lineLength || 76;
+ }
+
+ this._curLine = '';
+ this._remainingBytes = false;
+
+ this.inputBytes = 0;
+ this.outputBytes = 0;
+ }
+
+ _transform(chunk, encoding, done) {
+ if (encoding !== 'buffer') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+
+ if (!chunk || !chunk.length) {
+ return setImmediate(done);
+ }
+
+ this.inputBytes += chunk.length;
+
+ if (this._remainingBytes && this._remainingBytes.length) {
+ chunk = Buffer.concat([this._remainingBytes, chunk], this._remainingBytes.length + chunk.length);
+ this._remainingBytes = false;
+ }
+
+ if (chunk.length % 3) {
+ this._remainingBytes = chunk.slice(chunk.length - (chunk.length % 3));
+ chunk = chunk.slice(0, chunk.length - (chunk.length % 3));
+ } else {
+ this._remainingBytes = false;
+ }
+
+ let b64 = this._curLine + encode(chunk);
+
+ if (this.options.lineLength) {
+ b64 = wrap(b64, this.options.lineLength);
+
+ // remove last line as it is still most probably incomplete
+ let lastLF = b64.lastIndexOf('\n');
+ if (lastLF < 0) {
+ this._curLine = b64;
+ b64 = '';
+ } else if (lastLF === b64.length - 1) {
+ this._curLine = '';
+ } else {
+ this._curLine = b64.substr(lastLF + 1);
+ b64 = b64.substr(0, lastLF + 1);
+ }
+ }
+
+ if (b64) {
+ this.outputBytes += b64.length;
+ this.push(Buffer.from(b64, 'ascii'));
+ }
+
+ setImmediate(done);
+ }
+
+ _flush(done) {
+ if (this._remainingBytes && this._remainingBytes.length) {
+ this._curLine += encode(this._remainingBytes);
+ }
+
+ if (this._curLine) {
+ this._curLine = wrap(this._curLine, this.options.lineLength);
+ this.outputBytes += this._curLine.length;
+ this.push(this._curLine, 'ascii');
+ this._curLine = '';
+ }
+ done();
+ }
+}
+
+// expose to the world
+module.exports = {
+ encode,
+ wrap,
+ Encoder
+};
+
+
+/***/ }),
+
+/***/ 7757:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+// FIXME:
+// replace this Transform mess with a method that pipes input argument to output argument
+
+const MessageParser = __nccwpck_require__(6196);
+const RelaxedBody = __nccwpck_require__(1412);
+const sign = __nccwpck_require__(9475);
+const PassThrough = (__nccwpck_require__(2781).PassThrough);
+const fs = __nccwpck_require__(7147);
+const path = __nccwpck_require__(1017);
+const crypto = __nccwpck_require__(6113);
+
+const DKIM_ALGO = 'sha256';
+const MAX_MESSAGE_SIZE = 128 * 1024; // buffer messages larger than this to disk
+
+/*
+// Usage:
+
+let dkim = new DKIM({
+ domainName: 'example.com',
+ keySelector: 'key-selector',
+ privateKey,
+ cacheDir: '/tmp'
+});
+dkim.sign(input).pipe(process.stdout);
+
+// Where inputStream is a rfc822 message (either a stream, string or Buffer)
+// and outputStream is a DKIM signed rfc822 message
+*/
+
+class DKIMSigner {
+ constructor(options, keys, input, output) {
+ this.options = options || {};
+ this.keys = keys;
+
+ this.cacheTreshold = Number(this.options.cacheTreshold) || MAX_MESSAGE_SIZE;
+ this.hashAlgo = this.options.hashAlgo || DKIM_ALGO;
+
+ this.cacheDir = this.options.cacheDir || false;
+
+ this.chunks = [];
+ this.chunklen = 0;
+ this.readPos = 0;
+ this.cachePath = this.cacheDir ? path.join(this.cacheDir, 'message.' + Date.now() + '-' + crypto.randomBytes(14).toString('hex')) : false;
+ this.cache = false;
+
+ this.headers = false;
+ this.bodyHash = false;
+ this.parser = false;
+ this.relaxedBody = false;
+
+ this.input = input;
+ this.output = output;
+ this.output.usingCache = false;
+
+ this.hasErrored = false;
+
+ this.input.on('error', err => {
+ this.hasErrored = true;
+ this.cleanup();
+ output.emit('error', err);
+ });
+ }
+
+ cleanup() {
+ if (!this.cache || !this.cachePath) {
+ return;
+ }
+ fs.unlink(this.cachePath, () => false);
+ }
+
+ createReadCache() {
+ // pipe remainings to cache file
+ this.cache = fs.createReadStream(this.cachePath);
+ this.cache.once('error', err => {
+ this.cleanup();
+ this.output.emit('error', err);
+ });
+ this.cache.once('close', () => {
+ this.cleanup();
+ });
+ this.cache.pipe(this.output);
+ }
+
+ sendNextChunk() {
+ if (this.hasErrored) {
+ return;
+ }
+
+ if (this.readPos >= this.chunks.length) {
+ if (!this.cache) {
+ return this.output.end();
+ }
+ return this.createReadCache();
+ }
+ let chunk = this.chunks[this.readPos++];
+ if (this.output.write(chunk) === false) {
+ return this.output.once('drain', () => {
+ this.sendNextChunk();
+ });
+ }
+ setImmediate(() => this.sendNextChunk());
+ }
+
+ sendSignedOutput() {
+ let keyPos = 0;
+ let signNextKey = () => {
+ if (keyPos >= this.keys.length) {
+ this.output.write(this.parser.rawHeaders);
+ return setImmediate(() => this.sendNextChunk());
+ }
+ let key = this.keys[keyPos++];
+ let dkimField = sign(this.headers, this.hashAlgo, this.bodyHash, {
+ domainName: key.domainName,
+ keySelector: key.keySelector,
+ privateKey: key.privateKey,
+ headerFieldNames: this.options.headerFieldNames,
+ skipFields: this.options.skipFields
+ });
+ if (dkimField) {
+ this.output.write(Buffer.from(dkimField + '\r\n'));
+ }
+ return setImmediate(signNextKey);
+ };
+
+ if (this.bodyHash && this.headers) {
+ return signNextKey();
+ }
+
+ this.output.write(this.parser.rawHeaders);
+ this.sendNextChunk();
+ }
+
+ createWriteCache() {
+ this.output.usingCache = true;
+ // pipe remainings to cache file
+ this.cache = fs.createWriteStream(this.cachePath);
+ this.cache.once('error', err => {
+ this.cleanup();
+ // drain input
+ this.relaxedBody.unpipe(this.cache);
+ this.relaxedBody.on('readable', () => {
+ while (this.relaxedBody.read() !== null) {
+ // do nothing
+ }
+ });
+ this.hasErrored = true;
+ // emit error
+ this.output.emit('error', err);
+ });
+ this.cache.once('close', () => {
+ this.sendSignedOutput();
+ });
+ this.relaxedBody.removeAllListeners('readable');
+ this.relaxedBody.pipe(this.cache);
+ }
+
+ signStream() {
+ this.parser = new MessageParser();
+ this.relaxedBody = new RelaxedBody({
+ hashAlgo: this.hashAlgo
+ });
+
+ this.parser.on('headers', value => {
+ this.headers = value;
+ });
+
+ this.relaxedBody.on('hash', value => {
+ this.bodyHash = value;
+ });
+
+ this.relaxedBody.on('readable', () => {
+ let chunk;
+ if (this.cache) {
+ return;
+ }
+ while ((chunk = this.relaxedBody.read()) !== null) {
+ this.chunks.push(chunk);
+ this.chunklen += chunk.length;
+ if (this.chunklen >= this.cacheTreshold && this.cachePath) {
+ return this.createWriteCache();
+ }
+ }
+ });
+
+ this.relaxedBody.on('end', () => {
+ if (this.cache) {
+ return;
+ }
+ this.sendSignedOutput();
+ });
+
+ this.parser.pipe(this.relaxedBody);
+ setImmediate(() => this.input.pipe(this.parser));
+ }
+}
+
+class DKIM {
+ constructor(options) {
+ this.options = options || {};
+ this.keys = [].concat(
+ this.options.keys || {
+ domainName: options.domainName,
+ keySelector: options.keySelector,
+ privateKey: options.privateKey
+ }
+ );
+ }
+
+ sign(input, extraOptions) {
+ let output = new PassThrough();
+ let inputStream = input;
+ let writeValue = false;
+
+ if (Buffer.isBuffer(input)) {
+ writeValue = input;
+ inputStream = new PassThrough();
+ } else if (typeof input === 'string') {
+ writeValue = Buffer.from(input);
+ inputStream = new PassThrough();
+ }
+
+ let options = this.options;
+ if (extraOptions && Object.keys(extraOptions).length) {
+ options = {};
+ Object.keys(this.options || {}).forEach(key => {
+ options[key] = this.options[key];
+ });
+ Object.keys(extraOptions || {}).forEach(key => {
+ if (!(key in options)) {
+ options[key] = extraOptions[key];
+ }
+ });
+ }
+
+ let signer = new DKIMSigner(options, this.keys, inputStream, output);
+ setImmediate(() => {
+ signer.signStream();
+ if (writeValue) {
+ setImmediate(() => {
+ inputStream.end(writeValue);
+ });
+ }
+ });
+
+ return output;
+ }
+}
+
+module.exports = DKIM;
+
+
+/***/ }),
+
+/***/ 6196:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const Transform = (__nccwpck_require__(2781).Transform);
+
+/**
+ * MessageParser instance is a transform stream that separates message headers
+ * from the rest of the body. Headers are emitted with the 'headers' event. Message
+ * body is passed on as the resulting stream.
+ */
+class MessageParser extends Transform {
+ constructor(options) {
+ super(options);
+ this.lastBytes = Buffer.alloc(4);
+ this.headersParsed = false;
+ this.headerBytes = 0;
+ this.headerChunks = [];
+ this.rawHeaders = false;
+ this.bodySize = 0;
+ }
+
+ /**
+ * Keeps count of the last 4 bytes in order to detect line breaks on chunk boundaries
+ *
+ * @param {Buffer} data Next data chunk from the stream
+ */
+ updateLastBytes(data) {
+ let lblen = this.lastBytes.length;
+ let nblen = Math.min(data.length, lblen);
+
+ // shift existing bytes
+ for (let i = 0, len = lblen - nblen; i < len; i++) {
+ this.lastBytes[i] = this.lastBytes[i + nblen];
+ }
+
+ // add new bytes
+ for (let i = 1; i <= nblen; i++) {
+ this.lastBytes[lblen - i] = data[data.length - i];
+ }
+ }
+
+ /**
+ * Finds and removes message headers from the remaining body. We want to keep
+ * headers separated until final delivery to be able to modify these
+ *
+ * @param {Buffer} data Next chunk of data
+ * @return {Boolean} Returns true if headers are already found or false otherwise
+ */
+ checkHeaders(data) {
+ if (this.headersParsed) {
+ return true;
+ }
+
+ let lblen = this.lastBytes.length;
+ let headerPos = 0;
+ this.curLinePos = 0;
+ for (let i = 0, len = this.lastBytes.length + data.length; i < len; i++) {
+ let chr;
+ if (i < lblen) {
+ chr = this.lastBytes[i];
+ } else {
+ chr = data[i - lblen];
+ }
+ if (chr === 0x0a && i) {
+ let pr1 = i - 1 < lblen ? this.lastBytes[i - 1] : data[i - 1 - lblen];
+ let pr2 = i > 1 ? (i - 2 < lblen ? this.lastBytes[i - 2] : data[i - 2 - lblen]) : false;
+ if (pr1 === 0x0a) {
+ this.headersParsed = true;
+ headerPos = i - lblen + 1;
+ this.headerBytes += headerPos;
+ break;
+ } else if (pr1 === 0x0d && pr2 === 0x0a) {
+ this.headersParsed = true;
+ headerPos = i - lblen + 1;
+ this.headerBytes += headerPos;
+ break;
+ }
+ }
+ }
+
+ if (this.headersParsed) {
+ this.headerChunks.push(data.slice(0, headerPos));
+ this.rawHeaders = Buffer.concat(this.headerChunks, this.headerBytes);
+ this.headerChunks = null;
+ this.emit('headers', this.parseHeaders());
+ if (data.length - 1 > headerPos) {
+ let chunk = data.slice(headerPos);
+ this.bodySize += chunk.length;
+ // this would be the first chunk of data sent downstream
+ setImmediate(() => this.push(chunk));
+ }
+ return false;
+ } else {
+ this.headerBytes += data.length;
+ this.headerChunks.push(data);
+ }
+
+ // store last 4 bytes to catch header break
+ this.updateLastBytes(data);
+
+ return false;
+ }
+
+ _transform(chunk, encoding, callback) {
+ if (!chunk || !chunk.length) {
+ return callback();
+ }
+
+ if (typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+
+ let headersFound;
+
+ try {
+ headersFound = this.checkHeaders(chunk);
+ } catch (E) {
+ return callback(E);
+ }
+
+ if (headersFound) {
+ this.bodySize += chunk.length;
+ this.push(chunk);
+ }
+
+ setImmediate(callback);
+ }
+
+ _flush(callback) {
+ if (this.headerChunks) {
+ let chunk = Buffer.concat(this.headerChunks, this.headerBytes);
+ this.bodySize += chunk.length;
+ this.push(chunk);
+ this.headerChunks = null;
+ }
+ callback();
+ }
+
+ parseHeaders() {
+ let lines = (this.rawHeaders || '').toString().split(/\r?\n/);
+ for (let i = lines.length - 1; i > 0; i--) {
+ if (/^\s/.test(lines[i])) {
+ lines[i - 1] += '\n' + lines[i];
+ lines.splice(i, 1);
+ }
+ }
+ return lines
+ .filter(line => line.trim())
+ .map(line => ({
+ key: line.substr(0, line.indexOf(':')).trim().toLowerCase(),
+ line
+ }));
+ }
+}
+
+module.exports = MessageParser;
+
+
+/***/ }),
+
+/***/ 1412:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+// streams through a message body and calculates relaxed body hash
+
+const Transform = (__nccwpck_require__(2781).Transform);
+const crypto = __nccwpck_require__(6113);
+
+class RelaxedBody extends Transform {
+ constructor(options) {
+ super();
+ options = options || {};
+ this.chunkBuffer = [];
+ this.chunkBufferLen = 0;
+ this.bodyHash = crypto.createHash(options.hashAlgo || 'sha1');
+ this.remainder = '';
+ this.byteLength = 0;
+
+ this.debug = options.debug;
+ this._debugBody = options.debug ? [] : false;
+ }
+
+ updateHash(chunk) {
+ let bodyStr;
+
+ // find next remainder
+ let nextRemainder = '';
+
+ // This crux finds and removes the spaces from the last line and the newline characters after the last non-empty line
+ // If we get another chunk that does not match this description then we can restore the previously processed data
+ let state = 'file';
+ for (let i = chunk.length - 1; i >= 0; i--) {
+ let c = chunk[i];
+
+ if (state === 'file' && (c === 0x0a || c === 0x0d)) {
+ // do nothing, found \n or \r at the end of chunk, stil end of file
+ } else if (state === 'file' && (c === 0x09 || c === 0x20)) {
+ // switch to line ending mode, this is the last non-empty line
+ state = 'line';
+ } else if (state === 'line' && (c === 0x09 || c === 0x20)) {
+ // do nothing, found ' ' or \t at the end of line, keep processing the last non-empty line
+ } else if (state === 'file' || state === 'line') {
+ // non line/file ending character found, switch to body mode
+ state = 'body';
+ if (i === chunk.length - 1) {
+ // final char is not part of line end or file end, so do nothing
+ break;
+ }
+ }
+
+ if (i === 0) {
+ // reached to the beginning of the chunk, check if it is still about the ending
+ // and if the remainder also matches
+ if (
+ (state === 'file' && (!this.remainder || /[\r\n]$/.test(this.remainder))) ||
+ (state === 'line' && (!this.remainder || /[ \t]$/.test(this.remainder)))
+ ) {
+ // keep everything
+ this.remainder += chunk.toString('binary');
+ return;
+ } else if (state === 'line' || state === 'file') {
+ // process existing remainder as normal line but store the current chunk
+ nextRemainder = chunk.toString('binary');
+ chunk = false;
+ break;
+ }
+ }
+
+ if (state !== 'body') {
+ continue;
+ }
+
+ // reached first non ending byte
+ nextRemainder = chunk.slice(i + 1).toString('binary');
+ chunk = chunk.slice(0, i + 1);
+ break;
+ }
+
+ let needsFixing = !!this.remainder;
+ if (chunk && !needsFixing) {
+ // check if we even need to change anything
+ for (let i = 0, len = chunk.length; i < len; i++) {
+ if (i && chunk[i] === 0x0a && chunk[i - 1] !== 0x0d) {
+ // missing \r before \n
+ needsFixing = true;
+ break;
+ } else if (i && chunk[i] === 0x0d && chunk[i - 1] === 0x20) {
+ // trailing WSP found
+ needsFixing = true;
+ break;
+ } else if (i && chunk[i] === 0x20 && chunk[i - 1] === 0x20) {
+ // multiple spaces found, needs to be replaced with just one
+ needsFixing = true;
+ break;
+ } else if (chunk[i] === 0x09) {
+ // TAB found, needs to be replaced with a space
+ needsFixing = true;
+ break;
+ }
+ }
+ }
+
+ if (needsFixing) {
+ bodyStr = this.remainder + (chunk ? chunk.toString('binary') : '');
+ this.remainder = nextRemainder;
+ bodyStr = bodyStr
+ .replace(/\r?\n/g, '\n') // use js line endings
+ .replace(/[ \t]*$/gm, '') // remove line endings, rtrim
+ .replace(/[ \t]+/gm, ' ') // single spaces
+ .replace(/\n/g, '\r\n'); // restore rfc822 line endings
+ chunk = Buffer.from(bodyStr, 'binary');
+ } else if (nextRemainder) {
+ this.remainder = nextRemainder;
+ }
+
+ if (this.debug) {
+ this._debugBody.push(chunk);
+ }
+ this.bodyHash.update(chunk);
+ }
+
+ _transform(chunk, encoding, callback) {
+ if (!chunk || !chunk.length) {
+ return callback();
+ }
+
+ if (typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+
+ this.updateHash(chunk);
+
+ this.byteLength += chunk.length;
+ this.push(chunk);
+ callback();
+ }
+
+ _flush(callback) {
+ // generate final hash and emit it
+ if (/[\r\n]$/.test(this.remainder) && this.byteLength > 2) {
+ // add terminating line end
+ this.bodyHash.update(Buffer.from('\r\n'));
+ }
+ if (!this.byteLength) {
+ // emit empty line buffer to keep the stream flowing
+ this.push(Buffer.from('\r\n'));
+ // this.bodyHash.update(Buffer.from('\r\n'));
+ }
+
+ this.emit('hash', this.bodyHash.digest('base64'), this.debug ? Buffer.concat(this._debugBody) : false);
+ callback();
+ }
+}
+
+module.exports = RelaxedBody;
+
+
+/***/ }),
+
+/***/ 9475:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const punycode = __nccwpck_require__(4317);
+const mimeFuncs = __nccwpck_require__(994);
+const crypto = __nccwpck_require__(6113);
+
+/**
+ * Returns DKIM signature header line
+ *
+ * @param {Object} headers Parsed headers object from MessageParser
+ * @param {String} bodyHash Base64 encoded hash of the message
+ * @param {Object} options DKIM options
+ * @param {String} options.domainName Domain name to be signed for
+ * @param {String} options.keySelector DKIM key selector to use
+ * @param {String} options.privateKey DKIM private key to use
+ * @return {String} Complete header line
+ */
+
+module.exports = (headers, hashAlgo, bodyHash, options) => {
+ options = options || {};
+
+ // all listed fields from RFC4871 #5.5
+ let defaultFieldNames =
+ 'From:Sender:Reply-To:Subject:Date:Message-ID:To:' +
+ 'Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:' +
+ 'Content-Description:Resent-Date:Resent-From:Resent-Sender:' +
+ 'Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:' +
+ 'List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:' +
+ 'List-Owner:List-Archive';
+
+ let fieldNames = options.headerFieldNames || defaultFieldNames;
+
+ let canonicalizedHeaderData = relaxedHeaders(headers, fieldNames, options.skipFields);
+ let dkimHeader = generateDKIMHeader(options.domainName, options.keySelector, canonicalizedHeaderData.fieldNames, hashAlgo, bodyHash);
+
+ let signer, signature;
+
+ canonicalizedHeaderData.headers += 'dkim-signature:' + relaxedHeaderLine(dkimHeader);
+
+ signer = crypto.createSign(('rsa-' + hashAlgo).toUpperCase());
+ signer.update(canonicalizedHeaderData.headers);
+ try {
+ signature = signer.sign(options.privateKey, 'base64');
+ } catch (E) {
+ return false;
+ }
+
+ return dkimHeader + signature.replace(/(^.{73}|.{75}(?!\r?\n|\r))/g, '$&\r\n ').trim();
+};
+
+module.exports.relaxedHeaders = relaxedHeaders;
+
+function generateDKIMHeader(domainName, keySelector, fieldNames, hashAlgo, bodyHash) {
+ let dkim = [
+ 'v=1',
+ 'a=rsa-' + hashAlgo,
+ 'c=relaxed/relaxed',
+ 'd=' + punycode.toASCII(domainName),
+ 'q=dns/txt',
+ 's=' + keySelector,
+ 'bh=' + bodyHash,
+ 'h=' + fieldNames
+ ].join('; ');
+
+ return mimeFuncs.foldLines('DKIM-Signature: ' + dkim, 76) + ';\r\n b=';
+}
+
+function relaxedHeaders(headers, fieldNames, skipFields) {
+ let includedFields = new Set();
+ let skip = new Set();
+ let headerFields = new Map();
+
+ (skipFields || '')
+ .toLowerCase()
+ .split(':')
+ .forEach(field => {
+ skip.add(field.trim());
+ });
+
+ (fieldNames || '')
+ .toLowerCase()
+ .split(':')
+ .filter(field => !skip.has(field.trim()))
+ .forEach(field => {
+ includedFields.add(field.trim());
+ });
+
+ for (let i = headers.length - 1; i >= 0; i--) {
+ let line = headers[i];
+ // only include the first value from bottom to top
+ if (includedFields.has(line.key) && !headerFields.has(line.key)) {
+ headerFields.set(line.key, relaxedHeaderLine(line.line));
+ }
+ }
+
+ let headersList = [];
+ let fields = [];
+ includedFields.forEach(field => {
+ if (headerFields.has(field)) {
+ fields.push(field);
+ headersList.push(field + ':' + headerFields.get(field));
+ }
+ });
+
+ return {
+ headers: headersList.join('\r\n') + '\r\n',
+ fieldNames: fields.join(':')
+ };
+}
+
+function relaxedHeaderLine(line) {
+ return line
+ .substr(line.indexOf(':') + 1)
+ .replace(/\r?\n/g, '')
+ .replace(/\s+/g, ' ')
+ .trim();
+}
+
+
+/***/ }),
+
+/***/ 322:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+// module to handle cookies
+
+const urllib = __nccwpck_require__(7310);
+
+const SESSION_TIMEOUT = 1800; // 30 min
+
+/**
+ * Creates a biskviit cookie jar for managing cookie values in memory
+ *
+ * @constructor
+ * @param {Object} [options] Optional options object
+ */
+class Cookies {
+ constructor(options) {
+ this.options = options || {};
+ this.cookies = [];
+ }
+
+ /**
+ * Stores a cookie string to the cookie storage
+ *
+ * @param {String} cookieStr Value from the 'Set-Cookie:' header
+ * @param {String} url Current URL
+ */
+ set(cookieStr, url) {
+ let urlparts = urllib.parse(url || '');
+ let cookie = this.parse(cookieStr);
+ let domain;
+
+ if (cookie.domain) {
+ domain = cookie.domain.replace(/^\./, '');
+
+ // do not allow cross origin cookies
+ if (
+ // can't be valid if the requested domain is shorter than current hostname
+ urlparts.hostname.length < domain.length ||
+ // prefix domains with dot to be sure that partial matches are not used
+ ('.' + urlparts.hostname).substr(-domain.length + 1) !== '.' + domain
+ ) {
+ cookie.domain = urlparts.hostname;
+ }
+ } else {
+ cookie.domain = urlparts.hostname;
+ }
+
+ if (!cookie.path) {
+ cookie.path = this.getPath(urlparts.pathname);
+ }
+
+ // if no expire date, then use sessionTimeout value
+ if (!cookie.expires) {
+ cookie.expires = new Date(Date.now() + (Number(this.options.sessionTimeout || SESSION_TIMEOUT) || SESSION_TIMEOUT) * 1000);
+ }
+
+ return this.add(cookie);
+ }
+
+ /**
+ * Returns cookie string for the 'Cookie:' header.
+ *
+ * @param {String} url URL to check for
+ * @returns {String} Cookie header or empty string if no matches were found
+ */
+ get(url) {
+ return this.list(url)
+ .map(cookie => cookie.name + '=' + cookie.value)
+ .join('; ');
+ }
+
+ /**
+ * Lists all valied cookie objects for the specified URL
+ *
+ * @param {String} url URL to check for
+ * @returns {Array} An array of cookie objects
+ */
+ list(url) {
+ let result = [];
+ let i;
+ let cookie;
+
+ for (i = this.cookies.length - 1; i >= 0; i--) {
+ cookie = this.cookies[i];
+
+ if (this.isExpired(cookie)) {
+ this.cookies.splice(i, i);
+ continue;
+ }
+
+ if (this.match(cookie, url)) {
+ result.unshift(cookie);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Parses cookie string from the 'Set-Cookie:' header
+ *
+ * @param {String} cookieStr String from the 'Set-Cookie:' header
+ * @returns {Object} Cookie object
+ */
+ parse(cookieStr) {
+ let cookie = {};
+
+ (cookieStr || '')
+ .toString()
+ .split(';')
+ .forEach(cookiePart => {
+ let valueParts = cookiePart.split('=');
+ let key = valueParts.shift().trim().toLowerCase();
+ let value = valueParts.join('=').trim();
+ let domain;
+
+ if (!key) {
+ // skip empty parts
+ return;
+ }
+
+ switch (key) {
+ case 'expires':
+ value = new Date(value);
+ // ignore date if can not parse it
+ if (value.toString() !== 'Invalid Date') {
+ cookie.expires = value;
+ }
+ break;
+
+ case 'path':
+ cookie.path = value;
+ break;
+
+ case 'domain':
+ domain = value.toLowerCase();
+ if (domain.length && domain.charAt(0) !== '.') {
+ domain = '.' + domain; // ensure preceeding dot for user set domains
+ }
+ cookie.domain = domain;
+ break;
+
+ case 'max-age':
+ cookie.expires = new Date(Date.now() + (Number(value) || 0) * 1000);
+ break;
+
+ case 'secure':
+ cookie.secure = true;
+ break;
+
+ case 'httponly':
+ cookie.httponly = true;
+ break;
+
+ default:
+ if (!cookie.name) {
+ cookie.name = key;
+ cookie.value = value;
+ }
+ }
+ });
+
+ return cookie;
+ }
+
+ /**
+ * Checks if a cookie object is valid for a specified URL
+ *
+ * @param {Object} cookie Cookie object
+ * @param {String} url URL to check for
+ * @returns {Boolean} true if cookie is valid for specifiec URL
+ */
+ match(cookie, url) {
+ let urlparts = urllib.parse(url || '');
+
+ // check if hostname matches
+ // .foo.com also matches subdomains, foo.com does not
+ if (
+ urlparts.hostname !== cookie.domain &&
+ (cookie.domain.charAt(0) !== '.' || ('.' + urlparts.hostname).substr(-cookie.domain.length) !== cookie.domain)
+ ) {
+ return false;
+ }
+
+ // check if path matches
+ let path = this.getPath(urlparts.pathname);
+ if (path.substr(0, cookie.path.length) !== cookie.path) {
+ return false;
+ }
+
+ // check secure argument
+ if (cookie.secure && urlparts.protocol !== 'https:') {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Adds (or updates/removes if needed) a cookie object to the cookie storage
+ *
+ * @param {Object} cookie Cookie value to be stored
+ */
+ add(cookie) {
+ let i;
+ let len;
+
+ // nothing to do here
+ if (!cookie || !cookie.name) {
+ return false;
+ }
+
+ // overwrite if has same params
+ for (i = 0, len = this.cookies.length; i < len; i++) {
+ if (this.compare(this.cookies[i], cookie)) {
+ // check if the cookie needs to be removed instead
+ if (this.isExpired(cookie)) {
+ this.cookies.splice(i, 1); // remove expired/unset cookie
+ return false;
+ }
+
+ this.cookies[i] = cookie;
+ return true;
+ }
+ }
+
+ // add as new if not already expired
+ if (!this.isExpired(cookie)) {
+ this.cookies.push(cookie);
+ }
+
+ return true;
+ }
+
+ /**
+ * Checks if two cookie objects are the same
+ *
+ * @param {Object} a Cookie to check against
+ * @param {Object} b Cookie to check against
+ * @returns {Boolean} True, if the cookies are the same
+ */
+ compare(a, b) {
+ return a.name === b.name && a.path === b.path && a.domain === b.domain && a.secure === b.secure && a.httponly === a.httponly;
+ }
+
+ /**
+ * Checks if a cookie is expired
+ *
+ * @param {Object} cookie Cookie object to check against
+ * @returns {Boolean} True, if the cookie is expired
+ */
+ isExpired(cookie) {
+ return (cookie.expires && cookie.expires < new Date()) || !cookie.value;
+ }
+
+ /**
+ * Returns normalized cookie path for an URL path argument
+ *
+ * @param {String} pathname
+ * @returns {String} Normalized path
+ */
+ getPath(pathname) {
+ let path = (pathname || '/').split('/');
+ path.pop(); // remove filename part
+ path = path.join('/').trim();
+
+ // ensure path prefix /
+ if (path.charAt(0) !== '/') {
+ path = '/' + path;
+ }
+
+ // ensure path suffix /
+ if (path.substr(-1) !== '/') {
+ path += '/';
+ }
+
+ return path;
+ }
+}
+
+module.exports = Cookies;
+
+
+/***/ }),
+
+/***/ 4446:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const http = __nccwpck_require__(3685);
+const https = __nccwpck_require__(5687);
+const urllib = __nccwpck_require__(7310);
+const zlib = __nccwpck_require__(9796);
+const PassThrough = (__nccwpck_require__(2781).PassThrough);
+const Cookies = __nccwpck_require__(322);
+const packageData = __nccwpck_require__(4129);
+const net = __nccwpck_require__(1808);
+
+const MAX_REDIRECTS = 5;
+
+module.exports = function (url, options) {
+ return nmfetch(url, options);
+};
+
+module.exports.Cookies = Cookies;
+
+function nmfetch(url, options) {
+ options = options || {};
+
+ options.fetchRes = options.fetchRes || new PassThrough();
+ options.cookies = options.cookies || new Cookies();
+ options.redirects = options.redirects || 0;
+ options.maxRedirects = isNaN(options.maxRedirects) ? MAX_REDIRECTS : options.maxRedirects;
+
+ if (options.cookie) {
+ [].concat(options.cookie || []).forEach(cookie => {
+ options.cookies.set(cookie, url);
+ });
+ options.cookie = false;
+ }
+
+ let fetchRes = options.fetchRes;
+ let parsed = urllib.parse(url);
+ let method = (options.method || '').toString().trim().toUpperCase() || 'GET';
+ let finished = false;
+ let cookies;
+ let body;
+
+ let handler = parsed.protocol === 'https:' ? https : http;
+
+ let headers = {
+ 'accept-encoding': 'gzip,deflate',
+ 'user-agent': 'nodemailer/' + packageData.version
+ };
+
+ Object.keys(options.headers || {}).forEach(key => {
+ headers[key.toLowerCase().trim()] = options.headers[key];
+ });
+
+ if (options.userAgent) {
+ headers['user-agent'] = options.userAgent;
+ }
+
+ if (parsed.auth) {
+ headers.Authorization = 'Basic ' + Buffer.from(parsed.auth).toString('base64');
+ }
+
+ if ((cookies = options.cookies.get(url))) {
+ headers.cookie = cookies;
+ }
+
+ if (options.body) {
+ if (options.contentType !== false) {
+ headers['Content-Type'] = options.contentType || 'application/x-www-form-urlencoded';
+ }
+
+ if (typeof options.body.pipe === 'function') {
+ // it's a stream
+ headers['Transfer-Encoding'] = 'chunked';
+ body = options.body;
+ body.on('error', err => {
+ if (finished) {
+ return;
+ }
+ finished = true;
+ err.type = 'FETCH';
+ err.sourceUrl = url;
+ fetchRes.emit('error', err);
+ });
+ } else {
+ if (options.body instanceof Buffer) {
+ body = options.body;
+ } else if (typeof options.body === 'object') {
+ try {
+ // encodeURIComponent can fail on invalid input (partial emoji etc.)
+ body = Buffer.from(
+ Object.keys(options.body)
+ .map(key => {
+ let value = options.body[key].toString().trim();
+ return encodeURIComponent(key) + '=' + encodeURIComponent(value);
+ })
+ .join('&')
+ );
+ } catch (E) {
+ if (finished) {
+ return;
+ }
+ finished = true;
+ E.type = 'FETCH';
+ E.sourceUrl = url;
+ fetchRes.emit('error', E);
+ return;
+ }
+ } else {
+ body = Buffer.from(options.body.toString().trim());
+ }
+
+ headers['Content-Type'] = options.contentType || 'application/x-www-form-urlencoded';
+ headers['Content-Length'] = body.length;
+ }
+ // if method is not provided, use POST instead of GET
+ method = (options.method || '').toString().trim().toUpperCase() || 'POST';
+ }
+
+ let req;
+ let reqOptions = {
+ method,
+ host: parsed.hostname,
+ path: parsed.path,
+ port: parsed.port ? parsed.port : parsed.protocol === 'https:' ? 443 : 80,
+ headers,
+ rejectUnauthorized: false,
+ agent: false
+ };
+
+ if (options.tls) {
+ Object.keys(options.tls).forEach(key => {
+ reqOptions[key] = options.tls[key];
+ });
+ }
+
+ if (parsed.protocol === 'https:' && parsed.hostname && parsed.hostname !== reqOptions.host && !net.isIP(parsed.hostname) && !reqOptions.servername) {
+ reqOptions.servername = parsed.hostname;
+ }
+
+ try {
+ req = handler.request(reqOptions);
+ } catch (E) {
+ finished = true;
+ setImmediate(() => {
+ E.type = 'FETCH';
+ E.sourceUrl = url;
+ fetchRes.emit('error', E);
+ });
+ return fetchRes;
+ }
+
+ if (options.timeout) {
+ req.setTimeout(options.timeout, () => {
+ if (finished) {
+ return;
+ }
+ finished = true;
+ req.abort();
+ let err = new Error('Request Timeout');
+ err.type = 'FETCH';
+ err.sourceUrl = url;
+ fetchRes.emit('error', err);
+ });
+ }
+
+ req.on('error', err => {
+ if (finished) {
+ return;
+ }
+ finished = true;
+ err.type = 'FETCH';
+ err.sourceUrl = url;
+ fetchRes.emit('error', err);
+ });
+
+ req.on('response', res => {
+ let inflate;
+
+ if (finished) {
+ return;
+ }
+
+ switch (res.headers['content-encoding']) {
+ case 'gzip':
+ case 'deflate':
+ inflate = zlib.createUnzip();
+ break;
+ }
+
+ if (res.headers['set-cookie']) {
+ [].concat(res.headers['set-cookie'] || []).forEach(cookie => {
+ options.cookies.set(cookie, url);
+ });
+ }
+
+ if ([301, 302, 303, 307, 308].includes(res.statusCode) && res.headers.location) {
+ // redirect
+ options.redirects++;
+ if (options.redirects > options.maxRedirects) {
+ finished = true;
+ let err = new Error('Maximum redirect count exceeded');
+ err.type = 'FETCH';
+ err.sourceUrl = url;
+ fetchRes.emit('error', err);
+ req.abort();
+ return;
+ }
+ // redirect does not include POST body
+ options.method = 'GET';
+ options.body = false;
+ return nmfetch(urllib.resolve(url, res.headers.location), options);
+ }
+
+ fetchRes.statusCode = res.statusCode;
+ fetchRes.headers = res.headers;
+
+ if (res.statusCode >= 300 && !options.allowErrorResponse) {
+ finished = true;
+ let err = new Error('Invalid status code ' + res.statusCode);
+ err.type = 'FETCH';
+ err.sourceUrl = url;
+ fetchRes.emit('error', err);
+ req.abort();
+ return;
+ }
+
+ res.on('error', err => {
+ if (finished) {
+ return;
+ }
+ finished = true;
+ err.type = 'FETCH';
+ err.sourceUrl = url;
+ fetchRes.emit('error', err);
+ req.abort();
+ });
+
+ if (inflate) {
+ res.pipe(inflate).pipe(fetchRes);
+ inflate.on('error', err => {
+ if (finished) {
+ return;
+ }
+ finished = true;
+ err.type = 'FETCH';
+ err.sourceUrl = url;
+ fetchRes.emit('error', err);
+ req.abort();
+ });
+ } else {
+ res.pipe(fetchRes);
+ }
+ });
+
+ setImmediate(() => {
+ if (body) {
+ try {
+ if (typeof body.pipe === 'function') {
+ return body.pipe(req);
+ } else {
+ req.write(body);
+ }
+ } catch (err) {
+ finished = true;
+ err.type = 'FETCH';
+ err.sourceUrl = url;
+ fetchRes.emit('error', err);
+ return;
+ }
+ }
+ req.end();
+ });
+
+ return fetchRes;
+}
+
+
+/***/ }),
+
+/***/ 3819:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const packageData = __nccwpck_require__(4129);
+const shared = __nccwpck_require__(2673);
+
+/**
+ * Generates a Transport object to generate JSON output
+ *
+ * @constructor
+ * @param {Object} optional config parameter
+ */
+class JSONTransport {
+ constructor(options) {
+ options = options || {};
+
+ this.options = options || {};
+
+ this.name = 'JSONTransport';
+ this.version = packageData.version;
+
+ this.logger = shared.getLogger(this.options, {
+ component: this.options.component || 'json-transport'
+ });
+ }
+
+ /**
+ *
Compiles a mailcomposer message and forwards it to handler that sends it.
+ *
+ * @param {Object} emailMessage MailComposer object
+ * @param {Function} callback Callback function to run when the sending is completed
+ */
+ send(mail, done) {
+ // Sendmail strips this header line by itself
+ mail.message.keepBcc = true;
+
+ let envelope = mail.data.envelope || mail.message.getEnvelope();
+ let messageId = mail.message.messageId();
+
+ let recipients = [].concat(envelope.to || []);
+ if (recipients.length > 3) {
+ recipients.push('...and ' + recipients.splice(2).length + ' more');
+ }
+ this.logger.info(
+ {
+ tnx: 'send',
+ messageId
+ },
+ 'Composing JSON structure of %s to <%s>',
+ messageId,
+ recipients.join(', ')
+ );
+
+ setImmediate(() => {
+ mail.normalize((err, data) => {
+ if (err) {
+ this.logger.error(
+ {
+ err,
+ tnx: 'send',
+ messageId
+ },
+ 'Failed building JSON structure for %s. %s',
+ messageId,
+ err.message
+ );
+ return done(err);
+ }
+
+ delete data.envelope;
+ delete data.normalizedHeaders;
+
+ return done(null, {
+ envelope,
+ messageId,
+ message: this.options.skipEncoding ? data : JSON.stringify(data)
+ });
+ });
+ });
+ }
+}
+
+module.exports = JSONTransport;
+
+
+/***/ }),
+
+/***/ 1694:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+/* eslint no-undefined: 0 */
+
+
+
+const MimeNode = __nccwpck_require__(8509);
+const mimeFuncs = __nccwpck_require__(994);
+const parseDataURI = (__nccwpck_require__(2673).parseDataURI);
+
+/**
+ * Creates the object for composing a MimeNode instance out from the mail options
+ *
+ * @constructor
+ * @param {Object} mail Mail options
+ */
+class MailComposer {
+ constructor(mail) {
+ this.mail = mail || {};
+ this.message = false;
+ }
+
+ /**
+ * Builds MimeNode instance
+ */
+ compile() {
+ this._alternatives = this.getAlternatives();
+ this._htmlNode = this._alternatives.filter(alternative => /^text\/html\b/i.test(alternative.contentType)).pop();
+ this._attachments = this.getAttachments(!!this._htmlNode);
+
+ this._useRelated = !!(this._htmlNode && this._attachments.related.length);
+ this._useAlternative = this._alternatives.length > 1;
+ this._useMixed = this._attachments.attached.length > 1 || (this._alternatives.length && this._attachments.attached.length === 1);
+
+ // Compose MIME tree
+ if (this.mail.raw) {
+ this.message = new MimeNode('message/rfc822', { newline: this.mail.newline }).setRaw(this.mail.raw);
+ } else if (this._useMixed) {
+ this.message = this._createMixed();
+ } else if (this._useAlternative) {
+ this.message = this._createAlternative();
+ } else if (this._useRelated) {
+ this.message = this._createRelated();
+ } else {
+ this.message = this._createContentNode(
+ false,
+ []
+ .concat(this._alternatives || [])
+ .concat(this._attachments.attached || [])
+ .shift() || {
+ contentType: 'text/plain',
+ content: ''
+ }
+ );
+ }
+
+ // Add custom headers
+ if (this.mail.headers) {
+ this.message.addHeader(this.mail.headers);
+ }
+
+ // Add headers to the root node, always overrides custom headers
+ ['from', 'sender', 'to', 'cc', 'bcc', 'reply-to', 'in-reply-to', 'references', 'subject', 'message-id', 'date'].forEach(header => {
+ let key = header.replace(/-(\w)/g, (o, c) => c.toUpperCase());
+ if (this.mail[key]) {
+ this.message.setHeader(header, this.mail[key]);
+ }
+ });
+
+ // Sets custom envelope
+ if (this.mail.envelope) {
+ this.message.setEnvelope(this.mail.envelope);
+ }
+
+ // ensure Message-Id value
+ this.message.messageId();
+
+ return this.message;
+ }
+
+ /**
+ * List all attachments. Resulting attachment objects can be used as input for MimeNode nodes
+ *
+ * @param {Boolean} findRelated If true separate related attachments from attached ones
+ * @returns {Object} An object of arrays (`related` and `attached`)
+ */
+ getAttachments(findRelated) {
+ let icalEvent, eventObject;
+ let attachments = [].concat(this.mail.attachments || []).map((attachment, i) => {
+ let data;
+ let isMessageNode = /^message\//i.test(attachment.contentType);
+
+ if (/^data:/i.test(attachment.path || attachment.href)) {
+ attachment = this._processDataUrl(attachment);
+ }
+
+ let contentType = attachment.contentType || mimeFuncs.detectMimeType(attachment.filename || attachment.path || attachment.href || 'bin');
+ let isImage = /^image\//i.test(contentType);
+ let contentDisposition = attachment.contentDisposition || (isMessageNode || (isImage && attachment.cid) ? 'inline' : 'attachment');
+
+ data = {
+ contentType,
+ contentDisposition,
+ contentTransferEncoding: 'contentTransferEncoding' in attachment ? attachment.contentTransferEncoding : 'base64'
+ };
+
+ if (attachment.filename) {
+ data.filename = attachment.filename;
+ } else if (!isMessageNode && attachment.filename !== false) {
+ data.filename = (attachment.path || attachment.href || '').split('/').pop().split('?').shift() || 'attachment-' + (i + 1);
+ if (data.filename.indexOf('.') < 0) {
+ data.filename += '.' + mimeFuncs.detectExtension(data.contentType);
+ }
+ }
+
+ if (/^https?:\/\//i.test(attachment.path)) {
+ attachment.href = attachment.path;
+ attachment.path = undefined;
+ }
+
+ if (attachment.cid) {
+ data.cid = attachment.cid;
+ }
+
+ if (attachment.raw) {
+ data.raw = attachment.raw;
+ } else if (attachment.path) {
+ data.content = {
+ path: attachment.path
+ };
+ } else if (attachment.href) {
+ data.content = {
+ href: attachment.href,
+ httpHeaders: attachment.httpHeaders
+ };
+ } else {
+ data.content = attachment.content || '';
+ }
+
+ if (attachment.encoding) {
+ data.encoding = attachment.encoding;
+ }
+
+ if (attachment.headers) {
+ data.headers = attachment.headers;
+ }
+
+ return data;
+ });
+
+ if (this.mail.icalEvent) {
+ if (
+ typeof this.mail.icalEvent === 'object' &&
+ (this.mail.icalEvent.content || this.mail.icalEvent.path || this.mail.icalEvent.href || this.mail.icalEvent.raw)
+ ) {
+ icalEvent = this.mail.icalEvent;
+ } else {
+ icalEvent = {
+ content: this.mail.icalEvent
+ };
+ }
+
+ eventObject = {};
+ Object.keys(icalEvent).forEach(key => {
+ eventObject[key] = icalEvent[key];
+ });
+
+ eventObject.contentType = 'application/ics';
+ if (!eventObject.headers) {
+ eventObject.headers = {};
+ }
+ eventObject.filename = eventObject.filename || 'invite.ics';
+ eventObject.headers['Content-Disposition'] = 'attachment';
+ eventObject.headers['Content-Transfer-Encoding'] = 'base64';
+ }
+
+ if (!findRelated) {
+ return {
+ attached: attachments.concat(eventObject || []),
+ related: []
+ };
+ } else {
+ return {
+ attached: attachments.filter(attachment => !attachment.cid).concat(eventObject || []),
+ related: attachments.filter(attachment => !!attachment.cid)
+ };
+ }
+ }
+
+ /**
+ * List alternatives. Resulting objects can be used as input for MimeNode nodes
+ *
+ * @returns {Array} An array of alternative elements. Includes the `text` and `html` values as well
+ */
+ getAlternatives() {
+ let alternatives = [],
+ text,
+ html,
+ watchHtml,
+ amp,
+ icalEvent,
+ eventObject;
+
+ if (this.mail.text) {
+ if (typeof this.mail.text === 'object' && (this.mail.text.content || this.mail.text.path || this.mail.text.href || this.mail.text.raw)) {
+ text = this.mail.text;
+ } else {
+ text = {
+ content: this.mail.text
+ };
+ }
+ text.contentType = 'text/plain; charset=utf-8';
+ }
+
+ if (this.mail.watchHtml) {
+ if (
+ typeof this.mail.watchHtml === 'object' &&
+ (this.mail.watchHtml.content || this.mail.watchHtml.path || this.mail.watchHtml.href || this.mail.watchHtml.raw)
+ ) {
+ watchHtml = this.mail.watchHtml;
+ } else {
+ watchHtml = {
+ content: this.mail.watchHtml
+ };
+ }
+ watchHtml.contentType = 'text/watch-html; charset=utf-8';
+ }
+
+ if (this.mail.amp) {
+ if (typeof this.mail.amp === 'object' && (this.mail.amp.content || this.mail.amp.path || this.mail.amp.href || this.mail.amp.raw)) {
+ amp = this.mail.amp;
+ } else {
+ amp = {
+ content: this.mail.amp
+ };
+ }
+ amp.contentType = 'text/x-amp-html; charset=utf-8';
+ }
+
+ // NB! when including attachments with a calendar alternative you might end up in a blank screen on some clients
+ if (this.mail.icalEvent) {
+ if (
+ typeof this.mail.icalEvent === 'object' &&
+ (this.mail.icalEvent.content || this.mail.icalEvent.path || this.mail.icalEvent.href || this.mail.icalEvent.raw)
+ ) {
+ icalEvent = this.mail.icalEvent;
+ } else {
+ icalEvent = {
+ content: this.mail.icalEvent
+ };
+ }
+
+ eventObject = {};
+ Object.keys(icalEvent).forEach(key => {
+ eventObject[key] = icalEvent[key];
+ });
+
+ if (eventObject.content && typeof eventObject.content === 'object') {
+ // we are going to have the same attachment twice, so mark this to be
+ // resolved just once
+ eventObject.content._resolve = true;
+ }
+
+ eventObject.filename = false;
+ eventObject.contentType = 'text/calendar; charset=utf-8; method=' + (eventObject.method || 'PUBLISH').toString().trim().toUpperCase();
+ if (!eventObject.headers) {
+ eventObject.headers = {};
+ }
+ }
+
+ if (this.mail.html) {
+ if (typeof this.mail.html === 'object' && (this.mail.html.content || this.mail.html.path || this.mail.html.href || this.mail.html.raw)) {
+ html = this.mail.html;
+ } else {
+ html = {
+ content: this.mail.html
+ };
+ }
+ html.contentType = 'text/html; charset=utf-8';
+ }
+
+ []
+ .concat(text || [])
+ .concat(watchHtml || [])
+ .concat(amp || [])
+ .concat(html || [])
+ .concat(eventObject || [])
+ .concat(this.mail.alternatives || [])
+ .forEach(alternative => {
+ let data;
+
+ if (/^data:/i.test(alternative.path || alternative.href)) {
+ alternative = this._processDataUrl(alternative);
+ }
+
+ data = {
+ contentType: alternative.contentType || mimeFuncs.detectMimeType(alternative.filename || alternative.path || alternative.href || 'txt'),
+ contentTransferEncoding: alternative.contentTransferEncoding
+ };
+
+ if (alternative.filename) {
+ data.filename = alternative.filename;
+ }
+
+ if (/^https?:\/\//i.test(alternative.path)) {
+ alternative.href = alternative.path;
+ alternative.path = undefined;
+ }
+
+ if (alternative.raw) {
+ data.raw = alternative.raw;
+ } else if (alternative.path) {
+ data.content = {
+ path: alternative.path
+ };
+ } else if (alternative.href) {
+ data.content = {
+ href: alternative.href
+ };
+ } else {
+ data.content = alternative.content || '';
+ }
+
+ if (alternative.encoding) {
+ data.encoding = alternative.encoding;
+ }
+
+ if (alternative.headers) {
+ data.headers = alternative.headers;
+ }
+
+ alternatives.push(data);
+ });
+
+ return alternatives;
+ }
+
+ /**
+ * Builds multipart/mixed node. It should always contain different type of elements on the same level
+ * eg. text + attachments
+ *
+ * @param {Object} parentNode Parent for this note. If it does not exist, a root node is created
+ * @returns {Object} MimeNode node element
+ */
+ _createMixed(parentNode) {
+ let node;
+
+ if (!parentNode) {
+ node = new MimeNode('multipart/mixed', {
+ baseBoundary: this.mail.baseBoundary,
+ textEncoding: this.mail.textEncoding,
+ boundaryPrefix: this.mail.boundaryPrefix,
+ disableUrlAccess: this.mail.disableUrlAccess,
+ disableFileAccess: this.mail.disableFileAccess,
+ normalizeHeaderKey: this.mail.normalizeHeaderKey,
+ newline: this.mail.newline
+ });
+ } else {
+ node = parentNode.createChild('multipart/mixed', {
+ disableUrlAccess: this.mail.disableUrlAccess,
+ disableFileAccess: this.mail.disableFileAccess,
+ normalizeHeaderKey: this.mail.normalizeHeaderKey,
+ newline: this.mail.newline
+ });
+ }
+
+ if (this._useAlternative) {
+ this._createAlternative(node);
+ } else if (this._useRelated) {
+ this._createRelated(node);
+ }
+
+ []
+ .concat((!this._useAlternative && this._alternatives) || [])
+ .concat(this._attachments.attached || [])
+ .forEach(element => {
+ // if the element is a html node from related subpart then ignore it
+ if (!this._useRelated || element !== this._htmlNode) {
+ this._createContentNode(node, element);
+ }
+ });
+
+ return node;
+ }
+
+ /**
+ * Builds multipart/alternative node. It should always contain same type of elements on the same level
+ * eg. text + html view of the same data
+ *
+ * @param {Object} parentNode Parent for this note. If it does not exist, a root node is created
+ * @returns {Object} MimeNode node element
+ */
+ _createAlternative(parentNode) {
+ let node;
+
+ if (!parentNode) {
+ node = new MimeNode('multipart/alternative', {
+ baseBoundary: this.mail.baseBoundary,
+ textEncoding: this.mail.textEncoding,
+ boundaryPrefix: this.mail.boundaryPrefix,
+ disableUrlAccess: this.mail.disableUrlAccess,
+ disableFileAccess: this.mail.disableFileAccess,
+ normalizeHeaderKey: this.mail.normalizeHeaderKey,
+ newline: this.mail.newline
+ });
+ } else {
+ node = parentNode.createChild('multipart/alternative', {
+ disableUrlAccess: this.mail.disableUrlAccess,
+ disableFileAccess: this.mail.disableFileAccess,
+ normalizeHeaderKey: this.mail.normalizeHeaderKey,
+ newline: this.mail.newline
+ });
+ }
+
+ this._alternatives.forEach(alternative => {
+ if (this._useRelated && this._htmlNode === alternative) {
+ this._createRelated(node);
+ } else {
+ this._createContentNode(node, alternative);
+ }
+ });
+
+ return node;
+ }
+
+ /**
+ * Builds multipart/related node. It should always contain html node with related attachments
+ *
+ * @param {Object} parentNode Parent for this note. If it does not exist, a root node is created
+ * @returns {Object} MimeNode node element
+ */
+ _createRelated(parentNode) {
+ let node;
+
+ if (!parentNode) {
+ node = new MimeNode('multipart/related; type="text/html"', {
+ baseBoundary: this.mail.baseBoundary,
+ textEncoding: this.mail.textEncoding,
+ boundaryPrefix: this.mail.boundaryPrefix,
+ disableUrlAccess: this.mail.disableUrlAccess,
+ disableFileAccess: this.mail.disableFileAccess,
+ normalizeHeaderKey: this.mail.normalizeHeaderKey,
+ newline: this.mail.newline
+ });
+ } else {
+ node = parentNode.createChild('multipart/related; type="text/html"', {
+ disableUrlAccess: this.mail.disableUrlAccess,
+ disableFileAccess: this.mail.disableFileAccess,
+ normalizeHeaderKey: this.mail.normalizeHeaderKey,
+ newline: this.mail.newline
+ });
+ }
+
+ this._createContentNode(node, this._htmlNode);
+
+ this._attachments.related.forEach(alternative => this._createContentNode(node, alternative));
+
+ return node;
+ }
+
+ /**
+ * Creates a regular node with contents
+ *
+ * @param {Object} parentNode Parent for this note. If it does not exist, a root node is created
+ * @param {Object} element Node data
+ * @returns {Object} MimeNode node element
+ */
+ _createContentNode(parentNode, element) {
+ element = element || {};
+ element.content = element.content || '';
+
+ let node;
+ let encoding = (element.encoding || 'utf8')
+ .toString()
+ .toLowerCase()
+ .replace(/[-_\s]/g, '');
+
+ if (!parentNode) {
+ node = new MimeNode(element.contentType, {
+ filename: element.filename,
+ baseBoundary: this.mail.baseBoundary,
+ textEncoding: this.mail.textEncoding,
+ boundaryPrefix: this.mail.boundaryPrefix,
+ disableUrlAccess: this.mail.disableUrlAccess,
+ disableFileAccess: this.mail.disableFileAccess,
+ normalizeHeaderKey: this.mail.normalizeHeaderKey,
+ newline: this.mail.newline
+ });
+ } else {
+ node = parentNode.createChild(element.contentType, {
+ filename: element.filename,
+ textEncoding: this.mail.textEncoding,
+ disableUrlAccess: this.mail.disableUrlAccess,
+ disableFileAccess: this.mail.disableFileAccess,
+ normalizeHeaderKey: this.mail.normalizeHeaderKey,
+ newline: this.mail.newline
+ });
+ }
+
+ // add custom headers
+ if (element.headers) {
+ node.addHeader(element.headers);
+ }
+
+ if (element.cid) {
+ node.setHeader('Content-Id', '<' + element.cid.replace(/[<>]/g, '') + '>');
+ }
+
+ if (element.contentTransferEncoding) {
+ node.setHeader('Content-Transfer-Encoding', element.contentTransferEncoding);
+ } else if (this.mail.encoding && /^text\//i.test(element.contentType)) {
+ node.setHeader('Content-Transfer-Encoding', this.mail.encoding);
+ }
+
+ if (!/^text\//i.test(element.contentType) || element.contentDisposition) {
+ node.setHeader(
+ 'Content-Disposition',
+ element.contentDisposition || (element.cid && /^image\//i.test(element.contentType) ? 'inline' : 'attachment')
+ );
+ }
+
+ if (typeof element.content === 'string' && !['utf8', 'usascii', 'ascii'].includes(encoding)) {
+ element.content = Buffer.from(element.content, encoding);
+ }
+
+ // prefer pregenerated raw content
+ if (element.raw) {
+ node.setRaw(element.raw);
+ } else {
+ node.setContent(element.content);
+ }
+
+ return node;
+ }
+
+ /**
+ * Parses data uri and converts it to a Buffer
+ *
+ * @param {Object} element Content element
+ * @return {Object} Parsed element
+ */
+ _processDataUrl(element) {
+ let parsedDataUri;
+ if ((element.path || element.href).match(/^data:/)) {
+ parsedDataUri = parseDataURI(element.path || element.href);
+ }
+
+ if (!parsedDataUri) {
+ return element;
+ }
+
+ element.content = parsedDataUri.data;
+ element.contentType = element.contentType || parsedDataUri.contentType;
+
+ if ('path' in element) {
+ element.path = false;
+ }
+
+ if ('href' in element) {
+ element.href = false;
+ }
+
+ return element;
+ }
+}
+
+module.exports = MailComposer;
+
+
+/***/ }),
+
+/***/ 833:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const EventEmitter = __nccwpck_require__(2361);
+const shared = __nccwpck_require__(2673);
+const mimeTypes = __nccwpck_require__(836);
+const MailComposer = __nccwpck_require__(1694);
+const DKIM = __nccwpck_require__(7757);
+const httpProxyClient = __nccwpck_require__(2790);
+const util = __nccwpck_require__(3837);
+const urllib = __nccwpck_require__(7310);
+const packageData = __nccwpck_require__(4129);
+const MailMessage = __nccwpck_require__(5399);
+const net = __nccwpck_require__(1808);
+const dns = __nccwpck_require__(9523);
+const crypto = __nccwpck_require__(6113);
+
+/**
+ * Creates an object for exposing the Mail API
+ *
+ * @constructor
+ * @param {Object} transporter Transport object instance to pass the mails to
+ */
+class Mail extends EventEmitter {
+ constructor(transporter, options, defaults) {
+ super();
+
+ this.options = options || {};
+ this._defaults = defaults || {};
+
+ this._defaultPlugins = {
+ compile: [(...args) => this._convertDataImages(...args)],
+ stream: []
+ };
+
+ this._userPlugins = {
+ compile: [],
+ stream: []
+ };
+
+ this.meta = new Map();
+
+ this.dkim = this.options.dkim ? new DKIM(this.options.dkim) : false;
+
+ this.transporter = transporter;
+ this.transporter.mailer = this;
+
+ this.logger = shared.getLogger(this.options, {
+ component: this.options.component || 'mail'
+ });
+
+ this.logger.debug(
+ {
+ tnx: 'create'
+ },
+ 'Creating transport: %s',
+ this.getVersionString()
+ );
+
+ // setup emit handlers for the transporter
+ if (typeof this.transporter.on === 'function') {
+ // deprecated log interface
+ this.transporter.on('log', log => {
+ this.logger.debug(
+ {
+ tnx: 'transport'
+ },
+ '%s: %s',
+ log.type,
+ log.message
+ );
+ });
+
+ // transporter errors
+ this.transporter.on('error', err => {
+ this.logger.error(
+ {
+ err,
+ tnx: 'transport'
+ },
+ 'Transport Error: %s',
+ err.message
+ );
+ this.emit('error', err);
+ });
+
+ // indicates if the sender has became idle
+ this.transporter.on('idle', (...args) => {
+ this.emit('idle', ...args);
+ });
+ }
+
+ /**
+ * Optional methods passed to the underlying transport object
+ */
+ ['close', 'isIdle', 'verify'].forEach(method => {
+ this[method] = (...args) => {
+ if (typeof this.transporter[method] === 'function') {
+ if (method === 'verify' && typeof this.getSocket === 'function') {
+ this.transporter.getSocket = this.getSocket;
+ this.getSocket = false;
+ }
+ return this.transporter[method](...args);
+ } else {
+ this.logger.warn(
+ {
+ tnx: 'transport',
+ methodName: method
+ },
+ 'Non existing method %s called for transport',
+ method
+ );
+ return false;
+ }
+ };
+ });
+
+ // setup proxy handling
+ if (this.options.proxy && typeof this.options.proxy === 'string') {
+ this.setupProxy(this.options.proxy);
+ }
+ }
+
+ use(step, plugin) {
+ step = (step || '').toString();
+ if (!this._userPlugins.hasOwnProperty(step)) {
+ this._userPlugins[step] = [plugin];
+ } else {
+ this._userPlugins[step].push(plugin);
+ }
+
+ return this;
+ }
+
+ /**
+ * Sends an email using the preselected transport object
+ *
+ * @param {Object} data E-data description
+ * @param {Function?} callback Callback to run once the sending succeeded or failed
+ */
+ sendMail(data, callback = null) {
+ let promise;
+
+ if (!callback) {
+ promise = new Promise((resolve, reject) => {
+ callback = shared.callbackPromise(resolve, reject);
+ });
+ }
+
+ if (typeof this.getSocket === 'function') {
+ this.transporter.getSocket = this.getSocket;
+ this.getSocket = false;
+ }
+
+ let mail = new MailMessage(this, data);
+
+ this.logger.debug(
+ {
+ tnx: 'transport',
+ name: this.transporter.name,
+ version: this.transporter.version,
+ action: 'send'
+ },
+ 'Sending mail using %s/%s',
+ this.transporter.name,
+ this.transporter.version
+ );
+
+ this._processPlugins('compile', mail, err => {
+ if (err) {
+ this.logger.error(
+ {
+ err,
+ tnx: 'plugin',
+ action: 'compile'
+ },
+ 'PluginCompile Error: %s',
+ err.message
+ );
+ return callback(err);
+ }
+
+ mail.message = new MailComposer(mail.data).compile();
+
+ mail.setMailerHeader();
+ mail.setPriorityHeaders();
+ mail.setListHeaders();
+
+ this._processPlugins('stream', mail, err => {
+ if (err) {
+ this.logger.error(
+ {
+ err,
+ tnx: 'plugin',
+ action: 'stream'
+ },
+ 'PluginStream Error: %s',
+ err.message
+ );
+ return callback(err);
+ }
+
+ if (mail.data.dkim || this.dkim) {
+ mail.message.processFunc(input => {
+ let dkim = mail.data.dkim ? new DKIM(mail.data.dkim) : this.dkim;
+ this.logger.debug(
+ {
+ tnx: 'DKIM',
+ messageId: mail.message.messageId(),
+ dkimDomains: dkim.keys.map(key => key.keySelector + '.' + key.domainName).join(', ')
+ },
+ 'Signing outgoing message with %s keys',
+ dkim.keys.length
+ );
+ return dkim.sign(input, mail.data._dkim);
+ });
+ }
+
+ this.transporter.send(mail, (...args) => {
+ if (args[0]) {
+ this.logger.error(
+ {
+ err: args[0],
+ tnx: 'transport',
+ action: 'send'
+ },
+ 'Send Error: %s',
+ args[0].message
+ );
+ }
+ callback(...args);
+ });
+ });
+ });
+
+ return promise;
+ }
+
+ getVersionString() {
+ return util.format('%s (%s; +%s; %s/%s)', packageData.name, packageData.version, packageData.homepage, this.transporter.name, this.transporter.version);
+ }
+
+ _processPlugins(step, mail, callback) {
+ step = (step || '').toString();
+
+ if (!this._userPlugins.hasOwnProperty(step)) {
+ return callback();
+ }
+
+ let userPlugins = this._userPlugins[step] || [];
+ let defaultPlugins = this._defaultPlugins[step] || [];
+
+ if (userPlugins.length) {
+ this.logger.debug(
+ {
+ tnx: 'transaction',
+ pluginCount: userPlugins.length,
+ step
+ },
+ 'Using %s plugins for %s',
+ userPlugins.length,
+ step
+ );
+ }
+
+ if (userPlugins.length + defaultPlugins.length === 0) {
+ return callback();
+ }
+
+ let pos = 0;
+ let block = 'default';
+ let processPlugins = () => {
+ let curplugins = block === 'default' ? defaultPlugins : userPlugins;
+ if (pos >= curplugins.length) {
+ if (block === 'default' && userPlugins.length) {
+ block = 'user';
+ pos = 0;
+ curplugins = userPlugins;
+ } else {
+ return callback();
+ }
+ }
+ let plugin = curplugins[pos++];
+ plugin(mail, err => {
+ if (err) {
+ return callback(err);
+ }
+ processPlugins();
+ });
+ };
+
+ processPlugins();
+ }
+
+ /**
+ * Sets up proxy handler for a Nodemailer object
+ *
+ * @param {String} proxyUrl Proxy configuration url
+ */
+ setupProxy(proxyUrl) {
+ let proxy = urllib.parse(proxyUrl);
+
+ // setup socket handler for the mailer object
+ this.getSocket = (options, callback) => {
+ let protocol = proxy.protocol.replace(/:$/, '').toLowerCase();
+
+ if (this.meta.has('proxy_handler_' + protocol)) {
+ return this.meta.get('proxy_handler_' + protocol)(proxy, options, callback);
+ }
+
+ switch (protocol) {
+ // Connect using a HTTP CONNECT method
+ case 'http':
+ case 'https':
+ httpProxyClient(proxy.href, options.port, options.host, (err, socket) => {
+ if (err) {
+ return callback(err);
+ }
+ return callback(null, {
+ connection: socket
+ });
+ });
+ return;
+ case 'socks':
+ case 'socks5':
+ case 'socks4':
+ case 'socks4a': {
+ if (!this.meta.has('proxy_socks_module')) {
+ return callback(new Error('Socks module not loaded'));
+ }
+ let connect = ipaddress => {
+ let proxyV2 = !!this.meta.get('proxy_socks_module').SocksClient;
+ let socksClient = proxyV2 ? this.meta.get('proxy_socks_module').SocksClient : this.meta.get('proxy_socks_module');
+ let proxyType = Number(proxy.protocol.replace(/\D/g, '')) || 5;
+ let connectionOpts = {
+ proxy: {
+ ipaddress,
+ port: Number(proxy.port),
+ type: proxyType
+ },
+ [proxyV2 ? 'destination' : 'target']: {
+ host: options.host,
+ port: options.port
+ },
+ command: 'connect'
+ };
+
+ if (proxy.auth) {
+ let username = decodeURIComponent(proxy.auth.split(':').shift());
+ let password = decodeURIComponent(proxy.auth.split(':').pop());
+ if (proxyV2) {
+ connectionOpts.proxy.userId = username;
+ connectionOpts.proxy.password = password;
+ } else if (proxyType === 4) {
+ connectionOpts.userid = username;
+ } else {
+ connectionOpts.authentication = {
+ username,
+ password
+ };
+ }
+ }
+
+ socksClient.createConnection(connectionOpts, (err, info) => {
+ if (err) {
+ return callback(err);
+ }
+ return callback(null, {
+ connection: info.socket || info
+ });
+ });
+ };
+
+ if (net.isIP(proxy.hostname)) {
+ return connect(proxy.hostname);
+ }
+
+ return dns.resolve(proxy.hostname, (err, address) => {
+ if (err) {
+ return callback(err);
+ }
+ connect(Array.isArray(address) ? address[0] : address);
+ });
+ }
+ }
+ callback(new Error('Unknown proxy configuration'));
+ };
+ }
+
+ _convertDataImages(mail, callback) {
+ if ((!this.options.attachDataUrls && !mail.data.attachDataUrls) || !mail.data.html) {
+ return callback();
+ }
+ mail.resolveContent(mail.data, 'html', (err, html) => {
+ if (err) {
+ return callback(err);
+ }
+ let cidCounter = 0;
+ html = (html || '')
+ .toString()
+ .replace(/(]{0,1024} src\s{0,20}=[\s"']{0,20})(data:([^;]+);[^"'>\s]+)/gi, (match, prefix, dataUri, mimeType) => {
+ let cid = crypto.randomBytes(10).toString('hex') + '@localhost';
+ if (!mail.data.attachments) {
+ mail.data.attachments = [];
+ }
+ if (!Array.isArray(mail.data.attachments)) {
+ mail.data.attachments = [].concat(mail.data.attachments || []);
+ }
+ mail.data.attachments.push({
+ path: dataUri,
+ cid,
+ filename: 'image-' + ++cidCounter + '.' + mimeTypes.detectExtension(mimeType)
+ });
+ return prefix + 'cid:' + cid;
+ });
+ mail.data.html = html;
+ callback();
+ });
+ }
+
+ set(key, value) {
+ return this.meta.set(key, value);
+ }
+
+ get(key) {
+ return this.meta.get(key);
+ }
+}
+
+module.exports = Mail;
+
+
+/***/ }),
+
+/***/ 5399:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const shared = __nccwpck_require__(2673);
+const MimeNode = __nccwpck_require__(8509);
+const mimeFuncs = __nccwpck_require__(994);
+
+class MailMessage {
+ constructor(mailer, data) {
+ this.mailer = mailer;
+ this.data = {};
+ this.message = null;
+
+ data = data || {};
+ let options = mailer.options || {};
+ let defaults = mailer._defaults || {};
+
+ Object.keys(data).forEach(key => {
+ this.data[key] = data[key];
+ });
+
+ this.data.headers = this.data.headers || {};
+
+ // apply defaults
+ Object.keys(defaults).forEach(key => {
+ if (!(key in this.data)) {
+ this.data[key] = defaults[key];
+ } else if (key === 'headers') {
+ // headers is a special case. Allow setting individual default headers
+ Object.keys(defaults.headers).forEach(key => {
+ if (!(key in this.data.headers)) {
+ this.data.headers[key] = defaults.headers[key];
+ }
+ });
+ }
+ });
+
+ // force specific keys from transporter options
+ ['disableFileAccess', 'disableUrlAccess', 'normalizeHeaderKey'].forEach(key => {
+ if (key in options) {
+ this.data[key] = options[key];
+ }
+ });
+ }
+
+ resolveContent(...args) {
+ return shared.resolveContent(...args);
+ }
+
+ resolveAll(callback) {
+ let keys = [
+ [this.data, 'html'],
+ [this.data, 'text'],
+ [this.data, 'watchHtml'],
+ [this.data, 'amp'],
+ [this.data, 'icalEvent']
+ ];
+
+ if (this.data.alternatives && this.data.alternatives.length) {
+ this.data.alternatives.forEach((alternative, i) => {
+ keys.push([this.data.alternatives, i]);
+ });
+ }
+
+ if (this.data.attachments && this.data.attachments.length) {
+ this.data.attachments.forEach((attachment, i) => {
+ if (!attachment.filename) {
+ attachment.filename = (attachment.path || attachment.href || '').split('/').pop().split('?').shift() || 'attachment-' + (i + 1);
+ if (attachment.filename.indexOf('.') < 0) {
+ attachment.filename += '.' + mimeFuncs.detectExtension(attachment.contentType);
+ }
+ }
+
+ if (!attachment.contentType) {
+ attachment.contentType = mimeFuncs.detectMimeType(attachment.filename || attachment.path || attachment.href || 'bin');
+ }
+
+ keys.push([this.data.attachments, i]);
+ });
+ }
+
+ let mimeNode = new MimeNode();
+
+ let addressKeys = ['from', 'to', 'cc', 'bcc', 'sender', 'replyTo'];
+
+ addressKeys.forEach(address => {
+ let value;
+ if (this.message) {
+ value = [].concat(mimeNode._parseAddresses(this.message.getHeader(address === 'replyTo' ? 'reply-to' : address)) || []);
+ } else if (this.data[address]) {
+ value = [].concat(mimeNode._parseAddresses(this.data[address]) || []);
+ }
+ if (value && value.length) {
+ this.data[address] = value;
+ } else if (address in this.data) {
+ this.data[address] = null;
+ }
+ });
+
+ let singleKeys = ['from', 'sender'];
+ singleKeys.forEach(address => {
+ if (this.data[address]) {
+ this.data[address] = this.data[address].shift();
+ }
+ });
+
+ let pos = 0;
+ let resolveNext = () => {
+ if (pos >= keys.length) {
+ return callback(null, this.data);
+ }
+ let args = keys[pos++];
+ if (!args[0] || !args[0][args[1]]) {
+ return resolveNext();
+ }
+ shared.resolveContent(...args, (err, value) => {
+ if (err) {
+ return callback(err);
+ }
+
+ let node = {
+ content: value
+ };
+ if (args[0][args[1]] && typeof args[0][args[1]] === 'object' && !Buffer.isBuffer(args[0][args[1]])) {
+ Object.keys(args[0][args[1]]).forEach(key => {
+ if (!(key in node) && !['content', 'path', 'href', 'raw'].includes(key)) {
+ node[key] = args[0][args[1]][key];
+ }
+ });
+ }
+
+ args[0][args[1]] = node;
+ resolveNext();
+ });
+ };
+
+ setImmediate(() => resolveNext());
+ }
+
+ normalize(callback) {
+ let envelope = this.data.envelope || this.message.getEnvelope();
+ let messageId = this.message.messageId();
+
+ this.resolveAll((err, data) => {
+ if (err) {
+ return callback(err);
+ }
+
+ data.envelope = envelope;
+ data.messageId = messageId;
+
+ ['html', 'text', 'watchHtml', 'amp'].forEach(key => {
+ if (data[key] && data[key].content) {
+ if (typeof data[key].content === 'string') {
+ data[key] = data[key].content;
+ } else if (Buffer.isBuffer(data[key].content)) {
+ data[key] = data[key].content.toString();
+ }
+ }
+ });
+
+ if (data.icalEvent && Buffer.isBuffer(data.icalEvent.content)) {
+ data.icalEvent.content = data.icalEvent.content.toString('base64');
+ data.icalEvent.encoding = 'base64';
+ }
+
+ if (data.alternatives && data.alternatives.length) {
+ data.alternatives.forEach(alternative => {
+ if (alternative && alternative.content && Buffer.isBuffer(alternative.content)) {
+ alternative.content = alternative.content.toString('base64');
+ alternative.encoding = 'base64';
+ }
+ });
+ }
+
+ if (data.attachments && data.attachments.length) {
+ data.attachments.forEach(attachment => {
+ if (attachment && attachment.content && Buffer.isBuffer(attachment.content)) {
+ attachment.content = attachment.content.toString('base64');
+ attachment.encoding = 'base64';
+ }
+ });
+ }
+
+ data.normalizedHeaders = {};
+ Object.keys(data.headers || {}).forEach(key => {
+ let value = [].concat(data.headers[key] || []).shift();
+ value = (value && value.value) || value;
+ if (value) {
+ if (['references', 'in-reply-to', 'message-id', 'content-id'].includes(key)) {
+ value = this.message._encodeHeaderValue(key, value);
+ }
+ data.normalizedHeaders[key] = value;
+ }
+ });
+
+ if (data.list && typeof data.list === 'object') {
+ let listHeaders = this._getListHeaders(data.list);
+ listHeaders.forEach(entry => {
+ data.normalizedHeaders[entry.key] = entry.value.map(val => (val && val.value) || val).join(', ');
+ });
+ }
+
+ if (data.references) {
+ data.normalizedHeaders.references = this.message._encodeHeaderValue('references', data.references);
+ }
+
+ if (data.inReplyTo) {
+ data.normalizedHeaders['in-reply-to'] = this.message._encodeHeaderValue('in-reply-to', data.inReplyTo);
+ }
+
+ return callback(null, data);
+ });
+ }
+
+ setMailerHeader() {
+ if (!this.message || !this.data.xMailer) {
+ return;
+ }
+ this.message.setHeader('X-Mailer', this.data.xMailer);
+ }
+
+ setPriorityHeaders() {
+ if (!this.message || !this.data.priority) {
+ return;
+ }
+ switch ((this.data.priority || '').toString().toLowerCase()) {
+ case 'high':
+ this.message.setHeader('X-Priority', '1 (Highest)');
+ this.message.setHeader('X-MSMail-Priority', 'High');
+ this.message.setHeader('Importance', 'High');
+ break;
+ case 'low':
+ this.message.setHeader('X-Priority', '5 (Lowest)');
+ this.message.setHeader('X-MSMail-Priority', 'Low');
+ this.message.setHeader('Importance', 'Low');
+ break;
+ default:
+ // do not add anything, since all messages are 'Normal' by default
+ }
+ }
+
+ setListHeaders() {
+ if (!this.message || !this.data.list || typeof this.data.list !== 'object') {
+ return;
+ }
+ // add optional List-* headers
+ if (this.data.list && typeof this.data.list === 'object') {
+ this._getListHeaders(this.data.list).forEach(listHeader => {
+ listHeader.value.forEach(value => {
+ this.message.addHeader(listHeader.key, value);
+ });
+ });
+ }
+ }
+
+ _getListHeaders(listData) {
+ // make sure an url looks like
+ return Object.keys(listData).map(key => ({
+ key: 'list-' + key.toLowerCase().trim(),
+ value: [].concat(listData[key] || []).map(value => ({
+ prepared: true,
+ foldLines: true,
+ value: []
+ .concat(value || [])
+ .map(value => {
+ if (typeof value === 'string') {
+ value = {
+ url: value
+ };
+ }
+
+ if (value && value.url) {
+ if (key.toLowerCase().trim() === 'id') {
+ // List-ID: "comment"
+ let comment = value.comment || '';
+ if (mimeFuncs.isPlainText(comment)) {
+ comment = '"' + comment + '"';
+ } else {
+ comment = mimeFuncs.encodeWord(comment);
+ }
+
+ return (value.comment ? comment + ' ' : '') + this._formatListUrl(value.url).replace(/^<[^:]+\/{,2}/, '');
+ }
+
+ // List-*: (comment)
+ let comment = value.comment || '';
+ if (!mimeFuncs.isPlainText(comment)) {
+ comment = mimeFuncs.encodeWord(comment);
+ }
+
+ return this._formatListUrl(value.url) + (value.comment ? ' (' + comment + ')' : '');
+ }
+
+ return '';
+ })
+ .filter(value => value)
+ .join(', ')
+ }))
+ }));
+ }
+
+ _formatListUrl(url) {
+ url = url.replace(/[\s<]+|[\s>]+/g, '');
+ if (/^(https?|mailto|ftp):/.test(url)) {
+ return '<' + url + '>';
+ }
+ if (/^[^@]+@[^@]+$/.test(url)) {
+ return '';
+ }
+
+ return '';
+ }
+}
+
+module.exports = MailMessage;
+
+
+/***/ }),
+
+/***/ 994:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+/* eslint no-control-regex:0 */
+
+
+
+const base64 = __nccwpck_require__(4017);
+const qp = __nccwpck_require__(9716);
+const mimeTypes = __nccwpck_require__(836);
+
+module.exports = {
+ /**
+ * Checks if a value is plaintext string (uses only printable 7bit chars)
+ *
+ * @param {String} value String to be tested
+ * @returns {Boolean} true if it is a plaintext string
+ */
+ isPlainText(value, isParam) {
+ const re = isParam ? /[\x00-\x08\x0b\x0c\x0e-\x1f"\u0080-\uFFFF]/ : /[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/;
+ if (typeof value !== 'string' || re.test(value)) {
+ return false;
+ } else {
+ return true;
+ }
+ },
+
+ /**
+ * Checks if a multi line string containes lines longer than the selected value.
+ *
+ * Useful when detecting if a mail message needs any processing at all –
+ * if only plaintext characters are used and lines are short, then there is
+ * no need to encode the values in any way. If the value is plaintext but has
+ * longer lines then allowed, then use format=flowed
+ *
+ * @param {Number} lineLength Max line length to check for
+ * @returns {Boolean} Returns true if there is at least one line longer than lineLength chars
+ */
+ hasLongerLines(str, lineLength) {
+ if (str.length > 128 * 1024) {
+ // do not test strings longer than 128kB
+ return true;
+ }
+ return new RegExp('^.{' + (lineLength + 1) + ',}', 'm').test(str);
+ },
+
+ /**
+ * Encodes a string or an Buffer to an UTF-8 MIME Word (rfc2047)
+ *
+ * @param {String|Buffer} data String to be encoded
+ * @param {String} mimeWordEncoding='Q' Encoding for the mime word, either Q or B
+ * @param {Number} [maxLength=0] If set, split mime words into several chunks if needed
+ * @return {String} Single or several mime words joined together
+ */
+ encodeWord(data, mimeWordEncoding, maxLength) {
+ mimeWordEncoding = (mimeWordEncoding || 'Q').toString().toUpperCase().trim().charAt(0);
+ maxLength = maxLength || 0;
+
+ let encodedStr;
+ let toCharset = 'UTF-8';
+
+ if (maxLength && maxLength > 7 + toCharset.length) {
+ maxLength -= 7 + toCharset.length;
+ }
+
+ if (mimeWordEncoding === 'Q') {
+ // https://tools.ietf.org/html/rfc2047#section-5 rule (3)
+ encodedStr = qp.encode(data).replace(/[^a-z0-9!*+\-/=]/gi, chr => {
+ let ord = chr.charCodeAt(0).toString(16).toUpperCase();
+ if (chr === ' ') {
+ return '_';
+ } else {
+ return '=' + (ord.length === 1 ? '0' + ord : ord);
+ }
+ });
+ } else if (mimeWordEncoding === 'B') {
+ encodedStr = typeof data === 'string' ? data : base64.encode(data);
+ maxLength = maxLength ? Math.max(3, ((maxLength - (maxLength % 4)) / 4) * 3) : 0;
+ }
+
+ if (maxLength && (mimeWordEncoding !== 'B' ? encodedStr : base64.encode(data)).length > maxLength) {
+ if (mimeWordEncoding === 'Q') {
+ encodedStr = this.splitMimeEncodedString(encodedStr, maxLength).join('?= =?' + toCharset + '?' + mimeWordEncoding + '?');
+ } else {
+ // RFC2047 6.3 (2) states that encoded-word must include an integral number of characters, so no chopping unicode sequences
+ let parts = [];
+ let lpart = '';
+ for (let i = 0, len = encodedStr.length; i < len; i++) {
+ let chr = encodedStr.charAt(i);
+
+ if (/[\ud83c\ud83d\ud83e]/.test(chr) && i < len - 1) {
+ // composite emoji byte, so add the next byte as well
+ chr += encodedStr.charAt(++i);
+ }
+
+ // check if we can add this character to the existing string
+ // without breaking byte length limit
+ if (Buffer.byteLength(lpart + chr) <= maxLength || i === 0) {
+ lpart += chr;
+ } else {
+ // we hit the length limit, so push the existing string and start over
+ parts.push(base64.encode(lpart));
+ lpart = chr;
+ }
+ }
+ if (lpart) {
+ parts.push(base64.encode(lpart));
+ }
+
+ if (parts.length > 1) {
+ encodedStr = parts.join('?= =?' + toCharset + '?' + mimeWordEncoding + '?');
+ } else {
+ encodedStr = parts.join('');
+ }
+ }
+ } else if (mimeWordEncoding === 'B') {
+ encodedStr = base64.encode(data);
+ }
+
+ return '=?' + toCharset + '?' + mimeWordEncoding + '?' + encodedStr + (encodedStr.substr(-2) === '?=' ? '' : '?=');
+ },
+
+ /**
+ * Finds word sequences with non ascii text and converts these to mime words
+ *
+ * @param {String} value String to be encoded
+ * @param {String} mimeWordEncoding='Q' Encoding for the mime word, either Q or B
+ * @param {Number} [maxLength=0] If set, split mime words into several chunks if needed
+ * @param {Boolean} [encodeAll=false] If true and the value needs encoding then encodes entire string, not just the smallest match
+ * @return {String} String with possible mime words
+ */
+ encodeWords(value, mimeWordEncoding, maxLength, encodeAll) {
+ maxLength = maxLength || 0;
+
+ let encodedValue;
+
+ // find first word with a non-printable ascii or special symbol in it
+ let firstMatch = value.match(/(?:^|\s)([^\s]*["\u0080-\uFFFF])/);
+ if (!firstMatch) {
+ return value;
+ }
+
+ if (encodeAll) {
+ // if it is requested to encode everything or the string contains something that resebles encoded word, then encode everything
+
+ return this.encodeWord(value, mimeWordEncoding, maxLength);
+ }
+
+ // find the last word with a non-printable ascii in it
+ let lastMatch = value.match(/(["\u0080-\uFFFF][^\s]*)[^"\u0080-\uFFFF]*$/);
+ if (!lastMatch) {
+ // should not happen
+ return value;
+ }
+
+ let startIndex =
+ firstMatch.index +
+ (
+ firstMatch[0].match(/[^\s]/) || {
+ index: 0
+ }
+ ).index;
+ let endIndex = lastMatch.index + (lastMatch[1] || '').length;
+
+ encodedValue =
+ (startIndex ? value.substr(0, startIndex) : '') +
+ this.encodeWord(value.substring(startIndex, endIndex), mimeWordEncoding || 'Q', maxLength) +
+ (endIndex < value.length ? value.substr(endIndex) : '');
+
+ return encodedValue;
+ },
+
+ /**
+ * Joins parsed header value together as 'value; param1=value1; param2=value2'
+ * PS: We are following RFC 822 for the list of special characters that we need to keep in quotes.
+ * Refer: https://www.w3.org/Protocols/rfc1341/4_Content-Type.html
+ * @param {Object} structured Parsed header value
+ * @return {String} joined header value
+ */
+ buildHeaderValue(structured) {
+ let paramsArray = [];
+
+ Object.keys(structured.params || {}).forEach(param => {
+ // filename might include unicode characters so it is a special case
+ // other values probably do not
+ let value = structured.params[param];
+ if (!this.isPlainText(value, true) || value.length >= 75) {
+ this.buildHeaderParam(param, value, 50).forEach(encodedParam => {
+ if (!/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(encodedParam.value) || encodedParam.key.substr(-1) === '*') {
+ paramsArray.push(encodedParam.key + '=' + encodedParam.value);
+ } else {
+ paramsArray.push(encodedParam.key + '=' + JSON.stringify(encodedParam.value));
+ }
+ });
+ } else if (/[\s'"\\;:/=(),<>@[\]?]|^-/.test(value)) {
+ paramsArray.push(param + '=' + JSON.stringify(value));
+ } else {
+ paramsArray.push(param + '=' + value);
+ }
+ });
+
+ return structured.value + (paramsArray.length ? '; ' + paramsArray.join('; ') : '');
+ },
+
+ /**
+ * Encodes a string or an Buffer to an UTF-8 Parameter Value Continuation encoding (rfc2231)
+ * Useful for splitting long parameter values.
+ *
+ * For example
+ * title="unicode string"
+ * becomes
+ * title*0*=utf-8''unicode
+ * title*1*=%20string
+ *
+ * @param {String|Buffer} data String to be encoded
+ * @param {Number} [maxLength=50] Max length for generated chunks
+ * @param {String} [fromCharset='UTF-8'] Source sharacter set
+ * @return {Array} A list of encoded keys and headers
+ */
+ buildHeaderParam(key, data, maxLength) {
+ let list = [];
+ let encodedStr = typeof data === 'string' ? data : (data || '').toString();
+ let encodedStrArr;
+ let chr, ord;
+ let line;
+ let startPos = 0;
+ let i, len;
+
+ maxLength = maxLength || 50;
+
+ // process ascii only text
+ if (this.isPlainText(data, true)) {
+ // check if conversion is even needed
+ if (encodedStr.length <= maxLength) {
+ return [
+ {
+ key,
+ value: encodedStr
+ }
+ ];
+ }
+
+ encodedStr = encodedStr.replace(new RegExp('.{' + maxLength + '}', 'g'), str => {
+ list.push({
+ line: str
+ });
+ return '';
+ });
+
+ if (encodedStr) {
+ list.push({
+ line: encodedStr
+ });
+ }
+ } else {
+ if (/[\uD800-\uDBFF]/.test(encodedStr)) {
+ // string containts surrogate pairs, so normalize it to an array of bytes
+ encodedStrArr = [];
+ for (i = 0, len = encodedStr.length; i < len; i++) {
+ chr = encodedStr.charAt(i);
+ ord = chr.charCodeAt(0);
+ if (ord >= 0xd800 && ord <= 0xdbff && i < len - 1) {
+ chr += encodedStr.charAt(i + 1);
+ encodedStrArr.push(chr);
+ i++;
+ } else {
+ encodedStrArr.push(chr);
+ }
+ }
+ encodedStr = encodedStrArr;
+ }
+
+ // first line includes the charset and language info and needs to be encoded
+ // even if it does not contain any unicode characters
+ line = 'utf-8\x27\x27';
+ let encoded = true;
+ startPos = 0;
+
+ // process text with unicode or special chars
+ for (i = 0, len = encodedStr.length; i < len; i++) {
+ chr = encodedStr[i];
+
+ if (encoded) {
+ chr = this.safeEncodeURIComponent(chr);
+ } else {
+ // try to urlencode current char
+ chr = chr === ' ' ? chr : this.safeEncodeURIComponent(chr);
+ // By default it is not required to encode a line, the need
+ // only appears when the string contains unicode or special chars
+ // in this case we start processing the line over and encode all chars
+ if (chr !== encodedStr[i]) {
+ // Check if it is even possible to add the encoded char to the line
+ // If not, there is no reason to use this line, just push it to the list
+ // and start a new line with the char that needs encoding
+ if ((this.safeEncodeURIComponent(line) + chr).length >= maxLength) {
+ list.push({
+ line,
+ encoded
+ });
+ line = '';
+ startPos = i - 1;
+ } else {
+ encoded = true;
+ i = startPos;
+ line = '';
+ continue;
+ }
+ }
+ }
+
+ // if the line is already too long, push it to the list and start a new one
+ if ((line + chr).length >= maxLength) {
+ list.push({
+ line,
+ encoded
+ });
+ line = chr = encodedStr[i] === ' ' ? ' ' : this.safeEncodeURIComponent(encodedStr[i]);
+ if (chr === encodedStr[i]) {
+ encoded = false;
+ startPos = i - 1;
+ } else {
+ encoded = true;
+ }
+ } else {
+ line += chr;
+ }
+ }
+
+ if (line) {
+ list.push({
+ line,
+ encoded
+ });
+ }
+ }
+
+ return list.map((item, i) => ({
+ // encoded lines: {name}*{part}*
+ // unencoded lines: {name}*{part}
+ // if any line needs to be encoded then the first line (part==0) is always encoded
+ key: key + '*' + i + (item.encoded ? '*' : ''),
+ value: item.line
+ }));
+ },
+
+ /**
+ * Parses a header value with key=value arguments into a structured
+ * object.
+ *
+ * parseHeaderValue('content-type: text/plain; CHARSET='UTF-8'') ->
+ * {
+ * 'value': 'text/plain',
+ * 'params': {
+ * 'charset': 'UTF-8'
+ * }
+ * }
+ *
+ * @param {String} str Header value
+ * @return {Object} Header value as a parsed structure
+ */
+ parseHeaderValue(str) {
+ let response = {
+ value: false,
+ params: {}
+ };
+ let key = false;
+ let value = '';
+ let type = 'value';
+ let quote = false;
+ let escaped = false;
+ let chr;
+
+ for (let i = 0, len = str.length; i < len; i++) {
+ chr = str.charAt(i);
+ if (type === 'key') {
+ if (chr === '=') {
+ key = value.trim().toLowerCase();
+ type = 'value';
+ value = '';
+ continue;
+ }
+ value += chr;
+ } else {
+ if (escaped) {
+ value += chr;
+ } else if (chr === '\\') {
+ escaped = true;
+ continue;
+ } else if (quote && chr === quote) {
+ quote = false;
+ } else if (!quote && chr === '"') {
+ quote = chr;
+ } else if (!quote && chr === ';') {
+ if (key === false) {
+ response.value = value.trim();
+ } else {
+ response.params[key] = value.trim();
+ }
+ type = 'key';
+ value = '';
+ } else {
+ value += chr;
+ }
+ escaped = false;
+ }
+ }
+
+ if (type === 'value') {
+ if (key === false) {
+ response.value = value.trim();
+ } else {
+ response.params[key] = value.trim();
+ }
+ } else if (value.trim()) {
+ response.params[value.trim().toLowerCase()] = '';
+ }
+
+ // handle parameter value continuations
+ // https://tools.ietf.org/html/rfc2231#section-3
+
+ // preprocess values
+ Object.keys(response.params).forEach(key => {
+ let actualKey, nr, match, value;
+ if ((match = key.match(/(\*(\d+)|\*(\d+)\*|\*)$/))) {
+ actualKey = key.substr(0, match.index);
+ nr = Number(match[2] || match[3]) || 0;
+
+ if (!response.params[actualKey] || typeof response.params[actualKey] !== 'object') {
+ response.params[actualKey] = {
+ charset: false,
+ values: []
+ };
+ }
+
+ value = response.params[key];
+
+ if (nr === 0 && match[0].substr(-1) === '*' && (match = value.match(/^([^']*)'[^']*'(.*)$/))) {
+ response.params[actualKey].charset = match[1] || 'iso-8859-1';
+ value = match[2];
+ }
+
+ response.params[actualKey].values[nr] = value;
+
+ // remove the old reference
+ delete response.params[key];
+ }
+ });
+
+ // concatenate split rfc2231 strings and convert encoded strings to mime encoded words
+ Object.keys(response.params).forEach(key => {
+ let value;
+ if (response.params[key] && Array.isArray(response.params[key].values)) {
+ value = response.params[key].values.map(val => val || '').join('');
+
+ if (response.params[key].charset) {
+ // convert "%AB" to "=?charset?Q?=AB?="
+ response.params[key] =
+ '=?' +
+ response.params[key].charset +
+ '?Q?' +
+ value
+ // fix invalidly encoded chars
+ .replace(/[=?_\s]/g, s => {
+ let c = s.charCodeAt(0).toString(16);
+ if (s === ' ') {
+ return '_';
+ } else {
+ return '%' + (c.length < 2 ? '0' : '') + c;
+ }
+ })
+ // change from urlencoding to percent encoding
+ .replace(/%/g, '=') +
+ '?=';
+ } else {
+ response.params[key] = value;
+ }
+ }
+ });
+
+ return response;
+ },
+
+ /**
+ * Returns file extension for a content type string. If no suitable extensions
+ * are found, 'bin' is used as the default extension
+ *
+ * @param {String} mimeType Content type to be checked for
+ * @return {String} File extension
+ */
+ detectExtension: mimeType => mimeTypes.detectExtension(mimeType),
+
+ /**
+ * Returns content type for a file extension. If no suitable content types
+ * are found, 'application/octet-stream' is used as the default content type
+ *
+ * @param {String} extension Extension to be checked for
+ * @return {String} File extension
+ */
+ detectMimeType: extension => mimeTypes.detectMimeType(extension),
+
+ /**
+ * Folds long lines, useful for folding header lines (afterSpace=false) and
+ * flowed text (afterSpace=true)
+ *
+ * @param {String} str String to be folded
+ * @param {Number} [lineLength=76] Maximum length of a line
+ * @param {Boolean} afterSpace If true, leave a space in th end of a line
+ * @return {String} String with folded lines
+ */
+ foldLines(str, lineLength, afterSpace) {
+ str = (str || '').toString();
+ lineLength = lineLength || 76;
+
+ let pos = 0,
+ len = str.length,
+ result = '',
+ line,
+ match;
+
+ while (pos < len) {
+ line = str.substr(pos, lineLength);
+ if (line.length < lineLength) {
+ result += line;
+ break;
+ }
+ if ((match = line.match(/^[^\n\r]*(\r?\n|\r)/))) {
+ line = match[0];
+ result += line;
+ pos += line.length;
+ continue;
+ } else if ((match = line.match(/(\s+)[^\s]*$/)) && match[0].length - (afterSpace ? (match[1] || '').length : 0) < line.length) {
+ line = line.substr(0, line.length - (match[0].length - (afterSpace ? (match[1] || '').length : 0)));
+ } else if ((match = str.substr(pos + line.length).match(/^[^\s]+(\s*)/))) {
+ line = line + match[0].substr(0, match[0].length - (!afterSpace ? (match[1] || '').length : 0));
+ }
+
+ result += line;
+ pos += line.length;
+ if (pos < len) {
+ result += '\r\n';
+ }
+ }
+
+ return result;
+ },
+
+ /**
+ * Splits a mime encoded string. Needed for dividing mime words into smaller chunks
+ *
+ * @param {String} str Mime encoded string to be split up
+ * @param {Number} maxlen Maximum length of characters for one part (minimum 12)
+ * @return {Array} Split string
+ */
+ splitMimeEncodedString: (str, maxlen) => {
+ let curLine,
+ match,
+ chr,
+ done,
+ lines = [];
+
+ // require at least 12 symbols to fit possible 4 octet UTF-8 sequences
+ maxlen = Math.max(maxlen || 0, 12);
+
+ while (str.length) {
+ curLine = str.substr(0, maxlen);
+
+ // move incomplete escaped char back to main
+ if ((match = curLine.match(/[=][0-9A-F]?$/i))) {
+ curLine = curLine.substr(0, match.index);
+ }
+
+ done = false;
+ while (!done) {
+ done = true;
+ // check if not middle of a unicode char sequence
+ if ((match = str.substr(curLine.length).match(/^[=]([0-9A-F]{2})/i))) {
+ chr = parseInt(match[1], 16);
+ // invalid sequence, move one char back anc recheck
+ if (chr < 0xc2 && chr > 0x7f) {
+ curLine = curLine.substr(0, curLine.length - 3);
+ done = false;
+ }
+ }
+ }
+
+ if (curLine.length) {
+ lines.push(curLine);
+ }
+ str = str.substr(curLine.length);
+ }
+
+ return lines;
+ },
+
+ encodeURICharComponent: chr => {
+ let res = '';
+ let ord = chr.charCodeAt(0).toString(16).toUpperCase();
+
+ if (ord.length % 2) {
+ ord = '0' + ord;
+ }
+
+ if (ord.length > 2) {
+ for (let i = 0, len = ord.length / 2; i < len; i++) {
+ res += '%' + ord.substr(i, 2);
+ }
+ } else {
+ res += '%' + ord;
+ }
+
+ return res;
+ },
+
+ safeEncodeURIComponent(str) {
+ str = (str || '').toString();
+
+ try {
+ // might throw if we try to encode invalid sequences, eg. partial emoji
+ str = encodeURIComponent(str);
+ } catch (E) {
+ // should never run
+ return str.replace(/[^\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]+/g, '');
+ }
+
+ // ensure chars that are not handled by encodeURICompent are converted as well
+ return str.replace(/[\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]/g, chr => this.encodeURICharComponent(chr));
+ }
+};
+
+
+/***/ }),
+
+/***/ 836:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+/* eslint quote-props: 0 */
+
+
+
+const path = __nccwpck_require__(1017);
+
+const defaultMimeType = 'application/octet-stream';
+const defaultExtension = 'bin';
+
+const mimeTypes = new Map([
+ ['application/acad', 'dwg'],
+ ['application/applixware', 'aw'],
+ ['application/arj', 'arj'],
+ ['application/atom+xml', 'xml'],
+ ['application/atomcat+xml', 'atomcat'],
+ ['application/atomsvc+xml', 'atomsvc'],
+ ['application/base64', ['mm', 'mme']],
+ ['application/binhex', 'hqx'],
+ ['application/binhex4', 'hqx'],
+ ['application/book', ['book', 'boo']],
+ ['application/ccxml+xml,', 'ccxml'],
+ ['application/cdf', 'cdf'],
+ ['application/cdmi-capability', 'cdmia'],
+ ['application/cdmi-container', 'cdmic'],
+ ['application/cdmi-domain', 'cdmid'],
+ ['application/cdmi-object', 'cdmio'],
+ ['application/cdmi-queue', 'cdmiq'],
+ ['application/clariscad', 'ccad'],
+ ['application/commonground', 'dp'],
+ ['application/cu-seeme', 'cu'],
+ ['application/davmount+xml', 'davmount'],
+ ['application/drafting', 'drw'],
+ ['application/dsptype', 'tsp'],
+ ['application/dssc+der', 'dssc'],
+ ['application/dssc+xml', 'xdssc'],
+ ['application/dxf', 'dxf'],
+ ['application/ecmascript', ['js', 'es']],
+ ['application/emma+xml', 'emma'],
+ ['application/envoy', 'evy'],
+ ['application/epub+zip', 'epub'],
+ ['application/excel', ['xls', 'xl', 'xla', 'xlb', 'xlc', 'xld', 'xlk', 'xll', 'xlm', 'xlt', 'xlv', 'xlw']],
+ ['application/exi', 'exi'],
+ ['application/font-tdpfr', 'pfr'],
+ ['application/fractals', 'fif'],
+ ['application/freeloader', 'frl'],
+ ['application/futuresplash', 'spl'],
+ ['application/gnutar', 'tgz'],
+ ['application/groupwise', 'vew'],
+ ['application/hlp', 'hlp'],
+ ['application/hta', 'hta'],
+ ['application/hyperstudio', 'stk'],
+ ['application/i-deas', 'unv'],
+ ['application/iges', ['iges', 'igs']],
+ ['application/inf', 'inf'],
+ ['application/internet-property-stream', 'acx'],
+ ['application/ipfix', 'ipfix'],
+ ['application/java', 'class'],
+ ['application/java-archive', 'jar'],
+ ['application/java-byte-code', 'class'],
+ ['application/java-serialized-object', 'ser'],
+ ['application/java-vm', 'class'],
+ ['application/javascript', 'js'],
+ ['application/json', 'json'],
+ ['application/lha', 'lha'],
+ ['application/lzx', 'lzx'],
+ ['application/mac-binary', 'bin'],
+ ['application/mac-binhex', 'hqx'],
+ ['application/mac-binhex40', 'hqx'],
+ ['application/mac-compactpro', 'cpt'],
+ ['application/macbinary', 'bin'],
+ ['application/mads+xml', 'mads'],
+ ['application/marc', 'mrc'],
+ ['application/marcxml+xml', 'mrcx'],
+ ['application/mathematica', 'ma'],
+ ['application/mathml+xml', 'mathml'],
+ ['application/mbedlet', 'mbd'],
+ ['application/mbox', 'mbox'],
+ ['application/mcad', 'mcd'],
+ ['application/mediaservercontrol+xml', 'mscml'],
+ ['application/metalink4+xml', 'meta4'],
+ ['application/mets+xml', 'mets'],
+ ['application/mime', 'aps'],
+ ['application/mods+xml', 'mods'],
+ ['application/mp21', 'm21'],
+ ['application/mp4', 'mp4'],
+ ['application/mspowerpoint', ['ppt', 'pot', 'pps', 'ppz']],
+ ['application/msword', ['doc', 'dot', 'w6w', 'wiz', 'word']],
+ ['application/mswrite', 'wri'],
+ ['application/mxf', 'mxf'],
+ ['application/netmc', 'mcp'],
+ ['application/octet-stream', ['*']],
+ ['application/oda', 'oda'],
+ ['application/oebps-package+xml', 'opf'],
+ ['application/ogg', 'ogx'],
+ ['application/olescript', 'axs'],
+ ['application/onenote', 'onetoc'],
+ ['application/patch-ops-error+xml', 'xer'],
+ ['application/pdf', 'pdf'],
+ ['application/pgp-encrypted', 'asc'],
+ ['application/pgp-signature', 'pgp'],
+ ['application/pics-rules', 'prf'],
+ ['application/pkcs-12', 'p12'],
+ ['application/pkcs-crl', 'crl'],
+ ['application/pkcs10', 'p10'],
+ ['application/pkcs7-mime', ['p7c', 'p7m']],
+ ['application/pkcs7-signature', 'p7s'],
+ ['application/pkcs8', 'p8'],
+ ['application/pkix-attr-cert', 'ac'],
+ ['application/pkix-cert', ['cer', 'crt']],
+ ['application/pkix-crl', 'crl'],
+ ['application/pkix-pkipath', 'pkipath'],
+ ['application/pkixcmp', 'pki'],
+ ['application/plain', 'text'],
+ ['application/pls+xml', 'pls'],
+ ['application/postscript', ['ps', 'ai', 'eps']],
+ ['application/powerpoint', 'ppt'],
+ ['application/pro_eng', ['part', 'prt']],
+ ['application/prs.cww', 'cww'],
+ ['application/pskc+xml', 'pskcxml'],
+ ['application/rdf+xml', 'rdf'],
+ ['application/reginfo+xml', 'rif'],
+ ['application/relax-ng-compact-syntax', 'rnc'],
+ ['application/resource-lists+xml', 'rl'],
+ ['application/resource-lists-diff+xml', 'rld'],
+ ['application/ringing-tones', 'rng'],
+ ['application/rls-services+xml', 'rs'],
+ ['application/rsd+xml', 'rsd'],
+ ['application/rss+xml', 'xml'],
+ ['application/rtf', ['rtf', 'rtx']],
+ ['application/sbml+xml', 'sbml'],
+ ['application/scvp-cv-request', 'scq'],
+ ['application/scvp-cv-response', 'scs'],
+ ['application/scvp-vp-request', 'spq'],
+ ['application/scvp-vp-response', 'spp'],
+ ['application/sdp', 'sdp'],
+ ['application/sea', 'sea'],
+ ['application/set', 'set'],
+ ['application/set-payment-initiation', 'setpay'],
+ ['application/set-registration-initiation', 'setreg'],
+ ['application/shf+xml', 'shf'],
+ ['application/sla', 'stl'],
+ ['application/smil', ['smi', 'smil']],
+ ['application/smil+xml', 'smi'],
+ ['application/solids', 'sol'],
+ ['application/sounder', 'sdr'],
+ ['application/sparql-query', 'rq'],
+ ['application/sparql-results+xml', 'srx'],
+ ['application/srgs', 'gram'],
+ ['application/srgs+xml', 'grxml'],
+ ['application/sru+xml', 'sru'],
+ ['application/ssml+xml', 'ssml'],
+ ['application/step', ['step', 'stp']],
+ ['application/streamingmedia', 'ssm'],
+ ['application/tei+xml', 'tei'],
+ ['application/thraud+xml', 'tfi'],
+ ['application/timestamped-data', 'tsd'],
+ ['application/toolbook', 'tbk'],
+ ['application/vda', 'vda'],
+ ['application/vnd.3gpp.pic-bw-large', 'plb'],
+ ['application/vnd.3gpp.pic-bw-small', 'psb'],
+ ['application/vnd.3gpp.pic-bw-var', 'pvb'],
+ ['application/vnd.3gpp2.tcap', 'tcap'],
+ ['application/vnd.3m.post-it-notes', 'pwn'],
+ ['application/vnd.accpac.simply.aso', 'aso'],
+ ['application/vnd.accpac.simply.imp', 'imp'],
+ ['application/vnd.acucobol', 'acu'],
+ ['application/vnd.acucorp', 'atc'],
+ ['application/vnd.adobe.air-application-installer-package+zip', 'air'],
+ ['application/vnd.adobe.fxp', 'fxp'],
+ ['application/vnd.adobe.xdp+xml', 'xdp'],
+ ['application/vnd.adobe.xfdf', 'xfdf'],
+ ['application/vnd.ahead.space', 'ahead'],
+ ['application/vnd.airzip.filesecure.azf', 'azf'],
+ ['application/vnd.airzip.filesecure.azs', 'azs'],
+ ['application/vnd.amazon.ebook', 'azw'],
+ ['application/vnd.americandynamics.acc', 'acc'],
+ ['application/vnd.amiga.ami', 'ami'],
+ ['application/vnd.android.package-archive', 'apk'],
+ ['application/vnd.anser-web-certificate-issue-initiation', 'cii'],
+ ['application/vnd.anser-web-funds-transfer-initiation', 'fti'],
+ ['application/vnd.antix.game-component', 'atx'],
+ ['application/vnd.apple.installer+xml', 'mpkg'],
+ ['application/vnd.apple.mpegurl', 'm3u8'],
+ ['application/vnd.aristanetworks.swi', 'swi'],
+ ['application/vnd.audiograph', 'aep'],
+ ['application/vnd.blueice.multipass', 'mpm'],
+ ['application/vnd.bmi', 'bmi'],
+ ['application/vnd.businessobjects', 'rep'],
+ ['application/vnd.chemdraw+xml', 'cdxml'],
+ ['application/vnd.chipnuts.karaoke-mmd', 'mmd'],
+ ['application/vnd.cinderella', 'cdy'],
+ ['application/vnd.claymore', 'cla'],
+ ['application/vnd.cloanto.rp9', 'rp9'],
+ ['application/vnd.clonk.c4group', 'c4g'],
+ ['application/vnd.cluetrust.cartomobile-config', 'c11amc'],
+ ['application/vnd.cluetrust.cartomobile-config-pkg', 'c11amz'],
+ ['application/vnd.commonspace', 'csp'],
+ ['application/vnd.contact.cmsg', 'cdbcmsg'],
+ ['application/vnd.cosmocaller', 'cmc'],
+ ['application/vnd.crick.clicker', 'clkx'],
+ ['application/vnd.crick.clicker.keyboard', 'clkk'],
+ ['application/vnd.crick.clicker.palette', 'clkp'],
+ ['application/vnd.crick.clicker.template', 'clkt'],
+ ['application/vnd.crick.clicker.wordbank', 'clkw'],
+ ['application/vnd.criticaltools.wbs+xml', 'wbs'],
+ ['application/vnd.ctc-posml', 'pml'],
+ ['application/vnd.cups-ppd', 'ppd'],
+ ['application/vnd.curl.car', 'car'],
+ ['application/vnd.curl.pcurl', 'pcurl'],
+ ['application/vnd.data-vision.rdz', 'rdz'],
+ ['application/vnd.denovo.fcselayout-link', 'fe_launch'],
+ ['application/vnd.dna', 'dna'],
+ ['application/vnd.dolby.mlp', 'mlp'],
+ ['application/vnd.dpgraph', 'dpg'],
+ ['application/vnd.dreamfactory', 'dfac'],
+ ['application/vnd.dvb.ait', 'ait'],
+ ['application/vnd.dvb.service', 'svc'],
+ ['application/vnd.dynageo', 'geo'],
+ ['application/vnd.ecowin.chart', 'mag'],
+ ['application/vnd.enliven', 'nml'],
+ ['application/vnd.epson.esf', 'esf'],
+ ['application/vnd.epson.msf', 'msf'],
+ ['application/vnd.epson.quickanime', 'qam'],
+ ['application/vnd.epson.salt', 'slt'],
+ ['application/vnd.epson.ssf', 'ssf'],
+ ['application/vnd.eszigno3+xml', 'es3'],
+ ['application/vnd.ezpix-album', 'ez2'],
+ ['application/vnd.ezpix-package', 'ez3'],
+ ['application/vnd.fdf', 'fdf'],
+ ['application/vnd.fdsn.seed', 'seed'],
+ ['application/vnd.flographit', 'gph'],
+ ['application/vnd.fluxtime.clip', 'ftc'],
+ ['application/vnd.framemaker', 'fm'],
+ ['application/vnd.frogans.fnc', 'fnc'],
+ ['application/vnd.frogans.ltf', 'ltf'],
+ ['application/vnd.fsc.weblaunch', 'fsc'],
+ ['application/vnd.fujitsu.oasys', 'oas'],
+ ['application/vnd.fujitsu.oasys2', 'oa2'],
+ ['application/vnd.fujitsu.oasys3', 'oa3'],
+ ['application/vnd.fujitsu.oasysgp', 'fg5'],
+ ['application/vnd.fujitsu.oasysprs', 'bh2'],
+ ['application/vnd.fujixerox.ddd', 'ddd'],
+ ['application/vnd.fujixerox.docuworks', 'xdw'],
+ ['application/vnd.fujixerox.docuworks.binder', 'xbd'],
+ ['application/vnd.fuzzysheet', 'fzs'],
+ ['application/vnd.genomatix.tuxedo', 'txd'],
+ ['application/vnd.geogebra.file', 'ggb'],
+ ['application/vnd.geogebra.tool', 'ggt'],
+ ['application/vnd.geometry-explorer', 'gex'],
+ ['application/vnd.geonext', 'gxt'],
+ ['application/vnd.geoplan', 'g2w'],
+ ['application/vnd.geospace', 'g3w'],
+ ['application/vnd.gmx', 'gmx'],
+ ['application/vnd.google-earth.kml+xml', 'kml'],
+ ['application/vnd.google-earth.kmz', 'kmz'],
+ ['application/vnd.grafeq', 'gqf'],
+ ['application/vnd.groove-account', 'gac'],
+ ['application/vnd.groove-help', 'ghf'],
+ ['application/vnd.groove-identity-message', 'gim'],
+ ['application/vnd.groove-injector', 'grv'],
+ ['application/vnd.groove-tool-message', 'gtm'],
+ ['application/vnd.groove-tool-template', 'tpl'],
+ ['application/vnd.groove-vcard', 'vcg'],
+ ['application/vnd.hal+xml', 'hal'],
+ ['application/vnd.handheld-entertainment+xml', 'zmm'],
+ ['application/vnd.hbci', 'hbci'],
+ ['application/vnd.hhe.lesson-player', 'les'],
+ ['application/vnd.hp-hpgl', ['hgl', 'hpg', 'hpgl']],
+ ['application/vnd.hp-hpid', 'hpid'],
+ ['application/vnd.hp-hps', 'hps'],
+ ['application/vnd.hp-jlyt', 'jlt'],
+ ['application/vnd.hp-pcl', 'pcl'],
+ ['application/vnd.hp-pclxl', 'pclxl'],
+ ['application/vnd.hydrostatix.sof-data', 'sfd-hdstx'],
+ ['application/vnd.hzn-3d-crossword', 'x3d'],
+ ['application/vnd.ibm.minipay', 'mpy'],
+ ['application/vnd.ibm.modcap', 'afp'],
+ ['application/vnd.ibm.rights-management', 'irm'],
+ ['application/vnd.ibm.secure-container', 'sc'],
+ ['application/vnd.iccprofile', 'icc'],
+ ['application/vnd.igloader', 'igl'],
+ ['application/vnd.immervision-ivp', 'ivp'],
+ ['application/vnd.immervision-ivu', 'ivu'],
+ ['application/vnd.insors.igm', 'igm'],
+ ['application/vnd.intercon.formnet', 'xpw'],
+ ['application/vnd.intergeo', 'i2g'],
+ ['application/vnd.intu.qbo', 'qbo'],
+ ['application/vnd.intu.qfx', 'qfx'],
+ ['application/vnd.ipunplugged.rcprofile', 'rcprofile'],
+ ['application/vnd.irepository.package+xml', 'irp'],
+ ['application/vnd.is-xpr', 'xpr'],
+ ['application/vnd.isac.fcs', 'fcs'],
+ ['application/vnd.jam', 'jam'],
+ ['application/vnd.jcp.javame.midlet-rms', 'rms'],
+ ['application/vnd.jisp', 'jisp'],
+ ['application/vnd.joost.joda-archive', 'joda'],
+ ['application/vnd.kahootz', 'ktz'],
+ ['application/vnd.kde.karbon', 'karbon'],
+ ['application/vnd.kde.kchart', 'chrt'],
+ ['application/vnd.kde.kformula', 'kfo'],
+ ['application/vnd.kde.kivio', 'flw'],
+ ['application/vnd.kde.kontour', 'kon'],
+ ['application/vnd.kde.kpresenter', 'kpr'],
+ ['application/vnd.kde.kspread', 'ksp'],
+ ['application/vnd.kde.kword', 'kwd'],
+ ['application/vnd.kenameaapp', 'htke'],
+ ['application/vnd.kidspiration', 'kia'],
+ ['application/vnd.kinar', 'kne'],
+ ['application/vnd.koan', 'skp'],
+ ['application/vnd.kodak-descriptor', 'sse'],
+ ['application/vnd.las.las+xml', 'lasxml'],
+ ['application/vnd.llamagraphics.life-balance.desktop', 'lbd'],
+ ['application/vnd.llamagraphics.life-balance.exchange+xml', 'lbe'],
+ ['application/vnd.lotus-1-2-3', '123'],
+ ['application/vnd.lotus-approach', 'apr'],
+ ['application/vnd.lotus-freelance', 'pre'],
+ ['application/vnd.lotus-notes', 'nsf'],
+ ['application/vnd.lotus-organizer', 'org'],
+ ['application/vnd.lotus-screencam', 'scm'],
+ ['application/vnd.lotus-wordpro', 'lwp'],
+ ['application/vnd.macports.portpkg', 'portpkg'],
+ ['application/vnd.mcd', 'mcd'],
+ ['application/vnd.medcalcdata', 'mc1'],
+ ['application/vnd.mediastation.cdkey', 'cdkey'],
+ ['application/vnd.mfer', 'mwf'],
+ ['application/vnd.mfmp', 'mfm'],
+ ['application/vnd.micrografx.flo', 'flo'],
+ ['application/vnd.micrografx.igx', 'igx'],
+ ['application/vnd.mif', 'mif'],
+ ['application/vnd.mobius.daf', 'daf'],
+ ['application/vnd.mobius.dis', 'dis'],
+ ['application/vnd.mobius.mbk', 'mbk'],
+ ['application/vnd.mobius.mqy', 'mqy'],
+ ['application/vnd.mobius.msl', 'msl'],
+ ['application/vnd.mobius.plc', 'plc'],
+ ['application/vnd.mobius.txf', 'txf'],
+ ['application/vnd.mophun.application', 'mpn'],
+ ['application/vnd.mophun.certificate', 'mpc'],
+ ['application/vnd.mozilla.xul+xml', 'xul'],
+ ['application/vnd.ms-artgalry', 'cil'],
+ ['application/vnd.ms-cab-compressed', 'cab'],
+ ['application/vnd.ms-excel', ['xls', 'xla', 'xlc', 'xlm', 'xlt', 'xlw', 'xlb', 'xll']],
+ ['application/vnd.ms-excel.addin.macroenabled.12', 'xlam'],
+ ['application/vnd.ms-excel.sheet.binary.macroenabled.12', 'xlsb'],
+ ['application/vnd.ms-excel.sheet.macroenabled.12', 'xlsm'],
+ ['application/vnd.ms-excel.template.macroenabled.12', 'xltm'],
+ ['application/vnd.ms-fontobject', 'eot'],
+ ['application/vnd.ms-htmlhelp', 'chm'],
+ ['application/vnd.ms-ims', 'ims'],
+ ['application/vnd.ms-lrm', 'lrm'],
+ ['application/vnd.ms-officetheme', 'thmx'],
+ ['application/vnd.ms-outlook', 'msg'],
+ ['application/vnd.ms-pki.certstore', 'sst'],
+ ['application/vnd.ms-pki.pko', 'pko'],
+ ['application/vnd.ms-pki.seccat', 'cat'],
+ ['application/vnd.ms-pki.stl', 'stl'],
+ ['application/vnd.ms-pkicertstore', 'sst'],
+ ['application/vnd.ms-pkiseccat', 'cat'],
+ ['application/vnd.ms-pkistl', 'stl'],
+ ['application/vnd.ms-powerpoint', ['ppt', 'pot', 'pps', 'ppa', 'pwz']],
+ ['application/vnd.ms-powerpoint.addin.macroenabled.12', 'ppam'],
+ ['application/vnd.ms-powerpoint.presentation.macroenabled.12', 'pptm'],
+ ['application/vnd.ms-powerpoint.slide.macroenabled.12', 'sldm'],
+ ['application/vnd.ms-powerpoint.slideshow.macroenabled.12', 'ppsm'],
+ ['application/vnd.ms-powerpoint.template.macroenabled.12', 'potm'],
+ ['application/vnd.ms-project', 'mpp'],
+ ['application/vnd.ms-word.document.macroenabled.12', 'docm'],
+ ['application/vnd.ms-word.template.macroenabled.12', 'dotm'],
+ ['application/vnd.ms-works', ['wks', 'wcm', 'wdb', 'wps']],
+ ['application/vnd.ms-wpl', 'wpl'],
+ ['application/vnd.ms-xpsdocument', 'xps'],
+ ['application/vnd.mseq', 'mseq'],
+ ['application/vnd.musician', 'mus'],
+ ['application/vnd.muvee.style', 'msty'],
+ ['application/vnd.neurolanguage.nlu', 'nlu'],
+ ['application/vnd.noblenet-directory', 'nnd'],
+ ['application/vnd.noblenet-sealer', 'nns'],
+ ['application/vnd.noblenet-web', 'nnw'],
+ ['application/vnd.nokia.configuration-message', 'ncm'],
+ ['application/vnd.nokia.n-gage.data', 'ngdat'],
+ ['application/vnd.nokia.n-gage.symbian.install', 'n-gage'],
+ ['application/vnd.nokia.radio-preset', 'rpst'],
+ ['application/vnd.nokia.radio-presets', 'rpss'],
+ ['application/vnd.nokia.ringing-tone', 'rng'],
+ ['application/vnd.novadigm.edm', 'edm'],
+ ['application/vnd.novadigm.edx', 'edx'],
+ ['application/vnd.novadigm.ext', 'ext'],
+ ['application/vnd.oasis.opendocument.chart', 'odc'],
+ ['application/vnd.oasis.opendocument.chart-template', 'otc'],
+ ['application/vnd.oasis.opendocument.database', 'odb'],
+ ['application/vnd.oasis.opendocument.formula', 'odf'],
+ ['application/vnd.oasis.opendocument.formula-template', 'odft'],
+ ['application/vnd.oasis.opendocument.graphics', 'odg'],
+ ['application/vnd.oasis.opendocument.graphics-template', 'otg'],
+ ['application/vnd.oasis.opendocument.image', 'odi'],
+ ['application/vnd.oasis.opendocument.image-template', 'oti'],
+ ['application/vnd.oasis.opendocument.presentation', 'odp'],
+ ['application/vnd.oasis.opendocument.presentation-template', 'otp'],
+ ['application/vnd.oasis.opendocument.spreadsheet', 'ods'],
+ ['application/vnd.oasis.opendocument.spreadsheet-template', 'ots'],
+ ['application/vnd.oasis.opendocument.text', 'odt'],
+ ['application/vnd.oasis.opendocument.text-master', 'odm'],
+ ['application/vnd.oasis.opendocument.text-template', 'ott'],
+ ['application/vnd.oasis.opendocument.text-web', 'oth'],
+ ['application/vnd.olpc-sugar', 'xo'],
+ ['application/vnd.oma.dd2+xml', 'dd2'],
+ ['application/vnd.openofficeorg.extension', 'oxt'],
+ ['application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx'],
+ ['application/vnd.openxmlformats-officedocument.presentationml.slide', 'sldx'],
+ ['application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'ppsx'],
+ ['application/vnd.openxmlformats-officedocument.presentationml.template', 'potx'],
+ ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx'],
+ ['application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'xltx'],
+ ['application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx'],
+ ['application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dotx'],
+ ['application/vnd.osgeo.mapguide.package', 'mgp'],
+ ['application/vnd.osgi.dp', 'dp'],
+ ['application/vnd.palm', 'pdb'],
+ ['application/vnd.pawaafile', 'paw'],
+ ['application/vnd.pg.format', 'str'],
+ ['application/vnd.pg.osasli', 'ei6'],
+ ['application/vnd.picsel', 'efif'],
+ ['application/vnd.pmi.widget', 'wg'],
+ ['application/vnd.pocketlearn', 'plf'],
+ ['application/vnd.powerbuilder6', 'pbd'],
+ ['application/vnd.previewsystems.box', 'box'],
+ ['application/vnd.proteus.magazine', 'mgz'],
+ ['application/vnd.publishare-delta-tree', 'qps'],
+ ['application/vnd.pvi.ptid1', 'ptid'],
+ ['application/vnd.quark.quarkxpress', 'qxd'],
+ ['application/vnd.realvnc.bed', 'bed'],
+ ['application/vnd.recordare.musicxml', 'mxl'],
+ ['application/vnd.recordare.musicxml+xml', 'musicxml'],
+ ['application/vnd.rig.cryptonote', 'cryptonote'],
+ ['application/vnd.rim.cod', 'cod'],
+ ['application/vnd.rn-realmedia', 'rm'],
+ ['application/vnd.rn-realplayer', 'rnx'],
+ ['application/vnd.route66.link66+xml', 'link66'],
+ ['application/vnd.sailingtracker.track', 'st'],
+ ['application/vnd.seemail', 'see'],
+ ['application/vnd.sema', 'sema'],
+ ['application/vnd.semd', 'semd'],
+ ['application/vnd.semf', 'semf'],
+ ['application/vnd.shana.informed.formdata', 'ifm'],
+ ['application/vnd.shana.informed.formtemplate', 'itp'],
+ ['application/vnd.shana.informed.interchange', 'iif'],
+ ['application/vnd.shana.informed.package', 'ipk'],
+ ['application/vnd.simtech-mindmapper', 'twd'],
+ ['application/vnd.smaf', 'mmf'],
+ ['application/vnd.smart.teacher', 'teacher'],
+ ['application/vnd.solent.sdkm+xml', 'sdkm'],
+ ['application/vnd.spotfire.dxp', 'dxp'],
+ ['application/vnd.spotfire.sfs', 'sfs'],
+ ['application/vnd.stardivision.calc', 'sdc'],
+ ['application/vnd.stardivision.draw', 'sda'],
+ ['application/vnd.stardivision.impress', 'sdd'],
+ ['application/vnd.stardivision.math', 'smf'],
+ ['application/vnd.stardivision.writer', 'sdw'],
+ ['application/vnd.stardivision.writer-global', 'sgl'],
+ ['application/vnd.stepmania.stepchart', 'sm'],
+ ['application/vnd.sun.xml.calc', 'sxc'],
+ ['application/vnd.sun.xml.calc.template', 'stc'],
+ ['application/vnd.sun.xml.draw', 'sxd'],
+ ['application/vnd.sun.xml.draw.template', 'std'],
+ ['application/vnd.sun.xml.impress', 'sxi'],
+ ['application/vnd.sun.xml.impress.template', 'sti'],
+ ['application/vnd.sun.xml.math', 'sxm'],
+ ['application/vnd.sun.xml.writer', 'sxw'],
+ ['application/vnd.sun.xml.writer.global', 'sxg'],
+ ['application/vnd.sun.xml.writer.template', 'stw'],
+ ['application/vnd.sus-calendar', 'sus'],
+ ['application/vnd.svd', 'svd'],
+ ['application/vnd.symbian.install', 'sis'],
+ ['application/vnd.syncml+xml', 'xsm'],
+ ['application/vnd.syncml.dm+wbxml', 'bdm'],
+ ['application/vnd.syncml.dm+xml', 'xdm'],
+ ['application/vnd.tao.intent-module-archive', 'tao'],
+ ['application/vnd.tmobile-livetv', 'tmo'],
+ ['application/vnd.trid.tpt', 'tpt'],
+ ['application/vnd.triscape.mxs', 'mxs'],
+ ['application/vnd.trueapp', 'tra'],
+ ['application/vnd.ufdl', 'ufd'],
+ ['application/vnd.uiq.theme', 'utz'],
+ ['application/vnd.umajin', 'umj'],
+ ['application/vnd.unity', 'unityweb'],
+ ['application/vnd.uoml+xml', 'uoml'],
+ ['application/vnd.vcx', 'vcx'],
+ ['application/vnd.visio', 'vsd'],
+ ['application/vnd.visionary', 'vis'],
+ ['application/vnd.vsf', 'vsf'],
+ ['application/vnd.wap.wbxml', 'wbxml'],
+ ['application/vnd.wap.wmlc', 'wmlc'],
+ ['application/vnd.wap.wmlscriptc', 'wmlsc'],
+ ['application/vnd.webturbo', 'wtb'],
+ ['application/vnd.wolfram.player', 'nbp'],
+ ['application/vnd.wordperfect', 'wpd'],
+ ['application/vnd.wqd', 'wqd'],
+ ['application/vnd.wt.stf', 'stf'],
+ ['application/vnd.xara', ['web', 'xar']],
+ ['application/vnd.xfdl', 'xfdl'],
+ ['application/vnd.yamaha.hv-dic', 'hvd'],
+ ['application/vnd.yamaha.hv-script', 'hvs'],
+ ['application/vnd.yamaha.hv-voice', 'hvp'],
+ ['application/vnd.yamaha.openscoreformat', 'osf'],
+ ['application/vnd.yamaha.openscoreformat.osfpvg+xml', 'osfpvg'],
+ ['application/vnd.yamaha.smaf-audio', 'saf'],
+ ['application/vnd.yamaha.smaf-phrase', 'spf'],
+ ['application/vnd.yellowriver-custom-menu', 'cmp'],
+ ['application/vnd.zul', 'zir'],
+ ['application/vnd.zzazz.deck+xml', 'zaz'],
+ ['application/vocaltec-media-desc', 'vmd'],
+ ['application/vocaltec-media-file', 'vmf'],
+ ['application/voicexml+xml', 'vxml'],
+ ['application/widget', 'wgt'],
+ ['application/winhlp', 'hlp'],
+ ['application/wordperfect', ['wp', 'wp5', 'wp6', 'wpd']],
+ ['application/wordperfect6.0', ['w60', 'wp5']],
+ ['application/wordperfect6.1', 'w61'],
+ ['application/wsdl+xml', 'wsdl'],
+ ['application/wspolicy+xml', 'wspolicy'],
+ ['application/x-123', 'wk1'],
+ ['application/x-7z-compressed', '7z'],
+ ['application/x-abiword', 'abw'],
+ ['application/x-ace-compressed', 'ace'],
+ ['application/x-aim', 'aim'],
+ ['application/x-authorware-bin', 'aab'],
+ ['application/x-authorware-map', 'aam'],
+ ['application/x-authorware-seg', 'aas'],
+ ['application/x-bcpio', 'bcpio'],
+ ['application/x-binary', 'bin'],
+ ['application/x-binhex40', 'hqx'],
+ ['application/x-bittorrent', 'torrent'],
+ ['application/x-bsh', ['bsh', 'sh', 'shar']],
+ ['application/x-bytecode.elisp', 'elc'],
+ ['application/x-bytecode.python', 'pyc'],
+ ['application/x-bzip', 'bz'],
+ ['application/x-bzip2', ['boz', 'bz2']],
+ ['application/x-cdf', 'cdf'],
+ ['application/x-cdlink', 'vcd'],
+ ['application/x-chat', ['cha', 'chat']],
+ ['application/x-chess-pgn', 'pgn'],
+ ['application/x-cmu-raster', 'ras'],
+ ['application/x-cocoa', 'cco'],
+ ['application/x-compactpro', 'cpt'],
+ ['application/x-compress', 'z'],
+ ['application/x-compressed', ['tgz', 'gz', 'z', 'zip']],
+ ['application/x-conference', 'nsc'],
+ ['application/x-cpio', 'cpio'],
+ ['application/x-cpt', 'cpt'],
+ ['application/x-csh', 'csh'],
+ ['application/x-debian-package', 'deb'],
+ ['application/x-deepv', 'deepv'],
+ ['application/x-director', ['dir', 'dcr', 'dxr']],
+ ['application/x-doom', 'wad'],
+ ['application/x-dtbncx+xml', 'ncx'],
+ ['application/x-dtbook+xml', 'dtb'],
+ ['application/x-dtbresource+xml', 'res'],
+ ['application/x-dvi', 'dvi'],
+ ['application/x-elc', 'elc'],
+ ['application/x-envoy', ['env', 'evy']],
+ ['application/x-esrehber', 'es'],
+ ['application/x-excel', ['xls', 'xla', 'xlb', 'xlc', 'xld', 'xlk', 'xll', 'xlm', 'xlt', 'xlv', 'xlw']],
+ ['application/x-font-bdf', 'bdf'],
+ ['application/x-font-ghostscript', 'gsf'],
+ ['application/x-font-linux-psf', 'psf'],
+ ['application/x-font-otf', 'otf'],
+ ['application/x-font-pcf', 'pcf'],
+ ['application/x-font-snf', 'snf'],
+ ['application/x-font-ttf', 'ttf'],
+ ['application/x-font-type1', 'pfa'],
+ ['application/x-font-woff', 'woff'],
+ ['application/x-frame', 'mif'],
+ ['application/x-freelance', 'pre'],
+ ['application/x-futuresplash', 'spl'],
+ ['application/x-gnumeric', 'gnumeric'],
+ ['application/x-gsp', 'gsp'],
+ ['application/x-gss', 'gss'],
+ ['application/x-gtar', 'gtar'],
+ ['application/x-gzip', ['gz', 'gzip']],
+ ['application/x-hdf', 'hdf'],
+ ['application/x-helpfile', ['help', 'hlp']],
+ ['application/x-httpd-imap', 'imap'],
+ ['application/x-ima', 'ima'],
+ ['application/x-internet-signup', ['ins', 'isp']],
+ ['application/x-internett-signup', 'ins'],
+ ['application/x-inventor', 'iv'],
+ ['application/x-ip2', 'ip'],
+ ['application/x-iphone', 'iii'],
+ ['application/x-java-class', 'class'],
+ ['application/x-java-commerce', 'jcm'],
+ ['application/x-java-jnlp-file', 'jnlp'],
+ ['application/x-javascript', 'js'],
+ ['application/x-koan', ['skd', 'skm', 'skp', 'skt']],
+ ['application/x-ksh', 'ksh'],
+ ['application/x-latex', ['latex', 'ltx']],
+ ['application/x-lha', 'lha'],
+ ['application/x-lisp', 'lsp'],
+ ['application/x-livescreen', 'ivy'],
+ ['application/x-lotus', 'wq1'],
+ ['application/x-lotusscreencam', 'scm'],
+ ['application/x-lzh', 'lzh'],
+ ['application/x-lzx', 'lzx'],
+ ['application/x-mac-binhex40', 'hqx'],
+ ['application/x-macbinary', 'bin'],
+ ['application/x-magic-cap-package-1.0', 'mc$'],
+ ['application/x-mathcad', 'mcd'],
+ ['application/x-meme', 'mm'],
+ ['application/x-midi', ['mid', 'midi']],
+ ['application/x-mif', 'mif'],
+ ['application/x-mix-transfer', 'nix'],
+ ['application/x-mobipocket-ebook', 'prc'],
+ ['application/x-mplayer2', 'asx'],
+ ['application/x-ms-application', 'application'],
+ ['application/x-ms-wmd', 'wmd'],
+ ['application/x-ms-wmz', 'wmz'],
+ ['application/x-ms-xbap', 'xbap'],
+ ['application/x-msaccess', 'mdb'],
+ ['application/x-msbinder', 'obd'],
+ ['application/x-mscardfile', 'crd'],
+ ['application/x-msclip', 'clp'],
+ ['application/x-msdownload', ['exe', 'dll']],
+ ['application/x-msexcel', ['xls', 'xla', 'xlw']],
+ ['application/x-msmediaview', ['mvb', 'm13', 'm14']],
+ ['application/x-msmetafile', 'wmf'],
+ ['application/x-msmoney', 'mny'],
+ ['application/x-mspowerpoint', 'ppt'],
+ ['application/x-mspublisher', 'pub'],
+ ['application/x-msschedule', 'scd'],
+ ['application/x-msterminal', 'trm'],
+ ['application/x-mswrite', 'wri'],
+ ['application/x-navi-animation', 'ani'],
+ ['application/x-navidoc', 'nvd'],
+ ['application/x-navimap', 'map'],
+ ['application/x-navistyle', 'stl'],
+ ['application/x-netcdf', ['cdf', 'nc']],
+ ['application/x-newton-compatible-pkg', 'pkg'],
+ ['application/x-nokia-9000-communicator-add-on-software', 'aos'],
+ ['application/x-omc', 'omc'],
+ ['application/x-omcdatamaker', 'omcd'],
+ ['application/x-omcregerator', 'omcr'],
+ ['application/x-pagemaker', ['pm4', 'pm5']],
+ ['application/x-pcl', 'pcl'],
+ ['application/x-perfmon', ['pma', 'pmc', 'pml', 'pmr', 'pmw']],
+ ['application/x-pixclscript', 'plx'],
+ ['application/x-pkcs10', 'p10'],
+ ['application/x-pkcs12', ['p12', 'pfx']],
+ ['application/x-pkcs7-certificates', ['p7b', 'spc']],
+ ['application/x-pkcs7-certreqresp', 'p7r'],
+ ['application/x-pkcs7-mime', ['p7m', 'p7c']],
+ ['application/x-pkcs7-signature', ['p7s', 'p7a']],
+ ['application/x-pointplus', 'css'],
+ ['application/x-portable-anymap', 'pnm'],
+ ['application/x-project', ['mpc', 'mpt', 'mpv', 'mpx']],
+ ['application/x-qpro', 'wb1'],
+ ['application/x-rar-compressed', 'rar'],
+ ['application/x-rtf', 'rtf'],
+ ['application/x-sdp', 'sdp'],
+ ['application/x-sea', 'sea'],
+ ['application/x-seelogo', 'sl'],
+ ['application/x-sh', 'sh'],
+ ['application/x-shar', ['shar', 'sh']],
+ ['application/x-shockwave-flash', 'swf'],
+ ['application/x-silverlight-app', 'xap'],
+ ['application/x-sit', 'sit'],
+ ['application/x-sprite', ['spr', 'sprite']],
+ ['application/x-stuffit', 'sit'],
+ ['application/x-stuffitx', 'sitx'],
+ ['application/x-sv4cpio', 'sv4cpio'],
+ ['application/x-sv4crc', 'sv4crc'],
+ ['application/x-tar', 'tar'],
+ ['application/x-tbook', ['sbk', 'tbk']],
+ ['application/x-tcl', 'tcl'],
+ ['application/x-tex', 'tex'],
+ ['application/x-tex-tfm', 'tfm'],
+ ['application/x-texinfo', ['texi', 'texinfo']],
+ ['application/x-troff', ['roff', 't', 'tr']],
+ ['application/x-troff-man', 'man'],
+ ['application/x-troff-me', 'me'],
+ ['application/x-troff-ms', 'ms'],
+ ['application/x-troff-msvideo', 'avi'],
+ ['application/x-ustar', 'ustar'],
+ ['application/x-visio', ['vsd', 'vst', 'vsw']],
+ ['application/x-vnd.audioexplosion.mzz', 'mzz'],
+ ['application/x-vnd.ls-xpix', 'xpix'],
+ ['application/x-vrml', 'vrml'],
+ ['application/x-wais-source', ['src', 'wsrc']],
+ ['application/x-winhelp', 'hlp'],
+ ['application/x-wintalk', 'wtk'],
+ ['application/x-world', ['wrl', 'svr']],
+ ['application/x-wpwin', 'wpd'],
+ ['application/x-wri', 'wri'],
+ ['application/x-x509-ca-cert', ['cer', 'crt', 'der']],
+ ['application/x-x509-user-cert', 'crt'],
+ ['application/x-xfig', 'fig'],
+ ['application/x-xpinstall', 'xpi'],
+ ['application/x-zip-compressed', 'zip'],
+ ['application/xcap-diff+xml', 'xdf'],
+ ['application/xenc+xml', 'xenc'],
+ ['application/xhtml+xml', 'xhtml'],
+ ['application/xml', 'xml'],
+ ['application/xml-dtd', 'dtd'],
+ ['application/xop+xml', 'xop'],
+ ['application/xslt+xml', 'xslt'],
+ ['application/xspf+xml', 'xspf'],
+ ['application/xv+xml', 'mxml'],
+ ['application/yang', 'yang'],
+ ['application/yin+xml', 'yin'],
+ ['application/ynd.ms-pkipko', 'pko'],
+ ['application/zip', 'zip'],
+ ['audio/adpcm', 'adp'],
+ ['audio/aiff', ['aiff', 'aif', 'aifc']],
+ ['audio/basic', ['snd', 'au']],
+ ['audio/it', 'it'],
+ ['audio/make', ['funk', 'my', 'pfunk']],
+ ['audio/make.my.funk', 'pfunk'],
+ ['audio/mid', ['mid', 'rmi']],
+ ['audio/midi', ['midi', 'kar', 'mid']],
+ ['audio/mod', 'mod'],
+ ['audio/mp4', 'mp4a'],
+ ['audio/mpeg', ['mpga', 'mp3', 'm2a', 'mp2', 'mpa', 'mpg']],
+ ['audio/mpeg3', 'mp3'],
+ ['audio/nspaudio', ['la', 'lma']],
+ ['audio/ogg', 'oga'],
+ ['audio/s3m', 's3m'],
+ ['audio/tsp-audio', 'tsi'],
+ ['audio/tsplayer', 'tsp'],
+ ['audio/vnd.dece.audio', 'uva'],
+ ['audio/vnd.digital-winds', 'eol'],
+ ['audio/vnd.dra', 'dra'],
+ ['audio/vnd.dts', 'dts'],
+ ['audio/vnd.dts.hd', 'dtshd'],
+ ['audio/vnd.lucent.voice', 'lvp'],
+ ['audio/vnd.ms-playready.media.pya', 'pya'],
+ ['audio/vnd.nuera.ecelp4800', 'ecelp4800'],
+ ['audio/vnd.nuera.ecelp7470', 'ecelp7470'],
+ ['audio/vnd.nuera.ecelp9600', 'ecelp9600'],
+ ['audio/vnd.qcelp', 'qcp'],
+ ['audio/vnd.rip', 'rip'],
+ ['audio/voc', 'voc'],
+ ['audio/voxware', 'vox'],
+ ['audio/wav', 'wav'],
+ ['audio/webm', 'weba'],
+ ['audio/x-aac', 'aac'],
+ ['audio/x-adpcm', 'snd'],
+ ['audio/x-aiff', ['aiff', 'aif', 'aifc']],
+ ['audio/x-au', 'au'],
+ ['audio/x-gsm', ['gsd', 'gsm']],
+ ['audio/x-jam', 'jam'],
+ ['audio/x-liveaudio', 'lam'],
+ ['audio/x-mid', ['mid', 'midi']],
+ ['audio/x-midi', ['midi', 'mid']],
+ ['audio/x-mod', 'mod'],
+ ['audio/x-mpeg', 'mp2'],
+ ['audio/x-mpeg-3', 'mp3'],
+ ['audio/x-mpegurl', 'm3u'],
+ ['audio/x-mpequrl', 'm3u'],
+ ['audio/x-ms-wax', 'wax'],
+ ['audio/x-ms-wma', 'wma'],
+ ['audio/x-nspaudio', ['la', 'lma']],
+ ['audio/x-pn-realaudio', ['ra', 'ram', 'rm', 'rmm', 'rmp']],
+ ['audio/x-pn-realaudio-plugin', ['ra', 'rmp', 'rpm']],
+ ['audio/x-psid', 'sid'],
+ ['audio/x-realaudio', 'ra'],
+ ['audio/x-twinvq', 'vqf'],
+ ['audio/x-twinvq-plugin', ['vqe', 'vql']],
+ ['audio/x-vnd.audioexplosion.mjuicemediafile', 'mjf'],
+ ['audio/x-voc', 'voc'],
+ ['audio/x-wav', 'wav'],
+ ['audio/xm', 'xm'],
+ ['chemical/x-cdx', 'cdx'],
+ ['chemical/x-cif', 'cif'],
+ ['chemical/x-cmdf', 'cmdf'],
+ ['chemical/x-cml', 'cml'],
+ ['chemical/x-csml', 'csml'],
+ ['chemical/x-pdb', ['pdb', 'xyz']],
+ ['chemical/x-xyz', 'xyz'],
+ ['drawing/x-dwf', 'dwf'],
+ ['i-world/i-vrml', 'ivr'],
+ ['image/bmp', ['bmp', 'bm']],
+ ['image/cgm', 'cgm'],
+ ['image/cis-cod', 'cod'],
+ ['image/cmu-raster', ['ras', 'rast']],
+ ['image/fif', 'fif'],
+ ['image/florian', ['flo', 'turbot']],
+ ['image/g3fax', 'g3'],
+ ['image/gif', 'gif'],
+ ['image/ief', ['ief', 'iefs']],
+ ['image/jpeg', ['jpeg', 'jpe', 'jpg', 'jfif', 'jfif-tbnl']],
+ ['image/jutvision', 'jut'],
+ ['image/ktx', 'ktx'],
+ ['image/naplps', ['nap', 'naplps']],
+ ['image/pict', ['pic', 'pict']],
+ ['image/pipeg', 'jfif'],
+ ['image/pjpeg', ['jfif', 'jpe', 'jpeg', 'jpg']],
+ ['image/png', ['png', 'x-png']],
+ ['image/prs.btif', 'btif'],
+ ['image/svg+xml', 'svg'],
+ ['image/tiff', ['tif', 'tiff']],
+ ['image/vasa', 'mcf'],
+ ['image/vnd.adobe.photoshop', 'psd'],
+ ['image/vnd.dece.graphic', 'uvi'],
+ ['image/vnd.djvu', 'djvu'],
+ ['image/vnd.dvb.subtitle', 'sub'],
+ ['image/vnd.dwg', ['dwg', 'dxf', 'svf']],
+ ['image/vnd.dxf', 'dxf'],
+ ['image/vnd.fastbidsheet', 'fbs'],
+ ['image/vnd.fpx', 'fpx'],
+ ['image/vnd.fst', 'fst'],
+ ['image/vnd.fujixerox.edmics-mmr', 'mmr'],
+ ['image/vnd.fujixerox.edmics-rlc', 'rlc'],
+ ['image/vnd.ms-modi', 'mdi'],
+ ['image/vnd.net-fpx', ['fpx', 'npx']],
+ ['image/vnd.rn-realflash', 'rf'],
+ ['image/vnd.rn-realpix', 'rp'],
+ ['image/vnd.wap.wbmp', 'wbmp'],
+ ['image/vnd.xiff', 'xif'],
+ ['image/webp', 'webp'],
+ ['image/x-cmu-raster', 'ras'],
+ ['image/x-cmx', 'cmx'],
+ ['image/x-dwg', ['dwg', 'dxf', 'svf']],
+ ['image/x-freehand', 'fh'],
+ ['image/x-icon', 'ico'],
+ ['image/x-jg', 'art'],
+ ['image/x-jps', 'jps'],
+ ['image/x-niff', ['niff', 'nif']],
+ ['image/x-pcx', 'pcx'],
+ ['image/x-pict', ['pct', 'pic']],
+ ['image/x-portable-anymap', 'pnm'],
+ ['image/x-portable-bitmap', 'pbm'],
+ ['image/x-portable-graymap', 'pgm'],
+ ['image/x-portable-greymap', 'pgm'],
+ ['image/x-portable-pixmap', 'ppm'],
+ ['image/x-quicktime', ['qif', 'qti', 'qtif']],
+ ['image/x-rgb', 'rgb'],
+ ['image/x-tiff', ['tif', 'tiff']],
+ ['image/x-windows-bmp', 'bmp'],
+ ['image/x-xbitmap', 'xbm'],
+ ['image/x-xbm', 'xbm'],
+ ['image/x-xpixmap', ['xpm', 'pm']],
+ ['image/x-xwd', 'xwd'],
+ ['image/x-xwindowdump', 'xwd'],
+ ['image/xbm', 'xbm'],
+ ['image/xpm', 'xpm'],
+ ['message/rfc822', ['eml', 'mht', 'mhtml', 'nws', 'mime']],
+ ['model/iges', ['iges', 'igs']],
+ ['model/mesh', 'msh'],
+ ['model/vnd.collada+xml', 'dae'],
+ ['model/vnd.dwf', 'dwf'],
+ ['model/vnd.gdl', 'gdl'],
+ ['model/vnd.gtw', 'gtw'],
+ ['model/vnd.mts', 'mts'],
+ ['model/vnd.vtu', 'vtu'],
+ ['model/vrml', ['vrml', 'wrl', 'wrz']],
+ ['model/x-pov', 'pov'],
+ ['multipart/x-gzip', 'gzip'],
+ ['multipart/x-ustar', 'ustar'],
+ ['multipart/x-zip', 'zip'],
+ ['music/crescendo', ['mid', 'midi']],
+ ['music/x-karaoke', 'kar'],
+ ['paleovu/x-pv', 'pvu'],
+ ['text/asp', 'asp'],
+ ['text/calendar', 'ics'],
+ ['text/css', 'css'],
+ ['text/csv', 'csv'],
+ ['text/ecmascript', 'js'],
+ ['text/h323', '323'],
+ ['text/html', ['html', 'htm', 'stm', 'acgi', 'htmls', 'htx', 'shtml']],
+ ['text/iuls', 'uls'],
+ ['text/javascript', 'js'],
+ ['text/mcf', 'mcf'],
+ ['text/n3', 'n3'],
+ ['text/pascal', 'pas'],
+ [
+ 'text/plain',
+ [
+ 'txt',
+ 'bas',
+ 'c',
+ 'h',
+ 'c++',
+ 'cc',
+ 'com',
+ 'conf',
+ 'cxx',
+ 'def',
+ 'f',
+ 'f90',
+ 'for',
+ 'g',
+ 'hh',
+ 'idc',
+ 'jav',
+ 'java',
+ 'list',
+ 'log',
+ 'lst',
+ 'm',
+ 'mar',
+ 'pl',
+ 'sdml',
+ 'text'
+ ]
+ ],
+ ['text/plain-bas', 'par'],
+ ['text/prs.lines.tag', 'dsc'],
+ ['text/richtext', ['rtx', 'rt', 'rtf']],
+ ['text/scriplet', 'wsc'],
+ ['text/scriptlet', 'sct'],
+ ['text/sgml', ['sgm', 'sgml']],
+ ['text/tab-separated-values', 'tsv'],
+ ['text/troff', 't'],
+ ['text/turtle', 'ttl'],
+ ['text/uri-list', ['uni', 'unis', 'uri', 'uris']],
+ ['text/vnd.abc', 'abc'],
+ ['text/vnd.curl', 'curl'],
+ ['text/vnd.curl.dcurl', 'dcurl'],
+ ['text/vnd.curl.mcurl', 'mcurl'],
+ ['text/vnd.curl.scurl', 'scurl'],
+ ['text/vnd.fly', 'fly'],
+ ['text/vnd.fmi.flexstor', 'flx'],
+ ['text/vnd.graphviz', 'gv'],
+ ['text/vnd.in3d.3dml', '3dml'],
+ ['text/vnd.in3d.spot', 'spot'],
+ ['text/vnd.rn-realtext', 'rt'],
+ ['text/vnd.sun.j2me.app-descriptor', 'jad'],
+ ['text/vnd.wap.wml', 'wml'],
+ ['text/vnd.wap.wmlscript', 'wmls'],
+ ['text/webviewhtml', 'htt'],
+ ['text/x-asm', ['asm', 's']],
+ ['text/x-audiosoft-intra', 'aip'],
+ ['text/x-c', ['c', 'cc', 'cpp']],
+ ['text/x-component', 'htc'],
+ ['text/x-fortran', ['for', 'f', 'f77', 'f90']],
+ ['text/x-h', ['h', 'hh']],
+ ['text/x-java-source', ['java', 'jav']],
+ ['text/x-java-source,java', 'java'],
+ ['text/x-la-asf', 'lsx'],
+ ['text/x-m', 'm'],
+ ['text/x-pascal', 'p'],
+ ['text/x-script', 'hlb'],
+ ['text/x-script.csh', 'csh'],
+ ['text/x-script.elisp', 'el'],
+ ['text/x-script.guile', 'scm'],
+ ['text/x-script.ksh', 'ksh'],
+ ['text/x-script.lisp', 'lsp'],
+ ['text/x-script.perl', 'pl'],
+ ['text/x-script.perl-module', 'pm'],
+ ['text/x-script.phyton', 'py'],
+ ['text/x-script.rexx', 'rexx'],
+ ['text/x-script.scheme', 'scm'],
+ ['text/x-script.sh', 'sh'],
+ ['text/x-script.tcl', 'tcl'],
+ ['text/x-script.tcsh', 'tcsh'],
+ ['text/x-script.zsh', 'zsh'],
+ ['text/x-server-parsed-html', ['shtml', 'ssi']],
+ ['text/x-setext', 'etx'],
+ ['text/x-sgml', ['sgm', 'sgml']],
+ ['text/x-speech', ['spc', 'talk']],
+ ['text/x-uil', 'uil'],
+ ['text/x-uuencode', ['uu', 'uue']],
+ ['text/x-vcalendar', 'vcs'],
+ ['text/x-vcard', 'vcf'],
+ ['text/xml', 'xml'],
+ ['video/3gpp', '3gp'],
+ ['video/3gpp2', '3g2'],
+ ['video/animaflex', 'afl'],
+ ['video/avi', 'avi'],
+ ['video/avs-video', 'avs'],
+ ['video/dl', 'dl'],
+ ['video/fli', 'fli'],
+ ['video/gl', 'gl'],
+ ['video/h261', 'h261'],
+ ['video/h263', 'h263'],
+ ['video/h264', 'h264'],
+ ['video/jpeg', 'jpgv'],
+ ['video/jpm', 'jpm'],
+ ['video/mj2', 'mj2'],
+ ['video/mp4', 'mp4'],
+ ['video/mpeg', ['mpeg', 'mp2', 'mpa', 'mpe', 'mpg', 'mpv2', 'm1v', 'm2v', 'mp3']],
+ ['video/msvideo', 'avi'],
+ ['video/ogg', 'ogv'],
+ ['video/quicktime', ['mov', 'qt', 'moov']],
+ ['video/vdo', 'vdo'],
+ ['video/vivo', ['viv', 'vivo']],
+ ['video/vnd.dece.hd', 'uvh'],
+ ['video/vnd.dece.mobile', 'uvm'],
+ ['video/vnd.dece.pd', 'uvp'],
+ ['video/vnd.dece.sd', 'uvs'],
+ ['video/vnd.dece.video', 'uvv'],
+ ['video/vnd.fvt', 'fvt'],
+ ['video/vnd.mpegurl', 'mxu'],
+ ['video/vnd.ms-playready.media.pyv', 'pyv'],
+ ['video/vnd.rn-realvideo', 'rv'],
+ ['video/vnd.uvvu.mp4', 'uvu'],
+ ['video/vnd.vivo', ['viv', 'vivo']],
+ ['video/vosaic', 'vos'],
+ ['video/webm', 'webm'],
+ ['video/x-amt-demorun', 'xdr'],
+ ['video/x-amt-showrun', 'xsr'],
+ ['video/x-atomic3d-feature', 'fmf'],
+ ['video/x-dl', 'dl'],
+ ['video/x-dv', ['dif', 'dv']],
+ ['video/x-f4v', 'f4v'],
+ ['video/x-fli', 'fli'],
+ ['video/x-flv', 'flv'],
+ ['video/x-gl', 'gl'],
+ ['video/x-isvideo', 'isu'],
+ ['video/x-la-asf', ['lsf', 'lsx']],
+ ['video/x-m4v', 'm4v'],
+ ['video/x-motion-jpeg', 'mjpg'],
+ ['video/x-mpeg', ['mp3', 'mp2']],
+ ['video/x-mpeq2a', 'mp2'],
+ ['video/x-ms-asf', ['asf', 'asr', 'asx']],
+ ['video/x-ms-asf-plugin', 'asx'],
+ ['video/x-ms-wm', 'wm'],
+ ['video/x-ms-wmv', 'wmv'],
+ ['video/x-ms-wmx', 'wmx'],
+ ['video/x-ms-wvx', 'wvx'],
+ ['video/x-msvideo', 'avi'],
+ ['video/x-qtc', 'qtc'],
+ ['video/x-scm', 'scm'],
+ ['video/x-sgi-movie', ['movie', 'mv']],
+ ['windows/metafile', 'wmf'],
+ ['www/mime', 'mime'],
+ ['x-conference/x-cooltalk', 'ice'],
+ ['x-music/x-midi', ['mid', 'midi']],
+ ['x-world/x-3dmf', ['3dm', '3dmf', 'qd3', 'qd3d']],
+ ['x-world/x-svr', 'svr'],
+ ['x-world/x-vrml', ['flr', 'vrml', 'wrl', 'wrz', 'xaf', 'xof']],
+ ['x-world/x-vrt', 'vrt'],
+ ['xgl/drawing', 'xgz'],
+ ['xgl/movie', 'xmz']
+]);
+const extensions = new Map([
+ ['123', 'application/vnd.lotus-1-2-3'],
+ ['323', 'text/h323'],
+ ['*', 'application/octet-stream'],
+ ['3dm', 'x-world/x-3dmf'],
+ ['3dmf', 'x-world/x-3dmf'],
+ ['3dml', 'text/vnd.in3d.3dml'],
+ ['3g2', 'video/3gpp2'],
+ ['3gp', 'video/3gpp'],
+ ['7z', 'application/x-7z-compressed'],
+ ['a', 'application/octet-stream'],
+ ['aab', 'application/x-authorware-bin'],
+ ['aac', 'audio/x-aac'],
+ ['aam', 'application/x-authorware-map'],
+ ['aas', 'application/x-authorware-seg'],
+ ['abc', 'text/vnd.abc'],
+ ['abw', 'application/x-abiword'],
+ ['ac', 'application/pkix-attr-cert'],
+ ['acc', 'application/vnd.americandynamics.acc'],
+ ['ace', 'application/x-ace-compressed'],
+ ['acgi', 'text/html'],
+ ['acu', 'application/vnd.acucobol'],
+ ['acx', 'application/internet-property-stream'],
+ ['adp', 'audio/adpcm'],
+ ['aep', 'application/vnd.audiograph'],
+ ['afl', 'video/animaflex'],
+ ['afp', 'application/vnd.ibm.modcap'],
+ ['ahead', 'application/vnd.ahead.space'],
+ ['ai', 'application/postscript'],
+ ['aif', ['audio/aiff', 'audio/x-aiff']],
+ ['aifc', ['audio/aiff', 'audio/x-aiff']],
+ ['aiff', ['audio/aiff', 'audio/x-aiff']],
+ ['aim', 'application/x-aim'],
+ ['aip', 'text/x-audiosoft-intra'],
+ ['air', 'application/vnd.adobe.air-application-installer-package+zip'],
+ ['ait', 'application/vnd.dvb.ait'],
+ ['ami', 'application/vnd.amiga.ami'],
+ ['ani', 'application/x-navi-animation'],
+ ['aos', 'application/x-nokia-9000-communicator-add-on-software'],
+ ['apk', 'application/vnd.android.package-archive'],
+ ['application', 'application/x-ms-application'],
+ ['apr', 'application/vnd.lotus-approach'],
+ ['aps', 'application/mime'],
+ ['arc', 'application/octet-stream'],
+ ['arj', ['application/arj', 'application/octet-stream']],
+ ['art', 'image/x-jg'],
+ ['asf', 'video/x-ms-asf'],
+ ['asm', 'text/x-asm'],
+ ['aso', 'application/vnd.accpac.simply.aso'],
+ ['asp', 'text/asp'],
+ ['asr', 'video/x-ms-asf'],
+ ['asx', ['video/x-ms-asf', 'application/x-mplayer2', 'video/x-ms-asf-plugin']],
+ ['atc', 'application/vnd.acucorp'],
+ ['atomcat', 'application/atomcat+xml'],
+ ['atomsvc', 'application/atomsvc+xml'],
+ ['atx', 'application/vnd.antix.game-component'],
+ ['au', ['audio/basic', 'audio/x-au']],
+ ['avi', ['video/avi', 'video/msvideo', 'application/x-troff-msvideo', 'video/x-msvideo']],
+ ['avs', 'video/avs-video'],
+ ['aw', 'application/applixware'],
+ ['axs', 'application/olescript'],
+ ['azf', 'application/vnd.airzip.filesecure.azf'],
+ ['azs', 'application/vnd.airzip.filesecure.azs'],
+ ['azw', 'application/vnd.amazon.ebook'],
+ ['bas', 'text/plain'],
+ ['bcpio', 'application/x-bcpio'],
+ ['bdf', 'application/x-font-bdf'],
+ ['bdm', 'application/vnd.syncml.dm+wbxml'],
+ ['bed', 'application/vnd.realvnc.bed'],
+ ['bh2', 'application/vnd.fujitsu.oasysprs'],
+ ['bin', ['application/octet-stream', 'application/mac-binary', 'application/macbinary', 'application/x-macbinary', 'application/x-binary']],
+ ['bm', 'image/bmp'],
+ ['bmi', 'application/vnd.bmi'],
+ ['bmp', ['image/bmp', 'image/x-windows-bmp']],
+ ['boo', 'application/book'],
+ ['book', 'application/book'],
+ ['box', 'application/vnd.previewsystems.box'],
+ ['boz', 'application/x-bzip2'],
+ ['bsh', 'application/x-bsh'],
+ ['btif', 'image/prs.btif'],
+ ['bz', 'application/x-bzip'],
+ ['bz2', 'application/x-bzip2'],
+ ['c', ['text/plain', 'text/x-c']],
+ ['c++', 'text/plain'],
+ ['c11amc', 'application/vnd.cluetrust.cartomobile-config'],
+ ['c11amz', 'application/vnd.cluetrust.cartomobile-config-pkg'],
+ ['c4g', 'application/vnd.clonk.c4group'],
+ ['cab', 'application/vnd.ms-cab-compressed'],
+ ['car', 'application/vnd.curl.car'],
+ ['cat', ['application/vnd.ms-pkiseccat', 'application/vnd.ms-pki.seccat']],
+ ['cc', ['text/plain', 'text/x-c']],
+ ['ccad', 'application/clariscad'],
+ ['cco', 'application/x-cocoa'],
+ ['ccxml', 'application/ccxml+xml,'],
+ ['cdbcmsg', 'application/vnd.contact.cmsg'],
+ ['cdf', ['application/cdf', 'application/x-cdf', 'application/x-netcdf']],
+ ['cdkey', 'application/vnd.mediastation.cdkey'],
+ ['cdmia', 'application/cdmi-capability'],
+ ['cdmic', 'application/cdmi-container'],
+ ['cdmid', 'application/cdmi-domain'],
+ ['cdmio', 'application/cdmi-object'],
+ ['cdmiq', 'application/cdmi-queue'],
+ ['cdx', 'chemical/x-cdx'],
+ ['cdxml', 'application/vnd.chemdraw+xml'],
+ ['cdy', 'application/vnd.cinderella'],
+ ['cer', ['application/pkix-cert', 'application/x-x509-ca-cert']],
+ ['cgm', 'image/cgm'],
+ ['cha', 'application/x-chat'],
+ ['chat', 'application/x-chat'],
+ ['chm', 'application/vnd.ms-htmlhelp'],
+ ['chrt', 'application/vnd.kde.kchart'],
+ ['cif', 'chemical/x-cif'],
+ ['cii', 'application/vnd.anser-web-certificate-issue-initiation'],
+ ['cil', 'application/vnd.ms-artgalry'],
+ ['cla', 'application/vnd.claymore'],
+ ['class', ['application/octet-stream', 'application/java', 'application/java-byte-code', 'application/java-vm', 'application/x-java-class']],
+ ['clkk', 'application/vnd.crick.clicker.keyboard'],
+ ['clkp', 'application/vnd.crick.clicker.palette'],
+ ['clkt', 'application/vnd.crick.clicker.template'],
+ ['clkw', 'application/vnd.crick.clicker.wordbank'],
+ ['clkx', 'application/vnd.crick.clicker'],
+ ['clp', 'application/x-msclip'],
+ ['cmc', 'application/vnd.cosmocaller'],
+ ['cmdf', 'chemical/x-cmdf'],
+ ['cml', 'chemical/x-cml'],
+ ['cmp', 'application/vnd.yellowriver-custom-menu'],
+ ['cmx', 'image/x-cmx'],
+ ['cod', ['image/cis-cod', 'application/vnd.rim.cod']],
+ ['com', ['application/octet-stream', 'text/plain']],
+ ['conf', 'text/plain'],
+ ['cpio', 'application/x-cpio'],
+ ['cpp', 'text/x-c'],
+ ['cpt', ['application/mac-compactpro', 'application/x-compactpro', 'application/x-cpt']],
+ ['crd', 'application/x-mscardfile'],
+ ['crl', ['application/pkix-crl', 'application/pkcs-crl']],
+ ['crt', ['application/pkix-cert', 'application/x-x509-user-cert', 'application/x-x509-ca-cert']],
+ ['cryptonote', 'application/vnd.rig.cryptonote'],
+ ['csh', ['text/x-script.csh', 'application/x-csh']],
+ ['csml', 'chemical/x-csml'],
+ ['csp', 'application/vnd.commonspace'],
+ ['css', ['text/css', 'application/x-pointplus']],
+ ['csv', 'text/csv'],
+ ['cu', 'application/cu-seeme'],
+ ['curl', 'text/vnd.curl'],
+ ['cww', 'application/prs.cww'],
+ ['cxx', 'text/plain'],
+ ['dae', 'model/vnd.collada+xml'],
+ ['daf', 'application/vnd.mobius.daf'],
+ ['davmount', 'application/davmount+xml'],
+ ['dcr', 'application/x-director'],
+ ['dcurl', 'text/vnd.curl.dcurl'],
+ ['dd2', 'application/vnd.oma.dd2+xml'],
+ ['ddd', 'application/vnd.fujixerox.ddd'],
+ ['deb', 'application/x-debian-package'],
+ ['deepv', 'application/x-deepv'],
+ ['def', 'text/plain'],
+ ['der', 'application/x-x509-ca-cert'],
+ ['dfac', 'application/vnd.dreamfactory'],
+ ['dif', 'video/x-dv'],
+ ['dir', 'application/x-director'],
+ ['dis', 'application/vnd.mobius.dis'],
+ ['djvu', 'image/vnd.djvu'],
+ ['dl', ['video/dl', 'video/x-dl']],
+ ['dll', 'application/x-msdownload'],
+ ['dms', 'application/octet-stream'],
+ ['dna', 'application/vnd.dna'],
+ ['doc', 'application/msword'],
+ ['docm', 'application/vnd.ms-word.document.macroenabled.12'],
+ ['docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
+ ['dot', 'application/msword'],
+ ['dotm', 'application/vnd.ms-word.template.macroenabled.12'],
+ ['dotx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.template'],
+ ['dp', ['application/commonground', 'application/vnd.osgi.dp']],
+ ['dpg', 'application/vnd.dpgraph'],
+ ['dra', 'audio/vnd.dra'],
+ ['drw', 'application/drafting'],
+ ['dsc', 'text/prs.lines.tag'],
+ ['dssc', 'application/dssc+der'],
+ ['dtb', 'application/x-dtbook+xml'],
+ ['dtd', 'application/xml-dtd'],
+ ['dts', 'audio/vnd.dts'],
+ ['dtshd', 'audio/vnd.dts.hd'],
+ ['dump', 'application/octet-stream'],
+ ['dv', 'video/x-dv'],
+ ['dvi', 'application/x-dvi'],
+ ['dwf', ['model/vnd.dwf', 'drawing/x-dwf']],
+ ['dwg', ['application/acad', 'image/vnd.dwg', 'image/x-dwg']],
+ ['dxf', ['application/dxf', 'image/vnd.dwg', 'image/vnd.dxf', 'image/x-dwg']],
+ ['dxp', 'application/vnd.spotfire.dxp'],
+ ['dxr', 'application/x-director'],
+ ['ecelp4800', 'audio/vnd.nuera.ecelp4800'],
+ ['ecelp7470', 'audio/vnd.nuera.ecelp7470'],
+ ['ecelp9600', 'audio/vnd.nuera.ecelp9600'],
+ ['edm', 'application/vnd.novadigm.edm'],
+ ['edx', 'application/vnd.novadigm.edx'],
+ ['efif', 'application/vnd.picsel'],
+ ['ei6', 'application/vnd.pg.osasli'],
+ ['el', 'text/x-script.elisp'],
+ ['elc', ['application/x-elc', 'application/x-bytecode.elisp']],
+ ['eml', 'message/rfc822'],
+ ['emma', 'application/emma+xml'],
+ ['env', 'application/x-envoy'],
+ ['eol', 'audio/vnd.digital-winds'],
+ ['eot', 'application/vnd.ms-fontobject'],
+ ['eps', 'application/postscript'],
+ ['epub', 'application/epub+zip'],
+ ['es', ['application/ecmascript', 'application/x-esrehber']],
+ ['es3', 'application/vnd.eszigno3+xml'],
+ ['esf', 'application/vnd.epson.esf'],
+ ['etx', 'text/x-setext'],
+ ['evy', ['application/envoy', 'application/x-envoy']],
+ ['exe', ['application/octet-stream', 'application/x-msdownload']],
+ ['exi', 'application/exi'],
+ ['ext', 'application/vnd.novadigm.ext'],
+ ['ez2', 'application/vnd.ezpix-album'],
+ ['ez3', 'application/vnd.ezpix-package'],
+ ['f', ['text/plain', 'text/x-fortran']],
+ ['f4v', 'video/x-f4v'],
+ ['f77', 'text/x-fortran'],
+ ['f90', ['text/plain', 'text/x-fortran']],
+ ['fbs', 'image/vnd.fastbidsheet'],
+ ['fcs', 'application/vnd.isac.fcs'],
+ ['fdf', 'application/vnd.fdf'],
+ ['fe_launch', 'application/vnd.denovo.fcselayout-link'],
+ ['fg5', 'application/vnd.fujitsu.oasysgp'],
+ ['fh', 'image/x-freehand'],
+ ['fif', ['application/fractals', 'image/fif']],
+ ['fig', 'application/x-xfig'],
+ ['fli', ['video/fli', 'video/x-fli']],
+ ['flo', ['image/florian', 'application/vnd.micrografx.flo']],
+ ['flr', 'x-world/x-vrml'],
+ ['flv', 'video/x-flv'],
+ ['flw', 'application/vnd.kde.kivio'],
+ ['flx', 'text/vnd.fmi.flexstor'],
+ ['fly', 'text/vnd.fly'],
+ ['fm', 'application/vnd.framemaker'],
+ ['fmf', 'video/x-atomic3d-feature'],
+ ['fnc', 'application/vnd.frogans.fnc'],
+ ['for', ['text/plain', 'text/x-fortran']],
+ ['fpx', ['image/vnd.fpx', 'image/vnd.net-fpx']],
+ ['frl', 'application/freeloader'],
+ ['fsc', 'application/vnd.fsc.weblaunch'],
+ ['fst', 'image/vnd.fst'],
+ ['ftc', 'application/vnd.fluxtime.clip'],
+ ['fti', 'application/vnd.anser-web-funds-transfer-initiation'],
+ ['funk', 'audio/make'],
+ ['fvt', 'video/vnd.fvt'],
+ ['fxp', 'application/vnd.adobe.fxp'],
+ ['fzs', 'application/vnd.fuzzysheet'],
+ ['g', 'text/plain'],
+ ['g2w', 'application/vnd.geoplan'],
+ ['g3', 'image/g3fax'],
+ ['g3w', 'application/vnd.geospace'],
+ ['gac', 'application/vnd.groove-account'],
+ ['gdl', 'model/vnd.gdl'],
+ ['geo', 'application/vnd.dynageo'],
+ ['gex', 'application/vnd.geometry-explorer'],
+ ['ggb', 'application/vnd.geogebra.file'],
+ ['ggt', 'application/vnd.geogebra.tool'],
+ ['ghf', 'application/vnd.groove-help'],
+ ['gif', 'image/gif'],
+ ['gim', 'application/vnd.groove-identity-message'],
+ ['gl', ['video/gl', 'video/x-gl']],
+ ['gmx', 'application/vnd.gmx'],
+ ['gnumeric', 'application/x-gnumeric'],
+ ['gph', 'application/vnd.flographit'],
+ ['gqf', 'application/vnd.grafeq'],
+ ['gram', 'application/srgs'],
+ ['grv', 'application/vnd.groove-injector'],
+ ['grxml', 'application/srgs+xml'],
+ ['gsd', 'audio/x-gsm'],
+ ['gsf', 'application/x-font-ghostscript'],
+ ['gsm', 'audio/x-gsm'],
+ ['gsp', 'application/x-gsp'],
+ ['gss', 'application/x-gss'],
+ ['gtar', 'application/x-gtar'],
+ ['gtm', 'application/vnd.groove-tool-message'],
+ ['gtw', 'model/vnd.gtw'],
+ ['gv', 'text/vnd.graphviz'],
+ ['gxt', 'application/vnd.geonext'],
+ ['gz', ['application/x-gzip', 'application/x-compressed']],
+ ['gzip', ['multipart/x-gzip', 'application/x-gzip']],
+ ['h', ['text/plain', 'text/x-h']],
+ ['h261', 'video/h261'],
+ ['h263', 'video/h263'],
+ ['h264', 'video/h264'],
+ ['hal', 'application/vnd.hal+xml'],
+ ['hbci', 'application/vnd.hbci'],
+ ['hdf', 'application/x-hdf'],
+ ['help', 'application/x-helpfile'],
+ ['hgl', 'application/vnd.hp-hpgl'],
+ ['hh', ['text/plain', 'text/x-h']],
+ ['hlb', 'text/x-script'],
+ ['hlp', ['application/winhlp', 'application/hlp', 'application/x-helpfile', 'application/x-winhelp']],
+ ['hpg', 'application/vnd.hp-hpgl'],
+ ['hpgl', 'application/vnd.hp-hpgl'],
+ ['hpid', 'application/vnd.hp-hpid'],
+ ['hps', 'application/vnd.hp-hps'],
+ [
+ 'hqx',
+ [
+ 'application/mac-binhex40',
+ 'application/binhex',
+ 'application/binhex4',
+ 'application/mac-binhex',
+ 'application/x-binhex40',
+ 'application/x-mac-binhex40'
+ ]
+ ],
+ ['hta', 'application/hta'],
+ ['htc', 'text/x-component'],
+ ['htke', 'application/vnd.kenameaapp'],
+ ['htm', 'text/html'],
+ ['html', 'text/html'],
+ ['htmls', 'text/html'],
+ ['htt', 'text/webviewhtml'],
+ ['htx', 'text/html'],
+ ['hvd', 'application/vnd.yamaha.hv-dic'],
+ ['hvp', 'application/vnd.yamaha.hv-voice'],
+ ['hvs', 'application/vnd.yamaha.hv-script'],
+ ['i2g', 'application/vnd.intergeo'],
+ ['icc', 'application/vnd.iccprofile'],
+ ['ice', 'x-conference/x-cooltalk'],
+ ['ico', 'image/x-icon'],
+ ['ics', 'text/calendar'],
+ ['idc', 'text/plain'],
+ ['ief', 'image/ief'],
+ ['iefs', 'image/ief'],
+ ['ifm', 'application/vnd.shana.informed.formdata'],
+ ['iges', ['application/iges', 'model/iges']],
+ ['igl', 'application/vnd.igloader'],
+ ['igm', 'application/vnd.insors.igm'],
+ ['igs', ['application/iges', 'model/iges']],
+ ['igx', 'application/vnd.micrografx.igx'],
+ ['iif', 'application/vnd.shana.informed.interchange'],
+ ['iii', 'application/x-iphone'],
+ ['ima', 'application/x-ima'],
+ ['imap', 'application/x-httpd-imap'],
+ ['imp', 'application/vnd.accpac.simply.imp'],
+ ['ims', 'application/vnd.ms-ims'],
+ ['inf', 'application/inf'],
+ ['ins', ['application/x-internet-signup', 'application/x-internett-signup']],
+ ['ip', 'application/x-ip2'],
+ ['ipfix', 'application/ipfix'],
+ ['ipk', 'application/vnd.shana.informed.package'],
+ ['irm', 'application/vnd.ibm.rights-management'],
+ ['irp', 'application/vnd.irepository.package+xml'],
+ ['isp', 'application/x-internet-signup'],
+ ['isu', 'video/x-isvideo'],
+ ['it', 'audio/it'],
+ ['itp', 'application/vnd.shana.informed.formtemplate'],
+ ['iv', 'application/x-inventor'],
+ ['ivp', 'application/vnd.immervision-ivp'],
+ ['ivr', 'i-world/i-vrml'],
+ ['ivu', 'application/vnd.immervision-ivu'],
+ ['ivy', 'application/x-livescreen'],
+ ['jad', 'text/vnd.sun.j2me.app-descriptor'],
+ ['jam', ['application/vnd.jam', 'audio/x-jam']],
+ ['jar', 'application/java-archive'],
+ ['jav', ['text/plain', 'text/x-java-source']],
+ ['java', ['text/plain', 'text/x-java-source,java', 'text/x-java-source']],
+ ['jcm', 'application/x-java-commerce'],
+ ['jfif', ['image/pipeg', 'image/jpeg', 'image/pjpeg']],
+ ['jfif-tbnl', 'image/jpeg'],
+ ['jisp', 'application/vnd.jisp'],
+ ['jlt', 'application/vnd.hp-jlyt'],
+ ['jnlp', 'application/x-java-jnlp-file'],
+ ['joda', 'application/vnd.joost.joda-archive'],
+ ['jpe', ['image/jpeg', 'image/pjpeg']],
+ ['jpeg', ['image/jpeg', 'image/pjpeg']],
+ ['jpg', ['image/jpeg', 'image/pjpeg']],
+ ['jpgv', 'video/jpeg'],
+ ['jpm', 'video/jpm'],
+ ['jps', 'image/x-jps'],
+ ['js', ['application/javascript', 'application/ecmascript', 'text/javascript', 'text/ecmascript', 'application/x-javascript']],
+ ['json', 'application/json'],
+ ['jut', 'image/jutvision'],
+ ['kar', ['audio/midi', 'music/x-karaoke']],
+ ['karbon', 'application/vnd.kde.karbon'],
+ ['kfo', 'application/vnd.kde.kformula'],
+ ['kia', 'application/vnd.kidspiration'],
+ ['kml', 'application/vnd.google-earth.kml+xml'],
+ ['kmz', 'application/vnd.google-earth.kmz'],
+ ['kne', 'application/vnd.kinar'],
+ ['kon', 'application/vnd.kde.kontour'],
+ ['kpr', 'application/vnd.kde.kpresenter'],
+ ['ksh', ['application/x-ksh', 'text/x-script.ksh']],
+ ['ksp', 'application/vnd.kde.kspread'],
+ ['ktx', 'image/ktx'],
+ ['ktz', 'application/vnd.kahootz'],
+ ['kwd', 'application/vnd.kde.kword'],
+ ['la', ['audio/nspaudio', 'audio/x-nspaudio']],
+ ['lam', 'audio/x-liveaudio'],
+ ['lasxml', 'application/vnd.las.las+xml'],
+ ['latex', 'application/x-latex'],
+ ['lbd', 'application/vnd.llamagraphics.life-balance.desktop'],
+ ['lbe', 'application/vnd.llamagraphics.life-balance.exchange+xml'],
+ ['les', 'application/vnd.hhe.lesson-player'],
+ ['lha', ['application/octet-stream', 'application/lha', 'application/x-lha']],
+ ['lhx', 'application/octet-stream'],
+ ['link66', 'application/vnd.route66.link66+xml'],
+ ['list', 'text/plain'],
+ ['lma', ['audio/nspaudio', 'audio/x-nspaudio']],
+ ['log', 'text/plain'],
+ ['lrm', 'application/vnd.ms-lrm'],
+ ['lsf', 'video/x-la-asf'],
+ ['lsp', ['application/x-lisp', 'text/x-script.lisp']],
+ ['lst', 'text/plain'],
+ ['lsx', ['video/x-la-asf', 'text/x-la-asf']],
+ ['ltf', 'application/vnd.frogans.ltf'],
+ ['ltx', 'application/x-latex'],
+ ['lvp', 'audio/vnd.lucent.voice'],
+ ['lwp', 'application/vnd.lotus-wordpro'],
+ ['lzh', ['application/octet-stream', 'application/x-lzh']],
+ ['lzx', ['application/lzx', 'application/octet-stream', 'application/x-lzx']],
+ ['m', ['text/plain', 'text/x-m']],
+ ['m13', 'application/x-msmediaview'],
+ ['m14', 'application/x-msmediaview'],
+ ['m1v', 'video/mpeg'],
+ ['m21', 'application/mp21'],
+ ['m2a', 'audio/mpeg'],
+ ['m2v', 'video/mpeg'],
+ ['m3u', ['audio/x-mpegurl', 'audio/x-mpequrl']],
+ ['m3u8', 'application/vnd.apple.mpegurl'],
+ ['m4v', 'video/x-m4v'],
+ ['ma', 'application/mathematica'],
+ ['mads', 'application/mads+xml'],
+ ['mag', 'application/vnd.ecowin.chart'],
+ ['man', 'application/x-troff-man'],
+ ['map', 'application/x-navimap'],
+ ['mar', 'text/plain'],
+ ['mathml', 'application/mathml+xml'],
+ ['mbd', 'application/mbedlet'],
+ ['mbk', 'application/vnd.mobius.mbk'],
+ ['mbox', 'application/mbox'],
+ ['mc$', 'application/x-magic-cap-package-1.0'],
+ ['mc1', 'application/vnd.medcalcdata'],
+ ['mcd', ['application/mcad', 'application/vnd.mcd', 'application/x-mathcad']],
+ ['mcf', ['image/vasa', 'text/mcf']],
+ ['mcp', 'application/netmc'],
+ ['mcurl', 'text/vnd.curl.mcurl'],
+ ['mdb', 'application/x-msaccess'],
+ ['mdi', 'image/vnd.ms-modi'],
+ ['me', 'application/x-troff-me'],
+ ['meta4', 'application/metalink4+xml'],
+ ['mets', 'application/mets+xml'],
+ ['mfm', 'application/vnd.mfmp'],
+ ['mgp', 'application/vnd.osgeo.mapguide.package'],
+ ['mgz', 'application/vnd.proteus.magazine'],
+ ['mht', 'message/rfc822'],
+ ['mhtml', 'message/rfc822'],
+ ['mid', ['audio/mid', 'audio/midi', 'music/crescendo', 'x-music/x-midi', 'audio/x-midi', 'application/x-midi', 'audio/x-mid']],
+ ['midi', ['audio/midi', 'music/crescendo', 'x-music/x-midi', 'audio/x-midi', 'application/x-midi', 'audio/x-mid']],
+ ['mif', ['application/vnd.mif', 'application/x-mif', 'application/x-frame']],
+ ['mime', ['message/rfc822', 'www/mime']],
+ ['mj2', 'video/mj2'],
+ ['mjf', 'audio/x-vnd.audioexplosion.mjuicemediafile'],
+ ['mjpg', 'video/x-motion-jpeg'],
+ ['mlp', 'application/vnd.dolby.mlp'],
+ ['mm', ['application/base64', 'application/x-meme']],
+ ['mmd', 'application/vnd.chipnuts.karaoke-mmd'],
+ ['mme', 'application/base64'],
+ ['mmf', 'application/vnd.smaf'],
+ ['mmr', 'image/vnd.fujixerox.edmics-mmr'],
+ ['mny', 'application/x-msmoney'],
+ ['mod', ['audio/mod', 'audio/x-mod']],
+ ['mods', 'application/mods+xml'],
+ ['moov', 'video/quicktime'],
+ ['mov', 'video/quicktime'],
+ ['movie', 'video/x-sgi-movie'],
+ ['mp2', ['video/mpeg', 'audio/mpeg', 'video/x-mpeg', 'audio/x-mpeg', 'video/x-mpeq2a']],
+ ['mp3', ['audio/mpeg', 'audio/mpeg3', 'video/mpeg', 'audio/x-mpeg-3', 'video/x-mpeg']],
+ ['mp4', ['video/mp4', 'application/mp4']],
+ ['mp4a', 'audio/mp4'],
+ ['mpa', ['video/mpeg', 'audio/mpeg']],
+ ['mpc', ['application/vnd.mophun.certificate', 'application/x-project']],
+ ['mpe', 'video/mpeg'],
+ ['mpeg', 'video/mpeg'],
+ ['mpg', ['video/mpeg', 'audio/mpeg']],
+ ['mpga', 'audio/mpeg'],
+ ['mpkg', 'application/vnd.apple.installer+xml'],
+ ['mpm', 'application/vnd.blueice.multipass'],
+ ['mpn', 'application/vnd.mophun.application'],
+ ['mpp', 'application/vnd.ms-project'],
+ ['mpt', 'application/x-project'],
+ ['mpv', 'application/x-project'],
+ ['mpv2', 'video/mpeg'],
+ ['mpx', 'application/x-project'],
+ ['mpy', 'application/vnd.ibm.minipay'],
+ ['mqy', 'application/vnd.mobius.mqy'],
+ ['mrc', 'application/marc'],
+ ['mrcx', 'application/marcxml+xml'],
+ ['ms', 'application/x-troff-ms'],
+ ['mscml', 'application/mediaservercontrol+xml'],
+ ['mseq', 'application/vnd.mseq'],
+ ['msf', 'application/vnd.epson.msf'],
+ ['msg', 'application/vnd.ms-outlook'],
+ ['msh', 'model/mesh'],
+ ['msl', 'application/vnd.mobius.msl'],
+ ['msty', 'application/vnd.muvee.style'],
+ ['mts', 'model/vnd.mts'],
+ ['mus', 'application/vnd.musician'],
+ ['musicxml', 'application/vnd.recordare.musicxml+xml'],
+ ['mv', 'video/x-sgi-movie'],
+ ['mvb', 'application/x-msmediaview'],
+ ['mwf', 'application/vnd.mfer'],
+ ['mxf', 'application/mxf'],
+ ['mxl', 'application/vnd.recordare.musicxml'],
+ ['mxml', 'application/xv+xml'],
+ ['mxs', 'application/vnd.triscape.mxs'],
+ ['mxu', 'video/vnd.mpegurl'],
+ ['my', 'audio/make'],
+ ['mzz', 'application/x-vnd.audioexplosion.mzz'],
+ ['n-gage', 'application/vnd.nokia.n-gage.symbian.install'],
+ ['n3', 'text/n3'],
+ ['nap', 'image/naplps'],
+ ['naplps', 'image/naplps'],
+ ['nbp', 'application/vnd.wolfram.player'],
+ ['nc', 'application/x-netcdf'],
+ ['ncm', 'application/vnd.nokia.configuration-message'],
+ ['ncx', 'application/x-dtbncx+xml'],
+ ['ngdat', 'application/vnd.nokia.n-gage.data'],
+ ['nif', 'image/x-niff'],
+ ['niff', 'image/x-niff'],
+ ['nix', 'application/x-mix-transfer'],
+ ['nlu', 'application/vnd.neurolanguage.nlu'],
+ ['nml', 'application/vnd.enliven'],
+ ['nnd', 'application/vnd.noblenet-directory'],
+ ['nns', 'application/vnd.noblenet-sealer'],
+ ['nnw', 'application/vnd.noblenet-web'],
+ ['npx', 'image/vnd.net-fpx'],
+ ['nsc', 'application/x-conference'],
+ ['nsf', 'application/vnd.lotus-notes'],
+ ['nvd', 'application/x-navidoc'],
+ ['nws', 'message/rfc822'],
+ ['o', 'application/octet-stream'],
+ ['oa2', 'application/vnd.fujitsu.oasys2'],
+ ['oa3', 'application/vnd.fujitsu.oasys3'],
+ ['oas', 'application/vnd.fujitsu.oasys'],
+ ['obd', 'application/x-msbinder'],
+ ['oda', 'application/oda'],
+ ['odb', 'application/vnd.oasis.opendocument.database'],
+ ['odc', 'application/vnd.oasis.opendocument.chart'],
+ ['odf', 'application/vnd.oasis.opendocument.formula'],
+ ['odft', 'application/vnd.oasis.opendocument.formula-template'],
+ ['odg', 'application/vnd.oasis.opendocument.graphics'],
+ ['odi', 'application/vnd.oasis.opendocument.image'],
+ ['odm', 'application/vnd.oasis.opendocument.text-master'],
+ ['odp', 'application/vnd.oasis.opendocument.presentation'],
+ ['ods', 'application/vnd.oasis.opendocument.spreadsheet'],
+ ['odt', 'application/vnd.oasis.opendocument.text'],
+ ['oga', 'audio/ogg'],
+ ['ogv', 'video/ogg'],
+ ['ogx', 'application/ogg'],
+ ['omc', 'application/x-omc'],
+ ['omcd', 'application/x-omcdatamaker'],
+ ['omcr', 'application/x-omcregerator'],
+ ['onetoc', 'application/onenote'],
+ ['opf', 'application/oebps-package+xml'],
+ ['org', 'application/vnd.lotus-organizer'],
+ ['osf', 'application/vnd.yamaha.openscoreformat'],
+ ['osfpvg', 'application/vnd.yamaha.openscoreformat.osfpvg+xml'],
+ ['otc', 'application/vnd.oasis.opendocument.chart-template'],
+ ['otf', 'application/x-font-otf'],
+ ['otg', 'application/vnd.oasis.opendocument.graphics-template'],
+ ['oth', 'application/vnd.oasis.opendocument.text-web'],
+ ['oti', 'application/vnd.oasis.opendocument.image-template'],
+ ['otp', 'application/vnd.oasis.opendocument.presentation-template'],
+ ['ots', 'application/vnd.oasis.opendocument.spreadsheet-template'],
+ ['ott', 'application/vnd.oasis.opendocument.text-template'],
+ ['oxt', 'application/vnd.openofficeorg.extension'],
+ ['p', 'text/x-pascal'],
+ ['p10', ['application/pkcs10', 'application/x-pkcs10']],
+ ['p12', ['application/pkcs-12', 'application/x-pkcs12']],
+ ['p7a', 'application/x-pkcs7-signature'],
+ ['p7b', 'application/x-pkcs7-certificates'],
+ ['p7c', ['application/pkcs7-mime', 'application/x-pkcs7-mime']],
+ ['p7m', ['application/pkcs7-mime', 'application/x-pkcs7-mime']],
+ ['p7r', 'application/x-pkcs7-certreqresp'],
+ ['p7s', ['application/pkcs7-signature', 'application/x-pkcs7-signature']],
+ ['p8', 'application/pkcs8'],
+ ['par', 'text/plain-bas'],
+ ['part', 'application/pro_eng'],
+ ['pas', 'text/pascal'],
+ ['paw', 'application/vnd.pawaafile'],
+ ['pbd', 'application/vnd.powerbuilder6'],
+ ['pbm', 'image/x-portable-bitmap'],
+ ['pcf', 'application/x-font-pcf'],
+ ['pcl', ['application/vnd.hp-pcl', 'application/x-pcl']],
+ ['pclxl', 'application/vnd.hp-pclxl'],
+ ['pct', 'image/x-pict'],
+ ['pcurl', 'application/vnd.curl.pcurl'],
+ ['pcx', 'image/x-pcx'],
+ ['pdb', ['application/vnd.palm', 'chemical/x-pdb']],
+ ['pdf', 'application/pdf'],
+ ['pfa', 'application/x-font-type1'],
+ ['pfr', 'application/font-tdpfr'],
+ ['pfunk', ['audio/make', 'audio/make.my.funk']],
+ ['pfx', 'application/x-pkcs12'],
+ ['pgm', ['image/x-portable-graymap', 'image/x-portable-greymap']],
+ ['pgn', 'application/x-chess-pgn'],
+ ['pgp', 'application/pgp-signature'],
+ ['pic', ['image/pict', 'image/x-pict']],
+ ['pict', 'image/pict'],
+ ['pkg', 'application/x-newton-compatible-pkg'],
+ ['pki', 'application/pkixcmp'],
+ ['pkipath', 'application/pkix-pkipath'],
+ ['pko', ['application/ynd.ms-pkipko', 'application/vnd.ms-pki.pko']],
+ ['pl', ['text/plain', 'text/x-script.perl']],
+ ['plb', 'application/vnd.3gpp.pic-bw-large'],
+ ['plc', 'application/vnd.mobius.plc'],
+ ['plf', 'application/vnd.pocketlearn'],
+ ['pls', 'application/pls+xml'],
+ ['plx', 'application/x-pixclscript'],
+ ['pm', ['text/x-script.perl-module', 'image/x-xpixmap']],
+ ['pm4', 'application/x-pagemaker'],
+ ['pm5', 'application/x-pagemaker'],
+ ['pma', 'application/x-perfmon'],
+ ['pmc', 'application/x-perfmon'],
+ ['pml', ['application/vnd.ctc-posml', 'application/x-perfmon']],
+ ['pmr', 'application/x-perfmon'],
+ ['pmw', 'application/x-perfmon'],
+ ['png', 'image/png'],
+ ['pnm', ['application/x-portable-anymap', 'image/x-portable-anymap']],
+ ['portpkg', 'application/vnd.macports.portpkg'],
+ ['pot', ['application/vnd.ms-powerpoint', 'application/mspowerpoint']],
+ ['potm', 'application/vnd.ms-powerpoint.template.macroenabled.12'],
+ ['potx', 'application/vnd.openxmlformats-officedocument.presentationml.template'],
+ ['pov', 'model/x-pov'],
+ ['ppa', 'application/vnd.ms-powerpoint'],
+ ['ppam', 'application/vnd.ms-powerpoint.addin.macroenabled.12'],
+ ['ppd', 'application/vnd.cups-ppd'],
+ ['ppm', 'image/x-portable-pixmap'],
+ ['pps', ['application/vnd.ms-powerpoint', 'application/mspowerpoint']],
+ ['ppsm', 'application/vnd.ms-powerpoint.slideshow.macroenabled.12'],
+ ['ppsx', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow'],
+ ['ppt', ['application/vnd.ms-powerpoint', 'application/mspowerpoint', 'application/powerpoint', 'application/x-mspowerpoint']],
+ ['pptm', 'application/vnd.ms-powerpoint.presentation.macroenabled.12'],
+ ['pptx', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'],
+ ['ppz', 'application/mspowerpoint'],
+ ['prc', 'application/x-mobipocket-ebook'],
+ ['pre', ['application/vnd.lotus-freelance', 'application/x-freelance']],
+ ['prf', 'application/pics-rules'],
+ ['prt', 'application/pro_eng'],
+ ['ps', 'application/postscript'],
+ ['psb', 'application/vnd.3gpp.pic-bw-small'],
+ ['psd', ['application/octet-stream', 'image/vnd.adobe.photoshop']],
+ ['psf', 'application/x-font-linux-psf'],
+ ['pskcxml', 'application/pskc+xml'],
+ ['ptid', 'application/vnd.pvi.ptid1'],
+ ['pub', 'application/x-mspublisher'],
+ ['pvb', 'application/vnd.3gpp.pic-bw-var'],
+ ['pvu', 'paleovu/x-pv'],
+ ['pwn', 'application/vnd.3m.post-it-notes'],
+ ['pwz', 'application/vnd.ms-powerpoint'],
+ ['py', 'text/x-script.phyton'],
+ ['pya', 'audio/vnd.ms-playready.media.pya'],
+ ['pyc', 'application/x-bytecode.python'],
+ ['pyv', 'video/vnd.ms-playready.media.pyv'],
+ ['qam', 'application/vnd.epson.quickanime'],
+ ['qbo', 'application/vnd.intu.qbo'],
+ ['qcp', 'audio/vnd.qcelp'],
+ ['qd3', 'x-world/x-3dmf'],
+ ['qd3d', 'x-world/x-3dmf'],
+ ['qfx', 'application/vnd.intu.qfx'],
+ ['qif', 'image/x-quicktime'],
+ ['qps', 'application/vnd.publishare-delta-tree'],
+ ['qt', 'video/quicktime'],
+ ['qtc', 'video/x-qtc'],
+ ['qti', 'image/x-quicktime'],
+ ['qtif', 'image/x-quicktime'],
+ ['qxd', 'application/vnd.quark.quarkxpress'],
+ ['ra', ['audio/x-realaudio', 'audio/x-pn-realaudio', 'audio/x-pn-realaudio-plugin']],
+ ['ram', 'audio/x-pn-realaudio'],
+ ['rar', 'application/x-rar-compressed'],
+ ['ras', ['image/cmu-raster', 'application/x-cmu-raster', 'image/x-cmu-raster']],
+ ['rast', 'image/cmu-raster'],
+ ['rcprofile', 'application/vnd.ipunplugged.rcprofile'],
+ ['rdf', 'application/rdf+xml'],
+ ['rdz', 'application/vnd.data-vision.rdz'],
+ ['rep', 'application/vnd.businessobjects'],
+ ['res', 'application/x-dtbresource+xml'],
+ ['rexx', 'text/x-script.rexx'],
+ ['rf', 'image/vnd.rn-realflash'],
+ ['rgb', 'image/x-rgb'],
+ ['rif', 'application/reginfo+xml'],
+ ['rip', 'audio/vnd.rip'],
+ ['rl', 'application/resource-lists+xml'],
+ ['rlc', 'image/vnd.fujixerox.edmics-rlc'],
+ ['rld', 'application/resource-lists-diff+xml'],
+ ['rm', ['application/vnd.rn-realmedia', 'audio/x-pn-realaudio']],
+ ['rmi', 'audio/mid'],
+ ['rmm', 'audio/x-pn-realaudio'],
+ ['rmp', ['audio/x-pn-realaudio-plugin', 'audio/x-pn-realaudio']],
+ ['rms', 'application/vnd.jcp.javame.midlet-rms'],
+ ['rnc', 'application/relax-ng-compact-syntax'],
+ ['rng', ['application/ringing-tones', 'application/vnd.nokia.ringing-tone']],
+ ['rnx', 'application/vnd.rn-realplayer'],
+ ['roff', 'application/x-troff'],
+ ['rp', 'image/vnd.rn-realpix'],
+ ['rp9', 'application/vnd.cloanto.rp9'],
+ ['rpm', 'audio/x-pn-realaudio-plugin'],
+ ['rpss', 'application/vnd.nokia.radio-presets'],
+ ['rpst', 'application/vnd.nokia.radio-preset'],
+ ['rq', 'application/sparql-query'],
+ ['rs', 'application/rls-services+xml'],
+ ['rsd', 'application/rsd+xml'],
+ ['rt', ['text/richtext', 'text/vnd.rn-realtext']],
+ ['rtf', ['application/rtf', 'text/richtext', 'application/x-rtf']],
+ ['rtx', ['text/richtext', 'application/rtf']],
+ ['rv', 'video/vnd.rn-realvideo'],
+ ['s', 'text/x-asm'],
+ ['s3m', 'audio/s3m'],
+ ['saf', 'application/vnd.yamaha.smaf-audio'],
+ ['saveme', 'application/octet-stream'],
+ ['sbk', 'application/x-tbook'],
+ ['sbml', 'application/sbml+xml'],
+ ['sc', 'application/vnd.ibm.secure-container'],
+ ['scd', 'application/x-msschedule'],
+ ['scm', ['application/vnd.lotus-screencam', 'video/x-scm', 'text/x-script.guile', 'application/x-lotusscreencam', 'text/x-script.scheme']],
+ ['scq', 'application/scvp-cv-request'],
+ ['scs', 'application/scvp-cv-response'],
+ ['sct', 'text/scriptlet'],
+ ['scurl', 'text/vnd.curl.scurl'],
+ ['sda', 'application/vnd.stardivision.draw'],
+ ['sdc', 'application/vnd.stardivision.calc'],
+ ['sdd', 'application/vnd.stardivision.impress'],
+ ['sdkm', 'application/vnd.solent.sdkm+xml'],
+ ['sdml', 'text/plain'],
+ ['sdp', ['application/sdp', 'application/x-sdp']],
+ ['sdr', 'application/sounder'],
+ ['sdw', 'application/vnd.stardivision.writer'],
+ ['sea', ['application/sea', 'application/x-sea']],
+ ['see', 'application/vnd.seemail'],
+ ['seed', 'application/vnd.fdsn.seed'],
+ ['sema', 'application/vnd.sema'],
+ ['semd', 'application/vnd.semd'],
+ ['semf', 'application/vnd.semf'],
+ ['ser', 'application/java-serialized-object'],
+ ['set', 'application/set'],
+ ['setpay', 'application/set-payment-initiation'],
+ ['setreg', 'application/set-registration-initiation'],
+ ['sfd-hdstx', 'application/vnd.hydrostatix.sof-data'],
+ ['sfs', 'application/vnd.spotfire.sfs'],
+ ['sgl', 'application/vnd.stardivision.writer-global'],
+ ['sgm', ['text/sgml', 'text/x-sgml']],
+ ['sgml', ['text/sgml', 'text/x-sgml']],
+ ['sh', ['application/x-shar', 'application/x-bsh', 'application/x-sh', 'text/x-script.sh']],
+ ['shar', ['application/x-bsh', 'application/x-shar']],
+ ['shf', 'application/shf+xml'],
+ ['shtml', ['text/html', 'text/x-server-parsed-html']],
+ ['sid', 'audio/x-psid'],
+ ['sis', 'application/vnd.symbian.install'],
+ ['sit', ['application/x-stuffit', 'application/x-sit']],
+ ['sitx', 'application/x-stuffitx'],
+ ['skd', 'application/x-koan'],
+ ['skm', 'application/x-koan'],
+ ['skp', ['application/vnd.koan', 'application/x-koan']],
+ ['skt', 'application/x-koan'],
+ ['sl', 'application/x-seelogo'],
+ ['sldm', 'application/vnd.ms-powerpoint.slide.macroenabled.12'],
+ ['sldx', 'application/vnd.openxmlformats-officedocument.presentationml.slide'],
+ ['slt', 'application/vnd.epson.salt'],
+ ['sm', 'application/vnd.stepmania.stepchart'],
+ ['smf', 'application/vnd.stardivision.math'],
+ ['smi', ['application/smil', 'application/smil+xml']],
+ ['smil', 'application/smil'],
+ ['snd', ['audio/basic', 'audio/x-adpcm']],
+ ['snf', 'application/x-font-snf'],
+ ['sol', 'application/solids'],
+ ['spc', ['text/x-speech', 'application/x-pkcs7-certificates']],
+ ['spf', 'application/vnd.yamaha.smaf-phrase'],
+ ['spl', ['application/futuresplash', 'application/x-futuresplash']],
+ ['spot', 'text/vnd.in3d.spot'],
+ ['spp', 'application/scvp-vp-response'],
+ ['spq', 'application/scvp-vp-request'],
+ ['spr', 'application/x-sprite'],
+ ['sprite', 'application/x-sprite'],
+ ['src', 'application/x-wais-source'],
+ ['sru', 'application/sru+xml'],
+ ['srx', 'application/sparql-results+xml'],
+ ['sse', 'application/vnd.kodak-descriptor'],
+ ['ssf', 'application/vnd.epson.ssf'],
+ ['ssi', 'text/x-server-parsed-html'],
+ ['ssm', 'application/streamingmedia'],
+ ['ssml', 'application/ssml+xml'],
+ ['sst', ['application/vnd.ms-pkicertstore', 'application/vnd.ms-pki.certstore']],
+ ['st', 'application/vnd.sailingtracker.track'],
+ ['stc', 'application/vnd.sun.xml.calc.template'],
+ ['std', 'application/vnd.sun.xml.draw.template'],
+ ['step', 'application/step'],
+ ['stf', 'application/vnd.wt.stf'],
+ ['sti', 'application/vnd.sun.xml.impress.template'],
+ ['stk', 'application/hyperstudio'],
+ ['stl', ['application/vnd.ms-pkistl', 'application/sla', 'application/vnd.ms-pki.stl', 'application/x-navistyle']],
+ ['stm', 'text/html'],
+ ['stp', 'application/step'],
+ ['str', 'application/vnd.pg.format'],
+ ['stw', 'application/vnd.sun.xml.writer.template'],
+ ['sub', 'image/vnd.dvb.subtitle'],
+ ['sus', 'application/vnd.sus-calendar'],
+ ['sv4cpio', 'application/x-sv4cpio'],
+ ['sv4crc', 'application/x-sv4crc'],
+ ['svc', 'application/vnd.dvb.service'],
+ ['svd', 'application/vnd.svd'],
+ ['svf', ['image/vnd.dwg', 'image/x-dwg']],
+ ['svg', 'image/svg+xml'],
+ ['svr', ['x-world/x-svr', 'application/x-world']],
+ ['swf', 'application/x-shockwave-flash'],
+ ['swi', 'application/vnd.aristanetworks.swi'],
+ ['sxc', 'application/vnd.sun.xml.calc'],
+ ['sxd', 'application/vnd.sun.xml.draw'],
+ ['sxg', 'application/vnd.sun.xml.writer.global'],
+ ['sxi', 'application/vnd.sun.xml.impress'],
+ ['sxm', 'application/vnd.sun.xml.math'],
+ ['sxw', 'application/vnd.sun.xml.writer'],
+ ['t', ['text/troff', 'application/x-troff']],
+ ['talk', 'text/x-speech'],
+ ['tao', 'application/vnd.tao.intent-module-archive'],
+ ['tar', 'application/x-tar'],
+ ['tbk', ['application/toolbook', 'application/x-tbook']],
+ ['tcap', 'application/vnd.3gpp2.tcap'],
+ ['tcl', ['text/x-script.tcl', 'application/x-tcl']],
+ ['tcsh', 'text/x-script.tcsh'],
+ ['teacher', 'application/vnd.smart.teacher'],
+ ['tei', 'application/tei+xml'],
+ ['tex', 'application/x-tex'],
+ ['texi', 'application/x-texinfo'],
+ ['texinfo', 'application/x-texinfo'],
+ ['text', ['application/plain', 'text/plain']],
+ ['tfi', 'application/thraud+xml'],
+ ['tfm', 'application/x-tex-tfm'],
+ ['tgz', ['application/gnutar', 'application/x-compressed']],
+ ['thmx', 'application/vnd.ms-officetheme'],
+ ['tif', ['image/tiff', 'image/x-tiff']],
+ ['tiff', ['image/tiff', 'image/x-tiff']],
+ ['tmo', 'application/vnd.tmobile-livetv'],
+ ['torrent', 'application/x-bittorrent'],
+ ['tpl', 'application/vnd.groove-tool-template'],
+ ['tpt', 'application/vnd.trid.tpt'],
+ ['tr', 'application/x-troff'],
+ ['tra', 'application/vnd.trueapp'],
+ ['trm', 'application/x-msterminal'],
+ ['tsd', 'application/timestamped-data'],
+ ['tsi', 'audio/tsp-audio'],
+ ['tsp', ['application/dsptype', 'audio/tsplayer']],
+ ['tsv', 'text/tab-separated-values'],
+ ['ttf', 'application/x-font-ttf'],
+ ['ttl', 'text/turtle'],
+ ['turbot', 'image/florian'],
+ ['twd', 'application/vnd.simtech-mindmapper'],
+ ['txd', 'application/vnd.genomatix.tuxedo'],
+ ['txf', 'application/vnd.mobius.txf'],
+ ['txt', 'text/plain'],
+ ['ufd', 'application/vnd.ufdl'],
+ ['uil', 'text/x-uil'],
+ ['uls', 'text/iuls'],
+ ['umj', 'application/vnd.umajin'],
+ ['uni', 'text/uri-list'],
+ ['unis', 'text/uri-list'],
+ ['unityweb', 'application/vnd.unity'],
+ ['unv', 'application/i-deas'],
+ ['uoml', 'application/vnd.uoml+xml'],
+ ['uri', 'text/uri-list'],
+ ['uris', 'text/uri-list'],
+ ['ustar', ['application/x-ustar', 'multipart/x-ustar']],
+ ['utz', 'application/vnd.uiq.theme'],
+ ['uu', ['application/octet-stream', 'text/x-uuencode']],
+ ['uue', 'text/x-uuencode'],
+ ['uva', 'audio/vnd.dece.audio'],
+ ['uvh', 'video/vnd.dece.hd'],
+ ['uvi', 'image/vnd.dece.graphic'],
+ ['uvm', 'video/vnd.dece.mobile'],
+ ['uvp', 'video/vnd.dece.pd'],
+ ['uvs', 'video/vnd.dece.sd'],
+ ['uvu', 'video/vnd.uvvu.mp4'],
+ ['uvv', 'video/vnd.dece.video'],
+ ['vcd', 'application/x-cdlink'],
+ ['vcf', 'text/x-vcard'],
+ ['vcg', 'application/vnd.groove-vcard'],
+ ['vcs', 'text/x-vcalendar'],
+ ['vcx', 'application/vnd.vcx'],
+ ['vda', 'application/vda'],
+ ['vdo', 'video/vdo'],
+ ['vew', 'application/groupwise'],
+ ['vis', 'application/vnd.visionary'],
+ ['viv', ['video/vivo', 'video/vnd.vivo']],
+ ['vivo', ['video/vivo', 'video/vnd.vivo']],
+ ['vmd', 'application/vocaltec-media-desc'],
+ ['vmf', 'application/vocaltec-media-file'],
+ ['voc', ['audio/voc', 'audio/x-voc']],
+ ['vos', 'video/vosaic'],
+ ['vox', 'audio/voxware'],
+ ['vqe', 'audio/x-twinvq-plugin'],
+ ['vqf', 'audio/x-twinvq'],
+ ['vql', 'audio/x-twinvq-plugin'],
+ ['vrml', ['model/vrml', 'x-world/x-vrml', 'application/x-vrml']],
+ ['vrt', 'x-world/x-vrt'],
+ ['vsd', ['application/vnd.visio', 'application/x-visio']],
+ ['vsf', 'application/vnd.vsf'],
+ ['vst', 'application/x-visio'],
+ ['vsw', 'application/x-visio'],
+ ['vtu', 'model/vnd.vtu'],
+ ['vxml', 'application/voicexml+xml'],
+ ['w60', 'application/wordperfect6.0'],
+ ['w61', 'application/wordperfect6.1'],
+ ['w6w', 'application/msword'],
+ ['wad', 'application/x-doom'],
+ ['wav', ['audio/wav', 'audio/x-wav']],
+ ['wax', 'audio/x-ms-wax'],
+ ['wb1', 'application/x-qpro'],
+ ['wbmp', 'image/vnd.wap.wbmp'],
+ ['wbs', 'application/vnd.criticaltools.wbs+xml'],
+ ['wbxml', 'application/vnd.wap.wbxml'],
+ ['wcm', 'application/vnd.ms-works'],
+ ['wdb', 'application/vnd.ms-works'],
+ ['web', 'application/vnd.xara'],
+ ['weba', 'audio/webm'],
+ ['webm', 'video/webm'],
+ ['webp', 'image/webp'],
+ ['wg', 'application/vnd.pmi.widget'],
+ ['wgt', 'application/widget'],
+ ['wiz', 'application/msword'],
+ ['wk1', 'application/x-123'],
+ ['wks', 'application/vnd.ms-works'],
+ ['wm', 'video/x-ms-wm'],
+ ['wma', 'audio/x-ms-wma'],
+ ['wmd', 'application/x-ms-wmd'],
+ ['wmf', ['windows/metafile', 'application/x-msmetafile']],
+ ['wml', 'text/vnd.wap.wml'],
+ ['wmlc', 'application/vnd.wap.wmlc'],
+ ['wmls', 'text/vnd.wap.wmlscript'],
+ ['wmlsc', 'application/vnd.wap.wmlscriptc'],
+ ['wmv', 'video/x-ms-wmv'],
+ ['wmx', 'video/x-ms-wmx'],
+ ['wmz', 'application/x-ms-wmz'],
+ ['woff', 'application/x-font-woff'],
+ ['word', 'application/msword'],
+ ['wp', 'application/wordperfect'],
+ ['wp5', ['application/wordperfect', 'application/wordperfect6.0']],
+ ['wp6', 'application/wordperfect'],
+ ['wpd', ['application/wordperfect', 'application/vnd.wordperfect', 'application/x-wpwin']],
+ ['wpl', 'application/vnd.ms-wpl'],
+ ['wps', 'application/vnd.ms-works'],
+ ['wq1', 'application/x-lotus'],
+ ['wqd', 'application/vnd.wqd'],
+ ['wri', ['application/mswrite', 'application/x-wri', 'application/x-mswrite']],
+ ['wrl', ['model/vrml', 'x-world/x-vrml', 'application/x-world']],
+ ['wrz', ['model/vrml', 'x-world/x-vrml']],
+ ['wsc', 'text/scriplet'],
+ ['wsdl', 'application/wsdl+xml'],
+ ['wspolicy', 'application/wspolicy+xml'],
+ ['wsrc', 'application/x-wais-source'],
+ ['wtb', 'application/vnd.webturbo'],
+ ['wtk', 'application/x-wintalk'],
+ ['wvx', 'video/x-ms-wvx'],
+ ['x-png', 'image/png'],
+ ['x3d', 'application/vnd.hzn-3d-crossword'],
+ ['xaf', 'x-world/x-vrml'],
+ ['xap', 'application/x-silverlight-app'],
+ ['xar', 'application/vnd.xara'],
+ ['xbap', 'application/x-ms-xbap'],
+ ['xbd', 'application/vnd.fujixerox.docuworks.binder'],
+ ['xbm', ['image/xbm', 'image/x-xbm', 'image/x-xbitmap']],
+ ['xdf', 'application/xcap-diff+xml'],
+ ['xdm', 'application/vnd.syncml.dm+xml'],
+ ['xdp', 'application/vnd.adobe.xdp+xml'],
+ ['xdr', 'video/x-amt-demorun'],
+ ['xdssc', 'application/dssc+xml'],
+ ['xdw', 'application/vnd.fujixerox.docuworks'],
+ ['xenc', 'application/xenc+xml'],
+ ['xer', 'application/patch-ops-error+xml'],
+ ['xfdf', 'application/vnd.adobe.xfdf'],
+ ['xfdl', 'application/vnd.xfdl'],
+ ['xgz', 'xgl/drawing'],
+ ['xhtml', 'application/xhtml+xml'],
+ ['xif', 'image/vnd.xiff'],
+ ['xl', 'application/excel'],
+ ['xla', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],
+ ['xlam', 'application/vnd.ms-excel.addin.macroenabled.12'],
+ ['xlb', ['application/excel', 'application/vnd.ms-excel', 'application/x-excel']],
+ ['xlc', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],
+ ['xld', ['application/excel', 'application/x-excel']],
+ ['xlk', ['application/excel', 'application/x-excel']],
+ ['xll', ['application/excel', 'application/vnd.ms-excel', 'application/x-excel']],
+ ['xlm', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],
+ ['xls', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],
+ ['xlsb', 'application/vnd.ms-excel.sheet.binary.macroenabled.12'],
+ ['xlsm', 'application/vnd.ms-excel.sheet.macroenabled.12'],
+ ['xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
+ ['xlt', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],
+ ['xltm', 'application/vnd.ms-excel.template.macroenabled.12'],
+ ['xltx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template'],
+ ['xlv', ['application/excel', 'application/x-excel']],
+ ['xlw', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],
+ ['xm', 'audio/xm'],
+ ['xml', ['application/xml', 'text/xml', 'application/atom+xml', 'application/rss+xml']],
+ ['xmz', 'xgl/movie'],
+ ['xo', 'application/vnd.olpc-sugar'],
+ ['xof', 'x-world/x-vrml'],
+ ['xop', 'application/xop+xml'],
+ ['xpi', 'application/x-xpinstall'],
+ ['xpix', 'application/x-vnd.ls-xpix'],
+ ['xpm', ['image/xpm', 'image/x-xpixmap']],
+ ['xpr', 'application/vnd.is-xpr'],
+ ['xps', 'application/vnd.ms-xpsdocument'],
+ ['xpw', 'application/vnd.intercon.formnet'],
+ ['xslt', 'application/xslt+xml'],
+ ['xsm', 'application/vnd.syncml+xml'],
+ ['xspf', 'application/xspf+xml'],
+ ['xsr', 'video/x-amt-showrun'],
+ ['xul', 'application/vnd.mozilla.xul+xml'],
+ ['xwd', ['image/x-xwd', 'image/x-xwindowdump']],
+ ['xyz', ['chemical/x-xyz', 'chemical/x-pdb']],
+ ['yang', 'application/yang'],
+ ['yin', 'application/yin+xml'],
+ ['z', ['application/x-compressed', 'application/x-compress']],
+ ['zaz', 'application/vnd.zzazz.deck+xml'],
+ ['zip', ['application/zip', 'multipart/x-zip', 'application/x-zip-compressed', 'application/x-compressed']],
+ ['zir', 'application/vnd.zul'],
+ ['zmm', 'application/vnd.handheld-entertainment+xml'],
+ ['zoo', 'application/octet-stream'],
+ ['zsh', 'text/x-script.zsh']
+]);
+
+module.exports = {
+ detectMimeType(filename) {
+ if (!filename) {
+ return defaultMimeType;
+ }
+
+ let parsed = path.parse(filename);
+ let extension = (parsed.ext.substr(1) || parsed.name || '').split('?').shift().trim().toLowerCase();
+ let value = defaultMimeType;
+
+ if (extensions.has(extension)) {
+ value = extensions.get(extension);
+ }
+
+ if (Array.isArray(value)) {
+ return value[0];
+ }
+ return value;
+ },
+
+ detectExtension(mimeType) {
+ if (!mimeType) {
+ return defaultExtension;
+ }
+ let parts = (mimeType || '').toLowerCase().trim().split('/');
+ let rootType = parts.shift().trim();
+ let subType = parts.join('/').trim();
+
+ if (mimeTypes.has(rootType + '/' + subType)) {
+ let value = mimeTypes.get(rootType + '/' + subType);
+ if (Array.isArray(value)) {
+ return value[0];
+ }
+ return value;
+ }
+
+ switch (rootType) {
+ case 'text':
+ return 'txt';
+ default:
+ return 'bin';
+ }
+ }
+};
+
+
+/***/ }),
+
+/***/ 8509:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+/* eslint no-undefined: 0, prefer-spread: 0, no-control-regex: 0 */
+
+
+
+const crypto = __nccwpck_require__(6113);
+const fs = __nccwpck_require__(7147);
+const punycode = __nccwpck_require__(4317);
+const PassThrough = (__nccwpck_require__(2781).PassThrough);
+const shared = __nccwpck_require__(2673);
+
+const mimeFuncs = __nccwpck_require__(994);
+const qp = __nccwpck_require__(9716);
+const base64 = __nccwpck_require__(4017);
+const addressparser = __nccwpck_require__(7382);
+const nmfetch = __nccwpck_require__(4446);
+const LastNewline = __nccwpck_require__(3368);
+
+const LeWindows = __nccwpck_require__(3304);
+const LeUnix = __nccwpck_require__(9827);
+
+/**
+ * Creates a new mime tree node. Assumes 'multipart/*' as the content type
+ * if it is a branch, anything else counts as leaf. If rootNode is missing from
+ * the options, assumes this is the root.
+ *
+ * @param {String} contentType Define the content type for the node. Can be left blank for attachments (derived from filename)
+ * @param {Object} [options] optional options
+ * @param {Object} [options.rootNode] root node for this tree
+ * @param {Object} [options.parentNode] immediate parent for this node
+ * @param {Object} [options.filename] filename for an attachment node
+ * @param {String} [options.baseBoundary] shared part of the unique multipart boundary
+ * @param {Boolean} [options.keepBcc] If true, do not exclude Bcc from the generated headers
+ * @param {Function} [options.normalizeHeaderKey] method to normalize header keys for custom caseing
+ * @param {String} [options.textEncoding] either 'Q' (the default) or 'B'
+ */
+class MimeNode {
+ constructor(contentType, options) {
+ this.nodeCounter = 0;
+
+ options = options || {};
+
+ /**
+ * shared part of the unique multipart boundary
+ */
+ this.baseBoundary = options.baseBoundary || crypto.randomBytes(8).toString('hex');
+ this.boundaryPrefix = options.boundaryPrefix || '--_NmP';
+
+ this.disableFileAccess = !!options.disableFileAccess;
+ this.disableUrlAccess = !!options.disableUrlAccess;
+
+ this.normalizeHeaderKey = options.normalizeHeaderKey;
+
+ /**
+ * If date headers is missing and current node is the root, this value is used instead
+ */
+ this.date = new Date();
+
+ /**
+ * Root node for current mime tree
+ */
+ this.rootNode = options.rootNode || this;
+
+ /**
+ * If true include Bcc in generated headers (if available)
+ */
+ this.keepBcc = !!options.keepBcc;
+
+ /**
+ * If filename is specified but contentType is not (probably an attachment)
+ * detect the content type from filename extension
+ */
+ if (options.filename) {
+ /**
+ * Filename for this node. Useful with attachments
+ */
+ this.filename = options.filename;
+ if (!contentType) {
+ contentType = mimeFuncs.detectMimeType(this.filename.split('.').pop());
+ }
+ }
+
+ /**
+ * Indicates which encoding should be used for header strings: "Q" or "B"
+ */
+ this.textEncoding = (options.textEncoding || '').toString().trim().charAt(0).toUpperCase();
+
+ /**
+ * Immediate parent for this node (or undefined if not set)
+ */
+ this.parentNode = options.parentNode;
+
+ /**
+ * Hostname for default message-id values
+ */
+ this.hostname = options.hostname;
+
+ /**
+ * If set to 'win' then uses \r\n, if 'linux' then \n. If not set (or `raw` is used) then newlines are kept as is.
+ */
+ this.newline = options.newline;
+
+ /**
+ * An array for possible child nodes
+ */
+ this.childNodes = [];
+
+ /**
+ * Used for generating unique boundaries (prepended to the shared base)
+ */
+ this._nodeId = ++this.rootNode.nodeCounter;
+
+ /**
+ * A list of header values for this node in the form of [{key:'', value:''}]
+ */
+ this._headers = [];
+
+ /**
+ * True if the content only uses ASCII printable characters
+ * @type {Boolean}
+ */
+ this._isPlainText = false;
+
+ /**
+ * True if the content is plain text but has longer lines than allowed
+ * @type {Boolean}
+ */
+ this._hasLongLines = false;
+
+ /**
+ * If set, use instead this value for envelopes instead of generating one
+ * @type {Boolean}
+ */
+ this._envelope = false;
+
+ /**
+ * If set then use this value as the stream content instead of building it
+ * @type {String|Buffer|Stream}
+ */
+ this._raw = false;
+
+ /**
+ * Additional transform streams that the message will be piped before
+ * exposing by createReadStream
+ * @type {Array}
+ */
+ this._transforms = [];
+
+ /**
+ * Additional process functions that the message will be piped through before
+ * exposing by createReadStream. These functions are run after transforms
+ * @type {Array}
+ */
+ this._processFuncs = [];
+
+ /**
+ * If content type is set (or derived from the filename) add it to headers
+ */
+ if (contentType) {
+ this.setHeader('Content-Type', contentType);
+ }
+ }
+
+ /////// PUBLIC METHODS
+
+ /**
+ * Creates and appends a child node.Arguments provided are passed to MimeNode constructor
+ *
+ * @param {String} [contentType] Optional content type
+ * @param {Object} [options] Optional options object
+ * @return {Object} Created node object
+ */
+ createChild(contentType, options) {
+ if (!options && typeof contentType === 'object') {
+ options = contentType;
+ contentType = undefined;
+ }
+ let node = new MimeNode(contentType, options);
+ this.appendChild(node);
+ return node;
+ }
+
+ /**
+ * Appends an existing node to the mime tree. Removes the node from an existing
+ * tree if needed
+ *
+ * @param {Object} childNode node to be appended
+ * @return {Object} Appended node object
+ */
+ appendChild(childNode) {
+ if (childNode.rootNode !== this.rootNode) {
+ childNode.rootNode = this.rootNode;
+ childNode._nodeId = ++this.rootNode.nodeCounter;
+ }
+
+ childNode.parentNode = this;
+
+ this.childNodes.push(childNode);
+ return childNode;
+ }
+
+ /**
+ * Replaces current node with another node
+ *
+ * @param {Object} node Replacement node
+ * @return {Object} Replacement node
+ */
+ replace(node) {
+ if (node === this) {
+ return this;
+ }
+
+ this.parentNode.childNodes.forEach((childNode, i) => {
+ if (childNode === this) {
+ node.rootNode = this.rootNode;
+ node.parentNode = this.parentNode;
+ node._nodeId = this._nodeId;
+
+ this.rootNode = this;
+ this.parentNode = undefined;
+
+ node.parentNode.childNodes[i] = node;
+ }
+ });
+
+ return node;
+ }
+
+ /**
+ * Removes current node from the mime tree
+ *
+ * @return {Object} removed node
+ */
+ remove() {
+ if (!this.parentNode) {
+ return this;
+ }
+
+ for (let i = this.parentNode.childNodes.length - 1; i >= 0; i--) {
+ if (this.parentNode.childNodes[i] === this) {
+ this.parentNode.childNodes.splice(i, 1);
+ this.parentNode = undefined;
+ this.rootNode = this;
+ return this;
+ }
+ }
+ }
+
+ /**
+ * Sets a header value. If the value for selected key exists, it is overwritten.
+ * You can set multiple values as well by using [{key:'', value:''}] or
+ * {key: 'value'} as the first argument.
+ *
+ * @param {String|Array|Object} key Header key or a list of key value pairs
+ * @param {String} value Header value
+ * @return {Object} current node
+ */
+ setHeader(key, value) {
+ let added = false,
+ headerValue;
+
+ // Allow setting multiple headers at once
+ if (!value && key && typeof key === 'object') {
+ // allow {key:'content-type', value: 'text/plain'}
+ if (key.key && 'value' in key) {
+ this.setHeader(key.key, key.value);
+ } else if (Array.isArray(key)) {
+ // allow [{key:'content-type', value: 'text/plain'}]
+ key.forEach(i => {
+ this.setHeader(i.key, i.value);
+ });
+ } else {
+ // allow {'content-type': 'text/plain'}
+ Object.keys(key).forEach(i => {
+ this.setHeader(i, key[i]);
+ });
+ }
+ return this;
+ }
+
+ key = this._normalizeHeaderKey(key);
+
+ headerValue = {
+ key,
+ value
+ };
+
+ // Check if the value exists and overwrite
+ for (let i = 0, len = this._headers.length; i < len; i++) {
+ if (this._headers[i].key === key) {
+ if (!added) {
+ // replace the first match
+ this._headers[i] = headerValue;
+ added = true;
+ } else {
+ // remove following matches
+ this._headers.splice(i, 1);
+ i--;
+ len--;
+ }
+ }
+ }
+
+ // match not found, append the value
+ if (!added) {
+ this._headers.push(headerValue);
+ }
+
+ return this;
+ }
+
+ /**
+ * Adds a header value. If the value for selected key exists, the value is appended
+ * as a new field and old one is not touched.
+ * You can set multiple values as well by using [{key:'', value:''}] or
+ * {key: 'value'} as the first argument.
+ *
+ * @param {String|Array|Object} key Header key or a list of key value pairs
+ * @param {String} value Header value
+ * @return {Object} current node
+ */
+ addHeader(key, value) {
+ // Allow setting multiple headers at once
+ if (!value && key && typeof key === 'object') {
+ // allow {key:'content-type', value: 'text/plain'}
+ if (key.key && key.value) {
+ this.addHeader(key.key, key.value);
+ } else if (Array.isArray(key)) {
+ // allow [{key:'content-type', value: 'text/plain'}]
+ key.forEach(i => {
+ this.addHeader(i.key, i.value);
+ });
+ } else {
+ // allow {'content-type': 'text/plain'}
+ Object.keys(key).forEach(i => {
+ this.addHeader(i, key[i]);
+ });
+ }
+ return this;
+ } else if (Array.isArray(value)) {
+ value.forEach(val => {
+ this.addHeader(key, val);
+ });
+ return this;
+ }
+
+ this._headers.push({
+ key: this._normalizeHeaderKey(key),
+ value
+ });
+
+ return this;
+ }
+
+ /**
+ * Retrieves the first mathcing value of a selected key
+ *
+ * @param {String} key Key to search for
+ * @retun {String} Value for the key
+ */
+ getHeader(key) {
+ key = this._normalizeHeaderKey(key);
+ for (let i = 0, len = this._headers.length; i < len; i++) {
+ if (this._headers[i].key === key) {
+ return this._headers[i].value;
+ }
+ }
+ }
+
+ /**
+ * Sets body content for current node. If the value is a string, charset is added automatically
+ * to Content-Type (if it is text/*). If the value is a Buffer, you need to specify
+ * the charset yourself
+ *
+ * @param (String|Buffer) content Body content
+ * @return {Object} current node
+ */
+ setContent(content) {
+ this.content = content;
+ if (typeof this.content.pipe === 'function') {
+ // pre-stream handler. might be triggered if a stream is set as content
+ // and 'error' fires before anything is done with this stream
+ this._contentErrorHandler = err => {
+ this.content.removeListener('error', this._contentErrorHandler);
+ this.content = err;
+ };
+ this.content.once('error', this._contentErrorHandler);
+ } else if (typeof this.content === 'string') {
+ this._isPlainText = mimeFuncs.isPlainText(this.content);
+ if (this._isPlainText && mimeFuncs.hasLongerLines(this.content, 76)) {
+ // If there are lines longer than 76 symbols/bytes do not use 7bit
+ this._hasLongLines = true;
+ }
+ }
+ return this;
+ }
+
+ build(callback) {
+ let promise;
+
+ if (!callback) {
+ promise = new Promise((resolve, reject) => {
+ callback = shared.callbackPromise(resolve, reject);
+ });
+ }
+
+ let stream = this.createReadStream();
+ let buf = [];
+ let buflen = 0;
+ let returned = false;
+
+ stream.on('readable', () => {
+ let chunk;
+
+ while ((chunk = stream.read()) !== null) {
+ buf.push(chunk);
+ buflen += chunk.length;
+ }
+ });
+
+ stream.once('error', err => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+
+ return callback(err);
+ });
+
+ stream.once('end', chunk => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+
+ if (chunk && chunk.length) {
+ buf.push(chunk);
+ buflen += chunk.length;
+ }
+ return callback(null, Buffer.concat(buf, buflen));
+ });
+
+ return promise;
+ }
+
+ getTransferEncoding() {
+ let transferEncoding = false;
+ let contentType = (this.getHeader('Content-Type') || '').toString().toLowerCase().trim();
+
+ if (this.content) {
+ transferEncoding = (this.getHeader('Content-Transfer-Encoding') || '').toString().toLowerCase().trim();
+ if (!transferEncoding || !['base64', 'quoted-printable'].includes(transferEncoding)) {
+ if (/^text\//i.test(contentType)) {
+ // If there are no special symbols, no need to modify the text
+ if (this._isPlainText && !this._hasLongLines) {
+ transferEncoding = '7bit';
+ } else if (typeof this.content === 'string' || this.content instanceof Buffer) {
+ // detect preferred encoding for string value
+ transferEncoding = this._getTextEncoding(this.content) === 'Q' ? 'quoted-printable' : 'base64';
+ } else {
+ // we can not check content for a stream, so either use preferred encoding or fallback to QP
+ transferEncoding = this.textEncoding === 'B' ? 'base64' : 'quoted-printable';
+ }
+ } else if (!/^(multipart|message)\//i.test(contentType)) {
+ transferEncoding = transferEncoding || 'base64';
+ }
+ }
+ }
+ return transferEncoding;
+ }
+
+ /**
+ * Builds the header block for the mime node. Append \r\n\r\n before writing the content
+ *
+ * @returns {String} Headers
+ */
+ buildHeaders() {
+ let transferEncoding = this.getTransferEncoding();
+ let headers = [];
+
+ if (transferEncoding) {
+ this.setHeader('Content-Transfer-Encoding', transferEncoding);
+ }
+
+ if (this.filename && !this.getHeader('Content-Disposition')) {
+ this.setHeader('Content-Disposition', 'attachment');
+ }
+
+ // Ensure mandatory header fields
+ if (this.rootNode === this) {
+ if (!this.getHeader('Date')) {
+ this.setHeader('Date', this.date.toUTCString().replace(/GMT/, '+0000'));
+ }
+
+ // ensure that Message-Id is present
+ this.messageId();
+
+ if (!this.getHeader('MIME-Version')) {
+ this.setHeader('MIME-Version', '1.0');
+ }
+
+ // Ensure that Content-Type is the last header for the root node
+ for (let i = this._headers.length - 2; i >= 0; i--) {
+ let header = this._headers[i];
+ if (header.key === 'Content-Type') {
+ this._headers.splice(i, 1);
+ this._headers.push(header);
+ }
+ }
+ }
+
+ this._headers.forEach(header => {
+ let key = header.key;
+ let value = header.value;
+ let structured;
+ let param;
+ let options = {};
+ let formattedHeaders = ['From', 'Sender', 'To', 'Cc', 'Bcc', 'Reply-To', 'Date', 'References'];
+
+ if (value && typeof value === 'object' && !formattedHeaders.includes(key)) {
+ Object.keys(value).forEach(key => {
+ if (key !== 'value') {
+ options[key] = value[key];
+ }
+ });
+ value = (value.value || '').toString();
+ if (!value.trim()) {
+ return;
+ }
+ }
+
+ if (options.prepared) {
+ // header value is
+ if (options.foldLines) {
+ headers.push(mimeFuncs.foldLines(key + ': ' + value));
+ } else {
+ headers.push(key + ': ' + value);
+ }
+ return;
+ }
+
+ switch (header.key) {
+ case 'Content-Disposition':
+ structured = mimeFuncs.parseHeaderValue(value);
+ if (this.filename) {
+ structured.params.filename = this.filename;
+ }
+ value = mimeFuncs.buildHeaderValue(structured);
+ break;
+
+ case 'Content-Type':
+ structured = mimeFuncs.parseHeaderValue(value);
+
+ this._handleContentType(structured);
+
+ if (structured.value.match(/^text\/plain\b/) && typeof this.content === 'string' && /[\u0080-\uFFFF]/.test(this.content)) {
+ structured.params.charset = 'utf-8';
+ }
+
+ value = mimeFuncs.buildHeaderValue(structured);
+
+ if (this.filename) {
+ // add support for non-compliant clients like QQ webmail
+ // we can't build the value with buildHeaderValue as the value is non standard and
+ // would be converted to parameter continuation encoding that we do not want
+ param = this._encodeWords(this.filename);
+
+ if (param !== this.filename || /[\s'"\\;:/=(),<>@[\]?]|^-/.test(param)) {
+ // include value in quotes if needed
+ param = '"' + param + '"';
+ }
+ value += '; name=' + param;
+ }
+ break;
+
+ case 'Bcc':
+ if (!this.keepBcc) {
+ // skip BCC values
+ return;
+ }
+ break;
+ }
+
+ value = this._encodeHeaderValue(key, value);
+
+ // skip empty lines
+ if (!(value || '').toString().trim()) {
+ return;
+ }
+
+ if (typeof this.normalizeHeaderKey === 'function') {
+ let normalized = this.normalizeHeaderKey(key, value);
+ if (normalized && typeof normalized === 'string' && normalized.length) {
+ key = normalized;
+ }
+ }
+
+ headers.push(mimeFuncs.foldLines(key + ': ' + value, 76));
+ });
+
+ return headers.join('\r\n');
+ }
+
+ /**
+ * Streams the rfc2822 message from the current node. If this is a root node,
+ * mandatory header fields are set if missing (Date, Message-Id, MIME-Version)
+ *
+ * @return {String} Compiled message
+ */
+ createReadStream(options) {
+ options = options || {};
+
+ let stream = new PassThrough(options);
+ let outputStream = stream;
+ let transform;
+
+ this.stream(stream, options, err => {
+ if (err) {
+ outputStream.emit('error', err);
+ return;
+ }
+ stream.end();
+ });
+
+ for (let i = 0, len = this._transforms.length; i < len; i++) {
+ transform = typeof this._transforms[i] === 'function' ? this._transforms[i]() : this._transforms[i];
+ outputStream.once('error', err => {
+ transform.emit('error', err);
+ });
+ outputStream = outputStream.pipe(transform);
+ }
+
+ // ensure terminating newline after possible user transforms
+ transform = new LastNewline();
+ outputStream.once('error', err => {
+ transform.emit('error', err);
+ });
+ outputStream = outputStream.pipe(transform);
+
+ // dkim and stuff
+ for (let i = 0, len = this._processFuncs.length; i < len; i++) {
+ transform = this._processFuncs[i];
+ outputStream = transform(outputStream);
+ }
+
+ if (this.newline) {
+ const winbreak = ['win', 'windows', 'dos', '\r\n'].includes(this.newline.toString().toLowerCase());
+ const newlineTransform = winbreak ? new LeWindows() : new LeUnix();
+
+ const stream = outputStream.pipe(newlineTransform);
+ outputStream.on('error', err => stream.emit('error', err));
+ return stream;
+ }
+
+ return outputStream;
+ }
+
+ /**
+ * Appends a transform stream object to the transforms list. Final output
+ * is passed through this stream before exposing
+ *
+ * @param {Object} transform Read-Write stream
+ */
+ transform(transform) {
+ this._transforms.push(transform);
+ }
+
+ /**
+ * Appends a post process function. The functon is run after transforms and
+ * uses the following syntax
+ *
+ * processFunc(input) -> outputStream
+ *
+ * @param {Object} processFunc Read-Write stream
+ */
+ processFunc(processFunc) {
+ this._processFuncs.push(processFunc);
+ }
+
+ stream(outputStream, options, done) {
+ let transferEncoding = this.getTransferEncoding();
+ let contentStream;
+ let localStream;
+
+ // protect actual callback against multiple triggering
+ let returned = false;
+ let callback = err => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ done(err);
+ };
+
+ // for multipart nodes, push child nodes
+ // for content nodes end the stream
+ let finalize = () => {
+ let childId = 0;
+ let processChildNode = () => {
+ if (childId >= this.childNodes.length) {
+ outputStream.write('\r\n--' + this.boundary + '--\r\n');
+ return callback();
+ }
+ let child = this.childNodes[childId++];
+ outputStream.write((childId > 1 ? '\r\n' : '') + '--' + this.boundary + '\r\n');
+ child.stream(outputStream, options, err => {
+ if (err) {
+ return callback(err);
+ }
+ setImmediate(processChildNode);
+ });
+ };
+
+ if (this.multipart) {
+ setImmediate(processChildNode);
+ } else {
+ return callback();
+ }
+ };
+
+ // pushes node content
+ let sendContent = () => {
+ if (this.content) {
+ if (Object.prototype.toString.call(this.content) === '[object Error]') {
+ // content is already errored
+ return callback(this.content);
+ }
+
+ if (typeof this.content.pipe === 'function') {
+ this.content.removeListener('error', this._contentErrorHandler);
+ this._contentErrorHandler = err => callback(err);
+ this.content.once('error', this._contentErrorHandler);
+ }
+
+ let createStream = () => {
+ if (['quoted-printable', 'base64'].includes(transferEncoding)) {
+ contentStream = new (transferEncoding === 'base64' ? base64 : qp).Encoder(options);
+
+ contentStream.pipe(outputStream, {
+ end: false
+ });
+ contentStream.once('end', finalize);
+ contentStream.once('error', err => callback(err));
+
+ localStream = this._getStream(this.content);
+ localStream.pipe(contentStream);
+ } else {
+ // anything that is not QP or Base54 passes as-is
+ localStream = this._getStream(this.content);
+ localStream.pipe(outputStream, {
+ end: false
+ });
+ localStream.once('end', finalize);
+ }
+
+ localStream.once('error', err => callback(err));
+ };
+
+ if (this.content._resolve) {
+ let chunks = [];
+ let chunklen = 0;
+ let returned = false;
+ let sourceStream = this._getStream(this.content);
+ sourceStream.on('error', err => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ callback(err);
+ });
+ sourceStream.on('readable', () => {
+ let chunk;
+ while ((chunk = sourceStream.read()) !== null) {
+ chunks.push(chunk);
+ chunklen += chunk.length;
+ }
+ });
+ sourceStream.on('end', () => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ this.content._resolve = false;
+ this.content._resolvedValue = Buffer.concat(chunks, chunklen);
+ setImmediate(createStream);
+ });
+ } else {
+ setImmediate(createStream);
+ }
+ return;
+ } else {
+ return setImmediate(finalize);
+ }
+ };
+
+ if (this._raw) {
+ setImmediate(() => {
+ if (Object.prototype.toString.call(this._raw) === '[object Error]') {
+ // content is already errored
+ return callback(this._raw);
+ }
+
+ // remove default error handler (if set)
+ if (typeof this._raw.pipe === 'function') {
+ this._raw.removeListener('error', this._contentErrorHandler);
+ }
+
+ let raw = this._getStream(this._raw);
+ raw.pipe(outputStream, {
+ end: false
+ });
+ raw.on('error', err => outputStream.emit('error', err));
+ raw.on('end', finalize);
+ });
+ } else {
+ outputStream.write(this.buildHeaders() + '\r\n\r\n');
+ setImmediate(sendContent);
+ }
+ }
+
+ /**
+ * Sets envelope to be used instead of the generated one
+ *
+ * @return {Object} SMTP envelope in the form of {from: 'from@example.com', to: ['to@example.com']}
+ */
+ setEnvelope(envelope) {
+ let list;
+
+ this._envelope = {
+ from: false,
+ to: []
+ };
+
+ if (envelope.from) {
+ list = [];
+ this._convertAddresses(this._parseAddresses(envelope.from), list);
+ list = list.filter(address => address && address.address);
+ if (list.length && list[0]) {
+ this._envelope.from = list[0].address;
+ }
+ }
+ ['to', 'cc', 'bcc'].forEach(key => {
+ if (envelope[key]) {
+ this._convertAddresses(this._parseAddresses(envelope[key]), this._envelope.to);
+ }
+ });
+
+ this._envelope.to = this._envelope.to.map(to => to.address).filter(address => address);
+
+ let standardFields = ['to', 'cc', 'bcc', 'from'];
+ Object.keys(envelope).forEach(key => {
+ if (!standardFields.includes(key)) {
+ this._envelope[key] = envelope[key];
+ }
+ });
+
+ return this;
+ }
+
+ /**
+ * Generates and returns an object with parsed address fields
+ *
+ * @return {Object} Address object
+ */
+ getAddresses() {
+ let addresses = {};
+
+ this._headers.forEach(header => {
+ let key = header.key.toLowerCase();
+ if (['from', 'sender', 'reply-to', 'to', 'cc', 'bcc'].includes(key)) {
+ if (!Array.isArray(addresses[key])) {
+ addresses[key] = [];
+ }
+
+ this._convertAddresses(this._parseAddresses(header.value), addresses[key]);
+ }
+ });
+
+ return addresses;
+ }
+
+ /**
+ * Generates and returns SMTP envelope with the sender address and a list of recipients addresses
+ *
+ * @return {Object} SMTP envelope in the form of {from: 'from@example.com', to: ['to@example.com']}
+ */
+ getEnvelope() {
+ if (this._envelope) {
+ return this._envelope;
+ }
+
+ let envelope = {
+ from: false,
+ to: []
+ };
+ this._headers.forEach(header => {
+ let list = [];
+ if (header.key === 'From' || (!envelope.from && ['Reply-To', 'Sender'].includes(header.key))) {
+ this._convertAddresses(this._parseAddresses(header.value), list);
+ if (list.length && list[0]) {
+ envelope.from = list[0].address;
+ }
+ } else if (['To', 'Cc', 'Bcc'].includes(header.key)) {
+ this._convertAddresses(this._parseAddresses(header.value), envelope.to);
+ }
+ });
+
+ envelope.to = envelope.to.map(to => to.address);
+
+ return envelope;
+ }
+
+ /**
+ * Returns Message-Id value. If it does not exist, then creates one
+ *
+ * @return {String} Message-Id value
+ */
+ messageId() {
+ let messageId = this.getHeader('Message-ID');
+ // You really should define your own Message-Id field!
+ if (!messageId) {
+ messageId = this._generateMessageId();
+ this.setHeader('Message-ID', messageId);
+ }
+ return messageId;
+ }
+
+ /**
+ * Sets pregenerated content that will be used as the output of this node
+ *
+ * @param {String|Buffer|Stream} Raw MIME contents
+ */
+ setRaw(raw) {
+ this._raw = raw;
+
+ if (this._raw && typeof this._raw.pipe === 'function') {
+ // pre-stream handler. might be triggered if a stream is set as content
+ // and 'error' fires before anything is done with this stream
+ this._contentErrorHandler = err => {
+ this._raw.removeListener('error', this._contentErrorHandler);
+ this._raw = err;
+ };
+ this._raw.once('error', this._contentErrorHandler);
+ }
+
+ return this;
+ }
+
+ /////// PRIVATE METHODS
+
+ /**
+ * Detects and returns handle to a stream related with the content.
+ *
+ * @param {Mixed} content Node content
+ * @returns {Object} Stream object
+ */
+ _getStream(content) {
+ let contentStream;
+
+ if (content._resolvedValue) {
+ // pass string or buffer content as a stream
+ contentStream = new PassThrough();
+
+ setImmediate(() => {
+ try {
+ contentStream.end(content._resolvedValue);
+ } catch (err) {
+ contentStream.emit('error', err);
+ }
+ });
+
+ return contentStream;
+ } else if (typeof content.pipe === 'function') {
+ // assume as stream
+ return content;
+ } else if (content && typeof content.path === 'string' && !content.href) {
+ if (this.disableFileAccess) {
+ contentStream = new PassThrough();
+ setImmediate(() => contentStream.emit('error', new Error('File access rejected for ' + content.path)));
+ return contentStream;
+ }
+ // read file
+ return fs.createReadStream(content.path);
+ } else if (content && typeof content.href === 'string') {
+ if (this.disableUrlAccess) {
+ contentStream = new PassThrough();
+ setImmediate(() => contentStream.emit('error', new Error('Url access rejected for ' + content.href)));
+ return contentStream;
+ }
+ // fetch URL
+ return nmfetch(content.href, { headers: content.httpHeaders });
+ } else {
+ // pass string or buffer content as a stream
+ contentStream = new PassThrough();
+
+ setImmediate(() => {
+ try {
+ contentStream.end(content || '');
+ } catch (err) {
+ contentStream.emit('error', err);
+ }
+ });
+ return contentStream;
+ }
+ }
+
+ /**
+ * Parses addresses. Takes in a single address or an array or an
+ * array of address arrays (eg. To: [[first group], [second group],...])
+ *
+ * @param {Mixed} addresses Addresses to be parsed
+ * @return {Array} An array of address objects
+ */
+ _parseAddresses(addresses) {
+ return [].concat.apply(
+ [],
+ [].concat(addresses).map(address => {
+ // eslint-disable-line prefer-spread
+ if (address && address.address) {
+ address.address = this._normalizeAddress(address.address);
+ address.name = address.name || '';
+ return [address];
+ }
+ return addressparser(address);
+ })
+ );
+ }
+
+ /**
+ * Normalizes a header key, uses Camel-Case form, except for uppercase MIME-
+ *
+ * @param {String} key Key to be normalized
+ * @return {String} key in Camel-Case form
+ */
+ _normalizeHeaderKey(key) {
+ key = (key || '')
+ .toString()
+ // no newlines in keys
+ .replace(/\r?\n|\r/g, ' ')
+ .trim()
+ .toLowerCase()
+ // use uppercase words, except MIME
+ .replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi, c => c.toUpperCase())
+ // special case
+ .replace(/^Content-Features$/i, 'Content-features');
+
+ return key;
+ }
+
+ /**
+ * Checks if the content type is multipart and defines boundary if needed.
+ * Doesn't return anything, modifies object argument instead.
+ *
+ * @param {Object} structured Parsed header value for 'Content-Type' key
+ */
+ _handleContentType(structured) {
+ this.contentType = structured.value.trim().toLowerCase();
+
+ this.multipart = /^multipart\//i.test(this.contentType) ? this.contentType.substr(this.contentType.indexOf('/') + 1) : false;
+
+ if (this.multipart) {
+ this.boundary = structured.params.boundary = structured.params.boundary || this.boundary || this._generateBoundary();
+ } else {
+ this.boundary = false;
+ }
+ }
+
+ /**
+ * Generates a multipart boundary value
+ *
+ * @return {String} boundary value
+ */
+ _generateBoundary() {
+ return this.rootNode.boundaryPrefix + '-' + this.rootNode.baseBoundary + '-Part_' + this._nodeId;
+ }
+
+ /**
+ * Encodes a header value for use in the generated rfc2822 email.
+ *
+ * @param {String} key Header key
+ * @param {String} value Header value
+ */
+ _encodeHeaderValue(key, value) {
+ key = this._normalizeHeaderKey(key);
+
+ switch (key) {
+ // Structured headers
+ case 'From':
+ case 'Sender':
+ case 'To':
+ case 'Cc':
+ case 'Bcc':
+ case 'Reply-To':
+ return this._convertAddresses(this._parseAddresses(value));
+
+ // values enclosed in <>
+ case 'Message-ID':
+ case 'In-Reply-To':
+ case 'Content-Id':
+ value = (value || '').toString().replace(/\r?\n|\r/g, ' ');
+
+ if (value.charAt(0) !== '<') {
+ value = '<' + value;
+ }
+
+ if (value.charAt(value.length - 1) !== '>') {
+ value = value + '>';
+ }
+ return value;
+
+ // space separated list of values enclosed in <>
+ case 'References':
+ value = [].concat
+ .apply(
+ [],
+ [].concat(value || '').map(elm => {
+ // eslint-disable-line prefer-spread
+ elm = (elm || '')
+ .toString()
+ .replace(/\r?\n|\r/g, ' ')
+ .trim();
+ return elm.replace(/<[^>]*>/g, str => str.replace(/\s/g, '')).split(/\s+/);
+ })
+ )
+ .map(elm => {
+ if (elm.charAt(0) !== '<') {
+ elm = '<' + elm;
+ }
+ if (elm.charAt(elm.length - 1) !== '>') {
+ elm = elm + '>';
+ }
+ return elm;
+ });
+
+ return value.join(' ').trim();
+
+ case 'Date':
+ if (Object.prototype.toString.call(value) === '[object Date]') {
+ return value.toUTCString().replace(/GMT/, '+0000');
+ }
+
+ value = (value || '').toString().replace(/\r?\n|\r/g, ' ');
+ return this._encodeWords(value);
+
+ case 'Content-Type':
+ case 'Content-Disposition':
+ // if it includes a filename then it is already encoded
+ return (value || '').toString().replace(/\r?\n|\r/g, ' ');
+
+ default:
+ value = (value || '').toString().replace(/\r?\n|\r/g, ' ');
+ // encodeWords only encodes if needed, otherwise the original string is returned
+ return this._encodeWords(value);
+ }
+ }
+
+ /**
+ * Rebuilds address object using punycode and other adjustments
+ *
+ * @param {Array} addresses An array of address objects
+ * @param {Array} [uniqueList] An array to be populated with addresses
+ * @return {String} address string
+ */
+ _convertAddresses(addresses, uniqueList) {
+ let values = [];
+
+ uniqueList = uniqueList || [];
+
+ [].concat(addresses || []).forEach(address => {
+ if (address.address) {
+ address.address = this._normalizeAddress(address.address);
+
+ if (!address.name) {
+ values.push(address.address.indexOf(' ') >= 0 ? `<${address.address}>` : `${address.address}`);
+ } else if (address.name) {
+ values.push(`${this._encodeAddressName(address.name)} <${address.address}>`);
+ }
+
+ if (address.address) {
+ if (!uniqueList.filter(a => a.address === address.address).length) {
+ uniqueList.push(address);
+ }
+ }
+ } else if (address.group) {
+ let groupListAddresses = (address.group.length ? this._convertAddresses(address.group, uniqueList) : '').trim();
+ values.push(`${this._encodeAddressName(address.name)}:${groupListAddresses};`);
+ }
+ });
+
+ return values.join(', ');
+ }
+
+ /**
+ * Normalizes an email address
+ *
+ * @param {Array} address An array of address objects
+ * @return {String} address string
+ */
+ _normalizeAddress(address) {
+ address = (address || '')
+ .toString()
+ .replace(/[\x00-\x1F<>]+/g, ' ') // remove unallowed characters
+ .trim();
+
+ let lastAt = address.lastIndexOf('@');
+ if (lastAt < 0) {
+ // Bare username
+ return address;
+ }
+
+ let user = address.substr(0, lastAt);
+ let domain = address.substr(lastAt + 1);
+
+ // Usernames are not touched and are kept as is even if these include unicode
+ // Domains are punycoded by default
+ // 'jõgeva.ee' will be converted to 'xn--jgeva-dua.ee'
+ // non-unicode domains are left as is
+
+ let encodedDomain;
+
+ try {
+ encodedDomain = punycode.toASCII(domain.toLowerCase());
+ } catch (err) {
+ // keep as is?
+ }
+
+ if (user.indexOf(' ') >= 0) {
+ if (user.charAt(0) !== '"') {
+ user = '"' + user;
+ }
+ if (user.substr(-1) !== '"') {
+ user = user + '"';
+ }
+ }
+
+ return `${user}@${encodedDomain}`;
+ }
+
+ /**
+ * If needed, mime encodes the name part
+ *
+ * @param {String} name Name part of an address
+ * @returns {String} Mime word encoded string if needed
+ */
+ _encodeAddressName(name) {
+ if (!/^[\w ]*$/.test(name)) {
+ if (/^[\x20-\x7e]*$/.test(name)) {
+ return '"' + name.replace(/([\\"])/g, '\\$1') + '"';
+ } else {
+ return mimeFuncs.encodeWord(name, this._getTextEncoding(name), 52);
+ }
+ }
+ return name;
+ }
+
+ /**
+ * If needed, mime encodes the name part
+ *
+ * @param {String} name Name part of an address
+ * @returns {String} Mime word encoded string if needed
+ */
+ _encodeWords(value) {
+ // set encodeAll parameter to true even though it is against the recommendation of RFC2047,
+ // by default only words that include non-ascii should be converted into encoded words
+ // but some clients (eg. Zimbra) do not handle it properly and remove surrounding whitespace
+ return mimeFuncs.encodeWords(value, this._getTextEncoding(value), 52, true);
+ }
+
+ /**
+ * Detects best mime encoding for a text value
+ *
+ * @param {String} value Value to check for
+ * @return {String} either 'Q' or 'B'
+ */
+ _getTextEncoding(value) {
+ value = (value || '').toString();
+
+ let encoding = this.textEncoding;
+ let latinLen;
+ let nonLatinLen;
+
+ if (!encoding) {
+ // count latin alphabet symbols and 8-bit range symbols + control symbols
+ // if there are more latin characters, then use quoted-printable
+ // encoding, otherwise use base64
+ nonLatinLen = (value.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\u0080-\uFFFF]/g) || []).length; // eslint-disable-line no-control-regex
+ latinLen = (value.match(/[a-z]/gi) || []).length;
+ // if there are more latin symbols than binary/unicode, then prefer Q, otherwise B
+ encoding = nonLatinLen < latinLen ? 'Q' : 'B';
+ }
+ return encoding;
+ }
+
+ /**
+ * Generates a message id
+ *
+ * @return {String} Random Message-ID value
+ */
+ _generateMessageId() {
+ return (
+ '<' +
+ [2, 2, 2, 6].reduce(
+ // crux to generate UUID-like random strings
+ (prev, len) => prev + '-' + crypto.randomBytes(len).toString('hex'),
+ crypto.randomBytes(4).toString('hex')
+ ) +
+ '@' +
+ // try to use the domain of the FROM address or fallback to server hostname
+ (this.getEnvelope().from || this.hostname || 'localhost').split('@').pop() +
+ '>'
+ );
+ }
+}
+
+module.exports = MimeNode;
+
+
+/***/ }),
+
+/***/ 3368:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const Transform = (__nccwpck_require__(2781).Transform);
+
+class LastNewline extends Transform {
+ constructor() {
+ super();
+ this.lastByte = false;
+ }
+
+ _transform(chunk, encoding, done) {
+ if (chunk.length) {
+ this.lastByte = chunk[chunk.length - 1];
+ }
+
+ this.push(chunk);
+ done();
+ }
+
+ _flush(done) {
+ if (this.lastByte === 0x0a) {
+ return done();
+ }
+ if (this.lastByte === 0x0d) {
+ this.push(Buffer.from('\n'));
+ return done();
+ }
+ this.push(Buffer.from('\r\n'));
+ return done();
+ }
+}
+
+module.exports = LastNewline;
+
+
+/***/ }),
+
+/***/ 9827:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const stream = __nccwpck_require__(2781);
+const Transform = stream.Transform;
+
+/**
+ * Ensures that only is used for linebreaks
+ *
+ * @param {Object} options Stream options
+ */
+class LeWindows extends Transform {
+ constructor(options) {
+ super(options);
+ // init Transform
+ this.options = options || {};
+ }
+
+ /**
+ * Escapes dots
+ */
+ _transform(chunk, encoding, done) {
+ let buf;
+ let lastPos = 0;
+
+ for (let i = 0, len = chunk.length; i < len; i++) {
+ if (chunk[i] === 0x0d) {
+ // \n
+ buf = chunk.slice(lastPos, i);
+ lastPos = i + 1;
+ this.push(buf);
+ }
+ }
+ if (lastPos && lastPos < chunk.length) {
+ buf = chunk.slice(lastPos);
+ this.push(buf);
+ } else if (!lastPos) {
+ this.push(chunk);
+ }
+ done();
+ }
+}
+
+module.exports = LeWindows;
+
+
+/***/ }),
+
+/***/ 3304:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const stream = __nccwpck_require__(2781);
+const Transform = stream.Transform;
+
+/**
+ * Ensures that only sequences are used for linebreaks
+ *
+ * @param {Object} options Stream options
+ */
+class LeWindows extends Transform {
+ constructor(options) {
+ super(options);
+ // init Transform
+ this.options = options || {};
+ this.lastByte = false;
+ }
+
+ /**
+ * Escapes dots
+ */
+ _transform(chunk, encoding, done) {
+ let buf;
+ let lastPos = 0;
+
+ for (let i = 0, len = chunk.length; i < len; i++) {
+ if (chunk[i] === 0x0a) {
+ // \n
+ if ((i && chunk[i - 1] !== 0x0d) || (!i && this.lastByte !== 0x0d)) {
+ if (i > lastPos) {
+ buf = chunk.slice(lastPos, i);
+ this.push(buf);
+ }
+ this.push(Buffer.from('\r\n'));
+ lastPos = i + 1;
+ }
+ }
+ }
+
+ if (lastPos && lastPos < chunk.length) {
+ buf = chunk.slice(lastPos);
+ this.push(buf);
+ } else if (!lastPos) {
+ this.push(chunk);
+ }
+
+ this.lastByte = chunk[chunk.length - 1];
+ done();
+ }
+}
+
+module.exports = LeWindows;
+
+
+/***/ }),
+
+/***/ 4289:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const Mailer = __nccwpck_require__(833);
+const shared = __nccwpck_require__(2673);
+const SMTPPool = __nccwpck_require__(560);
+const SMTPTransport = __nccwpck_require__(3349);
+const SendmailTransport = __nccwpck_require__(8910);
+const StreamTransport = __nccwpck_require__(1888);
+const JSONTransport = __nccwpck_require__(3819);
+const SESTransport = __nccwpck_require__(5924);
+const nmfetch = __nccwpck_require__(4446);
+const packageData = __nccwpck_require__(4129);
+
+const ETHEREAL_API = (process.env.ETHEREAL_API || 'https://api.nodemailer.com').replace(/\/+$/, '');
+const ETHEREAL_WEB = (process.env.ETHEREAL_WEB || 'https://ethereal.email').replace(/\/+$/, '');
+const ETHEREAL_CACHE = ['true', 'yes', 'y', '1'].includes((process.env.ETHEREAL_CACHE || 'yes').toString().trim().toLowerCase());
+
+let testAccount = false;
+
+module.exports.createTransport = function (transporter, defaults) {
+ let urlConfig;
+ let options;
+ let mailer;
+
+ if (
+ // provided transporter is a configuration object, not transporter plugin
+ (typeof transporter === 'object' && typeof transporter.send !== 'function') ||
+ // provided transporter looks like a connection url
+ (typeof transporter === 'string' && /^(smtps?|direct):/i.test(transporter))
+ ) {
+ if ((urlConfig = typeof transporter === 'string' ? transporter : transporter.url)) {
+ // parse a configuration URL into configuration options
+ options = shared.parseConnectionUrl(urlConfig);
+ } else {
+ options = transporter;
+ }
+
+ if (options.pool) {
+ transporter = new SMTPPool(options);
+ } else if (options.sendmail) {
+ transporter = new SendmailTransport(options);
+ } else if (options.streamTransport) {
+ transporter = new StreamTransport(options);
+ } else if (options.jsonTransport) {
+ transporter = new JSONTransport(options);
+ } else if (options.SES) {
+ transporter = new SESTransport(options);
+ } else {
+ transporter = new SMTPTransport(options);
+ }
+ }
+
+ mailer = new Mailer(transporter, options, defaults);
+
+ return mailer;
+};
+
+module.exports.createTestAccount = function (apiUrl, callback) {
+ let promise;
+
+ if (!callback && typeof apiUrl === 'function') {
+ callback = apiUrl;
+ apiUrl = false;
+ }
+
+ if (!callback) {
+ promise = new Promise((resolve, reject) => {
+ callback = shared.callbackPromise(resolve, reject);
+ });
+ }
+
+ if (ETHEREAL_CACHE && testAccount) {
+ setImmediate(() => callback(null, testAccount));
+ return promise;
+ }
+
+ apiUrl = apiUrl || ETHEREAL_API;
+
+ let chunks = [];
+ let chunklen = 0;
+
+ let req = nmfetch(apiUrl + '/user', {
+ contentType: 'application/json',
+ method: 'POST',
+ body: Buffer.from(
+ JSON.stringify({
+ requestor: packageData.name,
+ version: packageData.version
+ })
+ )
+ });
+
+ req.on('readable', () => {
+ let chunk;
+ while ((chunk = req.read()) !== null) {
+ chunks.push(chunk);
+ chunklen += chunk.length;
+ }
+ });
+
+ req.once('error', err => callback(err));
+
+ req.once('end', () => {
+ let res = Buffer.concat(chunks, chunklen);
+ let data;
+ let err;
+ try {
+ data = JSON.parse(res.toString());
+ } catch (E) {
+ err = E;
+ }
+ if (err) {
+ return callback(err);
+ }
+ if (data.status !== 'success' || data.error) {
+ return callback(new Error(data.error || 'Request failed'));
+ }
+ delete data.status;
+ testAccount = data;
+ callback(null, testAccount);
+ });
+
+ return promise;
+};
+
+module.exports.getTestMessageUrl = function (info) {
+ if (!info || !info.response) {
+ return false;
+ }
+
+ let infoProps = new Map();
+ info.response.replace(/\[([^\]]+)\]$/, (m, props) => {
+ props.replace(/\b([A-Z0-9]+)=([^\s]+)/g, (m, key, value) => {
+ infoProps.set(key, value);
+ });
+ });
+
+ if (infoProps.has('STATUS') && infoProps.has('MSGID')) {
+ return (testAccount.web || ETHEREAL_WEB) + '/message/' + infoProps.get('MSGID');
+ }
+
+ return false;
+};
+
+
+/***/ }),
+
+/***/ 4317:
+/***/ ((module) => {
+
+/*
+
+Copied from https://github.com/mathiasbynens/punycode.js/blob/ef3505c8abb5143a00d53ce59077c9f7f4b2ac47/punycode.js
+
+Copyright Mathias Bynens
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+/* eslint callback-return: 0, no-bitwise: 0, eqeqeq: 0, prefer-arrow-callback: 0, object-shorthand: 0 */
+
+
+
+/** Highest positive signed 32-bit float value */
+const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
+
+/** Bootstring parameters */
+const base = 36;
+const tMin = 1;
+const tMax = 26;
+const skew = 38;
+const damp = 700;
+const initialBias = 72;
+const initialN = 128; // 0x80
+const delimiter = '-'; // '\x2D'
+
+/** Regular expressions */
+const regexPunycode = /^xn--/;
+const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too.
+const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
+
+/** Error messages */
+const errors = {
+ overflow: 'Overflow: input needs wider integers to process',
+ 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
+ 'invalid-input': 'Invalid input'
+};
+
+/** Convenience shortcuts */
+const baseMinusTMin = base - tMin;
+const floor = Math.floor;
+const stringFromCharCode = String.fromCharCode;
+
+/*--------------------------------------------------------------------------*/
+
+/**
+ * A generic error utility function.
+ * @private
+ * @param {String} type The error type.
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
+ */
+function error(type) {
+ throw new RangeError(errors[type]);
+}
+
+/**
+ * A generic `Array#map` utility function.
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} callback The function that gets called for every array
+ * item.
+ * @returns {Array} A new array of values returned by the callback function.
+ */
+function map(array, callback) {
+ const result = [];
+ let length = array.length;
+ while (length--) {
+ result[length] = callback(array[length]);
+ }
+ return result;
+}
+
+/**
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
+ * addresses.
+ * @private
+ * @param {String} domain The domain name or email address.
+ * @param {Function} callback The function that gets called for every
+ * character.
+ * @returns {String} A new string of characters returned by the callback
+ * function.
+ */
+function mapDomain(domain, callback) {
+ const parts = domain.split('@');
+ let result = '';
+ if (parts.length > 1) {
+ // In email addresses, only the domain name should be punycoded. Leave
+ // the local part (i.e. everything up to `@`) intact.
+ result = parts[0] + '@';
+ domain = parts[1];
+ }
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
+ domain = domain.replace(regexSeparators, '\x2E');
+ const labels = domain.split('.');
+ const encoded = map(labels, callback).join('.');
+ return result + encoded;
+}
+
+/**
+ * Creates an array containing the numeric code points of each Unicode
+ * character in the string. While JavaScript uses UCS-2 internally,
+ * this function will convert a pair of surrogate halves (each of which
+ * UCS-2 exposes as separate characters) into a single code point,
+ * matching UTF-16.
+ * @see `punycode.ucs2.encode`
+ * @see
+ * @memberOf punycode.ucs2
+ * @name decode
+ * @param {String} string The Unicode input string (UCS-2).
+ * @returns {Array} The new array of code points.
+ */
+function ucs2decode(string) {
+ const output = [];
+ let counter = 0;
+ const length = string.length;
+ while (counter < length) {
+ const value = string.charCodeAt(counter++);
+ if (value >= 0xd800 && value <= 0xdbff && counter < length) {
+ // It's a high surrogate, and there is a next character.
+ const extra = string.charCodeAt(counter++);
+ if ((extra & 0xfc00) == 0xdc00) {
+ // Low surrogate.
+ output.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);
+ } else {
+ // It's an unmatched surrogate; only append this code unit, in case the
+ // next code unit is the high surrogate of a surrogate pair.
+ output.push(value);
+ counter--;
+ }
+ } else {
+ output.push(value);
+ }
+ }
+ return output;
+}
+
+/**
+ * Creates a string based on an array of numeric code points.
+ * @see `punycode.ucs2.decode`
+ * @memberOf punycode.ucs2
+ * @name encode
+ * @param {Array} codePoints The array of numeric code points.
+ * @returns {String} The new Unicode string (UCS-2).
+ */
+const ucs2encode = codePoints => String.fromCodePoint(...codePoints);
+
+/**
+ * Converts a basic code point into a digit/integer.
+ * @see `digitToBasic()`
+ * @private
+ * @param {Number} codePoint The basic numeric code point value.
+ * @returns {Number} The numeric value of a basic code point (for use in
+ * representing integers) in the range `0` to `base - 1`, or `base` if
+ * the code point does not represent a value.
+ */
+const basicToDigit = function (codePoint) {
+ if (codePoint >= 0x30 && codePoint < 0x3a) {
+ return 26 + (codePoint - 0x30);
+ }
+ if (codePoint >= 0x41 && codePoint < 0x5b) {
+ return codePoint - 0x41;
+ }
+ if (codePoint >= 0x61 && codePoint < 0x7b) {
+ return codePoint - 0x61;
+ }
+ return base;
+};
+
+/**
+ * Converts a digit/integer into a basic code point.
+ * @see `basicToDigit()`
+ * @private
+ * @param {Number} digit The numeric value of a basic code point.
+ * @returns {Number} The basic code point whose value (when used for
+ * representing integers) is `digit`, which needs to be in the range
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
+ * used; else, the lowercase form is used. The behavior is undefined
+ * if `flag` is non-zero and `digit` has no uppercase form.
+ */
+const digitToBasic = function (digit, flag) {
+ // 0..25 map to ASCII a..z or A..Z
+ // 26..35 map to ASCII 0..9
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+};
+
+/**
+ * Bias adaptation function as per section 3.4 of RFC 3492.
+ * https://tools.ietf.org/html/rfc3492#section-3.4
+ * @private
+ */
+const adapt = function (delta, numPoints, firstTime) {
+ let k = 0;
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
+ delta += floor(delta / numPoints);
+ for (; /* no initialization */ delta > (baseMinusTMin * tMax) >> 1; k += base) {
+ delta = floor(delta / baseMinusTMin);
+ }
+ return floor(k + ((baseMinusTMin + 1) * delta) / (delta + skew));
+};
+
+/**
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
+ * symbols.
+ * @memberOf punycode
+ * @param {String} input The Punycode string of ASCII-only symbols.
+ * @returns {String} The resulting string of Unicode symbols.
+ */
+const decode = function (input) {
+ // Don't use UCS-2.
+ const output = [];
+ const inputLength = input.length;
+ let i = 0;
+ let n = initialN;
+ let bias = initialBias;
+
+ // Handle the basic code points: let `basic` be the number of input code
+ // points before the last delimiter, or `0` if there is none, then copy
+ // the first basic code points to the output.
+
+ let basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+
+ for (let j = 0; j < basic; ++j) {
+ // if it's not a basic code point
+ if (input.charCodeAt(j) >= 0x80) {
+ error('not-basic');
+ }
+ output.push(input.charCodeAt(j));
+ }
+
+ // Main decoding loop: start just after the last delimiter if any basic code
+ // points were copied; start at the beginning otherwise.
+
+ for (let index = basic > 0 ? basic + 1 : 0; index < inputLength /* no final expression */; ) {
+ // `index` is the index of the next character to be consumed.
+ // Decode a generalized variable-length integer into `delta`,
+ // which gets added to `i`. The overflow checking is easier
+ // if we increase `i` as we go, then subtract off its starting
+ // value at the end to obtain `delta`.
+ const oldi = i;
+ for (let w = 1, k = base /* no condition */; ; k += base) {
+ if (index >= inputLength) {
+ error('invalid-input');
+ }
+
+ const digit = basicToDigit(input.charCodeAt(index++));
+
+ if (digit >= base) {
+ error('invalid-input');
+ }
+ if (digit > floor((maxInt - i) / w)) {
+ error('overflow');
+ }
+
+ i += digit * w;
+ const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
+
+ if (digit < t) {
+ break;
+ }
+
+ const baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error('overflow');
+ }
+
+ w *= baseMinusT;
+ }
+
+ const out = output.length + 1;
+ bias = adapt(i - oldi, out, oldi == 0);
+
+ // `i` was supposed to wrap around from `out` to `0`,
+ // incrementing `n` each time, so we'll fix that now:
+ if (floor(i / out) > maxInt - n) {
+ error('overflow');
+ }
+
+ n += floor(i / out);
+ i %= out;
+
+ // Insert `n` at position `i` of the output.
+ output.splice(i++, 0, n);
+ }
+
+ return String.fromCodePoint(...output);
+};
+
+/**
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
+ * Punycode string of ASCII-only symbols.
+ * @memberOf punycode
+ * @param {String} input The string of Unicode symbols.
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
+ */
+const encode = function (input) {
+ const output = [];
+
+ // Convert the input in UCS-2 to an array of Unicode code points.
+ input = ucs2decode(input);
+
+ // Cache the length.
+ const inputLength = input.length;
+
+ // Initialize the state.
+ let n = initialN;
+ let delta = 0;
+ let bias = initialBias;
+
+ // Handle the basic code points.
+ for (const currentValue of input) {
+ if (currentValue < 0x80) {
+ output.push(stringFromCharCode(currentValue));
+ }
+ }
+
+ const basicLength = output.length;
+ let handledCPCount = basicLength;
+
+ // `handledCPCount` is the number of code points that have been handled;
+ // `basicLength` is the number of basic code points.
+
+ // Finish the basic string with a delimiter unless it's empty.
+ if (basicLength) {
+ output.push(delimiter);
+ }
+
+ // Main encoding loop:
+ while (handledCPCount < inputLength) {
+ // All non-basic code points < n have been handled already. Find the next
+ // larger one:
+ let m = maxInt;
+ for (const currentValue of input) {
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+
+ // Increase `delta` enough to advance the decoder's state to ,
+ // but guard against overflow.
+ const handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error('overflow');
+ }
+
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+
+ for (const currentValue of input) {
+ if (currentValue < n && ++delta > maxInt) {
+ error('overflow');
+ }
+ if (currentValue === n) {
+ // Represent delta as a generalized variable-length integer.
+ let q = delta;
+ for (let k = base /* no condition */; ; k += base) {
+ const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
+ if (q < t) {
+ break;
+ }
+ const qMinusT = q - t;
+ const baseMinusT = base - t;
+ output.push(stringFromCharCode(digitToBasic(t + (qMinusT % baseMinusT), 0)));
+ q = floor(qMinusT / baseMinusT);
+ }
+
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
+ delta = 0;
+ ++handledCPCount;
+ }
+ }
+
+ ++delta;
+ ++n;
+ }
+ return output.join('');
+};
+
+/**
+ * Converts a Punycode string representing a domain name or an email address
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
+ * it doesn't matter if you call it on a string that has already been
+ * converted to Unicode.
+ * @memberOf punycode
+ * @param {String} input The Punycoded domain name or email address to
+ * convert to Unicode.
+ * @returns {String} The Unicode representation of the given Punycode
+ * string.
+ */
+const toUnicode = function (input) {
+ return mapDomain(input, function (string) {
+ return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
+ });
+};
+
+/**
+ * Converts a Unicode string representing a domain name or an email address to
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
+ * i.e. it doesn't matter if you call it with a domain that's already in
+ * ASCII.
+ * @memberOf punycode
+ * @param {String} input The domain name or email address to convert, as a
+ * Unicode string.
+ * @returns {String} The Punycode representation of the given domain name or
+ * email address.
+ */
+const toASCII = function (input) {
+ return mapDomain(input, function (string) {
+ return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;
+ });
+};
+
+/*--------------------------------------------------------------------------*/
+
+/** Define the public API */
+const punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ version: '2.3.1',
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see
+ * @memberOf punycode
+ * @type Object
+ */
+ ucs2: {
+ decode: ucs2decode,
+ encode: ucs2encode
+ },
+ decode: decode,
+ encode: encode,
+ toASCII: toASCII,
+ toUnicode: toUnicode
+};
+
+module.exports = punycode;
+
+
+/***/ }),
+
+/***/ 9716:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const Transform = (__nccwpck_require__(2781).Transform);
+
+/**
+ * Encodes a Buffer into a Quoted-Printable encoded string
+ *
+ * @param {Buffer} buffer Buffer to convert
+ * @returns {String} Quoted-Printable encoded string
+ */
+function encode(buffer) {
+ if (typeof buffer === 'string') {
+ buffer = Buffer.from(buffer, 'utf-8');
+ }
+
+ // usable characters that do not need encoding
+ let ranges = [
+ // https://tools.ietf.org/html/rfc2045#section-6.7
+ [0x09], //
+ [0x0a], //
+ [0x0d], //
+ [0x20, 0x3c], // !"#$%&'()*+,-./0123456789:;
+ [0x3e, 0x7e] // >?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}
+ ];
+ let result = '';
+ let ord;
+
+ for (let i = 0, len = buffer.length; i < len; i++) {
+ ord = buffer[i];
+ // if the char is in allowed range, then keep as is, unless it is a WS in the end of a line
+ if (checkRanges(ord, ranges) && !((ord === 0x20 || ord === 0x09) && (i === len - 1 || buffer[i + 1] === 0x0a || buffer[i + 1] === 0x0d))) {
+ result += String.fromCharCode(ord);
+ continue;
+ }
+ result += '=' + (ord < 0x10 ? '0' : '') + ord.toString(16).toUpperCase();
+ }
+
+ return result;
+}
+
+/**
+ * Adds soft line breaks to a Quoted-Printable string
+ *
+ * @param {String} str Quoted-Printable encoded string that might need line wrapping
+ * @param {Number} [lineLength=76] Maximum allowed length for a line
+ * @returns {String} Soft-wrapped Quoted-Printable encoded string
+ */
+function wrap(str, lineLength) {
+ str = (str || '').toString();
+ lineLength = lineLength || 76;
+
+ if (str.length <= lineLength) {
+ return str;
+ }
+
+ let pos = 0;
+ let len = str.length;
+ let match, code, line;
+ let lineMargin = Math.floor(lineLength / 3);
+ let result = '';
+
+ // insert soft linebreaks where needed
+ while (pos < len) {
+ line = str.substr(pos, lineLength);
+ if ((match = line.match(/\r\n/))) {
+ line = line.substr(0, match.index + match[0].length);
+ result += line;
+ pos += line.length;
+ continue;
+ }
+
+ if (line.substr(-1) === '\n') {
+ // nothing to change here
+ result += line;
+ pos += line.length;
+ continue;
+ } else if ((match = line.substr(-lineMargin).match(/\n.*?$/))) {
+ // truncate to nearest line break
+ line = line.substr(0, line.length - (match[0].length - 1));
+ result += line;
+ pos += line.length;
+ continue;
+ } else if (line.length > lineLength - lineMargin && (match = line.substr(-lineMargin).match(/[ \t.,!?][^ \t.,!?]*$/))) {
+ // truncate to nearest space
+ line = line.substr(0, line.length - (match[0].length - 1));
+ } else if (line.match(/[=][\da-f]{0,2}$/i)) {
+ // push incomplete encoding sequences to the next line
+ if ((match = line.match(/[=][\da-f]{0,1}$/i))) {
+ line = line.substr(0, line.length - match[0].length);
+ }
+
+ // ensure that utf-8 sequences are not split
+ while (line.length > 3 && line.length < len - pos && !line.match(/^(?:=[\da-f]{2}){1,4}$/i) && (match = line.match(/[=][\da-f]{2}$/gi))) {
+ code = parseInt(match[0].substr(1, 2), 16);
+ if (code < 128) {
+ break;
+ }
+
+ line = line.substr(0, line.length - 3);
+
+ if (code >= 0xc0) {
+ break;
+ }
+ }
+ }
+
+ if (pos + line.length < len && line.substr(-1) !== '\n') {
+ if (line.length === lineLength && line.match(/[=][\da-f]{2}$/i)) {
+ line = line.substr(0, line.length - 3);
+ } else if (line.length === lineLength) {
+ line = line.substr(0, line.length - 1);
+ }
+ pos += line.length;
+ line += '=\r\n';
+ } else {
+ pos += line.length;
+ }
+
+ result += line;
+ }
+
+ return result;
+}
+
+/**
+ * Helper function to check if a number is inside provided ranges
+ *
+ * @param {Number} nr Number to check for
+ * @param {Array} ranges An Array of allowed values
+ * @returns {Boolean} True if the value was found inside allowed ranges, false otherwise
+ */
+function checkRanges(nr, ranges) {
+ for (let i = ranges.length - 1; i >= 0; i--) {
+ if (!ranges[i].length) {
+ continue;
+ }
+ if (ranges[i].length === 1 && nr === ranges[i][0]) {
+ return true;
+ }
+ if (ranges[i].length === 2 && nr >= ranges[i][0] && nr <= ranges[i][1]) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Creates a transform stream for encoding data to Quoted-Printable encoding
+ *
+ * @constructor
+ * @param {Object} options Stream options
+ * @param {Number} [options.lineLength=76] Maximum length for lines, set to false to disable wrapping
+ */
+class Encoder extends Transform {
+ constructor(options) {
+ super();
+
+ // init Transform
+ this.options = options || {};
+
+ if (this.options.lineLength !== false) {
+ this.options.lineLength = this.options.lineLength || 76;
+ }
+
+ this._curLine = '';
+
+ this.inputBytes = 0;
+ this.outputBytes = 0;
+ }
+
+ _transform(chunk, encoding, done) {
+ let qp;
+
+ if (encoding !== 'buffer') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+
+ if (!chunk || !chunk.length) {
+ return done();
+ }
+
+ this.inputBytes += chunk.length;
+
+ if (this.options.lineLength) {
+ qp = this._curLine + encode(chunk);
+ qp = wrap(qp, this.options.lineLength);
+ qp = qp.replace(/(^|\n)([^\n]*)$/, (match, lineBreak, lastLine) => {
+ this._curLine = lastLine;
+ return lineBreak;
+ });
+
+ if (qp) {
+ this.outputBytes += qp.length;
+ this.push(qp);
+ }
+ } else {
+ qp = encode(chunk);
+ this.outputBytes += qp.length;
+ this.push(qp, 'ascii');
+ }
+
+ done();
+ }
+
+ _flush(done) {
+ if (this._curLine) {
+ this.outputBytes += this._curLine.length;
+ this.push(this._curLine, 'ascii');
+ }
+ done();
+ }
+}
+
+// expose to the world
+module.exports = {
+ encode,
+ wrap,
+ Encoder
+};
+
+
+/***/ }),
+
+/***/ 8910:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const spawn = (__nccwpck_require__(2081).spawn);
+const packageData = __nccwpck_require__(4129);
+const shared = __nccwpck_require__(2673);
+
+/**
+ * Generates a Transport object for Sendmail
+ *
+ * Possible options can be the following:
+ *
+ * * **path** optional path to sendmail binary
+ * * **newline** either 'windows' or 'unix'
+ * * **args** an array of arguments for the sendmail binary
+ *
+ * @constructor
+ * @param {Object} optional config parameter for Sendmail
+ */
+class SendmailTransport {
+ constructor(options) {
+ options = options || {};
+
+ // use a reference to spawn for mocking purposes
+ this._spawn = spawn;
+
+ this.options = options || {};
+
+ this.name = 'Sendmail';
+ this.version = packageData.version;
+
+ this.path = 'sendmail';
+ this.args = false;
+ this.winbreak = false;
+
+ this.logger = shared.getLogger(this.options, {
+ component: this.options.component || 'sendmail'
+ });
+
+ if (options) {
+ if (typeof options === 'string') {
+ this.path = options;
+ } else if (typeof options === 'object') {
+ if (options.path) {
+ this.path = options.path;
+ }
+ if (Array.isArray(options.args)) {
+ this.args = options.args;
+ }
+ this.winbreak = ['win', 'windows', 'dos', '\r\n'].includes((options.newline || '').toString().toLowerCase());
+ }
+ }
+ }
+
+ /**
+ *
Compiles a mailcomposer message and forwards it to handler that sends it.
+ *
+ * @param {Object} emailMessage MailComposer object
+ * @param {Function} callback Callback function to run when the sending is completed
+ */
+ send(mail, done) {
+ // Sendmail strips this header line by itself
+ mail.message.keepBcc = true;
+
+ let envelope = mail.data.envelope || mail.message.getEnvelope();
+ let messageId = mail.message.messageId();
+ let args;
+ let sendmail;
+ let returned;
+
+ const hasInvalidAddresses = []
+ .concat(envelope.from || [])
+ .concat(envelope.to || [])
+ .some(addr => /^-/.test(addr));
+ if (hasInvalidAddresses) {
+ return done(new Error('Can not send mail. Invalid envelope addresses.'));
+ }
+
+ if (this.args) {
+ // force -i to keep single dots
+ args = ['-i'].concat(this.args).concat(envelope.to);
+ } else {
+ args = ['-i'].concat(envelope.from ? ['-f', envelope.from] : []).concat(envelope.to);
+ }
+
+ let callback = err => {
+ if (returned) {
+ // ignore any additional responses, already done
+ return;
+ }
+ returned = true;
+ if (typeof done === 'function') {
+ if (err) {
+ return done(err);
+ } else {
+ return done(null, {
+ envelope: mail.data.envelope || mail.message.getEnvelope(),
+ messageId,
+ response: 'Messages queued for delivery'
+ });
+ }
+ }
+ };
+
+ try {
+ sendmail = this._spawn(this.path, args);
+ } catch (E) {
+ this.logger.error(
+ {
+ err: E,
+ tnx: 'spawn',
+ messageId
+ },
+ 'Error occurred while spawning sendmail. %s',
+ E.message
+ );
+ return callback(E);
+ }
+
+ if (sendmail) {
+ sendmail.on('error', err => {
+ this.logger.error(
+ {
+ err,
+ tnx: 'spawn',
+ messageId
+ },
+ 'Error occurred when sending message %s. %s',
+ messageId,
+ err.message
+ );
+ callback(err);
+ });
+
+ sendmail.once('exit', code => {
+ if (!code) {
+ return callback();
+ }
+ let err;
+ if (code === 127) {
+ err = new Error('Sendmail command not found, process exited with code ' + code);
+ } else {
+ err = new Error('Sendmail exited with code ' + code);
+ }
+
+ this.logger.error(
+ {
+ err,
+ tnx: 'stdin',
+ messageId
+ },
+ 'Error sending message %s to sendmail. %s',
+ messageId,
+ err.message
+ );
+ callback(err);
+ });
+ sendmail.once('close', callback);
+
+ sendmail.stdin.on('error', err => {
+ this.logger.error(
+ {
+ err,
+ tnx: 'stdin',
+ messageId
+ },
+ 'Error occurred when piping message %s to sendmail. %s',
+ messageId,
+ err.message
+ );
+ callback(err);
+ });
+
+ let recipients = [].concat(envelope.to || []);
+ if (recipients.length > 3) {
+ recipients.push('...and ' + recipients.splice(2).length + ' more');
+ }
+ this.logger.info(
+ {
+ tnx: 'send',
+ messageId
+ },
+ 'Sending message %s to <%s>',
+ messageId,
+ recipients.join(', ')
+ );
+
+ let sourceStream = mail.message.createReadStream();
+ sourceStream.once('error', err => {
+ this.logger.error(
+ {
+ err,
+ tnx: 'stdin',
+ messageId
+ },
+ 'Error occurred when generating message %s. %s',
+ messageId,
+ err.message
+ );
+ sendmail.kill('SIGINT'); // do not deliver the message
+ callback(err);
+ });
+
+ sourceStream.pipe(sendmail.stdin);
+ } else {
+ return callback(new Error('sendmail was not found'));
+ }
+ }
+}
+
+module.exports = SendmailTransport;
+
+
+/***/ }),
+
+/***/ 5924:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const EventEmitter = __nccwpck_require__(2361);
+const packageData = __nccwpck_require__(4129);
+const shared = __nccwpck_require__(2673);
+const LeWindows = __nccwpck_require__(3304);
+
+/**
+ * Generates a Transport object for AWS SES
+ *
+ * Possible options can be the following:
+ *
+ * * **sendingRate** optional Number specifying how many messages per second should be delivered to SES
+ * * **maxConnections** optional Number specifying max number of parallel connections to SES
+ *
+ * @constructor
+ * @param {Object} optional config parameter
+ */
+class SESTransport extends EventEmitter {
+ constructor(options) {
+ super();
+ options = options || {};
+
+ this.options = options || {};
+ this.ses = this.options.SES;
+
+ this.name = 'SESTransport';
+ this.version = packageData.version;
+
+ this.logger = shared.getLogger(this.options, {
+ component: this.options.component || 'ses-transport'
+ });
+
+ // parallel sending connections
+ this.maxConnections = Number(this.options.maxConnections) || Infinity;
+ this.connections = 0;
+
+ // max messages per second
+ this.sendingRate = Number(this.options.sendingRate) || Infinity;
+ this.sendingRateTTL = null;
+ this.rateInterval = 1000; // milliseconds
+ this.rateMessages = [];
+
+ this.pending = [];
+
+ this.idling = true;
+
+ setImmediate(() => {
+ if (this.idling) {
+ this.emit('idle');
+ }
+ });
+ }
+
+ /**
+ * Schedules a sending of a message
+ *
+ * @param {Object} emailMessage MailComposer object
+ * @param {Function} callback Callback function to run when the sending is completed
+ */
+ send(mail, callback) {
+ if (this.connections >= this.maxConnections) {
+ this.idling = false;
+ return this.pending.push({
+ mail,
+ callback
+ });
+ }
+
+ if (!this._checkSendingRate()) {
+ this.idling = false;
+ return this.pending.push({
+ mail,
+ callback
+ });
+ }
+
+ this._send(mail, (...args) => {
+ setImmediate(() => callback(...args));
+ this._sent();
+ });
+ }
+
+ _checkRatedQueue() {
+ if (this.connections >= this.maxConnections || !this._checkSendingRate()) {
+ return;
+ }
+
+ if (!this.pending.length) {
+ if (!this.idling) {
+ this.idling = true;
+ this.emit('idle');
+ }
+ return;
+ }
+
+ let next = this.pending.shift();
+ this._send(next.mail, (...args) => {
+ setImmediate(() => next.callback(...args));
+ this._sent();
+ });
+ }
+
+ _checkSendingRate() {
+ clearTimeout(this.sendingRateTTL);
+
+ let now = Date.now();
+ let oldest = false;
+ // delete older messages
+ for (let i = this.rateMessages.length - 1; i >= 0; i--) {
+ if (this.rateMessages[i].ts >= now - this.rateInterval && (!oldest || this.rateMessages[i].ts < oldest)) {
+ oldest = this.rateMessages[i].ts;
+ }
+
+ if (this.rateMessages[i].ts < now - this.rateInterval && !this.rateMessages[i].pending) {
+ this.rateMessages.splice(i, 1);
+ }
+ }
+
+ if (this.rateMessages.length < this.sendingRate) {
+ return true;
+ }
+
+ let delay = Math.max(oldest + 1001, now + 20);
+ this.sendingRateTTL = setTimeout(() => this._checkRatedQueue(), now - delay);
+
+ try {
+ this.sendingRateTTL.unref();
+ } catch (E) {
+ // Ignore. Happens on envs with non-node timer implementation
+ }
+
+ return false;
+ }
+
+ _sent() {
+ this.connections--;
+ this._checkRatedQueue();
+ }
+
+ /**
+ * Returns true if there are free slots in the queue
+ */
+ isIdle() {
+ return this.idling;
+ }
+
+ /**
+ * Compiles a mailcomposer message and forwards it to SES
+ *
+ * @param {Object} emailMessage MailComposer object
+ * @param {Function} callback Callback function to run when the sending is completed
+ */
+ _send(mail, callback) {
+ let statObject = {
+ ts: Date.now(),
+ pending: true
+ };
+ this.connections++;
+ this.rateMessages.push(statObject);
+
+ let envelope = mail.data.envelope || mail.message.getEnvelope();
+ let messageId = mail.message.messageId();
+
+ let recipients = [].concat(envelope.to || []);
+ if (recipients.length > 3) {
+ recipients.push('...and ' + recipients.splice(2).length + ' more');
+ }
+ this.logger.info(
+ {
+ tnx: 'send',
+ messageId
+ },
+ 'Sending message %s to <%s>',
+ messageId,
+ recipients.join(', ')
+ );
+
+ let getRawMessage = next => {
+ // do not use Message-ID and Date in DKIM signature
+ if (!mail.data._dkim) {
+ mail.data._dkim = {};
+ }
+ if (mail.data._dkim.skipFields && typeof mail.data._dkim.skipFields === 'string') {
+ mail.data._dkim.skipFields += ':date:message-id';
+ } else {
+ mail.data._dkim.skipFields = 'date:message-id';
+ }
+
+ let sourceStream = mail.message.createReadStream();
+ let stream = sourceStream.pipe(new LeWindows());
+ let chunks = [];
+ let chunklen = 0;
+
+ stream.on('readable', () => {
+ let chunk;
+ while ((chunk = stream.read()) !== null) {
+ chunks.push(chunk);
+ chunklen += chunk.length;
+ }
+ });
+
+ sourceStream.once('error', err => stream.emit('error', err));
+
+ stream.once('error', err => {
+ next(err);
+ });
+
+ stream.once('end', () => next(null, Buffer.concat(chunks, chunklen)));
+ };
+
+ setImmediate(() =>
+ getRawMessage((err, raw) => {
+ if (err) {
+ this.logger.error(
+ {
+ err,
+ tnx: 'send',
+ messageId
+ },
+ 'Failed creating message for %s. %s',
+ messageId,
+ err.message
+ );
+ statObject.pending = false;
+ return callback(err);
+ }
+
+ let sesMessage = {
+ RawMessage: {
+ // required
+ Data: raw // required
+ },
+ Source: envelope.from,
+ Destinations: envelope.to
+ };
+
+ Object.keys(mail.data.ses || {}).forEach(key => {
+ sesMessage[key] = mail.data.ses[key];
+ });
+
+ let ses = (this.ses.aws ? this.ses.ses : this.ses) || {};
+ let aws = this.ses.aws || {};
+
+ let getRegion = cb => {
+ if (ses.config && typeof ses.config.region === 'function') {
+ // promise
+ return ses.config
+ .region()
+ .then(region => cb(null, region))
+ .catch(err => cb(err));
+ }
+ return cb(null, (ses.config && ses.config.region) || 'us-east-1');
+ };
+
+ getRegion((err, region) => {
+ if (err || !region) {
+ region = 'us-east-1';
+ }
+
+ let sendPromise;
+ if (typeof ses.send === 'function' && aws.SendRawEmailCommand) {
+ // v3 API
+ sendPromise = ses.send(new aws.SendRawEmailCommand(sesMessage));
+ } else {
+ // v2 API
+ sendPromise = ses.sendRawEmail(sesMessage).promise();
+ }
+
+ sendPromise
+ .then(data => {
+ if (region === 'us-east-1') {
+ region = 'email';
+ }
+
+ statObject.pending = false;
+ callback(null, {
+ envelope: {
+ from: envelope.from,
+ to: envelope.to
+ },
+ messageId: '<' + data.MessageId + (!/@/.test(data.MessageId) ? '@' + region + '.amazonses.com' : '') + '>',
+ response: data.MessageId,
+ raw
+ });
+ })
+ .catch(err => {
+ this.logger.error(
+ {
+ err,
+ tnx: 'send'
+ },
+ 'Send error for %s: %s',
+ messageId,
+ err.message
+ );
+ statObject.pending = false;
+ callback(err);
+ });
+ });
+ })
+ );
+ }
+
+ /**
+ * Verifies SES configuration
+ *
+ * @param {Function} callback Callback function
+ */
+ verify(callback) {
+ let promise;
+ let ses = (this.ses.aws ? this.ses.ses : this.ses) || {};
+ let aws = this.ses.aws || {};
+
+ const sesMessage = {
+ RawMessage: {
+ // required
+ Data: 'From: invalid@invalid\r\nTo: invalid@invalid\r\n Subject: Invalid\r\n\r\nInvalid'
+ },
+ Source: 'invalid@invalid',
+ Destinations: ['invalid@invalid']
+ };
+
+ if (!callback) {
+ promise = new Promise((resolve, reject) => {
+ callback = shared.callbackPromise(resolve, reject);
+ });
+ }
+ const cb = err => {
+ if (err && (err.code || err.Code) !== 'InvalidParameterValue') {
+ return callback(err);
+ }
+ return callback(null, true);
+ };
+
+ if (typeof ses.send === 'function' && aws.SendRawEmailCommand) {
+ // v3 API
+ sesMessage.RawMessage.Data = Buffer.from(sesMessage.RawMessage.Data);
+ ses.send(new aws.SendRawEmailCommand(sesMessage), cb);
+ } else {
+ // v2 API
+ ses.sendRawEmail(sesMessage, cb);
+ }
+
+ return promise;
+ }
+}
+
+module.exports = SESTransport;
+
+
+/***/ }),
+
+/***/ 2673:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+/* eslint no-console: 0 */
+
+
+
+const urllib = __nccwpck_require__(7310);
+const util = __nccwpck_require__(3837);
+const fs = __nccwpck_require__(7147);
+const nmfetch = __nccwpck_require__(4446);
+const dns = __nccwpck_require__(9523);
+const net = __nccwpck_require__(1808);
+const os = __nccwpck_require__(2037);
+
+const DNS_TTL = 5 * 60 * 1000;
+
+let networkInterfaces;
+try {
+ networkInterfaces = os.networkInterfaces();
+} catch (err) {
+ // fails on some systems
+}
+
+module.exports.networkInterfaces = networkInterfaces;
+
+const isFamilySupported = (family, allowInternal) => {
+ let networkInterfaces = module.exports.networkInterfaces;
+ if (!networkInterfaces) {
+ // hope for the best
+ return true;
+ }
+
+ const familySupported =
+ // crux that replaces Object.values(networkInterfaces) as Object.values is not supported in nodejs v6
+ Object.keys(networkInterfaces)
+ .map(key => networkInterfaces[key])
+ // crux that replaces .flat() as it is not supported in older Node versions (v10 and older)
+ .reduce((acc, val) => acc.concat(val), [])
+ .filter(i => !i.internal || allowInternal)
+ .filter(i => i.family === 'IPv' + family || i.family === family).length > 0;
+
+ return familySupported;
+};
+
+const resolver = (family, hostname, options, callback) => {
+ options = options || {};
+ const familySupported = isFamilySupported(family, options.allowInternalNetworkInterfaces);
+
+ if (!familySupported) {
+ return callback(null, []);
+ }
+
+ const resolver = dns.Resolver ? new dns.Resolver(options) : dns;
+ resolver['resolve' + family](hostname, (err, addresses) => {
+ if (err) {
+ switch (err.code) {
+ case dns.NODATA:
+ case dns.NOTFOUND:
+ case dns.NOTIMP:
+ case dns.SERVFAIL:
+ case dns.CONNREFUSED:
+ case dns.REFUSED:
+ case 'EAI_AGAIN':
+ return callback(null, []);
+ }
+ return callback(err);
+ }
+ return callback(null, Array.isArray(addresses) ? addresses : [].concat(addresses || []));
+ });
+};
+
+const dnsCache = (module.exports.dnsCache = new Map());
+
+const formatDNSValue = (value, extra) => {
+ if (!value) {
+ return Object.assign({}, extra || {});
+ }
+
+ return Object.assign(
+ {
+ servername: value.servername,
+ host:
+ !value.addresses || !value.addresses.length
+ ? null
+ : value.addresses.length === 1
+ ? value.addresses[0]
+ : value.addresses[Math.floor(Math.random() * value.addresses.length)]
+ },
+ extra || {}
+ );
+};
+
+module.exports.resolveHostname = (options, callback) => {
+ options = options || {};
+
+ if (!options.host && options.servername) {
+ options.host = options.servername;
+ }
+
+ if (!options.host || net.isIP(options.host)) {
+ // nothing to do here
+ let value = {
+ addresses: [options.host],
+ servername: options.servername || false
+ };
+ return callback(
+ null,
+ formatDNSValue(value, {
+ cached: false
+ })
+ );
+ }
+
+ let cached;
+ if (dnsCache.has(options.host)) {
+ cached = dnsCache.get(options.host);
+
+ if (!cached.expires || cached.expires >= Date.now()) {
+ return callback(
+ null,
+ formatDNSValue(cached.value, {
+ cached: true
+ })
+ );
+ }
+ }
+
+ resolver(4, options.host, options, (err, addresses) => {
+ if (err) {
+ if (cached) {
+ // ignore error, use expired value
+ return callback(
+ null,
+ formatDNSValue(cached.value, {
+ cached: true,
+ error: err
+ })
+ );
+ }
+ return callback(err);
+ }
+
+ if (addresses && addresses.length) {
+ let value = {
+ addresses,
+ servername: options.servername || options.host
+ };
+
+ dnsCache.set(options.host, {
+ value,
+ expires: Date.now() + (options.dnsTtl || DNS_TTL)
+ });
+
+ return callback(
+ null,
+ formatDNSValue(value, {
+ cached: false
+ })
+ );
+ }
+
+ resolver(6, options.host, options, (err, addresses) => {
+ if (err) {
+ if (cached) {
+ // ignore error, use expired value
+ return callback(
+ null,
+ formatDNSValue(cached.value, {
+ cached: true,
+ error: err
+ })
+ );
+ }
+ return callback(err);
+ }
+
+ if (addresses && addresses.length) {
+ let value = {
+ addresses,
+ servername: options.servername || options.host
+ };
+
+ dnsCache.set(options.host, {
+ value,
+ expires: Date.now() + (options.dnsTtl || DNS_TTL)
+ });
+
+ return callback(
+ null,
+ formatDNSValue(value, {
+ cached: false
+ })
+ );
+ }
+
+ try {
+ dns.lookup(options.host, { all: true }, (err, addresses) => {
+ if (err) {
+ if (cached) {
+ // ignore error, use expired value
+ return callback(
+ null,
+ formatDNSValue(cached.value, {
+ cached: true,
+ error: err
+ })
+ );
+ }
+ return callback(err);
+ }
+
+ let address = addresses
+ ? addresses
+ .filter(addr => isFamilySupported(addr.family))
+ .map(addr => addr.address)
+ .shift()
+ : false;
+
+ if (addresses && addresses.length && !address) {
+ // there are addresses but none can be used
+ console.warn(`Failed to resolve IPv${addresses[0].family} addresses with current network`);
+ }
+
+ if (!address && cached) {
+ // nothing was found, fallback to cached value
+ return callback(
+ null,
+ formatDNSValue(cached.value, {
+ cached: true
+ })
+ );
+ }
+
+ let value = {
+ addresses: address ? [address] : [options.host],
+ servername: options.servername || options.host
+ };
+
+ dnsCache.set(options.host, {
+ value,
+ expires: Date.now() + (options.dnsTtl || DNS_TTL)
+ });
+
+ return callback(
+ null,
+ formatDNSValue(value, {
+ cached: false
+ })
+ );
+ });
+ } catch (err) {
+ if (cached) {
+ // ignore error, use expired value
+ return callback(
+ null,
+ formatDNSValue(cached.value, {
+ cached: true,
+ error: err
+ })
+ );
+ }
+ return callback(err);
+ }
+ });
+ });
+};
+/**
+ * Parses connection url to a structured configuration object
+ *
+ * @param {String} str Connection url
+ * @return {Object} Configuration object
+ */
+module.exports.parseConnectionUrl = str => {
+ str = str || '';
+ let options = {};
+
+ [urllib.parse(str, true)].forEach(url => {
+ let auth;
+
+ switch (url.protocol) {
+ case 'smtp:':
+ options.secure = false;
+ break;
+ case 'smtps:':
+ options.secure = true;
+ break;
+ case 'direct:':
+ options.direct = true;
+ break;
+ }
+
+ if (!isNaN(url.port) && Number(url.port)) {
+ options.port = Number(url.port);
+ }
+
+ if (url.hostname) {
+ options.host = url.hostname;
+ }
+
+ if (url.auth) {
+ auth = url.auth.split(':');
+
+ if (!options.auth) {
+ options.auth = {};
+ }
+
+ options.auth.user = auth.shift();
+ options.auth.pass = auth.join(':');
+ }
+
+ Object.keys(url.query || {}).forEach(key => {
+ let obj = options;
+ let lKey = key;
+ let value = url.query[key];
+
+ if (!isNaN(value)) {
+ value = Number(value);
+ }
+
+ switch (value) {
+ case 'true':
+ value = true;
+ break;
+ case 'false':
+ value = false;
+ break;
+ }
+
+ // tls is nested object
+ if (key.indexOf('tls.') === 0) {
+ lKey = key.substr(4);
+ if (!options.tls) {
+ options.tls = {};
+ }
+ obj = options.tls;
+ } else if (key.indexOf('.') >= 0) {
+ // ignore nested properties besides tls
+ return;
+ }
+
+ if (!(lKey in obj)) {
+ obj[lKey] = value;
+ }
+ });
+ });
+
+ return options;
+};
+
+module.exports._logFunc = (logger, level, defaults, data, message, ...args) => {
+ let entry = {};
+
+ Object.keys(defaults || {}).forEach(key => {
+ if (key !== 'level') {
+ entry[key] = defaults[key];
+ }
+ });
+
+ Object.keys(data || {}).forEach(key => {
+ if (key !== 'level') {
+ entry[key] = data[key];
+ }
+ });
+
+ logger[level](entry, message, ...args);
+};
+
+/**
+ * Returns a bunyan-compatible logger interface. Uses either provided logger or
+ * creates a default console logger
+ *
+ * @param {Object} [options] Options object that might include 'logger' value
+ * @return {Object} bunyan compatible logger
+ */
+module.exports.getLogger = (options, defaults) => {
+ options = options || {};
+
+ let response = {};
+ let levels = ['trace', 'debug', 'info', 'warn', 'error', 'fatal'];
+
+ if (!options.logger) {
+ // use vanity logger
+ levels.forEach(level => {
+ response[level] = () => false;
+ });
+ return response;
+ }
+
+ let logger = options.logger;
+
+ if (options.logger === true) {
+ // create console logger
+ logger = createDefaultLogger(levels);
+ }
+
+ levels.forEach(level => {
+ response[level] = (data, message, ...args) => {
+ module.exports._logFunc(logger, level, defaults, data, message, ...args);
+ };
+ });
+
+ return response;
+};
+
+/**
+ * Wrapper for creating a callback that either resolves or rejects a promise
+ * based on input
+ *
+ * @param {Function} resolve Function to run if callback is called
+ * @param {Function} reject Function to run if callback ends with an error
+ */
+module.exports.callbackPromise = (resolve, reject) =>
+ function () {
+ let args = Array.from(arguments);
+ let err = args.shift();
+ if (err) {
+ reject(err);
+ } else {
+ resolve(...args);
+ }
+ };
+
+module.exports.parseDataURI = uri => {
+ let input = uri;
+ let commaPos = input.indexOf(',');
+ if (!commaPos) {
+ return uri;
+ }
+
+ let data = input.substring(commaPos + 1);
+ let metaStr = input.substring('data:'.length, commaPos);
+
+ let encoding;
+
+ let metaEntries = metaStr.split(';');
+ let lastMetaEntry = metaEntries.length > 1 ? metaEntries[metaEntries.length - 1] : false;
+ if (lastMetaEntry && lastMetaEntry.indexOf('=') < 0) {
+ encoding = lastMetaEntry.toLowerCase();
+ metaEntries.pop();
+ }
+
+ let contentType = metaEntries.shift() || 'application/octet-stream';
+ let params = {};
+ for (let entry of metaEntries) {
+ let sep = entry.indexOf('=');
+ if (sep >= 0) {
+ let key = entry.substring(0, sep);
+ let value = entry.substring(sep + 1);
+ params[key] = value;
+ }
+ }
+
+ switch (encoding) {
+ case 'base64':
+ data = Buffer.from(data, 'base64');
+ break;
+ case 'utf8':
+ data = Buffer.from(data);
+ break;
+ default:
+ try {
+ data = Buffer.from(decodeURIComponent(data));
+ } catch (err) {
+ data = Buffer.from(data);
+ }
+ data = Buffer.from(data);
+ }
+
+ return { data, encoding, contentType, params };
+};
+
+/**
+ * Resolves a String or a Buffer value for content value. Useful if the value
+ * is a Stream or a file or an URL. If the value is a Stream, overwrites
+ * the stream object with the resolved value (you can't stream a value twice).
+ *
+ * This is useful when you want to create a plugin that needs a content value,
+ * for example the `html` or `text` value as a String or a Buffer but not as
+ * a file path or an URL.
+ *
+ * @param {Object} data An object or an Array you want to resolve an element for
+ * @param {String|Number} key Property name or an Array index
+ * @param {Function} callback Callback function with (err, value)
+ */
+module.exports.resolveContent = (data, key, callback) => {
+ let promise;
+
+ if (!callback) {
+ promise = new Promise((resolve, reject) => {
+ callback = module.exports.callbackPromise(resolve, reject);
+ });
+ }
+
+ let content = (data && data[key] && data[key].content) || data[key];
+ let contentStream;
+ let encoding = ((typeof data[key] === 'object' && data[key].encoding) || 'utf8')
+ .toString()
+ .toLowerCase()
+ .replace(/[-_\s]/g, '');
+
+ if (!content) {
+ return callback(null, content);
+ }
+
+ if (typeof content === 'object') {
+ if (typeof content.pipe === 'function') {
+ return resolveStream(content, (err, value) => {
+ if (err) {
+ return callback(err);
+ }
+ // we can't stream twice the same content, so we need
+ // to replace the stream object with the streaming result
+ if (data[key].content) {
+ data[key].content = value;
+ } else {
+ data[key] = value;
+ }
+ callback(null, value);
+ });
+ } else if (/^https?:\/\//i.test(content.path || content.href)) {
+ contentStream = nmfetch(content.path || content.href);
+ return resolveStream(contentStream, callback);
+ } else if (/^data:/i.test(content.path || content.href)) {
+ let parsedDataUri = module.exports.parseDataURI(content.path || content.href);
+
+ if (!parsedDataUri || !parsedDataUri.data) {
+ return callback(null, Buffer.from(0));
+ }
+ return callback(null, parsedDataUri.data);
+ } else if (content.path) {
+ return resolveStream(fs.createReadStream(content.path), callback);
+ }
+ }
+
+ if (typeof data[key].content === 'string' && !['utf8', 'usascii', 'ascii'].includes(encoding)) {
+ content = Buffer.from(data[key].content, encoding);
+ }
+
+ // default action, return as is
+ setImmediate(() => callback(null, content));
+
+ return promise;
+};
+
+/**
+ * Copies properties from source objects to target objects
+ */
+module.exports.assign = function (/* target, ... sources */) {
+ let args = Array.from(arguments);
+ let target = args.shift() || {};
+
+ args.forEach(source => {
+ Object.keys(source || {}).forEach(key => {
+ if (['tls', 'auth'].includes(key) && source[key] && typeof source[key] === 'object') {
+ // tls and auth are special keys that need to be enumerated separately
+ // other objects are passed as is
+ if (!target[key]) {
+ // ensure that target has this key
+ target[key] = {};
+ }
+ Object.keys(source[key]).forEach(subKey => {
+ target[key][subKey] = source[key][subKey];
+ });
+ } else {
+ target[key] = source[key];
+ }
+ });
+ });
+ return target;
+};
+
+module.exports.encodeXText = str => {
+ // ! 0x21
+ // + 0x2B
+ // = 0x3D
+ // ~ 0x7E
+ if (!/[^\x21-\x2A\x2C-\x3C\x3E-\x7E]/.test(str)) {
+ return str;
+ }
+ let buf = Buffer.from(str);
+ let result = '';
+ for (let i = 0, len = buf.length; i < len; i++) {
+ let c = buf[i];
+ if (c < 0x21 || c > 0x7e || c === 0x2b || c === 0x3d) {
+ result += '+' + (c < 0x10 ? '0' : '') + c.toString(16).toUpperCase();
+ } else {
+ result += String.fromCharCode(c);
+ }
+ }
+ return result;
+};
+
+/**
+ * Streams a stream value into a Buffer
+ *
+ * @param {Object} stream Readable stream
+ * @param {Function} callback Callback function with (err, value)
+ */
+function resolveStream(stream, callback) {
+ let responded = false;
+ let chunks = [];
+ let chunklen = 0;
+
+ stream.on('error', err => {
+ if (responded) {
+ return;
+ }
+
+ responded = true;
+ callback(err);
+ });
+
+ stream.on('readable', () => {
+ let chunk;
+ while ((chunk = stream.read()) !== null) {
+ chunks.push(chunk);
+ chunklen += chunk.length;
+ }
+ });
+
+ stream.on('end', () => {
+ if (responded) {
+ return;
+ }
+ responded = true;
+
+ let value;
+
+ try {
+ value = Buffer.concat(chunks, chunklen);
+ } catch (E) {
+ return callback(E);
+ }
+ callback(null, value);
+ });
+}
+
+/**
+ * Generates a bunyan-like logger that prints to console
+ *
+ * @returns {Object} Bunyan logger instance
+ */
+function createDefaultLogger(levels) {
+ let levelMaxLen = 0;
+ let levelNames = new Map();
+ levels.forEach(level => {
+ if (level.length > levelMaxLen) {
+ levelMaxLen = level.length;
+ }
+ });
+
+ levels.forEach(level => {
+ let levelName = level.toUpperCase();
+ if (levelName.length < levelMaxLen) {
+ levelName += ' '.repeat(levelMaxLen - levelName.length);
+ }
+ levelNames.set(level, levelName);
+ });
+
+ let print = (level, entry, message, ...args) => {
+ let prefix = '';
+ if (entry) {
+ if (entry.tnx === 'server') {
+ prefix = 'S: ';
+ } else if (entry.tnx === 'client') {
+ prefix = 'C: ';
+ }
+
+ if (entry.sid) {
+ prefix = '[' + entry.sid + '] ' + prefix;
+ }
+
+ if (entry.cid) {
+ prefix = '[#' + entry.cid + '] ' + prefix;
+ }
+ }
+
+ message = util.format(message, ...args);
+ message.split(/\r?\n/).forEach(line => {
+ console.log('[%s] %s %s', new Date().toISOString().substr(0, 19).replace(/T/, ' '), levelNames.get(level), prefix + line);
+ });
+ };
+
+ let logger = {};
+ levels.forEach(level => {
+ logger[level] = print.bind(null, level);
+ });
+
+ return logger;
+}
+
+
+/***/ }),
+
+/***/ 4447:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const stream = __nccwpck_require__(2781);
+const Transform = stream.Transform;
+
+/**
+ * Escapes dots in the beginning of lines. Ends the stream with .
+ * Also makes sure that only sequences are used for linebreaks
+ *
+ * @param {Object} options Stream options
+ */
+class DataStream extends Transform {
+ constructor(options) {
+ super(options);
+ // init Transform
+ this.options = options || {};
+ this._curLine = '';
+
+ this.inByteCount = 0;
+ this.outByteCount = 0;
+ this.lastByte = false;
+ }
+
+ /**
+ * Escapes dots
+ */
+ _transform(chunk, encoding, done) {
+ let chunks = [];
+ let chunklen = 0;
+ let i,
+ len,
+ lastPos = 0;
+ let buf;
+
+ if (!chunk || !chunk.length) {
+ return done();
+ }
+
+ if (typeof chunk === 'string') {
+ chunk = Buffer.from(chunk);
+ }
+
+ this.inByteCount += chunk.length;
+
+ for (i = 0, len = chunk.length; i < len; i++) {
+ if (chunk[i] === 0x2e) {
+ // .
+ if ((i && chunk[i - 1] === 0x0a) || (!i && (!this.lastByte || this.lastByte === 0x0a))) {
+ buf = chunk.slice(lastPos, i + 1);
+ chunks.push(buf);
+ chunks.push(Buffer.from('.'));
+ chunklen += buf.length + 1;
+ lastPos = i + 1;
+ }
+ } else if (chunk[i] === 0x0a) {
+ // .
+ if ((i && chunk[i - 1] !== 0x0d) || (!i && this.lastByte !== 0x0d)) {
+ if (i > lastPos) {
+ buf = chunk.slice(lastPos, i);
+ chunks.push(buf);
+ chunklen += buf.length + 2;
+ } else {
+ chunklen += 2;
+ }
+ chunks.push(Buffer.from('\r\n'));
+ lastPos = i + 1;
+ }
+ }
+ }
+
+ if (chunklen) {
+ // add last piece
+ if (lastPos < chunk.length) {
+ buf = chunk.slice(lastPos);
+ chunks.push(buf);
+ chunklen += buf.length;
+ }
+
+ this.outByteCount += chunklen;
+ this.push(Buffer.concat(chunks, chunklen));
+ } else {
+ this.outByteCount += chunk.length;
+ this.push(chunk);
+ }
+
+ this.lastByte = chunk[chunk.length - 1];
+ done();
+ }
+
+ /**
+ * Finalizes the stream with a dot on a single line
+ */
+ _flush(done) {
+ let buf;
+ if (this.lastByte === 0x0a) {
+ buf = Buffer.from('.\r\n');
+ } else if (this.lastByte === 0x0d) {
+ buf = Buffer.from('\n.\r\n');
+ } else {
+ buf = Buffer.from('\r\n.\r\n');
+ }
+ this.outByteCount += buf.length;
+ this.push(buf);
+ done();
+ }
+}
+
+module.exports = DataStream;
+
+
+/***/ }),
+
+/***/ 2790:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+/**
+ * Minimal HTTP/S proxy client
+ */
+
+const net = __nccwpck_require__(1808);
+const tls = __nccwpck_require__(4404);
+const urllib = __nccwpck_require__(7310);
+
+/**
+ * Establishes proxied connection to destinationPort
+ *
+ * httpProxyClient("http://localhost:3128/", 80, "google.com", function(err, socket){
+ * socket.write("GET / HTTP/1.0\r\n\r\n");
+ * });
+ *
+ * @param {String} proxyUrl proxy configuration, etg "http://proxy.host:3128/"
+ * @param {Number} destinationPort Port to open in destination host
+ * @param {String} destinationHost Destination hostname
+ * @param {Function} callback Callback to run with the rocket object once connection is established
+ */
+function httpProxyClient(proxyUrl, destinationPort, destinationHost, callback) {
+ let proxy = urllib.parse(proxyUrl);
+
+ // create a socket connection to the proxy server
+ let options;
+ let connect;
+ let socket;
+
+ options = {
+ host: proxy.hostname,
+ port: Number(proxy.port) ? Number(proxy.port) : proxy.protocol === 'https:' ? 443 : 80
+ };
+
+ if (proxy.protocol === 'https:') {
+ // we can use untrusted proxies as long as we verify actual SMTP certificates
+ options.rejectUnauthorized = false;
+ connect = tls.connect.bind(tls);
+ } else {
+ connect = net.connect.bind(net);
+ }
+
+ // Error harness for initial connection. Once connection is established, the responsibility
+ // to handle errors is passed to whoever uses this socket
+ let finished = false;
+ let tempSocketErr = err => {
+ if (finished) {
+ return;
+ }
+ finished = true;
+ try {
+ socket.destroy();
+ } catch (E) {
+ // ignore
+ }
+ callback(err);
+ };
+
+ let timeoutErr = () => {
+ let err = new Error('Proxy socket timed out');
+ err.code = 'ETIMEDOUT';
+ tempSocketErr(err);
+ };
+
+ socket = connect(options, () => {
+ if (finished) {
+ return;
+ }
+
+ let reqHeaders = {
+ Host: destinationHost + ':' + destinationPort,
+ Connection: 'close'
+ };
+ if (proxy.auth) {
+ reqHeaders['Proxy-Authorization'] = 'Basic ' + Buffer.from(proxy.auth).toString('base64');
+ }
+
+ socket.write(
+ // HTTP method
+ 'CONNECT ' +
+ destinationHost +
+ ':' +
+ destinationPort +
+ ' HTTP/1.1\r\n' +
+ // HTTP request headers
+ Object.keys(reqHeaders)
+ .map(key => key + ': ' + reqHeaders[key])
+ .join('\r\n') +
+ // End request
+ '\r\n\r\n'
+ );
+
+ let headers = '';
+ let onSocketData = chunk => {
+ let match;
+ let remainder;
+
+ if (finished) {
+ return;
+ }
+
+ headers += chunk.toString('binary');
+ if ((match = headers.match(/\r\n\r\n/))) {
+ socket.removeListener('data', onSocketData);
+
+ remainder = headers.substr(match.index + match[0].length);
+ headers = headers.substr(0, match.index);
+ if (remainder) {
+ socket.unshift(Buffer.from(remainder, 'binary'));
+ }
+
+ // proxy connection is now established
+ finished = true;
+
+ // check response code
+ match = headers.match(/^HTTP\/\d+\.\d+ (\d+)/i);
+ if (!match || (match[1] || '').charAt(0) !== '2') {
+ try {
+ socket.destroy();
+ } catch (E) {
+ // ignore
+ }
+ return callback(new Error('Invalid response from proxy' + ((match && ': ' + match[1]) || '')));
+ }
+
+ socket.removeListener('error', tempSocketErr);
+ socket.removeListener('timeout', timeoutErr);
+ socket.setTimeout(0);
+
+ return callback(null, socket);
+ }
+ };
+ socket.on('data', onSocketData);
+ });
+
+ socket.setTimeout(httpProxyClient.timeout || 30 * 1000);
+ socket.on('timeout', timeoutErr);
+
+ socket.once('error', tempSocketErr);
+}
+
+module.exports = httpProxyClient;
+
+
+/***/ }),
+
+/***/ 3559:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const packageInfo = __nccwpck_require__(4129);
+const EventEmitter = (__nccwpck_require__(2361).EventEmitter);
+const net = __nccwpck_require__(1808);
+const tls = __nccwpck_require__(4404);
+const os = __nccwpck_require__(2037);
+const crypto = __nccwpck_require__(6113);
+const DataStream = __nccwpck_require__(4447);
+const PassThrough = (__nccwpck_require__(2781).PassThrough);
+const shared = __nccwpck_require__(2673);
+
+// default timeout values in ms
+const CONNECTION_TIMEOUT = 2 * 60 * 1000; // how much to wait for the connection to be established
+const SOCKET_TIMEOUT = 10 * 60 * 1000; // how much to wait for socket inactivity before disconnecting the client
+const GREETING_TIMEOUT = 30 * 1000; // how much to wait after connection is established but SMTP greeting is not receieved
+const DNS_TIMEOUT = 30 * 1000; // how much to wait for resolveHostname
+
+/**
+ * Generates a SMTP connection object
+ *
+ * Optional options object takes the following possible properties:
+ *
+ * * **port** - is the port to connect to (defaults to 587 or 465)
+ * * **host** - is the hostname or IP address to connect to (defaults to 'localhost')
+ * * **secure** - use SSL
+ * * **ignoreTLS** - ignore server support for STARTTLS
+ * * **requireTLS** - forces the client to use STARTTLS
+ * * **name** - the name of the client server
+ * * **localAddress** - outbound address to bind to (see: http://nodejs.org/api/net.html#net_net_connect_options_connectionlistener)
+ * * **greetingTimeout** - Time to wait in ms until greeting message is received from the server (defaults to 10000)
+ * * **connectionTimeout** - how many milliseconds to wait for the connection to establish
+ * * **socketTimeout** - Time of inactivity until the connection is closed (defaults to 1 hour)
+ * * **dnsTimeout** - Time to wait in ms for the DNS requests to be resolved (defaults to 30 seconds)
+ * * **lmtp** - if true, uses LMTP instead of SMTP protocol
+ * * **logger** - bunyan compatible logger interface
+ * * **debug** - if true pass SMTP traffic to the logger
+ * * **tls** - options for createCredentials
+ * * **socket** - existing socket to use instead of creating a new one (see: http://nodejs.org/api/net.html#net_class_net_socket)
+ * * **secured** - boolean indicates that the provided socket has already been upgraded to tls
+ *
+ * @constructor
+ * @namespace SMTP Client module
+ * @param {Object} [options] Option properties
+ */
+class SMTPConnection extends EventEmitter {
+ constructor(options) {
+ super(options);
+
+ this.id = crypto.randomBytes(8).toString('base64').replace(/\W/g, '');
+ this.stage = 'init';
+
+ this.options = options || {};
+
+ this.secureConnection = !!this.options.secure;
+ this.alreadySecured = !!this.options.secured;
+
+ this.port = Number(this.options.port) || (this.secureConnection ? 465 : 587);
+ this.host = this.options.host || 'localhost';
+
+ this.servername = this.options.servername ? this.options.servername : !net.isIP(this.host) ? this.host : false;
+
+ this.allowInternalNetworkInterfaces = this.options.allowInternalNetworkInterfaces || false;
+
+ if (typeof this.options.secure === 'undefined' && this.port === 465) {
+ // if secure option is not set but port is 465, then default to secure
+ this.secureConnection = true;
+ }
+
+ this.name = this.options.name || this._getHostname();
+
+ this.logger = shared.getLogger(this.options, {
+ component: this.options.component || 'smtp-connection',
+ sid: this.id
+ });
+
+ this.customAuth = new Map();
+ Object.keys(this.options.customAuth || {}).forEach(key => {
+ let mapKey = (key || '').toString().trim().toUpperCase();
+ if (!mapKey) {
+ return;
+ }
+ this.customAuth.set(mapKey, this.options.customAuth[key]);
+ });
+
+ /**
+ * Expose version nr, just for the reference
+ * @type {String}
+ */
+ this.version = packageInfo.version;
+
+ /**
+ * If true, then the user is authenticated
+ * @type {Boolean}
+ */
+ this.authenticated = false;
+
+ /**
+ * If set to true, this instance is no longer active
+ * @private
+ */
+ this.destroyed = false;
+
+ /**
+ * Defines if the current connection is secure or not. If not,
+ * STARTTLS can be used if available
+ * @private
+ */
+ this.secure = !!this.secureConnection;
+
+ /**
+ * Store incomplete messages coming from the server
+ * @private
+ */
+ this._remainder = '';
+
+ /**
+ * Unprocessed responses from the server
+ * @type {Array}
+ */
+ this._responseQueue = [];
+
+ this.lastServerResponse = false;
+
+ /**
+ * The socket connecting to the server
+ * @publick
+ */
+ this._socket = false;
+
+ /**
+ * Lists supported auth mechanisms
+ * @private
+ */
+ this._supportedAuth = [];
+
+ /**
+ * Set to true, if EHLO response includes "AUTH".
+ * If false then authentication is not tried
+ */
+ this.allowsAuth = false;
+
+ /**
+ * Includes current envelope (from, to)
+ * @private
+ */
+ this._envelope = false;
+
+ /**
+ * Lists supported extensions
+ * @private
+ */
+ this._supportedExtensions = [];
+
+ /**
+ * Defines the maximum allowed size for a single message
+ * @private
+ */
+ this._maxAllowedSize = 0;
+
+ /**
+ * Function queue to run if a data chunk comes from the server
+ * @private
+ */
+ this._responseActions = [];
+ this._recipientQueue = [];
+
+ /**
+ * Timeout variable for waiting the greeting
+ * @private
+ */
+ this._greetingTimeout = false;
+
+ /**
+ * Timeout variable for waiting the connection to start
+ * @private
+ */
+ this._connectionTimeout = false;
+
+ /**
+ * If the socket is deemed already closed
+ * @private
+ */
+ this._destroyed = false;
+
+ /**
+ * If the socket is already being closed
+ * @private
+ */
+ this._closing = false;
+
+ /**
+ * Callbacks for socket's listeners
+ */
+ this._onSocketData = chunk => this._onData(chunk);
+ this._onSocketError = error => this._onError(error, 'ESOCKET', false, 'CONN');
+ this._onSocketClose = () => this._onClose();
+ this._onSocketEnd = () => this._onEnd();
+ this._onSocketTimeout = () => this._onTimeout();
+ }
+
+ /**
+ * Creates a connection to a SMTP server and sets up connection
+ * listener
+ */
+ connect(connectCallback) {
+ if (typeof connectCallback === 'function') {
+ this.once('connect', () => {
+ this.logger.debug(
+ {
+ tnx: 'smtp'
+ },
+ 'SMTP handshake finished'
+ );
+ connectCallback();
+ });
+
+ const isDestroyedMessage = this._isDestroyedMessage('connect');
+ if (isDestroyedMessage) {
+ return connectCallback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'CONN'));
+ }
+ }
+
+ let opts = {
+ port: this.port,
+ host: this.host,
+ allowInternalNetworkInterfaces: this.allowInternalNetworkInterfaces,
+ timeout: this.options.dnsTimeout || DNS_TIMEOUT
+ };
+
+ if (this.options.localAddress) {
+ opts.localAddress = this.options.localAddress;
+ }
+
+ let setupConnectionHandlers = () => {
+ this._connectionTimeout = setTimeout(() => {
+ this._onError('Connection timeout', 'ETIMEDOUT', false, 'CONN');
+ }, this.options.connectionTimeout || CONNECTION_TIMEOUT);
+
+ this._socket.on('error', this._onSocketError);
+ };
+
+ if (this.options.connection) {
+ // connection is already opened
+ this._socket = this.options.connection;
+ if (this.secureConnection && !this.alreadySecured) {
+ setImmediate(() =>
+ this._upgradeConnection(err => {
+ if (err) {
+ this._onError(new Error('Error initiating TLS - ' + (err.message || err)), 'ETLS', false, 'CONN');
+ return;
+ }
+ this._onConnect();
+ })
+ );
+ } else {
+ setImmediate(() => this._onConnect());
+ }
+ return;
+ } else if (this.options.socket) {
+ // socket object is set up but not yet connected
+ this._socket = this.options.socket;
+ return shared.resolveHostname(opts, (err, resolved) => {
+ if (err) {
+ return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));
+ }
+ this.logger.debug(
+ {
+ tnx: 'dns',
+ source: opts.host,
+ resolved: resolved.host,
+ cached: !!resolved.cached
+ },
+ 'Resolved %s as %s [cache %s]',
+ opts.host,
+ resolved.host,
+ resolved.cached ? 'hit' : 'miss'
+ );
+ Object.keys(resolved).forEach(key => {
+ if (key.charAt(0) !== '_' && resolved[key]) {
+ opts[key] = resolved[key];
+ }
+ });
+ try {
+ this._socket.connect(this.port, this.host, () => {
+ this._socket.setKeepAlive(true);
+ this._onConnect();
+ });
+ setupConnectionHandlers();
+ } catch (E) {
+ return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));
+ }
+ });
+ } else if (this.secureConnection) {
+ // connect using tls
+ if (this.options.tls) {
+ Object.keys(this.options.tls).forEach(key => {
+ opts[key] = this.options.tls[key];
+ });
+ }
+
+ // ensure servername for SNI
+ if (this.servername && !opts.servername) {
+ opts.servername = this.servername;
+ }
+
+ return shared.resolveHostname(opts, (err, resolved) => {
+ if (err) {
+ return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));
+ }
+ this.logger.debug(
+ {
+ tnx: 'dns',
+ source: opts.host,
+ resolved: resolved.host,
+ cached: !!resolved.cached
+ },
+ 'Resolved %s as %s [cache %s]',
+ opts.host,
+ resolved.host,
+ resolved.cached ? 'hit' : 'miss'
+ );
+ Object.keys(resolved).forEach(key => {
+ if (key.charAt(0) !== '_' && resolved[key]) {
+ opts[key] = resolved[key];
+ }
+ });
+ try {
+ this._socket = tls.connect(opts, () => {
+ this._socket.setKeepAlive(true);
+ this._onConnect();
+ });
+ setupConnectionHandlers();
+ } catch (E) {
+ return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));
+ }
+ });
+ } else {
+ // connect using plaintext
+ return shared.resolveHostname(opts, (err, resolved) => {
+ if (err) {
+ return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));
+ }
+ this.logger.debug(
+ {
+ tnx: 'dns',
+ source: opts.host,
+ resolved: resolved.host,
+ cached: !!resolved.cached
+ },
+ 'Resolved %s as %s [cache %s]',
+ opts.host,
+ resolved.host,
+ resolved.cached ? 'hit' : 'miss'
+ );
+ Object.keys(resolved).forEach(key => {
+ if (key.charAt(0) !== '_' && resolved[key]) {
+ opts[key] = resolved[key];
+ }
+ });
+ try {
+ this._socket = net.connect(opts, () => {
+ this._socket.setKeepAlive(true);
+ this._onConnect();
+ });
+ setupConnectionHandlers();
+ } catch (E) {
+ return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));
+ }
+ });
+ }
+ }
+
+ /**
+ * Sends QUIT
+ */
+ quit() {
+ this._sendCommand('QUIT');
+ this._responseActions.push(this.close);
+ }
+
+ /**
+ * Closes the connection to the server
+ */
+ close() {
+ clearTimeout(this._connectionTimeout);
+ clearTimeout(this._greetingTimeout);
+ this._responseActions = [];
+
+ // allow to run this function only once
+ if (this._closing) {
+ return;
+ }
+ this._closing = true;
+
+ let closeMethod = 'end';
+
+ if (this.stage === 'init') {
+ // Close the socket immediately when connection timed out
+ closeMethod = 'destroy';
+ }
+
+ this.logger.debug(
+ {
+ tnx: 'smtp'
+ },
+ 'Closing connection to the server using "%s"',
+ closeMethod
+ );
+
+ let socket = (this._socket && this._socket.socket) || this._socket;
+
+ if (socket && !socket.destroyed) {
+ try {
+ this._socket[closeMethod]();
+ } catch (E) {
+ // just ignore
+ }
+ }
+
+ this._destroy();
+ }
+
+ /**
+ * Authenticate user
+ */
+ login(authData, callback) {
+ const isDestroyedMessage = this._isDestroyedMessage('login');
+ if (isDestroyedMessage) {
+ return callback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'API'));
+ }
+
+ this._auth = authData || {};
+ // Select SASL authentication method
+ this._authMethod = (this._auth.method || '').toString().trim().toUpperCase() || false;
+
+ if (!this._authMethod && this._auth.oauth2 && !this._auth.credentials) {
+ this._authMethod = 'XOAUTH2';
+ } else if (!this._authMethod || (this._authMethod === 'XOAUTH2' && !this._auth.oauth2)) {
+ // use first supported
+ this._authMethod = (this._supportedAuth[0] || 'PLAIN').toUpperCase().trim();
+ }
+
+ if (this._authMethod !== 'XOAUTH2' && (!this._auth.credentials || !this._auth.credentials.user || !this._auth.credentials.pass)) {
+ if ((this._auth.user && this._auth.pass) || this.customAuth.has(this._authMethod)) {
+ this._auth.credentials = {
+ user: this._auth.user,
+ pass: this._auth.pass,
+ options: this._auth.options
+ };
+ } else {
+ return callback(this._formatError('Missing credentials for "' + this._authMethod + '"', 'EAUTH', false, 'API'));
+ }
+ }
+
+ if (this.customAuth.has(this._authMethod)) {
+ let handler = this.customAuth.get(this._authMethod);
+ let lastResponse;
+ let returned = false;
+
+ let resolve = () => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ this.logger.info(
+ {
+ tnx: 'smtp',
+ username: this._auth.user,
+ action: 'authenticated',
+ method: this._authMethod
+ },
+ 'User %s authenticated',
+ JSON.stringify(this._auth.user)
+ );
+ this.authenticated = true;
+ callback(null, true);
+ };
+
+ let reject = err => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ callback(this._formatError(err, 'EAUTH', lastResponse, 'AUTH ' + this._authMethod));
+ };
+
+ let handlerResponse = handler({
+ auth: this._auth,
+ method: this._authMethod,
+
+ extensions: [].concat(this._supportedExtensions),
+ authMethods: [].concat(this._supportedAuth),
+ maxAllowedSize: this._maxAllowedSize || false,
+
+ sendCommand: (cmd, done) => {
+ let promise;
+
+ if (!done) {
+ promise = new Promise((resolve, reject) => {
+ done = shared.callbackPromise(resolve, reject);
+ });
+ }
+
+ this._responseActions.push(str => {
+ lastResponse = str;
+
+ let codes = str.match(/^(\d+)(?:\s(\d+\.\d+\.\d+))?\s/);
+ let data = {
+ command: cmd,
+ response: str
+ };
+ if (codes) {
+ data.status = Number(codes[1]) || 0;
+ if (codes[2]) {
+ data.code = codes[2];
+ }
+ data.text = str.substr(codes[0].length);
+ } else {
+ data.text = str;
+ data.status = 0; // just in case we need to perform numeric comparisons
+ }
+ done(null, data);
+ });
+ setImmediate(() => this._sendCommand(cmd));
+
+ return promise;
+ },
+
+ resolve,
+ reject
+ });
+
+ if (handlerResponse && typeof handlerResponse.catch === 'function') {
+ // a promise was returned
+ handlerResponse.then(resolve).catch(reject);
+ }
+
+ return;
+ }
+
+ switch (this._authMethod) {
+ case 'XOAUTH2':
+ this._handleXOauth2Token(false, callback);
+ return;
+ case 'LOGIN':
+ this._responseActions.push(str => {
+ this._actionAUTH_LOGIN_USER(str, callback);
+ });
+ this._sendCommand('AUTH LOGIN');
+ return;
+ case 'PLAIN':
+ this._responseActions.push(str => {
+ this._actionAUTHComplete(str, callback);
+ });
+ this._sendCommand(
+ 'AUTH PLAIN ' +
+ Buffer.from(
+ //this._auth.user+'\u0000'+
+ '\u0000' + // skip authorization identity as it causes problems with some servers
+ this._auth.credentials.user +
+ '\u0000' +
+ this._auth.credentials.pass,
+ 'utf-8'
+ ).toString('base64'),
+ // log entry without passwords
+ 'AUTH PLAIN ' +
+ Buffer.from(
+ //this._auth.user+'\u0000'+
+ '\u0000' + // skip authorization identity as it causes problems with some servers
+ this._auth.credentials.user +
+ '\u0000' +
+ '/* secret */',
+ 'utf-8'
+ ).toString('base64')
+ );
+ return;
+ case 'CRAM-MD5':
+ this._responseActions.push(str => {
+ this._actionAUTH_CRAM_MD5(str, callback);
+ });
+ this._sendCommand('AUTH CRAM-MD5');
+ return;
+ }
+
+ return callback(this._formatError('Unknown authentication method "' + this._authMethod + '"', 'EAUTH', false, 'API'));
+ }
+
+ /**
+ * Sends a message
+ *
+ * @param {Object} envelope Envelope object, {from: addr, to: [addr]}
+ * @param {Object} message String, Buffer or a Stream
+ * @param {Function} callback Callback to return once sending is completed
+ */
+ send(envelope, message, done) {
+ if (!message) {
+ return done(this._formatError('Empty message', 'EMESSAGE', false, 'API'));
+ }
+
+ const isDestroyedMessage = this._isDestroyedMessage('send message');
+ if (isDestroyedMessage) {
+ return done(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'API'));
+ }
+
+ // reject larger messages than allowed
+ if (this._maxAllowedSize && envelope.size > this._maxAllowedSize) {
+ return setImmediate(() => {
+ done(this._formatError('Message size larger than allowed ' + this._maxAllowedSize, 'EMESSAGE', false, 'MAIL FROM'));
+ });
+ }
+
+ // ensure that callback is only called once
+ let returned = false;
+ let callback = function () {
+ if (returned) {
+ return;
+ }
+ returned = true;
+
+ done(...arguments);
+ };
+
+ if (typeof message.on === 'function') {
+ message.on('error', err => callback(this._formatError(err, 'ESTREAM', false, 'API')));
+ }
+
+ let startTime = Date.now();
+ this._setEnvelope(envelope, (err, info) => {
+ if (err) {
+ return callback(err);
+ }
+ let envelopeTime = Date.now();
+ let stream = this._createSendStream((err, str) => {
+ if (err) {
+ return callback(err);
+ }
+
+ info.envelopeTime = envelopeTime - startTime;
+ info.messageTime = Date.now() - envelopeTime;
+ info.messageSize = stream.outByteCount;
+ info.response = str;
+
+ return callback(null, info);
+ });
+ if (typeof message.pipe === 'function') {
+ message.pipe(stream);
+ } else {
+ stream.write(message);
+ stream.end();
+ }
+ });
+ }
+
+ /**
+ * Resets connection state
+ *
+ * @param {Function} callback Callback to return once connection is reset
+ */
+ reset(callback) {
+ this._sendCommand('RSET');
+ this._responseActions.push(str => {
+ if (str.charAt(0) !== '2') {
+ return callback(this._formatError('Could not reset session state. response=' + str, 'EPROTOCOL', str, 'RSET'));
+ }
+ this._envelope = false;
+ return callback(null, true);
+ });
+ }
+
+ /**
+ * Connection listener that is run when the connection to
+ * the server is opened
+ *
+ * @event
+ */
+ _onConnect() {
+ clearTimeout(this._connectionTimeout);
+
+ this.logger.info(
+ {
+ tnx: 'network',
+ localAddress: this._socket.localAddress,
+ localPort: this._socket.localPort,
+ remoteAddress: this._socket.remoteAddress,
+ remotePort: this._socket.remotePort
+ },
+ '%s established to %s:%s',
+ this.secure ? 'Secure connection' : 'Connection',
+ this._socket.remoteAddress,
+ this._socket.remotePort
+ );
+
+ if (this._destroyed) {
+ // Connection was established after we already had canceled it
+ this.close();
+ return;
+ }
+
+ this.stage = 'connected';
+
+ // clear existing listeners for the socket
+ this._socket.removeListener('data', this._onSocketData);
+ this._socket.removeListener('timeout', this._onSocketTimeout);
+ this._socket.removeListener('close', this._onSocketClose);
+ this._socket.removeListener('end', this._onSocketEnd);
+
+ this._socket.on('data', this._onSocketData);
+ this._socket.once('close', this._onSocketClose);
+ this._socket.once('end', this._onSocketEnd);
+
+ this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT);
+ this._socket.on('timeout', this._onSocketTimeout);
+
+ this._greetingTimeout = setTimeout(() => {
+ // if still waiting for greeting, give up
+ if (this._socket && !this._destroyed && this._responseActions[0] === this._actionGreeting) {
+ this._onError('Greeting never received', 'ETIMEDOUT', false, 'CONN');
+ }
+ }, this.options.greetingTimeout || GREETING_TIMEOUT);
+
+ this._responseActions.push(this._actionGreeting);
+
+ // we have a 'data' listener set up so resume socket if it was paused
+ this._socket.resume();
+ }
+
+ /**
+ * 'data' listener for data coming from the server
+ *
+ * @event
+ * @param {Buffer} chunk Data chunk coming from the server
+ */
+ _onData(chunk) {
+ if (this._destroyed || !chunk || !chunk.length) {
+ return;
+ }
+
+ let data = (chunk || '').toString('binary');
+ let lines = (this._remainder + data).split(/\r?\n/);
+ let lastline;
+
+ this._remainder = lines.pop();
+
+ for (let i = 0, len = lines.length; i < len; i++) {
+ if (this._responseQueue.length) {
+ lastline = this._responseQueue[this._responseQueue.length - 1];
+ if (/^\d+-/.test(lastline.split('\n').pop())) {
+ this._responseQueue[this._responseQueue.length - 1] += '\n' + lines[i];
+ continue;
+ }
+ }
+ this._responseQueue.push(lines[i]);
+ }
+
+ if (this._responseQueue.length) {
+ lastline = this._responseQueue[this._responseQueue.length - 1];
+ if (/^\d+-/.test(lastline.split('\n').pop())) {
+ return;
+ }
+ }
+
+ this._processResponse();
+ }
+
+ /**
+ * 'error' listener for the socket
+ *
+ * @event
+ * @param {Error} err Error object
+ * @param {String} type Error name
+ */
+ _onError(err, type, data, command) {
+ clearTimeout(this._connectionTimeout);
+ clearTimeout(this._greetingTimeout);
+
+ if (this._destroyed) {
+ // just ignore, already closed
+ // this might happen when a socket is canceled because of reached timeout
+ // but the socket timeout error itself receives only after
+ return;
+ }
+
+ err = this._formatError(err, type, data, command);
+
+ this.logger.error(data, err.message);
+
+ this.emit('error', err);
+ this.close();
+ }
+
+ _formatError(message, type, response, command) {
+ let err;
+
+ if (/Error\]$/i.test(Object.prototype.toString.call(message))) {
+ err = message;
+ } else {
+ err = new Error(message);
+ }
+
+ if (type && type !== 'Error') {
+ err.code = type;
+ }
+
+ if (response) {
+ err.response = response;
+ err.message += ': ' + response;
+ }
+
+ let responseCode = (typeof response === 'string' && Number((response.match(/^\d+/) || [])[0])) || false;
+ if (responseCode) {
+ err.responseCode = responseCode;
+ }
+
+ if (command) {
+ err.command = command;
+ }
+
+ return err;
+ }
+
+ /**
+ * 'close' listener for the socket
+ *
+ * @event
+ */
+ _onClose() {
+ let serverResponse = false;
+
+ if (this._remainder && this._remainder.trim()) {
+ if (this.options.debug || this.options.transactionLog) {
+ this.logger.debug(
+ {
+ tnx: 'server'
+ },
+ this._remainder.replace(/\r?\n$/, '')
+ );
+ }
+ this.lastServerResponse = serverResponse = this._remainder.trim();
+ }
+
+ this.logger.info(
+ {
+ tnx: 'network'
+ },
+ 'Connection closed'
+ );
+
+ if (this.upgrading && !this._destroyed) {
+ return this._onError(new Error('Connection closed unexpectedly'), 'ETLS', serverResponse, 'CONN');
+ } else if (![this._actionGreeting, this.close].includes(this._responseActions[0]) && !this._destroyed) {
+ return this._onError(new Error('Connection closed unexpectedly'), 'ECONNECTION', serverResponse, 'CONN');
+ } else if (/^[45]\d{2}\b/.test(serverResponse)) {
+ return this._onError(new Error('Connection closed unexpectedly'), 'ECONNECTION', serverResponse, 'CONN');
+ }
+
+ this._destroy();
+ }
+
+ /**
+ * 'end' listener for the socket
+ *
+ * @event
+ */
+ _onEnd() {
+ if (this._socket && !this._socket.destroyed) {
+ this._socket.destroy();
+ }
+ }
+
+ /**
+ * 'timeout' listener for the socket
+ *
+ * @event
+ */
+ _onTimeout() {
+ return this._onError(new Error('Timeout'), 'ETIMEDOUT', false, 'CONN');
+ }
+
+ /**
+ * Destroys the client, emits 'end'
+ */
+ _destroy() {
+ if (this._destroyed) {
+ return;
+ }
+ this._destroyed = true;
+ this.emit('end');
+ }
+
+ /**
+ * Upgrades the connection to TLS
+ *
+ * @param {Function} callback Callback function to run when the connection
+ * has been secured
+ */
+ _upgradeConnection(callback) {
+ // do not remove all listeners or it breaks node v0.10 as there's
+ // apparently a 'finish' event set that would be cleared as well
+
+ // we can safely keep 'error', 'end', 'close' etc. events
+ this._socket.removeListener('data', this._onSocketData); // incoming data is going to be gibberish from this point onwards
+ this._socket.removeListener('timeout', this._onSocketTimeout); // timeout will be re-set for the new socket object
+
+ let socketPlain = this._socket;
+ let opts = {
+ socket: this._socket,
+ host: this.host
+ };
+
+ Object.keys(this.options.tls || {}).forEach(key => {
+ opts[key] = this.options.tls[key];
+ });
+
+ // ensure servername for SNI
+ if (this.servername && !opts.servername) {
+ opts.servername = this.servername;
+ }
+
+ this.upgrading = true;
+ // tls.connect is not an asynchronous function however it may still throw errors and requires to be wrapped with try/catch
+ try {
+ this._socket = tls.connect(opts, () => {
+ this.secure = true;
+ this.upgrading = false;
+ this._socket.on('data', this._onSocketData);
+
+ socketPlain.removeListener('close', this._onSocketClose);
+ socketPlain.removeListener('end', this._onSocketEnd);
+
+ return callback(null, true);
+ });
+ } catch (err) {
+ return callback(err);
+ }
+
+ this._socket.on('error', this._onSocketError);
+ this._socket.once('close', this._onSocketClose);
+ this._socket.once('end', this._onSocketEnd);
+
+ this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT); // 10 min.
+ this._socket.on('timeout', this._onSocketTimeout);
+
+ // resume in case the socket was paused
+ socketPlain.resume();
+ }
+
+ /**
+ * Processes queued responses from the server
+ *
+ * @param {Boolean} force If true, ignores _processing flag
+ */
+ _processResponse() {
+ if (!this._responseQueue.length) {
+ return false;
+ }
+
+ let str = (this.lastServerResponse = (this._responseQueue.shift() || '').toString());
+
+ if (/^\d+-/.test(str.split('\n').pop())) {
+ // keep waiting for the final part of multiline response
+ return;
+ }
+
+ if (this.options.debug || this.options.transactionLog) {
+ this.logger.debug(
+ {
+ tnx: 'server'
+ },
+ str.replace(/\r?\n$/, '')
+ );
+ }
+
+ if (!str.trim()) {
+ // skip unexpected empty lines
+ setImmediate(() => this._processResponse());
+ }
+
+ let action = this._responseActions.shift();
+
+ if (typeof action === 'function') {
+ action.call(this, str);
+ setImmediate(() => this._processResponse());
+ } else {
+ return this._onError(new Error('Unexpected Response'), 'EPROTOCOL', str, 'CONN');
+ }
+ }
+
+ /**
+ * Send a command to the server, append \r\n
+ *
+ * @param {String} str String to be sent to the server
+ * @param {String} logStr Optional string to be used for logging instead of the actual string
+ */
+ _sendCommand(str, logStr) {
+ if (this._destroyed) {
+ // Connection already closed, can't send any more data
+ return;
+ }
+
+ if (this._socket.destroyed) {
+ return this.close();
+ }
+
+ if (this.options.debug || this.options.transactionLog) {
+ this.logger.debug(
+ {
+ tnx: 'client'
+ },
+ (logStr || str || '').toString().replace(/\r?\n$/, '')
+ );
+ }
+
+ this._socket.write(Buffer.from(str + '\r\n', 'utf-8'));
+ }
+
+ /**
+ * Initiates a new message by submitting envelope data, starting with
+ * MAIL FROM: command
+ *
+ * @param {Object} envelope Envelope object in the form of
+ * {from:'...', to:['...']}
+ * or
+ * {from:{address:'...',name:'...'}, to:[address:'...',name:'...']}
+ */
+ _setEnvelope(envelope, callback) {
+ let args = [];
+ let useSmtpUtf8 = false;
+
+ this._envelope = envelope || {};
+ this._envelope.from = ((this._envelope.from && this._envelope.from.address) || this._envelope.from || '').toString().trim();
+
+ this._envelope.to = [].concat(this._envelope.to || []).map(to => ((to && to.address) || to || '').toString().trim());
+
+ if (!this._envelope.to.length) {
+ return callback(this._formatError('No recipients defined', 'EENVELOPE', false, 'API'));
+ }
+
+ if (this._envelope.from && /[\r\n<>]/.test(this._envelope.from)) {
+ return callback(this._formatError('Invalid sender ' + JSON.stringify(this._envelope.from), 'EENVELOPE', false, 'API'));
+ }
+
+ // check if the sender address uses only ASCII characters,
+ // otherwise require usage of SMTPUTF8 extension
+ if (/[\x80-\uFFFF]/.test(this._envelope.from)) {
+ useSmtpUtf8 = true;
+ }
+
+ for (let i = 0, len = this._envelope.to.length; i < len; i++) {
+ if (!this._envelope.to[i] || /[\r\n<>]/.test(this._envelope.to[i])) {
+ return callback(this._formatError('Invalid recipient ' + JSON.stringify(this._envelope.to[i]), 'EENVELOPE', false, 'API'));
+ }
+
+ // check if the recipients addresses use only ASCII characters,
+ // otherwise require usage of SMTPUTF8 extension
+ if (/[\x80-\uFFFF]/.test(this._envelope.to[i])) {
+ useSmtpUtf8 = true;
+ }
+ }
+
+ // clone the recipients array for latter manipulation
+ this._envelope.rcptQueue = JSON.parse(JSON.stringify(this._envelope.to || []));
+ this._envelope.rejected = [];
+ this._envelope.rejectedErrors = [];
+ this._envelope.accepted = [];
+
+ if (this._envelope.dsn) {
+ try {
+ this._envelope.dsn = this._setDsnEnvelope(this._envelope.dsn);
+ } catch (err) {
+ return callback(this._formatError('Invalid DSN ' + err.message, 'EENVELOPE', false, 'API'));
+ }
+ }
+
+ this._responseActions.push(str => {
+ this._actionMAIL(str, callback);
+ });
+
+ // If the server supports SMTPUTF8 and the envelope includes an internationalized
+ // email address then append SMTPUTF8 keyword to the MAIL FROM command
+ if (useSmtpUtf8 && this._supportedExtensions.includes('SMTPUTF8')) {
+ args.push('SMTPUTF8');
+ this._usingSmtpUtf8 = true;
+ }
+
+ // If the server supports 8BITMIME and the message might contain non-ascii bytes
+ // then append the 8BITMIME keyword to the MAIL FROM command
+ if (this._envelope.use8BitMime && this._supportedExtensions.includes('8BITMIME')) {
+ args.push('BODY=8BITMIME');
+ this._using8BitMime = true;
+ }
+
+ if (this._envelope.size && this._supportedExtensions.includes('SIZE')) {
+ args.push('SIZE=' + this._envelope.size);
+ }
+
+ // If the server supports DSN and the envelope includes an DSN prop
+ // then append DSN params to the MAIL FROM command
+ if (this._envelope.dsn && this._supportedExtensions.includes('DSN')) {
+ if (this._envelope.dsn.ret) {
+ args.push('RET=' + shared.encodeXText(this._envelope.dsn.ret));
+ }
+ if (this._envelope.dsn.envid) {
+ args.push('ENVID=' + shared.encodeXText(this._envelope.dsn.envid));
+ }
+ }
+
+ this._sendCommand('MAIL FROM:<' + this._envelope.from + '>' + (args.length ? ' ' + args.join(' ') : ''));
+ }
+
+ _setDsnEnvelope(params) {
+ let ret = (params.ret || params.return || '').toString().toUpperCase() || null;
+ if (ret) {
+ switch (ret) {
+ case 'HDRS':
+ case 'HEADERS':
+ ret = 'HDRS';
+ break;
+ case 'FULL':
+ case 'BODY':
+ ret = 'FULL';
+ break;
+ }
+ }
+
+ if (ret && !['FULL', 'HDRS'].includes(ret)) {
+ throw new Error('ret: ' + JSON.stringify(ret));
+ }
+
+ let envid = (params.envid || params.id || '').toString() || null;
+
+ let notify = params.notify || null;
+ if (notify) {
+ if (typeof notify === 'string') {
+ notify = notify.split(',');
+ }
+ notify = notify.map(n => n.trim().toUpperCase());
+ let validNotify = ['NEVER', 'SUCCESS', 'FAILURE', 'DELAY'];
+ let invaliNotify = notify.filter(n => !validNotify.includes(n));
+ if (invaliNotify.length || (notify.length > 1 && notify.includes('NEVER'))) {
+ throw new Error('notify: ' + JSON.stringify(notify.join(',')));
+ }
+ notify = notify.join(',');
+ }
+
+ let orcpt = (params.recipient || params.orcpt || '').toString() || null;
+ if (orcpt && orcpt.indexOf(';') < 0) {
+ orcpt = 'rfc822;' + orcpt;
+ }
+
+ return {
+ ret,
+ envid,
+ notify,
+ orcpt
+ };
+ }
+
+ _getDsnRcptToArgs() {
+ let args = [];
+ // If the server supports DSN and the envelope includes an DSN prop
+ // then append DSN params to the RCPT TO command
+ if (this._envelope.dsn && this._supportedExtensions.includes('DSN')) {
+ if (this._envelope.dsn.notify) {
+ args.push('NOTIFY=' + shared.encodeXText(this._envelope.dsn.notify));
+ }
+ if (this._envelope.dsn.orcpt) {
+ args.push('ORCPT=' + shared.encodeXText(this._envelope.dsn.orcpt));
+ }
+ }
+ return args.length ? ' ' + args.join(' ') : '';
+ }
+
+ _createSendStream(callback) {
+ let dataStream = new DataStream();
+ let logStream;
+
+ if (this.options.lmtp) {
+ this._envelope.accepted.forEach((recipient, i) => {
+ let final = i === this._envelope.accepted.length - 1;
+ this._responseActions.push(str => {
+ this._actionLMTPStream(recipient, final, str, callback);
+ });
+ });
+ } else {
+ this._responseActions.push(str => {
+ this._actionSMTPStream(str, callback);
+ });
+ }
+
+ dataStream.pipe(this._socket, {
+ end: false
+ });
+
+ if (this.options.debug) {
+ logStream = new PassThrough();
+ logStream.on('readable', () => {
+ let chunk;
+ while ((chunk = logStream.read())) {
+ this.logger.debug(
+ {
+ tnx: 'message'
+ },
+ chunk.toString('binary').replace(/\r?\n$/, '')
+ );
+ }
+ });
+ dataStream.pipe(logStream);
+ }
+
+ dataStream.once('end', () => {
+ this.logger.info(
+ {
+ tnx: 'message',
+ inByteCount: dataStream.inByteCount,
+ outByteCount: dataStream.outByteCount
+ },
+ '<%s bytes encoded mime message (source size %s bytes)>',
+ dataStream.outByteCount,
+ dataStream.inByteCount
+ );
+ });
+
+ return dataStream;
+ }
+
+ /** ACTIONS **/
+
+ /**
+ * Will be run after the connection is created and the server sends
+ * a greeting. If the incoming message starts with 220 initiate
+ * SMTP session by sending EHLO command
+ *
+ * @param {String} str Message from the server
+ */
+ _actionGreeting(str) {
+ clearTimeout(this._greetingTimeout);
+
+ if (str.substr(0, 3) !== '220') {
+ this._onError(new Error('Invalid greeting. response=' + str), 'EPROTOCOL', str, 'CONN');
+ return;
+ }
+
+ if (this.options.lmtp) {
+ this._responseActions.push(this._actionLHLO);
+ this._sendCommand('LHLO ' + this.name);
+ } else {
+ this._responseActions.push(this._actionEHLO);
+ this._sendCommand('EHLO ' + this.name);
+ }
+ }
+
+ /**
+ * Handles server response for LHLO command. If it yielded in
+ * error, emit 'error', otherwise treat this as an EHLO response
+ *
+ * @param {String} str Message from the server
+ */
+ _actionLHLO(str) {
+ if (str.charAt(0) !== '2') {
+ this._onError(new Error('Invalid LHLO. response=' + str), 'EPROTOCOL', str, 'LHLO');
+ return;
+ }
+
+ this._actionEHLO(str);
+ }
+
+ /**
+ * Handles server response for EHLO command. If it yielded in
+ * error, try HELO instead, otherwise initiate TLS negotiation
+ * if STARTTLS is supported by the server or move into the
+ * authentication phase.
+ *
+ * @param {String} str Message from the server
+ */
+ _actionEHLO(str) {
+ let match;
+
+ if (str.substr(0, 3) === '421') {
+ this._onError(new Error('Server terminates connection. response=' + str), 'ECONNECTION', str, 'EHLO');
+ return;
+ }
+
+ if (str.charAt(0) !== '2') {
+ if (this.options.requireTLS) {
+ this._onError(new Error('EHLO failed but HELO does not support required STARTTLS. response=' + str), 'ECONNECTION', str, 'EHLO');
+ return;
+ }
+
+ // Try HELO instead
+ this._responseActions.push(this._actionHELO);
+ this._sendCommand('HELO ' + this.name);
+ return;
+ }
+
+ this._ehloLines = str
+ .split(/\r?\n/)
+ .map(line => line.replace(/^\d+[ -]/, '').trim())
+ .filter(line => line)
+ .slice(1);
+
+ // Detect if the server supports STARTTLS
+ if (!this.secure && !this.options.ignoreTLS && (/[ -]STARTTLS\b/im.test(str) || this.options.requireTLS)) {
+ this._sendCommand('STARTTLS');
+ this._responseActions.push(this._actionSTARTTLS);
+ return;
+ }
+
+ // Detect if the server supports SMTPUTF8
+ if (/[ -]SMTPUTF8\b/im.test(str)) {
+ this._supportedExtensions.push('SMTPUTF8');
+ }
+
+ // Detect if the server supports DSN
+ if (/[ -]DSN\b/im.test(str)) {
+ this._supportedExtensions.push('DSN');
+ }
+
+ // Detect if the server supports 8BITMIME
+ if (/[ -]8BITMIME\b/im.test(str)) {
+ this._supportedExtensions.push('8BITMIME');
+ }
+
+ // Detect if the server supports PIPELINING
+ if (/[ -]PIPELINING\b/im.test(str)) {
+ this._supportedExtensions.push('PIPELINING');
+ }
+
+ // Detect if the server supports AUTH
+ if (/[ -]AUTH\b/i.test(str)) {
+ this.allowsAuth = true;
+ }
+
+ // Detect if the server supports PLAIN auth
+ if (/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)PLAIN/i.test(str)) {
+ this._supportedAuth.push('PLAIN');
+ }
+
+ // Detect if the server supports LOGIN auth
+ if (/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)LOGIN/i.test(str)) {
+ this._supportedAuth.push('LOGIN');
+ }
+
+ // Detect if the server supports CRAM-MD5 auth
+ if (/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)CRAM-MD5/i.test(str)) {
+ this._supportedAuth.push('CRAM-MD5');
+ }
+
+ // Detect if the server supports XOAUTH2 auth
+ if (/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)XOAUTH2/i.test(str)) {
+ this._supportedAuth.push('XOAUTH2');
+ }
+
+ // Detect if the server supports SIZE extensions (and the max allowed size)
+ if ((match = str.match(/[ -]SIZE(?:[ \t]+(\d+))?/im))) {
+ this._supportedExtensions.push('SIZE');
+ this._maxAllowedSize = Number(match[1]) || 0;
+ }
+
+ this.emit('connect');
+ }
+
+ /**
+ * Handles server response for HELO command. If it yielded in
+ * error, emit 'error', otherwise move into the authentication phase.
+ *
+ * @param {String} str Message from the server
+ */
+ _actionHELO(str) {
+ if (str.charAt(0) !== '2') {
+ this._onError(new Error('Invalid HELO. response=' + str), 'EPROTOCOL', str, 'HELO');
+ return;
+ }
+
+ // assume that authentication is enabled (most probably is not though)
+ this.allowsAuth = true;
+
+ this.emit('connect');
+ }
+
+ /**
+ * Handles server response for STARTTLS command. If there's an error
+ * try HELO instead, otherwise initiate TLS upgrade. If the upgrade
+ * succeedes restart the EHLO
+ *
+ * @param {String} str Message from the server
+ */
+ _actionSTARTTLS(str) {
+ if (str.charAt(0) !== '2') {
+ if (this.options.opportunisticTLS) {
+ this.logger.info(
+ {
+ tnx: 'smtp'
+ },
+ 'Failed STARTTLS upgrade, continuing unencrypted'
+ );
+ return this.emit('connect');
+ }
+ this._onError(new Error('Error upgrading connection with STARTTLS'), 'ETLS', str, 'STARTTLS');
+ return;
+ }
+
+ this._upgradeConnection((err, secured) => {
+ if (err) {
+ this._onError(new Error('Error initiating TLS - ' + (err.message || err)), 'ETLS', false, 'STARTTLS');
+ return;
+ }
+
+ this.logger.info(
+ {
+ tnx: 'smtp'
+ },
+ 'Connection upgraded with STARTTLS'
+ );
+
+ if (secured) {
+ // restart session
+ if (this.options.lmtp) {
+ this._responseActions.push(this._actionLHLO);
+ this._sendCommand('LHLO ' + this.name);
+ } else {
+ this._responseActions.push(this._actionEHLO);
+ this._sendCommand('EHLO ' + this.name);
+ }
+ } else {
+ this.emit('connect');
+ }
+ });
+ }
+
+ /**
+ * Handle the response for AUTH LOGIN command. We are expecting
+ * '334 VXNlcm5hbWU6' (base64 for 'Username:'). Data to be sent as
+ * response needs to be base64 encoded username. We do not need
+ * exact match but settle with 334 response in general as some
+ * hosts invalidly use a longer message than VXNlcm5hbWU6
+ *
+ * @param {String} str Message from the server
+ */
+ _actionAUTH_LOGIN_USER(str, callback) {
+ if (!/^334[ -]/.test(str)) {
+ // expecting '334 VXNlcm5hbWU6'
+ callback(this._formatError('Invalid login sequence while waiting for "334 VXNlcm5hbWU6"', 'EAUTH', str, 'AUTH LOGIN'));
+ return;
+ }
+
+ this._responseActions.push(str => {
+ this._actionAUTH_LOGIN_PASS(str, callback);
+ });
+
+ this._sendCommand(Buffer.from(this._auth.credentials.user + '', 'utf-8').toString('base64'));
+ }
+
+ /**
+ * Handle the response for AUTH CRAM-MD5 command. We are expecting
+ * '334 '. Data to be sent as response needs to be
+ * base64 decoded challenge string, MD5 hashed using the password as
+ * a HMAC key, prefixed by the username and a space, and finally all
+ * base64 encoded again.
+ *
+ * @param {String} str Message from the server
+ */
+ _actionAUTH_CRAM_MD5(str, callback) {
+ let challengeMatch = str.match(/^334\s+(.+)$/);
+ let challengeString = '';
+
+ if (!challengeMatch) {
+ return callback(this._formatError('Invalid login sequence while waiting for server challenge string', 'EAUTH', str, 'AUTH CRAM-MD5'));
+ } else {
+ challengeString = challengeMatch[1];
+ }
+
+ // Decode from base64
+ let base64decoded = Buffer.from(challengeString, 'base64').toString('ascii'),
+ hmacMD5 = crypto.createHmac('md5', this._auth.credentials.pass);
+
+ hmacMD5.update(base64decoded);
+
+ let prepended = this._auth.credentials.user + ' ' + hmacMD5.digest('hex');
+
+ this._responseActions.push(str => {
+ this._actionAUTH_CRAM_MD5_PASS(str, callback);
+ });
+
+ this._sendCommand(
+ Buffer.from(prepended).toString('base64'),
+ // hidden hash for logs
+ Buffer.from(this._auth.credentials.user + ' /* secret */').toString('base64')
+ );
+ }
+
+ /**
+ * Handles the response to CRAM-MD5 authentication, if there's no error,
+ * the user can be considered logged in. Start waiting for a message to send
+ *
+ * @param {String} str Message from the server
+ */
+ _actionAUTH_CRAM_MD5_PASS(str, callback) {
+ if (!str.match(/^235\s+/)) {
+ return callback(this._formatError('Invalid login sequence while waiting for "235"', 'EAUTH', str, 'AUTH CRAM-MD5'));
+ }
+
+ this.logger.info(
+ {
+ tnx: 'smtp',
+ username: this._auth.user,
+ action: 'authenticated',
+ method: this._authMethod
+ },
+ 'User %s authenticated',
+ JSON.stringify(this._auth.user)
+ );
+ this.authenticated = true;
+ callback(null, true);
+ }
+
+ /**
+ * Handle the response for AUTH LOGIN command. We are expecting
+ * '334 UGFzc3dvcmQ6' (base64 for 'Password:'). Data to be sent as
+ * response needs to be base64 encoded password.
+ *
+ * @param {String} str Message from the server
+ */
+ _actionAUTH_LOGIN_PASS(str, callback) {
+ if (!/^334[ -]/.test(str)) {
+ // expecting '334 UGFzc3dvcmQ6'
+ return callback(this._formatError('Invalid login sequence while waiting for "334 UGFzc3dvcmQ6"', 'EAUTH', str, 'AUTH LOGIN'));
+ }
+
+ this._responseActions.push(str => {
+ this._actionAUTHComplete(str, callback);
+ });
+
+ this._sendCommand(
+ Buffer.from((this._auth.credentials.pass || '').toString(), 'utf-8').toString('base64'),
+ // Hidden pass for logs
+ Buffer.from('/* secret */', 'utf-8').toString('base64')
+ );
+ }
+
+ /**
+ * Handles the response for authentication, if there's no error,
+ * the user can be considered logged in. Start waiting for a message to send
+ *
+ * @param {String} str Message from the server
+ */
+ _actionAUTHComplete(str, isRetry, callback) {
+ if (!callback && typeof isRetry === 'function') {
+ callback = isRetry;
+ isRetry = false;
+ }
+
+ if (str.substr(0, 3) === '334') {
+ this._responseActions.push(str => {
+ if (isRetry || this._authMethod !== 'XOAUTH2') {
+ this._actionAUTHComplete(str, true, callback);
+ } else {
+ // fetch a new OAuth2 access token
+ setImmediate(() => this._handleXOauth2Token(true, callback));
+ }
+ });
+ this._sendCommand('');
+ return;
+ }
+
+ if (str.charAt(0) !== '2') {
+ this.logger.info(
+ {
+ tnx: 'smtp',
+ username: this._auth.user,
+ action: 'authfail',
+ method: this._authMethod
+ },
+ 'User %s failed to authenticate',
+ JSON.stringify(this._auth.user)
+ );
+ return callback(this._formatError('Invalid login', 'EAUTH', str, 'AUTH ' + this._authMethod));
+ }
+
+ this.logger.info(
+ {
+ tnx: 'smtp',
+ username: this._auth.user,
+ action: 'authenticated',
+ method: this._authMethod
+ },
+ 'User %s authenticated',
+ JSON.stringify(this._auth.user)
+ );
+ this.authenticated = true;
+ callback(null, true);
+ }
+
+ /**
+ * Handle response for a MAIL FROM: command
+ *
+ * @param {String} str Message from the server
+ */
+ _actionMAIL(str, callback) {
+ let message, curRecipient;
+ if (Number(str.charAt(0)) !== 2) {
+ if (this._usingSmtpUtf8 && /^550 /.test(str) && /[\x80-\uFFFF]/.test(this._envelope.from)) {
+ message = 'Internationalized mailbox name not allowed';
+ } else {
+ message = 'Mail command failed';
+ }
+ return callback(this._formatError(message, 'EENVELOPE', str, 'MAIL FROM'));
+ }
+
+ if (!this._envelope.rcptQueue.length) {
+ return callback(this._formatError('Can\x27t send mail - no recipients defined', 'EENVELOPE', false, 'API'));
+ } else {
+ this._recipientQueue = [];
+
+ if (this._supportedExtensions.includes('PIPELINING')) {
+ while (this._envelope.rcptQueue.length) {
+ curRecipient = this._envelope.rcptQueue.shift();
+ this._recipientQueue.push(curRecipient);
+ this._responseActions.push(str => {
+ this._actionRCPT(str, callback);
+ });
+ this._sendCommand('RCPT TO:<' + curRecipient + '>' + this._getDsnRcptToArgs());
+ }
+ } else {
+ curRecipient = this._envelope.rcptQueue.shift();
+ this._recipientQueue.push(curRecipient);
+ this._responseActions.push(str => {
+ this._actionRCPT(str, callback);
+ });
+ this._sendCommand('RCPT TO:<' + curRecipient + '>' + this._getDsnRcptToArgs());
+ }
+ }
+ }
+
+ /**
+ * Handle response for a RCPT TO: command
+ *
+ * @param {String} str Message from the server
+ */
+ _actionRCPT(str, callback) {
+ let message,
+ err,
+ curRecipient = this._recipientQueue.shift();
+ if (Number(str.charAt(0)) !== 2) {
+ // this is a soft error
+ if (this._usingSmtpUtf8 && /^553 /.test(str) && /[\x80-\uFFFF]/.test(curRecipient)) {
+ message = 'Internationalized mailbox name not allowed';
+ } else {
+ message = 'Recipient command failed';
+ }
+ this._envelope.rejected.push(curRecipient);
+ // store error for the failed recipient
+ err = this._formatError(message, 'EENVELOPE', str, 'RCPT TO');
+ err.recipient = curRecipient;
+ this._envelope.rejectedErrors.push(err);
+ } else {
+ this._envelope.accepted.push(curRecipient);
+ }
+
+ if (!this._envelope.rcptQueue.length && !this._recipientQueue.length) {
+ if (this._envelope.rejected.length < this._envelope.to.length) {
+ this._responseActions.push(str => {
+ this._actionDATA(str, callback);
+ });
+ this._sendCommand('DATA');
+ } else {
+ err = this._formatError('Can\x27t send mail - all recipients were rejected', 'EENVELOPE', str, 'RCPT TO');
+ err.rejected = this._envelope.rejected;
+ err.rejectedErrors = this._envelope.rejectedErrors;
+ return callback(err);
+ }
+ } else if (this._envelope.rcptQueue.length) {
+ curRecipient = this._envelope.rcptQueue.shift();
+ this._recipientQueue.push(curRecipient);
+ this._responseActions.push(str => {
+ this._actionRCPT(str, callback);
+ });
+ this._sendCommand('RCPT TO:<' + curRecipient + '>' + this._getDsnRcptToArgs());
+ }
+ }
+
+ /**
+ * Handle response for a DATA command
+ *
+ * @param {String} str Message from the server
+ */
+ _actionDATA(str, callback) {
+ // response should be 354 but according to this issue https://github.com/eleith/emailjs/issues/24
+ // some servers might use 250 instead, so lets check for 2 or 3 as the first digit
+ if (!/^[23]/.test(str)) {
+ return callback(this._formatError('Data command failed', 'EENVELOPE', str, 'DATA'));
+ }
+
+ let response = {
+ accepted: this._envelope.accepted,
+ rejected: this._envelope.rejected
+ };
+
+ if (this._ehloLines && this._ehloLines.length) {
+ response.ehlo = this._ehloLines;
+ }
+
+ if (this._envelope.rejectedErrors.length) {
+ response.rejectedErrors = this._envelope.rejectedErrors;
+ }
+
+ callback(null, response);
+ }
+
+ /**
+ * Handle response for a DATA stream when using SMTP
+ * We expect a single response that defines if the sending succeeded or failed
+ *
+ * @param {String} str Message from the server
+ */
+ _actionSMTPStream(str, callback) {
+ if (Number(str.charAt(0)) !== 2) {
+ // Message failed
+ return callback(this._formatError('Message failed', 'EMESSAGE', str, 'DATA'));
+ } else {
+ // Message sent succesfully
+ return callback(null, str);
+ }
+ }
+
+ /**
+ * Handle response for a DATA stream
+ * We expect a separate response for every recipient. All recipients can either
+ * succeed or fail separately
+ *
+ * @param {String} recipient The recipient this response applies to
+ * @param {Boolean} final Is this the final recipient?
+ * @param {String} str Message from the server
+ */
+ _actionLMTPStream(recipient, final, str, callback) {
+ let err;
+ if (Number(str.charAt(0)) !== 2) {
+ // Message failed
+ err = this._formatError('Message failed for recipient ' + recipient, 'EMESSAGE', str, 'DATA');
+ err.recipient = recipient;
+ this._envelope.rejected.push(recipient);
+ this._envelope.rejectedErrors.push(err);
+ for (let i = 0, len = this._envelope.accepted.length; i < len; i++) {
+ if (this._envelope.accepted[i] === recipient) {
+ this._envelope.accepted.splice(i, 1);
+ }
+ }
+ }
+ if (final) {
+ return callback(null, str);
+ }
+ }
+
+ _handleXOauth2Token(isRetry, callback) {
+ this._auth.oauth2.getToken(isRetry, (err, accessToken) => {
+ if (err) {
+ this.logger.info(
+ {
+ tnx: 'smtp',
+ username: this._auth.user,
+ action: 'authfail',
+ method: this._authMethod
+ },
+ 'User %s failed to authenticate',
+ JSON.stringify(this._auth.user)
+ );
+ return callback(this._formatError(err, 'EAUTH', false, 'AUTH XOAUTH2'));
+ }
+ this._responseActions.push(str => {
+ this._actionAUTHComplete(str, isRetry, callback);
+ });
+ this._sendCommand(
+ 'AUTH XOAUTH2 ' + this._auth.oauth2.buildXOAuth2Token(accessToken),
+ // Hidden for logs
+ 'AUTH XOAUTH2 ' + this._auth.oauth2.buildXOAuth2Token('/* secret */')
+ );
+ });
+ }
+
+ /**
+ *
+ * @param {string} command
+ * @private
+ */
+ _isDestroyedMessage(command) {
+ if (this._destroyed) {
+ return 'Cannot ' + command + ' - smtp connection is already destroyed.';
+ }
+
+ if (this._socket) {
+ if (this._socket.destroyed) {
+ return 'Cannot ' + command + ' - smtp connection socket is already destroyed.';
+ }
+
+ if (!this._socket.writable) {
+ return 'Cannot ' + command + ' - smtp connection socket is already half-closed.';
+ }
+ }
+ }
+
+ _getHostname() {
+ // defaul hostname is machine hostname or [IP]
+ let defaultHostname;
+ try {
+ defaultHostname = os.hostname() || '';
+ } catch (err) {
+ // fails on windows 7
+ defaultHostname = 'localhost';
+ }
+
+ // ignore if not FQDN
+ if (!defaultHostname || defaultHostname.indexOf('.') < 0) {
+ defaultHostname = '[127.0.0.1]';
+ }
+
+ // IP should be enclosed in []
+ if (defaultHostname.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)) {
+ defaultHostname = '[' + defaultHostname + ']';
+ }
+
+ return defaultHostname;
+ }
+}
+
+module.exports = SMTPConnection;
+
+
+/***/ }),
+
+/***/ 560:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const EventEmitter = __nccwpck_require__(2361);
+const PoolResource = __nccwpck_require__(2230);
+const SMTPConnection = __nccwpck_require__(3559);
+const wellKnown = __nccwpck_require__(6961);
+const shared = __nccwpck_require__(2673);
+const packageData = __nccwpck_require__(4129);
+
+/**
+ * Creates a SMTP pool transport object for Nodemailer
+ *
+ * @constructor
+ * @param {Object} options SMTP Connection options
+ */
+class SMTPPool extends EventEmitter {
+ constructor(options) {
+ super();
+
+ options = options || {};
+ if (typeof options === 'string') {
+ options = {
+ url: options
+ };
+ }
+
+ let urlData;
+ let service = options.service;
+
+ if (typeof options.getSocket === 'function') {
+ this.getSocket = options.getSocket;
+ }
+
+ if (options.url) {
+ urlData = shared.parseConnectionUrl(options.url);
+ service = service || urlData.service;
+ }
+
+ this.options = shared.assign(
+ false, // create new object
+ options, // regular options
+ urlData, // url options
+ service && wellKnown(service) // wellknown options
+ );
+
+ this.options.maxConnections = this.options.maxConnections || 5;
+ this.options.maxMessages = this.options.maxMessages || 100;
+
+ this.logger = shared.getLogger(this.options, {
+ component: this.options.component || 'smtp-pool'
+ });
+
+ // temporary object
+ let connection = new SMTPConnection(this.options);
+
+ this.name = 'SMTP (pool)';
+ this.version = packageData.version + '[client:' + connection.version + ']';
+
+ this._rateLimit = {
+ counter: 0,
+ timeout: null,
+ waiting: [],
+ checkpoint: false,
+ delta: Number(this.options.rateDelta) || 1000,
+ limit: Number(this.options.rateLimit) || 0
+ };
+ this._closed = false;
+ this._queue = [];
+ this._connections = [];
+ this._connectionCounter = 0;
+
+ this.idling = true;
+
+ setImmediate(() => {
+ if (this.idling) {
+ this.emit('idle');
+ }
+ });
+ }
+
+ /**
+ * Placeholder function for creating proxy sockets. This method immediatelly returns
+ * without a socket
+ *
+ * @param {Object} options Connection options
+ * @param {Function} callback Callback function to run with the socket keys
+ */
+ getSocket(options, callback) {
+ // return immediatelly
+ return setImmediate(() => callback(null, false));
+ }
+
+ /**
+ * Queues an e-mail to be sent using the selected settings
+ *
+ * @param {Object} mail Mail object
+ * @param {Function} callback Callback function
+ */
+ send(mail, callback) {
+ if (this._closed) {
+ return false;
+ }
+
+ this._queue.push({
+ mail,
+ requeueAttempts: 0,
+ callback
+ });
+
+ if (this.idling && this._queue.length >= this.options.maxConnections) {
+ this.idling = false;
+ }
+
+ setImmediate(() => this._processMessages());
+
+ return true;
+ }
+
+ /**
+ * Closes all connections in the pool. If there is a message being sent, the connection
+ * is closed later
+ */
+ close() {
+ let connection;
+ let len = this._connections.length;
+ this._closed = true;
+
+ // clear rate limit timer if it exists
+ clearTimeout(this._rateLimit.timeout);
+
+ if (!len && !this._queue.length) {
+ return;
+ }
+
+ // remove all available connections
+ for (let i = len - 1; i >= 0; i--) {
+ if (this._connections[i] && this._connections[i].available) {
+ connection = this._connections[i];
+ connection.close();
+ this.logger.info(
+ {
+ tnx: 'connection',
+ cid: connection.id,
+ action: 'removed'
+ },
+ 'Connection #%s removed',
+ connection.id
+ );
+ }
+ }
+
+ if (len && !this._connections.length) {
+ this.logger.debug(
+ {
+ tnx: 'connection'
+ },
+ 'All connections removed'
+ );
+ }
+
+ if (!this._queue.length) {
+ return;
+ }
+
+ // make sure that entire queue would be cleaned
+ let invokeCallbacks = () => {
+ if (!this._queue.length) {
+ this.logger.debug(
+ {
+ tnx: 'connection'
+ },
+ 'Pending queue entries cleared'
+ );
+ return;
+ }
+ let entry = this._queue.shift();
+ if (entry && typeof entry.callback === 'function') {
+ try {
+ entry.callback(new Error('Connection pool was closed'));
+ } catch (E) {
+ this.logger.error(
+ {
+ err: E,
+ tnx: 'callback',
+ cid: connection.id
+ },
+ 'Callback error for #%s: %s',
+ connection.id,
+ E.message
+ );
+ }
+ }
+ setImmediate(invokeCallbacks);
+ };
+ setImmediate(invokeCallbacks);
+ }
+
+ /**
+ * Check the queue and available connections. If there is a message to be sent and there is
+ * an available connection, then use this connection to send the mail
+ */
+ _processMessages() {
+ let connection;
+ let i, len;
+
+ // do nothing if already closed
+ if (this._closed) {
+ return;
+ }
+
+ // do nothing if queue is empty
+ if (!this._queue.length) {
+ if (!this.idling) {
+ // no pending jobs
+ this.idling = true;
+ this.emit('idle');
+ }
+ return;
+ }
+
+ // find first available connection
+ for (i = 0, len = this._connections.length; i < len; i++) {
+ if (this._connections[i].available) {
+ connection = this._connections[i];
+ break;
+ }
+ }
+
+ if (!connection && this._connections.length < this.options.maxConnections) {
+ connection = this._createConnection();
+ }
+
+ if (!connection) {
+ // no more free connection slots available
+ this.idling = false;
+ return;
+ }
+
+ // check if there is free space in the processing queue
+ if (!this.idling && this._queue.length < this.options.maxConnections) {
+ this.idling = true;
+ this.emit('idle');
+ }
+
+ let entry = (connection.queueEntry = this._queue.shift());
+ entry.messageId = (connection.queueEntry.mail.message.getHeader('message-id') || '').replace(/[<>\s]/g, '');
+
+ connection.available = false;
+
+ this.logger.debug(
+ {
+ tnx: 'pool',
+ cid: connection.id,
+ messageId: entry.messageId,
+ action: 'assign'
+ },
+ 'Assigned message <%s> to #%s (%s)',
+ entry.messageId,
+ connection.id,
+ connection.messages + 1
+ );
+
+ if (this._rateLimit.limit) {
+ this._rateLimit.counter++;
+ if (!this._rateLimit.checkpoint) {
+ this._rateLimit.checkpoint = Date.now();
+ }
+ }
+
+ connection.send(entry.mail, (err, info) => {
+ // only process callback if current handler is not changed
+ if (entry === connection.queueEntry) {
+ try {
+ entry.callback(err, info);
+ } catch (E) {
+ this.logger.error(
+ {
+ err: E,
+ tnx: 'callback',
+ cid: connection.id
+ },
+ 'Callback error for #%s: %s',
+ connection.id,
+ E.message
+ );
+ }
+ connection.queueEntry = false;
+ }
+ });
+ }
+
+ /**
+ * Creates a new pool resource
+ */
+ _createConnection() {
+ let connection = new PoolResource(this);
+
+ connection.id = ++this._connectionCounter;
+
+ this.logger.info(
+ {
+ tnx: 'pool',
+ cid: connection.id,
+ action: 'conection'
+ },
+ 'Created new pool resource #%s',
+ connection.id
+ );
+
+ // resource comes available
+ connection.on('available', () => {
+ this.logger.debug(
+ {
+ tnx: 'connection',
+ cid: connection.id,
+ action: 'available'
+ },
+ 'Connection #%s became available',
+ connection.id
+ );
+
+ if (this._closed) {
+ // if already closed run close() that will remove this connections from connections list
+ this.close();
+ } else {
+ // check if there's anything else to send
+ this._processMessages();
+ }
+ });
+
+ // resource is terminated with an error
+ connection.once('error', err => {
+ if (err.code !== 'EMAXLIMIT') {
+ this.logger.error(
+ {
+ err,
+ tnx: 'pool',
+ cid: connection.id
+ },
+ 'Pool Error for #%s: %s',
+ connection.id,
+ err.message
+ );
+ } else {
+ this.logger.debug(
+ {
+ tnx: 'pool',
+ cid: connection.id,
+ action: 'maxlimit'
+ },
+ 'Max messages limit exchausted for #%s',
+ connection.id
+ );
+ }
+
+ if (connection.queueEntry) {
+ try {
+ connection.queueEntry.callback(err);
+ } catch (E) {
+ this.logger.error(
+ {
+ err: E,
+ tnx: 'callback',
+ cid: connection.id
+ },
+ 'Callback error for #%s: %s',
+ connection.id,
+ E.message
+ );
+ }
+ connection.queueEntry = false;
+ }
+
+ // remove the erroneus connection from connections list
+ this._removeConnection(connection);
+
+ this._continueProcessing();
+ });
+
+ connection.once('close', () => {
+ this.logger.info(
+ {
+ tnx: 'connection',
+ cid: connection.id,
+ action: 'closed'
+ },
+ 'Connection #%s was closed',
+ connection.id
+ );
+
+ this._removeConnection(connection);
+
+ if (connection.queueEntry) {
+ // If the connection closed when sending, add the message to the queue again
+ // if max number of requeues is not reached yet
+ // Note that we must wait a bit.. because the callback of the 'error' handler might be called
+ // in the next event loop
+ setTimeout(() => {
+ if (connection.queueEntry) {
+ if (this._shouldRequeuOnConnectionClose(connection.queueEntry)) {
+ this._requeueEntryOnConnectionClose(connection);
+ } else {
+ this._failDeliveryOnConnectionClose(connection);
+ }
+ }
+ this._continueProcessing();
+ }, 50);
+ } else {
+ this._continueProcessing();
+ }
+ });
+
+ this._connections.push(connection);
+
+ return connection;
+ }
+
+ _shouldRequeuOnConnectionClose(queueEntry) {
+ if (this.options.maxRequeues === undefined || this.options.maxRequeues < 0) {
+ return true;
+ }
+
+ return queueEntry.requeueAttempts < this.options.maxRequeues;
+ }
+
+ _failDeliveryOnConnectionClose(connection) {
+ if (connection.queueEntry && connection.queueEntry.callback) {
+ try {
+ connection.queueEntry.callback(new Error('Reached maximum number of retries after connection was closed'));
+ } catch (E) {
+ this.logger.error(
+ {
+ err: E,
+ tnx: 'callback',
+ messageId: connection.queueEntry.messageId,
+ cid: connection.id
+ },
+ 'Callback error for #%s: %s',
+ connection.id,
+ E.message
+ );
+ }
+ connection.queueEntry = false;
+ }
+ }
+
+ _requeueEntryOnConnectionClose(connection) {
+ connection.queueEntry.requeueAttempts = connection.queueEntry.requeueAttempts + 1;
+ this.logger.debug(
+ {
+ tnx: 'pool',
+ cid: connection.id,
+ messageId: connection.queueEntry.messageId,
+ action: 'requeue'
+ },
+ 'Re-queued message <%s> for #%s. Attempt: #%s',
+ connection.queueEntry.messageId,
+ connection.id,
+ connection.queueEntry.requeueAttempts
+ );
+ this._queue.unshift(connection.queueEntry);
+ connection.queueEntry = false;
+ }
+
+ /**
+ * Continue to process message if the pool hasn't closed
+ */
+ _continueProcessing() {
+ if (this._closed) {
+ this.close();
+ } else {
+ setTimeout(() => this._processMessages(), 100);
+ }
+ }
+
+ /**
+ * Remove resource from pool
+ *
+ * @param {Object} connection The PoolResource to remove
+ */
+ _removeConnection(connection) {
+ let index = this._connections.indexOf(connection);
+
+ if (index !== -1) {
+ this._connections.splice(index, 1);
+ }
+ }
+
+ /**
+ * Checks if connections have hit current rate limit and if so, queues the availability callback
+ *
+ * @param {Function} callback Callback function to run once rate limiter has been cleared
+ */
+ _checkRateLimit(callback) {
+ if (!this._rateLimit.limit) {
+ return callback();
+ }
+
+ let now = Date.now();
+
+ if (this._rateLimit.counter < this._rateLimit.limit) {
+ return callback();
+ }
+
+ this._rateLimit.waiting.push(callback);
+
+ if (this._rateLimit.checkpoint <= now - this._rateLimit.delta) {
+ return this._clearRateLimit();
+ } else if (!this._rateLimit.timeout) {
+ this._rateLimit.timeout = setTimeout(() => this._clearRateLimit(), this._rateLimit.delta - (now - this._rateLimit.checkpoint));
+ this._rateLimit.checkpoint = now;
+ }
+ }
+
+ /**
+ * Clears current rate limit limitation and runs paused callback
+ */
+ _clearRateLimit() {
+ clearTimeout(this._rateLimit.timeout);
+ this._rateLimit.timeout = null;
+ this._rateLimit.counter = 0;
+ this._rateLimit.checkpoint = false;
+
+ // resume all paused connections
+ while (this._rateLimit.waiting.length) {
+ let cb = this._rateLimit.waiting.shift();
+ setImmediate(cb);
+ }
+ }
+
+ /**
+ * Returns true if there are free slots in the queue
+ */
+ isIdle() {
+ return this.idling;
+ }
+
+ /**
+ * Verifies SMTP configuration
+ *
+ * @param {Function} callback Callback function
+ */
+ verify(callback) {
+ let promise;
+
+ if (!callback) {
+ promise = new Promise((resolve, reject) => {
+ callback = shared.callbackPromise(resolve, reject);
+ });
+ }
+
+ let auth = new PoolResource(this).auth;
+
+ this.getSocket(this.options, (err, socketOptions) => {
+ if (err) {
+ return callback(err);
+ }
+
+ let options = this.options;
+ if (socketOptions && socketOptions.connection) {
+ this.logger.info(
+ {
+ tnx: 'proxy',
+ remoteAddress: socketOptions.connection.remoteAddress,
+ remotePort: socketOptions.connection.remotePort,
+ destHost: options.host || '',
+ destPort: options.port || '',
+ action: 'connected'
+ },
+ 'Using proxied socket from %s:%s to %s:%s',
+ socketOptions.connection.remoteAddress,
+ socketOptions.connection.remotePort,
+ options.host || '',
+ options.port || ''
+ );
+ options = shared.assign(false, options);
+ Object.keys(socketOptions).forEach(key => {
+ options[key] = socketOptions[key];
+ });
+ }
+
+ let connection = new SMTPConnection(options);
+ let returned = false;
+
+ connection.once('error', err => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ connection.close();
+ return callback(err);
+ });
+
+ connection.once('end', () => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ return callback(new Error('Connection closed'));
+ });
+
+ let finalize = () => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ connection.quit();
+ return callback(null, true);
+ };
+
+ connection.connect(() => {
+ if (returned) {
+ return;
+ }
+
+ if (auth && (connection.allowsAuth || options.forceAuth)) {
+ connection.login(auth, err => {
+ if (returned) {
+ return;
+ }
+
+ if (err) {
+ returned = true;
+ connection.close();
+ return callback(err);
+ }
+
+ finalize();
+ });
+ } else if (!auth && connection.allowsAuth && options.forceAuth) {
+ let err = new Error('Authentication info was not provided');
+ err.code = 'NoAuth';
+
+ returned = true;
+ connection.close();
+ return callback(err);
+ } else {
+ finalize();
+ }
+ });
+ });
+
+ return promise;
+ }
+}
+
+// expose to the world
+module.exports = SMTPPool;
+
+
+/***/ }),
+
+/***/ 2230:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const SMTPConnection = __nccwpck_require__(3559);
+const assign = (__nccwpck_require__(2673).assign);
+const XOAuth2 = __nccwpck_require__(9882);
+const EventEmitter = __nccwpck_require__(2361);
+
+/**
+ * Creates an element for the pool
+ *
+ * @constructor
+ * @param {Object} options SMTPPool instance
+ */
+class PoolResource extends EventEmitter {
+ constructor(pool) {
+ super();
+
+ this.pool = pool;
+ this.options = pool.options;
+ this.logger = this.pool.logger;
+
+ if (this.options.auth) {
+ switch ((this.options.auth.type || '').toString().toUpperCase()) {
+ case 'OAUTH2': {
+ let oauth2 = new XOAuth2(this.options.auth, this.logger);
+ oauth2.provisionCallback = (this.pool.mailer && this.pool.mailer.get('oauth2_provision_cb')) || oauth2.provisionCallback;
+ this.auth = {
+ type: 'OAUTH2',
+ user: this.options.auth.user,
+ oauth2,
+ method: 'XOAUTH2'
+ };
+ oauth2.on('token', token => this.pool.mailer.emit('token', token));
+ oauth2.on('error', err => this.emit('error', err));
+ break;
+ }
+ default:
+ if (!this.options.auth.user && !this.options.auth.pass) {
+ break;
+ }
+ this.auth = {
+ type: (this.options.auth.type || '').toString().toUpperCase() || 'LOGIN',
+ user: this.options.auth.user,
+ credentials: {
+ user: this.options.auth.user || '',
+ pass: this.options.auth.pass,
+ options: this.options.auth.options
+ },
+ method: (this.options.auth.method || '').trim().toUpperCase() || this.options.authMethod || false
+ };
+ }
+ }
+
+ this._connection = false;
+ this._connected = false;
+
+ this.messages = 0;
+ this.available = true;
+ }
+
+ /**
+ * Initiates a connection to the SMTP server
+ *
+ * @param {Function} callback Callback function to run once the connection is established or failed
+ */
+ connect(callback) {
+ this.pool.getSocket(this.options, (err, socketOptions) => {
+ if (err) {
+ return callback(err);
+ }
+
+ let returned = false;
+ let options = this.options;
+ if (socketOptions && socketOptions.connection) {
+ this.logger.info(
+ {
+ tnx: 'proxy',
+ remoteAddress: socketOptions.connection.remoteAddress,
+ remotePort: socketOptions.connection.remotePort,
+ destHost: options.host || '',
+ destPort: options.port || '',
+ action: 'connected'
+ },
+ 'Using proxied socket from %s:%s to %s:%s',
+ socketOptions.connection.remoteAddress,
+ socketOptions.connection.remotePort,
+ options.host || '',
+ options.port || ''
+ );
+
+ options = assign(false, options);
+ Object.keys(socketOptions).forEach(key => {
+ options[key] = socketOptions[key];
+ });
+ }
+
+ this.connection = new SMTPConnection(options);
+
+ this.connection.once('error', err => {
+ this.emit('error', err);
+ if (returned) {
+ return;
+ }
+ returned = true;
+ return callback(err);
+ });
+
+ this.connection.once('end', () => {
+ this.close();
+ if (returned) {
+ return;
+ }
+ returned = true;
+
+ let timer = setTimeout(() => {
+ if (returned) {
+ return;
+ }
+ // still have not returned, this means we have an unexpected connection close
+ let err = new Error('Unexpected socket close');
+ if (this.connection && this.connection._socket && this.connection._socket.upgrading) {
+ // starttls connection errors
+ err.code = 'ETLS';
+ }
+ callback(err);
+ }, 1000);
+
+ try {
+ timer.unref();
+ } catch (E) {
+ // Ignore. Happens on envs with non-node timer implementation
+ }
+ });
+
+ this.connection.connect(() => {
+ if (returned) {
+ return;
+ }
+
+ if (this.auth && (this.connection.allowsAuth || options.forceAuth)) {
+ this.connection.login(this.auth, err => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+
+ if (err) {
+ this.connection.close();
+ this.emit('error', err);
+ return callback(err);
+ }
+
+ this._connected = true;
+ callback(null, true);
+ });
+ } else {
+ returned = true;
+ this._connected = true;
+ return callback(null, true);
+ }
+ });
+ });
+ }
+
+ /**
+ * Sends an e-mail to be sent using the selected settings
+ *
+ * @param {Object} mail Mail object
+ * @param {Function} callback Callback function
+ */
+ send(mail, callback) {
+ if (!this._connected) {
+ return this.connect(err => {
+ if (err) {
+ return callback(err);
+ }
+ return this.send(mail, callback);
+ });
+ }
+
+ let envelope = mail.message.getEnvelope();
+ let messageId = mail.message.messageId();
+
+ let recipients = [].concat(envelope.to || []);
+ if (recipients.length > 3) {
+ recipients.push('...and ' + recipients.splice(2).length + ' more');
+ }
+ this.logger.info(
+ {
+ tnx: 'send',
+ messageId,
+ cid: this.id
+ },
+ 'Sending message %s using #%s to <%s>',
+ messageId,
+ this.id,
+ recipients.join(', ')
+ );
+
+ if (mail.data.dsn) {
+ envelope.dsn = mail.data.dsn;
+ }
+
+ this.connection.send(envelope, mail.message.createReadStream(), (err, info) => {
+ this.messages++;
+
+ if (err) {
+ this.connection.close();
+ this.emit('error', err);
+ return callback(err);
+ }
+
+ info.envelope = {
+ from: envelope.from,
+ to: envelope.to
+ };
+ info.messageId = messageId;
+
+ setImmediate(() => {
+ let err;
+ if (this.messages >= this.options.maxMessages) {
+ err = new Error('Resource exhausted');
+ err.code = 'EMAXLIMIT';
+ this.connection.close();
+ this.emit('error', err);
+ } else {
+ this.pool._checkRateLimit(() => {
+ this.available = true;
+ this.emit('available');
+ });
+ }
+ });
+
+ callback(null, info);
+ });
+ }
+
+ /**
+ * Closes the connection
+ */
+ close() {
+ this._connected = false;
+ if (this.auth && this.auth.oauth2) {
+ this.auth.oauth2.removeAllListeners();
+ }
+ if (this.connection) {
+ this.connection.close();
+ }
+ this.emit('close');
+ }
+}
+
+module.exports = PoolResource;
+
+
+/***/ }),
+
+/***/ 3349:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const EventEmitter = __nccwpck_require__(2361);
+const SMTPConnection = __nccwpck_require__(3559);
+const wellKnown = __nccwpck_require__(6961);
+const shared = __nccwpck_require__(2673);
+const XOAuth2 = __nccwpck_require__(9882);
+const packageData = __nccwpck_require__(4129);
+
+/**
+ * Creates a SMTP transport object for Nodemailer
+ *
+ * @constructor
+ * @param {Object} options Connection options
+ */
+class SMTPTransport extends EventEmitter {
+ constructor(options) {
+ super();
+
+ options = options || {};
+
+ if (typeof options === 'string') {
+ options = {
+ url: options
+ };
+ }
+
+ let urlData;
+ let service = options.service;
+
+ if (typeof options.getSocket === 'function') {
+ this.getSocket = options.getSocket;
+ }
+
+ if (options.url) {
+ urlData = shared.parseConnectionUrl(options.url);
+ service = service || urlData.service;
+ }
+
+ this.options = shared.assign(
+ false, // create new object
+ options, // regular options
+ urlData, // url options
+ service && wellKnown(service) // wellknown options
+ );
+
+ this.logger = shared.getLogger(this.options, {
+ component: this.options.component || 'smtp-transport'
+ });
+
+ // temporary object
+ let connection = new SMTPConnection(this.options);
+
+ this.name = 'SMTP';
+ this.version = packageData.version + '[client:' + connection.version + ']';
+
+ if (this.options.auth) {
+ this.auth = this.getAuth({});
+ }
+ }
+
+ /**
+ * Placeholder function for creating proxy sockets. This method immediatelly returns
+ * without a socket
+ *
+ * @param {Object} options Connection options
+ * @param {Function} callback Callback function to run with the socket keys
+ */
+ getSocket(options, callback) {
+ // return immediatelly
+ return setImmediate(() => callback(null, false));
+ }
+
+ getAuth(authOpts) {
+ if (!authOpts) {
+ return this.auth;
+ }
+
+ let hasAuth = false;
+ let authData = {};
+
+ if (this.options.auth && typeof this.options.auth === 'object') {
+ Object.keys(this.options.auth).forEach(key => {
+ hasAuth = true;
+ authData[key] = this.options.auth[key];
+ });
+ }
+
+ if (authOpts && typeof authOpts === 'object') {
+ Object.keys(authOpts).forEach(key => {
+ hasAuth = true;
+ authData[key] = authOpts[key];
+ });
+ }
+
+ if (!hasAuth) {
+ return false;
+ }
+
+ switch ((authData.type || '').toString().toUpperCase()) {
+ case 'OAUTH2': {
+ if (!authData.service && !authData.user) {
+ return false;
+ }
+ let oauth2 = new XOAuth2(authData, this.logger);
+ oauth2.provisionCallback = (this.mailer && this.mailer.get('oauth2_provision_cb')) || oauth2.provisionCallback;
+ oauth2.on('token', token => this.mailer.emit('token', token));
+ oauth2.on('error', err => this.emit('error', err));
+ return {
+ type: 'OAUTH2',
+ user: authData.user,
+ oauth2,
+ method: 'XOAUTH2'
+ };
+ }
+ default:
+ return {
+ type: (authData.type || '').toString().toUpperCase() || 'LOGIN',
+ user: authData.user,
+ credentials: {
+ user: authData.user || '',
+ pass: authData.pass,
+ options: authData.options
+ },
+ method: (authData.method || '').trim().toUpperCase() || this.options.authMethod || false
+ };
+ }
+ }
+
+ /**
+ * Sends an e-mail using the selected settings
+ *
+ * @param {Object} mail Mail object
+ * @param {Function} callback Callback function
+ */
+ send(mail, callback) {
+ this.getSocket(this.options, (err, socketOptions) => {
+ if (err) {
+ return callback(err);
+ }
+
+ let returned = false;
+ let options = this.options;
+ if (socketOptions && socketOptions.connection) {
+ this.logger.info(
+ {
+ tnx: 'proxy',
+ remoteAddress: socketOptions.connection.remoteAddress,
+ remotePort: socketOptions.connection.remotePort,
+ destHost: options.host || '',
+ destPort: options.port || '',
+ action: 'connected'
+ },
+ 'Using proxied socket from %s:%s to %s:%s',
+ socketOptions.connection.remoteAddress,
+ socketOptions.connection.remotePort,
+ options.host || '',
+ options.port || ''
+ );
+
+ // only copy options if we need to modify it
+ options = shared.assign(false, options);
+ Object.keys(socketOptions).forEach(key => {
+ options[key] = socketOptions[key];
+ });
+ }
+
+ let connection = new SMTPConnection(options);
+
+ connection.once('error', err => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ connection.close();
+ return callback(err);
+ });
+
+ connection.once('end', () => {
+ if (returned) {
+ return;
+ }
+
+ let timer = setTimeout(() => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ // still have not returned, this means we have an unexpected connection close
+ let err = new Error('Unexpected socket close');
+ if (connection && connection._socket && connection._socket.upgrading) {
+ // starttls connection errors
+ err.code = 'ETLS';
+ }
+ callback(err);
+ }, 1000);
+
+ try {
+ timer.unref();
+ } catch (E) {
+ // Ignore. Happens on envs with non-node timer implementation
+ }
+ });
+
+ let sendMessage = () => {
+ let envelope = mail.message.getEnvelope();
+ let messageId = mail.message.messageId();
+
+ let recipients = [].concat(envelope.to || []);
+ if (recipients.length > 3) {
+ recipients.push('...and ' + recipients.splice(2).length + ' more');
+ }
+
+ if (mail.data.dsn) {
+ envelope.dsn = mail.data.dsn;
+ }
+
+ this.logger.info(
+ {
+ tnx: 'send',
+ messageId
+ },
+ 'Sending message %s to <%s>',
+ messageId,
+ recipients.join(', ')
+ );
+
+ connection.send(envelope, mail.message.createReadStream(), (err, info) => {
+ returned = true;
+ connection.close();
+ if (err) {
+ this.logger.error(
+ {
+ err,
+ tnx: 'send'
+ },
+ 'Send error for %s: %s',
+ messageId,
+ err.message
+ );
+ return callback(err);
+ }
+ info.envelope = {
+ from: envelope.from,
+ to: envelope.to
+ };
+ info.messageId = messageId;
+ try {
+ return callback(null, info);
+ } catch (E) {
+ this.logger.error(
+ {
+ err: E,
+ tnx: 'callback'
+ },
+ 'Callback error for %s: %s',
+ messageId,
+ E.message
+ );
+ }
+ });
+ };
+
+ connection.connect(() => {
+ if (returned) {
+ return;
+ }
+
+ let auth = this.getAuth(mail.data.auth);
+
+ if (auth && (connection.allowsAuth || options.forceAuth)) {
+ connection.login(auth, err => {
+ if (auth && auth !== this.auth && auth.oauth2) {
+ auth.oauth2.removeAllListeners();
+ }
+ if (returned) {
+ return;
+ }
+
+ if (err) {
+ returned = true;
+ connection.close();
+ return callback(err);
+ }
+
+ sendMessage();
+ });
+ } else {
+ sendMessage();
+ }
+ });
+ });
+ }
+
+ /**
+ * Verifies SMTP configuration
+ *
+ * @param {Function} callback Callback function
+ */
+ verify(callback) {
+ let promise;
+
+ if (!callback) {
+ promise = new Promise((resolve, reject) => {
+ callback = shared.callbackPromise(resolve, reject);
+ });
+ }
+
+ this.getSocket(this.options, (err, socketOptions) => {
+ if (err) {
+ return callback(err);
+ }
+
+ let options = this.options;
+ if (socketOptions && socketOptions.connection) {
+ this.logger.info(
+ {
+ tnx: 'proxy',
+ remoteAddress: socketOptions.connection.remoteAddress,
+ remotePort: socketOptions.connection.remotePort,
+ destHost: options.host || '',
+ destPort: options.port || '',
+ action: 'connected'
+ },
+ 'Using proxied socket from %s:%s to %s:%s',
+ socketOptions.connection.remoteAddress,
+ socketOptions.connection.remotePort,
+ options.host || '',
+ options.port || ''
+ );
+
+ options = shared.assign(false, options);
+ Object.keys(socketOptions).forEach(key => {
+ options[key] = socketOptions[key];
+ });
+ }
+
+ let connection = new SMTPConnection(options);
+ let returned = false;
+
+ connection.once('error', err => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ connection.close();
+ return callback(err);
+ });
+
+ connection.once('end', () => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ return callback(new Error('Connection closed'));
+ });
+
+ let finalize = () => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ connection.quit();
+ return callback(null, true);
+ };
+
+ connection.connect(() => {
+ if (returned) {
+ return;
+ }
+
+ let authData = this.getAuth({});
+
+ if (authData && (connection.allowsAuth || options.forceAuth)) {
+ connection.login(authData, err => {
+ if (returned) {
+ return;
+ }
+
+ if (err) {
+ returned = true;
+ connection.close();
+ return callback(err);
+ }
+
+ finalize();
+ });
+ } else if (!authData && connection.allowsAuth && options.forceAuth) {
+ let err = new Error('Authentication info was not provided');
+ err.code = 'NoAuth';
+
+ returned = true;
+ connection.close();
+ return callback(err);
+ } else {
+ finalize();
+ }
+ });
+ });
+
+ return promise;
+ }
+
+ /**
+ * Releases resources
+ */
+ close() {
+ if (this.auth && this.auth.oauth2) {
+ this.auth.oauth2.removeAllListeners();
+ }
+ this.emit('close');
+ }
+}
+
+// expose to the world
+module.exports = SMTPTransport;
+
+
+/***/ }),
+
+/***/ 1888:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const packageData = __nccwpck_require__(4129);
+const shared = __nccwpck_require__(2673);
+
+/**
+ * Generates a Transport object for streaming
+ *
+ * Possible options can be the following:
+ *
+ * * **buffer** if true, then returns the message as a Buffer object instead of a stream
+ * * **newline** either 'windows' or 'unix'
+ *
+ * @constructor
+ * @param {Object} optional config parameter
+ */
+class StreamTransport {
+ constructor(options) {
+ options = options || {};
+
+ this.options = options || {};
+
+ this.name = 'StreamTransport';
+ this.version = packageData.version;
+
+ this.logger = shared.getLogger(this.options, {
+ component: this.options.component || 'stream-transport'
+ });
+
+ this.winbreak = ['win', 'windows', 'dos', '\r\n'].includes((options.newline || '').toString().toLowerCase());
+ }
+
+ /**
+ * Compiles a mailcomposer message and forwards it to handler that sends it
+ *
+ * @param {Object} emailMessage MailComposer object
+ * @param {Function} callback Callback function to run when the sending is completed
+ */
+ send(mail, done) {
+ // We probably need this in the output
+ mail.message.keepBcc = true;
+
+ let envelope = mail.data.envelope || mail.message.getEnvelope();
+ let messageId = mail.message.messageId();
+
+ let recipients = [].concat(envelope.to || []);
+ if (recipients.length > 3) {
+ recipients.push('...and ' + recipients.splice(2).length + ' more');
+ }
+ this.logger.info(
+ {
+ tnx: 'send',
+ messageId
+ },
+ 'Sending message %s to <%s> using %s line breaks',
+ messageId,
+ recipients.join(', '),
+ this.winbreak ? '' : ''
+ );
+
+ setImmediate(() => {
+ let stream;
+
+ try {
+ stream = mail.message.createReadStream();
+ } catch (E) {
+ this.logger.error(
+ {
+ err: E,
+ tnx: 'send',
+ messageId
+ },
+ 'Creating send stream failed for %s. %s',
+ messageId,
+ E.message
+ );
+ return done(E);
+ }
+
+ if (!this.options.buffer) {
+ stream.once('error', err => {
+ this.logger.error(
+ {
+ err,
+ tnx: 'send',
+ messageId
+ },
+ 'Failed creating message for %s. %s',
+ messageId,
+ err.message
+ );
+ });
+ return done(null, {
+ envelope: mail.data.envelope || mail.message.getEnvelope(),
+ messageId,
+ message: stream
+ });
+ }
+
+ let chunks = [];
+ let chunklen = 0;
+ stream.on('readable', () => {
+ let chunk;
+ while ((chunk = stream.read()) !== null) {
+ chunks.push(chunk);
+ chunklen += chunk.length;
+ }
+ });
+
+ stream.once('error', err => {
+ this.logger.error(
+ {
+ err,
+ tnx: 'send',
+ messageId
+ },
+ 'Failed creating message for %s. %s',
+ messageId,
+ err.message
+ );
+ return done(err);
+ });
+
+ stream.on('end', () =>
+ done(null, {
+ envelope: mail.data.envelope || mail.message.getEnvelope(),
+ messageId,
+ message: Buffer.concat(chunks, chunklen)
+ })
+ );
+ });
+ }
+}
+
+module.exports = StreamTransport;
+
+
+/***/ }),
+
+/***/ 6961:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const services = __nccwpck_require__(8249);
+const normalized = {};
+
+Object.keys(services).forEach(key => {
+ let service = services[key];
+
+ normalized[normalizeKey(key)] = normalizeService(service);
+
+ [].concat(service.aliases || []).forEach(alias => {
+ normalized[normalizeKey(alias)] = normalizeService(service);
+ });
+
+ [].concat(service.domains || []).forEach(domain => {
+ normalized[normalizeKey(domain)] = normalizeService(service);
+ });
+});
+
+function normalizeKey(key) {
+ return key.replace(/[^a-zA-Z0-9.-]/g, '').toLowerCase();
+}
+
+function normalizeService(service) {
+ let filter = ['domains', 'aliases'];
+ let response = {};
+
+ Object.keys(service).forEach(key => {
+ if (filter.indexOf(key) < 0) {
+ response[key] = service[key];
+ }
+ });
+
+ return response;
+}
+
+/**
+ * Resolves SMTP config for given key. Key can be a name (like 'Gmail'), alias (like 'Google Mail') or
+ * an email address (like 'test@googlemail.com').
+ *
+ * @param {String} key [description]
+ * @returns {Object} SMTP config or false if not found
+ */
+module.exports = function (key) {
+ key = normalizeKey(key.split('@').pop());
+ return normalized[key] || false;
+};
+
+
+/***/ }),
+
+/***/ 9882:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+
+const Stream = (__nccwpck_require__(2781).Stream);
+const nmfetch = __nccwpck_require__(4446);
+const crypto = __nccwpck_require__(6113);
+const shared = __nccwpck_require__(2673);
+
+/**
+ * XOAUTH2 access_token generator for Gmail.
+ * Create client ID for web applications in Google API console to use it.
+ * See Offline Access for receiving the needed refreshToken for an user
+ * https://developers.google.com/accounts/docs/OAuth2WebServer#offline
+ *
+ * Usage for generating access tokens with a custom method using provisionCallback:
+ * provisionCallback(user, renew, callback)
+ * * user is the username to get the token for
+ * * renew is a boolean that if true indicates that existing token failed and needs to be renewed
+ * * callback is the callback to run with (error, accessToken [, expires])
+ * * accessToken is a string
+ * * expires is an optional expire time in milliseconds
+ * If provisionCallback is used, then Nodemailer does not try to attempt generating the token by itself
+ *
+ * @constructor
+ * @param {Object} options Client information for token generation
+ * @param {String} options.user User e-mail address
+ * @param {String} options.clientId Client ID value
+ * @param {String} options.clientSecret Client secret value
+ * @param {String} options.refreshToken Refresh token for an user
+ * @param {String} options.accessUrl Endpoint for token generation, defaults to 'https://accounts.google.com/o/oauth2/token'
+ * @param {String} options.accessToken An existing valid accessToken
+ * @param {String} options.privateKey Private key for JSW
+ * @param {Number} options.expires Optional Access Token expire time in ms
+ * @param {Number} options.timeout Optional TTL for Access Token in seconds
+ * @param {Function} options.provisionCallback Function to run when a new access token is required
+ */
+class XOAuth2 extends Stream {
+ constructor(options, logger) {
+ super();
+
+ this.options = options || {};
+
+ if (options && options.serviceClient) {
+ if (!options.privateKey || !options.user) {
+ setImmediate(() => this.emit('error', new Error('Options "privateKey" and "user" are required for service account!')));
+ return;
+ }
+
+ let serviceRequestTimeout = Math.min(Math.max(Number(this.options.serviceRequestTimeout) || 0, 0), 3600);
+ this.options.serviceRequestTimeout = serviceRequestTimeout || 5 * 60;
+ }
+
+ this.logger = shared.getLogger(
+ {
+ logger
+ },
+ {
+ component: this.options.component || 'OAuth2'
+ }
+ );
+
+ this.provisionCallback = typeof this.options.provisionCallback === 'function' ? this.options.provisionCallback : false;
+
+ this.options.accessUrl = this.options.accessUrl || 'https://accounts.google.com/o/oauth2/token';
+ this.options.customHeaders = this.options.customHeaders || {};
+ this.options.customParams = this.options.customParams || {};
+
+ this.accessToken = this.options.accessToken || false;
+
+ if (this.options.expires && Number(this.options.expires)) {
+ this.expires = this.options.expires;
+ } else {
+ let timeout = Math.max(Number(this.options.timeout) || 0, 0);
+ this.expires = (timeout && Date.now() + timeout * 1000) || 0;
+ }
+ }
+
+ /**
+ * Returns or generates (if previous has expired) a XOAuth2 token
+ *
+ * @param {Boolean} renew If false then use cached access token (if available)
+ * @param {Function} callback Callback function with error object and token string
+ */
+ getToken(renew, callback) {
+ if (!renew && this.accessToken && (!this.expires || this.expires > Date.now())) {
+ return callback(null, this.accessToken);
+ }
+
+ let generateCallback = (...args) => {
+ if (args[0]) {
+ this.logger.error(
+ {
+ err: args[0],
+ tnx: 'OAUTH2',
+ user: this.options.user,
+ action: 'renew'
+ },
+ 'Failed generating new Access Token for %s',
+ this.options.user
+ );
+ } else {
+ this.logger.info(
+ {
+ tnx: 'OAUTH2',
+ user: this.options.user,
+ action: 'renew'
+ },
+ 'Generated new Access Token for %s',
+ this.options.user
+ );
+ }
+ callback(...args);
+ };
+
+ if (this.provisionCallback) {
+ this.provisionCallback(this.options.user, !!renew, (err, accessToken, expires) => {
+ if (!err && accessToken) {
+ this.accessToken = accessToken;
+ this.expires = expires || 0;
+ }
+ generateCallback(err, accessToken);
+ });
+ } else {
+ this.generateToken(generateCallback);
+ }
+ }
+
+ /**
+ * Updates token values
+ *
+ * @param {String} accessToken New access token
+ * @param {Number} timeout Access token lifetime in seconds
+ *
+ * Emits 'token': { user: User email-address, accessToken: the new accessToken, timeout: TTL in seconds}
+ */
+ updateToken(accessToken, timeout) {
+ this.accessToken = accessToken;
+ timeout = Math.max(Number(timeout) || 0, 0);
+ this.expires = (timeout && Date.now() + timeout * 1000) || 0;
+
+ this.emit('token', {
+ user: this.options.user,
+ accessToken: accessToken || '',
+ expires: this.expires
+ });
+ }
+
+ /**
+ * Generates a new XOAuth2 token with the credentials provided at initialization
+ *
+ * @param {Function} callback Callback function with error object and token string
+ */
+ generateToken(callback) {
+ let urlOptions;
+ let loggedUrlOptions;
+ if (this.options.serviceClient) {
+ // service account - https://developers.google.com/identity/protocols/OAuth2ServiceAccount
+ let iat = Math.floor(Date.now() / 1000); // unix time
+ let tokenData = {
+ iss: this.options.serviceClient,
+ scope: this.options.scope || 'https://mail.google.com/',
+ sub: this.options.user,
+ aud: this.options.accessUrl,
+ iat,
+ exp: iat + this.options.serviceRequestTimeout
+ };
+ let token;
+ try {
+ token = this.jwtSignRS256(tokenData);
+ } catch (err) {
+ return callback(new Error('Can\x27t generate token. Check your auth options'));
+ }
+
+ urlOptions = {
+ grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',
+ assertion: token
+ };
+
+ loggedUrlOptions = {
+ grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',
+ assertion: tokenData
+ };
+ } else {
+ if (!this.options.refreshToken) {
+ return callback(new Error('Can\x27t create new access token for user'));
+ }
+
+ // web app - https://developers.google.com/identity/protocols/OAuth2WebServer
+ urlOptions = {
+ client_id: this.options.clientId || '',
+ client_secret: this.options.clientSecret || '',
+ refresh_token: this.options.refreshToken,
+ grant_type: 'refresh_token'
+ };
+
+ loggedUrlOptions = {
+ client_id: this.options.clientId || '',
+ client_secret: (this.options.clientSecret || '').substr(0, 6) + '...',
+ refresh_token: (this.options.refreshToken || '').substr(0, 6) + '...',
+ grant_type: 'refresh_token'
+ };
+ }
+
+ Object.keys(this.options.customParams).forEach(key => {
+ urlOptions[key] = this.options.customParams[key];
+ loggedUrlOptions[key] = this.options.customParams[key];
+ });
+
+ this.logger.debug(
+ {
+ tnx: 'OAUTH2',
+ user: this.options.user,
+ action: 'generate'
+ },
+ 'Requesting token using: %s',
+ JSON.stringify(loggedUrlOptions)
+ );
+
+ this.postRequest(this.options.accessUrl, urlOptions, this.options, (error, body) => {
+ let data;
+
+ if (error) {
+ return callback(error);
+ }
+
+ try {
+ data = JSON.parse(body.toString());
+ } catch (E) {
+ return callback(E);
+ }
+
+ if (!data || typeof data !== 'object') {
+ this.logger.debug(
+ {
+ tnx: 'OAUTH2',
+ user: this.options.user,
+ action: 'post'
+ },
+ 'Response: %s',
+ (body || '').toString()
+ );
+ return callback(new Error('Invalid authentication response'));
+ }
+
+ let logData = {};
+ Object.keys(data).forEach(key => {
+ if (key !== 'access_token') {
+ logData[key] = data[key];
+ } else {
+ logData[key] = (data[key] || '').toString().substr(0, 6) + '...';
+ }
+ });
+
+ this.logger.debug(
+ {
+ tnx: 'OAUTH2',
+ user: this.options.user,
+ action: 'post'
+ },
+ 'Response: %s',
+ JSON.stringify(logData)
+ );
+
+ if (data.error) {
+ // Error Response : https://tools.ietf.org/html/rfc6749#section-5.2
+ let errorMessage = data.error;
+ if (data.error_description) {
+ errorMessage += ': ' + data.error_description;
+ }
+ if (data.error_uri) {
+ errorMessage += ' (' + data.error_uri + ')';
+ }
+ return callback(new Error(errorMessage));
+ }
+
+ if (data.access_token) {
+ this.updateToken(data.access_token, data.expires_in);
+ return callback(null, this.accessToken);
+ }
+
+ return callback(new Error('No access token'));
+ });
+ }
+
+ /**
+ * Converts an access_token and user id into a base64 encoded XOAuth2 token
+ *
+ * @param {String} [accessToken] Access token string
+ * @return {String} Base64 encoded token for IMAP or SMTP login
+ */
+ buildXOAuth2Token(accessToken) {
+ let authData = ['user=' + (this.options.user || ''), 'auth=Bearer ' + (accessToken || this.accessToken), '', ''];
+ return Buffer.from(authData.join('\x01'), 'utf-8').toString('base64');
+ }
+
+ /**
+ * Custom POST request handler.
+ * This is only needed to keep paths short in Windows – usually this module
+ * is a dependency of a dependency and if it tries to require something
+ * like the request module the paths get way too long to handle for Windows.
+ * As we do only a simple POST request we do not actually require complicated
+ * logic support (no redirects, no nothing) anyway.
+ *
+ * @param {String} url Url to POST to
+ * @param {String|Buffer} payload Payload to POST
+ * @param {Function} callback Callback function with (err, buff)
+ */
+ postRequest(url, payload, params, callback) {
+ let returned = false;
+
+ let chunks = [];
+ let chunklen = 0;
+
+ let req = nmfetch(url, {
+ method: 'post',
+ headers: params.customHeaders,
+ body: payload,
+ allowErrorResponse: true
+ });
+
+ req.on('readable', () => {
+ let chunk;
+ while ((chunk = req.read()) !== null) {
+ chunks.push(chunk);
+ chunklen += chunk.length;
+ }
+ });
+
+ req.once('error', err => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ return callback(err);
+ });
+
+ req.once('end', () => {
+ if (returned) {
+ return;
+ }
+ returned = true;
+ return callback(null, Buffer.concat(chunks, chunklen));
+ });
+ }
+
+ /**
+ * Encodes a buffer or a string into Base64url format
+ *
+ * @param {Buffer|String} data The data to convert
+ * @return {String} The encoded string
+ */
+ toBase64URL(data) {
+ if (typeof data === 'string') {
+ data = Buffer.from(data);
+ }
+
+ return data
+ .toString('base64')
+ .replace(/[=]+/g, '') // remove '='s
+ .replace(/\+/g, '-') // '+' → '-'
+ .replace(/\//g, '_'); // '/' → '_'
+ }
+
+ /**
+ * Creates a JSON Web Token signed with RS256 (SHA256 + RSA)
+ *
+ * @param {Object} payload The payload to include in the generated token
+ * @return {String} The generated and signed token
+ */
+ jwtSignRS256(payload) {
+ payload = ['{"alg":"RS256","typ":"JWT"}', JSON.stringify(payload)].map(val => this.toBase64URL(val)).join('.');
+ let signature = crypto.createSign('RSA-SHA256').update(payload).sign(this.options.privateKey);
+ return payload + '.' + this.toBase64URL(signature);
+ }
+}
+
+module.exports = XOAuth2;
+
+
/***/ }),
/***/ 2360:
@@ -55675,45 +69247,6 @@ module.exports = function (Twig) {
};
-/***/ }),
-
-/***/ 7244:
-/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
-
-
-// EXPORTS
-__nccwpck_require__.d(__webpack_exports__, {
- "sq": () => (/* binding */ sq)
-});
-
-;// CONCATENATED MODULE: ./node_modules/snek-query/dist/index.js
-var n={__proto__:null};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t({name:e,value:t})),a=s.apply(this,arguments);if("string"==typeof n){t[n].isFnAndCalled=!0;for(const e of r)t[n].args=t[n].args.filter(t=>t.name!==e.name),t[n].args.push(e)}return a}:s)}});return Object.assign(r,{$trackedProps:t,$isTracked:!0})}function l(e){let t=null,r=c({});return new Proxy({},{get:(n,a,s)=>(t||(t=new e,r=c(t),t=r),Reflect.get(t,a,s)),getOwnPropertyDescriptor:(e,r)=>Object.getOwnPropertyDescriptor(t,r),ownKeys:()=>Reflect.ownKeys(t)})}function u(e){let t;return new Proxy([],{get(r,n,a){if(t||(t=c(new e)),!t||!t.$isTracked||"symbol"==typeof n||"length"===n)return Reflect.get(r,n,a);const s=Number(n);return isNaN(s)?Array.prototype.hasOwnProperty(n)?(...e)=>{const r=n;switch(r){case"concat":case"copyWithin":case"fill":case"pop":case"push":case"reverse":case"shift":case"sort":case"splice":case"unshift":case"filter":return Array.prototype[r].call([t],...e),[t];case"entries":case"flatMap":case"forEach":case"keys":case"map":case"slice":case"values":case"every":case"find":case"findIndex":case"includes":case"indexOf":case"lastIndexOf":case"some":case"flat":case"reduce":case"reduceRight":return Array.prototype[r].call([t],...e);case"toLocaleString":case"toString":return Array.prototype[r].call([t]);default:throw new Error(`Unsupported array prototype method: ${r.toString()}`)}}:Reflect.get(r,n,a):t}})}const f=e=>{const t=l(e),r=()=>t;return r.isProxied=!0,r},d=e=>{const t=u(e),r=()=>t;return r.isProxied=!0,r},y=async e=>{let t={headers:{}};for(const r of e){const e=await r({context:t});e&&(t=e)}return t},h=e=>!(!e||!("function"==typeof e&&e.isProxied||Array.isArray(e)&&e.length&&e[0].$isTracked||e.$isTracked));class p{constructor(e){this.type=void 0,this.name=void 0,this.fields=void 0,this.type=e.type,this.name=e.name,this.fields=[]}addField(e,t=""){if(e.args=e.args.filter(e=>{const t=typeof e.value;return("string"===t||"number"===t||"boolean"===t||"object"===t||"function"===t&&e.value.preventStringSerialization)&&null!=e.value}),t){const r=t.split(".");let n=this.fields;for(const e of r){const t=n.find(t=>t.name===e);t&&(t.fields=t.fields||[],n=t.fields)}n.push(e)}else this.fields.push(e)}toString(){const e=e=>{const r=e.args.map(e=>{const t="function"==typeof e.value&&e.value.preventStringSerialization?g(e.value(),!1):g(e.value);return`${e.name}: ${t}`}).join(", "),n=e.fields?` {__typename ${t(e.fields)}}`:"";return r?`${e.name}(${r})${n}`:`${e.name}${n}`},t=t=>t.map(e).join(" ");return`${this.type} ${this.name} {__typename ${t(this.fields)}}`}}function w(e){const t=()=>e;return t.preventStringSerialization=!0,t}const m=(e,t)=>{if(null===e)return t;if(void 0===e[t])throw new Error(`Enum key does not exist in enum: ${t.toString()}`);return w(t)};function g(e,t=!0){if(null==e)return"null";if("function"==typeof e&&e.preventStringSerialization)return g(e(),!1);if("object"!=typeof e)return t?JSON.stringify(e):String(e);if(Array.isArray(e)){const r=e.map(e=>g(e,t)).join(", ");return t?`[${r}]`:r}if("object"==typeof e)return`{${Object.entries(e).map(([e,r])=>`${e}: ${g(r,t)}`).join(", ")}}`;throw new Error("Cannot stringify data of type "+typeof e)}class v{constructor(e,t={}){this.url=void 0,this.headers=void 0,this.bypassCache=void 0,this.url=e,this.headers=t;const r=process.env.SQ_OFFLINE_MODE||process.env.EXPO_PUBLIC_SQ_OFFLINE_MODE||process.env.GATSBY_SQ_OFFLINE_MODE||"true";this.bypassCache="false"===r}isQueryOperation(e){return e.trim().startsWith("query ")}async execute(r){var n=this;const s=(e=>{const t=[];(({node:e,onPath:t})=>{const r=(e,n=[])=>{const a=Object.entries(e.$trackedProps||{});if(0===a.length){const r=Object.entries(e);for(const[e,a]of r){let r=a;Array.isArray(r)&&(r=r[0]),"function"==typeof r||h(r)||e.startsWith("$")||t(e,n.join("."),[])}}else for(const[s,o]of a){let a=e[s];if(("function"!=typeof a||o.isFnAndCalled)&&(o.isFnAndCalled&&(a=e[s]()),Array.isArray(a)&&(a=a[0]),t(s,n.join("."),o.args),h(a))){const e=[...n,s];r(a,e)}}};r(e)})({node:e.node,onPath:(e,r,n)=>{t.push({name:e,path:r,args:n})}});const r=new p({type:e.type,name:e.name});for(const{name:e,path:n,args:a}of t)r.addField({name:e,args:a},n);return r})({type:r.type,name:r.name,node:r.node}).toString(),o=this.isQueryOperation(s);if(this.bypassCache){const e=await fetch(this.url,{method:"POST",headers:a({"Content-Type":"application/json"},this.headers),body:JSON.stringify({query:s}),credentials:"include"});return await e.json()}if(!await L()){const e=await this.getCachedData(s);if(e)return{data:e,errors:[]};throw new Error("snek-query is offline. "+(o?"There is no cached data for this query.":"Mutations cannot be performed while offline."))}{const e=5e3,r=2e3,i=new AbortController,c=setTimeout(async function(){const e=new AbortController,a=setTimeout(()=>{e.abort(),i.abort()},r);await k();try{200!==(await fetch(n.url,{signal:e.signal})).status&&i.abort()}catch(e){}finally{clearTimeout(a)}},e);try{const e=await fetch(this.url,{method:"POST",headers:a({"Content-Type":"application/json"},this.headers),body:JSON.stringify({query:s}),credentials:"include",signal:i.signal}),t=await e.json();return o&&this.cacheData(s,t.data),t}catch(e){const t=await this.getCachedData(s);if(t)return{data:t,errors:[]};throw e}finally{clearTimeout(c)}}}async cacheData(e,t){const n=this.generateCacheKey(e),a=JSON.stringify(t);await C.set(n,a)}async getCachedData(e){const t=this.generateCacheKey(e),n=await C.get(t);return n?JSON.parse(n):null}generateCacheKey(e){return e.trim()}}var O=/*#__PURE__*/o("type"),b=/*#__PURE__*/o("node"),j=/*#__PURE__*/o("context"),P=/*#__PURE__*/o("apiURL"),S=/*#__PURE__*/o("attempt");class ${constructor(e){Object.defineProperty(this,O,{writable:!0,value:void 0}),this.name=void 0,Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,j,{writable:!0,value:void 0}),Object.defineProperty(this,P,{writable:!0,value:void 0}),Object.defineProperty(this,S,{writable:!0,value:0}),i(this,O)[O]=e.type,this.name=e.name,i(this,b)[b]=e.node,i(this,j)[j]=e.context,i(this,P)[P]=e.apiURL}getContext(){return i(this,j)[j]}setContext(e){i(this,j)[j]=e}getAttempt(){return i(this,S)[S]}async execute(){i(this,S)[S]++;const e=new v(i(this,P)[P],i(this,j)[j].headers),{data:t,errors:r}=await e.execute({type:i(this,O)[O],name:this.name,node:i(this,b)[b]}),n=t?(e=>{const{node:t,data:r}=e,n=(e,t)=>{const r={};if(!t)return null;for(const[a,s]of Object.entries(t)){const t=e[a];if(void 0===t)continue;const o="function"==typeof t;let i=t;if(o&&(i=t()),Array.isArray(i)&&s){const e=s.map((e,t)=>i[t]?n(i[t],e):e);i=e}else if(null!==i&&"object"==typeof i){const e=n(i,s);i=e}else i=s;r[a]=o?()=>i:i}return r};return n(t,r)})({node:i(this,b)[b],data:t}):null;return{data:n,errors:r}}}const A=async(e,t)=>{var r;let n,a={data:null,errors:[]};try{a=await e.execute()}catch(e){n=e}if(t&&(null!=(r=a)&&r.errors||n)){var s;const r=null==t?void 0:t({forward:e=>A(e),operation:e,graphQLErrors:(null==(s=a)?void 0:s.errors)||[],networkError:n});if(r){const e=await r;if(e)return a=e,a}}if(n)throw n;return a},E=(e,t)=>{const r=async(r,n,s={})=>{const o=e[r];if(!o)throw new Error(`No ${r} operation defined.`);const i=l(o);n(i);const c=new Promise(async(e,o)=>{try{const o=await y(t.middlewares||[]);o.headers=a({},o.headers,s.headers);const c=new $({apiURL:t.apiURL,type:"Query"===r?"query":"mutation",name:s.name||"SnekQueryOperation",node:i,context:o}),l=await A(c,t.onError);e([n(l.data||i),l.errors])}catch(e){o(e)}});return c},n=(r,n="Unnamed")=>{const a=e[r];if(!a)throw new Error(`No ${r} operation defined.`);const s=l(a);return[async()=>{const e=await y(t.middlewares||[]),a=new $({apiURL:t.apiURL,type:"Query"===r?"query":"mutation",name:n,node:s,context:e}),o=await A(a,t.onError);return{data:o.data||s,errors:o.errors}},s]};return{query:async(e,t={})=>r("Query",e,t),mutate:async(e,t={})=>r("Mutation",e,t),lazyQuery:()=>n("Query"),lazyMutation:()=>n("Mutation")}};var x=/*#__PURE__*/o("makeKey");const _="undefined"!=typeof window?window.localStorage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{}},C=new class{constructor(e,t){var r,n=this;this.storageKey=void 0,this.getAll=void 0,this.get=void 0,this.set=void 0,this.remove=void 0,this.removeAll=void 0,Object.defineProperty(this,x,{writable:!0,value:e=>`${this.storageKey}:${e}`}),this.storageKey=null!=(r=null==t?void 0:t.key)?r:"@snek-query:storage",this.getAll=async function(){const t=await e.get(n.storageKey);return t?JSON.parse(t):null},this.get=async function(t){var r;const a=await e.get(i(n,x)[x](t));if(a)return await e.remove(i(n,x)[x](t)),await n.set(t,a),a;const s=await n.getAll();return s&&null!=(r=s[t])?r:null},this.set=async function(t,r){const s=await n.getAll(),o=JSON.stringify(a({},s,{[t]:r}));return e.set(n.storageKey,o)},this.remove=async function(t){return await e.remove(t)},this.removeAll=async function(){return await e.remove(n.storageKey)}}}({get:e=>Promise.resolve(_.getItem(e)),set:(e,t)=>Promise.resolve(_.setItem(e,t)),remove:e=>Promise.resolve(_.removeItem(e))}),L=async()=>"undefined"==typeof navigator||navigator.onLine,k=async()=>{},T=e=>{const t=()=>e(!0),r=()=>e(!1);if("undefined"!=typeof window)return window.addEventListener("online",t),window.addEventListener("offline",r),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}};
-//# sourceMappingURL=index.js.map
-
-;// CONCATENATED MODULE: ./src/clients/mailer/src/schema.generated.ts
-
-class Query {
- constructor() { this.__typename = ""; this.version = ""; }
-}
-class Mutation {
- constructor() { this.__typename = ""; this.sendMailSMTP = f(SentMessageInfo); this.sendMailAzure = () => null; this.sendMailGoogle = () => null; }
-}
-class SentMessageInfo {
- constructor() { this.__typename = ""; this.accepted = []; this.rejected = []; this.rejectedErrors = u(SMTPError); this.response = ""; this.envelopeTime = null; this.messageTime = null; this.messageSize = null; }
-}
-class SMTPError {
- constructor() { this.__typename = ""; this.code = null; this.response = null; this.responseCode = null; this.command = null; this.errno = null; this.path = null; this.syscall = null; this.name = ""; this.message = ""; this.stack = null; }
-}
-
-;// CONCATENATED MODULE: ./src/clients/mailer/src/index.ts
-
-
-const apiURL = "https://services.snek.at/mailer/graphql";
-const sq = E({ Query: Query, Mutation: Mutation }, {
- apiURL,
-});
-
-
/***/ }),
/***/ 6373:
@@ -57736,14 +71269,16 @@ __nccwpck_require__.a(module, async (__webpack_handle_async_dependencies__, __we
/* harmony export */ });
/* harmony import */ var _cronitio_pylon__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(1121);
/* harmony import */ var html_to_text__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(1989);
-/* harmony import */ var _repository_models_EmailTemplate__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(3436);
+/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(6144);
/* harmony import */ var _repository_models_Email__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(7538);
-/* harmony import */ var _services_email_template_factory__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(7709);
-/* harmony import */ var _services_transformer_sandbox__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(9110);
-/* harmony import */ var _clients_mailer_src__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(7244);
-/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(6144);
-var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_repository_models_EmailTemplate__WEBPACK_IMPORTED_MODULE_2__, ___WEBPACK_IMPORTED_MODULE_6__]);
-([_repository_models_EmailTemplate__WEBPACK_IMPORTED_MODULE_2__, ___WEBPACK_IMPORTED_MODULE_6__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
+/* harmony import */ var _repository_models_EmailTemplate__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(3436);
+/* harmony import */ var _services_email_template_factory__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(7709);
+/* harmony import */ var _services_mailer_azure__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(2100);
+/* harmony import */ var _services_mailer_google__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(2111);
+/* harmony import */ var _services_mailer_smtp__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(4288);
+/* harmony import */ var _services_transformer_sandbox__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(9110);
+var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([___WEBPACK_IMPORTED_MODULE_2__, _repository_models_EmailTemplate__WEBPACK_IMPORTED_MODULE_4__]);
+([___WEBPACK_IMPORTED_MODULE_2__, _repository_models_EmailTemplate__WEBPACK_IMPORTED_MODULE_4__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -57758,6 +71293,8 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
+
+
class MailFactory {
static async send(senderEmail, envelope, body, bodyHTML) {
try {
@@ -57766,26 +71303,20 @@ class MailFactory {
if (!smtpConfig) {
throw new Error("No email configuration found. This should not happen");
}
- const [data, errors] = await _clients_mailer_src__WEBPACK_IMPORTED_MODULE_5__.sq.mutate((m) => m.sendMailSMTP({
- mailOptions: {
- from: senderEmail.email,
- to: envelope.to,
- replyTo: envelope.replyTo,
- subject: envelope.subject,
- html: bodyHTML,
- text: body,
- },
- smtpOptions: {
- host: smtpConfig.host,
- port: smtpConfig.port,
- secure: smtpConfig.secure,
- user: smtpConfig.username,
- password: smtpConfig.password,
- },
- }));
- if (errors) {
- throw new Error(errors[0].message);
- }
+ const data = await (0,_services_mailer_smtp__WEBPACK_IMPORTED_MODULE_6__/* .sendMail */ .Y)({
+ from: senderEmail.email,
+ to: envelope.to,
+ replyTo: envelope.replyTo,
+ subject: envelope.subject,
+ html: bodyHTML,
+ text: body,
+ }, {
+ host: smtpConfig.host,
+ port: smtpConfig.port,
+ secure: smtpConfig.secure,
+ user: smtpConfig.username,
+ password: smtpConfig.password,
+ });
return data;
}
const oauthConfig = await senderEmail.oauthConfig();
@@ -57795,41 +71326,29 @@ class MailFactory {
}
const token = await oauthConfig.$freshAccessToken();
if (oauthConfig.provider === "AZURE") {
- const [data, errors] = await _clients_mailer_src__WEBPACK_IMPORTED_MODULE_5__.sq.mutate((m) => m.sendMailAzure({
- mailOptions: {
- from: senderEmail.email,
- to: envelope.to,
- replyTo: envelope.replyTo,
- subject: envelope.subject,
- html: bodyHTML,
- text: body,
- },
- oauthOptions: {
- accessToken: token,
- },
- }));
- if (errors) {
- throw new Error(errors[0].message);
- }
+ const data = await (0,_services_mailer_azure__WEBPACK_IMPORTED_MODULE_7__/* .sendMail */ .Y)({
+ from: senderEmail.email,
+ to: envelope.to,
+ replyTo: envelope.replyTo,
+ subject: envelope.subject,
+ html: bodyHTML,
+ text: body,
+ }, {
+ accessToken: token,
+ });
return data;
}
else if (oauthConfig.provider === "GOOGLE") {
- const [data, errors] = await _clients_mailer_src__WEBPACK_IMPORTED_MODULE_5__.sq.mutate((m) => m.sendMailGoogle({
- mailOptions: {
- from: senderEmail.email,
- to: envelope.to,
- replyTo: envelope.replyTo,
- subject: envelope.subject,
- html: bodyHTML,
- text: body,
- },
- oauthOptions: {
- accessToken: token,
- },
- }));
- if (errors) {
- throw new Error(errors[0].message);
- }
+ const data = await (0,_services_mailer_google__WEBPACK_IMPORTED_MODULE_8__/* .sendMail */ .Y)({
+ from: senderEmail.email,
+ to: envelope.to,
+ replyTo: envelope.replyTo,
+ subject: envelope.subject,
+ html: bodyHTML,
+ text: body,
+ }, {
+ accessToken: token,
+ });
return data;
}
}
@@ -57850,7 +71369,7 @@ class MailFactory {
}
}
static async sendTemplateMail(id, envelope, values) {
- const emailTemplate = await _repository_models_EmailTemplate__WEBPACK_IMPORTED_MODULE_2__.EmailTemplate.objects.get({ id });
+ const emailTemplate = await _repository_models_EmailTemplate__WEBPACK_IMPORTED_MODULE_4__.EmailTemplate.objects.get({ id });
const emailEnvelope = await emailTemplate.envelope();
let combinedEnvelope = {
subject: emailEnvelope?.subject || envelope?.subject || "No subject",
@@ -57864,7 +71383,7 @@ class MailFactory {
combinedEnvelope.to = envelope.to;
}
const variables = await emailTemplate?.variables();
- const bodyHTML = _services_email_template_factory__WEBPACK_IMPORTED_MODULE_4__/* .EmailTemplateFactory.render */ .G.render({
+ const bodyHTML = _services_email_template_factory__WEBPACK_IMPORTED_MODULE_5__/* .EmailTemplateFactory.render */ .G.render({
content: emailTemplate?.content,
variables: Object.values(variables.nodes).reduce((acc, variable) => ({
...acc,
@@ -57874,7 +71393,7 @@ class MailFactory {
const body = (0,html_to_text__WEBPACK_IMPORTED_MODULE_1__/* .htmlToText */ .s9)(bodyHTML, {});
if (emailTemplate.transformer) {
const parentTemplate = await emailTemplate.parent();
- const transformedTemplate = await (0,_services_transformer_sandbox__WEBPACK_IMPORTED_MODULE_7__/* .executeInSandbox */ .s)({
+ const transformedTemplate = await (0,_services_transformer_sandbox__WEBPACK_IMPORTED_MODULE_9__/* .executeInSandbox */ .s)({
input: {
envelope: combinedEnvelope,
values: values || {},
@@ -57926,7 +71445,7 @@ class MailFactory {
if (!body && !bodyHTML) {
throw new Error("No body or bodyHTML provided");
}
- const ctx = await ___WEBPACK_IMPORTED_MODULE_6__/* ["default"].getContext */ .ZP.getContext();
+ const ctx = await ___WEBPACK_IMPORTED_MODULE_2__/* ["default"].getContext */ .ZP.getContext();
const senderEmail = await ctx.user.email();
_cronitio_pylon__WEBPACK_IMPORTED_MODULE_0__.logger.info("Mail sent", envelope);
if (!senderEmail) {
@@ -57949,6 +71468,124 @@ __decorate([
__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } });
+/***/ }),
+
+/***/ 2100:
+/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
+
+/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
+/* harmony export */ "Y": () => (/* binding */ sendMail)
+/* harmony export */ });
+async function sendMail(mailOptions, oauthOptions) {
+ const apiUrl = "https://graph.microsoft.com/v1.0/me/sendMail";
+ const headers = {
+ Authorization: `Bearer ${oauthOptions.accessToken}`,
+ "Content-Type": "application/json",
+ };
+ const requestBody = JSON.stringify({
+ message: {
+ subject: mailOptions.subject,
+ from: { emailAddress: { address: mailOptions.from } },
+ body: {
+ contentType: mailOptions.html ? "html" : "text",
+ content: mailOptions.html || mailOptions.text,
+ },
+ toRecipients: mailOptions.to.map((to) => ({
+ emailAddress: { address: to },
+ })),
+ ...(mailOptions.replyTo && {
+ replyTo: [{ emailAddress: { address: mailOptions.replyTo } }],
+ }),
+ },
+ saveToSentItems: true,
+ });
+ console.log(requestBody);
+ const response = await fetch(apiUrl, {
+ method: "POST",
+ headers: headers,
+ body: requestBody,
+ });
+ if (!response.ok) {
+ const error = await response.json();
+ throw new Error(`Failed to send email: ${error.error.message}`);
+ }
+ return response;
+}
+
+
+/***/ }),
+
+/***/ 2111:
+/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
+
+/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
+/* harmony export */ "Y": () => (/* binding */ sendMail)
+/* harmony export */ });
+async function sendMail(mailOptions, oauthOptions) {
+ const apiUrl = "https://gmail.googleapis.com/gmail/v1/users/me/messages/send";
+ const headers = {
+ Authorization: `Bearer ${oauthOptions.accessToken}`,
+ "Content-Type": "application/json",
+ };
+ const message = `From: ${mailOptions.from}\n` +
+ `To: ${mailOptions.to.join(",")}\n` +
+ `Subject: ${mailOptions.subject}\n\n` +
+ `${mailOptions.html || mailOptions.text}`;
+ const requestBody = JSON.stringify({
+ raw: Buffer.from(message)
+ .toString("base64")
+ .replace(/\+/g, "-")
+ .replace(/\//g, "_"),
+ });
+ const response = await fetch(apiUrl, {
+ method: "POST",
+ headers: headers,
+ body: requestBody,
+ });
+ if (!response.ok) {
+ const error = await response.json();
+ throw new Error(`Failed to send email: ${error.error.message}`);
+ }
+ return response;
+}
+
+
+/***/ }),
+
+/***/ 4288:
+/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
+
+/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
+/* harmony export */ "Y": () => (/* binding */ sendMail)
+/* harmony export */ });
+/* harmony import */ var nodemailer__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(4289);
+/* harmony import */ var nodemailer_plugin_inline_base64__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(5094);
+/* harmony import */ var nodemailer_plugin_inline_base64__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nccwpck_require__.n(nodemailer_plugin_inline_base64__WEBPACK_IMPORTED_MODULE_1__);
+
+
+async function createConnection({ host, port, secure, user, password, }) {
+ return new Promise((resolve, reject) => {
+ resolve(nodemailer__WEBPACK_IMPORTED_MODULE_0__.createTransport({
+ host: host,
+ port,
+ secure: secure,
+ auth: {
+ user: user,
+ pass: password,
+ },
+ }));
+ });
+}
+async function sendMail(mailOptions, smtpOptions) {
+ const connection = await createConnection(smtpOptions);
+ connection.use("compile", nodemailer_plugin_inline_base64__WEBPACK_IMPORTED_MODULE_1___default()({ cidPrefix: "snek_" }));
+ console.log(mailOptions);
+ const mail = await connection.sendMail(mailOptions);
+ console.log(mail);
+ return mail;
+}
+
+
/***/ }),
/***/ 5690:
@@ -58343,6 +71980,13 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("diagnostics_
/***/ }),
+/***/ 9523:
+/***/ ((module) => {
+
+module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("dns");
+
+/***/ }),
+
/***/ 3639:
/***/ ((module) => {
@@ -58350,6 +71994,13 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("domain");
/***/ }),
+/***/ 2361:
+/***/ ((module) => {
+
+module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("events");
+
+/***/ }),
+
/***/ 7147:
/***/ ((module) => {
@@ -66420,6 +80071,20 @@ function handleDeprecatedOptions (options) {
module.exports = JSON.parse('{"name":"dotenv","version":"16.4.5","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","lint-readme":"standard-markdown","pretest":"npm run lint && npm run dts-check","test":"tap tests/*.js --100 -Rspec","test:coverage":"tap --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3","decache":"^4.6.1","sinon":"^14.0.1","standard":"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0","tap":"^16.3.0","tar":"^6.1.11","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}');
+/***/ }),
+
+/***/ 8249:
+/***/ ((module) => {
+
+module.exports = JSON.parse('{"126":{"host":"smtp.126.com","port":465,"secure":true},"163":{"host":"smtp.163.com","port":465,"secure":true},"1und1":{"host":"smtp.1und1.de","port":465,"secure":true,"authMethod":"LOGIN"},"Aliyun":{"domains":["aliyun.com"],"host":"smtp.aliyun.com","port":465,"secure":true},"AOL":{"domains":["aol.com"],"host":"smtp.aol.com","port":587},"Bluewin":{"host":"smtpauths.bluewin.ch","domains":["bluewin.ch"],"port":465},"DebugMail":{"host":"debugmail.io","port":25},"DynectEmail":{"aliases":["Dynect"],"host":"smtp.dynect.net","port":25},"Ethereal":{"aliases":["ethereal.email"],"host":"smtp.ethereal.email","port":587},"FastMail":{"domains":["fastmail.fm"],"host":"smtp.fastmail.com","port":465,"secure":true},"Forward Email":{"aliases":["FE","ForwardEmail"],"domains":["forwardemail.net"],"host":"smtp.forwardemail.net","port":465,"secure":true},"GandiMail":{"aliases":["Gandi","Gandi Mail"],"host":"mail.gandi.net","port":587},"Gmail":{"aliases":["Google Mail"],"domains":["gmail.com","googlemail.com"],"host":"smtp.gmail.com","port":465,"secure":true},"Godaddy":{"host":"smtpout.secureserver.net","port":25},"GodaddyAsia":{"host":"smtp.asia.secureserver.net","port":25},"GodaddyEurope":{"host":"smtp.europe.secureserver.net","port":25},"hot.ee":{"host":"mail.hot.ee"},"Hotmail":{"aliases":["Outlook","Outlook.com","Hotmail.com"],"domains":["hotmail.com","outlook.com"],"host":"smtp-mail.outlook.com","port":587},"iCloud":{"aliases":["Me","Mac"],"domains":["me.com","mac.com"],"host":"smtp.mail.me.com","port":587},"Infomaniak":{"host":"mail.infomaniak.com","domains":["ik.me","ikmail.com","etik.com"],"port":587},"mail.ee":{"host":"smtp.mail.ee"},"Mail.ru":{"host":"smtp.mail.ru","port":465,"secure":true},"Mailcatch.app":{"host":"sandbox-smtp.mailcatch.app","port":2525},"Maildev":{"port":1025,"ignoreTLS":true},"Mailgun":{"host":"smtp.mailgun.org","port":465,"secure":true},"Mailjet":{"host":"in.mailjet.com","port":587},"Mailosaur":{"host":"mailosaur.io","port":25},"Mailtrap":{"host":"smtp.mailtrap.io","port":2525},"Mandrill":{"host":"smtp.mandrillapp.com","port":587},"Naver":{"host":"smtp.naver.com","port":587},"One":{"host":"send.one.com","port":465,"secure":true},"OpenMailBox":{"aliases":["OMB","openmailbox.org"],"host":"smtp.openmailbox.org","port":465,"secure":true},"Outlook365":{"host":"smtp.office365.com","port":587,"secure":false},"OhMySMTP":{"host":"smtp.ohmysmtp.com","port":587,"secure":false},"Postmark":{"aliases":["PostmarkApp"],"host":"smtp.postmarkapp.com","port":2525},"qiye.aliyun":{"host":"smtp.mxhichina.com","port":"465","secure":true},"QQ":{"domains":["qq.com"],"host":"smtp.qq.com","port":465,"secure":true},"QQex":{"aliases":["QQ Enterprise"],"domains":["exmail.qq.com"],"host":"smtp.exmail.qq.com","port":465,"secure":true},"SendCloud":{"host":"smtp.sendcloud.net","port":2525},"SendGrid":{"host":"smtp.sendgrid.net","port":587},"SendinBlue":{"aliases":["Brevo"],"host":"smtp-relay.brevo.com","port":587},"SendPulse":{"host":"smtp-pulse.com","port":465,"secure":true},"SES":{"host":"email-smtp.us-east-1.amazonaws.com","port":465,"secure":true},"SES-US-EAST-1":{"host":"email-smtp.us-east-1.amazonaws.com","port":465,"secure":true},"SES-US-WEST-2":{"host":"email-smtp.us-west-2.amazonaws.com","port":465,"secure":true},"SES-EU-WEST-1":{"host":"email-smtp.eu-west-1.amazonaws.com","port":465,"secure":true},"SES-AP-SOUTH-1":{"host":"email-smtp.ap-south-1.amazonaws.com","port":465,"secure":true},"SES-AP-NORTHEAST-1":{"host":"email-smtp.ap-northeast-1.amazonaws.com","port":465,"secure":true},"SES-AP-NORTHEAST-2":{"host":"email-smtp.ap-northeast-2.amazonaws.com","port":465,"secure":true},"SES-AP-NORTHEAST-3":{"host":"email-smtp.ap-northeast-3.amazonaws.com","port":465,"secure":true},"SES-AP-SOUTHEAST-1":{"host":"email-smtp.ap-southeast-1.amazonaws.com","port":465,"secure":true},"SES-AP-SOUTHEAST-2":{"host":"email-smtp.ap-southeast-2.amazonaws.com","port":465,"secure":true},"Sparkpost":{"aliases":["SparkPost","SparkPost Mail"],"domains":["sparkpost.com"],"host":"smtp.sparkpostmail.com","port":587,"secure":false},"Tipimail":{"host":"smtp.tipimail.com","port":587},"Yahoo":{"domains":["yahoo.com"],"host":"smtp.mail.yahoo.com","port":465,"secure":true},"Yandex":{"domains":["yandex.ru"],"host":"smtp.yandex.ru","port":465,"secure":true},"Zoho":{"host":"smtp.zoho.com","port":465,"secure":true,"authMethod":"LOGIN"}}');
+
+/***/ }),
+
+/***/ 4129:
+/***/ ((module) => {
+
+module.exports = JSON.parse('{"name":"nodemailer","version":"6.9.13","description":"Easy as cake e-mail sending from your Node.js applications","main":"lib/nodemailer.js","scripts":{"test":"node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","test:coverage":"c8 node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","lint":"eslint .","update":"rm -rf node_modules/ package-lock.json && ncu -u && npm install"},"repository":{"type":"git","url":"https://github.com/nodemailer/nodemailer.git"},"keywords":["Nodemailer"],"author":"Andris Reinman","license":"MIT-0","bugs":{"url":"https://github.com/nodemailer/nodemailer/issues"},"homepage":"https://nodemailer.com/","devDependencies":{"@aws-sdk/client-ses":"3.529.1","bunyan":"1.8.15","c8":"9.1.0","eslint":"8.57.0","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.1.0","libbase64":"1.3.0","libmime":"5.3.4","libqp":"2.1.0","nodemailer-ntlm-auth":"1.0.4","proxy":"1.0.2","proxy-test-server":"1.0.0","smtp-server":"3.13.3"},"engines":{"node":">=6.0.0"}}');
+
/***/ })
/******/ });
diff --git a/.pylon/index.js.map b/.pylon/index.js.map
index 408e92f..df31481 100644
--- a/.pylon/index.js.map
+++ b/.pylon/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvIA;AACA;AACA;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7eA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1yBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5yBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1YA;;;;;;;;;;;;;AAaA;;;;;;;;;;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtiCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5bA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACneA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5NA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpGA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/zCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9vCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACveA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACp8CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACl3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC50BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjhDA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACtFA;AACA;;;ACAA;AAsBA;AAGA;AACA;AACA;AAcA;AACA;AACA;AASA;AACA;AACA;AAYA;AACA;;;ACpEA;AACA;AAOA;AAEA;AAGA;AACA;;;;;;;;;;;;;;ACdA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACTA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAIA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAIA;AACA;AAIA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAIA;AACA;AAEA;AACA;AACA;AAGA;AACA;AAEA;AAEA;AAEA;AAEA;AAEA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;AC5FA;AAYA;AAEA;AACA;AAEA;AAEA;AACA;AAIA;AAIA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AAGA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AAIA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AAGA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AAOA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AAKA;AAIA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AAGA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AAMA;AAIA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AAIA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AASA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AAQA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AAQA;AAIA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AAIA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AAGA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AAGA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAGA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AASA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AAOA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAGA;;;;;;;;;;;;;;;;;;;;;AC5yCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AClBA;AACA;AACA;;ACFA;AACA;AACA;AAEA;;;;;;;;;;;;;;;ACJA;AAEA;AACA;AAEA;;AACA;;;;;;;;;;;;;;;ACNA;AAEA;AACA;AAGA;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;ACRA;AACA;AAEA;AACA;AACA;AAIA;AASA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AAKA;AAEA;AAGA;AACA;AACA;AACA;AACA;AAGA;AAKA;AAiBA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AAuBA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAGA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAKA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAOA;AAGA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;AAxNA;AAQA;AAHA;AACA;AACA;AAUA;AAKA;AAHA;AACA;AACA;AAkBA;AAKA;AAHA;AACA;AACA;AAoCA;AAKA;AAHA;AACA;AACA;AAkFA;AAGA;AADA;AAeA;AAKA;AAHA;AACA;AACA;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9MA;AAEA;AACA;AACA;AACA;AAGA;AAWA;AAKA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AAEA;AACA;AACA;AACA;AACA;;AArCA;AAUA;AAHA;AACA;AACA;AAgBA;AAKA;AAHA;AACA;AACA;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;AC9CA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAQA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AAGA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AAGA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;AA/FA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AASA;AAUA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA/BA;AAQA;AAHA;AACA;AACA;AAwBA;;;;;;;;;;;;;;;;;ACzCA;AAEA;AACA;AAIA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACRA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAMA;AACA;AACA;AACA;AAGA;AAUA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAGA;AAaA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAGA;AAGA;AACA;AAEA;AACA;AAGA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAOA;AACA;AACA;AAEA;AACA;;AAxGA;AA6EA;AADA;AA4BA;AAnGA;AADA;AAIA;AAGA;AADA;AA8BA;AAGA;AADA;AAyBA;AAGA;AADA;AAKA;;;;;;;;;;;;;;;;;ACnFA;AAEA;AACA;AAGA;;AAEA;;;;;;;;;;;;;;;;;;;;ACRA;AACA;AACA;;ACFA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9EA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AA0BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAIA;AAEA;AACA;AACA;AAGA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AAGA;AACA;AACA;AACA;AAKA;AACA;AAEA;AAIA;AAEA;AAEA;AAEA;AACA;AAEA;AAIA;AACA;AACA;AAAA;AACA;AAEA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAUA;AACA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAWA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AAGA;AAIA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AAEA;AAGA;AACA;AACA;AAGA;AAGA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AAEA;AACA;AAGA;AASA;AACA;AACA;AAEA;AAEA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAnCA;AADA;AAmCA;;;;;;;;;;;;;;;;;;;;;;;;;ACrRA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAIA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AAGA;AACA;AAKA;AACA;AACA;AACA;AAEA;AAEA;AAMA;AACA;AACA;AAGA;AAEA;AAEA;AAEA;AACA;AAEA;AACA;AAGA;AAMA;AACA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAMA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAMA;AAEA;AAEA;AAMA;AAEA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACpLA;AAEA;AACA;AACA;AACA;AACA;AACA;AAIA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AAEA;AAEA;AACA;AAEA;AAEA;AAEA;AAEA;AAEA;AACA;AACA;AAGA;AACA;AAKA;AACA;AACA;AACA;AAEA;AAEA;AAMA;AACA;AACA;AAGA;AAEA;AAEA;AAEA;AACA;AAEA;AACA;AAGA;AAMA;AACA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAMA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAMA;AAEA;AAEA;AAMA;AAEA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;;;;;;;;;;;;ACrLA;AAaA;AAEA;AACA;AACA;AAEA;AAGA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAgDA;AACA;;AAEA;AACA;AACA;;;;;;;AAOA;;;AAGA;AAEA;AACA;;;;;;;;AC5HA;AACA;AACA;;;;;;;ACFA;AACA;AACA;;;;;;;ACFA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC3JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAaA;;;AC3MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;;;;;;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjJA;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC/XA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACxRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AChbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/eA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACn6BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAGA;AACA;;AClGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AClmEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACNA;AACA;AACA;AACA;AACA;;;;ACJA;AACA;;;;AEDA;AACA;AACA;AACA","sources":[".././node_modules/@devoxa/prisma-relay-cursor-connection/dist/src/index.js",".././node_modules/@devoxa/prisma-relay-cursor-connection/dist/src/interfaces.js",".././node_modules/@sentry-internal/tracing/cjs/browser/backgroundtab.js",".././node_modules/@sentry-internal/tracing/cjs/browser/browserTracingIntegration.js",".././node_modules/@sentry-internal/tracing/cjs/browser/browsertracing.js",".././node_modules/@sentry-internal/tracing/cjs/browser/instrument.js",".././node_modules/@sentry-internal/tracing/cjs/browser/metrics/index.js",".././node_modules/@sentry-internal/tracing/cjs/browser/metrics/utils.js",".././node_modules/@sentry-internal/tracing/cjs/browser/request.js",".././node_modules/@sentry-internal/tracing/cjs/browser/router.js",".././node_modules/@sentry-internal/tracing/cjs/browser/types.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/getCLS.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/getFID.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/getINP.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/getLCP.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/lib/bindReporter.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/lib/generateUniqueID.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/lib/getActivationStart.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/lib/getNavigationEntry.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/lib/getVisibilityWatcher.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/lib/initMetric.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/lib/observe.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/lib/onHidden.js",".././node_modules/@sentry-internal/tracing/cjs/browser/web-vitals/lib/polyfills/interactionCountPolyfill.js",".././node_modules/@sentry-internal/tracing/cjs/common/debug-build.js",".././node_modules/@sentry-internal/tracing/cjs/common/fetch.js",".././node_modules/@sentry-internal/tracing/cjs/extensions.js",".././node_modules/@sentry-internal/tracing/cjs/index.js",".././node_modules/@sentry-internal/tracing/cjs/node/integrations/apollo.js",".././node_modules/@sentry-internal/tracing/cjs/node/integrations/express.js",".././node_modules/@sentry-internal/tracing/cjs/node/integrations/graphql.js",".././node_modules/@sentry-internal/tracing/cjs/node/integrations/lazy.js",".././node_modules/@sentry-internal/tracing/cjs/node/integrations/mongo.js",".././node_modules/@sentry-internal/tracing/cjs/node/integrations/mysql.js",".././node_modules/@sentry-internal/tracing/cjs/node/integrations/postgres.js",".././node_modules/@sentry-internal/tracing/cjs/node/integrations/prisma.js",".././node_modules/@sentry-internal/tracing/cjs/node/integrations/utils/node-utils.js",".././node_modules/@sentry/core/cjs/api.js",".././node_modules/@sentry/core/cjs/baseclient.js",".././node_modules/@sentry/core/cjs/checkin.js",".././node_modules/@sentry/core/cjs/constants.js",".././node_modules/@sentry/core/cjs/debug-build.js",".././node_modules/@sentry/core/cjs/envelope.js",".././node_modules/@sentry/core/cjs/eventProcessors.js",".././node_modules/@sentry/core/cjs/exports.js",".././node_modules/@sentry/core/cjs/hub.js",".././node_modules/@sentry/core/cjs/index.js",".././node_modules/@sentry/core/cjs/integration.js",".././node_modules/@sentry/core/cjs/integrations/functiontostring.js",".././node_modules/@sentry/core/cjs/integrations/inboundfilters.js",".././node_modules/@sentry/core/cjs/integrations/index.js",".././node_modules/@sentry/core/cjs/integrations/linkederrors.js",".././node_modules/@sentry/core/cjs/integrations/metadata.js",".././node_modules/@sentry/core/cjs/integrations/requestdata.js",".././node_modules/@sentry/core/cjs/metadata.js",".././node_modules/@sentry/core/cjs/metrics/aggregator.js",".././node_modules/@sentry/core/cjs/metrics/browser-aggregator.js",".././node_modules/@sentry/core/cjs/metrics/constants.js",".././node_modules/@sentry/core/cjs/metrics/envelope.js",".././node_modules/@sentry/core/cjs/metrics/exports.js",".././node_modules/@sentry/core/cjs/metrics/instance.js",".././node_modules/@sentry/core/cjs/metrics/integration.js",".././node_modules/@sentry/core/cjs/metrics/metric-summary.js",".././node_modules/@sentry/core/cjs/metrics/utils.js",".././node_modules/@sentry/core/cjs/scope.js",".././node_modules/@sentry/core/cjs/sdk.js",".././node_modules/@sentry/core/cjs/semanticAttributes.js",".././node_modules/@sentry/core/cjs/server-runtime-client.js",".././node_modules/@sentry/core/cjs/session.js",".././node_modules/@sentry/core/cjs/sessionflusher.js",".././node_modules/@sentry/core/cjs/span.js",".././node_modules/@sentry/core/cjs/tracing/dynamicSamplingContext.js",".././node_modules/@sentry/core/cjs/tracing/errors.js",".././node_modules/@sentry/core/cjs/tracing/hubextensions.js",".././node_modules/@sentry/core/cjs/tracing/idletransaction.js",".././node_modules/@sentry/core/cjs/tracing/measurement.js",".././node_modules/@sentry/core/cjs/tracing/sampling.js",".././node_modules/@sentry/core/cjs/tracing/span.js",".././node_modules/@sentry/core/cjs/tracing/spanstatus.js",".././node_modules/@sentry/core/cjs/tracing/trace.js",".././node_modules/@sentry/core/cjs/tracing/transaction.js",".././node_modules/@sentry/core/cjs/tracing/utils.js",".././node_modules/@sentry/core/cjs/transports/base.js",".././node_modules/@sentry/core/cjs/transports/multiplexed.js",".././node_modules/@sentry/core/cjs/transports/offline.js",".././node_modules/@sentry/core/cjs/utils/applyScopeDataToEvent.js",".././node_modules/@sentry/core/cjs/utils/getRootSpan.js",".././node_modules/@sentry/core/cjs/utils/handleCallbackErrors.js",".././node_modules/@sentry/core/cjs/utils/hasTracingEnabled.js",".././node_modules/@sentry/core/cjs/utils/isSentryRequestUrl.js",".././node_modules/@sentry/core/cjs/utils/parameterize.js",".././node_modules/@sentry/core/cjs/utils/prepareEvent.js",".././node_modules/@sentry/core/cjs/utils/sdkMetadata.js",".././node_modules/@sentry/core/cjs/utils/spanUtils.js",".././node_modules/@sentry/core/cjs/version.js",".././node_modules/@sentry/node/cjs/async/domain.js",".././node_modules/@sentry/node/cjs/async/hooks.js",".././node_modules/@sentry/node/cjs/async/index.js",".././node_modules/@sentry/node/cjs/client.js",".././node_modules/@sentry/node/cjs/cron/common.js",".././node_modules/@sentry/node/cjs/cron/cron.js",".././node_modules/@sentry/node/cjs/cron/node-cron.js",".././node_modules/@sentry/node/cjs/cron/node-schedule.js",".././node_modules/@sentry/node/cjs/debug-build.js",".././node_modules/@sentry/node/cjs/handlers.js",".././node_modules/@sentry/node/cjs/index.js",".././node_modules/@sentry/node/cjs/integrations/anr/index.js",".././node_modules/@sentry/node/cjs/integrations/anr/legacy.js",".././node_modules/@sentry/node/cjs/integrations/anr/worker-script.js",".././node_modules/@sentry/node/cjs/integrations/console.js",".././node_modules/@sentry/node/cjs/integrations/context.js",".././node_modules/@sentry/node/cjs/integrations/contextlines.js",".././node_modules/@sentry/node/cjs/integrations/hapi/index.js",".././node_modules/@sentry/node/cjs/integrations/http.js",".././node_modules/@sentry/node/cjs/integrations/index.js",".././node_modules/@sentry/node/cjs/integrations/local-variables/common.js",".././node_modules/@sentry/node/cjs/integrations/local-variables/index.js",".././node_modules/@sentry/node/cjs/integrations/local-variables/local-variables-sync.js",".././node_modules/@sentry/node/cjs/integrations/modules.js",".././node_modules/@sentry/node/cjs/integrations/onuncaughtexception.js",".././node_modules/@sentry/node/cjs/integrations/onunhandledrejection.js",".././node_modules/@sentry/node/cjs/integrations/spotlight.js",".././node_modules/@sentry/node/cjs/integrations/undici/index.js",".././node_modules/@sentry/node/cjs/integrations/utils/errorhandling.js",".././node_modules/@sentry/node/cjs/integrations/utils/http.js",".././node_modules/@sentry/node/cjs/module.js",".././node_modules/@sentry/node/cjs/nodeVersion.js",".././node_modules/@sentry/node/cjs/proxy/base.js",".././node_modules/@sentry/node/cjs/proxy/index.js",".././node_modules/@sentry/node/cjs/proxy/parse-proxy-response.js",".././node_modules/@sentry/node/cjs/requestDataDeprecated.js",".././node_modules/@sentry/node/cjs/sdk.js",".././node_modules/@sentry/node/cjs/tracing/index.js",".././node_modules/@sentry/node/cjs/tracing/integrations.js",".././node_modules/@sentry/node/cjs/transports/http.js",".././node_modules/@sentry/node/cjs/utils.js",".././node_modules/@sentry/utils/cjs/aggregate-errors.js",".././node_modules/@sentry/utils/cjs/anr.js",".././node_modules/@sentry/utils/cjs/baggage.js",".././node_modules/@sentry/utils/cjs/browser.js",".././node_modules/@sentry/utils/cjs/buildPolyfills/_asyncNullishCoalesce.js",".././node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChain.js",".././node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChainDelete.js",".././node_modules/@sentry/utils/cjs/buildPolyfills/_nullishCoalesce.js",".././node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChain.js",".././node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChainDelete.js",".././node_modules/@sentry/utils/cjs/cache.js",".././node_modules/@sentry/utils/cjs/clientreport.js",".././node_modules/@sentry/utils/cjs/cookie.js",".././node_modules/@sentry/utils/cjs/debug-build.js",".././node_modules/@sentry/utils/cjs/dsn.js",".././node_modules/@sentry/utils/cjs/env.js",".././node_modules/@sentry/utils/cjs/envelope.js",".././node_modules/@sentry/utils/cjs/error.js",".././node_modules/@sentry/utils/cjs/eventbuilder.js",".././node_modules/@sentry/utils/cjs/index.js",".././node_modules/@sentry/utils/cjs/instrument/_handlers.js",".././node_modules/@sentry/utils/cjs/instrument/console.js",".././node_modules/@sentry/utils/cjs/instrument/dom.js",".././node_modules/@sentry/utils/cjs/instrument/fetch.js",".././node_modules/@sentry/utils/cjs/instrument/globalError.js",".././node_modules/@sentry/utils/cjs/instrument/globalUnhandledRejection.js",".././node_modules/@sentry/utils/cjs/instrument/history.js",".././node_modules/@sentry/utils/cjs/instrument/index.js",".././node_modules/@sentry/utils/cjs/instrument/xhr.js",".././node_modules/@sentry/utils/cjs/is.js",".././node_modules/@sentry/utils/cjs/isBrowser.js",".././node_modules/@sentry/utils/cjs/logger.js",".././node_modules/@sentry/utils/cjs/lru.js",".././node_modules/@sentry/utils/cjs/memo.js",".././node_modules/@sentry/utils/cjs/misc.js",".././node_modules/@sentry/utils/cjs/node-stack-trace.js",".././node_modules/@sentry/utils/cjs/node.js",".././node_modules/@sentry/utils/cjs/normalize.js",".././node_modules/@sentry/utils/cjs/object.js",".././node_modules/@sentry/utils/cjs/path.js",".././node_modules/@sentry/utils/cjs/promisebuffer.js",".././node_modules/@sentry/utils/cjs/ratelimit.js",".././node_modules/@sentry/utils/cjs/requestdata.js",".././node_modules/@sentry/utils/cjs/severity.js",".././node_modules/@sentry/utils/cjs/stacktrace.js",".././node_modules/@sentry/utils/cjs/string.js",".././node_modules/@sentry/utils/cjs/supports.js",".././node_modules/@sentry/utils/cjs/syncpromise.js",".././node_modules/@sentry/utils/cjs/time.js",".././node_modules/@sentry/utils/cjs/tracing.js",".././node_modules/@sentry/utils/cjs/url.js",".././node_modules/@sentry/utils/cjs/userIntegrations.js",".././node_modules/@sentry/utils/cjs/vendor/escapeStringForRegex.js",".././node_modules/@sentry/utils/cjs/vendor/supportsHistory.js",".././node_modules/@sentry/utils/cjs/worldwide.js",".././node_modules/clean-css/index.js",".././node_modules/clean-css/lib/clean.js",".././node_modules/clean-css/lib/optimizer/hack.js",".././node_modules/clean-css/lib/optimizer/level-0/optimize.js",".././node_modules/clean-css/lib/optimizer/level-1/optimize.js",".././node_modules/clean-css/lib/optimizer/level-1/shorten-hex.js",".././node_modules/clean-css/lib/optimizer/level-1/shorten-hsl.js",".././node_modules/clean-css/lib/optimizer/level-1/shorten-rgb.js",".././node_modules/clean-css/lib/optimizer/level-1/sort-selectors.js",".././node_modules/clean-css/lib/optimizer/level-1/tidy-at-rule.js",".././node_modules/clean-css/lib/optimizer/level-1/tidy-block.js",".././node_modules/clean-css/lib/optimizer/level-1/tidy-rules.js",".././node_modules/clean-css/lib/optimizer/level-2/break-up.js",".././node_modules/clean-css/lib/optimizer/level-2/can-override.js",".././node_modules/clean-css/lib/optimizer/level-2/clone.js",".././node_modules/clean-css/lib/optimizer/level-2/compactable.js",".././node_modules/clean-css/lib/optimizer/level-2/extract-properties.js",".././node_modules/clean-css/lib/optimizer/level-2/invalid-property-error.js",".././node_modules/clean-css/lib/optimizer/level-2/is-mergeable.js",".././node_modules/clean-css/lib/optimizer/level-2/merge-adjacent.js",".././node_modules/clean-css/lib/optimizer/level-2/merge-media-queries.js",".././node_modules/clean-css/lib/optimizer/level-2/merge-non-adjacent-by-body.js",".././node_modules/clean-css/lib/optimizer/level-2/merge-non-adjacent-by-selector.js",".././node_modules/clean-css/lib/optimizer/level-2/optimize.js",".././node_modules/clean-css/lib/optimizer/level-2/properties/every-values-pair.js",".././node_modules/clean-css/lib/optimizer/level-2/properties/find-component-in.js",".././node_modules/clean-css/lib/optimizer/level-2/properties/has-inherit.js",".././node_modules/clean-css/lib/optimizer/level-2/properties/is-component-of.js",".././node_modules/clean-css/lib/optimizer/level-2/properties/is-mergeable-shorthand.js",".././node_modules/clean-css/lib/optimizer/level-2/properties/merge-into-shorthands.js",".././node_modules/clean-css/lib/optimizer/level-2/properties/optimize.js",".././node_modules/clean-css/lib/optimizer/level-2/properties/override-properties.js",".././node_modules/clean-css/lib/optimizer/level-2/properties/overrides-non-component-shorthand.js",".././node_modules/clean-css/lib/optimizer/level-2/properties/populate-components.js",".././node_modules/clean-css/lib/optimizer/level-2/properties/understandable.js",".././node_modules/clean-css/lib/optimizer/level-2/properties/vendor-prefixes.js",".././node_modules/clean-css/lib/optimizer/level-2/reduce-non-adjacent.js",".././node_modules/clean-css/lib/optimizer/level-2/remove-duplicate-font-at-rules.js",".././node_modules/clean-css/lib/optimizer/level-2/remove-duplicate-media-queries.js",".././node_modules/clean-css/lib/optimizer/level-2/remove-duplicates.js",".././node_modules/clean-css/lib/optimizer/level-2/remove-unused-at-rules.js",".././node_modules/clean-css/lib/optimizer/level-2/reorderable.js",".././node_modules/clean-css/lib/optimizer/level-2/restore-with-components.js",".././node_modules/clean-css/lib/optimizer/level-2/restore.js",".././node_modules/clean-css/lib/optimizer/level-2/restructure.js",".././node_modules/clean-css/lib/optimizer/level-2/rules-overlap.js",".././node_modules/clean-css/lib/optimizer/level-2/specificities-overlap.js",".././node_modules/clean-css/lib/optimizer/level-2/specificity.js",".././node_modules/clean-css/lib/optimizer/level-2/tidy-rule-duplicates.js",".././node_modules/clean-css/lib/optimizer/remove-unused.js",".././node_modules/clean-css/lib/optimizer/restore-from-optimizing.js",".././node_modules/clean-css/lib/optimizer/validator.js",".././node_modules/clean-css/lib/optimizer/wrap-for-optimizing.js",".././node_modules/clean-css/lib/options/compatibility.js",".././node_modules/clean-css/lib/options/fetch.js",".././node_modules/clean-css/lib/options/format.js",".././node_modules/clean-css/lib/options/inline-request.js",".././node_modules/clean-css/lib/options/inline-timeout.js",".././node_modules/clean-css/lib/options/inline.js",".././node_modules/clean-css/lib/options/optimization-level.js",".././node_modules/clean-css/lib/options/rebase-to.js",".././node_modules/clean-css/lib/options/rebase.js",".././node_modules/clean-css/lib/options/rounding-precision.js",".././node_modules/clean-css/lib/reader/apply-source-maps.js",".././node_modules/clean-css/lib/reader/extract-import-url-and-media.js",".././node_modules/clean-css/lib/reader/input-source-map-tracker.js",".././node_modules/clean-css/lib/reader/is-allowed-resource.js",".././node_modules/clean-css/lib/reader/load-original-sources.js",".././node_modules/clean-css/lib/reader/load-remote-resource.js",".././node_modules/clean-css/lib/reader/match-data-uri.js",".././node_modules/clean-css/lib/reader/normalize-path.js",".././node_modules/clean-css/lib/reader/read-sources.js",".././node_modules/clean-css/lib/reader/rebase-local-map.js",".././node_modules/clean-css/lib/reader/rebase-remote-map.js",".././node_modules/clean-css/lib/reader/rebase.js",".././node_modules/clean-css/lib/reader/restore-import.js",".././node_modules/clean-css/lib/reader/rewrite-url.js",".././node_modules/clean-css/lib/tokenizer/marker.js",".././node_modules/clean-css/lib/tokenizer/token.js",".././node_modules/clean-css/lib/tokenizer/tokenize.js",".././node_modules/clean-css/lib/utils/clone-array.js",".././node_modules/clean-css/lib/utils/format-position.js",".././node_modules/clean-css/lib/utils/has-protocol.js",".././node_modules/clean-css/lib/utils/is-data-uri-resource.js",".././node_modules/clean-css/lib/utils/is-http-resource.js",".././node_modules/clean-css/lib/utils/is-https-resource.js",".././node_modules/clean-css/lib/utils/is-import.js",".././node_modules/clean-css/lib/utils/is-remote-resource.js",".././node_modules/clean-css/lib/utils/natural-compare.js",".././node_modules/clean-css/lib/utils/override.js",".././node_modules/clean-css/lib/utils/split.js",".././node_modules/clean-css/lib/writer/helpers.js",".././node_modules/clean-css/lib/writer/one-time.js",".././node_modules/clean-css/lib/writer/simple.js",".././node_modules/clean-css/lib/writer/source-maps.js",".././node_modules/deepmerge/dist/cjs.js",".././node_modules/dotenv/lib/main.js",".././node_modules/graphql-fields/build/index.js",".././node_modules/he/he.js",".././node_modules/html-minifier/src/htmlminifier.js",".././node_modules/html-minifier/src/htmlparser.js",".././node_modules/html-minifier/src/tokenchain.js",".././node_modules/html-minifier/src/utils.js",".././node_modules/locutus/php/_helpers/_phpCastString.js",".././node_modules/locutus/php/_helpers/_php_cast_float.js",".././node_modules/locutus/php/_helpers/_php_cast_int.js",".././node_modules/locutus/php/datetime/date.js",".././node_modules/locutus/php/datetime/strtotime.js",".././node_modules/locutus/php/math/max.js",".././node_modules/locutus/php/math/min.js",".././node_modules/locutus/php/math/round.js",".././node_modules/locutus/php/strings/sprintf.js",".././node_modules/locutus/php/strings/strip_tags.js",".././node_modules/locutus/php/strings/vsprintf.js",".././node_modules/locutus/php/var/boolval.js",".././node_modules/relateurl/lib/constants.js",".././node_modules/relateurl/lib/format.js",".././node_modules/relateurl/lib/index.js",".././node_modules/relateurl/lib/options.js",".././node_modules/relateurl/lib/parse/host.js",".././node_modules/relateurl/lib/parse/hrefInfo.js",".././node_modules/relateurl/lib/parse/index.js",".././node_modules/relateurl/lib/parse/path.js",".././node_modules/relateurl/lib/parse/port.js",".././node_modules/relateurl/lib/parse/query.js",".././node_modules/relateurl/lib/parse/urlstring.js",".././node_modules/relateurl/lib/relate/absolutize.js",".././node_modules/relateurl/lib/relate/findRelation.js",".././node_modules/relateurl/lib/relate/index.js",".././node_modules/relateurl/lib/relate/relativize.js",".././node_modules/relateurl/lib/util/object.js",".././node_modules/relateurl/lib/util/path.js",".././node_modules/source-map/lib/array-set.js",".././node_modules/source-map/lib/base64-vlq.js",".././node_modules/source-map/lib/base64.js",".././node_modules/source-map/lib/binary-search.js",".././node_modules/source-map/lib/mapping-list.js",".././node_modules/source-map/lib/quick-sort.js",".././node_modules/source-map/lib/source-map-consumer.js",".././node_modules/source-map/lib/source-map-generator.js",".././node_modules/source-map/lib/source-node.js",".././node_modules/source-map/lib/util.js",".././node_modules/source-map/source-map.js",".././node_modules/twig/src/twig.async.js",".././node_modules/twig/src/twig.compiler.js",".././node_modules/twig/src/twig.core.js",".././node_modules/twig/src/twig.exports.js",".././node_modules/twig/src/twig.expression.js",".././node_modules/twig/src/twig.expression.operator.js",".././node_modules/twig/src/twig.factory.js",".././node_modules/twig/src/twig.filters.js",".././node_modules/twig/src/twig.functions.js",".././node_modules/twig/src/twig.js",".././node_modules/twig/src/twig.lib.js",".././node_modules/twig/src/twig.loader.ajax.js",".././node_modules/twig/src/twig.loader.fs.js",".././node_modules/twig/src/twig.logic.js",".././node_modules/twig/src/twig.parser.source.js",".././node_modules/twig/src/twig.parser.twig.js",".././node_modules/twig/src/twig.path.js",".././node_modules/twig/src/twig.tests.js",".././node_modules/snek-query/dist/index.js",".././src/clients/mailer/src/schema.generated.ts",".././src/clients/mailer/src/index.ts",".././src/config.ts",".././src/index.ts",".././src/repository/.generated.ts",".././node_modules/@sentry/bun/esm/integrations/bunserver.js",".././node_modules/@sentry/bun/esm/index.js","../external module \"@prisma/client\"",".././src/repository/client.ts",".././src/repository/models/Email.ts",".././src/repository/models/EmailEnvelope.ts",".././src/repository/models/EmailTemplate.ts",".././src/repository/models/OAuthApp.ts",".././src/repository/models/OAuthConfig.ts",".././src/repository/models/Organization.ts",".././src/repository/models/SMTPConfig.ts",".././src/repository/models/User.ts",".././src/repository/models/VariableDefinition.ts","../external module \"graphql\"",".././src/errors.ts",".././src/services/email-template-factory.ts",".././src/services/mail-factory.ts",".././src/services/oauth/azure.ts",".././src/services/oauth/google.ts",".././src/services/transformer-sandbox.ts","../external module \"@cronitio/pylon\"","../external module \"openid-client\"","../external node-commonjs \"assert\"","../external node-commonjs \"async_hooks\"","../external node-commonjs \"child_process\"","../external node-commonjs \"crypto\"","../external node-commonjs \"diagnostics_channel\"","../external node-commonjs \"domain\"","../external node-commonjs \"fs\"","../external node-commonjs \"http\"","../external node-commonjs \"https\"","../external node-commonjs \"inspector\"","../external node-commonjs \"net\"","../external node-commonjs \"os\"","../external node-commonjs \"path\"","../external node-commonjs \"stream\"","../external node-commonjs \"tls\"","../external node-commonjs \"uglify-js\"","../external node-commonjs \"url\"","../external node-commonjs \"util\"","../external node-commonjs \"zlib\"",".././node_modules/@netsnek/prisma-repository/dist/index.module.js",".././node_modules/hono/dist/utils/url.js",".././node_modules/hono/dist/utils/cookie.js",".././node_modules/hono/dist/helper/cookie/index.js",".././node_modules/domelementtype/lib/esm/index.js",".././node_modules/domhandler/lib/esm/node.js",".././node_modules/domhandler/lib/esm/index.js",".././node_modules/leac/lib/leac.mjs",".././node_modules/peberminta/lib/core.mjs",".././node_modules/parseley/lib/parseley.mjs",".././node_modules/selderee/lib/selderee.mjs",".././node_modules/@selderee/plugin-htmlparser2/lib/hp2-builder.mjs",".././node_modules/entities/lib/esm/generated/decode-data-html.js",".././node_modules/entities/lib/esm/generated/decode-data-xml.js",".././node_modules/entities/lib/esm/decode_codepoint.js",".././node_modules/entities/lib/esm/decode.js",".././node_modules/htmlparser2/lib/esm/Tokenizer.js",".././node_modules/htmlparser2/lib/esm/Parser.js",".././node_modules/entities/lib/esm/generated/encode-html.js",".././node_modules/entities/lib/esm/escape.js",".././node_modules/entities/lib/esm/encode.js",".././node_modules/entities/lib/esm/index.js",".././node_modules/dom-serializer/lib/esm/foreignNames.js",".././node_modules/dom-serializer/lib/esm/index.js",".././node_modules/domutils/lib/esm/stringify.js",".././node_modules/domutils/lib/esm/traversal.js",".././node_modules/domutils/lib/esm/querying.js",".././node_modules/domutils/lib/esm/legacy.js",".././node_modules/domutils/lib/esm/helpers.js",".././node_modules/domutils/lib/esm/feeds.js",".././node_modules/domutils/lib/esm/index.js",".././node_modules/htmlparser2/lib/esm/index.js",".././node_modules/html-to-text/lib/html-to-text.mjs","../webpack/bootstrap","../webpack/runtime/async module","../webpack/runtime/compat get default export","../webpack/runtime/define property getters","../webpack/runtime/hasOwnProperty shorthand","../webpack/runtime/make namespace object","../webpack/runtime/node module decorator","../webpack/runtime/compat","../webpack/before-startup","../webpack/startup","../webpack/after-startup"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findManyCursorConnection = void 0;\nconst graphql_fields_1 = __importDefault(require(\"graphql-fields\"));\n__exportStar(require(\"./interfaces\"), exports);\nasync function findManyCursorConnection(findMany, aggregate, args = {}, pOptions) {\n if (!validateArgs(args)) {\n throw new Error('This code path can never happen, only here for type safety');\n }\n const options = mergeDefaultOptions(pOptions);\n const requestedFields = options.resolveInfo && Object.keys((0, graphql_fields_1.default)(options.resolveInfo));\n const hasRequestedField = (key) => !requestedFields || requestedFields.includes(key);\n let records;\n let totalCount;\n let hasNextPage;\n let hasPreviousPage;\n if (isForwardPagination(args)) {\n const take = args.first + 1;\n const cursor = decodeCursor(args.after, options);\n const skip = cursor ? 1 : undefined;\n const results = await Promise.all([\n findMany({ cursor, take, skip }),\n hasRequestedField('totalCount') ? aggregate() : Promise.resolve(-1),\n ]);\n records = results[0];\n totalCount = results[1];\n hasPreviousPage = !!args.after;\n hasNextPage = records.length > args.first;\n if (hasNextPage)\n records.pop();\n }\n else if (isBackwardPagination(args)) {\n const take = -1 * (args.last + 1);\n const cursor = decodeCursor(args.before, options);\n const skip = cursor ? 1 : undefined;\n const results = await Promise.all([\n findMany({ cursor, take, skip }),\n hasRequestedField('totalCount') ? aggregate() : Promise.resolve(-1),\n ]);\n records = results[0];\n totalCount = results[1];\n hasNextPage = !!args.before;\n hasPreviousPage = records.length > args.last;\n if (hasPreviousPage)\n records.shift();\n }\n else {\n const results = await Promise.all([\n hasRequestedField('edges') || hasRequestedField('nodes') ? findMany({}) : Promise.resolve([]),\n hasRequestedField('totalCount') ? aggregate() : Promise.resolve(-1),\n ]);\n records = results[0];\n totalCount = results[1];\n hasNextPage = false;\n hasPreviousPage = false;\n }\n const startCursor = records.length > 0 ? encodeCursor(records[0], options) : undefined;\n const endCursor = records.length > 0 ? encodeCursor(records[records.length - 1], options) : undefined;\n const edges = records.map((record) => {\n return {\n ...options.recordToEdge(record),\n cursor: encodeCursor(record, options),\n };\n });\n return {\n edges,\n nodes: edges.map((edge) => edge.node),\n pageInfo: { hasNextPage, hasPreviousPage, startCursor, endCursor },\n totalCount: totalCount,\n };\n}\nexports.findManyCursorConnection = findManyCursorConnection;\nfunction validateArgs(args) {\n if (args.first != null && args.last != null) {\n throw new Error('Only one of \"first\" and \"last\" can be set');\n }\n if (args.after != null && args.before != null) {\n throw new Error('Only one of \"after\" and \"before\" can be set');\n }\n if (args.after != null && args.first == null) {\n throw new Error('\"after\" needs to be used with \"first\"');\n }\n if (args.before != null && args.last == null) {\n throw new Error('\"before\" needs to be used with \"last\"');\n }\n if (args.first != null && args.first <= 0) {\n throw new Error('\"first\" has to be positive');\n }\n if (args.last != null && args.last <= 0) {\n throw new Error('\"last\" has to be positive');\n }\n return true;\n}\nfunction mergeDefaultOptions(pOptions) {\n return {\n getCursor: (record) => ({ id: record.id }),\n encodeCursor: (cursor) => cursor.id,\n decodeCursor: (cursorString) => ({ id: cursorString }),\n recordToEdge: (record) => ({ node: record }),\n resolveInfo: null,\n ...pOptions,\n };\n}\nfunction isForwardPagination(args) {\n return 'first' in args && args.first != null;\n}\nfunction isBackwardPagination(args) {\n return 'last' in args && args.last != null;\n}\nfunction decodeCursor(connectionCursor, options) {\n if (!connectionCursor) {\n return undefined;\n }\n return options.decodeCursor(connectionCursor);\n}\nfunction encodeCursor(record, options) {\n return options.encodeCursor(options.getCursor(record));\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=interfaces.js.map","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../common/debug-build.js');\nconst types = require('./types.js');\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nfunction registerBackgroundTabDetection() {\n if (types.WINDOW && types.WINDOW.document) {\n types.WINDOW.document.addEventListener('visibilitychange', () => {\n // eslint-disable-next-line deprecation/deprecation\n const activeTransaction = core.getActiveTransaction() ;\n if (types.WINDOW.document.hidden && activeTransaction) {\n const statusType = 'cancelled';\n\n const { op, status } = core.spanToJSON(activeTransaction);\n\n debugBuild.DEBUG_BUILD &&\n utils.logger.log(`[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${op}`);\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!status) {\n activeTransaction.setStatus(statusType);\n }\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.end();\n }\n });\n } else {\n debugBuild.DEBUG_BUILD && utils.logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n\nexports.registerBackgroundTabDetection = registerBackgroundTabDetection;\n//# sourceMappingURL=backgroundtab.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../common/debug-build.js');\nconst backgroundtab = require('./backgroundtab.js');\nconst instrument = require('./instrument.js');\nconst index = require('./metrics/index.js');\nconst request = require('./request.js');\nconst types = require('./types.js');\n\nconst BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\n/** Options for Browser Tracing integration */\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS = {\n ...core.TRACING_DEFAULTS,\n instrumentNavigation: true,\n instrumentPageLoad: true,\n markBackgroundSpan: true,\n enableLongTask: true,\n enableInp: false,\n _experiments: {},\n ...request.defaultRequestInstrumentationOptions,\n};\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n *\n * We explicitly export the proper type here, as this has to be extended in some cases.\n */\nconst browserTracingIntegration = ((_options = {}) => {\n const _hasSetTracePropagationTargets = debugBuild.DEBUG_BUILD\n ? !!(\n // eslint-disable-next-line deprecation/deprecation\n (_options.tracePropagationTargets || _options.tracingOrigins)\n )\n : false;\n\n core.addTracingExtensions();\n\n // TODO (v8): remove this block after tracingOrigins is removed\n // Set tracePropagationTargets to tracingOrigins if specified by the user\n // In case both are specified, tracePropagationTargets takes precedence\n // eslint-disable-next-line deprecation/deprecation\n if (!_options.tracePropagationTargets && _options.tracingOrigins) {\n // eslint-disable-next-line deprecation/deprecation\n _options.tracePropagationTargets = _options.tracingOrigins;\n }\n\n const options = {\n ...DEFAULT_BROWSER_TRACING_OPTIONS,\n ..._options,\n };\n\n const _collectWebVitals = index.startTrackingWebVitals();\n\n /** Stores a mapping of interactionIds from PerformanceEventTimings to the origin interaction path */\n const interactionIdtoRouteNameMapping = {};\n if (options.enableInp) {\n index.startTrackingINP(interactionIdtoRouteNameMapping);\n }\n\n if (options.enableLongTask) {\n index.startTrackingLongTasks();\n }\n if (options._experiments.enableInteractions) {\n index.startTrackingInteractions();\n }\n\n const latestRoute\n\n = {\n name: undefined,\n context: undefined,\n };\n\n /** Create routing idle transaction. */\n function _createRouteTransaction(context) {\n // eslint-disable-next-line deprecation/deprecation\n const hub = core.getCurrentHub();\n\n const { beforeStartSpan, idleTimeout, finalTimeout, heartbeatInterval } = options;\n\n const isPageloadTransaction = context.op === 'pageload';\n\n let expandedContext;\n if (isPageloadTransaction) {\n const sentryTrace = isPageloadTransaction ? getMetaContent('sentry-trace') : '';\n const baggage = isPageloadTransaction ? getMetaContent('baggage') : undefined;\n const { traceId, dsc, parentSpanId, sampled } = utils.propagationContextFromHeaders(sentryTrace, baggage);\n expandedContext = {\n traceId,\n parentSpanId,\n parentSampled: sampled,\n ...context,\n metadata: {\n // eslint-disable-next-line deprecation/deprecation\n ...context.metadata,\n dynamicSamplingContext: dsc,\n },\n trimEnd: true,\n };\n } else {\n expandedContext = {\n trimEnd: true,\n ...context,\n };\n }\n\n const finalContext = beforeStartSpan ? beforeStartSpan(expandedContext) : expandedContext;\n\n // If `beforeStartSpan` set a custom name, record that fact\n // eslint-disable-next-line deprecation/deprecation\n finalContext.metadata =\n finalContext.name !== expandedContext.name\n ? // eslint-disable-next-line deprecation/deprecation\n { ...finalContext.metadata, source: 'custom' }\n : // eslint-disable-next-line deprecation/deprecation\n finalContext.metadata;\n\n latestRoute.name = finalContext.name;\n latestRoute.context = finalContext;\n\n if (finalContext.sampled === false) {\n debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Will not send ${finalContext.op} transaction because of beforeNavigate.`);\n }\n\n debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Starting ${finalContext.op} transaction on scope`);\n\n const { location } = types.WINDOW;\n\n const idleTransaction = core.startIdleTransaction(\n hub,\n finalContext,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n isPageloadTransaction, // should wait for finish signal if it's a pageload transaction\n );\n\n if (isPageloadTransaction && types.WINDOW.document) {\n types.WINDOW.document.addEventListener('readystatechange', () => {\n if (['interactive', 'complete'].includes(types.WINDOW.document.readyState)) {\n idleTransaction.sendAutoFinishSignal();\n }\n });\n\n if (['interactive', 'complete'].includes(types.WINDOW.document.readyState)) {\n idleTransaction.sendAutoFinishSignal();\n }\n }\n\n idleTransaction.registerBeforeFinishCallback(transaction => {\n _collectWebVitals();\n index.addPerformanceEntries(transaction);\n });\n\n return idleTransaction ;\n }\n\n return {\n name: BROWSER_TRACING_INTEGRATION_ID,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n setupOnce: () => {},\n afterAllSetup(client) {\n const clientOptions = client.getOptions();\n\n const { markBackgroundSpan, traceFetch, traceXHR, shouldCreateSpanForRequest, enableHTTPTimings, _experiments } =\n options;\n\n const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets;\n // There are three ways to configure tracePropagationTargets:\n // 1. via top level client option `tracePropagationTargets`\n // 2. via BrowserTracing option `tracePropagationTargets`\n // 3. via BrowserTracing option `tracingOrigins` (deprecated)\n //\n // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to\n // BrowserTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated).\n // This is done as it minimizes bundle size (we don't have to have undefined checks).\n //\n // If both 1 and either one of 2 or 3 are set (from above), we log out a warning.\n // eslint-disable-next-line deprecation/deprecation\n const tracePropagationTargets = clientOptionsTracePropagationTargets || options.tracePropagationTargets;\n if (debugBuild.DEBUG_BUILD && _hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) {\n utils.logger.warn(\n '[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.',\n );\n }\n\n let activeSpan;\n let startingUrl = types.WINDOW.location && types.WINDOW.location.href;\n\n if (client.on) {\n client.on('startNavigationSpan', (context) => {\n if (activeSpan) {\n debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Finishing current transaction with op: ${core.spanToJSON(activeSpan).op}`);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeSpan.end();\n }\n activeSpan = _createRouteTransaction({\n op: 'navigation',\n ...context,\n });\n });\n\n client.on('startPageLoadSpan', (context) => {\n if (activeSpan) {\n debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Finishing current transaction with op: ${core.spanToJSON(activeSpan).op}`);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeSpan.end();\n }\n activeSpan = _createRouteTransaction({\n op: 'pageload',\n ...context,\n });\n });\n }\n\n if (options.instrumentPageLoad && client.emit && types.WINDOW.location) {\n const context = {\n name: types.WINDOW.location.pathname,\n // pageload should always start at timeOrigin (and needs to be in s, not ms)\n startTimestamp: utils.browserPerformanceTimeOrigin ? utils.browserPerformanceTimeOrigin / 1000 : undefined,\n origin: 'auto.pageload.browser',\n attributes: {\n [core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n },\n };\n startBrowserTracingPageLoadSpan(client, context);\n }\n\n if (options.instrumentNavigation && client.emit && types.WINDOW.location) {\n utils.addHistoryInstrumentationHandler(({ to, from }) => {\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n\n if (from !== to) {\n startingUrl = undefined;\n const context = {\n name: types.WINDOW.location.pathname,\n origin: 'auto.navigation.browser',\n attributes: {\n [core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n },\n };\n\n startBrowserTracingNavigationSpan(client, context);\n }\n });\n }\n\n if (markBackgroundSpan) {\n backgroundtab.registerBackgroundTabDetection();\n }\n\n if (_experiments.enableInteractions) {\n registerInteractionListener(options, latestRoute);\n }\n\n if (options.enableInp) {\n registerInpInteractionListener(interactionIdtoRouteNameMapping, latestRoute);\n }\n\n request.instrumentOutgoingRequests({\n traceFetch,\n traceXHR,\n tracePropagationTargets,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n });\n },\n // TODO v8: Remove this again\n // This is private API that we use to fix converted BrowserTracing integrations in Next.js & SvelteKit\n options,\n };\n}) ;\n\n/**\n * Manually start a page load span.\n * This will only do something if the BrowserTracing integration has been setup.\n */\nfunction startBrowserTracingPageLoadSpan(client, spanOptions) {\n if (!client.emit) {\n return;\n }\n\n client.emit('startPageLoadSpan', spanOptions);\n\n const span = core.getActiveSpan();\n const op = span && core.spanToJSON(span).op;\n return op === 'pageload' ? span : undefined;\n}\n\n/**\n * Manually start a navigation span.\n * This will only do something if the BrowserTracing integration has been setup.\n */\nfunction startBrowserTracingNavigationSpan(client, spanOptions) {\n if (!client.emit) {\n return;\n }\n\n client.emit('startNavigationSpan', spanOptions);\n\n const span = core.getActiveSpan();\n const op = span && core.spanToJSON(span).op;\n return op === 'navigation' ? span : undefined;\n}\n\n/** Returns the value of a meta tag */\nfunction getMetaContent(metaName) {\n // Can't specify generic to `getDomElement` because tracing can be used\n // in a variety of environments, have to disable `no-unsafe-member-access`\n // as a result.\n const metaTag = utils.getDomElement(`meta[name=${metaName}]`);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return metaTag ? metaTag.getAttribute('content') : undefined;\n}\n\n/** Start listener for interaction transactions */\nfunction registerInteractionListener(\n options,\n latestRoute\n\n,\n) {\n let inflightInteractionTransaction;\n const registerInteractionTransaction = () => {\n const { idleTimeout, finalTimeout, heartbeatInterval } = options;\n const op = 'ui.action.click';\n\n // eslint-disable-next-line deprecation/deprecation\n const currentTransaction = core.getActiveTransaction();\n if (currentTransaction && currentTransaction.op && ['navigation', 'pageload'].includes(currentTransaction.op)) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn(\n `[Tracing] Did not create ${op} transaction because a pageload or navigation transaction is in progress.`,\n );\n return undefined;\n }\n\n if (inflightInteractionTransaction) {\n inflightInteractionTransaction.setFinishReason('interactionInterrupted');\n inflightInteractionTransaction.end();\n inflightInteractionTransaction = undefined;\n }\n\n if (!latestRoute.name) {\n debugBuild.DEBUG_BUILD && utils.logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n return undefined;\n }\n\n const { location } = types.WINDOW;\n\n const context = {\n name: latestRoute.name,\n op,\n trimEnd: true,\n data: {\n [core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: latestRoute.context ? getSource(latestRoute.context) : 'url',\n },\n };\n\n inflightInteractionTransaction = core.startIdleTransaction(\n // eslint-disable-next-line deprecation/deprecation\n core.getCurrentHub(),\n context,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n };\n\n ['click'].forEach(type => {\n addEventListener(type, registerInteractionTransaction, { once: false, capture: true });\n });\n}\n\nfunction isPerformanceEventTiming(entry) {\n return 'duration' in entry;\n}\n\n/** We store up to 10 interaction candidates max to cap memory usage. This is the same cap as getINP from web-vitals */\nconst MAX_INTERACTIONS = 10;\n\n/** Creates a listener on interaction entries, and maps interactionIds to the origin path of the interaction */\nfunction registerInpInteractionListener(\n interactionIdtoRouteNameMapping,\n latestRoute\n\n,\n) {\n instrument.addPerformanceInstrumentationHandler('event', ({ entries }) => {\n const client = core.getClient();\n // We need to get the replay, user, and activeTransaction from the current scope\n // so that we can associate replay id, profile id, and a user display to the span\n const replay =\n client !== undefined && client.getIntegrationByName !== undefined\n ? (client.getIntegrationByName('Replay') )\n : undefined;\n const replayId = replay !== undefined ? replay.getReplayId() : undefined;\n // eslint-disable-next-line deprecation/deprecation\n const activeTransaction = core.getActiveTransaction();\n const currentScope = core.getCurrentScope();\n const user = currentScope !== undefined ? currentScope.getUser() : undefined;\n for (const entry of entries) {\n if (isPerformanceEventTiming(entry)) {\n const duration = entry.duration;\n const keys = Object.keys(interactionIdtoRouteNameMapping);\n const minInteractionId =\n keys.length > 0\n ? keys.reduce((a, b) => {\n return interactionIdtoRouteNameMapping[a].duration < interactionIdtoRouteNameMapping[b].duration\n ? a\n : b;\n })\n : undefined;\n if (minInteractionId === undefined || duration > interactionIdtoRouteNameMapping[minInteractionId].duration) {\n const interactionId = entry.interactionId;\n const routeName = latestRoute.name;\n const parentContext = latestRoute.context;\n if (interactionId && routeName && parentContext) {\n if (minInteractionId && Object.keys(interactionIdtoRouteNameMapping).length >= MAX_INTERACTIONS) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete interactionIdtoRouteNameMapping[minInteractionId];\n }\n interactionIdtoRouteNameMapping[interactionId] = {\n routeName,\n duration,\n parentContext,\n user,\n activeTransaction,\n replayId,\n };\n }\n }\n }\n }\n });\n}\n\nfunction getSource(context) {\n const sourceFromAttributes = context.attributes && context.attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n // eslint-disable-next-line deprecation/deprecation\n const sourceFromData = context.data && context.data[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n // eslint-disable-next-line deprecation/deprecation\n const sourceFromMetadata = context.metadata && context.metadata.source;\n\n return sourceFromAttributes || sourceFromData || sourceFromMetadata;\n}\n\nexports.BROWSER_TRACING_INTEGRATION_ID = BROWSER_TRACING_INTEGRATION_ID;\nexports.browserTracingIntegration = browserTracingIntegration;\nexports.getMetaContent = getMetaContent;\nexports.startBrowserTracingNavigationSpan = startBrowserTracingNavigationSpan;\nexports.startBrowserTracingPageLoadSpan = startBrowserTracingPageLoadSpan;\n//# sourceMappingURL=browserTracingIntegration.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../common/debug-build.js');\nconst backgroundtab = require('./backgroundtab.js');\nconst index = require('./metrics/index.js');\nconst request = require('./request.js');\nconst router = require('./router.js');\nconst types = require('./types.js');\n\nconst BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\n/** Options for Browser Tracing integration */\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS = {\n ...core.TRACING_DEFAULTS,\n markBackgroundTransactions: true,\n routingInstrumentation: router.instrumentRoutingWithDefaults,\n startTransactionOnLocationChange: true,\n startTransactionOnPageLoad: true,\n enableLongTask: true,\n _experiments: {},\n ...request.defaultRequestInstrumentationOptions,\n};\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n *\n * @deprecated Use `browserTracingIntegration()` instead.\n */\nclass BrowserTracing {\n // This class currently doesn't have a static `id` field like the other integration classes, because it prevented\n // @sentry/tracing from being treeshaken. Tree shakers do not like static fields, because they behave like side effects.\n // TODO: Come up with a better plan, than using static fields on integration classes, and use that plan on all\n // integrations.\n\n /** Browser Tracing integration options */\n\n /**\n * @inheritDoc\n */\n\n constructor(_options) {\n this.name = BROWSER_TRACING_INTEGRATION_ID;\n this._hasSetTracePropagationTargets = false;\n\n core.addTracingExtensions();\n\n if (debugBuild.DEBUG_BUILD) {\n this._hasSetTracePropagationTargets = !!(\n _options &&\n // eslint-disable-next-line deprecation/deprecation\n (_options.tracePropagationTargets || _options.tracingOrigins)\n );\n }\n\n this.options = {\n ...DEFAULT_BROWSER_TRACING_OPTIONS,\n ..._options,\n };\n\n // Special case: enableLongTask can be set in _experiments\n // TODO (v8): Remove this in v8\n if (this.options._experiments.enableLongTask !== undefined) {\n this.options.enableLongTask = this.options._experiments.enableLongTask;\n }\n\n // TODO (v8): remove this block after tracingOrigins is removed\n // Set tracePropagationTargets to tracingOrigins if specified by the user\n // In case both are specified, tracePropagationTargets takes precedence\n // eslint-disable-next-line deprecation/deprecation\n if (_options && !_options.tracePropagationTargets && _options.tracingOrigins) {\n // eslint-disable-next-line deprecation/deprecation\n this.options.tracePropagationTargets = _options.tracingOrigins;\n }\n\n this._collectWebVitals = index.startTrackingWebVitals();\n if (this.options.enableLongTask) {\n index.startTrackingLongTasks();\n }\n if (this.options._experiments.enableInteractions) {\n index.startTrackingInteractions();\n }\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n this._getCurrentHub = getCurrentHub;\n const hub = getCurrentHub();\n // eslint-disable-next-line deprecation/deprecation\n const client = hub.getClient();\n const clientOptions = client && client.getOptions();\n\n const {\n routingInstrumentation: instrumentRouting,\n startTransactionOnLocationChange,\n startTransactionOnPageLoad,\n markBackgroundTransactions,\n traceFetch,\n traceXHR,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n _experiments,\n } = this.options;\n\n const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets;\n // There are three ways to configure tracePropagationTargets:\n // 1. via top level client option `tracePropagationTargets`\n // 2. via BrowserTracing option `tracePropagationTargets`\n // 3. via BrowserTracing option `tracingOrigins` (deprecated)\n //\n // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to\n // BrowserTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated).\n // This is done as it minimizes bundle size (we don't have to have undefined checks).\n //\n // If both 1 and either one of 2 or 3 are set (from above), we log out a warning.\n // eslint-disable-next-line deprecation/deprecation\n const tracePropagationTargets = clientOptionsTracePropagationTargets || this.options.tracePropagationTargets;\n if (debugBuild.DEBUG_BUILD && this._hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) {\n utils.logger.warn(\n '[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.',\n );\n }\n\n instrumentRouting(\n (context) => {\n const transaction = this._createRouteTransaction(context);\n\n this.options._experiments.onStartRouteTransaction &&\n this.options._experiments.onStartRouteTransaction(transaction, context, getCurrentHub);\n\n return transaction;\n },\n startTransactionOnPageLoad,\n startTransactionOnLocationChange,\n );\n\n if (markBackgroundTransactions) {\n backgroundtab.registerBackgroundTabDetection();\n }\n\n if (_experiments.enableInteractions) {\n this._registerInteractionListener();\n }\n\n request.instrumentOutgoingRequests({\n traceFetch,\n traceXHR,\n tracePropagationTargets,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n });\n }\n\n /** Create routing idle transaction. */\n _createRouteTransaction(context) {\n if (!this._getCurrentHub) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn(`[Tracing] Did not create ${context.op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n\n const { beforeNavigate, idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n\n const isPageloadTransaction = context.op === 'pageload';\n\n let expandedContext;\n if (isPageloadTransaction) {\n const sentryTrace = isPageloadTransaction ? getMetaContent('sentry-trace') : '';\n const baggage = isPageloadTransaction ? getMetaContent('baggage') : undefined;\n const { traceId, dsc, parentSpanId, sampled } = utils.propagationContextFromHeaders(sentryTrace, baggage);\n expandedContext = {\n traceId,\n parentSpanId,\n parentSampled: sampled,\n ...context,\n metadata: {\n // eslint-disable-next-line deprecation/deprecation\n ...context.metadata,\n dynamicSamplingContext: dsc,\n },\n trimEnd: true,\n };\n } else {\n expandedContext = {\n trimEnd: true,\n ...context,\n };\n }\n\n const modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext;\n\n // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n const finalContext = modifiedContext === undefined ? { ...expandedContext, sampled: false } : modifiedContext;\n\n // If `beforeNavigate` set a custom name, record that fact\n // eslint-disable-next-line deprecation/deprecation\n finalContext.metadata =\n finalContext.name !== expandedContext.name\n ? // eslint-disable-next-line deprecation/deprecation\n { ...finalContext.metadata, source: 'custom' }\n : // eslint-disable-next-line deprecation/deprecation\n finalContext.metadata;\n\n this._latestRouteName = finalContext.name;\n this._latestRouteSource = getSource(finalContext);\n\n // eslint-disable-next-line deprecation/deprecation\n if (finalContext.sampled === false) {\n debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Will not send ${finalContext.op} transaction because of beforeNavigate.`);\n }\n\n debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Starting ${finalContext.op} transaction on scope`);\n\n const { location } = types.WINDOW;\n\n const idleTransaction = core.startIdleTransaction(\n hub,\n finalContext,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n isPageloadTransaction, // should wait for finish signal if it's a pageload transaction\n );\n\n if (isPageloadTransaction) {\n types.WINDOW.document.addEventListener('readystatechange', () => {\n if (['interactive', 'complete'].includes(types.WINDOW.document.readyState)) {\n idleTransaction.sendAutoFinishSignal();\n }\n });\n\n if (['interactive', 'complete'].includes(types.WINDOW.document.readyState)) {\n idleTransaction.sendAutoFinishSignal();\n }\n }\n\n idleTransaction.registerBeforeFinishCallback(transaction => {\n this._collectWebVitals();\n index.addPerformanceEntries(transaction);\n });\n\n return idleTransaction ;\n }\n\n /** Start listener for interaction transactions */\n _registerInteractionListener() {\n let inflightInteractionTransaction;\n const registerInteractionTransaction = () => {\n const { idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n const op = 'ui.action.click';\n\n // eslint-disable-next-line deprecation/deprecation\n const currentTransaction = core.getActiveTransaction();\n if (currentTransaction && currentTransaction.op && ['navigation', 'pageload'].includes(currentTransaction.op)) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn(\n `[Tracing] Did not create ${op} transaction because a pageload or navigation transaction is in progress.`,\n );\n return undefined;\n }\n\n if (inflightInteractionTransaction) {\n inflightInteractionTransaction.setFinishReason('interactionInterrupted');\n inflightInteractionTransaction.end();\n inflightInteractionTransaction = undefined;\n }\n\n if (!this._getCurrentHub) {\n debugBuild.DEBUG_BUILD && utils.logger.warn(`[Tracing] Did not create ${op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n if (!this._latestRouteName) {\n debugBuild.DEBUG_BUILD && utils.logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n const { location } = types.WINDOW;\n\n const context = {\n name: this._latestRouteName,\n op,\n trimEnd: true,\n data: {\n [core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: this._latestRouteSource || 'url',\n },\n };\n\n inflightInteractionTransaction = core.startIdleTransaction(\n hub,\n context,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n };\n\n ['click'].forEach(type => {\n addEventListener(type, registerInteractionTransaction, { once: false, capture: true });\n });\n }\n}\n\n/** Returns the value of a meta tag */\nfunction getMetaContent(metaName) {\n // Can't specify generic to `getDomElement` because tracing can be used\n // in a variety of environments, have to disable `no-unsafe-member-access`\n // as a result.\n const metaTag = utils.getDomElement(`meta[name=${metaName}]`);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return metaTag ? metaTag.getAttribute('content') : undefined;\n}\n\nfunction getSource(context) {\n const sourceFromAttributes = context.attributes && context.attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n // eslint-disable-next-line deprecation/deprecation\n const sourceFromData = context.data && context.data[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n // eslint-disable-next-line deprecation/deprecation\n const sourceFromMetadata = context.metadata && context.metadata.source;\n\n return sourceFromAttributes || sourceFromData || sourceFromMetadata;\n}\n\nexports.BROWSER_TRACING_INTEGRATION_ID = BROWSER_TRACING_INTEGRATION_ID;\nexports.BrowserTracing = BrowserTracing;\nexports.getMetaContent = getMetaContent;\n//# sourceMappingURL=browsertracing.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../common/debug-build.js');\nconst getCLS = require('./web-vitals/getCLS.js');\nconst getFID = require('./web-vitals/getFID.js');\nconst getINP = require('./web-vitals/getINP.js');\nconst getLCP = require('./web-vitals/getLCP.js');\nconst observe = require('./web-vitals/lib/observe.js');\n\nconst handlers = {};\nconst instrumented = {};\n\nlet _previousCls;\nlet _previousFid;\nlet _previousLcp;\nlet _previousInp;\n\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for CLS when the cleanup callback is called.\n * This will lead to the CLS being finalized and frozen.\n */\nfunction addClsInstrumentationHandler(\n callback,\n stopOnCallback = false,\n) {\n return addMetricObserver('cls', callback, instrumentCls, _previousCls, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for LCP when the cleanup callback is called.\n * This will lead to the LCP being finalized and frozen.\n */\nfunction addLcpInstrumentationHandler(\n callback,\n stopOnCallback = false,\n) {\n return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addFidInstrumentationHandler(callback) {\n return addMetricObserver('fid', callback, instrumentFid, _previousFid);\n}\n\n/**\n * Add a callback that will be triggered when a INP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addInpInstrumentationHandler(\n callback,\n) {\n return addMetricObserver('inp', callback, instrumentInp, _previousInp);\n}\n\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addPerformanceInstrumentationHandler(\n type,\n callback,\n) {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentPerformanceObserver(type);\n instrumented[type] = true;\n }\n\n return getCleanupCallback(type, callback);\n}\n\n/** Trigger all handlers of a given type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers || !typeHandlers.length) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${utils.getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nfunction instrumentCls() {\n return getCLS.onCLS(metric => {\n triggerHandlers('cls', {\n metric,\n });\n _previousCls = metric;\n });\n}\n\nfunction instrumentFid() {\n return getFID.onFID(metric => {\n triggerHandlers('fid', {\n metric,\n });\n _previousFid = metric;\n });\n}\n\nfunction instrumentLcp() {\n return getLCP.onLCP(metric => {\n triggerHandlers('lcp', {\n metric,\n });\n _previousLcp = metric;\n });\n}\n\nfunction instrumentInp() {\n return getINP.onINP(metric => {\n triggerHandlers('inp', {\n metric,\n });\n _previousInp = metric;\n });\n}\n\nfunction addMetricObserver(\n type,\n callback,\n instrumentFn,\n previousValue,\n stopOnCallback = false,\n) {\n addHandler(type, callback);\n\n let stopListening;\n\n if (!instrumented[type]) {\n stopListening = instrumentFn();\n instrumented[type] = true;\n }\n\n if (previousValue) {\n callback({ metric: previousValue });\n }\n\n return getCleanupCallback(type, callback, stopOnCallback ? stopListening : undefined);\n}\n\nfunction instrumentPerformanceObserver(type) {\n const options = {};\n\n // Special per-type options we want to use\n if (type === 'event') {\n options.durationThreshold = 0;\n }\n\n observe.observe(\n type,\n entries => {\n triggerHandlers(type, { entries });\n },\n options,\n );\n}\n\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n// Get a callback which can be called to remove the instrumentation handler\nfunction getCleanupCallback(\n type,\n callback,\n stopListening,\n) {\n return () => {\n if (stopListening) {\n stopListening();\n }\n\n const typeHandlers = handlers[type];\n\n if (!typeHandlers) {\n return;\n }\n\n const index = typeHandlers.indexOf(callback);\n if (index !== -1) {\n typeHandlers.splice(index, 1);\n }\n };\n}\n\nexports.addClsInstrumentationHandler = addClsInstrumentationHandler;\nexports.addFidInstrumentationHandler = addFidInstrumentationHandler;\nexports.addInpInstrumentationHandler = addInpInstrumentationHandler;\nexports.addLcpInstrumentationHandler = addLcpInstrumentationHandler;\nexports.addPerformanceInstrumentationHandler = addPerformanceInstrumentationHandler;\n//# sourceMappingURL=instrument.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../../common/debug-build.js');\nconst instrument = require('../instrument.js');\nconst types = require('../types.js');\nconst getVisibilityWatcher = require('../web-vitals/lib/getVisibilityWatcher.js');\nconst utils$1 = require('./utils.js');\n\nconst MAX_INT_AS_BYTES = 2147483647;\n\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nfunction msToSec(time) {\n return time / 1000;\n}\n\nfunction getBrowserPerformanceAPI() {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n return types.WINDOW && types.WINDOW.addEventListener && types.WINDOW.performance;\n}\n\nlet _performanceCursor = 0;\n\nlet _measurements = {};\nlet _lcpEntry;\nlet _clsEntry;\n\n/**\n * Start tracking web vitals.\n * The callback returned by this function can be used to stop tracking & ensure all measurements are final & captured.\n *\n * @returns A function that forces web vitals collection\n */\nfunction startTrackingWebVitals() {\n const performance = getBrowserPerformanceAPI();\n if (performance && utils.browserPerformanceTimeOrigin) {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n if (performance.mark) {\n types.WINDOW.performance.mark('sentry-tracing-init');\n }\n const fidCallback = _trackFID();\n const clsCallback = _trackCLS();\n const lcpCallback = _trackLCP();\n\n return () => {\n fidCallback();\n clsCallback();\n lcpCallback();\n };\n }\n\n return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nfunction startTrackingLongTasks() {\n instrument.addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n for (const entry of entries) {\n // eslint-disable-next-line deprecation/deprecation\n const transaction = core.getActiveTransaction() ;\n if (!transaction) {\n return;\n }\n const startTime = msToSec((utils.browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n // eslint-disable-next-line deprecation/deprecation\n transaction.startChild({\n description: 'Main UI thread blocked',\n op: 'ui.long-task',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n });\n }\n });\n}\n\n/**\n * Start tracking interaction events.\n */\nfunction startTrackingInteractions() {\n instrument.addPerformanceInstrumentationHandler('event', ({ entries }) => {\n for (const entry of entries) {\n // eslint-disable-next-line deprecation/deprecation\n const transaction = core.getActiveTransaction() ;\n if (!transaction) {\n return;\n }\n\n if (entry.name === 'click') {\n const startTime = msToSec((utils.browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n const span = {\n description: utils.htmlTreeAsString(entry.target),\n op: `ui.interaction.${entry.name}`,\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n };\n\n const componentName = utils.getComponentName(entry.target);\n if (componentName) {\n span.attributes = { 'ui.component_name': componentName };\n }\n\n // eslint-disable-next-line deprecation/deprecation\n transaction.startChild(span);\n }\n }\n });\n}\n\n/**\n * Start tracking INP webvital events.\n */\nfunction startTrackingINP(interactionIdtoRouteNameMapping) {\n const performance = getBrowserPerformanceAPI();\n if (performance && utils.browserPerformanceTimeOrigin) {\n const inpCallback = _trackINP(interactionIdtoRouteNameMapping);\n\n return () => {\n inpCallback();\n };\n }\n\n return () => undefined;\n}\n\n/** Starts tracking the Cumulative Layout Shift on the current page. */\nfunction _trackCLS() {\n return instrument.addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding CLS');\n _measurements['cls'] = { value: metric.value, unit: '' };\n _clsEntry = entry ;\n }, true);\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP() {\n return instrument.addLcpInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding LCP');\n _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n _lcpEntry = entry ;\n }, true);\n}\n\n/** Starts tracking the First Input Delay on the current page. */\nfunction _trackFID() {\n return instrument.addFidInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n const timeOrigin = msToSec(utils.browserPerformanceTimeOrigin );\n const startTime = msToSec(entry.startTime);\n debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding FID');\n _measurements['fid'] = { value: metric.value, unit: 'millisecond' };\n _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' };\n });\n}\n\n/** Starts tracking the Interaction to Next Paint on the current page. */\nfunction _trackINP(interactionIdtoRouteNameMapping) {\n return instrument.addInpInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.find(e => e.name === 'click');\n const client = core.getClient();\n if (!entry || !client) {\n return;\n }\n const options = client.getOptions();\n /** Build the INP span, create an envelope from the span, and then send the envelope */\n const startTime = msToSec((utils.browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(metric.value);\n const { routeName, parentContext, activeTransaction, user, replayId } =\n entry.interactionId !== undefined\n ? interactionIdtoRouteNameMapping[entry.interactionId]\n : {\n routeName: undefined,\n parentContext: undefined,\n activeTransaction: undefined,\n user: undefined,\n replayId: undefined,\n };\n const userDisplay = user !== undefined ? user.email || user.id || user.ip_address : undefined;\n // eslint-disable-next-line deprecation/deprecation\n const profileId = activeTransaction !== undefined ? activeTransaction.getProfileId() : undefined;\n const span = new core.Span({\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n op: 'ui.interaction.click',\n name: utils.htmlTreeAsString(entry.target),\n attributes: {\n release: options.release,\n environment: options.environment,\n transaction: routeName,\n ...(userDisplay !== undefined && userDisplay !== '' ? { user: userDisplay } : {}),\n ...(profileId !== undefined ? { profile_id: profileId } : {}),\n ...(replayId !== undefined ? { replay_id: replayId } : {}),\n },\n exclusiveTime: metric.value,\n measurements: {\n inp: { value: metric.value, unit: 'millisecond' },\n },\n });\n\n /** Check to see if the span should be sampled */\n const sampleRate = getSampleRate(parentContext, options);\n if (!sampleRate) {\n return;\n }\n\n if (Math.random() < (sampleRate )) {\n const envelope = span ? core.createSpanEnvelope([span]) : undefined;\n const transport = client && client.getTransport();\n if (transport && envelope) {\n transport.send(envelope).then(null, reason => {\n debugBuild.DEBUG_BUILD && utils.logger.error('Error while sending interaction:', reason);\n });\n }\n return;\n }\n });\n}\n\n/** Add performance related spans to a transaction */\nfunction addPerformanceEntries(transaction) {\n const performance = getBrowserPerformanceAPI();\n if (!performance || !types.WINDOW.performance.getEntries || !utils.browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n\n debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] Adding & adjusting spans using Performance API');\n const timeOrigin = msToSec(utils.browserPerformanceTimeOrigin);\n\n const performanceEntries = performance.getEntries();\n\n let responseStartTimestamp;\n let requestStartTimestamp;\n\n const { op, start_timestamp: transactionStartTime } = core.spanToJSON(transaction);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n performanceEntries.slice(_performanceCursor).forEach((entry) => {\n const startTime = msToSec(entry.startTime);\n const duration = msToSec(entry.duration);\n\n // eslint-disable-next-line deprecation/deprecation\n if (transaction.op === 'navigation' && transactionStartTime && timeOrigin + startTime < transactionStartTime) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation': {\n _addNavigationSpans(transaction, entry, timeOrigin);\n responseStartTimestamp = timeOrigin + msToSec(entry.responseStart);\n requestStartTimestamp = timeOrigin + msToSec(entry.requestStart);\n break;\n }\n case 'mark':\n case 'paint':\n case 'measure': {\n _addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);\n\n // capture web vitals\n const firstHidden = getVisibilityWatcher.getVisibilityWatcher();\n // Only report if the page wasn't hidden prior to the web vital.\n const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n\n if (entry.name === 'first-paint' && shouldRecord) {\n debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding FP');\n _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding FCP');\n _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n break;\n }\n case 'resource': {\n _addResourceSpans(transaction, entry, entry.name , startTime, duration, timeOrigin);\n break;\n }\n // Ignore other entry types.\n }\n });\n\n _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n _trackNavigator(transaction);\n\n // Measurements are only available for pageload transactions\n if (op === 'pageload') {\n _addTtfbToMeasurements(_measurements, responseStartTimestamp, requestStartTimestamp, transactionStartTime);\n\n ['fcp', 'fp', 'lcp'].forEach(name => {\n if (!_measurements[name] || !transactionStartTime || timeOrigin >= transactionStartTime) {\n return;\n }\n // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n const oldValue = _measurements[name].value;\n const measurementTimestamp = timeOrigin + msToSec(oldValue);\n\n // normalizedValue should be in milliseconds\n const normalizedValue = Math.abs((measurementTimestamp - transactionStartTime) * 1000);\n const delta = normalizedValue - oldValue;\n\n debugBuild.DEBUG_BUILD && utils.logger.log(`[Measurements] Normalized ${name} from ${oldValue} to ${normalizedValue} (${delta})`);\n _measurements[name].value = normalizedValue;\n });\n\n const fidMark = _measurements['mark.fid'];\n if (fidMark && _measurements['fid']) {\n // create span for FID\n utils$1._startChild(transaction, {\n description: 'first input delay',\n endTimestamp: fidMark.value + msToSec(_measurements['fid'].value),\n op: 'ui.action',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: fidMark.value,\n });\n\n // Delete mark.fid as we don't want it to be part of final payload\n delete _measurements['mark.fid'];\n }\n\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n if (!('fcp' in _measurements)) {\n delete _measurements.cls;\n }\n\n Object.keys(_measurements).forEach(measurementName => {\n core.setMeasurement(measurementName, _measurements[measurementName].value, _measurements[measurementName].unit);\n });\n\n _tagMetricInfo(transaction);\n }\n\n _lcpEntry = undefined;\n _clsEntry = undefined;\n _measurements = {};\n}\n\n/** Create measure related spans */\nfunction _addMeasureSpans(\n transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry,\n startTime,\n duration,\n timeOrigin,\n) {\n const measureStartTimestamp = timeOrigin + startTime;\n const measureEndTimestamp = measureStartTimestamp + duration;\n\n utils$1._startChild(transaction, {\n description: entry.name ,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType ,\n origin: 'auto.resource.browser.metrics',\n startTimestamp: measureStartTimestamp,\n });\n\n return measureStartTimestamp;\n}\n\n/** Instrument navigation entries */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addNavigationSpans(transaction, entry, timeOrigin) {\n ['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'].forEach(event => {\n _addPerformanceNavigationTiming(transaction, entry, event, timeOrigin);\n });\n _addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'TLS/SSL', 'connectEnd');\n _addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'cache', 'domainLookupStart');\n _addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin, 'DNS');\n _addRequest(transaction, entry, timeOrigin);\n}\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry,\n event,\n timeOrigin,\n description,\n eventEnd,\n) {\n const end = eventEnd ? (entry[eventEnd] ) : (entry[`${event}End`] );\n const start = entry[`${event}Start`] ;\n if (!start || !end) {\n return;\n }\n utils$1._startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: description || event,\n startTimestamp: timeOrigin + msToSec(start),\n endTimestamp: timeOrigin + msToSec(end),\n });\n}\n\n/** Create request and response related spans */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addRequest(transaction, entry, timeOrigin) {\n if (entry.responseEnd) {\n // It is possible that we are collecting these metrics when the page hasn't finished loading yet, for example when the HTML slowly streams in.\n // In this case, ie. when the document request hasn't finished yet, `entry.responseEnd` will be 0.\n // In order not to produce faulty spans, where the end timestamp is before the start timestamp, we will only collect\n // these spans when the responseEnd value is available. The backend (Relay) would drop the entire transaction if it contained faulty spans.\n utils$1._startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'request',\n startTimestamp: timeOrigin + msToSec(entry.requestStart ),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n });\n\n utils$1._startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'response',\n startTimestamp: timeOrigin + msToSec(entry.responseStart ),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n });\n }\n}\n\n/** Create resource-related spans */\nfunction _addResourceSpans(\n transaction,\n entry,\n resourceUrl,\n startTime,\n duration,\n timeOrigin,\n) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return;\n }\n\n const parsedUrl = utils.parseUrl(resourceUrl);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const data = {};\n setResourceEntrySizeData(data, entry, 'transferSize', 'http.response_transfer_size');\n setResourceEntrySizeData(data, entry, 'encodedBodySize', 'http.response_content_length');\n setResourceEntrySizeData(data, entry, 'decodedBodySize', 'http.decoded_response_content_length');\n\n if ('renderBlockingStatus' in entry) {\n data['resource.render_blocking_status'] = entry.renderBlockingStatus;\n }\n if (parsedUrl.protocol) {\n data['url.scheme'] = parsedUrl.protocol.split(':').pop(); // the protocol returned by parseUrl includes a :, but OTEL spec does not, so we remove it.\n }\n\n if (parsedUrl.host) {\n data['server.address'] = parsedUrl.host;\n }\n\n data['url.same_origin'] = resourceUrl.includes(types.WINDOW.location.origin);\n\n const startTimestamp = timeOrigin + startTime;\n const endTimestamp = startTimestamp + duration;\n\n utils$1._startChild(transaction, {\n description: resourceUrl.replace(types.WINDOW.location.origin, ''),\n endTimestamp,\n op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',\n origin: 'auto.resource.browser.metrics',\n startTimestamp,\n data,\n });\n}\n\n/**\n * Capture the information of the user agent.\n */\nfunction _trackNavigator(transaction) {\n const navigator = types.WINDOW.navigator ;\n if (!navigator) {\n return;\n }\n\n // track network connectivity\n const connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('effectiveConnectionType', connection.effectiveType);\n }\n\n if (connection.type) {\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('connectionType', connection.type);\n }\n\n if (utils$1.isMeasurementValue(connection.rtt)) {\n _measurements['connection.rtt'] = { value: connection.rtt, unit: 'millisecond' };\n }\n }\n\n if (utils$1.isMeasurementValue(navigator.deviceMemory)) {\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('deviceMemory', `${navigator.deviceMemory} GB`);\n }\n\n if (utils$1.isMeasurementValue(navigator.hardwareConcurrency)) {\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n}\n\n/** Add LCP / CLS data to transaction to allow debugging */\nfunction _tagMetricInfo(transaction) {\n if (_lcpEntry) {\n debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding LCP Data');\n\n // Capture Properties of the LCP element that contributes to the LCP.\n\n if (_lcpEntry.element) {\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('lcp.element', utils.htmlTreeAsString(_lcpEntry.element));\n }\n\n if (_lcpEntry.id) {\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('lcp.id', _lcpEntry.id);\n }\n\n if (_lcpEntry.url) {\n // Trim URL to the first 200 characters.\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n }\n\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('lcp.size', _lcpEntry.size);\n }\n\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if (_clsEntry && _clsEntry.sources) {\n debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding CLS Data');\n _clsEntry.sources.forEach((source, index) =>\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag(`cls.source.${index + 1}`, utils.htmlTreeAsString(source.node)),\n );\n }\n}\n\nfunction setResourceEntrySizeData(\n data,\n entry,\n key,\n dataKey,\n) {\n const entryVal = entry[key];\n if (entryVal != null && entryVal < MAX_INT_AS_BYTES) {\n data[dataKey] = entryVal;\n }\n}\n\n/**\n * Add ttfb information to measurements\n *\n * Exported for tests\n */\nfunction _addTtfbToMeasurements(\n _measurements,\n responseStartTimestamp,\n requestStartTimestamp,\n transactionStartTime,\n) {\n // Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the\n // start of the response in milliseconds\n if (typeof responseStartTimestamp === 'number' && transactionStartTime) {\n debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding TTFB');\n _measurements['ttfb'] = {\n // As per https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStart,\n // responseStart can be 0 if the request is coming straight from the cache.\n // This might lead us to calculate a negative ttfb if we don't use Math.max here.\n //\n // This logic is the same as what is in the web-vitals library to calculate ttfb\n // https://github.com/GoogleChrome/web-vitals/blob/2301de5015e82b09925238a228a0893635854587/src/onTTFB.ts#L92\n // TODO(abhi): We should use the web-vitals library instead of this custom calculation.\n value: Math.max(responseStartTimestamp - transactionStartTime, 0) * 1000,\n unit: 'millisecond',\n };\n\n if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) {\n // Capture the time spent making the request and receiving the first byte of the response.\n // This is the time between the start of the request and the start of the response in milliseconds.\n _measurements['ttfb.requestTime'] = {\n value: (responseStartTimestamp - requestStartTimestamp) * 1000,\n unit: 'millisecond',\n };\n }\n }\n}\n\n/** Taken from @sentry/core sampling.ts */\nfunction getSampleRate(transactionContext, options) {\n if (!core.hasTracingEnabled(options)) {\n return false;\n }\n let sampleRate;\n if (transactionContext !== undefined && typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler({\n transactionContext,\n name: transactionContext.name,\n parentSampled: transactionContext.parentSampled,\n attributes: {\n // eslint-disable-next-line deprecation/deprecation\n ...transactionContext.data,\n ...transactionContext.attributes,\n },\n location: types.WINDOW.location,\n });\n } else if (transactionContext !== undefined && transactionContext.sampled !== undefined) {\n sampleRate = transactionContext.sampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n } else {\n sampleRate = 1;\n }\n if (!core.isValidSampleRate(sampleRate)) {\n debugBuild.DEBUG_BUILD && utils.logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n return false;\n }\n return sampleRate;\n}\n\nexports._addMeasureSpans = _addMeasureSpans;\nexports._addResourceSpans = _addResourceSpans;\nexports._addTtfbToMeasurements = _addTtfbToMeasurements;\nexports.addPerformanceEntries = addPerformanceEntries;\nexports.startTrackingINP = startTrackingINP;\nexports.startTrackingInteractions = startTrackingInteractions;\nexports.startTrackingLongTasks = startTrackingLongTasks;\nexports.startTrackingWebVitals = startTrackingWebVitals;\n//# sourceMappingURL=index.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Checks if a given value is a valid measurement value.\n */\nfunction isMeasurementValue(value) {\n return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n *\n * Note: this will not be possible anymore in v8,\n * unless we do some special handling for browser here...\n */\nfunction _startChild(transaction, { startTimestamp, ...ctx }) {\n // eslint-disable-next-line deprecation/deprecation\n if (startTimestamp && transaction.startTimestamp > startTimestamp) {\n // eslint-disable-next-line deprecation/deprecation\n transaction.startTimestamp = startTimestamp;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return transaction.startChild({\n startTimestamp,\n ...ctx,\n });\n}\n\nexports._startChild = _startChild;\nexports.isMeasurementValue = isMeasurementValue;\n//# sourceMappingURL=utils.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst fetch = require('../common/fetch.js');\nconst instrument = require('./instrument.js');\n\n/* eslint-disable max-lines */\n\nconst DEFAULT_TRACE_PROPAGATION_TARGETS = ['localhost', /^\\/(?!\\/)/];\n\n/** Options for Request Instrumentation */\n\nconst defaultRequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n enableHTTPTimings: true,\n // TODO (v8): Remove this property\n tracingOrigins: DEFAULT_TRACE_PROPAGATION_TARGETS,\n tracePropagationTargets: DEFAULT_TRACE_PROPAGATION_TARGETS,\n};\n\n/** Registers span creators for xhr and fetch requests */\nfunction instrumentOutgoingRequests(_options) {\n const {\n traceFetch,\n traceXHR,\n // eslint-disable-next-line deprecation/deprecation\n tracePropagationTargets,\n // eslint-disable-next-line deprecation/deprecation\n tracingOrigins,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n } = {\n traceFetch: defaultRequestInstrumentationOptions.traceFetch,\n traceXHR: defaultRequestInstrumentationOptions.traceXHR,\n ..._options,\n };\n\n const shouldCreateSpan =\n typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_) => true;\n\n // TODO(v8) Remove tracingOrigins here\n // The only reason we're passing it in here is because this instrumentOutgoingRequests function is publicly exported\n // and we don't want to break the API. We can remove it in v8.\n const shouldAttachHeadersWithTargets = (url) =>\n shouldAttachHeaders(url, tracePropagationTargets || tracingOrigins);\n\n const spans = {};\n\n if (traceFetch) {\n utils.addFetchInstrumentationHandler(handlerData => {\n const createdSpan = fetch.instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n\n if (traceXHR) {\n utils.addXhrInstrumentationHandler(handlerData => {\n const createdSpan = xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n}\n\nfunction isPerformanceResourceTiming(entry) {\n return (\n entry.entryType === 'resource' &&\n 'initiatorType' in entry &&\n typeof (entry ).nextHopProtocol === 'string' &&\n (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')\n );\n}\n\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */\nfunction addHTTPTimings(span) {\n const { url } = core.spanToJSON(span).data || {};\n\n if (!url || typeof url !== 'string') {\n return;\n }\n\n const cleanup = instrument.addPerformanceInstrumentationHandler('resource', ({ entries }) => {\n entries.forEach(entry => {\n if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n const spanData = resourceTimingEntryToSpanData(entry);\n spanData.forEach(data => span.setAttribute(...data));\n // In the next tick, clean this handler up\n // We have to wait here because otherwise this cleans itself up before it is fully done\n setTimeout(cleanup);\n }\n });\n });\n}\n\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */\nfunction extractNetworkProtocol(nextHopProtocol) {\n let name = 'unknown';\n let version = 'unknown';\n let _name = '';\n for (const char of nextHopProtocol) {\n // http/1.1 etc.\n if (char === '/') {\n [name, version] = nextHopProtocol.split('/');\n break;\n }\n // h2, h3 etc.\n if (!isNaN(Number(char))) {\n name = _name === 'h' ? 'http' : _name;\n version = nextHopProtocol.split(_name)[1];\n break;\n }\n _name += char;\n }\n if (_name === nextHopProtocol) {\n // webrtc, ftp, etc.\n name = _name;\n }\n return { name, version };\n}\n\nfunction getAbsoluteTime(time = 0) {\n return ((utils.browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;\n}\n\nfunction resourceTimingEntryToSpanData(resourceTiming) {\n const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n\n const timingSpanData = [];\n\n timingSpanData.push(['network.protocol.version', version], ['network.protocol.name', name]);\n\n if (!utils.browserPerformanceTimeOrigin) {\n return timingSpanData;\n }\n return [\n ...timingSpanData,\n ['http.request.redirect_start', getAbsoluteTime(resourceTiming.redirectStart)],\n ['http.request.fetch_start', getAbsoluteTime(resourceTiming.fetchStart)],\n ['http.request.domain_lookup_start', getAbsoluteTime(resourceTiming.domainLookupStart)],\n ['http.request.domain_lookup_end', getAbsoluteTime(resourceTiming.domainLookupEnd)],\n ['http.request.connect_start', getAbsoluteTime(resourceTiming.connectStart)],\n ['http.request.secure_connection_start', getAbsoluteTime(resourceTiming.secureConnectionStart)],\n ['http.request.connection_end', getAbsoluteTime(resourceTiming.connectEnd)],\n ['http.request.request_start', getAbsoluteTime(resourceTiming.requestStart)],\n ['http.request.response_start', getAbsoluteTime(resourceTiming.responseStart)],\n ['http.request.response_end', getAbsoluteTime(resourceTiming.responseEnd)],\n ];\n}\n\n/**\n * A function that determines whether to attach tracing headers to a request.\n * This was extracted from `instrumentOutgoingRequests` to make it easier to test shouldAttachHeaders.\n * We only export this fuction for testing purposes.\n */\nfunction shouldAttachHeaders(url, tracePropagationTargets) {\n return utils.stringMatchesSomePattern(url, tracePropagationTargets || DEFAULT_TRACE_PROPAGATION_TARGETS);\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\n// eslint-disable-next-line complexity\nfunction xhrCallback(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n) {\n const xhr = handlerData.xhr;\n const sentryXhrData = xhr && xhr[utils.SENTRY_XHR_DATA_KEY];\n\n if (!core.hasTracingEnabled() || !xhr || xhr.__sentry_own_request__ || !sentryXhrData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(sentryXhrData.url);\n\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = xhr.__sentry_xhr_span_id__;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span && sentryXhrData.status_code !== undefined) {\n core.setHttpStatus(span, sentryXhrData.status_code);\n span.end();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const scope = core.getCurrentScope();\n const isolationScope = core.getIsolationScope();\n\n const span = shouldCreateSpanResult\n ? core.startInactiveSpan({\n name: `${sentryXhrData.method} ${sentryXhrData.url}`,\n onlyIfParent: true,\n attributes: {\n type: 'xhr',\n 'http.method': sentryXhrData.method,\n url: sentryXhrData.url,\n [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser',\n },\n op: 'http.client',\n })\n : undefined;\n\n if (span) {\n xhr.__sentry_xhr_span_id__ = span.spanContext().spanId;\n spans[xhr.__sentry_xhr_span_id__] = span;\n }\n\n const client = core.getClient();\n\n if (xhr.setRequestHeader && shouldAttachHeaders(sentryXhrData.url) && client) {\n const { traceId, spanId, sampled, dsc } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n const sentryTraceHeader = span ? core.spanToTraceHeader(span) : utils.generateSentryTraceHeader(traceId, spanId, sampled);\n\n const sentryBaggageHeader = utils.dynamicSamplingContextToSentryBaggageHeader(\n dsc ||\n (span ? core.getDynamicSamplingContextFromSpan(span) : core.getDynamicSamplingContextFromClient(traceId, client, scope)),\n );\n\n setHeaderOnXhr(xhr, sentryTraceHeader, sentryBaggageHeader);\n }\n\n return span;\n}\n\nfunction setHeaderOnXhr(\n xhr,\n sentryTraceHeader,\n sentryBaggageHeader,\n) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader('sentry-trace', sentryTraceHeader);\n if (sentryBaggageHeader) {\n // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n // We can therefore simply set a baggage header without checking what was there before\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader(utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n } catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n}\n\nexports.DEFAULT_TRACE_PROPAGATION_TARGETS = DEFAULT_TRACE_PROPAGATION_TARGETS;\nexports.defaultRequestInstrumentationOptions = defaultRequestInstrumentationOptions;\nexports.extractNetworkProtocol = extractNetworkProtocol;\nexports.instrumentOutgoingRequests = instrumentOutgoingRequests;\nexports.shouldAttachHeaders = shouldAttachHeaders;\nexports.xhrCallback = xhrCallback;\n//# sourceMappingURL=request.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../common/debug-build.js');\nconst types = require('./types.js');\n\n/**\n * Default function implementing pageload and navigation transactions\n */\nfunction instrumentRoutingWithDefaults(\n customStartTransaction,\n startTransactionOnPageLoad = true,\n startTransactionOnLocationChange = true,\n) {\n if (!types.WINDOW || !types.WINDOW.location) {\n debugBuild.DEBUG_BUILD && utils.logger.warn('Could not initialize routing instrumentation due to invalid location');\n return;\n }\n\n let startingUrl = types.WINDOW.location.href;\n\n let activeTransaction;\n if (startTransactionOnPageLoad) {\n activeTransaction = customStartTransaction({\n name: types.WINDOW.location.pathname,\n // pageload should always start at timeOrigin (and needs to be in s, not ms)\n startTimestamp: utils.browserPerformanceTimeOrigin ? utils.browserPerformanceTimeOrigin / 1000 : undefined,\n op: 'pageload',\n origin: 'auto.pageload.browser',\n metadata: { source: 'url' },\n });\n }\n\n if (startTransactionOnLocationChange) {\n utils.addHistoryInstrumentationHandler(({ to, from }) => {\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n\n if (from !== to) {\n startingUrl = undefined;\n if (activeTransaction) {\n debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Finishing current transaction with op: ${activeTransaction.op}`);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeTransaction.end();\n }\n activeTransaction = customStartTransaction({\n name: types.WINDOW.location.pathname,\n op: 'navigation',\n origin: 'auto.navigation.browser',\n metadata: { source: 'url' },\n });\n }\n });\n }\n}\n\nexports.instrumentRoutingWithDefaults = instrumentRoutingWithDefaults;\n//# sourceMappingURL=router.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\nconst WINDOW = utils.GLOBAL_OBJ ;\n\nexports.WINDOW = WINDOW;\n//# sourceMappingURL=types.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst bindReporter = require('./lib/bindReporter.js');\nconst initMetric = require('./lib/initMetric.js');\nconst observe = require('./lib/observe.js');\nconst onHidden = require('./lib/onHidden.js');\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Calculates the [CLS](https://web.dev/cls/) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/cls/#layout-shift-score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onCLS = (onReport) => {\n const metric = initMetric.initMetric('CLS', 0);\n let report;\n\n let sessionValue = 0;\n let sessionEntries = [];\n\n // const handleEntries = (entries: Metric['entries']) => {\n const handleEntries = (entries) => {\n entries.forEach(entry => {\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n const firstSessionEntry = sessionEntries[0];\n const lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n\n // If the entry occurred less than 1 second after the previous entry and\n // less than 5 seconds after the first entry in the session, include the\n // entry in the current session. Otherwise, start a new session.\n if (\n sessionValue &&\n sessionEntries.length !== 0 &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000\n ) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n } else {\n sessionValue = entry.value;\n sessionEntries = [entry];\n }\n\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n if (report) {\n report();\n }\n }\n }\n });\n };\n\n const po = observe.observe('layout-shift', handleEntries);\n if (po) {\n report = bindReporter.bindReporter(onReport, metric);\n\n const stopListening = () => {\n handleEntries(po.takeRecords() );\n report(true);\n };\n\n onHidden.onHidden(stopListening);\n\n return stopListening;\n }\n\n return;\n};\n\nexports.onCLS = onCLS;\n//# sourceMappingURL=getCLS.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst bindReporter = require('./lib/bindReporter.js');\nconst getVisibilityWatcher = require('./lib/getVisibilityWatcher.js');\nconst initMetric = require('./lib/initMetric.js');\nconst observe = require('./lib/observe.js');\nconst onHidden = require('./lib/onHidden.js');\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Calculates the [FID](https://web.dev/fid/) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `first-input` performance entry used to determine the value. The\n * reported value is a `DOMHighResTimeStamp`.\n *\n * _**Important:** since FID is only reported after the user interacts with the\n * page, it's possible that it will not be reported for some page loads._\n */\nconst onFID = (onReport) => {\n const visibilityWatcher = getVisibilityWatcher.getVisibilityWatcher();\n const metric = initMetric.initMetric('FID');\n // eslint-disable-next-line prefer-const\n let report;\n\n const handleEntry = (entry) => {\n // Only report if the page wasn't hidden prior to the first input.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n\n const handleEntries = (entries) => {\n (entries ).forEach(handleEntry);\n };\n\n const po = observe.observe('first-input', handleEntries);\n report = bindReporter.bindReporter(onReport, metric);\n\n if (po) {\n onHidden.onHidden(() => {\n handleEntries(po.takeRecords() );\n po.disconnect();\n }, true);\n }\n};\n\nexports.onFID = onFID;\n//# sourceMappingURL=getFID.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst bindReporter = require('./lib/bindReporter.js');\nconst initMetric = require('./lib/initMetric.js');\nconst observe = require('./lib/observe.js');\nconst onHidden = require('./lib/onHidden.js');\nconst interactionCountPolyfill = require('./lib/polyfills/interactionCountPolyfill.js');\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Returns the interaction count since the last bfcache restore (or for the\n * full page lifecycle if there were no bfcache restores).\n */\nconst getInteractionCountForNavigation = () => {\n return interactionCountPolyfill.getInteractionCount();\n};\n\n// To prevent unnecessary memory usage on pages with lots of interactions,\n// store at most 10 of the longest interactions to consider as INP candidates.\nconst MAX_INTERACTIONS_TO_CONSIDER = 10;\n\n// A list of longest interactions on the page (by latency) sorted so the\n// longest one is first. The list is as most MAX_INTERACTIONS_TO_CONSIDER long.\nconst longestInteractionList = [];\n\n// A mapping of longest interactions by their interaction ID.\n// This is used for faster lookup.\nconst longestInteractionMap = {};\n\n/**\n * Takes a performance entry and adds it to the list of worst interactions\n * if its duration is long enough to make it among the worst. If the\n * entry is part of an existing interaction, it is merged and the latency\n * and entries list is updated as needed.\n */\nconst processEntry = (entry) => {\n // The least-long of the 10 longest interactions.\n const minLongestInteraction = longestInteractionList[longestInteractionList.length - 1];\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const existingInteraction = longestInteractionMap[entry.interactionId];\n\n // Only process the entry if it's possibly one of the ten longest,\n // or if it's part of an existing interaction.\n if (\n existingInteraction ||\n longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER ||\n entry.duration > minLongestInteraction.latency\n ) {\n // If the interaction already exists, update it. Otherwise create one.\n if (existingInteraction) {\n existingInteraction.entries.push(entry);\n existingInteraction.latency = Math.max(existingInteraction.latency, entry.duration);\n } else {\n const interaction = {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n id: entry.interactionId,\n latency: entry.duration,\n entries: [entry],\n };\n longestInteractionMap[interaction.id] = interaction;\n longestInteractionList.push(interaction);\n }\n\n // Sort the entries by latency (descending) and keep only the top ten.\n longestInteractionList.sort((a, b) => b.latency - a.latency);\n longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER).forEach(i => {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete longestInteractionMap[i.id];\n });\n }\n};\n\n/**\n * Returns the estimated p98 longest interaction based on the stored\n * interaction candidates and the interaction count for the current page.\n */\nconst estimateP98LongestInteraction = () => {\n const candidateInteractionIndex = Math.min(\n longestInteractionList.length - 1,\n Math.floor(getInteractionCountForNavigation() / 50),\n );\n\n return longestInteractionList[candidateInteractionIndex];\n};\n\n/**\n * Calculates the [INP](https://web.dev/responsiveness/) value for the current\n * page and calls the `callback` function once the value is ready, along with\n * the `event` performance entries reported for that interaction. The reported\n * value is a `DOMHighResTimeStamp`.\n *\n * A custom `durationThreshold` configuration option can optionally be passed to\n * control what `event-timing` entries are considered for INP reporting. The\n * default threshold is `40`, which means INP scores of less than 40 are\n * reported as 0. Note that this will not affect your 75th percentile INP value\n * unless that value is also less than 40 (well below the recommended\n * [good](https://web.dev/inp/#what-is-a-good-inp-score) threshold).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** INP should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onINP = (onReport, opts) => {\n // Set defaults\n // eslint-disable-next-line no-param-reassign\n opts = opts || {};\n\n // https://web.dev/inp/#what's-a-%22good%22-inp-value\n // const thresholds = [200, 500];\n\n // TODO(philipwalton): remove once the polyfill is no longer needed.\n interactionCountPolyfill.initInteractionCountPolyfill();\n\n const metric = initMetric.initMetric('INP');\n // eslint-disable-next-line prefer-const\n let report;\n\n const handleEntries = (entries) => {\n entries.forEach(entry => {\n if (entry.interactionId) {\n processEntry(entry);\n }\n\n // Entries of type `first-input` don't currently have an `interactionId`,\n // so to consider them in INP we have to first check that an existing\n // entry doesn't match the `duration` and `startTime`.\n // Note that this logic assumes that `event` entries are dispatched\n // before `first-input` entries. This is true in Chrome but it is not\n // true in Firefox; however, Firefox doesn't support interactionId, so\n // it's not an issue at the moment.\n // TODO(philipwalton): remove once crbug.com/1325826 is fixed.\n if (entry.entryType === 'first-input') {\n const noMatchingEntry = !longestInteractionList.some(interaction => {\n return interaction.entries.some(prevEntry => {\n return entry.duration === prevEntry.duration && entry.startTime === prevEntry.startTime;\n });\n });\n if (noMatchingEntry) {\n processEntry(entry);\n }\n }\n });\n\n const inp = estimateP98LongestInteraction();\n\n if (inp && inp.latency !== metric.value) {\n metric.value = inp.latency;\n metric.entries = inp.entries;\n report();\n }\n };\n\n const po = observe.observe('event', handleEntries, {\n // Event Timing entries have their durations rounded to the nearest 8ms,\n // so a duration of 40ms would be any event that spans 2.5 or more frames\n // at 60Hz. This threshold is chosen to strike a balance between usefulness\n // and performance. Running this callback for any interaction that spans\n // just one or two frames is likely not worth the insight that could be\n // gained.\n durationThreshold: opts.durationThreshold || 40,\n } );\n\n report = bindReporter.bindReporter(onReport, metric, opts.reportAllChanges);\n\n if (po) {\n // Also observe entries of type `first-input`. This is useful in cases\n // where the first interaction is less than the `durationThreshold`.\n po.observe({ type: 'first-input', buffered: true });\n\n onHidden.onHidden(() => {\n handleEntries(po.takeRecords() );\n\n // If the interaction count shows that there were interactions but\n // none were captured by the PerformanceObserver, report a latency of 0.\n if (metric.value < 0 && getInteractionCountForNavigation() > 0) {\n metric.value = 0;\n metric.entries = [];\n }\n\n report(true);\n });\n }\n};\n\nexports.onINP = onINP;\n//# sourceMappingURL=getINP.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst bindReporter = require('./lib/bindReporter.js');\nconst getActivationStart = require('./lib/getActivationStart.js');\nconst getVisibilityWatcher = require('./lib/getVisibilityWatcher.js');\nconst initMetric = require('./lib/initMetric.js');\nconst observe = require('./lib/observe.js');\nconst onHidden = require('./lib/onHidden.js');\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst reportedMetricIDs = {};\n\n/**\n * Calculates the [LCP](https://web.dev/lcp/) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n */\nconst onLCP = (onReport) => {\n const visibilityWatcher = getVisibilityWatcher.getVisibilityWatcher();\n const metric = initMetric.initMetric('LCP');\n let report;\n\n const handleEntries = (entries) => {\n const lastEntry = entries[entries.length - 1] ;\n if (lastEntry) {\n // The startTime attribute returns the value of the renderTime if it is\n // not 0, and the value of the loadTime otherwise. The activationStart\n // reference is used because LCP should be relative to page activation\n // rather than navigation start if the page was prerendered.\n const value = Math.max(lastEntry.startTime - getActivationStart.getActivationStart(), 0);\n\n // Only report if the page wasn't hidden prior to LCP.\n if (value < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries = [lastEntry];\n report();\n }\n }\n };\n\n const po = observe.observe('largest-contentful-paint', handleEntries);\n\n if (po) {\n report = bindReporter.bindReporter(onReport, metric);\n\n const stopListening = () => {\n if (!reportedMetricIDs[metric.id]) {\n handleEntries(po.takeRecords() );\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\n }\n };\n\n // Stop listening after input. Note: while scrolling is an input that\n // stop LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n ['keydown', 'click'].forEach(type => {\n addEventListener(type, stopListening, { once: true, capture: true });\n });\n\n onHidden.onHidden(stopListening, true);\n\n return stopListening;\n }\n\n return;\n};\n\nexports.onLCP = onLCP;\n//# sourceMappingURL=getLCP.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst bindReporter = (\n callback,\n metric,\n reportAllChanges,\n) => {\n let prevValue;\n let delta;\n return (forceReport) => {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue || 0);\n\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (delta || prevValue === undefined) {\n prevValue = metric.value;\n metric.delta = delta;\n callback(metric);\n }\n }\n }\n };\n};\n\nexports.bindReporter = bindReporter;\n//# sourceMappingURL=bindReporter.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nconst generateUniqueID = () => {\n return `v3-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n\nexports.generateUniqueID = generateUniqueID;\n//# sourceMappingURL=generateUniqueID.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst getNavigationEntry = require('./getNavigationEntry.js');\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst getActivationStart = () => {\n const navEntry = getNavigationEntry.getNavigationEntry();\n return (navEntry && navEntry.activationStart) || 0;\n};\n\nexports.getActivationStart = getActivationStart;\n//# sourceMappingURL=getActivationStart.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst types = require('../../types.js');\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst getNavigationEntryFromPerformanceTiming = () => {\n // eslint-disable-next-line deprecation/deprecation\n const timing = types.WINDOW.performance.timing;\n // eslint-disable-next-line deprecation/deprecation\n const type = types.WINDOW.performance.navigation.type;\n\n const navigationEntry = {\n entryType: 'navigation',\n startTime: 0,\n type: type == 2 ? 'back_forward' : type === 1 ? 'reload' : 'navigate',\n };\n\n for (const key in timing) {\n if (key !== 'navigationStart' && key !== 'toJSON') {\n // eslint-disable-next-line deprecation/deprecation\n navigationEntry[key] = Math.max((timing[key ] ) - timing.navigationStart, 0);\n }\n }\n return navigationEntry ;\n};\n\nconst getNavigationEntry = () => {\n if (types.WINDOW.__WEB_VITALS_POLYFILL__) {\n return (\n types.WINDOW.performance &&\n ((performance.getEntriesByType && performance.getEntriesByType('navigation')[0]) ||\n getNavigationEntryFromPerformanceTiming())\n );\n } else {\n return types.WINDOW.performance && performance.getEntriesByType && performance.getEntriesByType('navigation')[0];\n }\n};\n\nexports.getNavigationEntry = getNavigationEntry;\n//# sourceMappingURL=getNavigationEntry.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst types = require('../../types.js');\nconst onHidden = require('./onHidden.js');\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet firstHiddenTime = -1;\n\nconst initHiddenTime = () => {\n // If the document is hidden and not prerendering, assume it was always\n // hidden and the page was loaded in the background.\n return types.WINDOW.document.visibilityState === 'hidden' && !types.WINDOW.document.prerendering ? 0 : Infinity;\n};\n\nconst trackChanges = () => {\n // Update the time if/when the document becomes hidden.\n onHidden.onHidden(({ timeStamp }) => {\n firstHiddenTime = timeStamp;\n }, true);\n};\n\nconst getVisibilityWatcher = (\n\n) => {\n if (firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = initHiddenTime();\n trackChanges();\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n };\n};\n\nexports.getVisibilityWatcher = getVisibilityWatcher;\n//# sourceMappingURL=getVisibilityWatcher.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst types = require('../../types.js');\nconst generateUniqueID = require('./generateUniqueID.js');\nconst getActivationStart = require('./getActivationStart.js');\nconst getNavigationEntry = require('./getNavigationEntry.js');\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst initMetric = (name, value) => {\n const navEntry = getNavigationEntry.getNavigationEntry();\n let navigationType = 'navigate';\n\n if (navEntry) {\n if (types.WINDOW.document.prerendering || getActivationStart.getActivationStart() > 0) {\n navigationType = 'prerender';\n } else {\n navigationType = navEntry.type.replace(/_/g, '-') ;\n }\n }\n\n return {\n name,\n value: typeof value === 'undefined' ? -1 : value,\n rating: 'good', // Will be updated if the value changes.\n delta: 0,\n entries: [],\n id: generateUniqueID.generateUniqueID(),\n navigationType,\n };\n};\n\nexports.initMetric = initMetric;\n//# sourceMappingURL=initMetric.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nconst observe = (\n type,\n callback,\n opts,\n) => {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n const po = new PerformanceObserver(list => {\n callback(list.getEntries() );\n });\n po.observe(\n Object.assign(\n {\n type,\n buffered: true,\n },\n opts || {},\n ) ,\n );\n return po;\n }\n } catch (e) {\n // Do nothing.\n }\n return;\n};\n\nexports.observe = observe;\n//# sourceMappingURL=observe.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst types = require('../../types.js');\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst onHidden = (cb, once) => {\n const onHiddenOrPageHide = (event) => {\n if (event.type === 'pagehide' || types.WINDOW.document.visibilityState === 'hidden') {\n cb(event);\n if (once) {\n removeEventListener('visibilitychange', onHiddenOrPageHide, true);\n removeEventListener('pagehide', onHiddenOrPageHide, true);\n }\n }\n };\n addEventListener('visibilitychange', onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener('pagehide', onHiddenOrPageHide, true);\n};\n\nexports.onHidden = onHidden;\n//# sourceMappingURL=onHidden.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst observe = require('../observe.js');\n\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\n\nconst updateEstimate = (entries) => {\n (entries ).forEach(e => {\n if (e.interactionId) {\n minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);\n maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);\n\n interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;\n }\n });\n};\n\nlet po;\n\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nconst getInteractionCount = () => {\n return po ? interactionCountEstimate : performance.interactionCount || 0;\n};\n\n/**\n * Feature detects native support or initializes the polyfill if needed.\n */\nconst initInteractionCountPolyfill = () => {\n if ('interactionCount' in performance || po) return;\n\n po = observe.observe('event', updateEstimate, {\n type: 'event',\n buffered: true,\n durationThreshold: 0,\n } );\n};\n\nexports.getInteractionCount = getInteractionCount;\nexports.initInteractionCountPolyfill = initInteractionCountPolyfill;\n//# sourceMappingURL=interactionCountPolyfill.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexports.DEBUG_BUILD = DEBUG_BUILD;\n//# sourceMappingURL=debug-build.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\n\n/**\n * Create and track fetch request spans for usage in combination with `addInstrumentationHandler`.\n *\n * @returns Span if a span was created, otherwise void.\n */\nfunction instrumentFetchRequest(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n spanOrigin = 'auto.http.browser',\n) {\n if (!core.hasTracingEnabled() || !handlerData.fetchData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(handlerData.fetchData.url);\n\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = handlerData.fetchData.__span;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n if (handlerData.response) {\n core.setHttpStatus(span, handlerData.response.status);\n\n const contentLength =\n handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length');\n\n if (contentLength) {\n const contentLengthNum = parseInt(contentLength);\n if (contentLengthNum > 0) {\n span.setAttribute('http.response_content_length', contentLengthNum);\n }\n }\n } else if (handlerData.error) {\n span.setStatus('internal_error');\n }\n span.end();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const scope = core.getCurrentScope();\n const client = core.getClient();\n\n const { method, url } = handlerData.fetchData;\n\n const span = shouldCreateSpanResult\n ? core.startInactiveSpan({\n name: `${method} ${url}`,\n onlyIfParent: true,\n attributes: {\n url,\n type: 'fetch',\n 'http.method': method,\n [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,\n },\n op: 'http.client',\n })\n : undefined;\n\n if (span) {\n handlerData.fetchData.__span = span.spanContext().spanId;\n spans[span.spanContext().spanId] = span;\n }\n\n if (shouldAttachHeaders(handlerData.fetchData.url) && client) {\n const request = handlerData.args[0];\n\n // In case the user hasn't set the second argument of a fetch call we default it to `{}`.\n handlerData.args[1] = handlerData.args[1] || {};\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const options = handlerData.args[1];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n options.headers = addTracingHeadersToFetchRequest(request, client, scope, options, span);\n }\n\n return span;\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers\n */\nfunction addTracingHeadersToFetchRequest(\n request, // unknown is actually type Request but we can't export DOM types from this package,\n client,\n scope,\n options\n\n,\n requestSpan,\n) {\n // eslint-disable-next-line deprecation/deprecation\n const span = requestSpan || scope.getSpan();\n\n const isolationScope = core.getIsolationScope();\n\n const { traceId, spanId, sampled, dsc } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n const sentryTraceHeader = span ? core.spanToTraceHeader(span) : utils.generateSentryTraceHeader(traceId, spanId, sampled);\n\n const sentryBaggageHeader = utils.dynamicSamplingContextToSentryBaggageHeader(\n dsc ||\n (span ? core.getDynamicSamplingContextFromSpan(span) : core.getDynamicSamplingContextFromClient(traceId, client, scope)),\n );\n\n const headers =\n options.headers ||\n (typeof Request !== 'undefined' && utils.isInstanceOf(request, Request) ? (request ).headers : undefined);\n\n if (!headers) {\n return { 'sentry-trace': sentryTraceHeader, baggage: sentryBaggageHeader };\n } else if (typeof Headers !== 'undefined' && utils.isInstanceOf(headers, Headers)) {\n const newHeaders = new Headers(headers );\n\n newHeaders.append('sentry-trace', sentryTraceHeader);\n\n if (sentryBaggageHeader) {\n // If the same header is appended multiple times the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.append(utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n\n return newHeaders ;\n } else if (Array.isArray(headers)) {\n const newHeaders = [...headers, ['sentry-trace', sentryTraceHeader]];\n\n if (sentryBaggageHeader) {\n // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.push([utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader]);\n }\n\n return newHeaders ;\n } else {\n const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined;\n const newBaggageHeaders = [];\n\n if (Array.isArray(existingBaggageHeader)) {\n newBaggageHeaders.push(...existingBaggageHeader);\n } else if (existingBaggageHeader) {\n newBaggageHeaders.push(existingBaggageHeader);\n }\n\n if (sentryBaggageHeader) {\n newBaggageHeaders.push(sentryBaggageHeader);\n }\n\n return {\n ...(headers ),\n 'sentry-trace': sentryTraceHeader,\n baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined,\n };\n }\n}\n\nexports.addTracingHeadersToFetchRequest = addTracingHeadersToFetchRequest;\nexports.instrumentFetchRequest = instrumentFetchRequest;\n//# sourceMappingURL=fetch.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\n\n/**\n * @private\n */\nfunction _autoloadDatabaseIntegrations() {\n const carrier = core.getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n\n const packageToIntegrationMapping = {\n mongodb() {\n const integration = utils.dynamicRequire(module, './node/integrations/mongo')\n\n;\n return new integration.Mongo();\n },\n mongoose() {\n const integration = utils.dynamicRequire(module, './node/integrations/mongo')\n\n;\n return new integration.Mongo();\n },\n mysql() {\n const integration = utils.dynamicRequire(module, './node/integrations/mysql')\n\n;\n return new integration.Mysql();\n },\n pg() {\n const integration = utils.dynamicRequire(module, './node/integrations/postgres')\n\n;\n return new integration.Postgres();\n },\n };\n\n const mappedPackages = Object.keys(packageToIntegrationMapping)\n .filter(moduleName => !!utils.loadModule(moduleName))\n .map(pkg => {\n try {\n return packageToIntegrationMapping[pkg]();\n } catch (e) {\n return undefined;\n }\n })\n .filter(p => p) ;\n\n if (mappedPackages.length > 0) {\n carrier.__SENTRY__.integrations = [...(carrier.__SENTRY__.integrations || []), ...mappedPackages];\n }\n}\n\n/**\n * This patches the global object and injects the Tracing extensions methods\n */\nfunction addExtensionMethods() {\n core.addTracingExtensions();\n\n // Detect and automatically load specified integrations.\n if (utils.isNodeEnv()) {\n _autoloadDatabaseIntegrations();\n }\n}\n\nexports.addExtensionMethods = addExtensionMethods;\n//# sourceMappingURL=extensions.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst express = require('./node/integrations/express.js');\nconst postgres = require('./node/integrations/postgres.js');\nconst mysql = require('./node/integrations/mysql.js');\nconst mongo = require('./node/integrations/mongo.js');\nconst prisma = require('./node/integrations/prisma.js');\nconst graphql = require('./node/integrations/graphql.js');\nconst apollo = require('./node/integrations/apollo.js');\nconst lazy = require('./node/integrations/lazy.js');\nconst browsertracing = require('./browser/browsertracing.js');\nconst browserTracingIntegration = require('./browser/browserTracingIntegration.js');\nconst request = require('./browser/request.js');\nconst instrument = require('./browser/instrument.js');\nconst fetch = require('./common/fetch.js');\nconst extensions = require('./extensions.js');\n\n\n\nexports.IdleTransaction = core.IdleTransaction;\nexports.Span = core.Span;\nexports.SpanStatus = core.SpanStatus;\nexports.Transaction = core.Transaction;\nexports.extractTraceparentData = core.extractTraceparentData;\nexports.getActiveTransaction = core.getActiveTransaction;\nexports.hasTracingEnabled = core.hasTracingEnabled;\nexports.spanStatusfromHttpCode = core.spanStatusfromHttpCode;\nexports.startIdleTransaction = core.startIdleTransaction;\nexports.TRACEPARENT_REGEXP = utils.TRACEPARENT_REGEXP;\nexports.stripUrlQueryAndFragment = utils.stripUrlQueryAndFragment;\nexports.Express = express.Express;\nexports.Postgres = postgres.Postgres;\nexports.Mysql = mysql.Mysql;\nexports.Mongo = mongo.Mongo;\nexports.Prisma = prisma.Prisma;\nexports.GraphQL = graphql.GraphQL;\nexports.Apollo = apollo.Apollo;\nexports.lazyLoadedNodePerformanceMonitoringIntegrations = lazy.lazyLoadedNodePerformanceMonitoringIntegrations;\nexports.BROWSER_TRACING_INTEGRATION_ID = browsertracing.BROWSER_TRACING_INTEGRATION_ID;\nexports.BrowserTracing = browsertracing.BrowserTracing;\nexports.browserTracingIntegration = browserTracingIntegration.browserTracingIntegration;\nexports.startBrowserTracingNavigationSpan = browserTracingIntegration.startBrowserTracingNavigationSpan;\nexports.startBrowserTracingPageLoadSpan = browserTracingIntegration.startBrowserTracingPageLoadSpan;\nexports.defaultRequestInstrumentationOptions = request.defaultRequestInstrumentationOptions;\nexports.instrumentOutgoingRequests = request.instrumentOutgoingRequests;\nexports.addClsInstrumentationHandler = instrument.addClsInstrumentationHandler;\nexports.addFidInstrumentationHandler = instrument.addFidInstrumentationHandler;\nexports.addLcpInstrumentationHandler = instrument.addLcpInstrumentationHandler;\nexports.addPerformanceInstrumentationHandler = instrument.addPerformanceInstrumentationHandler;\nexports.addTracingHeadersToFetchRequest = fetch.addTracingHeadersToFetchRequest;\nexports.instrumentFetchRequest = fetch.instrumentFetchRequest;\nexports.addExtensionMethods = extensions.addExtensionMethods;\n//# sourceMappingURL=index.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../../common/debug-build.js');\nconst nodeUtils = require('./utils/node-utils.js');\n\n/** Tracing integration for Apollo */\nclass Apollo {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Apollo';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(\n options = {\n useNestjs: false,\n },\n ) {\n this.name = Apollo.id;\n this._useNest = !!options.useNestjs;\n }\n\n /** @inheritdoc */\n loadDependency() {\n if (this._useNest) {\n this._module = this._module || utils.loadModule('@nestjs/graphql');\n } else {\n this._module = this._module || utils.loadModule('apollo-server-core');\n }\n\n return this._module;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {\n debugBuild.DEBUG_BUILD && utils.logger.log('Apollo Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n if (this._useNest) {\n const pkg = this.loadDependency();\n\n if (!pkg) {\n debugBuild.DEBUG_BUILD && utils.logger.error('Apollo-NestJS Integration was unable to require @nestjs/graphql package.');\n return;\n }\n\n /**\n * Iterate over resolvers of NestJS ResolversExplorerService before schemas are constructed.\n */\n utils.fill(\n pkg.GraphQLFactory.prototype,\n 'mergeWithSchema',\n function (orig) {\n return function (\n\n ...args\n ) {\n utils.fill(this.resolversExplorerService, 'explore', function (orig) {\n return function () {\n const resolvers = utils.arrayify(orig.call(this));\n\n const instrumentedResolvers = instrumentResolvers(resolvers, getCurrentHub);\n\n return instrumentedResolvers;\n };\n });\n\n return orig.call(this, ...args);\n };\n },\n );\n } else {\n const pkg = this.loadDependency();\n\n if (!pkg) {\n debugBuild.DEBUG_BUILD && utils.logger.error('Apollo Integration was unable to require apollo-server-core package.');\n return;\n }\n\n /**\n * Iterate over resolvers of the ApolloServer instance before schemas are constructed.\n */\n utils.fill(pkg.ApolloServerBase.prototype, 'constructSchema', function (orig) {\n return function (\n\n) {\n if (!this.config.resolvers) {\n if (debugBuild.DEBUG_BUILD) {\n if (this.config.schema) {\n utils.logger.warn(\n 'Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.' +\n 'If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead.',\n );\n utils.logger.warn();\n } else if (this.config.modules) {\n utils.logger.warn(\n 'Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property.',\n );\n }\n\n utils.logger.error('Skipping tracing as no resolvers found on the `ApolloServer` instance.');\n }\n\n return orig.call(this);\n }\n\n const resolvers = utils.arrayify(this.config.resolvers);\n\n this.config.resolvers = instrumentResolvers(resolvers, getCurrentHub);\n\n return orig.call(this);\n };\n });\n }\n }\n}Apollo.__initStatic();\n\nfunction instrumentResolvers(resolvers, getCurrentHub) {\n return resolvers.map(model => {\n Object.keys(model).forEach(resolverGroupName => {\n Object.keys(model[resolverGroupName]).forEach(resolverName => {\n if (typeof model[resolverGroupName][resolverName] !== 'function') {\n return;\n }\n\n wrapResolver(model, resolverGroupName, resolverName, getCurrentHub);\n });\n });\n\n return model;\n });\n}\n\n/**\n * Wrap a single resolver which can be a parent of other resolvers and/or db operations.\n */\nfunction wrapResolver(\n model,\n resolverGroupName,\n resolverName,\n getCurrentHub,\n) {\n utils.fill(model[resolverGroupName], resolverName, function (orig) {\n return function ( ...args) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = getCurrentHub().getScope();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({\n description: `${resolverGroupName}.${resolverName}`,\n op: 'graphql.resolve',\n origin: 'auto.graphql.apollo',\n })]);\n\n const rv = orig.call(this, ...args);\n\n if (utils.isThenable(rv)) {\n return rv.then((res) => {\n _optionalChain([span, 'optionalAccess', _4 => _4.end, 'call', _5 => _5()]);\n return res;\n });\n }\n\n _optionalChain([span, 'optionalAccess', _6 => _6.end, 'call', _7 => _7()]);\n\n return rv;\n };\n });\n}\n\nexports.Apollo = Apollo;\n//# sourceMappingURL=apollo.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../../common/debug-build.js');\nconst nodeUtils = require('./utils/node-utils.js');\n\n/* eslint-disable max-lines */\n\n/**\n * Express integration\n *\n * Provides an request and error handler for Express framework as well as tracing capabilities\n */\nclass Express {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Express';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * Express App instance\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this.name = Express.id;\n this._router = options.router || options.app;\n this._methods = (Array.isArray(options.methods) ? options.methods : []).concat('use');\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (!this._router) {\n debugBuild.DEBUG_BUILD && utils.logger.error('ExpressIntegration is missing an Express instance');\n return;\n }\n\n if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {\n debugBuild.DEBUG_BUILD && utils.logger.log('Express Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n instrumentMiddlewares(this._router, this._methods);\n instrumentRouter(this._router );\n }\n}Express.__initStatic();\n\n/**\n * Wraps original middleware function in a tracing call, which stores the info about the call as a span,\n * and finishes it once the middleware is done invoking.\n *\n * Express middlewares have 3 various forms, thus we have to take care of all of them:\n * // sync\n * app.use(function (req, res) { ... })\n * // async\n * app.use(function (req, res, next) { ... })\n * // error handler\n * app.use(function (err, req, res, next) { ... })\n *\n * They all internally delegate to the `router[method]` of the given application instance.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any\nfunction wrap(fn, method) {\n const arity = fn.length;\n\n switch (arity) {\n case 2: {\n return function ( req, res) {\n const transaction = res.__sentry_transaction;\n if (transaction) {\n // eslint-disable-next-line deprecation/deprecation\n const span = transaction.startChild({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: 'auto.middleware.express',\n });\n res.once('finish', () => {\n span.end();\n });\n }\n return fn.call(this, req, res);\n };\n }\n case 3: {\n return function (\n\n req,\n res,\n next,\n ) {\n const transaction = res.__sentry_transaction;\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([transaction, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: 'auto.middleware.express',\n })]);\n fn.call(this, req, res, function ( ...args) {\n _optionalChain([span, 'optionalAccess', _4 => _4.end, 'call', _5 => _5()]);\n next.call(this, ...args);\n });\n };\n }\n case 4: {\n return function (\n\n err,\n req,\n res,\n next,\n ) {\n const transaction = res.__sentry_transaction;\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([transaction, 'optionalAccess', _6 => _6.startChild, 'call', _7 => _7({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: 'auto.middleware.express',\n })]);\n fn.call(this, err, req, res, function ( ...args) {\n _optionalChain([span, 'optionalAccess', _8 => _8.end, 'call', _9 => _9()]);\n next.call(this, ...args);\n });\n };\n }\n default: {\n throw new Error(`Express middleware takes 2-4 arguments. Got: ${arity}`);\n }\n }\n}\n\n/**\n * Takes all the function arguments passed to the original `app` or `router` method, eg. `app.use` or `router.use`\n * and wraps every function, as well as array of functions with a call to our `wrap` method.\n * We have to take care of the arrays as well as iterate over all of the arguments,\n * as `app.use` can accept middlewares in few various forms.\n *\n * app.use([], )\n * app.use([], , ...)\n * app.use([], ...[])\n */\nfunction wrapMiddlewareArgs(args, method) {\n return args.map((arg) => {\n if (typeof arg === 'function') {\n return wrap(arg, method);\n }\n\n if (Array.isArray(arg)) {\n return arg.map((a) => {\n if (typeof a === 'function') {\n return wrap(a, method);\n }\n return a;\n });\n }\n\n return arg;\n });\n}\n\n/**\n * Patches original router to utilize our tracing functionality\n */\nfunction patchMiddleware(router, method) {\n const originalCallback = router[method];\n\n router[method] = function (...args) {\n return originalCallback.call(this, ...wrapMiddlewareArgs(args, method));\n };\n\n return router;\n}\n\n/**\n * Patches original router methods\n */\nfunction instrumentMiddlewares(router, methods = []) {\n methods.forEach((method) => patchMiddleware(router, method));\n}\n\n/**\n * Patches the prototype of Express.Router to accumulate the resolved route\n * if a layer instance's `match` function was called and it returned a successful match.\n *\n * @see https://github.com/expressjs/express/blob/master/lib/router/index.js\n *\n * @param appOrRouter the router instance which can either be an app (i.e. top-level) or a (nested) router.\n */\nfunction instrumentRouter(appOrRouter) {\n // This is how we can distinguish between app and routers\n const isApp = 'settings' in appOrRouter;\n\n // In case the app's top-level router hasn't been initialized yet, we have to do it now\n if (isApp && appOrRouter._router === undefined && appOrRouter.lazyrouter) {\n appOrRouter.lazyrouter();\n }\n\n const router = isApp ? appOrRouter._router : appOrRouter;\n\n if (!router) {\n /*\n If we end up here, this means likely that this integration is used with Express 3 or Express 5.\n For now, we don't support these versions (3 is very old and 5 is still in beta). To support Express 5,\n we'd need to make more changes to the routing instrumentation because the router is no longer part of\n the Express core package but maintained in its own package. The new router has different function\n signatures and works slightly differently, demanding more changes than just taking the router from\n `app.router` instead of `app._router`.\n @see https://github.com/pillarjs/router\n\n TODO: Proper Express 5 support\n */\n debugBuild.DEBUG_BUILD && utils.logger.debug('Cannot instrument router for URL Parameterization (did not find a valid router).');\n debugBuild.DEBUG_BUILD && utils.logger.debug('Routing instrumentation is currently only supported in Express 4.');\n return;\n }\n\n const routerProto = Object.getPrototypeOf(router) ;\n\n const originalProcessParams = routerProto.process_params;\n routerProto.process_params = function process_params(\n layer,\n called,\n req,\n res,\n done,\n ) {\n // Base case: We're in the first part of the URL (thus we start with the root '/')\n if (!req._reconstructedRoute) {\n req._reconstructedRoute = '';\n }\n\n // If the layer's partial route has params, is a regex or an array, the route is stored in layer.route.\n const { layerRoutePath, isRegex, isArray, numExtraSegments } = getLayerRoutePathInfo(layer);\n\n if (layerRoutePath || isRegex || isArray) {\n req._hasParameters = true;\n }\n\n // Otherwise, the hardcoded path (i.e. a partial route without params) is stored in layer.path\n let partialRoute;\n\n if (layerRoutePath) {\n partialRoute = layerRoutePath;\n } else {\n /**\n * prevent duplicate segment in _reconstructedRoute param if router match multiple routes before final path\n * example:\n * original url: /api/v1/1234\n * prevent: /api/api/v1/:userId\n * router structure\n * /api -> middleware\n * /api/v1 -> middleware\n * /1234 -> endpoint with param :userId\n * final _reconstructedRoute is /api/v1/:userId\n */\n partialRoute = preventDuplicateSegments(req.originalUrl, req._reconstructedRoute, layer.path) || '';\n }\n\n // Normalize the partial route so that it doesn't contain leading or trailing slashes\n // and exclude empty or '*' wildcard routes.\n // The exclusion of '*' routes is our best effort to not \"pollute\" the transaction name\n // with interim handlers (e.g. ones that check authentication or do other middleware stuff).\n // We want to end up with the parameterized URL of the incoming request without any extraneous path segments.\n const finalPartialRoute = partialRoute\n .split('/')\n .filter(segment => segment.length > 0 && (isRegex || isArray || !segment.includes('*')))\n .join('/');\n\n // If we found a valid partial URL, we append it to the reconstructed route\n if (finalPartialRoute && finalPartialRoute.length > 0) {\n // If the partial route is from a regex route, we append a '/' to close the regex\n req._reconstructedRoute += `/${finalPartialRoute}${isRegex ? '/' : ''}`;\n }\n\n // Now we check if we are in the \"last\" part of the route. We determine this by comparing the\n // number of URL segments from the original URL to that of our reconstructed parameterized URL.\n // If we've reached our final destination, we update the transaction name.\n const urlLength = utils.getNumberOfUrlSegments(utils.stripUrlQueryAndFragment(req.originalUrl || '')) + numExtraSegments;\n const routeLength = utils.getNumberOfUrlSegments(req._reconstructedRoute);\n\n if (urlLength === routeLength) {\n if (!req._hasParameters) {\n if (req._reconstructedRoute !== req.originalUrl) {\n req._reconstructedRoute = req.originalUrl ? utils.stripUrlQueryAndFragment(req.originalUrl) : req.originalUrl;\n }\n }\n\n const transaction = res.__sentry_transaction;\n const attributes = (transaction && core.spanToJSON(transaction).data) || {};\n if (transaction && attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] !== 'custom') {\n // If the request URL is '/' or empty, the reconstructed route will be empty.\n // Therefore, we fall back to setting the final route to '/' in this case.\n const finalRoute = req._reconstructedRoute || '/';\n\n const [name, source] = utils.extractPathForTransaction(req, { path: true, method: true, customRoute: finalRoute });\n transaction.updateName(name);\n transaction.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);\n }\n }\n\n return originalProcessParams.call(this, layer, called, req, res, done);\n };\n}\n\n/**\n * Recreate layer.route.path from layer.regexp and layer.keys.\n * Works until express.js used package path-to-regexp@0.1.7\n * or until layer.keys contain offset attribute\n *\n * @param layer the layer to extract the stringified route from\n *\n * @returns string in layer.route.path structure 'router/:pathParam' or undefined\n */\nconst extractOriginalRoute = (\n path,\n regexp,\n keys,\n) => {\n if (!path || !regexp || !keys || Object.keys(keys).length === 0 || !_optionalChain([keys, 'access', _10 => _10[0], 'optionalAccess', _11 => _11.offset])) {\n return undefined;\n }\n\n const orderedKeys = keys.sort((a, b) => a.offset - b.offset);\n\n // add d flag for getting indices from regexp result\n // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- regexp comes from express.js\n const pathRegex = new RegExp(regexp, `${regexp.flags}d`);\n /**\n * use custom type cause of TS error with missing indices in RegExpExecArray\n */\n const execResult = pathRegex.exec(path) ;\n\n if (!execResult || !execResult.indices) {\n return undefined;\n }\n /**\n * remove first match from regex cause contain whole layer.path\n */\n const [, ...paramIndices] = execResult.indices;\n\n if (paramIndices.length !== orderedKeys.length) {\n return undefined;\n }\n let resultPath = path;\n let indexShift = 0;\n\n /**\n * iterate param matches from regexp.exec\n */\n paramIndices.forEach((item, index) => {\n /** check if offsets is define because in some cases regex d flag returns undefined */\n if (item) {\n const [startOffset, endOffset] = item;\n /**\n * isolate part before param\n */\n const substr1 = resultPath.substring(0, startOffset - indexShift);\n /**\n * define paramName as replacement in format :pathParam\n */\n const replacement = `:${orderedKeys[index].name}`;\n\n /**\n * isolate part after param\n */\n const substr2 = resultPath.substring(endOffset - indexShift);\n\n /**\n * recreate original path but with param replacement\n */\n resultPath = substr1 + replacement + substr2;\n\n /**\n * calculate new index shift after resultPath was modified\n */\n indexShift = indexShift + (endOffset - startOffset - replacement.length);\n }\n });\n\n return resultPath;\n};\n\n/**\n * Extracts and stringifies the layer's route which can either be a string with parameters (`users/:id`),\n * a RegEx (`/test/`) or an array of strings and regexes (`['/path1', /\\/path[2-5]/, /path/:id]`). Additionally\n * returns extra information about the route, such as if the route is defined as regex or as an array.\n *\n * @param layer the layer to extract the stringified route from\n *\n * @returns an object containing the stringified route, a flag determining if the route was a regex\n * and the number of extra segments to the matched path that are additionally in the route,\n * if the route was an array (defaults to 0).\n */\nfunction getLayerRoutePathInfo(layer) {\n let lrp = _optionalChain([layer, 'access', _12 => _12.route, 'optionalAccess', _13 => _13.path]);\n\n const isRegex = utils.isRegExp(lrp);\n const isArray = Array.isArray(lrp);\n\n if (!lrp) {\n // parse node.js major version\n // Next.js will complain if we directly use `proces.versions` here because of edge runtime.\n const [major] = (utils.GLOBAL_OBJ ).process.versions.node.split('.').map(Number);\n\n // allow call extractOriginalRoute only if node version support Regex d flag, node 16+\n if (major >= 16) {\n /**\n * If lrp does not exist try to recreate original layer path from route regexp\n */\n lrp = extractOriginalRoute(layer.path, layer.regexp, layer.keys);\n }\n }\n\n if (!lrp) {\n return { isRegex, isArray, numExtraSegments: 0 };\n }\n\n const numExtraSegments = isArray\n ? Math.max(getNumberOfArrayUrlSegments(lrp ) - utils.getNumberOfUrlSegments(layer.path || ''), 0)\n : 0;\n\n const layerRoutePath = getLayerRoutePathString(isArray, lrp);\n\n return { layerRoutePath, isRegex, isArray, numExtraSegments };\n}\n\n/**\n * Returns the number of URL segments in an array of routes\n *\n * Example: ['/api/test', /\\/api\\/post[0-9]/, '/users/:id/details`] -> 7\n */\nfunction getNumberOfArrayUrlSegments(routesArray) {\n return routesArray.reduce((accNumSegments, currentRoute) => {\n // array members can be a RegEx -> convert them toString\n return accNumSegments + utils.getNumberOfUrlSegments(currentRoute.toString());\n }, 0);\n}\n\n/**\n * Extracts and returns the stringified version of the layers route path\n * Handles route arrays (by joining the paths together) as well as RegExp and normal\n * string values (in the latter case the toString conversion is technically unnecessary but\n * it doesn't hurt us either).\n */\nfunction getLayerRoutePathString(isArray, lrp) {\n if (isArray) {\n return (lrp ).map(r => r.toString()).join(',');\n }\n return lrp && lrp.toString();\n}\n\n/**\n * remove duplicate segment contain in layerPath against reconstructedRoute,\n * and return only unique segment that can be added into reconstructedRoute\n */\nfunction preventDuplicateSegments(\n originalUrl,\n reconstructedRoute,\n layerPath,\n) {\n // filter query params\n const normalizeURL = utils.stripUrlQueryAndFragment(originalUrl || '');\n const originalUrlSplit = _optionalChain([normalizeURL, 'optionalAccess', _14 => _14.split, 'call', _15 => _15('/'), 'access', _16 => _16.filter, 'call', _17 => _17(v => !!v)]);\n let tempCounter = 0;\n const currentOffset = _optionalChain([reconstructedRoute, 'optionalAccess', _18 => _18.split, 'call', _19 => _19('/'), 'access', _20 => _20.filter, 'call', _21 => _21(v => !!v), 'access', _22 => _22.length]) || 0;\n const result = _optionalChain([layerPath\n, 'optionalAccess', _23 => _23.split, 'call', _24 => _24('/')\n, 'access', _25 => _25.filter, 'call', _26 => _26(segment => {\n if (_optionalChain([originalUrlSplit, 'optionalAccess', _27 => _27[currentOffset + tempCounter]]) === segment) {\n tempCounter += 1;\n return true;\n }\n return false;\n })\n, 'access', _28 => _28.join, 'call', _29 => _29('/')]);\n return result;\n}\n\nexports.Express = Express;\nexports.extractOriginalRoute = extractOriginalRoute;\nexports.preventDuplicateSegments = preventDuplicateSegments;\n//# sourceMappingURL=express.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../../common/debug-build.js');\nconst nodeUtils = require('./utils/node-utils.js');\n\n/** Tracing integration for graphql package */\nclass GraphQL {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'GraphQL';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = GraphQL.id;\n }\n\n /** @inheritdoc */\n loadDependency() {\n return (this._module = this._module || utils.loadModule('graphql/execution/execute.js'));\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {\n debugBuild.DEBUG_BUILD && utils.logger.log('GraphQL Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n debugBuild.DEBUG_BUILD && utils.logger.error('GraphQL Integration was unable to require graphql/execution package.');\n return;\n }\n\n utils.fill(pkg, 'execute', function (orig) {\n return function ( ...args) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = getCurrentHub().getScope();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({\n description: 'execute',\n op: 'graphql.execute',\n origin: 'auto.graphql.graphql',\n })]);\n\n // eslint-disable-next-line deprecation/deprecation\n _optionalChain([scope, 'optionalAccess', _4 => _4.setSpan, 'call', _5 => _5(span)]);\n\n const rv = orig.call(this, ...args);\n\n if (utils.isThenable(rv)) {\n return rv.then((res) => {\n _optionalChain([span, 'optionalAccess', _6 => _6.end, 'call', _7 => _7()]);\n // eslint-disable-next-line deprecation/deprecation\n _optionalChain([scope, 'optionalAccess', _8 => _8.setSpan, 'call', _9 => _9(parentSpan)]);\n\n return res;\n });\n }\n\n _optionalChain([span, 'optionalAccess', _10 => _10.end, 'call', _11 => _11()]);\n // eslint-disable-next-line deprecation/deprecation\n _optionalChain([scope, 'optionalAccess', _12 => _12.setSpan, 'call', _13 => _13(parentSpan)]);\n return rv;\n };\n });\n }\n}GraphQL.__initStatic();\n\nexports.GraphQL = GraphQL;\n//# sourceMappingURL=graphql.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\nconst lazyLoadedNodePerformanceMonitoringIntegrations = [\n () => {\n const integration = utils.dynamicRequire(module, './apollo')\n\n;\n return new integration.Apollo();\n },\n () => {\n const integration = utils.dynamicRequire(module, './apollo')\n\n;\n return new integration.Apollo({ useNestjs: true });\n },\n () => {\n const integration = utils.dynamicRequire(module, './graphql')\n\n;\n return new integration.GraphQL();\n },\n () => {\n const integration = utils.dynamicRequire(module, './mongo')\n\n;\n return new integration.Mongo();\n },\n () => {\n const integration = utils.dynamicRequire(module, './mongo')\n\n;\n return new integration.Mongo({ mongoose: true });\n },\n () => {\n const integration = utils.dynamicRequire(module, './mysql')\n\n;\n return new integration.Mysql();\n },\n () => {\n const integration = utils.dynamicRequire(module, './postgres')\n\n;\n return new integration.Postgres();\n },\n];\n\nexports.lazyLoadedNodePerformanceMonitoringIntegrations = lazyLoadedNodePerformanceMonitoringIntegrations;\n//# sourceMappingURL=lazy.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../../common/debug-build.js');\nconst nodeUtils = require('./utils/node-utils.js');\n\n// This allows us to use the same array for both defaults options and the type itself.\n// (note `as const` at the end to make it a union of string literal types (i.e. \"a\" | \"b\" | ... )\n// and not just a string[])\n\nconst OPERATIONS = [\n 'aggregate', // aggregate(pipeline, options, callback)\n 'bulkWrite', // bulkWrite(operations, options, callback)\n 'countDocuments', // countDocuments(query, options, callback)\n 'createIndex', // createIndex(fieldOrSpec, options, callback)\n 'createIndexes', // createIndexes(indexSpecs, options, callback)\n 'deleteMany', // deleteMany(filter, options, callback)\n 'deleteOne', // deleteOne(filter, options, callback)\n 'distinct', // distinct(key, query, options, callback)\n 'drop', // drop(options, callback)\n 'dropIndex', // dropIndex(indexName, options, callback)\n 'dropIndexes', // dropIndexes(options, callback)\n 'estimatedDocumentCount', // estimatedDocumentCount(options, callback)\n 'find', // find(query, options, callback)\n 'findOne', // findOne(query, options, callback)\n 'findOneAndDelete', // findOneAndDelete(filter, options, callback)\n 'findOneAndReplace', // findOneAndReplace(filter, replacement, options, callback)\n 'findOneAndUpdate', // findOneAndUpdate(filter, update, options, callback)\n 'indexes', // indexes(options, callback)\n 'indexExists', // indexExists(indexes, options, callback)\n 'indexInformation', // indexInformation(options, callback)\n 'initializeOrderedBulkOp', // initializeOrderedBulkOp(options, callback)\n 'insertMany', // insertMany(docs, options, callback)\n 'insertOne', // insertOne(doc, options, callback)\n 'isCapped', // isCapped(options, callback)\n 'mapReduce', // mapReduce(map, reduce, options, callback)\n 'options', // options(options, callback)\n 'parallelCollectionScan', // parallelCollectionScan(options, callback)\n 'rename', // rename(newName, options, callback)\n 'replaceOne', // replaceOne(filter, doc, options, callback)\n 'stats', // stats(options, callback)\n 'updateMany', // updateMany(filter, update, options, callback)\n 'updateOne', // updateOne(filter, update, options, callback)\n] ;\n\n// All of the operations above take `options` and `callback` as their final parameters, but some of them\n// take additional parameters as well. For those operations, this is a map of\n// { : [] }, as a way to know what to call the operation's\n// positional arguments when we add them to the span's `data` object later\nconst OPERATION_SIGNATURES\n\n = {\n // aggregate intentionally not included because `pipeline` arguments are too complex to serialize well\n // see https://github.com/getsentry/sentry-javascript/pull/3102\n bulkWrite: ['operations'],\n countDocuments: ['query'],\n createIndex: ['fieldOrSpec'],\n createIndexes: ['indexSpecs'],\n deleteMany: ['filter'],\n deleteOne: ['filter'],\n distinct: ['key', 'query'],\n dropIndex: ['indexName'],\n find: ['query'],\n findOne: ['query'],\n findOneAndDelete: ['filter'],\n findOneAndReplace: ['filter', 'replacement'],\n findOneAndUpdate: ['filter', 'update'],\n indexExists: ['indexes'],\n insertMany: ['docs'],\n insertOne: ['doc'],\n mapReduce: ['map', 'reduce'],\n rename: ['newName'],\n replaceOne: ['filter', 'doc'],\n updateMany: ['filter', 'update'],\n updateOne: ['filter', 'update'],\n};\n\nfunction isCursor(maybeCursor) {\n return maybeCursor && typeof maybeCursor === 'object' && maybeCursor.once && typeof maybeCursor.once === 'function';\n}\n\n/** Tracing integration for mongo package */\nclass Mongo {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Mongo';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this.name = Mongo.id;\n this._operations = Array.isArray(options.operations) ? options.operations : (OPERATIONS );\n this._describeOperations = 'describeOperations' in options ? options.describeOperations : true;\n this._useMongoose = !!options.useMongoose;\n }\n\n /** @inheritdoc */\n loadDependency() {\n const moduleName = this._useMongoose ? 'mongoose' : 'mongodb';\n return (this._module = this._module || utils.loadModule(moduleName));\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {\n debugBuild.DEBUG_BUILD && utils.logger.log('Mongo Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n const moduleName = this._useMongoose ? 'mongoose' : 'mongodb';\n debugBuild.DEBUG_BUILD && utils.logger.error(`Mongo Integration was unable to require \\`${moduleName}\\` package.`);\n return;\n }\n\n this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub);\n }\n\n /**\n * Patches original collection methods\n */\n _instrumentOperations(collection, operations, getCurrentHub) {\n operations.forEach((operation) => this._patchOperation(collection, operation, getCurrentHub));\n }\n\n /**\n * Patches original collection to utilize our tracing functionality\n */\n _patchOperation(collection, operation, getCurrentHub) {\n if (!(operation in collection.prototype)) return;\n\n const getSpanContext = this._getSpanContextFromOperationArguments.bind(this);\n\n utils.fill(collection.prototype, operation, function (orig) {\n return function ( ...args) {\n const lastArg = args[args.length - 1];\n // eslint-disable-next-line deprecation/deprecation\n const hub = getCurrentHub();\n // eslint-disable-next-line deprecation/deprecation\n const scope = hub.getScope();\n // eslint-disable-next-line deprecation/deprecation\n const client = hub.getClient();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n const sendDefaultPii = _optionalChain([client, 'optionalAccess', _2 => _2.getOptions, 'call', _3 => _3(), 'access', _4 => _4.sendDefaultPii]);\n\n // Check if the operation was passed a callback. (mapReduce requires a different check, as\n // its (non-callback) arguments can also be functions.)\n if (typeof lastArg !== 'function' || (operation === 'mapReduce' && args.length === 2)) {\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([parentSpan, 'optionalAccess', _5 => _5.startChild, 'call', _6 => _6(getSpanContext(this, operation, args, sendDefaultPii))]);\n const maybePromiseOrCursor = orig.call(this, ...args);\n\n if (utils.isThenable(maybePromiseOrCursor)) {\n return maybePromiseOrCursor.then((res) => {\n _optionalChain([span, 'optionalAccess', _7 => _7.end, 'call', _8 => _8()]);\n return res;\n });\n }\n // If the operation returns a Cursor\n // we need to attach a listener to it to finish the span when the cursor is closed.\n else if (isCursor(maybePromiseOrCursor)) {\n const cursor = maybePromiseOrCursor ;\n\n try {\n cursor.once('close', () => {\n _optionalChain([span, 'optionalAccess', _9 => _9.end, 'call', _10 => _10()]);\n });\n } catch (e) {\n // If the cursor is already closed, `once` will throw an error. In that case, we can\n // finish the span immediately.\n _optionalChain([span, 'optionalAccess', _11 => _11.end, 'call', _12 => _12()]);\n }\n\n return cursor;\n } else {\n _optionalChain([span, 'optionalAccess', _13 => _13.end, 'call', _14 => _14()]);\n return maybePromiseOrCursor;\n }\n }\n\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([parentSpan, 'optionalAccess', _15 => _15.startChild, 'call', _16 => _16(getSpanContext(this, operation, args.slice(0, -1)))]);\n\n return orig.call(this, ...args.slice(0, -1), function (err, result) {\n _optionalChain([span, 'optionalAccess', _17 => _17.end, 'call', _18 => _18()]);\n lastArg(err, result);\n });\n };\n });\n }\n\n /**\n * Form a SpanContext based on the user input to a given operation.\n */\n _getSpanContextFromOperationArguments(\n collection,\n operation,\n args,\n sendDefaultPii = false,\n ) {\n const data = {\n 'db.system': 'mongodb',\n 'db.name': collection.dbName,\n 'db.operation': operation,\n 'db.mongodb.collection': collection.collectionName,\n };\n const spanContext = {\n op: 'db',\n // TODO v8: Use `${collection.collectionName}.${operation}`\n origin: 'auto.db.mongo',\n description: operation,\n data,\n };\n\n // If the operation takes no arguments besides `options` and `callback`, or if argument\n // collection is disabled for this operation, just return early.\n const signature = OPERATION_SIGNATURES[operation];\n const shouldDescribe = Array.isArray(this._describeOperations)\n ? this._describeOperations.includes(operation)\n : this._describeOperations;\n\n if (!signature || !shouldDescribe || !sendDefaultPii) {\n return spanContext;\n }\n\n try {\n // Special case for `mapReduce`, as the only one accepting functions as arguments.\n if (operation === 'mapReduce') {\n const [map, reduce] = args ;\n data[signature[0]] = typeof map === 'string' ? map : map.name || '';\n data[signature[1]] = typeof reduce === 'string' ? reduce : reduce.name || '';\n } else {\n for (let i = 0; i < signature.length; i++) {\n data[`db.mongodb.${signature[i]}`] = JSON.stringify(args[i]);\n }\n }\n } catch (_oO) {\n // no-empty\n }\n\n return spanContext;\n }\n}Mongo.__initStatic();\n\nexports.Mongo = Mongo;\n//# sourceMappingURL=mongo.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../../common/debug-build.js');\nconst nodeUtils = require('./utils/node-utils.js');\n\n/** Tracing integration for node-mysql package */\nclass Mysql {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Mysql';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = Mysql.id;\n }\n\n /** @inheritdoc */\n loadDependency() {\n return (this._module = this._module || utils.loadModule('mysql/lib/Connection.js'));\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {\n debugBuild.DEBUG_BUILD && utils.logger.log('Mysql Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n debugBuild.DEBUG_BUILD && utils.logger.error('Mysql Integration was unable to require `mysql` package.');\n return;\n }\n\n let mySqlConfig = undefined;\n\n try {\n pkg.prototype.connect = new Proxy(pkg.prototype.connect, {\n apply(wrappingTarget, thisArg, args) {\n if (!mySqlConfig) {\n mySqlConfig = thisArg.config;\n }\n return wrappingTarget.apply(thisArg, args);\n },\n });\n } catch (e) {\n debugBuild.DEBUG_BUILD && utils.logger.error('Mysql Integration was unable to instrument `mysql` config.');\n }\n\n function spanDataFromConfig() {\n if (!mySqlConfig) {\n return {};\n }\n return {\n 'server.address': mySqlConfig.host,\n 'server.port': mySqlConfig.port,\n 'db.user': mySqlConfig.user,\n };\n }\n\n function finishSpan(span) {\n if (!span) {\n return;\n }\n\n const data = spanDataFromConfig();\n Object.keys(data).forEach(key => {\n span.setAttribute(key, data[key]);\n });\n\n span.end();\n }\n\n // The original function will have one of these signatures:\n // function (callback) => void\n // function (options, callback) => void\n // function (options, values, callback) => void\n utils.fill(pkg, 'createQuery', function (orig) {\n return function ( options, values, callback) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = getCurrentHub().getScope();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({\n description: typeof options === 'string' ? options : (options ).sql,\n op: 'db',\n origin: 'auto.db.mysql',\n data: {\n 'db.system': 'mysql',\n },\n })]);\n\n if (typeof callback === 'function') {\n return orig.call(this, options, values, function (err, result, fields) {\n finishSpan(span);\n callback(err, result, fields);\n });\n }\n\n if (typeof values === 'function') {\n return orig.call(this, options, function (err, result, fields) {\n finishSpan(span);\n values(err, result, fields);\n });\n }\n\n // streaming, no callback!\n const query = orig.call(this, options, values) ;\n\n query.on('end', () => {\n finishSpan(span);\n });\n\n return query;\n };\n });\n }\n}Mysql.__initStatic();\n\nexports.Mysql = Mysql;\n//# sourceMappingURL=mysql.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../../common/debug-build.js');\nconst nodeUtils = require('./utils/node-utils.js');\n\n/** Tracing integration for node-postgres package */\nclass Postgres {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Postgres';}\n\n /**\n * @inheritDoc\n */\n\n constructor(options = {}) {\n this.name = Postgres.id;\n this._usePgNative = !!options.usePgNative;\n this._module = options.module;\n }\n\n /** @inheritdoc */\n loadDependency() {\n return (this._module = this._module || utils.loadModule('pg'));\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {\n debugBuild.DEBUG_BUILD && utils.logger.log('Postgres Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n debugBuild.DEBUG_BUILD && utils.logger.error('Postgres Integration was unable to require `pg` package.');\n return;\n }\n\n const Client = this._usePgNative ? _optionalChain([pkg, 'access', _2 => _2.native, 'optionalAccess', _3 => _3.Client]) : pkg.Client;\n\n if (!Client) {\n debugBuild.DEBUG_BUILD && utils.logger.error(\"Postgres Integration was unable to access 'pg-native' bindings.\");\n return;\n }\n\n /**\n * function (query, callback) => void\n * function (query, params, callback) => void\n * function (query) => Promise\n * function (query, params) => Promise\n * function (pg.Cursor) => pg.Cursor\n */\n utils.fill(Client.prototype, 'query', function (orig) {\n return function ( config, values, callback) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = getCurrentHub().getScope();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n const data = {\n 'db.system': 'postgresql',\n };\n\n try {\n if (this.database) {\n data['db.name'] = this.database;\n }\n if (this.host) {\n data['server.address'] = this.host;\n }\n if (this.port) {\n data['server.port'] = this.port;\n }\n if (this.user) {\n data['db.user'] = this.user;\n }\n } catch (e) {\n // ignore\n }\n\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5({\n description: typeof config === 'string' ? config : (config ).text,\n op: 'db',\n origin: 'auto.db.postgres',\n data,\n })]);\n\n if (typeof callback === 'function') {\n return orig.call(this, config, values, function (err, result) {\n _optionalChain([span, 'optionalAccess', _6 => _6.end, 'call', _7 => _7()]);\n callback(err, result);\n });\n }\n\n if (typeof values === 'function') {\n return orig.call(this, config, function (err, result) {\n _optionalChain([span, 'optionalAccess', _8 => _8.end, 'call', _9 => _9()]);\n values(err, result);\n });\n }\n\n const rv = typeof values !== 'undefined' ? orig.call(this, config, values) : orig.call(this, config);\n\n if (utils.isThenable(rv)) {\n return rv.then((res) => {\n _optionalChain([span, 'optionalAccess', _10 => _10.end, 'call', _11 => _11()]);\n return res;\n });\n }\n\n _optionalChain([span, 'optionalAccess', _12 => _12.end, 'call', _13 => _13()]);\n return rv;\n };\n });\n }\n}Postgres.__initStatic();\n\nexports.Postgres = Postgres;\n//# sourceMappingURL=postgres.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../../common/debug-build.js');\nconst nodeUtils = require('./utils/node-utils.js');\n\nfunction isValidPrismaClient(possibleClient) {\n return !!possibleClient && !!(possibleClient )['$use'];\n}\n\n/** Tracing integration for @prisma/client package */\nclass Prisma {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Prisma';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this.name = Prisma.id;\n\n // We instrument the PrismaClient inside the constructor and not inside `setupOnce` because in some cases of server-side\n // bundling (Next.js) multiple Prisma clients can be instantiated, even though users don't intend to. When instrumenting\n // in setupOnce we can only ever instrument one client.\n // https://github.com/getsentry/sentry-javascript/issues/7216#issuecomment-1602375012\n // In the future we might explore providing a dedicated PrismaClient middleware instead of this hack.\n if (isValidPrismaClient(options.client) && !options.client._sentryInstrumented) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n utils.addNonEnumerableProperty(options.client , '_sentryInstrumented', true);\n\n const clientData = {};\n try {\n const engineConfig = (options.client )._engineConfig;\n if (engineConfig) {\n const { activeProvider, clientVersion } = engineConfig;\n if (activeProvider) {\n clientData['db.system'] = activeProvider;\n }\n if (clientVersion) {\n clientData['db.prisma.version'] = clientVersion;\n }\n }\n } catch (e) {\n // ignore\n }\n\n options.client.$use((params, next) => {\n // eslint-disable-next-line deprecation/deprecation\n if (nodeUtils.shouldDisableAutoInstrumentation(core.getCurrentHub)) {\n return next(params);\n }\n\n const action = params.action;\n const model = params.model;\n\n return core.startSpan(\n {\n name: model ? `${model} ${action}` : action,\n onlyIfParent: true,\n op: 'db.prisma',\n attributes: {\n [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.db.prisma',\n },\n data: { ...clientData, 'db.operation': action },\n },\n () => next(params),\n );\n });\n } else {\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn('Unsupported Prisma client provided to PrismaIntegration. Provided client:', options.client);\n }\n }\n\n /**\n * @inheritDoc\n */\n setupOnce() {\n // Noop - here for backwards compatibility\n }\n} Prisma.__initStatic();\n\nexports.Prisma = Prisma;\n//# sourceMappingURL=prisma.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Check if Sentry auto-instrumentation should be disabled.\n *\n * @param getCurrentHub A method to fetch the current hub\n * @returns boolean\n */\nfunction shouldDisableAutoInstrumentation(getCurrentHub) {\n // eslint-disable-next-line deprecation/deprecation\n const clientOptions = _optionalChain([getCurrentHub, 'call', _ => _(), 'access', _2 => _2.getClient, 'call', _3 => _3(), 'optionalAccess', _4 => _4.getOptions, 'call', _5 => _5()]);\n const instrumenter = _optionalChain([clientOptions, 'optionalAccess', _6 => _6.instrumenter]) || 'sentry';\n\n return instrumenter !== 'sentry';\n}\n\nexports.shouldDisableAutoInstrumentation = shouldDisableAutoInstrumentation;\n//# sourceMappingURL=node-utils.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn) {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn, sdkInfo) {\n return utils.urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }),\n });\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nfunction getEnvelopeEndpointWithUrlEncodedAuth(\n dsn,\n // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below\n // options: ClientOptions = {} as ClientOptions,\n tunnelOrOptions = {} ,\n) {\n // TODO (v8): Use this code instead\n // const { tunnel, _metadata = {} } = options;\n // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`;\n\n const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel;\n const sdkInfo =\n typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk;\n\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nfunction getReportDialogEndpoint(\n dsnLike,\n dialogOptions\n\n,\n) {\n const dsn = utils.makeDsn(dsnLike);\n if (!dsn) {\n return '';\n }\n\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${utils.dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'onClose') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n\nexports.getEnvelopeEndpointWithUrlEncodedAuth = getEnvelopeEndpointWithUrlEncodedAuth;\nexports.getReportDialogEndpoint = getReportDialogEndpoint;\n//# sourceMappingURL=api.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst api = require('./api.js');\nconst debugBuild = require('./debug-build.js');\nconst envelope = require('./envelope.js');\nconst exports$1 = require('./exports.js');\nconst hub = require('./hub.js');\nconst integration = require('./integration.js');\nconst envelope$1 = require('./metrics/envelope.js');\nconst session = require('./session.js');\nconst dynamicSamplingContext = require('./tracing/dynamicSamplingContext.js');\nconst prepareEvent = require('./utils/prepareEvent.js');\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nclass BaseClient {\n /**\n * A reference to a metrics aggregator\n *\n * @experimental Note this is alpha API. It may experience breaking changes in the future.\n */\n\n /** Options passed to the SDK. */\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n\n /** Array of set up integrations. */\n\n /** Indicates whether this client's integrations have been set up. */\n\n /** Number of calls being processed */\n\n /** Holds flushable */\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n constructor(options) {\n this._options = options;\n this._integrations = {};\n this._integrationsInitialized = false;\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n\n if (options.dsn) {\n this._dsn = utils.makeDsn(options.dsn);\n } else {\n debugBuild.DEBUG_BUILD && utils.logger.warn('No DSN provided, client will not send events.');\n }\n\n if (this._dsn) {\n const url = api.getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);\n this._transport = options.transport({\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n captureException(exception, hint, scope) {\n // ensure we haven't captured this very object before\n if (utils.checkOrSetAlreadyCaught(exception)) {\n debugBuild.DEBUG_BUILD && utils.logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId = hint && hint.event_id;\n\n this._process(\n this.eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level,\n hint,\n scope,\n ) {\n let eventId = hint && hint.event_id;\n\n const eventMessage = utils.isParameterizedString(message) ? message : String(message);\n\n const promisedEvent = utils.isPrimitive(message)\n ? this.eventFromMessage(eventMessage, level, hint)\n : this.eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureEvent(event, hint, scope) {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && utils.checkOrSetAlreadyCaught(hint.originalException)) {\n debugBuild.DEBUG_BUILD && utils.logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId = hint && hint.event_id;\n\n const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;\n\n this._process(\n this._captureEvent(event, hint, capturedSpanScope || scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureSession(session$1) {\n if (!(typeof session$1.release === 'string')) {\n debugBuild.DEBUG_BUILD && utils.logger.warn('Discarded session because of missing or non-string release');\n } else {\n this.sendSession(session$1);\n // After sending, we set init false to indicate it's not the first occurrence\n session.updateSession(session$1, { init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n getDsn() {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n getOptions() {\n return this._options;\n }\n\n /**\n * @see SdkMetadata in @sentry/types\n *\n * @return The metadata of the SDK\n */\n getSdkMetadata() {\n return this._options._metadata;\n }\n\n /**\n * @inheritDoc\n */\n getTransport() {\n return this._transport;\n }\n\n /**\n * @inheritDoc\n */\n flush(timeout) {\n const transport = this._transport;\n if (transport) {\n if (this.metricsAggregator) {\n this.metricsAggregator.flush();\n }\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return utils.resolvedSyncPromise(true);\n }\n }\n\n /**\n * @inheritDoc\n */\n close(timeout) {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n if (this.metricsAggregator) {\n this.metricsAggregator.close();\n }\n return result;\n });\n }\n\n /** Get all installed event processors. */\n getEventProcessors() {\n return this._eventProcessors;\n }\n\n /** @inheritDoc */\n addEventProcessor(eventProcessor) {\n this._eventProcessors.push(eventProcessor);\n }\n\n /**\n * This is an internal function to setup all integrations that should run on the client.\n * @deprecated Use `client.init()` instead.\n */\n setupIntegrations(forceInitialize) {\n if ((forceInitialize && !this._integrationsInitialized) || (this._isEnabled() && !this._integrationsInitialized)) {\n this._setupIntegrations();\n }\n }\n\n /** @inheritdoc */\n init() {\n if (this._isEnabled()) {\n this._setupIntegrations();\n }\n }\n\n /**\n * Gets an installed integration by its `id`.\n *\n * @returns The installed integration or `undefined` if no integration with that `id` was installed.\n * @deprecated Use `getIntegrationByName()` instead.\n */\n getIntegrationById(integrationId) {\n return this.getIntegrationByName(integrationId);\n }\n\n /**\n * Gets an installed integration by its name.\n *\n * @returns The installed integration or `undefined` if no integration with that `name` was installed.\n */\n getIntegrationByName(integrationName) {\n return this._integrations[integrationName] ;\n }\n\n /**\n * Returns the client's instance of the given integration class, it any.\n * @deprecated Use `getIntegrationByName()` instead.\n */\n getIntegration(integration) {\n try {\n return (this._integrations[integration.id] ) || null;\n } catch (_oO) {\n debugBuild.DEBUG_BUILD && utils.logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n addIntegration(integration$1) {\n const isAlreadyInstalled = this._integrations[integration$1.name];\n\n // This hook takes care of only installing if not already installed\n integration.setupIntegration(this, integration$1, this._integrations);\n // Here we need to check manually to make sure to not run this multiple times\n if (!isAlreadyInstalled) {\n integration.afterSetupIntegrations(this, [integration$1]);\n }\n }\n\n /**\n * @inheritDoc\n */\n sendEvent(event, hint = {}) {\n this.emit('beforeSendEvent', event, hint);\n\n let env = envelope.createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = utils.addItemToEnvelope(\n env,\n utils.createAttachmentEnvelopeItem(\n attachment,\n this._options.transportOptions && this._options.transportOptions.textEncoder,\n ),\n );\n }\n\n const promise = this._sendEnvelope(env);\n if (promise) {\n promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n }\n }\n\n /**\n * @inheritDoc\n */\n sendSession(session) {\n const env = envelope.createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n\n // _sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._sendEnvelope(env);\n }\n\n /**\n * @inheritDoc\n */\n recordDroppedEvent(reason, category, _event) {\n // Note: we use `event` in replay, where we overwrite this hook.\n\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n debugBuild.DEBUG_BUILD && utils.logger.log(`Adding outcome: \"${key}\"`);\n\n // The following works because undefined + 1 === NaN and NaN is falsy\n this._outcomes[key] = this._outcomes[key] + 1 || 1;\n }\n }\n\n /**\n * @inheritDoc\n */\n captureAggregateMetrics(metricBucketItems) {\n debugBuild.DEBUG_BUILD && utils.logger.log(`Flushing aggregated metrics, number of metrics: ${metricBucketItems.length}`);\n const metricsEnvelope = envelope$1.createMetricEnvelope(\n metricBucketItems,\n this._dsn,\n this._options._metadata,\n this._options.tunnel,\n );\n\n // _sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._sendEnvelope(metricsEnvelope);\n }\n\n // Keep on() & emit() signatures in sync with types' client.ts interface\n /* eslint-disable @typescript-eslint/unified-signatures */\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n on(hook, callback) {\n if (!this._hooks[hook]) {\n this._hooks[hook] = [];\n }\n\n // @ts-expect-error We assue the types are correct\n this._hooks[hook].push(callback);\n }\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n emit(hook, ...rest) {\n if (this._hooks[hook]) {\n this._hooks[hook].forEach(callback => callback(...rest));\n }\n }\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Setup integrations for this client. */\n _setupIntegrations() {\n const { integrations } = this._options;\n this._integrations = integration.setupIntegrations(this, integrations);\n integration.afterSetupIntegrations(this, integrations);\n\n // TODO v8: We don't need this flag anymore\n this._integrationsInitialized = true;\n }\n\n /** Updates existing session based on the provided event */\n _updateSessionFromEvent(session$1, event) {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session$1.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session$1.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n session.updateSession(session$1, {\n ...(crashed && { status: 'crashed' }),\n errors: session$1.errors || Number(errored || crashed),\n });\n this.captureSession(session$1);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n _isClientDoneProcessing(timeout) {\n return new utils.SyncPromise(resolve => {\n let ticked = 0;\n const tick = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a transport is present. */\n _isEnabled() {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n _prepareEvent(\n event,\n hint,\n scope,\n isolationScope = hub.getIsolationScope(),\n ) {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations.length > 0) {\n hint.integrations = integrations;\n }\n\n this.emit('preprocessEvent', event, hint);\n\n return prepareEvent.prepareEvent(options, event, hint, scope, this, isolationScope).then(evt => {\n if (evt === null) {\n return evt;\n }\n\n const propagationContext = {\n ...isolationScope.getPropagationContext(),\n ...(scope ? scope.getPropagationContext() : undefined),\n };\n\n const trace = evt.contexts && evt.contexts.trace;\n if (!trace && propagationContext) {\n const { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext;\n evt.contexts = {\n trace: {\n trace_id,\n span_id: spanId,\n parent_span_id: parentSpanId,\n },\n ...evt.contexts,\n };\n\n const dynamicSamplingContext$1 = dsc ? dsc : dynamicSamplingContext.getDynamicSamplingContextFromClient(trace_id, this, scope);\n\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext: dynamicSamplingContext$1,\n ...evt.sdkProcessingMetadata,\n };\n }\n return evt;\n });\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n _captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if (debugBuild.DEBUG_BUILD) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason ;\n if (sentryError.logLevel === 'log') {\n utils.logger.log(sentryError.message);\n } else {\n utils.logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n _processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return utils.rejectedSyncPromise(\n new utils.SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;\n\n return this._prepareEvent(event, hint, scope, capturedSpanIsolationScope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new utils.SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n throw new utils.SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof utils.SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new utils.SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n _process(promise) {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * @inheritdoc\n */\n _sendEnvelope(envelope) {\n this.emit('beforeEnvelope', envelope);\n\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, reason => {\n debugBuild.DEBUG_BUILD && utils.logger.error('Error while sending event:', reason);\n });\n } else {\n debugBuild.DEBUG_BUILD && utils.logger.error('Transport disabled');\n }\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n _clearOutcomes() {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.keys(outcomes).map(key => {\n const [reason, category] = key.split(':') ;\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n });\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult,\n beforeSendLabel,\n) {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (utils.isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!utils.isPlainObject(event) && event !== null) {\n throw new utils.SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new utils.SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!utils.isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new utils.SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n options,\n event,\n hint,\n) {\n const { beforeSend, beforeSendTransaction } = options;\n\n if (isErrorEvent(event) && beforeSend) {\n return beforeSend(event, hint);\n }\n\n if (isTransactionEvent(event) && beforeSendTransaction) {\n return beforeSendTransaction(event, hint);\n }\n\n return event;\n}\n\nfunction isErrorEvent(event) {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\n\n/**\n * Add an event processor to the current client.\n * This event processor will run for all events processed by this client.\n */\nfunction addEventProcessor(callback) {\n const client = exports$1.getClient();\n\n if (!client || !client.addEventProcessor) {\n return;\n }\n\n client.addEventProcessor(callback);\n}\n\nexports.BaseClient = BaseClient;\nexports.addEventProcessor = addEventProcessor;\n//# sourceMappingURL=baseclient.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\n/**\n * Create envelope from check in item.\n */\nfunction createCheckInEnvelope(\n checkIn,\n dynamicSamplingContext,\n metadata,\n tunnel,\n dsn,\n) {\n const headers = {\n sent_at: new Date().toISOString(),\n };\n\n if (metadata && metadata.sdk) {\n headers.sdk = {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n };\n }\n\n if (!!tunnel && !!dsn) {\n headers.dsn = utils.dsnToString(dsn);\n }\n\n if (dynamicSamplingContext) {\n headers.trace = utils.dropUndefinedKeys(dynamicSamplingContext) ;\n }\n\n const item = createCheckInEnvelopeItem(checkIn);\n return utils.createEnvelope(headers, [item]);\n}\n\nfunction createCheckInEnvelopeItem(checkIn) {\n const checkInHeaders = {\n type: 'check_in',\n };\n return [checkInHeaders, checkIn];\n}\n\nexports.createCheckInEnvelope = createCheckInEnvelope;\n//# sourceMappingURL=checkin.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst DEFAULT_ENVIRONMENT = 'production';\n\nexports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT;\n//# sourceMappingURL=constants.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexports.DEBUG_BUILD = DEBUG_BUILD;\n//# sourceMappingURL=debug-build.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates an envelope from a Session */\nfunction createSessionEnvelope(\n session,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = utils.getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: utils.dsnToString(dsn) }),\n };\n\n const envelopeItem =\n 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n return utils.createEnvelope(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nfunction createEventEnvelope(\n event,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = utils.getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjut a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n\n const envelopeHeaders = utils.createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem = [{ type: eventType }, event];\n return utils.createEnvelope(envelopeHeaders, [eventItem]);\n}\n\nexports.createEventEnvelope = createEventEnvelope;\nexports.createSessionEnvelope = createSessionEnvelope;\n//# sourceMappingURL=envelope.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('./debug-build.js');\n\n/**\n * Returns the global event processors.\n * @deprecated Global event processors will be removed in v8.\n */\nfunction getGlobalEventProcessors() {\n return utils.getGlobalSingleton('globalEventProcessors', () => []);\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8.\n */\nfunction addGlobalEventProcessor(callback) {\n // eslint-disable-next-line deprecation/deprecation\n getGlobalEventProcessors().push(callback);\n}\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nfunction notifyEventProcessors(\n processors,\n event,\n hint,\n index = 0,\n) {\n return new utils.SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) ;\n\n debugBuild.DEBUG_BUILD && processor.id && result === null && utils.logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (utils.isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n\nexports.addGlobalEventProcessor = addGlobalEventProcessor;\nexports.getGlobalEventProcessors = getGlobalEventProcessors;\nexports.notifyEventProcessors = notifyEventProcessors;\n//# sourceMappingURL=eventProcessors.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst constants = require('./constants.js');\nconst debugBuild = require('./debug-build.js');\nconst hub = require('./hub.js');\nconst session = require('./session.js');\nconst prepareEvent = require('./utils/prepareEvent.js');\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nfunction captureException(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n exception,\n hint,\n) {\n // eslint-disable-next-line deprecation/deprecation\n return hub.getCurrentHub().captureException(exception, prepareEvent.parseEventHintOrCaptureContext(hint));\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nfunction captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n captureContext,\n) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n // eslint-disable-next-line deprecation/deprecation\n return hub.getCurrentHub().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param exception The event to send to Sentry.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nfunction captureEvent(event, hint) {\n // eslint-disable-next-line deprecation/deprecation\n return hub.getCurrentHub().captureEvent(event, hint);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n *\n * @deprecated Use getCurrentScope() directly.\n */\nfunction configureScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n hub.getCurrentHub().configureScope(callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nfunction addBreadcrumb(breadcrumb, hint) {\n // eslint-disable-next-line deprecation/deprecation\n hub.getCurrentHub().addBreadcrumb(breadcrumb, hint);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setContext(name, context) {\n // eslint-disable-next-line deprecation/deprecation\n hub.getCurrentHub().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nfunction setExtras(extras) {\n // eslint-disable-next-line deprecation/deprecation\n hub.getCurrentHub().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nfunction setExtra(key, extra) {\n // eslint-disable-next-line deprecation/deprecation\n hub.getCurrentHub().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nfunction setTags(tags) {\n // eslint-disable-next-line deprecation/deprecation\n hub.getCurrentHub().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nfunction setTag(key, value) {\n // eslint-disable-next-line deprecation/deprecation\n hub.getCurrentHub().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nfunction setUser(user) {\n // eslint-disable-next-line deprecation/deprecation\n hub.getCurrentHub().setUser(user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n */\n\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nfunction withScope(\n ...rest\n) {\n // eslint-disable-next-line deprecation/deprecation\n const hub$1 = hub.getCurrentHub();\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [scope, callback] = rest;\n if (!scope) {\n // eslint-disable-next-line deprecation/deprecation\n return hub$1.withScope(callback);\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return hub$1.withScope(() => {\n // eslint-disable-next-line deprecation/deprecation\n hub$1.getStackTop().scope = scope ;\n return callback(scope );\n });\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return hub$1.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n *\n * @param callback The callback in which the passed isolation scope is active. (Note: In environments without async\n * context strategy, the currently active isolation scope may change within execution of the callback.)\n * @returns The same value that `callback` returns.\n */\nfunction withIsolationScope(callback) {\n return hub.runWithAsyncContext(() => {\n return callback(hub.getIsolationScope());\n });\n}\n\n/**\n * Forks the current scope and sets the provided span as active span in the context of the provided callback.\n *\n * @param span Spans started in the context of the provided callback will be children of this span.\n * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.\n * @returns the value returned from the provided callback function.\n */\nfunction withActiveSpan(span, callback) {\n return withScope(scope => {\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(span);\n return callback(scope);\n });\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call\n * `startTransaction` directly on the hub.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\nfunction startTransaction(\n context,\n customSamplingContext,\n) {\n // eslint-disable-next-line deprecation/deprecation\n return hub.getCurrentHub().startTransaction({ ...context }, customSamplingContext);\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n const scope = getCurrentScope();\n const client = getClient();\n if (!client) {\n debugBuild.DEBUG_BUILD && utils.logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n debugBuild.DEBUG_BUILD && utils.logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return utils.uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction withMonitor(\n monitorSlug,\n callback,\n upsertMonitorConfig,\n) {\n const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n const now = utils.timestampInSeconds();\n\n function finishCheckIn(status) {\n captureCheckIn({ monitorSlug, status, checkInId, duration: utils.timestampInSeconds() - now });\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n\n if (utils.isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishCheckIn('ok');\n },\n () => {\n finishCheckIn('error');\n },\n );\n } else {\n finishCheckIn('ok');\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function flush(timeout) {\n const client = getClient();\n if (client) {\n return client.flush(timeout);\n }\n debugBuild.DEBUG_BUILD && utils.logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function close(timeout) {\n const client = getClient();\n if (client) {\n return client.close(timeout);\n }\n debugBuild.DEBUG_BUILD && utils.logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n * @deprecated This function will be removed in the next major version of the Sentry SDK.\n */\nfunction lastEventId() {\n // eslint-disable-next-line deprecation/deprecation\n return hub.getCurrentHub().lastEventId();\n}\n\n/**\n * Get the currently active client.\n */\nfunction getClient() {\n // eslint-disable-next-line deprecation/deprecation\n return hub.getCurrentHub().getClient();\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nfunction isInitialized() {\n return !!getClient();\n}\n\n/**\n * Get the currently active scope.\n */\nfunction getCurrentScope() {\n // eslint-disable-next-line deprecation/deprecation\n return hub.getCurrentHub().getScope();\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nfunction startSession(context) {\n const client = getClient();\n const isolationScope = hub.getIsolationScope();\n const currentScope = getCurrentScope();\n\n const { release, environment = constants.DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = utils.GLOBAL_OBJ.navigator || {};\n\n const session$1 = session.makeSession({\n release,\n environment,\n user: currentScope.getUser() || isolationScope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = isolationScope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n session.updateSession(currentSession, { status: 'exited' });\n }\n\n endSession();\n\n // Afterwards we set the new session on the scope\n isolationScope.setSession(session$1);\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession(session$1);\n\n return session$1;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nfunction endSession() {\n const isolationScope = hub.getIsolationScope();\n const currentScope = getCurrentScope();\n\n const session$1 = currentScope.getSession() || isolationScope.getSession();\n if (session$1) {\n session.closeSession(session$1);\n }\n _sendSessionUpdate();\n\n // the session is over; take it off of the scope\n isolationScope.setSession();\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate() {\n const isolationScope = hub.getIsolationScope();\n const currentScope = getCurrentScope();\n const client = getClient();\n // TODO (v8): Remove currentScope and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n * Defaults to `false`.\n */\nfunction captureSession(end = false) {\n // both send the update and pull the session from the scope\n if (end) {\n endSession();\n return;\n }\n\n // only send the update\n _sendSessionUpdate();\n}\n\nexports.addBreadcrumb = addBreadcrumb;\nexports.captureCheckIn = captureCheckIn;\nexports.captureEvent = captureEvent;\nexports.captureException = captureException;\nexports.captureMessage = captureMessage;\nexports.captureSession = captureSession;\nexports.close = close;\nexports.configureScope = configureScope;\nexports.endSession = endSession;\nexports.flush = flush;\nexports.getClient = getClient;\nexports.getCurrentScope = getCurrentScope;\nexports.isInitialized = isInitialized;\nexports.lastEventId = lastEventId;\nexports.setContext = setContext;\nexports.setExtra = setExtra;\nexports.setExtras = setExtras;\nexports.setTag = setTag;\nexports.setTags = setTags;\nexports.setUser = setUser;\nexports.startSession = startSession;\nexports.startTransaction = startTransaction;\nexports.withActiveSpan = withActiveSpan;\nexports.withIsolationScope = withIsolationScope;\nexports.withMonitor = withMonitor;\nexports.withScope = withScope;\n//# sourceMappingURL=exports.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst constants = require('./constants.js');\nconst debugBuild = require('./debug-build.js');\nconst scope = require('./scope.js');\nconst session = require('./session.js');\nconst version = require('./version.js');\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nconst API_VERSION = parseFloat(version.SDK_VERSION);\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * @inheritDoc\n */\nclass Hub {\n /** Is a {@link Layer}[] containing the client and scope */\n\n /** Contains the last event id of a captured event. */\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n *\n * @deprecated Instantiation of Hub objects is deprecated and the constructor will be removed in version 8 of the SDK.\n *\n * If you are currently using the Hub for multi-client use like so:\n *\n * ```\n * // OLD\n * const hub = new Hub();\n * hub.bindClient(client);\n * makeMain(hub)\n * ```\n *\n * instead initialize the client as follows:\n *\n * ```\n * // NEW\n * Sentry.withIsolationScope(() => {\n * Sentry.setCurrentClient(client);\n * client.init();\n * });\n * ```\n *\n * If you are using the Hub to capture events like so:\n *\n * ```\n * // OLD\n * const client = new Client();\n * const hub = new Hub(client);\n * hub.captureException()\n * ```\n *\n * instead capture isolated events as follows:\n *\n * ```\n * // NEW\n * const client = new Client();\n * const scope = new Scope();\n * scope.setClient(client);\n * scope.captureException();\n * ```\n */\n constructor(\n client,\n scope$1,\n isolationScope,\n _version = API_VERSION,\n ) {this._version = _version;\n let assignedScope;\n if (!scope$1) {\n assignedScope = new scope.Scope();\n assignedScope.setClient(client);\n } else {\n assignedScope = scope$1;\n }\n\n let assignedIsolationScope;\n if (!isolationScope) {\n assignedIsolationScope = new scope.Scope();\n assignedIsolationScope.setClient(client);\n } else {\n assignedIsolationScope = isolationScope;\n }\n\n this._stack = [{ scope: assignedScope }];\n\n if (client) {\n // eslint-disable-next-line deprecation/deprecation\n this.bindClient(client);\n }\n\n this._isolationScope = assignedIsolationScope;\n }\n\n /**\n * Checks if this hub's version is older than the given version.\n *\n * @param version A version number to compare to.\n * @return True if the given version is newer; otherwise false.\n *\n * @deprecated This will be removed in v8.\n */\n isOlderThan(version) {\n return this._version < version;\n }\n\n /**\n * This binds the given client to the current scope.\n * @param client An SDK client (client) instance.\n *\n * @deprecated Use `initAndBind()` directly, or `setCurrentClient()` and/or `client.init()` instead.\n */\n bindClient(client) {\n // eslint-disable-next-line deprecation/deprecation\n const top = this.getStackTop();\n top.client = client;\n top.scope.setClient(client);\n // eslint-disable-next-line deprecation/deprecation\n if (client && client.setupIntegrations) {\n // eslint-disable-next-line deprecation/deprecation\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `withScope` instead.\n */\n pushScope() {\n // We want to clone the content of prev scope\n // eslint-disable-next-line deprecation/deprecation\n const scope = this.getScope().clone();\n // eslint-disable-next-line deprecation/deprecation\n this.getStack().push({\n // eslint-disable-next-line deprecation/deprecation\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `withScope` instead.\n */\n popScope() {\n // eslint-disable-next-line deprecation/deprecation\n if (this.getStack().length <= 1) return false;\n // eslint-disable-next-line deprecation/deprecation\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.withScope()` instead.\n */\n withScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = this.pushScope();\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(scope);\n } catch (e) {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n throw e;\n }\n\n if (utils.isThenable(maybePromiseResult)) {\n // @ts-expect-error - isThenable returns the wrong type\n return maybePromiseResult.then(\n res => {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n return res;\n },\n e => {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n throw e;\n },\n );\n }\n\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n return maybePromiseResult;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.getClient()` instead.\n */\n getClient() {\n // eslint-disable-next-line deprecation/deprecation\n return this.getStackTop().client ;\n }\n\n /**\n * Returns the scope of the top stack.\n *\n * @deprecated Use `Sentry.getCurrentScope()` instead.\n */\n getScope() {\n // eslint-disable-next-line deprecation/deprecation\n return this.getStackTop().scope;\n }\n\n /**\n * @deprecated Use `Sentry.getIsolationScope()` instead.\n */\n getIsolationScope() {\n return this._isolationScope;\n }\n\n /**\n * Returns the scope stack for domains or the process.\n * @deprecated This will be removed in v8.\n */\n getStack() {\n return this._stack;\n }\n\n /**\n * Returns the topmost scope layer in the order domain > local > process.\n * @deprecated This will be removed in v8.\n */\n getStackTop() {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureException()` instead.\n */\n captureException(exception, hint) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : utils.uuid4());\n const syntheticException = new Error('Sentry syntheticException');\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().captureException(exception, {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureMessage()` instead.\n */\n captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level,\n hint,\n ) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : utils.uuid4());\n const syntheticException = new Error(message);\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().captureMessage(message, level, {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureEvent()` instead.\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : utils.uuid4();\n if (!event.type) {\n this._lastEventId = eventId;\n }\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().captureEvent(event, { ...hint, event_id: eventId });\n return eventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated This will be removed in v8.\n */\n lastEventId() {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.addBreadcrumb()` instead.\n */\n addBreadcrumb(breadcrumb, hint) {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = utils.dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (utils.consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n // TODO(v8): I know this comment doesn't make much sense because the hub will be deprecated but I still wanted to\n // write it down. In theory, we would have to add the breadcrumbs to the isolation scope here, however, that would\n // duplicate all of the breadcrumbs. There was the possibility of adding breadcrumbs to both, the isolation scope\n // and the normal scope, and deduplicating it down the line in the event processing pipeline. However, that would\n // have been very fragile, because the breadcrumb objects would have needed to keep their identity all throughout\n // the event processing pipeline.\n // In the new implementation, the top level `Sentry.addBreadcrumb()` should ONLY write to the isolation scope.\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setUser()` instead.\n */\n setUser(user) {\n // TODO(v8): The top level `Sentry.setUser()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setUser(user);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setUser(user);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setTags()` instead.\n */\n setTags(tags) {\n // TODO(v8): The top level `Sentry.setTags()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setTags(tags);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setTags(tags);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setExtras()` instead.\n */\n setExtras(extras) {\n // TODO(v8): The top level `Sentry.setExtras()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setExtras(extras);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setExtras(extras);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setTag()` instead.\n */\n setTag(key, value) {\n // TODO(v8): The top level `Sentry.setTag()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setTag(key, value);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setTag(key, value);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setExtra()` instead.\n */\n setExtra(key, extra) {\n // TODO(v8): The top level `Sentry.setExtra()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setExtra(key, extra);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setContext()` instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setContext(name, context) {\n // TODO(v8): The top level `Sentry.setContext()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setContext(name, context);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setContext(name, context);\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `getScope()` directly.\n */\n configureScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n run(callback) {\n // eslint-disable-next-line deprecation/deprecation\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n // eslint-disable-next-line deprecation/deprecation\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.getClient().getIntegrationByName()` instead.\n */\n getIntegration(integration) {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n if (!client) return null;\n try {\n // eslint-disable-next-line deprecation/deprecation\n return client.getIntegration(integration);\n } catch (_oO) {\n debugBuild.DEBUG_BUILD && utils.logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\n startTransaction(context, customSamplingContext) {\n const result = this._callExtensionMethod('startTransaction', context, customSamplingContext);\n\n if (debugBuild.DEBUG_BUILD && !result) {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n if (!client) {\n utils.logger.warn(\n \"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'\",\n );\n } else {\n utils.logger.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n`);\n }\n }\n\n return result;\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `spanToTraceHeader()` instead.\n */\n traceHeaders() {\n return this._callExtensionMethod('traceHeaders');\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use top level `captureSession` instead.\n */\n captureSession(endSession = false) {\n // both send the update and pull the session from the scope\n if (endSession) {\n // eslint-disable-next-line deprecation/deprecation\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n * @deprecated Use top level `endSession` instead.\n */\n endSession() {\n // eslint-disable-next-line deprecation/deprecation\n const layer = this.getStackTop();\n const scope = layer.scope;\n const session$1 = scope.getSession();\n if (session$1) {\n session.closeSession(session$1);\n }\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n scope.setSession();\n }\n\n /**\n * @inheritDoc\n * @deprecated Use top level `startSession` instead.\n */\n startSession(context) {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n const { release, environment = constants.DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = utils.GLOBAL_OBJ.navigator || {};\n\n const session$1 = session.makeSession({\n release,\n environment,\n user: scope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n session.updateSession(currentSession, { status: 'exited' });\n }\n // eslint-disable-next-line deprecation/deprecation\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session$1);\n\n return session$1;\n }\n\n /**\n * Returns if default PII should be sent to Sentry and propagated in ourgoing requests\n * when Tracing is used.\n *\n * @deprecated Use top-level `getClient().getOptions().sendDefaultPii` instead. This function\n * only unnecessarily increased API surface but only wrapped accessing the option.\n */\n shouldSendDefaultPii() {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n const options = client && client.getOptions();\n return Boolean(options && options.sendDefaultPii);\n }\n\n /**\n * Sends the current Session on the scope\n */\n _sendSessionUpdate() {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n\n const session = scope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _callExtensionMethod(method, ...args) {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n debugBuild.DEBUG_BUILD && utils.logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nfunction getMainCarrier() {\n utils.GLOBAL_OBJ.__SENTRY__ = utils.GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return utils.GLOBAL_OBJ;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n *\n * @deprecated Use `setCurrentClient()` instead.\n */\nfunction makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n *\n * @deprecated Use the respective replacement method directly instead.\n */\nfunction getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n const hub = registry.__SENTRY__.acs.getCurrentHub();\n\n if (hub) {\n return hub;\n }\n }\n\n // Return hub that lives on a global object\n return getGlobalHub(registry);\n}\n\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current exection context,\n * meaning that it will remain stable for the same Hub.\n */\nfunction getIsolationScope() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getIsolationScope();\n}\n\nfunction getGlobalHub(registry = getMainCarrier()) {\n // If there's no hub, or its an old API, assign a new one\n\n if (\n !hasHubOnCarrier(registry) ||\n // eslint-disable-next-line deprecation/deprecation\n getHubFromCarrier(registry).isOlderThan(API_VERSION)\n ) {\n // eslint-disable-next-line deprecation/deprecation\n setHubOnCarrier(registry, new Hub());\n }\n\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * If the carrier does not contain a hub, a new hub is created with the global hub client and scope.\n */\nfunction ensureHubOnCarrier(carrier, parent = getGlobalHub()) {\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (\n !hasHubOnCarrier(carrier) ||\n // eslint-disable-next-line deprecation/deprecation\n getHubFromCarrier(carrier).isOlderThan(API_VERSION)\n ) {\n // eslint-disable-next-line deprecation/deprecation\n const client = parent.getClient();\n // eslint-disable-next-line deprecation/deprecation\n const scope = parent.getScope();\n // eslint-disable-next-line deprecation/deprecation\n const isolationScope = parent.getIsolationScope();\n // eslint-disable-next-line deprecation/deprecation\n setHubOnCarrier(carrier, new Hub(client, scope.clone(), isolationScope.clone()));\n }\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nfunction setAsyncContextStrategy(strategy) {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n registry.__SENTRY__ = registry.__SENTRY__ || {};\n registry.__SENTRY__.acs = strategy;\n}\n\n/**\n * Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.\n *\n * @param callback The callback to run in its own async context\n * @param options Options to pass to the async context strategy\n * @returns The result of the callback\n */\nfunction runWithAsyncContext(callback, options = {}) {\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n return registry.__SENTRY__.acs.runWithAsyncContext(callback, options);\n }\n\n // if there was no strategy, fallback to just calling the callback\n return callback();\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nfunction getHubFromCarrier(carrier) {\n // eslint-disable-next-line deprecation/deprecation\n return utils.getGlobalSingleton('hub', () => new Hub(), carrier);\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nfunction setHubOnCarrier(carrier, hub) {\n if (!carrier) return false;\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n __SENTRY__.hub = hub;\n return true;\n}\n\nexports.API_VERSION = API_VERSION;\nexports.Hub = Hub;\nexports.ensureHubOnCarrier = ensureHubOnCarrier;\nexports.getCurrentHub = getCurrentHub;\nexports.getHubFromCarrier = getHubFromCarrier;\nexports.getIsolationScope = getIsolationScope;\nexports.getMainCarrier = getMainCarrier;\nexports.makeMain = makeMain;\nexports.runWithAsyncContext = runWithAsyncContext;\nexports.setAsyncContextStrategy = setAsyncContextStrategy;\nexports.setHubOnCarrier = setHubOnCarrier;\n//# sourceMappingURL=hub.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst hubextensions = require('./tracing/hubextensions.js');\nconst idletransaction = require('./tracing/idletransaction.js');\nconst span$1 = require('./tracing/span.js');\nconst transaction = require('./tracing/transaction.js');\nconst utils = require('./tracing/utils.js');\nconst spanstatus = require('./tracing/spanstatus.js');\nconst trace = require('./tracing/trace.js');\nconst dynamicSamplingContext = require('./tracing/dynamicSamplingContext.js');\nconst measurement = require('./tracing/measurement.js');\nconst sampling = require('./tracing/sampling.js');\nconst semanticAttributes = require('./semanticAttributes.js');\nconst envelope = require('./envelope.js');\nconst exports$1 = require('./exports.js');\nconst hub = require('./hub.js');\nconst session = require('./session.js');\nconst sessionflusher = require('./sessionflusher.js');\nconst scope = require('./scope.js');\nconst eventProcessors = require('./eventProcessors.js');\nconst api = require('./api.js');\nconst baseclient = require('./baseclient.js');\nconst serverRuntimeClient = require('./server-runtime-client.js');\nconst sdk = require('./sdk.js');\nconst base = require('./transports/base.js');\nconst offline = require('./transports/offline.js');\nconst multiplexed = require('./transports/multiplexed.js');\nconst version = require('./version.js');\nconst integration = require('./integration.js');\nconst applyScopeDataToEvent = require('./utils/applyScopeDataToEvent.js');\nconst prepareEvent = require('./utils/prepareEvent.js');\nconst checkin = require('./checkin.js');\nconst span = require('./span.js');\nconst hasTracingEnabled = require('./utils/hasTracingEnabled.js');\nconst isSentryRequestUrl = require('./utils/isSentryRequestUrl.js');\nconst handleCallbackErrors = require('./utils/handleCallbackErrors.js');\nconst parameterize = require('./utils/parameterize.js');\nconst spanUtils = require('./utils/spanUtils.js');\nconst getRootSpan = require('./utils/getRootSpan.js');\nconst sdkMetadata = require('./utils/sdkMetadata.js');\nconst constants = require('./constants.js');\nconst metadata = require('./integrations/metadata.js');\nconst requestdata = require('./integrations/requestdata.js');\nconst inboundfilters = require('./integrations/inboundfilters.js');\nconst functiontostring = require('./integrations/functiontostring.js');\nconst linkederrors = require('./integrations/linkederrors.js');\nconst index = require('./integrations/index.js');\nconst exports$2 = require('./metrics/exports.js');\n\n/** @deprecated Import the integration function directly, e.g. `inboundFiltersIntegration()` instead of `new Integrations.InboundFilter(). */\nconst Integrations = index;\n\nexports.addTracingExtensions = hubextensions.addTracingExtensions;\nexports.startIdleTransaction = hubextensions.startIdleTransaction;\nexports.IdleTransaction = idletransaction.IdleTransaction;\nexports.TRACING_DEFAULTS = idletransaction.TRACING_DEFAULTS;\nexports.Span = span$1.Span;\nexports.Transaction = transaction.Transaction;\nexports.extractTraceparentData = utils.extractTraceparentData;\nexports.getActiveTransaction = utils.getActiveTransaction;\nObject.defineProperty(exports, 'SpanStatus', {\n enumerable: true,\n get: () => spanstatus.SpanStatus\n});\nexports.getSpanStatusFromHttpCode = spanstatus.getSpanStatusFromHttpCode;\nexports.setHttpStatus = spanstatus.setHttpStatus;\nexports.spanStatusfromHttpCode = spanstatus.spanStatusfromHttpCode;\nexports.continueTrace = trace.continueTrace;\nexports.getActiveSpan = trace.getActiveSpan;\nexports.startActiveSpan = trace.startActiveSpan;\nexports.startInactiveSpan = trace.startInactiveSpan;\nexports.startSpan = trace.startSpan;\nexports.startSpanManual = trace.startSpanManual;\nexports.trace = trace.trace;\nexports.getDynamicSamplingContextFromClient = dynamicSamplingContext.getDynamicSamplingContextFromClient;\nexports.getDynamicSamplingContextFromSpan = dynamicSamplingContext.getDynamicSamplingContextFromSpan;\nexports.setMeasurement = measurement.setMeasurement;\nexports.isValidSampleRate = sampling.isValidSampleRate;\nexports.SEMANTIC_ATTRIBUTE_PROFILE_ID = semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID;\nexports.SEMANTIC_ATTRIBUTE_SENTRY_OP = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP;\nexports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;\nexports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE;\nexports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE;\nexports.createEventEnvelope = envelope.createEventEnvelope;\nexports.createSessionEnvelope = envelope.createSessionEnvelope;\nexports.addBreadcrumb = exports$1.addBreadcrumb;\nexports.captureCheckIn = exports$1.captureCheckIn;\nexports.captureEvent = exports$1.captureEvent;\nexports.captureException = exports$1.captureException;\nexports.captureMessage = exports$1.captureMessage;\nexports.captureSession = exports$1.captureSession;\nexports.close = exports$1.close;\nexports.configureScope = exports$1.configureScope;\nexports.endSession = exports$1.endSession;\nexports.flush = exports$1.flush;\nexports.getClient = exports$1.getClient;\nexports.getCurrentScope = exports$1.getCurrentScope;\nexports.isInitialized = exports$1.isInitialized;\nexports.lastEventId = exports$1.lastEventId;\nexports.setContext = exports$1.setContext;\nexports.setExtra = exports$1.setExtra;\nexports.setExtras = exports$1.setExtras;\nexports.setTag = exports$1.setTag;\nexports.setTags = exports$1.setTags;\nexports.setUser = exports$1.setUser;\nexports.startSession = exports$1.startSession;\nexports.startTransaction = exports$1.startTransaction;\nexports.withActiveSpan = exports$1.withActiveSpan;\nexports.withIsolationScope = exports$1.withIsolationScope;\nexports.withMonitor = exports$1.withMonitor;\nexports.withScope = exports$1.withScope;\nexports.Hub = hub.Hub;\nexports.ensureHubOnCarrier = hub.ensureHubOnCarrier;\nexports.getCurrentHub = hub.getCurrentHub;\nexports.getHubFromCarrier = hub.getHubFromCarrier;\nexports.getIsolationScope = hub.getIsolationScope;\nexports.getMainCarrier = hub.getMainCarrier;\nexports.makeMain = hub.makeMain;\nexports.runWithAsyncContext = hub.runWithAsyncContext;\nexports.setAsyncContextStrategy = hub.setAsyncContextStrategy;\nexports.setHubOnCarrier = hub.setHubOnCarrier;\nexports.closeSession = session.closeSession;\nexports.makeSession = session.makeSession;\nexports.updateSession = session.updateSession;\nexports.SessionFlusher = sessionflusher.SessionFlusher;\nexports.Scope = scope.Scope;\nexports.getGlobalScope = scope.getGlobalScope;\nexports.setGlobalScope = scope.setGlobalScope;\nexports.addGlobalEventProcessor = eventProcessors.addGlobalEventProcessor;\nexports.notifyEventProcessors = eventProcessors.notifyEventProcessors;\nexports.getEnvelopeEndpointWithUrlEncodedAuth = api.getEnvelopeEndpointWithUrlEncodedAuth;\nexports.getReportDialogEndpoint = api.getReportDialogEndpoint;\nexports.BaseClient = baseclient.BaseClient;\nexports.addEventProcessor = baseclient.addEventProcessor;\nexports.ServerRuntimeClient = serverRuntimeClient.ServerRuntimeClient;\nexports.initAndBind = sdk.initAndBind;\nexports.setCurrentClient = sdk.setCurrentClient;\nexports.createTransport = base.createTransport;\nexports.makeOfflineTransport = offline.makeOfflineTransport;\nexports.makeMultiplexedTransport = multiplexed.makeMultiplexedTransport;\nexports.SDK_VERSION = version.SDK_VERSION;\nexports.addIntegration = integration.addIntegration;\nexports.convertIntegrationFnToClass = integration.convertIntegrationFnToClass;\nexports.defineIntegration = integration.defineIntegration;\nexports.getIntegrationsToSetup = integration.getIntegrationsToSetup;\nexports.applyScopeDataToEvent = applyScopeDataToEvent.applyScopeDataToEvent;\nexports.mergeScopeData = applyScopeDataToEvent.mergeScopeData;\nexports.prepareEvent = prepareEvent.prepareEvent;\nexports.createCheckInEnvelope = checkin.createCheckInEnvelope;\nexports.createSpanEnvelope = span.createSpanEnvelope;\nexports.hasTracingEnabled = hasTracingEnabled.hasTracingEnabled;\nexports.isSentryRequestUrl = isSentryRequestUrl.isSentryRequestUrl;\nexports.handleCallbackErrors = handleCallbackErrors.handleCallbackErrors;\nexports.parameterize = parameterize.parameterize;\nexports.spanIsSampled = spanUtils.spanIsSampled;\nexports.spanToJSON = spanUtils.spanToJSON;\nexports.spanToTraceContext = spanUtils.spanToTraceContext;\nexports.spanToTraceHeader = spanUtils.spanToTraceHeader;\nexports.getRootSpan = getRootSpan.getRootSpan;\nexports.applySdkMetadata = sdkMetadata.applySdkMetadata;\nexports.DEFAULT_ENVIRONMENT = constants.DEFAULT_ENVIRONMENT;\nexports.ModuleMetadata = metadata.ModuleMetadata;\nexports.moduleMetadataIntegration = metadata.moduleMetadataIntegration;\nexports.RequestData = requestdata.RequestData;\nexports.requestDataIntegration = requestdata.requestDataIntegration;\nexports.InboundFilters = inboundfilters.InboundFilters;\nexports.inboundFiltersIntegration = inboundfilters.inboundFiltersIntegration;\nexports.FunctionToString = functiontostring.FunctionToString;\nexports.functionToStringIntegration = functiontostring.functionToStringIntegration;\nexports.LinkedErrors = linkederrors.LinkedErrors;\nexports.linkedErrorsIntegration = linkederrors.linkedErrorsIntegration;\nexports.metrics = exports$2.metrics;\nexports.Integrations = Integrations;\n//# sourceMappingURL=index.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('./debug-build.js');\nconst eventProcessors = require('./eventProcessors.js');\nconst exports$1 = require('./exports.js');\nconst hub = require('./hub.js');\n\nconst installedIntegrations = [];\n\n/** Map of integrations assigned to a client */\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preseve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations) {\n const integrationsByName = {};\n\n integrations.forEach(currentInstance => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.keys(integrationsByName).map(k => integrationsByName[k]);\n}\n\n/** Gets integrations to install */\nfunction getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = utils.arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = findIndex(finalIntegrations, integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nfunction setupIntegrations(client, integrations) {\n const integrationIndex = {};\n\n integrations.forEach(integration => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n}\n\n/**\n * Execute the `afterAllSetup` hooks of the given integrations.\n */\nfunction afterSetupIntegrations(client, integrations) {\n for (const integration of integrations) {\n // guard against empty provided integrations\n if (integration && integration.afterAllSetup) {\n integration.afterAllSetup(client);\n }\n }\n}\n\n/** Setup a single integration. */\nfunction setupIntegration(client, integration, integrationIndex) {\n if (integrationIndex[integration.name]) {\n debugBuild.DEBUG_BUILD && utils.logger.log(`Integration skipped because it was already installed: ${integration.name}`);\n return;\n }\n integrationIndex[integration.name] = integration;\n\n // `setupOnce` is only called the first time\n if (installedIntegrations.indexOf(integration.name) === -1) {\n // eslint-disable-next-line deprecation/deprecation\n integration.setupOnce(eventProcessors.addGlobalEventProcessor, hub.getCurrentHub);\n installedIntegrations.push(integration.name);\n }\n\n // `setup` is run for each client\n if (integration.setup && typeof integration.setup === 'function') {\n integration.setup(client);\n }\n\n if (client.on && typeof integration.preprocessEvent === 'function') {\n const callback = integration.preprocessEvent.bind(integration) ;\n client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n }\n\n if (client.addEventProcessor && typeof integration.processEvent === 'function') {\n const callback = integration.processEvent.bind(integration) ;\n\n const processor = Object.assign((event, hint) => callback(event, hint, client), {\n id: integration.name,\n });\n\n client.addEventProcessor(processor);\n }\n\n debugBuild.DEBUG_BUILD && utils.logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current hub's client. */\nfunction addIntegration(integration) {\n const client = exports$1.getClient();\n\n if (!client || !client.addIntegration) {\n debugBuild.DEBUG_BUILD && utils.logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n\n client.addIntegration(integration);\n}\n\n// Polyfill for Array.findIndex(), which is not supported in ES5\nfunction findIndex(arr, callback) {\n for (let i = 0; i < arr.length; i++) {\n if (callback(arr[i]) === true) {\n return i;\n }\n }\n\n return -1;\n}\n\n/**\n * Convert a new integration function to the legacy class syntax.\n * In v8, we can remove this and instead export the integration functions directly.\n *\n * @deprecated This will be removed in v8!\n */\nfunction convertIntegrationFnToClass(\n name,\n fn,\n) {\n return Object.assign(\n function ConvertedIntegration(...args) {\n return fn(...args);\n },\n { id: name },\n ) ;\n}\n\n/**\n * Define an integration function that can be used to create an integration instance.\n * Note that this by design hides the implementation details of the integration, as they are considered internal.\n */\nfunction defineIntegration(fn) {\n return fn;\n}\n\nexports.addIntegration = addIntegration;\nexports.afterSetupIntegrations = afterSetupIntegrations;\nexports.convertIntegrationFnToClass = convertIntegrationFnToClass;\nexports.defineIntegration = defineIntegration;\nexports.getIntegrationsToSetup = getIntegrationsToSetup;\nexports.installedIntegrations = installedIntegrations;\nexports.setupIntegration = setupIntegration;\nexports.setupIntegrations = setupIntegrations;\n//# sourceMappingURL=integration.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst exports$1 = require('../exports.js');\nconst integration = require('../integration.js');\n\nlet originalFunctionToString;\n\nconst INTEGRATION_NAME = 'FunctionToString';\n\nconst SETUP_CLIENTS = new WeakMap();\n\nconst _functionToStringIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // intrinsics (like Function.prototype) might be immutable in some environments\n // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function ( ...args) {\n const originalFunction = utils.getOriginalFunction(this);\n const context =\n SETUP_CLIENTS.has(exports$1.getClient() ) && originalFunction !== undefined ? originalFunction : this;\n return originalFunctionToString.apply(context, args);\n };\n } catch (e) {\n // ignore errors here, just don't patch this\n }\n },\n setup(client) {\n SETUP_CLIENTS.set(client, true);\n },\n };\n}) ;\n\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * ```js\n * Sentry.init({\n * integrations: [\n * functionToStringIntegration(),\n * ],\n * });\n * ```\n */\nconst functionToStringIntegration = integration.defineIntegration(_functionToStringIntegration);\n\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * @deprecated Use `functionToStringIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst FunctionToString = integration.convertIntegrationFnToClass(\n INTEGRATION_NAME,\n functionToStringIntegration,\n) ;\n\n// eslint-disable-next-line deprecation/deprecation\n\nexports.FunctionToString = FunctionToString;\nexports.functionToStringIntegration = functionToStringIntegration;\n//# sourceMappingURL=functiontostring.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\nconst integration = require('../integration.js');\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\nconst DEFAULT_IGNORE_TRANSACTIONS = [\n /^.*\\/healthcheck$/,\n /^.*\\/healthy$/,\n /^.*\\/live$/,\n /^.*\\/ready$/,\n /^.*\\/heartbeat$/,\n /^.*\\/health$/,\n /^.*\\/healthz$/,\n];\n\n/** Options for the InboundFilters integration */\n\nconst INTEGRATION_NAME = 'InboundFilters';\nconst _inboundFiltersIntegration = ((options = {}) => {\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent(event, _hint, client) {\n const clientOptions = client.getOptions();\n const mergedOptions = _mergeOptions(options, clientOptions);\n return _shouldDropEvent(event, mergedOptions) ? null : event;\n },\n };\n}) ;\n\nconst inboundFiltersIntegration = integration.defineIntegration(_inboundFiltersIntegration);\n\n/**\n * Inbound filters configurable by the user.\n * @deprecated Use `inboundFiltersIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst InboundFilters = integration.convertIntegrationFnToClass(\n INTEGRATION_NAME,\n inboundFiltersIntegration,\n)\n\n;\n\nfunction _mergeOptions(\n internalOptions = {},\n clientOptions = {},\n) {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [\n ...(internalOptions.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n ],\n ignoreTransactions: [\n ...(internalOptions.ignoreTransactions || []),\n ...(clientOptions.ignoreTransactions || []),\n ...(internalOptions.disableTransactionDefaults ? [] : DEFAULT_IGNORE_TRANSACTIONS),\n ],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n\nfunction _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${utils.getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${utils.getEventDescription(event)}`,\n );\n return true;\n }\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn(\n `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${utils.getEventDescription(event)}`,\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${utils.getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${utils.getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n}\n\nfunction _isIgnoredError(event, ignoreErrors) {\n // If event.type, this is not an error\n if (event.type || !ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n\n return _getPossibleEventMessages(event).some(message => utils.stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event, ignoreTransactions) {\n if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n return false;\n }\n\n const name = event.transaction;\n return name ? utils.stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event, denyUrls) {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : utils.stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event, allowUrls) {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : utils.stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getPossibleEventMessages(event) {\n const possibleMessages = [];\n\n if (event.message) {\n possibleMessages.push(event.message);\n }\n\n let lastException;\n try {\n // @ts-expect-error Try catching to save bundle size\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n lastException = event.exception.values[event.exception.values.length - 1];\n } catch (e) {\n // try catching to save bundle size checking existence of variables\n }\n\n if (lastException) {\n if (lastException.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n }\n\n if (debugBuild.DEBUG_BUILD && possibleMessages.length === 0) {\n utils.logger.error(`Could not extract message for event ${utils.getEventDescription(event)}`);\n }\n\n return possibleMessages;\n}\n\nfunction _isSentryError(event) {\n try {\n // @ts-expect-error can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\n\nfunction _getLastValidUrl(frames = []) {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n}\n\nfunction _getEventFilterUrl(event) {\n try {\n let frames;\n try {\n // @ts-expect-error we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n debugBuild.DEBUG_BUILD && utils.logger.error(`Cannot extract url for event ${utils.getEventDescription(event)}`);\n return null;\n }\n}\n\nexports.InboundFilters = InboundFilters;\nexports.inboundFiltersIntegration = inboundFiltersIntegration;\n//# sourceMappingURL=inboundfilters.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst functiontostring = require('./functiontostring.js');\nconst inboundfilters = require('./inboundfilters.js');\nconst linkederrors = require('./linkederrors.js');\n\n/* eslint-disable deprecation/deprecation */\n\nexports.FunctionToString = functiontostring.FunctionToString;\nexports.InboundFilters = inboundfilters.InboundFilters;\nexports.LinkedErrors = linkederrors.LinkedErrors;\n//# sourceMappingURL=index.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst integration = require('../integration.js');\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\nconst INTEGRATION_NAME = 'LinkedErrors';\n\nconst _linkedErrorsIntegration = ((options = {}) => {\n const limit = options.limit || DEFAULT_LIMIT;\n const key = options.key || DEFAULT_KEY;\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n\n utils.applyAggregateErrorsToEvent(\n utils.exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n key,\n limit,\n event,\n hint,\n );\n },\n };\n}) ;\n\nconst linkedErrorsIntegration = integration.defineIntegration(_linkedErrorsIntegration);\n\n/**\n * Adds SDK info to an event.\n * @deprecated Use `linkedErrorsIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst LinkedErrors = integration.convertIntegrationFnToClass(INTEGRATION_NAME, linkedErrorsIntegration)\n\n;\n\nexports.LinkedErrors = LinkedErrors;\nexports.linkedErrorsIntegration = linkedErrorsIntegration;\n//# sourceMappingURL=linkederrors.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst integration = require('../integration.js');\nconst metadata = require('../metadata.js');\n\nconst INTEGRATION_NAME = 'ModuleMetadata';\n\nconst _moduleMetadataIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n if (typeof client.on !== 'function') {\n return;\n }\n\n // We need to strip metadata from stack frames before sending them to Sentry since these are client side only.\n client.on('beforeEnvelope', envelope => {\n utils.forEachEnvelopeItem(envelope, (item, type) => {\n if (type === 'event') {\n const event = Array.isArray(item) ? (item )[1] : undefined;\n\n if (event) {\n metadata.stripMetadataFromStackFrames(event);\n item[1] = event;\n }\n }\n });\n });\n },\n\n processEvent(event, _hint, client) {\n const stackParser = client.getOptions().stackParser;\n metadata.addMetadataToStackFrames(stackParser, event);\n return event;\n },\n };\n}) ;\n\nconst moduleMetadataIntegration = integration.defineIntegration(_moduleMetadataIntegration);\n\n/**\n * Adds module metadata to stack frames.\n *\n * Metadata can be injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n *\n * When this integration is added, the metadata passed to the bundler plugin is added to the stack frames of all events\n * under the `module_metadata` property. This can be used to help in tagging or routing of events from different teams\n * our sources\n *\n * @deprecated Use `moduleMetadataIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst ModuleMetadata = integration.convertIntegrationFnToClass(\n INTEGRATION_NAME,\n moduleMetadataIntegration,\n)\n\n;\n\nexports.ModuleMetadata = ModuleMetadata;\nexports.moduleMetadataIntegration = moduleMetadataIntegration;\n//# sourceMappingURL=metadata.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst integration = require('../integration.js');\nconst spanUtils = require('../utils/spanUtils.js');\n\nconst DEFAULT_OPTIONS = {\n include: {\n cookies: true,\n data: true,\n headers: true,\n ip: false,\n query_string: true,\n url: true,\n user: {\n id: true,\n username: true,\n email: true,\n },\n },\n transactionNamingScheme: 'methodPath',\n};\n\nconst INTEGRATION_NAME = 'RequestData';\n\nconst _requestDataIntegration = ((options = {}) => {\n const _addRequestData = utils.addRequestDataToEvent;\n const _options = {\n ...DEFAULT_OPTIONS,\n ...options,\n include: {\n // @ts-expect-error It's mad because `method` isn't a known `include` key. (It's only here and not set by default in\n // `addRequestDataToEvent` for legacy reasons. TODO (v8): Change that.)\n method: true,\n ...DEFAULT_OPTIONS.include,\n ...options.include,\n user:\n options.include && typeof options.include.user === 'boolean'\n ? options.include.user\n : {\n ...DEFAULT_OPTIONS.include.user,\n // Unclear why TS still thinks `options.include.user` could be a boolean at this point\n ...((options.include || {}).user ),\n },\n },\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent(event, _hint, client) {\n // Note: In the long run, most of the logic here should probably move into the request data utility functions. For\n // the moment it lives here, though, until https://github.com/getsentry/sentry-javascript/issues/5718 is addressed.\n // (TL;DR: Those functions touch many parts of the repo in many different ways, and need to be clened up. Once\n // that's happened, it will be easier to add this logic in without worrying about unexpected side effects.)\n const { transactionNamingScheme } = _options;\n\n const { sdkProcessingMetadata = {} } = event;\n const req = sdkProcessingMetadata.request;\n\n if (!req) {\n return event;\n }\n\n // The Express request handler takes a similar `include` option to that which can be passed to this integration.\n // If passed there, we store it in `sdkProcessingMetadata`. TODO(v8): Force express and GCP people to use this\n // integration, so that all of this passing and conversion isn't necessary\n const addRequestDataOptions =\n sdkProcessingMetadata.requestDataOptionsFromExpressHandler ||\n sdkProcessingMetadata.requestDataOptionsFromGCPWrapper ||\n convertReqDataIntegrationOptsToAddReqDataOpts(_options);\n\n const processedEvent = _addRequestData(event, req, addRequestDataOptions);\n\n // Transaction events already have the right `transaction` value\n if (event.type === 'transaction' || transactionNamingScheme === 'handler') {\n return processedEvent;\n }\n\n // In all other cases, use the request's associated transaction (if any) to overwrite the event's `transaction`\n // value with a high-quality one\n const reqWithTransaction = req ;\n const transaction = reqWithTransaction._sentryTransaction;\n if (transaction) {\n const name = spanUtils.spanToJSON(transaction).description || '';\n\n // TODO (v8): Remove the nextjs check and just base it on `transactionNamingScheme` for all SDKs. (We have to\n // keep it the way it is for the moment, because changing the names of transactions in Sentry has the potential\n // to break things like alert rules.)\n const shouldIncludeMethodInTransactionName =\n getSDKName(client) === 'sentry.javascript.nextjs'\n ? name.startsWith('/api')\n : transactionNamingScheme !== 'path';\n\n const [transactionValue] = utils.extractPathForTransaction(req, {\n path: true,\n method: shouldIncludeMethodInTransactionName,\n customRoute: name,\n });\n\n processedEvent.transaction = transactionValue;\n }\n\n return processedEvent;\n },\n };\n}) ;\n\nconst requestDataIntegration = integration.defineIntegration(_requestDataIntegration);\n\n/**\n * Add data about a request to an event. Primarily for use in Node-based SDKs, but included in `@sentry/integrations`\n * so it can be used in cross-platform SDKs like `@sentry/nextjs`.\n * @deprecated Use `requestDataIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst RequestData = integration.convertIntegrationFnToClass(INTEGRATION_NAME, requestDataIntegration)\n\n;\n\n/** Convert this integration's options to match what `addRequestDataToEvent` expects */\n/** TODO: Can possibly be deleted once https://github.com/getsentry/sentry-javascript/issues/5718 is fixed */\nfunction convertReqDataIntegrationOptsToAddReqDataOpts(\n integrationOptions,\n) {\n const {\n transactionNamingScheme,\n include: { ip, user, ...requestOptions },\n } = integrationOptions;\n\n const requestIncludeKeys = [];\n for (const [key, value] of Object.entries(requestOptions)) {\n if (value) {\n requestIncludeKeys.push(key);\n }\n }\n\n let addReqDataUserOpt;\n if (user === undefined) {\n addReqDataUserOpt = true;\n } else if (typeof user === 'boolean') {\n addReqDataUserOpt = user;\n } else {\n const userIncludeKeys = [];\n for (const [key, value] of Object.entries(user)) {\n if (value) {\n userIncludeKeys.push(key);\n }\n }\n addReqDataUserOpt = userIncludeKeys;\n }\n\n return {\n include: {\n ip,\n user: addReqDataUserOpt,\n request: requestIncludeKeys.length !== 0 ? requestIncludeKeys : undefined,\n transaction: transactionNamingScheme,\n },\n };\n}\n\nfunction getSDKName(client) {\n try {\n // For a long chain like this, it's fewer bytes to combine a try-catch with assuming everything is there than to\n // write out a long chain of `a && a.b && a.b.c && ...`\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return client.getOptions()._metadata.sdk.name;\n } catch (err) {\n // In theory we should never get here\n return undefined;\n }\n}\n\nexports.RequestData = RequestData;\nexports.requestDataIntegration = requestDataIntegration;\n//# sourceMappingURL=requestdata.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\n/** Keys are source filename/url, values are metadata objects. */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst filenameMetadataMap = new Map();\n/** Set of stack strings that have already been parsed. */\nconst parsedStacks = new Set();\n\nfunction ensureMetadataStacksAreParsed(parser) {\n if (!utils.GLOBAL_OBJ._sentryModuleMetadata) {\n return;\n }\n\n for (const stack of Object.keys(utils.GLOBAL_OBJ._sentryModuleMetadata)) {\n const metadata = utils.GLOBAL_OBJ._sentryModuleMetadata[stack];\n\n if (parsedStacks.has(stack)) {\n continue;\n }\n\n // Ensure this stack doesn't get parsed again\n parsedStacks.add(stack);\n\n const frames = parser(stack);\n\n // Go through the frames starting from the top of the stack and find the first one with a filename\n for (const frame of frames.reverse()) {\n if (frame.filename) {\n // Save the metadata for this filename\n filenameMetadataMap.set(frame.filename, metadata);\n break;\n }\n }\n }\n}\n\n/**\n * Retrieve metadata for a specific JavaScript file URL.\n *\n * Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getMetadataForUrl(parser, filename) {\n ensureMetadataStacksAreParsed(parser);\n return filenameMetadataMap.get(filename);\n}\n\n/**\n * Adds metadata to stack frames.\n *\n * Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n */\nfunction addMetadataToStackFrames(parser, event) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n if (!exception.stacktrace) {\n return;\n }\n\n for (const frame of exception.stacktrace.frames || []) {\n if (!frame.filename) {\n continue;\n }\n\n const metadata = getMetadataForUrl(parser, frame.filename);\n\n if (metadata) {\n frame.module_metadata = metadata;\n }\n }\n });\n } catch (_) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Strips metadata from stack frames.\n */\nfunction stripMetadataFromStackFrames(event) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n if (!exception.stacktrace) {\n return;\n }\n\n for (const frame of exception.stacktrace.frames || []) {\n delete frame.module_metadata;\n }\n });\n } catch (_) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\nexports.addMetadataToStackFrames = addMetadataToStackFrames;\nexports.getMetadataForUrl = getMetadataForUrl;\nexports.stripMetadataFromStackFrames = stripMetadataFromStackFrames;\n//# sourceMappingURL=metadata.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils$1 = require('@sentry/utils');\nconst constants = require('./constants.js');\nconst instance = require('./instance.js');\nconst metricSummary = require('./metric-summary.js');\nconst utils = require('./utils.js');\n\n/**\n * A metrics aggregator that aggregates metrics in memory and flushes them periodically.\n */\nclass MetricsAggregator {\n // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets\n // when the aggregator is garbage collected.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n\n // Different metrics have different weights. We use this to limit the number of metrics\n // that we store in memory.\n\n // SDKs are required to shift the flush interval by random() * rollup_in_seconds.\n // That shift is determined once per startup to create jittering.\n\n // An SDK is required to perform force flushing ahead of scheduled time if the memory\n // pressure is too high. There is no rule for this other than that SDKs should be tracking\n // abstract aggregation complexity (eg: a counter only carries a single float, whereas a\n // distribution is a float per emission).\n //\n // Force flush is used on either shutdown, flush() or when we exceed the max weight.\n\n constructor( _client) {this._client = _client;\n this._buckets = new Map();\n this._bucketsTotalWeight = 0;\n this._interval = setInterval(() => this._flush(), constants.DEFAULT_FLUSH_INTERVAL);\n this._flushShift = Math.floor((Math.random() * constants.DEFAULT_FLUSH_INTERVAL) / 1000);\n this._forceFlush = false;\n }\n\n /**\n * @inheritDoc\n */\n add(\n metricType,\n unsanitizedName,\n value,\n unit = 'none',\n unsanitizedTags = {},\n maybeFloatTimestamp = utils$1.timestampInSeconds(),\n ) {\n const timestamp = Math.floor(maybeFloatTimestamp);\n const name = unsanitizedName.replace(constants.NAME_AND_TAG_KEY_NORMALIZATION_REGEX, '_');\n const tags = utils.sanitizeTags(unsanitizedTags);\n\n const bucketKey = utils.getBucketKey(metricType, name, unit, tags);\n\n let bucketItem = this._buckets.get(bucketKey);\n // If this is a set metric, we need to calculate the delta from the previous weight.\n const previousWeight = bucketItem && metricType === constants.SET_METRIC_TYPE ? bucketItem.metric.weight : 0;\n\n if (bucketItem) {\n bucketItem.metric.add(value);\n // TODO(abhi): Do we need this check?\n if (bucketItem.timestamp < timestamp) {\n bucketItem.timestamp = timestamp;\n }\n } else {\n bucketItem = {\n // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size.\n metric: new instance.METRIC_MAP[metricType](value),\n timestamp,\n metricType,\n name,\n unit,\n tags,\n };\n this._buckets.set(bucketKey, bucketItem);\n }\n\n // If value is a string, it's a set metric so calculate the delta from the previous weight.\n const val = typeof value === 'string' ? bucketItem.metric.weight - previousWeight : value;\n metricSummary.updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey);\n\n // We need to keep track of the total weight of the buckets so that we can\n // flush them when we exceed the max weight.\n this._bucketsTotalWeight += bucketItem.metric.weight;\n\n if (this._bucketsTotalWeight >= constants.MAX_WEIGHT) {\n this.flush();\n }\n }\n\n /**\n * Flushes the current metrics to the transport via the transport.\n */\n flush() {\n this._forceFlush = true;\n this._flush();\n }\n\n /**\n * Shuts down metrics aggregator and clears all metrics.\n */\n close() {\n this._forceFlush = true;\n clearInterval(this._interval);\n this._flush();\n }\n\n /**\n * Flushes the buckets according to the internal state of the aggregator.\n * If it is a force flush, which happens on shutdown, it will flush all buckets.\n * Otherwise, it will only flush buckets that are older than the flush interval,\n * and according to the flush shift.\n *\n * This function mutates `_forceFlush` and `_bucketsTotalWeight` properties.\n */\n _flush() {\n // TODO(@anonrig): Add Atomics for locking to avoid having force flush and regular flush\n // running at the same time.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics\n\n // This path eliminates the need for checking for timestamps since we're forcing a flush.\n // Remember to reset the flag, or it will always flush all metrics.\n if (this._forceFlush) {\n this._forceFlush = false;\n this._bucketsTotalWeight = 0;\n this._captureMetrics(this._buckets);\n this._buckets.clear();\n return;\n }\n const cutoffSeconds = Math.floor(utils$1.timestampInSeconds()) - constants.DEFAULT_FLUSH_INTERVAL / 1000 - this._flushShift;\n // TODO(@anonrig): Optimization opportunity.\n // Convert this map to an array and store key in the bucketItem.\n const flushedBuckets = new Map();\n for (const [key, bucket] of this._buckets) {\n if (bucket.timestamp <= cutoffSeconds) {\n flushedBuckets.set(key, bucket);\n this._bucketsTotalWeight -= bucket.metric.weight;\n }\n }\n\n for (const [key] of flushedBuckets) {\n this._buckets.delete(key);\n }\n\n this._captureMetrics(flushedBuckets);\n }\n\n /**\n * Only captures a subset of the buckets passed to this function.\n * @param flushedBuckets\n */\n _captureMetrics(flushedBuckets) {\n if (flushedBuckets.size > 0 && this._client.captureAggregateMetrics) {\n // TODO(@anonrig): Optimization opportunity.\n // This copy operation can be avoided if we store the key in the bucketItem.\n const buckets = Array.from(flushedBuckets).map(([, bucketItem]) => bucketItem);\n this._client.captureAggregateMetrics(buckets);\n }\n }\n}\n\nexports.MetricsAggregator = MetricsAggregator;\n//# sourceMappingURL=aggregator.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils$1 = require('@sentry/utils');\nconst constants = require('./constants.js');\nconst instance = require('./instance.js');\nconst metricSummary = require('./metric-summary.js');\nconst utils = require('./utils.js');\n\n/**\n * A simple metrics aggregator that aggregates metrics in memory and flushes them periodically.\n * Default flush interval is 5 seconds.\n *\n * @experimental This API is experimental and might change in the future.\n */\nclass BrowserMetricsAggregator {\n // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets\n // when the aggregator is garbage collected.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n\n constructor( _client) {this._client = _client;\n this._buckets = new Map();\n this._interval = setInterval(() => this.flush(), constants.DEFAULT_BROWSER_FLUSH_INTERVAL);\n }\n\n /**\n * @inheritDoc\n */\n add(\n metricType,\n unsanitizedName,\n value,\n unit = 'none',\n unsanitizedTags = {},\n maybeFloatTimestamp = utils$1.timestampInSeconds(),\n ) {\n const timestamp = Math.floor(maybeFloatTimestamp);\n const name = unsanitizedName.replace(constants.NAME_AND_TAG_KEY_NORMALIZATION_REGEX, '_');\n const tags = utils.sanitizeTags(unsanitizedTags);\n\n const bucketKey = utils.getBucketKey(metricType, name, unit, tags);\n\n let bucketItem = this._buckets.get(bucketKey);\n // If this is a set metric, we need to calculate the delta from the previous weight.\n const previousWeight = bucketItem && metricType === constants.SET_METRIC_TYPE ? bucketItem.metric.weight : 0;\n\n if (bucketItem) {\n bucketItem.metric.add(value);\n // TODO(abhi): Do we need this check?\n if (bucketItem.timestamp < timestamp) {\n bucketItem.timestamp = timestamp;\n }\n } else {\n bucketItem = {\n // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size.\n metric: new instance.METRIC_MAP[metricType](value),\n timestamp,\n metricType,\n name,\n unit,\n tags,\n };\n this._buckets.set(bucketKey, bucketItem);\n }\n\n // If value is a string, it's a set metric so calculate the delta from the previous weight.\n const val = typeof value === 'string' ? bucketItem.metric.weight - previousWeight : value;\n metricSummary.updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey);\n }\n\n /**\n * @inheritDoc\n */\n flush() {\n // short circuit if buckets are empty.\n if (this._buckets.size === 0) {\n return;\n }\n if (this._client.captureAggregateMetrics) {\n // TODO(@anonrig): Use Object.values() when we support ES6+\n const metricBuckets = Array.from(this._buckets).map(([, bucketItem]) => bucketItem);\n this._client.captureAggregateMetrics(metricBuckets);\n }\n this._buckets.clear();\n }\n\n /**\n * @inheritDoc\n */\n close() {\n clearInterval(this._interval);\n this.flush();\n }\n}\n\nexports.BrowserMetricsAggregator = BrowserMetricsAggregator;\n//# sourceMappingURL=browser-aggregator.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst COUNTER_METRIC_TYPE = 'c' ;\nconst GAUGE_METRIC_TYPE = 'g' ;\nconst SET_METRIC_TYPE = 's' ;\nconst DISTRIBUTION_METRIC_TYPE = 'd' ;\n\n/**\n * Normalization regex for metric names and metric tag names.\n *\n * This enforces that names and tag keys only contain alphanumeric characters,\n * underscores, forward slashes, periods, and dashes.\n *\n * See: https://develop.sentry.dev/sdk/metrics/#normalization\n */\nconst NAME_AND_TAG_KEY_NORMALIZATION_REGEX = /[^a-zA-Z0-9_/.-]+/g;\n\n/**\n * Normalization regex for metric tag values.\n *\n * This enforces that values only contain words, digits, or the following\n * special characters: _:/@.{}[\\]$-\n *\n * See: https://develop.sentry.dev/sdk/metrics/#normalization\n */\nconst TAG_VALUE_NORMALIZATION_REGEX = /[^\\w\\d\\s_:/@.{}[\\]$-]+/g;\n\n/**\n * This does not match spec in https://develop.sentry.dev/sdk/metrics\n * but was chosen to optimize for the most common case in browser environments.\n */\nconst DEFAULT_BROWSER_FLUSH_INTERVAL = 5000;\n\n/**\n * SDKs are required to bucket into 10 second intervals (rollup in seconds)\n * which is the current lower bound of metric accuracy.\n */\nconst DEFAULT_FLUSH_INTERVAL = 10000;\n\n/**\n * The maximum number of metrics that should be stored in memory.\n */\nconst MAX_WEIGHT = 10000;\n\nexports.COUNTER_METRIC_TYPE = COUNTER_METRIC_TYPE;\nexports.DEFAULT_BROWSER_FLUSH_INTERVAL = DEFAULT_BROWSER_FLUSH_INTERVAL;\nexports.DEFAULT_FLUSH_INTERVAL = DEFAULT_FLUSH_INTERVAL;\nexports.DISTRIBUTION_METRIC_TYPE = DISTRIBUTION_METRIC_TYPE;\nexports.GAUGE_METRIC_TYPE = GAUGE_METRIC_TYPE;\nexports.MAX_WEIGHT = MAX_WEIGHT;\nexports.NAME_AND_TAG_KEY_NORMALIZATION_REGEX = NAME_AND_TAG_KEY_NORMALIZATION_REGEX;\nexports.SET_METRIC_TYPE = SET_METRIC_TYPE;\nexports.TAG_VALUE_NORMALIZATION_REGEX = TAG_VALUE_NORMALIZATION_REGEX;\n//# sourceMappingURL=constants.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst utils$1 = require('./utils.js');\n\n/**\n * Create envelope from a metric aggregate.\n */\nfunction createMetricEnvelope(\n metricBucketItems,\n dsn,\n metadata,\n tunnel,\n) {\n const headers = {\n sent_at: new Date().toISOString(),\n };\n\n if (metadata && metadata.sdk) {\n headers.sdk = {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n };\n }\n\n if (!!tunnel && dsn) {\n headers.dsn = utils.dsnToString(dsn);\n }\n\n const item = createMetricEnvelopeItem(metricBucketItems);\n return utils.createEnvelope(headers, [item]);\n}\n\nfunction createMetricEnvelopeItem(metricBucketItems) {\n const payload = utils$1.serializeMetricBuckets(metricBucketItems);\n const metricHeaders = {\n type: 'statsd',\n length: payload.length,\n };\n return [metricHeaders, payload];\n}\n\nexports.createMetricEnvelope = createMetricEnvelope;\n//# sourceMappingURL=envelope.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\nconst exports$1 = require('../exports.js');\nconst spanUtils = require('../utils/spanUtils.js');\nconst constants = require('./constants.js');\nconst integration = require('./integration.js');\n\nfunction addToMetricsAggregator(\n metricType,\n name,\n value,\n data = {},\n) {\n const client = exports$1.getClient();\n const scope = exports$1.getCurrentScope();\n if (client) {\n if (!client.metricsAggregator) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn('No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs');\n return;\n }\n const { unit, tags, timestamp } = data;\n const { release, environment } = client.getOptions();\n // eslint-disable-next-line deprecation/deprecation\n const transaction = scope.getTransaction();\n const metricTags = {};\n if (release) {\n metricTags.release = release;\n }\n if (environment) {\n metricTags.environment = environment;\n }\n if (transaction) {\n metricTags.transaction = spanUtils.spanToJSON(transaction).description || '';\n }\n\n debugBuild.DEBUG_BUILD && utils.logger.log(`Adding value of ${value} to ${metricType} metric ${name}`);\n client.metricsAggregator.add(metricType, name, value, unit, { ...metricTags, ...tags }, timestamp);\n }\n}\n\n/**\n * Adds a value to a counter metric\n *\n * @experimental This API is experimental and might have breaking changes in the future.\n */\nfunction increment(name, value = 1, data) {\n addToMetricsAggregator(constants.COUNTER_METRIC_TYPE, name, value, data);\n}\n\n/**\n * Adds a value to a distribution metric\n *\n * @experimental This API is experimental and might have breaking changes in the future.\n */\nfunction distribution(name, value, data) {\n addToMetricsAggregator(constants.DISTRIBUTION_METRIC_TYPE, name, value, data);\n}\n\n/**\n * Adds a value to a set metric. Value must be a string or integer.\n *\n * @experimental This API is experimental and might have breaking changes in the future.\n */\nfunction set(name, value, data) {\n addToMetricsAggregator(constants.SET_METRIC_TYPE, name, value, data);\n}\n\n/**\n * Adds a value to a gauge metric\n *\n * @experimental This API is experimental and might have breaking changes in the future.\n */\nfunction gauge(name, value, data) {\n addToMetricsAggregator(constants.GAUGE_METRIC_TYPE, name, value, data);\n}\n\nconst metrics = {\n increment,\n distribution,\n set,\n gauge,\n /** @deprecated Use `metrics.metricsAggregratorIntegration()` instead. */\n // eslint-disable-next-line deprecation/deprecation\n MetricsAggregator: integration.MetricsAggregator,\n metricsAggregatorIntegration: integration.metricsAggregatorIntegration,\n};\n\nexports.distribution = distribution;\nexports.gauge = gauge;\nexports.increment = increment;\nexports.metrics = metrics;\nexports.set = set;\n//# sourceMappingURL=exports.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst constants = require('./constants.js');\nconst utils = require('./utils.js');\n\n/**\n * A metric instance representing a counter.\n */\nclass CounterMetric {\n constructor( _value) {this._value = _value;}\n\n /** @inheritDoc */\n get weight() {\n return 1;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value += value;\n }\n\n /** @inheritdoc */\n toString() {\n return `${this._value}`;\n }\n}\n\n/**\n * A metric instance representing a gauge.\n */\nclass GaugeMetric {\n\n constructor(value) {\n this._last = value;\n this._min = value;\n this._max = value;\n this._sum = value;\n this._count = 1;\n }\n\n /** @inheritDoc */\n get weight() {\n return 5;\n }\n\n /** @inheritdoc */\n add(value) {\n this._last = value;\n if (value < this._min) {\n this._min = value;\n }\n if (value > this._max) {\n this._max = value;\n }\n this._sum += value;\n this._count++;\n }\n\n /** @inheritdoc */\n toString() {\n return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`;\n }\n}\n\n/**\n * A metric instance representing a distribution.\n */\nclass DistributionMetric {\n\n constructor(first) {\n this._value = [first];\n }\n\n /** @inheritDoc */\n get weight() {\n return this._value.length;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value.push(value);\n }\n\n /** @inheritdoc */\n toString() {\n return this._value.join(':');\n }\n}\n\n/**\n * A metric instance representing a set.\n */\nclass SetMetric {\n\n constructor( first) {this.first = first;\n this._value = new Set([first]);\n }\n\n /** @inheritDoc */\n get weight() {\n return this._value.size;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value.add(value);\n }\n\n /** @inheritdoc */\n toString() {\n return Array.from(this._value)\n .map(val => (typeof val === 'string' ? utils.simpleHash(val) : val))\n .join(':');\n }\n}\n\nconst METRIC_MAP = {\n [constants.COUNTER_METRIC_TYPE]: CounterMetric,\n [constants.GAUGE_METRIC_TYPE]: GaugeMetric,\n [constants.DISTRIBUTION_METRIC_TYPE]: DistributionMetric,\n [constants.SET_METRIC_TYPE]: SetMetric,\n};\n\nexports.CounterMetric = CounterMetric;\nexports.DistributionMetric = DistributionMetric;\nexports.GaugeMetric = GaugeMetric;\nexports.METRIC_MAP = METRIC_MAP;\nexports.SetMetric = SetMetric;\n//# sourceMappingURL=instance.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst integration = require('../integration.js');\nconst browserAggregator = require('./browser-aggregator.js');\n\nconst INTEGRATION_NAME = 'MetricsAggregator';\n\nconst _metricsAggregatorIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n client.metricsAggregator = new browserAggregator.BrowserMetricsAggregator(client);\n },\n };\n}) ;\n\nconst metricsAggregatorIntegration = integration.defineIntegration(_metricsAggregatorIntegration);\n\n/**\n * Enables Sentry metrics monitoring.\n *\n * @experimental This API is experimental and might having breaking changes in the future.\n * @deprecated Use `metricsAggegratorIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst MetricsAggregator = integration.convertIntegrationFnToClass(\n INTEGRATION_NAME,\n metricsAggregatorIntegration,\n) ;\n\nexports.MetricsAggregator = MetricsAggregator;\nexports.metricsAggregatorIntegration = metricsAggregatorIntegration;\n//# sourceMappingURL=integration.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nrequire('../debug-build.js');\nrequire('../tracing/errors.js');\nrequire('../tracing/spanstatus.js');\nconst trace = require('../tracing/trace.js');\n\n/**\n * key: bucketKey\n * value: [exportKey, MetricSummary]\n */\n\nlet SPAN_METRIC_SUMMARY;\n\nfunction getMetricStorageForSpan(span) {\n return SPAN_METRIC_SUMMARY ? SPAN_METRIC_SUMMARY.get(span) : undefined;\n}\n\n/**\n * Fetches the metric summary if it exists for the passed span\n */\nfunction getMetricSummaryJsonForSpan(span) {\n const storage = getMetricStorageForSpan(span);\n\n if (!storage) {\n return undefined;\n }\n const output = {};\n\n for (const [, [exportKey, summary]] of storage) {\n if (!output[exportKey]) {\n output[exportKey] = [];\n }\n\n output[exportKey].push(utils.dropUndefinedKeys(summary));\n }\n\n return output;\n}\n\n/**\n * Updates the metric summary on the currently active span\n */\nfunction updateMetricSummaryOnActiveSpan(\n metricType,\n sanitizedName,\n value,\n unit,\n tags,\n bucketKey,\n) {\n const span = trace.getActiveSpan();\n if (span) {\n const storage = getMetricStorageForSpan(span) || new Map();\n\n const exportKey = `${metricType}:${sanitizedName}@${unit}`;\n const bucketItem = storage.get(bucketKey);\n\n if (bucketItem) {\n const [, summary] = bucketItem;\n storage.set(bucketKey, [\n exportKey,\n {\n min: Math.min(summary.min, value),\n max: Math.max(summary.max, value),\n count: (summary.count += 1),\n sum: (summary.sum += value),\n tags: summary.tags,\n },\n ]);\n } else {\n storage.set(bucketKey, [\n exportKey,\n {\n min: value,\n max: value,\n count: 1,\n sum: value,\n tags,\n },\n ]);\n }\n\n if (!SPAN_METRIC_SUMMARY) {\n SPAN_METRIC_SUMMARY = new WeakMap();\n }\n\n SPAN_METRIC_SUMMARY.set(span, storage);\n }\n}\n\nexports.getMetricSummaryJsonForSpan = getMetricSummaryJsonForSpan;\nexports.updateMetricSummaryOnActiveSpan = updateMetricSummaryOnActiveSpan;\n//# sourceMappingURL=metric-summary.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst constants = require('./constants.js');\n\n/**\n * Generate bucket key from metric properties.\n */\nfunction getBucketKey(\n metricType,\n name,\n unit,\n tags,\n) {\n const stringifiedTags = Object.entries(utils.dropUndefinedKeys(tags)).sort((a, b) => a[0].localeCompare(b[0]));\n return `${metricType}${name}${unit}${stringifiedTags}`;\n}\n\n/* eslint-disable no-bitwise */\n/**\n * Simple hash function for strings.\n */\nfunction simpleHash(s) {\n let rv = 0;\n for (let i = 0; i < s.length; i++) {\n const c = s.charCodeAt(i);\n rv = (rv << 5) - rv + c;\n rv &= rv;\n }\n return rv >>> 0;\n}\n/* eslint-enable no-bitwise */\n\n/**\n * Serialize metrics buckets into a string based on statsd format.\n *\n * Example of format:\n * metric.name@second:1:1.2|d|#a:value,b:anothervalue|T12345677\n * Segments:\n * name: metric.name\n * unit: second\n * value: [1, 1.2]\n * type of metric: d (distribution)\n * tags: { a: value, b: anothervalue }\n * timestamp: 12345677\n */\nfunction serializeMetricBuckets(metricBucketItems) {\n let out = '';\n for (const item of metricBucketItems) {\n const tagEntries = Object.entries(item.tags);\n const maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(',')}` : '';\n out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp}\\n`;\n }\n return out;\n}\n\n/**\n * Sanitizes tags.\n */\nfunction sanitizeTags(unsanitizedTags) {\n const tags = {};\n for (const key in unsanitizedTags) {\n if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) {\n const sanitizedKey = key.replace(constants.NAME_AND_TAG_KEY_NORMALIZATION_REGEX, '_');\n tags[sanitizedKey] = String(unsanitizedTags[key]).replace(constants.TAG_VALUE_NORMALIZATION_REGEX, '');\n }\n }\n return tags;\n}\n\nexports.getBucketKey = getBucketKey;\nexports.sanitizeTags = sanitizeTags;\nexports.serializeMetricBuckets = serializeMetricBuckets;\nexports.simpleHash = simpleHash;\n//# sourceMappingURL=utils.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst eventProcessors = require('./eventProcessors.js');\nconst session = require('./session.js');\nconst applyScopeDataToEvent = require('./utils/applyScopeDataToEvent.js');\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * The global scope is kept in this module.\n * When accessing this via `getGlobalScope()` we'll make sure to set one if none is currently present.\n */\nlet globalScope;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nclass Scope {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called after {@link applyToEvent}. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n // eslint-disable-next-line deprecation/deprecation\n\n /**\n * Transaction Name\n */\n\n /** Span */\n\n /** Session */\n\n /** Request Mode Session Status */\n\n /** The client on this scope */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = generatePropagationContext();\n }\n\n /**\n * Inherit values from the parent scope.\n * @deprecated Use `scope.clone()` and `new Scope()` instead.\n */\n static clone(scope) {\n return scope ? scope.clone() : new Scope();\n }\n\n /**\n * Clone this scope instance.\n */\n clone() {\n const newScope = new Scope();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = { ...this._tags };\n newScope._extra = { ...this._extra };\n newScope._contexts = { ...this._contexts };\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._span = this._span;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._requestSession = this._requestSession;\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n newScope._propagationContext = { ...this._propagationContext };\n newScope._client = this._client;\n\n return newScope;\n }\n\n /** Update the client on the scope. */\n setClient(client) {\n this._client = client;\n }\n\n /**\n * Get the client assigned to this scope.\n *\n * It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing.\n */\n getClient() {\n return this._client;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n segment: undefined,\n username: undefined,\n };\n\n if (this._session) {\n session.updateSession(this._session, { user });\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getUser() {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n getRequestSession() {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setLevel(\n // eslint-disable-next-line deprecation/deprecation\n level,\n ) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the transaction name on the scope for future events.\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n * @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.\n */\n setSpan(span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Returns the `Span` if there is one.\n * @deprecated Use `getActiveSpan()` instead.\n */\n getSpan() {\n return this._span;\n }\n\n /**\n * Returns the `Transaction` attached to the scope (if there is one).\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\n getTransaction() {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this._span;\n // Cannot replace with getRootSpan because getRootSpan returns a span, not a transaction\n // Also, this method will be removed anyway.\n // eslint-disable-next-line deprecation/deprecation\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSession() {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n if (scopeToMerge instanceof Scope) {\n const scopeData = scopeToMerge.getScopeData();\n\n this._tags = { ...this._tags, ...scopeData.tags };\n this._extra = { ...this._extra, ...scopeData.extra };\n this._contexts = { ...this._contexts, ...scopeData.contexts };\n if (scopeData.user && Object.keys(scopeData.user).length) {\n this._user = scopeData.user;\n }\n if (scopeData.level) {\n this._level = scopeData.level;\n }\n if (scopeData.fingerprint.length) {\n this._fingerprint = scopeData.fingerprint;\n }\n if (scopeToMerge.getRequestSession()) {\n this._requestSession = scopeToMerge.getRequestSession();\n }\n if (scopeData.propagationContext) {\n this._propagationContext = scopeData.propagationContext;\n }\n } else if (utils.isPlainObject(scopeToMerge)) {\n const scopeContext = captureContext ;\n this._tags = { ...this._tags, ...scopeContext.tags };\n this._extra = { ...this._extra, ...scopeContext.extra };\n this._contexts = { ...this._contexts, ...scopeContext.contexts };\n if (scopeContext.user) {\n this._user = scopeContext.user;\n }\n if (scopeContext.level) {\n this._level = scopeContext.level;\n }\n if (scopeContext.fingerprint) {\n this._fingerprint = scopeContext.fingerprint;\n }\n if (scopeContext.requestSession) {\n this._requestSession = scopeContext.requestSession;\n }\n if (scopeContext.propagationContext) {\n this._propagationContext = scopeContext.propagationContext;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n clear() {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: utils.dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n const breadcrumbs = this._breadcrumbs;\n breadcrumbs.push(mergedBreadcrumb);\n this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `getScopeData()` instead.\n */\n getAttachments() {\n const data = this.getScopeData();\n\n return data.attachments;\n }\n\n /**\n * @inheritDoc\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /** @inheritDoc */\n getScopeData() {\n const {\n _breadcrumbs,\n _attachments,\n _contexts,\n _tags,\n _extra,\n _user,\n _level,\n _fingerprint,\n _eventProcessors,\n _propagationContext,\n _sdkProcessingMetadata,\n _transactionName,\n _span,\n } = this;\n\n return {\n breadcrumbs: _breadcrumbs,\n attachments: _attachments,\n contexts: _contexts,\n tags: _tags,\n extra: _extra,\n user: _user,\n level: _level,\n fingerprint: _fingerprint || [],\n eventProcessors: _eventProcessors,\n propagationContext: _propagationContext,\n sdkProcessingMetadata: _sdkProcessingMetadata,\n transactionName: _transactionName,\n span: _span,\n };\n }\n\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n * @deprecated Use `applyScopeDataToEvent()` directly\n */\n applyToEvent(\n event,\n hint = {},\n additionalEventProcessors = [],\n ) {\n applyScopeDataToEvent.applyScopeDataToEvent(event, this.getScopeData());\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors$1 = [\n ...additionalEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...eventProcessors.getGlobalEventProcessors(),\n ...this._eventProcessors,\n ];\n\n return eventProcessors.notifyEventProcessors(eventProcessors$1, event, hint);\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * Capture an exception for this scope.\n *\n * @param exception The exception to capture.\n * @param hint Optinal additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\n captureException(exception, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : utils.uuid4();\n\n if (!this._client) {\n utils.logger.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n\n const syntheticException = new Error('Sentry syntheticException');\n\n this._client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Capture a message for this scope.\n *\n * @param message The message to capture.\n * @param level An optional severity level to report the message with.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured message.\n */\n captureMessage(message, level, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : utils.uuid4();\n\n if (!this._client) {\n utils.logger.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n\n const syntheticException = new Error(message);\n\n this._client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Captures a manually created event for this scope and sends it to Sentry.\n *\n * @param exception The event to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : utils.uuid4();\n\n if (!this._client) {\n utils.logger.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n\n this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n return eventId;\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nfunction getGlobalScope() {\n if (!globalScope) {\n globalScope = new Scope();\n }\n\n return globalScope;\n}\n\n/**\n * This is mainly needed for tests.\n * DO NOT USE this, as this is an internal API and subject to change.\n * @hidden\n */\nfunction setGlobalScope(scope) {\n globalScope = scope;\n}\n\nfunction generatePropagationContext() {\n return {\n traceId: utils.uuid4(),\n spanId: utils.uuid4().substring(16),\n };\n}\n\nexports.Scope = Scope;\nexports.getGlobalScope = getGlobalScope;\nexports.setGlobalScope = setGlobalScope;\n//# sourceMappingURL=scope.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('./debug-build.js');\nconst exports$1 = require('./exports.js');\nconst hub = require('./hub.js');\n\n/** A class object that can instantiate Client objects. */\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nfunction initAndBind(\n clientClass,\n options,\n) {\n if (options.debug === true) {\n if (debugBuild.DEBUG_BUILD) {\n utils.logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n utils.consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n });\n }\n }\n const scope = exports$1.getCurrentScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n setCurrentClient(client);\n initializeClient(client);\n}\n\n/**\n * Make the given client the current client.\n */\nfunction setCurrentClient(client) {\n // eslint-disable-next-line deprecation/deprecation\n const hub$1 = hub.getCurrentHub();\n // eslint-disable-next-line deprecation/deprecation\n const top = hub$1.getStackTop();\n top.client = client;\n top.scope.setClient(client);\n}\n\n/**\n * Initialize the client for the current scope.\n * Make sure to call this after `setCurrentClient()`.\n */\nfunction initializeClient(client) {\n if (client.init) {\n client.init();\n // TODO v8: Remove this fallback\n // eslint-disable-next-line deprecation/deprecation\n } else if (client.setupIntegrations) {\n // eslint-disable-next-line deprecation/deprecation\n client.setupIntegrations();\n }\n}\n\nexports.initAndBind = initAndBind;\nexports.setCurrentClient = setCurrentClient;\n//# sourceMappingURL=sdk.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Use this attribute to represent the source of a span.\n * Should be one of: custom, url, route, view, component, task, unknown\n *\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Use this attribute to represent the sample rate used for a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n\n/**\n * Use this attribute to represent the operation of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n\n/**\n * Use this attribute to represent the origin of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n\n/**\n * The id of the profile that this span occured in.\n */\nconst SEMANTIC_ATTRIBUTE_PROFILE_ID = 'profile_id';\n\nexports.SEMANTIC_ATTRIBUTE_PROFILE_ID = SEMANTIC_ATTRIBUTE_PROFILE_ID;\nexports.SEMANTIC_ATTRIBUTE_SENTRY_OP = SEMANTIC_ATTRIBUTE_SENTRY_OP;\nexports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;\nexports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE;\nexports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = SEMANTIC_ATTRIBUTE_SENTRY_SOURCE;\n//# sourceMappingURL=semanticAttributes.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst baseclient = require('./baseclient.js');\nconst checkin = require('./checkin.js');\nconst debugBuild = require('./debug-build.js');\nconst exports$1 = require('./exports.js');\nconst aggregator = require('./metrics/aggregator.js');\nconst sessionflusher = require('./sessionflusher.js');\nconst hubextensions = require('./tracing/hubextensions.js');\nconst spanUtils = require('./utils/spanUtils.js');\nconst getRootSpan = require('./utils/getRootSpan.js');\nrequire('./tracing/spanstatus.js');\nconst dynamicSamplingContext = require('./tracing/dynamicSamplingContext.js');\n\n/**\n * The Sentry Server Runtime Client SDK.\n */\nclass ServerRuntimeClient\n\n extends baseclient.BaseClient {\n\n /**\n * Creates a new Edge SDK instance.\n * @param options Configuration options for this SDK.\n */\n constructor(options) {\n // Server clients always support tracing\n hubextensions.addTracingExtensions();\n\n super(options);\n\n if (options._experiments && options._experiments['metricsAggregator']) {\n this.metricsAggregator = new aggregator.MetricsAggregator(this);\n }\n }\n\n /**\n * @inheritDoc\n */\n eventFromException(exception, hint) {\n return utils.resolvedSyncPromise(utils.eventFromUnknownInput(exports$1.getClient(), this._options.stackParser, exception, hint));\n }\n\n /**\n * @inheritDoc\n */\n eventFromMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n ) {\n return utils.resolvedSyncPromise(\n utils.eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace),\n );\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n captureException(exception, hint, scope) {\n // Check if the flag `autoSessionTracking` is enabled, and if `_sessionFlusher` exists because it is initialised only\n // when the `requestHandler` middleware is used, and hence the expectation is to have SessionAggregates payload\n // sent to the Server only when the `requestHandler` middleware is used\n if (this._options.autoSessionTracking && this._sessionFlusher && scope) {\n const requestSession = scope.getRequestSession();\n\n // Necessary checks to ensure this is code block is executed only within a request\n // Should override the status only if `requestSession.status` is `Ok`, which is its initial stage\n if (requestSession && requestSession.status === 'ok') {\n requestSession.status = 'errored';\n }\n }\n\n return super.captureException(exception, hint, scope);\n }\n\n /**\n * @inheritDoc\n */\n captureEvent(event, hint, scope) {\n // Check if the flag `autoSessionTracking` is enabled, and if `_sessionFlusher` exists because it is initialised only\n // when the `requestHandler` middleware is used, and hence the expectation is to have SessionAggregates payload\n // sent to the Server only when the `requestHandler` middleware is used\n if (this._options.autoSessionTracking && this._sessionFlusher && scope) {\n const eventType = event.type || 'exception';\n const isException =\n eventType === 'exception' && event.exception && event.exception.values && event.exception.values.length > 0;\n\n // If the event is of type Exception, then a request session should be captured\n if (isException) {\n const requestSession = scope.getRequestSession();\n\n // Ensure that this is happening within the bounds of a request, and make sure not to override\n // Session Status if Errored / Crashed\n if (requestSession && requestSession.status === 'ok') {\n requestSession.status = 'errored';\n }\n }\n }\n\n return super.captureEvent(event, hint, scope);\n }\n\n /**\n *\n * @inheritdoc\n */\n close(timeout) {\n if (this._sessionFlusher) {\n this._sessionFlusher.close();\n }\n return super.close(timeout);\n }\n\n /** Method that initialises an instance of SessionFlusher on Client */\n initSessionFlusher() {\n const { release, environment } = this._options;\n if (!release) {\n debugBuild.DEBUG_BUILD && utils.logger.warn('Cannot initialise an instance of SessionFlusher if no release is provided!');\n } else {\n this._sessionFlusher = new sessionflusher.SessionFlusher(this, {\n release,\n environment,\n });\n }\n }\n\n /**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\n captureCheckIn(checkIn, monitorConfig, scope) {\n const id = 'checkInId' in checkIn && checkIn.checkInId ? checkIn.checkInId : utils.uuid4();\n if (!this._isEnabled()) {\n debugBuild.DEBUG_BUILD && utils.logger.warn('SDK not enabled, will not capture checkin.');\n return id;\n }\n\n const options = this.getOptions();\n const { release, environment, tunnel } = options;\n\n const serializedCheckIn = {\n check_in_id: id,\n monitor_slug: checkIn.monitorSlug,\n status: checkIn.status,\n release,\n environment,\n };\n\n if ('duration' in checkIn) {\n serializedCheckIn.duration = checkIn.duration;\n }\n\n if (monitorConfig) {\n serializedCheckIn.monitor_config = {\n schedule: monitorConfig.schedule,\n checkin_margin: monitorConfig.checkinMargin,\n max_runtime: monitorConfig.maxRuntime,\n timezone: monitorConfig.timezone,\n };\n }\n\n const [dynamicSamplingContext, traceContext] = this._getTraceInfoFromScope(scope);\n if (traceContext) {\n serializedCheckIn.contexts = {\n trace: traceContext,\n };\n }\n\n const envelope = checkin.createCheckInEnvelope(\n serializedCheckIn,\n dynamicSamplingContext,\n this.getSdkMetadata(),\n tunnel,\n this.getDsn(),\n );\n\n debugBuild.DEBUG_BUILD && utils.logger.info('Sending checkin:', checkIn.monitorSlug, checkIn.status);\n\n // _sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._sendEnvelope(envelope);\n\n return id;\n }\n\n /**\n * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment\n * appropriate session aggregates bucket\n */\n _captureRequestSession() {\n if (!this._sessionFlusher) {\n debugBuild.DEBUG_BUILD && utils.logger.warn('Discarded request mode session because autoSessionTracking option was disabled');\n } else {\n this._sessionFlusher.incrementSessionStatusCount();\n }\n }\n\n /**\n * @inheritDoc\n */\n _prepareEvent(\n event,\n hint,\n scope,\n isolationScope,\n ) {\n if (this._options.platform) {\n event.platform = event.platform || this._options.platform;\n }\n\n if (this._options.runtime) {\n event.contexts = {\n ...event.contexts,\n runtime: (event.contexts || {}).runtime || this._options.runtime,\n };\n }\n\n if (this._options.serverName) {\n event.server_name = event.server_name || this._options.serverName;\n }\n\n return super._prepareEvent(event, hint, scope, isolationScope);\n }\n\n /** Extract trace information from scope */\n _getTraceInfoFromScope(\n scope,\n ) {\n if (!scope) {\n return [undefined, undefined];\n }\n\n // eslint-disable-next-line deprecation/deprecation\n const span = scope.getSpan();\n if (span) {\n const samplingContext = getRootSpan.getRootSpan(span) ? dynamicSamplingContext.getDynamicSamplingContextFromSpan(span) : undefined;\n return [samplingContext, spanUtils.spanToTraceContext(span)];\n }\n\n const { traceId, spanId, parentSpanId, dsc } = scope.getPropagationContext();\n const traceContext = {\n trace_id: traceId,\n span_id: spanId,\n parent_span_id: parentSpanId,\n };\n if (dsc) {\n return [dsc, traceContext];\n }\n\n return [dynamicSamplingContext.getDynamicSamplingContextFromClient(traceId, this, scope), traceContext];\n }\n}\n\nexports.ServerRuntimeClient = ServerRuntimeClient;\n//# sourceMappingURL=server-runtime-client.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nfunction makeSession(context) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = utils.timestampInSeconds();\n\n const session = {\n sid: utils.uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nfunction updateSession(session, context = {}) {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || utils.timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : utils.uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nfunction closeSession(session, status) {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session) {\n return utils.dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n });\n}\n\nexports.closeSession = closeSession;\nexports.makeSession = makeSession;\nexports.updateSession = updateSession;\n//# sourceMappingURL=session.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst exports$1 = require('./exports.js');\n\n/**\n * @inheritdoc\n */\nclass SessionFlusher {\n\n constructor(client, attrs) {\n this._client = client;\n this.flushTimeout = 60;\n this._pendingAggregates = {};\n this._isEnabled = true;\n\n // Call to setInterval, so that flush is called every 60 seconds\n this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1000);\n this._sessionAttrs = attrs;\n }\n\n /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSession` */\n flush() {\n const sessionAggregates = this.getSessionAggregates();\n if (sessionAggregates.aggregates.length === 0) {\n return;\n }\n this._pendingAggregates = {};\n this._client.sendSession(sessionAggregates);\n }\n\n /** Massages the entries in `pendingAggregates` and returns aggregated sessions */\n getSessionAggregates() {\n const aggregates = Object.keys(this._pendingAggregates).map((key) => {\n return this._pendingAggregates[parseInt(key)];\n });\n\n const sessionAggregates = {\n attrs: this._sessionAttrs,\n aggregates,\n };\n return utils.dropUndefinedKeys(sessionAggregates);\n }\n\n /** JSDoc */\n close() {\n clearInterval(this._intervalId);\n this._isEnabled = false;\n this.flush();\n }\n\n /**\n * Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then\n * fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to\n * `_incrementSessionStatusCount` along with the start date\n */\n incrementSessionStatusCount() {\n if (!this._isEnabled) {\n return;\n }\n const scope = exports$1.getCurrentScope();\n const requestSession = scope.getRequestSession();\n\n if (requestSession && requestSession.status) {\n this._incrementSessionStatusCount(requestSession.status, new Date());\n // This is not entirely necessarily but is added as a safe guard to indicate the bounds of a request and so in\n // case captureRequestSession is called more than once to prevent double count\n scope.setRequestSession(undefined);\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n }\n }\n\n /**\n * Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of\n * the session received\n */\n _incrementSessionStatusCount(status, date) {\n // Truncate minutes and seconds on Session Started attribute to have one minute bucket keys\n const sessionStartedTrunc = new Date(date).setSeconds(0, 0);\n this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {};\n\n // corresponds to aggregated sessions in one specific minute bucket\n // for example, {\"started\":\"2021-03-16T08:00:00.000Z\",\"exited\":4, \"errored\": 1}\n const aggregationCounts = this._pendingAggregates[sessionStartedTrunc];\n if (!aggregationCounts.started) {\n aggregationCounts.started = new Date(sessionStartedTrunc).toISOString();\n }\n\n switch (status) {\n case 'errored':\n aggregationCounts.errored = (aggregationCounts.errored || 0) + 1;\n return aggregationCounts.errored;\n case 'ok':\n aggregationCounts.exited = (aggregationCounts.exited || 0) + 1;\n return aggregationCounts.exited;\n default:\n aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1;\n return aggregationCounts.crashed;\n }\n }\n}\n\nexports.SessionFlusher = SessionFlusher;\n//# sourceMappingURL=sessionflusher.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\n/**\n * Create envelope from Span item.\n */\nfunction createSpanEnvelope(spans) {\n const headers = {\n sent_at: new Date().toISOString(),\n };\n\n const items = spans.map(createSpanItem);\n return utils.createEnvelope(headers, items);\n}\n\nfunction createSpanItem(span) {\n const spanHeaders = {\n type: 'span',\n };\n return [spanHeaders, span];\n}\n\nexports.createSpanEnvelope = createSpanEnvelope;\n//# sourceMappingURL=span.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst constants = require('../constants.js');\nconst exports$1 = require('../exports.js');\nconst getRootSpan = require('../utils/getRootSpan.js');\nconst spanUtils = require('../utils/spanUtils.js');\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatches the `createDsc` lifecycle hook as a side effect.\n */\nfunction getDynamicSamplingContextFromClient(\n trace_id,\n client,\n scope,\n) {\n const options = client.getOptions();\n\n const { publicKey: public_key } = client.getDsn() || {};\n // TODO(v8): Remove segment from User\n // eslint-disable-next-line deprecation/deprecation\n const { segment: user_segment } = (scope && scope.getUser()) || {};\n\n const dsc = utils.dropUndefinedKeys({\n environment: options.environment || constants.DEFAULT_ENVIRONMENT,\n release: options.release,\n user_segment,\n public_key,\n trace_id,\n }) ;\n\n client.emit && client.emit('createDsc', dsc);\n\n return dsc;\n}\n\n/**\n * A Span with a frozen dynamic sampling context.\n */\n\n/**\n * Creates a dynamic sampling context from a span (and client and scope)\n *\n * @param span the span from which a few values like the root span name and sample rate are extracted.\n *\n * @returns a dynamic sampling context\n */\nfunction getDynamicSamplingContextFromSpan(span) {\n const client = exports$1.getClient();\n if (!client) {\n return {};\n }\n\n // passing emit=false here to only emit later once the DSC is actually populated\n const dsc = getDynamicSamplingContextFromClient(spanUtils.spanToJSON(span).trace_id || '', client, exports$1.getCurrentScope());\n\n // TODO (v8): Remove v7FrozenDsc as a Transaction will no longer have _frozenDynamicSamplingContext\n const txn = getRootSpan.getRootSpan(span) ;\n if (!txn) {\n return dsc;\n }\n\n // TODO (v8): Remove v7FrozenDsc as a Transaction will no longer have _frozenDynamicSamplingContext\n // For now we need to avoid breaking users who directly created a txn with a DSC, where this field is still set.\n // @see Transaction class constructor\n const v7FrozenDsc = txn && txn._frozenDynamicSamplingContext;\n if (v7FrozenDsc) {\n return v7FrozenDsc;\n }\n\n // TODO (v8): Replace txn.metadata with txn.attributes[]\n // We can't do this yet because attributes aren't always set yet.\n // eslint-disable-next-line deprecation/deprecation\n const { sampleRate: maybeSampleRate, source } = txn.metadata;\n if (maybeSampleRate != null) {\n dsc.sample_rate = `${maybeSampleRate}`;\n }\n\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const jsonSpan = spanUtils.spanToJSON(txn);\n\n // after JSON conversion, txn.name becomes jsonSpan.description\n if (source && source !== 'url') {\n dsc.transaction = jsonSpan.description;\n }\n\n dsc.sampled = String(spanUtils.spanIsSampled(txn));\n\n client.emit && client.emit('createDsc', dsc);\n\n return dsc;\n}\n\nexports.getDynamicSamplingContextFromClient = getDynamicSamplingContextFromClient;\nexports.getDynamicSamplingContextFromSpan = getDynamicSamplingContextFromSpan;\n//# sourceMappingURL=dynamicSamplingContext.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\nconst utils$1 = require('./utils.js');\n\nlet errorsInstrumented = false;\n\n/**\n * Configures global error listeners\n */\nfunction registerErrorInstrumentation() {\n if (errorsInstrumented) {\n return;\n }\n\n errorsInstrumented = true;\n utils.addGlobalErrorInstrumentationHandler(errorCallback);\n utils.addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);\n}\n\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\nfunction errorCallback() {\n // eslint-disable-next-line deprecation/deprecation\n const activeTransaction = utils$1.getActiveTransaction();\n if (activeTransaction) {\n const status = 'internal_error';\n debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Transaction: ${status} -> Global error occured`);\n activeTransaction.setStatus(status);\n }\n}\n\n// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the\n// node.js default exit behaviour\nerrorCallback.tag = 'sentry_tracingErrorCallback';\n\nexports.registerErrorInstrumentation = registerErrorInstrumentation;\n//# sourceMappingURL=errors.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\nconst hub = require('../hub.js');\nconst spanUtils = require('../utils/spanUtils.js');\nconst errors = require('./errors.js');\nconst idletransaction = require('./idletransaction.js');\nconst sampling = require('./sampling.js');\nconst transaction = require('./transaction.js');\n\n/** Returns all trace headers that are currently on the top scope. */\nfunction traceHeaders() {\n // eslint-disable-next-line deprecation/deprecation\n const scope = this.getScope();\n // eslint-disable-next-line deprecation/deprecation\n const span = scope.getSpan();\n\n return span\n ? {\n 'sentry-trace': spanUtils.spanToTraceHeader(span),\n }\n : {};\n}\n\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */\nfunction _startTransaction(\n\n transactionContext,\n customSamplingContext,\n) {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n const options = (client && client.getOptions()) || {};\n\n const configInstrumenter = options.instrumenter || 'sentry';\n const transactionInstrumenter = transactionContext.instrumenter || 'sentry';\n\n if (configInstrumenter !== transactionInstrumenter) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.error(\n `A transaction was started with instrumenter=\\`${transactionInstrumenter}\\`, but the SDK is configured with the \\`${configInstrumenter}\\` instrumenter.\nThe transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.`,\n );\n\n // eslint-disable-next-line deprecation/deprecation\n transactionContext.sampled = false;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n let transaction$1 = new transaction.Transaction(transactionContext, this);\n transaction$1 = sampling.sampleTransaction(transaction$1, options, {\n name: transactionContext.name,\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n attributes: {\n // eslint-disable-next-line deprecation/deprecation\n ...transactionContext.data,\n ...transactionContext.attributes,\n },\n ...customSamplingContext,\n });\n if (transaction$1.isRecording()) {\n transaction$1.initSpanRecorder(options._experiments && (options._experiments.maxSpans ));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction$1);\n }\n return transaction$1;\n}\n\n/**\n * Create new idle transaction.\n */\nfunction startIdleTransaction(\n hub,\n transactionContext,\n idleTimeout,\n finalTimeout,\n onScope,\n customSamplingContext,\n heartbeatInterval,\n delayAutoFinishUntilSignal = false,\n) {\n // eslint-disable-next-line deprecation/deprecation\n const client = hub.getClient();\n const options = (client && client.getOptions()) || {};\n\n // eslint-disable-next-line deprecation/deprecation\n let transaction = new idletransaction.IdleTransaction(\n transactionContext,\n hub,\n idleTimeout,\n finalTimeout,\n heartbeatInterval,\n onScope,\n delayAutoFinishUntilSignal,\n );\n transaction = sampling.sampleTransaction(transaction, options, {\n name: transactionContext.name,\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n attributes: {\n // eslint-disable-next-line deprecation/deprecation\n ...transactionContext.data,\n ...transactionContext.attributes,\n },\n ...customSamplingContext,\n });\n if (transaction.isRecording()) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans ));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Adds tracing extensions to the global hub.\n */\nfunction addTracingExtensions() {\n const carrier = hub.getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n\n errors.registerErrorInstrumentation();\n}\n\nexports.addTracingExtensions = addTracingExtensions;\nexports.startIdleTransaction = startIdleTransaction;\n//# sourceMappingURL=hubextensions.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\nconst spanUtils = require('../utils/spanUtils.js');\nconst span = require('./span.js');\nconst transaction = require('./transaction.js');\n\nconst TRACING_DEFAULTS = {\n idleTimeout: 1000,\n finalTimeout: 30000,\n heartbeatInterval: 5000,\n};\n\nconst FINISH_REASON_TAG = 'finishReason';\n\nconst IDLE_TRANSACTION_FINISH_REASONS = [\n 'heartbeatFailed',\n 'idleTimeout',\n 'documentHidden',\n 'finalTimeout',\n 'externalFinish',\n 'cancelled',\n];\n\n/**\n * @inheritDoc\n */\nclass IdleTransactionSpanRecorder extends span.SpanRecorder {\n constructor(\n _pushActivity,\n _popActivity,\n transactionSpanId,\n maxlen,\n ) {\n super(maxlen);this._pushActivity = _pushActivity;this._popActivity = _popActivity;this.transactionSpanId = transactionSpanId; }\n\n /**\n * @inheritDoc\n */\n add(span) {\n // We should make sure we do not push and pop activities for\n // the transaction that this span recorder belongs to.\n if (span.spanContext().spanId !== this.transactionSpanId) {\n // We patch span.end() to pop an activity after setting an endTimestamp.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalEnd = span.end;\n span.end = (...rest) => {\n this._popActivity(span.spanContext().spanId);\n return originalEnd.apply(span, rest);\n };\n\n // We should only push new activities if the span does not have an end timestamp.\n if (spanUtils.spanToJSON(span).timestamp === undefined) {\n this._pushActivity(span.spanContext().spanId);\n }\n }\n\n super.add(span);\n }\n}\n\n/**\n * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.\n * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will\n * put itself on the scope on creation.\n */\nclass IdleTransaction extends transaction.Transaction {\n // Activities store a list of active spans\n\n // Track state of activities in previous heartbeat\n\n // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.\n\n // We should not use heartbeat if we finished a transaction\n\n // Idle timeout was canceled and we should finish the transaction with the last span end.\n\n /**\n * Timer that tracks Transaction idleTimeout\n */\n\n /**\n * @deprecated Transactions will be removed in v8. Use spans instead.\n */\n constructor(\n transactionContext,\n _idleHub,\n /**\n * The time to wait in ms until the idle transaction will be finished. This timer is started each time\n * there are no active spans on this transaction.\n */\n _idleTimeout = TRACING_DEFAULTS.idleTimeout,\n /**\n * The final value in ms that a transaction cannot exceed\n */\n _finalTimeout = TRACING_DEFAULTS.finalTimeout,\n _heartbeatInterval = TRACING_DEFAULTS.heartbeatInterval,\n // Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends\n _onScope = false,\n /**\n * When set to `true`, will disable the idle timeout (`_idleTimeout` option) and heartbeat mechanisms (`_heartbeatInterval`\n * option) until the `sendAutoFinishSignal()` method is called. The final timeout mechanism (`_finalTimeout` option)\n * will not be affected by this option, meaning the transaction will definitely be finished when the final timeout is\n * reached, no matter what this option is configured to.\n *\n * Defaults to `false`.\n */\n delayAutoFinishUntilSignal = false,\n ) {\n super(transactionContext, _idleHub);this._idleHub = _idleHub;this._idleTimeout = _idleTimeout;this._finalTimeout = _finalTimeout;this._heartbeatInterval = _heartbeatInterval;this._onScope = _onScope;\n this.activities = {};\n this._heartbeatCounter = 0;\n this._finished = false;\n this._idleTimeoutCanceledPermanently = false;\n this._beforeFinishCallbacks = [];\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[4];\n this._autoFinishAllowed = !delayAutoFinishUntilSignal;\n\n if (_onScope) {\n // We set the transaction here on the scope so error events pick up the trace\n // context and attach it to the error.\n debugBuild.DEBUG_BUILD && utils.logger.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`);\n // eslint-disable-next-line deprecation/deprecation\n _idleHub.getScope().setSpan(this);\n }\n\n if (!delayAutoFinishUntilSignal) {\n this._restartIdleTimeout();\n }\n\n setTimeout(() => {\n if (!this._finished) {\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[3];\n this.end();\n }\n }, this._finalTimeout);\n }\n\n /** {@inheritDoc} */\n end(endTimestamp) {\n const endTimestampInS = spanUtils.spanTimeInputToSeconds(endTimestamp);\n\n this._finished = true;\n this.activities = {};\n\n // eslint-disable-next-line deprecation/deprecation\n if (this.op === 'ui.action.click') {\n this.setAttribute(FINISH_REASON_TAG, this._finishReason);\n }\n\n // eslint-disable-next-line deprecation/deprecation\n if (this.spanRecorder) {\n debugBuild.DEBUG_BUILD &&\n // eslint-disable-next-line deprecation/deprecation\n utils.logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestampInS * 1000).toISOString(), this.op);\n\n for (const callback of this._beforeFinishCallbacks) {\n callback(this, endTimestampInS);\n }\n\n // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder.spans = this.spanRecorder.spans.filter((span) => {\n // If we are dealing with the transaction itself, we just return it\n if (span.spanContext().spanId === this.spanContext().spanId) {\n return true;\n }\n\n // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n if (!spanUtils.spanToJSON(span).timestamp) {\n span.setStatus('cancelled');\n span.end(endTimestampInS);\n debugBuild.DEBUG_BUILD &&\n utils.logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));\n }\n\n const { start_timestamp: startTime, timestamp: endTime } = spanUtils.spanToJSON(span);\n const spanStartedBeforeTransactionFinish = startTime && startTime < endTimestampInS;\n\n // Add a delta with idle timeout so that we prevent false positives\n const timeoutWithMarginOfError = (this._finalTimeout + this._idleTimeout) / 1000;\n const spanEndedBeforeFinalTimeout = endTime && startTime && endTime - startTime < timeoutWithMarginOfError;\n\n if (debugBuild.DEBUG_BUILD) {\n const stringifiedSpan = JSON.stringify(span, undefined, 2);\n if (!spanStartedBeforeTransactionFinish) {\n utils.logger.log('[Tracing] discarding Span since it happened after Transaction was finished', stringifiedSpan);\n } else if (!spanEndedBeforeFinalTimeout) {\n utils.logger.log('[Tracing] discarding Span since it finished after Transaction final timeout', stringifiedSpan);\n }\n }\n\n return spanStartedBeforeTransactionFinish && spanEndedBeforeFinalTimeout;\n });\n\n debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] flushing IdleTransaction');\n } else {\n debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] No active IdleTransaction');\n }\n\n // if `this._onScope` is `true`, the transaction put itself on the scope when it started\n if (this._onScope) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = this._idleHub.getScope();\n // eslint-disable-next-line deprecation/deprecation\n if (scope.getTransaction() === this) {\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(undefined);\n }\n }\n\n return super.end(endTimestamp);\n }\n\n /**\n * Register a callback function that gets executed before the transaction finishes.\n * Useful for cleanup or if you want to add any additional spans based on current context.\n *\n * This is exposed because users have no other way of running something before an idle transaction\n * finishes.\n */\n registerBeforeFinishCallback(callback) {\n this._beforeFinishCallbacks.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n initSpanRecorder(maxlen) {\n // eslint-disable-next-line deprecation/deprecation\n if (!this.spanRecorder) {\n const pushActivity = (id) => {\n if (this._finished) {\n return;\n }\n this._pushActivity(id);\n };\n const popActivity = (id) => {\n if (this._finished) {\n return;\n }\n this._popActivity(id);\n };\n\n // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanContext().spanId, maxlen);\n\n // Start heartbeat so that transactions do not run forever.\n debugBuild.DEBUG_BUILD && utils.logger.log('Starting heartbeat');\n this._pingHeartbeat();\n }\n // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder.add(this);\n }\n\n /**\n * Cancels the existing idle timeout, if there is one.\n * @param restartOnChildSpanChange Default is `true`.\n * If set to false the transaction will end\n * with the last child span.\n */\n cancelIdleTimeout(\n endTimestamp,\n {\n restartOnChildSpanChange,\n }\n\n = {\n restartOnChildSpanChange: true,\n },\n ) {\n this._idleTimeoutCanceledPermanently = restartOnChildSpanChange === false;\n if (this._idleTimeoutID) {\n clearTimeout(this._idleTimeoutID);\n this._idleTimeoutID = undefined;\n\n if (Object.keys(this.activities).length === 0 && this._idleTimeoutCanceledPermanently) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.end(endTimestamp);\n }\n }\n }\n\n /**\n * Temporary method used to externally set the transaction's `finishReason`\n *\n * ** WARNING**\n * This is for the purpose of experimentation only and will be removed in the near future, do not use!\n *\n * @internal\n *\n */\n setFinishReason(reason) {\n this._finishReason = reason;\n }\n\n /**\n * Permits the IdleTransaction to automatically end itself via the idle timeout and heartbeat mechanisms when the `delayAutoFinishUntilSignal` option was set to `true`.\n */\n sendAutoFinishSignal() {\n if (!this._autoFinishAllowed) {\n debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] Received finish signal for idle transaction.');\n this._restartIdleTimeout();\n this._autoFinishAllowed = true;\n }\n }\n\n /**\n * Restarts idle timeout, if there is no running idle timeout it will start one.\n */\n _restartIdleTimeout(endTimestamp) {\n this.cancelIdleTimeout();\n this._idleTimeoutID = setTimeout(() => {\n if (!this._finished && Object.keys(this.activities).length === 0) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[1];\n this.end(endTimestamp);\n }\n }, this._idleTimeout);\n }\n\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n _pushActivity(spanId) {\n this.cancelIdleTimeout(undefined, { restartOnChildSpanChange: !this._idleTimeoutCanceledPermanently });\n debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] pushActivity: ${spanId}`);\n this.activities[spanId] = true;\n debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n _popActivity(spanId) {\n if (this.activities[spanId]) {\n debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] popActivity ${spanId}`);\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this.activities[spanId];\n debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n if (Object.keys(this.activities).length === 0) {\n const endTimestamp = utils.timestampInSeconds();\n if (this._idleTimeoutCanceledPermanently) {\n if (this._autoFinishAllowed) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.end(endTimestamp);\n }\n } else {\n // We need to add the timeout here to have the real endtimestamp of the transaction\n // Remember timestampInSeconds is in seconds, timeout is in ms\n this._restartIdleTimeout(endTimestamp + this._idleTimeout / 1000);\n }\n }\n }\n\n /**\n * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */\n _beat() {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n\n const heartbeatString = Object.keys(this.activities).join('');\n\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter++;\n } else {\n this._heartbeatCounter = 1;\n }\n\n this._prevHeartbeatString = heartbeatString;\n\n if (this._heartbeatCounter >= 3) {\n if (this._autoFinishAllowed) {\n debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[0];\n this.end();\n }\n } else {\n this._pingHeartbeat();\n }\n }\n\n /**\n * Pings the heartbeat\n */\n _pingHeartbeat() {\n debugBuild.DEBUG_BUILD && utils.logger.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`);\n setTimeout(() => {\n this._beat();\n }, this._heartbeatInterval);\n }\n}\n\nexports.IdleTransaction = IdleTransaction;\nexports.IdleTransactionSpanRecorder = IdleTransactionSpanRecorder;\nexports.TRACING_DEFAULTS = TRACING_DEFAULTS;\n//# sourceMappingURL=idletransaction.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('./utils.js');\n\n/**\n * Adds a measurement to the current active transaction.\n */\nfunction setMeasurement(name, value, unit) {\n // eslint-disable-next-line deprecation/deprecation\n const transaction = utils.getActiveTransaction();\n if (transaction) {\n // eslint-disable-next-line deprecation/deprecation\n transaction.setMeasurement(name, value, unit);\n }\n}\n\nexports.setMeasurement = setMeasurement;\n//# sourceMappingURL=measurement.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\nconst semanticAttributes = require('../semanticAttributes.js');\nconst hasTracingEnabled = require('../utils/hasTracingEnabled.js');\nconst spanUtils = require('../utils/spanUtils.js');\n\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * This method muttes the given `transaction` and will set the `sampled` value on it.\n * It returns the same transaction, for convenience.\n */\nfunction sampleTransaction(\n transaction,\n options,\n samplingContext,\n) {\n // nothing to do if tracing is not enabled\n if (!hasTracingEnabled.hasTracingEnabled(options)) {\n // eslint-disable-next-line deprecation/deprecation\n transaction.sampled = false;\n return transaction;\n }\n\n // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n // eslint-disable-next-line deprecation/deprecation\n if (transaction.sampled !== undefined) {\n // eslint-disable-next-line deprecation/deprecation\n transaction.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(transaction.sampled));\n return transaction;\n }\n\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` nor `enableTracing` were defined, so one of these should\n // work; prefer the hook if so\n let sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext);\n transaction.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(sampleRate));\n } else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n transaction.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(sampleRate));\n } else {\n // When `enableTracing === true`, we use a sample rate of 100%\n sampleRate = 1;\n transaction.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate);\n }\n\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n if (!isValidSampleRate(sampleRate)) {\n debugBuild.DEBUG_BUILD && utils.logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n // eslint-disable-next-line deprecation/deprecation\n transaction.sampled = false;\n return transaction;\n }\n\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!sampleRate) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.log(\n `[Tracing] Discarding transaction because ${\n typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n }`,\n );\n // eslint-disable-next-line deprecation/deprecation\n transaction.sampled = false;\n return transaction;\n }\n\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n // eslint-disable-next-line deprecation/deprecation\n transaction.sampled = Math.random() < (sampleRate );\n\n // if we're not going to keep it, we're done\n // eslint-disable-next-line deprecation/deprecation\n if (!transaction.sampled) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.log(\n `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n sampleRate,\n )})`,\n );\n return transaction;\n }\n\n debugBuild.DEBUG_BUILD &&\n // eslint-disable-next-line deprecation/deprecation\n utils.logger.log(`[Tracing] starting ${transaction.op} transaction - ${spanUtils.spanToJSON(transaction).description}`);\n return transaction;\n}\n\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nfunction isValidSampleRate(rate) {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (utils.isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn(\n `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n rate,\n )} of type ${JSON.stringify(typeof rate)}.`,\n );\n return false;\n }\n\n // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n if (rate < 0 || rate > 1) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`);\n return false;\n }\n return true;\n}\n\nexports.isValidSampleRate = isValidSampleRate;\nexports.sampleTransaction = sampleTransaction;\n//# sourceMappingURL=sampling.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\nconst metricSummary = require('../metrics/metric-summary.js');\nconst semanticAttributes = require('../semanticAttributes.js');\nconst getRootSpan = require('../utils/getRootSpan.js');\nconst spanUtils = require('../utils/spanUtils.js');\nconst spanstatus = require('./spanstatus.js');\n\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */\nclass SpanRecorder {\n\n constructor(maxlen = 1000) {\n this._maxlen = maxlen;\n this.spans = [];\n }\n\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n add(span) {\n if (this.spans.length > this._maxlen) {\n // eslint-disable-next-line deprecation/deprecation\n span.spanRecorder = undefined;\n } else {\n this.spans.push(span);\n }\n }\n}\n\n/**\n * Span contains all data about a span\n */\nclass Span {\n /**\n * Tags for the span.\n * @deprecated Use `spanToJSON(span).atttributes` instead.\n */\n\n /**\n * Data for the span.\n * @deprecated Use `spanToJSON(span).atttributes` instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n /**\n * List of spans that were finalized\n *\n * @deprecated This property will no longer be public. Span recording will be handled internally.\n */\n\n /**\n * @inheritDoc\n * @deprecated Use top level `Sentry.getRootSpan()` instead\n */\n\n /**\n * The instrumenter that created this span.\n *\n * TODO (v8): This can probably be replaced by an `instanceOf` check of the span class.\n * the instrumenter can only be sentry or otel so we can check the span instance\n * to verify which one it is and remove this field entirely.\n *\n * @deprecated This field will be removed.\n */\n\n /** Epoch timestamp in seconds when the span started. */\n\n /** Epoch timestamp in seconds when the span ended. */\n\n /** Internal keeper of the status */\n\n /**\n * You should never call the constructor manually, always use `Sentry.startTransaction()`\n * or call `startChild()` on an existing span.\n * @internal\n * @hideconstructor\n * @hidden\n */\n constructor(spanContext = {}) {\n this._traceId = spanContext.traceId || utils.uuid4();\n this._spanId = spanContext.spanId || utils.uuid4().substring(16);\n this._startTime = spanContext.startTimestamp || utils.timestampInSeconds();\n // eslint-disable-next-line deprecation/deprecation\n this.tags = spanContext.tags ? { ...spanContext.tags } : {};\n // eslint-disable-next-line deprecation/deprecation\n this.data = spanContext.data ? { ...spanContext.data } : {};\n // eslint-disable-next-line deprecation/deprecation\n this.instrumenter = spanContext.instrumenter || 'sentry';\n\n this._attributes = {};\n this.setAttributes({\n [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanContext.origin || 'manual',\n [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op,\n ...spanContext.attributes,\n });\n\n // eslint-disable-next-line deprecation/deprecation\n this._name = spanContext.name || spanContext.description;\n\n if (spanContext.parentSpanId) {\n this._parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this._sampled = spanContext.sampled;\n }\n if (spanContext.status) {\n this._status = spanContext.status;\n }\n if (spanContext.endTimestamp) {\n this._endTime = spanContext.endTimestamp;\n }\n if (spanContext.exclusiveTime) {\n this._exclusiveTime = spanContext.exclusiveTime;\n }\n this._measurements = spanContext.measurements ? { ...spanContext.measurements } : {};\n }\n\n // This rule conflicts with another eslint rule :(\n /* eslint-disable @typescript-eslint/member-ordering */\n\n /**\n * An alias for `description` of the Span.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n get name() {\n return this._name || '';\n }\n\n /**\n * Update the name of the span.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n set name(name) {\n this.updateName(name);\n }\n\n /**\n * Get the description of the Span.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n get description() {\n return this._name;\n }\n\n /**\n * Get the description of the Span.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n set description(description) {\n this._name = description;\n }\n\n /**\n * The ID of the trace.\n * @deprecated Use `spanContext().traceId` instead.\n */\n get traceId() {\n return this._traceId;\n }\n\n /**\n * The ID of the trace.\n * @deprecated You cannot update the traceId of a span after span creation.\n */\n set traceId(traceId) {\n this._traceId = traceId;\n }\n\n /**\n * The ID of the span.\n * @deprecated Use `spanContext().spanId` instead.\n */\n get spanId() {\n return this._spanId;\n }\n\n /**\n * The ID of the span.\n * @deprecated You cannot update the spanId of a span after span creation.\n */\n set spanId(spanId) {\n this._spanId = spanId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `startSpan` functions instead.\n */\n set parentSpanId(string) {\n this._parentSpanId = string;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToJSON(span).parent_span_id` instead.\n */\n get parentSpanId() {\n return this._parentSpanId;\n }\n\n /**\n * Was this span chosen to be sent as part of the sample?\n * @deprecated Use `isRecording()` instead.\n */\n get sampled() {\n return this._sampled;\n }\n\n /**\n * Was this span chosen to be sent as part of the sample?\n * @deprecated You cannot update the sampling decision of a span after span creation.\n */\n set sampled(sampled) {\n this._sampled = sampled;\n }\n\n /**\n * Attributes for the span.\n * @deprecated Use `spanToJSON(span).atttributes` instead.\n */\n get attributes() {\n return this._attributes;\n }\n\n /**\n * Attributes for the span.\n * @deprecated Use `setAttributes()` instead.\n */\n set attributes(attributes) {\n this._attributes = attributes;\n }\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span started.\n * @deprecated Use `spanToJSON()` instead.\n */\n get startTimestamp() {\n return this._startTime;\n }\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span started.\n * @deprecated In v8, you will not be able to update the span start time after creation.\n */\n set startTimestamp(startTime) {\n this._startTime = startTime;\n }\n\n /**\n * Timestamp in seconds when the span ended.\n * @deprecated Use `spanToJSON()` instead.\n */\n get endTimestamp() {\n return this._endTime;\n }\n\n /**\n * Timestamp in seconds when the span ended.\n * @deprecated Set the end time via `span.end()` instead.\n */\n set endTimestamp(endTime) {\n this._endTime = endTime;\n }\n\n /**\n * The status of the span.\n *\n * @deprecated Use `spanToJSON().status` instead to get the status.\n */\n get status() {\n return this._status;\n }\n\n /**\n * The status of the span.\n *\n * @deprecated Use `.setStatus()` instead to set or update the status.\n */\n set status(status) {\n this._status = status;\n }\n\n /**\n * Operation of the span\n *\n * @deprecated Use `spanToJSON().op` to read the op instead.\n */\n get op() {\n return this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP] ;\n }\n\n /**\n * Operation of the span\n *\n * @deprecated Use `startSpan()` functions to set or `span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'op')\n * to update the span instead.\n */\n set op(op) {\n this.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP, op);\n }\n\n /**\n * The origin of the span, giving context about what created the span.\n *\n * @deprecated Use `spanToJSON().origin` to read the origin instead.\n */\n get origin() {\n return this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ;\n }\n\n /**\n * The origin of the span, giving context about what created the span.\n *\n * @deprecated Use `startSpan()` functions to set the origin instead.\n */\n set origin(origin) {\n this.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);\n }\n\n /* eslint-enable @typescript-eslint/member-ordering */\n\n /** @inheritdoc */\n spanContext() {\n const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this;\n return {\n spanId,\n traceId,\n traceFlags: sampled ? spanUtils.TRACE_FLAG_SAMPLED : spanUtils.TRACE_FLAG_NONE,\n };\n }\n\n /**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * Also the `sampled` decision will be inherited.\n *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\n startChild(\n spanContext,\n ) {\n const childSpan = new Span({\n ...spanContext,\n parentSpanId: this._spanId,\n sampled: this._sampled,\n traceId: this._traceId,\n });\n\n // eslint-disable-next-line deprecation/deprecation\n childSpan.spanRecorder = this.spanRecorder;\n // eslint-disable-next-line deprecation/deprecation\n if (childSpan.spanRecorder) {\n // eslint-disable-next-line deprecation/deprecation\n childSpan.spanRecorder.add(childSpan);\n }\n\n const rootSpan = getRootSpan.getRootSpan(this);\n // TODO: still set span.transaction here until we have a more permanent solution\n // Probably similarly to the weakmap we hold in node-experimental\n // eslint-disable-next-line deprecation/deprecation\n childSpan.transaction = rootSpan ;\n\n if (debugBuild.DEBUG_BUILD && rootSpan) {\n const opStr = (spanContext && spanContext.op) || '< unknown op >';\n const nameStr = spanUtils.spanToJSON(childSpan).description || '< unknown name >';\n const idStr = rootSpan.spanContext().spanId;\n\n const logMessage = `[Tracing] Starting '${opStr}' span on transaction '${nameStr}' (${idStr}).`;\n utils.logger.log(logMessage);\n this._logMessage = logMessage;\n }\n\n return childSpan;\n }\n\n /**\n * Sets the tag attribute on the current span.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key Tag key\n * @param value Tag value\n * @deprecated Use `setAttribute()` instead.\n */\n setTag(key, value) {\n // eslint-disable-next-line deprecation/deprecation\n this.tags = { ...this.tags, [key]: value };\n return this;\n }\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n * @deprecated Use `setAttribute()` instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setData(key, value) {\n // eslint-disable-next-line deprecation/deprecation\n this.data = { ...this.data, [key]: value };\n return this;\n }\n\n /** @inheritdoc */\n setAttribute(key, value) {\n if (value === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._attributes[key];\n } else {\n this._attributes[key] = value;\n }\n }\n\n /** @inheritdoc */\n setAttributes(attributes) {\n Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key]));\n }\n\n /**\n * @inheritDoc\n */\n setStatus(value) {\n this._status = value;\n return this;\n }\n\n /**\n * @inheritDoc\n * @deprecated Use top-level `setHttpStatus()` instead.\n */\n setHttpStatus(httpStatus) {\n spanstatus.setHttpStatus(this, httpStatus);\n return this;\n }\n\n /**\n * @inheritdoc\n *\n * @deprecated Use `.updateName()` instead.\n */\n setName(name) {\n this.updateName(name);\n }\n\n /**\n * @inheritDoc\n */\n updateName(name) {\n this._name = name;\n return this;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToJSON(span).status === 'ok'` instead.\n */\n isSuccess() {\n return this._status === 'ok';\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `.end()` instead.\n */\n finish(endTimestamp) {\n return this.end(endTimestamp);\n }\n\n /** @inheritdoc */\n end(endTimestamp) {\n // If already ended, skip\n if (this._endTime) {\n return;\n }\n const rootSpan = getRootSpan.getRootSpan(this);\n if (\n debugBuild.DEBUG_BUILD &&\n // Don't call this for transactions\n rootSpan &&\n rootSpan.spanContext().spanId !== this._spanId\n ) {\n const logMessage = this._logMessage;\n if (logMessage) {\n utils.logger.log((logMessage ).replace('Starting', 'Finishing'));\n }\n }\n\n this._endTime = spanUtils.spanTimeInputToSeconds(endTimestamp);\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToTraceHeader()` instead.\n */\n toTraceparent() {\n return spanUtils.spanToTraceHeader(this);\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToJSON()` or access the fields directly instead.\n */\n toContext() {\n return utils.dropUndefinedKeys({\n data: this._getData(),\n description: this._name,\n endTimestamp: this._endTime,\n // eslint-disable-next-line deprecation/deprecation\n op: this.op,\n parentSpanId: this._parentSpanId,\n sampled: this._sampled,\n spanId: this._spanId,\n startTimestamp: this._startTime,\n status: this._status,\n // eslint-disable-next-line deprecation/deprecation\n tags: this.tags,\n traceId: this._traceId,\n });\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Update the fields directly instead.\n */\n updateWithContext(spanContext) {\n // eslint-disable-next-line deprecation/deprecation\n this.data = spanContext.data || {};\n // eslint-disable-next-line deprecation/deprecation\n this._name = spanContext.name || spanContext.description;\n this._endTime = spanContext.endTimestamp;\n // eslint-disable-next-line deprecation/deprecation\n this.op = spanContext.op;\n this._parentSpanId = spanContext.parentSpanId;\n this._sampled = spanContext.sampled;\n this._spanId = spanContext.spanId || this._spanId;\n this._startTime = spanContext.startTimestamp || this._startTime;\n this._status = spanContext.status;\n // eslint-disable-next-line deprecation/deprecation\n this.tags = spanContext.tags || {};\n this._traceId = spanContext.traceId || this._traceId;\n\n return this;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToTraceContext()` util function instead.\n */\n getTraceContext() {\n return spanUtils.spanToTraceContext(this);\n }\n\n /**\n * Get JSON representation of this span.\n *\n * @hidden\n * @internal This method is purely for internal purposes and should not be used outside\n * of SDK code. If you need to get a JSON representation of a span,\n * use `spanToJSON(span)` instead.\n */\n getSpanJSON() {\n return utils.dropUndefinedKeys({\n data: this._getData(),\n description: this._name,\n op: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP] ,\n parent_span_id: this._parentSpanId,\n span_id: this._spanId,\n start_timestamp: this._startTime,\n status: this._status,\n // eslint-disable-next-line deprecation/deprecation\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this._endTime,\n trace_id: this._traceId,\n origin: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ,\n _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(this),\n profile_id: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID] ,\n exclusive_time: this._exclusiveTime,\n measurements: Object.keys(this._measurements).length > 0 ? this._measurements : undefined,\n });\n }\n\n /** @inheritdoc */\n isRecording() {\n return !this._endTime && !!this._sampled;\n }\n\n /**\n * Convert the object to JSON.\n * @deprecated Use `spanToJSON(span)` instead.\n */\n toJSON() {\n return this.getSpanJSON();\n }\n\n /**\n * Get the merged data for this span.\n * For now, this combines `data` and `attributes` together,\n * until eventually we can ingest `attributes` directly.\n */\n _getData()\n\n {\n // eslint-disable-next-line deprecation/deprecation\n const { data, _attributes: attributes } = this;\n\n const hasData = Object.keys(data).length > 0;\n const hasAttributes = Object.keys(attributes).length > 0;\n\n if (!hasData && !hasAttributes) {\n return undefined;\n }\n\n if (hasData && hasAttributes) {\n return {\n ...data,\n ...attributes,\n };\n }\n\n return hasData ? data : attributes;\n }\n}\n\nexports.Span = Span;\nexports.SpanRecorder = SpanRecorder;\n//# sourceMappingURL=span.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/** The status of an Span.\n *\n * @deprecated Use string literals - if you require type casting, cast to SpanStatusType type\n */\nexports.SpanStatus = void 0; (function (SpanStatus) {\n /** The operation completed successfully. */\n const Ok = 'ok'; SpanStatus[\"Ok\"] = Ok;\n /** Deadline expired before operation could complete. */\n const DeadlineExceeded = 'deadline_exceeded'; SpanStatus[\"DeadlineExceeded\"] = DeadlineExceeded;\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n const Unauthenticated = 'unauthenticated'; SpanStatus[\"Unauthenticated\"] = Unauthenticated;\n /** 403 Forbidden */\n const PermissionDenied = 'permission_denied'; SpanStatus[\"PermissionDenied\"] = PermissionDenied;\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n const NotFound = 'not_found'; SpanStatus[\"NotFound\"] = NotFound;\n /** 429 Too Many Requests */\n const ResourceExhausted = 'resource_exhausted'; SpanStatus[\"ResourceExhausted\"] = ResourceExhausted;\n /** Client specified an invalid argument. 4xx. */\n const InvalidArgument = 'invalid_argument'; SpanStatus[\"InvalidArgument\"] = InvalidArgument;\n /** 501 Not Implemented */\n const Unimplemented = 'unimplemented'; SpanStatus[\"Unimplemented\"] = Unimplemented;\n /** 503 Service Unavailable */\n const Unavailable = 'unavailable'; SpanStatus[\"Unavailable\"] = Unavailable;\n /** Other/generic 5xx. */\n const InternalError = 'internal_error'; SpanStatus[\"InternalError\"] = InternalError;\n /** Unknown. Any non-standard HTTP status code. */\n const UnknownError = 'unknown_error'; SpanStatus[\"UnknownError\"] = UnknownError;\n /** The operation was cancelled (typically by the user). */\n const Cancelled = 'cancelled'; SpanStatus[\"Cancelled\"] = Cancelled;\n /** Already exists (409) */\n const AlreadyExists = 'already_exists'; SpanStatus[\"AlreadyExists\"] = AlreadyExists;\n /** Operation was rejected because the system is not in a state required for the operation's */\n const FailedPrecondition = 'failed_precondition'; SpanStatus[\"FailedPrecondition\"] = FailedPrecondition;\n /** The operation was aborted, typically due to a concurrency issue. */\n const Aborted = 'aborted'; SpanStatus[\"Aborted\"] = Aborted;\n /** Operation was attempted past the valid range. */\n const OutOfRange = 'out_of_range'; SpanStatus[\"OutOfRange\"] = OutOfRange;\n /** Unrecoverable data loss or corruption */\n const DataLoss = 'data_loss'; SpanStatus[\"DataLoss\"] = DataLoss;\n})(exports.SpanStatus || (exports.SpanStatus = {}));\n\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\nfunction getSpanStatusFromHttpCode(httpStatus) {\n if (httpStatus < 400 && httpStatus >= 100) {\n return 'ok';\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return 'unauthenticated';\n case 403:\n return 'permission_denied';\n case 404:\n return 'not_found';\n case 409:\n return 'already_exists';\n case 413:\n return 'failed_precondition';\n case 429:\n return 'resource_exhausted';\n default:\n return 'invalid_argument';\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return 'unimplemented';\n case 503:\n return 'unavailable';\n case 504:\n return 'deadline_exceeded';\n default:\n return 'internal_error';\n }\n }\n\n return 'unknown_error';\n}\n\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @deprecated Use {@link spanStatusFromHttpCode} instead.\n * This export will be removed in v8 as the signature contains a typo.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\nconst spanStatusfromHttpCode = getSpanStatusFromHttpCode;\n\n/**\n * Sets the Http status attributes on the current span based on the http code.\n * Additionally, the span's status is updated, depending on the http code.\n */\nfunction setHttpStatus(span, httpStatus) {\n // TODO (v8): Remove these calls\n // Relay does not require us to send the status code as a tag\n // For now, just because users might expect it to land as a tag we keep sending it.\n // Same with data.\n // In v8, we replace both, simply with\n // span.setAttribute('http.response.status_code', httpStatus);\n\n // eslint-disable-next-line deprecation/deprecation\n span.setTag('http.status_code', String(httpStatus));\n // eslint-disable-next-line deprecation/deprecation\n span.setData('http.response.status_code', httpStatus);\n\n const spanStatus = getSpanStatusFromHttpCode(httpStatus);\n if (spanStatus !== 'unknown_error') {\n span.setStatus(spanStatus);\n }\n}\n\nexports.getSpanStatusFromHttpCode = getSpanStatusFromHttpCode;\nexports.setHttpStatus = setHttpStatus;\nexports.spanStatusfromHttpCode = spanStatusfromHttpCode;\n//# sourceMappingURL=spanstatus.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\nconst hub = require('../hub.js');\nconst spanUtils = require('../utils/spanUtils.js');\nrequire('./errors.js');\nrequire('./spanstatus.js');\nconst dynamicSamplingContext = require('./dynamicSamplingContext.js');\nconst exports$1 = require('../exports.js');\nconst handleCallbackErrors = require('../utils/handleCallbackErrors.js');\nconst hasTracingEnabled = require('../utils/hasTracingEnabled.js');\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n *\n * This function is meant to be used internally and may break at any time. Use at your own risk.\n *\n * @internal\n * @private\n *\n * @deprecated Use `startSpan` instead.\n */\nfunction trace(\n context,\n callback,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onError = () => {},\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n afterFinish = () => {},\n) {\n // eslint-disable-next-line deprecation/deprecation\n const hub$1 = hub.getCurrentHub();\n const scope = exports$1.getCurrentScope();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n const spanContext = normalizeContext(context);\n const activeSpan = createChildSpanOrTransaction(hub$1, {\n parentSpan,\n spanContext,\n forceTransaction: false,\n scope,\n });\n\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(activeSpan);\n\n return handleCallbackErrors.handleCallbackErrors(\n () => callback(activeSpan),\n error => {\n activeSpan && activeSpan.setStatus('internal_error');\n onError(error, activeSpan);\n },\n () => {\n activeSpan && activeSpan.end();\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(parentSpan);\n afterFinish();\n },\n );\n}\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getSpan()`, as long as the function is executed while the scope is active.\n *\n * If you want to create a span that is not set as active, use {@link startInactiveSpan}.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nfunction startSpan(context, callback) {\n const spanContext = normalizeContext(context);\n\n return hub.runWithAsyncContext(() => {\n return exports$1.withScope(context.scope, scope => {\n // eslint-disable-next-line deprecation/deprecation\n const hub$1 = hub.getCurrentHub();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n const shouldSkipSpan = context.onlyIfParent && !parentSpan;\n const activeSpan = shouldSkipSpan\n ? undefined\n : createChildSpanOrTransaction(hub$1, {\n parentSpan,\n spanContext,\n forceTransaction: context.forceTransaction,\n scope,\n });\n\n return handleCallbackErrors.handleCallbackErrors(\n () => callback(activeSpan),\n () => {\n // Only update the span status if it hasn't been changed yet\n if (activeSpan) {\n const { status } = spanUtils.spanToJSON(activeSpan);\n if (!status || status === 'ok') {\n activeSpan.setStatus('internal_error');\n }\n }\n },\n () => activeSpan && activeSpan.end(),\n );\n });\n });\n}\n\n/**\n * @deprecated Use {@link startSpan} instead.\n */\nconst startActiveSpan = startSpan;\n\n/**\n * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span\n * after the function is done automatically. You'll have to call `span.end()` manually.\n *\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nfunction startSpanManual(\n context,\n callback,\n) {\n const spanContext = normalizeContext(context);\n\n return hub.runWithAsyncContext(() => {\n return exports$1.withScope(context.scope, scope => {\n // eslint-disable-next-line deprecation/deprecation\n const hub$1 = hub.getCurrentHub();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n const shouldSkipSpan = context.onlyIfParent && !parentSpan;\n const activeSpan = shouldSkipSpan\n ? undefined\n : createChildSpanOrTransaction(hub$1, {\n parentSpan,\n spanContext,\n forceTransaction: context.forceTransaction,\n scope,\n });\n\n function finishAndSetSpan() {\n activeSpan && activeSpan.end();\n }\n\n return handleCallbackErrors.handleCallbackErrors(\n () => callback(activeSpan, finishAndSetSpan),\n () => {\n // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n if (activeSpan && activeSpan.isRecording()) {\n const { status } = spanUtils.spanToJSON(activeSpan);\n if (!status || status === 'ok') {\n activeSpan.setStatus('internal_error');\n }\n }\n },\n );\n });\n });\n}\n\n/**\n * Creates a span. This span is not set as active, so will not get automatic instrumentation spans\n * as children or be able to be accessed via `Sentry.getSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate` or `tracesSampler`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nfunction startInactiveSpan(context) {\n if (!hasTracingEnabled.hasTracingEnabled()) {\n return undefined;\n }\n\n const spanContext = normalizeContext(context);\n // eslint-disable-next-line deprecation/deprecation\n const hub$1 = hub.getCurrentHub();\n const parentSpan = context.scope\n ? // eslint-disable-next-line deprecation/deprecation\n context.scope.getSpan()\n : getActiveSpan();\n\n const shouldSkipSpan = context.onlyIfParent && !parentSpan;\n\n if (shouldSkipSpan) {\n return undefined;\n }\n\n const scope = context.scope || exports$1.getCurrentScope();\n\n // Even though we don't actually want to make this span active on the current scope,\n // we need to make it active on a temporary scope that we use for event processing\n // as otherwise, it won't pick the correct span for the event when processing it\n const temporaryScope = (scope ).clone();\n\n return createChildSpanOrTransaction(hub$1, {\n parentSpan,\n spanContext,\n forceTransaction: context.forceTransaction,\n scope: temporaryScope,\n });\n}\n\n/**\n * Returns the currently active span.\n */\nfunction getActiveSpan() {\n // eslint-disable-next-line deprecation/deprecation\n return exports$1.getCurrentScope().getSpan();\n}\n\nconst continueTrace = (\n {\n sentryTrace,\n baggage,\n }\n\n,\n callback,\n) => {\n // TODO(v8): Change this function so it doesn't do anything besides setting the propagation context on the current scope:\n /*\n return withScope((scope) => {\n const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n scope.setPropagationContext(propagationContext);\n return callback();\n })\n */\n\n const currentScope = exports$1.getCurrentScope();\n\n // eslint-disable-next-line deprecation/deprecation\n const { traceparentData, dynamicSamplingContext, propagationContext } = utils.tracingContextFromHeaders(\n sentryTrace,\n baggage,\n );\n\n currentScope.setPropagationContext(propagationContext);\n\n if (debugBuild.DEBUG_BUILD && traceparentData) {\n utils.logger.log(`[Tracing] Continuing trace ${traceparentData.traceId}.`);\n }\n\n const transactionContext = {\n ...traceparentData,\n metadata: utils.dropUndefinedKeys({\n dynamicSamplingContext,\n }),\n };\n\n if (!callback) {\n return transactionContext;\n }\n\n return hub.runWithAsyncContext(() => {\n return callback(transactionContext);\n });\n};\n\nfunction createChildSpanOrTransaction(\n hub$1,\n {\n parentSpan,\n spanContext,\n forceTransaction,\n scope,\n }\n\n,\n) {\n if (!hasTracingEnabled.hasTracingEnabled()) {\n return undefined;\n }\n\n const isolationScope = hub.getIsolationScope();\n\n let span;\n if (parentSpan && !forceTransaction) {\n // eslint-disable-next-line deprecation/deprecation\n span = parentSpan.startChild(spanContext);\n } else if (parentSpan) {\n // If we forced a transaction but have a parent span, make sure to continue from the parent span, not the scope\n const dsc = dynamicSamplingContext.getDynamicSamplingContextFromSpan(parentSpan);\n const { traceId, spanId: parentSpanId } = parentSpan.spanContext();\n const sampled = spanUtils.spanIsSampled(parentSpan);\n\n // eslint-disable-next-line deprecation/deprecation\n span = hub$1.startTransaction({\n traceId,\n parentSpanId,\n parentSampled: sampled,\n ...spanContext,\n metadata: {\n dynamicSamplingContext: dsc,\n // eslint-disable-next-line deprecation/deprecation\n ...spanContext.metadata,\n },\n });\n } else {\n const { traceId, dsc, parentSpanId, sampled } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n // eslint-disable-next-line deprecation/deprecation\n span = hub$1.startTransaction({\n traceId,\n parentSpanId,\n parentSampled: sampled,\n ...spanContext,\n metadata: {\n dynamicSamplingContext: dsc,\n // eslint-disable-next-line deprecation/deprecation\n ...spanContext.metadata,\n },\n });\n }\n\n // We always set this as active span on the scope\n // In the case of this being an inactive span, we ensure to pass a detached scope in here in the first place\n // But by having this here, we can ensure that the lookup through `getCapturedScopesOnSpan` results in the correct scope & span combo\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(span);\n\n setCapturedScopesOnSpan(span, scope, isolationScope);\n\n return span;\n}\n\n/**\n * This converts StartSpanOptions to TransactionContext.\n * For the most part (for now) we accept the same options,\n * but some of them need to be transformed.\n *\n * Eventually the StartSpanOptions will be more aligned with OpenTelemetry.\n */\nfunction normalizeContext(context) {\n if (context.startTime) {\n const ctx = { ...context };\n ctx.startTimestamp = spanUtils.spanTimeInputToSeconds(context.startTime);\n delete ctx.startTime;\n return ctx;\n }\n\n return context;\n}\n\nconst SCOPE_ON_START_SPAN_FIELD = '_sentryScope';\nconst ISOLATION_SCOPE_ON_START_SPAN_FIELD = '_sentryIsolationScope';\n\nfunction setCapturedScopesOnSpan(span, scope, isolationScope) {\n if (span) {\n utils.addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope);\n utils.addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope);\n }\n}\n\n/**\n * Grabs the scope and isolation scope off a span that were active when the span was started.\n */\nfunction getCapturedScopesOnSpan(span) {\n return {\n scope: (span )[SCOPE_ON_START_SPAN_FIELD],\n isolationScope: (span )[ISOLATION_SCOPE_ON_START_SPAN_FIELD],\n };\n}\n\nexports.continueTrace = continueTrace;\nexports.getActiveSpan = getActiveSpan;\nexports.getCapturedScopesOnSpan = getCapturedScopesOnSpan;\nexports.startActiveSpan = startActiveSpan;\nexports.startInactiveSpan = startInactiveSpan;\nexports.startSpan = startSpan;\nexports.startSpanManual = startSpanManual;\nexports.trace = trace;\n//# sourceMappingURL=trace.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\nconst hub = require('../hub.js');\nconst metricSummary = require('../metrics/metric-summary.js');\nconst semanticAttributes = require('../semanticAttributes.js');\nconst spanUtils = require('../utils/spanUtils.js');\nconst dynamicSamplingContext = require('./dynamicSamplingContext.js');\nconst span = require('./span.js');\nconst trace = require('./trace.js');\n\n/** JSDoc */\nclass Transaction extends span.Span {\n /**\n * The reference to the current hub.\n */\n\n // DO NOT yet remove this property, it is used in a hack for v7 backwards compatibility.\n\n /**\n * This constructor should never be called manually. Those instrumenting tracing should use\n * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.\n * @internal\n * @hideconstructor\n * @hidden\n *\n * @deprecated Transactions will be removed in v8. Use spans instead.\n */\n constructor(transactionContext, hub$1) {\n super(transactionContext);\n this._contexts = {};\n\n // eslint-disable-next-line deprecation/deprecation\n this._hub = hub$1 || hub.getCurrentHub();\n\n this._name = transactionContext.name || '';\n\n this._metadata = {\n // eslint-disable-next-line deprecation/deprecation\n ...transactionContext.metadata,\n };\n\n this._trimEnd = transactionContext.trimEnd;\n\n // this is because transactions are also spans, and spans have a transaction pointer\n // TODO (v8): Replace this with another way to set the root span\n // eslint-disable-next-line deprecation/deprecation\n this.transaction = this;\n\n // If Dynamic Sampling Context is provided during the creation of the transaction, we freeze it as it usually means\n // there is incoming Dynamic Sampling Context. (Either through an incoming request, a baggage meta-tag, or other means)\n const incomingDynamicSamplingContext = this._metadata.dynamicSamplingContext;\n if (incomingDynamicSamplingContext) {\n // We shallow copy this in case anything writes to the original reference of the passed in `dynamicSamplingContext`\n this._frozenDynamicSamplingContext = { ...incomingDynamicSamplingContext };\n }\n }\n\n // This sadly conflicts with the getter/setter ordering :(\n /* eslint-disable @typescript-eslint/member-ordering */\n\n /**\n * Getter for `name` property.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n get name() {\n return this._name;\n }\n\n /**\n * Setter for `name` property, which also sets `source` as custom.\n * @deprecated Use `updateName()` and `setMetadata()` instead.\n */\n set name(newName) {\n // eslint-disable-next-line deprecation/deprecation\n this.setName(newName);\n }\n\n /**\n * Get the metadata for this transaction.\n * @deprecated Use `spanGetMetadata(transaction)` instead.\n */\n get metadata() {\n // We merge attributes in for backwards compatibility\n return {\n // Defaults\n // eslint-disable-next-line deprecation/deprecation\n source: 'custom',\n spanMetadata: {},\n\n // Legacy metadata\n ...this._metadata,\n\n // From attributes\n ...(this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] && {\n source: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] ,\n }),\n ...(this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] && {\n sampleRate: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] ,\n }),\n };\n }\n\n /**\n * Update the metadata for this transaction.\n * @deprecated Use `spanGetMetadata(transaction)` instead.\n */\n set metadata(metadata) {\n this._metadata = metadata;\n }\n\n /* eslint-enable @typescript-eslint/member-ordering */\n\n /**\n * Setter for `name` property, which also sets `source` on the metadata.\n *\n * @deprecated Use `.updateName()` and `.setAttribute()` instead.\n */\n setName(name, source = 'custom') {\n this._name = name;\n this.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);\n }\n\n /** @inheritdoc */\n updateName(name) {\n this._name = name;\n return this;\n }\n\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n initSpanRecorder(maxlen = 1000) {\n // eslint-disable-next-line deprecation/deprecation\n if (!this.spanRecorder) {\n // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder = new span.SpanRecorder(maxlen);\n }\n // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder.add(this);\n }\n\n /**\n * Set the context of a transaction event.\n * @deprecated Use either `.setAttribute()`, or set the context on the scope before creating the transaction.\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use top-level `setMeasurement()` instead.\n */\n setMeasurement(name, value, unit = '') {\n this._measurements[name] = { value, unit };\n }\n\n /**\n * Store metadata on this transaction.\n * @deprecated Use attributes or store data on the scope instead.\n */\n setMetadata(newMetadata) {\n this._metadata = { ...this._metadata, ...newMetadata };\n }\n\n /**\n * @inheritDoc\n */\n end(endTimestamp) {\n const timestampInS = spanUtils.spanTimeInputToSeconds(endTimestamp);\n const transaction = this._finishTransaction(timestampInS);\n if (!transaction) {\n return undefined;\n }\n // eslint-disable-next-line deprecation/deprecation\n return this._hub.captureEvent(transaction);\n }\n\n /**\n * @inheritDoc\n */\n toContext() {\n // eslint-disable-next-line deprecation/deprecation\n const spanContext = super.toContext();\n\n return utils.dropUndefinedKeys({\n ...spanContext,\n name: this._name,\n trimEnd: this._trimEnd,\n });\n }\n\n /**\n * @inheritDoc\n */\n updateWithContext(transactionContext) {\n // eslint-disable-next-line deprecation/deprecation\n super.updateWithContext(transactionContext);\n\n this._name = transactionContext.name || '';\n this._trimEnd = transactionContext.trimEnd;\n\n return this;\n }\n\n /**\n * @inheritdoc\n *\n * @experimental\n *\n * @deprecated Use top-level `getDynamicSamplingContextFromSpan` instead.\n */\n getDynamicSamplingContext() {\n return dynamicSamplingContext.getDynamicSamplingContextFromSpan(this);\n }\n\n /**\n * Override the current hub with a new one.\n * Used if you want another hub to finish the transaction.\n *\n * @internal\n */\n setHub(hub) {\n this._hub = hub;\n }\n\n /**\n * Get the profile id of the transaction.\n */\n getProfileId() {\n if (this._contexts !== undefined && this._contexts['profile'] !== undefined) {\n return this._contexts['profile'].profile_id ;\n }\n return undefined;\n }\n\n /**\n * Finish the transaction & prepare the event to send to Sentry.\n */\n _finishTransaction(endTimestamp) {\n // This transaction is already finished, so we should not flush it again.\n if (this._endTime !== undefined) {\n return undefined;\n }\n\n if (!this._name) {\n debugBuild.DEBUG_BUILD && utils.logger.warn('Transaction has no name, falling back to ``.');\n this._name = '';\n }\n\n // just sets the end timestamp\n super.end(endTimestamp);\n\n // eslint-disable-next-line deprecation/deprecation\n const client = this._hub.getClient();\n if (client && client.emit) {\n client.emit('finishTransaction', this);\n }\n\n if (this._sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n\n if (client) {\n client.recordDroppedEvent('sample_rate', 'transaction');\n }\n\n return undefined;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n const finishedSpans = this.spanRecorder\n ? // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder.spans.filter(span => span !== this && spanUtils.spanToJSON(span).timestamp)\n : [];\n\n if (this._trimEnd && finishedSpans.length > 0) {\n const endTimes = finishedSpans.map(span => spanUtils.spanToJSON(span).timestamp).filter(Boolean) ;\n this._endTime = endTimes.reduce((prev, current) => {\n return prev > current ? prev : current;\n });\n }\n\n const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = trace.getCapturedScopesOnSpan(this);\n\n // eslint-disable-next-line deprecation/deprecation\n const { metadata } = this;\n // eslint-disable-next-line deprecation/deprecation\n const { source } = metadata;\n\n const transaction = {\n contexts: {\n ...this._contexts,\n // We don't want to override trace context\n trace: spanUtils.spanToTraceContext(this),\n },\n // TODO: Pass spans serialized via `spanToJSON()` here instead in v8.\n spans: finishedSpans,\n start_timestamp: this._startTime,\n // eslint-disable-next-line deprecation/deprecation\n tags: this.tags,\n timestamp: this._endTime,\n transaction: this._name,\n type: 'transaction',\n sdkProcessingMetadata: {\n ...metadata,\n capturedSpanScope,\n capturedSpanIsolationScope,\n ...utils.dropUndefinedKeys({\n dynamicSamplingContext: dynamicSamplingContext.getDynamicSamplingContextFromSpan(this),\n }),\n },\n _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(this),\n ...(source && {\n transaction_info: {\n source,\n },\n }),\n };\n\n const hasMeasurements = Object.keys(this._measurements).length > 0;\n\n if (hasMeasurements) {\n debugBuild.DEBUG_BUILD &&\n utils.logger.log(\n '[Measurements] Adding measurements to transaction',\n JSON.stringify(this._measurements, undefined, 2),\n );\n transaction.measurements = this._measurements;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`);\n\n return transaction;\n }\n}\n\nexports.Transaction = Transaction;\n//# sourceMappingURL=transaction.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst hub = require('../hub.js');\n\n/**\n * Grabs active transaction off scope.\n *\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\nfunction getActiveTransaction(maybeHub) {\n // eslint-disable-next-line deprecation/deprecation\n const hub$1 = maybeHub || hub.getCurrentHub();\n // eslint-disable-next-line deprecation/deprecation\n const scope = hub$1.getScope();\n // eslint-disable-next-line deprecation/deprecation\n return scope.getTransaction() ;\n}\n\n/**\n * The `extractTraceparentData` function and `TRACEPARENT_REGEXP` constant used\n * to be declared in this file. It was later moved into `@sentry/utils` as part of a\n * move to remove `@sentry/tracing` dependencies from `@sentry/node` (`extractTraceparentData`\n * is the only tracing function used by `@sentry/node`).\n *\n * These exports are kept here for backwards compatability's sake.\n *\n * See https://github.com/getsentry/sentry-javascript/issues/4642 for more details.\n *\n * @deprecated Import this function from `@sentry/utils` instead\n */\nconst extractTraceparentData = utils.extractTraceparentData;\n\nexports.stripUrlQueryAndFragment = utils.stripUrlQueryAndFragment;\nexports.extractTraceparentData = extractTraceparentData;\nexports.getActiveTransaction = getActiveTransaction;\n//# sourceMappingURL=utils.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\n\nconst DEFAULT_TRANSPORT_BUFFER_SIZE = 30;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nfunction createTransport(\n options,\n makeRequest,\n buffer = utils.makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n ),\n) {\n let rateLimits = {};\n const flush = (timeout) => buffer.drain(timeout);\n\n function send(envelope) {\n const filteredEnvelopeItems = [];\n\n // Drop rate limited items from envelope\n utils.forEachEnvelopeItem(envelope, (item, type) => {\n const envelopeItemDataCategory = utils.envelopeItemTypeToDataCategory(type);\n if (utils.isRateLimited(rateLimits, envelopeItemDataCategory)) {\n const event = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent('ratelimit_backoff', envelopeItemDataCategory, event);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) {\n return utils.resolvedSyncPromise();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const filteredEnvelope = utils.createEnvelope(envelope[0], filteredEnvelopeItems );\n\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = (reason) => {\n utils.forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n const event = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent(reason, utils.envelopeItemTypeToDataCategory(type), event);\n });\n };\n\n const requestTask = () =>\n makeRequest({ body: utils.serializeEnvelope(filteredEnvelope, options.textEncoder) }).then(\n response => {\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n debugBuild.DEBUG_BUILD && utils.logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n\n rateLimits = utils.updateRateLimits(rateLimits, response);\n return response;\n },\n error => {\n recordEnvelopeLoss('network_error');\n throw error;\n },\n );\n\n return buffer.add(requestTask).then(\n result => result,\n error => {\n if (error instanceof utils.SentryError) {\n debugBuild.DEBUG_BUILD && utils.logger.error('Skipped sending event because buffer is full.');\n recordEnvelopeLoss('queue_overflow');\n return utils.resolvedSyncPromise();\n } else {\n throw error;\n }\n },\n );\n }\n\n // We use this to identifify if the transport is the base transport\n // TODO (v8): Remove this again as we'll no longer need it\n send.__sentry__baseTransport__ = true;\n\n return {\n send,\n flush,\n };\n}\n\nfunction getEventForEnvelopeItem(item, type) {\n if (type !== 'event' && type !== 'transaction') {\n return undefined;\n }\n\n return Array.isArray(item) ? (item )[1] : undefined;\n}\n\nexports.DEFAULT_TRANSPORT_BUFFER_SIZE = DEFAULT_TRANSPORT_BUFFER_SIZE;\nexports.createTransport = createTransport;\n//# sourceMappingURL=base.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst api = require('../api.js');\n\n/**\n * Gets an event from an envelope.\n *\n * This is only exported for use in the tests\n */\nfunction eventFromEnvelope(env, types) {\n let event;\n\n utils.forEachEnvelopeItem(env, (item, type) => {\n if (types.includes(type)) {\n event = Array.isArray(item) ? (item )[1] : undefined;\n }\n // bail out if we found an event\n return !!event;\n });\n\n return event;\n}\n\n/**\n * Creates a transport that overrides the release on all events.\n */\nfunction makeOverrideReleaseTransport(\n createTransport,\n release,\n) {\n return options => {\n const transport = createTransport(options);\n\n return {\n send: async (envelope) => {\n const event = eventFromEnvelope(envelope, ['event', 'transaction', 'profile', 'replay_event']);\n\n if (event) {\n event.release = release;\n }\n return transport.send(envelope);\n },\n flush: timeout => transport.flush(timeout),\n };\n };\n}\n\n/**\n * Creates a transport that can send events to different DSNs depending on the envelope contents.\n */\nfunction makeMultiplexedTransport(\n createTransport,\n matcher,\n) {\n return options => {\n const fallbackTransport = createTransport(options);\n const otherTransports = {};\n\n function getTransport(dsn, release) {\n // We create a transport for every unique dsn/release combination as there may be code from multiple releases in\n // use at the same time\n const key = release ? `${dsn}:${release}` : dsn;\n\n if (!otherTransports[key]) {\n const validatedDsn = utils.dsnFromString(dsn);\n if (!validatedDsn) {\n return undefined;\n }\n const url = api.getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn);\n\n otherTransports[key] = release\n ? makeOverrideReleaseTransport(createTransport, release)({ ...options, url })\n : createTransport({ ...options, url });\n }\n\n return otherTransports[key];\n }\n\n async function send(envelope) {\n function getEvent(types) {\n const eventTypes = types && types.length ? types : ['event'];\n return eventFromEnvelope(envelope, eventTypes);\n }\n\n const transports = matcher({ envelope, getEvent })\n .map(result => {\n if (typeof result === 'string') {\n return getTransport(result, undefined);\n } else {\n return getTransport(result.dsn, result.release);\n }\n })\n .filter((t) => !!t);\n\n // If we have no transports to send to, use the fallback transport\n if (transports.length === 0) {\n transports.push(fallbackTransport);\n }\n\n const results = await Promise.all(transports.map(transport => transport.send(envelope)));\n\n return results[0];\n }\n\n async function flush(timeout) {\n const allTransports = [...Object.keys(otherTransports).map(dsn => otherTransports[dsn]), fallbackTransport];\n const results = await Promise.all(allTransports.map(transport => transport.flush(timeout)));\n return results.every(r => r);\n }\n\n return {\n send,\n flush,\n };\n };\n}\n\nexports.eventFromEnvelope = eventFromEnvelope;\nexports.makeMultiplexedTransport = makeMultiplexedTransport;\n//# sourceMappingURL=multiplexed.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\n\nconst MIN_DELAY = 100; // 100 ms\nconst START_DELAY = 5000; // 5 seconds\nconst MAX_DELAY = 3.6e6; // 1 hour\n\nfunction log(msg, error) {\n debugBuild.DEBUG_BUILD && utils.logger.info(`[Offline]: ${msg}`, error);\n}\n\n/**\n * Wraps a transport and stores and retries events when they fail to send.\n *\n * @param createTransport The transport to wrap.\n */\nfunction makeOfflineTransport(\n createTransport,\n) {\n return options => {\n const transport = createTransport(options);\n const store = options.createStore ? options.createStore(options) : undefined;\n\n let retryDelay = START_DELAY;\n let flushTimer;\n\n function shouldQueue(env, error, retryDelay) {\n // We don't queue Session Replay envelopes because they are:\n // - Ordered and Replay relies on the response status to know when they're successfully sent.\n // - Likely to fill the queue quickly and block other events from being sent.\n // We also want to drop client reports because they can be generated when we retry sending events while offline.\n if (utils.envelopeContainsItemType(env, ['replay_event', 'replay_recording', 'client_report'])) {\n return false;\n }\n\n if (options.shouldStore) {\n return options.shouldStore(env, error, retryDelay);\n }\n\n return true;\n }\n\n function flushIn(delay) {\n if (!store) {\n return;\n }\n\n if (flushTimer) {\n clearTimeout(flushTimer );\n }\n\n flushTimer = setTimeout(async () => {\n flushTimer = undefined;\n\n const found = await store.pop();\n if (found) {\n log('Attempting to send previously queued event');\n void send(found).catch(e => {\n log('Failed to retry sending', e);\n });\n }\n }, delay) ;\n\n // We need to unref the timer in node.js, otherwise the node process never exit.\n if (typeof flushTimer !== 'number' && flushTimer.unref) {\n flushTimer.unref();\n }\n }\n\n function flushWithBackOff() {\n if (flushTimer) {\n return;\n }\n\n flushIn(retryDelay);\n\n retryDelay = Math.min(retryDelay * 2, MAX_DELAY);\n }\n\n async function send(envelope) {\n try {\n const result = await transport.send(envelope);\n\n let delay = MIN_DELAY;\n\n if (result) {\n // If there's a retry-after header, use that as the next delay.\n if (result.headers && result.headers['retry-after']) {\n delay = utils.parseRetryAfterHeader(result.headers['retry-after']);\n } // If we have a server error, return now so we don't flush the queue.\n else if ((result.statusCode || 0) >= 400) {\n return result;\n }\n }\n\n flushIn(delay);\n retryDelay = START_DELAY;\n return result;\n } catch (e) {\n if (store && (await shouldQueue(envelope, e , retryDelay))) {\n await store.insert(envelope);\n flushWithBackOff();\n log('Error sending. Event queued', e );\n return {};\n } else {\n throw e;\n }\n }\n }\n\n if (options.flushAtStartup) {\n flushWithBackOff();\n }\n\n return {\n send,\n flush: t => transport.flush(t),\n };\n };\n}\n\nexports.MIN_DELAY = MIN_DELAY;\nexports.START_DELAY = START_DELAY;\nexports.makeOfflineTransport = makeOfflineTransport;\n//# sourceMappingURL=offline.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst dynamicSamplingContext = require('../tracing/dynamicSamplingContext.js');\nconst getRootSpan = require('./getRootSpan.js');\nconst spanUtils = require('./spanUtils.js');\n\n/**\n * Applies data from the scope to the event and runs all event processors on it.\n */\nfunction applyScopeDataToEvent(event, data) {\n const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;\n\n // Apply general data\n applyDataToEvent(event, data);\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (span) {\n applySpanToEvent(event, span);\n }\n\n applyFingerprintToEvent(event, fingerprint);\n applyBreadcrumbsToEvent(event, breadcrumbs);\n applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\n\n/** Merge data of two scopes together. */\nfunction mergeScopeData(data, mergeData) {\n const {\n extra,\n tags,\n user,\n contexts,\n level,\n sdkProcessingMetadata,\n breadcrumbs,\n fingerprint,\n eventProcessors,\n attachments,\n propagationContext,\n // eslint-disable-next-line deprecation/deprecation\n transactionName,\n span,\n } = mergeData;\n\n mergeAndOverwriteScopeData(data, 'extra', extra);\n mergeAndOverwriteScopeData(data, 'tags', tags);\n mergeAndOverwriteScopeData(data, 'user', user);\n mergeAndOverwriteScopeData(data, 'contexts', contexts);\n mergeAndOverwriteScopeData(data, 'sdkProcessingMetadata', sdkProcessingMetadata);\n\n if (level) {\n data.level = level;\n }\n\n if (transactionName) {\n // eslint-disable-next-line deprecation/deprecation\n data.transactionName = transactionName;\n }\n\n if (span) {\n data.span = span;\n }\n\n if (breadcrumbs.length) {\n data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];\n }\n\n if (fingerprint.length) {\n data.fingerprint = [...data.fingerprint, ...fingerprint];\n }\n\n if (eventProcessors.length) {\n data.eventProcessors = [...data.eventProcessors, ...eventProcessors];\n }\n\n if (attachments.length) {\n data.attachments = [...data.attachments, ...attachments];\n }\n\n data.propagationContext = { ...data.propagationContext, ...propagationContext };\n}\n\n/**\n * Merges certain scope data. Undefined values will overwrite any existing values.\n * Exported only for tests.\n */\nfunction mergeAndOverwriteScopeData\n\n(data, prop, mergeVal) {\n if (mergeVal && Object.keys(mergeVal).length) {\n // Clone object\n data[prop] = { ...data[prop] };\n for (const key in mergeVal) {\n if (Object.prototype.hasOwnProperty.call(mergeVal, key)) {\n data[prop][key] = mergeVal[key];\n }\n }\n }\n}\n\nfunction applyDataToEvent(event, data) {\n const {\n extra,\n tags,\n user,\n contexts,\n level,\n // eslint-disable-next-line deprecation/deprecation\n transactionName,\n } = data;\n\n const cleanedExtra = utils.dropUndefinedKeys(extra);\n if (cleanedExtra && Object.keys(cleanedExtra).length) {\n event.extra = { ...cleanedExtra, ...event.extra };\n }\n\n const cleanedTags = utils.dropUndefinedKeys(tags);\n if (cleanedTags && Object.keys(cleanedTags).length) {\n event.tags = { ...cleanedTags, ...event.tags };\n }\n\n const cleanedUser = utils.dropUndefinedKeys(user);\n if (cleanedUser && Object.keys(cleanedUser).length) {\n event.user = { ...cleanedUser, ...event.user };\n }\n\n const cleanedContexts = utils.dropUndefinedKeys(contexts);\n if (cleanedContexts && Object.keys(cleanedContexts).length) {\n event.contexts = { ...cleanedContexts, ...event.contexts };\n }\n\n if (level) {\n event.level = level;\n }\n\n if (transactionName) {\n event.transaction = transactionName;\n }\n}\n\nfunction applyBreadcrumbsToEvent(event, breadcrumbs) {\n const mergedBreadcrumbs = [...(event.breadcrumbs || []), ...breadcrumbs];\n event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;\n}\n\nfunction applySdkMetadataToEvent(event, sdkProcessingMetadata) {\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...sdkProcessingMetadata,\n };\n}\n\nfunction applySpanToEvent(event, span) {\n event.contexts = { trace: spanUtils.spanToTraceContext(span), ...event.contexts };\n const rootSpan = getRootSpan.getRootSpan(span);\n if (rootSpan) {\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: dynamicSamplingContext.getDynamicSamplingContextFromSpan(span),\n ...event.sdkProcessingMetadata,\n };\n const transactionName = spanUtils.spanToJSON(rootSpan).description;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n}\n\n/**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\nfunction applyFingerprintToEvent(event, fingerprint) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? utils.arrayify(event.fingerprint) : [];\n\n // If we have something on the scope, then merge it with event\n if (fingerprint) {\n event.fingerprint = event.fingerprint.concat(fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n}\n\nexports.applyScopeDataToEvent = applyScopeDataToEvent;\nexports.mergeAndOverwriteScopeData = mergeAndOverwriteScopeData;\nexports.mergeScopeData = mergeScopeData;\n//# sourceMappingURL=applyScopeDataToEvent.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Returns the root span of a given span.\n *\n * As long as we use `Transaction`s internally, the returned root span\n * will be a `Transaction` but be aware that this might change in the future.\n *\n * If the given span has no root span or transaction, `undefined` is returned.\n */\nfunction getRootSpan(span) {\n // TODO (v8): Remove this check and just return span\n // eslint-disable-next-line deprecation/deprecation\n return span.transaction;\n}\n\nexports.getRootSpan = getRootSpan;\n//# sourceMappingURL=getRootSpan.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\n/**\n * Wrap a callback function with error handling.\n * If an error is thrown, it will be passed to the `onError` callback and re-thrown.\n *\n * If the return value of the function is a promise, it will be handled with `maybeHandlePromiseRejection`.\n *\n * If an `onFinally` callback is provided, this will be called when the callback has finished\n * - so if it returns a promise, once the promise resolved/rejected,\n * else once the callback has finished executing.\n * The `onFinally` callback will _always_ be called, no matter if an error was thrown or not.\n */\nfunction handleCallbackErrors\n\n(\n fn,\n onError,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onFinally = () => {},\n) {\n let maybePromiseResult;\n try {\n maybePromiseResult = fn();\n } catch (e) {\n onError(e);\n onFinally();\n throw e;\n }\n\n return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally);\n}\n\n/**\n * Maybe handle a promise rejection.\n * This expects to be given a value that _may_ be a promise, or any other value.\n * If it is a promise, and it rejects, it will call the `onError` callback.\n * Other than this, it will generally return the given value as-is.\n */\nfunction maybeHandlePromiseRejection(\n value,\n onError,\n onFinally,\n) {\n if (utils.isThenable(value)) {\n // @ts-expect-error - the isThenable check returns the \"wrong\" type here\n return value.then(\n res => {\n onFinally();\n return res;\n },\n e => {\n onError(e);\n onFinally();\n throw e;\n },\n );\n }\n\n onFinally();\n return value;\n}\n\nexports.handleCallbackErrors = handleCallbackErrors;\n//# sourceMappingURL=handleCallbackErrors.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst exports$1 = require('../exports.js');\n\n// Treeshakable guard to remove all code related to tracing\n\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nfunction hasTracingEnabled(\n maybeOptions,\n) {\n if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n return false;\n }\n\n const client = exports$1.getClient();\n const options = maybeOptions || (client && client.getOptions());\n return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n\nexports.hasTracingEnabled = hasTracingEnabled;\n//# sourceMappingURL=hasTracingEnabled.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Checks whether given url points to Sentry server\n * @param url url to verify\n *\n * TODO(v8): Remove Hub fallback type\n */\nfunction isSentryRequestUrl(url, hubOrClient) {\n const client =\n hubOrClient && isHub(hubOrClient)\n ? // eslint-disable-next-line deprecation/deprecation\n hubOrClient.getClient()\n : hubOrClient;\n const dsn = client && client.getDsn();\n const tunnel = client && client.getOptions().tunnel;\n\n return checkDsn(url, dsn) || checkTunnel(url, tunnel);\n}\n\nfunction checkTunnel(url, tunnel) {\n if (!tunnel) {\n return false;\n }\n\n return removeTrailingSlash(url) === removeTrailingSlash(tunnel);\n}\n\nfunction checkDsn(url, dsn) {\n return dsn ? url.includes(dsn.host) : false;\n}\n\nfunction removeTrailingSlash(str) {\n return str[str.length - 1] === '/' ? str.slice(0, -1) : str;\n}\n\nfunction isHub(hubOrClient) {\n // eslint-disable-next-line deprecation/deprecation\n return (hubOrClient ).getClient !== undefined;\n}\n\nexports.isSentryRequestUrl = isSentryRequestUrl;\n//# sourceMappingURL=isSentryRequestUrl.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Tagged template function which returns paramaterized representation of the message\n * For example: parameterize`This is a log statement with ${x} and ${y} params`, would return:\n * \"__sentry_template_string__\": 'This is a log statement with %s and %s params',\n * \"__sentry_template_values__\": ['first', 'second']\n * @param strings An array of string values splitted between expressions\n * @param values Expressions extracted from template string\n * @returns String with template information in __sentry_template_string__ and __sentry_template_values__ properties\n */\nfunction parameterize(strings, ...values) {\n const formatted = new String(String.raw(strings, ...values)) ;\n formatted.__sentry_template_string__ = strings.join('\\x00').replace(/%/g, '%%').replace(/\\0/g, '%s');\n formatted.__sentry_template_values__ = values;\n return formatted;\n}\n\nexports.parameterize = parameterize;\n//# sourceMappingURL=parameterize.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\nconst constants = require('../constants.js');\nconst eventProcessors = require('../eventProcessors.js');\nconst scope = require('../scope.js');\nconst applyScopeDataToEvent = require('./applyScopeDataToEvent.js');\nconst spanUtils = require('./spanUtils.js');\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n options,\n event,\n hint,\n scope$1,\n client,\n isolationScope,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || utils.uuid4(),\n timestamp: event.timestamp || utils.dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n const finalScope = getFinalScope(scope$1, hint.captureContext);\n\n if (hint.mechanism) {\n utils.addExceptionMechanism(prepared, hint.mechanism);\n }\n\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n // Merge scope data together\n const data = scope.getGlobalScope().getScopeData();\n\n if (isolationScope) {\n const isolationData = isolationScope.getScopeData();\n applyScopeDataToEvent.mergeScopeData(data, isolationData);\n }\n\n if (finalScope) {\n const finalScopeData = finalScope.getScopeData();\n applyScopeDataToEvent.mergeScopeData(data, finalScopeData);\n }\n\n const attachments = [...(hint.attachments || []), ...data.attachments];\n if (attachments.length) {\n hint.attachments = attachments;\n }\n\n applyScopeDataToEvent.applyScopeDataToEvent(prepared, data);\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors$1 = [\n ...clientEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...eventProcessors.getGlobalEventProcessors(),\n // Run scope event processors _after_ all other processors\n ...data.eventProcessors,\n ];\n\n const result = eventProcessors.notifyEventProcessors(eventProcessors$1, prepared, hint);\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : constants.DEFAULT_ENVIRONMENT;\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = utils.truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = utils.truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = utils.truncate(request.url, maxValueLength);\n }\n}\n\nconst debugIdStackParserCache = new WeakMap();\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n const debugIdMap = utils.GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n let debugIdStackFramesCache;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {\n let parsedStack;\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(filename => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id: filenameDebugIdMap[filename],\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: utils.normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: utils.normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: utils.normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: utils.normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = utils.normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n const data = spanUtils.spanToJSON(span).data;\n\n if (data) {\n // This is a bit weird, as we generally have `Span` instances here, but to be safe we do not assume so\n // eslint-disable-next-line deprecation/deprecation\n span.data = utils.normalize(data, depth, maxBreadth);\n }\n\n return span;\n });\n }\n\n return normalized;\n}\n\nfunction getFinalScope(scope$1, captureContext) {\n if (!captureContext) {\n return scope$1;\n }\n\n const finalScope = scope$1 ? scope$1.clone() : new scope.Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nfunction parseEventHintOrCaptureContext(\n hint,\n) {\n if (!hint) {\n return undefined;\n }\n\n // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n if (hintIsScopeOrFunction(hint)) {\n return { captureContext: hint };\n }\n\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint,\n };\n }\n\n return hint;\n}\n\nfunction hintIsScopeOrFunction(\n hint,\n) {\n return hint instanceof scope.Scope || typeof hint === 'function';\n}\n\nconst captureContextKeys = [\n 'user',\n 'level',\n 'extra',\n 'contexts',\n 'tags',\n 'fingerprint',\n 'requestSession',\n 'propagationContext',\n] ;\n\nfunction hintIsScopeContext(hint) {\n return Object.keys(hint).some(key => captureContextKeys.includes(key ));\n}\n\nexports.applyDebugIds = applyDebugIds;\nexports.applyDebugMeta = applyDebugMeta;\nexports.parseEventHintOrCaptureContext = parseEventHintOrCaptureContext;\nexports.prepareEvent = prepareEvent;\n//# sourceMappingURL=prepareEvent.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst version = require('../version.js');\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: version.SDK_VERSION,\n })),\n version: version.SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n\nexports.applySdkMetadata = applySdkMetadata;\n//# sourceMappingURL=sdkMetadata.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\n// These are aligned with OpenTelemetry trace flags\nconst TRACE_FLAG_NONE = 0x0;\nconst TRACE_FLAG_SAMPLED = 0x1;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n */\nfunction spanToTraceContext(span) {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, tags, origin } = spanToJSON(span);\n\n return utils.dropUndefinedKeys({\n data,\n op,\n parent_span_id,\n span_id,\n status,\n tags,\n trace_id,\n origin,\n });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nfunction spanToTraceHeader(span) {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return utils.generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a span time input intp a timestamp in seconds.\n */\nfunction spanTimeInputToSeconds(input) {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return utils.timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n * Note that all fields returned here are optional and need to be guarded against.\n *\n * Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n * This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n * And `spanToJSON` needs the Span class from `span.ts` to check here.\n * TODO v8: When we remove the deprecated stuff from `span.ts`, we can remove the circular dependency again.\n */\nfunction spanToJSON(span) {\n if (spanIsSpanClass(span)) {\n return span.getSpanJSON();\n }\n\n // Fallback: We also check for `.toJSON()` here...\n // eslint-disable-next-line deprecation/deprecation\n if (typeof span.toJSON === 'function') {\n // eslint-disable-next-line deprecation/deprecation\n return span.toJSON();\n }\n\n return {};\n}\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSpanClass(span) {\n return typeof (span ).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nfunction spanIsSampled(span) {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const { traceFlags } = span.spanContext();\n // eslint-disable-next-line no-bitwise\n return Boolean(traceFlags & TRACE_FLAG_SAMPLED);\n}\n\nexports.TRACE_FLAG_NONE = TRACE_FLAG_NONE;\nexports.TRACE_FLAG_SAMPLED = TRACE_FLAG_SAMPLED;\nexports.spanIsSampled = spanIsSampled;\nexports.spanTimeInputToSeconds = spanTimeInputToSeconds;\nexports.spanToJSON = spanToJSON;\nexports.spanToTraceContext = spanToTraceContext;\nexports.spanToTraceHeader = spanToTraceHeader;\n//# sourceMappingURL=spanUtils.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst SDK_VERSION = '7.106.1';\n\nexports.SDK_VERSION = SDK_VERSION;\n//# sourceMappingURL=version.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst domain = require('domain');\nconst core = require('@sentry/core');\n\nfunction getActiveDomain() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n return (domain ).active ;\n}\n\nfunction getCurrentHub() {\n const activeDomain = getActiveDomain();\n\n // If there's no active domain, just return undefined and the global hub will be used\n if (!activeDomain) {\n return undefined;\n }\n\n core.ensureHubOnCarrier(activeDomain);\n\n return core.getHubFromCarrier(activeDomain);\n}\n\nfunction createNewHub(parent) {\n const carrier = {};\n core.ensureHubOnCarrier(carrier, parent);\n return core.getHubFromCarrier(carrier);\n}\n\nfunction runWithAsyncContext(callback, options) {\n const activeDomain = getActiveDomain();\n\n if (activeDomain && _optionalChain([options, 'optionalAccess', _ => _.reuseExisting])) {\n // We're already in a domain, so we don't need to create a new one, just call the callback with the current hub\n return callback();\n }\n\n const local = domain.create() ;\n\n const parentHub = activeDomain ? core.getHubFromCarrier(activeDomain) : undefined;\n const newHub = createNewHub(parentHub);\n core.setHubOnCarrier(local, newHub);\n\n return local.bind(() => {\n return callback();\n })();\n}\n\n/**\n * Sets the async context strategy to use Node.js domains.\n */\nfunction setDomainAsyncContextStrategy() {\n core.setAsyncContextStrategy({ getCurrentHub, runWithAsyncContext });\n}\n\nexports.setDomainAsyncContextStrategy = setDomainAsyncContextStrategy;\n//# sourceMappingURL=domain.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst async_hooks = require('async_hooks');\n\nlet asyncStorage;\n\n/**\n * Sets the async context strategy to use AsyncLocalStorage which requires Node v12.17.0 or v13.10.0.\n */\nfunction setHooksAsyncContextStrategy() {\n if (!asyncStorage) {\n asyncStorage = new (async_hooks ).AsyncLocalStorage();\n }\n\n function getCurrentHub() {\n return asyncStorage.getStore();\n }\n\n function createNewHub(parent) {\n const carrier = {};\n core.ensureHubOnCarrier(carrier, parent);\n return core.getHubFromCarrier(carrier);\n }\n\n function runWithAsyncContext(callback, options) {\n const existingHub = getCurrentHub();\n\n if (existingHub && _optionalChain([options, 'optionalAccess', _ => _.reuseExisting])) {\n // We're already in an async context, so we don't need to create a new one\n // just call the callback with the current hub\n return callback();\n }\n\n const newHub = createNewHub(existingHub);\n\n return asyncStorage.run(newHub, () => {\n return callback();\n });\n }\n\n core.setAsyncContextStrategy({ getCurrentHub, runWithAsyncContext });\n}\n\nexports.setHooksAsyncContextStrategy = setHooksAsyncContextStrategy;\n//# sourceMappingURL=hooks.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst nodeVersion = require('../nodeVersion.js');\nconst domain = require('./domain.js');\nconst hooks = require('./hooks.js');\n\n/**\n * Sets the correct async context strategy for Node.js\n *\n * Node.js >= 14 uses AsyncLocalStorage\n * Node.js < 14 uses domains\n */\nfunction setNodeAsyncContextStrategy() {\n if (nodeVersion.NODE_VERSION.major >= 14) {\n hooks.setHooksAsyncContextStrategy();\n } else {\n domain.setDomainAsyncContextStrategy();\n }\n}\n\nexports.setNodeAsyncContextStrategy = setNodeAsyncContextStrategy;\n//# sourceMappingURL=index.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst os = require('os');\nconst util = require('util');\nconst core = require('@sentry/core');\n\n/**\n * The Sentry Node SDK Client.\n *\n * @see NodeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nclass NodeClient extends core.ServerRuntimeClient {\n /**\n * Creates a new Node SDK instance.\n * @param options Configuration options for this SDK.\n */\n constructor(options) {\n core.applySdkMetadata(options, 'node');\n\n // Until node supports global TextEncoder in all versions we support, we are forced to pass it from util\n options.transportOptions = {\n textEncoder: new util.TextEncoder(),\n ...options.transportOptions,\n };\n\n const clientOptions = {\n ...options,\n platform: 'node',\n runtime: { name: 'node', version: global.process.version },\n serverName: options.serverName || global.process.env.SENTRY_NAME || os.hostname(),\n };\n\n super(clientOptions);\n }\n}\n\nexports.NodeClient = NodeClient;\n//# sourceMappingURL=client.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst replacements = [\n ['january', '1'],\n ['february', '2'],\n ['march', '3'],\n ['april', '4'],\n ['may', '5'],\n ['june', '6'],\n ['july', '7'],\n ['august', '8'],\n ['september', '9'],\n ['october', '10'],\n ['november', '11'],\n ['december', '12'],\n ['jan', '1'],\n ['feb', '2'],\n ['mar', '3'],\n ['apr', '4'],\n ['may', '5'],\n ['jun', '6'],\n ['jul', '7'],\n ['aug', '8'],\n ['sep', '9'],\n ['oct', '10'],\n ['nov', '11'],\n ['dec', '12'],\n ['sunday', '0'],\n ['monday', '1'],\n ['tuesday', '2'],\n ['wednesday', '3'],\n ['thursday', '4'],\n ['friday', '5'],\n ['saturday', '6'],\n ['sun', '0'],\n ['mon', '1'],\n ['tue', '2'],\n ['wed', '3'],\n ['thu', '4'],\n ['fri', '5'],\n ['sat', '6'],\n];\n\n/**\n * Replaces names in cron expressions\n */\nfunction replaceCronNames(cronExpression) {\n return replacements.reduce(\n // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\n (acc, [name, replacement]) => acc.replace(new RegExp(name, 'gi'), replacement),\n cronExpression,\n );\n}\n\nexports.replaceCronNames = replaceCronNames;\n//# sourceMappingURL=common.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst common = require('./common.js');\n\nconst ERROR_TEXT = 'Automatic instrumentation of CronJob only supports crontab string';\n\n/**\n * Instruments the `cron` library to send a check-in event to Sentry for each job execution.\n *\n * ```ts\n * import * as Sentry from '@sentry/node';\n * import { CronJob } from 'cron';\n *\n * const CronJobWithCheckIn = Sentry.cron.instrumentCron(CronJob, 'my-cron-job');\n *\n * // use the constructor\n * const job = new CronJobWithCheckIn('* * * * *', () => {\n * console.log('You will see this message every minute');\n * });\n *\n * // or from\n * const job = CronJobWithCheckIn.from({ cronTime: '* * * * *', onTick: () => {\n * console.log('You will see this message every minute');\n * });\n * ```\n */\nfunction instrumentCron(lib, monitorSlug) {\n let jobScheduled = false;\n\n return new Proxy(lib, {\n construct(target, args) {\n const [cronTime, onTick, onComplete, start, timeZone, ...rest] = args;\n\n if (typeof cronTime !== 'string') {\n throw new Error(ERROR_TEXT);\n }\n\n if (jobScheduled) {\n throw new Error(`A job named '${monitorSlug}' has already been scheduled`);\n }\n\n jobScheduled = true;\n\n const cronString = common.replaceCronNames(cronTime);\n\n function monitoredTick(context, onComplete) {\n return core.withMonitor(\n monitorSlug,\n () => {\n return onTick(context, onComplete);\n },\n {\n schedule: { type: 'crontab', value: cronString },\n ...(timeZone ? { timeZone } : {}),\n },\n );\n }\n\n return new target(cronTime, monitoredTick, onComplete, start, timeZone, ...rest);\n },\n get(target, prop) {\n if (prop === 'from') {\n return (param) => {\n const { cronTime, onTick, timeZone } = param;\n\n if (typeof cronTime !== 'string') {\n throw new Error(ERROR_TEXT);\n }\n\n if (jobScheduled) {\n throw new Error(`A job named '${monitorSlug}' has already been scheduled`);\n }\n\n jobScheduled = true;\n\n const cronString = common.replaceCronNames(cronTime);\n\n param.onTick = (context, onComplete) => {\n return core.withMonitor(\n monitorSlug,\n () => {\n return onTick(context, onComplete);\n },\n {\n schedule: { type: 'crontab', value: cronString },\n ...(timeZone ? { timeZone } : {}),\n },\n );\n };\n\n return target.from(param);\n };\n } else {\n return target[prop];\n }\n },\n });\n}\n\nexports.instrumentCron = instrumentCron;\n//# sourceMappingURL=cron.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst common = require('./common.js');\n\n/**\n * Wraps the `node-cron` library with check-in monitoring.\n *\n * ```ts\n * import * as Sentry from \"@sentry/node\";\n * import cron from \"node-cron\";\n *\n * const cronWithCheckIn = Sentry.cron.instrumentNodeCron(cron);\n *\n * cronWithCheckIn.schedule(\n * \"* * * * *\",\n * () => {\n * console.log(\"running a task every minute\");\n * },\n * { name: \"my-cron-job\" },\n * );\n * ```\n */\nfunction instrumentNodeCron(lib) {\n return new Proxy(lib, {\n get(target, prop) {\n if (prop === 'schedule' && target.schedule) {\n // When 'get' is called for schedule, return a proxied version of the schedule function\n return new Proxy(target.schedule, {\n apply(target, thisArg, argArray) {\n const [expression, , options] = argArray;\n\n if (!_optionalChain([options, 'optionalAccess', _ => _.name])) {\n throw new Error('Missing \"name\" for scheduled job. A name is required for Sentry check-in monitoring.');\n }\n\n return core.withMonitor(\n options.name,\n () => {\n return target.apply(thisArg, argArray);\n },\n {\n schedule: { type: 'crontab', value: common.replaceCronNames(expression) },\n timezone: _optionalChain([options, 'optionalAccess', _2 => _2.timezone]),\n },\n );\n },\n });\n } else {\n return target[prop];\n }\n },\n });\n}\n\nexports.instrumentNodeCron = instrumentNodeCron;\n//# sourceMappingURL=node-cron.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst common = require('./common.js');\n\n/**\n * Instruments the `node-schedule` library to send a check-in event to Sentry for each job execution.\n *\n * ```ts\n * import * as Sentry from '@sentry/node';\n * import * as schedule from 'node-schedule';\n *\n * const scheduleWithCheckIn = Sentry.cron.instrumentNodeSchedule(schedule);\n *\n * const job = scheduleWithCheckIn.scheduleJob('my-cron-job', '* * * * *', () => {\n * console.log('You will see this message every minute');\n * });\n * ```\n */\nfunction instrumentNodeSchedule(lib) {\n return new Proxy(lib, {\n get(target, prop) {\n if (prop === 'scheduleJob') {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return new Proxy(target.scheduleJob, {\n apply(target, thisArg, argArray) {\n const [nameOrExpression, expressionOrCallback] = argArray;\n\n if (typeof nameOrExpression !== 'string' || typeof expressionOrCallback !== 'string') {\n throw new Error(\n \"Automatic instrumentation of 'node-schedule' requires the first parameter of 'scheduleJob' to be a job name string and the second parameter to be a crontab string\",\n );\n }\n\n const monitorSlug = nameOrExpression;\n const expression = expressionOrCallback;\n\n return core.withMonitor(\n monitorSlug,\n () => {\n return target.apply(thisArg, argArray);\n },\n {\n schedule: { type: 'crontab', value: common.replaceCronNames(expression) },\n },\n );\n },\n });\n }\n\n return target[prop];\n },\n });\n}\n\nexports.instrumentNodeSchedule = instrumentNodeSchedule;\n//# sourceMappingURL=node-schedule.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexports.DEBUG_BUILD = DEBUG_BUILD;\n//# sourceMappingURL=debug-build.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst debugBuild = require('./debug-build.js');\nconst sdk = require('./sdk.js');\nconst requestDataDeprecated = require('./requestDataDeprecated.js');\n\n/**\n * Express-compatible tracing handler.\n * @see Exposed as `Handlers.tracingHandler`\n */\nfunction tracingHandler()\n\n {\n return function sentryTracingMiddleware(\n req,\n res,\n next,\n ) {\n const options = _optionalChain([core.getClient, 'call', _ => _(), 'optionalAccess', _2 => _2.getOptions, 'call', _3 => _3()]);\n\n if (\n !options ||\n options.instrumenter !== 'sentry' ||\n _optionalChain([req, 'access', _4 => _4.method, 'optionalAccess', _5 => _5.toUpperCase, 'call', _6 => _6()]) === 'OPTIONS' ||\n _optionalChain([req, 'access', _7 => _7.method, 'optionalAccess', _8 => _8.toUpperCase, 'call', _9 => _9()]) === 'HEAD'\n ) {\n return next();\n }\n\n const sentryTrace = req.headers && utils.isString(req.headers['sentry-trace']) ? req.headers['sentry-trace'] : undefined;\n const baggage = _optionalChain([req, 'access', _10 => _10.headers, 'optionalAccess', _11 => _11.baggage]);\n if (!core.hasTracingEnabled(options)) {\n return next();\n }\n\n const [name, source] = utils.extractPathForTransaction(req, { path: true, method: true });\n const transaction = core.continueTrace({ sentryTrace, baggage }, ctx =>\n // TODO: Refactor this to use `startSpan()`\n // eslint-disable-next-line deprecation/deprecation\n core.startTransaction(\n {\n name,\n op: 'http.server',\n origin: 'auto.http.node.tracingHandler',\n ...ctx,\n data: {\n [core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,\n },\n metadata: {\n // eslint-disable-next-line deprecation/deprecation\n ...ctx.metadata,\n // The request should already have been stored in `scope.sdkProcessingMetadata` (which will become\n // `event.sdkProcessingMetadata` the same way the metadata here will) by `sentryRequestMiddleware`, but on the\n // off chance someone is using `sentryTracingMiddleware` without `sentryRequestMiddleware`, it doesn't hurt to\n // be sure\n request: req,\n },\n },\n // extra context passed to the tracesSampler\n { request: utils.extractRequestData(req) },\n ),\n );\n\n // We put the transaction on the scope so users can attach children to it\n // eslint-disable-next-line deprecation/deprecation\n core.getCurrentScope().setSpan(transaction);\n\n // We also set __sentry_transaction on the response so people can grab the transaction there to add\n // spans to it later.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (res ).__sentry_transaction = transaction;\n\n res.once('finish', () => {\n // Push `transaction.finish` to the next event loop so open spans have a chance to finish before the transaction\n // closes\n setImmediate(() => {\n utils.addRequestDataToTransaction(transaction, req);\n core.setHttpStatus(transaction, res.statusCode);\n transaction.end();\n });\n });\n\n next();\n };\n}\n\n/**\n * Backwards compatibility shim which can be removed in v8. Forces the given options to follow the\n * `AddRequestDataToEventOptions` interface.\n *\n * TODO (v8): Get rid of this, and stop passing `requestDataOptionsFromExpressHandler` to `setSDKProcessingMetadata`.\n */\nfunction convertReqHandlerOptsToAddReqDataOpts(\n reqHandlerOptions = {},\n) {\n let addRequestDataOptions;\n\n if ('include' in reqHandlerOptions) {\n addRequestDataOptions = { include: reqHandlerOptions.include };\n } else {\n // eslint-disable-next-line deprecation/deprecation\n const { ip, request, transaction, user } = reqHandlerOptions ;\n\n if (ip || request || transaction || user) {\n addRequestDataOptions = { include: utils.dropUndefinedKeys({ ip, request, transaction, user }) };\n }\n }\n\n return addRequestDataOptions;\n}\n\n/**\n * Express compatible request handler.\n * @see Exposed as `Handlers.requestHandler`\n */\nfunction requestHandler(\n options,\n) {\n // TODO (v8): Get rid of this\n const requestDataOptions = convertReqHandlerOptsToAddReqDataOpts(options);\n\n const client = core.getClient();\n // Initialise an instance of SessionFlusher on the client when `autoSessionTracking` is enabled and the\n // `requestHandler` middleware is used indicating that we are running in SessionAggregates mode\n if (client && sdk.isAutoSessionTrackingEnabled(client)) {\n client.initSessionFlusher();\n\n // If Scope contains a Single mode Session, it is removed in favor of using Session Aggregates mode\n const scope = core.getCurrentScope();\n if (scope.getSession()) {\n scope.setSession();\n }\n }\n\n return function sentryRequestMiddleware(\n req,\n res,\n next,\n ) {\n if (options && options.flushTimeout && options.flushTimeout > 0) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const _end = res.end;\n res.end = function (chunk, encoding, cb) {\n void core.flush(options.flushTimeout)\n .then(() => {\n _end.call(this, chunk, encoding, cb);\n })\n .then(null, e => {\n debugBuild.DEBUG_BUILD && utils.logger.error(e);\n _end.call(this, chunk, encoding, cb);\n });\n };\n }\n core.runWithAsyncContext(() => {\n const scope = core.getCurrentScope();\n scope.setSDKProcessingMetadata({\n request: req,\n // TODO (v8): Stop passing this\n requestDataOptionsFromExpressHandler: requestDataOptions,\n });\n\n const client = core.getClient();\n if (sdk.isAutoSessionTrackingEnabled(client)) {\n // Set `status` of `RequestSession` to Ok, at the beginning of the request\n scope.setRequestSession({ status: 'ok' });\n }\n\n res.once('finish', () => {\n const client = core.getClient();\n if (sdk.isAutoSessionTrackingEnabled(client)) {\n setImmediate(() => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (client && (client )._captureRequestSession) {\n // Calling _captureRequestSession to capture request session at the end of the request by incrementing\n // the correct SessionAggregates bucket i.e. crashed, errored or exited\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (client )._captureRequestSession();\n }\n });\n }\n });\n next();\n });\n };\n}\n\n/** JSDoc */\n\n/** JSDoc */\nfunction getStatusCodeFromResponse(error) {\n const statusCode = error.status || error.statusCode || error.status_code || (error.output && error.output.statusCode);\n return statusCode ? parseInt(statusCode , 10) : 500;\n}\n\n/** Returns true if response code is internal server error */\nfunction defaultShouldHandleError(error) {\n const status = getStatusCodeFromResponse(error);\n return status >= 500;\n}\n\n/**\n * Express compatible error handler.\n * @see Exposed as `Handlers.errorHandler`\n */\nfunction errorHandler(options\n\n)\n\n {\n return function sentryErrorMiddleware(\n error,\n _req,\n res,\n next,\n ) {\n const shouldHandleError = (options && options.shouldHandleError) || defaultShouldHandleError;\n\n if (shouldHandleError(error)) {\n core.withScope(_scope => {\n // The request should already have been stored in `scope.sdkProcessingMetadata` by `sentryRequestMiddleware`,\n // but on the off chance someone is using `sentryErrorMiddleware` without `sentryRequestMiddleware`, it doesn't\n // hurt to be sure\n _scope.setSDKProcessingMetadata({ request: _req });\n\n // For some reason we need to set the transaction on the scope again\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const transaction = (res ).__sentry_transaction ;\n if (transaction && !core.getActiveSpan()) {\n // eslint-disable-next-line deprecation/deprecation\n _scope.setSpan(transaction);\n }\n\n const client = core.getClient();\n if (client && sdk.isAutoSessionTrackingEnabled(client)) {\n // Check if the `SessionFlusher` is instantiated on the client to go into this branch that marks the\n // `requestSession.status` as `Crashed`, and this check is necessary because the `SessionFlusher` is only\n // instantiated when the the`requestHandler` middleware is initialised, which indicates that we should be\n // running in SessionAggregates mode\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const isSessionAggregatesMode = (client )._sessionFlusher !== undefined;\n if (isSessionAggregatesMode) {\n const requestSession = _scope.getRequestSession();\n // If an error bubbles to the `errorHandler`, then this is an unhandled error, and should be reported as a\n // Crashed session. The `_requestSession.status` is checked to ensure that this error is happening within\n // the bounds of a request, and if so the status is updated\n if (requestSession && requestSession.status !== undefined) {\n requestSession.status = 'crashed';\n }\n }\n }\n\n const eventId = core.captureException(error, { mechanism: { type: 'middleware', handled: false } });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (res ).sentry = eventId;\n next(error);\n });\n\n return;\n }\n\n next(error);\n };\n}\n\n/**\n * Sentry tRPC middleware that names the handling transaction after the called procedure.\n *\n * Use the Sentry tRPC middleware in combination with the Sentry server integration,\n * e.g. Express Request Handlers or Next.js SDK.\n */\nfunction trpcMiddleware(options = {}) {\n return function ({ path, type, next, rawInput }) {\n const clientOptions = _optionalChain([core.getClient, 'call', _12 => _12(), 'optionalAccess', _13 => _13.getOptions, 'call', _14 => _14()]);\n // eslint-disable-next-line deprecation/deprecation\n const sentryTransaction = core.getCurrentScope().getTransaction();\n\n if (sentryTransaction) {\n sentryTransaction.updateName(`trpc/${path}`);\n sentryTransaction.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');\n sentryTransaction.op = 'rpc.server';\n\n const trpcContext = {\n procedure_type: type,\n };\n\n if (options.attachRpcInput !== undefined ? options.attachRpcInput : _optionalChain([clientOptions, 'optionalAccess', _15 => _15.sendDefaultPii])) {\n trpcContext.input = utils.normalize(rawInput);\n }\n\n // TODO: Can we rewrite this to an attribute? Or set this on the scope?\n // eslint-disable-next-line deprecation/deprecation\n sentryTransaction.setContext('trpc', trpcContext);\n }\n\n function captureIfError(nextResult) {\n if (!nextResult.ok) {\n core.captureException(nextResult.error, { mechanism: { handled: false, data: { function: 'trpcMiddleware' } } });\n }\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = next();\n } catch (e) {\n core.captureException(e, { mechanism: { handled: false, data: { function: 'trpcMiddleware' } } });\n throw e;\n }\n\n if (utils.isThenable(maybePromiseResult)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Promise.resolve(maybePromiseResult).then(\n nextResult => {\n captureIfError(nextResult );\n },\n e => {\n core.captureException(e, { mechanism: { handled: false, data: { function: 'trpcMiddleware' } } });\n },\n );\n } else {\n captureIfError(maybePromiseResult );\n }\n\n // We return the original promise just to be safe.\n return maybePromiseResult;\n };\n}\n\nexports.extractRequestData = requestDataDeprecated.extractRequestData;\nexports.parseRequest = requestDataDeprecated.parseRequest;\nexports.errorHandler = errorHandler;\nexports.requestHandler = requestHandler;\nexports.tracingHandler = tracingHandler;\nexports.trpcMiddleware = trpcMiddleware;\n//# sourceMappingURL=handlers.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst index = require('./tracing/index.js');\nconst client = require('./client.js');\nconst http = require('./transports/http.js');\nconst sdk = require('./sdk.js');\nconst utils = require('@sentry/utils');\nconst utils$1 = require('./utils.js');\nconst module$1 = require('./module.js');\nconst legacy = require('./integrations/anr/legacy.js');\nconst handlers = require('./handlers.js');\nconst index$5 = require('./integrations/index.js');\nconst integrations = require('./tracing/integrations.js');\nconst console = require('./integrations/console.js');\nconst onuncaughtexception = require('./integrations/onuncaughtexception.js');\nconst onunhandledrejection = require('./integrations/onunhandledrejection.js');\nconst modules = require('./integrations/modules.js');\nconst contextlines = require('./integrations/contextlines.js');\nconst context = require('./integrations/context.js');\nconst index$1 = require('./integrations/local-variables/index.js');\nconst spotlight = require('./integrations/spotlight.js');\nconst index$2 = require('./integrations/anr/index.js');\nconst index$3 = require('./integrations/hapi/index.js');\nconst index$4 = require('./integrations/undici/index.js');\nconst http$1 = require('./integrations/http.js');\nconst cron$1 = require('./cron/cron.js');\nconst nodeCron = require('./cron/node-cron.js');\nconst nodeSchedule = require('./cron/node-schedule.js');\n\n/**\n * @deprecated use `createGetModuleFromFilename` instead.\n */\nconst getModuleFromFilename = module$1.createGetModuleFromFilename();\n\n// TODO: Deprecate this once we migrated tracing integrations\nconst Integrations = {\n // eslint-disable-next-line deprecation/deprecation\n ...core.Integrations,\n ...index$5,\n ...integrations,\n};\n\n/** Methods to instrument cron libraries for Sentry check-ins */\nconst cron = {\n instrumentCron: cron$1.instrumentCron,\n instrumentNodeCron: nodeCron.instrumentNodeCron,\n instrumentNodeSchedule: nodeSchedule.instrumentNodeSchedule,\n};\n\nexports.Hub = core.Hub;\nexports.SDK_VERSION = core.SDK_VERSION;\nexports.SEMANTIC_ATTRIBUTE_SENTRY_OP = core.SEMANTIC_ATTRIBUTE_SENTRY_OP;\nexports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;\nexports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = core.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE;\nexports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE;\nexports.Scope = core.Scope;\nexports.addBreadcrumb = core.addBreadcrumb;\nexports.addEventProcessor = core.addEventProcessor;\nexports.addGlobalEventProcessor = core.addGlobalEventProcessor;\nexports.addIntegration = core.addIntegration;\nexports.captureCheckIn = core.captureCheckIn;\nexports.captureEvent = core.captureEvent;\nexports.captureException = core.captureException;\nexports.captureMessage = core.captureMessage;\nexports.captureSession = core.captureSession;\nexports.close = core.close;\nexports.configureScope = core.configureScope;\nexports.continueTrace = core.continueTrace;\nexports.createTransport = core.createTransport;\nexports.endSession = core.endSession;\nexports.extractTraceparentData = core.extractTraceparentData;\nexports.flush = core.flush;\nexports.functionToStringIntegration = core.functionToStringIntegration;\nexports.getActiveSpan = core.getActiveSpan;\nexports.getActiveTransaction = core.getActiveTransaction;\nexports.getClient = core.getClient;\nexports.getCurrentHub = core.getCurrentHub;\nexports.getCurrentScope = core.getCurrentScope;\nexports.getGlobalScope = core.getGlobalScope;\nexports.getHubFromCarrier = core.getHubFromCarrier;\nexports.getIsolationScope = core.getIsolationScope;\nexports.getSpanStatusFromHttpCode = core.getSpanStatusFromHttpCode;\nexports.inboundFiltersIntegration = core.inboundFiltersIntegration;\nexports.isInitialized = core.isInitialized;\nexports.lastEventId = core.lastEventId;\nexports.linkedErrorsIntegration = core.linkedErrorsIntegration;\nexports.makeMain = core.makeMain;\nexports.metrics = core.metrics;\nexports.parameterize = core.parameterize;\nexports.requestDataIntegration = core.requestDataIntegration;\nexports.runWithAsyncContext = core.runWithAsyncContext;\nexports.setContext = core.setContext;\nexports.setCurrentClient = core.setCurrentClient;\nexports.setExtra = core.setExtra;\nexports.setExtras = core.setExtras;\nexports.setHttpStatus = core.setHttpStatus;\nexports.setMeasurement = core.setMeasurement;\nexports.setTag = core.setTag;\nexports.setTags = core.setTags;\nexports.setUser = core.setUser;\nexports.spanStatusfromHttpCode = core.spanStatusfromHttpCode;\nexports.startActiveSpan = core.startActiveSpan;\nexports.startInactiveSpan = core.startInactiveSpan;\nexports.startSession = core.startSession;\nexports.startSpan = core.startSpan;\nexports.startSpanManual = core.startSpanManual;\nexports.startTransaction = core.startTransaction;\nexports.trace = core.trace;\nexports.withActiveSpan = core.withActiveSpan;\nexports.withIsolationScope = core.withIsolationScope;\nexports.withMonitor = core.withMonitor;\nexports.withScope = core.withScope;\nexports.autoDiscoverNodePerformanceMonitoringIntegrations = index.autoDiscoverNodePerformanceMonitoringIntegrations;\nexports.NodeClient = client.NodeClient;\nexports.makeNodeTransport = http.makeNodeTransport;\nexports.defaultIntegrations = sdk.defaultIntegrations;\nexports.defaultStackParser = sdk.defaultStackParser;\nexports.getDefaultIntegrations = sdk.getDefaultIntegrations;\nexports.getSentryRelease = sdk.getSentryRelease;\nexports.init = sdk.init;\nexports.DEFAULT_USER_INCLUDES = utils.DEFAULT_USER_INCLUDES;\nexports.addRequestDataToEvent = utils.addRequestDataToEvent;\nexports.extractRequestData = utils.extractRequestData;\nexports.deepReadDirSync = utils$1.deepReadDirSync;\nexports.createGetModuleFromFilename = module$1.createGetModuleFromFilename;\nexports.enableAnrDetection = legacy.enableAnrDetection;\nexports.Handlers = handlers;\nexports.consoleIntegration = console.consoleIntegration;\nexports.onUncaughtExceptionIntegration = onuncaughtexception.onUncaughtExceptionIntegration;\nexports.onUnhandledRejectionIntegration = onunhandledrejection.onUnhandledRejectionIntegration;\nexports.modulesIntegration = modules.modulesIntegration;\nexports.contextLinesIntegration = contextlines.contextLinesIntegration;\nexports.nodeContextIntegration = context.nodeContextIntegration;\nexports.localVariablesIntegration = index$1.localVariablesIntegration;\nexports.spotlightIntegration = spotlight.spotlightIntegration;\nexports.anrIntegration = index$2.anrIntegration;\nexports.hapiErrorPlugin = index$3.hapiErrorPlugin;\nexports.hapiIntegration = index$3.hapiIntegration;\nexports.Undici = index$4.Undici;\nexports.nativeNodeFetchintegration = index$4.nativeNodeFetchintegration;\nexports.Http = http$1.Http;\nexports.httpIntegration = http$1.httpIntegration;\nexports.Integrations = Integrations;\nexports.cron = cron;\nexports.getModuleFromFilename = getModuleFromFilename;\n//# sourceMappingURL=index.js.map\n","var {\n _optionalChain,\n _optionalChainDelete\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst url = require('url');\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst nodeVersion = require('../../nodeVersion.js');\nconst workerScript = require('./worker-script.js');\n\nconst DEFAULT_INTERVAL = 50;\nconst DEFAULT_HANG_THRESHOLD = 5000;\n\nfunction log(message, ...args) {\n utils.logger.log(`[ANR] ${message}`, ...args);\n}\n\n/**\n * We need to use dynamicRequire because worker_threads is not available in node < v12 and webpack error will when\n * targeting those versions\n */\nfunction getWorkerThreads() {\n return utils.dynamicRequire(module, 'worker_threads');\n}\n\n/**\n * Gets contexts by calling all event processors. This relies on being called after all integrations are setup\n */\nasync function getContexts(client) {\n let event = { message: 'ANR' };\n const eventHint = {};\n\n for (const processor of client.getEventProcessors()) {\n if (event === null) break;\n event = await processor(event, eventHint);\n }\n\n return _optionalChain([event, 'optionalAccess', _2 => _2.contexts]) || {};\n}\n\nconst INTEGRATION_NAME = 'Anr';\n\nconst _anrIntegration = ((options = {}) => {\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n if (nodeVersion.NODE_VERSION.major < 16 || (nodeVersion.NODE_VERSION.major === 16 && nodeVersion.NODE_VERSION.minor < 17)) {\n throw new Error('ANR detection requires Node 16.17.0 or later');\n }\n\n // setImmediate is used to ensure that all other integrations have been setup\n setImmediate(() => _startWorker(client, options));\n },\n };\n}) ;\n\nconst anrIntegration = core.defineIntegration(_anrIntegration);\n\n/**\n * Starts a thread to detect App Not Responding (ANR) events\n *\n * ANR detection requires Node 16.17.0 or later\n *\n * @deprecated Use `anrIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Anr = core.convertIntegrationFnToClass(INTEGRATION_NAME, anrIntegration)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\n/**\n * Starts the ANR worker thread\n */\nasync function _startWorker(client, _options) {\n const contexts = await getContexts(client);\n const dsn = client.getDsn();\n\n if (!dsn) {\n return;\n }\n\n // These will not be accurate if sent later from the worker thread\n _optionalChainDelete([contexts, 'access', _3 => _3.app, 'optionalAccess', _4 => delete _4.app_memory]);\n _optionalChainDelete([contexts, 'access', _5 => _5.device, 'optionalAccess', _6 => delete _6.free_memory]);\n\n const initOptions = client.getOptions();\n\n const sdkMetadata = client.getSdkMetadata() || {};\n if (sdkMetadata.sdk) {\n sdkMetadata.sdk.integrations = initOptions.integrations.map(i => i.name);\n }\n\n const options = {\n debug: utils.logger.isEnabled(),\n dsn,\n environment: initOptions.environment || 'production',\n release: initOptions.release,\n dist: initOptions.dist,\n sdkMetadata,\n appRootPath: _options.appRootPath,\n pollInterval: _options.pollInterval || DEFAULT_INTERVAL,\n anrThreshold: _options.anrThreshold || DEFAULT_HANG_THRESHOLD,\n captureStackTrace: !!_options.captureStackTrace,\n staticTags: _options.staticTags || {},\n contexts,\n };\n\n if (options.captureStackTrace) {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const inspector = require('inspector');\n if (!inspector.url()) {\n inspector.open(0);\n }\n }\n\n const { Worker } = getWorkerThreads();\n\n const worker = new Worker(new url.URL(`data:application/javascript;base64,${workerScript.base64WorkerScript}`), {\n workerData: options,\n });\n\n process.on('exit', () => {\n worker.terminate();\n });\n\n const timer = setInterval(() => {\n try {\n const currentSession = core.getCurrentScope().getSession();\n // We need to copy the session object and remove the toJSON method so it can be sent to the worker\n // serialized without making it a SerializedSession\n const session = currentSession ? { ...currentSession, toJSON: undefined } : undefined;\n // message the worker to tell it the main event loop is still running\n worker.postMessage({ session });\n } catch (_) {\n //\n }\n }, options.pollInterval);\n // Timer should not block exit\n timer.unref();\n\n worker.on('message', (msg) => {\n if (msg === 'session-ended') {\n log('ANR event sent from ANR worker. Clearing session in this thread.');\n core.getCurrentScope().setSession(undefined);\n }\n });\n\n worker.once('error', (err) => {\n clearInterval(timer);\n log('ANR worker error', err);\n });\n\n worker.once('exit', (code) => {\n clearInterval(timer);\n log('ANR worker exit', code);\n });\n\n // Ensure this thread can't block app exit\n worker.unref();\n}\n\nexports.Anr = Anr;\nexports.anrIntegration = anrIntegration;\n//# sourceMappingURL=index.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst index = require('./index.js');\n\n// TODO (v8): Remove this entire file and the `enableAnrDetection` export\n\n/**\n * @deprecated Use the `Anr` integration instead.\n *\n * ```ts\n * import * as Sentry from '@sentry/node';\n *\n * Sentry.init({\n * dsn: '__DSN__',\n * integrations: [new Sentry.Integrations.Anr({ captureStackTrace: true })],\n * });\n * ```\n */\nfunction enableAnrDetection(options) {\n const client = core.getClient() ;\n // eslint-disable-next-line deprecation/deprecation\n const integration = new index.Anr(options);\n integration.setup(client);\n return Promise.resolve();\n}\n\nexports.enableAnrDetection = enableAnrDetection;\n//# sourceMappingURL=legacy.js.map\n","/*! @sentry/node 7.106.1 (887f0e7) | https://github.com/getsentry/sentry-javascript */\nexports.base64WorkerScript=\"aW1wb3J0IHsgU2Vzc2lvbiB9IGZyb20gJ2luc3BlY3Rvcic7CmltcG9ydCB7IHdvcmtlckRhdGEsIHBhcmVudFBvcnQgfSBmcm9tICd3b3JrZXJfdGhyZWFkcyc7CmltcG9ydCB7IHBvc2l4LCBzZXAgfSBmcm9tICdwYXRoJzsKaW1wb3J0ICogYXMgaHR0cCBmcm9tICdodHRwJzsKaW1wb3J0ICogYXMgaHR0cHMgZnJvbSAnaHR0cHMnOwppbXBvcnQgeyBSZWFkYWJsZSB9IGZyb20gJ3N0cmVhbSc7CmltcG9ydCB7IFVSTCB9IGZyb20gJ3VybCc7CmltcG9ydCB7IGNyZWF0ZUd6aXAgfSBmcm9tICd6bGliJzsKaW1wb3J0IGFzc2VydCBmcm9tICdhc3NlcnQnOwppbXBvcnQgKiBhcyBuZXQgZnJvbSAnbmV0JzsKaW1wb3J0ICogYXMgdGxzIGZyb20gJ3Rscyc7CgovLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L3VuYm91bmQtbWV0aG9kCmNvbnN0IG9iamVjdFRvU3RyaW5nID0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZzsKCi8qKgogKiBDaGVja3Mgd2hldGhlciBnaXZlbiB2YWx1ZSdzIHR5cGUgaXMgb25lIG9mIGEgZmV3IEVycm9yIG9yIEVycm9yLWxpa2UKICoge0BsaW5rIGlzRXJyb3J9LgogKgogKiBAcGFyYW0gd2F0IEEgdmFsdWUgdG8gYmUgY2hlY2tlZC4KICogQHJldHVybnMgQSBib29sZWFuIHJlcHJlc2VudGluZyB0aGUgcmVzdWx0LgogKi8KZnVuY3Rpb24gaXNFcnJvcih3YXQpIHsKICBzd2l0Y2ggKG9iamVjdFRvU3RyaW5nLmNhbGwod2F0KSkgewogICAgY2FzZSAnW29iamVjdCBFcnJvcl0nOgogICAgY2FzZSAnW29iamVjdCBFeGNlcHRpb25dJzoKICAgIGNhc2UgJ1tvYmplY3QgRE9NRXhjZXB0aW9uXSc6CiAgICAgIHJldHVybiB0cnVlOwogICAgZGVmYXVsdDoKICAgICAgcmV0dXJuIGlzSW5zdGFuY2VPZih3YXQsIEVycm9yKTsKICB9Cn0KLyoqCiAqIENoZWNrcyB3aGV0aGVyIGdpdmVuIHZhbHVlIGlzIGFuIGluc3RhbmNlIG9mIHRoZSBnaXZlbiBidWlsdC1pbiBjbGFzcy4KICoKICogQHBhcmFtIHdhdCBUaGUgdmFsdWUgdG8gYmUgY2hlY2tlZAogKiBAcGFyYW0gY2xhc3NOYW1lCiAqIEByZXR1cm5zIEEgYm9vbGVhbiByZXByZXNlbnRpbmcgdGhlIHJlc3VsdC4KICovCmZ1bmN0aW9uIGlzQnVpbHRpbih3YXQsIGNsYXNzTmFtZSkgewogIHJldHVybiBvYmplY3RUb1N0cmluZy5jYWxsKHdhdCkgPT09IGBbb2JqZWN0ICR7Y2xhc3NOYW1lfV1gOwp9CgovKioKICogQ2hlY2tzIHdoZXRoZXIgZ2l2ZW4gdmFsdWUncyB0eXBlIGlzIGEgc3RyaW5nCiAqIHtAbGluayBpc1N0cmluZ30uCiAqCiAqIEBwYXJhbSB3YXQgQSB2YWx1ZSB0byBiZSBjaGVja2VkLgogKiBAcmV0dXJucyBBIGJvb2xlYW4gcmVwcmVzZW50aW5nIHRoZSByZXN1bHQuCiAqLwpmdW5jdGlvbiBpc1N0cmluZyh3YXQpIHsKICByZXR1cm4gaXNCdWlsdGluKHdhdCwgJ1N0cmluZycpOwp9CgovKioKICogQ2hlY2tzIHdoZXRoZXIgZ2l2ZW4gdmFsdWUncyB0eXBlIGlzIGFuIG9iamVjdCBsaXRlcmFsLCBvciBhIGNsYXNzIGluc3RhbmNlLgogKiB7QGxpbmsgaXNQbGFpbk9iamVjdH0uCiAqCiAqIEBwYXJhbSB3YXQgQSB2YWx1ZSB0byBiZSBjaGVja2VkLgogKiBAcmV0dXJucyBBIGJvb2xlYW4gcmVwcmVzZW50aW5nIHRoZSByZXN1bHQuCiAqLwpmdW5jdGlvbiBpc1BsYWluT2JqZWN0KHdhdCkgewogIHJldHVybiBpc0J1aWx0aW4od2F0LCAnT2JqZWN0Jyk7Cn0KCi8qKgogKiBDaGVja3Mgd2hldGhlciBnaXZlbiB2YWx1ZSdzIHR5cGUgaXMgYW4gRXZlbnQgaW5zdGFuY2UKICoge0BsaW5rIGlzRXZlbnR9LgogKgogKiBAcGFyYW0gd2F0IEEgdmFsdWUgdG8gYmUgY2hlY2tlZC4KICogQHJldHVybnMgQSBib29sZWFuIHJlcHJlc2VudGluZyB0aGUgcmVzdWx0LgogKi8KZnVuY3Rpb24gaXNFdmVudCh3YXQpIHsKICByZXR1cm4gdHlwZW9mIEV2ZW50ICE9PSAndW5kZWZpbmVkJyAmJiBpc0luc3RhbmNlT2Yod2F0LCBFdmVudCk7Cn0KCi8qKgogKiBDaGVja3Mgd2hldGhlciBnaXZlbiB2YWx1ZSdzIHR5cGUgaXMgYW4gRWxlbWVudCBpbnN0YW5jZQogKiB7QGxpbmsgaXNFbGVtZW50fS4KICoKICogQHBhcmFtIHdhdCBBIHZhbHVlIHRvIGJlIGNoZWNrZWQuCiAqIEByZXR1cm5zIEEgYm9vbGVhbiByZXByZXNlbnRpbmcgdGhlIHJlc3VsdC4KICovCmZ1bmN0aW9uIGlzRWxlbWVudCh3YXQpIHsKICByZXR1cm4gdHlwZW9mIEVsZW1lbnQgIT09ICd1bmRlZmluZWQnICYmIGlzSW5zdGFuY2VPZih3YXQsIEVsZW1lbnQpOwp9CgovKioKICogQ2hlY2tzIHdoZXRoZXIgZ2l2ZW4gdmFsdWUgaGFzIGEgdGhlbiBmdW5jdGlvbi4KICogQHBhcmFtIHdhdCBBIHZhbHVlIHRvIGJlIGNoZWNrZWQuCiAqLwpmdW5jdGlvbiBpc1RoZW5hYmxlKHdhdCkgewogIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW5zYWZlLW1lbWJlci1hY2Nlc3MKICByZXR1cm4gQm9vbGVhbih3YXQgJiYgd2F0LnRoZW4gJiYgdHlwZW9mIHdhdC50aGVuID09PSAnZnVuY3Rpb24nKTsKfQoKLyoqCiAqIENoZWNrcyB3aGV0aGVyIGdpdmVuIHZhbHVlJ3MgdHlwZSBpcyBhIFN5bnRoZXRpY0V2ZW50CiAqIHtAbGluayBpc1N5bnRoZXRpY0V2ZW50fS4KICoKICogQHBhcmFtIHdhdCBBIHZhbHVlIHRvIGJlIGNoZWNrZWQuCiAqIEByZXR1cm5zIEEgYm9vbGVhbiByZXByZXNlbnRpbmcgdGhlIHJlc3VsdC4KICovCmZ1bmN0aW9uIGlzU3ludGhldGljRXZlbnQod2F0KSB7CiAgcmV0dXJuIGlzUGxhaW5PYmplY3Qod2F0KSAmJiAnbmF0aXZlRXZlbnQnIGluIHdhdCAmJiAncHJldmVudERlZmF1bHQnIGluIHdhdCAmJiAnc3RvcFByb3BhZ2F0aW9uJyBpbiB3YXQ7Cn0KCi8qKgogKiBDaGVja3Mgd2hldGhlciBnaXZlbiB2YWx1ZSBpcyBOYU4KICoge0BsaW5rIGlzTmFOfS4KICoKICogQHBhcmFtIHdhdCBBIHZhbHVlIHRvIGJlIGNoZWNrZWQuCiAqIEByZXR1cm5zIEEgYm9vbGVhbiByZXByZXNlbnRpbmcgdGhlIHJlc3VsdC4KICovCmZ1bmN0aW9uIGlzTmFOJDEod2F0KSB7CiAgcmV0dXJuIHR5cGVvZiB3YXQgPT09ICdudW1iZXInICYmIHdhdCAhPT0gd2F0Owp9CgovKioKICogQ2hlY2tzIHdoZXRoZXIgZ2l2ZW4gdmFsdWUncyB0eXBlIGlzIGFuIGluc3RhbmNlIG9mIHByb3ZpZGVkIGNvbnN0cnVjdG9yLgogKiB7QGxpbmsgaXNJbnN0YW5jZU9mfS4KICoKICogQHBhcmFtIHdhdCBBIHZhbHVlIHRvIGJlIGNoZWNrZWQuCiAqIEBwYXJhbSBiYXNlIEEgY29uc3RydWN0b3IgdG8gYmUgdXNlZCBpbiBhIGNoZWNrLgogKiBAcmV0dXJucyBBIGJvb2xlYW4gcmVwcmVzZW50aW5nIHRoZSByZXN1bHQuCiAqLwpmdW5jdGlvbiBpc0luc3RhbmNlT2Yod2F0LCBiYXNlKSB7CiAgdHJ5IHsKICAgIHJldHVybiB3YXQgaW5zdGFuY2VvZiBiYXNlOwogIH0gY2F0Y2ggKF9lKSB7CiAgICByZXR1cm4gZmFsc2U7CiAgfQp9CgovKioKICogQ2hlY2tzIHdoZXRoZXIgZ2l2ZW4gdmFsdWUncyB0eXBlIGlzIGEgVnVlIFZpZXdNb2RlbC4KICoKICogQHBhcmFtIHdhdCBBIHZhbHVlIHRvIGJlIGNoZWNrZWQuCiAqIEByZXR1cm5zIEEgYm9vbGVhbiByZXByZXNlbnRpbmcgdGhlIHJlc3VsdC4KICovCmZ1bmN0aW9uIGlzVnVlVmlld01vZGVsKHdhdCkgewogIC8vIE5vdCB1c2luZyBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nIGJlY2F1c2UgaW4gVnVlIDMgaXQgd291bGQgcmVhZCB0aGUgaW5zdGFuY2UncyBTeW1ib2woU3ltYm9sLnRvU3RyaW5nVGFnKSBwcm9wZXJ0eS4KICByZXR1cm4gISEodHlwZW9mIHdhdCA9PT0gJ29iamVjdCcgJiYgd2F0ICE9PSBudWxsICYmICgod2F0ICkuX19pc1Z1ZSB8fCAod2F0ICkuX2lzVnVlKSk7Cn0KCi8qKiBJbnRlcm5hbCBnbG9iYWwgd2l0aCBjb21tb24gcHJvcGVydGllcyBhbmQgU2VudHJ5IGV4dGVuc2lvbnMgICovCgovLyBUaGUgY29kZSBiZWxvdyBmb3IgJ2lzR2xvYmFsT2JqJyBhbmQgJ0dMT0JBTF9PQkonIHdhcyBjb3BpZWQgZnJvbSBjb3JlLWpzIGJlZm9yZSBtb2RpZmljYXRpb24KLy8gaHR0cHM6Ly9naXRodWIuY29tL3psb2lyb2NrL2NvcmUtanMvYmxvYi8xYjk0NGRmNTUyODJjZGM5OWM5MGRiNWY0OWViMGI2ZWRhMmNjMGEzL3BhY2thZ2VzL2NvcmUtanMvaW50ZXJuYWxzL2dsb2JhbC5qcwovLyBjb3JlLWpzIGhhcyB0aGUgZm9sbG93aW5nIGxpY2VuY2U6Ci8vCi8vIENvcHlyaWdodCAoYykgMjAxNC0yMDIyIERlbmlzIFB1c2hrYXJldgovLwovLyBQZXJtaXNzaW9uIGlzIGhlcmVieSBncmFudGVkLCBmcmVlIG9mIGNoYXJnZSwgdG8gYW55IHBlcnNvbiBvYnRhaW5pbmcgYSBjb3B5Ci8vIG9mIHRoaXMgc29mdHdhcmUgYW5kIGFzc29jaWF0ZWQgZG9jdW1lbnRhdGlvbiBmaWxlcyAodGhlICJTb2Z0d2FyZSIpLCB0byBkZWFsCi8vIGluIHRoZSBTb2Z0d2FyZSB3aXRob3V0IHJlc3RyaWN0aW9uLCBpbmNsdWRpbmcgd2l0aG91dCBsaW1pdGF0aW9uIHRoZSByaWdodHMKLy8gdG8gdXNlLCBjb3B5LCBtb2RpZnksIG1lcmdlLCBwdWJsaXNoLCBkaXN0cmlidXRlLCBzdWJsaWNlbnNlLCBhbmQvb3Igc2VsbAovLyBjb3BpZXMgb2YgdGhlIFNvZnR3YXJlLCBhbmQgdG8gcGVybWl0IHBlcnNvbnMgdG8gd2hvbSB0aGUgU29mdHdhcmUgaXMKLy8gZnVybmlzaGVkIHRvIGRvIHNvLCBzdWJqZWN0IHRvIHRoZSBmb2xsb3dpbmcgY29uZGl0aW9uczoKLy8KLy8gVGhlIGFib3ZlIGNvcHlyaWdodCBub3RpY2UgYW5kIHRoaXMgcGVybWlzc2lvbiBub3RpY2Ugc2hhbGwgYmUgaW5jbHVkZWQgaW4KLy8gYWxsIGNvcGllcyBvciBzdWJzdGFudGlhbCBwb3J0aW9ucyBvZiB0aGUgU29mdHdhcmUuCi8vCi8vIFRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCAiQVMgSVMiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBLSU5ELCBFWFBSRVNTIE9SCi8vIElNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLAovLyBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklOR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUKLy8gQVVUSE9SUyBPUiBDT1BZUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdFUyBPUiBPVEhFUgovLyBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLAovLyBPVVQgT0YgT1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOCi8vIFRIRSBTT0ZUV0FSRS4KCi8qKiBSZXR1cm5zICdvYmonIGlmIGl0J3MgdGhlIGdsb2JhbCBvYmplY3QsIG90aGVyd2lzZSByZXR1cm5zIHVuZGVmaW5lZCAqLwpmdW5jdGlvbiBpc0dsb2JhbE9iaihvYmopIHsKICByZXR1cm4gb2JqICYmIG9iai5NYXRoID09IE1hdGggPyBvYmogOiB1bmRlZmluZWQ7Cn0KCi8qKiBHZXQncyB0aGUgZ2xvYmFsIG9iamVjdCBmb3IgdGhlIGN1cnJlbnQgSmF2YVNjcmlwdCBydW50aW1lICovCmNvbnN0IEdMT0JBTF9PQkogPQogICh0eXBlb2YgZ2xvYmFsVGhpcyA9PSAnb2JqZWN0JyAmJiBpc0dsb2JhbE9iaihnbG9iYWxUaGlzKSkgfHwKICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tcmVzdHJpY3RlZC1nbG9iYWxzCiAgKHR5cGVvZiB3aW5kb3cgPT0gJ29iamVjdCcgJiYgaXNHbG9iYWxPYmood2luZG93KSkgfHwKICAodHlwZW9mIHNlbGYgPT0gJ29iamVjdCcgJiYgaXNHbG9iYWxPYmooc2VsZikpIHx8CiAgKHR5cGVvZiBnbG9iYWwgPT0gJ29iamVjdCcgJiYgaXNHbG9iYWxPYmooZ2xvYmFsKSkgfHwKICAoZnVuY3Rpb24gKCkgewogICAgcmV0dXJuIHRoaXM7CiAgfSkoKSB8fAogIHt9OwoKLyoqCiAqIEBkZXByZWNhdGVkIFVzZSBHTE9CQUxfT0JKIGluc3RlYWQgb3IgV0lORE9XIGZyb20gQHNlbnRyeS9icm93c2VyLiBUaGlzIHdpbGwgYmUgcmVtb3ZlZCBpbiB2OAogKi8KZnVuY3Rpb24gZ2V0R2xvYmFsT2JqZWN0KCkgewogIHJldHVybiBHTE9CQUxfT0JKIDsKfQoKLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIGRlcHJlY2F0aW9uL2RlcHJlY2F0aW9uCmNvbnN0IFdJTkRPVyA9IGdldEdsb2JhbE9iamVjdCgpOwoKY29uc3QgREVGQVVMVF9NQVhfU1RSSU5HX0xFTkdUSCA9IDgwOwoKLyoqCiAqIEdpdmVuIGEgY2hpbGQgRE9NIGVsZW1lbnQsIHJldHVybnMgYSBxdWVyeS1zZWxlY3RvciBzdGF0ZW1lbnQgZGVzY3JpYmluZyB0aGF0CiAqIGFuZCBpdHMgYW5jZXN0b3JzCiAqIGUuZy4gW0hUTUxFbGVtZW50XSA9PiBib2R5ID4gZGl2ID4gaW5wdXQjZm9vLmJ0bltuYW1lPWJhel0KICogQHJldHVybnMgZ2VuZXJhdGVkIERPTSBwYXRoCiAqLwpmdW5jdGlvbiBodG1sVHJlZUFzU3RyaW5nKAogIGVsZW0sCiAgb3B0aW9ucyA9IHt9LAopIHsKICBpZiAoIWVsZW0pIHsKICAgIHJldHVybiAnPHVua25vd24+JzsKICB9CgogIC8vIHRyeS9jYXRjaCBib3RoOgogIC8vIC0gYWNjZXNzaW5nIGV2ZW50LnRhcmdldCAoc2VlIGdldHNlbnRyeS9yYXZlbi1qcyM4MzgsICM3NjgpCiAgLy8gLSBgaHRtbFRyZWVBc1N0cmluZ2AgYmVjYXVzZSBpdCdzIGNvbXBsZXgsIGFuZCBqdXN0IGFjY2Vzc2luZyB0aGUgRE9NIGluY29ycmVjdGx5CiAgLy8gLSBjYW4gdGhyb3cgYW4gZXhjZXB0aW9uIGluIHNvbWUgY2lyY3Vtc3RhbmNlcy4KICB0cnkgewogICAgbGV0IGN1cnJlbnRFbGVtID0gZWxlbSA7CiAgICBjb25zdCBNQVhfVFJBVkVSU0VfSEVJR0hUID0gNTsKICAgIGNvbnN0IG91dCA9IFtdOwogICAgbGV0IGhlaWdodCA9IDA7CiAgICBsZXQgbGVuID0gMDsKICAgIGNvbnN0IHNlcGFyYXRvciA9ICcgPiAnOwogICAgY29uc3Qgc2VwTGVuZ3RoID0gc2VwYXJhdG9yLmxlbmd0aDsKICAgIGxldCBuZXh0U3RyOwogICAgY29uc3Qga2V5QXR0cnMgPSBBcnJheS5pc0FycmF5KG9wdGlvbnMpID8gb3B0aW9ucyA6IG9wdGlvbnMua2V5QXR0cnM7CiAgICBjb25zdCBtYXhTdHJpbmdMZW5ndGggPSAoIUFycmF5LmlzQXJyYXkob3B0aW9ucykgJiYgb3B0aW9ucy5tYXhTdHJpbmdMZW5ndGgpIHx8IERFRkFVTFRfTUFYX1NUUklOR19MRU5HVEg7CgogICAgd2hpbGUgKGN1cnJlbnRFbGVtICYmIGhlaWdodCsrIDwgTUFYX1RSQVZFUlNFX0hFSUdIVCkgewogICAgICBuZXh0U3RyID0gX2h0bWxFbGVtZW50QXNTdHJpbmcoY3VycmVudEVsZW0sIGtleUF0dHJzKTsKICAgICAgLy8gYmFpbCBvdXQgaWYKICAgICAgLy8gLSBuZXh0U3RyIGlzIHRoZSAnaHRtbCcgZWxlbWVudAogICAgICAvLyAtIHRoZSBsZW5ndGggb2YgdGhlIHN0cmluZyB0aGF0IHdvdWxkIGJlIGNyZWF0ZWQgZXhjZWVkcyBtYXhTdHJpbmdMZW5ndGgKICAgICAgLy8gICAoaWdub3JlIHRoaXMgbGltaXQgaWYgd2UgYXJlIG9uIHRoZSBmaXJzdCBpdGVyYXRpb24pCiAgICAgIGlmIChuZXh0U3RyID09PSAnaHRtbCcgfHwgKGhlaWdodCA+IDEgJiYgbGVuICsgb3V0Lmxlbmd0aCAqIHNlcExlbmd0aCArIG5leHRTdHIubGVuZ3RoID49IG1heFN0cmluZ0xlbmd0aCkpIHsKICAgICAgICBicmVhazsKICAgICAgfQoKICAgICAgb3V0LnB1c2gobmV4dFN0cik7CgogICAgICBsZW4gKz0gbmV4dFN0ci5sZW5ndGg7CiAgICAgIGN1cnJlbnRFbGVtID0gY3VycmVudEVsZW0ucGFyZW50Tm9kZTsKICAgIH0KCiAgICByZXR1cm4gb3V0LnJldmVyc2UoKS5qb2luKHNlcGFyYXRvcik7CiAgfSBjYXRjaCAoX29PKSB7CiAgICByZXR1cm4gJzx1bmtub3duPic7CiAgfQp9CgovKioKICogUmV0dXJucyBhIHNpbXBsZSwgcXVlcnktc2VsZWN0b3IgcmVwcmVzZW50YXRpb24gb2YgYSBET00gZWxlbWVudAogKiBlLmcuIFtIVE1MRWxlbWVudF0gPT4gaW5wdXQjZm9vLmJ0bltuYW1lPWJhel0KICogQHJldHVybnMgZ2VuZXJhdGVkIERPTSBwYXRoCiAqLwpmdW5jdGlvbiBfaHRtbEVsZW1lbnRBc1N0cmluZyhlbCwga2V5QXR0cnMpIHsKICBjb25zdCBlbGVtID0gZWwKCjsKCiAgY29uc3Qgb3V0ID0gW107CiAgbGV0IGNsYXNzTmFtZTsKICBsZXQgY2xhc3NlczsKICBsZXQga2V5OwogIGxldCBhdHRyOwogIGxldCBpOwoKICBpZiAoIWVsZW0gfHwgIWVsZW0udGFnTmFtZSkgewogICAgcmV0dXJuICcnOwogIH0KCiAgLy8gQHRzLWV4cGVjdC1lcnJvciBXSU5ET1cgaGFzIEhUTUxFbGVtZW50CiAgaWYgKFdJTkRPVy5IVE1MRWxlbWVudCkgewogICAgLy8gSWYgdXNpbmcgdGhlIGNvbXBvbmVudCBuYW1lIGFubm90YXRpb24gcGx1Z2luLCB0aGlzIHZhbHVlIG1heSBiZSBhdmFpbGFibGUgb24gdGhlIERPTSBub2RlCiAgICBpZiAoZWxlbSBpbnN0YW5jZW9mIEhUTUxFbGVtZW50ICYmIGVsZW0uZGF0YXNldCAmJiBlbGVtLmRhdGFzZXRbJ3NlbnRyeUNvbXBvbmVudCddKSB7CiAgICAgIHJldHVybiBlbGVtLmRhdGFzZXRbJ3NlbnRyeUNvbXBvbmVudCddOwogICAgfQogIH0KCiAgb3V0LnB1c2goZWxlbS50YWdOYW1lLnRvTG93ZXJDYXNlKCkpOwoKICAvLyBQYWlycyBvZiBhdHRyaWJ1dGUga2V5cyBkZWZpbmVkIGluIGBzZXJpYWxpemVBdHRyaWJ1dGVgIGFuZCB0aGVpciB2YWx1ZXMgb24gZWxlbWVudC4KICBjb25zdCBrZXlBdHRyUGFpcnMgPQogICAga2V5QXR0cnMgJiYga2V5QXR0cnMubGVuZ3RoCiAgICAgID8ga2V5QXR0cnMuZmlsdGVyKGtleUF0dHIgPT4gZWxlbS5nZXRBdHRyaWJ1dGUoa2V5QXR0cikpLm1hcChrZXlBdHRyID0+IFtrZXlBdHRyLCBlbGVtLmdldEF0dHJpYnV0ZShrZXlBdHRyKV0pCiAgICAgIDogbnVsbDsKCiAgaWYgKGtleUF0dHJQYWlycyAmJiBrZXlBdHRyUGFpcnMubGVuZ3RoKSB7CiAgICBrZXlBdHRyUGFpcnMuZm9yRWFjaChrZXlBdHRyUGFpciA9PiB7CiAgICAgIG91dC5wdXNoKGBbJHtrZXlBdHRyUGFpclswXX09IiR7a2V5QXR0clBhaXJbMV19Il1gKTsKICAgIH0pOwogIH0gZWxzZSB7CiAgICBpZiAoZWxlbS5pZCkgewogICAgICBvdXQucHVzaChgIyR7ZWxlbS5pZH1gKTsKICAgIH0KCiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgcHJlZmVyLWNvbnN0CiAgICBjbGFzc05hbWUgPSBlbGVtLmNsYXNzTmFtZTsKICAgIGlmIChjbGFzc05hbWUgJiYgaXNTdHJpbmcoY2xhc3NOYW1lKSkgewogICAgICBjbGFzc2VzID0gY2xhc3NOYW1lLnNwbGl0KC9ccysvKTsKICAgICAgZm9yIChpID0gMDsgaSA8IGNsYXNzZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICBvdXQucHVzaChgLiR7Y2xhc3Nlc1tpXX1gKTsKICAgICAgfQogICAgfQogIH0KICBjb25zdCBhbGxvd2VkQXR0cnMgPSBbJ2FyaWEtbGFiZWwnLCAndHlwZScsICduYW1lJywgJ3RpdGxlJywgJ2FsdCddOwogIGZvciAoaSA9IDA7IGkgPCBhbGxvd2VkQXR0cnMubGVuZ3RoOyBpKyspIHsKICAgIGtleSA9IGFsbG93ZWRBdHRyc1tpXTsKICAgIGF0dHIgPSBlbGVtLmdldEF0dHJpYnV0ZShrZXkpOwogICAgaWYgKGF0dHIpIHsKICAgICAgb3V0LnB1c2goYFske2tleX09IiR7YXR0cn0iXWApOwogICAgfQogIH0KICByZXR1cm4gb3V0LmpvaW4oJycpOwp9CgovKioKICogVGhpcyBzZXJ2ZXMgYXMgYSBidWlsZCB0aW1lIGZsYWcgdGhhdCB3aWxsIGJlIHRydWUgYnkgZGVmYXVsdCwgYnV0IGZhbHNlIGluIG5vbi1kZWJ1ZyBidWlsZHMgb3IgaWYgdXNlcnMgcmVwbGFjZSBgX19TRU5UUllfREVCVUdfX2AgaW4gdGhlaXIgZ2VuZXJhdGVkIGNvZGUuCiAqCiAqIEFUVEVOVElPTjogVGhpcyBjb25zdGFudCBtdXN0IG5ldmVyIGNyb3NzIHBhY2thZ2UgYm91bmRhcmllcyAoaS5lLiBiZSBleHBvcnRlZCkgdG8gZ3VhcmFudGVlIHRoYXQgaXQgY2FuIGJlIHVzZWQgZm9yIHRyZWUgc2hha2luZy4KICovCmNvbnN0IERFQlVHX0JVSUxEJDEgPSAodHlwZW9mIF9fU0VOVFJZX0RFQlVHX18gPT09ICd1bmRlZmluZWQnIHx8IF9fU0VOVFJZX0RFQlVHX18pOwoKLyoqIFByZWZpeCBmb3IgbG9nZ2luZyBzdHJpbmdzICovCmNvbnN0IFBSRUZJWCA9ICdTZW50cnkgTG9nZ2VyICc7Cgpjb25zdCBDT05TT0xFX0xFVkVMUyA9IFsKICAnZGVidWcnLAogICdpbmZvJywKICAnd2FybicsCiAgJ2Vycm9yJywKICAnbG9nJywKICAnYXNzZXJ0JywKICAndHJhY2UnLApdIDsKCi8qKiBUaGlzIG1heSBiZSBtdXRhdGVkIGJ5IHRoZSBjb25zb2xlIGluc3RydW1lbnRhdGlvbi4gKi8KY29uc3Qgb3JpZ2luYWxDb25zb2xlTWV0aG9kcwoKID0ge307CgovKiogSlNEb2MgKi8KCi8qKgogKiBUZW1wb3JhcmlseSBkaXNhYmxlIHNlbnRyeSBjb25zb2xlIGluc3RydW1lbnRhdGlvbnMuCiAqCiAqIEBwYXJhbSBjYWxsYmFjayBUaGUgZnVuY3Rpb24gdG8gcnVuIGFnYWluc3QgdGhlIG9yaWdpbmFsIGBjb25zb2xlYCBtZXNzYWdlcwogKiBAcmV0dXJucyBUaGUgcmVzdWx0cyBvZiB0aGUgY2FsbGJhY2sKICovCmZ1bmN0aW9uIGNvbnNvbGVTYW5kYm94KGNhbGxiYWNrKSB7CiAgaWYgKCEoJ2NvbnNvbGUnIGluIEdMT0JBTF9PQkopKSB7CiAgICByZXR1cm4gY2FsbGJhY2soKTsKICB9CgogIGNvbnN0IGNvbnNvbGUgPSBHTE9CQUxfT0JKLmNvbnNvbGUgOwogIGNvbnN0IHdyYXBwZWRGdW5jcyA9IHt9OwoKICBjb25zdCB3cmFwcGVkTGV2ZWxzID0gT2JqZWN0LmtleXMob3JpZ2luYWxDb25zb2xlTWV0aG9kcykgOwoKICAvLyBSZXN0b3JlIGFsbCB3cmFwcGVkIGNvbnNvbGUgbWV0aG9kcwogIHdyYXBwZWRMZXZlbHMuZm9yRWFjaChsZXZlbCA9PiB7CiAgICBjb25zdCBvcmlnaW5hbENvbnNvbGVNZXRob2QgPSBvcmlnaW5hbENvbnNvbGVNZXRob2RzW2xldmVsXSA7CiAgICB3cmFwcGVkRnVuY3NbbGV2ZWxdID0gY29uc29sZVtsZXZlbF0gOwogICAgY29uc29sZVtsZXZlbF0gPSBvcmlnaW5hbENvbnNvbGVNZXRob2Q7CiAgfSk7CgogIHRyeSB7CiAgICByZXR1cm4gY2FsbGJhY2soKTsKICB9IGZpbmFsbHkgewogICAgLy8gUmV2ZXJ0IHJlc3RvcmF0aW9uIHRvIHdyYXBwZWQgc3RhdGUKICAgIHdyYXBwZWRMZXZlbHMuZm9yRWFjaChsZXZlbCA9PiB7CiAgICAgIGNvbnNvbGVbbGV2ZWxdID0gd3JhcHBlZEZ1bmNzW2xldmVsXSA7CiAgICB9KTsKICB9Cn0KCmZ1bmN0aW9uIG1ha2VMb2dnZXIoKSB7CiAgbGV0IGVuYWJsZWQgPSBmYWxzZTsKICBjb25zdCBsb2dnZXIgPSB7CiAgICBlbmFibGU6ICgpID0+IHsKICAgICAgZW5hYmxlZCA9IHRydWU7CiAgICB9LAogICAgZGlzYWJsZTogKCkgPT4gewogICAgICBlbmFibGVkID0gZmFsc2U7CiAgICB9LAogICAgaXNFbmFibGVkOiAoKSA9PiBlbmFibGVkLAogIH07CgogIGlmIChERUJVR19CVUlMRCQxKSB7CiAgICBDT05TT0xFX0xFVkVMUy5mb3JFYWNoKG5hbWUgPT4gewogICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueQogICAgICBsb2dnZXJbbmFtZV0gPSAoLi4uYXJncykgPT4gewogICAgICAgIGlmIChlbmFibGVkKSB7CiAgICAgICAgICBjb25zb2xlU2FuZGJveCgoKSA9PiB7CiAgICAgICAgICAgIEdMT0JBTF9PQkouY29uc29sZVtuYW1lXShgJHtQUkVGSVh9WyR7bmFtZX1dOmAsIC4uLmFyZ3MpOwogICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICB9OwogICAgfSk7CiAgfSBlbHNlIHsKICAgIENPTlNPTEVfTEVWRUxTLmZvckVhY2gobmFtZSA9PiB7CiAgICAgIGxvZ2dlcltuYW1lXSA9ICgpID0+IHVuZGVmaW5lZDsKICAgIH0pOwogIH0KCiAgcmV0dXJuIGxvZ2dlciA7Cn0KCmNvbnN0IGxvZ2dlciA9IG1ha2VMb2dnZXIoKTsKCi8qKgogKiBSZW5kZXJzIHRoZSBzdHJpbmcgcmVwcmVzZW50YXRpb24gb2YgdGhpcyBEc24uCiAqCiAqIEJ5IGRlZmF1bHQsIHRoaXMgd2lsbCByZW5kZXIgdGhlIHB1YmxpYyByZXByZXNlbnRhdGlvbiB3aXRob3V0IHRoZSBwYXNzd29yZAogKiBjb21wb25lbnQuIFRvIGdldCB0aGUgZGVwcmVjYXRlZCBwcml2YXRlIHJlcHJlc2VudGF0aW9uLCBzZXQgYHdpdGhQYXNzd29yZGAKICogdG8gdHJ1ZS4KICoKICogQHBhcmFtIHdpdGhQYXNzd29yZCBXaGVuIHNldCB0byB0cnVlLCB0aGUgcGFzc3dvcmQgd2lsbCBiZSBpbmNsdWRlZC4KICovCmZ1bmN0aW9uIGRzblRvU3RyaW5nKGRzbiwgd2l0aFBhc3N3b3JkID0gZmFsc2UpIHsKICBjb25zdCB7IGhvc3QsIHBhdGgsIHBhc3MsIHBvcnQsIHByb2plY3RJZCwgcHJvdG9jb2wsIHB1YmxpY0tleSB9ID0gZHNuOwogIHJldHVybiAoCiAgICBgJHtwcm90b2NvbH06Ly8ke3B1YmxpY0tleX0ke3dpdGhQYXNzd29yZCAmJiBwYXNzID8gYDoke3Bhc3N9YCA6ICcnfWAgKwogICAgYEAke2hvc3R9JHtwb3J0ID8gYDoke3BvcnR9YCA6ICcnfS8ke3BhdGggPyBgJHtwYXRofS9gIDogcGF0aH0ke3Byb2plY3RJZH1gCiAgKTsKfQoKLyoqIEFuIGVycm9yIGVtaXR0ZWQgYnkgU2VudHJ5IFNES3MgYW5kIHJlbGF0ZWQgdXRpbGl0aWVzLiAqLwpjbGFzcyBTZW50cnlFcnJvciBleHRlbmRzIEVycm9yIHsKICAvKiogRGlzcGxheSBuYW1lIG9mIHRoaXMgZXJyb3IgaW5zdGFuY2UuICovCgogICBjb25zdHJ1Y3RvciggbWVzc2FnZSwgbG9nTGV2ZWwgPSAnd2FybicpIHsKICAgIHN1cGVyKG1lc3NhZ2UpO3RoaXMubWVzc2FnZSA9IG1lc3NhZ2U7CiAgICB0aGlzLm5hbWUgPSBuZXcudGFyZ2V0LnByb3RvdHlwZS5jb25zdHJ1Y3Rvci5uYW1lOwogICAgLy8gVGhpcyBzZXRzIHRoZSBwcm90b3R5cGUgdG8gYmUgYEVycm9yYCwgbm90IGBTZW50cnlFcnJvcmAuIEl0J3MgdW5jbGVhciB3aHkgd2UgZG8gdGhpcywgYnV0IGNvbW1lbnRpbmcgdGhpcyBsaW5lCiAgICAvLyBvdXQgY2F1c2VzIHZhcmlvdXMgKHNlZW1pbmdseSB0b3RhbGx5IHVucmVsYXRlZCkgcGxheXdyaWdodCB0ZXN0cyBjb25zaXN0ZW50bHkgdGltZSBvdXQuIEZZSSwgdGhpcyBtYWtlcwogICAgLy8gaW5zdGFuY2VzIG9mIGBTZW50cnlFcnJvcmAgZmFpbCBgb2JqIGluc3RhbmNlb2YgU2VudHJ5RXJyb3JgIGNoZWNrcy4KICAgIE9iamVjdC5zZXRQcm90b3R5cGVPZih0aGlzLCBuZXcudGFyZ2V0LnByb3RvdHlwZSk7CiAgICB0aGlzLmxvZ0xldmVsID0gbG9nTGV2ZWw7CiAgfQp9CgovKioKICogRW5jb2RlcyBnaXZlbiBvYmplY3QgaW50byB1cmwtZnJpZW5kbHkgZm9ybWF0CiAqCiAqIEBwYXJhbSBvYmplY3QgQW4gb2JqZWN0IHRoYXQgY29udGFpbnMgc2VyaWFsaXphYmxlIHZhbHVlcwogKiBAcmV0dXJucyBzdHJpbmcgRW5jb2RlZAogKi8KZnVuY3Rpb24gdXJsRW5jb2RlKG9iamVjdCkgewogIHJldHVybiBPYmplY3Qua2V5cyhvYmplY3QpCiAgICAubWFwKGtleSA9PiBgJHtlbmNvZGVVUklDb21wb25lbnQoa2V5KX09JHtlbmNvZGVVUklDb21wb25lbnQob2JqZWN0W2tleV0pfWApCiAgICAuam9pbignJicpOwp9CgovKioKICogVHJhbnNmb3JtcyBhbnkgYEVycm9yYCBvciBgRXZlbnRgIGludG8gYSBwbGFpbiBvYmplY3Qgd2l0aCBhbGwgb2YgdGhlaXIgZW51bWVyYWJsZSBwcm9wZXJ0aWVzLCBhbmQgc29tZSBvZiB0aGVpcgogKiBub24tZW51bWVyYWJsZSBwcm9wZXJ0aWVzIGF0dGFjaGVkLgogKgogKiBAcGFyYW0gdmFsdWUgSW5pdGlhbCBzb3VyY2UgdGhhdCB3ZSBoYXZlIHRvIHRyYW5zZm9ybSBpbiBvcmRlciBmb3IgaXQgdG8gYmUgdXNhYmxlIGJ5IHRoZSBzZXJpYWxpemVyCiAqIEByZXR1cm5zIEFuIEV2ZW50IG9yIEVycm9yIHR1cm5lZCBpbnRvIGFuIG9iamVjdCAtIG9yIHRoZSB2YWx1ZSBhcmd1cm1lbnQgaXRzZWxmLCB3aGVuIHZhbHVlIGlzIG5laXRoZXIgYW4gRXZlbnQgbm9yCiAqICBhbiBFcnJvci4KICovCmZ1bmN0aW9uIGNvbnZlcnRUb1BsYWluT2JqZWN0KAogIHZhbHVlLAopCgogewogIGlmIChpc0Vycm9yKHZhbHVlKSkgewogICAgcmV0dXJuIHsKICAgICAgbWVzc2FnZTogdmFsdWUubWVzc2FnZSwKICAgICAgbmFtZTogdmFsdWUubmFtZSwKICAgICAgc3RhY2s6IHZhbHVlLnN0YWNrLAogICAgICAuLi5nZXRPd25Qcm9wZXJ0aWVzKHZhbHVlKSwKICAgIH07CiAgfSBlbHNlIGlmIChpc0V2ZW50KHZhbHVlKSkgewogICAgY29uc3QgbmV3T2JqCgogPSB7CiAgICAgIHR5cGU6IHZhbHVlLnR5cGUsCiAgICAgIHRhcmdldDogc2VyaWFsaXplRXZlbnRUYXJnZXQodmFsdWUudGFyZ2V0KSwKICAgICAgY3VycmVudFRhcmdldDogc2VyaWFsaXplRXZlbnRUYXJnZXQodmFsdWUuY3VycmVudFRhcmdldCksCiAgICAgIC4uLmdldE93blByb3BlcnRpZXModmFsdWUpLAogICAgfTsKCiAgICBpZiAodHlwZW9mIEN1c3RvbUV2ZW50ICE9PSAndW5kZWZpbmVkJyAmJiBpc0luc3RhbmNlT2YodmFsdWUsIEN1c3RvbUV2ZW50KSkgewogICAgICBuZXdPYmouZGV0YWlsID0gdmFsdWUuZGV0YWlsOwogICAgfQoKICAgIHJldHVybiBuZXdPYmo7CiAgfSBlbHNlIHsKICAgIHJldHVybiB2YWx1ZTsKICB9Cn0KCi8qKiBDcmVhdGVzIGEgc3RyaW5nIHJlcHJlc2VudGF0aW9uIG9mIHRoZSB0YXJnZXQgb2YgYW4gYEV2ZW50YCBvYmplY3QgKi8KZnVuY3Rpb24gc2VyaWFsaXplRXZlbnRUYXJnZXQodGFyZ2V0KSB7CiAgdHJ5IHsKICAgIHJldHVybiBpc0VsZW1lbnQodGFyZ2V0KSA/IGh0bWxUcmVlQXNTdHJpbmcodGFyZ2V0KSA6IE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbCh0YXJnZXQpOwogIH0gY2F0Y2ggKF9vTykgewogICAgcmV0dXJuICc8dW5rbm93bj4nOwogIH0KfQoKLyoqIEZpbHRlcnMgb3V0IGFsbCBidXQgYW4gb2JqZWN0J3Mgb3duIHByb3BlcnRpZXMgKi8KZnVuY3Rpb24gZ2V0T3duUHJvcGVydGllcyhvYmopIHsKICBpZiAodHlwZW9mIG9iaiA9PT0gJ29iamVjdCcgJiYgb2JqICE9PSBudWxsKSB7CiAgICBjb25zdCBleHRyYWN0ZWRQcm9wcyA9IHt9OwogICAgZm9yIChjb25zdCBwcm9wZXJ0eSBpbiBvYmopIHsKICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChvYmosIHByb3BlcnR5KSkgewogICAgICAgIGV4dHJhY3RlZFByb3BzW3Byb3BlcnR5XSA9IChvYmogKVtwcm9wZXJ0eV07CiAgICAgIH0KICAgIH0KICAgIHJldHVybiBleHRyYWN0ZWRQcm9wczsKICB9IGVsc2UgewogICAgcmV0dXJuIHt9OwogIH0KfQoKLyoqCiAqIEdpdmVuIGFueSBvYmplY3QsIHJldHVybiBhIG5ldyBvYmplY3QgaGF2aW5nIHJlbW92ZWQgYWxsIGZpZWxkcyB3aG9zZSB2YWx1ZSB3YXMgYHVuZGVmaW5lZGAuCiAqIFdvcmtzIHJlY3Vyc2l2ZWx5IG9uIG9iamVjdHMgYW5kIGFycmF5cy4KICoKICogQXR0ZW50aW9uOiBUaGlzIGZ1bmN0aW9uIGtlZXBzIGNpcmN1bGFyIHJlZmVyZW5jZXMgaW4gdGhlIHJldHVybmVkIG9iamVjdC4KICovCmZ1bmN0aW9uIGRyb3BVbmRlZmluZWRLZXlzKGlucHV0VmFsdWUpIHsKICAvLyBUaGlzIG1hcCBrZWVwcyB0cmFjayBvZiB3aGF0IGFscmVhZHkgdmlzaXRlZCBub2RlcyBtYXAgdG8uCiAgLy8gT3VyIFNldCAtIGJhc2VkIG1lbW9CdWlsZGVyIGRvZXNuJ3Qgd29yayBoZXJlIGJlY2F1c2Ugd2Ugd2FudCB0byB0aGUgb3V0cHV0IG9iamVjdCB0byBoYXZlIHRoZSBzYW1lIGNpcmN1bGFyCiAgLy8gcmVmZXJlbmNlcyBhcyB0aGUgaW5wdXQgb2JqZWN0LgogIGNvbnN0IG1lbW9pemF0aW9uTWFwID0gbmV3IE1hcCgpOwoKICAvLyBUaGlzIGZ1bmN0aW9uIGp1c3QgcHJveGllcyBgX2Ryb3BVbmRlZmluZWRLZXlzYCB0byBrZWVwIHRoZSBgbWVtb0J1aWxkZXJgIG91dCBvZiB0aGlzIGZ1bmN0aW9uJ3MgQVBJCiAgcmV0dXJuIF9kcm9wVW5kZWZpbmVkS2V5cyhpbnB1dFZhbHVlLCBtZW1vaXphdGlvbk1hcCk7Cn0KCmZ1bmN0aW9uIF9kcm9wVW5kZWZpbmVkS2V5cyhpbnB1dFZhbHVlLCBtZW1vaXphdGlvbk1hcCkgewogIGlmIChpc1Bvam8oaW5wdXRWYWx1ZSkpIHsKICAgIC8vIElmIHRoaXMgbm9kZSBoYXMgYWxyZWFkeSBiZWVuIHZpc2l0ZWQgZHVlIHRvIGEgY2lyY3VsYXIgcmVmZXJlbmNlLCByZXR1cm4gdGhlIG9iamVjdCBpdCB3YXMgbWFwcGVkIHRvIGluIHRoZSBuZXcgb2JqZWN0CiAgICBjb25zdCBtZW1vVmFsID0gbWVtb2l6YXRpb25NYXAuZ2V0KGlucHV0VmFsdWUpOwogICAgaWYgKG1lbW9WYWwgIT09IHVuZGVmaW5lZCkgewogICAgICByZXR1cm4gbWVtb1ZhbCA7CiAgICB9CgogICAgY29uc3QgcmV0dXJuVmFsdWUgPSB7fTsKICAgIC8vIFN0b3JlIHRoZSBtYXBwaW5nIG9mIHRoaXMgdmFsdWUgaW4gY2FzZSB3ZSB2aXNpdCBpdCBhZ2FpbiwgaW4gY2FzZSBvZiBjaXJjdWxhciBkYXRhCiAgICBtZW1vaXphdGlvbk1hcC5zZXQoaW5wdXRWYWx1ZSwgcmV0dXJuVmFsdWUpOwoKICAgIGZvciAoY29uc3Qga2V5IG9mIE9iamVjdC5rZXlzKGlucHV0VmFsdWUpKSB7CiAgICAgIGlmICh0eXBlb2YgaW5wdXRWYWx1ZVtrZXldICE9PSAndW5kZWZpbmVkJykgewogICAgICAgIHJldHVyblZhbHVlW2tleV0gPSBfZHJvcFVuZGVmaW5lZEtleXMoaW5wdXRWYWx1ZVtrZXldLCBtZW1vaXphdGlvbk1hcCk7CiAgICAgIH0KICAgIH0KCiAgICByZXR1cm4gcmV0dXJuVmFsdWUgOwogIH0KCiAgaWYgKEFycmF5LmlzQXJyYXkoaW5wdXRWYWx1ZSkpIHsKICAgIC8vIElmIHRoaXMgbm9kZSBoYXMgYWxyZWFkeSBiZWVuIHZpc2l0ZWQgZHVlIHRvIGEgY2lyY3VsYXIgcmVmZXJlbmNlLCByZXR1cm4gdGhlIGFycmF5IGl0IHdhcyBtYXBwZWQgdG8gaW4gdGhlIG5ldyBvYmplY3QKICAgIGNvbnN0IG1lbW9WYWwgPSBtZW1vaXphdGlvbk1hcC5nZXQoaW5wdXRWYWx1ZSk7CiAgICBpZiAobWVtb1ZhbCAhPT0gdW5kZWZpbmVkKSB7CiAgICAgIHJldHVybiBtZW1vVmFsIDsKICAgIH0KCiAgICBjb25zdCByZXR1cm5WYWx1ZSA9IFtdOwogICAgLy8gU3RvcmUgdGhlIG1hcHBpbmcgb2YgdGhpcyB2YWx1ZSBpbiBjYXNlIHdlIHZpc2l0IGl0IGFnYWluLCBpbiBjYXNlIG9mIGNpcmN1bGFyIGRhdGEKICAgIG1lbW9pemF0aW9uTWFwLnNldChpbnB1dFZhbHVlLCByZXR1cm5WYWx1ZSk7CgogICAgaW5wdXRWYWx1ZS5mb3JFYWNoKChpdGVtKSA9PiB7CiAgICAgIHJldHVyblZhbHVlLnB1c2goX2Ryb3BVbmRlZmluZWRLZXlzKGl0ZW0sIG1lbW9pemF0aW9uTWFwKSk7CiAgICB9KTsKCiAgICByZXR1cm4gcmV0dXJuVmFsdWUgOwogIH0KCiAgcmV0dXJuIGlucHV0VmFsdWU7Cn0KCmZ1bmN0aW9uIGlzUG9qbyhpbnB1dCkgewogIGlmICghaXNQbGFpbk9iamVjdChpbnB1dCkpIHsKICAgIHJldHVybiBmYWxzZTsKICB9CgogIHRyeSB7CiAgICBjb25zdCBuYW1lID0gKE9iamVjdC5nZXRQcm90b3R5cGVPZihpbnB1dCkgKS5jb25zdHJ1Y3Rvci5uYW1lOwogICAgcmV0dXJuICFuYW1lIHx8IG5hbWUgPT09ICdPYmplY3QnOwogIH0gY2F0Y2ggKGUpIHsKICAgIHJldHVybiB0cnVlOwogIH0KfQoKLyoqCiAqIERvZXMgdGhpcyBmaWxlbmFtZSBsb29rIGxpa2UgaXQncyBwYXJ0IG9mIHRoZSBhcHAgY29kZT8KICovCmZ1bmN0aW9uIGZpbGVuYW1lSXNJbkFwcChmaWxlbmFtZSwgaXNOYXRpdmUgPSBmYWxzZSkgewogIGNvbnN0IGlzSW50ZXJuYWwgPQogICAgaXNOYXRpdmUgfHwKICAgIChmaWxlbmFtZSAmJgogICAgICAvLyBJdCdzIG5vdCBpbnRlcm5hbCBpZiBpdCdzIGFuIGFic29sdXRlIGxpbnV4IHBhdGgKICAgICAgIWZpbGVuYW1lLnN0YXJ0c1dpdGgoJy8nKSAmJgogICAgICAvLyBJdCdzIG5vdCBpbnRlcm5hbCBpZiBpdCdzIGFuIGFic29sdXRlIHdpbmRvd3MgcGF0aAogICAgICAhZmlsZW5hbWUubWF0Y2goL15bQS1aXTovKSAmJgogICAgICAvLyBJdCdzIG5vdCBpbnRlcm5hbCBpZiB0aGUgcGF0aCBpcyBzdGFydGluZyB3aXRoIGEgZG90CiAgICAgICFmaWxlbmFtZS5zdGFydHNXaXRoKCcuJykgJiYKICAgICAgLy8gSXQncyBub3QgaW50ZXJuYWwgaWYgdGhlIGZyYW1lIGhhcyBhIHByb3RvY29sLiBJbiBub2RlLCB0aGlzIGlzIHVzdWFsbHkgdGhlIGNhc2UgaWYgdGhlIGZpbGUgZ290IHByZS1wcm9jZXNzZWQgd2l0aCBhIGJ1bmRsZXIgbGlrZSB3ZWJwYWNrCiAgICAgICFmaWxlbmFtZS5tYXRjaCgvXlthLXpBLVpdKFthLXpBLVowLTkuXC0rXSkqOlwvXC8vKSk7IC8vIFNjaGVtYSBmcm9tOiBodHRwczovL3N0YWNrb3ZlcmZsb3cuY29tL2EvMzY0MTc4MgoKICAvLyBpbl9hcHAgaXMgYWxsIHRoYXQncyBub3QgYW4gaW50ZXJuYWwgTm9kZSBmdW5jdGlvbiBvciBhIG1vZHVsZSB3aXRoaW4gbm9kZV9tb2R1bGVzCiAgLy8gbm90ZSB0aGF0IGlzTmF0aXZlIGFwcGVhcnMgdG8gcmV0dXJuIHRydWUgZXZlbiBmb3Igbm9kZSBjb3JlIGxpYnJhcmllcwogIC8vIHNlZSBodHRwczovL2dpdGh1Yi5jb20vZ2V0c2VudHJ5L3JhdmVuLW5vZGUvaXNzdWVzLzE3NgoKICByZXR1cm4gIWlzSW50ZXJuYWwgJiYgZmlsZW5hbWUgIT09IHVuZGVmaW5lZCAmJiAhZmlsZW5hbWUuaW5jbHVkZXMoJ25vZGVfbW9kdWxlcy8nKTsKfQoKY29uc3QgU1RBQ0tUUkFDRV9GUkFNRV9MSU1JVCA9IDUwOwpjb25zdCBTVFJJUF9GUkFNRV9SRUdFWFAgPSAvY2FwdHVyZU1lc3NhZ2V8Y2FwdHVyZUV4Y2VwdGlvbi87CgovKioKICogUmVtb3ZlcyBTZW50cnkgZnJhbWVzIGZyb20gdGhlIHRvcCBhbmQgYm90dG9tIG9mIHRoZSBzdGFjayBpZiBwcmVzZW50IGFuZCBlbmZvcmNlcyBhIGxpbWl0IG9mIG1heCBudW1iZXIgb2YgZnJhbWVzLgogKiBBc3N1bWVzIHN0YWNrIGlucHV0IGlzIG9yZGVyZWQgZnJvbSB0b3AgdG8gYm90dG9tIGFuZCByZXR1cm5zIHRoZSByZXZlcnNlIHJlcHJlc2VudGF0aW9uIHNvIGNhbGwgc2l0ZSBvZiB0aGUKICogZnVuY3Rpb24gdGhhdCBjYXVzZWQgdGhlIGNyYXNoIGlzIHRoZSBsYXN0IGZyYW1lIGluIHRoZSBhcnJheS4KICogQGhpZGRlbgogKi8KZnVuY3Rpb24gc3RyaXBTZW50cnlGcmFtZXNBbmRSZXZlcnNlKHN0YWNrKSB7CiAgaWYgKCFzdGFjay5sZW5ndGgpIHsKICAgIHJldHVybiBbXTsKICB9CgogIGNvbnN0IGxvY2FsU3RhY2sgPSBBcnJheS5mcm9tKHN0YWNrKTsKCiAgLy8gSWYgc3RhY2sgc3RhcnRzIHdpdGggb25lIG9mIG91ciBBUEkgY2FsbHMsIHJlbW92ZSBpdCAoc3RhcnRzLCBtZWFuaW5nIGl0J3MgdGhlIHRvcCBvZiB0aGUgc3RhY2sgLSBha2EgbGFzdCBjYWxsKQogIGlmICgvc2VudHJ5V3JhcHBlZC8udGVzdChsb2NhbFN0YWNrW2xvY2FsU3RhY2subGVuZ3RoIC0gMV0uZnVuY3Rpb24gfHwgJycpKSB7CiAgICBsb2NhbFN0YWNrLnBvcCgpOwogIH0KCiAgLy8gUmV2ZXJzaW5nIGluIHRoZSBtaWRkbGUgb2YgdGhlIHByb2NlZHVyZSBhbGxvd3MgdXMgdG8ganVzdCBwb3AgdGhlIHZhbHVlcyBvZmYgdGhlIHN0YWNrCiAgbG9jYWxTdGFjay5yZXZlcnNlKCk7CgogIC8vIElmIHN0YWNrIGVuZHMgd2l0aCBvbmUgb2Ygb3VyIGludGVybmFsIEFQSSBjYWxscywgcmVtb3ZlIGl0IChlbmRzLCBtZWFuaW5nIGl0J3MgdGhlIGJvdHRvbSBvZiB0aGUgc3RhY2sgLSBha2EgdG9wLW1vc3QgY2FsbCkKICBpZiAoU1RSSVBfRlJBTUVfUkVHRVhQLnRlc3QobG9jYWxTdGFja1tsb2NhbFN0YWNrLmxlbmd0aCAtIDFdLmZ1bmN0aW9uIHx8ICcnKSkgewogICAgbG9jYWxTdGFjay5wb3AoKTsKCiAgICAvLyBXaGVuIHVzaW5nIHN5bnRoZXRpYyBldmVudHMsIHdlIHdpbGwgaGF2ZSBhIDIgbGV2ZWxzIGRlZXAgc3RhY2ssIGFzIGBuZXcgRXJyb3IoJ1NlbnRyeSBzeW50aGV0aWNFeGNlcHRpb24nKWAKICAgIC8vIGlzIHByb2R1Y2VkIHdpdGhpbiB0aGUgaHViIGl0c2VsZiwgbWFraW5nIGl0OgogICAgLy8KICAgIC8vICAgU2VudHJ5LmNhcHR1cmVFeGNlcHRpb24oKQogICAgLy8gICBnZXRDdXJyZW50SHViKCkuY2FwdHVyZUV4Y2VwdGlvbigpCiAgICAvLwogICAgLy8gaW5zdGVhZCBvZiBqdXN0IHRoZSB0b3AgYFNlbnRyeWAgY2FsbCBpdHNlbGYuCiAgICAvLyBUaGlzIGZvcmNlcyB1cyB0byBwb3NzaWJseSBzdHJpcCBhbiBhZGRpdGlvbmFsIGZyYW1lIGluIHRoZSBleGFjdCBzYW1lIHdhcyBhcyBhYm92ZS4KICAgIGlmIChTVFJJUF9GUkFNRV9SRUdFWFAudGVzdChsb2NhbFN0YWNrW2xvY2FsU3RhY2subGVuZ3RoIC0gMV0uZnVuY3Rpb24gfHwgJycpKSB7CiAgICAgIGxvY2FsU3RhY2sucG9wKCk7CiAgICB9CiAgfQoKICByZXR1cm4gbG9jYWxTdGFjay5zbGljZSgwLCBTVEFDS1RSQUNFX0ZSQU1FX0xJTUlUKS5tYXAoZnJhbWUgPT4gKHsKICAgIC4uLmZyYW1lLAogICAgZmlsZW5hbWU6IGZyYW1lLmZpbGVuYW1lIHx8IGxvY2FsU3RhY2tbbG9jYWxTdGFjay5sZW5ndGggLSAxXS5maWxlbmFtZSwKICAgIGZ1bmN0aW9uOiBmcmFtZS5mdW5jdGlvbiB8fCAnPycsCiAgfSkpOwp9Cgpjb25zdCBkZWZhdWx0RnVuY3Rpb25OYW1lID0gJzxhbm9ueW1vdXM+JzsKCi8qKgogKiBTYWZlbHkgZXh0cmFjdCBmdW5jdGlvbiBuYW1lIGZyb20gaXRzZWxmCiAqLwpmdW5jdGlvbiBnZXRGdW5jdGlvbk5hbWUoZm4pIHsKICB0cnkgewogICAgaWYgKCFmbiB8fCB0eXBlb2YgZm4gIT09ICdmdW5jdGlvbicpIHsKICAgICAgcmV0dXJuIGRlZmF1bHRGdW5jdGlvbk5hbWU7CiAgICB9CiAgICByZXR1cm4gZm4ubmFtZSB8fCBkZWZhdWx0RnVuY3Rpb25OYW1lOwogIH0gY2F0Y2ggKGUpIHsKICAgIC8vIEp1c3QgYWNjZXNzaW5nIGN1c3RvbSBwcm9wcyBpbiBzb21lIFNlbGVuaXVtIGVudmlyb25tZW50cwogICAgLy8gY2FuIGNhdXNlIGEgIlBlcm1pc3Npb24gZGVuaWVkIiBleGNlcHRpb24gKHNlZSByYXZlbi1qcyM0OTUpLgogICAgcmV0dXJuIGRlZmF1bHRGdW5jdGlvbk5hbWU7CiAgfQp9CgovKioKICogVVVJRDQgZ2VuZXJhdG9yCiAqCiAqIEByZXR1cm5zIHN0cmluZyBHZW5lcmF0ZWQgVVVJRDQuCiAqLwpmdW5jdGlvbiB1dWlkNCgpIHsKICBjb25zdCBnYmwgPSBHTE9CQUxfT0JKIDsKICBjb25zdCBjcnlwdG8gPSBnYmwuY3J5cHRvIHx8IGdibC5tc0NyeXB0bzsKCiAgbGV0IGdldFJhbmRvbUJ5dGUgPSAoKSA9PiBNYXRoLnJhbmRvbSgpICogMTY7CiAgdHJ5IHsKICAgIGlmIChjcnlwdG8gJiYgY3J5cHRvLnJhbmRvbVVVSUQpIHsKICAgICAgcmV0dXJuIGNyeXB0by5yYW5kb21VVUlEKCkucmVwbGFjZSgvLS9nLCAnJyk7CiAgICB9CiAgICBpZiAoY3J5cHRvICYmIGNyeXB0by5nZXRSYW5kb21WYWx1ZXMpIHsKICAgICAgZ2V0UmFuZG9tQnl0ZSA9ICgpID0+IHsKICAgICAgICAvLyBjcnlwdG8uZ2V0UmFuZG9tVmFsdWVzIG1pZ2h0IHJldHVybiB1bmRlZmluZWQgaW5zdGVhZCBvZiB0aGUgdHlwZWQgYXJyYXkKICAgICAgICAvLyBpbiBvbGQgQ2hyb21pdW0gdmVyc2lvbnMgKGUuZy4gMjMuMC4xMjM1LjAgKDE1MTQyMikpCiAgICAgICAgLy8gSG93ZXZlciwgYHR5cGVkQXJyYXlgIGlzIHN0aWxsIGZpbGxlZCBpbi1wbGFjZS4KICAgICAgICAvLyBAc2VlIGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL0FQSS9DcnlwdG8vZ2V0UmFuZG9tVmFsdWVzI3R5cGVkYXJyYXkKICAgICAgICBjb25zdCB0eXBlZEFycmF5ID0gbmV3IFVpbnQ4QXJyYXkoMSk7CiAgICAgICAgY3J5cHRvLmdldFJhbmRvbVZhbHVlcyh0eXBlZEFycmF5KTsKICAgICAgICByZXR1cm4gdHlwZWRBcnJheVswXTsKICAgICAgfTsKICAgIH0KICB9IGNhdGNoIChfKSB7CiAgICAvLyBzb21lIHJ1bnRpbWVzIGNhbiBjcmFzaCBpbnZva2luZyBjcnlwdG8KICAgIC8vIGh0dHBzOi8vZ2l0aHViLmNvbS9nZXRzZW50cnkvc2VudHJ5LWphdmFzY3JpcHQvaXNzdWVzLzg5MzUKICB9CgogIC8vIGh0dHA6Ly9zdGFja292ZXJmbG93LmNvbS9xdWVzdGlvbnMvMTA1MDM0L2hvdy10by1jcmVhdGUtYS1ndWlkLXV1aWQtaW4tamF2YXNjcmlwdC8yMTE3NTIzIzIxMTc1MjMKICAvLyBDb25jYXRlbmF0aW5nIHRoZSBmb2xsb3dpbmcgbnVtYmVycyBhcyBzdHJpbmdzIHJlc3VsdHMgaW4gJzEwMDAwMDAwMTAwMDQwMDA4MDAwMTAwMDAwMDAwMDAwJwogIHJldHVybiAoKFsxZTddICkgKyAxZTMgKyA0ZTMgKyA4ZTMgKyAxZTExKS5yZXBsYWNlKC9bMDE4XS9nLCBjID0+CiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tYml0d2lzZQogICAgKChjICkgXiAoKGdldFJhbmRvbUJ5dGUoKSAmIDE1KSA+PiAoKGMgKSAvIDQpKSkudG9TdHJpbmcoMTYpLAogICk7Cn0KCi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnNhZmUtbWVtYmVyLWFjY2VzcyAqLwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovCgovKioKICogSGVscGVyIHRvIGRlY3ljbGUganNvbiBvYmplY3RzCiAqLwpmdW5jdGlvbiBtZW1vQnVpbGRlcigpIHsKICBjb25zdCBoYXNXZWFrU2V0ID0gdHlwZW9mIFdlYWtTZXQgPT09ICdmdW5jdGlvbic7CiAgY29uc3QgaW5uZXIgPSBoYXNXZWFrU2V0ID8gbmV3IFdlYWtTZXQoKSA6IFtdOwogIGZ1bmN0aW9uIG1lbW9pemUob2JqKSB7CiAgICBpZiAoaGFzV2Vha1NldCkgewogICAgICBpZiAoaW5uZXIuaGFzKG9iaikpIHsKICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgfQogICAgICBpbm5lci5hZGQob2JqKTsKICAgICAgcmV0dXJuIGZhbHNlOwogICAgfQogICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9wcmVmZXItZm9yLW9mCiAgICBmb3IgKGxldCBpID0gMDsgaSA8IGlubmVyLmxlbmd0aDsgaSsrKSB7CiAgICAgIGNvbnN0IHZhbHVlID0gaW5uZXJbaV07CiAgICAgIGlmICh2YWx1ZSA9PT0gb2JqKSB7CiAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgIH0KICAgIH0KICAgIGlubmVyLnB1c2gob2JqKTsKICAgIHJldHVybiBmYWxzZTsKICB9CgogIGZ1bmN0aW9uIHVubWVtb2l6ZShvYmopIHsKICAgIGlmIChoYXNXZWFrU2V0KSB7CiAgICAgIGlubmVyLmRlbGV0ZShvYmopOwogICAgfSBlbHNlIHsKICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBpbm5lci5sZW5ndGg7IGkrKykgewogICAgICAgIGlmIChpbm5lcltpXSA9PT0gb2JqKSB7CiAgICAgICAgICBpbm5lci5zcGxpY2UoaSwgMSk7CiAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgcmV0dXJuIFttZW1vaXplLCB1bm1lbW9pemVdOwp9CgovKioKICogUmVjdXJzaXZlbHkgbm9ybWFsaXplcyB0aGUgZ2l2ZW4gb2JqZWN0LgogKgogKiAtIENyZWF0ZXMgYSBjb3B5IHRvIHByZXZlbnQgb3JpZ2luYWwgaW5wdXQgbXV0YXRpb24KICogLSBTa2lwcyBub24tZW51bWVyYWJsZSBwcm9wZXJ0aWVzCiAqIC0gV2hlbiBzdHJpbmdpZnlpbmcsIGNhbGxzIGB0b0pTT05gIGlmIGltcGxlbWVudGVkCiAqIC0gUmVtb3ZlcyBjaXJjdWxhciByZWZlcmVuY2VzCiAqIC0gVHJhbnNsYXRlcyBub24tc2VyaWFsaXphYmxlIHZhbHVlcyAoYHVuZGVmaW5lZGAvYE5hTmAvZnVuY3Rpb25zKSB0byBzZXJpYWxpemFibGUgZm9ybWF0CiAqIC0gVHJhbnNsYXRlcyBrbm93biBnbG9iYWwgb2JqZWN0cy9jbGFzc2VzIHRvIGEgc3RyaW5nIHJlcHJlc2VudGF0aW9ucwogKiAtIFRha2VzIGNhcmUgb2YgYEVycm9yYCBvYmplY3Qgc2VyaWFsaXphdGlvbgogKiAtIE9wdGlvbmFsbHkgbGltaXRzIGRlcHRoIG9mIGZpbmFsIG91dHB1dAogKiAtIE9wdGlvbmFsbHkgbGltaXRzIG51bWJlciBvZiBwcm9wZXJ0aWVzL2VsZW1lbnRzIGluY2x1ZGVkIGluIGFueSBzaW5nbGUgb2JqZWN0L2FycmF5CiAqCiAqIEBwYXJhbSBpbnB1dCBUaGUgb2JqZWN0IHRvIGJlIG5vcm1hbGl6ZWQuCiAqIEBwYXJhbSBkZXB0aCBUaGUgbWF4IGRlcHRoIHRvIHdoaWNoIHRvIG5vcm1hbGl6ZSB0aGUgb2JqZWN0LiAoQW55dGhpbmcgZGVlcGVyIHN0cmluZ2lmaWVkIHdob2xlLikKICogQHBhcmFtIG1heFByb3BlcnRpZXMgVGhlIG1heCBudW1iZXIgb2YgZWxlbWVudHMgb3IgcHJvcGVydGllcyB0byBiZSBpbmNsdWRlZCBpbiBhbnkgc2luZ2xlIGFycmF5IG9yCiAqIG9iamVjdCBpbiB0aGUgbm9ybWFsbGl6ZWQgb3V0cHV0LgogKiBAcmV0dXJucyBBIG5vcm1hbGl6ZWQgdmVyc2lvbiBvZiB0aGUgb2JqZWN0LCBvciBgIioqbm9uLXNlcmlhbGl6YWJsZSoqImAgaWYgYW55IGVycm9ycyBhcmUgdGhyb3duIGR1cmluZyBub3JtYWxpemF0aW9uLgogKi8KLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkKZnVuY3Rpb24gbm9ybWFsaXplKGlucHV0LCBkZXB0aCA9IDEwMCwgbWF4UHJvcGVydGllcyA9ICtJbmZpbml0eSkgewogIHRyeSB7CiAgICAvLyBzaW5jZSB3ZSdyZSBhdCB0aGUgb3V0ZXJtb3N0IGxldmVsLCB3ZSBkb24ndCBwcm92aWRlIGEga2V5CiAgICByZXR1cm4gdmlzaXQoJycsIGlucHV0LCBkZXB0aCwgbWF4UHJvcGVydGllcyk7CiAgfSBjYXRjaCAoZXJyKSB7CiAgICByZXR1cm4geyBFUlJPUjogYCoqbm9uLXNlcmlhbGl6YWJsZSoqICgke2Vycn0pYCB9OwogIH0KfQoKLyoqCiAqIFZpc2l0cyBhIG5vZGUgdG8gcGVyZm9ybSBub3JtYWxpemF0aW9uIG9uIGl0CiAqCiAqIEBwYXJhbSBrZXkgVGhlIGtleSBjb3JyZXNwb25kaW5nIHRvIHRoZSBnaXZlbiBub2RlCiAqIEBwYXJhbSB2YWx1ZSBUaGUgbm9kZSB0byBiZSB2aXNpdGVkCiAqIEBwYXJhbSBkZXB0aCBPcHRpb25hbCBudW1iZXIgaW5kaWNhdGluZyB0aGUgbWF4aW11bSByZWN1cnNpb24gZGVwdGgKICogQHBhcmFtIG1heFByb3BlcnRpZXMgT3B0aW9uYWwgbWF4aW11bSBudW1iZXIgb2YgcHJvcGVydGllcy9lbGVtZW50cyBpbmNsdWRlZCBpbiBhbnkgc2luZ2xlIG9iamVjdC9hcnJheQogKiBAcGFyYW0gbWVtbyBPcHRpb25hbCBNZW1vIGNsYXNzIGhhbmRsaW5nIGRlY3ljbGluZwogKi8KZnVuY3Rpb24gdmlzaXQoCiAga2V5LAogIHZhbHVlLAogIGRlcHRoID0gK0luZmluaXR5LAogIG1heFByb3BlcnRpZXMgPSArSW5maW5pdHksCiAgbWVtbyA9IG1lbW9CdWlsZGVyKCksCikgewogIGNvbnN0IFttZW1vaXplLCB1bm1lbW9pemVdID0gbWVtbzsKCiAgLy8gR2V0IHRoZSBzaW1wbGUgY2FzZXMgb3V0IG9mIHRoZSB3YXkgZmlyc3QKICBpZiAoCiAgICB2YWx1ZSA9PSBudWxsIHx8IC8vIHRoaXMgbWF0Y2hlcyBudWxsIGFuZCB1bmRlZmluZWQgLT4gZXFlcSBub3QgZXFlcWVxCiAgICAoWydudW1iZXInLCAnYm9vbGVhbicsICdzdHJpbmcnXS5pbmNsdWRlcyh0eXBlb2YgdmFsdWUpICYmICFpc05hTiQxKHZhbHVlKSkKICApIHsKICAgIHJldHVybiB2YWx1ZSA7CiAgfQoKICBjb25zdCBzdHJpbmdpZmllZCA9IHN0cmluZ2lmeVZhbHVlKGtleSwgdmFsdWUpOwoKICAvLyBBbnl0aGluZyB3ZSBjb3VsZCBwb3RlbnRpYWxseSBkaWcgaW50byBtb3JlIChvYmplY3RzIG9yIGFycmF5cykgd2lsbCBoYXZlIGNvbWUgYmFjayBhcyBgIltvYmplY3QgWFhYWF0iYC4KICAvLyBFdmVyeXRoaW5nIGVsc2Ugd2lsbCBoYXZlIGFscmVhZHkgYmVlbiBzZXJpYWxpemVkLCBzbyBpZiB3ZSBkb24ndCBzZWUgdGhhdCBwYXR0ZXJuLCB3ZSdyZSBkb25lLgogIGlmICghc3RyaW5naWZpZWQuc3RhcnRzV2l0aCgnW29iamVjdCAnKSkgewogICAgcmV0dXJuIHN0cmluZ2lmaWVkOwogIH0KCiAgLy8gRnJvbSBoZXJlIG9uLCB3ZSBjYW4gYXNzZXJ0IHRoYXQgYHZhbHVlYCBpcyBlaXRoZXIgYW4gb2JqZWN0IG9yIGFuIGFycmF5LgoKICAvLyBEbyBub3Qgbm9ybWFsaXplIG9iamVjdHMgdGhhdCB3ZSBrbm93IGhhdmUgYWxyZWFkeSBiZWVuIG5vcm1hbGl6ZWQuIEFzIGEgZ2VuZXJhbCBydWxlLCB0aGUKICAvLyAiX19zZW50cnlfc2tpcF9ub3JtYWxpemF0aW9uX18iIHByb3BlcnR5IHNob3VsZCBvbmx5IGJlIHVzZWQgc3BhcmluZ2x5IGFuZCBvbmx5IHNob3VsZCBvbmx5IGJlIHNldCBvbiBvYmplY3RzIHRoYXQKICAvLyBoYXZlIGFscmVhZHkgYmVlbiBub3JtYWxpemVkLgogIGlmICgodmFsdWUgKVsnX19zZW50cnlfc2tpcF9ub3JtYWxpemF0aW9uX18nXSkgewogICAgcmV0dXJuIHZhbHVlIDsKICB9CgogIC8vIFdlIGNhbiBzZXQgYF9fc2VudHJ5X292ZXJyaWRlX25vcm1hbGl6YXRpb25fZGVwdGhfX2Agb24gYW4gb2JqZWN0IHRvIGVuc3VyZSB0aGF0IGZyb20gdGhlcmUKICAvLyBXZSBrZWVwIGEgY2VydGFpbiBhbW91bnQgb2YgZGVwdGguCiAgLy8gVGhpcyBzaG91bGQgYmUgdXNlZCBzcGFyaW5nbHksIGUuZy4gd2UgdXNlIGl0IGZvciB0aGUgcmVkdXggaW50ZWdyYXRpb24gdG8gZW5zdXJlIHdlIGdldCBhIGNlcnRhaW4gYW1vdW50IG9mIHN0YXRlLgogIGNvbnN0IHJlbWFpbmluZ0RlcHRoID0KICAgIHR5cGVvZiAodmFsdWUgKVsnX19zZW50cnlfb3ZlcnJpZGVfbm9ybWFsaXphdGlvbl9kZXB0aF9fJ10gPT09ICdudW1iZXInCiAgICAgID8gKCh2YWx1ZSApWydfX3NlbnRyeV9vdmVycmlkZV9ub3JtYWxpemF0aW9uX2RlcHRoX18nXSApCiAgICAgIDogZGVwdGg7CgogIC8vIFdlJ3JlIGFsc28gZG9uZSBpZiB3ZSd2ZSByZWFjaGVkIHRoZSBtYXggZGVwdGgKICBpZiAocmVtYWluaW5nRGVwdGggPT09IDApIHsKICAgIC8vIEF0IHRoaXMgcG9pbnQgd2Uga25vdyBgc2VyaWFsaXplZGAgaXMgYSBzdHJpbmcgb2YgdGhlIGZvcm0gYCJbb2JqZWN0IFhYWFhdImAuIENsZWFuIGl0IHVwIHNvIGl0J3MganVzdCBgIltYWFhYXSJgLgogICAgcmV0dXJuIHN0cmluZ2lmaWVkLnJlcGxhY2UoJ29iamVjdCAnLCAnJyk7CiAgfQoKICAvLyBJZiB3ZSd2ZSBhbHJlYWR5IHZpc2l0ZWQgdGhpcyBicmFuY2gsIGJhaWwgb3V0LCBhcyBpdCdzIGNpcmN1bGFyIHJlZmVyZW5jZS4gSWYgbm90LCBub3RlIHRoYXQgd2UncmUgc2VlaW5nIGl0IG5vdy4KICBpZiAobWVtb2l6ZSh2YWx1ZSkpIHsKICAgIHJldHVybiAnW0NpcmN1bGFyIH5dJzsKICB9CgogIC8vIElmIHRoZSB2YWx1ZSBoYXMgYSBgdG9KU09OYCBtZXRob2QsIHdlIGNhbGwgaXQgdG8gZXh0cmFjdCBtb3JlIGluZm9ybWF0aW9uCiAgY29uc3QgdmFsdWVXaXRoVG9KU09OID0gdmFsdWUgOwogIGlmICh2YWx1ZVdpdGhUb0pTT04gJiYgdHlwZW9mIHZhbHVlV2l0aFRvSlNPTi50b0pTT04gPT09ICdmdW5jdGlvbicpIHsKICAgIHRyeSB7CiAgICAgIGNvbnN0IGpzb25WYWx1ZSA9IHZhbHVlV2l0aFRvSlNPTi50b0pTT04oKTsKICAgICAgLy8gV2UgbmVlZCB0byBub3JtYWxpemUgdGhlIHJldHVybiB2YWx1ZSBvZiBgLnRvSlNPTigpYCBpbiBjYXNlIGl0IGhhcyBjaXJjdWxhciByZWZlcmVuY2VzCiAgICAgIHJldHVybiB2aXNpdCgnJywganNvblZhbHVlLCByZW1haW5pbmdEZXB0aCAtIDEsIG1heFByb3BlcnRpZXMsIG1lbW8pOwogICAgfSBjYXRjaCAoZXJyKSB7CiAgICAgIC8vIHBhc3MgKFRoZSBidWlsdC1pbiBgdG9KU09OYCBmYWlsZWQsIGJ1dCB3ZSBjYW4gc3RpbGwgdHJ5IHRvIGRvIGl0IG91cnNlbHZlcykKICAgIH0KICB9CgogIC8vIEF0IHRoaXMgcG9pbnQgd2Uga25vdyB3ZSBlaXRoZXIgaGF2ZSBhbiBvYmplY3Qgb3IgYW4gYXJyYXksIHdlIGhhdmVuJ3Qgc2VlbiBpdCBiZWZvcmUsIGFuZCB3ZSdyZSBnb2luZyB0byByZWN1cnNlCiAgLy8gYmVjYXVzZSB3ZSBoYXZlbid0IHlldCByZWFjaGVkIHRoZSBtYXggZGVwdGguIENyZWF0ZSBhbiBhY2N1bXVsYXRvciB0byBob2xkIHRoZSByZXN1bHRzIG9mIHZpc2l0aW5nIGVhY2gKICAvLyBwcm9wZXJ0eS9lbnRyeSwgYW5kIGtlZXAgdHJhY2sgb2YgdGhlIG51bWJlciBvZiBpdGVtcyB3ZSBhZGQgdG8gaXQuCiAgY29uc3Qgbm9ybWFsaXplZCA9IChBcnJheS5pc0FycmF5KHZhbHVlKSA/IFtdIDoge30pIDsKICBsZXQgbnVtQWRkZWQgPSAwOwoKICAvLyBCZWZvcmUgd2UgYmVnaW4sIGNvbnZlcnRgRXJyb3JgIGFuZGBFdmVudGAgaW5zdGFuY2VzIGludG8gcGxhaW4gb2JqZWN0cywgc2luY2Ugc29tZSBvZiBlYWNoIG9mIHRoZWlyIHJlbGV2YW50CiAgLy8gcHJvcGVydGllcyBhcmUgbm9uLWVudW1lcmFibGUgYW5kIG90aGVyd2lzZSB3b3VsZCBnZXQgbWlzc2VkLgogIGNvbnN0IHZpc2l0YWJsZSA9IGNvbnZlcnRUb1BsYWluT2JqZWN0KHZhbHVlICk7CgogIGZvciAoY29uc3QgdmlzaXRLZXkgaW4gdmlzaXRhYmxlKSB7CiAgICAvLyBBdm9pZCBpdGVyYXRpbmcgb3ZlciBmaWVsZHMgaW4gdGhlIHByb3RvdHlwZSBpZiB0aGV5J3ZlIHNvbWVob3cgYmVlbiBleHBvc2VkIHRvIGVudW1lcmF0aW9uLgogICAgaWYgKCFPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwodmlzaXRhYmxlLCB2aXNpdEtleSkpIHsKICAgICAgY29udGludWU7CiAgICB9CgogICAgaWYgKG51bUFkZGVkID49IG1heFByb3BlcnRpZXMpIHsKICAgICAgbm9ybWFsaXplZFt2aXNpdEtleV0gPSAnW01heFByb3BlcnRpZXMgfl0nOwogICAgICBicmVhazsKICAgIH0KCiAgICAvLyBSZWN1cnNpdmVseSB2aXNpdCBhbGwgdGhlIGNoaWxkIG5vZGVzCiAgICBjb25zdCB2aXNpdFZhbHVlID0gdmlzaXRhYmxlW3Zpc2l0S2V5XTsKICAgIG5vcm1hbGl6ZWRbdmlzaXRLZXldID0gdmlzaXQodmlzaXRLZXksIHZpc2l0VmFsdWUsIHJlbWFpbmluZ0RlcHRoIC0gMSwgbWF4UHJvcGVydGllcywgbWVtbyk7CgogICAgbnVtQWRkZWQrKzsKICB9CgogIC8vIE9uY2Ugd2UndmUgdmlzaXRlZCBhbGwgdGhlIGJyYW5jaGVzLCByZW1vdmUgdGhlIHBhcmVudCBmcm9tIG1lbW8gc3RvcmFnZQogIHVubWVtb2l6ZSh2YWx1ZSk7CgogIC8vIFJldHVybiBhY2N1bXVsYXRlZCB2YWx1ZXMKICByZXR1cm4gbm9ybWFsaXplZDsKfQoKLyogZXNsaW50LWRpc2FibGUgY29tcGxleGl0eSAqLwovKioKICogU3RyaW5naWZ5IHRoZSBnaXZlbiB2YWx1ZS4gSGFuZGxlcyB2YXJpb3VzIGtub3duIHNwZWNpYWwgdmFsdWVzIGFuZCB0eXBlcy4KICoKICogTm90IG1lYW50IHRvIGJlIHVzZWQgb24gc2ltcGxlIHByaW1pdGl2ZXMgd2hpY2ggYWxyZWFkeSBoYXZlIGEgc3RyaW5nIHJlcHJlc2VudGF0aW9uLCBhcyBpdCB3aWxsLCBmb3IgZXhhbXBsZSwgdHVybgogKiB0aGUgbnVtYmVyIDEyMzEgaW50byAiW09iamVjdCBOdW1iZXJdIiwgbm9yIG9uIGBudWxsYCwgYXMgaXQgd2lsbCB0aHJvdy4KICoKICogQHBhcmFtIHZhbHVlIFRoZSB2YWx1ZSB0byBzdHJpbmdpZnkKICogQHJldHVybnMgQSBzdHJpbmdpZmllZCByZXByZXNlbnRhdGlvbiBvZiB0aGUgZ2l2ZW4gdmFsdWUKICovCmZ1bmN0aW9uIHN0cmluZ2lmeVZhbHVlKAogIGtleSwKICAvLyB0aGlzIHR5cGUgaXMgYSB0aW55IGJpdCBvZiBhIGNoZWF0LCBzaW5jZSB0aGlzIGZ1bmN0aW9uIGRvZXMgaGFuZGxlIE5hTiAod2hpY2ggaXMgdGVjaG5pY2FsbHkgYSBudW1iZXIpLCBidXQgZm9yCiAgLy8gb3VyIGludGVybmFsIHVzZSwgaXQnbGwgZG8KICB2YWx1ZSwKKSB7CiAgdHJ5IHsKICAgIGlmIChrZXkgPT09ICdkb21haW4nICYmIHZhbHVlICYmIHR5cGVvZiB2YWx1ZSA9PT0gJ29iamVjdCcgJiYgKHZhbHVlICkuX2V2ZW50cykgewogICAgICByZXR1cm4gJ1tEb21haW5dJzsKICAgIH0KCiAgICBpZiAoa2V5ID09PSAnZG9tYWluRW1pdHRlcicpIHsKICAgICAgcmV0dXJuICdbRG9tYWluRW1pdHRlcl0nOwogICAgfQoKICAgIC8vIEl0J3Mgc2FmZSB0byB1c2UgYGdsb2JhbGAsIGB3aW5kb3dgLCBhbmQgYGRvY3VtZW50YCBoZXJlIGluIHRoaXMgbWFubmVyLCBhcyB3ZSBhcmUgYXNzZXJ0aW5nIHVzaW5nIGB0eXBlb2ZgIGZpcnN0CiAgICAvLyB3aGljaCB3b24ndCB0aHJvdyBpZiB0aGV5IGFyZSBub3QgcHJlc2VudC4KCiAgICBpZiAodHlwZW9mIGdsb2JhbCAhPT0gJ3VuZGVmaW5lZCcgJiYgdmFsdWUgPT09IGdsb2JhbCkgewogICAgICByZXR1cm4gJ1tHbG9iYWxdJzsKICAgIH0KCiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tcmVzdHJpY3RlZC1nbG9iYWxzCiAgICBpZiAodHlwZW9mIHdpbmRvdyAhPT0gJ3VuZGVmaW5lZCcgJiYgdmFsdWUgPT09IHdpbmRvdykgewogICAgICByZXR1cm4gJ1tXaW5kb3ddJzsKICAgIH0KCiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tcmVzdHJpY3RlZC1nbG9iYWxzCiAgICBpZiAodHlwZW9mIGRvY3VtZW50ICE9PSAndW5kZWZpbmVkJyAmJiB2YWx1ZSA9PT0gZG9jdW1lbnQpIHsKICAgICAgcmV0dXJuICdbRG9jdW1lbnRdJzsKICAgIH0KCiAgICBpZiAoaXNWdWVWaWV3TW9kZWwodmFsdWUpKSB7CiAgICAgIHJldHVybiAnW1Z1ZVZpZXdNb2RlbF0nOwogICAgfQoKICAgIC8vIFJlYWN0J3MgU3ludGhldGljRXZlbnQgdGhpbmd5CiAgICBpZiAoaXNTeW50aGV0aWNFdmVudCh2YWx1ZSkpIHsKICAgICAgcmV0dXJuICdbU3ludGhldGljRXZlbnRdJzsKICAgIH0KCiAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnbnVtYmVyJyAmJiB2YWx1ZSAhPT0gdmFsdWUpIHsKICAgICAgcmV0dXJuICdbTmFOXSc7CiAgICB9CgogICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ2Z1bmN0aW9uJykgewogICAgICByZXR1cm4gYFtGdW5jdGlvbjogJHtnZXRGdW5jdGlvbk5hbWUodmFsdWUpfV1gOwogICAgfQoKICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzeW1ib2wnKSB7CiAgICAgIHJldHVybiBgWyR7U3RyaW5nKHZhbHVlKX1dYDsKICAgIH0KCiAgICAvLyBzdHJpbmdpZmllZCBCaWdJbnRzIGFyZSBpbmRpc3Rpbmd1aXNoYWJsZSBmcm9tIHJlZ3VsYXIgbnVtYmVycywgc28gd2UgbmVlZCB0byBsYWJlbCB0aGVtIHRvIGF2b2lkIGNvbmZ1c2lvbgogICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ2JpZ2ludCcpIHsKICAgICAgcmV0dXJuIGBbQmlnSW50OiAke1N0cmluZyh2YWx1ZSl9XWA7CiAgICB9CgogICAgLy8gTm93IHRoYXQgd2UndmUga25vY2tlZCBvdXQgYWxsIHRoZSBzcGVjaWFsIGNhc2VzIGFuZCB0aGUgcHJpbWl0aXZlcywgYWxsIHdlIGhhdmUgbGVmdCBhcmUgb2JqZWN0cy4gU2ltcGx5IGNhc3RpbmcKICAgIC8vIHRoZW0gdG8gc3RyaW5ncyBtZWFucyB0aGF0IGluc3RhbmNlcyBvZiBjbGFzc2VzIHdoaWNoIGhhdmVuJ3QgZGVmaW5lZCB0aGVpciBgdG9TdHJpbmdUYWdgIHdpbGwganVzdCBjb21lIG91dCBhcwogICAgLy8gYCJbb2JqZWN0IE9iamVjdF0iYC4gSWYgd2UgaW5zdGVhZCBsb29rIGF0IHRoZSBjb25zdHJ1Y3RvcidzIG5hbWUgKHdoaWNoIGlzIHRoZSBzYW1lIGFzIHRoZSBuYW1lIG9mIHRoZSBjbGFzcyksCiAgICAvLyB3ZSBjYW4gbWFrZSBzdXJlIHRoYXQgb25seSBwbGFpbiBvYmplY3RzIGNvbWUgb3V0IHRoYXQgd2F5LgogICAgY29uc3Qgb2JqTmFtZSA9IGdldENvbnN0cnVjdG9yTmFtZSh2YWx1ZSk7CgogICAgLy8gSGFuZGxlIEhUTUwgRWxlbWVudHMKICAgIGlmICgvXkhUTUwoXHcqKUVsZW1lbnQkLy50ZXN0KG9iak5hbWUpKSB7CiAgICAgIHJldHVybiBgW0hUTUxFbGVtZW50OiAke29iak5hbWV9XWA7CiAgICB9CgogICAgcmV0dXJuIGBbb2JqZWN0ICR7b2JqTmFtZX1dYDsKICB9IGNhdGNoIChlcnIpIHsKICAgIHJldHVybiBgKipub24tc2VyaWFsaXphYmxlKiogKCR7ZXJyfSlgOwogIH0KfQovKiBlc2xpbnQtZW5hYmxlIGNvbXBsZXhpdHkgKi8KCmZ1bmN0aW9uIGdldENvbnN0cnVjdG9yTmFtZSh2YWx1ZSkgewogIGNvbnN0IHByb3RvdHlwZSA9IE9iamVjdC5nZXRQcm90b3R5cGVPZih2YWx1ZSk7CgogIHJldHVybiBwcm90b3R5cGUgPyBwcm90b3R5cGUuY29uc3RydWN0b3IubmFtZSA6ICdudWxsIHByb3RvdHlwZSc7Cn0KCi8qKgogKiBOb3JtYWxpemVzIFVSTHMgaW4gZXhjZXB0aW9ucyBhbmQgc3RhY2t0cmFjZXMgdG8gYSBiYXNlIHBhdGggc28gU2VudHJ5IGNhbiBmaW5nZXJwcmludAogKiBhY3Jvc3MgcGxhdGZvcm1zIGFuZCB3b3JraW5nIGRpcmVjdG9yeS4KICoKICogQHBhcmFtIHVybCBUaGUgVVJMIHRvIGJlIG5vcm1hbGl6ZWQuCiAqIEBwYXJhbSBiYXNlUGF0aCBUaGUgYXBwbGljYXRpb24gYmFzZSBwYXRoLgogKiBAcmV0dXJucyBUaGUgbm9ybWFsaXplZCBVUkwuCiAqLwpmdW5jdGlvbiBub3JtYWxpemVVcmxUb0Jhc2UodXJsLCBiYXNlUGF0aCkgewogIGNvbnN0IGVzY2FwZWRCYXNlID0gYmFzZVBhdGgKICAgIC8vIEJhY2tzbGFzaCB0byBmb3J3YXJkCiAgICAucmVwbGFjZSgvXFwvZywgJy8nKQogICAgLy8gRXNjYXBlIFJlZ0V4cCBzcGVjaWFsIGNoYXJhY3RlcnMKICAgIC5yZXBsYWNlKC9bfFxce30oKVtcXV4kKyo/Ll0vZywgJ1xcJCYnKTsKCiAgbGV0IG5ld1VybCA9IHVybDsKICB0cnkgewogICAgbmV3VXJsID0gZGVjb2RlVVJJKHVybCk7CiAgfSBjYXRjaCAoX09vKSB7CiAgICAvLyBTb21ldGltZSB0aGlzIGJyZWFrcwogIH0KICByZXR1cm4gKAogICAgbmV3VXJsCiAgICAgIC5yZXBsYWNlKC9cXC9nLCAnLycpCiAgICAgIC5yZXBsYWNlKC93ZWJwYWNrOlwvPy9nLCAnJykgLy8gUmVtb3ZlIGludGVybWVkaWF0ZSBiYXNlIHBhdGgKICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEBzZW50cnktaW50ZXJuYWwvc2RrL25vLXJlZ2V4cC1jb25zdHJ1Y3RvcgogICAgICAucmVwbGFjZShuZXcgUmVnRXhwKGAoZmlsZTovLyk/Lyoke2VzY2FwZWRCYXNlfS8qYCwgJ2lnJyksICdhcHA6Ly8vJykKICApOwp9CgovLyBTbGlnaHRseSBtb2RpZmllZCAobm8gSUU4IHN1cHBvcnQsIEVTNikgYW5kIHRyYW5zY3JpYmVkIHRvIFR5cGVTY3JpcHQKCi8vIFNwbGl0IGEgZmlsZW5hbWUgaW50byBbcm9vdCwgZGlyLCBiYXNlbmFtZSwgZXh0XSwgdW5peCB2ZXJzaW9uCi8vICdyb290JyBpcyBqdXN0IGEgc2xhc2gsIG9yIG5vdGhpbmcuCmNvbnN0IHNwbGl0UGF0aFJlID0gL14oXFMrOlxcfFwvPykoW1xzXFNdKj8pKCg/OlwuezEsMn18W14vXFxdKz98KShcLlteLi9cXF0qfCkpKD86Wy9cXF0qKSQvOwovKiogSlNEb2MgKi8KZnVuY3Rpb24gc3BsaXRQYXRoKGZpbGVuYW1lKSB7CiAgLy8gVHJ1bmNhdGUgZmlsZXMgbmFtZXMgZ3JlYXRlciB0aGFuIDEwMjQgY2hhcmFjdGVycyB0byBhdm9pZCByZWdleCBkb3MKICAvLyBodHRwczovL2dpdGh1Yi5jb20vZ2V0c2VudHJ5L3NlbnRyeS1qYXZhc2NyaXB0L3B1bGwvODczNyNkaXNjdXNzaW9uX3IxMjg1NzE5MTcyCiAgY29uc3QgdHJ1bmNhdGVkID0gZmlsZW5hbWUubGVuZ3RoID4gMTAyNCA/IGA8dHJ1bmNhdGVkPiR7ZmlsZW5hbWUuc2xpY2UoLTEwMjQpfWAgOiBmaWxlbmFtZTsKICBjb25zdCBwYXJ0cyA9IHNwbGl0UGF0aFJlLmV4ZWModHJ1bmNhdGVkKTsKICByZXR1cm4gcGFydHMgPyBwYXJ0cy5zbGljZSgxKSA6IFtdOwp9CgovKiogSlNEb2MgKi8KZnVuY3Rpb24gZGlybmFtZShwYXRoKSB7CiAgY29uc3QgcmVzdWx0ID0gc3BsaXRQYXRoKHBhdGgpOwogIGNvbnN0IHJvb3QgPSByZXN1bHRbMF07CiAgbGV0IGRpciA9IHJlc3VsdFsxXTsKCiAgaWYgKCFyb290ICYmICFkaXIpIHsKICAgIC8vIE5vIGRpcm5hbWUgd2hhdHNvZXZlcgogICAgcmV0dXJuICcuJzsKICB9CgogIGlmIChkaXIpIHsKICAgIC8vIEl0IGhhcyBhIGRpcm5hbWUsIHN0cmlwIHRyYWlsaW5nIHNsYXNoCiAgICBkaXIgPSBkaXIuc2xpY2UoMCwgZGlyLmxlbmd0aCAtIDEpOwogIH0KCiAgcmV0dXJuIHJvb3QgKyBkaXI7Cn0KCi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9leHBsaWNpdC1mdW5jdGlvbi1yZXR1cm4tdHlwZSAqLwoKLyoqIFN5bmNQcm9taXNlIGludGVybmFsIHN0YXRlcyAqLwp2YXIgU3RhdGVzOyAoZnVuY3Rpb24gKFN0YXRlcykgewogIC8qKiBQZW5kaW5nICovCiAgY29uc3QgUEVORElORyA9IDA7IFN0YXRlc1tTdGF0ZXNbIlBFTkRJTkciXSA9IFBFTkRJTkddID0gIlBFTkRJTkciOwogIC8qKiBSZXNvbHZlZCAvIE9LICovCiAgY29uc3QgUkVTT0xWRUQgPSAxOyBTdGF0ZXNbU3RhdGVzWyJSRVNPTFZFRCJdID0gUkVTT0xWRURdID0gIlJFU09MVkVEIjsKICAvKiogUmVqZWN0ZWQgLyBFcnJvciAqLwogIGNvbnN0IFJFSkVDVEVEID0gMjsgU3RhdGVzW1N0YXRlc1siUkVKRUNURUQiXSA9IFJFSkVDVEVEXSA9ICJSRUpFQ1RFRCI7Cn0pKFN0YXRlcyB8fCAoU3RhdGVzID0ge30pKTsKCi8vIE92ZXJsb2FkcyBzbyB3ZSBjYW4gY2FsbCByZXNvbHZlZFN5bmNQcm9taXNlIHdpdGhvdXQgYXJndW1lbnRzIGFuZCBnZW5lcmljIGFyZ3VtZW50CgovKioKICogQ3JlYXRlcyBhIHJlc29sdmVkIHN5bmMgcHJvbWlzZS4KICoKICogQHBhcmFtIHZhbHVlIHRoZSB2YWx1ZSB0byByZXNvbHZlIHRoZSBwcm9taXNlIHdpdGgKICogQHJldHVybnMgdGhlIHJlc29sdmVkIHN5bmMgcHJvbWlzZQogKi8KZnVuY3Rpb24gcmVzb2x2ZWRTeW5jUHJvbWlzZSh2YWx1ZSkgewogIHJldHVybiBuZXcgU3luY1Byb21pc2UocmVzb2x2ZSA9PiB7CiAgICByZXNvbHZlKHZhbHVlKTsKICB9KTsKfQoKLyoqCiAqIENyZWF0ZXMgYSByZWplY3RlZCBzeW5jIHByb21pc2UuCiAqCiAqIEBwYXJhbSB2YWx1ZSB0aGUgdmFsdWUgdG8gcmVqZWN0IHRoZSBwcm9taXNlIHdpdGgKICogQHJldHVybnMgdGhlIHJlamVjdGVkIHN5bmMgcHJvbWlzZQogKi8KZnVuY3Rpb24gcmVqZWN0ZWRTeW5jUHJvbWlzZShyZWFzb24pIHsKICByZXR1cm4gbmV3IFN5bmNQcm9taXNlKChfLCByZWplY3QpID0+IHsKICAgIHJlamVjdChyZWFzb24pOwogIH0pOwp9CgovKioKICogVGhlbmFibGUgY2xhc3MgdGhhdCBiZWhhdmVzIGxpa2UgYSBQcm9taXNlIGFuZCBmb2xsb3dzIGl0J3MgaW50ZXJmYWNlCiAqIGJ1dCBpcyBub3QgYXN5bmMgaW50ZXJuYWxseQogKi8KY2xhc3MgU3luY1Byb21pc2UgewoKICAgY29uc3RydWN0b3IoCiAgICBleGVjdXRvciwKICApIHtTeW5jUHJvbWlzZS5wcm90b3R5cGUuX19pbml0LmNhbGwodGhpcyk7U3luY1Byb21pc2UucHJvdG90eXBlLl9faW5pdDIuY2FsbCh0aGlzKTtTeW5jUHJvbWlzZS5wcm90b3R5cGUuX19pbml0My5jYWxsKHRoaXMpO1N5bmNQcm9taXNlLnByb3RvdHlwZS5fX2luaXQ0LmNhbGwodGhpcyk7CiAgICB0aGlzLl9zdGF0ZSA9IFN0YXRlcy5QRU5ESU5HOwogICAgdGhpcy5faGFuZGxlcnMgPSBbXTsKCiAgICB0cnkgewogICAgICBleGVjdXRvcih0aGlzLl9yZXNvbHZlLCB0aGlzLl9yZWplY3QpOwogICAgfSBjYXRjaCAoZSkgewogICAgICB0aGlzLl9yZWplY3QoZSk7CiAgICB9CiAgfQoKICAvKiogSlNEb2MgKi8KICAgdGhlbigKICAgIG9uZnVsZmlsbGVkLAogICAgb25yZWplY3RlZCwKICApIHsKICAgIHJldHVybiBuZXcgU3luY1Byb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4gewogICAgICB0aGlzLl9oYW5kbGVycy5wdXNoKFsKICAgICAgICBmYWxzZSwKICAgICAgICByZXN1bHQgPT4gewogICAgICAgICAgaWYgKCFvbmZ1bGZpbGxlZCkgewogICAgICAgICAgICAvLyBUT0RPOiDCr1xfKOODhClfL8KvCiAgICAgICAgICAgIC8vIFRPRE86IEZJWE1FCiAgICAgICAgICAgIHJlc29sdmUocmVzdWx0ICk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgIHJlc29sdmUob25mdWxmaWxsZWQocmVzdWx0KSk7CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICByZWplY3QoZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgIHJlYXNvbiA9PiB7CiAgICAgICAgICBpZiAoIW9ucmVqZWN0ZWQpIHsKICAgICAgICAgICAgcmVqZWN0KHJlYXNvbik7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgIHJlc29sdmUob25yZWplY3RlZChyZWFzb24pKTsKICAgICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICAgIHJlamVjdChlKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0sCiAgICAgIF0pOwogICAgICB0aGlzLl9leGVjdXRlSGFuZGxlcnMoKTsKICAgIH0pOwogIH0KCiAgLyoqIEpTRG9jICovCiAgIGNhdGNoKAogICAgb25yZWplY3RlZCwKICApIHsKICAgIHJldHVybiB0aGlzLnRoZW4odmFsID0+IHZhbCwgb25yZWplY3RlZCk7CiAgfQoKICAvKiogSlNEb2MgKi8KICAgZmluYWxseShvbmZpbmFsbHkpIHsKICAgIHJldHVybiBuZXcgU3luY1Byb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4gewogICAgICBsZXQgdmFsOwogICAgICBsZXQgaXNSZWplY3RlZDsKCiAgICAgIHJldHVybiB0aGlzLnRoZW4oCiAgICAgICAgdmFsdWUgPT4gewogICAgICAgICAgaXNSZWplY3RlZCA9IGZhbHNlOwogICAgICAgICAgdmFsID0gdmFsdWU7CiAgICAgICAgICBpZiAob25maW5hbGx5KSB7CiAgICAgICAgICAgIG9uZmluYWxseSgpOwogICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgcmVhc29uID0+IHsKICAgICAgICAgIGlzUmVqZWN0ZWQgPSB0cnVlOwogICAgICAgICAgdmFsID0gcmVhc29uOwogICAgICAgICAgaWYgKG9uZmluYWxseSkgewogICAgICAgICAgICBvbmZpbmFsbHkoKTsKICAgICAgICAgIH0KICAgICAgICB9LAogICAgICApLnRoZW4oKCkgPT4gewogICAgICAgIGlmIChpc1JlamVjdGVkKSB7CiAgICAgICAgICByZWplY3QodmFsKTsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CgogICAgICAgIHJlc29sdmUodmFsICk7CiAgICAgIH0pOwogICAgfSk7CiAgfQoKICAvKiogSlNEb2MgKi8KICAgIF9faW5pdCgpIHt0aGlzLl9yZXNvbHZlID0gKHZhbHVlKSA9PiB7CiAgICB0aGlzLl9zZXRSZXN1bHQoU3RhdGVzLlJFU09MVkVELCB2YWx1ZSk7CiAgfTt9CgogIC8qKiBKU0RvYyAqLwogICAgX19pbml0MigpIHt0aGlzLl9yZWplY3QgPSAocmVhc29uKSA9PiB7CiAgICB0aGlzLl9zZXRSZXN1bHQoU3RhdGVzLlJFSkVDVEVELCByZWFzb24pOwogIH07fQoKICAvKiogSlNEb2MgKi8KICAgIF9faW5pdDMoKSB7dGhpcy5fc2V0UmVzdWx0ID0gKHN0YXRlLCB2YWx1ZSkgPT4gewogICAgaWYgKHRoaXMuX3N0YXRlICE9PSBTdGF0ZXMuUEVORElORykgewogICAgICByZXR1cm47CiAgICB9CgogICAgaWYgKGlzVGhlbmFibGUodmFsdWUpKSB7CiAgICAgIHZvaWQgKHZhbHVlICkudGhlbih0aGlzLl9yZXNvbHZlLCB0aGlzLl9yZWplY3QpOwogICAgICByZXR1cm47CiAgICB9CgogICAgdGhpcy5fc3RhdGUgPSBzdGF0ZTsKICAgIHRoaXMuX3ZhbHVlID0gdmFsdWU7CgogICAgdGhpcy5fZXhlY3V0ZUhhbmRsZXJzKCk7CiAgfTt9CgogIC8qKiBKU0RvYyAqLwogICAgX19pbml0NCgpIHt0aGlzLl9leGVjdXRlSGFuZGxlcnMgPSAoKSA9PiB7CiAgICBpZiAodGhpcy5fc3RhdGUgPT09IFN0YXRlcy5QRU5ESU5HKSB7CiAgICAgIHJldHVybjsKICAgIH0KCiAgICBjb25zdCBjYWNoZWRIYW5kbGVycyA9IHRoaXMuX2hhbmRsZXJzLnNsaWNlKCk7CiAgICB0aGlzLl9oYW5kbGVycyA9IFtdOwoKICAgIGNhY2hlZEhhbmRsZXJzLmZvckVhY2goaGFuZGxlciA9PiB7CiAgICAgIGlmIChoYW5kbGVyWzBdKSB7CiAgICAgICAgcmV0dXJuOwogICAgICB9CgogICAgICBpZiAodGhpcy5fc3RhdGUgPT09IFN0YXRlcy5SRVNPTFZFRCkgewogICAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZmxvYXRpbmctcHJvbWlzZXMKICAgICAgICBoYW5kbGVyWzFdKHRoaXMuX3ZhbHVlICk7CiAgICAgIH0KCiAgICAgIGlmICh0aGlzLl9zdGF0ZSA9PT0gU3RhdGVzLlJFSkVDVEVEKSB7CiAgICAgICAgaGFuZGxlclsyXSh0aGlzLl92YWx1ZSk7CiAgICAgIH0KCiAgICAgIGhhbmRsZXJbMF0gPSB0cnVlOwogICAgfSk7CiAgfTt9Cn0KCi8qKgogKiBDcmVhdGVzIGFuIG5ldyBQcm9taXNlQnVmZmVyIG9iamVjdCB3aXRoIHRoZSBzcGVjaWZpZWQgbGltaXQKICogQHBhcmFtIGxpbWl0IG1heCBudW1iZXIgb2YgcHJvbWlzZXMgdGhhdCBjYW4gYmUgc3RvcmVkIGluIHRoZSBidWZmZXIKICovCmZ1bmN0aW9uIG1ha2VQcm9taXNlQnVmZmVyKGxpbWl0KSB7CiAgY29uc3QgYnVmZmVyID0gW107CgogIGZ1bmN0aW9uIGlzUmVhZHkoKSB7CiAgICByZXR1cm4gbGltaXQgPT09IHVuZGVmaW5lZCB8fCBidWZmZXIubGVuZ3RoIDwgbGltaXQ7CiAgfQoKICAvKioKICAgKiBSZW1vdmUgYSBwcm9taXNlIGZyb20gdGhlIHF1ZXVlLgogICAqCiAgICogQHBhcmFtIHRhc2sgQ2FuIGJlIGFueSBQcm9taXNlTGlrZTxUPgogICAqIEByZXR1cm5zIFJlbW92ZWQgcHJvbWlzZS4KICAgKi8KICBmdW5jdGlvbiByZW1vdmUodGFzaykgewogICAgcmV0dXJuIGJ1ZmZlci5zcGxpY2UoYnVmZmVyLmluZGV4T2YodGFzayksIDEpWzBdOwogIH0KCiAgLyoqCiAgICogQWRkIGEgcHJvbWlzZSAocmVwcmVzZW50aW5nIGFuIGluLWZsaWdodCBhY3Rpb24pIHRvIHRoZSBxdWV1ZSwgYW5kIHNldCBpdCB0byByZW1vdmUgaXRzZWxmIG9uIGZ1bGZpbGxtZW50LgogICAqCiAgICogQHBhcmFtIHRhc2tQcm9kdWNlciBBIGZ1bmN0aW9uIHByb2R1Y2luZyBhbnkgUHJvbWlzZUxpa2U8VD47IEluIHByZXZpb3VzIHZlcnNpb25zIHRoaXMgdXNlZCB0byBiZSBgdGFzazoKICAgKiAgICAgICAgUHJvbWlzZUxpa2U8VD5gLCBidXQgdW5kZXIgdGhhdCBtb2RlbCwgUHJvbWlzZXMgd2VyZSBpbnN0YW50bHkgY3JlYXRlZCBvbiB0aGUgY2FsbC1zaXRlIGFuZCB0aGVpciBleGVjdXRvcgogICAqICAgICAgICBmdW5jdGlvbnMgdGhlcmVmb3JlIHJhbiBpbW1lZGlhdGVseS4gVGh1cywgZXZlbiBpZiB0aGUgYnVmZmVyIHdhcyBmdWxsLCB0aGUgYWN0aW9uIHN0aWxsIGhhcHBlbmVkLiBCeQogICAqICAgICAgICByZXF1aXJpbmcgdGhlIHByb21pc2UgdG8gYmUgd3JhcHBlZCBpbiBhIGZ1bmN0aW9uLCB3ZSBjYW4gZGVmZXIgcHJvbWlzZSBjcmVhdGlvbiB1bnRpbCBhZnRlciB0aGUgYnVmZmVyCiAgICogICAgICAgIGxpbWl0IGNoZWNrLgogICAqIEByZXR1cm5zIFRoZSBvcmlnaW5hbCBwcm9taXNlLgogICAqLwogIGZ1bmN0aW9uIGFkZCh0YXNrUHJvZHVjZXIpIHsKICAgIGlmICghaXNSZWFkeSgpKSB7CiAgICAgIHJldHVybiByZWplY3RlZFN5bmNQcm9taXNlKG5ldyBTZW50cnlFcnJvcignTm90IGFkZGluZyBQcm9taXNlIGJlY2F1c2UgYnVmZmVyIGxpbWl0IHdhcyByZWFjaGVkLicpKTsKICAgIH0KCiAgICAvLyBzdGFydCB0aGUgdGFzayBhbmQgYWRkIGl0cyBwcm9taXNlIHRvIHRoZSBxdWV1ZQogICAgY29uc3QgdGFzayA9IHRhc2tQcm9kdWNlcigpOwogICAgaWYgKGJ1ZmZlci5pbmRleE9mKHRhc2spID09PSAtMSkgewogICAgICBidWZmZXIucHVzaCh0YXNrKTsKICAgIH0KICAgIHZvaWQgdGFzawogICAgICAudGhlbigoKSA9PiByZW1vdmUodGFzaykpCiAgICAgIC8vIFVzZSBgdGhlbihudWxsLCByZWplY3Rpb25IYW5kbGVyKWAgcmF0aGVyIHRoYW4gYGNhdGNoKHJlamVjdGlvbkhhbmRsZXIpYCBzbyB0aGF0IHdlIGNhbiB1c2UgYFByb21pc2VMaWtlYAogICAgICAvLyByYXRoZXIgdGhhbiBgUHJvbWlzZWAuIGBQcm9taXNlTGlrZWAgZG9lc24ndCBoYXZlIGEgYC5jYXRjaGAgbWV0aG9kLCBtYWtpbmcgaXRzIHBvbHlmaWxsIHNtYWxsZXIuIChFUzUgZGlkbid0CiAgICAgIC8vIGhhdmUgcHJvbWlzZXMsIHNvIFRTIGhhcyB0byBwb2x5ZmlsbCB3aGVuIGRvd24tY29tcGlsaW5nLikKICAgICAgLnRoZW4obnVsbCwgKCkgPT4KICAgICAgICByZW1vdmUodGFzaykudGhlbihudWxsLCAoKSA9PiB7CiAgICAgICAgICAvLyBXZSBoYXZlIHRvIGFkZCBhbm90aGVyIGNhdGNoIGhlcmUgYmVjYXVzZSBgcmVtb3ZlKClgIHN0YXJ0cyBhIG5ldyBwcm9taXNlIGNoYWluLgogICAgICAgIH0pLAogICAgICApOwogICAgcmV0dXJuIHRhc2s7CiAgfQoKICAvKioKICAgKiBXYWl0IGZvciBhbGwgcHJvbWlzZXMgaW4gdGhlIHF1ZXVlIHRvIHJlc29sdmUgb3IgZm9yIHRpbWVvdXQgdG8gZXhwaXJlLCB3aGljaGV2ZXIgY29tZXMgZmlyc3QuCiAgICoKICAgKiBAcGFyYW0gdGltZW91dCBUaGUgdGltZSwgaW4gbXMsIGFmdGVyIHdoaWNoIHRvIHJlc29sdmUgdG8gYGZhbHNlYCBpZiB0aGUgcXVldWUgaXMgc3RpbGwgbm9uLWVtcHR5LiBQYXNzaW5nIGAwYCAob3IKICAgKiBub3QgcGFzc2luZyBhbnl0aGluZykgd2lsbCBtYWtlIHRoZSBwcm9taXNlIHdhaXQgYXMgbG9uZyBhcyBpdCB0YWtlcyBmb3IgdGhlIHF1ZXVlIHRvIGRyYWluIGJlZm9yZSByZXNvbHZpbmcgdG8KICAgKiBgdHJ1ZWAuCiAgICogQHJldHVybnMgQSBwcm9taXNlIHdoaWNoIHdpbGwgcmVzb2x2ZSB0byBgdHJ1ZWAgaWYgdGhlIHF1ZXVlIGlzIGFscmVhZHkgZW1wdHkgb3IgZHJhaW5zIGJlZm9yZSB0aGUgdGltZW91dCwgYW5kCiAgICogYGZhbHNlYCBvdGhlcndpc2UKICAgKi8KICBmdW5jdGlvbiBkcmFpbih0aW1lb3V0KSB7CiAgICByZXR1cm4gbmV3IFN5bmNQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHsKICAgICAgbGV0IGNvdW50ZXIgPSBidWZmZXIubGVuZ3RoOwoKICAgICAgaWYgKCFjb3VudGVyKSB7CiAgICAgICAgcmV0dXJuIHJlc29sdmUodHJ1ZSk7CiAgICAgIH0KCiAgICAgIC8vIHdhaXQgZm9yIGB0aW1lb3V0YCBtcyBhbmQgdGhlbiByZXNvbHZlIHRvIGBmYWxzZWAgKGlmIG5vdCBjYW5jZWxsZWQgZmlyc3QpCiAgICAgIGNvbnN0IGNhcHR1cmVkU2V0VGltZW91dCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgIGlmICh0aW1lb3V0ICYmIHRpbWVvdXQgPiAwKSB7CiAgICAgICAgICByZXNvbHZlKGZhbHNlKTsKICAgICAgICB9CiAgICAgIH0sIHRpbWVvdXQpOwoKICAgICAgLy8gaWYgYWxsIHByb21pc2VzIHJlc29sdmUgaW4gdGltZSwgY2FuY2VsIHRoZSB0aW1lciBhbmQgcmVzb2x2ZSB0byBgdHJ1ZWAKICAgICAgYnVmZmVyLmZvckVhY2goaXRlbSA9PiB7CiAgICAgICAgdm9pZCByZXNvbHZlZFN5bmNQcm9taXNlKGl0ZW0pLnRoZW4oKCkgPT4gewogICAgICAgICAgaWYgKCEtLWNvdW50ZXIpIHsKICAgICAgICAgICAgY2xlYXJUaW1lb3V0KGNhcHR1cmVkU2V0VGltZW91dCk7CiAgICAgICAgICAgIHJlc29sdmUodHJ1ZSk7CiAgICAgICAgICB9CiAgICAgICAgfSwgcmVqZWN0KTsKICAgICAgfSk7CiAgICB9KTsKICB9CgogIHJldHVybiB7CiAgICAkOiBidWZmZXIsCiAgICBhZGQsCiAgICBkcmFpbiwKICB9Owp9Cgpjb25zdCBPTkVfU0VDT05EX0lOX01TID0gMTAwMDsKCi8qKgogKiBBIHBhcnRpYWwgZGVmaW5pdGlvbiBvZiB0aGUgW1BlcmZvcm1hbmNlIFdlYiBBUElde0BsaW5rIGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL0FQSS9QZXJmb3JtYW5jZX0KICogZm9yIGFjY2Vzc2luZyBhIGhpZ2gtcmVzb2x1dGlvbiBtb25vdG9uaWMgY2xvY2suCiAqLwoKLyoqCiAqIFJldHVybnMgYSB0aW1lc3RhbXAgaW4gc2Vjb25kcyBzaW5jZSB0aGUgVU5JWCBlcG9jaCB1c2luZyB0aGUgRGF0ZSBBUEkuCiAqCiAqIFRPRE8odjgpOiBSZXR1cm4gdHlwZSBzaG91bGQgYmUgcm91bmRlZC4KICovCmZ1bmN0aW9uIGRhdGVUaW1lc3RhbXBJblNlY29uZHMoKSB7CiAgcmV0dXJuIERhdGUubm93KCkgLyBPTkVfU0VDT05EX0lOX01TOwp9CgovKioKICogUmV0dXJucyBhIHdyYXBwZXIgYXJvdW5kIHRoZSBuYXRpdmUgUGVyZm9ybWFuY2UgQVBJIGJyb3dzZXIgaW1wbGVtZW50YXRpb24sIG9yIHVuZGVmaW5lZCBmb3IgYnJvd3NlcnMgdGhhdCBkbyBub3QKICogc3VwcG9ydCB0aGUgQVBJLgogKgogKiBXcmFwcGluZyB0aGUgbmF0aXZlIEFQSSB3b3JrcyBhcm91bmQgZGlmZmVyZW5jZXMgaW4gYmVoYXZpb3IgZnJvbSBkaWZmZXJlbnQgYnJvd3NlcnMuCiAqLwpmdW5jdGlvbiBjcmVhdGVVbml4VGltZXN0YW1wSW5TZWNvbmRzRnVuYygpIHsKICBjb25zdCB7IHBlcmZvcm1hbmNlIH0gPSBHTE9CQUxfT0JKIDsKICBpZiAoIXBlcmZvcm1hbmNlIHx8ICFwZXJmb3JtYW5jZS5ub3cpIHsKICAgIHJldHVybiBkYXRlVGltZXN0YW1wSW5TZWNvbmRzOwogIH0KCiAgLy8gU29tZSBicm93c2VyIGFuZCBlbnZpcm9ubWVudHMgZG9uJ3QgaGF2ZSBhIHRpbWVPcmlnaW4sIHNvIHdlIGZhbGxiYWNrIHRvCiAgLy8gdXNpbmcgRGF0ZS5ub3coKSB0byBjb21wdXRlIHRoZSBzdGFydGluZyB0aW1lLgogIGNvbnN0IGFwcHJveFN0YXJ0aW5nVGltZU9yaWdpbiA9IERhdGUubm93KCkgLSBwZXJmb3JtYW5jZS5ub3coKTsKICBjb25zdCB0aW1lT3JpZ2luID0gcGVyZm9ybWFuY2UudGltZU9yaWdpbiA9PSB1bmRlZmluZWQgPyBhcHByb3hTdGFydGluZ1RpbWVPcmlnaW4gOiBwZXJmb3JtYW5jZS50aW1lT3JpZ2luOwoKICAvLyBwZXJmb3JtYW5jZS5ub3coKSBpcyBhIG1vbm90b25pYyBjbG9jaywgd2hpY2ggbWVhbnMgaXQgc3RhcnRzIGF0IDAgd2hlbiB0aGUgcHJvY2VzcyBiZWdpbnMuIFRvIGdldCB0aGUgY3VycmVudAogIC8vIHdhbGwgY2xvY2sgdGltZSAoYWN0dWFsIFVOSVggdGltZXN0YW1wKSwgd2UgbmVlZCB0byBhZGQgdGhlIHN0YXJ0aW5nIHRpbWUgb3JpZ2luIGFuZCB0aGUgY3VycmVudCB0aW1lIGVsYXBzZWQuCiAgLy8KICAvLyBUT0RPOiBUaGlzIGRvZXMgbm90IGFjY291bnQgZm9yIHRoZSBjYXNlIHdoZXJlIHRoZSBtb25vdG9uaWMgY2xvY2sgdGhhdCBwb3dlcnMgcGVyZm9ybWFuY2Uubm93KCkgZHJpZnRzIGZyb20gdGhlCiAgLy8gd2FsbCBjbG9jayB0aW1lLCB3aGljaCBjYXVzZXMgdGhlIHJldHVybmVkIHRpbWVzdGFtcCB0byBiZSBpbmFjY3VyYXRlLiBXZSBzaG91bGQgaW52ZXN0aWdhdGUgaG93IHRvIGRldGVjdCBhbmQKICAvLyBjb3JyZWN0IGZvciB0aGlzLgogIC8vIFNlZTogaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdC9pc3N1ZXMvMjU5MAogIC8vIFNlZTogaHR0cHM6Ly9naXRodWIuY29tL21kbi9jb250ZW50L2lzc3Vlcy80NzEzCiAgLy8gU2VlOiBodHRwczovL2Rldi50by9ub2Ftci93aGVuLWEtbWlsbGlzZWNvbmQtaXMtbm90LWEtbWlsbGlzZWNvbmQtM2g2CiAgcmV0dXJuICgpID0+IHsKICAgIHJldHVybiAodGltZU9yaWdpbiArIHBlcmZvcm1hbmNlLm5vdygpKSAvIE9ORV9TRUNPTkRfSU5fTVM7CiAgfTsKfQoKLyoqCiAqIFJldHVybnMgYSB0aW1lc3RhbXAgaW4gc2Vjb25kcyBzaW5jZSB0aGUgVU5JWCBlcG9jaCB1c2luZyBlaXRoZXIgdGhlIFBlcmZvcm1hbmNlIG9yIERhdGUgQVBJcywgZGVwZW5kaW5nIG9uIHRoZQogKiBhdmFpbGFiaWxpdHkgb2YgdGhlIFBlcmZvcm1hbmNlIEFQSS4KICoKICogQlVHOiBOb3RlIHRoYXQgYmVjYXVzZSBvZiBob3cgYnJvd3NlcnMgaW1wbGVtZW50IHRoZSBQZXJmb3JtYW5jZSBBUEksIHRoZSBjbG9jayBtaWdodCBzdG9wIHdoZW4gdGhlIGNvbXB1dGVyIGlzCiAqIGFzbGVlcC4gVGhpcyBjcmVhdGVzIGEgc2tldyBiZXR3ZWVuIGBkYXRlVGltZXN0YW1wSW5TZWNvbmRzYCBhbmQgYHRpbWVzdGFtcEluU2Vjb25kc2AuIFRoZQogKiBza2V3IGNhbiBncm93IHRvIGFyYml0cmFyeSBhbW91bnRzIGxpa2UgZGF5cywgd2Vla3Mgb3IgbW9udGhzLgogKiBTZWUgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdC9pc3N1ZXMvMjU5MC4KICovCmNvbnN0IHRpbWVzdGFtcEluU2Vjb25kcyA9IGNyZWF0ZVVuaXhUaW1lc3RhbXBJblNlY29uZHNGdW5jKCk7CgovKioKICogVGhlIG51bWJlciBvZiBtaWxsaXNlY29uZHMgc2luY2UgdGhlIFVOSVggZXBvY2guIFRoaXMgdmFsdWUgaXMgb25seSB1c2FibGUgaW4gYSBicm93c2VyLCBhbmQgb25seSB3aGVuIHRoZQogKiBwZXJmb3JtYW5jZSBBUEkgaXMgYXZhaWxhYmxlLgogKi8KKCgpID0+IHsKICAvLyBVbmZvcnR1bmF0ZWx5IGJyb3dzZXJzIG1heSByZXBvcnQgYW4gaW5hY2N1cmF0ZSB0aW1lIG9yaWdpbiBkYXRhLCB0aHJvdWdoIGVpdGhlciBwZXJmb3JtYW5jZS50aW1lT3JpZ2luIG9yCiAgLy8gcGVyZm9ybWFuY2UudGltaW5nLm5hdmlnYXRpb25TdGFydCwgd2hpY2ggcmVzdWx0cyBpbiBwb29yIHJlc3VsdHMgaW4gcGVyZm9ybWFuY2UgZGF0YS4gV2Ugb25seSB0cmVhdCB0aW1lIG9yaWdpbgogIC8vIGRhdGEgYXMgcmVsaWFibGUgaWYgdGhleSBhcmUgd2l0aGluIGEgcmVhc29uYWJsZSB0aHJlc2hvbGQgb2YgdGhlIGN1cnJlbnQgdGltZS4KCiAgY29uc3QgeyBwZXJmb3JtYW5jZSB9ID0gR0xPQkFMX09CSiA7CiAgaWYgKCFwZXJmb3JtYW5jZSB8fCAhcGVyZm9ybWFuY2Uubm93KSB7CiAgICByZXR1cm4gdW5kZWZpbmVkOwogIH0KCiAgY29uc3QgdGhyZXNob2xkID0gMzYwMCAqIDEwMDA7CiAgY29uc3QgcGVyZm9ybWFuY2VOb3cgPSBwZXJmb3JtYW5jZS5ub3coKTsKICBjb25zdCBkYXRlTm93ID0gRGF0ZS5ub3coKTsKCiAgLy8gaWYgdGltZU9yaWdpbiBpc24ndCBhdmFpbGFibGUgc2V0IGRlbHRhIHRvIHRocmVzaG9sZCBzbyBpdCBpc24ndCB1c2VkCiAgY29uc3QgdGltZU9yaWdpbkRlbHRhID0gcGVyZm9ybWFuY2UudGltZU9yaWdpbgogICAgPyBNYXRoLmFicyhwZXJmb3JtYW5jZS50aW1lT3JpZ2luICsgcGVyZm9ybWFuY2VOb3cgLSBkYXRlTm93KQogICAgOiB0aHJlc2hvbGQ7CiAgY29uc3QgdGltZU9yaWdpbklzUmVsaWFibGUgPSB0aW1lT3JpZ2luRGVsdGEgPCB0aHJlc2hvbGQ7CgogIC8vIFdoaWxlIHBlcmZvcm1hbmNlLnRpbWluZy5uYXZpZ2F0aW9uU3RhcnQgaXMgZGVwcmVjYXRlZCBpbiBmYXZvciBvZiBwZXJmb3JtYW5jZS50aW1lT3JpZ2luLCBwZXJmb3JtYW5jZS50aW1lT3JpZ2luCiAgLy8gaXMgbm90IGFzIHdpZGVseSBzdXBwb3J0ZWQuIE5hbWVseSwgcGVyZm9ybWFuY2UudGltZU9yaWdpbiBpcyB1bmRlZmluZWQgaW4gU2FmYXJpIGFzIG9mIHdyaXRpbmcuCiAgLy8gQWxzbyBhcyBvZiB3cml0aW5nLCBwZXJmb3JtYW5jZS50aW1pbmcgaXMgbm90IGF2YWlsYWJsZSBpbiBXZWIgV29ya2VycyBpbiBtYWluc3RyZWFtIGJyb3dzZXJzLCBzbyBpdCBpcyBub3QgYWx3YXlzCiAgLy8gYSB2YWxpZCBmYWxsYmFjay4gSW4gdGhlIGFic2VuY2Ugb2YgYW4gaW5pdGlhbCB0aW1lIHByb3ZpZGVkIGJ5IHRoZSBicm93c2VyLCBmYWxsYmFjayB0byB0aGUgY3VycmVudCB0aW1lIGZyb20gdGhlCiAgLy8gRGF0ZSBBUEkuCiAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIGRlcHJlY2F0aW9uL2RlcHJlY2F0aW9uCiAgY29uc3QgbmF2aWdhdGlvblN0YXJ0ID0gcGVyZm9ybWFuY2UudGltaW5nICYmIHBlcmZvcm1hbmNlLnRpbWluZy5uYXZpZ2F0aW9uU3RhcnQ7CiAgY29uc3QgaGFzTmF2aWdhdGlvblN0YXJ0ID0gdHlwZW9mIG5hdmlnYXRpb25TdGFydCA9PT0gJ251bWJlcic7CiAgLy8gaWYgbmF2aWdhdGlvblN0YXJ0IGlzbid0IGF2YWlsYWJsZSBzZXQgZGVsdGEgdG8gdGhyZXNob2xkIHNvIGl0IGlzbid0IHVzZWQKICBjb25zdCBuYXZpZ2F0aW9uU3RhcnREZWx0YSA9IGhhc05hdmlnYXRpb25TdGFydCA/IE1hdGguYWJzKG5hdmlnYXRpb25TdGFydCArIHBlcmZvcm1hbmNlTm93IC0gZGF0ZU5vdykgOiB0aHJlc2hvbGQ7CiAgY29uc3QgbmF2aWdhdGlvblN0YXJ0SXNSZWxpYWJsZSA9IG5hdmlnYXRpb25TdGFydERlbHRhIDwgdGhyZXNob2xkOwoKICBpZiAodGltZU9yaWdpbklzUmVsaWFibGUgfHwgbmF2aWdhdGlvblN0YXJ0SXNSZWxpYWJsZSkgewogICAgLy8gVXNlIHRoZSBtb3JlIHJlbGlhYmxlIHRpbWUgb3JpZ2luCiAgICBpZiAodGltZU9yaWdpbkRlbHRhIDw9IG5hdmlnYXRpb25TdGFydERlbHRhKSB7CiAgICAgIHJldHVybiBwZXJmb3JtYW5jZS50aW1lT3JpZ2luOwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuIG5hdmlnYXRpb25TdGFydDsKICAgIH0KICB9CiAgcmV0dXJuIGRhdGVOb3c7Cn0pKCk7CgovKioKICogQ3JlYXRlcyBhbiBlbnZlbG9wZS4KICogTWFrZSBzdXJlIHRvIGFsd2F5cyBleHBsaWNpdGx5IHByb3ZpZGUgdGhlIGdlbmVyaWMgdG8gdGhpcyBmdW5jdGlvbgogKiBzbyB0aGF0IHRoZSBlbnZlbG9wZSB0eXBlcyByZXNvbHZlIGNvcnJlY3RseS4KICovCmZ1bmN0aW9uIGNyZWF0ZUVudmVsb3BlKGhlYWRlcnMsIGl0ZW1zID0gW10pIHsKICByZXR1cm4gW2hlYWRlcnMsIGl0ZW1zXSA7Cn0KCi8qKgogKiBDb252ZW5pZW5jZSBmdW5jdGlvbiB0byBsb29wIHRocm91Z2ggdGhlIGl0ZW1zIGFuZCBpdGVtIHR5cGVzIG9mIGFuIGVudmVsb3BlLgogKiAoVGhpcyBmdW5jdGlvbiB3YXMgbW9zdGx5IGNyZWF0ZWQgYmVjYXVzZSB3b3JraW5nIHdpdGggZW52ZWxvcGUgdHlwZXMgaXMgcGFpbmZ1bCBhdCB0aGUgbW9tZW50KQogKgogKiBJZiB0aGUgY2FsbGJhY2sgcmV0dXJucyB0cnVlLCB0aGUgcmVzdCBvZiB0aGUgaXRlbXMgd2lsbCBiZSBza2lwcGVkLgogKi8KZnVuY3Rpb24gZm9yRWFjaEVudmVsb3BlSXRlbSgKICBlbnZlbG9wZSwKICBjYWxsYmFjaywKKSB7CiAgY29uc3QgZW52ZWxvcGVJdGVtcyA9IGVudmVsb3BlWzFdOwoKICBmb3IgKGNvbnN0IGVudmVsb3BlSXRlbSBvZiBlbnZlbG9wZUl0ZW1zKSB7CiAgICBjb25zdCBlbnZlbG9wZUl0ZW1UeXBlID0gZW52ZWxvcGVJdGVtWzBdLnR5cGU7CiAgICBjb25zdCByZXN1bHQgPSBjYWxsYmFjayhlbnZlbG9wZUl0ZW0sIGVudmVsb3BlSXRlbVR5cGUpOwoKICAgIGlmIChyZXN1bHQpIHsKICAgICAgcmV0dXJuIHRydWU7CiAgICB9CiAgfQoKICByZXR1cm4gZmFsc2U7Cn0KCi8qKgogKiBFbmNvZGUgYSBzdHJpbmcgdG8gVVRGOC4KICovCmZ1bmN0aW9uIGVuY29kZVVURjgoaW5wdXQsIHRleHRFbmNvZGVyKSB7CiAgY29uc3QgdXRmOCA9IHRleHRFbmNvZGVyIHx8IG5ldyBUZXh0RW5jb2RlcigpOwogIHJldHVybiB1dGY4LmVuY29kZShpbnB1dCk7Cn0KCi8qKgogKiBTZXJpYWxpemVzIGFuIGVudmVsb3BlLgogKi8KZnVuY3Rpb24gc2VyaWFsaXplRW52ZWxvcGUoZW52ZWxvcGUsIHRleHRFbmNvZGVyKSB7CiAgY29uc3QgW2VudkhlYWRlcnMsIGl0ZW1zXSA9IGVudmVsb3BlOwoKICAvLyBJbml0aWFsbHkgd2UgY29uc3RydWN0IG91ciBlbnZlbG9wZSBhcyBhIHN0cmluZyBhbmQgb25seSBjb252ZXJ0IHRvIGJpbmFyeSBjaHVua3MgaWYgd2UgZW5jb3VudGVyIGJpbmFyeSBkYXRhCiAgbGV0IHBhcnRzID0gSlNPTi5zdHJpbmdpZnkoZW52SGVhZGVycyk7CgogIGZ1bmN0aW9uIGFwcGVuZChuZXh0KSB7CiAgICBpZiAodHlwZW9mIHBhcnRzID09PSAnc3RyaW5nJykgewogICAgICBwYXJ0cyA9IHR5cGVvZiBuZXh0ID09PSAnc3RyaW5nJyA/IHBhcnRzICsgbmV4dCA6IFtlbmNvZGVVVEY4KHBhcnRzLCB0ZXh0RW5jb2RlciksIG5leHRdOwogICAgfSBlbHNlIHsKICAgICAgcGFydHMucHVzaCh0eXBlb2YgbmV4dCA9PT0gJ3N0cmluZycgPyBlbmNvZGVVVEY4KG5leHQsIHRleHRFbmNvZGVyKSA6IG5leHQpOwogICAgfQogIH0KCiAgZm9yIChjb25zdCBpdGVtIG9mIGl0ZW1zKSB7CiAgICBjb25zdCBbaXRlbUhlYWRlcnMsIHBheWxvYWRdID0gaXRlbTsKCiAgICBhcHBlbmQoYFxuJHtKU09OLnN0cmluZ2lmeShpdGVtSGVhZGVycyl9XG5gKTsKCiAgICBpZiAodHlwZW9mIHBheWxvYWQgPT09ICdzdHJpbmcnIHx8IHBheWxvYWQgaW5zdGFuY2VvZiBVaW50OEFycmF5KSB7CiAgICAgIGFwcGVuZChwYXlsb2FkKTsKICAgIH0gZWxzZSB7CiAgICAgIGxldCBzdHJpbmdpZmllZFBheWxvYWQ7CiAgICAgIHRyeSB7CiAgICAgICAgc3RyaW5naWZpZWRQYXlsb2FkID0gSlNPTi5zdHJpbmdpZnkocGF5bG9hZCk7CiAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAvLyBJbiBjYXNlLCBkZXNwaXRlIGFsbCBvdXIgZWZmb3J0cyB0byBrZWVwIGBwYXlsb2FkYCBjaXJjdWxhci1kZXBlbmRlbmN5LWZyZWUsIGBKU09OLnN0cmluaWZ5KClgIHN0aWxsCiAgICAgICAgLy8gZmFpbHMsIHdlIHRyeSBhZ2FpbiBhZnRlciBub3JtYWxpemluZyBpdCBhZ2FpbiB3aXRoIGluZmluaXRlIG5vcm1hbGl6YXRpb24gZGVwdGguIFRoaXMgb2YgY291cnNlIGhhcyBhCiAgICAgICAgLy8gcGVyZm9ybWFuY2UgaW1wYWN0IGJ1dCBpbiB0aGlzIGNhc2UgYSBwZXJmb3JtYW5jZSBoaXQgaXMgYmV0dGVyIHRoYW4gdGhyb3dpbmcuCiAgICAgICAgc3RyaW5naWZpZWRQYXlsb2FkID0gSlNPTi5zdHJpbmdpZnkobm9ybWFsaXplKHBheWxvYWQpKTsKICAgICAgfQogICAgICBhcHBlbmQoc3RyaW5naWZpZWRQYXlsb2FkKTsKICAgIH0KICB9CgogIHJldHVybiB0eXBlb2YgcGFydHMgPT09ICdzdHJpbmcnID8gcGFydHMgOiBjb25jYXRCdWZmZXJzKHBhcnRzKTsKfQoKZnVuY3Rpb24gY29uY2F0QnVmZmVycyhidWZmZXJzKSB7CiAgY29uc3QgdG90YWxMZW5ndGggPSBidWZmZXJzLnJlZHVjZSgoYWNjLCBidWYpID0+IGFjYyArIGJ1Zi5sZW5ndGgsIDApOwoKICBjb25zdCBtZXJnZWQgPSBuZXcgVWludDhBcnJheSh0b3RhbExlbmd0aCk7CiAgbGV0IG9mZnNldCA9IDA7CiAgZm9yIChjb25zdCBidWZmZXIgb2YgYnVmZmVycykgewogICAgbWVyZ2VkLnNldChidWZmZXIsIG9mZnNldCk7CiAgICBvZmZzZXQgKz0gYnVmZmVyLmxlbmd0aDsKICB9CgogIHJldHVybiBtZXJnZWQ7Cn0KCmNvbnN0IElURU1fVFlQRV9UT19EQVRBX0NBVEVHT1JZX01BUCA9IHsKICBzZXNzaW9uOiAnc2Vzc2lvbicsCiAgc2Vzc2lvbnM6ICdzZXNzaW9uJywKICBhdHRhY2htZW50OiAnYXR0YWNobWVudCcsCiAgdHJhbnNhY3Rpb246ICd0cmFuc2FjdGlvbicsCiAgZXZlbnQ6ICdlcnJvcicsCiAgY2xpZW50X3JlcG9ydDogJ2ludGVybmFsJywKICB1c2VyX3JlcG9ydDogJ2RlZmF1bHQnLAogIHByb2ZpbGU6ICdwcm9maWxlJywKICByZXBsYXlfZXZlbnQ6ICdyZXBsYXknLAogIHJlcGxheV9yZWNvcmRpbmc6ICdyZXBsYXknLAogIGNoZWNrX2luOiAnbW9uaXRvcicsCiAgZmVlZGJhY2s6ICdmZWVkYmFjaycsCiAgc3BhbjogJ3NwYW4nLAogIC8vIFRPRE86IFRoaXMgaXMgYSB0ZW1wb3Jhcnkgd29ya2Fyb3VuZCB1bnRpbCB3ZSBoYXZlIGEgcHJvcGVyIGRhdGEgY2F0ZWdvcnkgZm9yIG1ldHJpY3MKICBzdGF0c2Q6ICd1bmtub3duJywKfTsKCi8qKgogKiBNYXBzIHRoZSB0eXBlIG9mIGFuIGVudmVsb3BlIGl0ZW0gdG8gYSBkYXRhIGNhdGVnb3J5LgogKi8KZnVuY3Rpb24gZW52ZWxvcGVJdGVtVHlwZVRvRGF0YUNhdGVnb3J5KHR5cGUpIHsKICByZXR1cm4gSVRFTV9UWVBFX1RPX0RBVEFfQ0FURUdPUllfTUFQW3R5cGVdOwp9CgovKiogRXh0cmFjdHMgdGhlIG1pbmltYWwgU0RLIGluZm8gZnJvbSBmcm9tIHRoZSBtZXRhZGF0YSBvciBhbiBldmVudHMgKi8KZnVuY3Rpb24gZ2V0U2RrTWV0YWRhdGFGb3JFbnZlbG9wZUhlYWRlcihtZXRhZGF0YU9yRXZlbnQpIHsKICBpZiAoIW1ldGFkYXRhT3JFdmVudCB8fCAhbWV0YWRhdGFPckV2ZW50LnNkaykgewogICAgcmV0dXJuOwogIH0KICBjb25zdCB7IG5hbWUsIHZlcnNpb24gfSA9IG1ldGFkYXRhT3JFdmVudC5zZGs7CiAgcmV0dXJuIHsgbmFtZSwgdmVyc2lvbiB9Owp9CgovKioKICogQ3JlYXRlcyBldmVudCBlbnZlbG9wZSBoZWFkZXJzLCBiYXNlZCBvbiBldmVudCwgc2RrIGluZm8gYW5kIHR1bm5lbAogKiBOb3RlOiBUaGlzIGZ1bmN0aW9uIHdhcyBleHRyYWN0ZWQgZnJvbSB0aGUgY29yZSBwYWNrYWdlIHRvIG1ha2UgaXQgYXZhaWxhYmxlIGluIFJlcGxheQogKi8KZnVuY3Rpb24gY3JlYXRlRXZlbnRFbnZlbG9wZUhlYWRlcnMoCiAgZXZlbnQsCiAgc2RrSW5mbywKICB0dW5uZWwsCiAgZHNuLAopIHsKICBjb25zdCBkeW5hbWljU2FtcGxpbmdDb250ZXh0ID0gZXZlbnQuc2RrUHJvY2Vzc2luZ01ldGFkYXRhICYmIGV2ZW50LnNka1Byb2Nlc3NpbmdNZXRhZGF0YS5keW5hbWljU2FtcGxpbmdDb250ZXh0OwogIHJldHVybiB7CiAgICBldmVudF9pZDogZXZlbnQuZXZlbnRfaWQgLAogICAgc2VudF9hdDogbmV3IERhdGUoKS50b0lTT1N0cmluZygpLAogICAgLi4uKHNka0luZm8gJiYgeyBzZGs6IHNka0luZm8gfSksCiAgICAuLi4oISF0dW5uZWwgJiYgZHNuICYmIHsgZHNuOiBkc25Ub1N0cmluZyhkc24pIH0pLAogICAgLi4uKGR5bmFtaWNTYW1wbGluZ0NvbnRleHQgJiYgewogICAgICB0cmFjZTogZHJvcFVuZGVmaW5lZEtleXMoeyAuLi5keW5hbWljU2FtcGxpbmdDb250ZXh0IH0pLAogICAgfSksCiAgfTsKfQoKLy8gSW50ZW50aW9uYWxseSBrZWVwaW5nIHRoZSBrZXkgYnJvYWQsIGFzIHdlIGRvbid0IGtub3cgZm9yIHN1cmUgd2hhdCByYXRlIGxpbWl0IGhlYWRlcnMgZ2V0IHJldHVybmVkIGZyb20gYmFja2VuZAoKY29uc3QgREVGQVVMVF9SRVRSWV9BRlRFUiA9IDYwICogMTAwMDsgLy8gNjAgc2Vjb25kcwoKLyoqCiAqIEV4dHJhY3RzIFJldHJ5LUFmdGVyIHZhbHVlIGZyb20gdGhlIHJlcXVlc3QgaGVhZGVyIG9yIHJldHVybnMgZGVmYXVsdCB2YWx1ZQogKiBAcGFyYW0gaGVhZGVyIHN0cmluZyByZXByZXNlbnRhdGlvbiBvZiAnUmV0cnktQWZ0ZXInIGhlYWRlcgogKiBAcGFyYW0gbm93IGN1cnJlbnQgdW5peCB0aW1lc3RhbXAKICoKICovCmZ1bmN0aW9uIHBhcnNlUmV0cnlBZnRlckhlYWRlcihoZWFkZXIsIG5vdyA9IERhdGUubm93KCkpIHsKICBjb25zdCBoZWFkZXJEZWxheSA9IHBhcnNlSW50KGAke2hlYWRlcn1gLCAxMCk7CiAgaWYgKCFpc05hTihoZWFkZXJEZWxheSkpIHsKICAgIHJldHVybiBoZWFkZXJEZWxheSAqIDEwMDA7CiAgfQoKICBjb25zdCBoZWFkZXJEYXRlID0gRGF0ZS5wYXJzZShgJHtoZWFkZXJ9YCk7CiAgaWYgKCFpc05hTihoZWFkZXJEYXRlKSkgewogICAgcmV0dXJuIGhlYWRlckRhdGUgLSBub3c7CiAgfQoKICByZXR1cm4gREVGQVVMVF9SRVRSWV9BRlRFUjsKfQoKLyoqCiAqIEdldHMgdGhlIHRpbWUgdGhhdCB0aGUgZ2l2ZW4gY2F0ZWdvcnkgaXMgZGlzYWJsZWQgdW50aWwgZm9yIHJhdGUgbGltaXRpbmcuCiAqIEluIGNhc2Ugbm8gY2F0ZWdvcnktc3BlY2lmaWMgbGltaXQgaXMgc2V0IGJ1dCBhIGdlbmVyYWwgcmF0ZSBsaW1pdCBhY3Jvc3MgYWxsIGNhdGVnb3JpZXMgaXMgYWN0aXZlLAogKiB0aGF0IHRpbWUgaXMgcmV0dXJuZWQuCiAqCiAqIEByZXR1cm4gdGhlIHRpbWUgaW4gbXMgdGhhdCB0aGUgY2F0ZWdvcnkgaXMgZGlzYWJsZWQgdW50aWwgb3IgMCBpZiB0aGVyZSdzIG5vIGFjdGl2ZSByYXRlIGxpbWl0LgogKi8KZnVuY3Rpb24gZGlzYWJsZWRVbnRpbChsaW1pdHMsIGNhdGVnb3J5KSB7CiAgcmV0dXJuIGxpbWl0c1tjYXRlZ29yeV0gfHwgbGltaXRzLmFsbCB8fCAwOwp9CgovKioKICogQ2hlY2tzIGlmIGEgY2F0ZWdvcnkgaXMgcmF0ZSBsaW1pdGVkCiAqLwpmdW5jdGlvbiBpc1JhdGVMaW1pdGVkKGxpbWl0cywgY2F0ZWdvcnksIG5vdyA9IERhdGUubm93KCkpIHsKICByZXR1cm4gZGlzYWJsZWRVbnRpbChsaW1pdHMsIGNhdGVnb3J5KSA+IG5vdzsKfQoKLyoqCiAqIFVwZGF0ZSByYXRlbGltaXRzIGZyb20gaW5jb21pbmcgaGVhZGVycy4KICoKICogQHJldHVybiB0aGUgdXBkYXRlZCBSYXRlTGltaXRzIG9iamVjdC4KICovCmZ1bmN0aW9uIHVwZGF0ZVJhdGVMaW1pdHMoCiAgbGltaXRzLAogIHsgc3RhdHVzQ29kZSwgaGVhZGVycyB9LAogIG5vdyA9IERhdGUubm93KCksCikgewogIGNvbnN0IHVwZGF0ZWRSYXRlTGltaXRzID0gewogICAgLi4ubGltaXRzLAogIH07CgogIC8vICJUaGUgbmFtZSBpcyBjYXNlLWluc2Vuc2l0aXZlLiIKICAvLyBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9kb2NzL1dlYi9BUEkvSGVhZGVycy9nZXQKICBjb25zdCByYXRlTGltaXRIZWFkZXIgPSBoZWFkZXJzICYmIGhlYWRlcnNbJ3gtc2VudHJ5LXJhdGUtbGltaXRzJ107CiAgY29uc3QgcmV0cnlBZnRlckhlYWRlciA9IGhlYWRlcnMgJiYgaGVhZGVyc1sncmV0cnktYWZ0ZXInXTsKCiAgaWYgKHJhdGVMaW1pdEhlYWRlcikgewogICAgLyoqCiAgICAgKiByYXRlIGxpbWl0IGhlYWRlcnMgYXJlIG9mIHRoZSBmb3JtCiAgICAgKiAgICAgPGhlYWRlcj4sPGhlYWRlcj4sLi4KICAgICAqIHdoZXJlIGVhY2ggPGhlYWRlcj4gaXMgb2YgdGhlIGZvcm0KICAgICAqICAgICA8cmV0cnlfYWZ0ZXI+OiA8Y2F0ZWdvcmllcz46IDxzY29wZT46IDxyZWFzb25fY29kZT4KICAgICAqIHdoZXJlCiAgICAgKiAgICAgPHJldHJ5X2FmdGVyPiBpcyBhIGRlbGF5IGluIHNlY29uZHMKICAgICAqICAgICA8Y2F0ZWdvcmllcz4gaXMgdGhlIGV2ZW50IHR5cGUocykgKGVycm9yLCB0cmFuc2FjdGlvbiwgZXRjKSBiZWluZyByYXRlIGxpbWl0ZWQgYW5kIGlzIG9mIHRoZSBmb3JtCiAgICAgKiAgICAgICAgIDxjYXRlZ29yeT47PGNhdGVnb3J5PjsuLi4KICAgICAqICAgICA8c2NvcGU+IGlzIHdoYXQncyBiZWluZyBsaW1pdGVkIChvcmcsIHByb2plY3QsIG9yIGtleSkgLSBpZ25vcmVkIGJ5IFNESwogICAgICogICAgIDxyZWFzb25fY29kZT4gaXMgYW4gYXJiaXRyYXJ5IHN0cmluZyBsaWtlICJvcmdfcXVvdGEiIC0gaWdub3JlZCBieSBTREsKICAgICAqLwogICAgZm9yIChjb25zdCBsaW1pdCBvZiByYXRlTGltaXRIZWFkZXIudHJpbSgpLnNwbGl0KCcsJykpIHsKICAgICAgY29uc3QgW3JldHJ5QWZ0ZXIsIGNhdGVnb3JpZXNdID0gbGltaXQuc3BsaXQoJzonLCAyKTsKICAgICAgY29uc3QgaGVhZGVyRGVsYXkgPSBwYXJzZUludChyZXRyeUFmdGVyLCAxMCk7CiAgICAgIGNvbnN0IGRlbGF5ID0gKCFpc05hTihoZWFkZXJEZWxheSkgPyBoZWFkZXJEZWxheSA6IDYwKSAqIDEwMDA7IC8vIDYwc2VjIGRlZmF1bHQKICAgICAgaWYgKCFjYXRlZ29yaWVzKSB7CiAgICAgICAgdXBkYXRlZFJhdGVMaW1pdHMuYWxsID0gbm93ICsgZGVsYXk7CiAgICAgIH0gZWxzZSB7CiAgICAgICAgZm9yIChjb25zdCBjYXRlZ29yeSBvZiBjYXRlZ29yaWVzLnNwbGl0KCc7JykpIHsKICAgICAgICAgIHVwZGF0ZWRSYXRlTGltaXRzW2NhdGVnb3J5XSA9IG5vdyArIGRlbGF5OwogICAgICAgIH0KICAgICAgfQogICAgfQogIH0gZWxzZSBpZiAocmV0cnlBZnRlckhlYWRlcikgewogICAgdXBkYXRlZFJhdGVMaW1pdHMuYWxsID0gbm93ICsgcGFyc2VSZXRyeUFmdGVySGVhZGVyKHJldHJ5QWZ0ZXJIZWFkZXIsIG5vdyk7CiAgfSBlbHNlIGlmIChzdGF0dXNDb2RlID09PSA0MjkpIHsKICAgIHVwZGF0ZWRSYXRlTGltaXRzLmFsbCA9IG5vdyArIDYwICogMTAwMDsKICB9CgogIHJldHVybiB1cGRhdGVkUmF0ZUxpbWl0czsKfQoKLyoqCiAqIEEgbm9kZS5qcyB3YXRjaGRvZyB0aW1lcgogKiBAcGFyYW0gcG9sbEludGVydmFsIFRoZSBpbnRlcnZhbCB0aGF0IHdlIGV4cGVjdCB0byBnZXQgcG9sbGVkIGF0CiAqIEBwYXJhbSBhbnJUaHJlc2hvbGQgVGhlIHRocmVzaG9sZCBmb3Igd2hlbiB3ZSBjb25zaWRlciBBTlIKICogQHBhcmFtIGNhbGxiYWNrIFRoZSBjYWxsYmFjayB0byBjYWxsIGZvciBBTlIKICogQHJldHVybnMgQW4gb2JqZWN0IHdpdGggYHBvbGxgIGFuZCBgZW5hYmxlZGAgZnVuY3Rpb25zIHtAbGluayBXYXRjaGRvZ1JldHVybn0KICovCmZ1bmN0aW9uIHdhdGNoZG9nVGltZXIoCiAgY3JlYXRlVGltZXIsCiAgcG9sbEludGVydmFsLAogIGFuclRocmVzaG9sZCwKICBjYWxsYmFjaywKKSB7CiAgY29uc3QgdGltZXIgPSBjcmVhdGVUaW1lcigpOwogIGxldCB0cmlnZ2VyZWQgPSBmYWxzZTsKICBsZXQgZW5hYmxlZCA9IHRydWU7CgogIHNldEludGVydmFsKCgpID0+IHsKICAgIGNvbnN0IGRpZmZNcyA9IHRpbWVyLmdldFRpbWVNcygpOwoKICAgIGlmICh0cmlnZ2VyZWQgPT09IGZhbHNlICYmIGRpZmZNcyA+IHBvbGxJbnRlcnZhbCArIGFuclRocmVzaG9sZCkgewogICAgICB0cmlnZ2VyZWQgPSB0cnVlOwogICAgICBpZiAoZW5hYmxlZCkgewogICAgICAgIGNhbGxiYWNrKCk7CiAgICAgIH0KICAgIH0KCiAgICBpZiAoZGlmZk1zIDwgcG9sbEludGVydmFsICsgYW5yVGhyZXNob2xkKSB7CiAgICAgIHRyaWdnZXJlZCA9IGZhbHNlOwogICAgfQogIH0sIDIwKTsKCiAgcmV0dXJuIHsKICAgIHBvbGw6ICgpID0+IHsKICAgICAgdGltZXIucmVzZXQoKTsKICAgIH0sCiAgICBlbmFibGVkOiAoc3RhdGUpID0+IHsKICAgICAgZW5hYmxlZCA9IHN0YXRlOwogICAgfSwKICB9Owp9CgovLyB0eXBlcyBjb3BpZWQgZnJvbSBpbnNwZWN0b3IuZC50cwoKLyoqCiAqIENvbnZlcnRzIERlYnVnZ2VyLkNhbGxGcmFtZSB0byBTZW50cnkgU3RhY2tGcmFtZQogKi8KZnVuY3Rpb24gY2FsbEZyYW1lVG9TdGFja0ZyYW1lKAogIGZyYW1lLAogIHVybCwKICBnZXRNb2R1bGVGcm9tRmlsZW5hbWUsCikgewogIGNvbnN0IGZpbGVuYW1lID0gdXJsID8gdXJsLnJlcGxhY2UoL15maWxlOlwvXC8vLCAnJykgOiB1bmRlZmluZWQ7CgogIC8vIENhbGxGcmFtZSByb3cvY29sIGFyZSAwIGJhc2VkLCB3aGVyZWFzIFN0YWNrRnJhbWUgYXJlIDEgYmFzZWQKICBjb25zdCBjb2xubyA9IGZyYW1lLmxvY2F0aW9uLmNvbHVtbk51bWJlciA/IGZyYW1lLmxvY2F0aW9uLmNvbHVtbk51bWJlciArIDEgOiB1bmRlZmluZWQ7CiAgY29uc3QgbGluZW5vID0gZnJhbWUubG9jYXRpb24ubGluZU51bWJlciA/IGZyYW1lLmxvY2F0aW9uLmxpbmVOdW1iZXIgKyAxIDogdW5kZWZpbmVkOwoKICByZXR1cm4gZHJvcFVuZGVmaW5lZEtleXMoewogICAgZmlsZW5hbWUsCiAgICBtb2R1bGU6IGdldE1vZHVsZUZyb21GaWxlbmFtZShmaWxlbmFtZSksCiAgICBmdW5jdGlvbjogZnJhbWUuZnVuY3Rpb25OYW1lIHx8ICc/JywKICAgIGNvbG5vLAogICAgbGluZW5vLAogICAgaW5fYXBwOiBmaWxlbmFtZSA/IGZpbGVuYW1lSXNJbkFwcChmaWxlbmFtZSkgOiB1bmRlZmluZWQsCiAgfSk7Cn0KCi8qKgogKiBUaGlzIHNlcnZlcyBhcyBhIGJ1aWxkIHRpbWUgZmxhZyB0aGF0IHdpbGwgYmUgdHJ1ZSBieSBkZWZhdWx0LCBidXQgZmFsc2UgaW4gbm9uLWRlYnVnIGJ1aWxkcyBvciBpZiB1c2VycyByZXBsYWNlIGBfX1NFTlRSWV9ERUJVR19fYCBpbiB0aGVpciBnZW5lcmF0ZWQgY29kZS4KICoKICogQVRURU5USU9OOiBUaGlzIGNvbnN0YW50IG11c3QgbmV2ZXIgY3Jvc3MgcGFja2FnZSBib3VuZGFyaWVzIChpLmUuIGJlIGV4cG9ydGVkKSB0byBndWFyYW50ZWUgdGhhdCBpdCBjYW4gYmUgdXNlZCBmb3IgdHJlZSBzaGFraW5nLgogKi8KY29uc3QgREVCVUdfQlVJTEQgPSAodHlwZW9mIF9fU0VOVFJZX0RFQlVHX18gPT09ICd1bmRlZmluZWQnIHx8IF9fU0VOVFJZX0RFQlVHX18pOwoKLyoqCiAqIENyZWF0ZXMgYSBuZXcgYFNlc3Npb25gIG9iamVjdCBieSBzZXR0aW5nIGNlcnRhaW4gZGVmYXVsdCBwYXJhbWV0ZXJzLiBJZiBvcHRpb25hbCBAcGFyYW0gY29udGV4dAogKiBpcyBwYXNzZWQsIHRoZSBwYXNzZWQgcHJvcGVydGllcyBhcmUgYXBwbGllZCB0byB0aGUgc2Vzc2lvbiBvYmplY3QuCiAqCiAqIEBwYXJhbSBjb250ZXh0IChvcHRpb25hbCkgYWRkaXRpb25hbCBwcm9wZXJ0aWVzIHRvIGJlIGFwcGxpZWQgdG8gdGhlIHJldHVybmVkIHNlc3Npb24gb2JqZWN0CiAqCiAqIEByZXR1cm5zIGEgbmV3IGBTZXNzaW9uYCBvYmplY3QKICovCmZ1bmN0aW9uIG1ha2VTZXNzaW9uKGNvbnRleHQpIHsKICAvLyBCb3RoIHRpbWVzdGFtcCBhbmQgc3RhcnRlZCBhcmUgaW4gc2Vjb25kcyBzaW5jZSB0aGUgVU5JWCBlcG9jaC4KICBjb25zdCBzdGFydGluZ1RpbWUgPSB0aW1lc3RhbXBJblNlY29uZHMoKTsKCiAgY29uc3Qgc2Vzc2lvbiA9IHsKICAgIHNpZDogdXVpZDQoKSwKICAgIGluaXQ6IHRydWUsCiAgICB0aW1lc3RhbXA6IHN0YXJ0aW5nVGltZSwKICAgIHN0YXJ0ZWQ6IHN0YXJ0aW5nVGltZSwKICAgIGR1cmF0aW9uOiAwLAogICAgc3RhdHVzOiAnb2snLAogICAgZXJyb3JzOiAwLAogICAgaWdub3JlRHVyYXRpb246IGZhbHNlLAogICAgdG9KU09OOiAoKSA9PiBzZXNzaW9uVG9KU09OKHNlc3Npb24pLAogIH07CgogIGlmIChjb250ZXh0KSB7CiAgICB1cGRhdGVTZXNzaW9uKHNlc3Npb24sIGNvbnRleHQpOwogIH0KCiAgcmV0dXJuIHNlc3Npb247Cn0KCi8qKgogKiBVcGRhdGVzIGEgc2Vzc2lvbiBvYmplY3Qgd2l0aCB0aGUgcHJvcGVydGllcyBwYXNzZWQgaW4gdGhlIGNvbnRleHQuCiAqCiAqIE5vdGUgdGhhdCB0aGlzIGZ1bmN0aW9uIG11dGF0ZXMgdGhlIHBhc3NlZCBvYmplY3QgYW5kIHJldHVybnMgdm9pZC4KICogKEhhZCB0byBkbyB0aGlzIGluc3RlYWQgb2YgcmV0dXJuaW5nIGEgbmV3IGFuZCB1cGRhdGVkIHNlc3Npb24gYmVjYXVzZSBjbG9zaW5nIGFuZCBzZW5kaW5nIGEgc2Vzc2lvbgogKiBtYWtlcyBhbiB1cGRhdGUgdG8gdGhlIHNlc3Npb24gYWZ0ZXIgaXQgd2FzIHBhc3NlZCB0byB0aGUgc2VuZGluZyBsb2dpYy4KICogQHNlZSBCYXNlQ2xpZW50LmNhcHR1cmVTZXNzaW9uICkKICoKICogQHBhcmFtIHNlc3Npb24gdGhlIGBTZXNzaW9uYCB0byB1cGRhdGUKICogQHBhcmFtIGNvbnRleHQgdGhlIGBTZXNzaW9uQ29udGV4dGAgaG9sZGluZyB0aGUgcHJvcGVydGllcyB0aGF0IHNob3VsZCBiZSB1cGRhdGVkIGluIEBwYXJhbSBzZXNzaW9uCiAqLwovLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgY29tcGxleGl0eQpmdW5jdGlvbiB1cGRhdGVTZXNzaW9uKHNlc3Npb24sIGNvbnRleHQgPSB7fSkgewogIGlmIChjb250ZXh0LnVzZXIpIHsKICAgIGlmICghc2Vzc2lvbi5pcEFkZHJlc3MgJiYgY29udGV4dC51c2VyLmlwX2FkZHJlc3MpIHsKICAgICAgc2Vzc2lvbi5pcEFkZHJlc3MgPSBjb250ZXh0LnVzZXIuaXBfYWRkcmVzczsKICAgIH0KCiAgICBpZiAoIXNlc3Npb24uZGlkICYmICFjb250ZXh0LmRpZCkgewogICAgICBzZXNzaW9uLmRpZCA9IGNvbnRleHQudXNlci5pZCB8fCBjb250ZXh0LnVzZXIuZW1haWwgfHwgY29udGV4dC51c2VyLnVzZXJuYW1lOwogICAgfQogIH0KCiAgc2Vzc2lvbi50aW1lc3RhbXAgPSBjb250ZXh0LnRpbWVzdGFtcCB8fCB0aW1lc3RhbXBJblNlY29uZHMoKTsKCiAgaWYgKGNvbnRleHQuYWJub3JtYWxfbWVjaGFuaXNtKSB7CiAgICBzZXNzaW9uLmFibm9ybWFsX21lY2hhbmlzbSA9IGNvbnRleHQuYWJub3JtYWxfbWVjaGFuaXNtOwogIH0KCiAgaWYgKGNvbnRleHQuaWdub3JlRHVyYXRpb24pIHsKICAgIHNlc3Npb24uaWdub3JlRHVyYXRpb24gPSBjb250ZXh0Lmlnbm9yZUR1cmF0aW9uOwogIH0KICBpZiAoY29udGV4dC5zaWQpIHsKICAgIC8vIEdvb2QgZW5vdWdoIHV1aWQgdmFsaWRhdGlvbi4g4oCUIEthbWlsCiAgICBzZXNzaW9uLnNpZCA9IGNvbnRleHQuc2lkLmxlbmd0aCA9PT0gMzIgPyBjb250ZXh0LnNpZCA6IHV1aWQ0KCk7CiAgfQogIGlmIChjb250ZXh0LmluaXQgIT09IHVuZGVmaW5lZCkgewogICAgc2Vzc2lvbi5pbml0ID0gY29udGV4dC5pbml0OwogIH0KICBpZiAoIXNlc3Npb24uZGlkICYmIGNvbnRleHQuZGlkKSB7CiAgICBzZXNzaW9uLmRpZCA9IGAke2NvbnRleHQuZGlkfWA7CiAgfQogIGlmICh0eXBlb2YgY29udGV4dC5zdGFydGVkID09PSAnbnVtYmVyJykgewogICAgc2Vzc2lvbi5zdGFydGVkID0gY29udGV4dC5zdGFydGVkOwogIH0KICBpZiAoc2Vzc2lvbi5pZ25vcmVEdXJhdGlvbikgewogICAgc2Vzc2lvbi5kdXJhdGlvbiA9IHVuZGVmaW5lZDsKICB9IGVsc2UgaWYgKHR5cGVvZiBjb250ZXh0LmR1cmF0aW9uID09PSAnbnVtYmVyJykgewogICAgc2Vzc2lvbi5kdXJhdGlvbiA9IGNvbnRleHQuZHVyYXRpb247CiAgfSBlbHNlIHsKICAgIGNvbnN0IGR1cmF0aW9uID0gc2Vzc2lvbi50aW1lc3RhbXAgLSBzZXNzaW9uLnN0YXJ0ZWQ7CiAgICBzZXNzaW9uLmR1cmF0aW9uID0gZHVyYXRpb24gPj0gMCA/IGR1cmF0aW9uIDogMDsKICB9CiAgaWYgKGNvbnRleHQucmVsZWFzZSkgewogICAgc2Vzc2lvbi5yZWxlYXNlID0gY29udGV4dC5yZWxlYXNlOwogIH0KICBpZiAoY29udGV4dC5lbnZpcm9ubWVudCkgewogICAgc2Vzc2lvbi5lbnZpcm9ubWVudCA9IGNvbnRleHQuZW52aXJvbm1lbnQ7CiAgfQogIGlmICghc2Vzc2lvbi5pcEFkZHJlc3MgJiYgY29udGV4dC5pcEFkZHJlc3MpIHsKICAgIHNlc3Npb24uaXBBZGRyZXNzID0gY29udGV4dC5pcEFkZHJlc3M7CiAgfQogIGlmICghc2Vzc2lvbi51c2VyQWdlbnQgJiYgY29udGV4dC51c2VyQWdlbnQpIHsKICAgIHNlc3Npb24udXNlckFnZW50ID0gY29udGV4dC51c2VyQWdlbnQ7CiAgfQogIGlmICh0eXBlb2YgY29udGV4dC5lcnJvcnMgPT09ICdudW1iZXInKSB7CiAgICBzZXNzaW9uLmVycm9ycyA9IGNvbnRleHQuZXJyb3JzOwogIH0KICBpZiAoY29udGV4dC5zdGF0dXMpIHsKICAgIHNlc3Npb24uc3RhdHVzID0gY29udGV4dC5zdGF0dXM7CiAgfQp9CgovKioKICogU2VyaWFsaXplcyBhIHBhc3NlZCBzZXNzaW9uIG9iamVjdCB0byBhIEpTT04gb2JqZWN0IHdpdGggYSBzbGlnaHRseSBkaWZmZXJlbnQgc3RydWN0dXJlLgogKiBUaGlzIGlzIG5lY2Vzc2FyeSBiZWNhdXNlIHRoZSBTZW50cnkgYmFja2VuZCByZXF1aXJlcyBhIHNsaWdodGx5IGRpZmZlcmVudCBzY2hlbWEgb2YgYSBzZXNzaW9uCiAqIHRoYW4gdGhlIG9uZSB0aGUgSlMgU0RLcyB1c2UgaW50ZXJuYWxseS4KICoKICogQHBhcmFtIHNlc3Npb24gdGhlIHNlc3Npb24gdG8gYmUgY29udmVydGVkCiAqCiAqIEByZXR1cm5zIGEgSlNPTiBvYmplY3Qgb2YgdGhlIHBhc3NlZCBzZXNzaW9uCiAqLwpmdW5jdGlvbiBzZXNzaW9uVG9KU09OKHNlc3Npb24pIHsKICByZXR1cm4gZHJvcFVuZGVmaW5lZEtleXMoewogICAgc2lkOiBgJHtzZXNzaW9uLnNpZH1gLAogICAgaW5pdDogc2Vzc2lvbi5pbml0LAogICAgLy8gTWFrZSBzdXJlIHRoYXQgc2VjIGlzIGNvbnZlcnRlZCB0byBtcyBmb3IgZGF0ZSBjb25zdHJ1Y3RvcgogICAgc3RhcnRlZDogbmV3IERhdGUoc2Vzc2lvbi5zdGFydGVkICogMTAwMCkudG9JU09TdHJpbmcoKSwKICAgIHRpbWVzdGFtcDogbmV3IERhdGUoc2Vzc2lvbi50aW1lc3RhbXAgKiAxMDAwKS50b0lTT1N0cmluZygpLAogICAgc3RhdHVzOiBzZXNzaW9uLnN0YXR1cywKICAgIGVycm9yczogc2Vzc2lvbi5lcnJvcnMsCiAgICBkaWQ6IHR5cGVvZiBzZXNzaW9uLmRpZCA9PT0gJ251bWJlcicgfHwgdHlwZW9mIHNlc3Npb24uZGlkID09PSAnc3RyaW5nJyA/IGAke3Nlc3Npb24uZGlkfWAgOiB1bmRlZmluZWQsCiAgICBkdXJhdGlvbjogc2Vzc2lvbi5kdXJhdGlvbiwKICAgIGFibm9ybWFsX21lY2hhbmlzbTogc2Vzc2lvbi5hYm5vcm1hbF9tZWNoYW5pc20sCiAgICBhdHRyczogewogICAgICByZWxlYXNlOiBzZXNzaW9uLnJlbGVhc2UsCiAgICAgIGVudmlyb25tZW50OiBzZXNzaW9uLmVudmlyb25tZW50LAogICAgICBpcF9hZGRyZXNzOiBzZXNzaW9uLmlwQWRkcmVzcywKICAgICAgdXNlcl9hZ2VudDogc2Vzc2lvbi51c2VyQWdlbnQsCiAgICB9LAogIH0pOwp9CgovKioKICogQXBwbHkgU2RrSW5mbyAobmFtZSwgdmVyc2lvbiwgcGFja2FnZXMsIGludGVncmF0aW9ucykgdG8gdGhlIGNvcnJlc3BvbmRpbmcgZXZlbnQga2V5LgogKiBNZXJnZSB3aXRoIGV4aXN0aW5nIGRhdGEgaWYgYW55LgogKiovCmZ1bmN0aW9uIGVuaGFuY2VFdmVudFdpdGhTZGtJbmZvKGV2ZW50LCBzZGtJbmZvKSB7CiAgaWYgKCFzZGtJbmZvKSB7CiAgICByZXR1cm4gZXZlbnQ7CiAgfQogIGV2ZW50LnNkayA9IGV2ZW50LnNkayB8fCB7fTsKICBldmVudC5zZGsubmFtZSA9IGV2ZW50LnNkay5uYW1lIHx8IHNka0luZm8ubmFtZTsKICBldmVudC5zZGsudmVyc2lvbiA9IGV2ZW50LnNkay52ZXJzaW9uIHx8IHNka0luZm8udmVyc2lvbjsKICBldmVudC5zZGsuaW50ZWdyYXRpb25zID0gWy4uLihldmVudC5zZGsuaW50ZWdyYXRpb25zIHx8IFtdKSwgLi4uKHNka0luZm8uaW50ZWdyYXRpb25zIHx8IFtdKV07CiAgZXZlbnQuc2RrLnBhY2thZ2VzID0gWy4uLihldmVudC5zZGsucGFja2FnZXMgfHwgW10pLCAuLi4oc2RrSW5mby5wYWNrYWdlcyB8fCBbXSldOwogIHJldHVybiBldmVudDsKfQoKLyoqIENyZWF0ZXMgYW4gZW52ZWxvcGUgZnJvbSBhIFNlc3Npb24gKi8KZnVuY3Rpb24gY3JlYXRlU2Vzc2lvbkVudmVsb3BlKAogIHNlc3Npb24sCiAgZHNuLAogIG1ldGFkYXRhLAogIHR1bm5lbCwKKSB7CiAgY29uc3Qgc2RrSW5mbyA9IGdldFNka01ldGFkYXRhRm9yRW52ZWxvcGVIZWFkZXIobWV0YWRhdGEpOwogIGNvbnN0IGVudmVsb3BlSGVhZGVycyA9IHsKICAgIHNlbnRfYXQ6IG5ldyBEYXRlKCkudG9JU09TdHJpbmcoKSwKICAgIC4uLihzZGtJbmZvICYmIHsgc2RrOiBzZGtJbmZvIH0pLAogICAgLi4uKCEhdHVubmVsICYmIGRzbiAmJiB7IGRzbjogZHNuVG9TdHJpbmcoZHNuKSB9KSwKICB9OwoKICBjb25zdCBlbnZlbG9wZUl0ZW0gPQogICAgJ2FnZ3JlZ2F0ZXMnIGluIHNlc3Npb24gPyBbeyB0eXBlOiAnc2Vzc2lvbnMnIH0sIHNlc3Npb25dIDogW3sgdHlwZTogJ3Nlc3Npb24nIH0sIHNlc3Npb24udG9KU09OKCldOwoKICByZXR1cm4gY3JlYXRlRW52ZWxvcGUoZW52ZWxvcGVIZWFkZXJzLCBbZW52ZWxvcGVJdGVtXSk7Cn0KCi8qKgogKiBDcmVhdGUgYW4gRW52ZWxvcGUgZnJvbSBhbiBldmVudC4KICovCmZ1bmN0aW9uIGNyZWF0ZUV2ZW50RW52ZWxvcGUoCiAgZXZlbnQsCiAgZHNuLAogIG1ldGFkYXRhLAogIHR1bm5lbCwKKSB7CiAgY29uc3Qgc2RrSW5mbyA9IGdldFNka01ldGFkYXRhRm9yRW52ZWxvcGVIZWFkZXIobWV0YWRhdGEpOwoKICAvKgogICAgTm90ZTogRHVlIHRvIFRTLCBldmVudC50eXBlIG1heSBiZSBgcmVwbGF5X2V2ZW50YCwgdGhlb3JldGljYWxseS4KICAgIEluIHByYWN0aWNlLCB3ZSBuZXZlciBjYWxsIGBjcmVhdGVFdmVudEVudmVsb3BlYCB3aXRoIGByZXBsYXlfZXZlbnRgIHR5cGUsCiAgICBhbmQgd2UnZCBoYXZlIHRvIGFkanV0IGEgbG9vb3Qgb2YgdHlwZXMgdG8gbWFrZSB0aGlzIHdvcmsgcHJvcGVybHkuCiAgICBXZSB3YW50IHRvIGF2b2lkIGNhc3RpbmcgdGhpcyBhcm91bmQsIGFzIHRoYXQgY291bGQgbGVhZCB0byBidWdzIChlLmcuIHdoZW4gd2UgYWRkIGFub3RoZXIgdHlwZSkKICAgIFNvIHRoZSBzYWZlIGNob2ljZSBpcyB0byByZWFsbHkgZ3VhcmQgYWdhaW5zdCB0aGUgcmVwbGF5X2V2ZW50IHR5cGUgaGVyZS4KICAqLwogIGNvbnN0IGV2ZW50VHlwZSA9IGV2ZW50LnR5cGUgJiYgZXZlbnQudHlwZSAhPT0gJ3JlcGxheV9ldmVudCcgPyBldmVudC50eXBlIDogJ2V2ZW50JzsKCiAgZW5oYW5jZUV2ZW50V2l0aFNka0luZm8oZXZlbnQsIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNkayk7CgogIGNvbnN0IGVudmVsb3BlSGVhZGVycyA9IGNyZWF0ZUV2ZW50RW52ZWxvcGVIZWFkZXJzKGV2ZW50LCBzZGtJbmZvLCB0dW5uZWwsIGRzbik7CgogIC8vIFByZXZlbnQgdGhpcyBkYXRhICh3aGljaCwgaWYgaXQgZXhpc3RzLCB3YXMgdXNlZCBpbiBlYXJsaWVyIHN0ZXBzIGluIHRoZSBwcm9jZXNzaW5nIHBpcGVsaW5lKSBmcm9tIGJlaW5nIHNlbnQgdG8KICAvLyBzZW50cnkuIChOb3RlOiBPdXIgdXNlIG9mIHRoaXMgcHJvcGVydHkgY29tZXMgYW5kIGdvZXMgd2l0aCB3aGF0ZXZlciB3ZSBtaWdodCBiZSBkZWJ1Z2dpbmcsIHdoYXRldmVyIGhhY2tzIHdlIG1heQogIC8vIGhhdmUgdGVtcG9yYXJpbHkgYWRkZWQsIGV0Yy4gRXZlbiBpZiB3ZSBkb24ndCBoYXBwZW4gdG8gYmUgdXNpbmcgaXQgYXQgc29tZSBwb2ludCBpbiB0aGUgZnV0dXJlLCBsZXQncyBub3QgZ2V0IHJpZAogIC8vIG9mIHRoaXMgYGRlbGV0ZWAsIGxlc3Qgd2UgbWlzcyBwdXR0aW5nIGl0IGJhY2sgaW4gdGhlIG5leHQgdGltZSB0aGUgcHJvcGVydHkgaXMgaW4gdXNlLikKICBkZWxldGUgZXZlbnQuc2RrUHJvY2Vzc2luZ01ldGFkYXRhOwoKICBjb25zdCBldmVudEl0ZW0gPSBbeyB0eXBlOiBldmVudFR5cGUgfSwgZXZlbnRdOwogIHJldHVybiBjcmVhdGVFbnZlbG9wZShlbnZlbG9wZUhlYWRlcnMsIFtldmVudEl0ZW1dKTsKfQoKY29uc3QgU0VOVFJZX0FQSV9WRVJTSU9OID0gJzcnOwoKLyoqIFJldHVybnMgdGhlIHByZWZpeCB0byBjb25zdHJ1Y3QgU2VudHJ5IGluZ2VzdGlvbiBBUEkgZW5kcG9pbnRzLiAqLwpmdW5jdGlvbiBnZXRCYXNlQXBpRW5kcG9pbnQoZHNuKSB7CiAgY29uc3QgcHJvdG9jb2wgPSBkc24ucHJvdG9jb2wgPyBgJHtkc24ucHJvdG9jb2x9OmAgOiAnJzsKICBjb25zdCBwb3J0ID0gZHNuLnBvcnQgPyBgOiR7ZHNuLnBvcnR9YCA6ICcnOwogIHJldHVybiBgJHtwcm90b2NvbH0vLyR7ZHNuLmhvc3R9JHtwb3J0fSR7ZHNuLnBhdGggPyBgLyR7ZHNuLnBhdGh9YCA6ICcnfS9hcGkvYDsKfQoKLyoqIFJldHVybnMgdGhlIGluZ2VzdCBBUEkgZW5kcG9pbnQgZm9yIHRhcmdldC4gKi8KZnVuY3Rpb24gX2dldEluZ2VzdEVuZHBvaW50KGRzbikgewogIHJldHVybiBgJHtnZXRCYXNlQXBpRW5kcG9pbnQoZHNuKX0ke2Rzbi5wcm9qZWN0SWR9L2VudmVsb3BlL2A7Cn0KCi8qKiBSZXR1cm5zIGEgVVJMLWVuY29kZWQgc3RyaW5nIHdpdGggYXV0aCBjb25maWcgc3VpdGFibGUgZm9yIGEgcXVlcnkgc3RyaW5nLiAqLwpmdW5jdGlvbiBfZW5jb2RlZEF1dGgoZHNuLCBzZGtJbmZvKSB7CiAgcmV0dXJuIHVybEVuY29kZSh7CiAgICAvLyBXZSBzZW5kIG9ubHkgdGhlIG1pbmltdW0gc2V0IG9mIHJlcXVpcmVkIGluZm9ybWF0aW9uLiBTZWUKICAgIC8vIGh0dHBzOi8vZ2l0aHViLmNvbS9nZXRzZW50cnkvc2VudHJ5LWphdmFzY3JpcHQvaXNzdWVzLzI1NzIuCiAgICBzZW50cnlfa2V5OiBkc24ucHVibGljS2V5LAogICAgc2VudHJ5X3ZlcnNpb246IFNFTlRSWV9BUElfVkVSU0lPTiwKICAgIC4uLihzZGtJbmZvICYmIHsgc2VudHJ5X2NsaWVudDogYCR7c2RrSW5mby5uYW1lfS8ke3Nka0luZm8udmVyc2lvbn1gIH0pLAogIH0pOwp9CgovKioKICogUmV0dXJucyB0aGUgZW52ZWxvcGUgZW5kcG9pbnQgVVJMIHdpdGggYXV0aCBpbiB0aGUgcXVlcnkgc3RyaW5nLgogKgogKiBTZW5kaW5nIGF1dGggYXMgcGFydCBvZiB0aGUgcXVlcnkgc3RyaW5nIGFuZCBub3QgYXMgY3VzdG9tIEhUVFAgaGVhZGVycyBhdm9pZHMgQ09SUyBwcmVmbGlnaHQgcmVxdWVzdHMuCiAqLwpmdW5jdGlvbiBnZXRFbnZlbG9wZUVuZHBvaW50V2l0aFVybEVuY29kZWRBdXRoKAogIGRzbiwKICAvLyBUT0RPICh2OCk6IFJlbW92ZSBgdHVubmVsT3JPcHRpb25zYCBpbiBmYXZvciBvZiBgb3B0aW9uc2AsIGFuZCB1c2UgdGhlIHN1YnN0aXR1dGUgY29kZSBiZWxvdwogIC8vIG9wdGlvbnM6IENsaWVudE9wdGlvbnMgPSB7fSBhcyBDbGllbnRPcHRpb25zLAogIHR1bm5lbE9yT3B0aW9ucyA9IHt9ICwKKSB7CiAgLy8gVE9ETyAodjgpOiBVc2UgdGhpcyBjb2RlIGluc3RlYWQKICAvLyBjb25zdCB7IHR1bm5lbCwgX21ldGFkYXRhID0ge30gfSA9IG9wdGlvbnM7CiAgLy8gcmV0dXJuIHR1bm5lbCA/IHR1bm5lbCA6IGAke19nZXRJbmdlc3RFbmRwb2ludChkc24pfT8ke19lbmNvZGVkQXV0aChkc24sIF9tZXRhZGF0YS5zZGspfWA7CgogIGNvbnN0IHR1bm5lbCA9IHR5cGVvZiB0dW5uZWxPck9wdGlvbnMgPT09ICdzdHJpbmcnID8gdHVubmVsT3JPcHRpb25zIDogdHVubmVsT3JPcHRpb25zLnR1bm5lbDsKICBjb25zdCBzZGtJbmZvID0KICAgIHR5cGVvZiB0dW5uZWxPck9wdGlvbnMgPT09ICdzdHJpbmcnIHx8ICF0dW5uZWxPck9wdGlvbnMuX21ldGFkYXRhID8gdW5kZWZpbmVkIDogdHVubmVsT3JPcHRpb25zLl9tZXRhZGF0YS5zZGs7CgogIHJldHVybiB0dW5uZWwgPyB0dW5uZWwgOiBgJHtfZ2V0SW5nZXN0RW5kcG9pbnQoZHNuKX0/JHtfZW5jb2RlZEF1dGgoZHNuLCBzZGtJbmZvKX1gOwp9Cgpjb25zdCBERUZBVUxUX1RSQU5TUE9SVF9CVUZGRVJfU0laRSA9IDMwOwoKLyoqCiAqIENyZWF0ZXMgYW4gaW5zdGFuY2Ugb2YgYSBTZW50cnkgYFRyYW5zcG9ydGAKICoKICogQHBhcmFtIG9wdGlvbnMKICogQHBhcmFtIG1ha2VSZXF1ZXN0CiAqLwpmdW5jdGlvbiBjcmVhdGVUcmFuc3BvcnQoCiAgb3B0aW9ucywKICBtYWtlUmVxdWVzdCwKICBidWZmZXIgPSBtYWtlUHJvbWlzZUJ1ZmZlcigKICAgIG9wdGlvbnMuYnVmZmVyU2l6ZSB8fCBERUZBVUxUX1RSQU5TUE9SVF9CVUZGRVJfU0laRSwKICApLAopIHsKICBsZXQgcmF0ZUxpbWl0cyA9IHt9OwogIGNvbnN0IGZsdXNoID0gKHRpbWVvdXQpID0+IGJ1ZmZlci5kcmFpbih0aW1lb3V0KTsKCiAgZnVuY3Rpb24gc2VuZChlbnZlbG9wZSkgewogICAgY29uc3QgZmlsdGVyZWRFbnZlbG9wZUl0ZW1zID0gW107CgogICAgLy8gRHJvcCByYXRlIGxpbWl0ZWQgaXRlbXMgZnJvbSBlbnZlbG9wZQogICAgZm9yRWFjaEVudmVsb3BlSXRlbShlbnZlbG9wZSwgKGl0ZW0sIHR5cGUpID0+IHsKICAgICAgY29uc3QgZW52ZWxvcGVJdGVtRGF0YUNhdGVnb3J5ID0gZW52ZWxvcGVJdGVtVHlwZVRvRGF0YUNhdGVnb3J5KHR5cGUpOwogICAgICBpZiAoaXNSYXRlTGltaXRlZChyYXRlTGltaXRzLCBlbnZlbG9wZUl0ZW1EYXRhQ2F0ZWdvcnkpKSB7CiAgICAgICAgY29uc3QgZXZlbnQgPSBnZXRFdmVudEZvckVudmVsb3BlSXRlbShpdGVtLCB0eXBlKTsKICAgICAgICBvcHRpb25zLnJlY29yZERyb3BwZWRFdmVudCgncmF0ZWxpbWl0X2JhY2tvZmYnLCBlbnZlbG9wZUl0ZW1EYXRhQ2F0ZWdvcnksIGV2ZW50KTsKICAgICAgfSBlbHNlIHsKICAgICAgICBmaWx0ZXJlZEVudmVsb3BlSXRlbXMucHVzaChpdGVtKTsKICAgICAgfQogICAgfSk7CgogICAgLy8gU2tpcCBzZW5kaW5nIGlmIGVudmVsb3BlIGlzIGVtcHR5IGFmdGVyIGZpbHRlcmluZyBvdXQgcmF0ZSBsaW1pdGVkIGV2ZW50cwogICAgaWYgKGZpbHRlcmVkRW52ZWxvcGVJdGVtcy5sZW5ndGggPT09IDApIHsKICAgICAgcmV0dXJuIHJlc29sdmVkU3luY1Byb21pc2UoKTsKICAgIH0KCiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueQogICAgY29uc3QgZmlsdGVyZWRFbnZlbG9wZSA9IGNyZWF0ZUVudmVsb3BlKGVudmVsb3BlWzBdLCBmaWx0ZXJlZEVudmVsb3BlSXRlbXMgKTsKCiAgICAvLyBDcmVhdGVzIGNsaWVudCByZXBvcnQgZm9yIGVhY2ggaXRlbSBpbiBhbiBlbnZlbG9wZQogICAgY29uc3QgcmVjb3JkRW52ZWxvcGVMb3NzID0gKHJlYXNvbikgPT4gewogICAgICBmb3JFYWNoRW52ZWxvcGVJdGVtKGZpbHRlcmVkRW52ZWxvcGUsIChpdGVtLCB0eXBlKSA9PiB7CiAgICAgICAgY29uc3QgZXZlbnQgPSBnZXRFdmVudEZvckVudmVsb3BlSXRlbShpdGVtLCB0eXBlKTsKICAgICAgICBvcHRpb25zLnJlY29yZERyb3BwZWRFdmVudChyZWFzb24sIGVudmVsb3BlSXRlbVR5cGVUb0RhdGFDYXRlZ29yeSh0eXBlKSwgZXZlbnQpOwogICAgICB9KTsKICAgIH07CgogICAgY29uc3QgcmVxdWVzdFRhc2sgPSAoKSA9PgogICAgICBtYWtlUmVxdWVzdCh7IGJvZHk6IHNlcmlhbGl6ZUVudmVsb3BlKGZpbHRlcmVkRW52ZWxvcGUsIG9wdGlvbnMudGV4dEVuY29kZXIpIH0pLnRoZW4oCiAgICAgICAgcmVzcG9uc2UgPT4gewogICAgICAgICAgLy8gV2UgZG9uJ3Qgd2FudCB0byB0aHJvdyBvbiBOT0sgcmVzcG9uc2VzLCBidXQgd2Ugd2FudCB0byBhdCBsZWFzdCBsb2cgdGhlbQogICAgICAgICAgaWYgKHJlc3BvbnNlLnN0YXR1c0NvZGUgIT09IHVuZGVmaW5lZCAmJiAocmVzcG9uc2Uuc3RhdHVzQ29kZSA8IDIwMCB8fCByZXNwb25zZS5zdGF0dXNDb2RlID49IDMwMCkpIHsKICAgICAgICAgICAgREVCVUdfQlVJTEQgJiYgbG9nZ2VyLndhcm4oYFNlbnRyeSByZXNwb25kZWQgd2l0aCBzdGF0dXMgY29kZSAke3Jlc3BvbnNlLnN0YXR1c0NvZGV9IHRvIHNlbnQgZXZlbnQuYCk7CiAgICAgICAgICB9CgogICAgICAgICAgcmF0ZUxpbWl0cyA9IHVwZGF0ZVJhdGVMaW1pdHMocmF0ZUxpbWl0cywgcmVzcG9uc2UpOwogICAgICAgICAgcmV0dXJuIHJlc3BvbnNlOwogICAgICAgIH0sCiAgICAgICAgZXJyb3IgPT4gewogICAgICAgICAgcmVjb3JkRW52ZWxvcGVMb3NzKCduZXR3b3JrX2Vycm9yJyk7CiAgICAgICAgICB0aHJvdyBlcnJvcjsKICAgICAgICB9LAogICAgICApOwoKICAgIHJldHVybiBidWZmZXIuYWRkKHJlcXVlc3RUYXNrKS50aGVuKAogICAgICByZXN1bHQgPT4gcmVzdWx0LAogICAgICBlcnJvciA9PiB7CiAgICAgICAgaWYgKGVycm9yIGluc3RhbmNlb2YgU2VudHJ5RXJyb3IpIHsKICAgICAgICAgIERFQlVHX0JVSUxEICYmIGxvZ2dlci5lcnJvcignU2tpcHBlZCBzZW5kaW5nIGV2ZW50IGJlY2F1c2UgYnVmZmVyIGlzIGZ1bGwuJyk7CiAgICAgICAgICByZWNvcmRFbnZlbG9wZUxvc3MoJ3F1ZXVlX292ZXJmbG93Jyk7CiAgICAgICAgICByZXR1cm4gcmVzb2x2ZWRTeW5jUHJvbWlzZSgpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICB0aHJvdyBlcnJvcjsKICAgICAgICB9CiAgICAgIH0sCiAgICApOwogIH0KCiAgLy8gV2UgdXNlIHRoaXMgdG8gaWRlbnRpZmlmeSBpZiB0aGUgdHJhbnNwb3J0IGlzIHRoZSBiYXNlIHRyYW5zcG9ydAogIC8vIFRPRE8gKHY4KTogUmVtb3ZlIHRoaXMgYWdhaW4gYXMgd2UnbGwgbm8gbG9uZ2VyIG5lZWQgaXQKICBzZW5kLl9fc2VudHJ5X19iYXNlVHJhbnNwb3J0X18gPSB0cnVlOwoKICByZXR1cm4gewogICAgc2VuZCwKICAgIGZsdXNoLAogIH07Cn0KCmZ1bmN0aW9uIGdldEV2ZW50Rm9yRW52ZWxvcGVJdGVtKGl0ZW0sIHR5cGUpIHsKICBpZiAodHlwZSAhPT0gJ2V2ZW50JyAmJiB0eXBlICE9PSAndHJhbnNhY3Rpb24nKSB7CiAgICByZXR1cm4gdW5kZWZpbmVkOwogIH0KCiAgcmV0dXJuIEFycmF5LmlzQXJyYXkoaXRlbSkgPyAoaXRlbSApWzFdIDogdW5kZWZpbmVkOwp9CgovKiogbm9ybWFsaXplcyBXaW5kb3dzIHBhdGhzICovCmZ1bmN0aW9uIG5vcm1hbGl6ZVdpbmRvd3NQYXRoKHBhdGgpIHsKICByZXR1cm4gcGF0aAogICAgLnJlcGxhY2UoL15bQS1aXTovLCAnJykgLy8gcmVtb3ZlIFdpbmRvd3Mtc3R5bGUgcHJlZml4CiAgICAucmVwbGFjZSgvXFwvZywgJy8nKTsgLy8gcmVwbGFjZSBhbGwgYFxgIGluc3RhbmNlcyB3aXRoIGAvYAp9CgovKiogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgZ2V0cyB0aGUgbW9kdWxlIG5hbWUgZnJvbSBhIGZpbGVuYW1lICovCmZ1bmN0aW9uIGNyZWF0ZUdldE1vZHVsZUZyb21GaWxlbmFtZSgKICBiYXNlUGF0aCA9IHByb2Nlc3MuYXJndlsxXSA/IGRpcm5hbWUocHJvY2Vzcy5hcmd2WzFdKSA6IHByb2Nlc3MuY3dkKCksCiAgaXNXaW5kb3dzID0gc2VwID09PSAnXFwnLAopIHsKICBjb25zdCBub3JtYWxpemVkQmFzZSA9IGlzV2luZG93cyA/IG5vcm1hbGl6ZVdpbmRvd3NQYXRoKGJhc2VQYXRoKSA6IGJhc2VQYXRoOwoKICByZXR1cm4gKGZpbGVuYW1lKSA9PiB7CiAgICBpZiAoIWZpbGVuYW1lKSB7CiAgICAgIHJldHVybjsKICAgIH0KCiAgICBjb25zdCBub3JtYWxpemVkRmlsZW5hbWUgPSBpc1dpbmRvd3MgPyBub3JtYWxpemVXaW5kb3dzUGF0aChmaWxlbmFtZSkgOiBmaWxlbmFtZTsKCiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgcHJlZmVyLWNvbnN0CiAgICBsZXQgeyBkaXIsIGJhc2U6IGZpbGUsIGV4dCB9ID0gcG9zaXgucGFyc2Uobm9ybWFsaXplZEZpbGVuYW1lKTsKCiAgICBpZiAoZXh0ID09PSAnLmpzJyB8fCBleHQgPT09ICcubWpzJyB8fCBleHQgPT09ICcuY2pzJykgewogICAgICBmaWxlID0gZmlsZS5zbGljZSgwLCBleHQubGVuZ3RoICogLTEpOwogICAgfQoKICAgIGlmICghZGlyKSB7CiAgICAgIC8vIE5vIGRpcm5hbWUgd2hhdHNvZXZlcgogICAgICBkaXIgPSAnLic7CiAgICB9CgogICAgY29uc3QgbiA9IGRpci5sYXN0SW5kZXhPZignL25vZGVfbW9kdWxlcycpOwogICAgaWYgKG4gPiAtMSkgewogICAgICByZXR1cm4gYCR7ZGlyLnNsaWNlKG4gKyAxNCkucmVwbGFjZSgvXC8vZywgJy4nKX06JHtmaWxlfWA7CiAgICB9CgogICAgLy8gTGV0J3Mgc2VlIGlmIGl0J3MgYSBwYXJ0IG9mIHRoZSBtYWluIG1vZHVsZQogICAgLy8gVG8gYmUgYSBwYXJ0IG9mIG1haW4gbW9kdWxlLCBpdCBoYXMgdG8gc2hhcmUgdGhlIHNhbWUgYmFzZQogICAgaWYgKGRpci5zdGFydHNXaXRoKG5vcm1hbGl6ZWRCYXNlKSkgewogICAgICBsZXQgbW9kdWxlTmFtZSA9IGRpci5zbGljZShub3JtYWxpemVkQmFzZS5sZW5ndGggKyAxKS5yZXBsYWNlKC9cLy9nLCAnLicpOwoKICAgICAgaWYgKG1vZHVsZU5hbWUpIHsKICAgICAgICBtb2R1bGVOYW1lICs9ICc6JzsKICAgICAgfQogICAgICBtb2R1bGVOYW1lICs9IGZpbGU7CgogICAgICByZXR1cm4gbW9kdWxlTmFtZTsKICAgIH0KCiAgICByZXR1cm4gZmlsZTsKICB9Owp9CgpmdW5jdGlvbiBfbnVsbGlzaENvYWxlc2NlJDIobGhzLCByaHNGbikgeyBpZiAobGhzICE9IG51bGwpIHsgcmV0dXJuIGxoczsgfSBlbHNlIHsgcmV0dXJuIHJoc0ZuKCk7IH0gfS8qKgogKiBUaGlzIGNvZGUgd2FzIG9yaWdpbmFsbHkgZm9ya2VkIGZyb20gaHR0cHM6Ly9naXRodWIuY29tL1Rvb1RhbGxOYXRlL3Byb3h5LWFnZW50cy90cmVlL2IxMzMyOTVmZDE2ZjY0NzU1NzhiNmIxNWJkOWI0ZTMzZWNiMGQwYjcKICogV2l0aCB0aGUgZm9sbG93aW5nIGxpY2VuY2U6CiAqCiAqIChUaGUgTUlUIExpY2Vuc2UpCiAqCiAqIENvcHlyaWdodCAoYykgMjAxMyBOYXRoYW4gUmFqbGljaCA8bmF0aGFuQHRvb3RhbGxuYXRlLm5ldD4qCiAqCiAqIFBlcm1pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmluZwogKiBhIGNvcHkgb2YgdGhpcyBzb2Z0d2FyZSBhbmQgYXNzb2NpYXRlZCBkb2N1bWVudGF0aW9uIGZpbGVzICh0aGUKICogJ1NvZnR3YXJlJyksIHRvIGRlYWwgaW4gdGhlIFNvZnR3YXJlIHdpdGhvdXQgcmVzdHJpY3Rpb24sIGluY2x1ZGluZwogKiB3aXRob3V0IGxpbWl0YXRpb24gdGhlIHJpZ2h0cyB0byB1c2UsIGNvcHksIG1vZGlmeSwgbWVyZ2UsIHB1Ymxpc2gsCiAqIGRpc3RyaWJ1dGUsIHN1YmxpY2Vuc2UsIGFuZC9vciBzZWxsIGNvcGllcyBvZiB0aGUgU29mdHdhcmUsIGFuZCB0bwogKiBwZXJtaXQgcGVyc29ucyB0byB3aG9tIHRoZSBTb2Z0d2FyZSBpcyBmdXJuaXNoZWQgdG8gZG8gc28sIHN1YmplY3QgdG8KICogdGhlIGZvbGxvd2luZyBjb25kaXRpb25zOioKICoKICogVGhlIGFib3ZlIGNvcHlyaWdodCBub3RpY2UgYW5kIHRoaXMgcGVybWlzc2lvbiBub3RpY2Ugc2hhbGwgYmUKICogaW5jbHVkZWQgaW4gYWxsIGNvcGllcyBvciBzdWJzdGFudGlhbCBwb3J0aW9ucyBvZiB0aGUgU29mdHdhcmUuKgogKgogKiBUSEUgU09GVFdBUkUgSVMgUFJPVklERUQgJ0FTIElTJywgV0lUSE9VVCBXQVJSQU5UWSBPRiBBTlkgS0lORCwKICogRVhQUkVTUyBPUiBJTVBMSUVELCBJTkNMVURJTkcgQlVUIE5PVCBMSU1JVEVEIFRPIFRIRSBXQVJSQU5USUVTIE9GCiAqIE1FUkNIQU5UQUJJTElUWSwgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UgQU5EIE5PTklORlJJTkdFTUVOVC4KICogSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUlMgT1IgQ09QWVJJR0hUIEhPTERFUlMgQkUgTElBQkxFIEZPUiBBTlkKICogQ0xBSU0sIERBTUFHRVMgT1IgT1RIRVIgTElBQklMSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDVCwKICogVE9SVCBPUiBPVEhFUldJU0UsIEFSSVNJTkcgRlJPTSwgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUKICogU09GVFdBUkUgT1IgVEhFIFVTRSBPUiBPVEhFUiBERUFMSU5HUyBJTiBUSEUgU09GVFdBUkUuCiAqLwoKY29uc3QgSU5URVJOQUwgPSBTeW1ib2woJ0FnZW50QmFzZUludGVybmFsU3RhdGUnKTsKCmNsYXNzIEFnZW50IGV4dGVuZHMgaHR0cC5BZ2VudCB7CgogIC8vIFNldCBieSBgaHR0cC5BZ2VudGAgLSBtaXNzaW5nIGZyb20gYEB0eXBlcy9ub2RlYAoKICBjb25zdHJ1Y3RvcihvcHRzKSB7CiAgICBzdXBlcihvcHRzKTsKICAgIHRoaXNbSU5URVJOQUxdID0ge307CiAgfQoKICAvKioKICAgKiBEZXRlcm1pbmUgd2hldGhlciB0aGlzIGlzIGFuIGBodHRwYCBvciBgaHR0cHNgIHJlcXVlc3QuCiAgICovCiAgaXNTZWN1cmVFbmRwb2ludChvcHRpb25zKSB7CiAgICBpZiAob3B0aW9ucykgewogICAgICAvLyBGaXJzdCBjaGVjayB0aGUgYHNlY3VyZUVuZHBvaW50YCBwcm9wZXJ0eSBleHBsaWNpdGx5LCBzaW5jZSB0aGlzCiAgICAgIC8vIG1lYW5zIHRoYXQgYSBwYXJlbnQgYEFnZW50YCBpcyAicGFzc2luZyB0aHJvdWdoIiB0byB0aGlzIGluc3RhbmNlLgogICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSwgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVuc2FmZS1tZW1iZXItYWNjZXNzCiAgICAgIGlmICh0eXBlb2YgKG9wdGlvbnMgKS5zZWN1cmVFbmRwb2ludCA9PT0gJ2Jvb2xlYW4nKSB7CiAgICAgICAgcmV0dXJuIG9wdGlvbnMuc2VjdXJlRW5kcG9pbnQ7CiAgICAgIH0KCiAgICAgIC8vIElmIG5vIGV4cGxpY2l0IGBzZWN1cmVgIGVuZHBvaW50LCBjaGVjayBpZiBgcHJvdG9jb2xgIHByb3BlcnR5IGlzCiAgICAgIC8vIHNldC4gVGhpcyB3aWxsIHVzdWFsbHkgYmUgdGhlIGNhc2Ugc2luY2UgdXNpbmcgYSBmdWxsIHN0cmluZyBVUkwKICAgICAgLy8gb3IgYFVSTGAgaW5zdGFuY2Ugc2hvdWxkIGJlIHRoZSBtb3N0IGNvbW1vbiB1c2FnZS4KICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLnByb3RvY29sID09PSAnc3RyaW5nJykgewogICAgICAgIHJldHVybiBvcHRpb25zLnByb3RvY29sID09PSAnaHR0cHM6JzsKICAgICAgfQogICAgfQoKICAgIC8vIEZpbmFsbHksIGlmIG5vIGBwcm90b2NvbGAgcHJvcGVydHkgd2FzIHNldCwgdGhlbiBmYWxsIGJhY2sgdG8KICAgIC8vIGNoZWNraW5nIHRoZSBzdGFjayB0cmFjZSBvZiB0aGUgY3VycmVudCBjYWxsIHN0YWNrLCBhbmQgdHJ5IHRvCiAgICAvLyBkZXRlY3QgdGhlICJodHRwcyIgbW9kdWxlLgogICAgY29uc3QgeyBzdGFjayB9ID0gbmV3IEVycm9yKCk7CiAgICBpZiAodHlwZW9mIHN0YWNrICE9PSAnc3RyaW5nJykgcmV0dXJuIGZhbHNlOwogICAgcmV0dXJuIHN0YWNrLnNwbGl0KCdcbicpLnNvbWUobCA9PiBsLmluZGV4T2YoJyhodHRwcy5qczonKSAhPT0gLTEgfHwgbC5pbmRleE9mKCdub2RlOmh0dHBzOicpICE9PSAtMSk7CiAgfQoKICBjcmVhdGVTb2NrZXQocmVxLCBvcHRpb25zLCBjYikgewogICAgY29uc3QgY29ubmVjdE9wdHMgPSB7CiAgICAgIC4uLm9wdGlvbnMsCiAgICAgIHNlY3VyZUVuZHBvaW50OiB0aGlzLmlzU2VjdXJlRW5kcG9pbnQob3B0aW9ucyksCiAgICB9OwogICAgUHJvbWlzZS5yZXNvbHZlKCkKICAgICAgLnRoZW4oKCkgPT4gdGhpcy5jb25uZWN0KHJlcSwgY29ubmVjdE9wdHMpKQogICAgICAudGhlbihzb2NrZXQgPT4gewogICAgICAgIGlmIChzb2NrZXQgaW5zdGFuY2VvZiBodHRwLkFnZW50KSB7CiAgICAgICAgICAvLyBAdHMtZXhwZWN0LWVycm9yIGBhZGRSZXF1ZXN0KClgIGlzbid0IGRlZmluZWQgaW4gYEB0eXBlcy9ub2RlYAogICAgICAgICAgcmV0dXJuIHNvY2tldC5hZGRSZXF1ZXN0KHJlcSwgY29ubmVjdE9wdHMpOwogICAgICAgIH0KICAgICAgICB0aGlzW0lOVEVSTkFMXS5jdXJyZW50U29ja2V0ID0gc29ja2V0OwogICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3IgYGNyZWF0ZVNvY2tldCgpYCBpc24ndCBkZWZpbmVkIGluIGBAdHlwZXMvbm9kZWAKICAgICAgICBzdXBlci5jcmVhdGVTb2NrZXQocmVxLCBvcHRpb25zLCBjYik7CiAgICAgIH0sIGNiKTsKICB9CgogIGNyZWF0ZUNvbm5lY3Rpb24oKSB7CiAgICBjb25zdCBzb2NrZXQgPSB0aGlzW0lOVEVSTkFMXS5jdXJyZW50U29ja2V0OwogICAgdGhpc1tJTlRFUk5BTF0uY3VycmVudFNvY2tldCA9IHVuZGVmaW5lZDsKICAgIGlmICghc29ja2V0KSB7CiAgICAgIHRocm93IG5ldyBFcnJvcignTm8gc29ja2V0IHdhcyByZXR1cm5lZCBpbiB0aGUgYGNvbm5lY3QoKWAgZnVuY3Rpb24nKTsKICAgIH0KICAgIHJldHVybiBzb2NrZXQ7CiAgfQoKICBnZXQgZGVmYXVsdFBvcnQoKSB7CiAgICByZXR1cm4gX251bGxpc2hDb2FsZXNjZSQyKHRoaXNbSU5URVJOQUxdLmRlZmF1bHRQb3J0LCAoKSA9PiAoICh0aGlzLnByb3RvY29sID09PSAnaHR0cHM6JyA/IDQ0MyA6IDgwKSkpOwogIH0KCiAgc2V0IGRlZmF1bHRQb3J0KHYpIHsKICAgIGlmICh0aGlzW0lOVEVSTkFMXSkgewogICAgICB0aGlzW0lOVEVSTkFMXS5kZWZhdWx0UG9ydCA9IHY7CiAgICB9CiAgfQoKICBnZXQgcHJvdG9jb2woKSB7CiAgICByZXR1cm4gX251bGxpc2hDb2FsZXNjZSQyKHRoaXNbSU5URVJOQUxdLnByb3RvY29sLCAoKSA9PiAoICh0aGlzLmlzU2VjdXJlRW5kcG9pbnQoKSA/ICdodHRwczonIDogJ2h0dHA6JykpKTsKICB9CgogIHNldCBwcm90b2NvbCh2KSB7CiAgICBpZiAodGhpc1tJTlRFUk5BTF0pIHsKICAgICAgdGhpc1tJTlRFUk5BTF0ucHJvdG9jb2wgPSB2OwogICAgfQogIH0KfQoKZnVuY3Rpb24gZGVidWckMSguLi5hcmdzKSB7CiAgbG9nZ2VyLmxvZygnW2h0dHBzLXByb3h5LWFnZW50OnBhcnNlLXByb3h5LXJlc3BvbnNlXScsIC4uLmFyZ3MpOwp9CgpmdW5jdGlvbiBwYXJzZVByb3h5UmVzcG9uc2Uoc29ja2V0KSB7CiAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHsKICAgIC8vIHdlIG5lZWQgdG8gYnVmZmVyIGFueSBIVFRQIHRyYWZmaWMgdGhhdCBoYXBwZW5zIHdpdGggdGhlIHByb3h5IGJlZm9yZSB3ZSBnZXQKICAgIC8vIHRoZSBDT05ORUNUIHJlc3BvbnNlLCBzbyB0aGF0IGlmIHRoZSByZXNwb25zZSBpcyBhbnl0aGluZyBvdGhlciB0aGFuIGFuICIyMDAiCiAgICAvLyByZXNwb25zZSBjb2RlLCB0aGVuIHdlIGNhbiByZS1wbGF5IHRoZSAiZGF0YSIgZXZlbnRzIG9uIHRoZSBzb2NrZXQgb25jZSB0aGUKICAgIC8vIEhUVFAgcGFyc2VyIGlzIGhvb2tlZCB1cC4uLgogICAgbGV0IGJ1ZmZlcnNMZW5ndGggPSAwOwogICAgY29uc3QgYnVmZmVycyA9IFtdOwoKICAgIGZ1bmN0aW9uIHJlYWQoKSB7CiAgICAgIGNvbnN0IGIgPSBzb2NrZXQucmVhZCgpOwogICAgICBpZiAoYikgb25kYXRhKGIpOwogICAgICBlbHNlIHNvY2tldC5vbmNlKCdyZWFkYWJsZScsIHJlYWQpOwogICAgfQoKICAgIGZ1bmN0aW9uIGNsZWFudXAoKSB7CiAgICAgIHNvY2tldC5yZW1vdmVMaXN0ZW5lcignZW5kJywgb25lbmQpOwogICAgICBzb2NrZXQucmVtb3ZlTGlzdGVuZXIoJ2Vycm9yJywgb25lcnJvcik7CiAgICAgIHNvY2tldC5yZW1vdmVMaXN0ZW5lcigncmVhZGFibGUnLCByZWFkKTsKICAgIH0KCiAgICBmdW5jdGlvbiBvbmVuZCgpIHsKICAgICAgY2xlYW51cCgpOwogICAgICBkZWJ1ZyQxKCdvbmVuZCcpOwogICAgICByZWplY3QobmV3IEVycm9yKCdQcm94eSBjb25uZWN0aW9uIGVuZGVkIGJlZm9yZSByZWNlaXZpbmcgQ09OTkVDVCByZXNwb25zZScpKTsKICAgIH0KCiAgICBmdW5jdGlvbiBvbmVycm9yKGVycikgewogICAgICBjbGVhbnVwKCk7CiAgICAgIGRlYnVnJDEoJ29uZXJyb3IgJW8nLCBlcnIpOwogICAgICByZWplY3QoZXJyKTsKICAgIH0KCiAgICBmdW5jdGlvbiBvbmRhdGEoYikgewogICAgICBidWZmZXJzLnB1c2goYik7CiAgICAgIGJ1ZmZlcnNMZW5ndGggKz0gYi5sZW5ndGg7CgogICAgICBjb25zdCBidWZmZXJlZCA9IEJ1ZmZlci5jb25jYXQoYnVmZmVycywgYnVmZmVyc0xlbmd0aCk7CiAgICAgIGNvbnN0IGVuZE9mSGVhZGVycyA9IGJ1ZmZlcmVkLmluZGV4T2YoJ1xyXG5cclxuJyk7CgogICAgICBpZiAoZW5kT2ZIZWFkZXJzID09PSAtMSkgewogICAgICAgIC8vIGtlZXAgYnVmZmVyaW5nCiAgICAgICAgZGVidWckMSgnaGF2ZSBub3QgcmVjZWl2ZWQgZW5kIG9mIEhUVFAgaGVhZGVycyB5ZXQuLi4nKTsKICAgICAgICByZWFkKCk7CiAgICAgICAgcmV0dXJuOwogICAgICB9CgogICAgICBjb25zdCBoZWFkZXJQYXJ0cyA9IGJ1ZmZlcmVkLnNsaWNlKDAsIGVuZE9mSGVhZGVycykudG9TdHJpbmcoJ2FzY2lpJykuc3BsaXQoJ1xyXG4nKTsKICAgICAgY29uc3QgZmlyc3RMaW5lID0gaGVhZGVyUGFydHMuc2hpZnQoKTsKICAgICAgaWYgKCFmaXJzdExpbmUpIHsKICAgICAgICBzb2NrZXQuZGVzdHJveSgpOwogICAgICAgIHJldHVybiByZWplY3QobmV3IEVycm9yKCdObyBoZWFkZXIgcmVjZWl2ZWQgZnJvbSBwcm94eSBDT05ORUNUIHJlc3BvbnNlJykpOwogICAgICB9CiAgICAgIGNvbnN0IGZpcnN0TGluZVBhcnRzID0gZmlyc3RMaW5lLnNwbGl0KCcgJyk7CiAgICAgIGNvbnN0IHN0YXR1c0NvZGUgPSArZmlyc3RMaW5lUGFydHNbMV07CiAgICAgIGNvbnN0IHN0YXR1c1RleHQgPSBmaXJzdExpbmVQYXJ0cy5zbGljZSgyKS5qb2luKCcgJyk7CiAgICAgIGNvbnN0IGhlYWRlcnMgPSB7fTsKICAgICAgZm9yIChjb25zdCBoZWFkZXIgb2YgaGVhZGVyUGFydHMpIHsKICAgICAgICBpZiAoIWhlYWRlcikgY29udGludWU7CiAgICAgICAgY29uc3QgZmlyc3RDb2xvbiA9IGhlYWRlci5pbmRleE9mKCc6Jyk7CiAgICAgICAgaWYgKGZpcnN0Q29sb24gPT09IC0xKSB7CiAgICAgICAgICBzb2NrZXQuZGVzdHJveSgpOwogICAgICAgICAgcmV0dXJuIHJlamVjdChuZXcgRXJyb3IoYEludmFsaWQgaGVhZGVyIGZyb20gcHJveHkgQ09OTkVDVCByZXNwb25zZTogIiR7aGVhZGVyfSJgKSk7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGtleSA9IGhlYWRlci5zbGljZSgwLCBmaXJzdENvbG9uKS50b0xvd2VyQ2FzZSgpOwogICAgICAgIGNvbnN0IHZhbHVlID0gaGVhZGVyLnNsaWNlKGZpcnN0Q29sb24gKyAxKS50cmltU3RhcnQoKTsKICAgICAgICBjb25zdCBjdXJyZW50ID0gaGVhZGVyc1trZXldOwogICAgICAgIGlmICh0eXBlb2YgY3VycmVudCA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgIGhlYWRlcnNba2V5XSA9IFtjdXJyZW50LCB2YWx1ZV07CiAgICAgICAgfSBlbHNlIGlmIChBcnJheS5pc0FycmF5KGN1cnJlbnQpKSB7CiAgICAgICAgICBjdXJyZW50LnB1c2godmFsdWUpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBoZWFkZXJzW2tleV0gPSB2YWx1ZTsKICAgICAgICB9CiAgICAgIH0KICAgICAgZGVidWckMSgnZ290IHByb3h5IHNlcnZlciByZXNwb25zZTogJW8gJW8nLCBmaXJzdExpbmUsIGhlYWRlcnMpOwogICAgICBjbGVhbnVwKCk7CiAgICAgIHJlc29sdmUoewogICAgICAgIGNvbm5lY3Q6IHsKICAgICAgICAgIHN0YXR1c0NvZGUsCiAgICAgICAgICBzdGF0dXNUZXh0LAogICAgICAgICAgaGVhZGVycywKICAgICAgICB9LAogICAgICAgIGJ1ZmZlcmVkLAogICAgICB9KTsKICAgIH0KCiAgICBzb2NrZXQub24oJ2Vycm9yJywgb25lcnJvcik7CiAgICBzb2NrZXQub24oJ2VuZCcsIG9uZW5kKTsKCiAgICByZWFkKCk7CiAgfSk7Cn0KCmZ1bmN0aW9uIF9udWxsaXNoQ29hbGVzY2UkMShsaHMsIHJoc0ZuKSB7IGlmIChsaHMgIT0gbnVsbCkgeyByZXR1cm4gbGhzOyB9IGVsc2UgeyByZXR1cm4gcmhzRm4oKTsgfSB9IGZ1bmN0aW9uIF9vcHRpb25hbENoYWluJDEob3BzKSB7IGxldCBsYXN0QWNjZXNzTEhTID0gdW5kZWZpbmVkOyBsZXQgdmFsdWUgPSBvcHNbMF07IGxldCBpID0gMTsgd2hpbGUgKGkgPCBvcHMubGVuZ3RoKSB7IGNvbnN0IG9wID0gb3BzW2ldOyBjb25zdCBmbiA9IG9wc1tpICsgMV07IGkgKz0gMjsgaWYgKChvcCA9PT0gJ29wdGlvbmFsQWNjZXNzJyB8fCBvcCA9PT0gJ29wdGlvbmFsQ2FsbCcpICYmIHZhbHVlID09IG51bGwpIHsgcmV0dXJuIHVuZGVmaW5lZDsgfSBpZiAob3AgPT09ICdhY2Nlc3MnIHx8IG9wID09PSAnb3B0aW9uYWxBY2Nlc3MnKSB7IGxhc3RBY2Nlc3NMSFMgPSB2YWx1ZTsgdmFsdWUgPSBmbih2YWx1ZSk7IH0gZWxzZSBpZiAob3AgPT09ICdjYWxsJyB8fCBvcCA9PT0gJ29wdGlvbmFsQ2FsbCcpIHsgdmFsdWUgPSBmbigoLi4uYXJncykgPT4gdmFsdWUuY2FsbChsYXN0QWNjZXNzTEhTLCAuLi5hcmdzKSk7IGxhc3RBY2Nlc3NMSFMgPSB1bmRlZmluZWQ7IH0gfSByZXR1cm4gdmFsdWU7IH0vKioKICogVGhpcyBjb2RlIHdhcyBvcmlnaW5hbGx5IGZvcmtlZCBmcm9tIGh0dHBzOi8vZ2l0aHViLmNvbS9Ub29UYWxsTmF0ZS9wcm94eS1hZ2VudHMvdHJlZS9iMTMzMjk1ZmQxNmY2NDc1NTc4YjZiMTViZDliNGUzM2VjYjBkMGI3CiAqIFdpdGggdGhlIGZvbGxvd2luZyBsaWNlbmNlOgogKgogKiAoVGhlIE1JVCBMaWNlbnNlKQogKgogKiBDb3B5cmlnaHQgKGMpIDIwMTMgTmF0aGFuIFJhamxpY2ggPG5hdGhhbkB0b290YWxsbmF0ZS5uZXQ+KgogKgogKiBQZXJtaXNzaW9uIGlzIGhlcmVieSBncmFudGVkLCBmcmVlIG9mIGNoYXJnZSwgdG8gYW55IHBlcnNvbiBvYnRhaW5pbmcKICogYSBjb3B5IG9mIHRoaXMgc29mdHdhcmUgYW5kIGFzc29jaWF0ZWQgZG9jdW1lbnRhdGlvbiBmaWxlcyAodGhlCiAqICdTb2Z0d2FyZScpLCB0byBkZWFsIGluIHRoZSBTb2Z0d2FyZSB3aXRob3V0IHJlc3RyaWN0aW9uLCBpbmNsdWRpbmcKICogd2l0aG91dCBsaW1pdGF0aW9uIHRoZSByaWdodHMgdG8gdXNlLCBjb3B5LCBtb2RpZnksIG1lcmdlLCBwdWJsaXNoLAogKiBkaXN0cmlidXRlLCBzdWJsaWNlbnNlLCBhbmQvb3Igc2VsbCBjb3BpZXMgb2YgdGhlIFNvZnR3YXJlLCBhbmQgdG8KICogcGVybWl0IHBlcnNvbnMgdG8gd2hvbSB0aGUgU29mdHdhcmUgaXMgZnVybmlzaGVkIHRvIGRvIHNvLCBzdWJqZWN0IHRvCiAqIHRoZSBmb2xsb3dpbmcgY29uZGl0aW9uczoqCiAqCiAqIFRoZSBhYm92ZSBjb3B5cmlnaHQgbm90aWNlIGFuZCB0aGlzIHBlcm1pc3Npb24gbm90aWNlIHNoYWxsIGJlCiAqIGluY2x1ZGVkIGluIGFsbCBjb3BpZXMgb3Igc3Vic3RhbnRpYWwgcG9ydGlvbnMgb2YgdGhlIFNvZnR3YXJlLioKICoKICogVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICdBUyBJUycsIFdJVEhPVVQgV0FSUkFOVFkgT0YgQU5ZIEtJTkQsCiAqIEVYUFJFU1MgT1IgSU1QTElFRCwgSU5DTFVESU5HIEJVVCBOT1QgTElNSVRFRCBUTyBUSEUgV0FSUkFOVElFUyBPRgogKiBNRVJDSEFOVEFCSUxJVFksIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFORCBOT05JTkZSSU5HRU1FTlQuCiAqIElOIE5PIEVWRU5UIFNIQUxMIFRIRSBBVVRIT1JTIE9SIENPUFlSSUdIVCBIT0xERVJTIEJFIExJQUJMRSBGT1IgQU5ZCiAqIENMQUlNLCBEQU1BR0VTIE9SIE9USEVSIExJQUJJTElUWSwgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsCiAqIFRPUlQgT1IgT1RIRVJXSVNFLCBBUklTSU5HIEZST00sIE9VVCBPRiBPUiBJTiBDT05ORUNUSU9OIFdJVEggVEhFCiAqIFNPRlRXQVJFIE9SIFRIRSBVU0UgT1IgT1RIRVIgREVBTElOR1MgSU4gVEhFIFNPRlRXQVJFLgogKi8KCmZ1bmN0aW9uIGRlYnVnKC4uLmFyZ3MpIHsKICBsb2dnZXIubG9nKCdbaHR0cHMtcHJveHktYWdlbnRdJywgLi4uYXJncyk7Cn0KCi8qKgogKiBUaGUgYEh0dHBzUHJveHlBZ2VudGAgaW1wbGVtZW50cyBhbiBIVFRQIEFnZW50IHN1YmNsYXNzIHRoYXQgY29ubmVjdHMgdG8KICogdGhlIHNwZWNpZmllZCAiSFRUUChzKSBwcm94eSBzZXJ2ZXIiIGluIG9yZGVyIHRvIHByb3h5IEhUVFBTIHJlcXVlc3RzLgogKgogKiBPdXRnb2luZyBIVFRQIHJlcXVlc3RzIGFyZSBmaXJzdCB0dW5uZWxlZCB0aHJvdWdoIHRoZSBwcm94eSBzZXJ2ZXIgdXNpbmcgdGhlCiAqIGBDT05ORUNUYCBIVFRQIHJlcXVlc3QgbWV0aG9kIHRvIGVzdGFibGlzaCBhIGNvbm5lY3Rpb24gdG8gdGhlIHByb3h5IHNlcnZlciwKICogYW5kIHRoZW4gdGhlIHByb3h5IHNlcnZlciBjb25uZWN0cyB0byB0aGUgZGVzdGluYXRpb24gdGFyZ2V0IGFuZCBpc3N1ZXMgdGhlCiAqIEhUVFAgcmVxdWVzdCBmcm9tIHRoZSBwcm94eSBzZXJ2ZXIuCiAqCiAqIGBodHRwczpgIHJlcXVlc3RzIGhhdmUgdGhlaXIgc29ja2V0IGNvbm5lY3Rpb24gdXBncmFkZWQgdG8gVExTIG9uY2UKICogdGhlIGNvbm5lY3Rpb24gdG8gdGhlIHByb3h5IHNlcnZlciBoYXMgYmVlbiBlc3RhYmxpc2hlZC4KICovCmNsYXNzIEh0dHBzUHJveHlBZ2VudCBleHRlbmRzIEFnZW50IHsKICBzdGF0aWMgX19pbml0U3RhdGljKCkge3RoaXMucHJvdG9jb2xzID0gWydodHRwJywgJ2h0dHBzJ107IH0KCiAgY29uc3RydWN0b3IocHJveHksIG9wdHMpIHsKICAgIHN1cGVyKG9wdHMpOwogICAgdGhpcy5vcHRpb25zID0ge307CiAgICB0aGlzLnByb3h5ID0gdHlwZW9mIHByb3h5ID09PSAnc3RyaW5nJyA/IG5ldyBVUkwocHJveHkpIDogcHJveHk7CiAgICB0aGlzLnByb3h5SGVhZGVycyA9IF9udWxsaXNoQ29hbGVzY2UkMShfb3B0aW9uYWxDaGFpbiQxKFtvcHRzLCAnb3B0aW9uYWxBY2Nlc3MnLCBfMiA9PiBfMi5oZWFkZXJzXSksICgpID0+ICgge30pKTsKICAgIGRlYnVnKCdDcmVhdGluZyBuZXcgSHR0cHNQcm94eUFnZW50IGluc3RhbmNlOiAlbycsIHRoaXMucHJveHkuaHJlZik7CgogICAgLy8gVHJpbSBvZmYgdGhlIGJyYWNrZXRzIGZyb20gSVB2NiBhZGRyZXNzZXMKICAgIGNvbnN0IGhvc3QgPSAodGhpcy5wcm94eS5ob3N0bmFtZSB8fCB0aGlzLnByb3h5Lmhvc3QpLnJlcGxhY2UoL15cW3xcXSQvZywgJycpOwogICAgY29uc3QgcG9ydCA9IHRoaXMucHJveHkucG9ydCA/IHBhcnNlSW50KHRoaXMucHJveHkucG9ydCwgMTApIDogdGhpcy5wcm94eS5wcm90b2NvbCA9PT0gJ2h0dHBzOicgPyA0NDMgOiA4MDsKICAgIHRoaXMuY29ubmVjdE9wdHMgPSB7CiAgICAgIC8vIEF0dGVtcHQgdG8gbmVnb3RpYXRlIGh0dHAvMS4xIGZvciBwcm94eSBzZXJ2ZXJzIHRoYXQgc3VwcG9ydCBodHRwLzIKICAgICAgQUxQTlByb3RvY29sczogWydodHRwLzEuMSddLAogICAgICAuLi4ob3B0cyA/IG9taXQob3B0cywgJ2hlYWRlcnMnKSA6IG51bGwpLAogICAgICBob3N0LAogICAgICBwb3J0LAogICAgfTsKICB9CgogIC8qKgogICAqIENhbGxlZCB3aGVuIHRoZSBub2RlLWNvcmUgSFRUUCBjbGllbnQgbGlicmFyeSBpcyBjcmVhdGluZyBhCiAgICogbmV3IEhUVFAgcmVxdWVzdC4KICAgKi8KICBhc3luYyBjb25uZWN0KHJlcSwgb3B0cykgewogICAgY29uc3QgeyBwcm94eSB9ID0gdGhpczsKCiAgICBpZiAoIW9wdHMuaG9zdCkgewogICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdObyAiaG9zdCIgcHJvdmlkZWQnKTsKICAgIH0KCiAgICAvLyBDcmVhdGUgYSBzb2NrZXQgY29ubmVjdGlvbiB0byB0aGUgcHJveHkgc2VydmVyLgogICAgbGV0IHNvY2tldDsKICAgIGlmIChwcm94eS5wcm90b2NvbCA9PT0gJ2h0dHBzOicpIHsKICAgICAgZGVidWcoJ0NyZWF0aW5nIGB0bHMuU29ja2V0YDogJW8nLCB0aGlzLmNvbm5lY3RPcHRzKTsKICAgICAgY29uc3Qgc2VydmVybmFtZSA9IHRoaXMuY29ubmVjdE9wdHMuc2VydmVybmFtZSB8fCB0aGlzLmNvbm5lY3RPcHRzLmhvc3Q7CiAgICAgIHNvY2tldCA9IHRscy5jb25uZWN0KHsKICAgICAgICAuLi50aGlzLmNvbm5lY3RPcHRzLAogICAgICAgIHNlcnZlcm5hbWU6IHNlcnZlcm5hbWUgJiYgbmV0LmlzSVAoc2VydmVybmFtZSkgPyB1bmRlZmluZWQgOiBzZXJ2ZXJuYW1lLAogICAgICB9KTsKICAgIH0gZWxzZSB7CiAgICAgIGRlYnVnKCdDcmVhdGluZyBgbmV0LlNvY2tldGA6ICVvJywgdGhpcy5jb25uZWN0T3B0cyk7CiAgICAgIHNvY2tldCA9IG5ldC5jb25uZWN0KHRoaXMuY29ubmVjdE9wdHMpOwogICAgfQoKICAgIGNvbnN0IGhlYWRlcnMgPQogICAgICB0eXBlb2YgdGhpcy5wcm94eUhlYWRlcnMgPT09ICdmdW5jdGlvbicgPyB0aGlzLnByb3h5SGVhZGVycygpIDogeyAuLi50aGlzLnByb3h5SGVhZGVycyB9OwogICAgY29uc3QgaG9zdCA9IG5ldC5pc0lQdjYob3B0cy5ob3N0KSA/IGBbJHtvcHRzLmhvc3R9XWAgOiBvcHRzLmhvc3Q7CiAgICBsZXQgcGF5bG9hZCA9IGBDT05ORUNUICR7aG9zdH06JHtvcHRzLnBvcnR9IEhUVFAvMS4xXHJcbmA7CgogICAgLy8gSW5qZWN0IHRoZSBgUHJveHktQXV0aG9yaXphdGlvbmAgaGVhZGVyIGlmIG5lY2Vzc2FyeS4KICAgIGlmIChwcm94eS51c2VybmFtZSB8fCBwcm94eS5wYXNzd29yZCkgewogICAgICBjb25zdCBhdXRoID0gYCR7ZGVjb2RlVVJJQ29tcG9uZW50KHByb3h5LnVzZXJuYW1lKX06JHtkZWNvZGVVUklDb21wb25lbnQocHJveHkucGFzc3dvcmQpfWA7CiAgICAgIGhlYWRlcnNbJ1Byb3h5LUF1dGhvcml6YXRpb24nXSA9IGBCYXNpYyAke0J1ZmZlci5mcm9tKGF1dGgpLnRvU3RyaW5nKCdiYXNlNjQnKX1gOwogICAgfQoKICAgIGhlYWRlcnMuSG9zdCA9IGAke2hvc3R9OiR7b3B0cy5wb3J0fWA7CgogICAgaWYgKCFoZWFkZXJzWydQcm94eS1Db25uZWN0aW9uJ10pIHsKICAgICAgaGVhZGVyc1snUHJveHktQ29ubmVjdGlvbiddID0gdGhpcy5rZWVwQWxpdmUgPyAnS2VlcC1BbGl2ZScgOiAnY2xvc2UnOwogICAgfQogICAgZm9yIChjb25zdCBuYW1lIG9mIE9iamVjdC5rZXlzKGhlYWRlcnMpKSB7CiAgICAgIHBheWxvYWQgKz0gYCR7bmFtZX06ICR7aGVhZGVyc1tuYW1lXX1cclxuYDsKICAgIH0KCiAgICBjb25zdCBwcm94eVJlc3BvbnNlUHJvbWlzZSA9IHBhcnNlUHJveHlSZXNwb25zZShzb2NrZXQpOwoKICAgIHNvY2tldC53cml0ZShgJHtwYXlsb2FkfVxyXG5gKTsKCiAgICBjb25zdCB7IGNvbm5lY3QsIGJ1ZmZlcmVkIH0gPSBhd2FpdCBwcm94eVJlc3BvbnNlUHJvbWlzZTsKICAgIHJlcS5lbWl0KCdwcm94eUNvbm5lY3QnLCBjb25uZWN0KTsKICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvYmFuLXRzLWNvbW1lbnQKICAgIC8vIEB0cy1pZ25vcmUgTm90IEV2ZW50RW1pdHRlciBpbiBOb2RlIHR5cGVzCiAgICB0aGlzLmVtaXQoJ3Byb3h5Q29ubmVjdCcsIGNvbm5lY3QsIHJlcSk7CgogICAgaWYgKGNvbm5lY3Quc3RhdHVzQ29kZSA9PT0gMjAwKSB7CiAgICAgIHJlcS5vbmNlKCdzb2NrZXQnLCByZXN1bWUpOwoKICAgICAgaWYgKG9wdHMuc2VjdXJlRW5kcG9pbnQpIHsKICAgICAgICAvLyBUaGUgcHJveHkgaXMgY29ubmVjdGluZyB0byBhIFRMUyBzZXJ2ZXIsIHNvIHVwZ3JhZGUKICAgICAgICAvLyB0aGlzIHNvY2tldCBjb25uZWN0aW9uIHRvIGEgVExTIGNvbm5lY3Rpb24uCiAgICAgICAgZGVidWcoJ1VwZ3JhZGluZyBzb2NrZXQgY29ubmVjdGlvbiB0byBUTFMnKTsKICAgICAgICBjb25zdCBzZXJ2ZXJuYW1lID0gb3B0cy5zZXJ2ZXJuYW1lIHx8IG9wdHMuaG9zdDsKICAgICAgICByZXR1cm4gdGxzLmNvbm5lY3QoewogICAgICAgICAgLi4ub21pdChvcHRzLCAnaG9zdCcsICdwYXRoJywgJ3BvcnQnKSwKICAgICAgICAgIHNvY2tldCwKICAgICAgICAgIHNlcnZlcm5hbWU6IG5ldC5pc0lQKHNlcnZlcm5hbWUpID8gdW5kZWZpbmVkIDogc2VydmVybmFtZSwKICAgICAgICB9KTsKICAgICAgfQoKICAgICAgcmV0dXJuIHNvY2tldDsKICAgIH0KCiAgICAvLyBTb21lIG90aGVyIHN0YXR1cyBjb2RlIHRoYXQncyBub3QgMjAwLi4uIG5lZWQgdG8gcmUtcGxheSB0aGUgSFRUUAogICAgLy8gaGVhZGVyICJkYXRhIiBldmVudHMgb250byB0aGUgc29ja2V0IG9uY2UgdGhlIEhUVFAgbWFjaGluZXJ5IGlzCiAgICAvLyBhdHRhY2hlZCBzbyB0aGF0IHRoZSBub2RlIGNvcmUgYGh0dHBgIGNhbiBwYXJzZSBhbmQgaGFuZGxlIHRoZQogICAgLy8gZXJyb3Igc3RhdHVzIGNvZGUuCgogICAgLy8gQ2xvc2UgdGhlIG9yaWdpbmFsIHNvY2tldCwgYW5kIGEgbmV3ICJmYWtlIiBzb2NrZXQgaXMgcmV0dXJuZWQKICAgIC8vIGluc3RlYWQsIHNvIHRoYXQgdGhlIHByb3h5IGRvZXNuJ3QgZ2V0IHRoZSBIVFRQIHJlcXVlc3QKICAgIC8vIHdyaXR0ZW4gdG8gaXQgKHdoaWNoIG1heSBjb250YWluIGBBdXRob3JpemF0aW9uYCBoZWFkZXJzIG9yIG90aGVyCiAgICAvLyBzZW5zaXRpdmUgZGF0YSkuCiAgICAvLwogICAgLy8gU2VlOiBodHRwczovL2hhY2tlcm9uZS5jb20vcmVwb3J0cy81NDE1MDIKICAgIHNvY2tldC5kZXN0cm95KCk7CgogICAgY29uc3QgZmFrZVNvY2tldCA9IG5ldyBuZXQuU29ja2V0KHsgd3JpdGFibGU6IGZhbHNlIH0pOwogICAgZmFrZVNvY2tldC5yZWFkYWJsZSA9IHRydWU7CgogICAgLy8gTmVlZCB0byB3YWl0IGZvciB0aGUgInNvY2tldCIgZXZlbnQgdG8gcmUtcGxheSB0aGUgImRhdGEiIGV2ZW50cy4KICAgIHJlcS5vbmNlKCdzb2NrZXQnLCAocykgPT4gewogICAgICBkZWJ1ZygnUmVwbGF5aW5nIHByb3h5IGJ1ZmZlciBmb3IgZmFpbGVkIHJlcXVlc3QnKTsKICAgICAgYXNzZXJ0KHMubGlzdGVuZXJDb3VudCgnZGF0YScpID4gMCk7CgogICAgICAvLyBSZXBsYXkgdGhlICJidWZmZXJlZCIgQnVmZmVyIG9udG8gdGhlIGZha2UgYHNvY2tldGAsIHNpbmNlIGF0CiAgICAgIC8vIHRoaXMgcG9pbnQgdGhlIEhUVFAgbW9kdWxlIG1hY2hpbmVyeSBoYXMgYmVlbiBob29rZWQgdXAgZm9yCiAgICAgIC8vIHRoZSB1c2VyLgogICAgICBzLnB1c2goYnVmZmVyZWQpOwogICAgICBzLnB1c2gobnVsbCk7CiAgICB9KTsKCiAgICByZXR1cm4gZmFrZVNvY2tldDsKICB9Cn0gSHR0cHNQcm94eUFnZW50Ll9faW5pdFN0YXRpYygpOwoKZnVuY3Rpb24gcmVzdW1lKHNvY2tldCkgewogIHNvY2tldC5yZXN1bWUoKTsKfQoKZnVuY3Rpb24gb21pdCgKICBvYmosCiAgLi4ua2V5cwopCgogewogIGNvbnN0IHJldCA9IHt9Cgo7CiAgbGV0IGtleTsKICBmb3IgKGtleSBpbiBvYmopIHsKICAgIGlmICgha2V5cy5pbmNsdWRlcyhrZXkpKSB7CiAgICAgIHJldFtrZXldID0gb2JqW2tleV07CiAgICB9CiAgfQogIHJldHVybiByZXQ7Cn0KCmZ1bmN0aW9uIF9udWxsaXNoQ29hbGVzY2UobGhzLCByaHNGbikgeyBpZiAobGhzICE9IG51bGwpIHsgcmV0dXJuIGxoczsgfSBlbHNlIHsgcmV0dXJuIHJoc0ZuKCk7IH0gfQovLyBFc3RpbWF0ZWQgbWF4aW11bSBzaXplIGZvciByZWFzb25hYmxlIHN0YW5kYWxvbmUgZXZlbnQKY29uc3QgR1pJUF9USFJFU0hPTEQgPSAxMDI0ICogMzI7CgovKioKICogR2V0cyBhIHN0cmVhbSBmcm9tIGEgVWludDhBcnJheSBvciBzdHJpbmcKICogUmVhZGFibGUuZnJvbSBpcyBpZGVhbCBidXQgd2FzIGFkZGVkIGluIG5vZGUuanMgdjEyLjMuMCBhbmQgdjEwLjE3LjAKICovCmZ1bmN0aW9uIHN0cmVhbUZyb21Cb2R5KGJvZHkpIHsKICByZXR1cm4gbmV3IFJlYWRhYmxlKHsKICAgIHJlYWQoKSB7CiAgICAgIHRoaXMucHVzaChib2R5KTsKICAgICAgdGhpcy5wdXNoKG51bGwpOwogICAgfSwKICB9KTsKfQoKLyoqCiAqIENyZWF0ZXMgYSBUcmFuc3BvcnQgdGhhdCB1c2VzIG5hdGl2ZSB0aGUgbmF0aXZlICdodHRwJyBhbmQgJ2h0dHBzJyBtb2R1bGVzIHRvIHNlbmQgZXZlbnRzIHRvIFNlbnRyeS4KICovCmZ1bmN0aW9uIG1ha2VOb2RlVHJhbnNwb3J0KG9wdGlvbnMpIHsKICBsZXQgdXJsU2VnbWVudHM7CgogIHRyeSB7CiAgICB1cmxTZWdtZW50cyA9IG5ldyBVUkwob3B0aW9ucy51cmwpOwogIH0gY2F0Y2ggKGUpIHsKICAgIGNvbnNvbGVTYW5kYm94KCgpID0+IHsKICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWNvbnNvbGUKICAgICAgY29uc29sZS53YXJuKAogICAgICAgICdbQHNlbnRyeS9ub2RlXTogSW52YWxpZCBkc24gb3IgdHVubmVsIG9wdGlvbiwgd2lsbCBub3Qgc2VuZCBhbnkgZXZlbnRzLiBUaGUgdHVubmVsIG9wdGlvbiBtdXN0IGJlIGEgZnVsbCBVUkwgd2hlbiB1c2VkLicsCiAgICAgICk7CiAgICB9KTsKICAgIHJldHVybiBjcmVhdGVUcmFuc3BvcnQob3B0aW9ucywgKCkgPT4gUHJvbWlzZS5yZXNvbHZlKHt9KSk7CiAgfQoKICBjb25zdCBpc0h0dHBzID0gdXJsU2VnbWVudHMucHJvdG9jb2wgPT09ICdodHRwczonOwoKICAvLyBQcm94eSBwcmlvcml0aXphdGlvbjogaHR0cCA9PiBgb3B0aW9ucy5wcm94eWAgfCBgcHJvY2Vzcy5lbnYuaHR0cF9wcm94eWAKICAvLyBQcm94eSBwcmlvcml0aXphdGlvbjogaHR0cHMgPT4gYG9wdGlvbnMucHJveHlgIHwgYHByb2Nlc3MuZW52Lmh0dHBzX3Byb3h5YCB8IGBwcm9jZXNzLmVudi5odHRwX3Byb3h5YAogIGNvbnN0IHByb3h5ID0gYXBwbHlOb1Byb3h5T3B0aW9uKAogICAgdXJsU2VnbWVudHMsCiAgICBvcHRpb25zLnByb3h5IHx8IChpc0h0dHBzID8gcHJvY2Vzcy5lbnYuaHR0cHNfcHJveHkgOiB1bmRlZmluZWQpIHx8IHByb2Nlc3MuZW52Lmh0dHBfcHJveHksCiAgKTsKCiAgY29uc3QgbmF0aXZlSHR0cE1vZHVsZSA9IGlzSHR0cHMgPyBodHRwcyA6IGh0dHA7CiAgY29uc3Qga2VlcEFsaXZlID0gb3B0aW9ucy5rZWVwQWxpdmUgPT09IHVuZGVmaW5lZCA/IGZhbHNlIDogb3B0aW9ucy5rZWVwQWxpdmU7CgogIC8vIFRPRE8odjcpOiBFdmFsdWF0ZSBpZiB3ZSBjYW4gc2V0IGtlZXBBbGl2ZSB0byB0cnVlLiBUaGlzIHdvdWxkIGludm9sdmUgdGVzdGluZyBmb3IgbWVtb3J5IGxlYWtzIGluIG9sZGVyIG5vZGUKICAvLyB2ZXJzaW9ucyg+PSA4KSBhcyB0aGV5IGhhZCBtZW1vcnkgbGVha3Mgd2hlbiB1c2luZyBpdDogIzI1NTUKICBjb25zdCBhZ2VudCA9IHByb3h5CiAgICA/IChuZXcgSHR0cHNQcm94eUFnZW50KHByb3h5KSApCiAgICA6IG5ldyBuYXRpdmVIdHRwTW9kdWxlLkFnZW50KHsga2VlcEFsaXZlLCBtYXhTb2NrZXRzOiAzMCwgdGltZW91dDogMjAwMCB9KTsKCiAgY29uc3QgcmVxdWVzdEV4ZWN1dG9yID0gY3JlYXRlUmVxdWVzdEV4ZWN1dG9yKG9wdGlvbnMsIF9udWxsaXNoQ29hbGVzY2Uob3B0aW9ucy5odHRwTW9kdWxlLCAoKSA9PiAoIG5hdGl2ZUh0dHBNb2R1bGUpKSwgYWdlbnQpOwogIHJldHVybiBjcmVhdGVUcmFuc3BvcnQob3B0aW9ucywgcmVxdWVzdEV4ZWN1dG9yKTsKfQoKLyoqCiAqIEhvbm9ycyB0aGUgYG5vX3Byb3h5YCBlbnYgdmFyaWFibGUgd2l0aCB0aGUgaGlnaGVzdCBwcmlvcml0eSB0byBhbGxvdyBmb3IgaG9zdHMgZXhjbHVzaW9uLgogKgogKiBAcGFyYW0gdHJhbnNwb3J0VXJsIFRoZSBVUkwgdGhlIHRyYW5zcG9ydCBpbnRlbmRzIHRvIHNlbmQgZXZlbnRzIHRvLgogKiBAcGFyYW0gcHJveHkgVGhlIGNsaWVudCBjb25maWd1cmVkIHByb3h5LgogKiBAcmV0dXJucyBBIHByb3h5IHRoZSB0cmFuc3BvcnQgc2hvdWxkIHVzZS4KICovCmZ1bmN0aW9uIGFwcGx5Tm9Qcm94eU9wdGlvbih0cmFuc3BvcnRVcmxTZWdtZW50cywgcHJveHkpIHsKICBjb25zdCB7IG5vX3Byb3h5IH0gPSBwcm9jZXNzLmVudjsKCiAgY29uc3QgdXJsSXNFeGVtcHRGcm9tUHJveHkgPQogICAgbm9fcHJveHkgJiYKICAgIG5vX3Byb3h5CiAgICAgIC5zcGxpdCgnLCcpCiAgICAgIC5zb21lKAogICAgICAgIGV4ZW1wdGlvbiA9PiB0cmFuc3BvcnRVcmxTZWdtZW50cy5ob3N0LmVuZHNXaXRoKGV4ZW1wdGlvbikgfHwgdHJhbnNwb3J0VXJsU2VnbWVudHMuaG9zdG5hbWUuZW5kc1dpdGgoZXhlbXB0aW9uKSwKICAgICAgKTsKCiAgaWYgKHVybElzRXhlbXB0RnJvbVByb3h5KSB7CiAgICByZXR1cm4gdW5kZWZpbmVkOwogIH0gZWxzZSB7CiAgICByZXR1cm4gcHJveHk7CiAgfQp9CgovKioKICogQ3JlYXRlcyBhIFJlcXVlc3RFeGVjdXRvciB0byBiZSB1c2VkIHdpdGggYGNyZWF0ZVRyYW5zcG9ydGAuCiAqLwpmdW5jdGlvbiBjcmVhdGVSZXF1ZXN0RXhlY3V0b3IoCiAgb3B0aW9ucywKICBodHRwTW9kdWxlLAogIGFnZW50LAopIHsKICBjb25zdCB7IGhvc3RuYW1lLCBwYXRobmFtZSwgcG9ydCwgcHJvdG9jb2wsIHNlYXJjaCB9ID0gbmV3IFVSTChvcHRpb25zLnVybCk7CiAgcmV0dXJuIGZ1bmN0aW9uIG1ha2VSZXF1ZXN0KHJlcXVlc3QpIHsKICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgIGxldCBib2R5ID0gc3RyZWFtRnJvbUJvZHkocmVxdWVzdC5ib2R5KTsKCiAgICAgIGNvbnN0IGhlYWRlcnMgPSB7IC4uLm9wdGlvbnMuaGVhZGVycyB9OwoKICAgICAgaWYgKHJlcXVlc3QuYm9keS5sZW5ndGggPiBHWklQX1RIUkVTSE9MRCkgewogICAgICAgIGhlYWRlcnNbJ2NvbnRlbnQtZW5jb2RpbmcnXSA9ICdnemlwJzsKICAgICAgICBib2R5ID0gYm9keS5waXBlKGNyZWF0ZUd6aXAoKSk7CiAgICAgIH0KCiAgICAgIGNvbnN0IHJlcSA9IGh0dHBNb2R1bGUucmVxdWVzdCgKICAgICAgICB7CiAgICAgICAgICBtZXRob2Q6ICdQT1NUJywKICAgICAgICAgIGFnZW50LAogICAgICAgICAgaGVhZGVycywKICAgICAgICAgIGhvc3RuYW1lLAogICAgICAgICAgcGF0aDogYCR7cGF0aG5hbWV9JHtzZWFyY2h9YCwKICAgICAgICAgIHBvcnQsCiAgICAgICAgICBwcm90b2NvbCwKICAgICAgICAgIGNhOiBvcHRpb25zLmNhQ2VydHMsCiAgICAgICAgfSwKICAgICAgICByZXMgPT4gewogICAgICAgICAgcmVzLm9uKCdkYXRhJywgKCkgPT4gewogICAgICAgICAgICAvLyBEcmFpbiBzb2NrZXQKICAgICAgICAgIH0pOwoKICAgICAgICAgIHJlcy5vbignZW5kJywgKCkgPT4gewogICAgICAgICAgICAvLyBEcmFpbiBzb2NrZXQKICAgICAgICAgIH0pOwoKICAgICAgICAgIHJlcy5zZXRFbmNvZGluZygndXRmOCcpOwoKICAgICAgICAgIC8vICJLZXktdmFsdWUgcGFpcnMgb2YgaGVhZGVyIG5hbWVzIGFuZCB2YWx1ZXMuIEhlYWRlciBuYW1lcyBhcmUgbG93ZXItY2FzZWQuIgogICAgICAgICAgLy8gaHR0cHM6Ly9ub2RlanMub3JnL2FwaS9odHRwLmh0bWwjaHR0cF9tZXNzYWdlX2hlYWRlcnMKICAgICAgICAgIGNvbnN0IHJldHJ5QWZ0ZXJIZWFkZXIgPSBfbnVsbGlzaENvYWxlc2NlKHJlcy5oZWFkZXJzWydyZXRyeS1hZnRlciddLCAoKSA9PiAoIG51bGwpKTsKICAgICAgICAgIGNvbnN0IHJhdGVMaW1pdHNIZWFkZXIgPSBfbnVsbGlzaENvYWxlc2NlKHJlcy5oZWFkZXJzWyd4LXNlbnRyeS1yYXRlLWxpbWl0cyddLCAoKSA9PiAoIG51bGwpKTsKCiAgICAgICAgICByZXNvbHZlKHsKICAgICAgICAgICAgc3RhdHVzQ29kZTogcmVzLnN0YXR1c0NvZGUsCiAgICAgICAgICAgIGhlYWRlcnM6IHsKICAgICAgICAgICAgICAncmV0cnktYWZ0ZXInOiByZXRyeUFmdGVySGVhZGVyLAogICAgICAgICAgICAgICd4LXNlbnRyeS1yYXRlLWxpbWl0cyc6IEFycmF5LmlzQXJyYXkocmF0ZUxpbWl0c0hlYWRlcikgPyByYXRlTGltaXRzSGVhZGVyWzBdIDogcmF0ZUxpbWl0c0hlYWRlciwKICAgICAgICAgICAgfSwKICAgICAgICAgIH0pOwogICAgICAgIH0sCiAgICAgICk7CgogICAgICByZXEub24oJ2Vycm9yJywgcmVqZWN0KTsKICAgICAgYm9keS5waXBlKHJlcSk7CiAgICB9KTsKICB9Owp9CgpmdW5jdGlvbiBfb3B0aW9uYWxDaGFpbihvcHMpIHsgbGV0IGxhc3RBY2Nlc3NMSFMgPSB1bmRlZmluZWQ7IGxldCB2YWx1ZSA9IG9wc1swXTsgbGV0IGkgPSAxOyB3aGlsZSAoaSA8IG9wcy5sZW5ndGgpIHsgY29uc3Qgb3AgPSBvcHNbaV07IGNvbnN0IGZuID0gb3BzW2kgKyAxXTsgaSArPSAyOyBpZiAoKG9wID09PSAnb3B0aW9uYWxBY2Nlc3MnIHx8IG9wID09PSAnb3B0aW9uYWxDYWxsJykgJiYgdmFsdWUgPT0gbnVsbCkgeyByZXR1cm4gdW5kZWZpbmVkOyB9IGlmIChvcCA9PT0gJ2FjY2VzcycgfHwgb3AgPT09ICdvcHRpb25hbEFjY2VzcycpIHsgbGFzdEFjY2Vzc0xIUyA9IHZhbHVlOyB2YWx1ZSA9IGZuKHZhbHVlKTsgfSBlbHNlIGlmIChvcCA9PT0gJ2NhbGwnIHx8IG9wID09PSAnb3B0aW9uYWxDYWxsJykgeyB2YWx1ZSA9IGZuKCguLi5hcmdzKSA9PiB2YWx1ZS5jYWxsKGxhc3RBY2Nlc3NMSFMsIC4uLmFyZ3MpKTsgbGFzdEFjY2Vzc0xIUyA9IHVuZGVmaW5lZDsgfSB9IHJldHVybiB2YWx1ZTsgfQpjb25zdCBvcHRpb25zID0gd29ya2VyRGF0YTsKbGV0IHNlc3Npb247CmxldCBoYXNTZW50QW5yRXZlbnQgPSBmYWxzZTsKCmZ1bmN0aW9uIGxvZyhtc2cpIHsKICBpZiAob3B0aW9ucy5kZWJ1ZykgewogICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWNvbnNvbGUKICAgIGNvbnNvbGUubG9nKGBbQU5SIFdvcmtlcl0gJHttc2d9YCk7CiAgfQp9Cgpjb25zdCB1cmwgPSBnZXRFbnZlbG9wZUVuZHBvaW50V2l0aFVybEVuY29kZWRBdXRoKG9wdGlvbnMuZHNuKTsKY29uc3QgdHJhbnNwb3J0ID0gbWFrZU5vZGVUcmFuc3BvcnQoewogIHVybCwKICByZWNvcmREcm9wcGVkRXZlbnQ6ICgpID0+IHsKICAgIC8vCiAgfSwKfSk7Cgphc3luYyBmdW5jdGlvbiBzZW5kQWJub3JtYWxTZXNzaW9uKCkgewogIC8vIG9mIHdlIGhhdmUgYW4gZXhpc3Rpbmcgc2Vzc2lvbiBwYXNzZWQgZnJvbSB0aGUgbWFpbiB0aHJlYWQsIHNlbmQgaXQgYXMgYWJub3JtYWwKICBpZiAoc2Vzc2lvbikgewogICAgbG9nKCdTZW5kaW5nIGFibm9ybWFsIHNlc3Npb24nKTsKICAgIHVwZGF0ZVNlc3Npb24oc2Vzc2lvbiwgeyBzdGF0dXM6ICdhYm5vcm1hbCcsIGFibm9ybWFsX21lY2hhbmlzbTogJ2Fucl9mb3JlZ3JvdW5kJyB9KTsKCiAgICBjb25zdCBlbnZlbG9wZSA9IGNyZWF0ZVNlc3Npb25FbnZlbG9wZShzZXNzaW9uLCBvcHRpb25zLmRzbiwgb3B0aW9ucy5zZGtNZXRhZGF0YSk7CiAgICAvLyBMb2cgdGhlIGVudmVsb3BlIHNvIHRvIGFpZCBpbiB0ZXN0aW5nCiAgICBsb2coSlNPTi5zdHJpbmdpZnkoZW52ZWxvcGUpKTsKCiAgICBhd2FpdCB0cmFuc3BvcnQuc2VuZChlbnZlbG9wZSk7CgogICAgdHJ5IHsKICAgICAgLy8gTm90aWZ5IHRoZSBtYWluIHByb2Nlc3MgdGhhdCB0aGUgc2Vzc2lvbiBoYXMgZW5kZWQgc28gdGhlIHNlc3Npb24gY2FuIGJlIGNsZWFyZWQgZnJvbSB0aGUgc2NvcGUKICAgICAgX29wdGlvbmFsQ2hhaW4oW3BhcmVudFBvcnQsICdvcHRpb25hbEFjY2VzcycsIF8yID0+IF8yLnBvc3RNZXNzYWdlLCAnY2FsbCcsIF8zID0+IF8zKCdzZXNzaW9uLWVuZGVkJyldKTsKICAgIH0gY2F0Y2ggKF8pIHsKICAgICAgLy8gaWdub3JlCiAgICB9CiAgfQp9Cgpsb2coJ1N0YXJ0ZWQnKTsKCmZ1bmN0aW9uIHByZXBhcmVTdGFja0ZyYW1lcyhzdGFja0ZyYW1lcykgewogIGlmICghc3RhY2tGcmFtZXMpIHsKICAgIHJldHVybiB1bmRlZmluZWQ7CiAgfQoKICAvLyBTdHJpcCBTZW50cnkgZnJhbWVzIGFuZCByZXZlcnNlIHRoZSBzdGFjayBmcmFtZXMgc28gdGhleSBhcmUgaW4gdGhlIGNvcnJlY3Qgb3JkZXIKICBjb25zdCBzdHJpcHBlZEZyYW1lcyA9IHN0cmlwU2VudHJ5RnJhbWVzQW5kUmV2ZXJzZShzdGFja0ZyYW1lcyk7CgogIC8vIElmIHdlIGhhdmUgYW4gYXBwIHJvb3QgcGF0aCwgcmV3cml0ZSB0aGUgZmlsZW5hbWVzIHRvIGJlIHJlbGF0aXZlIHRvIHRoZSBhcHAgcm9vdAogIGlmIChvcHRpb25zLmFwcFJvb3RQYXRoKSB7CiAgICBmb3IgKGNvbnN0IGZyYW1lIG9mIHN0cmlwcGVkRnJhbWVzKSB7CiAgICAgIGlmICghZnJhbWUuZmlsZW5hbWUpIHsKICAgICAgICBjb250aW51ZTsKICAgICAgfQoKICAgICAgZnJhbWUuZmlsZW5hbWUgPSBub3JtYWxpemVVcmxUb0Jhc2UoZnJhbWUuZmlsZW5hbWUsIG9wdGlvbnMuYXBwUm9vdFBhdGgpOwogICAgfQogIH0KCiAgcmV0dXJuIHN0cmlwcGVkRnJhbWVzOwp9Cgphc3luYyBmdW5jdGlvbiBzZW5kQW5yRXZlbnQoZnJhbWVzLCB0cmFjZUNvbnRleHQpIHsKICBpZiAoaGFzU2VudEFuckV2ZW50KSB7CiAgICByZXR1cm47CiAgfQoKICBoYXNTZW50QW5yRXZlbnQgPSB0cnVlOwoKICBhd2FpdCBzZW5kQWJub3JtYWxTZXNzaW9uKCk7CgogIGxvZygnU2VuZGluZyBldmVudCcpOwoKICBjb25zdCBldmVudCA9IHsKICAgIGV2ZW50X2lkOiB1dWlkNCgpLAogICAgY29udGV4dHM6IHsgLi4ub3B0aW9ucy5jb250ZXh0cywgdHJhY2U6IHRyYWNlQ29udGV4dCB9LAogICAgcmVsZWFzZTogb3B0aW9ucy5yZWxlYXNlLAogICAgZW52aXJvbm1lbnQ6IG9wdGlvbnMuZW52aXJvbm1lbnQsCiAgICBkaXN0OiBvcHRpb25zLmRpc3QsCiAgICBwbGF0Zm9ybTogJ25vZGUnLAogICAgbGV2ZWw6ICdlcnJvcicsCiAgICBleGNlcHRpb246IHsKICAgICAgdmFsdWVzOiBbCiAgICAgICAgewogICAgICAgICAgdHlwZTogJ0FwcGxpY2F0aW9uTm90UmVzcG9uZGluZycsCiAgICAgICAgICB2YWx1ZTogYEFwcGxpY2F0aW9uIE5vdCBSZXNwb25kaW5nIGZvciBhdCBsZWFzdCAke29wdGlvbnMuYW5yVGhyZXNob2xkfSBtc2AsCiAgICAgICAgICBzdGFja3RyYWNlOiB7IGZyYW1lczogcHJlcGFyZVN0YWNrRnJhbWVzKGZyYW1lcykgfSwKICAgICAgICAgIC8vIFRoaXMgZW5zdXJlcyB0aGUgVUkgZG9lc24ndCBzYXkgJ0NyYXNoZWQgaW4nIGZvciB0aGUgc3RhY2sgdHJhY2UKICAgICAgICAgIG1lY2hhbmlzbTogeyB0eXBlOiAnQU5SJyB9LAogICAgICAgIH0sCiAgICAgIF0sCiAgICB9LAogICAgdGFnczogb3B0aW9ucy5zdGF0aWNUYWdzLAogIH07CgogIGNvbnN0IGVudmVsb3BlID0gY3JlYXRlRXZlbnRFbnZlbG9wZShldmVudCwgb3B0aW9ucy5kc24sIG9wdGlvbnMuc2RrTWV0YWRhdGEpOwogIC8vIExvZyB0aGUgZW52ZWxvcGUgc28gdG8gYWlkIGluIHRlc3RpbmcKICBsb2coSlNPTi5zdHJpbmdpZnkoZW52ZWxvcGUpKTsKCiAgYXdhaXQgdHJhbnNwb3J0LnNlbmQoZW52ZWxvcGUpOwogIGF3YWl0IHRyYW5zcG9ydC5mbHVzaCgyMDAwKTsKCiAgLy8gRGVsYXkgZm9yIDUgc2Vjb25kcyBzbyB0aGF0IHN0ZGlvIGNhbiBmbHVzaCBpbiB0aGUgbWFpbiBldmVudCBsb29wIGV2ZXIgcmVzdGFydHMuCiAgLy8gVGhpcyBpcyBtYWlubHkgZm9yIHRoZSBiZW5lZml0IG9mIGxvZ2dpbmcvZGVidWdnaW5nIGlzc3Vlcy4KICBzZXRUaW1lb3V0KCgpID0+IHsKICAgIHByb2Nlc3MuZXhpdCgwKTsKICB9LCA1MDAwKTsKfQoKbGV0IGRlYnVnZ2VyUGF1c2U7CgppZiAob3B0aW9ucy5jYXB0dXJlU3RhY2tUcmFjZSkgewogIGxvZygnQ29ubmVjdGluZyB0byBkZWJ1Z2dlcicpOwoKICBjb25zdCBzZXNzaW9uID0gbmV3IFNlc3Npb24oKSA7CiAgc2Vzc2lvbi5jb25uZWN0VG9NYWluVGhyZWFkKCk7CgogIGxvZygnQ29ubmVjdGVkIHRvIGRlYnVnZ2VyJyk7CgogIC8vIENvbGxlY3Qgc2NyaXB0SWQgLT4gdXJsIG1hcCBzbyB3ZSBjYW4gbG9vayB1cCB0aGUgZmlsZW5hbWVzIGxhdGVyCiAgY29uc3Qgc2NyaXB0cyA9IG5ldyBNYXAoKTsKCiAgc2Vzc2lvbi5vbignRGVidWdnZXIuc2NyaXB0UGFyc2VkJywgZXZlbnQgPT4gewogICAgc2NyaXB0cy5zZXQoZXZlbnQucGFyYW1zLnNjcmlwdElkLCBldmVudC5wYXJhbXMudXJsKTsKICB9KTsKCiAgc2Vzc2lvbi5vbignRGVidWdnZXIucGF1c2VkJywgZXZlbnQgPT4gewogICAgaWYgKGV2ZW50LnBhcmFtcy5yZWFzb24gIT09ICdvdGhlcicpIHsKICAgICAgcmV0dXJuOwogICAgfQoKICAgIHRyeSB7CiAgICAgIGxvZygnRGVidWdnZXIgcGF1c2VkJyk7CgogICAgICAvLyBjb3B5IHRoZSBmcmFtZXMKICAgICAgY29uc3QgY2FsbEZyYW1lcyA9IFsuLi5ldmVudC5wYXJhbXMuY2FsbEZyYW1lc107CgogICAgICBjb25zdCBnZXRNb2R1bGVOYW1lID0gb3B0aW9ucy5hcHBSb290UGF0aCA/IGNyZWF0ZUdldE1vZHVsZUZyb21GaWxlbmFtZShvcHRpb25zLmFwcFJvb3RQYXRoKSA6ICgpID0+IHVuZGVmaW5lZDsKICAgICAgY29uc3Qgc3RhY2tGcmFtZXMgPSBjYWxsRnJhbWVzLm1hcChmcmFtZSA9PgogICAgICAgIGNhbGxGcmFtZVRvU3RhY2tGcmFtZShmcmFtZSwgc2NyaXB0cy5nZXQoZnJhbWUubG9jYXRpb24uc2NyaXB0SWQpLCBnZXRNb2R1bGVOYW1lKSwKICAgICAgKTsKCiAgICAgIC8vIEV2YWx1YXRlIGEgc2NyaXB0IGluIHRoZSBjdXJyZW50bHkgcGF1c2VkIGNvbnRleHQKICAgICAgc2Vzc2lvbi5wb3N0KAogICAgICAgICdSdW50aW1lLmV2YWx1YXRlJywKICAgICAgICB7CiAgICAgICAgICAvLyBHcmFiIHRoZSB0cmFjZSBjb250ZXh0IGZyb20gdGhlIGN1cnJlbnQgc2NvcGUKICAgICAgICAgIGV4cHJlc3Npb246CiAgICAgICAgICAgICdjb25zdCBjdHggPSBfX1NFTlRSWV9fLmh1Yi5nZXRTY29wZSgpLmdldFByb3BhZ2F0aW9uQ29udGV4dCgpOyBjdHgudHJhY2VJZCArICItIiArIGN0eC5zcGFuSWQgKyAiLSIgKyBjdHgucGFyZW50U3BhbklkJywKICAgICAgICAgIC8vIERvbid0IHJlLXRyaWdnZXIgdGhlIGRlYnVnZ2VyIGlmIHRoaXMgY2F1c2VzIGFuIGVycm9yCiAgICAgICAgICBzaWxlbnQ6IHRydWUsCiAgICAgICAgfSwKICAgICAgICAoXywgcGFyYW0pID0+IHsKICAgICAgICAgIGNvbnN0IHRyYWNlSWQgPSBwYXJhbSAmJiBwYXJhbS5yZXN1bHQgPyAocGFyYW0ucmVzdWx0LnZhbHVlICkgOiAnLS0nOwogICAgICAgICAgY29uc3QgW3RyYWNlX2lkLCBzcGFuX2lkLCBwYXJlbnRfc3Bhbl9pZF0gPSB0cmFjZUlkLnNwbGl0KCctJykgOwoKICAgICAgICAgIHNlc3Npb24ucG9zdCgnRGVidWdnZXIucmVzdW1lJyk7CiAgICAgICAgICBzZXNzaW9uLnBvc3QoJ0RlYnVnZ2VyLmRpc2FibGUnKTsKCiAgICAgICAgICBjb25zdCBjb250ZXh0ID0gX29wdGlvbmFsQ2hhaW4oW3RyYWNlX2lkLCAnb3B0aW9uYWxBY2Nlc3MnLCBfNCA9PiBfNC5sZW5ndGhdKSAmJiBfb3B0aW9uYWxDaGFpbihbc3Bhbl9pZCwgJ29wdGlvbmFsQWNjZXNzJywgXzUgPT4gXzUubGVuZ3RoXSkgPyB7IHRyYWNlX2lkLCBzcGFuX2lkLCBwYXJlbnRfc3Bhbl9pZCB9IDogdW5kZWZpbmVkOwogICAgICAgICAgc2VuZEFuckV2ZW50KHN0YWNrRnJhbWVzLCBjb250ZXh0KS50aGVuKG51bGwsICgpID0+IHsKICAgICAgICAgICAgbG9nKCdTZW5kaW5nIEFOUiBldmVudCBmYWlsZWQuJyk7CiAgICAgICAgICB9KTsKICAgICAgICB9LAogICAgICApOwogICAgfSBjYXRjaCAoZSkgewogICAgICBzZXNzaW9uLnBvc3QoJ0RlYnVnZ2VyLnJlc3VtZScpOwogICAgICBzZXNzaW9uLnBvc3QoJ0RlYnVnZ2VyLmRpc2FibGUnKTsKICAgICAgdGhyb3cgZTsKICAgIH0KICB9KTsKCiAgZGVidWdnZXJQYXVzZSA9ICgpID0+IHsKICAgIHRyeSB7CiAgICAgIHNlc3Npb24ucG9zdCgnRGVidWdnZXIuZW5hYmxlJywgKCkgPT4gewogICAgICAgIHNlc3Npb24ucG9zdCgnRGVidWdnZXIucGF1c2UnKTsKICAgICAgfSk7CiAgICB9IGNhdGNoIChfKSB7CiAgICAgIC8vCiAgICB9CiAgfTsKfQoKZnVuY3Rpb24gY3JlYXRlSHJUaW1lcigpIHsKICAvLyBUT0RPICh2OCk6IFdlIGNhbiB1c2UgcHJvY2Vzcy5ocnRpbWUuYmlnaW50KCkgYWZ0ZXIgd2UgZHJvcCBub2RlIHY4CiAgbGV0IGxhc3RQb2xsID0gcHJvY2Vzcy5ocnRpbWUoKTsKCiAgcmV0dXJuIHsKICAgIGdldFRpbWVNczogKCkgPT4gewogICAgICBjb25zdCBbc2Vjb25kcywgbmFub1NlY29uZHNdID0gcHJvY2Vzcy5ocnRpbWUobGFzdFBvbGwpOwogICAgICByZXR1cm4gTWF0aC5mbG9vcihzZWNvbmRzICogMWUzICsgbmFub1NlY29uZHMgLyAxZTYpOwogICAgfSwKICAgIHJlc2V0OiAoKSA9PiB7CiAgICAgIGxhc3RQb2xsID0gcHJvY2Vzcy5ocnRpbWUoKTsKICAgIH0sCiAgfTsKfQoKZnVuY3Rpb24gd2F0Y2hkb2dUaW1lb3V0KCkgewogIGxvZygnV2F0Y2hkb2cgdGltZW91dCcpOwoKICBpZiAoZGVidWdnZXJQYXVzZSkgewogICAgbG9nKCdQYXVzaW5nIGRlYnVnZ2VyIHRvIGNhcHR1cmUgc3RhY2sgdHJhY2UnKTsKICAgIGRlYnVnZ2VyUGF1c2UoKTsKICB9IGVsc2UgewogICAgbG9nKCdDYXB0dXJpbmcgZXZlbnQgd2l0aG91dCBhIHN0YWNrIHRyYWNlJyk7CiAgICBzZW5kQW5yRXZlbnQoKS50aGVuKG51bGwsICgpID0+IHsKICAgICAgbG9nKCdTZW5kaW5nIEFOUiBldmVudCBmYWlsZWQgb24gd2F0Y2hkb2cgdGltZW91dC4nKTsKICAgIH0pOwogIH0KfQoKY29uc3QgeyBwb2xsIH0gPSB3YXRjaGRvZ1RpbWVyKGNyZWF0ZUhyVGltZXIsIG9wdGlvbnMucG9sbEludGVydmFsLCBvcHRpb25zLmFuclRocmVzaG9sZCwgd2F0Y2hkb2dUaW1lb3V0KTsKCl9vcHRpb25hbENoYWluKFtwYXJlbnRQb3J0LCAnb3B0aW9uYWxBY2Nlc3MnLCBfNiA9PiBfNi5vbiwgJ2NhbGwnLCBfNyA9PiBfNygnbWVzc2FnZScsIChtc2cpID0+IHsKICBpZiAobXNnLnNlc3Npb24pIHsKICAgIHNlc3Npb24gPSBtYWtlU2Vzc2lvbihtc2cuc2Vzc2lvbik7CiAgfQoKICBwb2xsKCk7Cn0pXSk7\";\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst util = require('util');\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\n\nconst INTEGRATION_NAME = 'Console';\n\nconst _consoleIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n utils.addConsoleInstrumentationHandler(({ args, level }) => {\n if (core.getClient() !== client) {\n return;\n }\n\n core.addBreadcrumb(\n {\n category: 'console',\n level: utils.severityLevelFromString(level),\n message: util.format.apply(undefined, args),\n },\n {\n input: [...args],\n level,\n },\n );\n });\n },\n };\n}) ;\n\nconst consoleIntegration = core.defineIntegration(_consoleIntegration);\n\n/**\n * Console module integration.\n * @deprecated Use `consoleIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Console = core.convertIntegrationFnToClass(INTEGRATION_NAME, consoleIntegration)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nexports.Console = Console;\nexports.consoleIntegration = consoleIntegration;\n//# sourceMappingURL=console.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst child_process = require('child_process');\nconst fs = require('fs');\nconst os = require('os');\nconst path = require('path');\nconst util = require('util');\nconst core = require('@sentry/core');\n\n/* eslint-disable max-lines */\n\n// TODO: Required until we drop support for Node v8\nconst readFileAsync = util.promisify(fs.readFile);\nconst readDirAsync = util.promisify(fs.readdir);\n\nconst INTEGRATION_NAME = 'Context';\n\nconst _nodeContextIntegration = ((options = {}) => {\n let cachedContext;\n\n const _options = {\n app: true,\n os: true,\n device: true,\n culture: true,\n cloudResource: true,\n ...options,\n };\n\n /** Add contexts to the event. Caches the context so we only look it up once. */\n async function addContext(event) {\n if (cachedContext === undefined) {\n cachedContext = _getContexts();\n }\n\n const updatedContext = _updateContext(await cachedContext);\n\n event.contexts = {\n ...event.contexts,\n app: { ...updatedContext.app, ..._optionalChain([event, 'access', _ => _.contexts, 'optionalAccess', _2 => _2.app]) },\n os: { ...updatedContext.os, ..._optionalChain([event, 'access', _3 => _3.contexts, 'optionalAccess', _4 => _4.os]) },\n device: { ...updatedContext.device, ..._optionalChain([event, 'access', _5 => _5.contexts, 'optionalAccess', _6 => _6.device]) },\n culture: { ...updatedContext.culture, ..._optionalChain([event, 'access', _7 => _7.contexts, 'optionalAccess', _8 => _8.culture]) },\n cloud_resource: { ...updatedContext.cloud_resource, ..._optionalChain([event, 'access', _9 => _9.contexts, 'optionalAccess', _10 => _10.cloud_resource]) },\n };\n\n return event;\n }\n\n /** Get the contexts from node. */\n async function _getContexts() {\n const contexts = {};\n\n if (_options.os) {\n contexts.os = await getOsContext();\n }\n\n if (_options.app) {\n contexts.app = getAppContext();\n }\n\n if (_options.device) {\n contexts.device = getDeviceContext(_options.device);\n }\n\n if (_options.culture) {\n const culture = getCultureContext();\n\n if (culture) {\n contexts.culture = culture;\n }\n }\n\n if (_options.cloudResource) {\n contexts.cloud_resource = getCloudResourceContext();\n }\n\n return contexts;\n }\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent(event) {\n return addContext(event);\n },\n };\n}) ;\n\nconst nodeContextIntegration = core.defineIntegration(_nodeContextIntegration);\n\n/**\n * Add node modules / packages to the event.\n * @deprecated Use `nodeContextIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Context = core.convertIntegrationFnToClass(INTEGRATION_NAME, nodeContextIntegration)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\n/**\n * Updates the context with dynamic values that can change\n */\nfunction _updateContext(contexts) {\n // Only update properties if they exist\n if (_optionalChain([contexts, 'optionalAccess', _11 => _11.app, 'optionalAccess', _12 => _12.app_memory])) {\n contexts.app.app_memory = process.memoryUsage().rss;\n }\n\n if (_optionalChain([contexts, 'optionalAccess', _13 => _13.device, 'optionalAccess', _14 => _14.free_memory])) {\n contexts.device.free_memory = os.freemem();\n }\n\n return contexts;\n}\n\n/**\n * Returns the operating system context.\n *\n * Based on the current platform, this uses a different strategy to provide the\n * most accurate OS information. Since this might involve spawning subprocesses\n * or accessing the file system, this should only be executed lazily and cached.\n *\n * - On macOS (Darwin), this will execute the `sw_vers` utility. The context\n * has a `name`, `version`, `build` and `kernel_version` set.\n * - On Linux, this will try to load a distribution release from `/etc` and set\n * the `name`, `version` and `kernel_version` fields.\n * - On all other platforms, only a `name` and `version` will be returned. Note\n * that `version` might actually be the kernel version.\n */\nasync function getOsContext() {\n const platformId = os.platform();\n switch (platformId) {\n case 'darwin':\n return getDarwinInfo();\n case 'linux':\n return getLinuxInfo();\n default:\n return {\n name: PLATFORM_NAMES[platformId] || platformId,\n version: os.release(),\n };\n }\n}\n\nfunction getCultureContext() {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n if (typeof (process.versions ).icu !== 'string') {\n // Node was built without ICU support\n return;\n }\n\n // Check that node was built with full Intl support. Its possible it was built without support for non-English\n // locales which will make resolvedOptions inaccurate\n //\n // https://nodejs.org/api/intl.html#detecting-internationalization-support\n const january = new Date(9e8);\n const spanish = new Intl.DateTimeFormat('es', { month: 'long' });\n if (spanish.format(january) === 'enero') {\n const options = Intl.DateTimeFormat().resolvedOptions();\n\n return {\n locale: options.locale,\n timezone: options.timeZone,\n };\n }\n } catch (err) {\n //\n }\n\n return;\n}\n\nfunction getAppContext() {\n const app_memory = process.memoryUsage().rss;\n const app_start_time = new Date(Date.now() - process.uptime() * 1000).toISOString();\n\n return { app_start_time, app_memory };\n}\n\n/**\n * Gets device information from os\n */\nfunction getDeviceContext(deviceOpt) {\n const device = {};\n\n // Sometimes os.uptime() throws due to lacking permissions: https://github.com/getsentry/sentry-javascript/issues/8202\n let uptime;\n try {\n uptime = os.uptime && os.uptime();\n } catch (e) {\n // noop\n }\n\n // os.uptime or its return value seem to be undefined in certain environments (e.g. Azure functions).\n // Hence, we only set boot time, if we get a valid uptime value.\n // @see https://github.com/getsentry/sentry-javascript/issues/5856\n if (typeof uptime === 'number') {\n device.boot_time = new Date(Date.now() - uptime * 1000).toISOString();\n }\n\n device.arch = os.arch();\n\n if (deviceOpt === true || deviceOpt.memory) {\n device.memory_size = os.totalmem();\n device.free_memory = os.freemem();\n }\n\n if (deviceOpt === true || deviceOpt.cpu) {\n const cpuInfo = os.cpus();\n if (cpuInfo && cpuInfo.length) {\n const firstCpu = cpuInfo[0];\n\n device.processor_count = cpuInfo.length;\n device.cpu_description = firstCpu.model;\n device.processor_frequency = firstCpu.speed;\n }\n }\n\n return device;\n}\n\n/** Mapping of Node's platform names to actual OS names. */\nconst PLATFORM_NAMES = {\n aix: 'IBM AIX',\n freebsd: 'FreeBSD',\n openbsd: 'OpenBSD',\n sunos: 'SunOS',\n win32: 'Windows',\n};\n\n/** Linux version file to check for a distribution. */\n\n/** Mapping of linux release files located in /etc to distributions. */\nconst LINUX_DISTROS = [\n { name: 'fedora-release', distros: ['Fedora'] },\n { name: 'redhat-release', distros: ['Red Hat Linux', 'Centos'] },\n { name: 'redhat_version', distros: ['Red Hat Linux'] },\n { name: 'SuSE-release', distros: ['SUSE Linux'] },\n { name: 'lsb-release', distros: ['Ubuntu Linux', 'Arch Linux'] },\n { name: 'debian_version', distros: ['Debian'] },\n { name: 'debian_release', distros: ['Debian'] },\n { name: 'arch-release', distros: ['Arch Linux'] },\n { name: 'gentoo-release', distros: ['Gentoo Linux'] },\n { name: 'novell-release', distros: ['SUSE Linux'] },\n { name: 'alpine-release', distros: ['Alpine Linux'] },\n];\n\n/** Functions to extract the OS version from Linux release files. */\nconst LINUX_VERSIONS\n\n = {\n alpine: content => content,\n arch: content => matchFirst(/distrib_release=(.*)/, content),\n centos: content => matchFirst(/release ([^ ]+)/, content),\n debian: content => content,\n fedora: content => matchFirst(/release (..)/, content),\n mint: content => matchFirst(/distrib_release=(.*)/, content),\n red: content => matchFirst(/release ([^ ]+)/, content),\n suse: content => matchFirst(/VERSION = (.*)\\n/, content),\n ubuntu: content => matchFirst(/distrib_release=(.*)/, content),\n};\n\n/**\n * Executes a regular expression with one capture group.\n *\n * @param regex A regular expression to execute.\n * @param text Content to execute the RegEx on.\n * @returns The captured string if matched; otherwise undefined.\n */\nfunction matchFirst(regex, text) {\n const match = regex.exec(text);\n return match ? match[1] : undefined;\n}\n\n/** Loads the macOS operating system context. */\nasync function getDarwinInfo() {\n // Default values that will be used in case no operating system information\n // can be loaded. The default version is computed via heuristics from the\n // kernel version, but the build ID is missing.\n const darwinInfo = {\n kernel_version: os.release(),\n name: 'Mac OS X',\n version: `10.${Number(os.release().split('.')[0]) - 4}`,\n };\n\n try {\n // We try to load the actual macOS version by executing the `sw_vers` tool.\n // This tool should be available on every standard macOS installation. In\n // case this fails, we stick with the values computed above.\n\n const output = await new Promise((resolve, reject) => {\n child_process.execFile('/usr/bin/sw_vers', (error, stdout) => {\n if (error) {\n reject(error);\n return;\n }\n resolve(stdout);\n });\n });\n\n darwinInfo.name = matchFirst(/^ProductName:\\s+(.*)$/m, output);\n darwinInfo.version = matchFirst(/^ProductVersion:\\s+(.*)$/m, output);\n darwinInfo.build = matchFirst(/^BuildVersion:\\s+(.*)$/m, output);\n } catch (e) {\n // ignore\n }\n\n return darwinInfo;\n}\n\n/** Returns a distribution identifier to look up version callbacks. */\nfunction getLinuxDistroId(name) {\n return name.split(' ')[0].toLowerCase();\n}\n\n/** Loads the Linux operating system context. */\nasync function getLinuxInfo() {\n // By default, we cannot assume anything about the distribution or Linux\n // version. `os.release()` returns the kernel version and we assume a generic\n // \"Linux\" name, which will be replaced down below.\n const linuxInfo = {\n kernel_version: os.release(),\n name: 'Linux',\n };\n\n try {\n // We start guessing the distribution by listing files in the /etc\n // directory. This is were most Linux distributions (except Knoppix) store\n // release files with certain distribution-dependent meta data. We search\n // for exactly one known file defined in `LINUX_DISTROS` and exit if none\n // are found. In case there are more than one file, we just stick with the\n // first one.\n const etcFiles = await readDirAsync('/etc');\n const distroFile = LINUX_DISTROS.find(file => etcFiles.includes(file.name));\n if (!distroFile) {\n return linuxInfo;\n }\n\n // Once that file is known, load its contents. To make searching in those\n // files easier, we lowercase the file contents. Since these files are\n // usually quite small, this should not allocate too much memory and we only\n // hold on to it for a very short amount of time.\n const distroPath = path.join('/etc', distroFile.name);\n const contents = ((await readFileAsync(distroPath, { encoding: 'utf-8' })) ).toLowerCase();\n\n // Some Linux distributions store their release information in the same file\n // (e.g. RHEL and Centos). In those cases, we scan the file for an\n // identifier, that basically consists of the first word of the linux\n // distribution name (e.g. \"red\" for Red Hat). In case there is no match, we\n // just assume the first distribution in our list.\n const { distros } = distroFile;\n linuxInfo.name = distros.find(d => contents.indexOf(getLinuxDistroId(d)) >= 0) || distros[0];\n\n // Based on the found distribution, we can now compute the actual version\n // number. This is different for every distribution, so several strategies\n // are computed in `LINUX_VERSIONS`.\n const id = getLinuxDistroId(linuxInfo.name);\n linuxInfo.version = LINUX_VERSIONS[id](contents);\n } catch (e) {\n // ignore\n }\n\n return linuxInfo;\n}\n\n/**\n * Grabs some information about hosting provider based on best effort.\n */\nfunction getCloudResourceContext() {\n if (process.env.VERCEL) {\n // https://vercel.com/docs/concepts/projects/environment-variables/system-environment-variables#system-environment-variables\n return {\n 'cloud.provider': 'vercel',\n 'cloud.region': process.env.VERCEL_REGION,\n };\n } else if (process.env.AWS_REGION) {\n // https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html\n return {\n 'cloud.provider': 'aws',\n 'cloud.region': process.env.AWS_REGION,\n 'cloud.platform': process.env.AWS_EXECUTION_ENV,\n };\n } else if (process.env.GCP_PROJECT) {\n // https://cloud.google.com/composer/docs/how-to/managing/environment-variables#reserved_variables\n return {\n 'cloud.provider': 'gcp',\n };\n } else if (process.env.ALIYUN_REGION_ID) {\n // TODO: find where I found these environment variables - at least gc.github.com returns something\n return {\n 'cloud.provider': 'alibaba_cloud',\n 'cloud.region': process.env.ALIYUN_REGION_ID,\n };\n } else if (process.env.WEBSITE_SITE_NAME && process.env.REGION_NAME) {\n // https://learn.microsoft.com/en-us/azure/app-service/reference-app-settings?tabs=kudu%2Cdotnet#app-environment\n return {\n 'cloud.provider': 'azure',\n 'cloud.region': process.env.REGION_NAME,\n };\n } else if (process.env.IBM_CLOUD_REGION) {\n // TODO: find where I found these environment variables - at least gc.github.com returns something\n return {\n 'cloud.provider': 'ibm_cloud',\n 'cloud.region': process.env.IBM_CLOUD_REGION,\n };\n } else if (process.env.TENCENTCLOUD_REGION) {\n // https://www.tencentcloud.com/document/product/583/32748\n return {\n 'cloud.provider': 'tencent_cloud',\n 'cloud.region': process.env.TENCENTCLOUD_REGION,\n 'cloud.account.id': process.env.TENCENTCLOUD_APPID,\n 'cloud.availability_zone': process.env.TENCENTCLOUD_ZONE,\n };\n } else if (process.env.NETLIFY) {\n // https://docs.netlify.com/configure-builds/environment-variables/#read-only-variables\n return {\n 'cloud.provider': 'netlify',\n };\n } else if (process.env.FLY_REGION) {\n // https://fly.io/docs/reference/runtime-environment/\n return {\n 'cloud.provider': 'fly.io',\n 'cloud.region': process.env.FLY_REGION,\n };\n } else if (process.env.DYNO) {\n // https://devcenter.heroku.com/articles/dynos#local-environment-variables\n return {\n 'cloud.provider': 'heroku',\n };\n } else {\n return undefined;\n }\n}\n\nexports.Context = Context;\nexports.getDeviceContext = getDeviceContext;\nexports.nodeContextIntegration = nodeContextIntegration;\nexports.readDirAsync = readDirAsync;\nexports.readFileAsync = readFileAsync;\n//# sourceMappingURL=context.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst fs = require('fs');\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\n\nconst FILE_CONTENT_CACHE = new utils.LRUMap(100);\nconst DEFAULT_LINES_OF_CONTEXT = 7;\nconst INTEGRATION_NAME = 'ContextLines';\n\n// TODO: Replace with promisify when minimum supported node >= v8\nfunction readTextFileAsync(path) {\n return new Promise((resolve, reject) => {\n fs.readFile(path, 'utf8', (err, data) => {\n if (err) reject(err);\n else resolve(data);\n });\n });\n}\n\nconst _contextLinesIntegration = ((options = {}) => {\n const contextLines = options.frameContextLines !== undefined ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT;\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent(event) {\n return addSourceContext(event, contextLines);\n },\n };\n}) ;\n\nconst contextLinesIntegration = core.defineIntegration(_contextLinesIntegration);\n\n/**\n * Add node modules / packages to the event.\n * @deprecated Use `contextLinesIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst ContextLines = core.convertIntegrationFnToClass(INTEGRATION_NAME, contextLinesIntegration)\n\n;\n\nasync function addSourceContext(event, contextLines) {\n // keep a lookup map of which files we've already enqueued to read,\n // so we don't enqueue the same file multiple times which would cause multiple i/o reads\n const enqueuedReadSourceFileTasks = {};\n const readSourceFileTasks = [];\n\n if (contextLines > 0 && _optionalChain([event, 'access', _2 => _2.exception, 'optionalAccess', _3 => _3.values])) {\n for (const exception of event.exception.values) {\n if (!_optionalChain([exception, 'access', _4 => _4.stacktrace, 'optionalAccess', _5 => _5.frames])) {\n continue;\n }\n\n // We want to iterate in reverse order as calling cache.get will bump the file in our LRU cache.\n // This ends up prioritizes source context for frames at the top of the stack instead of the bottom.\n for (let i = exception.stacktrace.frames.length - 1; i >= 0; i--) {\n const frame = exception.stacktrace.frames[i];\n // Call cache.get to bump the file to the top of the cache and ensure we have not already\n // enqueued a read operation for this filename\n if (frame.filename && !enqueuedReadSourceFileTasks[frame.filename] && !FILE_CONTENT_CACHE.get(frame.filename)) {\n readSourceFileTasks.push(_readSourceFile(frame.filename));\n enqueuedReadSourceFileTasks[frame.filename] = 1;\n }\n }\n }\n }\n\n // check if files to read > 0, if so, await all of them to be read before adding source contexts.\n // Normally, Promise.all here could be short circuited if one of the promises rejects, but we\n // are guarding from that by wrapping the i/o read operation in a try/catch.\n if (readSourceFileTasks.length > 0) {\n await Promise.all(readSourceFileTasks);\n }\n\n // Perform the same loop as above, but this time we can assume all files are in the cache\n // and attempt to add source context to frames.\n if (contextLines > 0 && _optionalChain([event, 'access', _6 => _6.exception, 'optionalAccess', _7 => _7.values])) {\n for (const exception of event.exception.values) {\n if (exception.stacktrace && exception.stacktrace.frames) {\n await addSourceContextToFrames(exception.stacktrace.frames, contextLines);\n }\n }\n }\n\n return event;\n}\n\n/** Adds context lines to frames */\nfunction addSourceContextToFrames(frames, contextLines) {\n for (const frame of frames) {\n // Only add context if we have a filename and it hasn't already been added\n if (frame.filename && frame.context_line === undefined) {\n const sourceFileLines = FILE_CONTENT_CACHE.get(frame.filename);\n\n if (sourceFileLines) {\n try {\n utils.addContextToFrame(sourceFileLines, frame, contextLines);\n } catch (e) {\n // anomaly, being defensive in case\n // unlikely to ever happen in practice but can definitely happen in theory\n }\n }\n }\n }\n}\n\n// eslint-disable-next-line deprecation/deprecation\n\n/**\n * Reads file contents and caches them in a global LRU cache.\n * If reading fails, mark the file as null in the cache so we don't try again.\n *\n * @param filename filepath to read content from.\n */\nasync function _readSourceFile(filename) {\n const cachedFile = FILE_CONTENT_CACHE.get(filename);\n\n // We have already attempted to read this file and failed, do not try again\n if (cachedFile === null) {\n return null;\n }\n\n // We have a cache hit, return it\n if (cachedFile !== undefined) {\n return cachedFile;\n }\n\n // Guard from throwing if readFile fails, this enables us to use Promise.all and\n // not have it short circuiting if one of the promises rejects + since context lines are added\n // on a best effort basis, we want to throw here anyways.\n\n // If we made it to here, it means that our file is not cache nor marked as failed, so attempt to read it\n let content = null;\n try {\n const rawFileContents = await readTextFileAsync(filename);\n content = rawFileContents.split('\\n');\n } catch (_) {\n // if we fail, we will mark the file as null in the cache and short circuit next time we try to read it\n }\n\n FILE_CONTENT_CACHE.set(filename, content);\n return content;\n}\n\nexports.ContextLines = ContextLines;\nexports.contextLinesIntegration = contextLinesIntegration;\n//# sourceMappingURL=contextlines.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\n\nfunction isResponseObject(response) {\n return response && (response ).statusCode !== undefined;\n}\n\nfunction isBoomObject(response) {\n return response && (response ).isBoom !== undefined;\n}\n\nfunction isErrorEvent(event) {\n return event && (event ).error !== undefined;\n}\n\nfunction sendErrorToSentry(errorData) {\n core.captureException(errorData, {\n mechanism: {\n type: 'hapi',\n handled: false,\n data: {\n function: 'hapiErrorPlugin',\n },\n },\n });\n}\n\nconst hapiErrorPlugin = {\n name: 'SentryHapiErrorPlugin',\n version: core.SDK_VERSION,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register: async function (serverArg) {\n const server = serverArg ;\n\n server.events.on('request', (request, event) => {\n // eslint-disable-next-line deprecation/deprecation\n const transaction = core.getActiveTransaction();\n\n if (request.response && isBoomObject(request.response)) {\n sendErrorToSentry(request.response);\n } else if (isErrorEvent(event)) {\n sendErrorToSentry(event.error);\n }\n\n if (transaction) {\n transaction.setStatus('internal_error');\n transaction.end();\n }\n });\n },\n};\n\nconst hapiTracingPlugin = {\n name: 'SentryHapiTracingPlugin',\n version: core.SDK_VERSION,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register: async function (serverArg) {\n const server = serverArg ;\n\n server.ext('onPreHandler', (request, h) => {\n const transaction = core.continueTrace(\n {\n sentryTrace: request.headers['sentry-trace'] || undefined,\n baggage: request.headers['baggage'] || undefined,\n },\n transactionContext => {\n // eslint-disable-next-line deprecation/deprecation\n return core.startTransaction({\n ...transactionContext,\n op: 'hapi.request',\n name: request.route.path,\n description: `${request.route.method} ${request.path}`,\n });\n },\n );\n\n // eslint-disable-next-line deprecation/deprecation\n core.getCurrentScope().setSpan(transaction);\n\n return h.continue;\n });\n\n server.ext('onPreResponse', (request, h) => {\n // eslint-disable-next-line deprecation/deprecation\n const transaction = core.getActiveTransaction();\n\n if (request.response && isResponseObject(request.response) && transaction) {\n const response = request.response ;\n response.header('sentry-trace', core.spanToTraceHeader(transaction));\n\n const dynamicSamplingContext = utils.dynamicSamplingContextToSentryBaggageHeader(\n core.getDynamicSamplingContextFromSpan(transaction),\n );\n\n if (dynamicSamplingContext) {\n response.header('baggage', dynamicSamplingContext);\n }\n }\n\n return h.continue;\n });\n\n server.ext('onPostHandler', (request, h) => {\n // eslint-disable-next-line deprecation/deprecation\n const transaction = core.getActiveTransaction();\n\n if (transaction) {\n if (request.response && isResponseObject(request.response)) {\n core.setHttpStatus(transaction, request.response.statusCode);\n }\n\n transaction.end();\n }\n\n return h.continue;\n });\n },\n};\n\nconst INTEGRATION_NAME = 'Hapi';\n\nconst _hapiIntegration = ((options = {}) => {\n const server = options.server ;\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n if (!server) {\n return;\n }\n\n utils.fill(server, 'start', (originalStart) => {\n return async function () {\n await this.register(hapiTracingPlugin);\n await this.register(hapiErrorPlugin);\n const result = originalStart.apply(this);\n return result;\n };\n });\n },\n };\n}) ;\n\nconst hapiIntegration = core.defineIntegration(_hapiIntegration);\n\n/**\n * Hapi Framework Integration.\n * @deprecated Use `hapiIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Hapi = core.convertIntegrationFnToClass(INTEGRATION_NAME, hapiIntegration);\n\n// eslint-disable-next-line deprecation/deprecation\n\nexports.Hapi = Hapi;\nexports.hapiErrorPlugin = hapiErrorPlugin;\nexports.hapiIntegration = hapiIntegration;\nexports.hapiTracingPlugin = hapiTracingPlugin;\n//# sourceMappingURL=index.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\nconst nodeVersion = require('../nodeVersion.js');\nconst http = require('./utils/http.js');\n\nconst _httpIntegration = ((options = {}) => {\n const { breadcrumbs, tracing, shouldCreateSpanForRequest } = options;\n\n const convertedOptions = {\n breadcrumbs,\n tracing:\n tracing === false\n ? false\n : utils.dropUndefinedKeys({\n // If tracing is forced to `true`, we don't want to set `enableIfHasTracingEnabled`\n enableIfHasTracingEnabled: tracing === true ? undefined : true,\n shouldCreateSpanForRequest,\n }),\n };\n\n // eslint-disable-next-line deprecation/deprecation\n return new Http(convertedOptions) ;\n}) ;\n\n/**\n * The http module integration instruments Node's internal http module. It creates breadcrumbs, spans for outgoing\n * http requests, and attaches trace data when tracing is enabled via its `tracing` option.\n *\n * By default, this will always create breadcrumbs, and will create spans if tracing is enabled.\n */\nconst httpIntegration = core.defineIntegration(_httpIntegration);\n\n/**\n * The http module integration instruments Node's internal http module. It creates breadcrumbs, transactions for outgoing\n * http requests and attaches trace data when tracing is enabled via its `tracing` option.\n *\n * @deprecated Use `httpIntegration()` instead.\n */\nclass Http {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Http';}\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n __init() {this.name = Http.id;}\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {Http.prototype.__init.call(this);\n this._breadcrumbs = typeof options.breadcrumbs === 'undefined' ? true : options.breadcrumbs;\n this._tracing = !options.tracing ? undefined : options.tracing === true ? {} : options.tracing;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(\n _addGlobalEventProcessor,\n setupOnceGetCurrentHub,\n ) {\n // eslint-disable-next-line deprecation/deprecation\n const clientOptions = _optionalChain([setupOnceGetCurrentHub, 'call', _ => _(), 'access', _2 => _2.getClient, 'call', _3 => _3(), 'optionalAccess', _4 => _4.getOptions, 'call', _5 => _5()]);\n\n // If `tracing` is not explicitly set, we default this based on whether or not tracing is enabled.\n // But for compatibility, we only do that if `enableIfHasTracingEnabled` is set.\n const shouldCreateSpans = _shouldCreateSpans(this._tracing, clientOptions);\n\n // No need to instrument if we don't want to track anything\n if (!this._breadcrumbs && !shouldCreateSpans) {\n return;\n }\n\n // Do not auto-instrument for other instrumenter\n if (clientOptions && clientOptions.instrumenter !== 'sentry') {\n debugBuild.DEBUG_BUILD && utils.logger.log('HTTP Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const shouldCreateSpanForRequest = _getShouldCreateSpanForRequest(shouldCreateSpans, this._tracing, clientOptions);\n\n // eslint-disable-next-line deprecation/deprecation\n const tracePropagationTargets = _optionalChain([clientOptions, 'optionalAccess', _6 => _6.tracePropagationTargets]) || _optionalChain([this, 'access', _7 => _7._tracing, 'optionalAccess', _8 => _8.tracePropagationTargets]);\n\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const httpModule = require('http');\n const wrappedHttpHandlerMaker = _createWrappedRequestMethodFactory(\n httpModule,\n this._breadcrumbs,\n shouldCreateSpanForRequest,\n tracePropagationTargets,\n );\n utils.fill(httpModule, 'get', wrappedHttpHandlerMaker);\n utils.fill(httpModule, 'request', wrappedHttpHandlerMaker);\n\n // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it.\n // If we do, we'd get double breadcrumbs and double spans for `https` calls.\n // It has been changed in Node 9, so for all versions equal and above, we patch `https` separately.\n if (nodeVersion.NODE_VERSION.major > 8) {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const httpsModule = require('https');\n const wrappedHttpsHandlerMaker = _createWrappedRequestMethodFactory(\n httpsModule,\n this._breadcrumbs,\n shouldCreateSpanForRequest,\n tracePropagationTargets,\n );\n utils.fill(httpsModule, 'get', wrappedHttpsHandlerMaker);\n utils.fill(httpsModule, 'request', wrappedHttpsHandlerMaker);\n }\n }\n}Http.__initStatic();\n\n// for ease of reading below\n\n/**\n * Function which creates a function which creates wrapped versions of internal `request` and `get` calls within `http`\n * and `https` modules. (NB: Not a typo - this is a creator^2!)\n *\n * @param breadcrumbsEnabled Whether or not to record outgoing requests as breadcrumbs\n * @param tracingEnabled Whether or not to record outgoing requests as tracing spans\n *\n * @returns A function which accepts the exiting handler and returns a wrapped handler\n */\nfunction _createWrappedRequestMethodFactory(\n httpModule,\n breadcrumbsEnabled,\n shouldCreateSpanForRequest,\n tracePropagationTargets,\n) {\n // We're caching results so we don't have to recompute regexp every time we create a request.\n const createSpanUrlMap = new utils.LRUMap(100);\n const headersUrlMap = new utils.LRUMap(100);\n\n const shouldCreateSpan = (url) => {\n if (shouldCreateSpanForRequest === undefined) {\n return true;\n }\n\n const cachedDecision = createSpanUrlMap.get(url);\n if (cachedDecision !== undefined) {\n return cachedDecision;\n }\n\n const decision = shouldCreateSpanForRequest(url);\n createSpanUrlMap.set(url, decision);\n return decision;\n };\n\n const shouldAttachTraceData = (url) => {\n if (tracePropagationTargets === undefined) {\n return true;\n }\n\n const cachedDecision = headersUrlMap.get(url);\n if (cachedDecision !== undefined) {\n return cachedDecision;\n }\n\n const decision = utils.stringMatchesSomePattern(url, tracePropagationTargets);\n headersUrlMap.set(url, decision);\n return decision;\n };\n\n /**\n * Captures Breadcrumb based on provided request/response pair\n */\n function addRequestBreadcrumb(\n event,\n requestSpanData,\n req,\n res,\n ) {\n // eslint-disable-next-line deprecation/deprecation\n if (!core.getCurrentHub().getIntegration(Http)) {\n return;\n }\n\n core.addBreadcrumb(\n {\n category: 'http',\n data: {\n status_code: res && res.statusCode,\n ...requestSpanData,\n },\n type: 'http',\n },\n {\n event,\n request: req,\n response: res,\n },\n );\n }\n\n return function wrappedRequestMethodFactory(originalRequestMethod) {\n return function wrappedMethod( ...args) {\n const requestArgs = http.normalizeRequestArgs(httpModule, args);\n const requestOptions = requestArgs[0];\n // eslint-disable-next-line deprecation/deprecation\n const rawRequestUrl = http.extractRawUrl(requestOptions);\n const requestUrl = http.extractUrl(requestOptions);\n const client = core.getClient();\n\n // we don't want to record requests to Sentry as either breadcrumbs or spans, so just use the original method\n if (core.isSentryRequestUrl(requestUrl, client)) {\n return originalRequestMethod.apply(httpModule, requestArgs);\n }\n\n const scope = core.getCurrentScope();\n const isolationScope = core.getIsolationScope();\n const parentSpan = core.getActiveSpan();\n\n const data = getRequestSpanData(requestUrl, requestOptions);\n\n const requestSpan = shouldCreateSpan(rawRequestUrl)\n ? // eslint-disable-next-line deprecation/deprecation\n _optionalChain([parentSpan, 'optionalAccess', _9 => _9.startChild, 'call', _10 => _10({\n op: 'http.client',\n origin: 'auto.http.node.http',\n description: `${data['http.method']} ${data.url}`,\n data,\n })])\n : undefined;\n\n if (client && shouldAttachTraceData(rawRequestUrl)) {\n const { traceId, spanId, sampled, dsc } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n const sentryTraceHeader = requestSpan\n ? core.spanToTraceHeader(requestSpan)\n : utils.generateSentryTraceHeader(traceId, spanId, sampled);\n\n const sentryBaggageHeader = utils.dynamicSamplingContextToSentryBaggageHeader(\n dsc ||\n (requestSpan\n ? core.getDynamicSamplingContextFromSpan(requestSpan)\n : core.getDynamicSamplingContextFromClient(traceId, client, scope)),\n );\n\n addHeadersToRequestOptions(requestOptions, requestUrl, sentryTraceHeader, sentryBaggageHeader);\n } else {\n debugBuild.DEBUG_BUILD &&\n utils.logger.log(\n `[Tracing] Not adding sentry-trace header to outgoing request (${requestUrl}) due to mismatching tracePropagationTargets option.`,\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalRequestMethod\n .apply(httpModule, requestArgs)\n .once('response', function ( res) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const req = this;\n if (breadcrumbsEnabled) {\n addRequestBreadcrumb('response', data, req, res);\n }\n if (requestSpan) {\n if (res.statusCode) {\n core.setHttpStatus(requestSpan, res.statusCode);\n }\n requestSpan.updateName(\n http.cleanSpanDescription(core.spanToJSON(requestSpan).description || '', requestOptions, req) || '',\n );\n requestSpan.end();\n }\n })\n .once('error', function () {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const req = this;\n\n if (breadcrumbsEnabled) {\n addRequestBreadcrumb('error', data, req);\n }\n if (requestSpan) {\n core.setHttpStatus(requestSpan, 500);\n requestSpan.updateName(\n http.cleanSpanDescription(core.spanToJSON(requestSpan).description || '', requestOptions, req) || '',\n );\n requestSpan.end();\n }\n });\n };\n };\n}\n\nfunction addHeadersToRequestOptions(\n requestOptions,\n requestUrl,\n sentryTraceHeader,\n sentryBaggageHeader,\n) {\n // Don't overwrite sentry-trace and baggage header if it's already set.\n const headers = requestOptions.headers || {};\n if (headers['sentry-trace']) {\n return;\n }\n\n debugBuild.DEBUG_BUILD &&\n utils.logger.log(`[Tracing] Adding sentry-trace header ${sentryTraceHeader} to outgoing request to \"${requestUrl}\": `);\n\n requestOptions.headers = {\n ...requestOptions.headers,\n 'sentry-trace': sentryTraceHeader,\n // Setting a header to `undefined` will crash in node so we only set the baggage header when it's defined\n ...(sentryBaggageHeader &&\n sentryBaggageHeader.length > 0 && { baggage: normalizeBaggageHeader(requestOptions, sentryBaggageHeader) }),\n };\n}\n\nfunction getRequestSpanData(requestUrl, requestOptions) {\n const method = requestOptions.method || 'GET';\n const data = {\n url: requestUrl,\n 'http.method': method,\n };\n if (requestOptions.hash) {\n // strip leading \"#\"\n data['http.fragment'] = requestOptions.hash.substring(1);\n }\n if (requestOptions.search) {\n // strip leading \"?\"\n data['http.query'] = requestOptions.search.substring(1);\n }\n return data;\n}\n\nfunction normalizeBaggageHeader(\n requestOptions,\n sentryBaggageHeader,\n) {\n if (!requestOptions.headers || !requestOptions.headers.baggage) {\n return sentryBaggageHeader;\n } else if (!sentryBaggageHeader) {\n return requestOptions.headers.baggage ;\n } else if (Array.isArray(requestOptions.headers.baggage)) {\n return [...requestOptions.headers.baggage, sentryBaggageHeader];\n }\n // Type-cast explanation:\n // Technically this the following could be of type `(number | string)[]` but for the sake of simplicity\n // we say this is undefined behaviour, since it would not be baggage spec conform if the user did this.\n return [requestOptions.headers.baggage, sentryBaggageHeader] ;\n}\n\n/** Exported for tests only. */\nfunction _shouldCreateSpans(\n tracingOptions,\n clientOptions,\n) {\n return tracingOptions === undefined\n ? false\n : tracingOptions.enableIfHasTracingEnabled\n ? core.hasTracingEnabled(clientOptions)\n : true;\n}\n\n/** Exported for tests only. */\nfunction _getShouldCreateSpanForRequest(\n shouldCreateSpans,\n tracingOptions,\n clientOptions,\n) {\n const handler = shouldCreateSpans\n ? // eslint-disable-next-line deprecation/deprecation\n _optionalChain([tracingOptions, 'optionalAccess', _11 => _11.shouldCreateSpanForRequest]) || _optionalChain([clientOptions, 'optionalAccess', _12 => _12.shouldCreateSpanForRequest])\n : () => false;\n\n return handler;\n}\n\nexports.Http = Http;\nexports._getShouldCreateSpanForRequest = _getShouldCreateSpanForRequest;\nexports._shouldCreateSpans = _shouldCreateSpans;\nexports.httpIntegration = httpIntegration;\n//# sourceMappingURL=http.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst console = require('./console.js');\nconst http = require('./http.js');\nconst onuncaughtexception = require('./onuncaughtexception.js');\nconst onunhandledrejection = require('./onunhandledrejection.js');\nconst modules = require('./modules.js');\nconst contextlines = require('./contextlines.js');\nconst context = require('./context.js');\nconst core = require('@sentry/core');\nconst index = require('./local-variables/index.js');\nconst index$1 = require('./undici/index.js');\nconst spotlight = require('./spotlight.js');\nconst index$2 = require('./anr/index.js');\nconst index$3 = require('./hapi/index.js');\n\n/* eslint-disable deprecation/deprecation */\n\nexports.Console = console.Console;\nexports.Http = http.Http;\nexports.OnUncaughtException = onuncaughtexception.OnUncaughtException;\nexports.OnUnhandledRejection = onunhandledrejection.OnUnhandledRejection;\nexports.Modules = modules.Modules;\nexports.ContextLines = contextlines.ContextLines;\nexports.Context = context.Context;\nexports.RequestData = core.RequestData;\nexports.LocalVariables = index.LocalVariables;\nexports.Undici = index$1.Undici;\nexports.Spotlight = spotlight.Spotlight;\nexports.Anr = index$2.Anr;\nexports.Hapi = index$3.Hapi;\n//# sourceMappingURL=index.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Creates a rate limiter that will call the disable callback when the rate limit is reached and the enable callback\n * when a timeout has occurred.\n * @param maxPerSecond Maximum number of calls per second\n * @param enable Callback to enable capture\n * @param disable Callback to disable capture\n * @returns A function to call to increment the rate limiter count\n */\nfunction createRateLimiter(\n maxPerSecond,\n enable,\n disable,\n) {\n let count = 0;\n let retrySeconds = 5;\n let disabledTimeout = 0;\n\n setInterval(() => {\n if (disabledTimeout === 0) {\n if (count > maxPerSecond) {\n retrySeconds *= 2;\n disable(retrySeconds);\n\n // Cap at one day\n if (retrySeconds > 86400) {\n retrySeconds = 86400;\n }\n disabledTimeout = retrySeconds;\n }\n } else {\n disabledTimeout -= 1;\n\n if (disabledTimeout === 0) {\n enable();\n }\n }\n\n count = 0;\n }, 1000).unref();\n\n return () => {\n count += 1;\n };\n}\n\n// Add types for the exception event data\n\n/** Could this be an anonymous function? */\nfunction isAnonymous(name) {\n return name !== undefined && (name.length === 0 || name === '?' || name === '');\n}\n\n/** Do the function names appear to match? */\nfunction functionNamesMatch(a, b) {\n return a === b || (isAnonymous(a) && isAnonymous(b));\n}\n\n/** Creates a unique hash from stack frames */\nfunction hashFrames(frames) {\n if (frames === undefined) {\n return;\n }\n\n // Only hash the 10 most recent frames (ie. the last 10)\n return frames.slice(-10).reduce((acc, frame) => `${acc},${frame.function},${frame.lineno},${frame.colno}`, '');\n}\n\n/**\n * We use the stack parser to create a unique hash from the exception stack trace\n * This is used to lookup vars when the exception passes through the event processor\n */\nfunction hashFromStack(stackParser, stack) {\n if (stack === undefined) {\n return undefined;\n }\n\n return hashFrames(stackParser(stack, 1));\n}\n\nexports.createRateLimiter = createRateLimiter;\nexports.functionNamesMatch = functionNamesMatch;\nexports.hashFrames = hashFrames;\nexports.hashFromStack = hashFromStack;\nexports.isAnonymous = isAnonymous;\n//# sourceMappingURL=common.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst localVariablesSync = require('./local-variables-sync.js');\n\n/**\n * Adds local variables to exception frames.\n *\n * @deprecated Use `localVariablesIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst LocalVariables = localVariablesSync.LocalVariablesSync;\n// eslint-disable-next-line deprecation/deprecation\n\nconst localVariablesIntegration = localVariablesSync.localVariablesSyncIntegration;\n\nexports.LocalVariables = LocalVariables;\nexports.localVariablesIntegration = localVariablesIntegration;\n//# sourceMappingURL=index.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst nodeVersion = require('../../nodeVersion.js');\nconst common = require('./common.js');\n\n/* eslint-disable max-lines */\n\n/** Creates a container for callbacks to be called sequentially */\nfunction createCallbackList(complete) {\n // A collection of callbacks to be executed last to first\n let callbacks = [];\n\n let completedCalled = false;\n function checkedComplete(result) {\n callbacks = [];\n if (completedCalled) {\n return;\n }\n completedCalled = true;\n complete(result);\n }\n\n // complete should be called last\n callbacks.push(checkedComplete);\n\n function add(fn) {\n callbacks.push(fn);\n }\n\n function next(result) {\n const popped = callbacks.pop() || checkedComplete;\n\n try {\n popped(result);\n } catch (_) {\n // If there is an error, we still want to call the complete callback\n checkedComplete(result);\n }\n }\n\n return { add, next };\n}\n\n/**\n * Promise API is available as `Experimental` and in Node 19 only.\n *\n * Callback-based API is `Stable` since v14 and `Experimental` since v8.\n * Because of that, we are creating our own `AsyncSession` class.\n *\n * https://nodejs.org/docs/latest-v19.x/api/inspector.html#promises-api\n * https://nodejs.org/docs/latest-v14.x/api/inspector.html\n */\nclass AsyncSession {\n\n /** Throws if inspector API is not available */\n constructor() {\n /*\n TODO: We really should get rid of this require statement below for a couple of reasons:\n 1. It makes the integration unusable in the SvelteKit SDK, as it's not possible to use `require`\n in SvelteKit server code (at least not by default).\n 2. Throwing in a constructor is bad practice\n\n More context for a future attempt to fix this:\n We already tried replacing it with import but didn't get it to work because of async problems.\n We still called import in the constructor but assigned to a promise which we \"awaited\" in\n `configureAndConnect`. However, this broke the Node integration tests as no local variables\n were reported any more. We probably missed a place where we need to await the promise, too.\n */\n\n // Node can be built without inspector support so this can throw\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { Session } = require('inspector');\n this._session = new Session();\n }\n\n /** @inheritdoc */\n configureAndConnect(onPause, captureAll) {\n this._session.connect();\n\n this._session.on('Debugger.paused', event => {\n onPause(event, () => {\n // After the pause work is complete, resume execution or the exception context memory is leaked\n this._session.post('Debugger.resume');\n });\n });\n\n this._session.post('Debugger.enable');\n this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });\n }\n\n setPauseOnExceptions(captureAll) {\n this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });\n }\n\n /** @inheritdoc */\n getLocalVariables(objectId, complete) {\n this._getProperties(objectId, props => {\n const { add, next } = createCallbackList(complete);\n\n for (const prop of props) {\n if (_optionalChain([prop, 'optionalAccess', _2 => _2.value, 'optionalAccess', _3 => _3.objectId]) && _optionalChain([prop, 'optionalAccess', _4 => _4.value, 'access', _5 => _5.className]) === 'Array') {\n const id = prop.value.objectId;\n add(vars => this._unrollArray(id, prop.name, vars, next));\n } else if (_optionalChain([prop, 'optionalAccess', _6 => _6.value, 'optionalAccess', _7 => _7.objectId]) && _optionalChain([prop, 'optionalAccess', _8 => _8.value, 'optionalAccess', _9 => _9.className]) === 'Object') {\n const id = prop.value.objectId;\n add(vars => this._unrollObject(id, prop.name, vars, next));\n } else if (_optionalChain([prop, 'optionalAccess', _10 => _10.value, 'optionalAccess', _11 => _11.value]) || _optionalChain([prop, 'optionalAccess', _12 => _12.value, 'optionalAccess', _13 => _13.description])) {\n add(vars => this._unrollOther(prop, vars, next));\n }\n }\n\n next({});\n });\n }\n\n /**\n * Gets all the PropertyDescriptors of an object\n */\n _getProperties(objectId, next) {\n this._session.post(\n 'Runtime.getProperties',\n {\n objectId,\n ownProperties: true,\n },\n (err, params) => {\n if (err) {\n next([]);\n } else {\n next(params.result);\n }\n },\n );\n }\n\n /**\n * Unrolls an array property\n */\n _unrollArray(objectId, name, vars, next) {\n this._getProperties(objectId, props => {\n vars[name] = props\n .filter(v => v.name !== 'length' && !isNaN(parseInt(v.name, 10)))\n .sort((a, b) => parseInt(a.name, 10) - parseInt(b.name, 10))\n .map(v => _optionalChain([v, 'optionalAccess', _14 => _14.value, 'optionalAccess', _15 => _15.value]));\n\n next(vars);\n });\n }\n\n /**\n * Unrolls an object property\n */\n _unrollObject(objectId, name, vars, next) {\n this._getProperties(objectId, props => {\n vars[name] = props\n .map(v => [v.name, _optionalChain([v, 'optionalAccess', _16 => _16.value, 'optionalAccess', _17 => _17.value])])\n .reduce((obj, [key, val]) => {\n obj[key] = val;\n return obj;\n }, {} );\n\n next(vars);\n });\n }\n\n /**\n * Unrolls other properties\n */\n _unrollOther(prop, vars, next) {\n if (_optionalChain([prop, 'optionalAccess', _18 => _18.value, 'optionalAccess', _19 => _19.value])) {\n vars[prop.name] = prop.value.value;\n } else if (_optionalChain([prop, 'optionalAccess', _20 => _20.value, 'optionalAccess', _21 => _21.description]) && _optionalChain([prop, 'optionalAccess', _22 => _22.value, 'optionalAccess', _23 => _23.type]) !== 'function') {\n vars[prop.name] = `<${prop.value.description}>`;\n }\n\n next(vars);\n }\n}\n\n/**\n * When using Vercel pkg, the inspector module is not available.\n * https://github.com/getsentry/sentry-javascript/issues/6769\n */\nfunction tryNewAsyncSession() {\n try {\n return new AsyncSession();\n } catch (e) {\n return undefined;\n }\n}\n\nconst INTEGRATION_NAME = 'LocalVariables';\n\n/**\n * Adds local variables to exception frames\n */\nconst _localVariablesSyncIntegration = ((\n options = {},\n session = tryNewAsyncSession(),\n) => {\n const cachedFrames = new utils.LRUMap(20);\n let rateLimiter;\n let shouldProcessEvent = false;\n\n function handlePaused(\n stackParser,\n { params: { reason, data, callFrames } },\n complete,\n ) {\n if (reason !== 'exception' && reason !== 'promiseRejection') {\n complete();\n return;\n }\n\n _optionalChain([rateLimiter, 'optionalCall', _24 => _24()]);\n\n // data.description contains the original error.stack\n const exceptionHash = common.hashFromStack(stackParser, _optionalChain([data, 'optionalAccess', _25 => _25.description]));\n\n if (exceptionHash == undefined) {\n complete();\n return;\n }\n\n const { add, next } = createCallbackList(frames => {\n cachedFrames.set(exceptionHash, frames);\n complete();\n });\n\n // Because we're queuing up and making all these calls synchronously, we can potentially overflow the stack\n // For this reason we only attempt to get local variables for the first 5 frames\n for (let i = 0; i < Math.min(callFrames.length, 5); i++) {\n const { scopeChain, functionName, this: obj } = callFrames[i];\n\n const localScope = scopeChain.find(scope => scope.type === 'local');\n\n // obj.className is undefined in ESM modules\n const fn = obj.className === 'global' || !obj.className ? functionName : `${obj.className}.${functionName}`;\n\n if (_optionalChain([localScope, 'optionalAccess', _26 => _26.object, 'access', _27 => _27.objectId]) === undefined) {\n add(frames => {\n frames[i] = { function: fn };\n next(frames);\n });\n } else {\n const id = localScope.object.objectId;\n add(frames =>\n _optionalChain([session, 'optionalAccess', _28 => _28.getLocalVariables, 'call', _29 => _29(id, vars => {\n frames[i] = { function: fn, vars };\n next(frames);\n })]),\n );\n }\n }\n\n next([]);\n }\n\n function addLocalVariablesToException(exception) {\n const hash = common.hashFrames(_optionalChain([exception, 'optionalAccess', _30 => _30.stacktrace, 'optionalAccess', _31 => _31.frames]));\n\n if (hash === undefined) {\n return;\n }\n\n // Check if we have local variables for an exception that matches the hash\n // remove is identical to get but also removes the entry from the cache\n const cachedFrame = cachedFrames.remove(hash);\n\n if (cachedFrame === undefined) {\n return;\n }\n\n const frameCount = _optionalChain([exception, 'access', _32 => _32.stacktrace, 'optionalAccess', _33 => _33.frames, 'optionalAccess', _34 => _34.length]) || 0;\n\n for (let i = 0; i < frameCount; i++) {\n // Sentry frames are in reverse order\n const frameIndex = frameCount - i - 1;\n\n // Drop out if we run out of frames to match up\n if (!_optionalChain([exception, 'optionalAccess', _35 => _35.stacktrace, 'optionalAccess', _36 => _36.frames, 'optionalAccess', _37 => _37[frameIndex]]) || !cachedFrame[i]) {\n break;\n }\n\n if (\n // We need to have vars to add\n cachedFrame[i].vars === undefined ||\n // We're not interested in frames that are not in_app because the vars are not relevant\n exception.stacktrace.frames[frameIndex].in_app === false ||\n // The function names need to match\n !common.functionNamesMatch(exception.stacktrace.frames[frameIndex].function, cachedFrame[i].function)\n ) {\n continue;\n }\n\n exception.stacktrace.frames[frameIndex].vars = cachedFrame[i].vars;\n }\n }\n\n function addLocalVariablesToEvent(event) {\n for (const exception of _optionalChain([event, 'optionalAccess', _38 => _38.exception, 'optionalAccess', _39 => _39.values]) || []) {\n addLocalVariablesToException(exception);\n }\n\n return event;\n }\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const client = core.getClient();\n const clientOptions = _optionalChain([client, 'optionalAccess', _40 => _40.getOptions, 'call', _41 => _41()]);\n\n if (session && _optionalChain([clientOptions, 'optionalAccess', _42 => _42.includeLocalVariables])) {\n // Only setup this integration if the Node version is >= v18\n // https://github.com/getsentry/sentry-javascript/issues/7697\n const unsupportedNodeVersion = nodeVersion.NODE_VERSION.major < 18;\n\n if (unsupportedNodeVersion) {\n utils.logger.log('The `LocalVariables` integration is only supported on Node >= v18.');\n return;\n }\n\n const captureAll = options.captureAllExceptions !== false;\n\n session.configureAndConnect(\n (ev, complete) =>\n handlePaused(clientOptions.stackParser, ev , complete),\n captureAll,\n );\n\n if (captureAll) {\n const max = options.maxExceptionsPerSecond || 50;\n\n rateLimiter = common.createRateLimiter(\n max,\n () => {\n utils.logger.log('Local variables rate-limit lifted.');\n _optionalChain([session, 'optionalAccess', _43 => _43.setPauseOnExceptions, 'call', _44 => _44(true)]);\n },\n seconds => {\n utils.logger.log(\n `Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.`,\n );\n _optionalChain([session, 'optionalAccess', _45 => _45.setPauseOnExceptions, 'call', _46 => _46(false)]);\n },\n );\n }\n\n shouldProcessEvent = true;\n }\n },\n processEvent(event) {\n if (shouldProcessEvent) {\n return addLocalVariablesToEvent(event);\n }\n\n return event;\n },\n // These are entirely for testing\n _getCachedFramesCount() {\n return cachedFrames.size;\n },\n _getFirstCachedFrame() {\n return cachedFrames.values()[0];\n },\n };\n}) ;\n\nconst localVariablesSyncIntegration = core.defineIntegration(_localVariablesSyncIntegration);\n\n/**\n * Adds local variables to exception frames.\n * @deprecated Use `localVariablesSyncIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst LocalVariablesSync = core.convertIntegrationFnToClass(\n INTEGRATION_NAME,\n localVariablesSyncIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nexports.LocalVariablesSync = LocalVariablesSync;\nexports.createCallbackList = createCallbackList;\nexports.localVariablesSyncIntegration = localVariablesSyncIntegration;\n//# sourceMappingURL=local-variables-sync.js.map\n",null,"Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../debug-build.js');\nconst errorhandling = require('./utils/errorhandling.js');\n\nconst INTEGRATION_NAME = 'OnUncaughtException';\n\nconst _onUncaughtExceptionIntegration = ((options = {}) => {\n const _options = {\n exitEvenIfOtherHandlersAreRegistered: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n global.process.on('uncaughtException', makeErrorHandler(client, _options));\n },\n };\n}) ;\n\nconst onUncaughtExceptionIntegration = core.defineIntegration(_onUncaughtExceptionIntegration);\n\n/**\n * Global Exception handler.\n * @deprecated Use `onUncaughtExceptionIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst OnUncaughtException = core.convertIntegrationFnToClass(\n INTEGRATION_NAME,\n onUncaughtExceptionIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\n/** Exported only for tests */\nfunction makeErrorHandler(client, options) {\n const timeout = 2000;\n let caughtFirstError = false;\n let caughtSecondError = false;\n let calledFatalError = false;\n let firstError;\n\n const clientOptions = client.getOptions();\n\n return Object.assign(\n (error) => {\n let onFatalError = errorhandling.logAndExitProcess;\n\n if (options.onFatalError) {\n onFatalError = options.onFatalError;\n } else if (clientOptions.onFatalError) {\n onFatalError = clientOptions.onFatalError ;\n }\n\n // Attaching a listener to `uncaughtException` will prevent the node process from exiting. We generally do not\n // want to alter this behaviour so we check for other listeners that users may have attached themselves and adjust\n // exit behaviour of the SDK accordingly:\n // - If other listeners are attached, do not exit.\n // - If the only listener attached is ours, exit.\n const userProvidedListenersCount = (\n global.process.listeners('uncaughtException')\n ).reduce((acc, listener) => {\n if (\n // There are 3 listeners we ignore:\n listener.name === 'domainUncaughtExceptionClear' || // as soon as we're using domains this listener is attached by node itself\n (listener.tag && listener.tag === 'sentry_tracingErrorCallback') || // the handler we register for tracing\n (listener )._errorHandler // the handler we register in this integration\n ) {\n return acc;\n } else {\n return acc + 1;\n }\n }, 0);\n\n const processWouldExit = userProvidedListenersCount === 0;\n const shouldApplyFatalHandlingLogic = options.exitEvenIfOtherHandlersAreRegistered || processWouldExit;\n\n if (!caughtFirstError) {\n // this is the first uncaught error and the ultimate reason for shutting down\n // we want to do absolutely everything possible to ensure it gets captured\n // also we want to make sure we don't go recursion crazy if more errors happen after this one\n firstError = error;\n caughtFirstError = true;\n\n if (core.getClient() === client) {\n core.captureException(error, {\n originalException: error,\n captureContext: {\n level: 'fatal',\n },\n mechanism: {\n handled: false,\n type: 'onuncaughtexception',\n },\n });\n }\n\n if (!calledFatalError && shouldApplyFatalHandlingLogic) {\n calledFatalError = true;\n onFatalError(error);\n }\n } else {\n if (shouldApplyFatalHandlingLogic) {\n if (calledFatalError) {\n // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down\n debugBuild.DEBUG_BUILD &&\n utils.logger.warn(\n 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown',\n );\n errorhandling.logAndExitProcess(error);\n } else if (!caughtSecondError) {\n // two cases for how we can hit this branch:\n // - capturing of first error blew up and we just caught the exception from that\n // - quit trying to capture, proceed with shutdown\n // - a second independent error happened while waiting for first error to capture\n // - want to avoid causing premature shutdown before first error capture finishes\n // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff\n // so let's instead just delay a bit before we proceed with our action here\n // in case 1, we just wait a bit unnecessarily but ultimately do the same thing\n // in case 2, the delay hopefully made us wait long enough for the capture to finish\n // two potential nonideal outcomes:\n // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError\n // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error\n // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError)\n // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish\n caughtSecondError = true;\n setTimeout(() => {\n if (!calledFatalError) {\n // it was probably case 1, let's treat err as the sendErr and call onFatalError\n calledFatalError = true;\n onFatalError(firstError, error);\n }\n }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc\n }\n }\n }\n },\n { _errorHandler: true },\n );\n}\n\nexports.OnUncaughtException = OnUncaughtException;\nexports.makeErrorHandler = makeErrorHandler;\nexports.onUncaughtExceptionIntegration = onUncaughtExceptionIntegration;\n//# sourceMappingURL=onuncaughtexception.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst errorhandling = require('./utils/errorhandling.js');\n\nconst INTEGRATION_NAME = 'OnUnhandledRejection';\n\nconst _onUnhandledRejectionIntegration = ((options = {}) => {\n const mode = options.mode || 'warn';\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n global.process.on('unhandledRejection', makeUnhandledPromiseHandler(client, { mode }));\n },\n };\n}) ;\n\nconst onUnhandledRejectionIntegration = core.defineIntegration(_onUnhandledRejectionIntegration);\n\n/**\n * Global Promise Rejection handler.\n * @deprecated Use `onUnhandledRejectionIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst OnUnhandledRejection = core.convertIntegrationFnToClass(\n INTEGRATION_NAME,\n onUnhandledRejectionIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\n/**\n * Send an exception with reason\n * @param reason string\n * @param promise promise\n *\n * Exported only for tests.\n */\nfunction makeUnhandledPromiseHandler(\n client,\n options,\n) {\n return function sendUnhandledPromise(reason, promise) {\n if (core.getClient() !== client) {\n return;\n }\n\n core.captureException(reason, {\n originalException: promise,\n captureContext: {\n extra: { unhandledPromiseRejection: true },\n },\n mechanism: {\n handled: false,\n type: 'onunhandledrejection',\n },\n });\n\n handleRejection(reason, options);\n };\n}\n\n/**\n * Handler for `mode` option\n\n */\nfunction handleRejection(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n reason,\n options,\n) {\n // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240\n const rejectionWarning =\n 'This error originated either by ' +\n 'throwing inside of an async function without a catch block, ' +\n 'or by rejecting a promise which was not handled with .catch().' +\n ' The promise rejected with the reason:';\n\n /* eslint-disable no-console */\n if (options.mode === 'warn') {\n utils.consoleSandbox(() => {\n console.warn(rejectionWarning);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n console.error(reason && reason.stack ? reason.stack : reason);\n });\n } else if (options.mode === 'strict') {\n utils.consoleSandbox(() => {\n console.warn(rejectionWarning);\n });\n errorhandling.logAndExitProcess(reason);\n }\n /* eslint-enable no-console */\n}\n\nexports.OnUnhandledRejection = OnUnhandledRejection;\nexports.makeUnhandledPromiseHandler = makeUnhandledPromiseHandler;\nexports.onUnhandledRejectionIntegration = onUnhandledRejectionIntegration;\n//# sourceMappingURL=onunhandledrejection.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst http = require('http');\nconst url = require('url');\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\n\nconst INTEGRATION_NAME = 'Spotlight';\n\nconst _spotlightIntegration = ((options = {}) => {\n const _options = {\n sidecarUrl: options.sidecarUrl || 'http://localhost:8969/stream',\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n if (typeof process === 'object' && process.env && process.env.NODE_ENV !== 'development') {\n utils.logger.warn(\"[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?\");\n }\n connectToSpotlight(client, _options);\n },\n };\n}) ;\n\nconst spotlightIntegration = core.defineIntegration(_spotlightIntegration);\n\n/**\n * Use this integration to send errors and transactions to Spotlight.\n *\n * Learn more about spotlight at https://spotlightjs.com\n *\n * Important: This integration only works with Node 18 or newer.\n *\n * @deprecated Use `spotlightIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Spotlight = core.convertIntegrationFnToClass(INTEGRATION_NAME, spotlightIntegration)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nfunction connectToSpotlight(client, options) {\n const spotlightUrl = parseSidecarUrl(options.sidecarUrl);\n if (!spotlightUrl) {\n return;\n }\n\n let failedRequests = 0;\n\n if (typeof client.on !== 'function') {\n utils.logger.warn('[Spotlight] Cannot connect to spotlight due to missing method on SDK client (`client.on`)');\n return;\n }\n\n client.on('beforeEnvelope', (envelope) => {\n if (failedRequests > 3) {\n utils.logger.warn('[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests');\n return;\n }\n\n const serializedEnvelope = utils.serializeEnvelope(envelope);\n\n const request = getNativeHttpRequest();\n const req = request(\n {\n method: 'POST',\n path: spotlightUrl.pathname,\n hostname: spotlightUrl.hostname,\n port: spotlightUrl.port,\n headers: {\n 'Content-Type': 'application/x-sentry-envelope',\n },\n },\n res => {\n res.on('data', () => {\n // Drain socket\n });\n\n res.on('end', () => {\n // Drain socket\n });\n res.setEncoding('utf8');\n },\n );\n\n req.on('error', () => {\n failedRequests++;\n utils.logger.warn('[Spotlight] Failed to send envelope to Spotlight Sidecar');\n });\n req.write(serializedEnvelope);\n req.end();\n });\n}\n\nfunction parseSidecarUrl(url$1) {\n try {\n return new url.URL(`${url$1}`);\n } catch (e) {\n utils.logger.warn(`[Spotlight] Invalid sidecar URL: ${url$1}`);\n return undefined;\n }\n}\n\n/**\n * We want to get an unpatched http request implementation to avoid capturing our own calls.\n */\nfunction getNativeHttpRequest() {\n const { request } = http;\n if (isWrapped(request)) {\n return request.__sentry_original__;\n }\n\n return request;\n}\n\nfunction isWrapped(impl) {\n return '__sentry_original__' in impl;\n}\n\nexports.Spotlight = Spotlight;\nexports.getNativeHttpRequest = getNativeHttpRequest;\nexports.spotlightIntegration = spotlightIntegration;\n//# sourceMappingURL=spotlight.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst nodeVersion = require('../../nodeVersion.js');\n\nexports.ChannelName = void 0;(function (ChannelName) {\n // https://github.com/nodejs/undici/blob/e6fc80f809d1217814c044f52ed40ef13f21e43c/docs/api/DiagnosticsChannel.md#undicirequestcreate\n const RequestCreate = 'undici:request:create'; ChannelName[\"RequestCreate\"] = RequestCreate;\n const RequestEnd = 'undici:request:headers'; ChannelName[\"RequestEnd\"] = RequestEnd;\n const RequestError = 'undici:request:error'; ChannelName[\"RequestError\"] = RequestError;\n})(exports.ChannelName || (exports.ChannelName = {}));\n\n// Please note that you cannot use `console.log` to debug the callbacks registered to the `diagnostics_channel` API.\n// To debug, you can use `writeFileSync` to write to a file:\n// https://nodejs.org/api/async_hooks.html#printing-in-asynchook-callbacks\n//\n// import { writeFileSync } from 'fs';\n// import { format } from 'util';\n//\n// function debug(...args: any): void {\n// // Use a function like this one when debugging inside an AsyncHook callback\n// // @ts-expect-error any\n// writeFileSync('log.out', `${format(...args)}\\n`, { flag: 'a' });\n// }\n\nconst _nativeNodeFetchintegration = ((options) => {\n // eslint-disable-next-line deprecation/deprecation\n return new Undici(options) ;\n}) ;\n\nconst nativeNodeFetchintegration = core.defineIntegration(_nativeNodeFetchintegration);\n\n/**\n * Instruments outgoing HTTP requests made with the `undici` package via\n * Node's `diagnostics_channel` API.\n *\n * Supports Undici 4.7.0 or higher.\n *\n * Requires Node 16.17.0 or higher.\n *\n * @deprecated Use `nativeNodeFetchintegration()` instead.\n */\nclass Undici {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Undici';}\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n __init() {this.name = Undici.id;}\n\n __init2() {this._createSpanUrlMap = new utils.LRUMap(100);}\n __init3() {this._headersUrlMap = new utils.LRUMap(100);}\n\n constructor(_options = {}) {Undici.prototype.__init.call(this);Undici.prototype.__init2.call(this);Undici.prototype.__init3.call(this);Undici.prototype.__init4.call(this);Undici.prototype.__init5.call(this);Undici.prototype.__init6.call(this);\n this._options = {\n breadcrumbs: _options.breadcrumbs === undefined ? true : _options.breadcrumbs,\n tracing: _options.tracing,\n shouldCreateSpanForRequest: _options.shouldCreateSpanForRequest,\n };\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_addGlobalEventProcessor) {\n // Requires Node 16+ to use the diagnostics_channel API.\n if (nodeVersion.NODE_VERSION.major < 16) {\n return;\n }\n\n let ds;\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n ds = require('diagnostics_channel') ;\n } catch (e) {\n // no-op\n }\n\n if (!ds || !ds.subscribe) {\n return;\n }\n\n // https://github.com/nodejs/undici/blob/e6fc80f809d1217814c044f52ed40ef13f21e43c/docs/api/DiagnosticsChannel.md\n ds.subscribe(exports.ChannelName.RequestCreate, this._onRequestCreate);\n ds.subscribe(exports.ChannelName.RequestEnd, this._onRequestEnd);\n ds.subscribe(exports.ChannelName.RequestError, this._onRequestError);\n }\n\n /** Helper that wraps shouldCreateSpanForRequest option */\n _shouldCreateSpan(url) {\n if (this._options.tracing === false || (this._options.tracing === undefined && !core.hasTracingEnabled())) {\n return false;\n }\n\n if (this._options.shouldCreateSpanForRequest === undefined) {\n return true;\n }\n\n const cachedDecision = this._createSpanUrlMap.get(url);\n if (cachedDecision !== undefined) {\n return cachedDecision;\n }\n\n const decision = this._options.shouldCreateSpanForRequest(url);\n this._createSpanUrlMap.set(url, decision);\n return decision;\n }\n\n __init4() {this._onRequestCreate = (message) => {\n // eslint-disable-next-line deprecation/deprecation\n if (!_optionalChain([core.getClient, 'call', _10 => _10(), 'optionalAccess', _11 => _11.getIntegration, 'call', _12 => _12(Undici)])) {\n return;\n }\n\n const { request } = message ;\n\n const stringUrl = request.origin ? request.origin.toString() + request.path : request.path;\n\n const client = core.getClient();\n if (!client) {\n return;\n }\n\n if (core.isSentryRequestUrl(stringUrl, client) || request.__sentry_span__ !== undefined) {\n return;\n }\n\n const clientOptions = client.getOptions();\n const scope = core.getCurrentScope();\n const isolationScope = core.getIsolationScope();\n const parentSpan = core.getActiveSpan();\n\n const span = this._shouldCreateSpan(stringUrl) ? createRequestSpan(parentSpan, request, stringUrl) : undefined;\n if (span) {\n request.__sentry_span__ = span;\n }\n\n const shouldAttachTraceData = (url) => {\n if (clientOptions.tracePropagationTargets === undefined) {\n return true;\n }\n\n const cachedDecision = this._headersUrlMap.get(url);\n if (cachedDecision !== undefined) {\n return cachedDecision;\n }\n\n const decision = utils.stringMatchesSomePattern(url, clientOptions.tracePropagationTargets);\n this._headersUrlMap.set(url, decision);\n return decision;\n };\n\n if (shouldAttachTraceData(stringUrl)) {\n const { traceId, spanId, sampled, dsc } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n const sentryTraceHeader = span ? core.spanToTraceHeader(span) : utils.generateSentryTraceHeader(traceId, spanId, sampled);\n\n const sentryBaggageHeader = utils.dynamicSamplingContextToSentryBaggageHeader(\n dsc ||\n (span\n ? core.getDynamicSamplingContextFromSpan(span)\n : core.getDynamicSamplingContextFromClient(traceId, client, scope)),\n );\n\n setHeadersOnRequest(request, sentryTraceHeader, sentryBaggageHeader);\n }\n };}\n\n __init5() {this._onRequestEnd = (message) => {\n // eslint-disable-next-line deprecation/deprecation\n if (!_optionalChain([core.getClient, 'call', _13 => _13(), 'optionalAccess', _14 => _14.getIntegration, 'call', _15 => _15(Undici)])) {\n return;\n }\n\n const { request, response } = message ;\n\n const stringUrl = request.origin ? request.origin.toString() + request.path : request.path;\n\n if (core.isSentryRequestUrl(stringUrl, core.getClient())) {\n return;\n }\n\n const span = request.__sentry_span__;\n if (span) {\n core.setHttpStatus(span, response.statusCode);\n span.end();\n }\n\n if (this._options.breadcrumbs) {\n core.addBreadcrumb(\n {\n category: 'http',\n data: {\n method: request.method,\n status_code: response.statusCode,\n url: stringUrl,\n },\n type: 'http',\n },\n {\n event: 'response',\n request,\n response,\n },\n );\n }\n };}\n\n __init6() {this._onRequestError = (message) => {\n // eslint-disable-next-line deprecation/deprecation\n if (!_optionalChain([core.getClient, 'call', _16 => _16(), 'optionalAccess', _17 => _17.getIntegration, 'call', _18 => _18(Undici)])) {\n return;\n }\n\n const { request } = message ;\n\n const stringUrl = request.origin ? request.origin.toString() + request.path : request.path;\n\n if (core.isSentryRequestUrl(stringUrl, core.getClient())) {\n return;\n }\n\n const span = request.__sentry_span__;\n if (span) {\n span.setStatus('internal_error');\n span.end();\n }\n\n if (this._options.breadcrumbs) {\n core.addBreadcrumb(\n {\n category: 'http',\n data: {\n method: request.method,\n url: stringUrl,\n },\n level: 'error',\n type: 'http',\n },\n {\n event: 'error',\n request,\n },\n );\n }\n };}\n}Undici.__initStatic();\n\nfunction setHeadersOnRequest(\n request,\n sentryTrace,\n sentryBaggageHeader,\n) {\n let hasSentryHeaders;\n if (Array.isArray(request.headers)) {\n hasSentryHeaders = request.headers.some(headerLine => headerLine === 'sentry-trace');\n } else {\n const headerLines = request.headers.split('\\r\\n');\n hasSentryHeaders = headerLines.some(headerLine => headerLine.startsWith('sentry-trace:'));\n }\n\n if (hasSentryHeaders) {\n return;\n }\n\n request.addHeader('sentry-trace', sentryTrace);\n if (sentryBaggageHeader) {\n request.addHeader('baggage', sentryBaggageHeader);\n }\n}\n\nfunction createRequestSpan(\n activeSpan,\n request,\n stringUrl,\n) {\n const url = utils.parseUrl(stringUrl);\n\n const method = request.method || 'GET';\n const data = {\n 'http.method': method,\n };\n if (url.search) {\n data['http.query'] = url.search;\n }\n if (url.hash) {\n data['http.fragment'] = url.hash;\n }\n // eslint-disable-next-line deprecation/deprecation\n return _optionalChain([activeSpan, 'optionalAccess', _19 => _19.startChild, 'call', _20 => _20({\n op: 'http.client',\n origin: 'auto.http.node.undici',\n description: `${method} ${utils.getSanitizedUrlString(url)}`,\n data,\n })]);\n}\n\nexports.Undici = Undici;\nexports.nativeNodeFetchintegration = nativeNodeFetchintegration;\n//# sourceMappingURL=index.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst debugBuild = require('../../debug-build.js');\n\nconst DEFAULT_SHUTDOWN_TIMEOUT = 2000;\n\n/**\n * @hidden\n */\nfunction logAndExitProcess(error) {\n utils.consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(error);\n });\n\n const client = core.getClient();\n\n if (client === undefined) {\n debugBuild.DEBUG_BUILD && utils.logger.warn('No NodeClient was defined, we are exiting the process now.');\n global.process.exit(1);\n }\n\n const options = client.getOptions();\n const timeout =\n (options && options.shutdownTimeout && options.shutdownTimeout > 0 && options.shutdownTimeout) ||\n DEFAULT_SHUTDOWN_TIMEOUT;\n client.close(timeout).then(\n (result) => {\n if (!result) {\n debugBuild.DEBUG_BUILD && utils.logger.warn('We reached the timeout for emptying the request buffer, still exiting now!');\n }\n global.process.exit(1);\n },\n error => {\n debugBuild.DEBUG_BUILD && utils.logger.error(error);\n },\n );\n}\n\nexports.logAndExitProcess = logAndExitProcess;\n//# sourceMappingURL=errorhandling.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst url = require('url');\nconst nodeVersion = require('../../nodeVersion.js');\n\n/**\n * Assembles a URL that's passed to the users to filter on.\n * It can include raw (potentially PII containing) data, which we'll allow users to access to filter\n * but won't include in spans or breadcrumbs.\n *\n * @param requestOptions RequestOptions object containing the component parts for a URL\n * @returns Fully-formed URL\n */\n// TODO (v8): This function should include auth, query and fragment (it's breaking, so we need to wait for v8)\nfunction extractRawUrl(requestOptions) {\n const { protocol, hostname, port } = parseRequestOptions(requestOptions);\n const path = requestOptions.path ? requestOptions.path : '/';\n return `${protocol}//${hostname}${port}${path}`;\n}\n\n/**\n * Assemble a URL to be used for breadcrumbs and spans.\n *\n * @param requestOptions RequestOptions object containing the component parts for a URL\n * @returns Fully-formed URL\n */\nfunction extractUrl(requestOptions) {\n const { protocol, hostname, port } = parseRequestOptions(requestOptions);\n\n const path = requestOptions.pathname || '/';\n\n // always filter authority, see https://develop.sentry.dev/sdk/data-handling/#structuring-data\n const authority = requestOptions.auth ? redactAuthority(requestOptions.auth) : '';\n\n return `${protocol}//${authority}${hostname}${port}${path}`;\n}\n\nfunction redactAuthority(auth) {\n const [user, password] = auth.split(':');\n return `${user ? '[Filtered]' : ''}:${password ? '[Filtered]' : ''}@`;\n}\n\n/**\n * Handle various edge cases in the span description (for spans representing http(s) requests).\n *\n * @param description current `description` property of the span representing the request\n * @param requestOptions Configuration data for the request\n * @param Request Request object\n *\n * @returns The cleaned description\n */\nfunction cleanSpanDescription(\n description,\n requestOptions,\n request,\n) {\n // nothing to clean\n if (!description) {\n return description;\n }\n\n // eslint-disable-next-line prefer-const\n let [method, requestUrl] = description.split(' ');\n\n // superagent sticks the protocol in a weird place (we check for host because if both host *and* protocol are missing,\n // we're likely dealing with an internal route and this doesn't apply)\n if (requestOptions.host && !requestOptions.protocol) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n requestOptions.protocol = _optionalChain([(request ), 'optionalAccess', _ => _.agent, 'optionalAccess', _2 => _2.protocol]); // worst comes to worst, this is undefined and nothing changes\n // This URL contains the filtered authority ([filtered]:[filtered]@example.com) but no fragment or query params\n requestUrl = extractUrl(requestOptions);\n }\n\n // internal routes can end up starting with a triple slash rather than a single one\n if (_optionalChain([requestUrl, 'optionalAccess', _3 => _3.startsWith, 'call', _4 => _4('///')])) {\n requestUrl = requestUrl.slice(2);\n }\n\n return `${method} ${requestUrl}`;\n}\n\n// the node types are missing a few properties which node's `urlToOptions` function spits out\n\n/**\n * Convert a URL object into a RequestOptions object.\n *\n * Copied from Node's internals (where it's used in http(s).request() and http(s).get()), modified only to use the\n * RequestOptions type above.\n *\n * See https://github.com/nodejs/node/blob/master/lib/internal/url.js.\n */\nfunction urlToOptions(url) {\n const options = {\n protocol: url.protocol,\n hostname:\n typeof url.hostname === 'string' && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname,\n hash: url.hash,\n search: url.search,\n pathname: url.pathname,\n path: `${url.pathname || ''}${url.search || ''}`,\n href: url.href,\n };\n if (url.port !== '') {\n options.port = Number(url.port);\n }\n if (url.username || url.password) {\n options.auth = `${url.username}:${url.password}`;\n }\n return options;\n}\n\n/**\n * Normalize inputs to `http(s).request()` and `http(s).get()`.\n *\n * Legal inputs to `http(s).request()` and `http(s).get()` can take one of ten forms:\n * [ RequestOptions | string | URL ],\n * [ RequestOptions | string | URL, RequestCallback ],\n * [ string | URL, RequestOptions ], and\n * [ string | URL, RequestOptions, RequestCallback ].\n *\n * This standardizes to one of two forms: [ RequestOptions ] and [ RequestOptions, RequestCallback ]. A similar thing is\n * done as the first step of `http(s).request()` and `http(s).get()`; this just does it early so that we can interact\n * with the args in a standard way.\n *\n * @param requestArgs The inputs to `http(s).request()` or `http(s).get()`, as an array.\n *\n * @returns Equivalent args of the form [ RequestOptions ] or [ RequestOptions, RequestCallback ].\n */\nfunction normalizeRequestArgs(\n httpModule,\n requestArgs,\n) {\n let callback, requestOptions;\n\n // pop off the callback, if there is one\n if (typeof requestArgs[requestArgs.length - 1] === 'function') {\n callback = requestArgs.pop() ;\n }\n\n // create a RequestOptions object of whatever's at index 0\n if (typeof requestArgs[0] === 'string') {\n requestOptions = urlToOptions(new url.URL(requestArgs[0]));\n } else if (requestArgs[0] instanceof url.URL) {\n requestOptions = urlToOptions(requestArgs[0]);\n } else {\n requestOptions = requestArgs[0];\n\n try {\n const parsed = new url.URL(\n requestOptions.path || '',\n `${requestOptions.protocol || 'http:'}//${requestOptions.hostname}`,\n );\n requestOptions = {\n pathname: parsed.pathname,\n search: parsed.search,\n hash: parsed.hash,\n ...requestOptions,\n };\n } catch (e) {\n // ignore\n }\n }\n\n // if the options were given separately from the URL, fold them in\n if (requestArgs.length === 2) {\n requestOptions = { ...requestOptions, ...requestArgs[1] };\n }\n\n // Figure out the protocol if it's currently missing\n if (requestOptions.protocol === undefined) {\n // Worst case we end up populating protocol with undefined, which it already is\n /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any */\n\n // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it.\n // Because of that, we cannot rely on `httpModule` to provide us with valid protocol,\n // as it will always return `http`, even when using `https` module.\n //\n // See test/integrations/http.test.ts for more details on Node <=v8 protocol issue.\n if (nodeVersion.NODE_VERSION.major > 8) {\n requestOptions.protocol =\n _optionalChain([(_optionalChain([httpModule, 'optionalAccess', _5 => _5.globalAgent]) ), 'optionalAccess', _6 => _6.protocol]) ||\n _optionalChain([(requestOptions.agent ), 'optionalAccess', _7 => _7.protocol]) ||\n _optionalChain([(requestOptions._defaultAgent ), 'optionalAccess', _8 => _8.protocol]);\n } else {\n requestOptions.protocol =\n _optionalChain([(requestOptions.agent ), 'optionalAccess', _9 => _9.protocol]) ||\n _optionalChain([(requestOptions._defaultAgent ), 'optionalAccess', _10 => _10.protocol]) ||\n _optionalChain([(_optionalChain([httpModule, 'optionalAccess', _11 => _11.globalAgent]) ), 'optionalAccess', _12 => _12.protocol]);\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any */\n }\n\n // return args in standardized form\n if (callback) {\n return [requestOptions, callback];\n } else {\n return [requestOptions];\n }\n}\n\nfunction parseRequestOptions(requestOptions)\n\n {\n const protocol = requestOptions.protocol || '';\n const hostname = requestOptions.hostname || requestOptions.host || '';\n // Don't log standard :80 (http) and :443 (https) ports to reduce the noise\n // Also don't add port if the hostname already includes a port\n const port =\n !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\\d+)$/.test(hostname)\n ? ''\n : `:${requestOptions.port}`;\n\n return { protocol, hostname, port };\n}\n\nexports.cleanSpanDescription = cleanSpanDescription;\nexports.extractRawUrl = extractRawUrl;\nexports.extractUrl = extractUrl;\nexports.normalizeRequestArgs = normalizeRequestArgs;\nexports.urlToOptions = urlToOptions;\n//# sourceMappingURL=http.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst path = require('path');\nconst utils = require('@sentry/utils');\n\n/** normalizes Windows paths */\nfunction normalizeWindowsPath(path) {\n return path\n .replace(/^[A-Z]:/, '') // remove Windows-style prefix\n .replace(/\\\\/g, '/'); // replace all `\\` instances with `/`\n}\n\n/** Creates a function that gets the module name from a filename */\nfunction createGetModuleFromFilename(\n basePath = process.argv[1] ? utils.dirname(process.argv[1]) : process.cwd(),\n isWindows = path.sep === '\\\\',\n) {\n const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;\n\n return (filename) => {\n if (!filename) {\n return;\n }\n\n const normalizedFilename = isWindows ? normalizeWindowsPath(filename) : filename;\n\n // eslint-disable-next-line prefer-const\n let { dir, base: file, ext } = path.posix.parse(normalizedFilename);\n\n if (ext === '.js' || ext === '.mjs' || ext === '.cjs') {\n file = file.slice(0, ext.length * -1);\n }\n\n if (!dir) {\n // No dirname whatsoever\n dir = '.';\n }\n\n const n = dir.lastIndexOf('/node_modules');\n if (n > -1) {\n return `${dir.slice(n + 14).replace(/\\//g, '.')}:${file}`;\n }\n\n // Let's see if it's a part of the main module\n // To be a part of main module, it has to share the same base\n if (dir.startsWith(normalizedBase)) {\n let moduleName = dir.slice(normalizedBase.length + 1).replace(/\\//g, '.');\n\n if (moduleName) {\n moduleName += ':';\n }\n moduleName += file;\n\n return moduleName;\n }\n\n return file;\n };\n}\n\nexports.createGetModuleFromFilename = createGetModuleFromFilename;\n//# sourceMappingURL=module.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\nconst NODE_VERSION = utils.parseSemver(process.versions.node) ;\n\nexports.NODE_VERSION = NODE_VERSION;\n//# sourceMappingURL=nodeVersion.js.map\n","var {\n _nullishCoalesce\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst http = require('http');\nrequire('https');\n\n/**\n* This code was originally forked from https://github.com/TooTallNate/proxy-agents/tree/b133295fd16f6475578b6b15bd9b4e33ecb0d0b7\n* With the following licence:\n*\n* (The MIT License)\n*\n* Copyright (c) 2013 Nathan Rajlich *\n*\n* Permission is hereby granted, free of charge, to any person obtaining\n* a copy of this software and associated documentation files (the\n* 'Software'), to deal in the Software without restriction, including\n* without limitation the rights to use, copy, modify, merge, publish,\n* distribute, sublicense, and/or sell copies of the Software, and to\n* permit persons to whom the Software is furnished to do so, subject to\n* the following conditions:*\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.*\n*\n* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\nconst INTERNAL = Symbol('AgentBaseInternalState');\n\nclass Agent extends http.Agent {\n\n // Set by `http.Agent` - missing from `@types/node`\n\n constructor(opts) {\n super(opts);\n this[INTERNAL] = {};\n }\n\n /**\n * Determine whether this is an `http` or `https` request.\n */\n isSecureEndpoint(options) {\n if (options) {\n // First check the `secureEndpoint` property explicitly, since this\n // means that a parent `Agent` is \"passing through\" to this instance.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n if (typeof (options ).secureEndpoint === 'boolean') {\n return options.secureEndpoint;\n }\n\n // If no explicit `secure` endpoint, check if `protocol` property is\n // set. This will usually be the case since using a full string URL\n // or `URL` instance should be the most common usage.\n if (typeof options.protocol === 'string') {\n return options.protocol === 'https:';\n }\n }\n\n // Finally, if no `protocol` property was set, then fall back to\n // checking the stack trace of the current call stack, and try to\n // detect the \"https\" module.\n const { stack } = new Error();\n if (typeof stack !== 'string') return false;\n return stack.split('\\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1);\n }\n\n createSocket(req, options, cb) {\n const connectOpts = {\n ...options,\n secureEndpoint: this.isSecureEndpoint(options),\n };\n Promise.resolve()\n .then(() => this.connect(req, connectOpts))\n .then(socket => {\n if (socket instanceof http.Agent) {\n // @ts-expect-error `addRequest()` isn't defined in `@types/node`\n return socket.addRequest(req, connectOpts);\n }\n this[INTERNAL].currentSocket = socket;\n // @ts-expect-error `createSocket()` isn't defined in `@types/node`\n super.createSocket(req, options, cb);\n }, cb);\n }\n\n createConnection() {\n const socket = this[INTERNAL].currentSocket;\n this[INTERNAL].currentSocket = undefined;\n if (!socket) {\n throw new Error('No socket was returned in the `connect()` function');\n }\n return socket;\n }\n\n get defaultPort() {\n return _nullishCoalesce(this[INTERNAL].defaultPort, () => ( (this.protocol === 'https:' ? 443 : 80)));\n }\n\n set defaultPort(v) {\n if (this[INTERNAL]) {\n this[INTERNAL].defaultPort = v;\n }\n }\n\n get protocol() {\n return _nullishCoalesce(this[INTERNAL].protocol, () => ( (this.isSecureEndpoint() ? 'https:' : 'http:')));\n }\n\n set protocol(v) {\n if (this[INTERNAL]) {\n this[INTERNAL].protocol = v;\n }\n }\n}\n\nexports.Agent = Agent;\n//# sourceMappingURL=base.js.map\n","var {\n _nullishCoalesce,\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst assert = require('assert');\nconst net = require('net');\nconst tls = require('tls');\nconst url = require('url');\nconst utils = require('@sentry/utils');\nconst base = require('./base.js');\nconst parseProxyResponse = require('./parse-proxy-response.js');\n\n/**\n* This code was originally forked from https://github.com/TooTallNate/proxy-agents/tree/b133295fd16f6475578b6b15bd9b4e33ecb0d0b7\n* With the following licence:\n*\n* (The MIT License)\n*\n* Copyright (c) 2013 Nathan Rajlich *\n*\n* Permission is hereby granted, free of charge, to any person obtaining\n* a copy of this software and associated documentation files (the\n* 'Software'), to deal in the Software without restriction, including\n* without limitation the rights to use, copy, modify, merge, publish,\n* distribute, sublicense, and/or sell copies of the Software, and to\n* permit persons to whom the Software is furnished to do so, subject to\n* the following conditions:*\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.*\n*\n* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\nfunction debug(...args) {\n utils.logger.log('[https-proxy-agent]', ...args);\n}\n\n/**\n * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to\n * the specified \"HTTP(s) proxy server\" in order to proxy HTTPS requests.\n *\n * Outgoing HTTP requests are first tunneled through the proxy server using the\n * `CONNECT` HTTP request method to establish a connection to the proxy server,\n * and then the proxy server connects to the destination target and issues the\n * HTTP request from the proxy server.\n *\n * `https:` requests have their socket connection upgraded to TLS once\n * the connection to the proxy server has been established.\n */\nclass HttpsProxyAgent extends base.Agent {\n static __initStatic() {this.protocols = ['http', 'https']; }\n\n constructor(proxy, opts) {\n super(opts);\n this.options = {};\n this.proxy = typeof proxy === 'string' ? new url.URL(proxy) : proxy;\n this.proxyHeaders = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _2 => _2.headers]), () => ( {}));\n debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href);\n\n // Trim off the brackets from IPv6 addresses\n const host = (this.proxy.hostname || this.proxy.host).replace(/^\\[|\\]$/g, '');\n const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === 'https:' ? 443 : 80;\n this.connectOpts = {\n // Attempt to negotiate http/1.1 for proxy servers that support http/2\n ALPNProtocols: ['http/1.1'],\n ...(opts ? omit(opts, 'headers') : null),\n host,\n port,\n };\n }\n\n /**\n * Called when the node-core HTTP client library is creating a\n * new HTTP request.\n */\n async connect(req, opts) {\n const { proxy } = this;\n\n if (!opts.host) {\n throw new TypeError('No \"host\" provided');\n }\n\n // Create a socket connection to the proxy server.\n let socket;\n if (proxy.protocol === 'https:') {\n debug('Creating `tls.Socket`: %o', this.connectOpts);\n const servername = this.connectOpts.servername || this.connectOpts.host;\n socket = tls.connect({\n ...this.connectOpts,\n servername: servername && net.isIP(servername) ? undefined : servername,\n });\n } else {\n debug('Creating `net.Socket`: %o', this.connectOpts);\n socket = net.connect(this.connectOpts);\n }\n\n const headers =\n typeof this.proxyHeaders === 'function' ? this.proxyHeaders() : { ...this.proxyHeaders };\n const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;\n let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\\r\\n`;\n\n // Inject the `Proxy-Authorization` header if necessary.\n if (proxy.username || proxy.password) {\n const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;\n headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`;\n }\n\n headers.Host = `${host}:${opts.port}`;\n\n if (!headers['Proxy-Connection']) {\n headers['Proxy-Connection'] = this.keepAlive ? 'Keep-Alive' : 'close';\n }\n for (const name of Object.keys(headers)) {\n payload += `${name}: ${headers[name]}\\r\\n`;\n }\n\n const proxyResponsePromise = parseProxyResponse.parseProxyResponse(socket);\n\n socket.write(`${payload}\\r\\n`);\n\n const { connect, buffered } = await proxyResponsePromise;\n req.emit('proxyConnect', connect);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore Not EventEmitter in Node types\n this.emit('proxyConnect', connect, req);\n\n if (connect.statusCode === 200) {\n req.once('socket', resume);\n\n if (opts.secureEndpoint) {\n // The proxy is connecting to a TLS server, so upgrade\n // this socket connection to a TLS connection.\n debug('Upgrading socket connection to TLS');\n const servername = opts.servername || opts.host;\n return tls.connect({\n ...omit(opts, 'host', 'path', 'port'),\n socket,\n servername: net.isIP(servername) ? undefined : servername,\n });\n }\n\n return socket;\n }\n\n // Some other status code that's not 200... need to re-play the HTTP\n // header \"data\" events onto the socket once the HTTP machinery is\n // attached so that the node core `http` can parse and handle the\n // error status code.\n\n // Close the original socket, and a new \"fake\" socket is returned\n // instead, so that the proxy doesn't get the HTTP request\n // written to it (which may contain `Authorization` headers or other\n // sensitive data).\n //\n // See: https://hackerone.com/reports/541502\n socket.destroy();\n\n const fakeSocket = new net.Socket({ writable: false });\n fakeSocket.readable = true;\n\n // Need to wait for the \"socket\" event to re-play the \"data\" events.\n req.once('socket', (s) => {\n debug('Replaying proxy buffer for failed request');\n assert.default(s.listenerCount('data') > 0);\n\n // Replay the \"buffered\" Buffer onto the fake `socket`, since at\n // this point the HTTP module machinery has been hooked up for\n // the user.\n s.push(buffered);\n s.push(null);\n });\n\n return fakeSocket;\n }\n}HttpsProxyAgent.__initStatic();\n\nfunction resume(socket) {\n socket.resume();\n}\n\nfunction omit(\n obj,\n ...keys\n)\n\n {\n const ret = {}\n\n;\n let key;\n for (key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\n\nexports.HttpsProxyAgent = HttpsProxyAgent;\n//# sourceMappingURL=index.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\nfunction debug(...args) {\n utils.logger.log('[https-proxy-agent:parse-proxy-response]', ...args);\n}\n\nfunction parseProxyResponse(socket) {\n return new Promise((resolve, reject) => {\n // we need to buffer any HTTP traffic that happens with the proxy before we get\n // the CONNECT response, so that if the response is anything other than an \"200\"\n // response code, then we can re-play the \"data\" events on the socket once the\n // HTTP parser is hooked up...\n let buffersLength = 0;\n const buffers = [];\n\n function read() {\n const b = socket.read();\n if (b) ondata(b);\n else socket.once('readable', read);\n }\n\n function cleanup() {\n socket.removeListener('end', onend);\n socket.removeListener('error', onerror);\n socket.removeListener('readable', read);\n }\n\n function onend() {\n cleanup();\n debug('onend');\n reject(new Error('Proxy connection ended before receiving CONNECT response'));\n }\n\n function onerror(err) {\n cleanup();\n debug('onerror %o', err);\n reject(err);\n }\n\n function ondata(b) {\n buffers.push(b);\n buffersLength += b.length;\n\n const buffered = Buffer.concat(buffers, buffersLength);\n const endOfHeaders = buffered.indexOf('\\r\\n\\r\\n');\n\n if (endOfHeaders === -1) {\n // keep buffering\n debug('have not received end of HTTP headers yet...');\n read();\n return;\n }\n\n const headerParts = buffered.slice(0, endOfHeaders).toString('ascii').split('\\r\\n');\n const firstLine = headerParts.shift();\n if (!firstLine) {\n socket.destroy();\n return reject(new Error('No header received from proxy CONNECT response'));\n }\n const firstLineParts = firstLine.split(' ');\n const statusCode = +firstLineParts[1];\n const statusText = firstLineParts.slice(2).join(' ');\n const headers = {};\n for (const header of headerParts) {\n if (!header) continue;\n const firstColon = header.indexOf(':');\n if (firstColon === -1) {\n socket.destroy();\n return reject(new Error(`Invalid header from proxy CONNECT response: \"${header}\"`));\n }\n const key = header.slice(0, firstColon).toLowerCase();\n const value = header.slice(firstColon + 1).trimStart();\n const current = headers[key];\n if (typeof current === 'string') {\n headers[key] = [current, value];\n } else if (Array.isArray(current)) {\n current.push(value);\n } else {\n headers[key] = value;\n }\n }\n debug('got proxy server response: %o %o', firstLine, headers);\n cleanup();\n resolve({\n connect: {\n statusCode,\n statusText,\n headers,\n },\n buffered,\n });\n }\n\n socket.on('error', onerror);\n socket.on('end', onend);\n\n read();\n });\n}\n\nexports.parseProxyResponse = parseProxyResponse;\n//# sourceMappingURL=parse-proxy-response.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst utils = require('@sentry/utils');\n\n/**\n * @deprecated `Handlers.ExpressRequest` is deprecated and will be removed in v8. Use `PolymorphicRequest` instead.\n */\n\n/**\n * Normalizes data from the request object, accounting for framework differences.\n *\n * @deprecated `Handlers.extractRequestData` is deprecated and will be removed in v8. Use `extractRequestData` instead.\n *\n * @param req The request object from which to extract data\n * @param keys An optional array of keys to include in the normalized data.\n * @returns An object containing normalized request data\n */\nfunction extractRequestData(req, keys) {\n return utils.extractRequestData(req, { include: keys });\n}\n\n/**\n * Options deciding what parts of the request to use when enhancing an event\n *\n * @deprecated `Handlers.ParseRequestOptions` is deprecated and will be removed in v8. Use\n * `AddRequestDataToEventOptions` in `@sentry/utils` instead.\n */\n\n/**\n * Enriches passed event with request data.\n *\n * @deprecated `Handlers.parseRequest` is deprecated and will be removed in v8. Use `addRequestDataToEvent` instead.\n *\n * @param event Will be mutated and enriched with req data\n * @param req Request object\n * @param options object containing flags to enable functionality\n * @hidden\n */\nfunction parseRequest(event, req, options = {}) {\n return utils.addRequestDataToEvent(event, req, { include: options });\n}\n\nexports.extractRequestData = extractRequestData;\nexports.parseRequest = parseRequest;\n//# sourceMappingURL=requestDataDeprecated.js.map\n","var {\n _optionalChain\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst index$2 = require('./async/index.js');\nconst client = require('./client.js');\nconst console = require('./integrations/console.js');\nconst context = require('./integrations/context.js');\nconst contextlines = require('./integrations/contextlines.js');\nconst http = require('./integrations/http.js');\nconst index$1 = require('./integrations/local-variables/index.js');\nconst modules = require('./integrations/modules.js');\nconst onuncaughtexception = require('./integrations/onuncaughtexception.js');\nconst onunhandledrejection = require('./integrations/onunhandledrejection.js');\nconst spotlight = require('./integrations/spotlight.js');\nconst index = require('./integrations/undici/index.js');\nconst module$1 = require('./module.js');\nconst http$1 = require('./transports/http.js');\n\n/* eslint-disable max-lines */\n\n/** @deprecated Use `getDefaultIntegrations(options)` instead. */\nconst defaultIntegrations = [\n // Common\n core.inboundFiltersIntegration(),\n core.functionToStringIntegration(),\n core.linkedErrorsIntegration(),\n core.requestDataIntegration(),\n // Native Wrappers\n console.consoleIntegration(),\n http.httpIntegration(),\n index.nativeNodeFetchintegration(),\n // Global Handlers\n onuncaughtexception.onUncaughtExceptionIntegration(),\n onunhandledrejection.onUnhandledRejectionIntegration(),\n // Event Info\n contextlines.contextLinesIntegration(),\n index$1.localVariablesIntegration(),\n context.nodeContextIntegration(),\n modules.modulesIntegration(),\n];\n\n/** Get the default integrations for the Node SDK. */\nfunction getDefaultIntegrations(_options) {\n const carrier = core.getMainCarrier();\n\n const autoloadedIntegrations = _optionalChain([carrier, 'access', _ => _.__SENTRY__, 'optionalAccess', _2 => _2.integrations]) || [];\n\n return [\n // eslint-disable-next-line deprecation/deprecation\n ...defaultIntegrations,\n ...autoloadedIntegrations,\n ];\n}\n\n/**\n * The Sentry Node SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible in the\n * main entry module. To set context information or send manual events, use the\n * provided methods.\n *\n * @example\n * ```\n *\n * const { init } = require('@sentry/node');\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * const { configureScope } = require('@sentry/node');\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * const { addBreadcrumb } = require('@sentry/node');\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * const Sentry = require('@sentry/node');\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link NodeOptions} for documentation on configuration options.\n */\n// eslint-disable-next-line complexity\nfunction init(options = {}) {\n index$2.setNodeAsyncContextStrategy();\n\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = getDefaultIntegrations();\n }\n\n if (options.dsn === undefined && process.env.SENTRY_DSN) {\n options.dsn = process.env.SENTRY_DSN;\n }\n\n const sentryTracesSampleRate = process.env.SENTRY_TRACES_SAMPLE_RATE;\n if (options.tracesSampleRate === undefined && sentryTracesSampleRate) {\n const tracesSampleRate = parseFloat(sentryTracesSampleRate);\n if (isFinite(tracesSampleRate)) {\n options.tracesSampleRate = tracesSampleRate;\n }\n }\n\n if (options.release === undefined) {\n const detectedRelease = getSentryRelease();\n if (detectedRelease !== undefined) {\n options.release = detectedRelease;\n } else {\n // If release is not provided, then we should disable autoSessionTracking\n options.autoSessionTracking = false;\n }\n }\n\n if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) {\n options.environment = process.env.SENTRY_ENVIRONMENT;\n }\n\n if (options.autoSessionTracking === undefined && options.dsn !== undefined) {\n options.autoSessionTracking = true;\n }\n\n if (options.instrumenter === undefined) {\n options.instrumenter = 'sentry';\n }\n\n // TODO(v7): Refactor this to reduce the logic above\n const clientOptions = {\n ...options,\n stackParser: utils.stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: core.getIntegrationsToSetup(options),\n transport: options.transport || http$1.makeNodeTransport,\n };\n\n core.initAndBind(options.clientClass || client.NodeClient, clientOptions);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n\n updateScopeFromEnvVariables();\n\n if (options.spotlight) {\n const client = core.getClient();\n if (client && client.addIntegration) {\n // force integrations to be setup even if no DSN was set\n // If they have already been added before, they will be ignored anyhow\n const integrations = client.getOptions().integrations;\n for (const integration of integrations) {\n client.addIntegration(integration);\n }\n client.addIntegration(\n spotlight.spotlightIntegration({ sidecarUrl: typeof options.spotlight === 'string' ? options.spotlight : undefined }),\n );\n }\n }\n}\n\n/**\n * Function that takes an instance of NodeClient and checks if autoSessionTracking option is enabled for that client\n */\nfunction isAutoSessionTrackingEnabled(client) {\n if (client === undefined) {\n return false;\n }\n const clientOptions = client && client.getOptions();\n if (clientOptions && clientOptions.autoSessionTracking !== undefined) {\n return clientOptions.autoSessionTracking;\n }\n return false;\n}\n\n/**\n * Returns a release dynamically from environment variables.\n */\nfunction getSentryRelease(fallback) {\n // Always read first as Sentry takes this as precedence\n if (process.env.SENTRY_RELEASE) {\n return process.env.SENTRY_RELEASE;\n }\n\n // This supports the variable that sentry-webpack-plugin injects\n if (utils.GLOBAL_OBJ.SENTRY_RELEASE && utils.GLOBAL_OBJ.SENTRY_RELEASE.id) {\n return utils.GLOBAL_OBJ.SENTRY_RELEASE.id;\n }\n\n return (\n // GitHub Actions - https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables\n process.env.GITHUB_SHA ||\n // Netlify - https://docs.netlify.com/configure-builds/environment-variables/#build-metadata\n process.env.COMMIT_REF ||\n // Vercel - https://vercel.com/docs/v2/build-step#system-environment-variables\n process.env.VERCEL_GIT_COMMIT_SHA ||\n process.env.VERCEL_GITHUB_COMMIT_SHA ||\n process.env.VERCEL_GITLAB_COMMIT_SHA ||\n process.env.VERCEL_BITBUCKET_COMMIT_SHA ||\n // Zeit (now known as Vercel)\n process.env.ZEIT_GITHUB_COMMIT_SHA ||\n process.env.ZEIT_GITLAB_COMMIT_SHA ||\n process.env.ZEIT_BITBUCKET_COMMIT_SHA ||\n // Cloudflare Pages - https://developers.cloudflare.com/pages/platform/build-configuration/#environment-variables\n process.env.CF_PAGES_COMMIT_SHA ||\n fallback\n );\n}\n\n/** Node.js stack parser */\nconst defaultStackParser = utils.createStackParser(utils.nodeStackLineParser(module$1.createGetModuleFromFilename()));\n\n/**\n * Enable automatic Session Tracking for the node process.\n */\nfunction startSessionTracking() {\n core.startSession();\n // Emitted in the case of healthy sessions, error of `mechanism.handled: true` and unhandledrejections because\n // The 'beforeExit' event is not emitted for conditions causing explicit termination,\n // such as calling process.exit() or uncaught exceptions.\n // Ref: https://nodejs.org/api/process.html#process_event_beforeexit\n process.on('beforeExit', () => {\n const session = core.getIsolationScope().getSession();\n const terminalStates = ['exited', 'crashed'];\n // Only call endSession, if the Session exists on Scope and SessionStatus is not a\n // Terminal Status i.e. Exited or Crashed because\n // \"When a session is moved away from ok it must not be updated anymore.\"\n // Ref: https://develop.sentry.dev/sdk/sessions/\n if (session && !terminalStates.includes(session.status)) {\n core.endSession();\n }\n });\n}\n\n/**\n * Update scope and propagation context based on environmental variables.\n *\n * See https://github.com/getsentry/rfcs/blob/main/text/0071-continue-trace-over-process-boundaries.md\n * for more details.\n */\nfunction updateScopeFromEnvVariables() {\n const sentryUseEnvironment = (process.env.SENTRY_USE_ENVIRONMENT || '').toLowerCase();\n if (!['false', 'n', 'no', 'off', '0'].includes(sentryUseEnvironment)) {\n const sentryTraceEnv = process.env.SENTRY_TRACE;\n const baggageEnv = process.env.SENTRY_BAGGAGE;\n const propagationContext = utils.propagationContextFromHeaders(sentryTraceEnv, baggageEnv);\n core.getCurrentScope().setPropagationContext(propagationContext);\n }\n}\n\nexports.defaultIntegrations = defaultIntegrations;\nexports.defaultStackParser = defaultStackParser;\nexports.getDefaultIntegrations = getDefaultIntegrations;\nexports.getSentryRelease = getSentryRelease;\nexports.init = init;\nexports.isAutoSessionTrackingEnabled = isAutoSessionTrackingEnabled;\n//# sourceMappingURL=sdk.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst tracing = require('@sentry-internal/tracing');\nconst utils = require('@sentry/utils');\n\n/**\n * Automatically detects and returns integrations that will work with your dependencies.\n */\nfunction autoDiscoverNodePerformanceMonitoringIntegrations() {\n const loadedIntegrations = tracing.lazyLoadedNodePerformanceMonitoringIntegrations\n .map(tryLoad => {\n try {\n return tryLoad();\n } catch (_) {\n return undefined;\n }\n })\n .filter(integration => !!integration) ;\n\n if (loadedIntegrations.length === 0) {\n utils.logger.warn('Performance monitoring integrations could not be automatically loaded.');\n }\n\n // Only return integrations where their dependencies loaded successfully.\n return loadedIntegrations.filter(integration => !!integration.loadDependency());\n}\n\nexports.autoDiscoverNodePerformanceMonitoringIntegrations = autoDiscoverNodePerformanceMonitoringIntegrations;\n//# sourceMappingURL=index.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst tracing = require('@sentry-internal/tracing');\n\n\n\nexports.Apollo = tracing.Apollo;\nexports.Express = tracing.Express;\nexports.GraphQL = tracing.GraphQL;\nexports.Mongo = tracing.Mongo;\nexports.Mysql = tracing.Mysql;\nexports.Postgres = tracing.Postgres;\nexports.Prisma = tracing.Prisma;\n//# sourceMappingURL=integrations.js.map\n","var {\n _nullishCoalesce\n} = require('@sentry/utils');\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst http = require('http');\nconst https = require('https');\nconst stream = require('stream');\nconst url = require('url');\nconst zlib = require('zlib');\nconst core = require('@sentry/core');\nconst utils = require('@sentry/utils');\nconst index = require('../proxy/index.js');\n\n// Estimated maximum size for reasonable standalone event\nconst GZIP_THRESHOLD = 1024 * 32;\n\n/**\n * Gets a stream from a Uint8Array or string\n * Readable.from is ideal but was added in node.js v12.3.0 and v10.17.0\n */\nfunction streamFromBody(body) {\n return new stream.Readable({\n read() {\n this.push(body);\n this.push(null);\n },\n });\n}\n\n/**\n * Creates a Transport that uses native the native 'http' and 'https' modules to send events to Sentry.\n */\nfunction makeNodeTransport(options) {\n let urlSegments;\n\n try {\n urlSegments = new url.URL(options.url);\n } catch (e) {\n utils.consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.',\n );\n });\n return core.createTransport(options, () => Promise.resolve({}));\n }\n\n const isHttps = urlSegments.protocol === 'https:';\n\n // Proxy prioritization: http => `options.proxy` | `process.env.http_proxy`\n // Proxy prioritization: https => `options.proxy` | `process.env.https_proxy` | `process.env.http_proxy`\n const proxy = applyNoProxyOption(\n urlSegments,\n options.proxy || (isHttps ? process.env.https_proxy : undefined) || process.env.http_proxy,\n );\n\n const nativeHttpModule = isHttps ? https : http;\n const keepAlive = options.keepAlive === undefined ? false : options.keepAlive;\n\n // TODO(v7): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node\n // versions(>= 8) as they had memory leaks when using it: #2555\n const agent = proxy\n ? (new index.HttpsProxyAgent(proxy) )\n : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2000 });\n\n const requestExecutor = createRequestExecutor(options, _nullishCoalesce(options.httpModule, () => ( nativeHttpModule)), agent);\n return core.createTransport(options, requestExecutor);\n}\n\n/**\n * Honors the `no_proxy` env variable with the highest priority to allow for hosts exclusion.\n *\n * @param transportUrl The URL the transport intends to send events to.\n * @param proxy The client configured proxy.\n * @returns A proxy the transport should use.\n */\nfunction applyNoProxyOption(transportUrlSegments, proxy) {\n const { no_proxy } = process.env;\n\n const urlIsExemptFromProxy =\n no_proxy &&\n no_proxy\n .split(',')\n .some(\n exemption => transportUrlSegments.host.endsWith(exemption) || transportUrlSegments.hostname.endsWith(exemption),\n );\n\n if (urlIsExemptFromProxy) {\n return undefined;\n } else {\n return proxy;\n }\n}\n\n/**\n * Creates a RequestExecutor to be used with `createTransport`.\n */\nfunction createRequestExecutor(\n options,\n httpModule,\n agent,\n) {\n const { hostname, pathname, port, protocol, search } = new url.URL(options.url);\n return function makeRequest(request) {\n return new Promise((resolve, reject) => {\n let body = streamFromBody(request.body);\n\n const headers = { ...options.headers };\n\n if (request.body.length > GZIP_THRESHOLD) {\n headers['content-encoding'] = 'gzip';\n body = body.pipe(zlib.createGzip());\n }\n\n const req = httpModule.request(\n {\n method: 'POST',\n agent,\n headers,\n hostname,\n path: `${pathname}${search}`,\n port,\n protocol,\n ca: options.caCerts,\n },\n res => {\n res.on('data', () => {\n // Drain socket\n });\n\n res.on('end', () => {\n // Drain socket\n });\n\n res.setEncoding('utf8');\n\n // \"Key-value pairs of header names and values. Header names are lower-cased.\"\n // https://nodejs.org/api/http.html#http_message_headers\n const retryAfterHeader = _nullishCoalesce(res.headers['retry-after'], () => ( null));\n const rateLimitsHeader = _nullishCoalesce(res.headers['x-sentry-rate-limits'], () => ( null));\n\n resolve({\n statusCode: res.statusCode,\n headers: {\n 'retry-after': retryAfterHeader,\n 'x-sentry-rate-limits': Array.isArray(rateLimitsHeader) ? rateLimitsHeader[0] : rateLimitsHeader,\n },\n });\n },\n );\n\n req.on('error', reject);\n body.pipe(req);\n });\n };\n}\n\nexports.makeNodeTransport = makeNodeTransport;\n//# sourceMappingURL=http.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst fs = require('fs');\nconst path = require('path');\n\n/**\n * Recursively read the contents of a directory.\n *\n * @param targetDir Absolute or relative path of the directory to scan. All returned paths will be relative to this\n * directory.\n * @returns Array holding all relative paths\n * @deprecated This function will be removed in the next major version.\n */\nfunction deepReadDirSync(targetDir) {\n const targetDirAbsPath = path.resolve(targetDir);\n\n if (!fs.existsSync(targetDirAbsPath)) {\n throw new Error(`Cannot read contents of ${targetDirAbsPath}. Directory does not exist.`);\n }\n\n if (!fs.statSync(targetDirAbsPath).isDirectory()) {\n throw new Error(`Cannot read contents of ${targetDirAbsPath}, because it is not a directory.`);\n }\n\n // This does the same thing as its containing function, `deepReadDirSync` (except that - purely for convenience - it\n // deals in absolute paths rather than relative ones). We need this to be separate from the outer function to preserve\n // the difference between `targetDirAbsPath` and `currentDirAbsPath`.\n const deepReadCurrentDir = (currentDirAbsPath) => {\n return fs.readdirSync(currentDirAbsPath).reduce((absPaths, itemName) => {\n const itemAbsPath = path.join(currentDirAbsPath, itemName);\n\n if (fs.statSync(itemAbsPath).isDirectory()) {\n return absPaths.concat(deepReadCurrentDir(itemAbsPath));\n }\n\n absPaths.push(itemAbsPath);\n return absPaths;\n }, []);\n };\n\n return deepReadCurrentDir(targetDirAbsPath).map(absPath => path.relative(targetDirAbsPath, absPath));\n}\n\nexports.deepReadDirSync = deepReadDirSync;\n//# sourceMappingURL=utils.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst is = require('./is.js');\nconst string = require('./string.js');\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !is.isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (is.isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (is.isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = string.truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexports.applyAggregateErrorsToEvent = applyAggregateErrorsToEvent;\n//# sourceMappingURL=aggregate-errors.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst object = require('./object.js');\nconst nodeStackTrace = require('./node-stack-trace.js');\n\n/**\n * A node.js watchdog timer\n * @param pollInterval The interval that we expect to get polled at\n * @param anrThreshold The threshold for when we consider ANR\n * @param callback The callback to call for ANR\n * @returns An object with `poll` and `enabled` functions {@link WatchdogReturn}\n */\nfunction watchdogTimer(\n createTimer,\n pollInterval,\n anrThreshold,\n callback,\n) {\n const timer = createTimer();\n let triggered = false;\n let enabled = true;\n\n setInterval(() => {\n const diffMs = timer.getTimeMs();\n\n if (triggered === false && diffMs > pollInterval + anrThreshold) {\n triggered = true;\n if (enabled) {\n callback();\n }\n }\n\n if (diffMs < pollInterval + anrThreshold) {\n triggered = false;\n }\n }, 20);\n\n return {\n poll: () => {\n timer.reset();\n },\n enabled: (state) => {\n enabled = state;\n },\n };\n}\n\n// types copied from inspector.d.ts\n\n/**\n * Converts Debugger.CallFrame to Sentry StackFrame\n */\nfunction callFrameToStackFrame(\n frame,\n url,\n getModuleFromFilename,\n) {\n const filename = url ? url.replace(/^file:\\/\\//, '') : undefined;\n\n // CallFrame row/col are 0 based, whereas StackFrame are 1 based\n const colno = frame.location.columnNumber ? frame.location.columnNumber + 1 : undefined;\n const lineno = frame.location.lineNumber ? frame.location.lineNumber + 1 : undefined;\n\n return object.dropUndefinedKeys({\n filename,\n module: getModuleFromFilename(filename),\n function: frame.functionName || '?',\n colno,\n lineno,\n in_app: filename ? nodeStackTrace.filenameIsInApp(filename) : undefined,\n });\n}\n\nexports.callFrameToStackFrame = callFrameToStackFrame;\nexports.watchdogTimer = watchdogTimer;\n//# sourceMappingURL=anr.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst debugBuild = require('./debug-build.js');\nconst is = require('./is.js');\nconst logger = require('./logger.js');\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!is.isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n for (const key of Object.keys(currBaggageObject)) {\n acc[key] = currBaggageObject[key];\n }\n return acc;\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n debugBuild.DEBUG_BUILD &&\n logger.logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexports.BAGGAGE_HEADER_NAME = BAGGAGE_HEADER_NAME;\nexports.MAX_BAGGAGE_STRING_LENGTH = MAX_BAGGAGE_STRING_LENGTH;\nexports.SENTRY_BAGGAGE_KEY_PREFIX = SENTRY_BAGGAGE_KEY_PREFIX;\nexports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = SENTRY_BAGGAGE_KEY_PREFIX_REGEX;\nexports.baggageHeaderToDynamicSamplingContext = baggageHeaderToDynamicSamplingContext;\nexports.dynamicSamplingContextToSentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader;\n//# sourceMappingURL=baggage.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst is = require('./is.js');\nconst worldwide = require('./worldwide.js');\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = worldwide.getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && is.isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` attribute. This attribute is added at build-time\n * by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexports.getComponentName = getComponentName;\nexports.getDomElement = getDomElement;\nexports.getLocationHref = getLocationHref;\nexports.htmlTreeAsString = htmlTreeAsString;\n//# sourceMappingURL=browser.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst _nullishCoalesce = require('./_nullishCoalesce.js');\n\n// https://github.com/alangpierce/sucrase/tree/265887868966917f3b924ce38dfad01fbab1329f\n\n/**\n * Polyfill for the nullish coalescing operator (`??`), when used in situations where at least one of the values is the\n * result of an async operation.\n *\n * Note that the RHS is wrapped in a function so that if it's a computed value, that evaluation won't happen unless the\n * LHS evaluates to a nullish value, to mimic the operator's short-circuiting behavior.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n *\n * @param lhs The value of the expression to the left of the `??`\n * @param rhsFn A function returning the value of the expression to the right of the `??`\n * @returns The LHS value, unless it's `null` or `undefined`, in which case, the RHS value\n */\nasync function _asyncNullishCoalesce(lhs, rhsFn) {\n return _nullishCoalesce._nullishCoalesce(lhs, rhsFn);\n}\n\n// Sucrase version:\n// async function _asyncNullishCoalesce(lhs, rhsFn) {\n// if (lhs != null) {\n// return lhs;\n// } else {\n// return await rhsFn();\n// }\n// }\n\nexports._asyncNullishCoalesce = _asyncNullishCoalesce;\n//# sourceMappingURL=_asyncNullishCoalesce.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions, for situations in which at least one part of the expression is async.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase) See\n * https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */\nasync function _asyncOptionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i] ;\n const fn = ops[i + 1] ;\n i += 2;\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n return;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = await fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = await fn((...args) => (value ).call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n}\n\n// Sucrase version:\n// async function _asyncOptionalChain(ops) {\n// let lastAccessLHS = undefined;\n// let value = ops[0];\n// let i = 1;\n// while (i < ops.length) {\n// const op = ops[i];\n// const fn = ops[i + 1];\n// i += 2;\n// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n// return undefined;\n// }\n// if (op === 'access' || op === 'optionalAccess') {\n// lastAccessLHS = value;\n// value = await fn(value);\n// } else if (op === 'call' || op === 'optionalCall') {\n// value = await fn((...args) => value.call(lastAccessLHS, ...args));\n// lastAccessLHS = undefined;\n// }\n// }\n// return value;\n// }\n\nexports._asyncOptionalChain = _asyncOptionalChain;\n//# sourceMappingURL=_asyncOptionalChain.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst _asyncOptionalChain = require('./_asyncOptionalChain.js');\n\n// https://github.com/alangpierce/sucrase/tree/265887868966917f3b924ce38dfad01fbab1329f\n\n/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions, in cases where the value of the expression is to be deleted.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase) See\n * https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The return value of the `delete` operator: `true`, unless the deletion target is an own, non-configurable\n * property (one which can't be deleted or turned into an accessor, and whose enumerability can't be changed), in which\n * case `false`.\n */\nasync function _asyncOptionalChainDelete(ops) {\n const result = (await _asyncOptionalChain._asyncOptionalChain(ops)) ;\n // If `result` is `null`, it means we didn't get to the end of the chain and so nothing was deleted (in which case,\n // return `true` since that's what `delete` does when it no-ops). If it's non-null, we know the delete happened, in\n // which case we return whatever the `delete` returned, which will be a boolean.\n return result == null ? true : (result );\n}\n\n// Sucrase version:\n// async function asyncOptionalChainDelete(ops) {\n// const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);\n// return result == null ? true : result;\n// }\n\nexports._asyncOptionalChainDelete = _asyncOptionalChainDelete;\n//# sourceMappingURL=_asyncOptionalChainDelete.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n// https://github.com/alangpierce/sucrase/tree/265887868966917f3b924ce38dfad01fbab1329f\n//\n// The MIT License (MIT)\n//\n// Copyright (c) 2012-2018 various contributors (see AUTHORS)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n/**\n * Polyfill for the nullish coalescing operator (`??`).\n *\n * Note that the RHS is wrapped in a function so that if it's a computed value, that evaluation won't happen unless the\n * LHS evaluates to a nullish value, to mimic the operator's short-circuiting behavior.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n *\n * @param lhs The value of the expression to the left of the `??`\n * @param rhsFn A function returning the value of the expression to the right of the `??`\n * @returns The LHS value, unless it's `null` or `undefined`, in which case, the RHS value\n */\nfunction _nullishCoalesce(lhs, rhsFn) {\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n return lhs != null ? lhs : rhsFn();\n}\n\n// Sucrase version:\n// function _nullishCoalesce(lhs, rhsFn) {\n// if (lhs != null) {\n// return lhs;\n// } else {\n// return rhsFn();\n// }\n// }\n\nexports._nullishCoalesce = _nullishCoalesce;\n//# sourceMappingURL=_nullishCoalesce.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */\nfunction _optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i] ;\n const fn = ops[i + 1] ;\n i += 2;\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n return;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args) => (value ).call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n}\n\n// Sucrase version\n// function _optionalChain(ops) {\n// let lastAccessLHS = undefined;\n// let value = ops[0];\n// let i = 1;\n// while (i < ops.length) {\n// const op = ops[i];\n// const fn = ops[i + 1];\n// i += 2;\n// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n// return undefined;\n// }\n// if (op === 'access' || op === 'optionalAccess') {\n// lastAccessLHS = value;\n// value = fn(value);\n// } else if (op === 'call' || op === 'optionalCall') {\n// value = fn((...args) => value.call(lastAccessLHS, ...args));\n// lastAccessLHS = undefined;\n// }\n// }\n// return value;\n// }\n\nexports._optionalChain = _optionalChain;\n//# sourceMappingURL=_optionalChain.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst _optionalChain = require('./_optionalChain.js');\n\n// https://github.com/alangpierce/sucrase/tree/265887868966917f3b924ce38dfad01fbab1329f\n\n/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions, in cases where the value of the expression is to be deleted.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase) See\n * https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The return value of the `delete` operator: `true`, unless the deletion target is an own, non-configurable\n * property (one which can't be deleted or turned into an accessor, and whose enumerability can't be changed), in which\n * case `false`.\n */\nfunction _optionalChainDelete(ops) {\n const result = _optionalChain._optionalChain(ops) ;\n // If `result` is `null`, it means we didn't get to the end of the chain and so nothing was deleted (in which case,\n // return `true` since that's what `delete` does when it no-ops). If it's non-null, we know the delete happened, in\n // which case we return whatever the `delete` returned, which will be a boolean.\n return result == null ? true : result;\n}\n\n// Sucrase version:\n// function _optionalChainDelete(ops) {\n// const result = _optionalChain(ops);\n// // by checking for loose equality to `null`, we catch both `null` and `undefined`\n// return result == null ? true : result;\n// }\n\nexports._optionalChainDelete = _optionalChainDelete;\n//# sourceMappingURL=_optionalChainDelete.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Creates a cache that evicts keys in fifo order\n * @param size {Number}\n */\nfunction makeFifoCache(\n size,\n)\n\n {\n // Maintain a fifo queue of keys, we cannot rely on Object.keys as the browser may not support it.\n let evictionOrder = [];\n let cache = {};\n\n return {\n add(key, value) {\n while (evictionOrder.length >= size) {\n // shift is O(n) but this is small size and only happens if we are\n // exceeding the cache size so it should be fine.\n const evictCandidate = evictionOrder.shift();\n\n if (evictCandidate !== undefined) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete cache[evictCandidate];\n }\n }\n\n // in case we have a collision, delete the old key.\n if (cache[key]) {\n this.delete(key);\n }\n\n evictionOrder.push(key);\n cache[key] = value;\n },\n clear() {\n cache = {};\n evictionOrder = [];\n },\n get(key) {\n return cache[key];\n },\n size() {\n return evictionOrder.length;\n },\n // Delete cache key and return true if it existed, false otherwise.\n delete(key) {\n if (!cache[key]) {\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete cache[key];\n\n for (let i = 0; i < evictionOrder.length; i++) {\n if (evictionOrder[i] === key) {\n evictionOrder.splice(i, 1);\n break;\n }\n }\n\n return true;\n },\n };\n}\n\nexports.makeFifoCache = makeFifoCache;\n//# sourceMappingURL=cache.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst envelope = require('./envelope.js');\nconst time = require('./time.js');\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nfunction createClientReportEnvelope(\n discarded_events,\n dsn,\n timestamp,\n) {\n const clientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || time.dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return envelope.createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n\nexports.createClientReportEnvelope = createClientReportEnvelope;\n//# sourceMappingURL=clientreport.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * This code was originally copied from the 'cookie` module at v0.5.0 and was simplified for our use case.\n * https://github.com/jshttp/cookie/blob/a0c84147aab6266bdb3996cf4062e93907c0b0fc/index.js\n * It had the following license:\n *\n * (The MIT License)\n *\n * Copyright (c) 2012-2014 Roman Shtylman \n * Copyright (c) 2015 Douglas Christopher Wilson \n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * 'Software'), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * Parses a cookie string\n */\nfunction parseCookie(str) {\n const obj = {};\n let index = 0;\n\n while (index < str.length) {\n const eqIdx = str.indexOf('=', index);\n\n // no more cookie pairs\n if (eqIdx === -1) {\n break;\n }\n\n let endIdx = str.indexOf(';', index);\n\n if (endIdx === -1) {\n endIdx = str.length;\n } else if (endIdx < eqIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(';', eqIdx - 1) + 1;\n continue;\n }\n\n const key = str.slice(index, eqIdx).trim();\n\n // only assign once\n if (undefined === obj[key]) {\n let val = str.slice(eqIdx + 1, endIdx).trim();\n\n // quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1);\n }\n\n try {\n obj[key] = val.indexOf('%') !== -1 ? decodeURIComponent(val) : val;\n } catch (e) {\n obj[key] = val;\n }\n }\n\n index = endIdx + 1;\n }\n\n return obj;\n}\n\nexports.parseCookie = parseCookie;\n//# sourceMappingURL=cookie.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexports.DEBUG_BUILD = DEBUG_BUILD;\n//# sourceMappingURL=debug-build.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst debugBuild = require('./debug-build.js');\nconst logger = require('./logger.js');\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n logger.consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn) {\n if (!debugBuild.DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n\nexports.dsnFromString = dsnFromString;\nexports.dsnToString = dsnToString;\nexports.makeDsn = makeDsn;\n//# sourceMappingURL=dsn.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nfunction isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nfunction getSDKSource() {\n // @ts-expect-error \"npm\" is injected by rollup during build process\n return \"npm\";\n}\n\nexports.getSDKSource = getSDKSource;\nexports.isBrowserBundle = isBrowserBundle;\n//# sourceMappingURL=env.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst dsn = require('./dsn.js');\nconst normalize = require('./normalize.js');\nconst object = require('./object.js');\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n return [headers, items] ;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n envelope,\n callback,\n) {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8.\n */\nfunction encodeUTF8(input, textEncoder) {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope, textEncoder) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize.normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(\n env,\n textEncoder,\n textDecoder,\n) {\n let buffer = typeof env === 'string' ? textEncoder.encode(env) : env;\n\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(textDecoder.decode(readBinary(i))) ;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(\n attachment,\n textEncoder,\n) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data;\n\n return [\n object.dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n span: 'span',\n // TODO: This is a temporary workaround until we have a proper data category for metrics\n statsd: 'unknown',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n event,\n sdkInfo,\n tunnel,\n dsn$1,\n) {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id ,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn$1 && { dsn: dsn.dsnToString(dsn$1) }),\n ...(dynamicSamplingContext && {\n trace: object.dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n\nexports.addItemToEnvelope = addItemToEnvelope;\nexports.createAttachmentEnvelopeItem = createAttachmentEnvelopeItem;\nexports.createEnvelope = createEnvelope;\nexports.createEventEnvelopeHeaders = createEventEnvelopeHeaders;\nexports.envelopeContainsItemType = envelopeContainsItemType;\nexports.envelopeItemTypeToDataCategory = envelopeItemTypeToDataCategory;\nexports.forEachEnvelopeItem = forEachEnvelopeItem;\nexports.getSdkMetadataForEnvelopeHeader = getSdkMetadataForEnvelopeHeader;\nexports.parseEnvelope = parseEnvelope;\nexports.serializeEnvelope = serializeEnvelope;\n//# sourceMappingURL=envelope.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/** An error emitted by Sentry SDKs and related utilities. */\nclass SentryError extends Error {\n /** Display name of this error instance. */\n\n constructor( message, logLevel = 'warn') {\n super(message);this.message = message;\n this.name = new.target.prototype.constructor.name;\n // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line\n // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes\n // instances of `SentryError` fail `obj instanceof SentryError` checks.\n Object.setPrototypeOf(this, new.target.prototype);\n this.logLevel = logLevel;\n }\n}\n\nexports.SentryError = SentryError;\n//# sourceMappingURL=error.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst is = require('./is.js');\nconst misc = require('./misc.js');\nconst normalize = require('./normalize.js');\nconst object = require('./object.js');\n\n/**\n * Extracts stack frames from the error.stack string\n */\nfunction parseStackFrames(stackParser, error) {\n return stackParser(error.stack || '', 1);\n}\n\n/**\n * Extracts stack frames from the error and builds a Sentry Exception\n */\nfunction exceptionFromError(stackParser, error) {\n const exception = {\n type: error.name || error.constructor.name,\n value: error.message,\n };\n\n const frames = parseStackFrames(stackParser, error);\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n return exception;\n}\n\nfunction getMessageForObject(exception) {\n if ('name' in exception && typeof exception.name === 'string') {\n let message = `'${exception.name}' captured as exception`;\n\n if ('message' in exception && typeof exception.message === 'string') {\n message += ` with message '${exception.message}'`;\n }\n\n return message;\n } else if ('message' in exception && typeof exception.message === 'string') {\n return exception.message;\n } else {\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n return `Object captured as exception with keys: ${object.extractExceptionKeysForMessage(\n exception ,\n )}`;\n }\n}\n\n/**\n * Builds and Event from a Exception\n *\n * TODO(v8): Remove getHub fallback\n * @hidden\n */\nfunction eventFromUnknownInput(\n getHubOrClient,\n stackParser,\n exception,\n hint,\n) {\n const client =\n typeof getHubOrClient === 'function'\n ? // eslint-disable-next-line deprecation/deprecation\n getHubOrClient().getClient()\n : getHubOrClient;\n\n let ex = exception;\n const providedMechanism =\n hint && hint.data && (hint.data ).mechanism;\n const mechanism = providedMechanism || {\n handled: true,\n type: 'generic',\n };\n\n let extras;\n\n if (!is.isError(exception)) {\n if (is.isPlainObject(exception)) {\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n extras = { ['__serialized__']: normalize.normalizeToSize(exception , normalizeDepth) };\n\n const message = getMessageForObject(exception);\n ex = (hint && hint.syntheticException) || new Error(message);\n (ex ).message = message;\n } else {\n // This handles when someone does: `throw \"something awesome\";`\n // We use synthesized Error here so we can extract a (rough) stack trace.\n ex = (hint && hint.syntheticException) || new Error(exception );\n (ex ).message = exception ;\n }\n mechanism.synthetic = true;\n }\n\n const event = {\n exception: {\n values: [exceptionFromError(stackParser, ex )],\n },\n };\n\n if (extras) {\n event.extra = extras;\n }\n\n misc.addExceptionTypeValue(event, undefined, undefined);\n misc.addExceptionMechanism(event, mechanism);\n\n return {\n ...event,\n event_id: hint && hint.event_id,\n };\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nfunction eventFromMessage(\n stackParser,\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n attachStacktrace,\n) {\n const event = {\n event_id: hint && hint.event_id,\n level,\n };\n\n if (attachStacktrace && hint && hint.syntheticException) {\n const frames = parseStackFrames(stackParser, hint.syntheticException);\n if (frames.length) {\n event.exception = {\n values: [\n {\n value: message,\n stacktrace: { frames },\n },\n ],\n };\n }\n }\n\n if (is.isParameterizedString(message)) {\n const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__,\n };\n return event;\n }\n\n event.message = message;\n return event;\n}\n\nexports.eventFromMessage = eventFromMessage;\nexports.eventFromUnknownInput = eventFromUnknownInput;\nexports.exceptionFromError = exceptionFromError;\nexports.parseStackFrames = parseStackFrames;\n//# sourceMappingURL=eventbuilder.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst aggregateErrors = require('./aggregate-errors.js');\nconst browser = require('./browser.js');\nconst dsn = require('./dsn.js');\nconst error = require('./error.js');\nconst worldwide = require('./worldwide.js');\nconst index = require('./instrument/index.js');\nconst is = require('./is.js');\nconst isBrowser = require('./isBrowser.js');\nconst logger = require('./logger.js');\nconst memo = require('./memo.js');\nconst misc = require('./misc.js');\nconst node = require('./node.js');\nconst normalize = require('./normalize.js');\nconst object = require('./object.js');\nconst path = require('./path.js');\nconst promisebuffer = require('./promisebuffer.js');\nconst requestdata = require('./requestdata.js');\nconst severity = require('./severity.js');\nconst stacktrace = require('./stacktrace.js');\nconst string = require('./string.js');\nconst supports = require('./supports.js');\nconst syncpromise = require('./syncpromise.js');\nconst time = require('./time.js');\nconst tracing = require('./tracing.js');\nconst env = require('./env.js');\nconst envelope = require('./envelope.js');\nconst clientreport = require('./clientreport.js');\nconst ratelimit = require('./ratelimit.js');\nconst baggage = require('./baggage.js');\nconst url = require('./url.js');\nconst userIntegrations = require('./userIntegrations.js');\nconst cache = require('./cache.js');\nconst eventbuilder = require('./eventbuilder.js');\nconst anr = require('./anr.js');\nconst lru = require('./lru.js');\nconst _asyncNullishCoalesce = require('./buildPolyfills/_asyncNullishCoalesce.js');\nconst _asyncOptionalChain = require('./buildPolyfills/_asyncOptionalChain.js');\nconst _asyncOptionalChainDelete = require('./buildPolyfills/_asyncOptionalChainDelete.js');\nconst _nullishCoalesce = require('./buildPolyfills/_nullishCoalesce.js');\nconst _optionalChain = require('./buildPolyfills/_optionalChain.js');\nconst _optionalChainDelete = require('./buildPolyfills/_optionalChainDelete.js');\nconst console = require('./instrument/console.js');\nconst dom = require('./instrument/dom.js');\nconst xhr = require('./instrument/xhr.js');\nconst fetch = require('./instrument/fetch.js');\nconst history = require('./instrument/history.js');\nconst globalError = require('./instrument/globalError.js');\nconst globalUnhandledRejection = require('./instrument/globalUnhandledRejection.js');\nconst _handlers = require('./instrument/_handlers.js');\nconst nodeStackTrace = require('./node-stack-trace.js');\nconst escapeStringForRegex = require('./vendor/escapeStringForRegex.js');\nconst supportsHistory = require('./vendor/supportsHistory.js');\n\n\n\nexports.applyAggregateErrorsToEvent = aggregateErrors.applyAggregateErrorsToEvent;\nexports.getComponentName = browser.getComponentName;\nexports.getDomElement = browser.getDomElement;\nexports.getLocationHref = browser.getLocationHref;\nexports.htmlTreeAsString = browser.htmlTreeAsString;\nexports.dsnFromString = dsn.dsnFromString;\nexports.dsnToString = dsn.dsnToString;\nexports.makeDsn = dsn.makeDsn;\nexports.SentryError = error.SentryError;\nexports.GLOBAL_OBJ = worldwide.GLOBAL_OBJ;\nexports.getGlobalObject = worldwide.getGlobalObject;\nexports.getGlobalSingleton = worldwide.getGlobalSingleton;\nexports.addInstrumentationHandler = index.addInstrumentationHandler;\nexports.isDOMError = is.isDOMError;\nexports.isDOMException = is.isDOMException;\nexports.isElement = is.isElement;\nexports.isError = is.isError;\nexports.isErrorEvent = is.isErrorEvent;\nexports.isEvent = is.isEvent;\nexports.isInstanceOf = is.isInstanceOf;\nexports.isNaN = is.isNaN;\nexports.isParameterizedString = is.isParameterizedString;\nexports.isPlainObject = is.isPlainObject;\nexports.isPrimitive = is.isPrimitive;\nexports.isRegExp = is.isRegExp;\nexports.isString = is.isString;\nexports.isSyntheticEvent = is.isSyntheticEvent;\nexports.isThenable = is.isThenable;\nexports.isVueViewModel = is.isVueViewModel;\nexports.isBrowser = isBrowser.isBrowser;\nexports.CONSOLE_LEVELS = logger.CONSOLE_LEVELS;\nexports.consoleSandbox = logger.consoleSandbox;\nexports.logger = logger.logger;\nexports.originalConsoleMethods = logger.originalConsoleMethods;\nexports.memoBuilder = memo.memoBuilder;\nexports.addContextToFrame = misc.addContextToFrame;\nexports.addExceptionMechanism = misc.addExceptionMechanism;\nexports.addExceptionTypeValue = misc.addExceptionTypeValue;\nexports.arrayify = misc.arrayify;\nexports.checkOrSetAlreadyCaught = misc.checkOrSetAlreadyCaught;\nexports.getEventDescription = misc.getEventDescription;\nexports.parseSemver = misc.parseSemver;\nexports.uuid4 = misc.uuid4;\nexports.dynamicRequire = node.dynamicRequire;\nexports.isNodeEnv = node.isNodeEnv;\nexports.loadModule = node.loadModule;\nexports.normalize = normalize.normalize;\nexports.normalizeToSize = normalize.normalizeToSize;\nexports.normalizeUrlToBase = normalize.normalizeUrlToBase;\nexports.walk = normalize.walk;\nexports.addNonEnumerableProperty = object.addNonEnumerableProperty;\nexports.convertToPlainObject = object.convertToPlainObject;\nexports.dropUndefinedKeys = object.dropUndefinedKeys;\nexports.extractExceptionKeysForMessage = object.extractExceptionKeysForMessage;\nexports.fill = object.fill;\nexports.getOriginalFunction = object.getOriginalFunction;\nexports.markFunctionWrapped = object.markFunctionWrapped;\nexports.objectify = object.objectify;\nexports.urlEncode = object.urlEncode;\nexports.basename = path.basename;\nexports.dirname = path.dirname;\nexports.isAbsolute = path.isAbsolute;\nexports.join = path.join;\nexports.normalizePath = path.normalizePath;\nexports.relative = path.relative;\nexports.resolve = path.resolve;\nexports.makePromiseBuffer = promisebuffer.makePromiseBuffer;\nexports.DEFAULT_USER_INCLUDES = requestdata.DEFAULT_USER_INCLUDES;\nexports.addRequestDataToEvent = requestdata.addRequestDataToEvent;\nexports.addRequestDataToTransaction = requestdata.addRequestDataToTransaction;\nexports.extractPathForTransaction = requestdata.extractPathForTransaction;\nexports.extractRequestData = requestdata.extractRequestData;\nexports.winterCGHeadersToDict = requestdata.winterCGHeadersToDict;\nexports.winterCGRequestToRequestData = requestdata.winterCGRequestToRequestData;\nexports.severityFromString = severity.severityFromString;\nexports.severityLevelFromString = severity.severityLevelFromString;\nexports.validSeverityLevels = severity.validSeverityLevels;\nexports.createStackParser = stacktrace.createStackParser;\nexports.getFunctionName = stacktrace.getFunctionName;\nexports.nodeStackLineParser = stacktrace.nodeStackLineParser;\nexports.stackParserFromStackParserOptions = stacktrace.stackParserFromStackParserOptions;\nexports.stripSentryFramesAndReverse = stacktrace.stripSentryFramesAndReverse;\nexports.isMatchingPattern = string.isMatchingPattern;\nexports.safeJoin = string.safeJoin;\nexports.snipLine = string.snipLine;\nexports.stringMatchesSomePattern = string.stringMatchesSomePattern;\nexports.truncate = string.truncate;\nexports.isNativeFetch = supports.isNativeFetch;\nexports.supportsDOMError = supports.supportsDOMError;\nexports.supportsDOMException = supports.supportsDOMException;\nexports.supportsErrorEvent = supports.supportsErrorEvent;\nexports.supportsFetch = supports.supportsFetch;\nexports.supportsNativeFetch = supports.supportsNativeFetch;\nexports.supportsReferrerPolicy = supports.supportsReferrerPolicy;\nexports.supportsReportingObserver = supports.supportsReportingObserver;\nexports.SyncPromise = syncpromise.SyncPromise;\nexports.rejectedSyncPromise = syncpromise.rejectedSyncPromise;\nexports.resolvedSyncPromise = syncpromise.resolvedSyncPromise;\nObject.defineProperty(exports, '_browserPerformanceTimeOriginMode', {\n\tenumerable: true,\n\tget: () => time._browserPerformanceTimeOriginMode\n});\nexports.browserPerformanceTimeOrigin = time.browserPerformanceTimeOrigin;\nexports.dateTimestampInSeconds = time.dateTimestampInSeconds;\nexports.timestampInSeconds = time.timestampInSeconds;\nexports.timestampWithMs = time.timestampWithMs;\nexports.TRACEPARENT_REGEXP = tracing.TRACEPARENT_REGEXP;\nexports.extractTraceparentData = tracing.extractTraceparentData;\nexports.generateSentryTraceHeader = tracing.generateSentryTraceHeader;\nexports.propagationContextFromHeaders = tracing.propagationContextFromHeaders;\nexports.tracingContextFromHeaders = tracing.tracingContextFromHeaders;\nexports.getSDKSource = env.getSDKSource;\nexports.isBrowserBundle = env.isBrowserBundle;\nexports.addItemToEnvelope = envelope.addItemToEnvelope;\nexports.createAttachmentEnvelopeItem = envelope.createAttachmentEnvelopeItem;\nexports.createEnvelope = envelope.createEnvelope;\nexports.createEventEnvelopeHeaders = envelope.createEventEnvelopeHeaders;\nexports.envelopeContainsItemType = envelope.envelopeContainsItemType;\nexports.envelopeItemTypeToDataCategory = envelope.envelopeItemTypeToDataCategory;\nexports.forEachEnvelopeItem = envelope.forEachEnvelopeItem;\nexports.getSdkMetadataForEnvelopeHeader = envelope.getSdkMetadataForEnvelopeHeader;\nexports.parseEnvelope = envelope.parseEnvelope;\nexports.serializeEnvelope = envelope.serializeEnvelope;\nexports.createClientReportEnvelope = clientreport.createClientReportEnvelope;\nexports.DEFAULT_RETRY_AFTER = ratelimit.DEFAULT_RETRY_AFTER;\nexports.disabledUntil = ratelimit.disabledUntil;\nexports.isRateLimited = ratelimit.isRateLimited;\nexports.parseRetryAfterHeader = ratelimit.parseRetryAfterHeader;\nexports.updateRateLimits = ratelimit.updateRateLimits;\nexports.BAGGAGE_HEADER_NAME = baggage.BAGGAGE_HEADER_NAME;\nexports.MAX_BAGGAGE_STRING_LENGTH = baggage.MAX_BAGGAGE_STRING_LENGTH;\nexports.SENTRY_BAGGAGE_KEY_PREFIX = baggage.SENTRY_BAGGAGE_KEY_PREFIX;\nexports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = baggage.SENTRY_BAGGAGE_KEY_PREFIX_REGEX;\nexports.baggageHeaderToDynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext;\nexports.dynamicSamplingContextToSentryBaggageHeader = baggage.dynamicSamplingContextToSentryBaggageHeader;\nexports.getNumberOfUrlSegments = url.getNumberOfUrlSegments;\nexports.getSanitizedUrlString = url.getSanitizedUrlString;\nexports.parseUrl = url.parseUrl;\nexports.stripUrlQueryAndFragment = url.stripUrlQueryAndFragment;\nexports.addOrUpdateIntegration = userIntegrations.addOrUpdateIntegration;\nexports.makeFifoCache = cache.makeFifoCache;\nexports.eventFromMessage = eventbuilder.eventFromMessage;\nexports.eventFromUnknownInput = eventbuilder.eventFromUnknownInput;\nexports.exceptionFromError = eventbuilder.exceptionFromError;\nexports.parseStackFrames = eventbuilder.parseStackFrames;\nexports.callFrameToStackFrame = anr.callFrameToStackFrame;\nexports.watchdogTimer = anr.watchdogTimer;\nexports.LRUMap = lru.LRUMap;\nexports._asyncNullishCoalesce = _asyncNullishCoalesce._asyncNullishCoalesce;\nexports._asyncOptionalChain = _asyncOptionalChain._asyncOptionalChain;\nexports._asyncOptionalChainDelete = _asyncOptionalChainDelete._asyncOptionalChainDelete;\nexports._nullishCoalesce = _nullishCoalesce._nullishCoalesce;\nexports._optionalChain = _optionalChain._optionalChain;\nexports._optionalChainDelete = _optionalChainDelete._optionalChainDelete;\nexports.addConsoleInstrumentationHandler = console.addConsoleInstrumentationHandler;\nexports.addClickKeypressInstrumentationHandler = dom.addClickKeypressInstrumentationHandler;\nexports.SENTRY_XHR_DATA_KEY = xhr.SENTRY_XHR_DATA_KEY;\nexports.addXhrInstrumentationHandler = xhr.addXhrInstrumentationHandler;\nexports.addFetchInstrumentationHandler = fetch.addFetchInstrumentationHandler;\nexports.addHistoryInstrumentationHandler = history.addHistoryInstrumentationHandler;\nexports.addGlobalErrorInstrumentationHandler = globalError.addGlobalErrorInstrumentationHandler;\nexports.addGlobalUnhandledRejectionInstrumentationHandler = globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler;\nexports.resetInstrumentationHandlers = _handlers.resetInstrumentationHandlers;\nexports.filenameIsInApp = nodeStackTrace.filenameIsInApp;\nexports.escapeStringForRegex = escapeStringForRegex.escapeStringForRegex;\nexports.supportsHistory = supportsHistory.supportsHistory;\n//# sourceMappingURL=index.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst debugBuild = require('../debug-build.js');\nconst logger = require('../logger.js');\nconst stacktrace = require('../stacktrace.js');\n\n// We keep the handlers globally\nconst handlers = {};\nconst instrumented = {};\n\n/** Add a handler function. */\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nfunction resetInstrumentationHandlers() {\n Object.keys(handlers).forEach(key => {\n handlers[key ] = undefined;\n });\n}\n\n/** Maybe run an instrumentation function, unless it was already called. */\nfunction maybeInstrument(type, instrumentFn) {\n if (!instrumented[type]) {\n instrumentFn();\n instrumented[type] = true;\n }\n}\n\n/** Trigger handlers for a given instrumentation type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = type && handlers[type];\n if (!typeHandlers) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n debugBuild.DEBUG_BUILD &&\n logger.logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${stacktrace.getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nexports.addHandler = addHandler;\nexports.maybeInstrument = maybeInstrument;\nexports.resetInstrumentationHandlers = resetInstrumentationHandlers;\nexports.triggerHandlers = triggerHandlers;\n//# sourceMappingURL=_handlers.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst logger = require('../logger.js');\nconst object = require('../object.js');\nconst worldwide = require('../worldwide.js');\nconst _handlers = require('./_handlers.js');\n\n/**\n * Add an instrumentation handler for when a console.xxx method is called.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addConsoleInstrumentationHandler(handler) {\n const type = 'console';\n _handlers.addHandler(type, handler);\n _handlers.maybeInstrument(type, instrumentConsole);\n}\n\nfunction instrumentConsole() {\n if (!('console' in worldwide.GLOBAL_OBJ)) {\n return;\n }\n\n logger.CONSOLE_LEVELS.forEach(function (level) {\n if (!(level in worldwide.GLOBAL_OBJ.console)) {\n return;\n }\n\n object.fill(worldwide.GLOBAL_OBJ.console, level, function (originalConsoleMethod) {\n logger.originalConsoleMethods[level] = originalConsoleMethod;\n\n return function (...args) {\n const handlerData = { args, level };\n _handlers.triggerHandlers('console', handlerData);\n\n const log = logger.originalConsoleMethods[level];\n log && log.apply(worldwide.GLOBAL_OBJ.console, args);\n };\n });\n });\n}\n\nexports.addConsoleInstrumentationHandler = addConsoleInstrumentationHandler;\n//# sourceMappingURL=console.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst misc = require('../misc.js');\nconst object = require('../object.js');\nconst worldwide = require('../worldwide.js');\nconst _handlers = require('./_handlers.js');\n\nconst WINDOW = worldwide.GLOBAL_OBJ ;\nconst DEBOUNCE_DURATION = 1000;\n\nlet debounceTimerID;\nlet lastCapturedEventType;\nlet lastCapturedEventTargetId;\n\n/**\n * Add an instrumentation handler for when a click or a keypress happens.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addClickKeypressInstrumentationHandler(handler) {\n const type = 'dom';\n _handlers.addHandler(type, handler);\n _handlers.maybeInstrument(type, instrumentDOM);\n}\n\n/** Exported for tests only. */\nfunction instrumentDOM() {\n if (!WINDOW.document) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = _handlers.triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = (WINDOW )[target] && (WINDOW )[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n object.fill(proto, 'addEventListener', function (originalAddEventListener) {\n return function (\n\n type,\n listener,\n options,\n ) {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this ;\n const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n object.fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener) {\n return function (\n\n type,\n listener,\n options,\n ) {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this ;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event) {\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (event.type !== lastCapturedEventType) {\n return false;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (!event.target || (event.target )._sentryId !== lastCapturedEventTargetId) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType, target) {\n // We are only interested in filtering `keypress` events for now.\n if (eventType !== 'keypress') {\n return false;\n }\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n */\nfunction makeDOMEventHandler(\n handler,\n globalListener = false,\n) {\n return (event) => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || event['_sentryCaptured']) {\n return;\n }\n\n const target = getEventTarget(event);\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event.type, target)) {\n return;\n }\n\n // Mark event as \"seen\"\n object.addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n if (target && !target._sentryId) {\n // Add UUID to event target so we can identify if\n object.addNonEnumerableProperty(target, '_sentryId', misc.uuid4());\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n if (!isSimilarToLastCapturedEvent(event)) {\n const handlerData = { event, name, global: globalListener };\n handler(handlerData);\n lastCapturedEventType = event.type;\n lastCapturedEventTargetId = target ? target._sentryId : undefined;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n lastCapturedEventTargetId = undefined;\n lastCapturedEventType = undefined;\n }, DEBOUNCE_DURATION);\n };\n}\n\nfunction getEventTarget(event) {\n try {\n return event.target ;\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n return null;\n }\n}\n\nexports.addClickKeypressInstrumentationHandler = addClickKeypressInstrumentationHandler;\nexports.instrumentDOM = instrumentDOM;\n//# sourceMappingURL=dom.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst object = require('../object.js');\nconst supports = require('../supports.js');\nconst worldwide = require('../worldwide.js');\nconst _handlers = require('./_handlers.js');\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addFetchInstrumentationHandler(handler) {\n const type = 'fetch';\n _handlers.addHandler(type, handler);\n _handlers.maybeInstrument(type, instrumentFetch);\n}\n\nfunction instrumentFetch() {\n if (!supports.supportsNativeFetch()) {\n return;\n }\n\n object.fill(worldwide.GLOBAL_OBJ, 'fetch', function (originalFetch) {\n return function (...args) {\n const { method, url } = parseFetchArgs(args);\n\n const handlerData = {\n args,\n fetchData: {\n method,\n url,\n },\n startTimestamp: Date.now(),\n };\n\n _handlers.triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(worldwide.GLOBAL_OBJ, args).then(\n (response) => {\n const finishedHandlerData = {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n };\n\n _handlers.triggerHandlers('fetch', finishedHandlerData);\n return response;\n },\n (error) => {\n const erroredHandlerData = {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n };\n\n _handlers.triggerHandlers('fetch', erroredHandlerData);\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\nfunction hasProp(obj, prop) {\n return !!obj && typeof obj === 'object' && !!(obj )[prop];\n}\n\nfunction getUrlFromResource(resource) {\n if (typeof resource === 'string') {\n return resource;\n }\n\n if (!resource) {\n return '';\n }\n\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n\n if (resource.toString) {\n return resource.toString();\n }\n\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request.\n * Exported for tests only.\n */\nfunction parseFetchArgs(fetchArgs) {\n if (fetchArgs.length === 0) {\n return { method: 'GET', url: '' };\n }\n\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs ;\n\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n };\n }\n\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg ),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n };\n}\n\nexports.addFetchInstrumentationHandler = addFetchInstrumentationHandler;\nexports.parseFetchArgs = parseFetchArgs;\n//# sourceMappingURL=fetch.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst worldwide = require('../worldwide.js');\nconst _handlers = require('./_handlers.js');\n\nlet _oldOnErrorHandler = null;\n\n/**\n * Add an instrumentation handler for when an error is captured by the global error handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalErrorInstrumentationHandler(handler) {\n const type = 'error';\n _handlers.addHandler(type, handler);\n _handlers.maybeInstrument(type, instrumentError);\n}\n\nfunction instrumentError() {\n _oldOnErrorHandler = worldwide.GLOBAL_OBJ.onerror;\n\n worldwide.GLOBAL_OBJ.onerror = function (\n msg,\n url,\n line,\n column,\n error,\n ) {\n const handlerData = {\n column,\n error,\n line,\n msg,\n url,\n };\n _handlers.triggerHandlers('error', handlerData);\n\n if (_oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n\n worldwide.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexports.addGlobalErrorInstrumentationHandler = addGlobalErrorInstrumentationHandler;\n//# sourceMappingURL=globalError.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst worldwide = require('../worldwide.js');\nconst _handlers = require('./_handlers.js');\n\nlet _oldOnUnhandledRejectionHandler = null;\n\n/**\n * Add an instrumentation handler for when an unhandled promise rejection is captured.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalUnhandledRejectionInstrumentationHandler(\n handler,\n) {\n const type = 'unhandledrejection';\n _handlers.addHandler(type, handler);\n _handlers.maybeInstrument(type, instrumentUnhandledRejection);\n}\n\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = worldwide.GLOBAL_OBJ.onunhandledrejection;\n\n worldwide.GLOBAL_OBJ.onunhandledrejection = function (e) {\n const handlerData = e;\n _handlers.triggerHandlers('unhandledrejection', handlerData);\n\n if (_oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n\n worldwide.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexports.addGlobalUnhandledRejectionInstrumentationHandler = addGlobalUnhandledRejectionInstrumentationHandler;\n//# sourceMappingURL=globalUnhandledRejection.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst object = require('../object.js');\nrequire('../debug-build.js');\nrequire('../logger.js');\nconst worldwide = require('../worldwide.js');\nconst supportsHistory = require('../vendor/supportsHistory.js');\nconst _handlers = require('./_handlers.js');\n\nconst WINDOW = worldwide.GLOBAL_OBJ ;\n\nlet lastHref;\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addHistoryInstrumentationHandler(handler) {\n const type = 'history';\n _handlers.addHandler(type, handler);\n _handlers.maybeInstrument(type, instrumentHistory);\n}\n\nfunction instrumentHistory() {\n if (!supportsHistory.supportsHistory()) {\n return;\n }\n\n const oldOnPopState = WINDOW.onpopstate;\n WINDOW.onpopstate = function ( ...args) {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n const handlerData = { from, to };\n _handlers.triggerHandlers('history', handlerData);\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n function historyReplacementFunction(originalHistoryFunction) {\n return function ( ...args) {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n const handlerData = { from, to };\n _handlers.triggerHandlers('history', handlerData);\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n object.fill(WINDOW.history, 'pushState', historyReplacementFunction);\n object.fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nexports.addHistoryInstrumentationHandler = addHistoryInstrumentationHandler;\n//# sourceMappingURL=history.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst debugBuild = require('../debug-build.js');\nconst logger = require('../logger.js');\nconst console = require('./console.js');\nconst dom = require('./dom.js');\nconst fetch = require('./fetch.js');\nconst globalError = require('./globalError.js');\nconst globalUnhandledRejection = require('./globalUnhandledRejection.js');\nconst history = require('./history.js');\nconst xhr = require('./xhr.js');\n\n// TODO(v8): Consider moving this file (or at least parts of it) into the browser package. The registered handlers are mostly non-generic and we risk leaking runtime specific code into generic packages.\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n * @deprecated Use the proper function per instrumentation type instead!\n */\nfunction addInstrumentationHandler(type, callback) {\n switch (type) {\n case 'console':\n return console.addConsoleInstrumentationHandler(callback);\n case 'dom':\n return dom.addClickKeypressInstrumentationHandler(callback);\n case 'xhr':\n return xhr.addXhrInstrumentationHandler(callback);\n case 'fetch':\n return fetch.addFetchInstrumentationHandler(callback);\n case 'history':\n return history.addHistoryInstrumentationHandler(callback);\n case 'error':\n return globalError.addGlobalErrorInstrumentationHandler(callback);\n case 'unhandledrejection':\n return globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler(callback);\n default:\n debugBuild.DEBUG_BUILD && logger.logger.warn('unknown instrumentation type:', type);\n }\n}\n\nexports.addConsoleInstrumentationHandler = console.addConsoleInstrumentationHandler;\nexports.addClickKeypressInstrumentationHandler = dom.addClickKeypressInstrumentationHandler;\nexports.addFetchInstrumentationHandler = fetch.addFetchInstrumentationHandler;\nexports.addGlobalErrorInstrumentationHandler = globalError.addGlobalErrorInstrumentationHandler;\nexports.addGlobalUnhandledRejectionInstrumentationHandler = globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler;\nexports.addHistoryInstrumentationHandler = history.addHistoryInstrumentationHandler;\nexports.SENTRY_XHR_DATA_KEY = xhr.SENTRY_XHR_DATA_KEY;\nexports.addXhrInstrumentationHandler = xhr.addXhrInstrumentationHandler;\nexports.addInstrumentationHandler = addInstrumentationHandler;\n//# sourceMappingURL=index.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst is = require('../is.js');\nconst object = require('../object.js');\nconst worldwide = require('../worldwide.js');\nconst _handlers = require('./_handlers.js');\n\nconst WINDOW = worldwide.GLOBAL_OBJ ;\n\nconst SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__';\n\n/**\n * Add an instrumentation handler for when an XHR request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addXhrInstrumentationHandler(handler) {\n const type = 'xhr';\n _handlers.addHandler(type, handler);\n _handlers.maybeInstrument(type, instrumentXHR);\n}\n\n/** Exported only for tests. */\nfunction instrumentXHR() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (!(WINDOW ).XMLHttpRequest) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n object.fill(xhrproto, 'open', function (originalOpen) {\n return function ( ...args) {\n const startTimestamp = Date.now();\n\n // open() should always be called with two or more arguments\n // But to be on the safe side, we actually validate this and bail out if we don't have a method & url\n const method = is.isString(args[0]) ? args[0].toUpperCase() : undefined;\n const url = parseUrl(args[1]);\n\n if (!method || !url) {\n return originalOpen.apply(this, args);\n }\n\n this[SENTRY_XHR_DATA_KEY] = {\n method,\n url,\n request_headers: {},\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (!xhrInfo) {\n return;\n }\n\n if (this.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = this.status;\n } catch (e) {\n /* do nothing */\n }\n\n const handlerData = {\n args: [method, url],\n endTimestamp: Date.now(),\n startTimestamp,\n xhr: this,\n };\n _handlers.triggerHandlers('xhr', handlerData);\n }\n };\n\n if ('onreadystatechange' in this && typeof this.onreadystatechange === 'function') {\n object.fill(this, 'onreadystatechange', function (original) {\n return function ( ...readyStateArgs) {\n onreadystatechangeHandler();\n return original.apply(this, readyStateArgs);\n };\n });\n } else {\n this.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n object.fill(this, 'setRequestHeader', function (original) {\n return function ( ...setRequestHeaderArgs) {\n const [header, value] = setRequestHeaderArgs;\n\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (xhrInfo && is.isString(header) && is.isString(value)) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n\n return original.apply(this, setRequestHeaderArgs);\n };\n });\n\n return originalOpen.apply(this, args);\n };\n });\n\n object.fill(xhrproto, 'send', function (originalSend) {\n return function ( ...args) {\n const sentryXhrData = this[SENTRY_XHR_DATA_KEY];\n\n if (!sentryXhrData) {\n return originalSend.apply(this, args);\n }\n\n if (args[0] !== undefined) {\n sentryXhrData.body = args[0];\n }\n\n const handlerData = {\n args: [sentryXhrData.method, sentryXhrData.url],\n startTimestamp: Date.now(),\n xhr: this,\n };\n _handlers.triggerHandlers('xhr', handlerData);\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nfunction parseUrl(url) {\n if (is.isString(url)) {\n return url;\n }\n\n try {\n // url can be a string or URL\n // but since URL is not available in IE11, we do not check for it,\n // but simply assume it is an URL and return `toString()` from it (which returns the full URL)\n // If that fails, we just return undefined\n return (url ).toString();\n } catch (e2) {} // eslint-disable-line no-empty\n\n return undefined;\n}\n\nexports.SENTRY_XHR_DATA_KEY = SENTRY_XHR_DATA_KEY;\nexports.addXhrInstrumentationHandler = addXhrInstrumentationHandler;\nexports.instrumentXHR = instrumentXHR;\n//# sourceMappingURL=xhr.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isError(wat) {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isErrorEvent(wat) {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMError(wat) {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMException(wat) {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isString(wat) {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given string is parameterized\n * {@link isParameterizedString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isParameterizedString(wat) {\n return (\n typeof wat === 'object' &&\n wat !== null &&\n '__sentry_template_string__' in wat &&\n '__sentry_template_values__' in wat\n );\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPrimitive(wat) {\n return wat === null || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal, or a class instance.\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPlainObject(wat) {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nfunction isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isNaN(wat) {\n return typeof wat === 'number' && wat !== wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nfunction isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isVueViewModel(wat) {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === 'object' && wat !== null && ((wat ).__isVue || (wat )._isVue));\n}\n\nexports.isDOMError = isDOMError;\nexports.isDOMException = isDOMException;\nexports.isElement = isElement;\nexports.isError = isError;\nexports.isErrorEvent = isErrorEvent;\nexports.isEvent = isEvent;\nexports.isInstanceOf = isInstanceOf;\nexports.isNaN = isNaN;\nexports.isParameterizedString = isParameterizedString;\nexports.isPlainObject = isPlainObject;\nexports.isPrimitive = isPrimitive;\nexports.isRegExp = isRegExp;\nexports.isString = isString;\nexports.isSyntheticEvent = isSyntheticEvent;\nexports.isThenable = isThenable;\nexports.isVueViewModel = isVueViewModel;\n//# sourceMappingURL=is.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst node = require('./node.js');\nconst worldwide = require('./worldwide.js');\n\n/**\n * Returns true if we are in the browser.\n */\nfunction isBrowser() {\n // eslint-disable-next-line no-restricted-globals\n return typeof window !== 'undefined' && (!node.isNodeEnv() || isElectronNodeRenderer());\n}\n\n// Electron renderers with nodeIntegration enabled are detected as Node.js so we specifically test for them\nfunction isElectronNodeRenderer() {\n return (\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (worldwide.GLOBAL_OBJ ).process !== undefined && ((worldwide.GLOBAL_OBJ ).process ).type === 'renderer'\n );\n}\n\nexports.isBrowser = isBrowser;\n//# sourceMappingURL=isBrowser.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst debugBuild = require('./debug-build.js');\nconst worldwide = require('./worldwide.js');\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nconst CONSOLE_LEVELS = [\n 'debug',\n 'info',\n 'warn',\n 'error',\n 'log',\n 'assert',\n 'trace',\n] ;\n\n/** This may be mutated by the console instrumentation. */\nconst originalConsoleMethods\n\n = {};\n\n/** JSDoc */\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nfunction consoleSandbox(callback) {\n if (!('console' in worldwide.GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = worldwide.GLOBAL_OBJ.console ;\n const wrappedFuncs = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) ;\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level] ;\n wrappedFuncs[level] = console[level] ;\n console[level] = originalConsoleMethod;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] ;\n });\n }\n}\n\nfunction makeLogger() {\n let enabled = false;\n const logger = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n isEnabled: () => enabled,\n };\n\n if (debugBuild.DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(name => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args) => {\n if (enabled) {\n consoleSandbox(() => {\n worldwide.GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger ;\n}\n\nconst logger = makeLogger();\n\nexports.CONSOLE_LEVELS = CONSOLE_LEVELS;\nexports.consoleSandbox = consoleSandbox;\nexports.logger = logger;\nexports.originalConsoleMethods = originalConsoleMethods;\n//# sourceMappingURL=logger.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/** A simple Least Recently Used map */\nclass LRUMap {\n\n constructor( _maxSize) {this._maxSize = _maxSize;\n this._cache = new Map();\n }\n\n /** Get the current size of the cache */\n get size() {\n return this._cache.size;\n }\n\n /** Get an entry or undefined if it was not in the cache. Re-inserts to update the recently used order */\n get(key) {\n const value = this._cache.get(key);\n if (value === undefined) {\n return undefined;\n }\n // Remove and re-insert to update the order\n this._cache.delete(key);\n this._cache.set(key, value);\n return value;\n }\n\n /** Insert an entry and evict an older entry if we've reached maxSize */\n set(key, value) {\n if (this._cache.size >= this._maxSize) {\n // keys() returns an iterator in insertion order so keys().next() gives us the oldest key\n this._cache.delete(this._cache.keys().next().value);\n }\n this._cache.set(key, value);\n }\n\n /** Remove an entry and return the entry if it was in the cache */\n remove(key) {\n const value = this._cache.get(key);\n if (value) {\n this._cache.delete(key);\n }\n return value;\n }\n\n /** Clear all entries */\n clear() {\n this._cache.clear();\n }\n\n /** Get all the keys */\n keys() {\n return Array.from(this._cache.keys());\n }\n\n /** Get all the values */\n values() {\n const values = [];\n this._cache.forEach(value => values.push(value));\n return values;\n }\n}\n\nexports.LRUMap = LRUMap;\n//# sourceMappingURL=lru.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Helper to decycle json objects\n */\nfunction memoBuilder() {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner = hasWeakSet ? new WeakSet() : [];\n function memoize(obj) {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj) {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n\nexports.memoBuilder = memoBuilder;\n//# sourceMappingURL=memo.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst object = require('./object.js');\nconst string = require('./string.js');\nconst worldwide = require('./worldwide.js');\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nfunction uuid4() {\n const gbl = worldwide.GLOBAL_OBJ ;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n let getRandomByte = () => Math.random() * 16;\n try {\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n if (crypto && crypto.getRandomValues) {\n getRandomByte = () => {\n // crypto.getRandomValues might return undefined instead of the typed array\n // in old Chromium versions (e.g. 23.0.1235.0 (151422))\n // However, `typedArray` is still filled in-place.\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#typedarray\n const typedArray = new Uint8Array(1);\n crypto.getRandomValues(typedArray);\n return typedArray[0];\n };\n }\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event) {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nfunction getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '';\n }\n return eventId || '';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nfunction addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nfunction addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nfunction parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nfunction addContextToFrame(lines, frame, linesOfContext = 5) {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line) => string.snipLine(line, 0));\n\n frame.context_line = string.snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line) => string.snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nfunction checkOrSetAlreadyCaught(exception) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && (exception ).__sentry_captured__) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n object.addNonEnumerableProperty(exception , '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n */\nfunction arrayify(maybeArray) {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n\nexports.addContextToFrame = addContextToFrame;\nexports.addExceptionMechanism = addExceptionMechanism;\nexports.addExceptionTypeValue = addExceptionTypeValue;\nexports.arrayify = arrayify;\nexports.checkOrSetAlreadyCaught = checkOrSetAlreadyCaught;\nexports.getEventDescription = getEventDescription;\nexports.parseSemver = parseSemver;\nexports.uuid4 = uuid4;\n//# sourceMappingURL=misc.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Does this filename look like it's part of the app code?\n */\nfunction filenameIsInApp(filename, isNative = false) {\n const isInternal =\n isNative ||\n (filename &&\n // It's not internal if it's an absolute linux path\n !filename.startsWith('/') &&\n // It's not internal if it's an absolute windows path\n !filename.match(/^[A-Z]:/) &&\n // It's not internal if the path is starting with a dot\n !filename.startsWith('.') &&\n // It's not internal if the frame has a protocol. In node, this is usually the case if the file got pre-processed with a bundler like webpack\n !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\\-+])*:\\/\\//)); // Schema from: https://stackoverflow.com/a/3641782\n\n // in_app is all that's not an internal Node function or a module within node_modules\n // note that isNative appears to return true even for node core libraries\n // see https://github.com/getsentry/raven-node/issues/176\n\n return !isInternal && filename !== undefined && !filename.includes('node_modules/');\n}\n\n/** Node Stack line parser */\n// eslint-disable-next-line complexity\nfunction node(getModule) {\n const FILENAME_MATCH = /^\\s*[-]{4,}$/;\n const FULL_MATCH = /at (?:async )?(?:(.+?)\\s+\\()?(?:(.+):(\\d+):(\\d+)?|([^)]+))\\)?/;\n\n // eslint-disable-next-line complexity\n return (line) => {\n const lineMatch = line.match(FULL_MATCH);\n\n if (lineMatch) {\n let object;\n let method;\n let functionName;\n let typeName;\n let methodName;\n\n if (lineMatch[1]) {\n functionName = lineMatch[1];\n\n let methodStart = functionName.lastIndexOf('.');\n if (functionName[methodStart - 1] === '.') {\n methodStart--;\n }\n\n if (methodStart > 0) {\n object = functionName.slice(0, methodStart);\n method = functionName.slice(methodStart + 1);\n const objectEnd = object.indexOf('.Module');\n if (objectEnd > 0) {\n functionName = functionName.slice(objectEnd + 1);\n object = object.slice(0, objectEnd);\n }\n }\n typeName = undefined;\n }\n\n if (method) {\n typeName = object;\n methodName = method;\n }\n\n if (method === '') {\n methodName = undefined;\n functionName = undefined;\n }\n\n if (functionName === undefined) {\n methodName = methodName || '';\n functionName = typeName ? `${typeName}.${methodName}` : methodName;\n }\n\n let filename = lineMatch[2] && lineMatch[2].startsWith('file://') ? lineMatch[2].slice(7) : lineMatch[2];\n const isNative = lineMatch[5] === 'native';\n\n // If it's a Windows path, trim the leading slash so that `/C:/foo` becomes `C:/foo`\n if (filename && filename.match(/\\/[A-Z]:/)) {\n filename = filename.slice(1);\n }\n\n if (!filename && lineMatch[5] && !isNative) {\n filename = lineMatch[5];\n }\n\n return {\n filename,\n module: getModule ? getModule(filename) : undefined,\n function: functionName,\n lineno: parseInt(lineMatch[3], 10) || undefined,\n colno: parseInt(lineMatch[4], 10) || undefined,\n in_app: filenameIsInApp(filename, isNative),\n };\n }\n\n if (line.match(FILENAME_MATCH)) {\n return {\n filename: line,\n };\n }\n\n return undefined;\n };\n}\n\nexports.filenameIsInApp = filenameIsInApp;\nexports.node = node;\n//# sourceMappingURL=node-stack-trace.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst env = require('./env.js');\n\n/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nfunction isNodeEnv() {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (\n !env.isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nfunction dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */\nfunction loadModule(moduleName) {\n let mod;\n\n try {\n mod = dynamicRequire(module, moduleName);\n } catch (e) {\n // no-empty\n }\n\n try {\n const { cwd } = dynamicRequire(module, 'process');\n mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) ;\n } catch (e) {\n // no-empty\n }\n\n return mod;\n}\n\nexports.dynamicRequire = dynamicRequire;\nexports.isNodeEnv = isNodeEnv;\nexports.loadModule = loadModule;\n//# sourceMappingURL=node.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst is = require('./is.js');\nconst memo = require('./memo.js');\nconst object = require('./object.js');\nconst stacktrace = require('./stacktrace.js');\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normallized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction normalize(input, depth = 100, maxProperties = +Infinity) {\n try {\n // since we're at the outermost level, we don't provide a key\n return visit('', input, depth, maxProperties);\n } catch (err) {\n return { ERROR: `**non-serializable** (${err})` };\n }\n}\n\n/** JSDoc */\nfunction normalizeToSize(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n object,\n // Default Node.js REPL depth\n depth = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize = 100 * 1024,\n) {\n const normalized = normalize(object, depth);\n\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return normalized ;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n key,\n value,\n depth = +Infinity,\n maxProperties = +Infinity,\n memo$1 = memo.memoBuilder(),\n) {\n const [memoize, unmemoize] = memo$1;\n\n // Get the simple cases out of the way first\n if (\n value == null || // this matches null and undefined -> eqeq not eqeqeq\n (['number', 'boolean', 'string'].includes(typeof value) && !is.isNaN(value))\n ) {\n return value ;\n }\n\n const stringified = stringifyValue(key, value);\n\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n\n // From here on, we can assert that `value` is either an object or an array.\n\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if ((value )['__sentry_skip_normalization__']) {\n return value ;\n }\n\n // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n // We keep a certain amount of depth.\n // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n const remainingDepth =\n typeof (value )['__sentry_override_normalization_depth__'] === 'number'\n ? ((value )['__sentry_override_normalization_depth__'] )\n : depth;\n\n // We're also done if we've reached the max depth\n if (remainingDepth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value ;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return visit('', jsonValue, remainingDepth - 1, maxProperties, memo$1);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = (Array.isArray(value) ? [] : {}) ;\n let numAdded = 0;\n\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = object.convertToPlainObject(value );\n\n for (const visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo$1);\n\n numAdded++;\n }\n\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n\n // Return accumulated values\n return normalized;\n}\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(\n key,\n // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n // our internal use, it'll do\n value,\n) {\n try {\n if (key === 'domain' && value && typeof value === 'object' && (value )._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n if (is.isVueViewModel(value)) {\n return '[VueViewModel]';\n }\n\n // React's SyntheticEvent thingy\n if (is.isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${stacktrace.getFunctionName(value)}]`;\n }\n\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n const objName = getConstructorName(value);\n\n // Handle HTML Elements\n if (/^HTML(\\w*)Element$/.test(objName)) {\n return `[HTMLElement: ${objName}]`;\n }\n\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value) {\n const prototype = Object.getPrototypeOf(value);\n\n return prototype ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n\n/**\n * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint\n * across platforms and working directory.\n *\n * @param url The URL to be normalized.\n * @param basePath The application base path.\n * @returns The normalized URL.\n */\nfunction normalizeUrlToBase(url, basePath) {\n const escapedBase = basePath\n // Backslash to forward\n .replace(/\\\\/g, '/')\n // Escape RegExp special characters\n .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n\n let newUrl = url;\n try {\n newUrl = decodeURI(url);\n } catch (_Oo) {\n // Sometime this breaks\n }\n return (\n newUrl\n .replace(/\\\\/g, '/')\n .replace(/webpack:\\/?/g, '') // Remove intermediate base path\n // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\n .replace(new RegExp(`(file://)?/*${escapedBase}/*`, 'ig'), 'app:///')\n );\n}\n\nexports.normalize = normalize;\nexports.normalizeToSize = normalizeToSize;\nexports.normalizeUrlToBase = normalizeUrlToBase;\nexports.walk = visit;\n//# sourceMappingURL=normalize.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst browser = require('./browser.js');\nconst debugBuild = require('./debug-build.js');\nconst is = require('./is.js');\nconst logger = require('./logger.js');\nconst string = require('./string.js');\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] ;\n const wrapped = replacementFactory(original) ;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n debugBuild.DEBUG_BUILD && logger.logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nfunction urlEncode(object) {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nfunction convertToPlainObject(\n value,\n)\n\n {\n if (is.isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (is.isEvent(value)) {\n const newObj\n\n = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && is.isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return is.isElement(target) ? browser.htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj )[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return string.truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return string.truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPojo(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue ;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue ;\n }\n\n return inputValue;\n}\n\nfunction isPojo(input) {\n if (!is.isPlainObject(input)) {\n return false;\n }\n\n try {\n const name = (Object.getPrototypeOf(input) ).constructor.name;\n return !name || name === 'Object';\n } catch (e) {\n return true;\n }\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case is.isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat ).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\nexports.addNonEnumerableProperty = addNonEnumerableProperty;\nexports.convertToPlainObject = convertToPlainObject;\nexports.dropUndefinedKeys = dropUndefinedKeys;\nexports.extractExceptionKeysForMessage = extractExceptionKeysForMessage;\nexports.fill = fill;\nexports.getOriginalFunction = getOriginalFunction;\nexports.markFunctionWrapped = markFunctionWrapped;\nexports.objectify = objectify;\nexports.urlEncode = urlEncode;\n//# sourceMappingURL=object.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://github.com/calvinmetcalf/rollup-plugin-node-builtins/blob/63ab8aacd013767445ca299e468d9a60a95328d7/src/es6/path.js\n//\n// Copyright Joyent, Inc.and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n/** JSDoc */\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n let up = 0;\n for (let i = parts.length - 1; i >= 0; i--) {\n const last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\S+:\\\\|\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^/\\\\]+?|)(\\.[^./\\\\]*|))(?:[/\\\\]*)$/;\n/** JSDoc */\nfunction splitPath(filename) {\n // Truncate files names greater than 1024 characters to avoid regex dos\n // https://github.com/getsentry/sentry-javascript/pull/8737#discussion_r1285719172\n const truncated = filename.length > 1024 ? `${filename.slice(-1024)}` : filename;\n const parts = splitPathRe.exec(truncated);\n return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nfunction resolve(...args) {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? args[i] : '/';\n\n // Skip empty entries\n if (!path) {\n continue;\n }\n\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(\n resolvedPath.split('/').filter(p => !!p),\n !resolvedAbsolute,\n ).join('/');\n\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr) {\n let start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n\n let end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nfunction relative(from, to) {\n /* eslint-disable no-param-reassign */\n from = resolve(from).slice(1);\n to = resolve(to).slice(1);\n /* eslint-enable no-param-reassign */\n\n const fromParts = trim(from.split('/'));\n const toParts = trim(to.split('/'));\n\n const length = Math.min(fromParts.length, toParts.length);\n let samePartsLength = length;\n for (let i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n let outputParts = [];\n for (let i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nfunction normalizePath(path) {\n const isPathAbsolute = isAbsolute(path);\n const trailingSlash = path.slice(-1) === '/';\n\n // Normalize the path\n let normalizedPath = normalizeArray(\n path.split('/').filter(p => !!p),\n !isPathAbsolute,\n ).join('/');\n\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nfunction isAbsolute(path) {\n return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nfunction join(...args) {\n return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nfunction dirname(path) {\n const result = splitPath(path);\n const root = result[0];\n let dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.slice(0, dir.length - 1);\n }\n\n return root + dir;\n}\n\n/** JSDoc */\nfunction basename(path, ext) {\n let f = splitPath(path)[2];\n if (ext && f.slice(ext.length * -1) === ext) {\n f = f.slice(0, f.length - ext.length);\n }\n return f;\n}\n\nexports.basename = basename;\nexports.dirname = dirname;\nexports.isAbsolute = isAbsolute;\nexports.join = join;\nexports.normalizePath = normalizePath;\nexports.relative = relative;\nexports.resolve = resolve;\n//# sourceMappingURL=path.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst error = require('./error.js');\nconst syncpromise = require('./syncpromise.js');\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nfunction makePromiseBuffer(limit) {\n const buffer = [];\n\n function isReady() {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task) {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer) {\n if (!isReady()) {\n return syncpromise.rejectedSyncPromise(new error.SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout) {\n return new syncpromise.SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void syncpromise.resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n\nexports.makePromiseBuffer = makePromiseBuffer;\n//# sourceMappingURL=promisebuffer.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\n\nconst DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nfunction parseRetryAfterHeader(header, now = Date.now()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nfunction disabledUntil(limits, category) {\n return limits[category] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nfunction isRateLimited(limits, category, now = Date.now()) {\n return disabledUntil(limits, category) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nfunction updateRateLimits(\n limits,\n { statusCode, headers },\n now = Date.now(),\n) {\n const updatedRateLimits = {\n ...limits,\n };\n\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers && headers['x-sentry-rate-limits'];\n const retryAfterHeader = headers && headers['retry-after'];\n\n if (rateLimitHeader) {\n /**\n * rate limit headers are of the form\n * ,,..\n * where each is of the form\n * : : : \n * where\n * is a delay in seconds\n * is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * ;;...\n * is what's being limited (org, project, or key) - ignored by SDK\n * is an arbitrary string like \"org_quota\" - ignored by SDK\n */\n for (const limit of rateLimitHeader.trim().split(',')) {\n const [retryAfter, categories] = limit.split(':', 2);\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(';')) {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1000;\n }\n\n return updatedRateLimits;\n}\n\nexports.DEFAULT_RETRY_AFTER = DEFAULT_RETRY_AFTER;\nexports.disabledUntil = disabledUntil;\nexports.isRateLimited = isRateLimited;\nexports.parseRetryAfterHeader = parseRetryAfterHeader;\nexports.updateRateLimits = updateRateLimits;\n//# sourceMappingURL=ratelimit.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst cookie = require('./cookie.js');\nconst debugBuild = require('./debug-build.js');\nconst is = require('./is.js');\nconst logger = require('./logger.js');\nconst normalize = require('./normalize.js');\nconst url = require('./url.js');\n\nconst DEFAULT_INCLUDES = {\n ip: false,\n request: true,\n transaction: true,\n user: true,\n};\nconst DEFAULT_REQUEST_INCLUDES = ['cookies', 'data', 'headers', 'method', 'query_string', 'url'];\nconst DEFAULT_USER_INCLUDES = ['id', 'username', 'email'];\n\n/**\n * Sets parameterized route as transaction name e.g.: `GET /users/:id`\n * Also adds more context data on the transaction from the request\n */\nfunction addRequestDataToTransaction(\n transaction,\n req,\n deps,\n) {\n if (!transaction) return;\n // eslint-disable-next-line deprecation/deprecation\n if (!transaction.metadata.source || transaction.metadata.source === 'url') {\n // Attempt to grab a parameterized route off of the request\n const [name, source] = extractPathForTransaction(req, { path: true, method: true });\n transaction.updateName(name);\n // TODO: SEMANTIC_ATTRIBUTE_SENTRY_SOURCE is in core, align this once we merge utils & core\n // eslint-disable-next-line deprecation/deprecation\n transaction.setMetadata({ source });\n }\n transaction.setAttribute('url', req.originalUrl || req.url);\n if (req.baseUrl) {\n transaction.setAttribute('baseUrl', req.baseUrl);\n }\n // TODO: We need to rewrite this to a flat format?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setData('query', extractQueryParams(req, deps));\n}\n\n/**\n * Extracts a complete and parameterized path from the request object and uses it to construct transaction name.\n * If the parameterized transaction name cannot be extracted, we fall back to the raw URL.\n *\n * Additionally, this function determines and returns the transaction name source\n *\n * eg. GET /mountpoint/user/:id\n *\n * @param req A request object\n * @param options What to include in the transaction name (method, path, or a custom route name to be\n * used instead of the request's route)\n *\n * @returns A tuple of the fully constructed transaction name [0] and its source [1] (can be either 'route' or 'url')\n */\nfunction extractPathForTransaction(\n req,\n options = {},\n) {\n const method = req.method && req.method.toUpperCase();\n\n let path = '';\n let source = 'url';\n\n // Check to see if there's a parameterized route we can use (as there is in Express)\n if (options.customRoute || req.route) {\n path = options.customRoute || `${req.baseUrl || ''}${req.route && req.route.path}`;\n source = 'route';\n }\n\n // Otherwise, just take the original URL\n else if (req.originalUrl || req.url) {\n path = url.stripUrlQueryAndFragment(req.originalUrl || req.url || '');\n }\n\n let name = '';\n if (options.method && method) {\n name += method;\n }\n if (options.method && options.path) {\n name += ' ';\n }\n if (options.path && path) {\n name += path;\n }\n\n return [name, source];\n}\n\n/** JSDoc */\nfunction extractTransaction(req, type) {\n switch (type) {\n case 'path': {\n return extractPathForTransaction(req, { path: true })[0];\n }\n case 'handler': {\n return (req.route && req.route.stack && req.route.stack[0] && req.route.stack[0].name) || '';\n }\n case 'methodPath':\n default: {\n // if exist _reconstructedRoute return that path instead of route.path\n const customRoute = req._reconstructedRoute ? req._reconstructedRoute : undefined;\n return extractPathForTransaction(req, { path: true, method: true, customRoute })[0];\n }\n }\n}\n\n/** JSDoc */\nfunction extractUserData(\n user\n\n,\n keys,\n) {\n const extractedUser = {};\n const attributes = Array.isArray(keys) ? keys : DEFAULT_USER_INCLUDES;\n\n attributes.forEach(key => {\n if (user && key in user) {\n extractedUser[key] = user[key];\n }\n });\n\n return extractedUser;\n}\n\n/**\n * Normalize data from the request object, accounting for framework differences.\n *\n * @param req The request object from which to extract data\n * @param options.include An optional array of keys to include in the normalized data. Defaults to\n * DEFAULT_REQUEST_INCLUDES if not provided.\n * @param options.deps Injected, platform-specific dependencies\n * @returns An object containing normalized request data\n */\nfunction extractRequestData(\n req,\n options\n\n,\n) {\n const { include = DEFAULT_REQUEST_INCLUDES, deps } = options || {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const requestData = {};\n\n // headers:\n // node, express, koa, nextjs: req.headers\n const headers = (req.headers || {})\n\n;\n // method:\n // node, express, koa, nextjs: req.method\n const method = req.method;\n // host:\n // express: req.hostname in > 4 and req.host in < 4\n // koa: req.host\n // node, nextjs: req.headers.host\n // Express 4 mistakenly strips off port number from req.host / req.hostname so we can't rely on them\n // See: https://github.com/expressjs/express/issues/3047#issuecomment-236653223\n // Also: https://github.com/getsentry/sentry-javascript/issues/1917\n const host = headers.host || req.hostname || req.host || '';\n // protocol:\n // node, nextjs: \n // express, koa: req.protocol\n const protocol = req.protocol === 'https' || (req.socket && req.socket.encrypted) ? 'https' : 'http';\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa, nextjs: req.url\n const originalUrl = req.originalUrl || req.url || '';\n // absolute url\n const absoluteUrl = originalUrl.startsWith(protocol) ? originalUrl : `${protocol}://${host}${originalUrl}`;\n include.forEach(key => {\n switch (key) {\n case 'headers': {\n requestData.headers = headers;\n\n // Remove the Cookie header in case cookie data should not be included in the event\n if (!include.includes('cookies')) {\n delete (requestData.headers ).cookie;\n }\n\n break;\n }\n case 'method': {\n requestData.method = method;\n break;\n }\n case 'url': {\n requestData.url = absoluteUrl;\n break;\n }\n case 'cookies': {\n // cookies:\n // node, express, koa: req.headers.cookie\n // vercel, sails.js, express (w/ cookie middleware), nextjs: req.cookies\n requestData.cookies =\n // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can\n // come off in v8\n req.cookies || (headers.cookie && cookie.parseCookie(headers.cookie)) || {};\n break;\n }\n case 'query_string': {\n // query string:\n // node: req.url (raw)\n // express, koa, nextjs: req.query\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n requestData.query_string = extractQueryParams(req, deps);\n break;\n }\n case 'data': {\n if (method === 'GET' || method === 'HEAD') {\n break;\n }\n // body data:\n // express, koa, nextjs: req.body\n //\n // when using node by itself, you have to read the incoming stream(see\n // https://nodejs.dev/learn/get-http-request-body-data-using-nodejs); if a user is doing that, we can't know\n // where they're going to store the final result, so they'll have to capture this data themselves\n if (req.body !== undefined) {\n requestData.data = is.isString(req.body) ? req.body : JSON.stringify(normalize.normalize(req.body));\n }\n break;\n }\n default: {\n if ({}.hasOwnProperty.call(req, key)) {\n requestData[key] = (req )[key];\n }\n }\n }\n });\n\n return requestData;\n}\n\n/**\n * Add data from the given request to the given event\n *\n * @param event The event to which the request data will be added\n * @param req Request object\n * @param options.include Flags to control what data is included\n * @param options.deps Injected platform-specific dependencies\n * @returns The mutated `Event` object\n */\nfunction addRequestDataToEvent(\n event,\n req,\n options,\n) {\n const include = {\n ...DEFAULT_INCLUDES,\n ...(options && options.include),\n };\n\n if (include.request) {\n const extractedRequestData = Array.isArray(include.request)\n ? extractRequestData(req, { include: include.request, deps: options && options.deps })\n : extractRequestData(req, { deps: options && options.deps });\n\n event.request = {\n ...event.request,\n ...extractedRequestData,\n };\n }\n\n if (include.user) {\n const extractedUser = req.user && is.isPlainObject(req.user) ? extractUserData(req.user, include.user) : {};\n\n if (Object.keys(extractedUser).length) {\n event.user = {\n ...event.user,\n ...extractedUser,\n };\n }\n }\n\n // client ip:\n // node, nextjs: req.socket.remoteAddress\n // express, koa: req.ip\n if (include.ip) {\n const ip = req.ip || (req.socket && req.socket.remoteAddress);\n if (ip) {\n event.user = {\n ...event.user,\n ip_address: ip,\n };\n }\n }\n\n if (include.transaction && !event.transaction) {\n // TODO do we even need this anymore?\n // TODO make this work for nextjs\n event.transaction = extractTransaction(req, include.transaction);\n }\n\n return event;\n}\n\nfunction extractQueryParams(\n req,\n deps,\n) {\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa, nextjs: req.url\n let originalUrl = req.originalUrl || req.url || '';\n\n if (!originalUrl) {\n return;\n }\n\n // The `URL` constructor can't handle internal URLs of the form `/some/path/here`, so stick a dummy protocol and\n // hostname on the beginning. Since the point here is just to grab the query string, it doesn't matter what we use.\n if (originalUrl.startsWith('/')) {\n originalUrl = `http://dogs.are.great${originalUrl}`;\n }\n\n try {\n return (\n req.query ||\n (typeof URL !== 'undefined' && new URL(originalUrl).search.slice(1)) ||\n // In Node 8, `URL` isn't in the global scope, so we have to use the built-in module from Node\n (deps && deps.url && deps.url.parse(originalUrl).query) ||\n undefined\n );\n } catch (e2) {\n return undefined;\n }\n}\n\n/**\n * Transforms a `Headers` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into a simple key-value dict.\n * The header keys will be lower case: e.g. A \"Content-Type\" header will be stored as \"content-type\".\n */\n// TODO(v8): Make this function return undefined when the extraction fails.\nfunction winterCGHeadersToDict(winterCGHeaders) {\n const headers = {};\n try {\n winterCGHeaders.forEach((value, key) => {\n if (typeof value === 'string') {\n // We check that value is a string even though it might be redundant to make sure prototype pollution is not possible.\n headers[key] = value;\n }\n });\n } catch (e) {\n debugBuild.DEBUG_BUILD &&\n logger.logger.warn('Sentry failed extracting headers from a request object. If you see this, please file an issue.');\n }\n\n return headers;\n}\n\n/**\n * Converts a `Request` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into the format that the `RequestData` integration understands.\n */\nfunction winterCGRequestToRequestData(req) {\n const headers = winterCGHeadersToDict(req.headers);\n return {\n method: req.method,\n url: req.url,\n headers,\n };\n}\n\nexports.DEFAULT_USER_INCLUDES = DEFAULT_USER_INCLUDES;\nexports.addRequestDataToEvent = addRequestDataToEvent;\nexports.addRequestDataToTransaction = addRequestDataToTransaction;\nexports.extractPathForTransaction = extractPathForTransaction;\nexports.extractRequestData = extractRequestData;\nexports.winterCGHeadersToDict = winterCGHeadersToDict;\nexports.winterCGRequestToRequestData = winterCGRequestToRequestData;\n//# sourceMappingURL=requestdata.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n// Note: Ideally the `SeverityLevel` type would be derived from `validSeverityLevels`, but that would mean either\n//\n// a) moving `validSeverityLevels` to `@sentry/types`,\n// b) moving the`SeverityLevel` type here, or\n// c) importing `validSeverityLevels` from here into `@sentry/types`.\n//\n// Option A would make `@sentry/types` a runtime dependency of `@sentry/utils` (not good), and options B and C would\n// create a circular dependency between `@sentry/types` and `@sentry/utils` (also not good). So a TODO accompanying the\n// type, reminding anyone who changes it to change this list also, will have to do.\n\nconst validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug'];\n\n/**\n * Converts a string-based level into a member of the deprecated {@link Severity} enum.\n *\n * @deprecated `severityFromString` is deprecated. Please use `severityLevelFromString` instead.\n *\n * @param level String representation of Severity\n * @returns Severity\n */\nfunction severityFromString(level) {\n return severityLevelFromString(level) ;\n}\n\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nfunction severityLevelFromString(level) {\n return (level === 'warn' ? 'warning' : validSeverityLevels.includes(level) ? level : 'log') ;\n}\n\nexports.severityFromString = severityFromString;\nexports.severityLevelFromString = severityLevelFromString;\nexports.validSeverityLevels = validSeverityLevels;\n//# sourceMappingURL=severity.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst nodeStackTrace = require('./node-stack-trace.js');\n\nconst STACKTRACE_FRAME_LIMIT = 50;\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nfunction createStackParser(...parsers) {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n return (stack, skipFirst = 0) => {\n const frames = [];\n const lines = stack.split('\\n');\n\n for (let i = skipFirst; i < lines.length; i++) {\n const line = lines[i];\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) {\n continue;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) {\n continue;\n }\n\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n\n if (frames.length >= STACKTRACE_FRAME_LIMIT) {\n break;\n }\n }\n\n return stripSentryFramesAndReverse(frames);\n };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nfunction stackParserFromStackParserOptions(stackParser) {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nfunction stripSentryFramesAndReverse(stack) {\n if (!stack.length) {\n return [];\n }\n\n const localStack = Array.from(stack);\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the hub itself, making it:\n //\n // Sentry.captureException()\n // getCurrentHub().captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n }\n\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n ...frame,\n filename: frame.filename || localStack[localStack.length - 1].filename,\n function: frame.function || '?',\n }));\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nfunction getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * Node.js stack line parser\n *\n * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.\n * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain\n */\nfunction nodeStackLineParser(getModule) {\n return [90, nodeStackTrace.node(getModule)];\n}\n\nexports.filenameIsInApp = nodeStackTrace.filenameIsInApp;\nexports.createStackParser = createStackParser;\nexports.getFunctionName = getFunctionName;\nexports.nodeStackLineParser = nodeStackLineParser;\nexports.stackParserFromStackParserOptions = stackParserFromStackParserOptions;\nexports.stripSentryFramesAndReverse = stripSentryFramesAndReverse;\n//# sourceMappingURL=stacktrace.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst is = require('./is.js');\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nfunction truncate(str, max = 0) {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nfunction snipLine(line, colno) {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/8981\n if (is.isVueViewModel(value)) {\n output.push('[VueViewModel]');\n } else {\n output.push(String(value));\n }\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nfunction isMatchingPattern(\n value,\n pattern,\n requireExactStringMatch = false,\n) {\n if (!is.isString(value)) {\n return false;\n }\n\n if (is.isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (is.isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nfunction stringMatchesSomePattern(\n testString,\n patterns = [],\n requireExactStringMatch = false,\n) {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n\nexports.isMatchingPattern = isMatchingPattern;\nexports.safeJoin = safeJoin;\nexports.snipLine = snipLine;\nexports.stringMatchesSomePattern = stringMatchesSomePattern;\nexports.truncate = truncate;\n//# sourceMappingURL=string.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst debugBuild = require('./debug-build.js');\nconst logger = require('./logger.js');\nconst worldwide = require('./worldwide.js');\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = worldwide.getGlobalObject();\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMException() {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsFetch() {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nfunction supportsNativeFetch() {\n if (typeof EdgeRuntime === 'string') {\n return true;\n }\n\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement ) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n debugBuild.DEBUG_BUILD &&\n logger.logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReportingObserver() {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' ,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\nexports.isNativeFetch = isNativeFetch;\nexports.supportsDOMError = supportsDOMError;\nexports.supportsDOMException = supportsDOMException;\nexports.supportsErrorEvent = supportsErrorEvent;\nexports.supportsFetch = supportsFetch;\nexports.supportsNativeFetch = supportsNativeFetch;\nexports.supportsReferrerPolicy = supportsReferrerPolicy;\nexports.supportsReportingObserver = supportsReportingObserver;\n//# sourceMappingURL=supports.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst is = require('./is.js');\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/** SyncPromise internal states */\nvar States; (function (States) {\n /** Pending */\n const PENDING = 0; States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n const RESOLVED = 1; States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n const REJECTED = 2; States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n\n constructor(\n executor,\n ) {SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n then(\n onfulfilled,\n onrejected,\n ) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result );\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n catch(\n onrejected,\n ) {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val );\n });\n });\n }\n\n /** JSDoc */\n __init() {this._resolve = (value) => {\n this._setResult(States.RESOLVED, value);\n };}\n\n /** JSDoc */\n __init2() {this._reject = (reason) => {\n this._setResult(States.REJECTED, reason);\n };}\n\n /** JSDoc */\n __init3() {this._setResult = (state, value) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (is.isThenable(value)) {\n void (value ).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };}\n\n /** JSDoc */\n __init4() {this._executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value );\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };}\n}\n\nexports.SyncPromise = SyncPromise;\nexports.rejectedSyncPromise = rejectedSyncPromise;\nexports.resolvedSyncPromise = resolvedSyncPromise;\n//# sourceMappingURL=syncpromise.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst worldwide = require('./worldwide.js');\n\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n *\n * TODO(v8): Return type should be rounded.\n */\nfunction dateTimestampInSeconds() {\n return Date.now() / ONE_SECOND_IN_MS;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction createUnixTimestampInSecondsFunc() {\n const { performance } = worldwide.GLOBAL_OBJ ;\n if (!performance || !performance.now) {\n return dateTimestampInSeconds;\n }\n\n // Some browser and environments don't have a timeOrigin, so we fallback to\n // using Date.now() to compute the starting time.\n const approxStartingTimeOrigin = Date.now() - performance.now();\n const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin;\n\n // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n //\n // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n // correct for this.\n // See: https://github.com/getsentry/sentry-javascript/issues/2590\n // See: https://github.com/mdn/content/issues/4713\n // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n return () => {\n return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;\n };\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = createUnixTimestampInSecondsFunc();\n\n/**\n * Re-exported with an old name for backwards-compatibility.\n * TODO (v8): Remove this\n *\n * @deprecated Use `timestampInSeconds` instead.\n */\nconst timestampWithMs = timestampInSeconds;\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nexports._browserPerformanceTimeOriginMode = void 0;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nconst browserPerformanceTimeOrigin = (() => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = worldwide.GLOBAL_OBJ ;\n if (!performance || !performance.now) {\n exports._browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n exports._browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n exports._browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n exports._browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n\nexports.browserPerformanceTimeOrigin = browserPerformanceTimeOrigin;\nexports.dateTimestampInSeconds = dateTimestampInSeconds;\nexports.timestampInSeconds = timestampInSeconds;\nexports.timestampWithMs = timestampWithMs;\n//# sourceMappingURL=time.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst baggage = require('./baggage.js');\nconst misc = require('./misc.js');\n\n// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- RegExp is used for readability here\nconst TRACEPARENT_REGEXP = new RegExp(\n '^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nfunction extractTraceparentData(traceparent) {\n if (!traceparent) {\n return undefined;\n }\n\n const matches = traceparent.match(TRACEPARENT_REGEXP);\n if (!matches) {\n return undefined;\n }\n\n let parentSampled;\n if (matches[3] === '1') {\n parentSampled = true;\n } else if (matches[3] === '0') {\n parentSampled = false;\n }\n\n return {\n traceId: matches[1],\n parentSampled,\n parentSpanId: matches[2],\n };\n}\n\n/**\n * Create tracing context from incoming headers.\n *\n * @deprecated Use `propagationContextFromHeaders` instead.\n */\n// TODO(v8): Remove this function\nfunction tracingContextFromHeaders(\n sentryTrace,\n baggage$1,\n)\n\n {\n const traceparentData = extractTraceparentData(sentryTrace);\n const dynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext(baggage$1);\n\n const { traceId, parentSpanId, parentSampled } = traceparentData || {};\n\n if (!traceparentData) {\n return {\n traceparentData,\n dynamicSamplingContext: undefined,\n propagationContext: {\n traceId: traceId || misc.uuid4(),\n spanId: misc.uuid4().substring(16),\n },\n };\n } else {\n return {\n traceparentData,\n dynamicSamplingContext: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n propagationContext: {\n traceId: traceId || misc.uuid4(),\n parentSpanId: parentSpanId || misc.uuid4().substring(16),\n spanId: misc.uuid4().substring(16),\n sampled: parentSampled,\n dsc: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n },\n };\n }\n}\n\n/**\n * Create a propagation context from incoming headers.\n */\nfunction propagationContextFromHeaders(\n sentryTrace,\n baggage$1,\n) {\n const traceparentData = extractTraceparentData(sentryTrace);\n const dynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext(baggage$1);\n\n const { traceId, parentSpanId, parentSampled } = traceparentData || {};\n\n if (!traceparentData) {\n return {\n traceId: traceId || misc.uuid4(),\n spanId: misc.uuid4().substring(16),\n };\n } else {\n return {\n traceId: traceId || misc.uuid4(),\n parentSpanId: parentSpanId || misc.uuid4().substring(16),\n spanId: misc.uuid4().substring(16),\n sampled: parentSampled,\n dsc: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n };\n }\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nfunction generateSentryTraceHeader(\n traceId = misc.uuid4(),\n spanId = misc.uuid4().substring(16),\n sampled,\n) {\n let sampledString = '';\n if (sampled !== undefined) {\n sampledString = sampled ? '-1' : '-0';\n }\n return `${traceId}-${spanId}${sampledString}`;\n}\n\nexports.TRACEPARENT_REGEXP = TRACEPARENT_REGEXP;\nexports.extractTraceparentData = extractTraceparentData;\nexports.generateSentryTraceHeader = generateSentryTraceHeader;\nexports.propagationContextFromHeaders = propagationContextFromHeaders;\nexports.tracingContextFromHeaders = tracingContextFromHeaders;\n//# sourceMappingURL=tracing.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nfunction parseUrl(url) {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nfunction stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}\n\n/**\n * Returns number of URL segments of a passed string URL.\n */\nfunction getNumberOfUrlSegments(url) {\n // split at '/' or at '\\/' to split regex urls correctly\n return url.split(/\\\\?\\//).filter(s => s.length > 0 && s !== ',').length;\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span description\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nfunction getSanitizedUrlString(url) {\n const { protocol, host, path } = url;\n\n const filteredHost =\n (host &&\n host\n // Always filter out authority\n .replace(/^.*@/, '[filtered]:[filtered]@')\n // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n // TODO: Use new URL global if it exists\n .replace(/(:80)$/, '')\n .replace(/(:443)$/, '')) ||\n '';\n\n return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n\nexports.getNumberOfUrlSegments = getNumberOfUrlSegments;\nexports.getSanitizedUrlString = getSanitizedUrlString;\nexports.parseUrl = parseUrl;\nexports.stripUrlQueryAndFragment = stripUrlQueryAndFragment;\n//# sourceMappingURL=url.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Recursively traverses an object to update an existing nested key.\n * Note: The provided key path must include existing properties,\n * the function will not create objects while traversing.\n *\n * @param obj An object to update\n * @param value The value to update the nested key with\n * @param keyPath The path to the key to update ex. fizz.buzz.foo\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setNestedKey(obj, keyPath, value) {\n // Ex. foo.bar.zoop will extract foo and bar.zoop\n const match = keyPath.match(/([a-z_]+)\\.(.*)/i);\n // The match will be null when there's no more recursing to do, i.e., when we've reached the right level of the object\n if (match === null) {\n obj[keyPath] = value;\n } else {\n // `match[1]` is the initial segment of the path, and `match[2]` is the remainder of the path\n const innerObj = obj[match[1]];\n setNestedKey(innerObj, match[2], value);\n }\n}\n\n/**\n * Enforces inclusion of a given integration with specified options in an integration array originally determined by the\n * user, by either including the given default instance or by patching an existing user instance with the given options.\n *\n * Ideally this would happen when integrations are set up, but there isn't currently a mechanism there for merging\n * options from a default integration instance with those from a user-provided instance of the same integration, only\n * for allowing the user to override a default instance entirely. (TODO: Fix that.)\n *\n * @param defaultIntegrationInstance An instance of the integration with the correct options already set\n * @param userIntegrations Integrations defined by the user.\n * @param forcedOptions Options with which to patch an existing user-derived instance on the integration.\n * @returns A final integrations array.\n *\n * @deprecated This will be removed in v8.\n */\nfunction addOrUpdateIntegration(\n defaultIntegrationInstance,\n userIntegrations,\n forcedOptions = {},\n) {\n return (\n Array.isArray(userIntegrations)\n ? addOrUpdateIntegrationInArray(defaultIntegrationInstance, userIntegrations, forcedOptions)\n : addOrUpdateIntegrationInFunction(\n defaultIntegrationInstance,\n // Somehow TS can't figure out that not being an array makes this necessarily a function\n userIntegrations ,\n forcedOptions,\n )\n ) ;\n}\n\nfunction addOrUpdateIntegrationInArray(\n defaultIntegrationInstance,\n userIntegrations,\n forcedOptions,\n) {\n const userInstance = userIntegrations.find(integration => integration.name === defaultIntegrationInstance.name);\n\n if (userInstance) {\n for (const [keyPath, value] of Object.entries(forcedOptions)) {\n setNestedKey(userInstance, keyPath, value);\n }\n\n return userIntegrations;\n }\n\n return [...userIntegrations, defaultIntegrationInstance];\n}\n\nfunction addOrUpdateIntegrationInFunction(\n defaultIntegrationInstance,\n userIntegrationsFunc,\n forcedOptions,\n) {\n const wrapper = defaultIntegrations => {\n const userFinalIntegrations = userIntegrationsFunc(defaultIntegrations);\n\n // There are instances where we want the user to be able to prevent an integration from appearing at all, which they\n // would do by providing a function which filters out the integration in question. If that's happened in one of\n // those cases, don't add our default back in.\n if (defaultIntegrationInstance.allowExclusionByUser) {\n const userFinalInstance = userFinalIntegrations.find(\n integration => integration.name === defaultIntegrationInstance.name,\n );\n if (!userFinalInstance) {\n return userFinalIntegrations;\n }\n }\n\n return addOrUpdateIntegrationInArray(defaultIntegrationInstance, userFinalIntegrations, forcedOptions);\n };\n\n return wrapper;\n}\n\nexports.addOrUpdateIntegration = addOrUpdateIntegration;\n//# sourceMappingURL=userIntegrations.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n// Based on https://github.com/sindresorhus/escape-string-regexp but with modifications to:\n// a) reduce the size by skipping the runtime type - checking\n// b) ensure it gets down - compiled for old versions of Node(the published package only supports Node 12+).\n//\n// MIT License\n//\n// Copyright (c) Sindre Sorhus (https://sindresorhus.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\n// documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation\n// the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and\n// to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of\n// the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n\n/**\n * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to\n * `new RegExp()`.\n *\n * @param regexString The string to escape\n * @returns An version of the string with all special regex characters escaped\n */\nfunction escapeStringForRegex(regexString) {\n // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems\n // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.\n return regexString.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n\nexports.escapeStringForRegex = escapeStringForRegex;\n//# sourceMappingURL=escapeStringForRegex.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst worldwide = require('../worldwide.js');\n\n// Based on https://github.com/angular/angular.js/pull/13945/files\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = worldwide.getGlobalObject();\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chromeVar = (WINDOW ).chrome;\n const isChromePackagedApp = chromeVar && chromeVar.app && chromeVar.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n\nexports.supportsHistory = supportsHistory;\n//# sourceMappingURL=supportsHistory.js.map\n","Object.defineProperty(exports, '__esModule', { value: true });\n\n/** Internal global with common properties and Sentry extensions */\n\n// The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification\n// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js\n// core-js has the following licence:\n//\n// Copyright (c) 2014-2022 Denis Pushkarev\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/** Returns 'obj' if it's the global object, otherwise returns undefined */\nfunction isGlobalObj(obj) {\n return obj && obj.Math == Math ? obj : undefined;\n}\n\n/** Get's the global object for the current JavaScript runtime */\nconst GLOBAL_OBJ =\n (typeof globalThis == 'object' && isGlobalObj(globalThis)) ||\n // eslint-disable-next-line no-restricted-globals\n (typeof window == 'object' && isGlobalObj(window)) ||\n (typeof self == 'object' && isGlobalObj(self)) ||\n (typeof global == 'object' && isGlobalObj(global)) ||\n (function () {\n return this;\n })() ||\n {};\n\n/**\n * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8\n */\nfunction getGlobalObject() {\n return GLOBAL_OBJ ;\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nfunction getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n\nexports.GLOBAL_OBJ = GLOBAL_OBJ;\nexports.getGlobalObject = getGlobalObject;\nexports.getGlobalSingleton = getGlobalSingleton;\n//# sourceMappingURL=worldwide.js.map\n","module.exports = require('./lib/clean');\n","/**\n * Clean-css - https://github.com/jakubpawlowicz/clean-css\n * Released under the terms of MIT license\n *\n * Copyright (C) 2017 JakubPawlowicz.com\n */\n\nvar level0Optimize = require('./optimizer/level-0/optimize');\nvar level1Optimize = require('./optimizer/level-1/optimize');\nvar level2Optimize = require('./optimizer/level-2/optimize');\nvar validator = require('./optimizer/validator');\n\nvar compatibilityFrom = require('./options/compatibility');\nvar fetchFrom = require('./options/fetch');\nvar formatFrom = require('./options/format').formatFrom;\nvar inlineFrom = require('./options/inline');\nvar inlineRequestFrom = require('./options/inline-request');\nvar inlineTimeoutFrom = require('./options/inline-timeout');\nvar OptimizationLevel = require('./options/optimization-level').OptimizationLevel;\nvar optimizationLevelFrom = require('./options/optimization-level').optimizationLevelFrom;\nvar rebaseFrom = require('./options/rebase');\nvar rebaseToFrom = require('./options/rebase-to');\n\nvar inputSourceMapTracker = require('./reader/input-source-map-tracker');\nvar readSources = require('./reader/read-sources');\n\nvar serializeStyles = require('./writer/simple');\nvar serializeStylesAndSourceMap = require('./writer/source-maps');\n\nvar CleanCSS = module.exports = function CleanCSS(options) {\n options = options || {};\n\n this.options = {\n compatibility: compatibilityFrom(options.compatibility),\n fetch: fetchFrom(options.fetch),\n format: formatFrom(options.format),\n inline: inlineFrom(options.inline),\n inlineRequest: inlineRequestFrom(options.inlineRequest),\n inlineTimeout: inlineTimeoutFrom(options.inlineTimeout),\n level: optimizationLevelFrom(options.level),\n rebase: rebaseFrom(options.rebase),\n rebaseTo: rebaseToFrom(options.rebaseTo),\n returnPromise: !!options.returnPromise,\n sourceMap: !!options.sourceMap,\n sourceMapInlineSources: !!options.sourceMapInlineSources\n };\n};\n\n\n// for compatibility with optimize-css-assets-webpack-plugin\nCleanCSS.process = function (input, opts) {\n var cleanCss;\n var optsTo = opts.to;\n\n delete opts.to;\n cleanCss = new CleanCSS(Object.assign({ returnPromise: true, rebaseTo: optsTo }, opts));\n\n return cleanCss.minify(input)\n .then(function(output) {\n return { css: output.styles };\n });\n};\n\n\nCleanCSS.prototype.minify = function (input, maybeSourceMap, maybeCallback) {\n var options = this.options;\n\n if (options.returnPromise) {\n return new Promise(function (resolve, reject) {\n minify(input, options, maybeSourceMap, function (errors, output) {\n return errors ?\n reject(errors) :\n resolve(output);\n });\n });\n } else {\n return minify(input, options, maybeSourceMap, maybeCallback);\n }\n};\n\nfunction minify(input, options, maybeSourceMap, maybeCallback) {\n var sourceMap = typeof maybeSourceMap != 'function' ?\n maybeSourceMap :\n null;\n var callback = typeof maybeCallback == 'function' ?\n maybeCallback :\n (typeof maybeSourceMap == 'function' ? maybeSourceMap : null);\n var context = {\n stats: {\n efficiency: 0,\n minifiedSize: 0,\n originalSize: 0,\n startedAt: Date.now(),\n timeSpent: 0\n },\n cache: {\n specificity: {}\n },\n errors: [],\n inlinedStylesheets: [],\n inputSourceMapTracker: inputSourceMapTracker(),\n localOnly: !callback,\n options: options,\n source: null,\n sourcesContent: {},\n validator: validator(options.compatibility),\n warnings: []\n };\n\n if (sourceMap) {\n context.inputSourceMapTracker.track(undefined, sourceMap);\n }\n\n return runner(context.localOnly)(function () {\n return readSources(input, context, function (tokens) {\n var serialize = context.options.sourceMap ?\n serializeStylesAndSourceMap :\n serializeStyles;\n\n var optimizedTokens = optimize(tokens, context);\n var optimizedStyles = serialize(optimizedTokens, context);\n var output = withMetadata(optimizedStyles, context);\n\n return callback ?\n callback(context.errors.length > 0 ? context.errors : null, output) :\n output;\n });\n });\n}\n\nfunction runner(localOnly) {\n // to always execute code asynchronously when a callback is given\n // more at blog.izs.me/post/59142742143/designing-apis-for-asynchrony\n return localOnly ?\n function (callback) { return callback(); } :\n process.nextTick;\n}\n\nfunction optimize(tokens, context) {\n var optimized;\n\n optimized = level0Optimize(tokens, context);\n optimized = OptimizationLevel.One in context.options.level ?\n level1Optimize(tokens, context) :\n tokens;\n optimized = OptimizationLevel.Two in context.options.level ?\n level2Optimize(tokens, context, true) :\n optimized;\n\n return optimized;\n}\n\nfunction withMetadata(output, context) {\n output.stats = calculateStatsFrom(output.styles, context);\n output.errors = context.errors;\n output.inlinedStylesheets = context.inlinedStylesheets;\n output.warnings = context.warnings;\n\n return output;\n}\n\nfunction calculateStatsFrom(styles, context) {\n var finishedAt = Date.now();\n var timeSpent = finishedAt - context.stats.startedAt;\n\n delete context.stats.startedAt;\n context.stats.timeSpent = timeSpent;\n context.stats.efficiency = 1 - styles.length / context.stats.originalSize;\n context.stats.minifiedSize = styles.length;\n\n return context.stats;\n}\n","var Hack = {\n ASTERISK: 'asterisk',\n BANG: 'bang',\n BACKSLASH: 'backslash',\n UNDERSCORE: 'underscore'\n};\n\nmodule.exports = Hack;\n","function level0Optimize(tokens) {\n // noop as level 0 means no optimizations!\n return tokens;\n}\n\nmodule.exports = level0Optimize;\n","var shortenHex = require('./shorten-hex');\nvar shortenHsl = require('./shorten-hsl');\nvar shortenRgb = require('./shorten-rgb');\nvar sortSelectors = require('./sort-selectors');\nvar tidyRules = require('./tidy-rules');\nvar tidyBlock = require('./tidy-block');\nvar tidyAtRule = require('./tidy-at-rule');\n\nvar Hack = require('../hack');\nvar removeUnused = require('../remove-unused');\nvar restoreFromOptimizing = require('../restore-from-optimizing');\nvar wrapForOptimizing = require('../wrap-for-optimizing').all;\n\nvar OptimizationLevel = require('../../options/optimization-level').OptimizationLevel;\n\nvar Token = require('../../tokenizer/token');\nvar Marker = require('../../tokenizer/marker');\n\nvar formatPosition = require('../../utils/format-position');\nvar split = require('../../utils/split');\n\nvar serializeRules = require('../../writer/one-time').rules;\n\nvar IgnoreProperty = 'ignore-property';\n\nvar CHARSET_TOKEN = '@charset';\nvar CHARSET_REGEXP = new RegExp('^' + CHARSET_TOKEN, 'i');\n\nvar DEFAULT_ROUNDING_PRECISION = require('../../options/rounding-precision').DEFAULT;\n\nvar WHOLE_PIXEL_VALUE = /(?:^|\\s|\\()(-?\\d+)px/;\nvar TIME_VALUE = /^(\\-?[\\d\\.]+)(m?s)$/;\n\nvar HEX_VALUE_PATTERN = /[0-9a-f]/i;\nvar PROPERTY_NAME_PATTERN = /^(?:\\-chrome\\-|\\-[\\w\\-]+\\w|\\w[\\w\\-]+\\w|\\-\\-\\S+)$/;\nvar IMPORT_PREFIX_PATTERN = /^@import/i;\nvar QUOTED_PATTERN = /^('.*'|\".*\")$/;\nvar QUOTED_BUT_SAFE_PATTERN = /^['\"][a-zA-Z][a-zA-Z\\d\\-_]+['\"]$/;\nvar URL_PREFIX_PATTERN = /^url\\(/i;\nvar LOCAL_PREFIX_PATTERN = /^local\\(/i;\nvar VARIABLE_NAME_PATTERN = /^--\\S+$/;\n\nfunction isLocal(value){\n return LOCAL_PREFIX_PATTERN.test(value);\n}\n\nfunction isNegative(value) {\n return value && value[1][0] == '-' && parseFloat(value[1]) < 0;\n}\n\nfunction isQuoted(value) {\n return QUOTED_PATTERN.test(value);\n}\n\nfunction isUrl(value) {\n return URL_PREFIX_PATTERN.test(value);\n}\n\nfunction normalizeUrl(value) {\n return value\n .replace(URL_PREFIX_PATTERN, 'url(')\n .replace(/\\\\?\\n|\\\\?\\r\\n/g, '');\n}\n\nfunction optimizeBackground(property) {\n var values = property.value;\n\n if (values.length == 1 && values[0][1] == 'none') {\n values[0][1] = '0 0';\n }\n\n if (values.length == 1 && values[0][1] == 'transparent') {\n values[0][1] = '0 0';\n }\n}\n\nfunction optimizeBorderRadius(property) {\n var values = property.value;\n var spliceAt;\n\n if (values.length == 3 && values[1][1] == '/' && values[0][1] == values[2][1]) {\n spliceAt = 1;\n } else if (values.length == 5 && values[2][1] == '/' && values[0][1] == values[3][1] && values[1][1] == values[4][1]) {\n spliceAt = 2;\n } else if (values.length == 7 && values[3][1] == '/' && values[0][1] == values[4][1] && values[1][1] == values[5][1] && values[2][1] == values[6][1]) {\n spliceAt = 3;\n } else if (values.length == 9 && values[4][1] == '/' && values[0][1] == values[5][1] && values[1][1] == values[6][1] && values[2][1] == values[7][1] && values[3][1] == values[8][1]) {\n spliceAt = 4;\n }\n\n if (spliceAt) {\n property.value.splice(spliceAt);\n property.dirty = true;\n }\n}\n\n/**\n * @param {string} name\n * @param {string} value\n * @param {Object} compatibility\n * @return {string}\n */\nfunction optimizeColors(name, value, compatibility) {\n if (!value.match(/#|rgb|hsl/gi)) {\n return shortenHex(value);\n }\n\n value = value\n .replace(/(rgb|hsl)a?\\((\\-?\\d+),(\\-?\\d+\\%?),(\\-?\\d+\\%?),(0*[1-9]+[0-9]*(\\.?\\d*)?)\\)/gi, function (match, colorFn, p1, p2, p3, alpha) {\n return (parseInt(alpha, 10) >= 1 ? colorFn + '(' + [p1,p2,p3].join(',') + ')' : match);\n })\n .replace(/rgb\\((\\-?\\d+),(\\-?\\d+),(\\-?\\d+)\\)/gi, function (match, red, green, blue) {\n return shortenRgb(red, green, blue);\n })\n .replace(/hsl\\((-?\\d+),(-?\\d+)%?,(-?\\d+)%?\\)/gi, function (match, hue, saturation, lightness) {\n return shortenHsl(hue, saturation, lightness);\n })\n .replace(/(^|[^='\"])#([0-9a-f]{6})/gi, function (match, prefix, color, at, inputValue) {\n var suffix = inputValue[at + match.length];\n\n if (suffix && HEX_VALUE_PATTERN.test(suffix)) {\n return match;\n } else if (color[0] == color[1] && color[2] == color[3] && color[4] == color[5]) {\n return (prefix + '#' + color[0] + color[2] + color[4]).toLowerCase();\n } else {\n return (prefix + '#' + color).toLowerCase();\n }\n })\n .replace(/(^|[^='\"])#([0-9a-f]{3})/gi, function (match, prefix, color) {\n return prefix + '#' + color.toLowerCase();\n })\n .replace(/(rgb|rgba|hsl|hsla)\\(([^\\)]+)\\)/gi, function (match, colorFunction, colorDef) {\n var tokens = colorDef.split(',');\n var colorFnLowercase = colorFunction && colorFunction.toLowerCase();\n var applies = (colorFnLowercase == 'hsl' && tokens.length == 3) ||\n (colorFnLowercase == 'hsla' && tokens.length == 4) ||\n (colorFnLowercase == 'rgb' && tokens.length === 3 && colorDef.indexOf('%') > 0) ||\n (colorFnLowercase == 'rgba' && tokens.length == 4 && colorDef.indexOf('%') > 0);\n\n if (!applies) {\n return match;\n }\n\n if (tokens[1].indexOf('%') == -1) {\n tokens[1] += '%';\n }\n\n if (tokens[2].indexOf('%') == -1) {\n tokens[2] += '%';\n }\n\n return colorFunction + '(' + tokens.join(',') + ')';\n });\n\n if (compatibility.colors.opacity && name.indexOf('background') == -1) {\n value = value.replace(/(?:rgba|hsla)\\(0,0%?,0%?,0\\)/g, function (match) {\n if (split(value, ',').pop().indexOf('gradient(') > -1) {\n return match;\n }\n\n return 'transparent';\n });\n }\n\n return shortenHex(value);\n}\n\nfunction optimizeFilter(property) {\n if (property.value.length == 1) {\n property.value[0][1] = property.value[0][1].replace(/progid:DXImageTransform\\.Microsoft\\.(Alpha|Chroma)(\\W)/, function (match, filter, suffix) {\n return filter.toLowerCase() + suffix;\n });\n }\n\n property.value[0][1] = property.value[0][1]\n .replace(/,(\\S)/g, ', $1')\n .replace(/ ?= ?/g, '=');\n}\n\nfunction optimizeFontWeight(property, atIndex) {\n var value = property.value[atIndex][1];\n\n if (value == 'normal') {\n value = '400';\n } else if (value == 'bold') {\n value = '700';\n }\n\n property.value[atIndex][1] = value;\n}\n\nfunction optimizeMultipleZeros(property) {\n var values = property.value;\n var spliceAt;\n\n if (values.length == 4 && values[0][1] === '0' && values[1][1] === '0' && values[2][1] === '0' && values[3][1] === '0') {\n if (property.name.indexOf('box-shadow') > -1) {\n spliceAt = 2;\n } else {\n spliceAt = 1;\n }\n }\n\n if (spliceAt) {\n property.value.splice(spliceAt);\n property.dirty = true;\n }\n}\n\nfunction optimizeOutline(property) {\n var values = property.value;\n\n if (values.length == 1 && values[0][1] == 'none') {\n values[0][1] = '0';\n }\n}\n\nfunction optimizePixelLengths(_, value, compatibility) {\n if (!WHOLE_PIXEL_VALUE.test(value)) {\n return value;\n }\n\n return value.replace(WHOLE_PIXEL_VALUE, function (match, val) {\n var newValue;\n var intVal = parseInt(val);\n\n if (intVal === 0) {\n return match;\n }\n\n if (compatibility.properties.shorterLengthUnits && compatibility.units.pt && intVal * 3 % 4 === 0) {\n newValue = intVal * 3 / 4 + 'pt';\n }\n\n if (compatibility.properties.shorterLengthUnits && compatibility.units.pc && intVal % 16 === 0) {\n newValue = intVal / 16 + 'pc';\n }\n\n if (compatibility.properties.shorterLengthUnits && compatibility.units.in && intVal % 96 === 0) {\n newValue = intVal / 96 + 'in';\n }\n\n if (newValue) {\n newValue = match.substring(0, match.indexOf(val)) + newValue;\n }\n\n return newValue && newValue.length < match.length ? newValue : match;\n });\n}\n\nfunction optimizePrecision(_, value, precisionOptions) {\n if (!precisionOptions.enabled || value.indexOf('.') === -1) {\n return value;\n }\n\n return value\n .replace(precisionOptions.decimalPointMatcher, '$1$2$3')\n .replace(precisionOptions.zeroMatcher, function (match, integerPart, fractionPart, unit) {\n var multiplier = precisionOptions.units[unit].multiplier;\n var parsedInteger = parseInt(integerPart);\n var integer = isNaN(parsedInteger) ? 0 : parsedInteger;\n var fraction = parseFloat(fractionPart);\n\n return Math.round((integer + fraction) * multiplier) / multiplier + unit;\n });\n}\n\nfunction optimizeTimeUnits(_, value) {\n if (!TIME_VALUE.test(value))\n return value;\n\n return value.replace(TIME_VALUE, function (match, val, unit) {\n var newValue;\n\n if (unit == 'ms') {\n newValue = parseInt(val) / 1000 + 's';\n } else if (unit == 's') {\n newValue = parseFloat(val) * 1000 + 'ms';\n }\n\n return newValue.length < match.length ? newValue : match;\n });\n}\n\nfunction optimizeUnits(name, value, unitsRegexp) {\n if (/^(?:\\-moz\\-calc|\\-webkit\\-calc|calc|rgb|hsl|rgba|hsla)\\(/.test(value)) {\n return value;\n }\n\n if (name == 'flex' || name == '-ms-flex' || name == '-webkit-flex' || name == 'flex-basis' || name == '-webkit-flex-basis') {\n return value;\n }\n\n if (value.indexOf('%') > 0 && (name == 'height' || name == 'max-height' || name == 'width' || name == 'max-width')) {\n return value;\n }\n\n return value\n .replace(unitsRegexp, '$1' + '0' + '$2')\n .replace(unitsRegexp, '$1' + '0' + '$2');\n}\n\nfunction optimizeWhitespace(name, value) {\n if (name.indexOf('filter') > -1 || value.indexOf(' ') == -1 || value.indexOf('expression') === 0) {\n return value;\n }\n\n if (value.indexOf(Marker.SINGLE_QUOTE) > -1 || value.indexOf(Marker.DOUBLE_QUOTE) > -1) {\n return value;\n }\n\n value = value.replace(/\\s+/g, ' ');\n\n if (value.indexOf('calc') > -1) {\n value = value.replace(/\\) ?\\/ ?/g, ')/ ');\n }\n\n return value\n .replace(/(\\(;?)\\s+/g, '$1')\n .replace(/\\s+(;?\\))/g, '$1')\n .replace(/, /g, ',');\n}\n\nfunction optimizeZeroDegUnit(_, value) {\n if (value.indexOf('0deg') == -1) {\n return value;\n }\n\n return value.replace(/\\(0deg\\)/g, '(0)');\n}\n\nfunction optimizeZeroUnits(name, value) {\n if (value.indexOf('0') == -1) {\n return value;\n }\n\n if (value.indexOf('-') > -1) {\n value = value\n .replace(/([^\\w\\d\\-]|^)\\-0([^\\.]|$)/g, '$10$2')\n .replace(/([^\\w\\d\\-]|^)\\-0([^\\.]|$)/g, '$10$2');\n }\n\n return value\n .replace(/(^|\\s)0+([1-9])/g, '$1$2')\n .replace(/(^|\\D)\\.0+(\\D|$)/g, '$10$2')\n .replace(/(^|\\D)\\.0+(\\D|$)/g, '$10$2')\n .replace(/\\.([1-9]*)0+(\\D|$)/g, function (match, nonZeroPart, suffix) {\n return (nonZeroPart.length > 0 ? '.' : '') + nonZeroPart + suffix;\n })\n .replace(/(^|\\D)0\\.(\\d)/g, '$1.$2');\n}\n\nfunction removeQuotes(name, value) {\n if (name == 'content' || name.indexOf('font-variation-settings') > -1 || name.indexOf('font-feature-settings') > -1 || name == 'grid' || name.indexOf('grid-') > -1) {\n return value;\n }\n\n return QUOTED_BUT_SAFE_PATTERN.test(value) ?\n value.substring(1, value.length - 1) :\n value;\n}\n\nfunction removeUrlQuotes(value) {\n return /^url\\(['\"].+['\"]\\)$/.test(value) && !/^url\\(['\"].*[\\*\\s\\(\\)'\"].*['\"]\\)$/.test(value) && !/^url\\(['\"]data:[^;]+;charset/.test(value) ?\n value.replace(/[\"']/g, '') :\n value;\n}\n\nfunction transformValue(propertyName, propertyValue, rule, transformCallback) {\n var selector = serializeRules(rule);\n var transformedValue = transformCallback(propertyName, propertyValue, selector);\n\n if (transformedValue === undefined) {\n return propertyValue;\n } else if (transformedValue === false) {\n return IgnoreProperty;\n } else {\n return transformedValue;\n }\n}\n\n//\n\nfunction optimizeBody(rule, properties, context) {\n var options = context.options;\n var levelOptions = options.level[OptimizationLevel.One];\n var property, name, type, value;\n var valueIsUrl;\n var propertyToken;\n var _properties = wrapForOptimizing(properties, true);\n\n propertyLoop:\n for (var i = 0, l = _properties.length; i < l; i++) {\n property = _properties[i];\n name = property.name;\n\n if (!PROPERTY_NAME_PATTERN.test(name)) {\n propertyToken = property.all[property.position];\n context.warnings.push('Invalid property name \\'' + name + '\\' at ' + formatPosition(propertyToken[1][2][0]) + '. Ignoring.');\n property.unused = true;\n }\n\n if (property.value.length === 0) {\n propertyToken = property.all[property.position];\n context.warnings.push('Empty property \\'' + name + '\\' at ' + formatPosition(propertyToken[1][2][0]) + '. Ignoring.');\n property.unused = true;\n }\n\n if (property.hack && (\n (property.hack[0] == Hack.ASTERISK || property.hack[0] == Hack.UNDERSCORE) && !options.compatibility.properties.iePrefixHack ||\n property.hack[0] == Hack.BACKSLASH && !options.compatibility.properties.ieSuffixHack ||\n property.hack[0] == Hack.BANG && !options.compatibility.properties.ieBangHack)) {\n property.unused = true;\n }\n\n if (levelOptions.removeNegativePaddings && name.indexOf('padding') === 0 && (isNegative(property.value[0]) || isNegative(property.value[1]) || isNegative(property.value[2]) || isNegative(property.value[3]))) {\n property.unused = true;\n }\n\n if (!options.compatibility.properties.ieFilters && isLegacyFilter(property)) {\n property.unused = true;\n }\n\n if (property.unused) {\n continue;\n }\n\n if (property.block) {\n optimizeBody(rule, property.value[0][1], context);\n continue;\n }\n\n if (VARIABLE_NAME_PATTERN.test(name)) {\n continue;\n }\n\n for (var j = 0, m = property.value.length; j < m; j++) {\n type = property.value[j][0];\n value = property.value[j][1];\n valueIsUrl = isUrl(value);\n\n if (type == Token.PROPERTY_BLOCK) {\n property.unused = true;\n context.warnings.push('Invalid value token at ' + formatPosition(value[0][1][2][0]) + '. Ignoring.');\n break;\n }\n\n if (valueIsUrl && !context.validator.isUrl(value)) {\n property.unused = true;\n context.warnings.push('Broken URL \\'' + value + '\\' at ' + formatPosition(property.value[j][2][0]) + '. Ignoring.');\n break;\n }\n\n if (valueIsUrl) {\n value = levelOptions.normalizeUrls ?\n normalizeUrl(value) :\n value;\n value = !options.compatibility.properties.urlQuotes ?\n removeUrlQuotes(value) :\n value;\n } else if (isQuoted(value) || isLocal(value)) {\n value = levelOptions.removeQuotes ?\n removeQuotes(name, value) :\n value;\n } else {\n value = levelOptions.removeWhitespace ?\n optimizeWhitespace(name, value) :\n value;\n value = optimizePrecision(name, value, options.precision);\n value = optimizePixelLengths(name, value, options.compatibility);\n value = levelOptions.replaceTimeUnits ?\n optimizeTimeUnits(name, value) :\n value;\n value = levelOptions.replaceZeroUnits ?\n optimizeZeroUnits(name, value) :\n value;\n\n if (options.compatibility.properties.zeroUnits) {\n value = optimizeZeroDegUnit(name, value);\n value = optimizeUnits(name, value, options.unitsRegexp);\n }\n\n if (options.compatibility.properties.colors) {\n value = optimizeColors(name, value, options.compatibility);\n }\n }\n\n value = transformValue(name, value, rule, levelOptions.transform);\n\n if (value === IgnoreProperty) {\n property.unused = true;\n continue propertyLoop;\n }\n\n property.value[j][1] = value;\n }\n\n if (levelOptions.replaceMultipleZeros) {\n optimizeMultipleZeros(property);\n }\n\n if (name == 'background' && levelOptions.optimizeBackground) {\n optimizeBackground(property);\n } else if (name.indexOf('border') === 0 && name.indexOf('radius') > 0 && levelOptions.optimizeBorderRadius) {\n optimizeBorderRadius(property);\n } else if (name == 'filter'&& levelOptions.optimizeFilter && options.compatibility.properties.ieFilters) {\n optimizeFilter(property);\n } else if (name == 'font-weight' && levelOptions.optimizeFontWeight) {\n optimizeFontWeight(property, 0);\n } else if (name == 'outline' && levelOptions.optimizeOutline) {\n optimizeOutline(property);\n }\n }\n\n restoreFromOptimizing(_properties);\n removeUnused(_properties);\n removeComments(properties, options);\n}\n\nfunction removeComments(tokens, options) {\n var token;\n var i;\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n\n if (token[0] != Token.COMMENT) {\n continue;\n }\n\n optimizeComment(token, options);\n\n if (token[1].length === 0) {\n tokens.splice(i, 1);\n i--;\n }\n }\n}\n\nfunction optimizeComment(token, options) {\n if (token[1][2] == Marker.EXCLAMATION && (options.level[OptimizationLevel.One].specialComments == 'all' || options.commentsKept < options.level[OptimizationLevel.One].specialComments)) {\n options.commentsKept++;\n return;\n }\n\n token[1] = [];\n}\n\nfunction cleanupCharsets(tokens) {\n var hasCharset = false;\n\n for (var i = 0, l = tokens.length; i < l; i++) {\n var token = tokens[i];\n\n if (token[0] != Token.AT_RULE)\n continue;\n\n if (!CHARSET_REGEXP.test(token[1]))\n continue;\n\n if (hasCharset || token[1].indexOf(CHARSET_TOKEN) == -1) {\n tokens.splice(i, 1);\n i--;\n l--;\n } else {\n hasCharset = true;\n tokens.splice(i, 1);\n tokens.unshift([Token.AT_RULE, token[1].replace(CHARSET_REGEXP, CHARSET_TOKEN)]);\n }\n }\n}\n\nfunction buildUnitRegexp(options) {\n var units = ['px', 'em', 'ex', 'cm', 'mm', 'in', 'pt', 'pc', '%'];\n var otherUnits = ['ch', 'rem', 'vh', 'vm', 'vmax', 'vmin', 'vw'];\n\n otherUnits.forEach(function (unit) {\n if (options.compatibility.units[unit]) {\n units.push(unit);\n }\n });\n\n return new RegExp('(^|\\\\s|\\\\(|,)0(?:' + units.join('|') + ')(\\\\W|$)', 'g');\n}\n\nfunction buildPrecisionOptions(roundingPrecision) {\n var precisionOptions = {\n matcher: null,\n units: {},\n };\n var optimizable = [];\n var unit;\n var value;\n\n for (unit in roundingPrecision) {\n value = roundingPrecision[unit];\n\n if (value != DEFAULT_ROUNDING_PRECISION) {\n precisionOptions.units[unit] = {};\n precisionOptions.units[unit].value = value;\n precisionOptions.units[unit].multiplier = Math.pow(10, value);\n\n optimizable.push(unit);\n }\n }\n\n if (optimizable.length > 0) {\n precisionOptions.enabled = true;\n precisionOptions.decimalPointMatcher = new RegExp('(\\\\d)\\\\.($|' + optimizable.join('|') + ')($|\\\\W)', 'g');\n precisionOptions.zeroMatcher = new RegExp('(\\\\d*)(\\\\.\\\\d+)(' + optimizable.join('|') + ')', 'g');\n }\n\n return precisionOptions;\n}\n\nfunction isImport(token) {\n return IMPORT_PREFIX_PATTERN.test(token[1]);\n}\n\nfunction isLegacyFilter(property) {\n var value;\n\n if (property.name == 'filter' || property.name == '-ms-filter') {\n value = property.value[0][1];\n\n return value.indexOf('progid') > -1 ||\n value.indexOf('alpha') === 0 ||\n value.indexOf('chroma') === 0;\n } else {\n return false;\n }\n}\n\nfunction level1Optimize(tokens, context) {\n var options = context.options;\n var levelOptions = options.level[OptimizationLevel.One];\n var ie7Hack = options.compatibility.selectors.ie7Hack;\n var adjacentSpace = options.compatibility.selectors.adjacentSpace;\n var spaceAfterClosingBrace = options.compatibility.properties.spaceAfterClosingBrace;\n var format = options.format;\n var mayHaveCharset = false;\n var afterRules = false;\n\n options.unitsRegexp = options.unitsRegexp || buildUnitRegexp(options);\n options.precision = options.precision || buildPrecisionOptions(levelOptions.roundingPrecision);\n options.commentsKept = options.commentsKept || 0;\n\n for (var i = 0, l = tokens.length; i < l; i++) {\n var token = tokens[i];\n\n switch (token[0]) {\n case Token.AT_RULE:\n token[1] = isImport(token) && afterRules ? '' : token[1];\n token[1] = levelOptions.tidyAtRules ? tidyAtRule(token[1]) : token[1];\n mayHaveCharset = true;\n break;\n case Token.AT_RULE_BLOCK:\n optimizeBody(token[1], token[2], context);\n afterRules = true;\n break;\n case Token.NESTED_BLOCK:\n token[1] = levelOptions.tidyBlockScopes ? tidyBlock(token[1], spaceAfterClosingBrace) : token[1];\n level1Optimize(token[2], context);\n afterRules = true;\n break;\n case Token.COMMENT:\n optimizeComment(token, options);\n break;\n case Token.RULE:\n token[1] = levelOptions.tidySelectors ? tidyRules(token[1], !ie7Hack, adjacentSpace, format, context.warnings) : token[1];\n token[1] = token[1].length > 1 ? sortSelectors(token[1], levelOptions.selectorsSortingMethod) : token[1];\n optimizeBody(token[1], token[2], context);\n afterRules = true;\n break;\n }\n\n if (token[0] == Token.COMMENT && token[1].length === 0 || levelOptions.removeEmpty && (token[1].length === 0 || (token[2] && token[2].length === 0))) {\n tokens.splice(i, 1);\n i--;\n l--;\n }\n }\n\n if (levelOptions.cleanupCharsets && mayHaveCharset) {\n cleanupCharsets(tokens);\n }\n\n return tokens;\n}\n\nmodule.exports = level1Optimize;\n","var COLORS = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#0ff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000',\n blanchedalmond: '#ffebcd',\n blue: '#00f',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#0ff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#f0f',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#0f0',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#f00',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#fff',\n whitesmoke: '#f5f5f5',\n yellow: '#ff0',\n yellowgreen: '#9acd32'\n};\n\nvar toHex = {};\nvar toName = {};\n\nfor (var name in COLORS) {\n var hex = COLORS[name];\n\n if (name.length < hex.length) {\n toName[hex] = name;\n } else {\n toHex[name] = hex;\n }\n}\n\nvar toHexPattern = new RegExp('(^| |,|\\\\))(' + Object.keys(toHex).join('|') + ')( |,|\\\\)|$)', 'ig');\nvar toNamePattern = new RegExp('(' + Object.keys(toName).join('|') + ')([^a-f0-9]|$)', 'ig');\n\nfunction hexConverter(match, prefix, colorValue, suffix) {\n return prefix + toHex[colorValue.toLowerCase()] + suffix;\n}\n\nfunction nameConverter(match, colorValue, suffix) {\n return toName[colorValue.toLowerCase()] + suffix;\n}\n\nfunction shortenHex(value) {\n var hasHex = value.indexOf('#') > -1;\n var shortened = value.replace(toHexPattern, hexConverter);\n\n if (shortened != value) {\n shortened = shortened.replace(toHexPattern, hexConverter);\n }\n\n return hasHex ?\n shortened.replace(toNamePattern, nameConverter) :\n shortened;\n}\n\nmodule.exports = shortenHex;\n","// HSL to RGB converter. Both methods adapted from:\n// http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript\n\nfunction hslToRgb(h, s, l) {\n var r, g, b;\n\n // normalize hue orientation b/w 0 and 360 degrees\n h = h % 360;\n if (h < 0)\n h += 360;\n h = ~~h / 360;\n\n if (s < 0)\n s = 0;\n else if (s > 100)\n s = 100;\n s = ~~s / 100;\n\n if (l < 0)\n l = 0;\n else if (l > 100)\n l = 100;\n l = ~~l / 100;\n\n if (s === 0) {\n r = g = b = l; // achromatic\n } else {\n var q = l < 0.5 ?\n l * (1 + s) :\n l + s - l * s;\n var p = 2 * l - q;\n r = hueToRgb(p, q, h + 1/3);\n g = hueToRgb(p, q, h);\n b = hueToRgb(p, q, h - 1/3);\n }\n\n return [~~(r * 255), ~~(g * 255), ~~(b * 255)];\n}\n\nfunction hueToRgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1/6) return p + (q - p) * 6 * t;\n if (t < 1/2) return q;\n if (t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n return p;\n}\n\nfunction shortenHsl(hue, saturation, lightness) {\n var asRgb = hslToRgb(hue, saturation, lightness);\n var redAsHex = asRgb[0].toString(16);\n var greenAsHex = asRgb[1].toString(16);\n var blueAsHex = asRgb[2].toString(16);\n\n return '#' +\n ((redAsHex.length == 1 ? '0' : '') + redAsHex) +\n ((greenAsHex.length == 1 ? '0' : '') + greenAsHex) +\n ((blueAsHex.length == 1 ? '0' : '') + blueAsHex);\n}\n\nmodule.exports = shortenHsl;\n","function shortenRgb(red, green, blue) {\n var normalizedRed = Math.max(0, Math.min(parseInt(red), 255));\n var normalizedGreen = Math.max(0, Math.min(parseInt(green), 255));\n var normalizedBlue = Math.max(0, Math.min(parseInt(blue), 255));\n\n // Credit: Asen http://jsbin.com/UPUmaGOc/2/edit?js,console\n return '#' + ('00000' + (normalizedRed << 16 | normalizedGreen << 8 | normalizedBlue).toString(16)).slice(-6);\n}\n\nmodule.exports = shortenRgb;\n","var naturalCompare = require('../../utils/natural-compare');\n\nfunction naturalSorter(scope1, scope2) {\n return naturalCompare(scope1[1], scope2[1]);\n}\n\nfunction standardSorter(scope1, scope2) {\n return scope1[1] > scope2[1] ? 1 : -1;\n}\n\nfunction sortSelectors(selectors, method) {\n switch (method) {\n case 'natural':\n return selectors.sort(naturalSorter);\n case 'standard':\n return selectors.sort(standardSorter);\n case 'none':\n case false:\n return selectors;\n }\n}\n\nmodule.exports = sortSelectors;\n","function tidyAtRule(value) {\n return value\n .replace(/\\s+/g, ' ')\n .replace(/url\\(\\s+/g, 'url(')\n .replace(/\\s+\\)/g, ')')\n .trim();\n}\n\nmodule.exports = tidyAtRule;\n","var SUPPORTED_COMPACT_BLOCK_MATCHER = /^@media\\W/;\n\nfunction tidyBlock(values, spaceAfterClosingBrace) {\n var withoutSpaceAfterClosingBrace;\n var i;\n\n for (i = values.length - 1; i >= 0; i--) {\n withoutSpaceAfterClosingBrace = !spaceAfterClosingBrace && SUPPORTED_COMPACT_BLOCK_MATCHER.test(values[i][1]);\n\n values[i][1] = values[i][1]\n .replace(/\\n|\\r\\n/g, ' ')\n .replace(/\\s+/g, ' ')\n .replace(/(,|:|\\() /g, '$1')\n .replace(/ \\)/g, ')')\n .replace(/'([a-zA-Z][a-zA-Z\\d\\-_]+)'/, '$1')\n .replace(/\"([a-zA-Z][a-zA-Z\\d\\-_]+)\"/, '$1')\n .replace(withoutSpaceAfterClosingBrace ? /\\) /g : null, ')');\n }\n\n return values;\n}\n\nmodule.exports = tidyBlock;\n","var Spaces = require('../../options/format').Spaces;\nvar Marker = require('../../tokenizer/marker');\nvar formatPosition = require('../../utils/format-position');\n\nvar CASE_ATTRIBUTE_PATTERN = /[\\s\"'][iI]\\s*\\]/;\nvar CASE_RESTORE_PATTERN = /([\\d\\w])([iI])\\]/g;\nvar DOUBLE_QUOTE_CASE_PATTERN = /=\"([a-zA-Z][a-zA-Z\\d\\-_]+)\"([iI])/g;\nvar DOUBLE_QUOTE_PATTERN = /=\"([a-zA-Z][a-zA-Z\\d\\-_]+)\"(\\s|\\])/g;\nvar HTML_COMMENT_PATTERN = /^(?:(?:)\\s*)+/;\nvar SINGLE_QUOTE_CASE_PATTERN = /='([a-zA-Z][a-zA-Z\\d\\-_]+)'([iI])/g;\nvar SINGLE_QUOTE_PATTERN = /='([a-zA-Z][a-zA-Z\\d\\-_]+)'(\\s|\\])/g;\nvar RELATION_PATTERN = /[>\\+~]/;\nvar WHITESPACE_PATTERN = /\\s/;\n\nvar ASTERISK_PLUS_HTML_HACK = '*+html ';\nvar ASTERISK_FIRST_CHILD_PLUS_HTML_HACK = '*:first-child+html ';\nvar LESS_THAN = '<';\n\nfunction hasInvalidCharacters(value) {\n var isEscaped;\n var isInvalid = false;\n var character;\n var isQuote = false;\n var i, l;\n\n for (i = 0, l = value.length; i < l; i++) {\n character = value[i];\n\n if (isEscaped) {\n // continue as always\n } else if (character == Marker.SINGLE_QUOTE || character == Marker.DOUBLE_QUOTE) {\n isQuote = !isQuote;\n } else if (!isQuote && (character == Marker.CLOSE_CURLY_BRACKET || character == Marker.EXCLAMATION || character == LESS_THAN || character == Marker.SEMICOLON)) {\n isInvalid = true;\n break;\n } else if (!isQuote && i === 0 && RELATION_PATTERN.test(character)) {\n isInvalid = true;\n break;\n }\n\n isEscaped = character == Marker.BACK_SLASH;\n }\n\n return isInvalid;\n}\n\nfunction removeWhitespace(value, format) {\n var stripped = [];\n var character;\n var isNewLineNix;\n var isNewLineWin;\n var isEscaped;\n var wasEscaped;\n var isQuoted;\n var isSingleQuoted;\n var isDoubleQuoted;\n var isAttribute;\n var isRelation;\n var isWhitespace;\n var roundBracketLevel = 0;\n var wasRelation = false;\n var wasWhitespace = false;\n var withCaseAttribute = CASE_ATTRIBUTE_PATTERN.test(value);\n var spaceAroundRelation = format && format.spaces[Spaces.AroundSelectorRelation];\n var i, l;\n\n for (i = 0, l = value.length; i < l; i++) {\n character = value[i];\n\n isNewLineNix = character == Marker.NEW_LINE_NIX;\n isNewLineWin = character == Marker.NEW_LINE_NIX && value[i - 1] == Marker.CARRIAGE_RETURN;\n isQuoted = isSingleQuoted || isDoubleQuoted;\n isRelation = !isAttribute && !isEscaped && roundBracketLevel === 0 && RELATION_PATTERN.test(character);\n isWhitespace = WHITESPACE_PATTERN.test(character);\n\n if (wasEscaped && isQuoted && isNewLineWin) {\n // swallow escaped new windows lines in comments\n stripped.pop();\n stripped.pop();\n } else if (isEscaped && isQuoted && isNewLineNix) {\n // swallow escaped new *nix lines in comments\n stripped.pop();\n } else if (isEscaped) {\n stripped.push(character);\n } else if (character == Marker.OPEN_SQUARE_BRACKET && !isQuoted) {\n stripped.push(character);\n isAttribute = true;\n } else if (character == Marker.CLOSE_SQUARE_BRACKET && !isQuoted) {\n stripped.push(character);\n isAttribute = false;\n } else if (character == Marker.OPEN_ROUND_BRACKET && !isQuoted) {\n stripped.push(character);\n roundBracketLevel++;\n } else if (character == Marker.CLOSE_ROUND_BRACKET && !isQuoted) {\n stripped.push(character);\n roundBracketLevel--;\n } else if (character == Marker.SINGLE_QUOTE && !isQuoted) {\n stripped.push(character);\n isSingleQuoted = true;\n } else if (character == Marker.DOUBLE_QUOTE && !isQuoted) {\n stripped.push(character);\n isDoubleQuoted = true;\n } else if (character == Marker.SINGLE_QUOTE && isQuoted) {\n stripped.push(character);\n isSingleQuoted = false;\n } else if (character == Marker.DOUBLE_QUOTE && isQuoted) {\n stripped.push(character);\n isDoubleQuoted = false;\n } else if (isWhitespace && wasRelation && !spaceAroundRelation) {\n continue;\n } else if (!isWhitespace && wasRelation && spaceAroundRelation) {\n stripped.push(Marker.SPACE);\n stripped.push(character);\n } else if (isWhitespace && (isAttribute || roundBracketLevel > 0) && !isQuoted) {\n // skip space\n } else if (isWhitespace && wasWhitespace && !isQuoted) {\n // skip extra space\n } else if ((isNewLineWin || isNewLineNix) && (isAttribute || roundBracketLevel > 0) && isQuoted) {\n // skip newline\n } else if (isRelation && wasWhitespace && !spaceAroundRelation) {\n stripped.pop();\n stripped.push(character);\n } else if (isRelation && !wasWhitespace && spaceAroundRelation) {\n stripped.push(Marker.SPACE);\n stripped.push(character);\n } else if (isWhitespace) {\n stripped.push(Marker.SPACE);\n } else {\n stripped.push(character);\n }\n\n wasEscaped = isEscaped;\n isEscaped = character == Marker.BACK_SLASH;\n wasRelation = isRelation;\n wasWhitespace = isWhitespace;\n }\n\n return withCaseAttribute ?\n stripped.join('').replace(CASE_RESTORE_PATTERN, '$1 $2]') :\n stripped.join('');\n}\n\nfunction removeQuotes(value) {\n if (value.indexOf('\\'') == -1 && value.indexOf('\"') == -1) {\n return value;\n }\n\n return value\n .replace(SINGLE_QUOTE_CASE_PATTERN, '=$1 $2')\n .replace(SINGLE_QUOTE_PATTERN, '=$1$2')\n .replace(DOUBLE_QUOTE_CASE_PATTERN, '=$1 $2')\n .replace(DOUBLE_QUOTE_PATTERN, '=$1$2');\n}\n\nfunction tidyRules(rules, removeUnsupported, adjacentSpace, format, warnings) {\n var list = [];\n var repeated = [];\n\n function removeHTMLComment(rule, match) {\n warnings.push('HTML comment \\'' + match + '\\' at ' + formatPosition(rule[2][0]) + '. Removing.');\n return '';\n }\n\n for (var i = 0, l = rules.length; i < l; i++) {\n var rule = rules[i];\n var reduced = rule[1];\n\n reduced = reduced.replace(HTML_COMMENT_PATTERN, removeHTMLComment.bind(null, rule));\n\n if (hasInvalidCharacters(reduced)) {\n warnings.push('Invalid selector \\'' + rule[1] + '\\' at ' + formatPosition(rule[2][0]) + '. Ignoring.');\n continue;\n }\n\n reduced = removeWhitespace(reduced, format);\n reduced = removeQuotes(reduced);\n\n if (adjacentSpace && reduced.indexOf('nav') > 0) {\n reduced = reduced.replace(/\\+nav(\\S|$)/, '+ nav$1');\n }\n\n if (removeUnsupported && reduced.indexOf(ASTERISK_PLUS_HTML_HACK) > -1) {\n continue;\n }\n\n if (removeUnsupported && reduced.indexOf(ASTERISK_FIRST_CHILD_PLUS_HTML_HACK) > -1) {\n continue;\n }\n\n if (reduced.indexOf('*') > -1) {\n reduced = reduced\n .replace(/\\*([:#\\.\\[])/g, '$1')\n .replace(/^(\\:first\\-child)?\\+html/, '*$1+html');\n }\n\n if (repeated.indexOf(reduced) > -1) {\n continue;\n }\n\n rule[1] = reduced;\n repeated.push(reduced);\n list.push(rule);\n }\n\n if (list.length == 1 && list[0][1].length === 0) {\n warnings.push('Empty selector \\'' + list[0][1] + '\\' at ' + formatPosition(list[0][2][0]) + '. Ignoring.');\n list = [];\n }\n\n return list;\n}\n\nmodule.exports = tidyRules;\n","var InvalidPropertyError = require('./invalid-property-error');\n\nvar wrapSingle = require('../wrap-for-optimizing').single;\n\nvar Token = require('../../tokenizer/token');\nvar Marker = require('../../tokenizer/marker');\n\nvar formatPosition = require('../../utils/format-position');\n\nfunction _anyIsInherit(values) {\n var i, l;\n\n for (i = 0, l = values.length; i < l; i++) {\n if (values[i][1] == 'inherit') {\n return true;\n }\n }\n\n return false;\n}\n\nfunction _colorFilter(validator) {\n return function (value) {\n return value[1] == 'invert' || validator.isColor(value[1]) || validator.isPrefixed(value[1]);\n };\n}\n\nfunction _styleFilter(validator) {\n return function (value) {\n return value[1] != 'inherit' && validator.isStyleKeyword(value[1]) && !validator.isColorFunction(value[1]);\n };\n}\n\nfunction _wrapDefault(name, property, compactable) {\n var descriptor = compactable[name];\n if (descriptor.doubleValues && descriptor.defaultValue.length == 2) {\n return wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, name],\n [Token.PROPERTY_VALUE, descriptor.defaultValue[0]],\n [Token.PROPERTY_VALUE, descriptor.defaultValue[1]]\n ]);\n } else if (descriptor.doubleValues && descriptor.defaultValue.length == 1) {\n return wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, name],\n [Token.PROPERTY_VALUE, descriptor.defaultValue[0]]\n ]);\n } else {\n return wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, name],\n [Token.PROPERTY_VALUE, descriptor.defaultValue]\n ]);\n }\n}\n\nfunction _widthFilter(validator) {\n return function (value) {\n return value[1] != 'inherit' &&\n (validator.isWidth(value[1]) || validator.isUnit(value[1]) && !validator.isDynamicUnit(value[1])) &&\n !validator.isStyleKeyword(value[1]) &&\n !validator.isColorFunction(value[1]);\n };\n}\n\nfunction animation(property, compactable, validator) {\n var duration = _wrapDefault(property.name + '-duration', property, compactable);\n var timing = _wrapDefault(property.name + '-timing-function', property, compactable);\n var delay = _wrapDefault(property.name + '-delay', property, compactable);\n var iteration = _wrapDefault(property.name + '-iteration-count', property, compactable);\n var direction = _wrapDefault(property.name + '-direction', property, compactable);\n var fill = _wrapDefault(property.name + '-fill-mode', property, compactable);\n var play = _wrapDefault(property.name + '-play-state', property, compactable);\n var name = _wrapDefault(property.name + '-name', property, compactable);\n var components = [duration, timing, delay, iteration, direction, fill, play, name];\n var values = property.value;\n var value;\n var durationSet = false;\n var timingSet = false;\n var delaySet = false;\n var iterationSet = false;\n var directionSet = false;\n var fillSet = false;\n var playSet = false;\n var nameSet = false;\n var i;\n var l;\n\n if (property.value.length == 1 && property.value[0][1] == 'inherit') {\n duration.value = timing.value = delay.value = iteration.value = direction.value = fill.value = play.value = name.value = property.value;\n return components;\n }\n\n if (values.length > 1 && _anyIsInherit(values)) {\n throw new InvalidPropertyError('Invalid animation values at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n for (i = 0, l = values.length; i < l; i++) {\n value = values[i];\n\n if (validator.isTime(value[1]) && !durationSet) {\n duration.value = [value];\n durationSet = true;\n } else if (validator.isTime(value[1]) && !delaySet) {\n delay.value = [value];\n delaySet = true;\n } else if ((validator.isGlobal(value[1]) || validator.isTimingFunction(value[1])) && !timingSet) {\n timing.value = [value];\n timingSet = true;\n } else if ((validator.isAnimationIterationCountKeyword(value[1]) || validator.isPositiveNumber(value[1])) && !iterationSet) {\n iteration.value = [value];\n iterationSet = true;\n } else if (validator.isAnimationDirectionKeyword(value[1]) && !directionSet) {\n direction.value = [value];\n directionSet = true;\n } else if (validator.isAnimationFillModeKeyword(value[1]) && !fillSet) {\n fill.value = [value];\n fillSet = true;\n } else if (validator.isAnimationPlayStateKeyword(value[1]) && !playSet) {\n play.value = [value];\n playSet = true;\n } else if ((validator.isAnimationNameKeyword(value[1]) || validator.isIdentifier(value[1])) && !nameSet) {\n name.value = [value];\n nameSet = true;\n } else {\n throw new InvalidPropertyError('Invalid animation value at ' + formatPosition(value[2][0]) + '. Ignoring.');\n }\n }\n\n return components;\n}\n\nfunction background(property, compactable, validator) {\n var image = _wrapDefault('background-image', property, compactable);\n var position = _wrapDefault('background-position', property, compactable);\n var size = _wrapDefault('background-size', property, compactable);\n var repeat = _wrapDefault('background-repeat', property, compactable);\n var attachment = _wrapDefault('background-attachment', property, compactable);\n var origin = _wrapDefault('background-origin', property, compactable);\n var clip = _wrapDefault('background-clip', property, compactable);\n var color = _wrapDefault('background-color', property, compactable);\n var components = [image, position, size, repeat, attachment, origin, clip, color];\n var values = property.value;\n\n var positionSet = false;\n var clipSet = false;\n var originSet = false;\n var repeatSet = false;\n\n var anyValueSet = false;\n\n if (property.value.length == 1 && property.value[0][1] == 'inherit') {\n // NOTE: 'inherit' is not a valid value for background-attachment\n color.value = image.value = repeat.value = position.value = size.value = origin.value = clip.value = property.value;\n return components;\n }\n\n if (property.value.length == 1 && property.value[0][1] == '0 0') {\n return components;\n }\n\n for (var i = values.length - 1; i >= 0; i--) {\n var value = values[i];\n\n if (validator.isBackgroundAttachmentKeyword(value[1])) {\n attachment.value = [value];\n anyValueSet = true;\n } else if (validator.isBackgroundClipKeyword(value[1]) || validator.isBackgroundOriginKeyword(value[1])) {\n if (clipSet) {\n origin.value = [value];\n originSet = true;\n } else {\n clip.value = [value];\n clipSet = true;\n }\n anyValueSet = true;\n } else if (validator.isBackgroundRepeatKeyword(value[1])) {\n if (repeatSet) {\n repeat.value.unshift(value);\n } else {\n repeat.value = [value];\n repeatSet = true;\n }\n anyValueSet = true;\n } else if (validator.isBackgroundPositionKeyword(value[1]) || validator.isBackgroundSizeKeyword(value[1]) || validator.isUnit(value[1]) || validator.isDynamicUnit(value[1])) {\n if (i > 0) {\n var previousValue = values[i - 1];\n\n if (previousValue[1] == Marker.FORWARD_SLASH) {\n size.value = [value];\n } else if (i > 1 && values[i - 2][1] == Marker.FORWARD_SLASH) {\n size.value = [previousValue, value];\n i -= 2;\n } else {\n if (!positionSet)\n position.value = [];\n\n position.value.unshift(value);\n positionSet = true;\n }\n } else {\n if (!positionSet)\n position.value = [];\n\n position.value.unshift(value);\n positionSet = true;\n }\n anyValueSet = true;\n } else if ((color.value[0][1] == compactable[color.name].defaultValue || color.value[0][1] == 'none') && (validator.isColor(value[1]) || validator.isPrefixed(value[1]))) {\n color.value = [value];\n anyValueSet = true;\n } else if (validator.isUrl(value[1]) || validator.isFunction(value[1])) {\n image.value = [value];\n anyValueSet = true;\n }\n }\n\n if (clipSet && !originSet)\n origin.value = clip.value.slice(0);\n\n if (!anyValueSet) {\n throw new InvalidPropertyError('Invalid background value at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n return components;\n}\n\nfunction borderRadius(property, compactable) {\n var values = property.value;\n var splitAt = -1;\n\n for (var i = 0, l = values.length; i < l; i++) {\n if (values[i][1] == Marker.FORWARD_SLASH) {\n splitAt = i;\n break;\n }\n }\n\n if (splitAt === 0 || splitAt === values.length - 1) {\n throw new InvalidPropertyError('Invalid border-radius value at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n var target = _wrapDefault(property.name, property, compactable);\n target.value = splitAt > -1 ?\n values.slice(0, splitAt) :\n values.slice(0);\n target.components = fourValues(target, compactable);\n\n var remainder = _wrapDefault(property.name, property, compactable);\n remainder.value = splitAt > -1 ?\n values.slice(splitAt + 1) :\n values.slice(0);\n remainder.components = fourValues(remainder, compactable);\n\n for (var j = 0; j < 4; j++) {\n target.components[j].multiplex = true;\n target.components[j].value = target.components[j].value.concat(remainder.components[j].value);\n }\n\n return target.components;\n}\n\nfunction font(property, compactable, validator) {\n var style = _wrapDefault('font-style', property, compactable);\n var variant = _wrapDefault('font-variant', property, compactable);\n var weight = _wrapDefault('font-weight', property, compactable);\n var stretch = _wrapDefault('font-stretch', property, compactable);\n var size = _wrapDefault('font-size', property, compactable);\n var height = _wrapDefault('line-height', property, compactable);\n var family = _wrapDefault('font-family', property, compactable);\n var components = [style, variant, weight, stretch, size, height, family];\n var values = property.value;\n var fuzzyMatched = 4; // style, variant, weight, and stretch\n var index = 0;\n var isStretchSet = false;\n var isStretchValid;\n var isStyleSet = false;\n var isStyleValid;\n var isVariantSet = false;\n var isVariantValid;\n var isWeightSet = false;\n var isWeightValid;\n var isSizeSet = false;\n var appendableFamilyName = false;\n\n if (!values[index]) {\n throw new InvalidPropertyError('Missing font values at ' + formatPosition(property.all[property.position][1][2][0]) + '. Ignoring.');\n }\n\n if (values.length == 1 && values[0][1] == 'inherit') {\n style.value = variant.value = weight.value = stretch.value = size.value = height.value = family.value = values;\n return components;\n }\n\n if (values.length == 1 && (validator.isFontKeyword(values[0][1]) || validator.isGlobal(values[0][1]) || validator.isPrefixed(values[0][1]))) {\n values[0][1] = Marker.INTERNAL + values[0][1];\n style.value = variant.value = weight.value = stretch.value = size.value = height.value = family.value = values;\n return components;\n }\n\n if (values.length < 2 || !_anyIsFontSize(values, validator) || !_anyIsFontFamily(values, validator)) {\n throw new InvalidPropertyError('Invalid font values at ' + formatPosition(property.all[property.position][1][2][0]) + '. Ignoring.');\n }\n\n if (values.length > 1 && _anyIsInherit(values)) {\n throw new InvalidPropertyError('Invalid font values at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n // fuzzy match style, variant, weight, and stretch on first elements\n while (index < fuzzyMatched) {\n isStretchValid = validator.isFontStretchKeyword(values[index][1]) || validator.isGlobal(values[index][1]);\n isStyleValid = validator.isFontStyleKeyword(values[index][1]) || validator.isGlobal(values[index][1]);\n isVariantValid = validator.isFontVariantKeyword(values[index][1]) || validator.isGlobal(values[index][1]);\n isWeightValid = validator.isFontWeightKeyword(values[index][1]) || validator.isGlobal(values[index][1]);\n\n if (isStyleValid && !isStyleSet) {\n style.value = [values[index]];\n isStyleSet = true;\n } else if (isVariantValid && !isVariantSet) {\n variant.value = [values[index]];\n isVariantSet = true;\n } else if (isWeightValid && !isWeightSet) {\n weight.value = [values[index]];\n isWeightSet = true;\n } else if (isStretchValid && !isStretchSet) {\n stretch.value = [values[index]];\n isStretchSet = true;\n } else if (isStyleValid && isStyleSet || isVariantValid && isVariantSet || isWeightValid && isWeightSet || isStretchValid && isStretchSet) {\n throw new InvalidPropertyError('Invalid font style / variant / weight / stretch value at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n } else {\n break;\n }\n\n index++;\n }\n\n // now comes font-size ...\n if (validator.isFontSizeKeyword(values[index][1]) || validator.isUnit(values[index][1]) && !validator.isDynamicUnit(values[index][1])) {\n size.value = [values[index]];\n isSizeSet = true;\n index++;\n } else {\n throw new InvalidPropertyError('Missing font size at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n if (!values[index]) {\n throw new InvalidPropertyError('Missing font family at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n // ... and perhaps line-height\n if (isSizeSet && values[index] && values[index][1] == Marker.FORWARD_SLASH && values[index + 1] && (validator.isLineHeightKeyword(values[index + 1][1]) || validator.isUnit(values[index + 1][1]) || validator.isNumber(values[index + 1][1]))) {\n height.value = [values[index + 1]];\n index++;\n index++;\n }\n\n // ... and whatever comes next is font-family\n family.value = [];\n\n while (values[index]) {\n if (values[index][1] == Marker.COMMA) {\n appendableFamilyName = false;\n } else {\n if (appendableFamilyName) {\n family.value[family.value.length - 1][1] += Marker.SPACE + values[index][1];\n } else {\n family.value.push(values[index]);\n }\n\n appendableFamilyName = true;\n }\n\n index++;\n }\n\n if (family.value.length === 0) {\n throw new InvalidPropertyError('Missing font family at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n return components;\n}\n\nfunction _anyIsFontSize(values, validator) {\n var value;\n var i, l;\n\n for (i = 0, l = values.length; i < l; i++) {\n value = values[i];\n\n if (validator.isFontSizeKeyword(value[1]) || validator.isUnit(value[1]) && !validator.isDynamicUnit(value[1]) || validator.isFunction(value[1])) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction _anyIsFontFamily(values, validator) {\n var value;\n var i, l;\n\n for (i = 0, l = values.length; i < l; i++) {\n value = values[i];\n\n if (validator.isIdentifier(value[1])) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction fourValues(property, compactable) {\n var componentNames = compactable[property.name].components;\n var components = [];\n var value = property.value;\n\n if (value.length < 1)\n return [];\n\n if (value.length < 2)\n value[1] = value[0].slice(0);\n if (value.length < 3)\n value[2] = value[0].slice(0);\n if (value.length < 4)\n value[3] = value[1].slice(0);\n\n for (var i = componentNames.length - 1; i >= 0; i--) {\n var component = wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, componentNames[i]]\n ]);\n component.value = [value[i]];\n components.unshift(component);\n }\n\n return components;\n}\n\nfunction multiplex(splitWith) {\n return function (property, compactable, validator) {\n var splitsAt = [];\n var values = property.value;\n var i, j, l, m;\n\n // find split commas\n for (i = 0, l = values.length; i < l; i++) {\n if (values[i][1] == ',')\n splitsAt.push(i);\n }\n\n if (splitsAt.length === 0)\n return splitWith(property, compactable, validator);\n\n var splitComponents = [];\n\n // split over commas, and into components\n for (i = 0, l = splitsAt.length; i <= l; i++) {\n var from = i === 0 ? 0 : splitsAt[i - 1] + 1;\n var to = i < l ? splitsAt[i] : values.length;\n\n var _property = _wrapDefault(property.name, property, compactable);\n _property.value = values.slice(from, to);\n\n splitComponents.push(splitWith(_property, compactable, validator));\n }\n\n var components = splitComponents[0];\n\n // group component values from each split\n for (i = 0, l = components.length; i < l; i++) {\n components[i].multiplex = true;\n\n for (j = 1, m = splitComponents.length; j < m; j++) {\n components[i].value.push([Token.PROPERTY_VALUE, Marker.COMMA]);\n Array.prototype.push.apply(components[i].value, splitComponents[j][i].value);\n }\n }\n\n return components;\n };\n}\n\nfunction listStyle(property, compactable, validator) {\n var type = _wrapDefault('list-style-type', property, compactable);\n var position = _wrapDefault('list-style-position', property, compactable);\n var image = _wrapDefault('list-style-image', property, compactable);\n var components = [type, position, image];\n\n if (property.value.length == 1 && property.value[0][1] == 'inherit') {\n type.value = position.value = image.value = [property.value[0]];\n return components;\n }\n\n var values = property.value.slice(0);\n var total = values.length;\n var index = 0;\n\n // `image` first...\n for (index = 0, total = values.length; index < total; index++) {\n if (validator.isUrl(values[index][1]) || values[index][1] == '0') {\n image.value = [values[index]];\n values.splice(index, 1);\n break;\n }\n }\n\n // ... then `position`\n for (index = 0, total = values.length; index < total; index++) {\n if (validator.isListStylePositionKeyword(values[index][1])) {\n position.value = [values[index]];\n values.splice(index, 1);\n break;\n }\n }\n\n // ... and what's left is a `type`\n if (values.length > 0 && (validator.isListStyleTypeKeyword(values[0][1]) || validator.isIdentifier(values[0][1]))) {\n type.value = [values[0]];\n }\n\n return components;\n}\n\nfunction transition(property, compactable, validator) {\n var prop = _wrapDefault(property.name + '-property', property, compactable);\n var duration = _wrapDefault(property.name + '-duration', property, compactable);\n var timing = _wrapDefault(property.name + '-timing-function', property, compactable);\n var delay = _wrapDefault(property.name + '-delay', property, compactable);\n var components = [prop, duration, timing, delay];\n var values = property.value;\n var value;\n var durationSet = false;\n var delaySet = false;\n var propSet = false;\n var timingSet = false;\n var i;\n var l;\n\n if (property.value.length == 1 && property.value[0][1] == 'inherit') {\n prop.value = duration.value = timing.value = delay.value = property.value;\n return components;\n }\n\n if (values.length > 1 && _anyIsInherit(values)) {\n throw new InvalidPropertyError('Invalid animation values at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n for (i = 0, l = values.length; i < l; i++) {\n value = values[i];\n\n if (validator.isTime(value[1]) && !durationSet) {\n duration.value = [value];\n durationSet = true;\n } else if (validator.isTime(value[1]) && !delaySet) {\n delay.value = [value];\n delaySet = true;\n } else if ((validator.isGlobal(value[1]) || validator.isTimingFunction(value[1])) && !timingSet) {\n timing.value = [value];\n timingSet = true;\n } else if (validator.isIdentifier(value[1]) && !propSet) {\n prop.value = [value];\n propSet = true;\n } else {\n throw new InvalidPropertyError('Invalid animation value at ' + formatPosition(value[2][0]) + '. Ignoring.');\n }\n }\n\n return components;\n}\n\nfunction widthStyleColor(property, compactable, validator) {\n var descriptor = compactable[property.name];\n var components = [\n _wrapDefault(descriptor.components[0], property, compactable),\n _wrapDefault(descriptor.components[1], property, compactable),\n _wrapDefault(descriptor.components[2], property, compactable)\n ];\n var color, style, width;\n\n for (var i = 0; i < 3; i++) {\n var component = components[i];\n\n if (component.name.indexOf('color') > 0)\n color = component;\n else if (component.name.indexOf('style') > 0)\n style = component;\n else\n width = component;\n }\n\n if ((property.value.length == 1 && property.value[0][1] == 'inherit') ||\n (property.value.length == 3 && property.value[0][1] == 'inherit' && property.value[1][1] == 'inherit' && property.value[2][1] == 'inherit')) {\n color.value = style.value = width.value = [property.value[0]];\n return components;\n }\n\n var values = property.value.slice(0);\n var match, matches;\n\n // NOTE: usually users don't follow the required order of parts in this shorthand,\n // so we'll try to parse it caring as little about order as possible\n\n if (values.length > 0) {\n matches = values.filter(_widthFilter(validator));\n match = matches.length > 1 && (matches[0][1] == 'none' || matches[0][1] == 'auto') ? matches[1] : matches[0];\n if (match) {\n width.value = [match];\n values.splice(values.indexOf(match), 1);\n }\n }\n\n if (values.length > 0) {\n match = values.filter(_styleFilter(validator))[0];\n if (match) {\n style.value = [match];\n values.splice(values.indexOf(match), 1);\n }\n }\n\n if (values.length > 0) {\n match = values.filter(_colorFilter(validator))[0];\n if (match) {\n color.value = [match];\n values.splice(values.indexOf(match), 1);\n }\n }\n\n return components;\n}\n\nmodule.exports = {\n animation: animation,\n background: background,\n border: widthStyleColor,\n borderRadius: borderRadius,\n font: font,\n fourValues: fourValues,\n listStyle: listStyle,\n multiplex: multiplex,\n outline: widthStyleColor,\n transition: transition\n};\n","var understandable = require('./properties/understandable');\n\nfunction animationIterationCount(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isAnimationIterationCountKeyword(value2) || validator.isPositiveNumber(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isAnimationIterationCountKeyword(value2) || validator.isPositiveNumber(value2);\n}\n\nfunction animationName(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isAnimationNameKeyword(value2) || validator.isIdentifier(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isAnimationNameKeyword(value2) || validator.isIdentifier(value2);\n}\n\nfunction areSameFunction(validator, value1, value2) {\n if (!validator.isFunction(value1) || !validator.isFunction(value2)) {\n return false;\n }\n\n var function1Name = value1.substring(0, value1.indexOf('('));\n var function2Name = value2.substring(0, value2.indexOf('('));\n\n return function1Name === function2Name;\n}\n\nfunction backgroundPosition(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isBackgroundPositionKeyword(value2) || validator.isGlobal(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if (validator.isBackgroundPositionKeyword(value2) || validator.isGlobal(value2)) {\n return true;\n }\n\n return unit(validator, value1, value2);\n}\n\nfunction backgroundSize(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isBackgroundSizeKeyword(value2) || validator.isGlobal(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if (validator.isBackgroundSizeKeyword(value2) || validator.isGlobal(value2)) {\n return true;\n }\n\n return unit(validator, value1, value2);\n}\n\nfunction color(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isColor(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if (!validator.colorOpacity && (validator.isRgbColor(value1) || validator.isHslColor(value1))) {\n return false;\n } else if (!validator.colorOpacity && (validator.isRgbColor(value2) || validator.isHslColor(value2))) {\n return false;\n } else if (validator.isColor(value1) && validator.isColor(value2)) {\n return true;\n }\n\n return sameFunctionOrValue(validator, value1, value2);\n}\n\nfunction components(overrideCheckers) {\n return function (validator, value1, value2, position) {\n return overrideCheckers[position](validator, value1, value2);\n };\n}\n\nfunction fontFamily(validator, value1, value2) {\n return understandable(validator, value1, value2, 0, true);\n}\n\nfunction image(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isImage(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if (validator.isImage(value2)) {\n return true;\n } else if (validator.isImage(value1)) {\n return false;\n }\n\n return sameFunctionOrValue(validator, value1, value2);\n}\n\nfunction keyword(propertyName) {\n return function(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isKeyword(propertyName)(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isKeyword(propertyName)(value2);\n };\n}\n\nfunction keywordWithGlobal(propertyName) {\n return function(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isKeyword(propertyName)(value2) || validator.isGlobal(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isKeyword(propertyName)(value2) || validator.isGlobal(value2);\n };\n}\n\nfunction propertyName(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isIdentifier(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isIdentifier(value2);\n}\n\nfunction sameFunctionOrValue(validator, value1, value2) {\n return areSameFunction(validator, value1, value2) ?\n true :\n value1 === value2;\n}\n\nfunction textShadow(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isUnit(value2) || validator.isColor(value2) || validator.isGlobal(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isUnit(value2) || validator.isColor(value2) || validator.isGlobal(value2);\n}\n\nfunction time(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isTime(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if (validator.isTime(value1) && !validator.isTime(value2)) {\n return false;\n } else if (validator.isTime(value2)) {\n return true;\n } else if (validator.isTime(value1)) {\n return false;\n } else if (validator.isFunction(value1) && !validator.isPrefixed(value1) && validator.isFunction(value2) && !validator.isPrefixed(value2)) {\n return true;\n }\n\n return sameFunctionOrValue(validator, value1, value2);\n}\n\nfunction timingFunction(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isTimingFunction(value2) || validator.isGlobal(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isTimingFunction(value2) || validator.isGlobal(value2);\n}\n\nfunction unit(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isUnit(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if (validator.isUnit(value1) && !validator.isUnit(value2)) {\n return false;\n } else if (validator.isUnit(value2)) {\n return true;\n } else if (validator.isUnit(value1)) {\n return false;\n } else if (validator.isFunction(value1) && !validator.isPrefixed(value1) && validator.isFunction(value2) && !validator.isPrefixed(value2)) {\n return true;\n }\n\n return sameFunctionOrValue(validator, value1, value2);\n}\n\nfunction unitOrKeywordWithGlobal(propertyName) {\n var byKeyword = keywordWithGlobal(propertyName);\n\n return function(validator, value1, value2) {\n return unit(validator, value1, value2) || byKeyword(validator, value1, value2);\n };\n}\n\nfunction unitOrNumber(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isUnit(value2) || validator.isNumber(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if ((validator.isUnit(value1) || validator.isNumber(value1)) && !(validator.isUnit(value2) || validator.isNumber(value2))) {\n return false;\n } else if (validator.isUnit(value2) || validator.isNumber(value2)) {\n return true;\n } else if (validator.isUnit(value1) || validator.isNumber(value1)) {\n return false;\n } else if (validator.isFunction(value1) && !validator.isPrefixed(value1) && validator.isFunction(value2) && !validator.isPrefixed(value2)) {\n return true;\n }\n\n return sameFunctionOrValue(validator, value1, value2);\n}\n\nfunction zIndex(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isZIndex(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isZIndex(value2);\n}\n\nmodule.exports = {\n generic: {\n color: color,\n components: components,\n image: image,\n propertyName: propertyName,\n time: time,\n timingFunction: timingFunction,\n unit: unit,\n unitOrNumber: unitOrNumber\n },\n property: {\n animationDirection: keywordWithGlobal('animation-direction'),\n animationFillMode: keyword('animation-fill-mode'),\n animationIterationCount: animationIterationCount,\n animationName: animationName,\n animationPlayState: keywordWithGlobal('animation-play-state'),\n backgroundAttachment: keyword('background-attachment'),\n backgroundClip: keywordWithGlobal('background-clip'),\n backgroundOrigin: keyword('background-origin'),\n backgroundPosition: backgroundPosition,\n backgroundRepeat: keyword('background-repeat'),\n backgroundSize: backgroundSize,\n bottom: unitOrKeywordWithGlobal('bottom'),\n borderCollapse: keyword('border-collapse'),\n borderStyle: keywordWithGlobal('*-style'),\n clear: keywordWithGlobal('clear'),\n cursor: keywordWithGlobal('cursor'),\n display: keywordWithGlobal('display'),\n float: keywordWithGlobal('float'),\n left: unitOrKeywordWithGlobal('left'),\n fontFamily: fontFamily,\n fontStretch: keywordWithGlobal('font-stretch'),\n fontStyle: keywordWithGlobal('font-style'),\n fontVariant: keywordWithGlobal('font-variant'),\n fontWeight: keywordWithGlobal('font-weight'),\n listStyleType: keywordWithGlobal('list-style-type'),\n listStylePosition: keywordWithGlobal('list-style-position'),\n outlineStyle: keywordWithGlobal('*-style'),\n overflow: keywordWithGlobal('overflow'),\n position: keywordWithGlobal('position'),\n right: unitOrKeywordWithGlobal('right'),\n textAlign: keywordWithGlobal('text-align'),\n textDecoration: keywordWithGlobal('text-decoration'),\n textOverflow: keywordWithGlobal('text-overflow'),\n textShadow: textShadow,\n top: unitOrKeywordWithGlobal('top'),\n transform: sameFunctionOrValue,\n verticalAlign: unitOrKeywordWithGlobal('vertical-align'),\n visibility: keywordWithGlobal('visibility'),\n whiteSpace: keywordWithGlobal('white-space'),\n zIndex: zIndex\n }\n};\n","var wrapSingle = require('../wrap-for-optimizing').single;\n\nvar Token = require('../../tokenizer/token');\n\nfunction deep(property) {\n var cloned = shallow(property);\n for (var i = property.components.length - 1; i >= 0; i--) {\n var component = shallow(property.components[i]);\n component.value = property.components[i].value.slice(0);\n cloned.components.unshift(component);\n }\n\n cloned.dirty = true;\n cloned.value = property.value.slice(0);\n\n return cloned;\n}\n\nfunction shallow(property) {\n var cloned = wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, property.name]\n ]);\n cloned.important = property.important;\n cloned.hack = property.hack;\n cloned.unused = false;\n return cloned;\n}\n\nmodule.exports = {\n deep: deep,\n shallow: shallow\n};\n","// Contains the interpretation of CSS properties, as used by the property optimizer\n\nvar breakUp = require('./break-up');\nvar canOverride = require('./can-override');\nvar restore = require('./restore');\n\nvar override = require('../../utils/override');\n\n// Properties to process\n// Extend this object in order to add support for more properties in the optimizer.\n//\n// Each key in this object represents a CSS property and should be an object.\n// Such an object contains properties that describe how the represented CSS property should be handled.\n// Possible options:\n//\n// * components: array (Only specify for shorthand properties.)\n// Contains the names of the granular properties this shorthand compacts.\n//\n// * canOverride: function\n// Returns whether two tokens of this property can be merged with each other.\n// This property has no meaning for shorthands.\n//\n// * defaultValue: string\n// Specifies the default value of the property according to the CSS standard.\n// For shorthand, this is used when every component is set to its default value, therefore it should be the shortest possible default value of all the components.\n//\n// * shortestValue: string\n// Specifies the shortest possible value the property can possibly have.\n// (Falls back to defaultValue if unspecified.)\n//\n// * breakUp: function (Only specify for shorthand properties.)\n// Breaks the shorthand up to its components.\n//\n// * restore: function (Only specify for shorthand properties.)\n// Puts the shorthand together from its components.\n//\nvar compactable = {\n 'animation': {\n canOverride: canOverride.generic.components([\n canOverride.generic.time,\n canOverride.generic.timingFunction,\n canOverride.generic.time,\n canOverride.property.animationIterationCount,\n canOverride.property.animationDirection,\n canOverride.property.animationFillMode,\n canOverride.property.animationPlayState,\n canOverride.property.animationName\n ]),\n components: [\n 'animation-duration',\n 'animation-timing-function',\n 'animation-delay',\n 'animation-iteration-count',\n 'animation-direction',\n 'animation-fill-mode',\n 'animation-play-state',\n 'animation-name'\n ],\n breakUp: breakUp.multiplex(breakUp.animation),\n defaultValue: 'none',\n restore: restore.multiplex(restore.withoutDefaults),\n shorthand: true,\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-delay': {\n canOverride: canOverride.generic.time,\n componentOf: [\n 'animation'\n ],\n defaultValue: '0s',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-direction': {\n canOverride: canOverride.property.animationDirection,\n componentOf: [\n 'animation'\n ],\n defaultValue: 'normal',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-duration': {\n canOverride: canOverride.generic.time,\n componentOf: [\n 'animation'\n ],\n defaultValue: '0s',\n intoMultiplexMode: 'real',\n keepUnlessDefault: 'animation-delay',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-fill-mode': {\n canOverride: canOverride.property.animationFillMode,\n componentOf: [\n 'animation'\n ],\n defaultValue: 'none',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-iteration-count': {\n canOverride: canOverride.property.animationIterationCount,\n componentOf: [\n 'animation'\n ],\n defaultValue: '1',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-name': {\n canOverride: canOverride.property.animationName,\n componentOf: [\n 'animation'\n ],\n defaultValue: 'none',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-play-state': {\n canOverride: canOverride.property.animationPlayState,\n componentOf: [\n 'animation'\n ],\n defaultValue: 'running',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-timing-function': {\n canOverride: canOverride.generic.timingFunction,\n componentOf: [\n 'animation'\n ],\n defaultValue: 'ease',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'background': {\n canOverride: canOverride.generic.components([\n canOverride.generic.image,\n canOverride.property.backgroundPosition,\n canOverride.property.backgroundSize,\n canOverride.property.backgroundRepeat,\n canOverride.property.backgroundAttachment,\n canOverride.property.backgroundOrigin,\n canOverride.property.backgroundClip,\n canOverride.generic.color\n ]),\n components: [\n 'background-image',\n 'background-position',\n 'background-size',\n 'background-repeat',\n 'background-attachment',\n 'background-origin',\n 'background-clip',\n 'background-color'\n ],\n breakUp: breakUp.multiplex(breakUp.background),\n defaultValue: '0 0',\n restore: restore.multiplex(restore.background),\n shortestValue: '0',\n shorthand: true\n },\n 'background-attachment': {\n canOverride: canOverride.property.backgroundAttachment,\n componentOf: [\n 'background'\n ],\n defaultValue: 'scroll',\n intoMultiplexMode: 'real'\n },\n 'background-clip': {\n canOverride: canOverride.property.backgroundClip,\n componentOf: [\n 'background'\n ],\n defaultValue: 'border-box',\n intoMultiplexMode: 'real',\n shortestValue: 'border-box'\n },\n 'background-color': {\n canOverride: canOverride.generic.color,\n componentOf: [\n 'background'\n ],\n defaultValue: 'transparent',\n intoMultiplexMode: 'real', // otherwise real color will turn into default since color appears in last multiplex only\n multiplexLastOnly: true,\n nonMergeableValue: 'none',\n shortestValue: 'red'\n },\n 'background-image': {\n canOverride: canOverride.generic.image,\n componentOf: [\n 'background'\n ],\n defaultValue: 'none',\n intoMultiplexMode: 'default'\n },\n 'background-origin': {\n canOverride: canOverride.property.backgroundOrigin,\n componentOf: [\n 'background'\n ],\n defaultValue: 'padding-box',\n intoMultiplexMode: 'real',\n shortestValue: 'border-box'\n },\n 'background-position': {\n canOverride: canOverride.property.backgroundPosition,\n componentOf: [\n 'background'\n ],\n defaultValue: ['0', '0'],\n doubleValues: true,\n intoMultiplexMode: 'real',\n shortestValue: '0'\n },\n 'background-repeat': {\n canOverride: canOverride.property.backgroundRepeat,\n componentOf: [\n 'background'\n ],\n defaultValue: ['repeat'],\n doubleValues: true,\n intoMultiplexMode: 'real'\n },\n 'background-size': {\n canOverride: canOverride.property.backgroundSize,\n componentOf: [\n 'background'\n ],\n defaultValue: ['auto'],\n doubleValues: true,\n intoMultiplexMode: 'real',\n shortestValue: '0 0'\n },\n 'bottom': {\n canOverride: canOverride.property.bottom,\n defaultValue: 'auto'\n },\n 'border': {\n breakUp: breakUp.border,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.property.borderStyle,\n canOverride.generic.color\n ]),\n components: [\n 'border-width',\n 'border-style',\n 'border-color'\n ],\n defaultValue: 'none',\n overridesShorthands: [\n 'border-bottom',\n 'border-left',\n 'border-right',\n 'border-top'\n ],\n restore: restore.withoutDefaults,\n shorthand: true,\n shorthandComponents: true\n },\n 'border-bottom': {\n breakUp: breakUp.border,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.property.borderStyle,\n canOverride.generic.color\n ]),\n components: [\n 'border-bottom-width',\n 'border-bottom-style',\n 'border-bottom-color'\n ],\n defaultValue: 'none',\n restore: restore.withoutDefaults,\n shorthand: true\n },\n 'border-bottom-color': {\n canOverride: canOverride.generic.color,\n componentOf: [\n 'border-bottom',\n 'border-color'\n ],\n defaultValue: 'none'\n },\n 'border-bottom-left-radius': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-radius'\n ],\n defaultValue: '0',\n vendorPrefixes: [\n '-moz-',\n '-o-'\n ]\n },\n 'border-bottom-right-radius': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-radius'\n ],\n defaultValue: '0',\n vendorPrefixes: [\n '-moz-',\n '-o-'\n ]\n },\n 'border-bottom-style': {\n canOverride: canOverride.property.borderStyle,\n componentOf: [\n 'border-bottom',\n 'border-style'\n ],\n defaultValue: 'none'\n },\n 'border-bottom-width': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-bottom',\n 'border-width'\n ],\n defaultValue: 'medium',\n oppositeTo: 'border-top-width',\n shortestValue: '0'\n },\n 'border-collapse': {\n canOverride: canOverride.property.borderCollapse,\n defaultValue: 'separate'\n },\n 'border-color': {\n breakUp: breakUp.fourValues,\n canOverride: canOverride.generic.components([\n canOverride.generic.color,\n canOverride.generic.color,\n canOverride.generic.color,\n canOverride.generic.color\n ]),\n componentOf: [\n 'border'\n ],\n components: [\n 'border-top-color',\n 'border-right-color',\n 'border-bottom-color',\n 'border-left-color'\n ],\n defaultValue: 'none',\n restore: restore.fourValues,\n shortestValue: 'red',\n shorthand: true\n },\n 'border-left': {\n breakUp: breakUp.border,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.property.borderStyle,\n canOverride.generic.color\n ]),\n components: [\n 'border-left-width',\n 'border-left-style',\n 'border-left-color'\n ],\n defaultValue: 'none',\n restore: restore.withoutDefaults,\n shorthand: true\n },\n 'border-left-color': {\n canOverride: canOverride.generic.color,\n componentOf: [\n 'border-color',\n 'border-left'\n ],\n defaultValue: 'none'\n },\n 'border-left-style': {\n canOverride: canOverride.property.borderStyle,\n componentOf: [\n 'border-left',\n 'border-style'\n ],\n defaultValue: 'none'\n },\n 'border-left-width': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-left',\n 'border-width'\n ],\n defaultValue: 'medium',\n oppositeTo: 'border-right-width',\n shortestValue: '0'\n },\n 'border-radius': {\n breakUp: breakUp.borderRadius,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit\n ]),\n components: [\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-bottom-right-radius',\n 'border-bottom-left-radius'\n ],\n defaultValue: '0',\n restore: restore.borderRadius,\n shorthand: true,\n vendorPrefixes: [\n '-moz-',\n '-o-'\n ]\n },\n 'border-right': {\n breakUp: breakUp.border,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.property.borderStyle,\n canOverride.generic.color\n ]),\n components: [\n 'border-right-width',\n 'border-right-style',\n 'border-right-color'\n ],\n defaultValue: 'none',\n restore: restore.withoutDefaults,\n shorthand: true\n },\n 'border-right-color': {\n canOverride: canOverride.generic.color,\n componentOf: [\n 'border-color',\n 'border-right'\n ],\n defaultValue: 'none'\n },\n 'border-right-style': {\n canOverride: canOverride.property.borderStyle,\n componentOf: [\n 'border-right',\n 'border-style'\n ],\n defaultValue: 'none'\n },\n 'border-right-width': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-right',\n 'border-width'\n ],\n defaultValue: 'medium',\n oppositeTo: 'border-left-width',\n shortestValue: '0'\n },\n 'border-style': {\n breakUp: breakUp.fourValues,\n canOverride: canOverride.generic.components([\n canOverride.property.borderStyle,\n canOverride.property.borderStyle,\n canOverride.property.borderStyle,\n canOverride.property.borderStyle\n ]),\n componentOf: [\n 'border'\n ],\n components: [\n 'border-top-style',\n 'border-right-style',\n 'border-bottom-style',\n 'border-left-style'\n ],\n defaultValue: 'none',\n restore: restore.fourValues,\n shorthand: true\n },\n 'border-top': {\n breakUp: breakUp.border,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.property.borderStyle,\n canOverride.generic.color\n ]),\n components: [\n 'border-top-width',\n 'border-top-style',\n 'border-top-color'\n ],\n defaultValue: 'none',\n restore: restore.withoutDefaults,\n shorthand: true\n },\n 'border-top-color': {\n canOverride: canOverride.generic.color,\n componentOf: [\n 'border-color',\n 'border-top'\n ],\n defaultValue: 'none'\n },\n 'border-top-left-radius': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-radius'\n ],\n defaultValue: '0',\n vendorPrefixes: [\n '-moz-',\n '-o-'\n ]\n },\n 'border-top-right-radius': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-radius'\n ],\n defaultValue: '0',\n vendorPrefixes: [\n '-moz-',\n '-o-'\n ]\n },\n 'border-top-style': {\n canOverride: canOverride.property.borderStyle,\n componentOf: [\n 'border-style',\n 'border-top'\n ],\n defaultValue: 'none'\n },\n 'border-top-width': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-top',\n 'border-width'\n ],\n defaultValue: 'medium',\n oppositeTo: 'border-bottom-width',\n shortestValue: '0'\n },\n 'border-width': {\n breakUp: breakUp.fourValues,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit\n ]),\n componentOf: [\n 'border'\n ],\n components: [\n 'border-top-width',\n 'border-right-width',\n 'border-bottom-width',\n 'border-left-width'\n ],\n defaultValue: 'medium',\n restore: restore.fourValues,\n shortestValue: '0',\n shorthand: true\n },\n 'clear': {\n canOverride: canOverride.property.clear,\n defaultValue: 'none'\n },\n 'color': {\n canOverride: canOverride.generic.color,\n defaultValue: 'transparent',\n shortestValue: 'red'\n },\n 'cursor': {\n canOverride: canOverride.property.cursor,\n defaultValue: 'auto'\n },\n 'display': {\n canOverride: canOverride.property.display,\n },\n 'float': {\n canOverride: canOverride.property.float,\n defaultValue: 'none'\n },\n 'font': {\n breakUp: breakUp.font,\n canOverride: canOverride.generic.components([\n canOverride.property.fontStyle,\n canOverride.property.fontVariant,\n canOverride.property.fontWeight,\n canOverride.property.fontStretch,\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.property.fontFamily\n ]),\n components: [\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'font-stretch',\n 'font-size',\n 'line-height',\n 'font-family'\n ],\n restore: restore.font,\n shorthand: true\n },\n 'font-family': {\n canOverride: canOverride.property.fontFamily,\n defaultValue: 'user|agent|specific'\n },\n 'font-size': {\n canOverride: canOverride.generic.unit,\n defaultValue: 'medium',\n shortestValue: '0'\n },\n 'font-stretch': {\n canOverride: canOverride.property.fontStretch,\n defaultValue: 'normal'\n },\n 'font-style': {\n canOverride: canOverride.property.fontStyle,\n defaultValue: 'normal'\n },\n 'font-variant': {\n canOverride: canOverride.property.fontVariant,\n defaultValue: 'normal'\n },\n 'font-weight': {\n canOverride: canOverride.property.fontWeight,\n defaultValue: 'normal',\n shortestValue: '400'\n },\n 'height': {\n canOverride: canOverride.generic.unit,\n defaultValue: 'auto',\n shortestValue: '0'\n },\n 'left': {\n canOverride: canOverride.property.left,\n defaultValue: 'auto'\n },\n 'line-height': {\n canOverride: canOverride.generic.unitOrNumber,\n defaultValue: 'normal',\n shortestValue: '0'\n },\n 'list-style': {\n canOverride: canOverride.generic.components([\n canOverride.property.listStyleType,\n canOverride.property.listStylePosition,\n canOverride.property.listStyleImage\n ]),\n components: [\n 'list-style-type',\n 'list-style-position',\n 'list-style-image'\n ],\n breakUp: breakUp.listStyle,\n restore: restore.withoutDefaults,\n defaultValue: 'outside', // can't use 'disc' because that'd override default 'decimal' for \n shortestValue: 'none',\n shorthand: true\n },\n 'list-style-image' : {\n canOverride: canOverride.generic.image,\n componentOf: [\n 'list-style'\n ],\n defaultValue: 'none'\n },\n 'list-style-position' : {\n canOverride: canOverride.property.listStylePosition,\n componentOf: [\n 'list-style'\n ],\n defaultValue: 'outside',\n shortestValue: 'inside'\n },\n 'list-style-type' : {\n canOverride: canOverride.property.listStyleType,\n componentOf: [\n 'list-style'\n ],\n // NOTE: we can't tell the real default value here, it's 'disc' for
and 'decimal' for \n // this is a hack, but it doesn't matter because this value will be either overridden or\n // it will disappear at the final step anyway\n defaultValue: 'decimal|disc',\n shortestValue: 'none'\n },\n 'margin': {\n breakUp: breakUp.fourValues,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit\n ]),\n components: [\n 'margin-top',\n 'margin-right',\n 'margin-bottom',\n 'margin-left'\n ],\n defaultValue: '0',\n restore: restore.fourValues,\n shorthand: true\n },\n 'margin-bottom': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'margin'\n ],\n defaultValue: '0',\n oppositeTo: 'margin-top'\n },\n 'margin-left': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'margin'\n ],\n defaultValue: '0',\n oppositeTo: 'margin-right'\n },\n 'margin-right': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'margin'\n ],\n defaultValue: '0',\n oppositeTo: 'margin-left'\n },\n 'margin-top': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'margin'\n ],\n defaultValue: '0',\n oppositeTo: 'margin-bottom'\n },\n 'outline': {\n canOverride: canOverride.generic.components([\n canOverride.generic.color,\n canOverride.property.outlineStyle,\n canOverride.generic.unit\n ]),\n components: [\n 'outline-color',\n 'outline-style',\n 'outline-width'\n ],\n breakUp: breakUp.outline,\n restore: restore.withoutDefaults,\n defaultValue: '0',\n shorthand: true\n },\n 'outline-color': {\n canOverride: canOverride.generic.color,\n componentOf: [\n 'outline'\n ],\n defaultValue: 'invert',\n shortestValue: 'red'\n },\n 'outline-style': {\n canOverride: canOverride.property.outlineStyle,\n componentOf: [\n 'outline'\n ],\n defaultValue: 'none'\n },\n 'outline-width': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'outline'\n ],\n defaultValue: 'medium',\n shortestValue: '0'\n },\n 'overflow': {\n canOverride: canOverride.property.overflow,\n defaultValue: 'visible'\n },\n 'overflow-x': {\n canOverride: canOverride.property.overflow,\n defaultValue: 'visible'\n },\n 'overflow-y': {\n canOverride: canOverride.property.overflow,\n defaultValue: 'visible'\n },\n 'padding': {\n breakUp: breakUp.fourValues,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit\n ]),\n components: [\n 'padding-top',\n 'padding-right',\n 'padding-bottom',\n 'padding-left'\n ],\n defaultValue: '0',\n restore: restore.fourValues,\n shorthand: true\n },\n 'padding-bottom': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'padding'\n ],\n defaultValue: '0',\n oppositeTo: 'padding-top'\n },\n 'padding-left': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'padding'\n ],\n defaultValue: '0',\n oppositeTo: 'padding-right'\n },\n 'padding-right': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'padding'\n ],\n defaultValue: '0',\n oppositeTo: 'padding-left'\n },\n 'padding-top': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'padding'\n ],\n defaultValue: '0',\n oppositeTo: 'padding-bottom'\n },\n 'position': {\n canOverride: canOverride.property.position,\n defaultValue: 'static'\n },\n 'right': {\n canOverride: canOverride.property.right,\n defaultValue: 'auto'\n },\n 'text-align': {\n canOverride: canOverride.property.textAlign,\n // NOTE: we can't tell the real default value here, as it depends on default text direction\n // this is a hack, but it doesn't matter because this value will be either overridden or\n // it will disappear anyway\n defaultValue: 'left|right'\n },\n 'text-decoration': {\n canOverride: canOverride.property.textDecoration,\n defaultValue: 'none'\n },\n 'text-overflow': {\n canOverride: canOverride.property.textOverflow,\n defaultValue: 'none'\n },\n 'text-shadow': {\n canOverride: canOverride.property.textShadow,\n defaultValue: 'none'\n },\n 'top': {\n canOverride: canOverride.property.top,\n defaultValue: 'auto'\n },\n 'transform': {\n canOverride: canOverride.property.transform,\n vendorPrefixes: [\n '-moz-',\n '-ms-',\n '-webkit-'\n ]\n },\n 'transition': {\n breakUp: breakUp.multiplex(breakUp.transition),\n canOverride: canOverride.generic.components([\n canOverride.property.transitionProperty,\n canOverride.generic.time,\n canOverride.generic.timingFunction,\n canOverride.generic.time\n ]),\n components: [\n 'transition-property',\n 'transition-duration',\n 'transition-timing-function',\n 'transition-delay'\n ],\n defaultValue: 'none',\n restore: restore.multiplex(restore.withoutDefaults),\n shorthand: true,\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'transition-delay': {\n canOverride: canOverride.generic.time,\n componentOf: [\n 'transition'\n ],\n defaultValue: '0s',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'transition-duration': {\n canOverride: canOverride.generic.time,\n componentOf: [\n 'transition'\n ],\n defaultValue: '0s',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'transition-property': {\n canOverride: canOverride.generic.propertyName,\n componentOf: [\n 'transition'\n ],\n defaultValue: 'all',\n intoMultiplexMode: 'placeholder',\n placeholderValue: '_', // it's a short value that won't match any property and still be a valid `transition-property`\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'transition-timing-function': {\n canOverride: canOverride.generic.timingFunction,\n componentOf: [\n 'transition'\n ],\n defaultValue: 'ease',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'vertical-align': {\n canOverride: canOverride.property.verticalAlign,\n defaultValue: 'baseline'\n },\n 'visibility': {\n canOverride: canOverride.property.visibility,\n defaultValue: 'visible'\n },\n 'white-space': {\n canOverride: canOverride.property.whiteSpace,\n defaultValue: 'normal'\n },\n 'width': {\n canOverride: canOverride.generic.unit,\n defaultValue: 'auto',\n shortestValue: '0'\n },\n 'z-index': {\n canOverride: canOverride.property.zIndex,\n defaultValue: 'auto'\n }\n};\n\nfunction cloneDescriptor(propertyName, prefix) {\n var clonedDescriptor = override(compactable[propertyName], {});\n\n if ('componentOf' in clonedDescriptor) {\n clonedDescriptor.componentOf = clonedDescriptor.componentOf.map(function (shorthandName) {\n return prefix + shorthandName;\n });\n }\n\n if ('components' in clonedDescriptor) {\n clonedDescriptor.components = clonedDescriptor.components.map(function (longhandName) {\n return prefix + longhandName;\n });\n }\n\n if ('keepUnlessDefault' in clonedDescriptor) {\n clonedDescriptor.keepUnlessDefault = prefix + clonedDescriptor.keepUnlessDefault;\n }\n\n return clonedDescriptor;\n}\n\n// generate vendor-prefixed properties\nvar vendorPrefixedCompactable = {};\n\nfor (var propertyName in compactable) {\n var descriptor = compactable[propertyName];\n\n if (!('vendorPrefixes' in descriptor)) {\n continue;\n }\n\n for (var i = 0; i < descriptor.vendorPrefixes.length; i++) {\n var prefix = descriptor.vendorPrefixes[i];\n var clonedDescriptor = cloneDescriptor(propertyName, prefix);\n delete clonedDescriptor.vendorPrefixes;\n\n vendorPrefixedCompactable[prefix + propertyName] = clonedDescriptor;\n }\n\n delete descriptor.vendorPrefixes;\n}\n\nmodule.exports = override(compactable, vendorPrefixedCompactable);\n","// This extractor is used in level 2 optimizations\n// IMPORTANT: Mind Token class and this code is not related!\n// Properties will be tokenized in one step, see #429\n\nvar Token = require('../../tokenizer/token');\nvar serializeRules = require('../../writer/one-time').rules;\nvar serializeValue = require('../../writer/one-time').value;\n\nfunction extractProperties(token) {\n var properties = [];\n var inSpecificSelector;\n var property;\n var name;\n var value;\n var i, l;\n\n if (token[0] == Token.RULE) {\n inSpecificSelector = !/[\\.\\+>~]/.test(serializeRules(token[1]));\n\n for (i = 0, l = token[2].length; i < l; i++) {\n property = token[2][i];\n\n if (property[0] != Token.PROPERTY)\n continue;\n\n name = property[1][1];\n if (name.length === 0)\n continue;\n\n if (name.indexOf('--') === 0)\n continue;\n\n value = serializeValue(property, i);\n\n properties.push([\n name,\n value,\n findNameRoot(name),\n token[2][i],\n name + ':' + value,\n token[1],\n inSpecificSelector\n ]);\n }\n } else if (token[0] == Token.NESTED_BLOCK) {\n for (i = 0, l = token[2].length; i < l; i++) {\n properties = properties.concat(extractProperties(token[2][i]));\n }\n }\n\n return properties;\n}\n\nfunction findNameRoot(name) {\n if (name == 'list-style')\n return name;\n if (name.indexOf('-radius') > 0)\n return 'border-radius';\n if (name == 'border-collapse' || name == 'border-spacing' || name == 'border-image')\n return name;\n if (name.indexOf('border-') === 0 && /^border\\-\\w+\\-\\w+$/.test(name))\n return name.match(/border\\-\\w+/)[0];\n if (name.indexOf('border-') === 0 && /^border\\-\\w+$/.test(name))\n return 'border';\n if (name.indexOf('text-') === 0)\n return name;\n if (name == '-chrome-')\n return name;\n\n return name.replace(/^\\-\\w+\\-/, '').match(/([a-zA-Z]+)/)[0].toLowerCase();\n}\n\nmodule.exports = extractProperties;\n","function InvalidPropertyError(message) {\n this.name = 'InvalidPropertyError';\n this.message = message;\n this.stack = (new Error()).stack;\n}\n\nInvalidPropertyError.prototype = Object.create(Error.prototype);\nInvalidPropertyError.prototype.constructor = InvalidPropertyError;\n\nmodule.exports = InvalidPropertyError;\n","var Marker = require('../../tokenizer/marker');\nvar split = require('../../utils/split');\n\nvar DEEP_SELECTOR_PATTERN = /\\/deep\\//;\nvar DOUBLE_COLON_PATTERN = /^::/;\nvar NOT_PSEUDO = ':not';\nvar PSEUDO_CLASSES_WITH_ARGUMENTS = [\n ':dir',\n ':lang',\n ':not',\n ':nth-child',\n ':nth-last-child',\n ':nth-last-of-type',\n ':nth-of-type'\n];\nvar RELATION_PATTERN = /[>\\+~]/;\nvar UNMIXABLE_PSEUDO_CLASSES = [\n ':after',\n ':before',\n ':first-letter',\n ':first-line',\n ':lang'\n];\nvar UNMIXABLE_PSEUDO_ELEMENTS = [\n '::after',\n '::before',\n '::first-letter',\n '::first-line'\n];\n\nvar Level = {\n DOUBLE_QUOTE: 'double-quote',\n SINGLE_QUOTE: 'single-quote',\n ROOT: 'root'\n};\n\nfunction isMergeable(selector, mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) {\n var singleSelectors = split(selector, Marker.COMMA);\n var singleSelector;\n var i, l;\n\n for (i = 0, l = singleSelectors.length; i < l; i++) {\n singleSelector = singleSelectors[i];\n\n if (singleSelector.length === 0 ||\n isDeepSelector(singleSelector) ||\n (singleSelector.indexOf(Marker.COLON) > -1 && !areMergeable(singleSelector, extractPseudoFrom(singleSelector), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging))) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction isDeepSelector(selector) {\n return DEEP_SELECTOR_PATTERN.test(selector);\n}\n\nfunction extractPseudoFrom(selector) {\n var list = [];\n var character;\n var buffer = [];\n var level = Level.ROOT;\n var roundBracketLevel = 0;\n var isQuoted;\n var isEscaped;\n var isPseudo = false;\n var isRelation;\n var wasColon = false;\n var index;\n var len;\n\n for (index = 0, len = selector.length; index < len; index++) {\n character = selector[index];\n\n isRelation = !isEscaped && RELATION_PATTERN.test(character);\n isQuoted = level == Level.DOUBLE_QUOTE || level == Level.SINGLE_QUOTE;\n\n if (isEscaped) {\n buffer.push(character);\n } else if (character == Marker.DOUBLE_QUOTE && level == Level.ROOT) {\n buffer.push(character);\n level = Level.DOUBLE_QUOTE;\n } else if (character == Marker.DOUBLE_QUOTE && level == Level.DOUBLE_QUOTE) {\n buffer.push(character);\n level = Level.ROOT;\n } else if (character == Marker.SINGLE_QUOTE && level == Level.ROOT) {\n buffer.push(character);\n level = Level.SINGLE_QUOTE;\n } else if (character == Marker.SINGLE_QUOTE && level == Level.SINGLE_QUOTE) {\n buffer.push(character);\n level = Level.ROOT;\n } else if (isQuoted) {\n buffer.push(character);\n } else if (character == Marker.OPEN_ROUND_BRACKET) {\n buffer.push(character);\n roundBracketLevel++;\n } else if (character == Marker.CLOSE_ROUND_BRACKET && roundBracketLevel == 1 && isPseudo) {\n buffer.push(character);\n list.push(buffer.join(''));\n roundBracketLevel--;\n buffer = [];\n isPseudo = false;\n } else if (character == Marker.CLOSE_ROUND_BRACKET) {\n buffer.push(character);\n roundBracketLevel--;\n } else if (character == Marker.COLON && roundBracketLevel === 0 && isPseudo && !wasColon) {\n list.push(buffer.join(''));\n buffer = [];\n buffer.push(character);\n } else if (character == Marker.COLON && roundBracketLevel === 0 && !wasColon) {\n buffer = [];\n buffer.push(character);\n isPseudo = true;\n } else if (character == Marker.SPACE && roundBracketLevel === 0 && isPseudo) {\n list.push(buffer.join(''));\n buffer = [];\n isPseudo = false;\n } else if (isRelation && roundBracketLevel === 0 && isPseudo) {\n list.push(buffer.join(''));\n buffer = [];\n isPseudo = false;\n } else {\n buffer.push(character);\n }\n\n isEscaped = character == Marker.BACK_SLASH;\n wasColon = character == Marker.COLON;\n }\n\n if (buffer.length > 0 && isPseudo) {\n list.push(buffer.join(''));\n }\n\n return list;\n}\n\nfunction areMergeable(selector, matches, mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) {\n return areAllowed(matches, mergeablePseudoClasses, mergeablePseudoElements) &&\n needArguments(matches) &&\n (matches.length < 2 || !someIncorrectlyChained(selector, matches)) &&\n (matches.length < 2 || multiplePseudoMerging && allMixable(matches));\n}\n\nfunction areAllowed(matches, mergeablePseudoClasses, mergeablePseudoElements) {\n var match;\n var name;\n var i, l;\n\n for (i = 0, l = matches.length; i < l; i++) {\n match = matches[i];\n name = match.indexOf(Marker.OPEN_ROUND_BRACKET) > -1 ?\n match.substring(0, match.indexOf(Marker.OPEN_ROUND_BRACKET)) :\n match;\n\n if (mergeablePseudoClasses.indexOf(name) === -1 && mergeablePseudoElements.indexOf(name) === -1) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction needArguments(matches) {\n var match;\n var name;\n var bracketOpensAt;\n var hasArguments;\n var i, l;\n\n for (i = 0, l = matches.length; i < l; i++) {\n match = matches[i];\n\n bracketOpensAt = match.indexOf(Marker.OPEN_ROUND_BRACKET);\n hasArguments = bracketOpensAt > -1;\n name = hasArguments ?\n match.substring(0, bracketOpensAt) :\n match;\n\n if (hasArguments && PSEUDO_CLASSES_WITH_ARGUMENTS.indexOf(name) == -1) {\n return false;\n }\n\n if (!hasArguments && PSEUDO_CLASSES_WITH_ARGUMENTS.indexOf(name) > -1) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction someIncorrectlyChained(selector, matches) {\n var positionInSelector = 0;\n var match;\n var matchAt;\n var nextMatch;\n var nextMatchAt;\n var name;\n var nextName;\n var areChained;\n var i, l;\n\n for (i = 0, l = matches.length; i < l; i++) {\n match = matches[i];\n nextMatch = matches[i + 1];\n\n if (!nextMatch) {\n break;\n }\n\n matchAt = selector.indexOf(match, positionInSelector);\n nextMatchAt = selector.indexOf(match, matchAt + 1);\n positionInSelector = nextMatchAt;\n areChained = matchAt + match.length == nextMatchAt;\n\n if (areChained) {\n name = match.indexOf(Marker.OPEN_ROUND_BRACKET) > -1 ?\n match.substring(0, match.indexOf(Marker.OPEN_ROUND_BRACKET)) :\n match;\n nextName = nextMatch.indexOf(Marker.OPEN_ROUND_BRACKET) > -1 ?\n nextMatch.substring(0, nextMatch.indexOf(Marker.OPEN_ROUND_BRACKET)) :\n nextMatch;\n\n if (name != NOT_PSEUDO || nextName != NOT_PSEUDO) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nfunction allMixable(matches) {\n var unmixableMatches = 0;\n var match;\n var i, l;\n\n for (i = 0, l = matches.length; i < l; i++) {\n match = matches[i];\n\n if (isPseudoElement(match)) {\n unmixableMatches += UNMIXABLE_PSEUDO_ELEMENTS.indexOf(match) > -1 ? 1 : 0;\n } else {\n unmixableMatches += UNMIXABLE_PSEUDO_CLASSES.indexOf(match) > -1 ? 1 : 0;\n }\n\n if (unmixableMatches > 1) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction isPseudoElement(pseudo) {\n return DOUBLE_COLON_PATTERN.test(pseudo);\n}\n\nmodule.exports = isMergeable;\n","var isMergeable = require('./is-mergeable');\n\nvar optimizeProperties = require('./properties/optimize');\n\nvar sortSelectors = require('../level-1/sort-selectors');\nvar tidyRules = require('../level-1/tidy-rules');\n\nvar OptimizationLevel = require('../../options/optimization-level').OptimizationLevel;\n\nvar serializeBody = require('../../writer/one-time').body;\nvar serializeRules = require('../../writer/one-time').rules;\n\nvar Token = require('../../tokenizer/token');\n\nfunction mergeAdjacent(tokens, context) {\n var lastToken = [null, [], []];\n var options = context.options;\n var adjacentSpace = options.compatibility.selectors.adjacentSpace;\n var selectorsSortingMethod = options.level[OptimizationLevel.One].selectorsSortingMethod;\n var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;\n var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;\n var mergeLimit = options.compatibility.selectors.mergeLimit;\n var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;\n\n for (var i = 0, l = tokens.length; i < l; i++) {\n var token = tokens[i];\n\n if (token[0] != Token.RULE) {\n lastToken = [null, [], []];\n continue;\n }\n\n if (lastToken[0] == Token.RULE && serializeRules(token[1]) == serializeRules(lastToken[1])) {\n Array.prototype.push.apply(lastToken[2], token[2]);\n optimizeProperties(lastToken[2], true, true, context);\n token[2] = [];\n } else if (lastToken[0] == Token.RULE && serializeBody(token[2]) == serializeBody(lastToken[2]) &&\n isMergeable(serializeRules(token[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) &&\n isMergeable(serializeRules(lastToken[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) &&\n lastToken[1].length < mergeLimit) {\n lastToken[1] = tidyRules(lastToken[1].concat(token[1]), false, adjacentSpace, false, context.warnings);\n lastToken[1] = lastToken.length > 1 ? sortSelectors(lastToken[1], selectorsSortingMethod) : lastToken[1];\n token[2] = [];\n } else {\n lastToken = token;\n }\n }\n}\n\nmodule.exports = mergeAdjacent;\n","var canReorder = require('./reorderable').canReorder;\nvar canReorderSingle = require('./reorderable').canReorderSingle;\nvar extractProperties = require('./extract-properties');\nvar rulesOverlap = require('./rules-overlap');\n\nvar serializeRules = require('../../writer/one-time').rules;\nvar OptimizationLevel = require('../../options/optimization-level').OptimizationLevel;\nvar Token = require('../../tokenizer/token');\n\nfunction mergeMediaQueries(tokens, context) {\n var mergeSemantically = context.options.level[OptimizationLevel.Two].mergeSemantically;\n var specificityCache = context.cache.specificity;\n var candidates = {};\n var reduced = [];\n\n for (var i = tokens.length - 1; i >= 0; i--) {\n var token = tokens[i];\n if (token[0] != Token.NESTED_BLOCK) {\n continue;\n }\n\n var key = serializeRules(token[1]);\n var candidate = candidates[key];\n if (!candidate) {\n candidate = [];\n candidates[key] = candidate;\n }\n\n candidate.push(i);\n }\n\n for (var name in candidates) {\n var positions = candidates[name];\n\n positionLoop:\n for (var j = positions.length - 1; j > 0; j--) {\n var positionOne = positions[j];\n var tokenOne = tokens[positionOne];\n var positionTwo = positions[j - 1];\n var tokenTwo = tokens[positionTwo];\n\n directionLoop:\n for (var direction = 1; direction >= -1; direction -= 2) {\n var topToBottom = direction == 1;\n var from = topToBottom ? positionOne + 1 : positionTwo - 1;\n var to = topToBottom ? positionTwo : positionOne;\n var delta = topToBottom ? 1 : -1;\n var source = topToBottom ? tokenOne : tokenTwo;\n var target = topToBottom ? tokenTwo : tokenOne;\n var movedProperties = extractProperties(source);\n\n while (from != to) {\n var traversedProperties = extractProperties(tokens[from]);\n from += delta;\n\n if (mergeSemantically && allSameRulePropertiesCanBeReordered(movedProperties, traversedProperties, specificityCache)) {\n continue;\n }\n\n if (!canReorder(movedProperties, traversedProperties, specificityCache))\n continue directionLoop;\n }\n\n target[2] = topToBottom ?\n source[2].concat(target[2]) :\n target[2].concat(source[2]);\n source[2] = [];\n\n reduced.push(target);\n continue positionLoop;\n }\n }\n }\n\n return reduced;\n}\n\nfunction allSameRulePropertiesCanBeReordered(movedProperties, traversedProperties, specificityCache) {\n var movedProperty;\n var movedRule;\n var traversedProperty;\n var traversedRule;\n var i, l;\n var j, m;\n\n for (i = 0, l = movedProperties.length; i < l; i++) {\n movedProperty = movedProperties[i];\n movedRule = movedProperty[5];\n\n for (j = 0, m = traversedProperties.length; j < m; j++) {\n traversedProperty = traversedProperties[j];\n traversedRule = traversedProperty[5];\n\n if (rulesOverlap(movedRule, traversedRule, true) && !canReorderSingle(movedProperty, traversedProperty, specificityCache)) {\n return false;\n }\n }\n }\n\n return true;\n}\n\nmodule.exports = mergeMediaQueries;\n","var isMergeable = require('./is-mergeable');\n\nvar sortSelectors = require('../level-1/sort-selectors');\nvar tidyRules = require('../level-1/tidy-rules');\n\nvar OptimizationLevel = require('../../options/optimization-level').OptimizationLevel;\n\nvar serializeBody = require('../../writer/one-time').body;\nvar serializeRules = require('../../writer/one-time').rules;\n\nvar Token = require('../../tokenizer/token');\n\nfunction unsafeSelector(value) {\n return /\\.|\\*| :/.test(value);\n}\n\nfunction isBemElement(token) {\n var asString = serializeRules(token[1]);\n return asString.indexOf('__') > -1 || asString.indexOf('--') > -1;\n}\n\nfunction withoutModifier(selector) {\n return selector.replace(/--[^ ,>\\+~:]+/g, '');\n}\n\nfunction removeAnyUnsafeElements(left, candidates) {\n var leftSelector = withoutModifier(serializeRules(left[1]));\n\n for (var body in candidates) {\n var right = candidates[body];\n var rightSelector = withoutModifier(serializeRules(right[1]));\n\n if (rightSelector.indexOf(leftSelector) > -1 || leftSelector.indexOf(rightSelector) > -1)\n delete candidates[body];\n }\n}\n\nfunction mergeNonAdjacentByBody(tokens, context) {\n var options = context.options;\n var mergeSemantically = options.level[OptimizationLevel.Two].mergeSemantically;\n var adjacentSpace = options.compatibility.selectors.adjacentSpace;\n var selectorsSortingMethod = options.level[OptimizationLevel.One].selectorsSortingMethod;\n var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;\n var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;\n var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;\n var candidates = {};\n\n for (var i = tokens.length - 1; i >= 0; i--) {\n var token = tokens[i];\n if (token[0] != Token.RULE)\n continue;\n\n if (token[2].length > 0 && (!mergeSemantically && unsafeSelector(serializeRules(token[1]))))\n candidates = {};\n\n if (token[2].length > 0 && mergeSemantically && isBemElement(token))\n removeAnyUnsafeElements(token, candidates);\n\n var candidateBody = serializeBody(token[2]);\n var oldToken = candidates[candidateBody];\n if (oldToken &&\n isMergeable(serializeRules(token[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) &&\n isMergeable(serializeRules(oldToken[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging)) {\n\n if (token[2].length > 0) {\n token[1] = tidyRules(oldToken[1].concat(token[1]), false, adjacentSpace, false, context.warnings);\n token[1] = token[1].length > 1 ? sortSelectors(token[1], selectorsSortingMethod) : token[1];\n } else {\n token[1] = oldToken[1].concat(token[1]);\n }\n\n oldToken[2] = [];\n candidates[candidateBody] = null;\n }\n\n candidates[serializeBody(token[2])] = token;\n }\n}\n\nmodule.exports = mergeNonAdjacentByBody;\n","var canReorder = require('./reorderable').canReorder;\nvar extractProperties = require('./extract-properties');\n\nvar optimizeProperties = require('./properties/optimize');\n\nvar serializeRules = require('../../writer/one-time').rules;\n\nvar Token = require('../../tokenizer/token');\n\nfunction mergeNonAdjacentBySelector(tokens, context) {\n var specificityCache = context.cache.specificity;\n var allSelectors = {};\n var repeatedSelectors = [];\n var i;\n\n for (i = tokens.length - 1; i >= 0; i--) {\n if (tokens[i][0] != Token.RULE)\n continue;\n if (tokens[i][2].length === 0)\n continue;\n\n var selector = serializeRules(tokens[i][1]);\n allSelectors[selector] = [i].concat(allSelectors[selector] || []);\n\n if (allSelectors[selector].length == 2)\n repeatedSelectors.push(selector);\n }\n\n for (i = repeatedSelectors.length - 1; i >= 0; i--) {\n var positions = allSelectors[repeatedSelectors[i]];\n\n selectorIterator:\n for (var j = positions.length - 1; j > 0; j--) {\n var positionOne = positions[j - 1];\n var tokenOne = tokens[positionOne];\n var positionTwo = positions[j];\n var tokenTwo = tokens[positionTwo];\n\n directionIterator:\n for (var direction = 1; direction >= -1; direction -= 2) {\n var topToBottom = direction == 1;\n var from = topToBottom ? positionOne + 1 : positionTwo - 1;\n var to = topToBottom ? positionTwo : positionOne;\n var delta = topToBottom ? 1 : -1;\n var moved = topToBottom ? tokenOne : tokenTwo;\n var target = topToBottom ? tokenTwo : tokenOne;\n var movedProperties = extractProperties(moved);\n\n while (from != to) {\n var traversedProperties = extractProperties(tokens[from]);\n from += delta;\n\n // traversed then moved as we move selectors towards the start\n var reorderable = topToBottom ?\n canReorder(movedProperties, traversedProperties, specificityCache) :\n canReorder(traversedProperties, movedProperties, specificityCache);\n\n if (!reorderable && !topToBottom)\n continue selectorIterator;\n if (!reorderable && topToBottom)\n continue directionIterator;\n }\n\n if (topToBottom) {\n Array.prototype.push.apply(moved[2], target[2]);\n target[2] = moved[2];\n } else {\n Array.prototype.push.apply(target[2], moved[2]);\n }\n\n optimizeProperties(target[2], true, true, context);\n moved[2] = [];\n }\n }\n }\n}\n\nmodule.exports = mergeNonAdjacentBySelector;\n","var mergeAdjacent = require('./merge-adjacent');\nvar mergeMediaQueries = require('./merge-media-queries');\nvar mergeNonAdjacentByBody = require('./merge-non-adjacent-by-body');\nvar mergeNonAdjacentBySelector = require('./merge-non-adjacent-by-selector');\nvar reduceNonAdjacent = require('./reduce-non-adjacent');\nvar removeDuplicateFontAtRules = require('./remove-duplicate-font-at-rules');\nvar removeDuplicateMediaQueries = require('./remove-duplicate-media-queries');\nvar removeDuplicates = require('./remove-duplicates');\nvar removeUnusedAtRules = require('./remove-unused-at-rules');\nvar restructure = require('./restructure');\n\nvar optimizeProperties = require('./properties/optimize');\n\nvar OptimizationLevel = require('../../options/optimization-level').OptimizationLevel;\n\nvar Token = require('../../tokenizer/token');\n\nfunction removeEmpty(tokens) {\n for (var i = 0, l = tokens.length; i < l; i++) {\n var token = tokens[i];\n var isEmpty = false;\n\n switch (token[0]) {\n case Token.RULE:\n isEmpty = token[1].length === 0 || token[2].length === 0;\n break;\n case Token.NESTED_BLOCK:\n removeEmpty(token[2]);\n isEmpty = token[2].length === 0;\n break;\n case Token.AT_RULE:\n isEmpty = token[1].length === 0;\n break;\n case Token.AT_RULE_BLOCK:\n isEmpty = token[2].length === 0;\n }\n\n if (isEmpty) {\n tokens.splice(i, 1);\n i--;\n l--;\n }\n }\n}\n\nfunction recursivelyOptimizeBlocks(tokens, context) {\n for (var i = 0, l = tokens.length; i < l; i++) {\n var token = tokens[i];\n\n if (token[0] == Token.NESTED_BLOCK) {\n var isKeyframes = /@(-moz-|-o-|-webkit-)?keyframes/.test(token[1][0][1]);\n level2Optimize(token[2], context, !isKeyframes);\n }\n }\n}\n\nfunction recursivelyOptimizeProperties(tokens, context) {\n for (var i = 0, l = tokens.length; i < l; i++) {\n var token = tokens[i];\n\n switch (token[0]) {\n case Token.RULE:\n optimizeProperties(token[2], true, true, context);\n break;\n case Token.NESTED_BLOCK:\n recursivelyOptimizeProperties(token[2], context);\n }\n }\n}\n\nfunction level2Optimize(tokens, context, withRestructuring) {\n var levelOptions = context.options.level[OptimizationLevel.Two];\n var reduced;\n var i;\n\n recursivelyOptimizeBlocks(tokens, context);\n recursivelyOptimizeProperties(tokens, context);\n\n if (levelOptions.removeDuplicateRules) {\n removeDuplicates(tokens, context);\n }\n\n if (levelOptions.mergeAdjacentRules) {\n mergeAdjacent(tokens, context);\n }\n\n if (levelOptions.reduceNonAdjacentRules) {\n reduceNonAdjacent(tokens, context);\n }\n\n if (levelOptions.mergeNonAdjacentRules && levelOptions.mergeNonAdjacentRules != 'body') {\n mergeNonAdjacentBySelector(tokens, context);\n }\n\n if (levelOptions.mergeNonAdjacentRules && levelOptions.mergeNonAdjacentRules != 'selector') {\n mergeNonAdjacentByBody(tokens, context);\n }\n\n if (levelOptions.restructureRules && levelOptions.mergeAdjacentRules && withRestructuring) {\n restructure(tokens, context);\n mergeAdjacent(tokens, context);\n }\n\n if (levelOptions.restructureRules && !levelOptions.mergeAdjacentRules && withRestructuring) {\n restructure(tokens, context);\n }\n\n if (levelOptions.removeDuplicateFontRules) {\n removeDuplicateFontAtRules(tokens, context);\n }\n\n if (levelOptions.removeDuplicateMediaBlocks) {\n removeDuplicateMediaQueries(tokens, context);\n }\n\n if (levelOptions.removeUnusedAtRules) {\n removeUnusedAtRules(tokens, context);\n }\n\n if (levelOptions.mergeMedia) {\n reduced = mergeMediaQueries(tokens, context);\n for (i = reduced.length - 1; i >= 0; i--) {\n level2Optimize(reduced[i][2], context, false);\n }\n }\n\n if (levelOptions.removeEmpty) {\n removeEmpty(tokens);\n }\n\n return tokens;\n}\n\nmodule.exports = level2Optimize;\n","var Marker = require('../../../tokenizer/marker');\n\nfunction everyValuesPair(fn, left, right) {\n var leftSize = left.value.length;\n var rightSize = right.value.length;\n var total = Math.max(leftSize, rightSize);\n var lowerBound = Math.min(leftSize, rightSize) - 1;\n var leftValue;\n var rightValue;\n var position;\n\n for (position = 0; position < total; position++) {\n leftValue = left.value[position] && left.value[position][1] || leftValue;\n rightValue = right.value[position] && right.value[position][1] || rightValue;\n\n if (leftValue == Marker.COMMA || rightValue == Marker.COMMA) {\n continue;\n }\n\n if (!fn(leftValue, rightValue, position, position <= lowerBound)) {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = everyValuesPair;\n","var compactable = require('../compactable');\n\nfunction findComponentIn(shorthand, longhand) {\n var comparator = nameComparator(longhand);\n\n return findInDirectComponents(shorthand, comparator) || findInSubComponents(shorthand, comparator);\n}\n\nfunction nameComparator(to) {\n return function (property) {\n return to.name === property.name;\n };\n}\n\nfunction findInDirectComponents(shorthand, comparator) {\n return shorthand.components.filter(comparator)[0];\n}\n\nfunction findInSubComponents(shorthand, comparator) {\n var shorthandComponent;\n var longhandMatch;\n var i, l;\n\n if (!compactable[shorthand.name].shorthandComponents) {\n return;\n }\n\n for (i = 0, l = shorthand.components.length; i < l; i++) {\n shorthandComponent = shorthand.components[i];\n longhandMatch = findInDirectComponents(shorthandComponent, comparator);\n\n if (longhandMatch) {\n return longhandMatch;\n }\n }\n\n return;\n}\n\nmodule.exports = findComponentIn;\n","function hasInherit(property) {\n for (var i = property.value.length - 1; i >= 0; i--) {\n if (property.value[i][1] == 'inherit')\n return true;\n }\n\n return false;\n}\n\nmodule.exports = hasInherit;\n","var compactable = require('../compactable');\n\nfunction isComponentOf(property1, property2, shallow) {\n return isDirectComponentOf(property1, property2) ||\n !shallow && !!compactable[property1.name].shorthandComponents && isSubComponentOf(property1, property2);\n}\n\nfunction isDirectComponentOf(property1, property2) {\n var descriptor = compactable[property1.name];\n\n return 'components' in descriptor && descriptor.components.indexOf(property2.name) > -1;\n}\n\nfunction isSubComponentOf(property1, property2) {\n return property1\n .components\n .some(function (component) {\n return isDirectComponentOf(component, property2);\n });\n}\n\nmodule.exports = isComponentOf;\n","var Marker = require('../../../tokenizer/marker');\n\nfunction isMergeableShorthand(shorthand) {\n if (shorthand.name != 'font') {\n return true;\n }\n\n return shorthand.value[0][1].indexOf(Marker.INTERNAL) == -1;\n}\n\nmodule.exports = isMergeableShorthand;\n","var everyValuesPair = require('./every-values-pair');\nvar hasInherit = require('./has-inherit');\nvar populateComponents = require('./populate-components');\n\nvar compactable = require('../compactable');\nvar deepClone = require('../clone').deep;\nvar restoreWithComponents = require('../restore-with-components');\n\nvar restoreFromOptimizing = require('../../restore-from-optimizing');\nvar wrapSingle = require('../../wrap-for-optimizing').single;\n\nvar serializeBody = require('../../../writer/one-time').body;\nvar Token = require('../../../tokenizer/token');\n\nfunction mergeIntoShorthands(properties, validator) {\n var candidates = {};\n var descriptor;\n var componentOf;\n var property;\n var i, l;\n var j, m;\n\n // there is no shorthand property made up of less than 3 longhands\n if (properties.length < 3) {\n return;\n }\n\n for (i = 0, l = properties.length; i < l; i++) {\n property = properties[i];\n descriptor = compactable[property.name];\n\n if (property.unused) {\n continue;\n }\n\n if (property.hack) {\n continue;\n }\n\n if (property.block) {\n continue;\n }\n\n invalidateOrCompact(properties, i, candidates, validator);\n\n if (descriptor && descriptor.componentOf) {\n for (j = 0, m = descriptor.componentOf.length; j < m; j++) {\n componentOf = descriptor.componentOf[j];\n\n candidates[componentOf] = candidates[componentOf] || {};\n candidates[componentOf][property.name] = property;\n }\n }\n }\n\n invalidateOrCompact(properties, i, candidates, validator);\n}\n\nfunction invalidateOrCompact(properties, position, candidates, validator) {\n var invalidatedBy = properties[position];\n var shorthandName;\n var shorthandDescriptor;\n var candidateComponents;\n\n for (shorthandName in candidates) {\n if (undefined !== invalidatedBy && shorthandName == invalidatedBy.name) {\n continue;\n }\n\n shorthandDescriptor = compactable[shorthandName];\n candidateComponents = candidates[shorthandName];\n if (invalidatedBy && invalidates(candidates, shorthandName, invalidatedBy)) {\n delete candidates[shorthandName];\n continue;\n }\n\n if (shorthandDescriptor.components.length > Object.keys(candidateComponents).length) {\n continue;\n }\n\n if (mixedImportance(candidateComponents)) {\n continue;\n }\n\n if (!overridable(candidateComponents, shorthandName, validator)) {\n continue;\n }\n\n if (!mergeable(candidateComponents)) {\n continue;\n }\n\n if (mixedInherit(candidateComponents)) {\n replaceWithInheritBestFit(properties, candidateComponents, shorthandName, validator);\n } else {\n replaceWithShorthand(properties, candidateComponents, shorthandName, validator);\n }\n }\n}\n\nfunction invalidates(candidates, shorthandName, invalidatedBy) {\n var shorthandDescriptor = compactable[shorthandName];\n var invalidatedByDescriptor = compactable[invalidatedBy.name];\n var componentName;\n\n if ('overridesShorthands' in shorthandDescriptor && shorthandDescriptor.overridesShorthands.indexOf(invalidatedBy.name) > -1) {\n return true;\n }\n\n if (invalidatedByDescriptor && 'componentOf' in invalidatedByDescriptor) {\n for (componentName in candidates[shorthandName]) {\n if (invalidatedByDescriptor.componentOf.indexOf(componentName) > -1) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nfunction mixedImportance(components) {\n var important;\n var componentName;\n\n for (componentName in components) {\n if (undefined !== important && components[componentName].important != important) {\n return true;\n }\n\n important = components[componentName].important;\n }\n\n return false;\n}\n\nfunction overridable(components, shorthandName, validator) {\n var descriptor = compactable[shorthandName];\n var newValuePlaceholder = [\n Token.PROPERTY,\n [Token.PROPERTY_NAME, shorthandName],\n [Token.PROPERTY_VALUE, descriptor.defaultValue]\n ];\n var newProperty = wrapSingle(newValuePlaceholder);\n var component;\n var mayOverride;\n var i, l;\n\n populateComponents([newProperty], validator, []);\n\n for (i = 0, l = descriptor.components.length; i < l; i++) {\n component = components[descriptor.components[i]];\n mayOverride = compactable[component.name].canOverride;\n\n if (!everyValuesPair(mayOverride.bind(null, validator), newProperty.components[i], component)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction mergeable(components) {\n var lastCount = null;\n var currentCount;\n var componentName;\n var component;\n var descriptor;\n var values;\n\n for (componentName in components) {\n component = components[componentName];\n descriptor = compactable[componentName];\n\n if (!('restore' in descriptor)) {\n continue;\n }\n\n restoreFromOptimizing([component.all[component.position]], restoreWithComponents);\n values = descriptor.restore(component, compactable);\n\n currentCount = values.length;\n\n if (lastCount !== null && currentCount !== lastCount) {\n return false;\n }\n\n lastCount = currentCount;\n }\n\n return true;\n}\n\nfunction mixedInherit(components) {\n var componentName;\n var lastValue = null;\n var currentValue;\n\n for (componentName in components) {\n currentValue = hasInherit(components[componentName]);\n\n if (lastValue !== null && lastValue !== currentValue) {\n return true;\n }\n\n lastValue = currentValue;\n }\n\n return false;\n}\n\nfunction replaceWithInheritBestFit(properties, candidateComponents, shorthandName, validator) {\n var viaLonghands = buildSequenceWithInheritLonghands(candidateComponents, shorthandName, validator);\n var viaShorthand = buildSequenceWithInheritShorthand(candidateComponents, shorthandName, validator);\n var longhandTokensSequence = viaLonghands[0];\n var shorthandTokensSequence = viaShorthand[0];\n var isLonghandsShorter = serializeBody(longhandTokensSequence).length < serializeBody(shorthandTokensSequence).length;\n var newTokensSequence = isLonghandsShorter ? longhandTokensSequence : shorthandTokensSequence;\n var newProperty = isLonghandsShorter ? viaLonghands[1] : viaShorthand[1];\n var newComponents = isLonghandsShorter ? viaLonghands[2] : viaShorthand[2];\n var all = candidateComponents[Object.keys(candidateComponents)[0]].all;\n var componentName;\n var oldComponent;\n var newComponent;\n var newToken;\n\n newProperty.position = all.length;\n newProperty.shorthand = true;\n newProperty.dirty = true;\n newProperty.all = all;\n newProperty.all.push(newTokensSequence[0]);\n\n properties.push(newProperty);\n\n for (componentName in candidateComponents) {\n oldComponent = candidateComponents[componentName];\n oldComponent.unused = true;\n\n if (oldComponent.name in newComponents) {\n newComponent = newComponents[oldComponent.name];\n newToken = findTokenIn(newTokensSequence, componentName);\n\n newComponent.position = all.length;\n newComponent.all = all;\n newComponent.all.push(newToken);\n\n properties.push(newComponent);\n }\n }\n}\n\nfunction buildSequenceWithInheritLonghands(components, shorthandName, validator) {\n var tokensSequence = [];\n var inheritComponents = {};\n var nonInheritComponents = {};\n var descriptor = compactable[shorthandName];\n var shorthandToken = [\n Token.PROPERTY,\n [Token.PROPERTY_NAME, shorthandName],\n [Token.PROPERTY_VALUE, descriptor.defaultValue]\n ];\n var newProperty = wrapSingle(shorthandToken);\n var component;\n var longhandToken;\n var newComponent;\n var nameMetadata;\n var i, l;\n\n populateComponents([newProperty], validator, []);\n\n for (i = 0, l = descriptor.components.length; i < l; i++) {\n component = components[descriptor.components[i]];\n\n if (hasInherit(component)) {\n longhandToken = component.all[component.position].slice(0, 2);\n Array.prototype.push.apply(longhandToken, component.value);\n tokensSequence.push(longhandToken);\n\n newComponent = deepClone(component);\n newComponent.value = inferComponentValue(components, newComponent.name);\n\n newProperty.components[i] = newComponent;\n inheritComponents[component.name] = deepClone(component);\n } else {\n newComponent = deepClone(component);\n newComponent.all = component.all;\n newProperty.components[i] = newComponent;\n\n nonInheritComponents[component.name] = component;\n }\n }\n\n nameMetadata = joinMetadata(nonInheritComponents, 1);\n shorthandToken[1].push(nameMetadata);\n\n restoreFromOptimizing([newProperty], restoreWithComponents);\n\n shorthandToken = shorthandToken.slice(0, 2);\n Array.prototype.push.apply(shorthandToken, newProperty.value);\n\n tokensSequence.unshift(shorthandToken);\n\n return [tokensSequence, newProperty, inheritComponents];\n}\n\nfunction inferComponentValue(components, propertyName) {\n var descriptor = compactable[propertyName];\n\n if ('oppositeTo' in descriptor) {\n return components[descriptor.oppositeTo].value;\n } else {\n return [[Token.PROPERTY_VALUE, descriptor.defaultValue]];\n }\n}\n\nfunction joinMetadata(components, at) {\n var metadata = [];\n var component;\n var originalValue;\n var componentMetadata;\n var componentName;\n\n for (componentName in components) {\n component = components[componentName];\n originalValue = component.all[component.position];\n componentMetadata = originalValue[at][originalValue[at].length - 1];\n\n Array.prototype.push.apply(metadata, componentMetadata);\n }\n\n return metadata.sort(metadataSorter);\n}\n\nfunction metadataSorter(metadata1, metadata2) {\n var line1 = metadata1[0];\n var line2 = metadata2[0];\n var column1 = metadata1[1];\n var column2 = metadata2[1];\n\n if (line1 < line2) {\n return -1;\n } else if (line1 === line2) {\n return column1 < column2 ? -1 : 1;\n } else {\n return 1;\n }\n}\n\nfunction buildSequenceWithInheritShorthand(components, shorthandName, validator) {\n var tokensSequence = [];\n var inheritComponents = {};\n var nonInheritComponents = {};\n var descriptor = compactable[shorthandName];\n var shorthandToken = [\n Token.PROPERTY,\n [Token.PROPERTY_NAME, shorthandName],\n [Token.PROPERTY_VALUE, 'inherit']\n ];\n var newProperty = wrapSingle(shorthandToken);\n var component;\n var longhandToken;\n var nameMetadata;\n var valueMetadata;\n var i, l;\n\n populateComponents([newProperty], validator, []);\n\n for (i = 0, l = descriptor.components.length; i < l; i++) {\n component = components[descriptor.components[i]];\n\n if (hasInherit(component)) {\n inheritComponents[component.name] = component;\n } else {\n longhandToken = component.all[component.position].slice(0, 2);\n Array.prototype.push.apply(longhandToken, component.value);\n tokensSequence.push(longhandToken);\n\n nonInheritComponents[component.name] = deepClone(component);\n }\n }\n\n nameMetadata = joinMetadata(inheritComponents, 1);\n shorthandToken[1].push(nameMetadata);\n\n valueMetadata = joinMetadata(inheritComponents, 2);\n shorthandToken[2].push(valueMetadata);\n\n tokensSequence.unshift(shorthandToken);\n\n return [tokensSequence, newProperty, nonInheritComponents];\n}\n\nfunction findTokenIn(tokens, componentName) {\n var i, l;\n\n for (i = 0, l = tokens.length; i < l; i++) {\n if (tokens[i][1][1] == componentName) {\n return tokens[i];\n }\n }\n}\n\nfunction replaceWithShorthand(properties, candidateComponents, shorthandName, validator) {\n var descriptor = compactable[shorthandName];\n var nameMetadata;\n var valueMetadata;\n var newValuePlaceholder = [\n Token.PROPERTY,\n [Token.PROPERTY_NAME, shorthandName],\n [Token.PROPERTY_VALUE, descriptor.defaultValue]\n ];\n var all;\n\n var newProperty = wrapSingle(newValuePlaceholder);\n newProperty.shorthand = true;\n newProperty.dirty = true;\n\n populateComponents([newProperty], validator, []);\n\n for (var i = 0, l = descriptor.components.length; i < l; i++) {\n var component = candidateComponents[descriptor.components[i]];\n\n newProperty.components[i] = deepClone(component);\n newProperty.important = component.important;\n\n all = component.all;\n }\n\n for (var componentName in candidateComponents) {\n candidateComponents[componentName].unused = true;\n }\n\n nameMetadata = joinMetadata(candidateComponents, 1);\n newValuePlaceholder[1].push(nameMetadata);\n\n valueMetadata = joinMetadata(candidateComponents, 2);\n newValuePlaceholder[2].push(valueMetadata);\n\n newProperty.position = all.length;\n newProperty.all = all;\n newProperty.all.push(newValuePlaceholder);\n\n properties.push(newProperty);\n}\n\nmodule.exports = mergeIntoShorthands;\n","var mergeIntoShorthands = require('./merge-into-shorthands');\nvar overrideProperties = require('./override-properties');\nvar populateComponents = require('./populate-components');\n\nvar restoreWithComponents = require('../restore-with-components');\n\nvar wrapForOptimizing = require('../../wrap-for-optimizing').all;\nvar removeUnused = require('../../remove-unused');\nvar restoreFromOptimizing = require('../../restore-from-optimizing');\n\nvar OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nfunction optimizeProperties(properties, withOverriding, withMerging, context) {\n var levelOptions = context.options.level[OptimizationLevel.Two];\n var _properties = wrapForOptimizing(properties, false, levelOptions.skipProperties);\n var _property;\n var i, l;\n\n populateComponents(_properties, context.validator, context.warnings);\n\n for (i = 0, l = _properties.length; i < l; i++) {\n _property = _properties[i];\n if (_property.block) {\n optimizeProperties(_property.value[0][1], withOverriding, withMerging, context);\n }\n }\n\n if (withMerging && levelOptions.mergeIntoShorthands) {\n mergeIntoShorthands(_properties, context.validator);\n }\n\n if (withOverriding && levelOptions.overrideProperties) {\n overrideProperties(_properties, withMerging, context.options.compatibility, context.validator);\n }\n\n restoreFromOptimizing(_properties, restoreWithComponents);\n removeUnused(_properties);\n}\n\nmodule.exports = optimizeProperties;\n","var hasInherit = require('./has-inherit');\nvar everyValuesPair = require('./every-values-pair');\nvar findComponentIn = require('./find-component-in');\nvar isComponentOf = require('./is-component-of');\nvar isMergeableShorthand = require('./is-mergeable-shorthand');\nvar overridesNonComponentShorthand = require('./overrides-non-component-shorthand');\nvar sameVendorPrefixesIn = require('./vendor-prefixes').same;\n\nvar compactable = require('../compactable');\nvar deepClone = require('../clone').deep;\nvar restoreWithComponents = require('../restore-with-components');\nvar shallowClone = require('../clone').shallow;\n\nvar restoreFromOptimizing = require('../../restore-from-optimizing');\n\nvar Token = require('../../../tokenizer/token');\nvar Marker = require('../../../tokenizer/marker');\n\nvar serializeProperty = require('../../../writer/one-time').property;\n\nfunction wouldBreakCompatibility(property, validator) {\n for (var i = 0; i < property.components.length; i++) {\n var component = property.components[i];\n var descriptor = compactable[component.name];\n var canOverride = descriptor && descriptor.canOverride || canOverride.sameValue;\n\n var _component = shallowClone(component);\n _component.value = [[Token.PROPERTY_VALUE, descriptor.defaultValue]];\n\n if (!everyValuesPair(canOverride.bind(null, validator), _component, component)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction overrideIntoMultiplex(property, by) {\n by.unused = true;\n\n turnIntoMultiplex(by, multiplexSize(property));\n property.value = by.value;\n}\n\nfunction overrideByMultiplex(property, by) {\n by.unused = true;\n property.multiplex = true;\n property.value = by.value;\n}\n\nfunction overrideSimple(property, by) {\n by.unused = true;\n property.value = by.value;\n}\n\nfunction override(property, by) {\n if (by.multiplex)\n overrideByMultiplex(property, by);\n else if (property.multiplex)\n overrideIntoMultiplex(property, by);\n else\n overrideSimple(property, by);\n}\n\nfunction overrideShorthand(property, by) {\n by.unused = true;\n\n for (var i = 0, l = property.components.length; i < l; i++) {\n override(property.components[i], by.components[i], property.multiplex);\n }\n}\n\nfunction turnIntoMultiplex(property, size) {\n property.multiplex = true;\n\n if (compactable[property.name].shorthand) {\n turnShorthandValueIntoMultiplex(property, size);\n } else {\n turnLonghandValueIntoMultiplex(property, size);\n }\n}\n\nfunction turnShorthandValueIntoMultiplex(property, size) {\n var component;\n var i, l;\n\n for (i = 0, l = property.components.length; i < l; i++) {\n component = property.components[i];\n\n if (!component.multiplex) {\n turnLonghandValueIntoMultiplex(component, size);\n }\n }\n}\n\nfunction turnLonghandValueIntoMultiplex(property, size) {\n var descriptor = compactable[property.name];\n var withRealValue = descriptor.intoMultiplexMode == 'real';\n var withValue = descriptor.intoMultiplexMode == 'real' ?\n property.value.slice(0) :\n (descriptor.intoMultiplexMode == 'placeholder' ? descriptor.placeholderValue : descriptor.defaultValue);\n var i = multiplexSize(property);\n var j;\n var m = withValue.length;\n\n for (; i < size; i++) {\n property.value.push([Token.PROPERTY_VALUE, Marker.COMMA]);\n\n if (Array.isArray(withValue)) {\n for (j = 0; j < m; j++) {\n property.value.push(withRealValue ? withValue[j] : [Token.PROPERTY_VALUE, withValue[j]]);\n }\n } else {\n property.value.push(withRealValue ? withValue : [Token.PROPERTY_VALUE, withValue]);\n }\n }\n}\n\nfunction multiplexSize(component) {\n var size = 0;\n\n for (var i = 0, l = component.value.length; i < l; i++) {\n if (component.value[i][1] == Marker.COMMA)\n size++;\n }\n\n return size + 1;\n}\n\nfunction lengthOf(property) {\n var fakeAsArray = [\n Token.PROPERTY,\n [Token.PROPERTY_NAME, property.name]\n ].concat(property.value);\n return serializeProperty([fakeAsArray], 0).length;\n}\n\nfunction moreSameShorthands(properties, startAt, name) {\n // Since we run the main loop in `compactOverrides` backwards, at this point some\n // properties may not be marked as unused.\n // We should consider reverting the order if possible\n var count = 0;\n\n for (var i = startAt; i >= 0; i--) {\n if (properties[i].name == name && !properties[i].unused)\n count++;\n if (count > 1)\n break;\n }\n\n return count > 1;\n}\n\nfunction overridingFunction(shorthand, validator) {\n for (var i = 0, l = shorthand.components.length; i < l; i++) {\n if (!anyValue(validator.isUrl, shorthand.components[i]) && anyValue(validator.isFunction, shorthand.components[i])) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction anyValue(fn, property) {\n for (var i = 0, l = property.value.length; i < l; i++) {\n if (property.value[i][1] == Marker.COMMA)\n continue;\n\n if (fn(property.value[i][1]))\n return true;\n }\n\n return false;\n}\n\nfunction wouldResultInLongerValue(left, right) {\n if (!left.multiplex && !right.multiplex || left.multiplex && right.multiplex)\n return false;\n\n var multiplex = left.multiplex ? left : right;\n var simple = left.multiplex ? right : left;\n var component;\n\n var multiplexClone = deepClone(multiplex);\n restoreFromOptimizing([multiplexClone], restoreWithComponents);\n\n var simpleClone = deepClone(simple);\n restoreFromOptimizing([simpleClone], restoreWithComponents);\n\n var lengthBefore = lengthOf(multiplexClone) + 1 + lengthOf(simpleClone);\n\n if (left.multiplex) {\n component = findComponentIn(multiplexClone, simpleClone);\n overrideIntoMultiplex(component, simpleClone);\n } else {\n component = findComponentIn(simpleClone, multiplexClone);\n turnIntoMultiplex(simpleClone, multiplexSize(multiplexClone));\n overrideByMultiplex(component, multiplexClone);\n }\n\n restoreFromOptimizing([simpleClone], restoreWithComponents);\n\n var lengthAfter = lengthOf(simpleClone);\n\n return lengthBefore <= lengthAfter;\n}\n\nfunction isCompactable(property) {\n return property.name in compactable;\n}\n\nfunction noneOverrideHack(left, right) {\n return !left.multiplex &&\n (left.name == 'background' || left.name == 'background-image') &&\n right.multiplex &&\n (right.name == 'background' || right.name == 'background-image') &&\n anyLayerIsNone(right.value);\n}\n\nfunction anyLayerIsNone(values) {\n var layers = intoLayers(values);\n\n for (var i = 0, l = layers.length; i < l; i++) {\n if (layers[i].length == 1 && layers[i][0][1] == 'none')\n return true;\n }\n\n return false;\n}\n\nfunction intoLayers(values) {\n var layers = [];\n\n for (var i = 0, layer = [], l = values.length; i < l; i++) {\n var value = values[i];\n if (value[1] == Marker.COMMA) {\n layers.push(layer);\n layer = [];\n } else {\n layer.push(value);\n }\n }\n\n layers.push(layer);\n return layers;\n}\n\nfunction overrideProperties(properties, withMerging, compatibility, validator) {\n var mayOverride, right, left, component;\n var overriddenComponents;\n var overriddenComponent;\n var overridingComponent;\n var overridable;\n var i, j, k;\n\n propertyLoop:\n for (i = properties.length - 1; i >= 0; i--) {\n right = properties[i];\n\n if (!isCompactable(right))\n continue;\n\n if (right.block)\n continue;\n\n mayOverride = compactable[right.name].canOverride;\n\n traverseLoop:\n for (j = i - 1; j >= 0; j--) {\n left = properties[j];\n\n if (!isCompactable(left))\n continue;\n\n if (left.block)\n continue;\n\n if (left.unused || right.unused)\n continue;\n\n if (left.hack && !right.hack && !right.important || !left.hack && !left.important && right.hack)\n continue;\n\n if (left.important == right.important && left.hack[0] != right.hack[0])\n continue;\n\n if (left.important == right.important && (left.hack[0] != right.hack[0] || (left.hack[1] && left.hack[1] != right.hack[1])))\n continue;\n\n if (hasInherit(right))\n continue;\n\n if (noneOverrideHack(left, right))\n continue;\n\n if (right.shorthand && isComponentOf(right, left)) {\n // maybe `left` can be overridden by `right` which is a shorthand?\n if (!right.important && left.important)\n continue;\n\n if (!sameVendorPrefixesIn([left], right.components))\n continue;\n\n if (!anyValue(validator.isFunction, left) && overridingFunction(right, validator))\n continue;\n\n if (!isMergeableShorthand(right)) {\n left.unused = true;\n continue;\n }\n\n component = findComponentIn(right, left);\n mayOverride = compactable[left.name].canOverride;\n if (everyValuesPair(mayOverride.bind(null, validator), left, component)) {\n left.unused = true;\n }\n } else if (right.shorthand && overridesNonComponentShorthand(right, left)) {\n // `right` is a shorthand while `left` can be overriden by it, think `border` and `border-top`\n if (!right.important && left.important) {\n continue;\n }\n\n if (!sameVendorPrefixesIn([left], right.components)) {\n continue;\n }\n\n if (!anyValue(validator.isFunction, left) && overridingFunction(right, validator)) {\n continue;\n }\n\n overriddenComponents = left.shorthand ?\n left.components:\n [left];\n\n for (k = overriddenComponents.length - 1; k >= 0; k--) {\n overriddenComponent = overriddenComponents[k];\n overridingComponent = findComponentIn(right, overriddenComponent);\n mayOverride = compactable[overriddenComponent.name].canOverride;\n\n if (!everyValuesPair(mayOverride.bind(null, validator), left, overridingComponent)) {\n continue traverseLoop;\n }\n }\n\n left.unused = true;\n } else if (withMerging && left.shorthand && !right.shorthand && isComponentOf(left, right, true)) {\n // maybe `right` can be pulled into `left` which is a shorthand?\n if (right.important && !left.important)\n continue;\n\n if (!right.important && left.important) {\n right.unused = true;\n continue;\n }\n\n // Pending more clever algorithm in #527\n if (moreSameShorthands(properties, i - 1, left.name))\n continue;\n\n if (overridingFunction(left, validator))\n continue;\n\n if (!isMergeableShorthand(left))\n continue;\n\n component = findComponentIn(left, right);\n if (everyValuesPair(mayOverride.bind(null, validator), component, right)) {\n var disabledBackgroundMerging =\n !compatibility.properties.backgroundClipMerging && component.name.indexOf('background-clip') > -1 ||\n !compatibility.properties.backgroundOriginMerging && component.name.indexOf('background-origin') > -1 ||\n !compatibility.properties.backgroundSizeMerging && component.name.indexOf('background-size') > -1;\n var nonMergeableValue = compactable[right.name].nonMergeableValue === right.value[0][1];\n\n if (disabledBackgroundMerging || nonMergeableValue)\n continue;\n\n if (!compatibility.properties.merging && wouldBreakCompatibility(left, validator))\n continue;\n\n if (component.value[0][1] != right.value[0][1] && (hasInherit(left) || hasInherit(right)))\n continue;\n\n if (wouldResultInLongerValue(left, right))\n continue;\n\n if (!left.multiplex && right.multiplex)\n turnIntoMultiplex(left, multiplexSize(right));\n\n override(component, right);\n left.dirty = true;\n }\n } else if (withMerging && left.shorthand && right.shorthand && left.name == right.name) {\n // merge if all components can be merged\n\n if (!left.multiplex && right.multiplex)\n continue;\n\n if (!right.important && left.important) {\n right.unused = true;\n continue propertyLoop;\n }\n\n if (right.important && !left.important) {\n left.unused = true;\n continue;\n }\n\n if (!isMergeableShorthand(right)) {\n left.unused = true;\n continue;\n }\n\n for (k = left.components.length - 1; k >= 0; k--) {\n var leftComponent = left.components[k];\n var rightComponent = right.components[k];\n\n mayOverride = compactable[leftComponent.name].canOverride;\n if (!everyValuesPair(mayOverride.bind(null, validator), leftComponent, rightComponent))\n continue propertyLoop;\n }\n\n overrideShorthand(left, right);\n left.dirty = true;\n } else if (withMerging && left.shorthand && right.shorthand && isComponentOf(left, right)) {\n // border is a shorthand but any of its components is a shorthand too\n\n if (!left.important && right.important)\n continue;\n\n component = findComponentIn(left, right);\n mayOverride = compactable[right.name].canOverride;\n if (!everyValuesPair(mayOverride.bind(null, validator), component, right))\n continue;\n\n if (left.important && !right.important) {\n right.unused = true;\n continue;\n }\n\n var rightRestored = compactable[right.name].restore(right, compactable);\n if (rightRestored.length > 1)\n continue;\n\n component = findComponentIn(left, right);\n override(component, right);\n right.dirty = true;\n } else if (left.name == right.name) {\n // two non-shorthands should be merged based on understandability\n overridable = true;\n\n if (right.shorthand) {\n for (k = right.components.length - 1; k >= 0 && overridable; k--) {\n overriddenComponent = left.components[k];\n overridingComponent = right.components[k];\n mayOverride = compactable[overridingComponent.name].canOverride;\n\n overridable = overridable && everyValuesPair(mayOverride.bind(null, validator), overriddenComponent, overridingComponent);\n }\n } else {\n mayOverride = compactable[right.name].canOverride;\n overridable = everyValuesPair(mayOverride.bind(null, validator), left, right);\n }\n\n if (left.important && !right.important && overridable) {\n right.unused = true;\n continue;\n }\n\n if (!left.important && right.important && overridable) {\n left.unused = true;\n continue;\n }\n\n if (!overridable) {\n continue;\n }\n\n left.unused = true;\n }\n }\n }\n}\n\nmodule.exports = overrideProperties;\n","var compactable = require('../compactable');\n\nfunction overridesNonComponentShorthand(property1, property2) {\n return property1.name in compactable &&\n 'overridesShorthands' in compactable[property1.name] &&\n compactable[property1.name].overridesShorthands.indexOf(property2.name) > -1;\n}\n\nmodule.exports = overridesNonComponentShorthand;\n","var compactable = require('../compactable');\nvar InvalidPropertyError = require('../invalid-property-error');\n\nfunction populateComponents(properties, validator, warnings) {\n var component;\n var j, m;\n\n for (var i = properties.length - 1; i >= 0; i--) {\n var property = properties[i];\n var descriptor = compactable[property.name];\n\n if (descriptor && descriptor.shorthand) {\n property.shorthand = true;\n property.dirty = true;\n\n try {\n property.components = descriptor.breakUp(property, compactable, validator);\n\n if (descriptor.shorthandComponents) {\n for (j = 0, m = property.components.length; j < m; j++) {\n component = property.components[j];\n component.components = compactable[component.name].breakUp(component, compactable, validator);\n }\n }\n } catch (e) {\n if (e instanceof InvalidPropertyError) {\n property.components = []; // this will set property.unused to true below\n warnings.push(e.message);\n } else {\n throw e;\n }\n }\n\n if (property.components.length > 0)\n property.multiplex = property.components[0].multiplex;\n else\n property.unused = true;\n }\n }\n}\n\nmodule.exports = populateComponents;\n","var sameVendorPrefixes = require('./vendor-prefixes').same;\n\nfunction understandable(validator, value1, value2, _position, isPaired) {\n if (!sameVendorPrefixes(value1, value2)) {\n return false;\n }\n\n if (isPaired && validator.isVariable(value1) !== validator.isVariable(value2)) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = understandable;\n","var VENDOR_PREFIX_PATTERN = /(?:^|\\W)(\\-\\w+\\-)/g;\n\nfunction unique(value) {\n var prefixes = [];\n var match;\n\n while ((match = VENDOR_PREFIX_PATTERN.exec(value)) !== null) {\n if (prefixes.indexOf(match[0]) == -1) {\n prefixes.push(match[0]);\n }\n }\n\n return prefixes;\n}\n\nfunction same(value1, value2) {\n return unique(value1).sort().join(',') == unique(value2).sort().join(',');\n}\n\nmodule.exports = {\n unique: unique,\n same: same\n};\n","var isMergeable = require('./is-mergeable');\n\nvar optimizeProperties = require('./properties/optimize');\n\nvar cloneArray = require('../../utils/clone-array');\n\nvar Token = require('../../tokenizer/token');\n\nvar serializeBody = require('../../writer/one-time').body;\nvar serializeRules = require('../../writer/one-time').rules;\n\nfunction reduceNonAdjacent(tokens, context) {\n var options = context.options;\n var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;\n var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;\n var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;\n var candidates = {};\n var repeated = [];\n\n for (var i = tokens.length - 1; i >= 0; i--) {\n var token = tokens[i];\n\n if (token[0] != Token.RULE) {\n continue;\n } else if (token[2].length === 0) {\n continue;\n }\n\n var selectorAsString = serializeRules(token[1]);\n var isComplexAndNotSpecial = token[1].length > 1 &&\n isMergeable(selectorAsString, mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging);\n var wrappedSelectors = wrappedSelectorsFrom(token[1]);\n var selectors = isComplexAndNotSpecial ?\n [selectorAsString].concat(wrappedSelectors) :\n [selectorAsString];\n\n for (var j = 0, m = selectors.length; j < m; j++) {\n var selector = selectors[j];\n\n if (!candidates[selector])\n candidates[selector] = [];\n else\n repeated.push(selector);\n\n candidates[selector].push({\n where: i,\n list: wrappedSelectors,\n isPartial: isComplexAndNotSpecial && j > 0,\n isComplex: isComplexAndNotSpecial && j === 0\n });\n }\n }\n\n reduceSimpleNonAdjacentCases(tokens, repeated, candidates, options, context);\n reduceComplexNonAdjacentCases(tokens, candidates, options, context);\n}\n\nfunction wrappedSelectorsFrom(list) {\n var wrapped = [];\n\n for (var i = 0; i < list.length; i++) {\n wrapped.push([list[i][1]]);\n }\n\n return wrapped;\n}\n\nfunction reduceSimpleNonAdjacentCases(tokens, repeated, candidates, options, context) {\n function filterOut(idx, bodies) {\n return data[idx].isPartial && bodies.length === 0;\n }\n\n function reduceBody(token, newBody, processedCount, tokenIdx) {\n if (!data[processedCount - tokenIdx - 1].isPartial)\n token[2] = newBody;\n }\n\n for (var i = 0, l = repeated.length; i < l; i++) {\n var selector = repeated[i];\n var data = candidates[selector];\n\n reduceSelector(tokens, data, {\n filterOut: filterOut,\n callback: reduceBody\n }, options, context);\n }\n}\n\nfunction reduceComplexNonAdjacentCases(tokens, candidates, options, context) {\n var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;\n var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;\n var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;\n var localContext = {};\n\n function filterOut(idx) {\n return localContext.data[idx].where < localContext.intoPosition;\n }\n\n function collectReducedBodies(token, newBody, processedCount, tokenIdx) {\n if (tokenIdx === 0)\n localContext.reducedBodies.push(newBody);\n }\n\n allSelectors:\n for (var complexSelector in candidates) {\n var into = candidates[complexSelector];\n if (!into[0].isComplex)\n continue;\n\n var intoPosition = into[into.length - 1].where;\n var intoToken = tokens[intoPosition];\n var reducedBodies = [];\n\n var selectors = isMergeable(complexSelector, mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) ?\n into[0].list :\n [complexSelector];\n\n localContext.intoPosition = intoPosition;\n localContext.reducedBodies = reducedBodies;\n\n for (var j = 0, m = selectors.length; j < m; j++) {\n var selector = selectors[j];\n var data = candidates[selector];\n\n if (data.length < 2)\n continue allSelectors;\n\n localContext.data = data;\n\n reduceSelector(tokens, data, {\n filterOut: filterOut,\n callback: collectReducedBodies\n }, options, context);\n\n if (serializeBody(reducedBodies[reducedBodies.length - 1]) != serializeBody(reducedBodies[0]))\n continue allSelectors;\n }\n\n intoToken[2] = reducedBodies[0];\n }\n}\n\nfunction reduceSelector(tokens, data, context, options, outerContext) {\n var bodies = [];\n var bodiesAsList = [];\n var processedTokens = [];\n\n for (var j = data.length - 1; j >= 0; j--) {\n if (context.filterOut(j, bodies))\n continue;\n\n var where = data[j].where;\n var token = tokens[where];\n var clonedBody = cloneArray(token[2]);\n\n bodies = bodies.concat(clonedBody);\n bodiesAsList.push(clonedBody);\n processedTokens.push(where);\n }\n\n optimizeProperties(bodies, true, false, outerContext);\n\n var processedCount = processedTokens.length;\n var propertyIdx = bodies.length - 1;\n var tokenIdx = processedCount - 1;\n\n while (tokenIdx >= 0) {\n if ((tokenIdx === 0 || (bodies[propertyIdx] && bodiesAsList[tokenIdx].indexOf(bodies[propertyIdx]) > -1)) && propertyIdx > -1) {\n propertyIdx--;\n continue;\n }\n\n var newBody = bodies.splice(propertyIdx + 1);\n context.callback(tokens[processedTokens[tokenIdx]], newBody, processedCount, tokenIdx);\n\n tokenIdx--;\n }\n}\n\nmodule.exports = reduceNonAdjacent;\n","var Token = require('../../tokenizer/token');\n\nvar serializeAll = require('../../writer/one-time').all;\n\nvar FONT_FACE_SCOPE = '@font-face';\n\nfunction removeDuplicateFontAtRules(tokens) {\n var fontAtRules = [];\n var token;\n var key;\n var i, l;\n\n for (i = 0, l = tokens.length; i < l; i++) {\n token = tokens[i];\n\n if (token[0] != Token.AT_RULE_BLOCK && token[1][0][1] != FONT_FACE_SCOPE) {\n continue;\n }\n\n key = serializeAll([token]);\n\n if (fontAtRules.indexOf(key) > -1) {\n token[2] = [];\n } else {\n fontAtRules.push(key);\n }\n }\n}\n\nmodule.exports = removeDuplicateFontAtRules;\n","var Token = require('../../tokenizer/token');\n\nvar serializeAll = require('../../writer/one-time').all;\nvar serializeRules = require('../../writer/one-time').rules;\n\nfunction removeDuplicateMediaQueries(tokens) {\n var candidates = {};\n var candidate;\n var token;\n var key;\n var i, l;\n\n for (i = 0, l = tokens.length; i < l; i++) {\n token = tokens[i];\n if (token[0] != Token.NESTED_BLOCK) {\n continue;\n }\n\n key = serializeRules(token[1]) + '%' + serializeAll(token[2]);\n candidate = candidates[key];\n\n if (candidate) {\n candidate[2] = [];\n }\n\n candidates[key] = token;\n }\n}\n\nmodule.exports = removeDuplicateMediaQueries;\n","var Token = require('../../tokenizer/token');\n\nvar serializeBody = require('../../writer/one-time').body;\nvar serializeRules = require('../../writer/one-time').rules;\n\nfunction removeDuplicates(tokens) {\n var matched = {};\n var moreThanOnce = [];\n var id, token;\n var body, bodies;\n\n for (var i = 0, l = tokens.length; i < l; i++) {\n token = tokens[i];\n if (token[0] != Token.RULE)\n continue;\n\n id = serializeRules(token[1]);\n\n if (matched[id] && matched[id].length == 1)\n moreThanOnce.push(id);\n else\n matched[id] = matched[id] || [];\n\n matched[id].push(i);\n }\n\n for (i = 0, l = moreThanOnce.length; i < l; i++) {\n id = moreThanOnce[i];\n bodies = [];\n\n for (var j = matched[id].length - 1; j >= 0; j--) {\n token = tokens[matched[id][j]];\n body = serializeBody(token[2]);\n\n if (bodies.indexOf(body) > -1)\n token[2] = [];\n else\n bodies.push(body);\n }\n }\n}\n\nmodule.exports = removeDuplicates;\n","var populateComponents = require('./properties/populate-components');\n\nvar wrapForOptimizing = require('../wrap-for-optimizing').single;\nvar restoreFromOptimizing = require('../restore-from-optimizing');\n\nvar Token = require('../../tokenizer/token');\n\nvar animationNameRegex = /^(\\-moz\\-|\\-o\\-|\\-webkit\\-)?animation-name$/;\nvar animationRegex = /^(\\-moz\\-|\\-o\\-|\\-webkit\\-)?animation$/;\nvar keyframeRegex = /^@(\\-moz\\-|\\-o\\-|\\-webkit\\-)?keyframes /;\nvar importantRegex = /\\s{0,31}!important$/;\nvar optionalMatchingQuotesRegex = /^(['\"]?)(.*)\\1$/;\n\nfunction normalize(value) {\n return value\n .replace(optionalMatchingQuotesRegex, '$2')\n .replace(importantRegex, '');\n}\n\nfunction removeUnusedAtRules(tokens, context) {\n removeUnusedAtRule(tokens, matchCounterStyle, markCounterStylesAsUsed, context);\n removeUnusedAtRule(tokens, matchFontFace, markFontFacesAsUsed, context);\n removeUnusedAtRule(tokens, matchKeyframe, markKeyframesAsUsed, context);\n removeUnusedAtRule(tokens, matchNamespace, markNamespacesAsUsed, context);\n}\n\nfunction removeUnusedAtRule(tokens, matchCallback, markCallback, context) {\n var atRules = {};\n var atRule;\n var atRuleTokens;\n var atRuleToken;\n var zeroAt;\n var i, l;\n\n for (i = 0, l = tokens.length; i < l; i++) {\n matchCallback(tokens[i], atRules);\n }\n\n if (Object.keys(atRules).length === 0) {\n return;\n }\n\n markUsedAtRules(tokens, markCallback, atRules, context);\n\n for (atRule in atRules) {\n atRuleTokens = atRules[atRule];\n\n for (i = 0, l = atRuleTokens.length; i < l; i++) {\n atRuleToken = atRuleTokens[i];\n zeroAt = atRuleToken[0] == Token.AT_RULE ? 1 : 2;\n atRuleToken[zeroAt] = [];\n }\n }\n}\n\nfunction markUsedAtRules(tokens, markCallback, atRules, context) {\n var boundMarkCallback = markCallback(atRules);\n var i, l;\n\n for (i = 0, l = tokens.length; i < l; i++) {\n switch (tokens[i][0]) {\n case Token.RULE:\n boundMarkCallback(tokens[i], context);\n break;\n case Token.NESTED_BLOCK:\n markUsedAtRules(tokens[i][2], markCallback, atRules, context);\n }\n }\n}\n\nfunction matchCounterStyle(token, atRules) {\n var match;\n\n if (token[0] == Token.AT_RULE_BLOCK && token[1][0][1].indexOf('@counter-style') === 0) {\n match = token[1][0][1].split(' ')[1];\n atRules[match] = atRules[match] || [];\n atRules[match].push(token);\n }\n}\n\nfunction markCounterStylesAsUsed(atRules) {\n return function (token, context) {\n var property;\n var wrappedProperty;\n var i, l;\n\n for (i = 0, l = token[2].length; i < l; i++) {\n property = token[2][i];\n\n if (property[1][1] == 'list-style') {\n wrappedProperty = wrapForOptimizing(property);\n populateComponents([wrappedProperty], context.validator, context.warnings);\n\n if (wrappedProperty.components[0].value[0][1] in atRules) {\n delete atRules[property[2][1]];\n }\n\n restoreFromOptimizing([wrappedProperty]);\n }\n\n if (property[1][1] == 'list-style-type' && property[2][1] in atRules) {\n delete atRules[property[2][1]];\n }\n }\n };\n}\n\nfunction matchFontFace(token, atRules) {\n var property;\n var match;\n var i, l;\n\n if (token[0] == Token.AT_RULE_BLOCK && token[1][0][1] == '@font-face') {\n for (i = 0, l = token[2].length; i < l; i++) {\n property = token[2][i];\n\n if (property[1][1] == 'font-family') {\n match = normalize(property[2][1].toLowerCase());\n atRules[match] = atRules[match] || [];\n atRules[match].push(token);\n break;\n }\n }\n }\n}\n\nfunction markFontFacesAsUsed(atRules) {\n return function (token, context) {\n var property;\n var wrappedProperty;\n var component;\n var normalizedMatch;\n var i, l;\n var j, m;\n\n for (i = 0, l = token[2].length; i < l; i++) {\n property = token[2][i];\n\n if (property[1][1] == 'font') {\n wrappedProperty = wrapForOptimizing(property);\n populateComponents([wrappedProperty], context.validator, context.warnings);\n component = wrappedProperty.components[6];\n\n for (j = 0, m = component.value.length; j < m; j++) {\n normalizedMatch = normalize(component.value[j][1].toLowerCase());\n\n if (normalizedMatch in atRules) {\n delete atRules[normalizedMatch];\n }\n }\n\n restoreFromOptimizing([wrappedProperty]);\n }\n\n if (property[1][1] == 'font-family') {\n for (j = 2, m = property.length; j < m; j++) {\n normalizedMatch = normalize(property[j][1].toLowerCase());\n\n if (normalizedMatch in atRules) {\n delete atRules[normalizedMatch];\n }\n }\n }\n }\n };\n}\n\nfunction matchKeyframe(token, atRules) {\n var match;\n\n if (token[0] == Token.NESTED_BLOCK && keyframeRegex.test(token[1][0][1])) {\n match = token[1][0][1].split(' ')[1];\n atRules[match] = atRules[match] || [];\n atRules[match].push(token);\n }\n}\n\nfunction markKeyframesAsUsed(atRules) {\n return function (token, context) {\n var property;\n var wrappedProperty;\n var component;\n var i, l;\n var j, m;\n\n for (i = 0, l = token[2].length; i < l; i++) {\n property = token[2][i];\n\n if (animationRegex.test(property[1][1])) {\n wrappedProperty = wrapForOptimizing(property);\n populateComponents([wrappedProperty], context.validator, context.warnings);\n component = wrappedProperty.components[7];\n\n for (j = 0, m = component.value.length; j < m; j++) {\n if (component.value[j][1] in atRules) {\n delete atRules[component.value[j][1]];\n }\n }\n\n restoreFromOptimizing([wrappedProperty]);\n }\n\n if (animationNameRegex.test(property[1][1])) {\n for (j = 2, m = property.length; j < m; j++) {\n if (property[j][1] in atRules) {\n delete atRules[property[j][1]];\n }\n }\n }\n }\n };\n}\n\nfunction matchNamespace(token, atRules) {\n var match;\n\n if (token[0] == Token.AT_RULE && token[1].indexOf('@namespace') === 0) {\n match = token[1].split(' ')[1];\n atRules[match] = atRules[match] || [];\n atRules[match].push(token);\n }\n}\n\nfunction markNamespacesAsUsed(atRules) {\n var namespaceRegex = new RegExp(Object.keys(atRules).join('\\\\\\||') + '\\\\\\|', 'g');\n\n return function (token) {\n var match;\n var scope;\n var normalizedMatch;\n var i, l;\n var j, m;\n\n for (i = 0, l = token[1].length; i < l; i++) {\n scope = token[1][i];\n match = scope[1].match(namespaceRegex);\n\n for (j = 0, m = match.length; j < m; j++) {\n normalizedMatch = match[j].substring(0, match[j].length - 1);\n\n if (normalizedMatch in atRules) {\n delete atRules[normalizedMatch];\n }\n }\n }\n };\n}\n\nmodule.exports = removeUnusedAtRules;\n","// TODO: it'd be great to merge it with the other canReorder functionality\n\nvar rulesOverlap = require('./rules-overlap');\nvar specificitiesOverlap = require('./specificities-overlap');\n\nvar FLEX_PROPERTIES = /align\\-items|box\\-align|box\\-pack|flex|justify/;\nvar BORDER_PROPERTIES = /^border\\-(top|right|bottom|left|color|style|width|radius)/;\n\nfunction canReorder(left, right, cache) {\n for (var i = right.length - 1; i >= 0; i--) {\n for (var j = left.length - 1; j >= 0; j--) {\n if (!canReorderSingle(left[j], right[i], cache))\n return false;\n }\n }\n\n return true;\n}\n\nfunction canReorderSingle(left, right, cache) {\n var leftName = left[0];\n var leftValue = left[1];\n var leftNameRoot = left[2];\n var leftSelector = left[5];\n var leftInSpecificSelector = left[6];\n var rightName = right[0];\n var rightValue = right[1];\n var rightNameRoot = right[2];\n var rightSelector = right[5];\n var rightInSpecificSelector = right[6];\n\n if (leftName == 'font' && rightName == 'line-height' || rightName == 'font' && leftName == 'line-height')\n return false;\n if (FLEX_PROPERTIES.test(leftName) && FLEX_PROPERTIES.test(rightName))\n return false;\n if (leftNameRoot == rightNameRoot && unprefixed(leftName) == unprefixed(rightName) && (vendorPrefixed(leftName) ^ vendorPrefixed(rightName)))\n return false;\n if (leftNameRoot == 'border' && BORDER_PROPERTIES.test(rightNameRoot) && (leftName == 'border' || leftName == rightNameRoot || (leftValue != rightValue && sameBorderComponent(leftName, rightName))))\n return false;\n if (rightNameRoot == 'border' && BORDER_PROPERTIES.test(leftNameRoot) && (rightName == 'border' || rightName == leftNameRoot || (leftValue != rightValue && sameBorderComponent(leftName, rightName))))\n return false;\n if (leftNameRoot == 'border' && rightNameRoot == 'border' && leftName != rightName && (isSideBorder(leftName) && isStyleBorder(rightName) || isStyleBorder(leftName) && isSideBorder(rightName)))\n return false;\n if (leftNameRoot != rightNameRoot)\n return true;\n if (leftName == rightName && leftNameRoot == rightNameRoot && (leftValue == rightValue || withDifferentVendorPrefix(leftValue, rightValue)))\n return true;\n if (leftName != rightName && leftNameRoot == rightNameRoot && leftName != leftNameRoot && rightName != rightNameRoot)\n return true;\n if (leftName != rightName && leftNameRoot == rightNameRoot && leftValue == rightValue)\n return true;\n if (rightInSpecificSelector && leftInSpecificSelector && !inheritable(leftNameRoot) && !inheritable(rightNameRoot) && !rulesOverlap(rightSelector, leftSelector, false))\n return true;\n if (!specificitiesOverlap(leftSelector, rightSelector, cache))\n return true;\n\n return false;\n}\n\nfunction vendorPrefixed(name) {\n return /^\\-(?:moz|webkit|ms|o)\\-/.test(name);\n}\n\nfunction unprefixed(name) {\n return name.replace(/^\\-(?:moz|webkit|ms|o)\\-/, '');\n}\n\nfunction sameBorderComponent(name1, name2) {\n return name1.split('-').pop() == name2.split('-').pop();\n}\n\nfunction isSideBorder(name) {\n return name == 'border-top' || name == 'border-right' || name == 'border-bottom' || name == 'border-left';\n}\n\nfunction isStyleBorder(name) {\n return name == 'border-color' || name == 'border-style' || name == 'border-width';\n}\n\nfunction withDifferentVendorPrefix(value1, value2) {\n return vendorPrefixed(value1) && vendorPrefixed(value2) && value1.split('-')[1] != value2.split('-')[2];\n}\n\nfunction inheritable(name) {\n // According to http://www.w3.org/TR/CSS21/propidx.html\n // Others will be catched by other, preceeding rules\n return name == 'font' || name == 'line-height' || name == 'list-style';\n}\n\nmodule.exports = {\n canReorder: canReorder,\n canReorderSingle: canReorderSingle\n};\n","var compactable = require('./compactable');\n\nfunction restoreWithComponents(property) {\n var descriptor = compactable[property.name];\n\n if (descriptor && descriptor.shorthand) {\n return descriptor.restore(property, compactable);\n } else {\n return property.value;\n }\n}\n\nmodule.exports = restoreWithComponents;\n","var shallowClone = require('./clone').shallow;\n\nvar Token = require('../../tokenizer/token');\nvar Marker = require('../../tokenizer/marker');\n\nfunction isInheritOnly(values) {\n for (var i = 0, l = values.length; i < l; i++) {\n var value = values[i][1];\n\n if (value != 'inherit' && value != Marker.COMMA && value != Marker.FORWARD_SLASH)\n return false;\n }\n\n return true;\n}\n\nfunction background(property, compactable, lastInMultiplex) {\n var components = property.components;\n var restored = [];\n var needsOne, needsBoth;\n\n function restoreValue(component) {\n Array.prototype.unshift.apply(restored, component.value);\n }\n\n function isDefaultValue(component) {\n var descriptor = compactable[component.name];\n\n if (descriptor.doubleValues && descriptor.defaultValue.length == 1) {\n return component.value[0][1] == descriptor.defaultValue[0] && (component.value[1] ? component.value[1][1] == descriptor.defaultValue[0] : true);\n } else if (descriptor.doubleValues && descriptor.defaultValue.length != 1) {\n return component.value[0][1] == descriptor.defaultValue[0] && (component.value[1] ? component.value[1][1] : component.value[0][1]) == descriptor.defaultValue[1];\n } else {\n return component.value[0][1] == descriptor.defaultValue;\n }\n }\n\n for (var i = components.length - 1; i >= 0; i--) {\n var component = components[i];\n var isDefault = isDefaultValue(component);\n\n if (component.name == 'background-clip') {\n var originComponent = components[i - 1];\n var isOriginDefault = isDefaultValue(originComponent);\n\n needsOne = component.value[0][1] == originComponent.value[0][1];\n\n needsBoth = !needsOne && (\n (isOriginDefault && !isDefault) ||\n (!isOriginDefault && !isDefault) ||\n (!isOriginDefault && isDefault && component.value[0][1] != originComponent.value[0][1]));\n\n if (needsOne) {\n restoreValue(originComponent);\n } else if (needsBoth) {\n restoreValue(component);\n restoreValue(originComponent);\n }\n\n i--;\n } else if (component.name == 'background-size') {\n var positionComponent = components[i - 1];\n var isPositionDefault = isDefaultValue(positionComponent);\n\n needsOne = !isPositionDefault && isDefault;\n\n needsBoth = !needsOne &&\n (isPositionDefault && !isDefault || !isPositionDefault && !isDefault);\n\n if (needsOne) {\n restoreValue(positionComponent);\n } else if (needsBoth) {\n restoreValue(component);\n restored.unshift([Token.PROPERTY_VALUE, Marker.FORWARD_SLASH]);\n restoreValue(positionComponent);\n } else if (positionComponent.value.length == 1) {\n restoreValue(positionComponent);\n }\n\n i--;\n } else {\n if (isDefault || compactable[component.name].multiplexLastOnly && !lastInMultiplex)\n continue;\n\n restoreValue(component);\n }\n }\n\n if (restored.length === 0 && property.value.length == 1 && property.value[0][1] == '0')\n restored.push(property.value[0]);\n\n if (restored.length === 0)\n restored.push([Token.PROPERTY_VALUE, compactable[property.name].defaultValue]);\n\n if (isInheritOnly(restored))\n return [restored[0]];\n\n return restored;\n}\n\nfunction borderRadius(property, compactable) {\n if (property.multiplex) {\n var horizontal = shallowClone(property);\n var vertical = shallowClone(property);\n\n for (var i = 0; i < 4; i++) {\n var component = property.components[i];\n\n var horizontalComponent = shallowClone(property);\n horizontalComponent.value = [component.value[0]];\n horizontal.components.push(horizontalComponent);\n\n var verticalComponent = shallowClone(property);\n // FIXME: only shorthand compactor (see breakup#borderRadius) knows that border radius\n // longhands have two values, whereas tokenizer does not care about populating 2nd value\n // if it's missing, hence this fallback\n verticalComponent.value = [component.value[1] || component.value[0]];\n vertical.components.push(verticalComponent);\n }\n\n var horizontalValues = fourValues(horizontal, compactable);\n var verticalValues = fourValues(vertical, compactable);\n\n if (horizontalValues.length == verticalValues.length &&\n horizontalValues[0][1] == verticalValues[0][1] &&\n (horizontalValues.length > 1 ? horizontalValues[1][1] == verticalValues[1][1] : true) &&\n (horizontalValues.length > 2 ? horizontalValues[2][1] == verticalValues[2][1] : true) &&\n (horizontalValues.length > 3 ? horizontalValues[3][1] == verticalValues[3][1] : true)) {\n return horizontalValues;\n } else {\n return horizontalValues.concat([[Token.PROPERTY_VALUE, Marker.FORWARD_SLASH]]).concat(verticalValues);\n }\n } else {\n return fourValues(property, compactable);\n }\n}\n\nfunction font(property, compactable) {\n var components = property.components;\n var restored = [];\n var component;\n var componentIndex = 0;\n var fontFamilyIndex = 0;\n\n if (property.value[0][1].indexOf(Marker.INTERNAL) === 0) {\n property.value[0][1] = property.value[0][1].substring(Marker.INTERNAL.length);\n return property.value;\n }\n\n // first four components are optional\n while (componentIndex < 4) {\n component = components[componentIndex];\n\n if (component.value[0][1] != compactable[component.name].defaultValue) {\n Array.prototype.push.apply(restored, component.value);\n }\n\n componentIndex++;\n }\n\n // then comes font-size\n Array.prototype.push.apply(restored, components[componentIndex].value);\n componentIndex++;\n\n // then may come line-height\n if (components[componentIndex].value[0][1] != compactable[components[componentIndex].name].defaultValue) {\n Array.prototype.push.apply(restored, [[Token.PROPERTY_VALUE, Marker.FORWARD_SLASH]]);\n Array.prototype.push.apply(restored, components[componentIndex].value);\n }\n\n componentIndex++;\n\n // then comes font-family\n while (components[componentIndex].value[fontFamilyIndex]) {\n restored.push(components[componentIndex].value[fontFamilyIndex]);\n\n if (components[componentIndex].value[fontFamilyIndex + 1]) {\n restored.push([Token.PROPERTY_VALUE, Marker.COMMA]);\n }\n\n fontFamilyIndex++;\n }\n\n if (isInheritOnly(restored)) {\n return [restored[0]];\n }\n\n return restored;\n}\n\nfunction fourValues(property) {\n var components = property.components;\n var value1 = components[0].value[0];\n var value2 = components[1].value[0];\n var value3 = components[2].value[0];\n var value4 = components[3].value[0];\n\n if (value1[1] == value2[1] && value1[1] == value3[1] && value1[1] == value4[1]) {\n return [value1];\n } else if (value1[1] == value3[1] && value2[1] == value4[1]) {\n return [value1, value2];\n } else if (value2[1] == value4[1]) {\n return [value1, value2, value3];\n } else {\n return [value1, value2, value3, value4];\n }\n}\n\nfunction multiplex(restoreWith) {\n return function (property, compactable) {\n if (!property.multiplex)\n return restoreWith(property, compactable, true);\n\n var multiplexSize = 0;\n var restored = [];\n var componentMultiplexSoFar = {};\n var i, l;\n\n // At this point we don't know what's the multiplex size, e.g. how many background layers are there\n for (i = 0, l = property.components[0].value.length; i < l; i++) {\n if (property.components[0].value[i][1] == Marker.COMMA)\n multiplexSize++;\n }\n\n for (i = 0; i <= multiplexSize; i++) {\n var _property = shallowClone(property);\n\n // We split multiplex into parts and restore them one by one\n for (var j = 0, m = property.components.length; j < m; j++) {\n var componentToClone = property.components[j];\n var _component = shallowClone(componentToClone);\n _property.components.push(_component);\n\n // The trick is some properties has more than one value, so we iterate over values looking for\n // a multiplex separator - a comma\n for (var k = componentMultiplexSoFar[_component.name] || 0, n = componentToClone.value.length; k < n; k++) {\n if (componentToClone.value[k][1] == Marker.COMMA) {\n componentMultiplexSoFar[_component.name] = k + 1;\n break;\n }\n\n _component.value.push(componentToClone.value[k]);\n }\n }\n\n // No we can restore shorthand value\n var lastInMultiplex = i == multiplexSize;\n var _restored = restoreWith(_property, compactable, lastInMultiplex);\n Array.prototype.push.apply(restored, _restored);\n\n if (i < multiplexSize)\n restored.push([Token.PROPERTY_VALUE, Marker.COMMA]);\n }\n\n return restored;\n };\n}\n\nfunction withoutDefaults(property, compactable) {\n var components = property.components;\n var restored = [];\n\n for (var i = components.length - 1; i >= 0; i--) {\n var component = components[i];\n var descriptor = compactable[component.name];\n\n if (component.value[0][1] != descriptor.defaultValue || ('keepUnlessDefault' in descriptor) && !isDefault(components, compactable, descriptor.keepUnlessDefault)) {\n restored.unshift(component.value[0]);\n }\n }\n\n if (restored.length === 0)\n restored.push([Token.PROPERTY_VALUE, compactable[property.name].defaultValue]);\n\n if (isInheritOnly(restored))\n return [restored[0]];\n\n return restored;\n}\n\nfunction isDefault(components, compactable, propertyName) {\n var component;\n var i, l;\n\n for (i = 0, l = components.length; i < l; i++) {\n component = components[i];\n\n if (component.name == propertyName && component.value[0][1] == compactable[propertyName].defaultValue) {\n return true;\n }\n }\n\n return false;\n}\n\nmodule.exports = {\n background: background,\n borderRadius: borderRadius,\n font: font,\n fourValues: fourValues,\n multiplex: multiplex,\n withoutDefaults: withoutDefaults\n};\n","var canReorderSingle = require('./reorderable').canReorderSingle;\nvar extractProperties = require('./extract-properties');\nvar isMergeable = require('./is-mergeable');\nvar tidyRuleDuplicates = require('./tidy-rule-duplicates');\n\nvar Token = require('../../tokenizer/token');\n\nvar cloneArray = require('../../utils/clone-array');\n\nvar serializeBody = require('../../writer/one-time').body;\nvar serializeRules = require('../../writer/one-time').rules;\n\nfunction naturalSorter(a, b) {\n return a > b ? 1 : -1;\n}\n\nfunction cloneAndMergeSelectors(propertyA, propertyB) {\n var cloned = cloneArray(propertyA);\n cloned[5] = cloned[5].concat(propertyB[5]);\n\n return cloned;\n}\n\nfunction restructure(tokens, context) {\n var options = context.options;\n var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;\n var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;\n var mergeLimit = options.compatibility.selectors.mergeLimit;\n var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;\n var specificityCache = context.cache.specificity;\n var movableTokens = {};\n var movedProperties = [];\n var multiPropertyMoveCache = {};\n var movedToBeDropped = [];\n var maxCombinationsLevel = 2;\n var ID_JOIN_CHARACTER = '%';\n\n function sendToMultiPropertyMoveCache(position, movedProperty, allFits) {\n for (var i = allFits.length - 1; i >= 0; i--) {\n var fit = allFits[i][0];\n var id = addToCache(movedProperty, fit);\n\n if (multiPropertyMoveCache[id].length > 1 && processMultiPropertyMove(position, multiPropertyMoveCache[id])) {\n removeAllMatchingFromCache(id);\n break;\n }\n }\n }\n\n function addToCache(movedProperty, fit) {\n var id = cacheId(fit);\n multiPropertyMoveCache[id] = multiPropertyMoveCache[id] || [];\n multiPropertyMoveCache[id].push([movedProperty, fit]);\n return id;\n }\n\n function removeAllMatchingFromCache(matchId) {\n var matchSelectors = matchId.split(ID_JOIN_CHARACTER);\n var forRemoval = [];\n var i;\n\n for (var id in multiPropertyMoveCache) {\n var selectors = id.split(ID_JOIN_CHARACTER);\n for (i = selectors.length - 1; i >= 0; i--) {\n if (matchSelectors.indexOf(selectors[i]) > -1) {\n forRemoval.push(id);\n break;\n }\n }\n }\n\n for (i = forRemoval.length - 1; i >= 0; i--) {\n delete multiPropertyMoveCache[forRemoval[i]];\n }\n }\n\n function cacheId(cachedTokens) {\n var id = [];\n for (var i = 0, l = cachedTokens.length; i < l; i++) {\n id.push(serializeRules(cachedTokens[i][1]));\n }\n return id.join(ID_JOIN_CHARACTER);\n }\n\n function tokensToMerge(sourceTokens) {\n var uniqueTokensWithBody = [];\n var mergeableTokens = [];\n\n for (var i = sourceTokens.length - 1; i >= 0; i--) {\n if (!isMergeable(serializeRules(sourceTokens[i][1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging)) {\n continue;\n }\n\n mergeableTokens.unshift(sourceTokens[i]);\n if (sourceTokens[i][2].length > 0 && uniqueTokensWithBody.indexOf(sourceTokens[i]) == -1)\n uniqueTokensWithBody.push(sourceTokens[i]);\n }\n\n return uniqueTokensWithBody.length > 1 ?\n mergeableTokens :\n [];\n }\n\n function shortenIfPossible(position, movedProperty) {\n var name = movedProperty[0];\n var value = movedProperty[1];\n var key = movedProperty[4];\n var valueSize = name.length + value.length + 1;\n var allSelectors = [];\n var qualifiedTokens = [];\n\n var mergeableTokens = tokensToMerge(movableTokens[key]);\n if (mergeableTokens.length < 2)\n return;\n\n var allFits = findAllFits(mergeableTokens, valueSize, 1);\n var bestFit = allFits[0];\n if (bestFit[1] > 0)\n return sendToMultiPropertyMoveCache(position, movedProperty, allFits);\n\n for (var i = bestFit[0].length - 1; i >=0; i--) {\n allSelectors = bestFit[0][i][1].concat(allSelectors);\n qualifiedTokens.unshift(bestFit[0][i]);\n }\n\n allSelectors = tidyRuleDuplicates(allSelectors);\n dropAsNewTokenAt(position, [movedProperty], allSelectors, qualifiedTokens);\n }\n\n function fitSorter(fit1, fit2) {\n return fit1[1] > fit2[1] ? 1 : (fit1[1] == fit2[1] ? 0 : -1);\n }\n\n function findAllFits(mergeableTokens, propertySize, propertiesCount) {\n var combinations = allCombinations(mergeableTokens, propertySize, propertiesCount, maxCombinationsLevel - 1);\n return combinations.sort(fitSorter);\n }\n\n function allCombinations(tokensVariant, propertySize, propertiesCount, level) {\n var differenceVariants = [[tokensVariant, sizeDifference(tokensVariant, propertySize, propertiesCount)]];\n if (tokensVariant.length > 2 && level > 0) {\n for (var i = tokensVariant.length - 1; i >= 0; i--) {\n var subVariant = Array.prototype.slice.call(tokensVariant, 0);\n subVariant.splice(i, 1);\n differenceVariants = differenceVariants.concat(allCombinations(subVariant, propertySize, propertiesCount, level - 1));\n }\n }\n\n return differenceVariants;\n }\n\n function sizeDifference(tokensVariant, propertySize, propertiesCount) {\n var allSelectorsSize = 0;\n for (var i = tokensVariant.length - 1; i >= 0; i--) {\n allSelectorsSize += tokensVariant[i][2].length > propertiesCount ? serializeRules(tokensVariant[i][1]).length : -1;\n }\n return allSelectorsSize - (tokensVariant.length - 1) * propertySize + 1;\n }\n\n function dropAsNewTokenAt(position, properties, allSelectors, mergeableTokens) {\n var i, j, k, m;\n var allProperties = [];\n\n for (i = mergeableTokens.length - 1; i >= 0; i--) {\n var mergeableToken = mergeableTokens[i];\n\n for (j = mergeableToken[2].length - 1; j >= 0; j--) {\n var mergeableProperty = mergeableToken[2][j];\n\n for (k = 0, m = properties.length; k < m; k++) {\n var property = properties[k];\n\n var mergeablePropertyName = mergeableProperty[1][1];\n var propertyName = property[0];\n var propertyBody = property[4];\n if (mergeablePropertyName == propertyName && serializeBody([mergeableProperty]) == propertyBody) {\n mergeableToken[2].splice(j, 1);\n break;\n }\n }\n }\n }\n\n for (i = properties.length - 1; i >= 0; i--) {\n allProperties.unshift(properties[i][3]);\n }\n\n var newToken = [Token.RULE, allSelectors, allProperties];\n tokens.splice(position, 0, newToken);\n }\n\n function dropPropertiesAt(position, movedProperty) {\n var key = movedProperty[4];\n var toMove = movableTokens[key];\n\n if (toMove && toMove.length > 1) {\n if (!shortenMultiMovesIfPossible(position, movedProperty))\n shortenIfPossible(position, movedProperty);\n }\n }\n\n function shortenMultiMovesIfPossible(position, movedProperty) {\n var candidates = [];\n var propertiesAndMergableTokens = [];\n var key = movedProperty[4];\n var j, k;\n\n var mergeableTokens = tokensToMerge(movableTokens[key]);\n if (mergeableTokens.length < 2)\n return;\n\n movableLoop:\n for (var value in movableTokens) {\n var tokensList = movableTokens[value];\n\n for (j = mergeableTokens.length - 1; j >= 0; j--) {\n if (tokensList.indexOf(mergeableTokens[j]) == -1)\n continue movableLoop;\n }\n\n candidates.push(value);\n }\n\n if (candidates.length < 2)\n return false;\n\n for (j = candidates.length - 1; j >= 0; j--) {\n for (k = movedProperties.length - 1; k >= 0; k--) {\n if (movedProperties[k][4] == candidates[j]) {\n propertiesAndMergableTokens.unshift([movedProperties[k], mergeableTokens]);\n break;\n }\n }\n }\n\n return processMultiPropertyMove(position, propertiesAndMergableTokens);\n }\n\n function processMultiPropertyMove(position, propertiesAndMergableTokens) {\n var valueSize = 0;\n var properties = [];\n var property;\n\n for (var i = propertiesAndMergableTokens.length - 1; i >= 0; i--) {\n property = propertiesAndMergableTokens[i][0];\n var fullValue = property[4];\n valueSize += fullValue.length + (i > 0 ? 1 : 0);\n\n properties.push(property);\n }\n\n var mergeableTokens = propertiesAndMergableTokens[0][1];\n var bestFit = findAllFits(mergeableTokens, valueSize, properties.length)[0];\n if (bestFit[1] > 0)\n return false;\n\n var allSelectors = [];\n var qualifiedTokens = [];\n for (i = bestFit[0].length - 1; i >= 0; i--) {\n allSelectors = bestFit[0][i][1].concat(allSelectors);\n qualifiedTokens.unshift(bestFit[0][i]);\n }\n\n allSelectors = tidyRuleDuplicates(allSelectors);\n dropAsNewTokenAt(position, properties, allSelectors, qualifiedTokens);\n\n for (i = properties.length - 1; i >= 0; i--) {\n property = properties[i];\n var index = movedProperties.indexOf(property);\n\n delete movableTokens[property[4]];\n\n if (index > -1 && movedToBeDropped.indexOf(index) == -1)\n movedToBeDropped.push(index);\n }\n\n return true;\n }\n\n function boundToAnotherPropertyInCurrrentToken(property, movedProperty, token) {\n var propertyName = property[0];\n var movedPropertyName = movedProperty[0];\n if (propertyName != movedPropertyName)\n return false;\n\n var key = movedProperty[4];\n var toMove = movableTokens[key];\n return toMove && toMove.indexOf(token) > -1;\n }\n\n for (var i = tokens.length - 1; i >= 0; i--) {\n var token = tokens[i];\n var isRule;\n var j, k, m;\n var samePropertyAt;\n\n if (token[0] == Token.RULE) {\n isRule = true;\n } else if (token[0] == Token.NESTED_BLOCK) {\n isRule = false;\n } else {\n continue;\n }\n\n // We cache movedProperties.length as it may change in the loop\n var movedCount = movedProperties.length;\n\n var properties = extractProperties(token);\n movedToBeDropped = [];\n\n var unmovableInCurrentToken = [];\n for (j = properties.length - 1; j >= 0; j--) {\n for (k = j - 1; k >= 0; k--) {\n if (!canReorderSingle(properties[j], properties[k], specificityCache)) {\n unmovableInCurrentToken.push(j);\n break;\n }\n }\n }\n\n for (j = properties.length - 1; j >= 0; j--) {\n var property = properties[j];\n var movedSameProperty = false;\n\n for (k = 0; k < movedCount; k++) {\n var movedProperty = movedProperties[k];\n\n if (movedToBeDropped.indexOf(k) == -1 && (!canReorderSingle(property, movedProperty, specificityCache) && !boundToAnotherPropertyInCurrrentToken(property, movedProperty, token) ||\n movableTokens[movedProperty[4]] && movableTokens[movedProperty[4]].length === mergeLimit)) {\n dropPropertiesAt(i + 1, movedProperty, token);\n\n if (movedToBeDropped.indexOf(k) == -1) {\n movedToBeDropped.push(k);\n delete movableTokens[movedProperty[4]];\n }\n }\n\n if (!movedSameProperty) {\n movedSameProperty = property[0] == movedProperty[0] && property[1] == movedProperty[1];\n\n if (movedSameProperty) {\n samePropertyAt = k;\n }\n }\n }\n\n if (!isRule || unmovableInCurrentToken.indexOf(j) > -1)\n continue;\n\n var key = property[4];\n\n if (movedSameProperty && movedProperties[samePropertyAt][5].length + property[5].length > mergeLimit) {\n dropPropertiesAt(i + 1, movedProperties[samePropertyAt]);\n movedProperties.splice(samePropertyAt, 1);\n movableTokens[key] = [token];\n movedSameProperty = false;\n } else {\n movableTokens[key] = movableTokens[key] || [];\n movableTokens[key].push(token);\n }\n\n if (movedSameProperty) {\n movedProperties[samePropertyAt] = cloneAndMergeSelectors(movedProperties[samePropertyAt], property);\n } else {\n movedProperties.push(property);\n }\n }\n\n movedToBeDropped = movedToBeDropped.sort(naturalSorter);\n for (j = 0, m = movedToBeDropped.length; j < m; j++) {\n var dropAt = movedToBeDropped[j] - j;\n movedProperties.splice(dropAt, 1);\n }\n }\n\n var position = tokens[0] && tokens[0][0] == Token.AT_RULE && tokens[0][1].indexOf('@charset') === 0 ? 1 : 0;\n for (; position < tokens.length - 1; position++) {\n var isImportRule = tokens[position][0] === Token.AT_RULE && tokens[position][1].indexOf('@import') === 0;\n var isComment = tokens[position][0] === Token.COMMENT;\n if (!(isImportRule || isComment))\n break;\n }\n\n for (i = 0; i < movedProperties.length; i++) {\n dropPropertiesAt(position, movedProperties[i]);\n }\n}\n\nmodule.exports = restructure;\n","var MODIFIER_PATTERN = /\\-\\-.+$/;\n\nfunction rulesOverlap(rule1, rule2, bemMode) {\n var scope1;\n var scope2;\n var i, l;\n var j, m;\n\n for (i = 0, l = rule1.length; i < l; i++) {\n scope1 = rule1[i][1];\n\n for (j = 0, m = rule2.length; j < m; j++) {\n scope2 = rule2[j][1];\n\n if (scope1 == scope2) {\n return true;\n }\n\n if (bemMode && withoutModifiers(scope1) == withoutModifiers(scope2)) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nfunction withoutModifiers(scope) {\n return scope.replace(MODIFIER_PATTERN, '');\n}\n\nmodule.exports = rulesOverlap;\n","var specificity = require('./specificity');\n\nfunction specificitiesOverlap(selector1, selector2, cache) {\n var specificity1;\n var specificity2;\n var i, l;\n var j, m;\n\n for (i = 0, l = selector1.length; i < l; i++) {\n specificity1 = findSpecificity(selector1[i][1], cache);\n\n for (j = 0, m = selector2.length; j < m; j++) {\n specificity2 = findSpecificity(selector2[j][1], cache);\n\n if (specificity1[0] === specificity2[0] && specificity1[1] === specificity2[1] && specificity1[2] === specificity2[2]) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nfunction findSpecificity(selector, cache) {\n var value;\n\n if (!(selector in cache)) {\n cache[selector] = value = specificity(selector);\n }\n\n return value || cache[selector];\n}\n\nmodule.exports = specificitiesOverlap;\n","var Marker = require('../../tokenizer/marker');\n\nvar Selector = {\n ADJACENT_SIBLING: '+',\n DESCENDANT: '>',\n DOT: '.',\n HASH: '#',\n NON_ADJACENT_SIBLING: '~',\n PSEUDO: ':'\n};\n\nvar LETTER_PATTERN = /[a-zA-Z]/;\nvar NOT_PREFIX = ':not(';\nvar SEPARATOR_PATTERN = /[\\s,\\(>~\\+]/;\n\nfunction specificity(selector) {\n var result = [0, 0, 0];\n var character;\n var isEscaped;\n var isSingleQuoted;\n var isDoubleQuoted;\n var roundBracketLevel = 0;\n var couldIntroduceNewTypeSelector;\n var withinNotPseudoClass = false;\n var wasPseudoClass = false;\n var i, l;\n\n for (i = 0, l = selector.length; i < l; i++) {\n character = selector[i];\n\n if (isEscaped) {\n // noop\n } else if (character == Marker.SINGLE_QUOTE && !isDoubleQuoted && !isSingleQuoted) {\n isSingleQuoted = true;\n } else if (character == Marker.SINGLE_QUOTE && !isDoubleQuoted && isSingleQuoted) {\n isSingleQuoted = false;\n } else if (character == Marker.DOUBLE_QUOTE && !isDoubleQuoted && !isSingleQuoted) {\n isDoubleQuoted = true;\n } else if (character == Marker.DOUBLE_QUOTE && isDoubleQuoted && !isSingleQuoted) {\n isDoubleQuoted = false;\n } else if (isSingleQuoted || isDoubleQuoted) {\n continue;\n } else if (roundBracketLevel > 0 && !withinNotPseudoClass) {\n // noop\n } else if (character == Marker.OPEN_ROUND_BRACKET) {\n roundBracketLevel++;\n } else if (character == Marker.CLOSE_ROUND_BRACKET && roundBracketLevel == 1) {\n roundBracketLevel--;\n withinNotPseudoClass = false;\n } else if (character == Marker.CLOSE_ROUND_BRACKET) {\n roundBracketLevel--;\n } else if (character == Selector.HASH) {\n result[0]++;\n } else if (character == Selector.DOT || character == Marker.OPEN_SQUARE_BRACKET) {\n result[1]++;\n } else if (character == Selector.PSEUDO && !wasPseudoClass && !isNotPseudoClass(selector, i)) {\n result[1]++;\n withinNotPseudoClass = false;\n } else if (character == Selector.PSEUDO) {\n withinNotPseudoClass = true;\n } else if ((i === 0 || couldIntroduceNewTypeSelector) && LETTER_PATTERN.test(character)) {\n result[2]++;\n }\n\n isEscaped = character == Marker.BACK_SLASH;\n wasPseudoClass = character == Selector.PSEUDO;\n couldIntroduceNewTypeSelector = !isEscaped && SEPARATOR_PATTERN.test(character);\n }\n\n return result;\n}\n\nfunction isNotPseudoClass(selector, index) {\n return selector.indexOf(NOT_PREFIX, index) === index;\n}\n\nmodule.exports = specificity;\n","function ruleSorter(s1, s2) {\n return s1[1] > s2[1] ? 1 : -1;\n}\n\nfunction tidyRuleDuplicates(rules) {\n var list = [];\n var repeated = [];\n\n for (var i = 0, l = rules.length; i < l; i++) {\n var rule = rules[i];\n\n if (repeated.indexOf(rule[1]) == -1) {\n repeated.push(rule[1]);\n list.push(rule);\n }\n }\n\n return list.sort(ruleSorter);\n}\n\nmodule.exports = tidyRuleDuplicates;\n","function removeUnused(properties) {\n for (var i = properties.length - 1; i >= 0; i--) {\n var property = properties[i];\n\n if (property.unused) {\n property.all.splice(property.position, 1);\n }\n }\n}\n\nmodule.exports = removeUnused;\n","var Hack = require('./hack');\n\nvar Marker = require('../tokenizer/marker');\n\nvar ASTERISK_HACK = '*';\nvar BACKSLASH_HACK = '\\\\';\nvar IMPORTANT_TOKEN = '!important';\nvar UNDERSCORE_HACK = '_';\nvar BANG_HACK = '!ie';\n\nfunction restoreFromOptimizing(properties, restoreCallback) {\n var property;\n var restored;\n var current;\n var i;\n\n for (i = properties.length - 1; i >= 0; i--) {\n property = properties[i];\n\n if (property.unused) {\n continue;\n }\n\n if (!property.dirty && !property.important && !property.hack) {\n continue;\n }\n\n if (restoreCallback) {\n restored = restoreCallback(property);\n property.value = restored;\n } else {\n restored = property.value;\n }\n\n if (property.important) {\n restoreImportant(property);\n }\n\n if (property.hack) {\n restoreHack(property);\n }\n\n if ('all' in property) {\n current = property.all[property.position];\n current[1][1] = property.name;\n\n current.splice(2, current.length - 1);\n Array.prototype.push.apply(current, restored);\n }\n }\n}\n\nfunction restoreImportant(property) {\n property.value[property.value.length - 1][1] += IMPORTANT_TOKEN;\n}\n\nfunction restoreHack(property) {\n if (property.hack[0] == Hack.UNDERSCORE) {\n property.name = UNDERSCORE_HACK + property.name;\n } else if (property.hack[0] == Hack.ASTERISK) {\n property.name = ASTERISK_HACK + property.name;\n } else if (property.hack[0] == Hack.BACKSLASH) {\n property.value[property.value.length - 1][1] += BACKSLASH_HACK + property.hack[1];\n } else if (property.hack[0] == Hack.BANG) {\n property.value[property.value.length - 1][1] += Marker.SPACE + BANG_HACK;\n }\n}\n\nmodule.exports = restoreFromOptimizing;\n","var functionNoVendorRegexStr = '[A-Z]+(\\\\-|[A-Z]|[0-9])+\\\\(.*?\\\\)';\nvar functionVendorRegexStr = '\\\\-(\\\\-|[A-Z]|[0-9])+\\\\(.*?\\\\)';\nvar variableRegexStr = 'var\\\\(\\\\-\\\\-[^\\\\)]+\\\\)';\nvar functionAnyRegexStr = '(' + variableRegexStr + '|' + functionNoVendorRegexStr + '|' + functionVendorRegexStr + ')';\n\nvar calcRegex = new RegExp('^(\\\\-moz\\\\-|\\\\-webkit\\\\-)?calc\\\\([^\\\\)]+\\\\)$', 'i');\nvar decimalRegex = /[0-9]/;\nvar functionAnyRegex = new RegExp('^' + functionAnyRegexStr + '$', 'i');\nvar hslColorRegex = /^hsl\\(\\s{0,31}[\\-\\.]?\\d+\\s{0,31},\\s{0,31}\\.?\\d+%\\s{0,31},\\s{0,31}\\.?\\d+%\\s{0,31}\\)|hsla\\(\\s{0,31}[\\-\\.]?\\d+\\s{0,31},\\s{0,31}\\.?\\d+%\\s{0,31},\\s{0,31}\\.?\\d+%\\s{0,31},\\s{0,31}\\.?\\d+\\s{0,31}\\)$/i;\nvar identifierRegex = /^(\\-[a-z0-9_][a-z0-9\\-_]*|[a-z][a-z0-9\\-_]*)$/i;\nvar namedEntityRegex = /^[a-z]+$/i;\nvar prefixRegex = /^-([a-z0-9]|-)*$/i;\nvar rgbColorRegex = /^rgb\\(\\s{0,31}[\\d]{1,3}\\s{0,31},\\s{0,31}[\\d]{1,3}\\s{0,31},\\s{0,31}[\\d]{1,3}\\s{0,31}\\)|rgba\\(\\s{0,31}[\\d]{1,3}\\s{0,31},\\s{0,31}[\\d]{1,3}\\s{0,31},\\s{0,31}[\\d]{1,3}\\s{0,31},\\s{0,31}[\\.\\d]+\\s{0,31}\\)$/i;\nvar timingFunctionRegex = /^(cubic\\-bezier|steps)\\([^\\)]+\\)$/;\nvar validTimeUnits = ['ms', 's'];\nvar urlRegex = /^url\\([\\s\\S]+\\)$/i;\nvar variableRegex = new RegExp('^' + variableRegexStr + '$', 'i');\n\nvar eightValueColorRegex = /^#[0-9a-f]{8}$/i;\nvar fourValueColorRegex = /^#[0-9a-f]{4}$/i;\nvar sixValueColorRegex = /^#[0-9a-f]{6}$/i;\nvar threeValueColorRegex = /^#[0-9a-f]{3}$/i;\n\nvar DECIMAL_DOT = '.';\nvar MINUS_SIGN = '-';\nvar PLUS_SIGN = '+';\n\nvar Keywords = {\n '^': [\n 'inherit',\n 'initial',\n 'unset'\n ],\n '*-style': [\n 'auto',\n 'dashed',\n 'dotted',\n 'double',\n 'groove',\n 'hidden',\n 'inset',\n 'none',\n 'outset',\n 'ridge',\n 'solid'\n ],\n '*-timing-function': [\n 'ease',\n 'ease-in',\n 'ease-in-out',\n 'ease-out',\n 'linear',\n 'step-end',\n 'step-start'\n ],\n 'animation-direction': [\n 'alternate',\n 'alternate-reverse',\n 'normal',\n 'reverse'\n ],\n 'animation-fill-mode': [\n 'backwards',\n 'both',\n 'forwards',\n 'none'\n ],\n 'animation-iteration-count': [\n 'infinite'\n ],\n 'animation-name': [\n 'none'\n ],\n 'animation-play-state': [\n 'paused',\n 'running'\n ],\n 'background-attachment': [\n 'fixed',\n 'inherit',\n 'local',\n 'scroll'\n ],\n 'background-clip': [\n 'border-box',\n 'content-box',\n 'inherit',\n 'padding-box',\n 'text'\n ],\n 'background-origin': [\n 'border-box',\n 'content-box',\n 'inherit',\n 'padding-box'\n ],\n 'background-position': [\n 'bottom',\n 'center',\n 'left',\n 'right',\n 'top'\n ],\n 'background-repeat': [\n 'no-repeat',\n 'inherit',\n 'repeat',\n 'repeat-x',\n 'repeat-y',\n 'round',\n 'space'\n ],\n 'background-size': [\n 'auto',\n 'cover',\n 'contain'\n ],\n 'border-collapse': [\n 'collapse',\n 'inherit',\n 'separate'\n ],\n 'bottom': [\n 'auto'\n ],\n 'clear': [\n 'both',\n 'left',\n 'none',\n 'right'\n ],\n 'color': [\n 'transparent'\n ],\n 'cursor': [\n 'all-scroll',\n 'auto',\n 'col-resize',\n 'crosshair',\n 'default',\n 'e-resize',\n 'help',\n 'move',\n 'n-resize',\n 'ne-resize',\n 'no-drop',\n 'not-allowed',\n 'nw-resize',\n 'pointer',\n 'progress',\n 'row-resize',\n 's-resize',\n 'se-resize',\n 'sw-resize',\n 'text',\n 'vertical-text',\n 'w-resize',\n 'wait'\n ],\n 'display': [\n 'block',\n 'inline',\n 'inline-block',\n 'inline-table',\n 'list-item',\n 'none',\n 'table',\n 'table-caption',\n 'table-cell',\n 'table-column',\n 'table-column-group',\n 'table-footer-group',\n 'table-header-group',\n 'table-row',\n 'table-row-group'\n ],\n 'float': [\n 'left',\n 'none',\n 'right'\n ],\n 'left': [\n 'auto'\n ],\n 'font': [\n 'caption',\n 'icon',\n 'menu',\n 'message-box',\n 'small-caption',\n 'status-bar',\n 'unset'\n ],\n 'font-size': [\n 'large',\n 'larger',\n 'medium',\n 'small',\n 'smaller',\n 'x-large',\n 'x-small',\n 'xx-large',\n 'xx-small'\n ],\n 'font-stretch': [\n 'condensed',\n 'expanded',\n 'extra-condensed',\n 'extra-expanded',\n 'normal',\n 'semi-condensed',\n 'semi-expanded',\n 'ultra-condensed',\n 'ultra-expanded'\n ],\n 'font-style': [\n 'italic',\n 'normal',\n 'oblique'\n ],\n 'font-variant': [\n 'normal',\n 'small-caps'\n ],\n 'font-weight': [\n '100',\n '200',\n '300',\n '400',\n '500',\n '600',\n '700',\n '800',\n '900',\n 'bold',\n 'bolder',\n 'lighter',\n 'normal'\n ],\n 'line-height': [\n 'normal'\n ],\n 'list-style-position': [\n 'inside',\n 'outside'\n ],\n 'list-style-type': [\n 'armenian',\n 'circle',\n 'decimal',\n 'decimal-leading-zero',\n 'disc',\n 'decimal|disc', // this is the default value of list-style-type, see comment in compactable.js\n 'georgian',\n 'lower-alpha',\n 'lower-greek',\n 'lower-latin',\n 'lower-roman',\n 'none',\n 'square',\n 'upper-alpha',\n 'upper-latin',\n 'upper-roman'\n ],\n 'overflow': [\n 'auto',\n 'hidden',\n 'scroll',\n 'visible'\n ],\n 'position': [\n 'absolute',\n 'fixed',\n 'relative',\n 'static'\n ],\n 'right': [\n 'auto'\n ],\n 'text-align': [\n 'center',\n 'justify',\n 'left',\n 'left|right', // this is the default value of list-style-type, see comment in compactable.js\n 'right'\n ],\n 'text-decoration': [\n 'line-through',\n 'none',\n 'overline',\n 'underline'\n ],\n 'text-overflow': [\n 'clip',\n 'ellipsis'\n ],\n 'top': [\n 'auto'\n ],\n 'vertical-align': [\n 'baseline',\n 'bottom',\n 'middle',\n 'sub',\n 'super',\n 'text-bottom',\n 'text-top',\n 'top'\n ],\n 'visibility': [\n 'collapse',\n 'hidden',\n 'visible'\n ],\n 'white-space': [\n 'normal',\n 'nowrap',\n 'pre'\n ],\n 'width': [\n 'inherit',\n 'initial',\n 'medium',\n 'thick',\n 'thin'\n ]\n};\n\nvar Units = [\n '%',\n 'ch',\n 'cm',\n 'em',\n 'ex',\n 'in',\n 'mm',\n 'pc',\n 'pt',\n 'px',\n 'rem',\n 'vh',\n 'vm',\n 'vmax',\n 'vmin',\n 'vw'\n];\n\nfunction isColor(value) {\n return value != 'auto' &&\n (\n isKeyword('color')(value) ||\n isHexColor(value) ||\n isColorFunction(value) ||\n isNamedEntity(value)\n );\n}\n\nfunction isColorFunction(value) {\n return isRgbColor(value) || isHslColor(value);\n}\n\nfunction isDynamicUnit(value) {\n return calcRegex.test(value);\n}\n\nfunction isFunction(value) {\n return functionAnyRegex.test(value);\n}\n\nfunction isHexColor(value) {\n return threeValueColorRegex.test(value) || fourValueColorRegex.test(value) || sixValueColorRegex.test(value) || eightValueColorRegex.test(value);\n}\n\nfunction isHslColor(value) {\n return hslColorRegex.test(value);\n}\n\nfunction isIdentifier(value) {\n return identifierRegex.test(value);\n}\n\nfunction isImage(value) {\n return value == 'none' || value == 'inherit' || isUrl(value);\n}\n\nfunction isKeyword(propertyName) {\n return function(value) {\n return Keywords[propertyName].indexOf(value) > -1;\n };\n}\n\nfunction isNamedEntity(value) {\n return namedEntityRegex.test(value);\n}\n\nfunction isNumber(value) {\n return scanForNumber(value) == value.length;\n}\n\nfunction isRgbColor(value) {\n return rgbColorRegex.test(value);\n}\n\nfunction isPrefixed(value) {\n return prefixRegex.test(value);\n}\n\nfunction isPositiveNumber(value) {\n return isNumber(value) &&\n parseFloat(value) >= 0;\n}\n\nfunction isVariable(value) {\n return variableRegex.test(value);\n}\n\nfunction isTime(value) {\n var numberUpTo = scanForNumber(value);\n\n return numberUpTo == value.length && parseInt(value) === 0 ||\n numberUpTo > -1 && validTimeUnits.indexOf(value.slice(numberUpTo + 1)) > -1;\n}\n\nfunction isTimingFunction() {\n var isTimingFunctionKeyword = isKeyword('*-timing-function');\n\n return function (value) {\n return isTimingFunctionKeyword(value) || timingFunctionRegex.test(value);\n };\n}\n\nfunction isUnit(validUnits, value) {\n var numberUpTo = scanForNumber(value);\n\n return numberUpTo == value.length && parseInt(value) === 0 ||\n numberUpTo > -1 && validUnits.indexOf(value.slice(numberUpTo + 1)) > -1 ||\n value == 'auto' ||\n value == 'inherit';\n}\n\nfunction isUrl(value) {\n return urlRegex.test(value);\n}\n\nfunction isZIndex(value) {\n return value == 'auto' ||\n isNumber(value) ||\n isKeyword('^')(value);\n}\n\nfunction scanForNumber(value) {\n var hasDot = false;\n var hasSign = false;\n var character;\n var i, l;\n\n for (i = 0, l = value.length; i < l; i++) {\n character = value[i];\n\n if (i === 0 && (character == PLUS_SIGN || character == MINUS_SIGN)) {\n hasSign = true;\n } else if (i > 0 && hasSign && (character == PLUS_SIGN || character == MINUS_SIGN)) {\n return i - 1;\n } else if (character == DECIMAL_DOT && !hasDot) {\n hasDot = true;\n } else if (character == DECIMAL_DOT && hasDot) {\n return i - 1;\n } else if (decimalRegex.test(character)) {\n continue;\n } else {\n return i - 1;\n }\n }\n\n return i;\n}\n\nfunction validator(compatibility) {\n var validUnits = Units.slice(0).filter(function (value) {\n return !(value in compatibility.units) || compatibility.units[value] === true;\n });\n\n return {\n colorOpacity: compatibility.colors.opacity,\n isAnimationDirectionKeyword: isKeyword('animation-direction'),\n isAnimationFillModeKeyword: isKeyword('animation-fill-mode'),\n isAnimationIterationCountKeyword: isKeyword('animation-iteration-count'),\n isAnimationNameKeyword: isKeyword('animation-name'),\n isAnimationPlayStateKeyword: isKeyword('animation-play-state'),\n isTimingFunction: isTimingFunction(),\n isBackgroundAttachmentKeyword: isKeyword('background-attachment'),\n isBackgroundClipKeyword: isKeyword('background-clip'),\n isBackgroundOriginKeyword: isKeyword('background-origin'),\n isBackgroundPositionKeyword: isKeyword('background-position'),\n isBackgroundRepeatKeyword: isKeyword('background-repeat'),\n isBackgroundSizeKeyword: isKeyword('background-size'),\n isColor: isColor,\n isColorFunction: isColorFunction,\n isDynamicUnit: isDynamicUnit,\n isFontKeyword: isKeyword('font'),\n isFontSizeKeyword: isKeyword('font-size'),\n isFontStretchKeyword: isKeyword('font-stretch'),\n isFontStyleKeyword: isKeyword('font-style'),\n isFontVariantKeyword: isKeyword('font-variant'),\n isFontWeightKeyword: isKeyword('font-weight'),\n isFunction: isFunction,\n isGlobal: isKeyword('^'),\n isHslColor: isHslColor,\n isIdentifier: isIdentifier,\n isImage: isImage,\n isKeyword: isKeyword,\n isLineHeightKeyword: isKeyword('line-height'),\n isListStylePositionKeyword: isKeyword('list-style-position'),\n isListStyleTypeKeyword: isKeyword('list-style-type'),\n isNumber: isNumber,\n isPrefixed: isPrefixed,\n isPositiveNumber: isPositiveNumber,\n isRgbColor: isRgbColor,\n isStyleKeyword: isKeyword('*-style'),\n isTime: isTime,\n isUnit: isUnit.bind(null, validUnits),\n isUrl: isUrl,\n isVariable: isVariable,\n isWidth: isKeyword('width'),\n isZIndex: isZIndex\n };\n}\n\nmodule.exports = validator;\n","var Hack = require('./hack');\n\nvar Marker = require('../tokenizer/marker');\nvar Token = require('../tokenizer/token');\n\nvar Match = {\n ASTERISK: '*',\n BACKSLASH: '\\\\',\n BANG: '!',\n BANG_SUFFIX_PATTERN: /!\\w+$/,\n IMPORTANT_TOKEN: '!important',\n IMPORTANT_TOKEN_PATTERN: new RegExp('!important$', 'i'),\n IMPORTANT_WORD: 'important',\n IMPORTANT_WORD_PATTERN: new RegExp('important$', 'i'),\n SUFFIX_BANG_PATTERN: /!$/,\n UNDERSCORE: '_',\n VARIABLE_REFERENCE_PATTERN: /var\\(--.+\\)$/\n};\n\nfunction wrapAll(properties, includeVariable, skipProperties) {\n var wrapped = [];\n var single;\n var property;\n var i;\n\n for (i = properties.length - 1; i >= 0; i--) {\n property = properties[i];\n\n if (property[0] != Token.PROPERTY) {\n continue;\n }\n\n if (!includeVariable && someVariableReferences(property)) {\n continue;\n }\n\n if (skipProperties && skipProperties.indexOf(property[1][1]) > -1) {\n continue;\n }\n\n single = wrapSingle(property);\n single.all = properties;\n single.position = i;\n wrapped.unshift(single);\n }\n\n return wrapped;\n}\n\nfunction someVariableReferences(property) {\n var i, l;\n var value;\n\n // skipping `property` and property name tokens\n for (i = 2, l = property.length; i < l; i++) {\n value = property[i];\n\n if (value[0] != Token.PROPERTY_VALUE) {\n continue;\n }\n\n if (isVariableReference(value[1])) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction isVariableReference(value) {\n return Match.VARIABLE_REFERENCE_PATTERN.test(value);\n}\n\nfunction isMultiplex(property) {\n var value;\n var i, l;\n\n for (i = 3, l = property.length; i < l; i++) {\n value = property[i];\n\n if (value[0] == Token.PROPERTY_VALUE && (value[1] == Marker.COMMA || value[1] == Marker.FORWARD_SLASH)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction hackFrom(property) {\n var match = false;\n var name = property[1][1];\n var lastValue = property[property.length - 1];\n\n if (name[0] == Match.UNDERSCORE) {\n match = [Hack.UNDERSCORE];\n } else if (name[0] == Match.ASTERISK) {\n match = [Hack.ASTERISK];\n } else if (lastValue[1][0] == Match.BANG && !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN)) {\n match = [Hack.BANG];\n } else if (lastValue[1].indexOf(Match.BANG) > 0 && !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN) && Match.BANG_SUFFIX_PATTERN.test(lastValue[1])) {\n match = [Hack.BANG];\n } else if (lastValue[1].indexOf(Match.BACKSLASH) > 0 && lastValue[1].indexOf(Match.BACKSLASH) == lastValue[1].length - Match.BACKSLASH.length - 1) {\n match = [Hack.BACKSLASH, lastValue[1].substring(lastValue[1].indexOf(Match.BACKSLASH) + 1)];\n } else if (lastValue[1].indexOf(Match.BACKSLASH) === 0 && lastValue[1].length == 2) {\n match = [Hack.BACKSLASH, lastValue[1].substring(1)];\n }\n\n return match;\n}\n\nfunction isImportant(property) {\n if (property.length < 3)\n return false;\n\n var lastValue = property[property.length - 1];\n if (Match.IMPORTANT_TOKEN_PATTERN.test(lastValue[1])) {\n return true;\n } else if (Match.IMPORTANT_WORD_PATTERN.test(lastValue[1]) && Match.SUFFIX_BANG_PATTERN.test(property[property.length - 2][1])) {\n return true;\n }\n\n return false;\n}\n\nfunction stripImportant(property) {\n var lastValue = property[property.length - 1];\n var oneButLastValue = property[property.length - 2];\n\n if (Match.IMPORTANT_TOKEN_PATTERN.test(lastValue[1])) {\n lastValue[1] = lastValue[1].replace(Match.IMPORTANT_TOKEN_PATTERN, '');\n } else {\n lastValue[1] = lastValue[1].replace(Match.IMPORTANT_WORD_PATTERN, '');\n oneButLastValue[1] = oneButLastValue[1].replace(Match.SUFFIX_BANG_PATTERN, '');\n }\n\n if (lastValue[1].length === 0) {\n property.pop();\n }\n\n if (oneButLastValue[1].length === 0) {\n property.pop();\n }\n}\n\nfunction stripPrefixHack(property) {\n property[1][1] = property[1][1].substring(1);\n}\n\nfunction stripSuffixHack(property, hackFrom) {\n var lastValue = property[property.length - 1];\n lastValue[1] = lastValue[1]\n .substring(0, lastValue[1].indexOf(hackFrom[0] == Hack.BACKSLASH ? Match.BACKSLASH : Match.BANG))\n .trim();\n\n if (lastValue[1].length === 0) {\n property.pop();\n }\n}\n\nfunction wrapSingle(property) {\n var importantProperty = isImportant(property);\n if (importantProperty) {\n stripImportant(property);\n }\n\n var whichHack = hackFrom(property);\n if (whichHack[0] == Hack.ASTERISK || whichHack[0] == Hack.UNDERSCORE) {\n stripPrefixHack(property);\n } else if (whichHack[0] == Hack.BACKSLASH || whichHack[0] == Hack.BANG) {\n stripSuffixHack(property, whichHack);\n }\n\n return {\n block: property[2] && property[2][0] == Token.PROPERTY_BLOCK,\n components: [],\n dirty: false,\n hack: whichHack,\n important: importantProperty,\n name: property[1][1],\n multiplex: property.length > 3 ? isMultiplex(property) : false,\n position: 0,\n shorthand: false,\n unused: false,\n value: property.slice(2)\n };\n}\n\nmodule.exports = {\n all: wrapAll,\n single: wrapSingle\n};\n","var DEFAULTS = {\n '*': {\n colors: {\n opacity: true // rgba / hsla\n },\n properties: {\n backgroundClipMerging: true, // background-clip to shorthand\n backgroundOriginMerging: true, // background-origin to shorthand\n backgroundSizeMerging: true, // background-size to shorthand\n colors: true, // any kind of color transformations, like `#ff00ff` to `#f0f` or `#fff` into `red`\n ieBangHack: false, // !ie suffix hacks on IE<8\n ieFilters: false, // whether to preserve `filter` and `-ms-filter` properties\n iePrefixHack: false, // underscore / asterisk prefix hacks on IE\n ieSuffixHack: false, // \\9 suffix hacks on IE6-9\n merging: true, // merging properties into one\n shorterLengthUnits: false, // optimize pixel units into `pt`, `pc` or `in` units\n spaceAfterClosingBrace: true, // 'url() no-repeat' to 'url()no-repeat'\n urlQuotes: false, // whether to wrap content of `url()` into quotes or not\n zeroUnits: true // 0[unit] -> 0\n },\n selectors: {\n adjacentSpace: false, // div+ nav Android stock browser hack\n ie7Hack: false, // *+html hack\n mergeablePseudoClasses: [\n ':active',\n ':after',\n ':before',\n ':empty',\n ':checked',\n ':disabled',\n ':empty',\n ':enabled',\n ':first-child',\n ':first-letter',\n ':first-line',\n ':first-of-type',\n ':focus',\n ':hover',\n ':lang',\n ':last-child',\n ':last-of-type',\n ':link',\n ':not',\n ':nth-child',\n ':nth-last-child',\n ':nth-last-of-type',\n ':nth-of-type',\n ':only-child',\n ':only-of-type',\n ':root',\n ':target',\n ':visited'\n ], // selectors with these pseudo-classes can be merged as these are universally supported\n mergeablePseudoElements: [\n '::after',\n '::before',\n '::first-letter',\n '::first-line'\n ], // selectors with these pseudo-elements can be merged as these are universally supported\n mergeLimit: 8191, // number of rules that can be safely merged together\n multiplePseudoMerging: true\n },\n units: {\n ch: true,\n in: true,\n pc: true,\n pt: true,\n rem: true,\n vh: true,\n vm: true, // vm is vmin on IE9+ see https://developer.mozilla.org/en-US/docs/Web/CSS/length\n vmax: true,\n vmin: true,\n vw: true\n }\n }\n};\n\nDEFAULTS.ie11 = DEFAULTS['*'];\n\nDEFAULTS.ie10 = DEFAULTS['*'];\n\nDEFAULTS.ie9 = merge(DEFAULTS['*'], {\n properties: {\n ieFilters: true,\n ieSuffixHack: true\n }\n});\n\nDEFAULTS.ie8 = merge(DEFAULTS.ie9, {\n colors: {\n opacity: false\n },\n properties: {\n backgroundClipMerging: false,\n backgroundOriginMerging: false,\n backgroundSizeMerging: false,\n iePrefixHack: true,\n merging: false\n },\n selectors: {\n mergeablePseudoClasses: [\n ':after',\n ':before',\n ':first-child',\n ':first-letter',\n ':focus',\n ':hover',\n ':visited'\n ],\n mergeablePseudoElements: []\n },\n units: {\n ch: false,\n rem: false,\n vh: false,\n vm: false,\n vmax: false,\n vmin: false,\n vw: false\n }\n});\n\nDEFAULTS.ie7 = merge(DEFAULTS.ie8, {\n properties: {\n ieBangHack: true\n },\n selectors: {\n ie7Hack: true,\n mergeablePseudoClasses: [\n ':first-child',\n ':first-letter',\n ':hover',\n ':visited'\n ]\n },\n});\n\nfunction compatibilityFrom(source) {\n return merge(DEFAULTS['*'], calculateSource(source));\n}\n\nfunction merge(source, target) {\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n var value = source[key];\n\n if (Object.prototype.hasOwnProperty.call(target, key) && typeof value === 'object' && !Array.isArray(value)) {\n target[key] = merge(value, target[key] || {});\n } else {\n target[key] = key in target ? target[key] : value;\n }\n }\n }\n\n return target;\n}\n\nfunction calculateSource(source) {\n if (typeof source == 'object')\n return source;\n\n if (!/[,\\+\\-]/.test(source))\n return DEFAULTS[source] || DEFAULTS['*'];\n\n var parts = source.split(',');\n var template = parts[0] in DEFAULTS ?\n DEFAULTS[parts.shift()] :\n DEFAULTS['*'];\n\n source = {};\n\n parts.forEach(function (part) {\n var isAdd = part[0] == '+';\n var key = part.substring(1).split('.');\n var group = key[0];\n var option = key[1];\n\n source[group] = source[group] || {};\n source[group][option] = isAdd;\n });\n\n return merge(template, source);\n}\n\nmodule.exports = compatibilityFrom;\n","var loadRemoteResource = require('../reader/load-remote-resource');\n\nfunction fetchFrom(callback) {\n return callback || loadRemoteResource;\n}\n\nmodule.exports = fetchFrom;\n","var systemLineBreak = require('os').EOL;\n\nvar override = require('../utils/override');\n\nvar Breaks = {\n AfterAtRule: 'afterAtRule',\n AfterBlockBegins: 'afterBlockBegins',\n AfterBlockEnds: 'afterBlockEnds',\n AfterComment: 'afterComment',\n AfterProperty: 'afterProperty',\n AfterRuleBegins: 'afterRuleBegins',\n AfterRuleEnds: 'afterRuleEnds',\n BeforeBlockEnds: 'beforeBlockEnds',\n BetweenSelectors: 'betweenSelectors'\n};\n\nvar BreakWith = {\n CarriageReturnLineFeed: '\\r\\n',\n LineFeed: '\\n',\n System: systemLineBreak\n};\n\nvar IndentWith = {\n Space: ' ',\n Tab: '\\t'\n};\n\nvar Spaces = {\n AroundSelectorRelation: 'aroundSelectorRelation',\n BeforeBlockBegins: 'beforeBlockBegins',\n BeforeValue: 'beforeValue'\n};\n\nvar DEFAULTS = {\n breaks: breaks(false),\n breakWith: BreakWith.System,\n indentBy: 0,\n indentWith: IndentWith.Space,\n spaces: spaces(false),\n wrapAt: false,\n semicolonAfterLastProperty: false\n};\n\nvar BEAUTIFY_ALIAS = 'beautify';\nvar KEEP_BREAKS_ALIAS = 'keep-breaks';\n\nvar OPTION_SEPARATOR = ';';\nvar OPTION_NAME_VALUE_SEPARATOR = ':';\nvar HASH_VALUES_OPTION_SEPARATOR = ',';\nvar HASH_VALUES_NAME_VALUE_SEPARATOR = '=';\n\nvar FALSE_KEYWORD_1 = 'false';\nvar FALSE_KEYWORD_2 = 'off';\nvar TRUE_KEYWORD_1 = 'true';\nvar TRUE_KEYWORD_2 = 'on';\n\nfunction breaks(value) {\n var breakOptions = {};\n\n breakOptions[Breaks.AfterAtRule] = value;\n breakOptions[Breaks.AfterBlockBegins] = value;\n breakOptions[Breaks.AfterBlockEnds] = value;\n breakOptions[Breaks.AfterComment] = value;\n breakOptions[Breaks.AfterProperty] = value;\n breakOptions[Breaks.AfterRuleBegins] = value;\n breakOptions[Breaks.AfterRuleEnds] = value;\n breakOptions[Breaks.BeforeBlockEnds] = value;\n breakOptions[Breaks.BetweenSelectors] = value;\n\n return breakOptions;\n}\n\nfunction spaces(value) {\n var spaceOptions = {};\n\n spaceOptions[Spaces.AroundSelectorRelation] = value;\n spaceOptions[Spaces.BeforeBlockBegins] = value;\n spaceOptions[Spaces.BeforeValue] = value;\n\n return spaceOptions;\n}\n\nfunction formatFrom(source) {\n if (source === undefined || source === false) {\n return false;\n }\n\n if (typeof source == 'object' && 'breakWith' in source) {\n source = override(source, { breakWith: mapBreakWith(source.breakWith) });\n }\n\n if (typeof source == 'object' && 'indentBy' in source) {\n source = override(source, { indentBy: parseInt(source.indentBy) });\n }\n\n if (typeof source == 'object' && 'indentWith' in source) {\n source = override(source, { indentWith: mapIndentWith(source.indentWith) });\n }\n\n if (typeof source == 'object') {\n return override(DEFAULTS, source);\n }\n\n if (typeof source == 'object') {\n return override(DEFAULTS, source);\n }\n\n if (typeof source == 'string' && source == BEAUTIFY_ALIAS) {\n return override(DEFAULTS, {\n breaks: breaks(true),\n indentBy: 2,\n spaces: spaces(true)\n });\n }\n\n if (typeof source == 'string' && source == KEEP_BREAKS_ALIAS) {\n return override(DEFAULTS, {\n breaks: {\n afterAtRule: true,\n afterBlockBegins: true,\n afterBlockEnds: true,\n afterComment: true,\n afterRuleEnds: true,\n beforeBlockEnds: true\n }\n });\n }\n\n if (typeof source == 'string') {\n return override(DEFAULTS, toHash(source));\n }\n\n return DEFAULTS;\n}\n\nfunction toHash(string) {\n return string\n .split(OPTION_SEPARATOR)\n .reduce(function (accumulator, directive) {\n var parts = directive.split(OPTION_NAME_VALUE_SEPARATOR);\n var name = parts[0];\n var value = parts[1];\n\n if (name == 'breaks' || name == 'spaces') {\n accumulator[name] = hashValuesToHash(value);\n } else if (name == 'indentBy' || name == 'wrapAt') {\n accumulator[name] = parseInt(value);\n } else if (name == 'indentWith') {\n accumulator[name] = mapIndentWith(value);\n } else if (name == 'breakWith') {\n accumulator[name] = mapBreakWith(value);\n }\n\n return accumulator;\n }, {});\n}\n\nfunction hashValuesToHash(string) {\n return string\n .split(HASH_VALUES_OPTION_SEPARATOR)\n .reduce(function (accumulator, directive) {\n var parts = directive.split(HASH_VALUES_NAME_VALUE_SEPARATOR);\n var name = parts[0];\n var value = parts[1];\n\n accumulator[name] = normalizeValue(value);\n\n return accumulator;\n }, {});\n}\n\n\nfunction normalizeValue(value) {\n switch (value) {\n case FALSE_KEYWORD_1:\n case FALSE_KEYWORD_2:\n return false;\n case TRUE_KEYWORD_1:\n case TRUE_KEYWORD_2:\n return true;\n default:\n return value;\n }\n}\n\nfunction mapBreakWith(value) {\n switch (value) {\n case 'windows':\n case 'crlf':\n case BreakWith.CarriageReturnLineFeed:\n return BreakWith.CarriageReturnLineFeed;\n case 'unix':\n case 'lf':\n case BreakWith.LineFeed:\n return BreakWith.LineFeed;\n default:\n return systemLineBreak;\n }\n}\n\nfunction mapIndentWith(value) {\n switch (value) {\n case 'space':\n return IndentWith.Space;\n case 'tab':\n return IndentWith.Tab;\n default:\n return value;\n }\n}\n\nmodule.exports = {\n Breaks: Breaks,\n Spaces: Spaces,\n formatFrom: formatFrom\n};\n","var url = require('url');\n\nvar override = require('../utils/override');\n\nfunction inlineRequestFrom(option) {\n return override(\n /* jshint camelcase: false */\n proxyOptionsFrom(process.env.HTTP_PROXY || process.env.http_proxy),\n option || {}\n );\n}\n\nfunction proxyOptionsFrom(httpProxy) {\n return httpProxy ?\n {\n hostname: url.parse(httpProxy).hostname,\n port: parseInt(url.parse(httpProxy).port)\n } :\n {};\n}\n\nmodule.exports = inlineRequestFrom;\n","var DEFAULT_TIMEOUT = 5000;\n\nfunction inlineTimeoutFrom(option) {\n return option || DEFAULT_TIMEOUT;\n}\n\nmodule.exports = inlineTimeoutFrom;\n","function inlineOptionsFrom(rules) {\n if (Array.isArray(rules)) {\n return rules;\n }\n\n if (rules === false) {\n return ['none'];\n }\n\n return undefined === rules ?\n ['local'] :\n rules.split(',');\n}\n\nmodule.exports = inlineOptionsFrom;\n","var roundingPrecisionFrom = require('./rounding-precision').roundingPrecisionFrom;\n\nvar override = require('../utils/override');\n\nvar OptimizationLevel = {\n Zero: '0',\n One: '1',\n Two: '2'\n};\n\nvar DEFAULTS = {};\n\nDEFAULTS[OptimizationLevel.Zero] = {};\nDEFAULTS[OptimizationLevel.One] = {\n cleanupCharsets: true,\n normalizeUrls: true,\n optimizeBackground: true,\n optimizeBorderRadius: true,\n optimizeFilter: true,\n optimizeFontWeight: true,\n optimizeOutline: true,\n removeEmpty: true,\n removeNegativePaddings: true,\n removeQuotes: true,\n removeWhitespace: true,\n replaceMultipleZeros: true,\n replaceTimeUnits: true,\n replaceZeroUnits: true,\n roundingPrecision: roundingPrecisionFrom(undefined),\n selectorsSortingMethod: 'standard',\n specialComments: 'all',\n tidyAtRules: true,\n tidyBlockScopes: true,\n tidySelectors: true,\n transform: noop\n};\nDEFAULTS[OptimizationLevel.Two] = {\n mergeAdjacentRules: true,\n mergeIntoShorthands: true,\n mergeMedia: true,\n mergeNonAdjacentRules: true,\n mergeSemantically: false,\n overrideProperties: true,\n removeEmpty: true,\n reduceNonAdjacentRules: true,\n removeDuplicateFontRules: true,\n removeDuplicateMediaBlocks: true,\n removeDuplicateRules: true,\n removeUnusedAtRules: false,\n restructureRules: false,\n skipProperties: []\n};\n\nvar ALL_KEYWORD_1 = '*';\nvar ALL_KEYWORD_2 = 'all';\nvar FALSE_KEYWORD_1 = 'false';\nvar FALSE_KEYWORD_2 = 'off';\nvar TRUE_KEYWORD_1 = 'true';\nvar TRUE_KEYWORD_2 = 'on';\n\nvar LIST_VALUE_SEPARATOR = ',';\nvar OPTION_SEPARATOR = ';';\nvar OPTION_VALUE_SEPARATOR = ':';\n\nfunction noop() {}\n\nfunction optimizationLevelFrom(source) {\n var level = override(DEFAULTS, {});\n var Zero = OptimizationLevel.Zero;\n var One = OptimizationLevel.One;\n var Two = OptimizationLevel.Two;\n\n\n if (undefined === source) {\n delete level[Two];\n return level;\n }\n\n if (typeof source == 'string') {\n source = parseInt(source);\n }\n\n if (typeof source == 'number' && source === parseInt(Two)) {\n return level;\n }\n\n if (typeof source == 'number' && source === parseInt(One)) {\n delete level[Two];\n return level;\n }\n\n if (typeof source == 'number' && source === parseInt(Zero)) {\n delete level[Two];\n delete level[One];\n return level;\n }\n\n if (typeof source == 'object') {\n source = covertValuesToHashes(source);\n }\n\n if (One in source && 'roundingPrecision' in source[One]) {\n source[One].roundingPrecision = roundingPrecisionFrom(source[One].roundingPrecision);\n }\n\n if (Two in source && 'skipProperties' in source[Two] && typeof(source[Two].skipProperties) == 'string') {\n source[Two].skipProperties = source[Two].skipProperties.split(LIST_VALUE_SEPARATOR);\n }\n\n if (Zero in source || One in source || Two in source) {\n level[Zero] = override(level[Zero], source[Zero]);\n }\n\n if (One in source && ALL_KEYWORD_1 in source[One]) {\n level[One] = override(level[One], defaults(One, normalizeValue(source[One][ALL_KEYWORD_1])));\n delete source[One][ALL_KEYWORD_1];\n }\n\n if (One in source && ALL_KEYWORD_2 in source[One]) {\n level[One] = override(level[One], defaults(One, normalizeValue(source[One][ALL_KEYWORD_2])));\n delete source[One][ALL_KEYWORD_2];\n }\n\n if (One in source || Two in source) {\n level[One] = override(level[One], source[One]);\n } else {\n delete level[One];\n }\n\n if (Two in source && ALL_KEYWORD_1 in source[Two]) {\n level[Two] = override(level[Two], defaults(Two, normalizeValue(source[Two][ALL_KEYWORD_1])));\n delete source[Two][ALL_KEYWORD_1];\n }\n\n if (Two in source && ALL_KEYWORD_2 in source[Two]) {\n level[Two] = override(level[Two], defaults(Two, normalizeValue(source[Two][ALL_KEYWORD_2])));\n delete source[Two][ALL_KEYWORD_2];\n }\n\n if (Two in source) {\n level[Two] = override(level[Two], source[Two]);\n } else {\n delete level[Two];\n }\n\n return level;\n}\n\nfunction defaults(level, value) {\n var options = override(DEFAULTS[level], {});\n var key;\n\n for (key in options) {\n if (typeof options[key] == 'boolean') {\n options[key] = value;\n }\n }\n\n return options;\n}\n\nfunction normalizeValue(value) {\n switch (value) {\n case FALSE_KEYWORD_1:\n case FALSE_KEYWORD_2:\n return false;\n case TRUE_KEYWORD_1:\n case TRUE_KEYWORD_2:\n return true;\n default:\n return value;\n }\n}\n\nfunction covertValuesToHashes(source) {\n var clonedSource = override(source, {});\n var level;\n var i;\n\n for (i = 0; i <= 2; i++) {\n level = '' + i;\n\n if (level in clonedSource && (clonedSource[level] === undefined || clonedSource[level] === false)) {\n delete clonedSource[level];\n }\n\n if (level in clonedSource && clonedSource[level] === true) {\n clonedSource[level] = {};\n }\n\n if (level in clonedSource && typeof clonedSource[level] == 'string') {\n clonedSource[level] = covertToHash(clonedSource[level], level);\n }\n }\n\n return clonedSource;\n}\n\nfunction covertToHash(asString, level) {\n return asString\n .split(OPTION_SEPARATOR)\n .reduce(function (accumulator, directive) {\n var parts = directive.split(OPTION_VALUE_SEPARATOR);\n var name = parts[0];\n var value = parts[1];\n var normalizedValue = normalizeValue(value);\n\n if (ALL_KEYWORD_1 == name || ALL_KEYWORD_2 == name) {\n accumulator = override(accumulator, defaults(level, normalizedValue));\n } else {\n accumulator[name] = normalizedValue;\n }\n\n return accumulator;\n }, {});\n}\n\nmodule.exports = {\n OptimizationLevel: OptimizationLevel,\n optimizationLevelFrom: optimizationLevelFrom,\n};\n","var path = require('path');\n\nfunction rebaseToFrom(option) {\n return option ? path.resolve(option) : process.cwd();\n}\n\nmodule.exports = rebaseToFrom;\n","function rebaseFrom(rebaseOption) {\n return undefined === rebaseOption ? true : !!rebaseOption;\n}\n\nmodule.exports = rebaseFrom;\n","var override = require('../utils/override');\n\nvar INTEGER_PATTERN = /^\\d+$/;\n\nvar ALL_UNITS = ['*', 'all'];\nvar DEFAULT_PRECISION = 'off'; // all precision changes are disabled\nvar DIRECTIVES_SEPARATOR = ','; // e.g. *=5,px=3\nvar DIRECTIVE_VALUE_SEPARATOR = '='; // e.g. *=5\n\nfunction roundingPrecisionFrom(source) {\n return override(defaults(DEFAULT_PRECISION), buildPrecisionFrom(source));\n}\n\nfunction defaults(value) {\n return {\n 'ch': value,\n 'cm': value,\n 'em': value,\n 'ex': value,\n 'in': value,\n 'mm': value,\n 'pc': value,\n 'pt': value,\n 'px': value,\n 'q': value,\n 'rem': value,\n 'vh': value,\n 'vmax': value,\n 'vmin': value,\n 'vw': value,\n '%': value\n };\n}\n\nfunction buildPrecisionFrom(source) {\n if (source === null || source === undefined) {\n return {};\n }\n\n if (typeof source == 'boolean') {\n return {};\n }\n\n if (typeof source == 'number' && source == -1) {\n return defaults(DEFAULT_PRECISION);\n }\n\n if (typeof source == 'number') {\n return defaults(source);\n }\n\n if (typeof source == 'string' && INTEGER_PATTERN.test(source)) {\n return defaults(parseInt(source));\n }\n\n if (typeof source == 'string' && source == DEFAULT_PRECISION) {\n return defaults(DEFAULT_PRECISION);\n }\n\n if (typeof source == 'object') {\n return source;\n }\n\n return source\n .split(DIRECTIVES_SEPARATOR)\n .reduce(function (accumulator, directive) {\n var directiveParts = directive.split(DIRECTIVE_VALUE_SEPARATOR);\n var name = directiveParts[0];\n var value = parseInt(directiveParts[1]);\n\n if (isNaN(value) || value == -1) {\n value = DEFAULT_PRECISION;\n }\n\n if (ALL_UNITS.indexOf(name) > -1) {\n accumulator = override(accumulator, defaults(value));\n } else {\n accumulator[name] = value;\n }\n\n return accumulator;\n }, {});\n}\n\nmodule.exports = {\n DEFAULT: DEFAULT_PRECISION,\n roundingPrecisionFrom: roundingPrecisionFrom\n};\n","var fs = require('fs');\nvar path = require('path');\n\nvar isAllowedResource = require('./is-allowed-resource');\nvar matchDataUri = require('./match-data-uri');\nvar rebaseLocalMap = require('./rebase-local-map');\nvar rebaseRemoteMap = require('./rebase-remote-map');\n\nvar Token = require('../tokenizer/token');\nvar hasProtocol = require('../utils/has-protocol');\nvar isDataUriResource = require('../utils/is-data-uri-resource');\nvar isRemoteResource = require('../utils/is-remote-resource');\n\nvar MAP_MARKER_PATTERN = /^\\/\\*# sourceMappingURL=(\\S+) \\*\\/$/;\n\nfunction applySourceMaps(tokens, context, callback) {\n var applyContext = {\n callback: callback,\n fetch: context.options.fetch,\n index: 0,\n inline: context.options.inline,\n inlineRequest: context.options.inlineRequest,\n inlineTimeout: context.options.inlineTimeout,\n inputSourceMapTracker: context.inputSourceMapTracker,\n localOnly: context.localOnly,\n processedTokens: [],\n rebaseTo: context.options.rebaseTo,\n sourceTokens: tokens,\n warnings: context.warnings\n };\n\n return context.options.sourceMap && tokens.length > 0 ?\n doApplySourceMaps(applyContext) :\n callback(tokens);\n}\n\nfunction doApplySourceMaps(applyContext) {\n var singleSourceTokens = [];\n var lastSource = findTokenSource(applyContext.sourceTokens[0]);\n var source;\n var token;\n var l;\n\n for (l = applyContext.sourceTokens.length; applyContext.index < l; applyContext.index++) {\n token = applyContext.sourceTokens[applyContext.index];\n source = findTokenSource(token);\n\n if (source != lastSource) {\n singleSourceTokens = [];\n lastSource = source;\n }\n\n singleSourceTokens.push(token);\n applyContext.processedTokens.push(token);\n\n if (token[0] == Token.COMMENT && MAP_MARKER_PATTERN.test(token[1])) {\n return fetchAndApplySourceMap(token[1], source, singleSourceTokens, applyContext);\n }\n }\n\n return applyContext.callback(applyContext.processedTokens);\n}\n\nfunction findTokenSource(token) {\n var scope;\n var metadata;\n\n if (token[0] == Token.AT_RULE || token[0] == Token.COMMENT) {\n metadata = token[2][0];\n } else {\n scope = token[1][0];\n metadata = scope[2][0];\n }\n\n return metadata[2];\n}\n\nfunction fetchAndApplySourceMap(sourceMapComment, source, singleSourceTokens, applyContext) {\n return extractInputSourceMapFrom(sourceMapComment, applyContext, function (inputSourceMap) {\n if (inputSourceMap) {\n applyContext.inputSourceMapTracker.track(source, inputSourceMap);\n applySourceMapRecursively(singleSourceTokens, applyContext.inputSourceMapTracker);\n }\n\n applyContext.index++;\n return doApplySourceMaps(applyContext);\n });\n}\n\nfunction extractInputSourceMapFrom(sourceMapComment, applyContext, whenSourceMapReady) {\n var uri = MAP_MARKER_PATTERN.exec(sourceMapComment)[1];\n var absoluteUri;\n var sourceMap;\n var rebasedMap;\n\n if (isDataUriResource(uri)) {\n sourceMap = extractInputSourceMapFromDataUri(uri);\n return whenSourceMapReady(sourceMap);\n } else if (isRemoteResource(uri)) {\n return loadInputSourceMapFromRemoteUri(uri, applyContext, function (sourceMap) {\n var parsedMap;\n\n if (sourceMap) {\n parsedMap = JSON.parse(sourceMap);\n rebasedMap = rebaseRemoteMap(parsedMap, uri);\n whenSourceMapReady(rebasedMap);\n } else {\n whenSourceMapReady(null);\n }\n });\n } else {\n // at this point `uri` is already rebased, see lib/reader/rebase.js#rebaseSourceMapComment\n // it is rebased to be consistent with rebasing other URIs\n // however here we need to resolve it back to read it from disk\n absoluteUri = path.resolve(applyContext.rebaseTo, uri);\n sourceMap = loadInputSourceMapFromLocalUri(absoluteUri, applyContext);\n\n if (sourceMap) {\n rebasedMap = rebaseLocalMap(sourceMap, absoluteUri, applyContext.rebaseTo);\n return whenSourceMapReady(rebasedMap);\n } else {\n return whenSourceMapReady(null);\n }\n }\n}\n\nfunction extractInputSourceMapFromDataUri(uri) {\n var dataUriMatch = matchDataUri(uri);\n var charset = dataUriMatch[2] ? dataUriMatch[2].split(/[=;]/)[2] : 'us-ascii';\n var encoding = dataUriMatch[3] ? dataUriMatch[3].split(';')[1] : 'utf8';\n var data = encoding == 'utf8' ? global.unescape(dataUriMatch[4]) : dataUriMatch[4];\n\n var buffer = new Buffer(data, encoding);\n buffer.charset = charset;\n\n return JSON.parse(buffer.toString());\n}\n\nfunction loadInputSourceMapFromRemoteUri(uri, applyContext, whenLoaded) {\n var isAllowed = isAllowedResource(uri, true, applyContext.inline);\n var isRuntimeResource = !hasProtocol(uri);\n\n if (applyContext.localOnly) {\n applyContext.warnings.push('Cannot fetch remote resource from \"' + uri + '\" as no callback given.');\n return whenLoaded(null);\n } else if (isRuntimeResource) {\n applyContext.warnings.push('Cannot fetch \"' + uri + '\" as no protocol given.');\n return whenLoaded(null);\n } else if (!isAllowed) {\n applyContext.warnings.push('Cannot fetch \"' + uri + '\" as resource is not allowed.');\n return whenLoaded(null);\n }\n\n applyContext.fetch(uri, applyContext.inlineRequest, applyContext.inlineTimeout, function (error, body) {\n if (error) {\n applyContext.warnings.push('Missing source map at \"' + uri + '\" - ' + error);\n return whenLoaded(null);\n }\n\n whenLoaded(body);\n });\n}\n\nfunction loadInputSourceMapFromLocalUri(uri, applyContext) {\n var isAllowed = isAllowedResource(uri, false, applyContext.inline);\n var sourceMap;\n\n if (!fs.existsSync(uri) || !fs.statSync(uri).isFile()) {\n applyContext.warnings.push('Ignoring local source map at \"' + uri + '\" as resource is missing.');\n return null;\n } else if (!isAllowed) {\n applyContext.warnings.push('Cannot fetch \"' + uri + '\" as resource is not allowed.');\n return null;\n }\n\n sourceMap = fs.readFileSync(uri, 'utf-8');\n return JSON.parse(sourceMap);\n}\n\nfunction applySourceMapRecursively(tokens, inputSourceMapTracker) {\n var token;\n var i, l;\n\n for (i = 0, l = tokens.length; i < l; i++) {\n token = tokens[i];\n\n switch (token[0]) {\n case Token.AT_RULE:\n applySourceMapTo(token, inputSourceMapTracker);\n break;\n case Token.AT_RULE_BLOCK:\n applySourceMapRecursively(token[1], inputSourceMapTracker);\n applySourceMapRecursively(token[2], inputSourceMapTracker);\n break;\n case Token.AT_RULE_BLOCK_SCOPE:\n applySourceMapTo(token, inputSourceMapTracker);\n break;\n case Token.NESTED_BLOCK:\n applySourceMapRecursively(token[1], inputSourceMapTracker);\n applySourceMapRecursively(token[2], inputSourceMapTracker);\n break;\n case Token.NESTED_BLOCK_SCOPE:\n applySourceMapTo(token, inputSourceMapTracker);\n break;\n case Token.COMMENT:\n applySourceMapTo(token, inputSourceMapTracker);\n break;\n case Token.PROPERTY:\n applySourceMapRecursively(token, inputSourceMapTracker);\n break;\n case Token.PROPERTY_BLOCK:\n applySourceMapRecursively(token[1], inputSourceMapTracker);\n break;\n case Token.PROPERTY_NAME:\n applySourceMapTo(token, inputSourceMapTracker);\n break;\n case Token.PROPERTY_VALUE:\n applySourceMapTo(token, inputSourceMapTracker);\n break;\n case Token.RULE:\n applySourceMapRecursively(token[1], inputSourceMapTracker);\n applySourceMapRecursively(token[2], inputSourceMapTracker);\n break;\n case Token.RULE_SCOPE:\n applySourceMapTo(token, inputSourceMapTracker);\n }\n }\n\n return tokens;\n}\n\nfunction applySourceMapTo(token, inputSourceMapTracker) {\n var value = token[1];\n var metadata = token[2];\n var newMetadata = [];\n var i, l;\n\n for (i = 0, l = metadata.length; i < l; i++) {\n newMetadata.push(inputSourceMapTracker.originalPositionFor(metadata[i], value.length));\n }\n\n token[2] = newMetadata;\n}\n\nmodule.exports = applySourceMaps;\n","var split = require('../utils/split');\n\nvar BRACE_PREFIX = /^\\(/;\nvar BRACE_SUFFIX = /\\)$/;\nvar IMPORT_PREFIX_PATTERN = /^@import/i;\nvar QUOTE_PREFIX_PATTERN = /['\"]\\s*/;\nvar QUOTE_SUFFIX_PATTERN = /\\s*['\"]/;\nvar URL_PREFIX_PATTERN = /^url\\(\\s*/i;\nvar URL_SUFFIX_PATTERN = /\\s*\\)/i;\n\nfunction extractImportUrlAndMedia(atRuleValue) {\n var uri;\n var mediaQuery;\n var stripped;\n var parts;\n\n stripped = atRuleValue\n .replace(IMPORT_PREFIX_PATTERN, '')\n .trim()\n .replace(URL_PREFIX_PATTERN, '(')\n .replace(URL_SUFFIX_PATTERN, ')')\n .replace(QUOTE_PREFIX_PATTERN, '')\n .replace(QUOTE_SUFFIX_PATTERN, '');\n\n parts = split(stripped, ' ');\n\n uri = parts[0]\n .replace(BRACE_PREFIX, '')\n .replace(BRACE_SUFFIX, '');\n mediaQuery = parts.slice(1).join(' ');\n\n return [uri, mediaQuery];\n}\n\nmodule.exports = extractImportUrlAndMedia;\n","var SourceMapConsumer = require('source-map').SourceMapConsumer;\n\nfunction inputSourceMapTracker() {\n var maps = {};\n\n return {\n all: all.bind(null, maps),\n isTracking: isTracking.bind(null, maps),\n originalPositionFor: originalPositionFor.bind(null, maps),\n track: track.bind(null, maps)\n };\n}\n\nfunction all(maps) {\n return maps;\n}\n\nfunction isTracking(maps, source) {\n return source in maps;\n}\n\nfunction originalPositionFor(maps, metadata, range, selectorFallbacks) {\n var line = metadata[0];\n var column = metadata[1];\n var source = metadata[2];\n var position = {\n line: line,\n column: column + range\n };\n var originalPosition;\n\n while (!originalPosition && position.column > column) {\n position.column--;\n originalPosition = maps[source].originalPositionFor(position);\n }\n\n if (!originalPosition || originalPosition.column < 0) {\n return metadata;\n }\n\n if (originalPosition.line === null && line > 1 && selectorFallbacks > 0) {\n return originalPositionFor(maps, [line - 1, column, source], range, selectorFallbacks - 1);\n }\n\n return originalPosition.line !== null ?\n toMetadata(originalPosition) :\n metadata;\n}\n\nfunction toMetadata(asHash) {\n return [asHash.line, asHash.column, asHash.source];\n}\n\nfunction track(maps, source, data) {\n maps[source] = new SourceMapConsumer(data);\n}\n\nmodule.exports = inputSourceMapTracker;\n","var path = require('path');\nvar url = require('url');\n\nvar isRemoteResource = require('../utils/is-remote-resource');\nvar hasProtocol = require('../utils/has-protocol');\n\nvar HTTP_PROTOCOL = 'http:';\n\nfunction isAllowedResource(uri, isRemote, rules) {\n var match;\n var absoluteUri;\n var allowed = isRemote ? false : true;\n var rule;\n var isNegated;\n var normalizedRule;\n var i;\n\n if (rules.length === 0) {\n return false;\n }\n\n if (isRemote && !hasProtocol(uri)) {\n uri = HTTP_PROTOCOL + uri;\n }\n\n match = isRemote ?\n url.parse(uri).host :\n uri;\n\n absoluteUri = isRemote ?\n uri :\n path.resolve(uri);\n\n for (i = 0; i < rules.length; i++) {\n rule = rules[i];\n isNegated = rule[0] == '!';\n normalizedRule = rule.substring(1);\n\n if (isNegated && isRemote && isRemoteRule(normalizedRule)) {\n allowed = allowed && !isAllowedResource(uri, true, [normalizedRule]);\n } else if (isNegated && !isRemote && !isRemoteRule(normalizedRule)) {\n allowed = allowed && !isAllowedResource(uri, false, [normalizedRule]);\n } else if (isNegated) {\n allowed = allowed && true;\n } else if (rule == 'all') {\n allowed = true;\n } else if (isRemote && rule == 'local') {\n allowed = allowed || false;\n } else if (isRemote && rule == 'remote') {\n allowed = true;\n } else if (!isRemote && rule == 'remote') {\n allowed = false;\n } else if (!isRemote && rule == 'local') {\n allowed = true;\n } else if (rule === match) {\n allowed = true;\n } else if (rule === uri) {\n allowed = true;\n } else if (isRemote && absoluteUri.indexOf(rule) === 0) {\n allowed = true;\n } else if (!isRemote && absoluteUri.indexOf(path.resolve(rule)) === 0) {\n allowed = true;\n } else if (isRemote != isRemoteRule(normalizedRule)) {\n allowed = allowed && true;\n } else {\n allowed = false;\n }\n }\n\n return allowed;\n}\n\nfunction isRemoteRule(rule) {\n return isRemoteResource(rule) || url.parse(HTTP_PROTOCOL + '//' + rule).host == rule;\n}\n\nmodule.exports = isAllowedResource;\n","var fs = require('fs');\nvar path = require('path');\n\nvar isAllowedResource = require('./is-allowed-resource');\n\nvar hasProtocol = require('../utils/has-protocol');\nvar isRemoteResource = require('../utils/is-remote-resource');\n\nfunction loadOriginalSources(context, callback) {\n var loadContext = {\n callback: callback,\n fetch: context.options.fetch,\n index: 0,\n inline: context.options.inline,\n inlineRequest: context.options.inlineRequest,\n inlineTimeout: context.options.inlineTimeout,\n localOnly: context.localOnly,\n rebaseTo: context.options.rebaseTo,\n sourcesContent: context.sourcesContent,\n uriToSource: uriToSourceMapping(context.inputSourceMapTracker.all()),\n warnings: context.warnings\n };\n\n return context.options.sourceMap && context.options.sourceMapInlineSources ?\n doLoadOriginalSources(loadContext) :\n callback();\n}\n\nfunction uriToSourceMapping(allSourceMapConsumers) {\n var mapping = {};\n var consumer;\n var uri;\n var source;\n var i, l;\n\n for (source in allSourceMapConsumers) {\n consumer = allSourceMapConsumers[source];\n\n for (i = 0, l = consumer.sources.length; i < l; i++) {\n uri = consumer.sources[i];\n source = consumer.sourceContentFor(uri, true);\n\n mapping[uri] = source;\n }\n }\n\n return mapping;\n}\n\nfunction doLoadOriginalSources(loadContext) {\n var uris = Object.keys(loadContext.uriToSource);\n var uri;\n var source;\n var total;\n\n for (total = uris.length; loadContext.index < total; loadContext.index++) {\n uri = uris[loadContext.index];\n source = loadContext.uriToSource[uri];\n\n if (source) {\n loadContext.sourcesContent[uri] = source;\n } else {\n return loadOriginalSource(uri, loadContext);\n }\n }\n\n return loadContext.callback();\n}\n\nfunction loadOriginalSource(uri, loadContext) {\n var content;\n\n if (isRemoteResource(uri)) {\n return loadOriginalSourceFromRemoteUri(uri, loadContext, function (content) {\n loadContext.index++;\n loadContext.sourcesContent[uri] = content;\n return doLoadOriginalSources(loadContext);\n });\n } else {\n content = loadOriginalSourceFromLocalUri(uri, loadContext);\n loadContext.index++;\n loadContext.sourcesContent[uri] = content;\n return doLoadOriginalSources(loadContext);\n }\n}\n\nfunction loadOriginalSourceFromRemoteUri(uri, loadContext, whenLoaded) {\n var isAllowed = isAllowedResource(uri, true, loadContext.inline);\n var isRuntimeResource = !hasProtocol(uri);\n\n if (loadContext.localOnly) {\n loadContext.warnings.push('Cannot fetch remote resource from \"' + uri + '\" as no callback given.');\n return whenLoaded(null);\n } else if (isRuntimeResource) {\n loadContext.warnings.push('Cannot fetch \"' + uri + '\" as no protocol given.');\n return whenLoaded(null);\n } else if (!isAllowed) {\n loadContext.warnings.push('Cannot fetch \"' + uri + '\" as resource is not allowed.');\n return whenLoaded(null);\n }\n\n loadContext.fetch(uri, loadContext.inlineRequest, loadContext.inlineTimeout, function (error, content) {\n if (error) {\n loadContext.warnings.push('Missing original source at \"' + uri + '\" - ' + error);\n }\n\n whenLoaded(content);\n });\n}\n\nfunction loadOriginalSourceFromLocalUri(relativeUri, loadContext) {\n var isAllowed = isAllowedResource(relativeUri, false, loadContext.inline);\n var absoluteUri = path.resolve(loadContext.rebaseTo, relativeUri);\n\n if (!fs.existsSync(absoluteUri) || !fs.statSync(absoluteUri).isFile()) {\n loadContext.warnings.push('Ignoring local source map at \"' + absoluteUri + '\" as resource is missing.');\n return null;\n } else if (!isAllowed) {\n loadContext.warnings.push('Cannot fetch \"' + absoluteUri + '\" as resource is not allowed.');\n return null;\n }\n\n return fs.readFileSync(absoluteUri, 'utf8');\n}\n\nmodule.exports = loadOriginalSources;\n","var http = require('http');\nvar https = require('https');\nvar url = require('url');\n\nvar isHttpResource = require('../utils/is-http-resource');\nvar isHttpsResource = require('../utils/is-https-resource');\nvar override = require('../utils/override');\n\nvar HTTP_PROTOCOL = 'http:';\n\nfunction loadRemoteResource(uri, inlineRequest, inlineTimeout, callback) {\n var proxyProtocol = inlineRequest.protocol || inlineRequest.hostname;\n var errorHandled = false;\n var requestOptions;\n var fetch;\n\n requestOptions = override(\n url.parse(uri),\n inlineRequest || {}\n );\n\n if (inlineRequest.hostname !== undefined) {\n // overwrite as we always expect a http proxy currently\n requestOptions.protocol = inlineRequest.protocol || HTTP_PROTOCOL;\n requestOptions.path = requestOptions.href;\n }\n\n fetch = (proxyProtocol && !isHttpsResource(proxyProtocol)) || isHttpResource(uri) ?\n http.get :\n https.get;\n\n fetch(requestOptions, function (res) {\n var chunks = [];\n var movedUri;\n\n if (errorHandled) {\n return;\n }\n\n if (res.statusCode < 200 || res.statusCode > 399) {\n return callback(res.statusCode, null);\n } else if (res.statusCode > 299) {\n movedUri = url.resolve(uri, res.headers.location);\n return loadRemoteResource(movedUri, inlineRequest, inlineTimeout, callback);\n }\n\n res.on('data', function (chunk) {\n chunks.push(chunk.toString());\n });\n res.on('end', function () {\n var body = chunks.join('');\n callback(null, body);\n });\n })\n .on('error', function (res) {\n if (errorHandled) {\n return;\n }\n\n errorHandled = true;\n callback(res.message, null);\n })\n .on('timeout', function () {\n if (errorHandled) {\n return;\n }\n\n errorHandled = true;\n callback('timeout', null);\n })\n .setTimeout(inlineTimeout);\n}\n\nmodule.exports = loadRemoteResource;\n","var DATA_URI_PATTERN = /^data:(\\S*?)?(;charset=[^;]+)?(;[^,]+?)?,(.+)/;\n\nfunction matchDataUri(uri) {\n return DATA_URI_PATTERN.exec(uri);\n}\n\nmodule.exports = matchDataUri;\n","var UNIX_SEPARATOR = '/';\nvar WINDOWS_SEPARATOR_PATTERN = /\\\\/g;\n\nfunction normalizePath(path) {\n return path.replace(WINDOWS_SEPARATOR_PATTERN, UNIX_SEPARATOR);\n}\n\nmodule.exports = normalizePath;\n","var fs = require('fs');\nvar path = require('path');\n\nvar applySourceMaps = require('./apply-source-maps');\nvar extractImportUrlAndMedia = require('./extract-import-url-and-media');\nvar isAllowedResource = require('./is-allowed-resource');\nvar loadOriginalSources = require('./load-original-sources');\nvar normalizePath = require('./normalize-path');\nvar rebase = require('./rebase');\nvar rebaseLocalMap = require('./rebase-local-map');\nvar rebaseRemoteMap = require('./rebase-remote-map');\nvar restoreImport = require('./restore-import');\n\nvar tokenize = require('../tokenizer/tokenize');\nvar Token = require('../tokenizer/token');\nvar Marker = require('../tokenizer/marker');\nvar hasProtocol = require('../utils/has-protocol');\nvar isImport = require('../utils/is-import');\nvar isRemoteResource = require('../utils/is-remote-resource');\n\nvar UNKNOWN_URI = 'uri:unknown';\n\nfunction readSources(input, context, callback) {\n return doReadSources(input, context, function (tokens) {\n return applySourceMaps(tokens, context, function () {\n return loadOriginalSources(context, function () { return callback(tokens); });\n });\n });\n}\n\nfunction doReadSources(input, context, callback) {\n if (typeof input == 'string') {\n return fromString(input, context, callback);\n } else if (Buffer.isBuffer(input)) {\n return fromString(input.toString(), context, callback);\n } else if (Array.isArray(input)) {\n return fromArray(input, context, callback);\n } else if (typeof input == 'object') {\n return fromHash(input, context, callback);\n }\n}\n\nfunction fromString(input, context, callback) {\n context.source = undefined;\n context.sourcesContent[undefined] = input;\n context.stats.originalSize += input.length;\n\n return fromStyles(input, context, { inline: context.options.inline }, callback);\n}\n\nfunction fromArray(input, context, callback) {\n var inputAsImports = input.reduce(function (accumulator, uriOrHash) {\n if (typeof uriOrHash === 'string') {\n return addStringSource(uriOrHash, accumulator);\n } else {\n return addHashSource(uriOrHash, context, accumulator);\n }\n\n }, []);\n\n return fromStyles(inputAsImports.join(''), context, { inline: ['all'] }, callback);\n}\n\nfunction fromHash(input, context, callback) {\n var inputAsImports = addHashSource(input, context, []);\n return fromStyles(inputAsImports.join(''), context, { inline: ['all'] }, callback);\n}\n\nfunction addStringSource(input, imports) {\n imports.push(restoreAsImport(normalizeUri(input)));\n return imports;\n}\n\nfunction addHashSource(input, context, imports) {\n var uri;\n var normalizedUri;\n var source;\n\n for (uri in input) {\n source = input[uri];\n normalizedUri = normalizeUri(uri);\n\n imports.push(restoreAsImport(normalizedUri));\n\n context.sourcesContent[normalizedUri] = source.styles;\n\n if (source.sourceMap) {\n trackSourceMap(source.sourceMap, normalizedUri, context);\n }\n }\n\n return imports;\n}\n\nfunction normalizeUri(uri) {\n var currentPath = path.resolve('');\n var absoluteUri;\n var relativeToCurrentPath;\n var normalizedUri;\n\n if (isRemoteResource(uri)) {\n return uri;\n }\n\n absoluteUri = path.isAbsolute(uri) ?\n uri :\n path.resolve(uri);\n relativeToCurrentPath = path.relative(currentPath, absoluteUri);\n normalizedUri = normalizePath(relativeToCurrentPath);\n\n return normalizedUri;\n}\n\nfunction trackSourceMap(sourceMap, uri, context) {\n var parsedMap = typeof sourceMap == 'string' ?\n JSON.parse(sourceMap) :\n sourceMap;\n var rebasedMap = isRemoteResource(uri) ?\n rebaseRemoteMap(parsedMap, uri) :\n rebaseLocalMap(parsedMap, uri || UNKNOWN_URI, context.options.rebaseTo);\n\n context.inputSourceMapTracker.track(uri, rebasedMap);\n}\n\nfunction restoreAsImport(uri) {\n return restoreImport('url(' + uri + ')', '') + Marker.SEMICOLON;\n}\n\nfunction fromStyles(styles, context, parentInlinerContext, callback) {\n var tokens;\n var rebaseConfig = {};\n\n if (!context.source) {\n rebaseConfig.fromBase = path.resolve('');\n rebaseConfig.toBase = context.options.rebaseTo;\n } else if (isRemoteResource(context.source)) {\n rebaseConfig.fromBase = context.source;\n rebaseConfig.toBase = context.source;\n } else if (path.isAbsolute(context.source)) {\n rebaseConfig.fromBase = path.dirname(context.source);\n rebaseConfig.toBase = context.options.rebaseTo;\n } else {\n rebaseConfig.fromBase = path.dirname(path.resolve(context.source));\n rebaseConfig.toBase = context.options.rebaseTo;\n }\n\n tokens = tokenize(styles, context);\n tokens = rebase(tokens, context.options.rebase, context.validator, rebaseConfig);\n\n return allowsAnyImports(parentInlinerContext.inline) ?\n inline(tokens, context, parentInlinerContext, callback) :\n callback(tokens);\n}\n\nfunction allowsAnyImports(inline) {\n return !(inline.length == 1 && inline[0] == 'none');\n}\n\nfunction inline(tokens, externalContext, parentInlinerContext, callback) {\n var inlinerContext = {\n afterContent: false,\n callback: callback,\n errors: externalContext.errors,\n externalContext: externalContext,\n fetch: externalContext.options.fetch,\n inlinedStylesheets: parentInlinerContext.inlinedStylesheets || externalContext.inlinedStylesheets,\n inline: parentInlinerContext.inline,\n inlineRequest: externalContext.options.inlineRequest,\n inlineTimeout: externalContext.options.inlineTimeout,\n isRemote: parentInlinerContext.isRemote || false,\n localOnly: externalContext.localOnly,\n outputTokens: [],\n rebaseTo: externalContext.options.rebaseTo,\n sourceTokens: tokens,\n warnings: externalContext.warnings\n };\n\n return doInlineImports(inlinerContext);\n}\n\nfunction doInlineImports(inlinerContext) {\n var token;\n var i, l;\n\n for (i = 0, l = inlinerContext.sourceTokens.length; i < l; i++) {\n token = inlinerContext.sourceTokens[i];\n\n if (token[0] == Token.AT_RULE && isImport(token[1])) {\n inlinerContext.sourceTokens.splice(0, i);\n return inlineStylesheet(token, inlinerContext);\n } else if (token[0] == Token.AT_RULE || token[0] == Token.COMMENT) {\n inlinerContext.outputTokens.push(token);\n } else {\n inlinerContext.outputTokens.push(token);\n inlinerContext.afterContent = true;\n }\n }\n\n inlinerContext.sourceTokens = [];\n return inlinerContext.callback(inlinerContext.outputTokens);\n}\n\nfunction inlineStylesheet(token, inlinerContext) {\n var uriAndMediaQuery = extractImportUrlAndMedia(token[1]);\n var uri = uriAndMediaQuery[0];\n var mediaQuery = uriAndMediaQuery[1];\n var metadata = token[2];\n\n return isRemoteResource(uri) ?\n inlineRemoteStylesheet(uri, mediaQuery, metadata, inlinerContext) :\n inlineLocalStylesheet(uri, mediaQuery, metadata, inlinerContext);\n}\n\nfunction inlineRemoteStylesheet(uri, mediaQuery, metadata, inlinerContext) {\n var isAllowed = isAllowedResource(uri, true, inlinerContext.inline);\n var originalUri = uri;\n var isLoaded = uri in inlinerContext.externalContext.sourcesContent;\n var isRuntimeResource = !hasProtocol(uri);\n\n if (inlinerContext.inlinedStylesheets.indexOf(uri) > -1) {\n inlinerContext.warnings.push('Ignoring remote @import of \"' + uri + '\" as it has already been imported.');\n inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);\n return doInlineImports(inlinerContext);\n } else if (inlinerContext.localOnly && inlinerContext.afterContent) {\n inlinerContext.warnings.push('Ignoring remote @import of \"' + uri + '\" as no callback given and after other content.');\n inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);\n return doInlineImports(inlinerContext);\n } else if (isRuntimeResource) {\n inlinerContext.warnings.push('Skipping remote @import of \"' + uri + '\" as no protocol given.');\n inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));\n inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);\n return doInlineImports(inlinerContext);\n } else if (inlinerContext.localOnly && !isLoaded) {\n inlinerContext.warnings.push('Skipping remote @import of \"' + uri + '\" as no callback given.');\n inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));\n inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);\n return doInlineImports(inlinerContext);\n } else if (!isAllowed && inlinerContext.afterContent) {\n inlinerContext.warnings.push('Ignoring remote @import of \"' + uri + '\" as resource is not allowed and after other content.');\n inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);\n return doInlineImports(inlinerContext);\n } else if (!isAllowed) {\n inlinerContext.warnings.push('Skipping remote @import of \"' + uri + '\" as resource is not allowed.');\n inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));\n inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);\n return doInlineImports(inlinerContext);\n }\n\n inlinerContext.inlinedStylesheets.push(uri);\n\n function whenLoaded(error, importedStyles) {\n if (error) {\n inlinerContext.errors.push('Broken @import declaration of \"' + uri + '\" - ' + error);\n\n return process.nextTick(function () {\n inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));\n inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);\n doInlineImports(inlinerContext);\n });\n }\n\n inlinerContext.inline = inlinerContext.externalContext.options.inline;\n inlinerContext.isRemote = true;\n\n inlinerContext.externalContext.source = originalUri;\n inlinerContext.externalContext.sourcesContent[uri] = importedStyles;\n inlinerContext.externalContext.stats.originalSize += importedStyles.length;\n\n return fromStyles(importedStyles, inlinerContext.externalContext, inlinerContext, function (importedTokens) {\n importedTokens = wrapInMedia(importedTokens, mediaQuery, metadata);\n\n inlinerContext.outputTokens = inlinerContext.outputTokens.concat(importedTokens);\n inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);\n\n return doInlineImports(inlinerContext);\n });\n }\n\n return isLoaded ?\n whenLoaded(null, inlinerContext.externalContext.sourcesContent[uri]) :\n inlinerContext.fetch(uri, inlinerContext.inlineRequest, inlinerContext.inlineTimeout, whenLoaded);\n}\n\nfunction inlineLocalStylesheet(uri, mediaQuery, metadata, inlinerContext) {\n var currentPath = path.resolve('');\n var absoluteUri = path.isAbsolute(uri) ?\n path.resolve(currentPath, uri[0] == '/' ? uri.substring(1) : uri) :\n path.resolve(inlinerContext.rebaseTo, uri);\n var relativeToCurrentPath = path.relative(currentPath, absoluteUri);\n var importedStyles;\n var isAllowed = isAllowedResource(uri, false, inlinerContext.inline);\n var normalizedPath = normalizePath(relativeToCurrentPath);\n var isLoaded = normalizedPath in inlinerContext.externalContext.sourcesContent;\n\n if (inlinerContext.inlinedStylesheets.indexOf(absoluteUri) > -1) {\n inlinerContext.warnings.push('Ignoring local @import of \"' + uri + '\" as it has already been imported.');\n } else if (!isLoaded && (!fs.existsSync(absoluteUri) || !fs.statSync(absoluteUri).isFile())) {\n inlinerContext.errors.push('Ignoring local @import of \"' + uri + '\" as resource is missing.');\n } else if (!isAllowed && inlinerContext.afterContent) {\n inlinerContext.warnings.push('Ignoring local @import of \"' + uri + '\" as resource is not allowed and after other content.');\n } else if (inlinerContext.afterContent) {\n inlinerContext.warnings.push('Ignoring local @import of \"' + uri + '\" as after other content.');\n } else if (!isAllowed) {\n inlinerContext.warnings.push('Skipping local @import of \"' + uri + '\" as resource is not allowed.');\n inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));\n } else {\n importedStyles = isLoaded ?\n inlinerContext.externalContext.sourcesContent[normalizedPath] :\n fs.readFileSync(absoluteUri, 'utf-8');\n\n inlinerContext.inlinedStylesheets.push(absoluteUri);\n inlinerContext.inline = inlinerContext.externalContext.options.inline;\n\n inlinerContext.externalContext.source = normalizedPath;\n inlinerContext.externalContext.sourcesContent[normalizedPath] = importedStyles;\n inlinerContext.externalContext.stats.originalSize += importedStyles.length;\n\n return fromStyles(importedStyles, inlinerContext.externalContext, inlinerContext, function (importedTokens) {\n importedTokens = wrapInMedia(importedTokens, mediaQuery, metadata);\n\n inlinerContext.outputTokens = inlinerContext.outputTokens.concat(importedTokens);\n inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);\n\n return doInlineImports(inlinerContext);\n });\n }\n\n inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);\n\n return doInlineImports(inlinerContext);\n}\n\nfunction wrapInMedia(tokens, mediaQuery, metadata) {\n if (mediaQuery) {\n return [[Token.NESTED_BLOCK, [[Token.NESTED_BLOCK_SCOPE, '@media ' + mediaQuery, metadata]], tokens]];\n } else {\n return tokens;\n }\n}\n\nmodule.exports = readSources;\n","var path = require('path');\n\nfunction rebaseLocalMap(sourceMap, sourceUri, rebaseTo) {\n var currentPath = path.resolve('');\n var absoluteUri = path.resolve(currentPath, sourceUri);\n var absoluteUriDirectory = path.dirname(absoluteUri);\n\n sourceMap.sources = sourceMap.sources.map(function(source) {\n return path.relative(rebaseTo, path.resolve(absoluteUriDirectory, source));\n });\n\n return sourceMap;\n}\n\nmodule.exports = rebaseLocalMap;\n","var path = require('path');\nvar url = require('url');\n\nfunction rebaseRemoteMap(sourceMap, sourceUri) {\n var sourceDirectory = path.dirname(sourceUri);\n\n sourceMap.sources = sourceMap.sources.map(function(source) {\n return url.resolve(sourceDirectory, source);\n });\n\n return sourceMap;\n}\n\nmodule.exports = rebaseRemoteMap;\n","var extractImportUrlAndMedia = require('./extract-import-url-and-media');\nvar restoreImport = require('./restore-import');\nvar rewriteUrl = require('./rewrite-url');\n\nvar Token = require('../tokenizer/token');\nvar isImport = require('../utils/is-import');\n\nvar SOURCE_MAP_COMMENT_PATTERN = /^\\/\\*# sourceMappingURL=(\\S+) \\*\\/$/;\n\nfunction rebase(tokens, rebaseAll, validator, rebaseConfig) {\n return rebaseAll ?\n rebaseEverything(tokens, validator, rebaseConfig) :\n rebaseAtRules(tokens, validator, rebaseConfig);\n}\n\nfunction rebaseEverything(tokens, validator, rebaseConfig) {\n var token;\n var i, l;\n\n for (i = 0, l = tokens.length; i < l; i++) {\n token = tokens[i];\n\n switch (token[0]) {\n case Token.AT_RULE:\n rebaseAtRule(token, validator, rebaseConfig);\n break;\n case Token.AT_RULE_BLOCK:\n rebaseProperties(token[2], validator, rebaseConfig);\n break;\n case Token.COMMENT:\n rebaseSourceMapComment(token, rebaseConfig);\n break;\n case Token.NESTED_BLOCK:\n rebaseEverything(token[2], validator, rebaseConfig);\n break;\n case Token.RULE:\n rebaseProperties(token[2], validator, rebaseConfig);\n break;\n }\n }\n\n return tokens;\n}\n\nfunction rebaseAtRules(tokens, validator, rebaseConfig) {\n var token;\n var i, l;\n\n for (i = 0, l = tokens.length; i < l; i++) {\n token = tokens[i];\n\n switch (token[0]) {\n case Token.AT_RULE:\n rebaseAtRule(token, validator, rebaseConfig);\n break;\n }\n }\n\n return tokens;\n}\n\nfunction rebaseAtRule(token, validator, rebaseConfig) {\n if (!isImport(token[1])) {\n return;\n }\n\n var uriAndMediaQuery = extractImportUrlAndMedia(token[1]);\n var newUrl = rewriteUrl(uriAndMediaQuery[0], rebaseConfig);\n var mediaQuery = uriAndMediaQuery[1];\n\n token[1] = restoreImport(newUrl, mediaQuery);\n}\n\nfunction rebaseSourceMapComment(token, rebaseConfig) {\n var matches = SOURCE_MAP_COMMENT_PATTERN.exec(token[1]);\n\n if (matches && matches[1].indexOf('data:') === -1) {\n token[1] = token[1].replace(matches[1], rewriteUrl(matches[1], rebaseConfig, true));\n }\n}\n\nfunction rebaseProperties(properties, validator, rebaseConfig) {\n var property;\n var value;\n var i, l;\n var j, m;\n\n for (i = 0, l = properties.length; i < l; i++) {\n property = properties[i];\n\n for (j = 2 /* 0 is Token.PROPERTY, 1 is name */, m = property.length; j < m; j++) {\n value = property[j][1];\n\n if (validator.isUrl(value)) {\n property[j][1] = rewriteUrl(value, rebaseConfig);\n }\n }\n }\n}\n\nmodule.exports = rebase;\n","function restoreImport(uri, mediaQuery) {\n return ('@import ' + uri + ' ' + mediaQuery).trim();\n}\n\nmodule.exports = restoreImport;\n","var path = require('path');\nvar url = require('url');\n\nvar DOUBLE_QUOTE = '\"';\nvar SINGLE_QUOTE = '\\'';\nvar URL_PREFIX = 'url(';\nvar URL_SUFFIX = ')';\n\nvar QUOTE_PREFIX_PATTERN = /^[\"']/;\nvar QUOTE_SUFFIX_PATTERN = /[\"']$/;\nvar ROUND_BRACKETS_PATTERN = /[\\(\\)]/;\nvar URL_PREFIX_PATTERN = /^url\\(/i;\nvar URL_SUFFIX_PATTERN = /\\)$/;\nvar WHITESPACE_PATTERN = /\\s/;\n\nvar isWindows = process.platform == 'win32';\n\nfunction rebase(uri, rebaseConfig) {\n if (!rebaseConfig) {\n return uri;\n }\n\n if (isAbsolute(uri) && !isRemote(rebaseConfig.toBase)) {\n return uri;\n }\n\n if (isRemote(uri) || isSVGMarker(uri) || isInternal(uri)) {\n return uri;\n }\n\n if (isData(uri)) {\n return '\\'' + uri + '\\'';\n }\n\n if (isRemote(rebaseConfig.toBase)) {\n return url.resolve(rebaseConfig.toBase, uri);\n }\n\n return rebaseConfig.absolute ?\n normalize(absolute(uri, rebaseConfig)) :\n normalize(relative(uri, rebaseConfig));\n}\n\nfunction isAbsolute(uri) {\n return path.isAbsolute(uri);\n}\n\nfunction isSVGMarker(uri) {\n return uri[0] == '#';\n}\n\nfunction isInternal(uri) {\n return /^\\w+:\\w+/.test(uri);\n}\n\nfunction isRemote(uri) {\n return /^[^:]+?:\\/\\//.test(uri) || uri.indexOf('//') === 0;\n}\n\nfunction isData(uri) {\n return uri.indexOf('data:') === 0;\n}\n\nfunction absolute(uri, rebaseConfig) {\n return path\n .resolve(path.join(rebaseConfig.fromBase || '', uri))\n .replace(rebaseConfig.toBase, '');\n}\n\nfunction relative(uri, rebaseConfig) {\n return path.relative(rebaseConfig.toBase, path.join(rebaseConfig.fromBase || '', uri));\n}\n\nfunction normalize(uri) {\n return isWindows ? uri.replace(/\\\\/g, '/') : uri;\n}\n\nfunction quoteFor(unquotedUrl) {\n if (unquotedUrl.indexOf(SINGLE_QUOTE) > -1) {\n return DOUBLE_QUOTE;\n } else if (unquotedUrl.indexOf(DOUBLE_QUOTE) > -1) {\n return SINGLE_QUOTE;\n } else if (hasWhitespace(unquotedUrl) || hasRoundBrackets(unquotedUrl)) {\n return SINGLE_QUOTE;\n } else {\n return '';\n }\n}\n\nfunction hasWhitespace(url) {\n return WHITESPACE_PATTERN.test(url);\n}\n\nfunction hasRoundBrackets(url) {\n return ROUND_BRACKETS_PATTERN.test(url);\n}\n\nfunction rewriteUrl(originalUrl, rebaseConfig, pathOnly) {\n var strippedUrl = originalUrl\n .replace(URL_PREFIX_PATTERN, '')\n .replace(URL_SUFFIX_PATTERN, '')\n .trim();\n\n var unquotedUrl = strippedUrl\n .replace(QUOTE_PREFIX_PATTERN, '')\n .replace(QUOTE_SUFFIX_PATTERN, '')\n .trim();\n\n var quote = strippedUrl[0] == SINGLE_QUOTE || strippedUrl[0] == DOUBLE_QUOTE ?\n strippedUrl[0] :\n quoteFor(unquotedUrl);\n\n return pathOnly ?\n rebase(unquotedUrl, rebaseConfig) :\n URL_PREFIX + quote + rebase(unquotedUrl, rebaseConfig) + quote + URL_SUFFIX;\n}\n\nmodule.exports = rewriteUrl;\n","var Marker = {\n ASTERISK: '*',\n AT: '@',\n BACK_SLASH: '\\\\',\n CARRIAGE_RETURN: '\\r',\n CLOSE_CURLY_BRACKET: '}',\n CLOSE_ROUND_BRACKET: ')',\n CLOSE_SQUARE_BRACKET: ']',\n COLON: ':',\n COMMA: ',',\n DOUBLE_QUOTE: '\"',\n EXCLAMATION: '!',\n FORWARD_SLASH: '/',\n INTERNAL: '-clean-css-',\n NEW_LINE_NIX: '\\n',\n OPEN_CURLY_BRACKET: '{',\n OPEN_ROUND_BRACKET: '(',\n OPEN_SQUARE_BRACKET: '[',\n SEMICOLON: ';',\n SINGLE_QUOTE: '\\'',\n SPACE: ' ',\n TAB: '\\t',\n UNDERSCORE: '_'\n};\n\nmodule.exports = Marker;\n","var Token = {\n AT_RULE: 'at-rule', // e.g. `@import`, `@charset`\n AT_RULE_BLOCK: 'at-rule-block', // e.g. `@font-face{...}`\n AT_RULE_BLOCK_SCOPE: 'at-rule-block-scope', // e.g. `@font-face`\n COMMENT: 'comment', // e.g. `/* comment */`\n NESTED_BLOCK: 'nested-block', // e.g. `@media screen{...}`, `@keyframes animation {...}`\n NESTED_BLOCK_SCOPE: 'nested-block-scope', // e.g. `@media`, `@keyframes`\n PROPERTY: 'property', // e.g. `color:red`\n PROPERTY_BLOCK: 'property-block', // e.g. `--var:{color:red}`\n PROPERTY_NAME: 'property-name', // e.g. `color`\n PROPERTY_VALUE: 'property-value', // e.g. `red`\n RAW: 'raw', // e.g. anything between /* clean-css ignore:start */ and /* clean-css ignore:end */ comments\n RULE: 'rule', // e.g `div > a{...}`\n RULE_SCOPE: 'rule-scope' // e.g `div > a`\n};\n\nmodule.exports = Token;\n","var Marker = require('./marker');\nvar Token = require('./token');\n\nvar formatPosition = require('../utils/format-position');\n\nvar Level = {\n BLOCK: 'block',\n COMMENT: 'comment',\n DOUBLE_QUOTE: 'double-quote',\n RULE: 'rule',\n SINGLE_QUOTE: 'single-quote'\n};\n\nvar AT_RULES = [\n '@charset',\n '@import'\n];\n\nvar BLOCK_RULES = [\n '@-moz-document',\n '@document',\n '@-moz-keyframes',\n '@-ms-keyframes',\n '@-o-keyframes',\n '@-webkit-keyframes',\n '@keyframes',\n '@media',\n '@supports'\n];\n\nvar IGNORE_END_COMMENT_PATTERN = /\\/\\* clean\\-css ignore:end \\*\\/$/;\nvar IGNORE_START_COMMENT_PATTERN = /^\\/\\* clean\\-css ignore:start \\*\\//;\n\nvar PAGE_MARGIN_BOXES = [\n '@bottom-center',\n '@bottom-left',\n '@bottom-left-corner',\n '@bottom-right',\n '@bottom-right-corner',\n '@left-bottom',\n '@left-middle',\n '@left-top',\n '@right-bottom',\n '@right-middle',\n '@right-top',\n '@top-center',\n '@top-left',\n '@top-left-corner',\n '@top-right',\n '@top-right-corner'\n];\n\nvar EXTRA_PAGE_BOXES = [\n '@footnote',\n '@footnotes',\n '@left',\n '@page-float-bottom',\n '@page-float-top',\n '@right'\n];\n\nvar REPEAT_PATTERN = /^\\[\\s{0,31}\\d+\\s{0,31}\\]$/;\nvar RULE_WORD_SEPARATOR_PATTERN = /[\\s\\(]/;\nvar TAIL_BROKEN_VALUE_PATTERN = /[\\s|\\}]*$/;\n\nfunction tokenize(source, externalContext) {\n var internalContext = {\n level: Level.BLOCK,\n position: {\n source: externalContext.source || undefined,\n line: 1,\n column: 0,\n index: 0\n }\n };\n\n return intoTokens(source, externalContext, internalContext, false);\n}\n\nfunction intoTokens(source, externalContext, internalContext, isNested) {\n var allTokens = [];\n var newTokens = allTokens;\n var lastToken;\n var ruleToken;\n var ruleTokens = [];\n var propertyToken;\n var metadata;\n var metadatas = [];\n var level = internalContext.level;\n var levels = [];\n var buffer = [];\n var buffers = [];\n var serializedBuffer;\n var serializedBufferPart;\n var roundBracketLevel = 0;\n var isQuoted;\n var isSpace;\n var isNewLineNix;\n var isNewLineWin;\n var isCarriageReturn;\n var isCommentStart;\n var wasCommentStart = false;\n var isCommentEnd;\n var wasCommentEnd = false;\n var isCommentEndMarker;\n var isEscaped;\n var wasEscaped = false;\n var isRaw = false;\n var seekingValue = false;\n var seekingPropertyBlockClosing = false;\n var position = internalContext.position;\n var lastCommentStartAt;\n\n for (; position.index < source.length; position.index++) {\n var character = source[position.index];\n\n isQuoted = level == Level.SINGLE_QUOTE || level == Level.DOUBLE_QUOTE;\n isSpace = character == Marker.SPACE || character == Marker.TAB;\n isNewLineNix = character == Marker.NEW_LINE_NIX;\n isNewLineWin = character == Marker.NEW_LINE_NIX && source[position.index - 1] == Marker.CARRIAGE_RETURN;\n isCarriageReturn = character == Marker.CARRIAGE_RETURN && source[position.index + 1] && source[position.index + 1] != Marker.NEW_LINE_NIX;\n isCommentStart = !wasCommentEnd && level != Level.COMMENT && !isQuoted && character == Marker.ASTERISK && source[position.index - 1] == Marker.FORWARD_SLASH;\n isCommentEndMarker = !wasCommentStart && !isQuoted && character == Marker.FORWARD_SLASH && source[position.index - 1] == Marker.ASTERISK;\n isCommentEnd = level == Level.COMMENT && isCommentEndMarker;\n roundBracketLevel = Math.max(roundBracketLevel, 0);\n\n metadata = buffer.length === 0 ?\n [position.line, position.column, position.source] :\n metadata;\n\n if (isEscaped) {\n // previous character was a backslash\n buffer.push(character);\n } else if (!isCommentEnd && level == Level.COMMENT) {\n buffer.push(character);\n } else if (!isCommentStart && !isCommentEnd && isRaw) {\n buffer.push(character);\n } else if (isCommentStart && (level == Level.BLOCK || level == Level.RULE) && buffer.length > 1) {\n // comment start within block preceded by some content, e.g. div/*<--\n metadatas.push(metadata);\n buffer.push(character);\n buffers.push(buffer.slice(0, buffer.length - 2));\n\n buffer = buffer.slice(buffer.length - 2);\n metadata = [position.line, position.column - 1, position.source];\n\n levels.push(level);\n level = Level.COMMENT;\n } else if (isCommentStart) {\n // comment start, e.g. /*<--\n levels.push(level);\n level = Level.COMMENT;\n buffer.push(character);\n } else if (isCommentEnd && isIgnoreStartComment(buffer)) {\n // ignore:start comment end, e.g. /* clean-css ignore:start */<--\n serializedBuffer = buffer.join('').trim() + character;\n lastToken = [Token.COMMENT, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]];\n newTokens.push(lastToken);\n\n isRaw = true;\n metadata = metadatas.pop() || null;\n buffer = buffers.pop() || [];\n } else if (isCommentEnd && isIgnoreEndComment(buffer)) {\n // ignore:start comment end, e.g. /* clean-css ignore:end */<--\n serializedBuffer = buffer.join('') + character;\n lastCommentStartAt = serializedBuffer.lastIndexOf(Marker.FORWARD_SLASH + Marker.ASTERISK);\n\n serializedBufferPart = serializedBuffer.substring(0, lastCommentStartAt);\n lastToken = [Token.RAW, serializedBufferPart, [originalMetadata(metadata, serializedBufferPart, externalContext)]];\n newTokens.push(lastToken);\n\n serializedBufferPart = serializedBuffer.substring(lastCommentStartAt);\n metadata = [position.line, position.column - serializedBufferPart.length + 1, position.source];\n lastToken = [Token.COMMENT, serializedBufferPart, [originalMetadata(metadata, serializedBufferPart, externalContext)]];\n newTokens.push(lastToken);\n\n isRaw = false;\n level = levels.pop();\n metadata = metadatas.pop() || null;\n buffer = buffers.pop() || [];\n } else if (isCommentEnd) {\n // comment end, e.g. /* comment */<--\n serializedBuffer = buffer.join('').trim() + character;\n lastToken = [Token.COMMENT, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]];\n newTokens.push(lastToken);\n\n level = levels.pop();\n metadata = metadatas.pop() || null;\n buffer = buffers.pop() || [];\n } else if (isCommentEndMarker && source[position.index + 1] != Marker.ASTERISK) {\n externalContext.warnings.push('Unexpected \\'*/\\' at ' + formatPosition([position.line, position.column, position.source]) + '.');\n buffer = [];\n } else if (character == Marker.SINGLE_QUOTE && !isQuoted) {\n // single quotation start, e.g. a[href^='https<--\n levels.push(level);\n level = Level.SINGLE_QUOTE;\n buffer.push(character);\n } else if (character == Marker.SINGLE_QUOTE && level == Level.SINGLE_QUOTE) {\n // single quotation end, e.g. a[href^='https'<--\n level = levels.pop();\n buffer.push(character);\n } else if (character == Marker.DOUBLE_QUOTE && !isQuoted) {\n // double quotation start, e.g. a[href^=\"<--\n levels.push(level);\n level = Level.DOUBLE_QUOTE;\n buffer.push(character);\n } else if (character == Marker.DOUBLE_QUOTE && level == Level.DOUBLE_QUOTE) {\n // double quotation end, e.g. a[href^=\"https\"<--\n level = levels.pop();\n buffer.push(character);\n } else if (!isCommentStart && !isCommentEnd && character != Marker.CLOSE_ROUND_BRACKET && character != Marker.OPEN_ROUND_BRACKET && level != Level.COMMENT && !isQuoted && roundBracketLevel > 0) {\n // character inside any function, e.g. hsla(.<--\n buffer.push(character);\n } else if (character == Marker.OPEN_ROUND_BRACKET && !isQuoted && level != Level.COMMENT && !seekingValue) {\n // round open bracket, e.g. @import url(<--\n buffer.push(character);\n\n roundBracketLevel++;\n } else if (character == Marker.CLOSE_ROUND_BRACKET && !isQuoted && level != Level.COMMENT && !seekingValue) {\n // round open bracket, e.g. @import url(test.css)<--\n buffer.push(character);\n\n roundBracketLevel--;\n } else if (character == Marker.SEMICOLON && level == Level.BLOCK && buffer[0] == Marker.AT) {\n // semicolon ending rule at block level, e.g. @import '...';<--\n serializedBuffer = buffer.join('').trim();\n allTokens.push([Token.AT_RULE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n\n buffer = [];\n } else if (character == Marker.COMMA && level == Level.BLOCK && ruleToken) {\n // comma separator at block level, e.g. a,div,<--\n serializedBuffer = buffer.join('').trim();\n ruleToken[1].push([tokenScopeFrom(ruleToken[0]), serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext, ruleToken[1].length)]]);\n\n buffer = [];\n } else if (character == Marker.COMMA && level == Level.BLOCK && tokenTypeFrom(buffer) == Token.AT_RULE) {\n // comma separator at block level, e.g. @import url(...) screen,<--\n // keep iterating as end semicolon will create the token\n buffer.push(character);\n } else if (character == Marker.COMMA && level == Level.BLOCK) {\n // comma separator at block level, e.g. a,<--\n ruleToken = [tokenTypeFrom(buffer), [], []];\n serializedBuffer = buffer.join('').trim();\n ruleToken[1].push([tokenScopeFrom(ruleToken[0]), serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext, 0)]]);\n\n buffer = [];\n } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.BLOCK && ruleToken && ruleToken[0] == Token.NESTED_BLOCK) {\n // open brace opening at-rule at block level, e.g. @media{<--\n serializedBuffer = buffer.join('').trim();\n ruleToken[1].push([Token.NESTED_BLOCK_SCOPE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n allTokens.push(ruleToken);\n\n levels.push(level);\n position.column++;\n position.index++;\n buffer = [];\n\n ruleToken[2] = intoTokens(source, externalContext, internalContext, true);\n ruleToken = null;\n } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.BLOCK && tokenTypeFrom(buffer) == Token.NESTED_BLOCK) {\n // open brace opening at-rule at block level, e.g. @media{<--\n serializedBuffer = buffer.join('').trim();\n ruleToken = ruleToken || [Token.NESTED_BLOCK, [], []];\n ruleToken[1].push([Token.NESTED_BLOCK_SCOPE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n allTokens.push(ruleToken);\n\n levels.push(level);\n position.column++;\n position.index++;\n buffer = [];\n\n ruleToken[2] = intoTokens(source, externalContext, internalContext, true);\n ruleToken = null;\n } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.BLOCK) {\n // open brace opening rule at block level, e.g. div{<--\n serializedBuffer = buffer.join('').trim();\n ruleToken = ruleToken || [tokenTypeFrom(buffer), [], []];\n ruleToken[1].push([tokenScopeFrom(ruleToken[0]), serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext, ruleToken[1].length)]]);\n newTokens = ruleToken[2];\n allTokens.push(ruleToken);\n\n levels.push(level);\n level = Level.RULE;\n buffer = [];\n } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.RULE && seekingValue) {\n // open brace opening rule at rule level, e.g. div{--variable:{<--\n ruleTokens.push(ruleToken);\n ruleToken = [Token.PROPERTY_BLOCK, []];\n propertyToken.push(ruleToken);\n newTokens = ruleToken[1];\n\n levels.push(level);\n level = Level.RULE;\n seekingValue = false;\n } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.RULE && isPageMarginBox(buffer)) {\n // open brace opening page-margin box at rule level, e.g. @page{@top-center{<--\n serializedBuffer = buffer.join('').trim();\n ruleTokens.push(ruleToken);\n ruleToken = [Token.AT_RULE_BLOCK, [], []];\n ruleToken[1].push([Token.AT_RULE_BLOCK_SCOPE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n newTokens.push(ruleToken);\n newTokens = ruleToken[2];\n\n levels.push(level);\n level = Level.RULE;\n buffer = [];\n } else if (character == Marker.COLON && level == Level.RULE && !seekingValue) {\n // colon at rule level, e.g. a{color:<--\n serializedBuffer = buffer.join('').trim();\n propertyToken = [Token.PROPERTY, [Token.PROPERTY_NAME, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]];\n newTokens.push(propertyToken);\n\n seekingValue = true;\n buffer = [];\n } else if (character == Marker.SEMICOLON && level == Level.RULE && propertyToken && ruleTokens.length > 0 && buffer.length > 0 && buffer[0] == Marker.AT) {\n // semicolon at rule level for at-rule, e.g. a{--color:{@apply(--other-color);<--\n serializedBuffer = buffer.join('').trim();\n ruleToken[1].push([Token.AT_RULE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n\n buffer = [];\n } else if (character == Marker.SEMICOLON && level == Level.RULE && propertyToken && buffer.length > 0) {\n // semicolon at rule level, e.g. a{color:red;<--\n serializedBuffer = buffer.join('').trim();\n propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n\n propertyToken = null;\n seekingValue = false;\n buffer = [];\n } else if (character == Marker.SEMICOLON && level == Level.RULE && propertyToken && buffer.length === 0) {\n // semicolon after bracketed value at rule level, e.g. a{color:rgb(...);<--\n propertyToken = null;\n seekingValue = false;\n } else if (character == Marker.SEMICOLON && level == Level.RULE && buffer.length > 0 && buffer[0] == Marker.AT) {\n // semicolon for at-rule at rule level, e.g. a{@apply(--variable);<--\n serializedBuffer = buffer.join('');\n newTokens.push([Token.AT_RULE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n\n seekingValue = false;\n buffer = [];\n } else if (character == Marker.SEMICOLON && level == Level.RULE && seekingPropertyBlockClosing) {\n // close brace after a property block at rule level, e.g. a{--custom:{color:red;};<--\n seekingPropertyBlockClosing = false;\n buffer = [];\n } else if (character == Marker.SEMICOLON && level == Level.RULE && buffer.length === 0) {\n // stray semicolon at rule level, e.g. a{;<--\n // noop\n } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && propertyToken && seekingValue && buffer.length > 0 && ruleTokens.length > 0) {\n // close brace at rule level, e.g. a{--color:{color:red}<--\n serializedBuffer = buffer.join('');\n propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n propertyToken = null;\n ruleToken = ruleTokens.pop();\n newTokens = ruleToken[2];\n\n level = levels.pop();\n seekingValue = false;\n buffer = [];\n } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && propertyToken && buffer.length > 0 && buffer[0] == Marker.AT && ruleTokens.length > 0) {\n // close brace at rule level for at-rule, e.g. a{--color:{@apply(--other-color)}<--\n serializedBuffer = buffer.join('');\n ruleToken[1].push([Token.AT_RULE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n propertyToken = null;\n ruleToken = ruleTokens.pop();\n newTokens = ruleToken[2];\n\n level = levels.pop();\n seekingValue = false;\n buffer = [];\n } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && propertyToken && ruleTokens.length > 0) {\n // close brace at rule level after space, e.g. a{--color:{color:red }<--\n propertyToken = null;\n ruleToken = ruleTokens.pop();\n newTokens = ruleToken[2];\n\n level = levels.pop();\n seekingValue = false;\n } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && propertyToken && buffer.length > 0) {\n // close brace at rule level, e.g. a{color:red}<--\n serializedBuffer = buffer.join('');\n propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n propertyToken = null;\n ruleToken = ruleTokens.pop();\n newTokens = allTokens;\n\n level = levels.pop();\n seekingValue = false;\n buffer = [];\n } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && buffer.length > 0 && buffer[0] == Marker.AT) {\n // close brace after at-rule at rule level, e.g. a{@apply(--variable)}<--\n propertyToken = null;\n ruleToken = null;\n serializedBuffer = buffer.join('').trim();\n newTokens.push([Token.AT_RULE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n newTokens = allTokens;\n\n level = levels.pop();\n seekingValue = false;\n buffer = [];\n } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && levels[levels.length - 1] == Level.RULE) {\n // close brace after a property block at rule level, e.g. a{--custom:{color:red;}<--\n propertyToken = null;\n ruleToken = ruleTokens.pop();\n newTokens = ruleToken[2];\n\n level = levels.pop();\n seekingValue = false;\n seekingPropertyBlockClosing = true;\n buffer = [];\n } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE) {\n // close brace after a rule, e.g. a{color:red;}<--\n propertyToken = null;\n ruleToken = null;\n newTokens = allTokens;\n\n level = levels.pop();\n seekingValue = false;\n } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.BLOCK && !isNested && position.index <= source.length - 1) {\n // stray close brace at block level, e.g. a{color:red}color:blue}<--\n externalContext.warnings.push('Unexpected \\'}\\' at ' + formatPosition([position.line, position.column, position.source]) + '.');\n buffer.push(character);\n } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.BLOCK) {\n // close brace at block level, e.g. @media screen {...}<--\n break;\n } else if (character == Marker.OPEN_ROUND_BRACKET && level == Level.RULE && seekingValue) {\n // round open bracket, e.g. a{color:hsla(<--\n buffer.push(character);\n roundBracketLevel++;\n } else if (character == Marker.CLOSE_ROUND_BRACKET && level == Level.RULE && seekingValue && roundBracketLevel == 1) {\n // round close bracket, e.g. a{color:hsla(0,0%,0%)<--\n buffer.push(character);\n serializedBuffer = buffer.join('').trim();\n propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n\n roundBracketLevel--;\n buffer = [];\n } else if (character == Marker.CLOSE_ROUND_BRACKET && level == Level.RULE && seekingValue) {\n // round close bracket within other brackets, e.g. a{width:calc((10rem / 2)<--\n buffer.push(character);\n roundBracketLevel--;\n } else if (character == Marker.FORWARD_SLASH && source[position.index + 1] != Marker.ASTERISK && level == Level.RULE && seekingValue && buffer.length > 0) {\n // forward slash within a property, e.g. a{background:url(image.png) 0 0/<--\n serializedBuffer = buffer.join('').trim();\n propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n propertyToken.push([Token.PROPERTY_VALUE, character, [[position.line, position.column, position.source]]]);\n\n buffer = [];\n } else if (character == Marker.FORWARD_SLASH && source[position.index + 1] != Marker.ASTERISK && level == Level.RULE && seekingValue) {\n // forward slash within a property after space, e.g. a{background:url(image.png) 0 0 /<--\n propertyToken.push([Token.PROPERTY_VALUE, character, [[position.line, position.column, position.source]]]);\n\n buffer = [];\n } else if (character == Marker.COMMA && level == Level.RULE && seekingValue && buffer.length > 0) {\n // comma within a property, e.g. a{background:url(image.png),<--\n serializedBuffer = buffer.join('').trim();\n propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n propertyToken.push([Token.PROPERTY_VALUE, character, [[position.line, position.column, position.source]]]);\n\n buffer = [];\n } else if (character == Marker.COMMA && level == Level.RULE && seekingValue) {\n // comma within a property after space, e.g. a{background:url(image.png) ,<--\n propertyToken.push([Token.PROPERTY_VALUE, character, [[position.line, position.column, position.source]]]);\n\n buffer = [];\n } else if (character == Marker.CLOSE_SQUARE_BRACKET && propertyToken && propertyToken.length > 1 && buffer.length > 0 && isRepeatToken(buffer)) {\n buffer.push(character);\n serializedBuffer = buffer.join('').trim();\n propertyToken[propertyToken.length - 1][1] += serializedBuffer;\n\n buffer = [];\n } else if ((isSpace || (isNewLineNix && !isNewLineWin)) && level == Level.RULE && seekingValue && propertyToken && buffer.length > 0) {\n // space or *nix newline within property, e.g. a{margin:0 <--\n serializedBuffer = buffer.join('').trim();\n propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n\n buffer = [];\n } else if (isNewLineWin && level == Level.RULE && seekingValue && propertyToken && buffer.length > 1) {\n // win newline within property, e.g. a{margin:0\\r\\n<--\n serializedBuffer = buffer.join('').trim();\n propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n\n buffer = [];\n } else if (isNewLineWin && level == Level.RULE && seekingValue) {\n // win newline\n buffer = [];\n } else if (buffer.length == 1 && isNewLineWin) {\n // ignore windows newline which is composed of two characters\n buffer.pop();\n } else if (buffer.length > 0 || !isSpace && !isNewLineNix && !isNewLineWin && !isCarriageReturn) {\n // any character\n buffer.push(character);\n }\n\n wasEscaped = isEscaped;\n isEscaped = !wasEscaped && character == Marker.BACK_SLASH;\n wasCommentStart = isCommentStart;\n wasCommentEnd = isCommentEnd;\n\n position.line = (isNewLineWin || isNewLineNix || isCarriageReturn) ? position.line + 1 : position.line;\n position.column = (isNewLineWin || isNewLineNix || isCarriageReturn) ? 0 : position.column + 1;\n }\n\n if (seekingValue) {\n externalContext.warnings.push('Missing \\'}\\' at ' + formatPosition([position.line, position.column, position.source]) + '.');\n }\n\n if (seekingValue && buffer.length > 0) {\n serializedBuffer = buffer.join('').replace(TAIL_BROKEN_VALUE_PATTERN, '');\n propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);\n\n buffer = [];\n }\n\n if (buffer.length > 0) {\n externalContext.warnings.push('Invalid character(s) \\'' + buffer.join('') + '\\' at ' + formatPosition(metadata) + '. Ignoring.');\n }\n\n return allTokens;\n}\n\nfunction isIgnoreStartComment(buffer) {\n return IGNORE_START_COMMENT_PATTERN.test(buffer.join('') + Marker.FORWARD_SLASH);\n}\n\nfunction isIgnoreEndComment(buffer) {\n return IGNORE_END_COMMENT_PATTERN.test(buffer.join('') + Marker.FORWARD_SLASH);\n}\n\nfunction originalMetadata(metadata, value, externalContext, selectorFallbacks) {\n var source = metadata[2];\n\n return externalContext.inputSourceMapTracker.isTracking(source) ?\n externalContext.inputSourceMapTracker.originalPositionFor(metadata, value.length, selectorFallbacks) :\n metadata;\n}\n\nfunction tokenTypeFrom(buffer) {\n var isAtRule = buffer[0] == Marker.AT || buffer[0] == Marker.UNDERSCORE;\n var ruleWord = buffer.join('').split(RULE_WORD_SEPARATOR_PATTERN)[0];\n\n if (isAtRule && BLOCK_RULES.indexOf(ruleWord) > -1) {\n return Token.NESTED_BLOCK;\n } else if (isAtRule && AT_RULES.indexOf(ruleWord) > -1) {\n return Token.AT_RULE;\n } else if (isAtRule) {\n return Token.AT_RULE_BLOCK;\n } else {\n return Token.RULE;\n }\n}\n\nfunction tokenScopeFrom(tokenType) {\n if (tokenType == Token.RULE) {\n return Token.RULE_SCOPE;\n } else if (tokenType == Token.NESTED_BLOCK) {\n return Token.NESTED_BLOCK_SCOPE;\n } else if (tokenType == Token.AT_RULE_BLOCK) {\n return Token.AT_RULE_BLOCK_SCOPE;\n }\n}\n\nfunction isPageMarginBox(buffer) {\n var serializedBuffer = buffer.join('').trim();\n\n return PAGE_MARGIN_BOXES.indexOf(serializedBuffer) > -1 || EXTRA_PAGE_BOXES.indexOf(serializedBuffer) > -1;\n}\n\nfunction isRepeatToken(buffer) {\n return REPEAT_PATTERN.test(buffer.join('') + Marker.CLOSE_SQUARE_BRACKET);\n}\n\nmodule.exports = tokenize;\n","function cloneArray(array) {\n var cloned = array.slice(0);\n\n for (var i = 0, l = cloned.length; i < l; i++) {\n if (Array.isArray(cloned[i]))\n cloned[i] = cloneArray(cloned[i]);\n }\n\n return cloned;\n}\n\nmodule.exports = cloneArray;\n","function formatPosition(metadata) {\n var line = metadata[0];\n var column = metadata[1];\n var source = metadata[2];\n\n return source ?\n source + ':' + line + ':' + column :\n line + ':' + column;\n}\n\nmodule.exports = formatPosition;\n","var NO_PROTOCOL_RESOURCE_PATTERN = /^\\/\\//;\n\nfunction hasProtocol(uri) {\n return !NO_PROTOCOL_RESOURCE_PATTERN.test(uri);\n}\n\nmodule.exports = hasProtocol;\n","var DATA_URI_PATTERN = /^data:(\\S*?)?(;charset=[^;]+)?(;[^,]+?)?,(.+)/;\n\nfunction isDataUriResource(uri) {\n return DATA_URI_PATTERN.test(uri);\n}\n\nmodule.exports = isDataUriResource;\n","var HTTP_RESOURCE_PATTERN = /^http:\\/\\//;\n\nfunction isHttpResource(uri) {\n return HTTP_RESOURCE_PATTERN.test(uri);\n}\n\nmodule.exports = isHttpResource;\n","var HTTPS_RESOURCE_PATTERN = /^https:\\/\\//;\n\nfunction isHttpsResource(uri) {\n return HTTPS_RESOURCE_PATTERN.test(uri);\n}\n\nmodule.exports = isHttpsResource;\n","var IMPORT_PREFIX_PATTERN = /^@import/i;\n\nfunction isImport(value) {\n return IMPORT_PREFIX_PATTERN.test(value);\n}\n\nmodule.exports = isImport;\n","var REMOTE_RESOURCE_PATTERN = /^(\\w+:\\/\\/|\\/\\/)/;\n\nfunction isRemoteResource(uri) {\n return REMOTE_RESOURCE_PATTERN.test(uri);\n}\n\nmodule.exports = isRemoteResource;\n","// adapted from http://nedbatchelder.com/blog/200712.html#e20071211T054956\n\nvar NUMBER_PATTERN = /([0-9]+)/;\n\nfunction naturalCompare(value1, value2) {\n var keys1 = ('' + value1).split(NUMBER_PATTERN).map(tryParseInt);\n var keys2 = ('' + value2).split(NUMBER_PATTERN).map(tryParseInt);\n var key1;\n var key2;\n var compareFirst = Math.min(keys1.length, keys2.length);\n var i, l;\n\n for (i = 0, l = compareFirst; i < l; i++) {\n key1 = keys1[i];\n key2 = keys2[i];\n\n if (key1 != key2) {\n return key1 > key2 ? 1 : -1;\n }\n }\n\n return keys1.length > keys2.length ? 1 : (keys1.length == keys2.length ? 0 : -1);\n}\n\nfunction tryParseInt(value) {\n return ('' + parseInt(value)) == value ?\n parseInt(value) :\n value;\n}\n\nmodule.exports = naturalCompare;\n","function override(source1, source2) {\n var target = {};\n var key1;\n var key2;\n var item;\n\n for (key1 in source1) {\n item = source1[key1];\n\n if (Array.isArray(item)) {\n target[key1] = item.slice(0);\n } else if (typeof item == 'object' && item !== null) {\n target[key1] = override(item, {});\n } else {\n target[key1] = item;\n }\n }\n\n for (key2 in source2) {\n item = source2[key2];\n\n if (key2 in target && Array.isArray(item)) {\n target[key2] = item.slice(0);\n } else if (key2 in target && typeof item == 'object' && item !== null) {\n target[key2] = override(target[key2], item);\n } else {\n target[key2] = item;\n }\n }\n\n return target;\n}\n\nmodule.exports = override;\n","var Marker = require('../tokenizer/marker');\n\nfunction split(value, separator) {\n var openLevel = Marker.OPEN_ROUND_BRACKET;\n var closeLevel = Marker.CLOSE_ROUND_BRACKET;\n var level = 0;\n var cursor = 0;\n var lastStart = 0;\n var lastValue;\n var lastCharacter;\n var len = value.length;\n var parts = [];\n\n if (value.indexOf(separator) == -1) {\n return [value];\n }\n\n if (value.indexOf(openLevel) == -1) {\n return value.split(separator);\n }\n\n while (cursor < len) {\n if (value[cursor] == openLevel) {\n level++;\n } else if (value[cursor] == closeLevel) {\n level--;\n }\n\n if (level === 0 && cursor > 0 && cursor + 1 < len && value[cursor] == separator) {\n parts.push(value.substring(lastStart, cursor));\n lastStart = cursor + 1;\n }\n\n cursor++;\n }\n\n if (lastStart < cursor + 1) {\n lastValue = value.substring(lastStart);\n lastCharacter = lastValue[lastValue.length - 1];\n if (lastCharacter == separator) {\n lastValue = lastValue.substring(0, lastValue.length - 1);\n }\n\n parts.push(lastValue);\n }\n\n return parts;\n}\n\nmodule.exports = split;\n","var emptyCharacter = '';\n\nvar Breaks = require('../options/format').Breaks;\nvar Spaces = require('../options/format').Spaces;\n\nvar Marker = require('../tokenizer/marker');\nvar Token = require('../tokenizer/token');\n\nfunction supportsAfterClosingBrace(token) {\n return token[1][1] == 'background' || token[1][1] == 'transform' || token[1][1] == 'src';\n}\n\nfunction afterClosingBrace(token, valueIndex) {\n return token[valueIndex][1][token[valueIndex][1].length - 1] == Marker.CLOSE_ROUND_BRACKET;\n}\n\nfunction afterComma(token, valueIndex) {\n return token[valueIndex][1] == Marker.COMMA;\n}\n\nfunction afterSlash(token, valueIndex) {\n return token[valueIndex][1] == Marker.FORWARD_SLASH;\n}\n\nfunction beforeComma(token, valueIndex) {\n return token[valueIndex + 1] && token[valueIndex + 1][1] == Marker.COMMA;\n}\n\nfunction beforeSlash(token, valueIndex) {\n return token[valueIndex + 1] && token[valueIndex + 1][1] == Marker.FORWARD_SLASH;\n}\n\nfunction inFilter(token) {\n return token[1][1] == 'filter' || token[1][1] == '-ms-filter';\n}\n\nfunction disallowsSpace(context, token, valueIndex) {\n return !context.spaceAfterClosingBrace && supportsAfterClosingBrace(token) && afterClosingBrace(token, valueIndex) ||\n beforeSlash(token, valueIndex) ||\n afterSlash(token, valueIndex) ||\n beforeComma(token, valueIndex) ||\n afterComma(token, valueIndex);\n}\n\nfunction rules(context, tokens) {\n var store = context.store;\n\n for (var i = 0, l = tokens.length; i < l; i++) {\n store(context, tokens[i]);\n\n if (i < l - 1) {\n store(context, comma(context));\n }\n }\n}\n\nfunction body(context, tokens) {\n var lastPropertyAt = lastPropertyIndex(tokens);\n\n for (var i = 0, l = tokens.length; i < l; i++) {\n property(context, tokens, i, lastPropertyAt);\n }\n}\n\nfunction lastPropertyIndex(tokens) {\n var index = tokens.length - 1;\n\n for (; index >= 0; index--) {\n if (tokens[index][0] != Token.COMMENT) {\n break;\n }\n }\n\n return index;\n}\n\nfunction property(context, tokens, position, lastPropertyAt) {\n var store = context.store;\n var token = tokens[position];\n\n var propertyValue = token[2];\n var isPropertyBlock = propertyValue && propertyValue[0] === Token.PROPERTY_BLOCK;\n\n var needsSemicolon;\n if ( context.format ) {\n if ( context.format.semicolonAfterLastProperty || isPropertyBlock ) {\n needsSemicolon = true;\n } else if ( position < lastPropertyAt ) {\n needsSemicolon = true;\n } else {\n needsSemicolon = false;\n }\n } else {\n needsSemicolon = position < lastPropertyAt || isPropertyBlock;\n }\n\n var isLast = position === lastPropertyAt;\n\n switch (token[0]) {\n case Token.AT_RULE:\n store(context, token);\n store(context, semicolon(context, Breaks.AfterProperty, false));\n break;\n case Token.AT_RULE_BLOCK:\n rules(context, token[1]);\n store(context, openBrace(context, Breaks.AfterRuleBegins, true));\n body(context, token[2]);\n store(context, closeBrace(context, Breaks.AfterRuleEnds, false, isLast));\n break;\n case Token.COMMENT:\n store(context, token);\n break;\n case Token.PROPERTY:\n store(context, token[1]);\n store(context, colon(context));\n if (propertyValue) {\n value(context, token);\n }\n store(context, needsSemicolon ? semicolon(context, Breaks.AfterProperty, isLast) : emptyCharacter);\n break;\n case Token.RAW:\n store(context, token);\n }\n}\n\nfunction value(context, token) {\n var store = context.store;\n var j, m;\n\n if (token[2][0] == Token.PROPERTY_BLOCK) {\n store(context, openBrace(context, Breaks.AfterBlockBegins, false));\n body(context, token[2][1]);\n store(context, closeBrace(context, Breaks.AfterBlockEnds, false, true));\n } else {\n for (j = 2, m = token.length; j < m; j++) {\n store(context, token[j]);\n\n if (j < m - 1 && (inFilter(token) || !disallowsSpace(context, token, j))) {\n store(context, Marker.SPACE);\n }\n }\n }\n}\n\nfunction allowsBreak(context, where) {\n return context.format && context.format.breaks[where];\n}\n\nfunction allowsSpace(context, where) {\n return context.format && context.format.spaces[where];\n}\n\nfunction openBrace(context, where, needsPrefixSpace) {\n if (context.format) {\n context.indentBy += context.format.indentBy;\n context.indentWith = context.format.indentWith.repeat(context.indentBy);\n return (needsPrefixSpace && allowsSpace(context, Spaces.BeforeBlockBegins) ? Marker.SPACE : emptyCharacter) +\n Marker.OPEN_CURLY_BRACKET +\n (allowsBreak(context, where) ? context.format.breakWith : emptyCharacter) +\n context.indentWith;\n } else {\n return Marker.OPEN_CURLY_BRACKET;\n }\n}\n\nfunction closeBrace(context, where, beforeBlockEnd, isLast) {\n if (context.format) {\n context.indentBy -= context.format.indentBy;\n context.indentWith = context.format.indentWith.repeat(context.indentBy);\n return (allowsBreak(context, Breaks.AfterProperty) || beforeBlockEnd && allowsBreak(context, Breaks.BeforeBlockEnds) ? context.format.breakWith : emptyCharacter) +\n context.indentWith +\n Marker.CLOSE_CURLY_BRACKET +\n (isLast ? emptyCharacter : (allowsBreak(context, where) ? context.format.breakWith : emptyCharacter) + context.indentWith);\n } else {\n return Marker.CLOSE_CURLY_BRACKET;\n }\n}\n\nfunction colon(context) {\n return context.format ?\n Marker.COLON + (allowsSpace(context, Spaces.BeforeValue) ? Marker.SPACE : emptyCharacter) :\n Marker.COLON;\n}\n\nfunction semicolon(context, where, isLast) {\n return context.format ?\n Marker.SEMICOLON + (isLast || !allowsBreak(context, where) ? emptyCharacter : context.format.breakWith + context.indentWith) :\n Marker.SEMICOLON;\n}\n\nfunction comma(context) {\n return context.format ?\n Marker.COMMA + (allowsBreak(context, Breaks.BetweenSelectors) ? context.format.breakWith : emptyCharacter) + context.indentWith :\n Marker.COMMA;\n}\n\nfunction all(context, tokens) {\n var store = context.store;\n var token;\n var isLast;\n var i, l;\n\n for (i = 0, l = tokens.length; i < l; i++) {\n token = tokens[i];\n isLast = i == l - 1;\n\n switch (token[0]) {\n case Token.AT_RULE:\n store(context, token);\n store(context, semicolon(context, Breaks.AfterAtRule, isLast));\n break;\n case Token.AT_RULE_BLOCK:\n rules(context, token[1]);\n store(context, openBrace(context, Breaks.AfterRuleBegins, true));\n body(context, token[2]);\n store(context, closeBrace(context, Breaks.AfterRuleEnds, false, isLast));\n break;\n case Token.NESTED_BLOCK:\n rules(context, token[1]);\n store(context, openBrace(context, Breaks.AfterBlockBegins, true));\n all(context, token[2]);\n store(context, closeBrace(context, Breaks.AfterBlockEnds, true, isLast));\n break;\n case Token.COMMENT:\n store(context, token);\n store(context, allowsBreak(context, Breaks.AfterComment) ? context.format.breakWith : emptyCharacter);\n break;\n case Token.RAW:\n store(context, token);\n break;\n case Token.RULE:\n rules(context, token[1]);\n store(context, openBrace(context, Breaks.AfterRuleBegins, true));\n body(context, token[2]);\n store(context, closeBrace(context, Breaks.AfterRuleEnds, false, isLast));\n break;\n }\n }\n}\n\nmodule.exports = {\n all: all,\n body: body,\n property: property,\n rules: rules,\n value: value\n};\n","var helpers = require('./helpers');\n\nfunction store(serializeContext, token) {\n serializeContext.output.push(typeof token == 'string' ? token : token[1]);\n}\n\nfunction context() {\n var newContext = {\n output: [],\n store: store\n };\n\n return newContext;\n}\n\nfunction all(tokens) {\n var oneTimeContext = context();\n helpers.all(oneTimeContext, tokens);\n return oneTimeContext.output.join('');\n}\n\nfunction body(tokens) {\n var oneTimeContext = context();\n helpers.body(oneTimeContext, tokens);\n return oneTimeContext.output.join('');\n}\n\nfunction property(tokens, position) {\n var oneTimeContext = context();\n helpers.property(oneTimeContext, tokens, position, true);\n return oneTimeContext.output.join('');\n}\n\nfunction rules(tokens) {\n var oneTimeContext = context();\n helpers.rules(oneTimeContext, tokens);\n return oneTimeContext.output.join('');\n}\n\nfunction value(tokens) {\n var oneTimeContext = context();\n helpers.value(oneTimeContext, tokens);\n return oneTimeContext.output.join('');\n}\n\nmodule.exports = {\n all: all,\n body: body,\n property: property,\n rules: rules,\n value: value\n};\n","var all = require('./helpers').all;\n\nfunction store(serializeContext, token) {\n var value = typeof token == 'string' ?\n token :\n token[1];\n var wrap = serializeContext.wrap;\n\n wrap(serializeContext, value);\n track(serializeContext, value);\n serializeContext.output.push(value);\n}\n\nfunction wrap(serializeContext, value) {\n if (serializeContext.column + value.length > serializeContext.format.wrapAt) {\n track(serializeContext, serializeContext.format.breakWith);\n serializeContext.output.push(serializeContext.format.breakWith);\n }\n}\n\nfunction track(serializeContext, value) {\n var parts = value.split('\\n');\n\n serializeContext.line += parts.length - 1;\n serializeContext.column = parts.length > 1 ? 0 : (serializeContext.column + parts.pop().length);\n}\n\nfunction serializeStyles(tokens, context) {\n var serializeContext = {\n column: 0,\n format: context.options.format,\n indentBy: 0,\n indentWith: '',\n line: 1,\n output: [],\n spaceAfterClosingBrace: context.options.compatibility.properties.spaceAfterClosingBrace,\n store: store,\n wrap: context.options.format.wrapAt ?\n wrap :\n function () { /* noop */ }\n };\n\n all(serializeContext, tokens);\n\n return {\n styles: serializeContext.output.join('')\n };\n}\n\nmodule.exports = serializeStyles;\n","var SourceMapGenerator = require('source-map').SourceMapGenerator;\nvar all = require('./helpers').all;\n\nvar isRemoteResource = require('../utils/is-remote-resource');\n\nvar isWindows = process.platform == 'win32';\n\nvar NIX_SEPARATOR_PATTERN = /\\//g;\nvar UNKNOWN_SOURCE = '$stdin';\nvar WINDOWS_SEPARATOR = '\\\\';\n\nfunction store(serializeContext, element) {\n var fromString = typeof element == 'string';\n var value = fromString ? element : element[1];\n var mappings = fromString ? null : element[2];\n var wrap = serializeContext.wrap;\n\n wrap(serializeContext, value);\n track(serializeContext, value, mappings);\n serializeContext.output.push(value);\n}\n\nfunction wrap(serializeContext, value) {\n if (serializeContext.column + value.length > serializeContext.format.wrapAt) {\n track(serializeContext, serializeContext.format.breakWith, false);\n serializeContext.output.push(serializeContext.format.breakWith);\n }\n}\n\nfunction track(serializeContext, value, mappings) {\n var parts = value.split('\\n');\n\n if (mappings) {\n trackAllMappings(serializeContext, mappings);\n }\n\n serializeContext.line += parts.length - 1;\n serializeContext.column = parts.length > 1 ? 0 : (serializeContext.column + parts.pop().length);\n}\n\nfunction trackAllMappings(serializeContext, mappings) {\n for (var i = 0, l = mappings.length; i < l; i++) {\n trackMapping(serializeContext, mappings[i]);\n }\n}\n\nfunction trackMapping(serializeContext, mapping) {\n var line = mapping[0];\n var column = mapping[1];\n var originalSource = mapping[2];\n var source = originalSource;\n var storedSource = source || UNKNOWN_SOURCE;\n\n if (isWindows && source && !isRemoteResource(source)) {\n storedSource = source.replace(NIX_SEPARATOR_PATTERN, WINDOWS_SEPARATOR);\n }\n\n serializeContext.outputMap.addMapping({\n generated: {\n line: serializeContext.line,\n column: serializeContext.column\n },\n source: storedSource,\n original: {\n line: line,\n column: column\n }\n });\n\n if (serializeContext.inlineSources && (originalSource in serializeContext.sourcesContent)) {\n serializeContext.outputMap.setSourceContent(storedSource, serializeContext.sourcesContent[originalSource]);\n }\n}\n\nfunction serializeStylesAndSourceMap(tokens, context) {\n var serializeContext = {\n column: 0,\n format: context.options.format,\n indentBy: 0,\n indentWith: '',\n inlineSources: context.options.sourceMapInlineSources,\n line: 1,\n output: [],\n outputMap: new SourceMapGenerator(),\n sourcesContent: context.sourcesContent,\n spaceAfterClosingBrace: context.options.compatibility.properties.spaceAfterClosingBrace,\n store: store,\n wrap: context.options.format.wrapAt ?\n wrap :\n function () { /* noop */ }\n };\n\n all(serializeContext, tokens);\n\n return {\n sourceMap: serializeContext.outputMap,\n styles: serializeContext.output.join('')\n };\n}\n\nmodule.exports = serializeStylesAndSourceMap;\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n const vaultPath = _vaultPath(options)\n\n // Parse .env.vault\n const result = DotenvModule.configDotenv({ path: vaultPath })\n if (!result.parsed) {\n const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n err.code = 'MISSING_DATA'\n throw err\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _log (message) {\n console.log(`[dotenv@${version}][INFO] ${message}`)\n}\n\nfunction _warn (message) {\n console.log(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n throw err\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let possibleVaultPath = null\n\n if (options && options.path && options.path.length > 0) {\n if (Array.isArray(options.path)) {\n for (const filepath of options.path) {\n if (fs.existsSync(filepath)) {\n possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n }\n }\n } else {\n possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n }\n } else {\n possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n }\n\n if (fs.existsSync(possibleVaultPath)) {\n return possibleVaultPath\n }\n\n return null\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n _log('Loading env from encrypted .env.vault')\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n const dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n const debug = Boolean(options && options.debug)\n\n if (options && options.encoding) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n\n let optionPaths = [dotenvPath] // default, look for .env\n if (options && options.path) {\n if (!Array.isArray(options.path)) {\n optionPaths = [_resolveHome(options.path)]\n } else {\n optionPaths = [] // reset default\n for (const filepath of options.path) {\n optionPaths.push(_resolveHome(filepath))\n }\n }\n }\n\n // Build the parsed data in a temporary object (because we need to return it). Once we have the final\n // parsed data, we will combine it with process.env (or options.processEnv if provided).\n let lastError\n const parsedAll = {}\n for (const path of optionPaths) {\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n DotenvModule.populate(parsedAll, parsed, options)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${path} ${e.message}`)\n }\n lastError = e\n }\n }\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsedAll, options)\n\n if (lastError) {\n return { parsed: parsedAll, error: lastError }\n } else {\n return { parsed: parsedAll }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n const vaultPath = _vaultPath(options)\n\n // dotenvKey exists but .env.vault file does not exist\n if (!vaultPath) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n } else if (decryptionFailed) {\n const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n err.code = 'DECRYPTION_FAILED'\n throw err\n } else {\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n\n if (typeof parsed !== 'object') {\n const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n err.code = 'OBJECT_REQUIRED'\n throw err\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n }\n }\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n","'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar options = {};\n\nfunction getSelections(ast) {\n if (ast && ast.selectionSet && ast.selectionSet.selections && ast.selectionSet.selections.length) {\n return ast.selectionSet.selections;\n }\n\n return [];\n}\n\nfunction isFragment(ast) {\n return ast.kind === 'InlineFragment' || ast.kind === 'FragmentSpread';\n}\n\nfunction getAST(ast, info) {\n if (ast.kind === 'FragmentSpread') {\n var fragmentName = ast.name.value;\n return info.fragments[fragmentName];\n }\n\n return ast;\n}\n\nfunction getArguments(ast, info) {\n return ast.arguments.map(function (argument) {\n var argumentValue = getArgumentValue(argument.value, info);\n return _defineProperty({}, argument.name.value, {\n kind: argument.value.kind,\n value: argumentValue\n });\n });\n}\n\nfunction getArgumentValue(arg, info) {\n switch (arg.kind) {\n case 'FloatValue':\n return parseFloat(arg.value);\n\n case 'IntValue':\n return parseInt(arg.value, 10);\n\n case 'Variable':\n return info.variableValues[arg.name.value];\n\n case 'ListValue':\n return arg.values.map(function (argument) {\n return getArgumentValue(argument, info);\n });\n\n case 'ObjectValue':\n return arg.fields.reduce(function (argValue, objectField) {\n argValue[objectField.name.value] = getArgumentValue(objectField.value, info);\n return argValue;\n }, {});\n\n default:\n return arg.value;\n }\n}\n\nfunction getDirectiveValue(directive, info) {\n var arg = directive.arguments[0]; // only arg on an include or skip directive is \"if\"\n\n if (arg.value.kind !== \"Variable\") {\n return !!arg.value.value;\n }\n\n return info.variableValues[arg.value.name.value];\n}\n\nfunction getDirectiveResults(ast, info) {\n var directiveResult = {\n shouldInclude: true,\n shouldSkip: false\n };\n return ast.directives.reduce(function (result, directive) {\n switch (directive.name.value) {\n case \"include\":\n return _objectSpread({}, result, {\n shouldInclude: getDirectiveValue(directive, info)\n });\n\n case \"skip\":\n return _objectSpread({}, result, {\n shouldSkip: getDirectiveValue(directive, info)\n });\n\n default:\n return result;\n }\n }, directiveResult);\n}\n\nfunction flattenAST(ast, info, obj) {\n obj = obj || {};\n return getSelections(ast).reduce(function (flattened, a) {\n if (a.directives && a.directives.length) {\n var _getDirectiveResults = getDirectiveResults(a, info),\n shouldInclude = _getDirectiveResults.shouldInclude,\n shouldSkip = _getDirectiveResults.shouldSkip; // field/fragment is not included if either the @skip condition is true or the @include condition is false\n // https://facebook.github.io/graphql/draft/#sec--include\n\n\n if (shouldSkip || !shouldInclude) {\n return flattened;\n }\n }\n\n if (isFragment(a)) {\n flattened = flattenAST(getAST(a, info), info, flattened);\n } else {\n var name = a.name.value;\n\n if (options.excludedFields.indexOf(name) !== -1) {\n return flattened;\n }\n\n if (flattened[name] && flattened[name] !== '__arguments') {\n _extends(flattened[name], flattenAST(a, info, flattened[name]));\n } else {\n flattened[name] = flattenAST(a, info);\n }\n\n if (options.processArguments) {\n // check if the current field has arguments\n if (a.arguments && a.arguments.length) {\n _extends(flattened[name], {\n __arguments: getArguments(a, info)\n });\n }\n }\n }\n\n return flattened;\n }, obj);\n}\n\nmodule.exports = function graphqlFields(info) {\n var obj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n processArguments: false\n };\n var fields = info.fieldNodes || info.fieldASTs;\n options.processArguments = opts.processArguments;\n options.excludedFields = opts.excludedFields || [];\n return fields.reduce(function (o, ast) {\n return flattenAST(ast, info, o);\n }, obj) || {};\n};","/*! https://mths.be/he v1.2.0 by @mathias | MIT license */\n;(function(root) {\n\n\t// Detect free variables `exports`.\n\tvar freeExports = typeof exports == 'object' && exports;\n\n\t// Detect free variable `module`.\n\tvar freeModule = typeof module == 'object' && module &&\n\t\tmodule.exports == freeExports && module;\n\n\t// Detect free variable `global`, from Node.js or Browserified code,\n\t// and use it as `root`.\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t\troot = freeGlobal;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t// All astral symbols.\n\tvar regexAstralSymbols = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n\t// All ASCII symbols (not just printable ASCII) except those listed in the\n\t// first column of the overrides table.\n\t// https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides\n\tvar regexAsciiWhitelist = /[\\x01-\\x7F]/g;\n\t// All BMP symbols that are not ASCII newlines, printable ASCII symbols, or\n\t// code points listed in the first column of the overrides table on\n\t// https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides.\n\tvar regexBmpWhitelist = /[\\x01-\\t\\x0B\\f\\x0E-\\x1F\\x7F\\x81\\x8D\\x8F\\x90\\x9D\\xA0-\\uFFFF]/g;\n\n\tvar regexEncodeNonAscii = /<\\u20D2|=\\u20E5|>\\u20D2|\\u205F\\u200A|\\u219D\\u0338|\\u2202\\u0338|\\u2220\\u20D2|\\u2229\\uFE00|\\u222A\\uFE00|\\u223C\\u20D2|\\u223D\\u0331|\\u223E\\u0333|\\u2242\\u0338|\\u224B\\u0338|\\u224D\\u20D2|\\u224E\\u0338|\\u224F\\u0338|\\u2250\\u0338|\\u2261\\u20E5|\\u2264\\u20D2|\\u2265\\u20D2|\\u2266\\u0338|\\u2267\\u0338|\\u2268\\uFE00|\\u2269\\uFE00|\\u226A\\u0338|\\u226A\\u20D2|\\u226B\\u0338|\\u226B\\u20D2|\\u227F\\u0338|\\u2282\\u20D2|\\u2283\\u20D2|\\u228A\\uFE00|\\u228B\\uFE00|\\u228F\\u0338|\\u2290\\u0338|\\u2293\\uFE00|\\u2294\\uFE00|\\u22B4\\u20D2|\\u22B5\\u20D2|\\u22D8\\u0338|\\u22D9\\u0338|\\u22DA\\uFE00|\\u22DB\\uFE00|\\u22F5\\u0338|\\u22F9\\u0338|\\u2933\\u0338|\\u29CF\\u0338|\\u29D0\\u0338|\\u2A6D\\u0338|\\u2A70\\u0338|\\u2A7D\\u0338|\\u2A7E\\u0338|\\u2AA1\\u0338|\\u2AA2\\u0338|\\u2AAC\\uFE00|\\u2AAD\\uFE00|\\u2AAF\\u0338|\\u2AB0\\u0338|\\u2AC5\\u0338|\\u2AC6\\u0338|\\u2ACB\\uFE00|\\u2ACC\\uFE00|\\u2AFD\\u20E5|[\\xA0-\\u0113\\u0116-\\u0122\\u0124-\\u012B\\u012E-\\u014D\\u0150-\\u017E\\u0192\\u01B5\\u01F5\\u0237\\u02C6\\u02C7\\u02D8-\\u02DD\\u0311\\u0391-\\u03A1\\u03A3-\\u03A9\\u03B1-\\u03C9\\u03D1\\u03D2\\u03D5\\u03D6\\u03DC\\u03DD\\u03F0\\u03F1\\u03F5\\u03F6\\u0401-\\u040C\\u040E-\\u044F\\u0451-\\u045C\\u045E\\u045F\\u2002-\\u2005\\u2007-\\u2010\\u2013-\\u2016\\u2018-\\u201A\\u201C-\\u201E\\u2020-\\u2022\\u2025\\u2026\\u2030-\\u2035\\u2039\\u203A\\u203E\\u2041\\u2043\\u2044\\u204F\\u2057\\u205F-\\u2063\\u20AC\\u20DB\\u20DC\\u2102\\u2105\\u210A-\\u2113\\u2115-\\u211E\\u2122\\u2124\\u2127-\\u2129\\u212C\\u212D\\u212F-\\u2131\\u2133-\\u2138\\u2145-\\u2148\\u2153-\\u215E\\u2190-\\u219B\\u219D-\\u21A7\\u21A9-\\u21AE\\u21B0-\\u21B3\\u21B5-\\u21B7\\u21BA-\\u21DB\\u21DD\\u21E4\\u21E5\\u21F5\\u21FD-\\u2205\\u2207-\\u2209\\u220B\\u220C\\u220F-\\u2214\\u2216-\\u2218\\u221A\\u221D-\\u2238\\u223A-\\u2257\\u2259\\u225A\\u225C\\u225F-\\u2262\\u2264-\\u228B\\u228D-\\u229B\\u229D-\\u22A5\\u22A7-\\u22B0\\u22B2-\\u22BB\\u22BD-\\u22DB\\u22DE-\\u22E3\\u22E6-\\u22F7\\u22F9-\\u22FE\\u2305\\u2306\\u2308-\\u2310\\u2312\\u2313\\u2315\\u2316\\u231C-\\u231F\\u2322\\u2323\\u232D\\u232E\\u2336\\u233D\\u233F\\u237C\\u23B0\\u23B1\\u23B4-\\u23B6\\u23DC-\\u23DF\\u23E2\\u23E7\\u2423\\u24C8\\u2500\\u2502\\u250C\\u2510\\u2514\\u2518\\u251C\\u2524\\u252C\\u2534\\u253C\\u2550-\\u256C\\u2580\\u2584\\u2588\\u2591-\\u2593\\u25A1\\u25AA\\u25AB\\u25AD\\u25AE\\u25B1\\u25B3-\\u25B5\\u25B8\\u25B9\\u25BD-\\u25BF\\u25C2\\u25C3\\u25CA\\u25CB\\u25EC\\u25EF\\u25F8-\\u25FC\\u2605\\u2606\\u260E\\u2640\\u2642\\u2660\\u2663\\u2665\\u2666\\u266A\\u266D-\\u266F\\u2713\\u2717\\u2720\\u2736\\u2758\\u2772\\u2773\\u27C8\\u27C9\\u27E6-\\u27ED\\u27F5-\\u27FA\\u27FC\\u27FF\\u2902-\\u2905\\u290C-\\u2913\\u2916\\u2919-\\u2920\\u2923-\\u292A\\u2933\\u2935-\\u2939\\u293C\\u293D\\u2945\\u2948-\\u294B\\u294E-\\u2976\\u2978\\u2979\\u297B-\\u297F\\u2985\\u2986\\u298B-\\u2996\\u299A\\u299C\\u299D\\u29A4-\\u29B7\\u29B9\\u29BB\\u29BC\\u29BE-\\u29C5\\u29C9\\u29CD-\\u29D0\\u29DC-\\u29DE\\u29E3-\\u29E5\\u29EB\\u29F4\\u29F6\\u2A00-\\u2A02\\u2A04\\u2A06\\u2A0C\\u2A0D\\u2A10-\\u2A17\\u2A22-\\u2A27\\u2A29\\u2A2A\\u2A2D-\\u2A31\\u2A33-\\u2A3C\\u2A3F\\u2A40\\u2A42-\\u2A4D\\u2A50\\u2A53-\\u2A58\\u2A5A-\\u2A5D\\u2A5F\\u2A66\\u2A6A\\u2A6D-\\u2A75\\u2A77-\\u2A9A\\u2A9D-\\u2AA2\\u2AA4-\\u2AB0\\u2AB3-\\u2AC8\\u2ACB\\u2ACC\\u2ACF-\\u2ADB\\u2AE4\\u2AE6-\\u2AE9\\u2AEB-\\u2AF3\\u2AFD\\uFB00-\\uFB04]|\\uD835[\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDCCF\\uDD04\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDD6B]/g;\n\tvar encodeMap = {'\\xAD':'shy','\\u200C':'zwnj','\\u200D':'zwj','\\u200E':'lrm','\\u2063':'ic','\\u2062':'it','\\u2061':'af','\\u200F':'rlm','\\u200B':'ZeroWidthSpace','\\u2060':'NoBreak','\\u0311':'DownBreve','\\u20DB':'tdot','\\u20DC':'DotDot','\\t':'Tab','\\n':'NewLine','\\u2008':'puncsp','\\u205F':'MediumSpace','\\u2009':'thinsp','\\u200A':'hairsp','\\u2004':'emsp13','\\u2002':'ensp','\\u2005':'emsp14','\\u2003':'emsp','\\u2007':'numsp','\\xA0':'nbsp','\\u205F\\u200A':'ThickSpace','\\u203E':'oline','_':'lowbar','\\u2010':'dash','\\u2013':'ndash','\\u2014':'mdash','\\u2015':'horbar',',':'comma',';':'semi','\\u204F':'bsemi',':':'colon','\\u2A74':'Colone','!':'excl','\\xA1':'iexcl','?':'quest','\\xBF':'iquest','.':'period','\\u2025':'nldr','\\u2026':'mldr','\\xB7':'middot','\\'':'apos','\\u2018':'lsquo','\\u2019':'rsquo','\\u201A':'sbquo','\\u2039':'lsaquo','\\u203A':'rsaquo','\"':'quot','\\u201C':'ldquo','\\u201D':'rdquo','\\u201E':'bdquo','\\xAB':'laquo','\\xBB':'raquo','(':'lpar',')':'rpar','[':'lsqb',']':'rsqb','{':'lcub','}':'rcub','\\u2308':'lceil','\\u2309':'rceil','\\u230A':'lfloor','\\u230B':'rfloor','\\u2985':'lopar','\\u2986':'ropar','\\u298B':'lbrke','\\u298C':'rbrke','\\u298D':'lbrkslu','\\u298E':'rbrksld','\\u298F':'lbrksld','\\u2990':'rbrkslu','\\u2991':'langd','\\u2992':'rangd','\\u2993':'lparlt','\\u2994':'rpargt','\\u2995':'gtlPar','\\u2996':'ltrPar','\\u27E6':'lobrk','\\u27E7':'robrk','\\u27E8':'lang','\\u27E9':'rang','\\u27EA':'Lang','\\u27EB':'Rang','\\u27EC':'loang','\\u27ED':'roang','\\u2772':'lbbrk','\\u2773':'rbbrk','\\u2016':'Vert','\\xA7':'sect','\\xB6':'para','@':'commat','*':'ast','/':'sol','undefined':null,'&':'amp','#':'num','%':'percnt','\\u2030':'permil','\\u2031':'pertenk','\\u2020':'dagger','\\u2021':'Dagger','\\u2022':'bull','\\u2043':'hybull','\\u2032':'prime','\\u2033':'Prime','\\u2034':'tprime','\\u2057':'qprime','\\u2035':'bprime','\\u2041':'caret','`':'grave','\\xB4':'acute','\\u02DC':'tilde','^':'Hat','\\xAF':'macr','\\u02D8':'breve','\\u02D9':'dot','\\xA8':'die','\\u02DA':'ring','\\u02DD':'dblac','\\xB8':'cedil','\\u02DB':'ogon','\\u02C6':'circ','\\u02C7':'caron','\\xB0':'deg','\\xA9':'copy','\\xAE':'reg','\\u2117':'copysr','\\u2118':'wp','\\u211E':'rx','\\u2127':'mho','\\u2129':'iiota','\\u2190':'larr','\\u219A':'nlarr','\\u2192':'rarr','\\u219B':'nrarr','\\u2191':'uarr','\\u2193':'darr','\\u2194':'harr','\\u21AE':'nharr','\\u2195':'varr','\\u2196':'nwarr','\\u2197':'nearr','\\u2198':'searr','\\u2199':'swarr','\\u219D':'rarrw','\\u219D\\u0338':'nrarrw','\\u219E':'Larr','\\u219F':'Uarr','\\u21A0':'Rarr','\\u21A1':'Darr','\\u21A2':'larrtl','\\u21A3':'rarrtl','\\u21A4':'mapstoleft','\\u21A5':'mapstoup','\\u21A6':'map','\\u21A7':'mapstodown','\\u21A9':'larrhk','\\u21AA':'rarrhk','\\u21AB':'larrlp','\\u21AC':'rarrlp','\\u21AD':'harrw','\\u21B0':'lsh','\\u21B1':'rsh','\\u21B2':'ldsh','\\u21B3':'rdsh','\\u21B5':'crarr','\\u21B6':'cularr','\\u21B7':'curarr','\\u21BA':'olarr','\\u21BB':'orarr','\\u21BC':'lharu','\\u21BD':'lhard','\\u21BE':'uharr','\\u21BF':'uharl','\\u21C0':'rharu','\\u21C1':'rhard','\\u21C2':'dharr','\\u21C3':'dharl','\\u21C4':'rlarr','\\u21C5':'udarr','\\u21C6':'lrarr','\\u21C7':'llarr','\\u21C8':'uuarr','\\u21C9':'rrarr','\\u21CA':'ddarr','\\u21CB':'lrhar','\\u21CC':'rlhar','\\u21D0':'lArr','\\u21CD':'nlArr','\\u21D1':'uArr','\\u21D2':'rArr','\\u21CF':'nrArr','\\u21D3':'dArr','\\u21D4':'iff','\\u21CE':'nhArr','\\u21D5':'vArr','\\u21D6':'nwArr','\\u21D7':'neArr','\\u21D8':'seArr','\\u21D9':'swArr','\\u21DA':'lAarr','\\u21DB':'rAarr','\\u21DD':'zigrarr','\\u21E4':'larrb','\\u21E5':'rarrb','\\u21F5':'duarr','\\u21FD':'loarr','\\u21FE':'roarr','\\u21FF':'hoarr','\\u2200':'forall','\\u2201':'comp','\\u2202':'part','\\u2202\\u0338':'npart','\\u2203':'exist','\\u2204':'nexist','\\u2205':'empty','\\u2207':'Del','\\u2208':'in','\\u2209':'notin','\\u220B':'ni','\\u220C':'notni','\\u03F6':'bepsi','\\u220F':'prod','\\u2210':'coprod','\\u2211':'sum','+':'plus','\\xB1':'pm','\\xF7':'div','\\xD7':'times','<':'lt','\\u226E':'nlt','<\\u20D2':'nvlt','=':'equals','\\u2260':'ne','=\\u20E5':'bne','\\u2A75':'Equal','>':'gt','\\u226F':'ngt','>\\u20D2':'nvgt','\\xAC':'not','|':'vert','\\xA6':'brvbar','\\u2212':'minus','\\u2213':'mp','\\u2214':'plusdo','\\u2044':'frasl','\\u2216':'setmn','\\u2217':'lowast','\\u2218':'compfn','\\u221A':'Sqrt','\\u221D':'prop','\\u221E':'infin','\\u221F':'angrt','\\u2220':'ang','\\u2220\\u20D2':'nang','\\u2221':'angmsd','\\u2222':'angsph','\\u2223':'mid','\\u2224':'nmid','\\u2225':'par','\\u2226':'npar','\\u2227':'and','\\u2228':'or','\\u2229':'cap','\\u2229\\uFE00':'caps','\\u222A':'cup','\\u222A\\uFE00':'cups','\\u222B':'int','\\u222C':'Int','\\u222D':'tint','\\u2A0C':'qint','\\u222E':'oint','\\u222F':'Conint','\\u2230':'Cconint','\\u2231':'cwint','\\u2232':'cwconint','\\u2233':'awconint','\\u2234':'there4','\\u2235':'becaus','\\u2236':'ratio','\\u2237':'Colon','\\u2238':'minusd','\\u223A':'mDDot','\\u223B':'homtht','\\u223C':'sim','\\u2241':'nsim','\\u223C\\u20D2':'nvsim','\\u223D':'bsim','\\u223D\\u0331':'race','\\u223E':'ac','\\u223E\\u0333':'acE','\\u223F':'acd','\\u2240':'wr','\\u2242':'esim','\\u2242\\u0338':'nesim','\\u2243':'sime','\\u2244':'nsime','\\u2245':'cong','\\u2247':'ncong','\\u2246':'simne','\\u2248':'ap','\\u2249':'nap','\\u224A':'ape','\\u224B':'apid','\\u224B\\u0338':'napid','\\u224C':'bcong','\\u224D':'CupCap','\\u226D':'NotCupCap','\\u224D\\u20D2':'nvap','\\u224E':'bump','\\u224E\\u0338':'nbump','\\u224F':'bumpe','\\u224F\\u0338':'nbumpe','\\u2250':'doteq','\\u2250\\u0338':'nedot','\\u2251':'eDot','\\u2252':'efDot','\\u2253':'erDot','\\u2254':'colone','\\u2255':'ecolon','\\u2256':'ecir','\\u2257':'cire','\\u2259':'wedgeq','\\u225A':'veeeq','\\u225C':'trie','\\u225F':'equest','\\u2261':'equiv','\\u2262':'nequiv','\\u2261\\u20E5':'bnequiv','\\u2264':'le','\\u2270':'nle','\\u2264\\u20D2':'nvle','\\u2265':'ge','\\u2271':'nge','\\u2265\\u20D2':'nvge','\\u2266':'lE','\\u2266\\u0338':'nlE','\\u2267':'gE','\\u2267\\u0338':'ngE','\\u2268\\uFE00':'lvnE','\\u2268':'lnE','\\u2269':'gnE','\\u2269\\uFE00':'gvnE','\\u226A':'ll','\\u226A\\u0338':'nLtv','\\u226A\\u20D2':'nLt','\\u226B':'gg','\\u226B\\u0338':'nGtv','\\u226B\\u20D2':'nGt','\\u226C':'twixt','\\u2272':'lsim','\\u2274':'nlsim','\\u2273':'gsim','\\u2275':'ngsim','\\u2276':'lg','\\u2278':'ntlg','\\u2277':'gl','\\u2279':'ntgl','\\u227A':'pr','\\u2280':'npr','\\u227B':'sc','\\u2281':'nsc','\\u227C':'prcue','\\u22E0':'nprcue','\\u227D':'sccue','\\u22E1':'nsccue','\\u227E':'prsim','\\u227F':'scsim','\\u227F\\u0338':'NotSucceedsTilde','\\u2282':'sub','\\u2284':'nsub','\\u2282\\u20D2':'vnsub','\\u2283':'sup','\\u2285':'nsup','\\u2283\\u20D2':'vnsup','\\u2286':'sube','\\u2288':'nsube','\\u2287':'supe','\\u2289':'nsupe','\\u228A\\uFE00':'vsubne','\\u228A':'subne','\\u228B\\uFE00':'vsupne','\\u228B':'supne','\\u228D':'cupdot','\\u228E':'uplus','\\u228F':'sqsub','\\u228F\\u0338':'NotSquareSubset','\\u2290':'sqsup','\\u2290\\u0338':'NotSquareSuperset','\\u2291':'sqsube','\\u22E2':'nsqsube','\\u2292':'sqsupe','\\u22E3':'nsqsupe','\\u2293':'sqcap','\\u2293\\uFE00':'sqcaps','\\u2294':'sqcup','\\u2294\\uFE00':'sqcups','\\u2295':'oplus','\\u2296':'ominus','\\u2297':'otimes','\\u2298':'osol','\\u2299':'odot','\\u229A':'ocir','\\u229B':'oast','\\u229D':'odash','\\u229E':'plusb','\\u229F':'minusb','\\u22A0':'timesb','\\u22A1':'sdotb','\\u22A2':'vdash','\\u22AC':'nvdash','\\u22A3':'dashv','\\u22A4':'top','\\u22A5':'bot','\\u22A7':'models','\\u22A8':'vDash','\\u22AD':'nvDash','\\u22A9':'Vdash','\\u22AE':'nVdash','\\u22AA':'Vvdash','\\u22AB':'VDash','\\u22AF':'nVDash','\\u22B0':'prurel','\\u22B2':'vltri','\\u22EA':'nltri','\\u22B3':'vrtri','\\u22EB':'nrtri','\\u22B4':'ltrie','\\u22EC':'nltrie','\\u22B4\\u20D2':'nvltrie','\\u22B5':'rtrie','\\u22ED':'nrtrie','\\u22B5\\u20D2':'nvrtrie','\\u22B6':'origof','\\u22B7':'imof','\\u22B8':'mumap','\\u22B9':'hercon','\\u22BA':'intcal','\\u22BB':'veebar','\\u22BD':'barvee','\\u22BE':'angrtvb','\\u22BF':'lrtri','\\u22C0':'Wedge','\\u22C1':'Vee','\\u22C2':'xcap','\\u22C3':'xcup','\\u22C4':'diam','\\u22C5':'sdot','\\u22C6':'Star','\\u22C7':'divonx','\\u22C8':'bowtie','\\u22C9':'ltimes','\\u22CA':'rtimes','\\u22CB':'lthree','\\u22CC':'rthree','\\u22CD':'bsime','\\u22CE':'cuvee','\\u22CF':'cuwed','\\u22D0':'Sub','\\u22D1':'Sup','\\u22D2':'Cap','\\u22D3':'Cup','\\u22D4':'fork','\\u22D5':'epar','\\u22D6':'ltdot','\\u22D7':'gtdot','\\u22D8':'Ll','\\u22D8\\u0338':'nLl','\\u22D9':'Gg','\\u22D9\\u0338':'nGg','\\u22DA\\uFE00':'lesg','\\u22DA':'leg','\\u22DB':'gel','\\u22DB\\uFE00':'gesl','\\u22DE':'cuepr','\\u22DF':'cuesc','\\u22E6':'lnsim','\\u22E7':'gnsim','\\u22E8':'prnsim','\\u22E9':'scnsim','\\u22EE':'vellip','\\u22EF':'ctdot','\\u22F0':'utdot','\\u22F1':'dtdot','\\u22F2':'disin','\\u22F3':'isinsv','\\u22F4':'isins','\\u22F5':'isindot','\\u22F5\\u0338':'notindot','\\u22F6':'notinvc','\\u22F7':'notinvb','\\u22F9':'isinE','\\u22F9\\u0338':'notinE','\\u22FA':'nisd','\\u22FB':'xnis','\\u22FC':'nis','\\u22FD':'notnivc','\\u22FE':'notnivb','\\u2305':'barwed','\\u2306':'Barwed','\\u230C':'drcrop','\\u230D':'dlcrop','\\u230E':'urcrop','\\u230F':'ulcrop','\\u2310':'bnot','\\u2312':'profline','\\u2313':'profsurf','\\u2315':'telrec','\\u2316':'target','\\u231C':'ulcorn','\\u231D':'urcorn','\\u231E':'dlcorn','\\u231F':'drcorn','\\u2322':'frown','\\u2323':'smile','\\u232D':'cylcty','\\u232E':'profalar','\\u2336':'topbot','\\u233D':'ovbar','\\u233F':'solbar','\\u237C':'angzarr','\\u23B0':'lmoust','\\u23B1':'rmoust','\\u23B4':'tbrk','\\u23B5':'bbrk','\\u23B6':'bbrktbrk','\\u23DC':'OverParenthesis','\\u23DD':'UnderParenthesis','\\u23DE':'OverBrace','\\u23DF':'UnderBrace','\\u23E2':'trpezium','\\u23E7':'elinters','\\u2423':'blank','\\u2500':'boxh','\\u2502':'boxv','\\u250C':'boxdr','\\u2510':'boxdl','\\u2514':'boxur','\\u2518':'boxul','\\u251C':'boxvr','\\u2524':'boxvl','\\u252C':'boxhd','\\u2534':'boxhu','\\u253C':'boxvh','\\u2550':'boxH','\\u2551':'boxV','\\u2552':'boxdR','\\u2553':'boxDr','\\u2554':'boxDR','\\u2555':'boxdL','\\u2556':'boxDl','\\u2557':'boxDL','\\u2558':'boxuR','\\u2559':'boxUr','\\u255A':'boxUR','\\u255B':'boxuL','\\u255C':'boxUl','\\u255D':'boxUL','\\u255E':'boxvR','\\u255F':'boxVr','\\u2560':'boxVR','\\u2561':'boxvL','\\u2562':'boxVl','\\u2563':'boxVL','\\u2564':'boxHd','\\u2565':'boxhD','\\u2566':'boxHD','\\u2567':'boxHu','\\u2568':'boxhU','\\u2569':'boxHU','\\u256A':'boxvH','\\u256B':'boxVh','\\u256C':'boxVH','\\u2580':'uhblk','\\u2584':'lhblk','\\u2588':'block','\\u2591':'blk14','\\u2592':'blk12','\\u2593':'blk34','\\u25A1':'squ','\\u25AA':'squf','\\u25AB':'EmptyVerySmallSquare','\\u25AD':'rect','\\u25AE':'marker','\\u25B1':'fltns','\\u25B3':'xutri','\\u25B4':'utrif','\\u25B5':'utri','\\u25B8':'rtrif','\\u25B9':'rtri','\\u25BD':'xdtri','\\u25BE':'dtrif','\\u25BF':'dtri','\\u25C2':'ltrif','\\u25C3':'ltri','\\u25CA':'loz','\\u25CB':'cir','\\u25EC':'tridot','\\u25EF':'xcirc','\\u25F8':'ultri','\\u25F9':'urtri','\\u25FA':'lltri','\\u25FB':'EmptySmallSquare','\\u25FC':'FilledSmallSquare','\\u2605':'starf','\\u2606':'star','\\u260E':'phone','\\u2640':'female','\\u2642':'male','\\u2660':'spades','\\u2663':'clubs','\\u2665':'hearts','\\u2666':'diams','\\u266A':'sung','\\u2713':'check','\\u2717':'cross','\\u2720':'malt','\\u2736':'sext','\\u2758':'VerticalSeparator','\\u27C8':'bsolhsub','\\u27C9':'suphsol','\\u27F5':'xlarr','\\u27F6':'xrarr','\\u27F7':'xharr','\\u27F8':'xlArr','\\u27F9':'xrArr','\\u27FA':'xhArr','\\u27FC':'xmap','\\u27FF':'dzigrarr','\\u2902':'nvlArr','\\u2903':'nvrArr','\\u2904':'nvHarr','\\u2905':'Map','\\u290C':'lbarr','\\u290D':'rbarr','\\u290E':'lBarr','\\u290F':'rBarr','\\u2910':'RBarr','\\u2911':'DDotrahd','\\u2912':'UpArrowBar','\\u2913':'DownArrowBar','\\u2916':'Rarrtl','\\u2919':'latail','\\u291A':'ratail','\\u291B':'lAtail','\\u291C':'rAtail','\\u291D':'larrfs','\\u291E':'rarrfs','\\u291F':'larrbfs','\\u2920':'rarrbfs','\\u2923':'nwarhk','\\u2924':'nearhk','\\u2925':'searhk','\\u2926':'swarhk','\\u2927':'nwnear','\\u2928':'toea','\\u2929':'tosa','\\u292A':'swnwar','\\u2933':'rarrc','\\u2933\\u0338':'nrarrc','\\u2935':'cudarrr','\\u2936':'ldca','\\u2937':'rdca','\\u2938':'cudarrl','\\u2939':'larrpl','\\u293C':'curarrm','\\u293D':'cularrp','\\u2945':'rarrpl','\\u2948':'harrcir','\\u2949':'Uarrocir','\\u294A':'lurdshar','\\u294B':'ldrushar','\\u294E':'LeftRightVector','\\u294F':'RightUpDownVector','\\u2950':'DownLeftRightVector','\\u2951':'LeftUpDownVector','\\u2952':'LeftVectorBar','\\u2953':'RightVectorBar','\\u2954':'RightUpVectorBar','\\u2955':'RightDownVectorBar','\\u2956':'DownLeftVectorBar','\\u2957':'DownRightVectorBar','\\u2958':'LeftUpVectorBar','\\u2959':'LeftDownVectorBar','\\u295A':'LeftTeeVector','\\u295B':'RightTeeVector','\\u295C':'RightUpTeeVector','\\u295D':'RightDownTeeVector','\\u295E':'DownLeftTeeVector','\\u295F':'DownRightTeeVector','\\u2960':'LeftUpTeeVector','\\u2961':'LeftDownTeeVector','\\u2962':'lHar','\\u2963':'uHar','\\u2964':'rHar','\\u2965':'dHar','\\u2966':'luruhar','\\u2967':'ldrdhar','\\u2968':'ruluhar','\\u2969':'rdldhar','\\u296A':'lharul','\\u296B':'llhard','\\u296C':'rharul','\\u296D':'lrhard','\\u296E':'udhar','\\u296F':'duhar','\\u2970':'RoundImplies','\\u2971':'erarr','\\u2972':'simrarr','\\u2973':'larrsim','\\u2974':'rarrsim','\\u2975':'rarrap','\\u2976':'ltlarr','\\u2978':'gtrarr','\\u2979':'subrarr','\\u297B':'suplarr','\\u297C':'lfisht','\\u297D':'rfisht','\\u297E':'ufisht','\\u297F':'dfisht','\\u299A':'vzigzag','\\u299C':'vangrt','\\u299D':'angrtvbd','\\u29A4':'ange','\\u29A5':'range','\\u29A6':'dwangle','\\u29A7':'uwangle','\\u29A8':'angmsdaa','\\u29A9':'angmsdab','\\u29AA':'angmsdac','\\u29AB':'angmsdad','\\u29AC':'angmsdae','\\u29AD':'angmsdaf','\\u29AE':'angmsdag','\\u29AF':'angmsdah','\\u29B0':'bemptyv','\\u29B1':'demptyv','\\u29B2':'cemptyv','\\u29B3':'raemptyv','\\u29B4':'laemptyv','\\u29B5':'ohbar','\\u29B6':'omid','\\u29B7':'opar','\\u29B9':'operp','\\u29BB':'olcross','\\u29BC':'odsold','\\u29BE':'olcir','\\u29BF':'ofcir','\\u29C0':'olt','\\u29C1':'ogt','\\u29C2':'cirscir','\\u29C3':'cirE','\\u29C4':'solb','\\u29C5':'bsolb','\\u29C9':'boxbox','\\u29CD':'trisb','\\u29CE':'rtriltri','\\u29CF':'LeftTriangleBar','\\u29CF\\u0338':'NotLeftTriangleBar','\\u29D0':'RightTriangleBar','\\u29D0\\u0338':'NotRightTriangleBar','\\u29DC':'iinfin','\\u29DD':'infintie','\\u29DE':'nvinfin','\\u29E3':'eparsl','\\u29E4':'smeparsl','\\u29E5':'eqvparsl','\\u29EB':'lozf','\\u29F4':'RuleDelayed','\\u29F6':'dsol','\\u2A00':'xodot','\\u2A01':'xoplus','\\u2A02':'xotime','\\u2A04':'xuplus','\\u2A06':'xsqcup','\\u2A0D':'fpartint','\\u2A10':'cirfnint','\\u2A11':'awint','\\u2A12':'rppolint','\\u2A13':'scpolint','\\u2A14':'npolint','\\u2A15':'pointint','\\u2A16':'quatint','\\u2A17':'intlarhk','\\u2A22':'pluscir','\\u2A23':'plusacir','\\u2A24':'simplus','\\u2A25':'plusdu','\\u2A26':'plussim','\\u2A27':'plustwo','\\u2A29':'mcomma','\\u2A2A':'minusdu','\\u2A2D':'loplus','\\u2A2E':'roplus','\\u2A2F':'Cross','\\u2A30':'timesd','\\u2A31':'timesbar','\\u2A33':'smashp','\\u2A34':'lotimes','\\u2A35':'rotimes','\\u2A36':'otimesas','\\u2A37':'Otimes','\\u2A38':'odiv','\\u2A39':'triplus','\\u2A3A':'triminus','\\u2A3B':'tritime','\\u2A3C':'iprod','\\u2A3F':'amalg','\\u2A40':'capdot','\\u2A42':'ncup','\\u2A43':'ncap','\\u2A44':'capand','\\u2A45':'cupor','\\u2A46':'cupcap','\\u2A47':'capcup','\\u2A48':'cupbrcap','\\u2A49':'capbrcup','\\u2A4A':'cupcup','\\u2A4B':'capcap','\\u2A4C':'ccups','\\u2A4D':'ccaps','\\u2A50':'ccupssm','\\u2A53':'And','\\u2A54':'Or','\\u2A55':'andand','\\u2A56':'oror','\\u2A57':'orslope','\\u2A58':'andslope','\\u2A5A':'andv','\\u2A5B':'orv','\\u2A5C':'andd','\\u2A5D':'ord','\\u2A5F':'wedbar','\\u2A66':'sdote','\\u2A6A':'simdot','\\u2A6D':'congdot','\\u2A6D\\u0338':'ncongdot','\\u2A6E':'easter','\\u2A6F':'apacir','\\u2A70':'apE','\\u2A70\\u0338':'napE','\\u2A71':'eplus','\\u2A72':'pluse','\\u2A73':'Esim','\\u2A77':'eDDot','\\u2A78':'equivDD','\\u2A79':'ltcir','\\u2A7A':'gtcir','\\u2A7B':'ltquest','\\u2A7C':'gtquest','\\u2A7D':'les','\\u2A7D\\u0338':'nles','\\u2A7E':'ges','\\u2A7E\\u0338':'nges','\\u2A7F':'lesdot','\\u2A80':'gesdot','\\u2A81':'lesdoto','\\u2A82':'gesdoto','\\u2A83':'lesdotor','\\u2A84':'gesdotol','\\u2A85':'lap','\\u2A86':'gap','\\u2A87':'lne','\\u2A88':'gne','\\u2A89':'lnap','\\u2A8A':'gnap','\\u2A8B':'lEg','\\u2A8C':'gEl','\\u2A8D':'lsime','\\u2A8E':'gsime','\\u2A8F':'lsimg','\\u2A90':'gsiml','\\u2A91':'lgE','\\u2A92':'glE','\\u2A93':'lesges','\\u2A94':'gesles','\\u2A95':'els','\\u2A96':'egs','\\u2A97':'elsdot','\\u2A98':'egsdot','\\u2A99':'el','\\u2A9A':'eg','\\u2A9D':'siml','\\u2A9E':'simg','\\u2A9F':'simlE','\\u2AA0':'simgE','\\u2AA1':'LessLess','\\u2AA1\\u0338':'NotNestedLessLess','\\u2AA2':'GreaterGreater','\\u2AA2\\u0338':'NotNestedGreaterGreater','\\u2AA4':'glj','\\u2AA5':'gla','\\u2AA6':'ltcc','\\u2AA7':'gtcc','\\u2AA8':'lescc','\\u2AA9':'gescc','\\u2AAA':'smt','\\u2AAB':'lat','\\u2AAC':'smte','\\u2AAC\\uFE00':'smtes','\\u2AAD':'late','\\u2AAD\\uFE00':'lates','\\u2AAE':'bumpE','\\u2AAF':'pre','\\u2AAF\\u0338':'npre','\\u2AB0':'sce','\\u2AB0\\u0338':'nsce','\\u2AB3':'prE','\\u2AB4':'scE','\\u2AB5':'prnE','\\u2AB6':'scnE','\\u2AB7':'prap','\\u2AB8':'scap','\\u2AB9':'prnap','\\u2ABA':'scnap','\\u2ABB':'Pr','\\u2ABC':'Sc','\\u2ABD':'subdot','\\u2ABE':'supdot','\\u2ABF':'subplus','\\u2AC0':'supplus','\\u2AC1':'submult','\\u2AC2':'supmult','\\u2AC3':'subedot','\\u2AC4':'supedot','\\u2AC5':'subE','\\u2AC5\\u0338':'nsubE','\\u2AC6':'supE','\\u2AC6\\u0338':'nsupE','\\u2AC7':'subsim','\\u2AC8':'supsim','\\u2ACB\\uFE00':'vsubnE','\\u2ACB':'subnE','\\u2ACC\\uFE00':'vsupnE','\\u2ACC':'supnE','\\u2ACF':'csub','\\u2AD0':'csup','\\u2AD1':'csube','\\u2AD2':'csupe','\\u2AD3':'subsup','\\u2AD4':'supsub','\\u2AD5':'subsub','\\u2AD6':'supsup','\\u2AD7':'suphsub','\\u2AD8':'supdsub','\\u2AD9':'forkv','\\u2ADA':'topfork','\\u2ADB':'mlcp','\\u2AE4':'Dashv','\\u2AE6':'Vdashl','\\u2AE7':'Barv','\\u2AE8':'vBar','\\u2AE9':'vBarv','\\u2AEB':'Vbar','\\u2AEC':'Not','\\u2AED':'bNot','\\u2AEE':'rnmid','\\u2AEF':'cirmid','\\u2AF0':'midcir','\\u2AF1':'topcir','\\u2AF2':'nhpar','\\u2AF3':'parsim','\\u2AFD':'parsl','\\u2AFD\\u20E5':'nparsl','\\u266D':'flat','\\u266E':'natur','\\u266F':'sharp','\\xA4':'curren','\\xA2':'cent','$':'dollar','\\xA3':'pound','\\xA5':'yen','\\u20AC':'euro','\\xB9':'sup1','\\xBD':'half','\\u2153':'frac13','\\xBC':'frac14','\\u2155':'frac15','\\u2159':'frac16','\\u215B':'frac18','\\xB2':'sup2','\\u2154':'frac23','\\u2156':'frac25','\\xB3':'sup3','\\xBE':'frac34','\\u2157':'frac35','\\u215C':'frac38','\\u2158':'frac45','\\u215A':'frac56','\\u215D':'frac58','\\u215E':'frac78','\\uD835\\uDCB6':'ascr','\\uD835\\uDD52':'aopf','\\uD835\\uDD1E':'afr','\\uD835\\uDD38':'Aopf','\\uD835\\uDD04':'Afr','\\uD835\\uDC9C':'Ascr','\\xAA':'ordf','\\xE1':'aacute','\\xC1':'Aacute','\\xE0':'agrave','\\xC0':'Agrave','\\u0103':'abreve','\\u0102':'Abreve','\\xE2':'acirc','\\xC2':'Acirc','\\xE5':'aring','\\xC5':'angst','\\xE4':'auml','\\xC4':'Auml','\\xE3':'atilde','\\xC3':'Atilde','\\u0105':'aogon','\\u0104':'Aogon','\\u0101':'amacr','\\u0100':'Amacr','\\xE6':'aelig','\\xC6':'AElig','\\uD835\\uDCB7':'bscr','\\uD835\\uDD53':'bopf','\\uD835\\uDD1F':'bfr','\\uD835\\uDD39':'Bopf','\\u212C':'Bscr','\\uD835\\uDD05':'Bfr','\\uD835\\uDD20':'cfr','\\uD835\\uDCB8':'cscr','\\uD835\\uDD54':'copf','\\u212D':'Cfr','\\uD835\\uDC9E':'Cscr','\\u2102':'Copf','\\u0107':'cacute','\\u0106':'Cacute','\\u0109':'ccirc','\\u0108':'Ccirc','\\u010D':'ccaron','\\u010C':'Ccaron','\\u010B':'cdot','\\u010A':'Cdot','\\xE7':'ccedil','\\xC7':'Ccedil','\\u2105':'incare','\\uD835\\uDD21':'dfr','\\u2146':'dd','\\uD835\\uDD55':'dopf','\\uD835\\uDCB9':'dscr','\\uD835\\uDC9F':'Dscr','\\uD835\\uDD07':'Dfr','\\u2145':'DD','\\uD835\\uDD3B':'Dopf','\\u010F':'dcaron','\\u010E':'Dcaron','\\u0111':'dstrok','\\u0110':'Dstrok','\\xF0':'eth','\\xD0':'ETH','\\u2147':'ee','\\u212F':'escr','\\uD835\\uDD22':'efr','\\uD835\\uDD56':'eopf','\\u2130':'Escr','\\uD835\\uDD08':'Efr','\\uD835\\uDD3C':'Eopf','\\xE9':'eacute','\\xC9':'Eacute','\\xE8':'egrave','\\xC8':'Egrave','\\xEA':'ecirc','\\xCA':'Ecirc','\\u011B':'ecaron','\\u011A':'Ecaron','\\xEB':'euml','\\xCB':'Euml','\\u0117':'edot','\\u0116':'Edot','\\u0119':'eogon','\\u0118':'Eogon','\\u0113':'emacr','\\u0112':'Emacr','\\uD835\\uDD23':'ffr','\\uD835\\uDD57':'fopf','\\uD835\\uDCBB':'fscr','\\uD835\\uDD09':'Ffr','\\uD835\\uDD3D':'Fopf','\\u2131':'Fscr','\\uFB00':'fflig','\\uFB03':'ffilig','\\uFB04':'ffllig','\\uFB01':'filig','fj':'fjlig','\\uFB02':'fllig','\\u0192':'fnof','\\u210A':'gscr','\\uD835\\uDD58':'gopf','\\uD835\\uDD24':'gfr','\\uD835\\uDCA2':'Gscr','\\uD835\\uDD3E':'Gopf','\\uD835\\uDD0A':'Gfr','\\u01F5':'gacute','\\u011F':'gbreve','\\u011E':'Gbreve','\\u011D':'gcirc','\\u011C':'Gcirc','\\u0121':'gdot','\\u0120':'Gdot','\\u0122':'Gcedil','\\uD835\\uDD25':'hfr','\\u210E':'planckh','\\uD835\\uDCBD':'hscr','\\uD835\\uDD59':'hopf','\\u210B':'Hscr','\\u210C':'Hfr','\\u210D':'Hopf','\\u0125':'hcirc','\\u0124':'Hcirc','\\u210F':'hbar','\\u0127':'hstrok','\\u0126':'Hstrok','\\uD835\\uDD5A':'iopf','\\uD835\\uDD26':'ifr','\\uD835\\uDCBE':'iscr','\\u2148':'ii','\\uD835\\uDD40':'Iopf','\\u2110':'Iscr','\\u2111':'Im','\\xED':'iacute','\\xCD':'Iacute','\\xEC':'igrave','\\xCC':'Igrave','\\xEE':'icirc','\\xCE':'Icirc','\\xEF':'iuml','\\xCF':'Iuml','\\u0129':'itilde','\\u0128':'Itilde','\\u0130':'Idot','\\u012F':'iogon','\\u012E':'Iogon','\\u012B':'imacr','\\u012A':'Imacr','\\u0133':'ijlig','\\u0132':'IJlig','\\u0131':'imath','\\uD835\\uDCBF':'jscr','\\uD835\\uDD5B':'jopf','\\uD835\\uDD27':'jfr','\\uD835\\uDCA5':'Jscr','\\uD835\\uDD0D':'Jfr','\\uD835\\uDD41':'Jopf','\\u0135':'jcirc','\\u0134':'Jcirc','\\u0237':'jmath','\\uD835\\uDD5C':'kopf','\\uD835\\uDCC0':'kscr','\\uD835\\uDD28':'kfr','\\uD835\\uDCA6':'Kscr','\\uD835\\uDD42':'Kopf','\\uD835\\uDD0E':'Kfr','\\u0137':'kcedil','\\u0136':'Kcedil','\\uD835\\uDD29':'lfr','\\uD835\\uDCC1':'lscr','\\u2113':'ell','\\uD835\\uDD5D':'lopf','\\u2112':'Lscr','\\uD835\\uDD0F':'Lfr','\\uD835\\uDD43':'Lopf','\\u013A':'lacute','\\u0139':'Lacute','\\u013E':'lcaron','\\u013D':'Lcaron','\\u013C':'lcedil','\\u013B':'Lcedil','\\u0142':'lstrok','\\u0141':'Lstrok','\\u0140':'lmidot','\\u013F':'Lmidot','\\uD835\\uDD2A':'mfr','\\uD835\\uDD5E':'mopf','\\uD835\\uDCC2':'mscr','\\uD835\\uDD10':'Mfr','\\uD835\\uDD44':'Mopf','\\u2133':'Mscr','\\uD835\\uDD2B':'nfr','\\uD835\\uDD5F':'nopf','\\uD835\\uDCC3':'nscr','\\u2115':'Nopf','\\uD835\\uDCA9':'Nscr','\\uD835\\uDD11':'Nfr','\\u0144':'nacute','\\u0143':'Nacute','\\u0148':'ncaron','\\u0147':'Ncaron','\\xF1':'ntilde','\\xD1':'Ntilde','\\u0146':'ncedil','\\u0145':'Ncedil','\\u2116':'numero','\\u014B':'eng','\\u014A':'ENG','\\uD835\\uDD60':'oopf','\\uD835\\uDD2C':'ofr','\\u2134':'oscr','\\uD835\\uDCAA':'Oscr','\\uD835\\uDD12':'Ofr','\\uD835\\uDD46':'Oopf','\\xBA':'ordm','\\xF3':'oacute','\\xD3':'Oacute','\\xF2':'ograve','\\xD2':'Ograve','\\xF4':'ocirc','\\xD4':'Ocirc','\\xF6':'ouml','\\xD6':'Ouml','\\u0151':'odblac','\\u0150':'Odblac','\\xF5':'otilde','\\xD5':'Otilde','\\xF8':'oslash','\\xD8':'Oslash','\\u014D':'omacr','\\u014C':'Omacr','\\u0153':'oelig','\\u0152':'OElig','\\uD835\\uDD2D':'pfr','\\uD835\\uDCC5':'pscr','\\uD835\\uDD61':'popf','\\u2119':'Popf','\\uD835\\uDD13':'Pfr','\\uD835\\uDCAB':'Pscr','\\uD835\\uDD62':'qopf','\\uD835\\uDD2E':'qfr','\\uD835\\uDCC6':'qscr','\\uD835\\uDCAC':'Qscr','\\uD835\\uDD14':'Qfr','\\u211A':'Qopf','\\u0138':'kgreen','\\uD835\\uDD2F':'rfr','\\uD835\\uDD63':'ropf','\\uD835\\uDCC7':'rscr','\\u211B':'Rscr','\\u211C':'Re','\\u211D':'Ropf','\\u0155':'racute','\\u0154':'Racute','\\u0159':'rcaron','\\u0158':'Rcaron','\\u0157':'rcedil','\\u0156':'Rcedil','\\uD835\\uDD64':'sopf','\\uD835\\uDCC8':'sscr','\\uD835\\uDD30':'sfr','\\uD835\\uDD4A':'Sopf','\\uD835\\uDD16':'Sfr','\\uD835\\uDCAE':'Sscr','\\u24C8':'oS','\\u015B':'sacute','\\u015A':'Sacute','\\u015D':'scirc','\\u015C':'Scirc','\\u0161':'scaron','\\u0160':'Scaron','\\u015F':'scedil','\\u015E':'Scedil','\\xDF':'szlig','\\uD835\\uDD31':'tfr','\\uD835\\uDCC9':'tscr','\\uD835\\uDD65':'topf','\\uD835\\uDCAF':'Tscr','\\uD835\\uDD17':'Tfr','\\uD835\\uDD4B':'Topf','\\u0165':'tcaron','\\u0164':'Tcaron','\\u0163':'tcedil','\\u0162':'Tcedil','\\u2122':'trade','\\u0167':'tstrok','\\u0166':'Tstrok','\\uD835\\uDCCA':'uscr','\\uD835\\uDD66':'uopf','\\uD835\\uDD32':'ufr','\\uD835\\uDD4C':'Uopf','\\uD835\\uDD18':'Ufr','\\uD835\\uDCB0':'Uscr','\\xFA':'uacute','\\xDA':'Uacute','\\xF9':'ugrave','\\xD9':'Ugrave','\\u016D':'ubreve','\\u016C':'Ubreve','\\xFB':'ucirc','\\xDB':'Ucirc','\\u016F':'uring','\\u016E':'Uring','\\xFC':'uuml','\\xDC':'Uuml','\\u0171':'udblac','\\u0170':'Udblac','\\u0169':'utilde','\\u0168':'Utilde','\\u0173':'uogon','\\u0172':'Uogon','\\u016B':'umacr','\\u016A':'Umacr','\\uD835\\uDD33':'vfr','\\uD835\\uDD67':'vopf','\\uD835\\uDCCB':'vscr','\\uD835\\uDD19':'Vfr','\\uD835\\uDD4D':'Vopf','\\uD835\\uDCB1':'Vscr','\\uD835\\uDD68':'wopf','\\uD835\\uDCCC':'wscr','\\uD835\\uDD34':'wfr','\\uD835\\uDCB2':'Wscr','\\uD835\\uDD4E':'Wopf','\\uD835\\uDD1A':'Wfr','\\u0175':'wcirc','\\u0174':'Wcirc','\\uD835\\uDD35':'xfr','\\uD835\\uDCCD':'xscr','\\uD835\\uDD69':'xopf','\\uD835\\uDD4F':'Xopf','\\uD835\\uDD1B':'Xfr','\\uD835\\uDCB3':'Xscr','\\uD835\\uDD36':'yfr','\\uD835\\uDCCE':'yscr','\\uD835\\uDD6A':'yopf','\\uD835\\uDCB4':'Yscr','\\uD835\\uDD1C':'Yfr','\\uD835\\uDD50':'Yopf','\\xFD':'yacute','\\xDD':'Yacute','\\u0177':'ycirc','\\u0176':'Ycirc','\\xFF':'yuml','\\u0178':'Yuml','\\uD835\\uDCCF':'zscr','\\uD835\\uDD37':'zfr','\\uD835\\uDD6B':'zopf','\\u2128':'Zfr','\\u2124':'Zopf','\\uD835\\uDCB5':'Zscr','\\u017A':'zacute','\\u0179':'Zacute','\\u017E':'zcaron','\\u017D':'Zcaron','\\u017C':'zdot','\\u017B':'Zdot','\\u01B5':'imped','\\xFE':'thorn','\\xDE':'THORN','\\u0149':'napos','\\u03B1':'alpha','\\u0391':'Alpha','\\u03B2':'beta','\\u0392':'Beta','\\u03B3':'gamma','\\u0393':'Gamma','\\u03B4':'delta','\\u0394':'Delta','\\u03B5':'epsi','\\u03F5':'epsiv','\\u0395':'Epsilon','\\u03DD':'gammad','\\u03DC':'Gammad','\\u03B6':'zeta','\\u0396':'Zeta','\\u03B7':'eta','\\u0397':'Eta','\\u03B8':'theta','\\u03D1':'thetav','\\u0398':'Theta','\\u03B9':'iota','\\u0399':'Iota','\\u03BA':'kappa','\\u03F0':'kappav','\\u039A':'Kappa','\\u03BB':'lambda','\\u039B':'Lambda','\\u03BC':'mu','\\xB5':'micro','\\u039C':'Mu','\\u03BD':'nu','\\u039D':'Nu','\\u03BE':'xi','\\u039E':'Xi','\\u03BF':'omicron','\\u039F':'Omicron','\\u03C0':'pi','\\u03D6':'piv','\\u03A0':'Pi','\\u03C1':'rho','\\u03F1':'rhov','\\u03A1':'Rho','\\u03C3':'sigma','\\u03A3':'Sigma','\\u03C2':'sigmaf','\\u03C4':'tau','\\u03A4':'Tau','\\u03C5':'upsi','\\u03A5':'Upsilon','\\u03D2':'Upsi','\\u03C6':'phi','\\u03D5':'phiv','\\u03A6':'Phi','\\u03C7':'chi','\\u03A7':'Chi','\\u03C8':'psi','\\u03A8':'Psi','\\u03C9':'omega','\\u03A9':'ohm','\\u0430':'acy','\\u0410':'Acy','\\u0431':'bcy','\\u0411':'Bcy','\\u0432':'vcy','\\u0412':'Vcy','\\u0433':'gcy','\\u0413':'Gcy','\\u0453':'gjcy','\\u0403':'GJcy','\\u0434':'dcy','\\u0414':'Dcy','\\u0452':'djcy','\\u0402':'DJcy','\\u0435':'iecy','\\u0415':'IEcy','\\u0451':'iocy','\\u0401':'IOcy','\\u0454':'jukcy','\\u0404':'Jukcy','\\u0436':'zhcy','\\u0416':'ZHcy','\\u0437':'zcy','\\u0417':'Zcy','\\u0455':'dscy','\\u0405':'DScy','\\u0438':'icy','\\u0418':'Icy','\\u0456':'iukcy','\\u0406':'Iukcy','\\u0457':'yicy','\\u0407':'YIcy','\\u0439':'jcy','\\u0419':'Jcy','\\u0458':'jsercy','\\u0408':'Jsercy','\\u043A':'kcy','\\u041A':'Kcy','\\u045C':'kjcy','\\u040C':'KJcy','\\u043B':'lcy','\\u041B':'Lcy','\\u0459':'ljcy','\\u0409':'LJcy','\\u043C':'mcy','\\u041C':'Mcy','\\u043D':'ncy','\\u041D':'Ncy','\\u045A':'njcy','\\u040A':'NJcy','\\u043E':'ocy','\\u041E':'Ocy','\\u043F':'pcy','\\u041F':'Pcy','\\u0440':'rcy','\\u0420':'Rcy','\\u0441':'scy','\\u0421':'Scy','\\u0442':'tcy','\\u0422':'Tcy','\\u045B':'tshcy','\\u040B':'TSHcy','\\u0443':'ucy','\\u0423':'Ucy','\\u045E':'ubrcy','\\u040E':'Ubrcy','\\u0444':'fcy','\\u0424':'Fcy','\\u0445':'khcy','\\u0425':'KHcy','\\u0446':'tscy','\\u0426':'TScy','\\u0447':'chcy','\\u0427':'CHcy','\\u045F':'dzcy','\\u040F':'DZcy','\\u0448':'shcy','\\u0428':'SHcy','\\u0449':'shchcy','\\u0429':'SHCHcy','\\u044A':'hardcy','\\u042A':'HARDcy','\\u044B':'ycy','\\u042B':'Ycy','\\u044C':'softcy','\\u042C':'SOFTcy','\\u044D':'ecy','\\u042D':'Ecy','\\u044E':'yucy','\\u042E':'YUcy','\\u044F':'yacy','\\u042F':'YAcy','\\u2135':'aleph','\\u2136':'beth','\\u2137':'gimel','\\u2138':'daleth'};\n\n\tvar regexEscape = /[\"&'<>`]/g;\n\tvar escapeMap = {\n\t\t'\"': '"',\n\t\t'&': '&',\n\t\t'\\'': ''',\n\t\t'<': '<',\n\t\t// See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the\n\t\t// following is not strictly necessary unless it’s part of a tag or an\n\t\t// unquoted attribute value. We’re only escaping it to support those\n\t\t// situations, and for XML support.\n\t\t'>': '>',\n\t\t// In Internet Explorer ≤ 8, the backtick character can be used\n\t\t// to break out of (un)quoted attribute values or HTML comments.\n\t\t// See http://html5sec.org/#102, http://html5sec.org/#108, and\n\t\t// http://html5sec.org/#133.\n\t\t'`': '`'\n\t};\n\n\tvar regexInvalidEntity = /(?:[xX][^a-fA-F0-9]|[^0-9xX])/;\n\tvar regexInvalidRawCodePoint = /[\\0-\\x08\\x0B\\x0E-\\x1F\\x7F-\\x9F\\uFDD0-\\uFDEF\\uFFFE\\uFFFF]|[\\uD83F\\uD87F\\uD8BF\\uD8FF\\uD93F\\uD97F\\uD9BF\\uD9FF\\uDA3F\\uDA7F\\uDABF\\uDAFF\\uDB3F\\uDB7F\\uDBBF\\uDBFF][\\uDFFE\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n\tvar regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|([0-9]+)(;?)|[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g;\n\tvar decodeMap = {'aacute':'\\xE1','Aacute':'\\xC1','abreve':'\\u0103','Abreve':'\\u0102','ac':'\\u223E','acd':'\\u223F','acE':'\\u223E\\u0333','acirc':'\\xE2','Acirc':'\\xC2','acute':'\\xB4','acy':'\\u0430','Acy':'\\u0410','aelig':'\\xE6','AElig':'\\xC6','af':'\\u2061','afr':'\\uD835\\uDD1E','Afr':'\\uD835\\uDD04','agrave':'\\xE0','Agrave':'\\xC0','alefsym':'\\u2135','aleph':'\\u2135','alpha':'\\u03B1','Alpha':'\\u0391','amacr':'\\u0101','Amacr':'\\u0100','amalg':'\\u2A3F','amp':'&','AMP':'&','and':'\\u2227','And':'\\u2A53','andand':'\\u2A55','andd':'\\u2A5C','andslope':'\\u2A58','andv':'\\u2A5A','ang':'\\u2220','ange':'\\u29A4','angle':'\\u2220','angmsd':'\\u2221','angmsdaa':'\\u29A8','angmsdab':'\\u29A9','angmsdac':'\\u29AA','angmsdad':'\\u29AB','angmsdae':'\\u29AC','angmsdaf':'\\u29AD','angmsdag':'\\u29AE','angmsdah':'\\u29AF','angrt':'\\u221F','angrtvb':'\\u22BE','angrtvbd':'\\u299D','angsph':'\\u2222','angst':'\\xC5','angzarr':'\\u237C','aogon':'\\u0105','Aogon':'\\u0104','aopf':'\\uD835\\uDD52','Aopf':'\\uD835\\uDD38','ap':'\\u2248','apacir':'\\u2A6F','ape':'\\u224A','apE':'\\u2A70','apid':'\\u224B','apos':'\\'','ApplyFunction':'\\u2061','approx':'\\u2248','approxeq':'\\u224A','aring':'\\xE5','Aring':'\\xC5','ascr':'\\uD835\\uDCB6','Ascr':'\\uD835\\uDC9C','Assign':'\\u2254','ast':'*','asymp':'\\u2248','asympeq':'\\u224D','atilde':'\\xE3','Atilde':'\\xC3','auml':'\\xE4','Auml':'\\xC4','awconint':'\\u2233','awint':'\\u2A11','backcong':'\\u224C','backepsilon':'\\u03F6','backprime':'\\u2035','backsim':'\\u223D','backsimeq':'\\u22CD','Backslash':'\\u2216','Barv':'\\u2AE7','barvee':'\\u22BD','barwed':'\\u2305','Barwed':'\\u2306','barwedge':'\\u2305','bbrk':'\\u23B5','bbrktbrk':'\\u23B6','bcong':'\\u224C','bcy':'\\u0431','Bcy':'\\u0411','bdquo':'\\u201E','becaus':'\\u2235','because':'\\u2235','Because':'\\u2235','bemptyv':'\\u29B0','bepsi':'\\u03F6','bernou':'\\u212C','Bernoullis':'\\u212C','beta':'\\u03B2','Beta':'\\u0392','beth':'\\u2136','between':'\\u226C','bfr':'\\uD835\\uDD1F','Bfr':'\\uD835\\uDD05','bigcap':'\\u22C2','bigcirc':'\\u25EF','bigcup':'\\u22C3','bigodot':'\\u2A00','bigoplus':'\\u2A01','bigotimes':'\\u2A02','bigsqcup':'\\u2A06','bigstar':'\\u2605','bigtriangledown':'\\u25BD','bigtriangleup':'\\u25B3','biguplus':'\\u2A04','bigvee':'\\u22C1','bigwedge':'\\u22C0','bkarow':'\\u290D','blacklozenge':'\\u29EB','blacksquare':'\\u25AA','blacktriangle':'\\u25B4','blacktriangledown':'\\u25BE','blacktriangleleft':'\\u25C2','blacktriangleright':'\\u25B8','blank':'\\u2423','blk12':'\\u2592','blk14':'\\u2591','blk34':'\\u2593','block':'\\u2588','bne':'=\\u20E5','bnequiv':'\\u2261\\u20E5','bnot':'\\u2310','bNot':'\\u2AED','bopf':'\\uD835\\uDD53','Bopf':'\\uD835\\uDD39','bot':'\\u22A5','bottom':'\\u22A5','bowtie':'\\u22C8','boxbox':'\\u29C9','boxdl':'\\u2510','boxdL':'\\u2555','boxDl':'\\u2556','boxDL':'\\u2557','boxdr':'\\u250C','boxdR':'\\u2552','boxDr':'\\u2553','boxDR':'\\u2554','boxh':'\\u2500','boxH':'\\u2550','boxhd':'\\u252C','boxhD':'\\u2565','boxHd':'\\u2564','boxHD':'\\u2566','boxhu':'\\u2534','boxhU':'\\u2568','boxHu':'\\u2567','boxHU':'\\u2569','boxminus':'\\u229F','boxplus':'\\u229E','boxtimes':'\\u22A0','boxul':'\\u2518','boxuL':'\\u255B','boxUl':'\\u255C','boxUL':'\\u255D','boxur':'\\u2514','boxuR':'\\u2558','boxUr':'\\u2559','boxUR':'\\u255A','boxv':'\\u2502','boxV':'\\u2551','boxvh':'\\u253C','boxvH':'\\u256A','boxVh':'\\u256B','boxVH':'\\u256C','boxvl':'\\u2524','boxvL':'\\u2561','boxVl':'\\u2562','boxVL':'\\u2563','boxvr':'\\u251C','boxvR':'\\u255E','boxVr':'\\u255F','boxVR':'\\u2560','bprime':'\\u2035','breve':'\\u02D8','Breve':'\\u02D8','brvbar':'\\xA6','bscr':'\\uD835\\uDCB7','Bscr':'\\u212C','bsemi':'\\u204F','bsim':'\\u223D','bsime':'\\u22CD','bsol':'\\\\','bsolb':'\\u29C5','bsolhsub':'\\u27C8','bull':'\\u2022','bullet':'\\u2022','bump':'\\u224E','bumpe':'\\u224F','bumpE':'\\u2AAE','bumpeq':'\\u224F','Bumpeq':'\\u224E','cacute':'\\u0107','Cacute':'\\u0106','cap':'\\u2229','Cap':'\\u22D2','capand':'\\u2A44','capbrcup':'\\u2A49','capcap':'\\u2A4B','capcup':'\\u2A47','capdot':'\\u2A40','CapitalDifferentialD':'\\u2145','caps':'\\u2229\\uFE00','caret':'\\u2041','caron':'\\u02C7','Cayleys':'\\u212D','ccaps':'\\u2A4D','ccaron':'\\u010D','Ccaron':'\\u010C','ccedil':'\\xE7','Ccedil':'\\xC7','ccirc':'\\u0109','Ccirc':'\\u0108','Cconint':'\\u2230','ccups':'\\u2A4C','ccupssm':'\\u2A50','cdot':'\\u010B','Cdot':'\\u010A','cedil':'\\xB8','Cedilla':'\\xB8','cemptyv':'\\u29B2','cent':'\\xA2','centerdot':'\\xB7','CenterDot':'\\xB7','cfr':'\\uD835\\uDD20','Cfr':'\\u212D','chcy':'\\u0447','CHcy':'\\u0427','check':'\\u2713','checkmark':'\\u2713','chi':'\\u03C7','Chi':'\\u03A7','cir':'\\u25CB','circ':'\\u02C6','circeq':'\\u2257','circlearrowleft':'\\u21BA','circlearrowright':'\\u21BB','circledast':'\\u229B','circledcirc':'\\u229A','circleddash':'\\u229D','CircleDot':'\\u2299','circledR':'\\xAE','circledS':'\\u24C8','CircleMinus':'\\u2296','CirclePlus':'\\u2295','CircleTimes':'\\u2297','cire':'\\u2257','cirE':'\\u29C3','cirfnint':'\\u2A10','cirmid':'\\u2AEF','cirscir':'\\u29C2','ClockwiseContourIntegral':'\\u2232','CloseCurlyDoubleQuote':'\\u201D','CloseCurlyQuote':'\\u2019','clubs':'\\u2663','clubsuit':'\\u2663','colon':':','Colon':'\\u2237','colone':'\\u2254','Colone':'\\u2A74','coloneq':'\\u2254','comma':',','commat':'@','comp':'\\u2201','compfn':'\\u2218','complement':'\\u2201','complexes':'\\u2102','cong':'\\u2245','congdot':'\\u2A6D','Congruent':'\\u2261','conint':'\\u222E','Conint':'\\u222F','ContourIntegral':'\\u222E','copf':'\\uD835\\uDD54','Copf':'\\u2102','coprod':'\\u2210','Coproduct':'\\u2210','copy':'\\xA9','COPY':'\\xA9','copysr':'\\u2117','CounterClockwiseContourIntegral':'\\u2233','crarr':'\\u21B5','cross':'\\u2717','Cross':'\\u2A2F','cscr':'\\uD835\\uDCB8','Cscr':'\\uD835\\uDC9E','csub':'\\u2ACF','csube':'\\u2AD1','csup':'\\u2AD0','csupe':'\\u2AD2','ctdot':'\\u22EF','cudarrl':'\\u2938','cudarrr':'\\u2935','cuepr':'\\u22DE','cuesc':'\\u22DF','cularr':'\\u21B6','cularrp':'\\u293D','cup':'\\u222A','Cup':'\\u22D3','cupbrcap':'\\u2A48','cupcap':'\\u2A46','CupCap':'\\u224D','cupcup':'\\u2A4A','cupdot':'\\u228D','cupor':'\\u2A45','cups':'\\u222A\\uFE00','curarr':'\\u21B7','curarrm':'\\u293C','curlyeqprec':'\\u22DE','curlyeqsucc':'\\u22DF','curlyvee':'\\u22CE','curlywedge':'\\u22CF','curren':'\\xA4','curvearrowleft':'\\u21B6','curvearrowright':'\\u21B7','cuvee':'\\u22CE','cuwed':'\\u22CF','cwconint':'\\u2232','cwint':'\\u2231','cylcty':'\\u232D','dagger':'\\u2020','Dagger':'\\u2021','daleth':'\\u2138','darr':'\\u2193','dArr':'\\u21D3','Darr':'\\u21A1','dash':'\\u2010','dashv':'\\u22A3','Dashv':'\\u2AE4','dbkarow':'\\u290F','dblac':'\\u02DD','dcaron':'\\u010F','Dcaron':'\\u010E','dcy':'\\u0434','Dcy':'\\u0414','dd':'\\u2146','DD':'\\u2145','ddagger':'\\u2021','ddarr':'\\u21CA','DDotrahd':'\\u2911','ddotseq':'\\u2A77','deg':'\\xB0','Del':'\\u2207','delta':'\\u03B4','Delta':'\\u0394','demptyv':'\\u29B1','dfisht':'\\u297F','dfr':'\\uD835\\uDD21','Dfr':'\\uD835\\uDD07','dHar':'\\u2965','dharl':'\\u21C3','dharr':'\\u21C2','DiacriticalAcute':'\\xB4','DiacriticalDot':'\\u02D9','DiacriticalDoubleAcute':'\\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\\u02DC','diam':'\\u22C4','diamond':'\\u22C4','Diamond':'\\u22C4','diamondsuit':'\\u2666','diams':'\\u2666','die':'\\xA8','DifferentialD':'\\u2146','digamma':'\\u03DD','disin':'\\u22F2','div':'\\xF7','divide':'\\xF7','divideontimes':'\\u22C7','divonx':'\\u22C7','djcy':'\\u0452','DJcy':'\\u0402','dlcorn':'\\u231E','dlcrop':'\\u230D','dollar':'$','dopf':'\\uD835\\uDD55','Dopf':'\\uD835\\uDD3B','dot':'\\u02D9','Dot':'\\xA8','DotDot':'\\u20DC','doteq':'\\u2250','doteqdot':'\\u2251','DotEqual':'\\u2250','dotminus':'\\u2238','dotplus':'\\u2214','dotsquare':'\\u22A1','doublebarwedge':'\\u2306','DoubleContourIntegral':'\\u222F','DoubleDot':'\\xA8','DoubleDownArrow':'\\u21D3','DoubleLeftArrow':'\\u21D0','DoubleLeftRightArrow':'\\u21D4','DoubleLeftTee':'\\u2AE4','DoubleLongLeftArrow':'\\u27F8','DoubleLongLeftRightArrow':'\\u27FA','DoubleLongRightArrow':'\\u27F9','DoubleRightArrow':'\\u21D2','DoubleRightTee':'\\u22A8','DoubleUpArrow':'\\u21D1','DoubleUpDownArrow':'\\u21D5','DoubleVerticalBar':'\\u2225','downarrow':'\\u2193','Downarrow':'\\u21D3','DownArrow':'\\u2193','DownArrowBar':'\\u2913','DownArrowUpArrow':'\\u21F5','DownBreve':'\\u0311','downdownarrows':'\\u21CA','downharpoonleft':'\\u21C3','downharpoonright':'\\u21C2','DownLeftRightVector':'\\u2950','DownLeftTeeVector':'\\u295E','DownLeftVector':'\\u21BD','DownLeftVectorBar':'\\u2956','DownRightTeeVector':'\\u295F','DownRightVector':'\\u21C1','DownRightVectorBar':'\\u2957','DownTee':'\\u22A4','DownTeeArrow':'\\u21A7','drbkarow':'\\u2910','drcorn':'\\u231F','drcrop':'\\u230C','dscr':'\\uD835\\uDCB9','Dscr':'\\uD835\\uDC9F','dscy':'\\u0455','DScy':'\\u0405','dsol':'\\u29F6','dstrok':'\\u0111','Dstrok':'\\u0110','dtdot':'\\u22F1','dtri':'\\u25BF','dtrif':'\\u25BE','duarr':'\\u21F5','duhar':'\\u296F','dwangle':'\\u29A6','dzcy':'\\u045F','DZcy':'\\u040F','dzigrarr':'\\u27FF','eacute':'\\xE9','Eacute':'\\xC9','easter':'\\u2A6E','ecaron':'\\u011B','Ecaron':'\\u011A','ecir':'\\u2256','ecirc':'\\xEA','Ecirc':'\\xCA','ecolon':'\\u2255','ecy':'\\u044D','Ecy':'\\u042D','eDDot':'\\u2A77','edot':'\\u0117','eDot':'\\u2251','Edot':'\\u0116','ee':'\\u2147','efDot':'\\u2252','efr':'\\uD835\\uDD22','Efr':'\\uD835\\uDD08','eg':'\\u2A9A','egrave':'\\xE8','Egrave':'\\xC8','egs':'\\u2A96','egsdot':'\\u2A98','el':'\\u2A99','Element':'\\u2208','elinters':'\\u23E7','ell':'\\u2113','els':'\\u2A95','elsdot':'\\u2A97','emacr':'\\u0113','Emacr':'\\u0112','empty':'\\u2205','emptyset':'\\u2205','EmptySmallSquare':'\\u25FB','emptyv':'\\u2205','EmptyVerySmallSquare':'\\u25AB','emsp':'\\u2003','emsp13':'\\u2004','emsp14':'\\u2005','eng':'\\u014B','ENG':'\\u014A','ensp':'\\u2002','eogon':'\\u0119','Eogon':'\\u0118','eopf':'\\uD835\\uDD56','Eopf':'\\uD835\\uDD3C','epar':'\\u22D5','eparsl':'\\u29E3','eplus':'\\u2A71','epsi':'\\u03B5','epsilon':'\\u03B5','Epsilon':'\\u0395','epsiv':'\\u03F5','eqcirc':'\\u2256','eqcolon':'\\u2255','eqsim':'\\u2242','eqslantgtr':'\\u2A96','eqslantless':'\\u2A95','Equal':'\\u2A75','equals':'=','EqualTilde':'\\u2242','equest':'\\u225F','Equilibrium':'\\u21CC','equiv':'\\u2261','equivDD':'\\u2A78','eqvparsl':'\\u29E5','erarr':'\\u2971','erDot':'\\u2253','escr':'\\u212F','Escr':'\\u2130','esdot':'\\u2250','esim':'\\u2242','Esim':'\\u2A73','eta':'\\u03B7','Eta':'\\u0397','eth':'\\xF0','ETH':'\\xD0','euml':'\\xEB','Euml':'\\xCB','euro':'\\u20AC','excl':'!','exist':'\\u2203','Exists':'\\u2203','expectation':'\\u2130','exponentiale':'\\u2147','ExponentialE':'\\u2147','fallingdotseq':'\\u2252','fcy':'\\u0444','Fcy':'\\u0424','female':'\\u2640','ffilig':'\\uFB03','fflig':'\\uFB00','ffllig':'\\uFB04','ffr':'\\uD835\\uDD23','Ffr':'\\uD835\\uDD09','filig':'\\uFB01','FilledSmallSquare':'\\u25FC','FilledVerySmallSquare':'\\u25AA','fjlig':'fj','flat':'\\u266D','fllig':'\\uFB02','fltns':'\\u25B1','fnof':'\\u0192','fopf':'\\uD835\\uDD57','Fopf':'\\uD835\\uDD3D','forall':'\\u2200','ForAll':'\\u2200','fork':'\\u22D4','forkv':'\\u2AD9','Fouriertrf':'\\u2131','fpartint':'\\u2A0D','frac12':'\\xBD','frac13':'\\u2153','frac14':'\\xBC','frac15':'\\u2155','frac16':'\\u2159','frac18':'\\u215B','frac23':'\\u2154','frac25':'\\u2156','frac34':'\\xBE','frac35':'\\u2157','frac38':'\\u215C','frac45':'\\u2158','frac56':'\\u215A','frac58':'\\u215D','frac78':'\\u215E','frasl':'\\u2044','frown':'\\u2322','fscr':'\\uD835\\uDCBB','Fscr':'\\u2131','gacute':'\\u01F5','gamma':'\\u03B3','Gamma':'\\u0393','gammad':'\\u03DD','Gammad':'\\u03DC','gap':'\\u2A86','gbreve':'\\u011F','Gbreve':'\\u011E','Gcedil':'\\u0122','gcirc':'\\u011D','Gcirc':'\\u011C','gcy':'\\u0433','Gcy':'\\u0413','gdot':'\\u0121','Gdot':'\\u0120','ge':'\\u2265','gE':'\\u2267','gel':'\\u22DB','gEl':'\\u2A8C','geq':'\\u2265','geqq':'\\u2267','geqslant':'\\u2A7E','ges':'\\u2A7E','gescc':'\\u2AA9','gesdot':'\\u2A80','gesdoto':'\\u2A82','gesdotol':'\\u2A84','gesl':'\\u22DB\\uFE00','gesles':'\\u2A94','gfr':'\\uD835\\uDD24','Gfr':'\\uD835\\uDD0A','gg':'\\u226B','Gg':'\\u22D9','ggg':'\\u22D9','gimel':'\\u2137','gjcy':'\\u0453','GJcy':'\\u0403','gl':'\\u2277','gla':'\\u2AA5','glE':'\\u2A92','glj':'\\u2AA4','gnap':'\\u2A8A','gnapprox':'\\u2A8A','gne':'\\u2A88','gnE':'\\u2269','gneq':'\\u2A88','gneqq':'\\u2269','gnsim':'\\u22E7','gopf':'\\uD835\\uDD58','Gopf':'\\uD835\\uDD3E','grave':'`','GreaterEqual':'\\u2265','GreaterEqualLess':'\\u22DB','GreaterFullEqual':'\\u2267','GreaterGreater':'\\u2AA2','GreaterLess':'\\u2277','GreaterSlantEqual':'\\u2A7E','GreaterTilde':'\\u2273','gscr':'\\u210A','Gscr':'\\uD835\\uDCA2','gsim':'\\u2273','gsime':'\\u2A8E','gsiml':'\\u2A90','gt':'>','Gt':'\\u226B','GT':'>','gtcc':'\\u2AA7','gtcir':'\\u2A7A','gtdot':'\\u22D7','gtlPar':'\\u2995','gtquest':'\\u2A7C','gtrapprox':'\\u2A86','gtrarr':'\\u2978','gtrdot':'\\u22D7','gtreqless':'\\u22DB','gtreqqless':'\\u2A8C','gtrless':'\\u2277','gtrsim':'\\u2273','gvertneqq':'\\u2269\\uFE00','gvnE':'\\u2269\\uFE00','Hacek':'\\u02C7','hairsp':'\\u200A','half':'\\xBD','hamilt':'\\u210B','hardcy':'\\u044A','HARDcy':'\\u042A','harr':'\\u2194','hArr':'\\u21D4','harrcir':'\\u2948','harrw':'\\u21AD','Hat':'^','hbar':'\\u210F','hcirc':'\\u0125','Hcirc':'\\u0124','hearts':'\\u2665','heartsuit':'\\u2665','hellip':'\\u2026','hercon':'\\u22B9','hfr':'\\uD835\\uDD25','Hfr':'\\u210C','HilbertSpace':'\\u210B','hksearow':'\\u2925','hkswarow':'\\u2926','hoarr':'\\u21FF','homtht':'\\u223B','hookleftarrow':'\\u21A9','hookrightarrow':'\\u21AA','hopf':'\\uD835\\uDD59','Hopf':'\\u210D','horbar':'\\u2015','HorizontalLine':'\\u2500','hscr':'\\uD835\\uDCBD','Hscr':'\\u210B','hslash':'\\u210F','hstrok':'\\u0127','Hstrok':'\\u0126','HumpDownHump':'\\u224E','HumpEqual':'\\u224F','hybull':'\\u2043','hyphen':'\\u2010','iacute':'\\xED','Iacute':'\\xCD','ic':'\\u2063','icirc':'\\xEE','Icirc':'\\xCE','icy':'\\u0438','Icy':'\\u0418','Idot':'\\u0130','iecy':'\\u0435','IEcy':'\\u0415','iexcl':'\\xA1','iff':'\\u21D4','ifr':'\\uD835\\uDD26','Ifr':'\\u2111','igrave':'\\xEC','Igrave':'\\xCC','ii':'\\u2148','iiiint':'\\u2A0C','iiint':'\\u222D','iinfin':'\\u29DC','iiota':'\\u2129','ijlig':'\\u0133','IJlig':'\\u0132','Im':'\\u2111','imacr':'\\u012B','Imacr':'\\u012A','image':'\\u2111','ImaginaryI':'\\u2148','imagline':'\\u2110','imagpart':'\\u2111','imath':'\\u0131','imof':'\\u22B7','imped':'\\u01B5','Implies':'\\u21D2','in':'\\u2208','incare':'\\u2105','infin':'\\u221E','infintie':'\\u29DD','inodot':'\\u0131','int':'\\u222B','Int':'\\u222C','intcal':'\\u22BA','integers':'\\u2124','Integral':'\\u222B','intercal':'\\u22BA','Intersection':'\\u22C2','intlarhk':'\\u2A17','intprod':'\\u2A3C','InvisibleComma':'\\u2063','InvisibleTimes':'\\u2062','iocy':'\\u0451','IOcy':'\\u0401','iogon':'\\u012F','Iogon':'\\u012E','iopf':'\\uD835\\uDD5A','Iopf':'\\uD835\\uDD40','iota':'\\u03B9','Iota':'\\u0399','iprod':'\\u2A3C','iquest':'\\xBF','iscr':'\\uD835\\uDCBE','Iscr':'\\u2110','isin':'\\u2208','isindot':'\\u22F5','isinE':'\\u22F9','isins':'\\u22F4','isinsv':'\\u22F3','isinv':'\\u2208','it':'\\u2062','itilde':'\\u0129','Itilde':'\\u0128','iukcy':'\\u0456','Iukcy':'\\u0406','iuml':'\\xEF','Iuml':'\\xCF','jcirc':'\\u0135','Jcirc':'\\u0134','jcy':'\\u0439','Jcy':'\\u0419','jfr':'\\uD835\\uDD27','Jfr':'\\uD835\\uDD0D','jmath':'\\u0237','jopf':'\\uD835\\uDD5B','Jopf':'\\uD835\\uDD41','jscr':'\\uD835\\uDCBF','Jscr':'\\uD835\\uDCA5','jsercy':'\\u0458','Jsercy':'\\u0408','jukcy':'\\u0454','Jukcy':'\\u0404','kappa':'\\u03BA','Kappa':'\\u039A','kappav':'\\u03F0','kcedil':'\\u0137','Kcedil':'\\u0136','kcy':'\\u043A','Kcy':'\\u041A','kfr':'\\uD835\\uDD28','Kfr':'\\uD835\\uDD0E','kgreen':'\\u0138','khcy':'\\u0445','KHcy':'\\u0425','kjcy':'\\u045C','KJcy':'\\u040C','kopf':'\\uD835\\uDD5C','Kopf':'\\uD835\\uDD42','kscr':'\\uD835\\uDCC0','Kscr':'\\uD835\\uDCA6','lAarr':'\\u21DA','lacute':'\\u013A','Lacute':'\\u0139','laemptyv':'\\u29B4','lagran':'\\u2112','lambda':'\\u03BB','Lambda':'\\u039B','lang':'\\u27E8','Lang':'\\u27EA','langd':'\\u2991','langle':'\\u27E8','lap':'\\u2A85','Laplacetrf':'\\u2112','laquo':'\\xAB','larr':'\\u2190','lArr':'\\u21D0','Larr':'\\u219E','larrb':'\\u21E4','larrbfs':'\\u291F','larrfs':'\\u291D','larrhk':'\\u21A9','larrlp':'\\u21AB','larrpl':'\\u2939','larrsim':'\\u2973','larrtl':'\\u21A2','lat':'\\u2AAB','latail':'\\u2919','lAtail':'\\u291B','late':'\\u2AAD','lates':'\\u2AAD\\uFE00','lbarr':'\\u290C','lBarr':'\\u290E','lbbrk':'\\u2772','lbrace':'{','lbrack':'[','lbrke':'\\u298B','lbrksld':'\\u298F','lbrkslu':'\\u298D','lcaron':'\\u013E','Lcaron':'\\u013D','lcedil':'\\u013C','Lcedil':'\\u013B','lceil':'\\u2308','lcub':'{','lcy':'\\u043B','Lcy':'\\u041B','ldca':'\\u2936','ldquo':'\\u201C','ldquor':'\\u201E','ldrdhar':'\\u2967','ldrushar':'\\u294B','ldsh':'\\u21B2','le':'\\u2264','lE':'\\u2266','LeftAngleBracket':'\\u27E8','leftarrow':'\\u2190','Leftarrow':'\\u21D0','LeftArrow':'\\u2190','LeftArrowBar':'\\u21E4','LeftArrowRightArrow':'\\u21C6','leftarrowtail':'\\u21A2','LeftCeiling':'\\u2308','LeftDoubleBracket':'\\u27E6','LeftDownTeeVector':'\\u2961','LeftDownVector':'\\u21C3','LeftDownVectorBar':'\\u2959','LeftFloor':'\\u230A','leftharpoondown':'\\u21BD','leftharpoonup':'\\u21BC','leftleftarrows':'\\u21C7','leftrightarrow':'\\u2194','Leftrightarrow':'\\u21D4','LeftRightArrow':'\\u2194','leftrightarrows':'\\u21C6','leftrightharpoons':'\\u21CB','leftrightsquigarrow':'\\u21AD','LeftRightVector':'\\u294E','LeftTee':'\\u22A3','LeftTeeArrow':'\\u21A4','LeftTeeVector':'\\u295A','leftthreetimes':'\\u22CB','LeftTriangle':'\\u22B2','LeftTriangleBar':'\\u29CF','LeftTriangleEqual':'\\u22B4','LeftUpDownVector':'\\u2951','LeftUpTeeVector':'\\u2960','LeftUpVector':'\\u21BF','LeftUpVectorBar':'\\u2958','LeftVector':'\\u21BC','LeftVectorBar':'\\u2952','leg':'\\u22DA','lEg':'\\u2A8B','leq':'\\u2264','leqq':'\\u2266','leqslant':'\\u2A7D','les':'\\u2A7D','lescc':'\\u2AA8','lesdot':'\\u2A7F','lesdoto':'\\u2A81','lesdotor':'\\u2A83','lesg':'\\u22DA\\uFE00','lesges':'\\u2A93','lessapprox':'\\u2A85','lessdot':'\\u22D6','lesseqgtr':'\\u22DA','lesseqqgtr':'\\u2A8B','LessEqualGreater':'\\u22DA','LessFullEqual':'\\u2266','LessGreater':'\\u2276','lessgtr':'\\u2276','LessLess':'\\u2AA1','lesssim':'\\u2272','LessSlantEqual':'\\u2A7D','LessTilde':'\\u2272','lfisht':'\\u297C','lfloor':'\\u230A','lfr':'\\uD835\\uDD29','Lfr':'\\uD835\\uDD0F','lg':'\\u2276','lgE':'\\u2A91','lHar':'\\u2962','lhard':'\\u21BD','lharu':'\\u21BC','lharul':'\\u296A','lhblk':'\\u2584','ljcy':'\\u0459','LJcy':'\\u0409','ll':'\\u226A','Ll':'\\u22D8','llarr':'\\u21C7','llcorner':'\\u231E','Lleftarrow':'\\u21DA','llhard':'\\u296B','lltri':'\\u25FA','lmidot':'\\u0140','Lmidot':'\\u013F','lmoust':'\\u23B0','lmoustache':'\\u23B0','lnap':'\\u2A89','lnapprox':'\\u2A89','lne':'\\u2A87','lnE':'\\u2268','lneq':'\\u2A87','lneqq':'\\u2268','lnsim':'\\u22E6','loang':'\\u27EC','loarr':'\\u21FD','lobrk':'\\u27E6','longleftarrow':'\\u27F5','Longleftarrow':'\\u27F8','LongLeftArrow':'\\u27F5','longleftrightarrow':'\\u27F7','Longleftrightarrow':'\\u27FA','LongLeftRightArrow':'\\u27F7','longmapsto':'\\u27FC','longrightarrow':'\\u27F6','Longrightarrow':'\\u27F9','LongRightArrow':'\\u27F6','looparrowleft':'\\u21AB','looparrowright':'\\u21AC','lopar':'\\u2985','lopf':'\\uD835\\uDD5D','Lopf':'\\uD835\\uDD43','loplus':'\\u2A2D','lotimes':'\\u2A34','lowast':'\\u2217','lowbar':'_','LowerLeftArrow':'\\u2199','LowerRightArrow':'\\u2198','loz':'\\u25CA','lozenge':'\\u25CA','lozf':'\\u29EB','lpar':'(','lparlt':'\\u2993','lrarr':'\\u21C6','lrcorner':'\\u231F','lrhar':'\\u21CB','lrhard':'\\u296D','lrm':'\\u200E','lrtri':'\\u22BF','lsaquo':'\\u2039','lscr':'\\uD835\\uDCC1','Lscr':'\\u2112','lsh':'\\u21B0','Lsh':'\\u21B0','lsim':'\\u2272','lsime':'\\u2A8D','lsimg':'\\u2A8F','lsqb':'[','lsquo':'\\u2018','lsquor':'\\u201A','lstrok':'\\u0142','Lstrok':'\\u0141','lt':'<','Lt':'\\u226A','LT':'<','ltcc':'\\u2AA6','ltcir':'\\u2A79','ltdot':'\\u22D6','lthree':'\\u22CB','ltimes':'\\u22C9','ltlarr':'\\u2976','ltquest':'\\u2A7B','ltri':'\\u25C3','ltrie':'\\u22B4','ltrif':'\\u25C2','ltrPar':'\\u2996','lurdshar':'\\u294A','luruhar':'\\u2966','lvertneqq':'\\u2268\\uFE00','lvnE':'\\u2268\\uFE00','macr':'\\xAF','male':'\\u2642','malt':'\\u2720','maltese':'\\u2720','map':'\\u21A6','Map':'\\u2905','mapsto':'\\u21A6','mapstodown':'\\u21A7','mapstoleft':'\\u21A4','mapstoup':'\\u21A5','marker':'\\u25AE','mcomma':'\\u2A29','mcy':'\\u043C','Mcy':'\\u041C','mdash':'\\u2014','mDDot':'\\u223A','measuredangle':'\\u2221','MediumSpace':'\\u205F','Mellintrf':'\\u2133','mfr':'\\uD835\\uDD2A','Mfr':'\\uD835\\uDD10','mho':'\\u2127','micro':'\\xB5','mid':'\\u2223','midast':'*','midcir':'\\u2AF0','middot':'\\xB7','minus':'\\u2212','minusb':'\\u229F','minusd':'\\u2238','minusdu':'\\u2A2A','MinusPlus':'\\u2213','mlcp':'\\u2ADB','mldr':'\\u2026','mnplus':'\\u2213','models':'\\u22A7','mopf':'\\uD835\\uDD5E','Mopf':'\\uD835\\uDD44','mp':'\\u2213','mscr':'\\uD835\\uDCC2','Mscr':'\\u2133','mstpos':'\\u223E','mu':'\\u03BC','Mu':'\\u039C','multimap':'\\u22B8','mumap':'\\u22B8','nabla':'\\u2207','nacute':'\\u0144','Nacute':'\\u0143','nang':'\\u2220\\u20D2','nap':'\\u2249','napE':'\\u2A70\\u0338','napid':'\\u224B\\u0338','napos':'\\u0149','napprox':'\\u2249','natur':'\\u266E','natural':'\\u266E','naturals':'\\u2115','nbsp':'\\xA0','nbump':'\\u224E\\u0338','nbumpe':'\\u224F\\u0338','ncap':'\\u2A43','ncaron':'\\u0148','Ncaron':'\\u0147','ncedil':'\\u0146','Ncedil':'\\u0145','ncong':'\\u2247','ncongdot':'\\u2A6D\\u0338','ncup':'\\u2A42','ncy':'\\u043D','Ncy':'\\u041D','ndash':'\\u2013','ne':'\\u2260','nearhk':'\\u2924','nearr':'\\u2197','neArr':'\\u21D7','nearrow':'\\u2197','nedot':'\\u2250\\u0338','NegativeMediumSpace':'\\u200B','NegativeThickSpace':'\\u200B','NegativeThinSpace':'\\u200B','NegativeVeryThinSpace':'\\u200B','nequiv':'\\u2262','nesear':'\\u2928','nesim':'\\u2242\\u0338','NestedGreaterGreater':'\\u226B','NestedLessLess':'\\u226A','NewLine':'\\n','nexist':'\\u2204','nexists':'\\u2204','nfr':'\\uD835\\uDD2B','Nfr':'\\uD835\\uDD11','nge':'\\u2271','ngE':'\\u2267\\u0338','ngeq':'\\u2271','ngeqq':'\\u2267\\u0338','ngeqslant':'\\u2A7E\\u0338','nges':'\\u2A7E\\u0338','nGg':'\\u22D9\\u0338','ngsim':'\\u2275','ngt':'\\u226F','nGt':'\\u226B\\u20D2','ngtr':'\\u226F','nGtv':'\\u226B\\u0338','nharr':'\\u21AE','nhArr':'\\u21CE','nhpar':'\\u2AF2','ni':'\\u220B','nis':'\\u22FC','nisd':'\\u22FA','niv':'\\u220B','njcy':'\\u045A','NJcy':'\\u040A','nlarr':'\\u219A','nlArr':'\\u21CD','nldr':'\\u2025','nle':'\\u2270','nlE':'\\u2266\\u0338','nleftarrow':'\\u219A','nLeftarrow':'\\u21CD','nleftrightarrow':'\\u21AE','nLeftrightarrow':'\\u21CE','nleq':'\\u2270','nleqq':'\\u2266\\u0338','nleqslant':'\\u2A7D\\u0338','nles':'\\u2A7D\\u0338','nless':'\\u226E','nLl':'\\u22D8\\u0338','nlsim':'\\u2274','nlt':'\\u226E','nLt':'\\u226A\\u20D2','nltri':'\\u22EA','nltrie':'\\u22EC','nLtv':'\\u226A\\u0338','nmid':'\\u2224','NoBreak':'\\u2060','NonBreakingSpace':'\\xA0','nopf':'\\uD835\\uDD5F','Nopf':'\\u2115','not':'\\xAC','Not':'\\u2AEC','NotCongruent':'\\u2262','NotCupCap':'\\u226D','NotDoubleVerticalBar':'\\u2226','NotElement':'\\u2209','NotEqual':'\\u2260','NotEqualTilde':'\\u2242\\u0338','NotExists':'\\u2204','NotGreater':'\\u226F','NotGreaterEqual':'\\u2271','NotGreaterFullEqual':'\\u2267\\u0338','NotGreaterGreater':'\\u226B\\u0338','NotGreaterLess':'\\u2279','NotGreaterSlantEqual':'\\u2A7E\\u0338','NotGreaterTilde':'\\u2275','NotHumpDownHump':'\\u224E\\u0338','NotHumpEqual':'\\u224F\\u0338','notin':'\\u2209','notindot':'\\u22F5\\u0338','notinE':'\\u22F9\\u0338','notinva':'\\u2209','notinvb':'\\u22F7','notinvc':'\\u22F6','NotLeftTriangle':'\\u22EA','NotLeftTriangleBar':'\\u29CF\\u0338','NotLeftTriangleEqual':'\\u22EC','NotLess':'\\u226E','NotLessEqual':'\\u2270','NotLessGreater':'\\u2278','NotLessLess':'\\u226A\\u0338','NotLessSlantEqual':'\\u2A7D\\u0338','NotLessTilde':'\\u2274','NotNestedGreaterGreater':'\\u2AA2\\u0338','NotNestedLessLess':'\\u2AA1\\u0338','notni':'\\u220C','notniva':'\\u220C','notnivb':'\\u22FE','notnivc':'\\u22FD','NotPrecedes':'\\u2280','NotPrecedesEqual':'\\u2AAF\\u0338','NotPrecedesSlantEqual':'\\u22E0','NotReverseElement':'\\u220C','NotRightTriangle':'\\u22EB','NotRightTriangleBar':'\\u29D0\\u0338','NotRightTriangleEqual':'\\u22ED','NotSquareSubset':'\\u228F\\u0338','NotSquareSubsetEqual':'\\u22E2','NotSquareSuperset':'\\u2290\\u0338','NotSquareSupersetEqual':'\\u22E3','NotSubset':'\\u2282\\u20D2','NotSubsetEqual':'\\u2288','NotSucceeds':'\\u2281','NotSucceedsEqual':'\\u2AB0\\u0338','NotSucceedsSlantEqual':'\\u22E1','NotSucceedsTilde':'\\u227F\\u0338','NotSuperset':'\\u2283\\u20D2','NotSupersetEqual':'\\u2289','NotTilde':'\\u2241','NotTildeEqual':'\\u2244','NotTildeFullEqual':'\\u2247','NotTildeTilde':'\\u2249','NotVerticalBar':'\\u2224','npar':'\\u2226','nparallel':'\\u2226','nparsl':'\\u2AFD\\u20E5','npart':'\\u2202\\u0338','npolint':'\\u2A14','npr':'\\u2280','nprcue':'\\u22E0','npre':'\\u2AAF\\u0338','nprec':'\\u2280','npreceq':'\\u2AAF\\u0338','nrarr':'\\u219B','nrArr':'\\u21CF','nrarrc':'\\u2933\\u0338','nrarrw':'\\u219D\\u0338','nrightarrow':'\\u219B','nRightarrow':'\\u21CF','nrtri':'\\u22EB','nrtrie':'\\u22ED','nsc':'\\u2281','nsccue':'\\u22E1','nsce':'\\u2AB0\\u0338','nscr':'\\uD835\\uDCC3','Nscr':'\\uD835\\uDCA9','nshortmid':'\\u2224','nshortparallel':'\\u2226','nsim':'\\u2241','nsime':'\\u2244','nsimeq':'\\u2244','nsmid':'\\u2224','nspar':'\\u2226','nsqsube':'\\u22E2','nsqsupe':'\\u22E3','nsub':'\\u2284','nsube':'\\u2288','nsubE':'\\u2AC5\\u0338','nsubset':'\\u2282\\u20D2','nsubseteq':'\\u2288','nsubseteqq':'\\u2AC5\\u0338','nsucc':'\\u2281','nsucceq':'\\u2AB0\\u0338','nsup':'\\u2285','nsupe':'\\u2289','nsupE':'\\u2AC6\\u0338','nsupset':'\\u2283\\u20D2','nsupseteq':'\\u2289','nsupseteqq':'\\u2AC6\\u0338','ntgl':'\\u2279','ntilde':'\\xF1','Ntilde':'\\xD1','ntlg':'\\u2278','ntriangleleft':'\\u22EA','ntrianglelefteq':'\\u22EC','ntriangleright':'\\u22EB','ntrianglerighteq':'\\u22ED','nu':'\\u03BD','Nu':'\\u039D','num':'#','numero':'\\u2116','numsp':'\\u2007','nvap':'\\u224D\\u20D2','nvdash':'\\u22AC','nvDash':'\\u22AD','nVdash':'\\u22AE','nVDash':'\\u22AF','nvge':'\\u2265\\u20D2','nvgt':'>\\u20D2','nvHarr':'\\u2904','nvinfin':'\\u29DE','nvlArr':'\\u2902','nvle':'\\u2264\\u20D2','nvlt':'<\\u20D2','nvltrie':'\\u22B4\\u20D2','nvrArr':'\\u2903','nvrtrie':'\\u22B5\\u20D2','nvsim':'\\u223C\\u20D2','nwarhk':'\\u2923','nwarr':'\\u2196','nwArr':'\\u21D6','nwarrow':'\\u2196','nwnear':'\\u2927','oacute':'\\xF3','Oacute':'\\xD3','oast':'\\u229B','ocir':'\\u229A','ocirc':'\\xF4','Ocirc':'\\xD4','ocy':'\\u043E','Ocy':'\\u041E','odash':'\\u229D','odblac':'\\u0151','Odblac':'\\u0150','odiv':'\\u2A38','odot':'\\u2299','odsold':'\\u29BC','oelig':'\\u0153','OElig':'\\u0152','ofcir':'\\u29BF','ofr':'\\uD835\\uDD2C','Ofr':'\\uD835\\uDD12','ogon':'\\u02DB','ograve':'\\xF2','Ograve':'\\xD2','ogt':'\\u29C1','ohbar':'\\u29B5','ohm':'\\u03A9','oint':'\\u222E','olarr':'\\u21BA','olcir':'\\u29BE','olcross':'\\u29BB','oline':'\\u203E','olt':'\\u29C0','omacr':'\\u014D','Omacr':'\\u014C','omega':'\\u03C9','Omega':'\\u03A9','omicron':'\\u03BF','Omicron':'\\u039F','omid':'\\u29B6','ominus':'\\u2296','oopf':'\\uD835\\uDD60','Oopf':'\\uD835\\uDD46','opar':'\\u29B7','OpenCurlyDoubleQuote':'\\u201C','OpenCurlyQuote':'\\u2018','operp':'\\u29B9','oplus':'\\u2295','or':'\\u2228','Or':'\\u2A54','orarr':'\\u21BB','ord':'\\u2A5D','order':'\\u2134','orderof':'\\u2134','ordf':'\\xAA','ordm':'\\xBA','origof':'\\u22B6','oror':'\\u2A56','orslope':'\\u2A57','orv':'\\u2A5B','oS':'\\u24C8','oscr':'\\u2134','Oscr':'\\uD835\\uDCAA','oslash':'\\xF8','Oslash':'\\xD8','osol':'\\u2298','otilde':'\\xF5','Otilde':'\\xD5','otimes':'\\u2297','Otimes':'\\u2A37','otimesas':'\\u2A36','ouml':'\\xF6','Ouml':'\\xD6','ovbar':'\\u233D','OverBar':'\\u203E','OverBrace':'\\u23DE','OverBracket':'\\u23B4','OverParenthesis':'\\u23DC','par':'\\u2225','para':'\\xB6','parallel':'\\u2225','parsim':'\\u2AF3','parsl':'\\u2AFD','part':'\\u2202','PartialD':'\\u2202','pcy':'\\u043F','Pcy':'\\u041F','percnt':'%','period':'.','permil':'\\u2030','perp':'\\u22A5','pertenk':'\\u2031','pfr':'\\uD835\\uDD2D','Pfr':'\\uD835\\uDD13','phi':'\\u03C6','Phi':'\\u03A6','phiv':'\\u03D5','phmmat':'\\u2133','phone':'\\u260E','pi':'\\u03C0','Pi':'\\u03A0','pitchfork':'\\u22D4','piv':'\\u03D6','planck':'\\u210F','planckh':'\\u210E','plankv':'\\u210F','plus':'+','plusacir':'\\u2A23','plusb':'\\u229E','pluscir':'\\u2A22','plusdo':'\\u2214','plusdu':'\\u2A25','pluse':'\\u2A72','PlusMinus':'\\xB1','plusmn':'\\xB1','plussim':'\\u2A26','plustwo':'\\u2A27','pm':'\\xB1','Poincareplane':'\\u210C','pointint':'\\u2A15','popf':'\\uD835\\uDD61','Popf':'\\u2119','pound':'\\xA3','pr':'\\u227A','Pr':'\\u2ABB','prap':'\\u2AB7','prcue':'\\u227C','pre':'\\u2AAF','prE':'\\u2AB3','prec':'\\u227A','precapprox':'\\u2AB7','preccurlyeq':'\\u227C','Precedes':'\\u227A','PrecedesEqual':'\\u2AAF','PrecedesSlantEqual':'\\u227C','PrecedesTilde':'\\u227E','preceq':'\\u2AAF','precnapprox':'\\u2AB9','precneqq':'\\u2AB5','precnsim':'\\u22E8','precsim':'\\u227E','prime':'\\u2032','Prime':'\\u2033','primes':'\\u2119','prnap':'\\u2AB9','prnE':'\\u2AB5','prnsim':'\\u22E8','prod':'\\u220F','Product':'\\u220F','profalar':'\\u232E','profline':'\\u2312','profsurf':'\\u2313','prop':'\\u221D','Proportion':'\\u2237','Proportional':'\\u221D','propto':'\\u221D','prsim':'\\u227E','prurel':'\\u22B0','pscr':'\\uD835\\uDCC5','Pscr':'\\uD835\\uDCAB','psi':'\\u03C8','Psi':'\\u03A8','puncsp':'\\u2008','qfr':'\\uD835\\uDD2E','Qfr':'\\uD835\\uDD14','qint':'\\u2A0C','qopf':'\\uD835\\uDD62','Qopf':'\\u211A','qprime':'\\u2057','qscr':'\\uD835\\uDCC6','Qscr':'\\uD835\\uDCAC','quaternions':'\\u210D','quatint':'\\u2A16','quest':'?','questeq':'\\u225F','quot':'\"','QUOT':'\"','rAarr':'\\u21DB','race':'\\u223D\\u0331','racute':'\\u0155','Racute':'\\u0154','radic':'\\u221A','raemptyv':'\\u29B3','rang':'\\u27E9','Rang':'\\u27EB','rangd':'\\u2992','range':'\\u29A5','rangle':'\\u27E9','raquo':'\\xBB','rarr':'\\u2192','rArr':'\\u21D2','Rarr':'\\u21A0','rarrap':'\\u2975','rarrb':'\\u21E5','rarrbfs':'\\u2920','rarrc':'\\u2933','rarrfs':'\\u291E','rarrhk':'\\u21AA','rarrlp':'\\u21AC','rarrpl':'\\u2945','rarrsim':'\\u2974','rarrtl':'\\u21A3','Rarrtl':'\\u2916','rarrw':'\\u219D','ratail':'\\u291A','rAtail':'\\u291C','ratio':'\\u2236','rationals':'\\u211A','rbarr':'\\u290D','rBarr':'\\u290F','RBarr':'\\u2910','rbbrk':'\\u2773','rbrace':'}','rbrack':']','rbrke':'\\u298C','rbrksld':'\\u298E','rbrkslu':'\\u2990','rcaron':'\\u0159','Rcaron':'\\u0158','rcedil':'\\u0157','Rcedil':'\\u0156','rceil':'\\u2309','rcub':'}','rcy':'\\u0440','Rcy':'\\u0420','rdca':'\\u2937','rdldhar':'\\u2969','rdquo':'\\u201D','rdquor':'\\u201D','rdsh':'\\u21B3','Re':'\\u211C','real':'\\u211C','realine':'\\u211B','realpart':'\\u211C','reals':'\\u211D','rect':'\\u25AD','reg':'\\xAE','REG':'\\xAE','ReverseElement':'\\u220B','ReverseEquilibrium':'\\u21CB','ReverseUpEquilibrium':'\\u296F','rfisht':'\\u297D','rfloor':'\\u230B','rfr':'\\uD835\\uDD2F','Rfr':'\\u211C','rHar':'\\u2964','rhard':'\\u21C1','rharu':'\\u21C0','rharul':'\\u296C','rho':'\\u03C1','Rho':'\\u03A1','rhov':'\\u03F1','RightAngleBracket':'\\u27E9','rightarrow':'\\u2192','Rightarrow':'\\u21D2','RightArrow':'\\u2192','RightArrowBar':'\\u21E5','RightArrowLeftArrow':'\\u21C4','rightarrowtail':'\\u21A3','RightCeiling':'\\u2309','RightDoubleBracket':'\\u27E7','RightDownTeeVector':'\\u295D','RightDownVector':'\\u21C2','RightDownVectorBar':'\\u2955','RightFloor':'\\u230B','rightharpoondown':'\\u21C1','rightharpoonup':'\\u21C0','rightleftarrows':'\\u21C4','rightleftharpoons':'\\u21CC','rightrightarrows':'\\u21C9','rightsquigarrow':'\\u219D','RightTee':'\\u22A2','RightTeeArrow':'\\u21A6','RightTeeVector':'\\u295B','rightthreetimes':'\\u22CC','RightTriangle':'\\u22B3','RightTriangleBar':'\\u29D0','RightTriangleEqual':'\\u22B5','RightUpDownVector':'\\u294F','RightUpTeeVector':'\\u295C','RightUpVector':'\\u21BE','RightUpVectorBar':'\\u2954','RightVector':'\\u21C0','RightVectorBar':'\\u2953','ring':'\\u02DA','risingdotseq':'\\u2253','rlarr':'\\u21C4','rlhar':'\\u21CC','rlm':'\\u200F','rmoust':'\\u23B1','rmoustache':'\\u23B1','rnmid':'\\u2AEE','roang':'\\u27ED','roarr':'\\u21FE','robrk':'\\u27E7','ropar':'\\u2986','ropf':'\\uD835\\uDD63','Ropf':'\\u211D','roplus':'\\u2A2E','rotimes':'\\u2A35','RoundImplies':'\\u2970','rpar':')','rpargt':'\\u2994','rppolint':'\\u2A12','rrarr':'\\u21C9','Rrightarrow':'\\u21DB','rsaquo':'\\u203A','rscr':'\\uD835\\uDCC7','Rscr':'\\u211B','rsh':'\\u21B1','Rsh':'\\u21B1','rsqb':']','rsquo':'\\u2019','rsquor':'\\u2019','rthree':'\\u22CC','rtimes':'\\u22CA','rtri':'\\u25B9','rtrie':'\\u22B5','rtrif':'\\u25B8','rtriltri':'\\u29CE','RuleDelayed':'\\u29F4','ruluhar':'\\u2968','rx':'\\u211E','sacute':'\\u015B','Sacute':'\\u015A','sbquo':'\\u201A','sc':'\\u227B','Sc':'\\u2ABC','scap':'\\u2AB8','scaron':'\\u0161','Scaron':'\\u0160','sccue':'\\u227D','sce':'\\u2AB0','scE':'\\u2AB4','scedil':'\\u015F','Scedil':'\\u015E','scirc':'\\u015D','Scirc':'\\u015C','scnap':'\\u2ABA','scnE':'\\u2AB6','scnsim':'\\u22E9','scpolint':'\\u2A13','scsim':'\\u227F','scy':'\\u0441','Scy':'\\u0421','sdot':'\\u22C5','sdotb':'\\u22A1','sdote':'\\u2A66','searhk':'\\u2925','searr':'\\u2198','seArr':'\\u21D8','searrow':'\\u2198','sect':'\\xA7','semi':';','seswar':'\\u2929','setminus':'\\u2216','setmn':'\\u2216','sext':'\\u2736','sfr':'\\uD835\\uDD30','Sfr':'\\uD835\\uDD16','sfrown':'\\u2322','sharp':'\\u266F','shchcy':'\\u0449','SHCHcy':'\\u0429','shcy':'\\u0448','SHcy':'\\u0428','ShortDownArrow':'\\u2193','ShortLeftArrow':'\\u2190','shortmid':'\\u2223','shortparallel':'\\u2225','ShortRightArrow':'\\u2192','ShortUpArrow':'\\u2191','shy':'\\xAD','sigma':'\\u03C3','Sigma':'\\u03A3','sigmaf':'\\u03C2','sigmav':'\\u03C2','sim':'\\u223C','simdot':'\\u2A6A','sime':'\\u2243','simeq':'\\u2243','simg':'\\u2A9E','simgE':'\\u2AA0','siml':'\\u2A9D','simlE':'\\u2A9F','simne':'\\u2246','simplus':'\\u2A24','simrarr':'\\u2972','slarr':'\\u2190','SmallCircle':'\\u2218','smallsetminus':'\\u2216','smashp':'\\u2A33','smeparsl':'\\u29E4','smid':'\\u2223','smile':'\\u2323','smt':'\\u2AAA','smte':'\\u2AAC','smtes':'\\u2AAC\\uFE00','softcy':'\\u044C','SOFTcy':'\\u042C','sol':'/','solb':'\\u29C4','solbar':'\\u233F','sopf':'\\uD835\\uDD64','Sopf':'\\uD835\\uDD4A','spades':'\\u2660','spadesuit':'\\u2660','spar':'\\u2225','sqcap':'\\u2293','sqcaps':'\\u2293\\uFE00','sqcup':'\\u2294','sqcups':'\\u2294\\uFE00','Sqrt':'\\u221A','sqsub':'\\u228F','sqsube':'\\u2291','sqsubset':'\\u228F','sqsubseteq':'\\u2291','sqsup':'\\u2290','sqsupe':'\\u2292','sqsupset':'\\u2290','sqsupseteq':'\\u2292','squ':'\\u25A1','square':'\\u25A1','Square':'\\u25A1','SquareIntersection':'\\u2293','SquareSubset':'\\u228F','SquareSubsetEqual':'\\u2291','SquareSuperset':'\\u2290','SquareSupersetEqual':'\\u2292','SquareUnion':'\\u2294','squarf':'\\u25AA','squf':'\\u25AA','srarr':'\\u2192','sscr':'\\uD835\\uDCC8','Sscr':'\\uD835\\uDCAE','ssetmn':'\\u2216','ssmile':'\\u2323','sstarf':'\\u22C6','star':'\\u2606','Star':'\\u22C6','starf':'\\u2605','straightepsilon':'\\u03F5','straightphi':'\\u03D5','strns':'\\xAF','sub':'\\u2282','Sub':'\\u22D0','subdot':'\\u2ABD','sube':'\\u2286','subE':'\\u2AC5','subedot':'\\u2AC3','submult':'\\u2AC1','subne':'\\u228A','subnE':'\\u2ACB','subplus':'\\u2ABF','subrarr':'\\u2979','subset':'\\u2282','Subset':'\\u22D0','subseteq':'\\u2286','subseteqq':'\\u2AC5','SubsetEqual':'\\u2286','subsetneq':'\\u228A','subsetneqq':'\\u2ACB','subsim':'\\u2AC7','subsub':'\\u2AD5','subsup':'\\u2AD3','succ':'\\u227B','succapprox':'\\u2AB8','succcurlyeq':'\\u227D','Succeeds':'\\u227B','SucceedsEqual':'\\u2AB0','SucceedsSlantEqual':'\\u227D','SucceedsTilde':'\\u227F','succeq':'\\u2AB0','succnapprox':'\\u2ABA','succneqq':'\\u2AB6','succnsim':'\\u22E9','succsim':'\\u227F','SuchThat':'\\u220B','sum':'\\u2211','Sum':'\\u2211','sung':'\\u266A','sup':'\\u2283','Sup':'\\u22D1','sup1':'\\xB9','sup2':'\\xB2','sup3':'\\xB3','supdot':'\\u2ABE','supdsub':'\\u2AD8','supe':'\\u2287','supE':'\\u2AC6','supedot':'\\u2AC4','Superset':'\\u2283','SupersetEqual':'\\u2287','suphsol':'\\u27C9','suphsub':'\\u2AD7','suplarr':'\\u297B','supmult':'\\u2AC2','supne':'\\u228B','supnE':'\\u2ACC','supplus':'\\u2AC0','supset':'\\u2283','Supset':'\\u22D1','supseteq':'\\u2287','supseteqq':'\\u2AC6','supsetneq':'\\u228B','supsetneqq':'\\u2ACC','supsim':'\\u2AC8','supsub':'\\u2AD4','supsup':'\\u2AD6','swarhk':'\\u2926','swarr':'\\u2199','swArr':'\\u21D9','swarrow':'\\u2199','swnwar':'\\u292A','szlig':'\\xDF','Tab':'\\t','target':'\\u2316','tau':'\\u03C4','Tau':'\\u03A4','tbrk':'\\u23B4','tcaron':'\\u0165','Tcaron':'\\u0164','tcedil':'\\u0163','Tcedil':'\\u0162','tcy':'\\u0442','Tcy':'\\u0422','tdot':'\\u20DB','telrec':'\\u2315','tfr':'\\uD835\\uDD31','Tfr':'\\uD835\\uDD17','there4':'\\u2234','therefore':'\\u2234','Therefore':'\\u2234','theta':'\\u03B8','Theta':'\\u0398','thetasym':'\\u03D1','thetav':'\\u03D1','thickapprox':'\\u2248','thicksim':'\\u223C','ThickSpace':'\\u205F\\u200A','thinsp':'\\u2009','ThinSpace':'\\u2009','thkap':'\\u2248','thksim':'\\u223C','thorn':'\\xFE','THORN':'\\xDE','tilde':'\\u02DC','Tilde':'\\u223C','TildeEqual':'\\u2243','TildeFullEqual':'\\u2245','TildeTilde':'\\u2248','times':'\\xD7','timesb':'\\u22A0','timesbar':'\\u2A31','timesd':'\\u2A30','tint':'\\u222D','toea':'\\u2928','top':'\\u22A4','topbot':'\\u2336','topcir':'\\u2AF1','topf':'\\uD835\\uDD65','Topf':'\\uD835\\uDD4B','topfork':'\\u2ADA','tosa':'\\u2929','tprime':'\\u2034','trade':'\\u2122','TRADE':'\\u2122','triangle':'\\u25B5','triangledown':'\\u25BF','triangleleft':'\\u25C3','trianglelefteq':'\\u22B4','triangleq':'\\u225C','triangleright':'\\u25B9','trianglerighteq':'\\u22B5','tridot':'\\u25EC','trie':'\\u225C','triminus':'\\u2A3A','TripleDot':'\\u20DB','triplus':'\\u2A39','trisb':'\\u29CD','tritime':'\\u2A3B','trpezium':'\\u23E2','tscr':'\\uD835\\uDCC9','Tscr':'\\uD835\\uDCAF','tscy':'\\u0446','TScy':'\\u0426','tshcy':'\\u045B','TSHcy':'\\u040B','tstrok':'\\u0167','Tstrok':'\\u0166','twixt':'\\u226C','twoheadleftarrow':'\\u219E','twoheadrightarrow':'\\u21A0','uacute':'\\xFA','Uacute':'\\xDA','uarr':'\\u2191','uArr':'\\u21D1','Uarr':'\\u219F','Uarrocir':'\\u2949','ubrcy':'\\u045E','Ubrcy':'\\u040E','ubreve':'\\u016D','Ubreve':'\\u016C','ucirc':'\\xFB','Ucirc':'\\xDB','ucy':'\\u0443','Ucy':'\\u0423','udarr':'\\u21C5','udblac':'\\u0171','Udblac':'\\u0170','udhar':'\\u296E','ufisht':'\\u297E','ufr':'\\uD835\\uDD32','Ufr':'\\uD835\\uDD18','ugrave':'\\xF9','Ugrave':'\\xD9','uHar':'\\u2963','uharl':'\\u21BF','uharr':'\\u21BE','uhblk':'\\u2580','ulcorn':'\\u231C','ulcorner':'\\u231C','ulcrop':'\\u230F','ultri':'\\u25F8','umacr':'\\u016B','Umacr':'\\u016A','uml':'\\xA8','UnderBar':'_','UnderBrace':'\\u23DF','UnderBracket':'\\u23B5','UnderParenthesis':'\\u23DD','Union':'\\u22C3','UnionPlus':'\\u228E','uogon':'\\u0173','Uogon':'\\u0172','uopf':'\\uD835\\uDD66','Uopf':'\\uD835\\uDD4C','uparrow':'\\u2191','Uparrow':'\\u21D1','UpArrow':'\\u2191','UpArrowBar':'\\u2912','UpArrowDownArrow':'\\u21C5','updownarrow':'\\u2195','Updownarrow':'\\u21D5','UpDownArrow':'\\u2195','UpEquilibrium':'\\u296E','upharpoonleft':'\\u21BF','upharpoonright':'\\u21BE','uplus':'\\u228E','UpperLeftArrow':'\\u2196','UpperRightArrow':'\\u2197','upsi':'\\u03C5','Upsi':'\\u03D2','upsih':'\\u03D2','upsilon':'\\u03C5','Upsilon':'\\u03A5','UpTee':'\\u22A5','UpTeeArrow':'\\u21A5','upuparrows':'\\u21C8','urcorn':'\\u231D','urcorner':'\\u231D','urcrop':'\\u230E','uring':'\\u016F','Uring':'\\u016E','urtri':'\\u25F9','uscr':'\\uD835\\uDCCA','Uscr':'\\uD835\\uDCB0','utdot':'\\u22F0','utilde':'\\u0169','Utilde':'\\u0168','utri':'\\u25B5','utrif':'\\u25B4','uuarr':'\\u21C8','uuml':'\\xFC','Uuml':'\\xDC','uwangle':'\\u29A7','vangrt':'\\u299C','varepsilon':'\\u03F5','varkappa':'\\u03F0','varnothing':'\\u2205','varphi':'\\u03D5','varpi':'\\u03D6','varpropto':'\\u221D','varr':'\\u2195','vArr':'\\u21D5','varrho':'\\u03F1','varsigma':'\\u03C2','varsubsetneq':'\\u228A\\uFE00','varsubsetneqq':'\\u2ACB\\uFE00','varsupsetneq':'\\u228B\\uFE00','varsupsetneqq':'\\u2ACC\\uFE00','vartheta':'\\u03D1','vartriangleleft':'\\u22B2','vartriangleright':'\\u22B3','vBar':'\\u2AE8','Vbar':'\\u2AEB','vBarv':'\\u2AE9','vcy':'\\u0432','Vcy':'\\u0412','vdash':'\\u22A2','vDash':'\\u22A8','Vdash':'\\u22A9','VDash':'\\u22AB','Vdashl':'\\u2AE6','vee':'\\u2228','Vee':'\\u22C1','veebar':'\\u22BB','veeeq':'\\u225A','vellip':'\\u22EE','verbar':'|','Verbar':'\\u2016','vert':'|','Vert':'\\u2016','VerticalBar':'\\u2223','VerticalLine':'|','VerticalSeparator':'\\u2758','VerticalTilde':'\\u2240','VeryThinSpace':'\\u200A','vfr':'\\uD835\\uDD33','Vfr':'\\uD835\\uDD19','vltri':'\\u22B2','vnsub':'\\u2282\\u20D2','vnsup':'\\u2283\\u20D2','vopf':'\\uD835\\uDD67','Vopf':'\\uD835\\uDD4D','vprop':'\\u221D','vrtri':'\\u22B3','vscr':'\\uD835\\uDCCB','Vscr':'\\uD835\\uDCB1','vsubne':'\\u228A\\uFE00','vsubnE':'\\u2ACB\\uFE00','vsupne':'\\u228B\\uFE00','vsupnE':'\\u2ACC\\uFE00','Vvdash':'\\u22AA','vzigzag':'\\u299A','wcirc':'\\u0175','Wcirc':'\\u0174','wedbar':'\\u2A5F','wedge':'\\u2227','Wedge':'\\u22C0','wedgeq':'\\u2259','weierp':'\\u2118','wfr':'\\uD835\\uDD34','Wfr':'\\uD835\\uDD1A','wopf':'\\uD835\\uDD68','Wopf':'\\uD835\\uDD4E','wp':'\\u2118','wr':'\\u2240','wreath':'\\u2240','wscr':'\\uD835\\uDCCC','Wscr':'\\uD835\\uDCB2','xcap':'\\u22C2','xcirc':'\\u25EF','xcup':'\\u22C3','xdtri':'\\u25BD','xfr':'\\uD835\\uDD35','Xfr':'\\uD835\\uDD1B','xharr':'\\u27F7','xhArr':'\\u27FA','xi':'\\u03BE','Xi':'\\u039E','xlarr':'\\u27F5','xlArr':'\\u27F8','xmap':'\\u27FC','xnis':'\\u22FB','xodot':'\\u2A00','xopf':'\\uD835\\uDD69','Xopf':'\\uD835\\uDD4F','xoplus':'\\u2A01','xotime':'\\u2A02','xrarr':'\\u27F6','xrArr':'\\u27F9','xscr':'\\uD835\\uDCCD','Xscr':'\\uD835\\uDCB3','xsqcup':'\\u2A06','xuplus':'\\u2A04','xutri':'\\u25B3','xvee':'\\u22C1','xwedge':'\\u22C0','yacute':'\\xFD','Yacute':'\\xDD','yacy':'\\u044F','YAcy':'\\u042F','ycirc':'\\u0177','Ycirc':'\\u0176','ycy':'\\u044B','Ycy':'\\u042B','yen':'\\xA5','yfr':'\\uD835\\uDD36','Yfr':'\\uD835\\uDD1C','yicy':'\\u0457','YIcy':'\\u0407','yopf':'\\uD835\\uDD6A','Yopf':'\\uD835\\uDD50','yscr':'\\uD835\\uDCCE','Yscr':'\\uD835\\uDCB4','yucy':'\\u044E','YUcy':'\\u042E','yuml':'\\xFF','Yuml':'\\u0178','zacute':'\\u017A','Zacute':'\\u0179','zcaron':'\\u017E','Zcaron':'\\u017D','zcy':'\\u0437','Zcy':'\\u0417','zdot':'\\u017C','Zdot':'\\u017B','zeetrf':'\\u2128','ZeroWidthSpace':'\\u200B','zeta':'\\u03B6','Zeta':'\\u0396','zfr':'\\uD835\\uDD37','Zfr':'\\u2128','zhcy':'\\u0436','ZHcy':'\\u0416','zigrarr':'\\u21DD','zopf':'\\uD835\\uDD6B','Zopf':'\\u2124','zscr':'\\uD835\\uDCCF','Zscr':'\\uD835\\uDCB5','zwj':'\\u200D','zwnj':'\\u200C'};\n\tvar decodeMapLegacy = {'aacute':'\\xE1','Aacute':'\\xC1','acirc':'\\xE2','Acirc':'\\xC2','acute':'\\xB4','aelig':'\\xE6','AElig':'\\xC6','agrave':'\\xE0','Agrave':'\\xC0','amp':'&','AMP':'&','aring':'\\xE5','Aring':'\\xC5','atilde':'\\xE3','Atilde':'\\xC3','auml':'\\xE4','Auml':'\\xC4','brvbar':'\\xA6','ccedil':'\\xE7','Ccedil':'\\xC7','cedil':'\\xB8','cent':'\\xA2','copy':'\\xA9','COPY':'\\xA9','curren':'\\xA4','deg':'\\xB0','divide':'\\xF7','eacute':'\\xE9','Eacute':'\\xC9','ecirc':'\\xEA','Ecirc':'\\xCA','egrave':'\\xE8','Egrave':'\\xC8','eth':'\\xF0','ETH':'\\xD0','euml':'\\xEB','Euml':'\\xCB','frac12':'\\xBD','frac14':'\\xBC','frac34':'\\xBE','gt':'>','GT':'>','iacute':'\\xED','Iacute':'\\xCD','icirc':'\\xEE','Icirc':'\\xCE','iexcl':'\\xA1','igrave':'\\xEC','Igrave':'\\xCC','iquest':'\\xBF','iuml':'\\xEF','Iuml':'\\xCF','laquo':'\\xAB','lt':'<','LT':'<','macr':'\\xAF','micro':'\\xB5','middot':'\\xB7','nbsp':'\\xA0','not':'\\xAC','ntilde':'\\xF1','Ntilde':'\\xD1','oacute':'\\xF3','Oacute':'\\xD3','ocirc':'\\xF4','Ocirc':'\\xD4','ograve':'\\xF2','Ograve':'\\xD2','ordf':'\\xAA','ordm':'\\xBA','oslash':'\\xF8','Oslash':'\\xD8','otilde':'\\xF5','Otilde':'\\xD5','ouml':'\\xF6','Ouml':'\\xD6','para':'\\xB6','plusmn':'\\xB1','pound':'\\xA3','quot':'\"','QUOT':'\"','raquo':'\\xBB','reg':'\\xAE','REG':'\\xAE','sect':'\\xA7','shy':'\\xAD','sup1':'\\xB9','sup2':'\\xB2','sup3':'\\xB3','szlig':'\\xDF','thorn':'\\xFE','THORN':'\\xDE','times':'\\xD7','uacute':'\\xFA','Uacute':'\\xDA','ucirc':'\\xFB','Ucirc':'\\xDB','ugrave':'\\xF9','Ugrave':'\\xD9','uml':'\\xA8','uuml':'\\xFC','Uuml':'\\xDC','yacute':'\\xFD','Yacute':'\\xDD','yen':'\\xA5','yuml':'\\xFF'};\n\tvar decodeMapNumeric = {'0':'\\uFFFD','128':'\\u20AC','130':'\\u201A','131':'\\u0192','132':'\\u201E','133':'\\u2026','134':'\\u2020','135':'\\u2021','136':'\\u02C6','137':'\\u2030','138':'\\u0160','139':'\\u2039','140':'\\u0152','142':'\\u017D','145':'\\u2018','146':'\\u2019','147':'\\u201C','148':'\\u201D','149':'\\u2022','150':'\\u2013','151':'\\u2014','152':'\\u02DC','153':'\\u2122','154':'\\u0161','155':'\\u203A','156':'\\u0153','158':'\\u017E','159':'\\u0178'};\n\tvar invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar stringFromCharCode = String.fromCharCode;\n\n\tvar object = {};\n\tvar hasOwnProperty = object.hasOwnProperty;\n\tvar has = function(object, propertyName) {\n\t\treturn hasOwnProperty.call(object, propertyName);\n\t};\n\n\tvar contains = function(array, value) {\n\t\tvar index = -1;\n\t\tvar length = array.length;\n\t\twhile (++index < length) {\n\t\t\tif (array[index] == value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\n\tvar merge = function(options, defaults) {\n\t\tif (!options) {\n\t\t\treturn defaults;\n\t\t}\n\t\tvar result = {};\n\t\tvar key;\n\t\tfor (key in defaults) {\n\t\t\t// A `hasOwnProperty` check is not needed here, since only recognized\n\t\t\t// option names are used anyway. Any others are ignored.\n\t\t\tresult[key] = has(options, key) ? options[key] : defaults[key];\n\t\t}\n\t\treturn result;\n\t};\n\n\t// Modified version of `ucs2encode`; see https://mths.be/punycode.\n\tvar codePointToSymbol = function(codePoint, strict) {\n\t\tvar output = '';\n\t\tif ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) {\n\t\t\t// See issue #4:\n\t\t\t// “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is\n\t\t\t// greater than 0x10FFFF, then this is a parse error. Return a U+FFFD\n\t\t\t// REPLACEMENT CHARACTER.”\n\t\t\tif (strict) {\n\t\t\t\tparseError('character reference outside the permissible Unicode range');\n\t\t\t}\n\t\t\treturn '\\uFFFD';\n\t\t}\n\t\tif (has(decodeMapNumeric, codePoint)) {\n\t\t\tif (strict) {\n\t\t\t\tparseError('disallowed character reference');\n\t\t\t}\n\t\t\treturn decodeMapNumeric[codePoint];\n\t\t}\n\t\tif (strict && contains(invalidReferenceCodePoints, codePoint)) {\n\t\t\tparseError('disallowed character reference');\n\t\t}\n\t\tif (codePoint > 0xFFFF) {\n\t\t\tcodePoint -= 0x10000;\n\t\t\toutput += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);\n\t\t\tcodePoint = 0xDC00 | codePoint & 0x3FF;\n\t\t}\n\t\toutput += stringFromCharCode(codePoint);\n\t\treturn output;\n\t};\n\n\tvar hexEscape = function(codePoint) {\n\t\treturn '' + codePoint.toString(16).toUpperCase() + ';';\n\t};\n\n\tvar decEscape = function(codePoint) {\n\t\treturn '' + codePoint + ';';\n\t};\n\n\tvar parseError = function(message) {\n\t\tthrow Error('Parse error: ' + message);\n\t};\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar encode = function(string, options) {\n\t\toptions = merge(options, encode.options);\n\t\tvar strict = options.strict;\n\t\tif (strict && regexInvalidRawCodePoint.test(string)) {\n\t\t\tparseError('forbidden code point');\n\t\t}\n\t\tvar encodeEverything = options.encodeEverything;\n\t\tvar useNamedReferences = options.useNamedReferences;\n\t\tvar allowUnsafeSymbols = options.allowUnsafeSymbols;\n\t\tvar escapeCodePoint = options.decimal ? decEscape : hexEscape;\n\n\t\tvar escapeBmpSymbol = function(symbol) {\n\t\t\treturn escapeCodePoint(symbol.charCodeAt(0));\n\t\t};\n\n\t\tif (encodeEverything) {\n\t\t\t// Encode ASCII symbols.\n\t\t\tstring = string.replace(regexAsciiWhitelist, function(symbol) {\n\t\t\t\t// Use named references if requested & possible.\n\t\t\t\tif (useNamedReferences && has(encodeMap, symbol)) {\n\t\t\t\t\treturn '&' + encodeMap[symbol] + ';';\n\t\t\t\t}\n\t\t\t\treturn escapeBmpSymbol(symbol);\n\t\t\t});\n\t\t\t// Shorten a few escapes that represent two symbols, of which at least one\n\t\t\t// is within the ASCII range.\n\t\t\tif (useNamedReferences) {\n\t\t\t\tstring = string\n\t\t\t\t\t.replace(/>\\u20D2/g, '>⃒')\n\t\t\t\t\t.replace(/<\\u20D2/g, '<⃒')\n\t\t\t\t\t.replace(/fj/g, 'fj');\n\t\t\t}\n\t\t\t// Encode non-ASCII symbols.\n\t\t\tif (useNamedReferences) {\n\t\t\t\t// Encode non-ASCII symbols that can be replaced with a named reference.\n\t\t\t\tstring = string.replace(regexEncodeNonAscii, function(string) {\n\t\t\t\t\t// Note: there is no need to check `has(encodeMap, string)` here.\n\t\t\t\t\treturn '&' + encodeMap[string] + ';';\n\t\t\t\t});\n\t\t\t}\n\t\t\t// Note: any remaining non-ASCII symbols are handled outside of the `if`.\n\t\t} else if (useNamedReferences) {\n\t\t\t// Apply named character references.\n\t\t\t// Encode `<>\"'&` using named character references.\n\t\t\tif (!allowUnsafeSymbols) {\n\t\t\t\tstring = string.replace(regexEscape, function(string) {\n\t\t\t\t\treturn '&' + encodeMap[string] + ';'; // no need to check `has()` here\n\t\t\t\t});\n\t\t\t}\n\t\t\t// Shorten escapes that represent two symbols, of which at least one is\n\t\t\t// `<>\"'&`.\n\t\t\tstring = string\n\t\t\t\t.replace(/>\\u20D2/g, '>⃒')\n\t\t\t\t.replace(/<\\u20D2/g, '<⃒');\n\t\t\t// Encode non-ASCII symbols that can be replaced with a named reference.\n\t\t\tstring = string.replace(regexEncodeNonAscii, function(string) {\n\t\t\t\t// Note: there is no need to check `has(encodeMap, string)` here.\n\t\t\t\treturn '&' + encodeMap[string] + ';';\n\t\t\t});\n\t\t} else if (!allowUnsafeSymbols) {\n\t\t\t// Encode `<>\"'&` using hexadecimal escapes, now that they’re not handled\n\t\t\t// using named character references.\n\t\t\tstring = string.replace(regexEscape, escapeBmpSymbol);\n\t\t}\n\t\treturn string\n\t\t\t// Encode astral symbols.\n\t\t\t.replace(regexAstralSymbols, function($0) {\n\t\t\t\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t\t\t\tvar high = $0.charCodeAt(0);\n\t\t\t\tvar low = $0.charCodeAt(1);\n\t\t\t\tvar codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;\n\t\t\t\treturn escapeCodePoint(codePoint);\n\t\t\t})\n\t\t\t// Encode any remaining BMP symbols that are not printable ASCII symbols\n\t\t\t// using a hexadecimal escape.\n\t\t\t.replace(regexBmpWhitelist, escapeBmpSymbol);\n\t};\n\t// Expose default options (so they can be overridden globally).\n\tencode.options = {\n\t\t'allowUnsafeSymbols': false,\n\t\t'encodeEverything': false,\n\t\t'strict': false,\n\t\t'useNamedReferences': false,\n\t\t'decimal' : false\n\t};\n\n\tvar decode = function(html, options) {\n\t\toptions = merge(options, decode.options);\n\t\tvar strict = options.strict;\n\t\tif (strict && regexInvalidEntity.test(html)) {\n\t\t\tparseError('malformed character reference');\n\t\t}\n\t\treturn html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) {\n\t\t\tvar codePoint;\n\t\t\tvar semicolon;\n\t\t\tvar decDigits;\n\t\t\tvar hexDigits;\n\t\t\tvar reference;\n\t\t\tvar next;\n\n\t\t\tif ($1) {\n\t\t\t\treference = $1;\n\t\t\t\t// Note: there is no need to check `has(decodeMap, reference)`.\n\t\t\t\treturn decodeMap[reference];\n\t\t\t}\n\n\t\t\tif ($2) {\n\t\t\t\t// Decode named character references without trailing `;`, e.g. `&`.\n\t\t\t\t// This is only a parse error if it gets converted to `&`, or if it is\n\t\t\t\t// followed by `=` in an attribute context.\n\t\t\t\treference = $2;\n\t\t\t\tnext = $3;\n\t\t\t\tif (next && options.isAttributeValue) {\n\t\t\t\t\tif (strict && next == '=') {\n\t\t\t\t\t\tparseError('`&` did not start a character reference');\n\t\t\t\t\t}\n\t\t\t\t\treturn $0;\n\t\t\t\t} else {\n\t\t\t\t\tif (strict) {\n\t\t\t\t\t\tparseError(\n\t\t\t\t\t\t\t'named character reference was not terminated by a semicolon'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t// Note: there is no need to check `has(decodeMapLegacy, reference)`.\n\t\t\t\t\treturn decodeMapLegacy[reference] + (next || '');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($4) {\n\t\t\t\t// Decode decimal escapes, e.g. `𝌆`.\n\t\t\t\tdecDigits = $4;\n\t\t\t\tsemicolon = $5;\n\t\t\t\tif (strict && !semicolon) {\n\t\t\t\t\tparseError('character reference was not terminated by a semicolon');\n\t\t\t\t}\n\t\t\t\tcodePoint = parseInt(decDigits, 10);\n\t\t\t\treturn codePointToSymbol(codePoint, strict);\n\t\t\t}\n\n\t\t\tif ($6) {\n\t\t\t\t// Decode hexadecimal escapes, e.g. `𝌆`.\n\t\t\t\thexDigits = $6;\n\t\t\t\tsemicolon = $7;\n\t\t\t\tif (strict && !semicolon) {\n\t\t\t\t\tparseError('character reference was not terminated by a semicolon');\n\t\t\t\t}\n\t\t\t\tcodePoint = parseInt(hexDigits, 16);\n\t\t\t\treturn codePointToSymbol(codePoint, strict);\n\t\t\t}\n\n\t\t\t// If we’re still here, `if ($7)` is implied; it’s an ambiguous\n\t\t\t// ampersand for sure. https://mths.be/notes/ambiguous-ampersands\n\t\t\tif (strict) {\n\t\t\t\tparseError(\n\t\t\t\t\t'named character reference was not terminated by a semicolon'\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $0;\n\t\t});\n\t};\n\t// Expose default options (so they can be overridden globally).\n\tdecode.options = {\n\t\t'isAttributeValue': false,\n\t\t'strict': false\n\t};\n\n\tvar escape = function(string) {\n\t\treturn string.replace(regexEscape, function($0) {\n\t\t\t// Note: there is no need to check `has(escapeMap, $0)` here.\n\t\t\treturn escapeMap[$0];\n\t\t});\n\t};\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar he = {\n\t\t'version': '1.2.0',\n\t\t'encode': encode,\n\t\t'decode': decode,\n\t\t'escape': escape,\n\t\t'unescape': decode\n\t};\n\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine(function() {\n\t\t\treturn he;\n\t\t});\n\t}\telse if (freeExports && !freeExports.nodeType) {\n\t\tif (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = he;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (var key in he) {\n\t\t\t\thas(he, key) && (freeExports[key] = he[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.he = he;\n\t}\n\n}(this));\n","'use strict';\n\nvar CleanCSS = require('clean-css');\nvar decode = require('he').decode;\nvar HTMLParser = require('./htmlparser').HTMLParser;\nvar RelateUrl = require('relateurl');\nvar TokenChain = require('./tokenchain');\nvar UglifyJS = require('uglify-js');\nvar utils = require('./utils');\n\nfunction trimWhitespace(str) {\n return str && str.replace(/^[ \\n\\r\\t\\f]+/, '').replace(/[ \\n\\r\\t\\f]+$/, '');\n}\n\nfunction collapseWhitespaceAll(str) {\n // Non-breaking space is specifically handled inside the replacer function here:\n return str && str.replace(/[ \\n\\r\\t\\f\\xA0]+/g, function(spaces) {\n return spaces === '\\t' ? '\\t' : spaces.replace(/(^|\\xA0+)[^\\xA0]+/g, '$1 ');\n });\n}\n\nfunction collapseWhitespace(str, options, trimLeft, trimRight, collapseAll) {\n var lineBreakBefore = '', lineBreakAfter = '';\n\n if (options.preserveLineBreaks) {\n str = str.replace(/^[ \\n\\r\\t\\f]*?[\\n\\r][ \\n\\r\\t\\f]*/, function() {\n lineBreakBefore = '\\n';\n return '';\n }).replace(/[ \\n\\r\\t\\f]*?[\\n\\r][ \\n\\r\\t\\f]*$/, function() {\n lineBreakAfter = '\\n';\n return '';\n });\n }\n\n if (trimLeft) {\n // Non-breaking space is specifically handled inside the replacer function here:\n str = str.replace(/^[ \\n\\r\\t\\f\\xA0]+/, function(spaces) {\n var conservative = !lineBreakBefore && options.conservativeCollapse;\n if (conservative && spaces === '\\t') {\n return '\\t';\n }\n return spaces.replace(/^[^\\xA0]+/, '').replace(/(\\xA0+)[^\\xA0]+/g, '$1 ') || (conservative ? ' ' : '');\n });\n }\n\n if (trimRight) {\n // Non-breaking space is specifically handled inside the replacer function here:\n str = str.replace(/[ \\n\\r\\t\\f\\xA0]+$/, function(spaces) {\n var conservative = !lineBreakAfter && options.conservativeCollapse;\n if (conservative && spaces === '\\t') {\n return '\\t';\n }\n return spaces.replace(/[^\\xA0]+(\\xA0+)/g, ' $1').replace(/[^\\xA0]+$/, '') || (conservative ? ' ' : '');\n });\n }\n\n if (collapseAll) {\n // strip non space whitespace then compress spaces to one\n str = collapseWhitespaceAll(str);\n }\n\n return lineBreakBefore + str + lineBreakAfter;\n}\n\nvar createMapFromString = utils.createMapFromString;\n// non-empty tags that will maintain whitespace around them\nvar inlineTags = createMapFromString('a,abbr,acronym,b,bdi,bdo,big,button,cite,code,del,dfn,em,font,i,ins,kbd,label,mark,math,nobr,object,q,rp,rt,rtc,ruby,s,samp,select,small,span,strike,strong,sub,sup,svg,textarea,time,tt,u,var');\n// non-empty tags that will maintain whitespace within them\nvar inlineTextTags = createMapFromString('a,abbr,acronym,b,big,del,em,font,i,ins,kbd,mark,nobr,rp,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var');\n// self-closing tags that will maintain whitespace around them\nvar selfClosingInlineTags = createMapFromString('comment,img,input,wbr');\n\nfunction collapseWhitespaceSmart(str, prevTag, nextTag, options) {\n var trimLeft = prevTag && !selfClosingInlineTags(prevTag);\n if (trimLeft && !options.collapseInlineTagWhitespace) {\n trimLeft = prevTag.charAt(0) === '/' ? !inlineTags(prevTag.slice(1)) : !inlineTextTags(prevTag);\n }\n var trimRight = nextTag && !selfClosingInlineTags(nextTag);\n if (trimRight && !options.collapseInlineTagWhitespace) {\n trimRight = nextTag.charAt(0) === '/' ? !inlineTextTags(nextTag.slice(1)) : !inlineTags(nextTag);\n }\n return collapseWhitespace(str, options, trimLeft, trimRight, prevTag && nextTag);\n}\n\nfunction isConditionalComment(text) {\n return /^\\[if\\s[^\\]]+]|\\[endif]$/.test(text);\n}\n\nfunction isIgnoredComment(text, options) {\n for (var i = 0, len = options.ignoreCustomComments.length; i < len; i++) {\n if (options.ignoreCustomComments[i].test(text)) {\n return true;\n }\n }\n return false;\n}\n\nfunction isEventAttribute(attrName, options) {\n var patterns = options.customEventAttributes;\n if (patterns) {\n for (var i = patterns.length; i--;) {\n if (patterns[i].test(attrName)) {\n return true;\n }\n }\n return false;\n }\n return /^on[a-z]{3,}$/.test(attrName);\n}\n\nfunction canRemoveAttributeQuotes(value) {\n // https://mathiasbynens.be/notes/unquoted-attribute-values\n return /^[^ \\t\\n\\f\\r\"'`=<>]+$/.test(value);\n}\n\nfunction attributesInclude(attributes, attribute) {\n for (var i = attributes.length; i--;) {\n if (attributes[i].name.toLowerCase() === attribute) {\n return true;\n }\n }\n return false;\n}\n\nfunction isAttributeRedundant(tag, attrName, attrValue, attrs) {\n attrValue = attrValue ? trimWhitespace(attrValue.toLowerCase()) : '';\n\n return (\n tag === 'script' &&\n attrName === 'language' &&\n attrValue === 'javascript' ||\n\n tag === 'form' &&\n attrName === 'method' &&\n attrValue === 'get' ||\n\n tag === 'input' &&\n attrName === 'type' &&\n attrValue === 'text' ||\n\n tag === 'script' &&\n attrName === 'charset' &&\n !attributesInclude(attrs, 'src') ||\n\n tag === 'a' &&\n attrName === 'name' &&\n attributesInclude(attrs, 'id') ||\n\n tag === 'area' &&\n attrName === 'shape' &&\n attrValue === 'rect'\n );\n}\n\n// https://mathiasbynens.be/demo/javascript-mime-type\n// https://developer.mozilla.org/en/docs/Web/HTML/Element/script#attr-type\nvar executableScriptsMimetypes = utils.createMap([\n 'text/javascript',\n 'text/ecmascript',\n 'text/jscript',\n 'application/javascript',\n 'application/x-javascript',\n 'application/ecmascript'\n]);\n\nfunction isScriptTypeAttribute(attrValue) {\n attrValue = trimWhitespace(attrValue.split(/;/, 2)[0]).toLowerCase();\n return attrValue === '' || executableScriptsMimetypes(attrValue);\n}\n\nfunction isExecutableScript(tag, attrs) {\n if (tag !== 'script') {\n return false;\n }\n for (var i = 0, len = attrs.length; i < len; i++) {\n var attrName = attrs[i].name.toLowerCase();\n if (attrName === 'type') {\n return isScriptTypeAttribute(attrs[i].value);\n }\n }\n return true;\n}\n\nfunction isStyleLinkTypeAttribute(attrValue) {\n attrValue = trimWhitespace(attrValue).toLowerCase();\n return attrValue === '' || attrValue === 'text/css';\n}\n\nfunction isStyleSheet(tag, attrs) {\n if (tag !== 'style') {\n return false;\n }\n for (var i = 0, len = attrs.length; i < len; i++) {\n var attrName = attrs[i].name.toLowerCase();\n if (attrName === 'type') {\n return isStyleLinkTypeAttribute(attrs[i].value);\n }\n }\n return true;\n}\n\nvar isSimpleBoolean = createMapFromString('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible');\nvar isBooleanValue = createMapFromString('true,false');\n\nfunction isBooleanAttribute(attrName, attrValue) {\n return isSimpleBoolean(attrName) || attrName === 'draggable' && !isBooleanValue(attrValue);\n}\n\nfunction isUriTypeAttribute(attrName, tag) {\n return (\n /^(?:a|area|link|base)$/.test(tag) && attrName === 'href' ||\n tag === 'img' && /^(?:src|longdesc|usemap)$/.test(attrName) ||\n tag === 'object' && /^(?:classid|codebase|data|usemap)$/.test(attrName) ||\n tag === 'q' && attrName === 'cite' ||\n tag === 'blockquote' && attrName === 'cite' ||\n (tag === 'ins' || tag === 'del') && attrName === 'cite' ||\n tag === 'form' && attrName === 'action' ||\n tag === 'input' && (attrName === 'src' || attrName === 'usemap') ||\n tag === 'head' && attrName === 'profile' ||\n tag === 'script' && (attrName === 'src' || attrName === 'for')\n );\n}\n\nfunction isNumberTypeAttribute(attrName, tag) {\n return (\n /^(?:a|area|object|button)$/.test(tag) && attrName === 'tabindex' ||\n tag === 'input' && (attrName === 'maxlength' || attrName === 'tabindex') ||\n tag === 'select' && (attrName === 'size' || attrName === 'tabindex') ||\n tag === 'textarea' && /^(?:rows|cols|tabindex)$/.test(attrName) ||\n tag === 'colgroup' && attrName === 'span' ||\n tag === 'col' && attrName === 'span' ||\n (tag === 'th' || tag === 'td') && (attrName === 'rowspan' || attrName === 'colspan')\n );\n}\n\nfunction isLinkType(tag, attrs, value) {\n if (tag !== 'link') {\n return false;\n }\n for (var i = 0, len = attrs.length; i < len; i++) {\n if (attrs[i].name === 'rel' && attrs[i].value === value) {\n return true;\n }\n }\n}\n\nfunction isMediaQuery(tag, attrs, attrName) {\n return attrName === 'media' && (isLinkType(tag, attrs, 'stylesheet') || isStyleSheet(tag, attrs));\n}\n\nvar srcsetTags = createMapFromString('img,source');\n\nfunction isSrcset(attrName, tag) {\n return attrName === 'srcset' && srcsetTags(tag);\n}\n\nfunction cleanAttributeValue(tag, attrName, attrValue, options, attrs) {\n if (isEventAttribute(attrName, options)) {\n attrValue = trimWhitespace(attrValue).replace(/^javascript:\\s*/i, '');\n return options.minifyJS(attrValue, true);\n }\n else if (attrName === 'class') {\n attrValue = trimWhitespace(attrValue);\n if (options.sortClassName) {\n attrValue = options.sortClassName(attrValue);\n }\n else {\n attrValue = collapseWhitespaceAll(attrValue);\n }\n return attrValue;\n }\n else if (isUriTypeAttribute(attrName, tag)) {\n attrValue = trimWhitespace(attrValue);\n return isLinkType(tag, attrs, 'canonical') ? attrValue : options.minifyURLs(attrValue);\n }\n else if (isNumberTypeAttribute(attrName, tag)) {\n return trimWhitespace(attrValue);\n }\n else if (attrName === 'style') {\n attrValue = trimWhitespace(attrValue);\n if (attrValue) {\n if (/;$/.test(attrValue) && !/?[0-9a-zA-Z]+;$/.test(attrValue)) {\n attrValue = attrValue.replace(/\\s*;$/, ';');\n }\n attrValue = options.minifyCSS(attrValue, 'inline');\n }\n return attrValue;\n }\n else if (isSrcset(attrName, tag)) {\n // https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-srcset\n attrValue = trimWhitespace(attrValue).split(/\\s+,\\s*|\\s*,\\s+/).map(function(candidate) {\n var url = candidate;\n var descriptor = '';\n var match = candidate.match(/\\s+([1-9][0-9]*w|[0-9]+(?:\\.[0-9]+)?x)$/);\n if (match) {\n url = url.slice(0, -match[0].length);\n var num = +match[1].slice(0, -1);\n var suffix = match[1].slice(-1);\n if (num !== 1 || suffix !== 'x') {\n descriptor = ' ' + num + suffix;\n }\n }\n return options.minifyURLs(url) + descriptor;\n }).join(', ');\n }\n else if (isMetaViewport(tag, attrs) && attrName === 'content') {\n attrValue = attrValue.replace(/\\s+/g, '').replace(/[0-9]+\\.[0-9]+/g, function(numString) {\n // \"0.90000\" -> \"0.9\"\n // \"1.0\" -> \"1\"\n // \"1.0001\" -> \"1.0001\" (unchanged)\n return (+numString).toString();\n });\n }\n else if (isContentSecurityPolicy(tag, attrs) && attrName.toLowerCase() === 'content') {\n return collapseWhitespaceAll(attrValue);\n }\n else if (options.customAttrCollapse && options.customAttrCollapse.test(attrName)) {\n attrValue = attrValue.replace(/\\n+|\\r+|\\s{2,}/g, '');\n }\n else if (tag === 'script' && attrName === 'type') {\n attrValue = trimWhitespace(attrValue.replace(/\\s*;\\s*/g, ';'));\n }\n else if (isMediaQuery(tag, attrs, attrName)) {\n attrValue = trimWhitespace(attrValue);\n return options.minifyCSS(attrValue, 'media');\n }\n return attrValue;\n}\n\nfunction isMetaViewport(tag, attrs) {\n if (tag !== 'meta') {\n return false;\n }\n for (var i = 0, len = attrs.length; i < len; i++) {\n if (attrs[i].name === 'name' && attrs[i].value === 'viewport') {\n return true;\n }\n }\n}\n\nfunction isContentSecurityPolicy(tag, attrs) {\n if (tag !== 'meta') {\n return false;\n }\n for (var i = 0, len = attrs.length; i < len; i++) {\n if (attrs[i].name.toLowerCase() === 'http-equiv' && attrs[i].value.toLowerCase() === 'content-security-policy') {\n return true;\n }\n }\n}\n\nfunction ignoreCSS(id) {\n return '/* clean-css ignore:start */' + id + '/* clean-css ignore:end */';\n}\n\n// Wrap CSS declarations for CleanCSS > 3.x\n// See https://github.com/jakubpawlowicz/clean-css/issues/418\nfunction wrapCSS(text, type) {\n switch (type) {\n case 'inline':\n return '*{' + text + '}';\n case 'media':\n return '@media ' + text + '{a{top:0}}';\n default:\n return text;\n }\n}\n\nfunction unwrapCSS(text, type) {\n var matches;\n switch (type) {\n case 'inline':\n matches = text.match(/^\\*\\{([\\s\\S]*)\\}$/);\n break;\n case 'media':\n matches = text.match(/^@media ([\\s\\S]*?)\\s*{[\\s\\S]*}$/);\n break;\n }\n return matches ? matches[1] : text;\n}\n\nfunction cleanConditionalComment(comment, options) {\n return options.processConditionalComments ? comment.replace(/^(\\[if\\s[^\\]]+]>)([\\s\\S]*?)( -1) {\n return minify(text, options);\n }\n }\n return text;\n}\n\n// Tag omission rules from https://html.spec.whatwg.org/multipage/syntax.html#optional-tags\n// with the following deviations:\n// - retain if followed by