diff --git a/CHANGELOG.md b/CHANGELOG.md index f1c04d1b..1ea5c45c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.6.2](https://github.com/kunalnagarco/action-cve/compare/v1.6.1...v1.6.2) (2022-02-14) + + +### Chores + +* Lock file maintenance ([#63](https://github.com/kunalnagarco/action-cve/issues/63)) ([398c949](https://github.com/kunalnagarco/action-cve/commit/398c949ec20a5da09ba881527b45b8e0baf50874)) + ### [1.6.1](https://github.com/kunalnagarco/action-cve/compare/v1.6.0...v1.6.1) (2022-01-19) diff --git a/dist/index.js b/dist/index.js index 71b05b4f..ee895cc4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4297,7 +4297,7 @@ var isPlainObject = __nccwpck_require__(3287); var nodeFetch = _interopDefault(__nccwpck_require__(467)); var requestError = __nccwpck_require__(537); -const VERSION = "5.6.2"; +const VERSION = "5.6.3"; function getBufferResponse(response) { return response.arrayBuffer(); @@ -18747,7 +18747,7 @@ exports.isDeno = isDeno; /***/ 9805: /***/ ((module, exports, __nccwpck_require__) => { -const nodeFetch = __nccwpck_require__(3147) +const nodeFetch = __nccwpck_require__(467) const realFetch = nodeFetch.default || nodeFetch const fetch = function (url, options) { @@ -18771,1663 +18771,6 @@ exports.Response = nodeFetch.Response exports["default"] = fetch -/***/ }), - -/***/ 3147: -/***/ ((module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var Stream = _interopDefault(__nccwpck_require__(2781)); -var http = _interopDefault(__nccwpck_require__(3685)); -var Url = _interopDefault(__nccwpck_require__(7310)); -var https = _interopDefault(__nccwpck_require__(5687)); -var zlib = _interopDefault(__nccwpck_require__(9796)); - -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js - -// fix for "Readable" isn't a named export issue -const Readable = Stream.Readable; - -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); - -class Blob { - constructor() { - this[TYPE] = ''; - - const blobParts = arguments[0]; - const options = arguments[1]; - - const buffers = []; - let size = 0; - - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } - - this[BUFFER] = Buffer.concat(buffers); - - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; - - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); - - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } -} - -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); - -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ - -/** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ -function FetchError(message, type, systemError) { - Error.call(this, message); - - this.message = message; - this.type = type; - - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; - } - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; - -let convert; -try { - convert = (__nccwpck_require__(2877).convert); -} catch (e) {} - -const INTERNALS = Symbol('Body internals'); - -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = Stream.PassThrough; - -/** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -function Body(body) { - var _this = this; - - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; - - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; - - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof Stream) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; - - if (body instanceof Stream) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } -} - -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, - - get bodyUsed() { - return this[INTERNALS].disturbed; - }, - - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, - - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, - - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; - - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, - - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, - - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, - - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; - - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; - -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); - -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; - -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; - - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } - - this[INTERNALS].disturbed = true; - - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } - - let body = this.body; - - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is blob - if (isBlob(body)) { - body = body.stream(); - } - - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } - - // istanbul ignore if: should never happen - if (!(body instanceof Stream)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; - - return new Body.Promise(function (resolve, reject) { - let resTimeout; - - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } - - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } - - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } - - accumBytes += chunk.length; - accum.push(chunk); - }); - - body.on('end', function () { - if (abort) { - return; - } - - clearTimeout(resTimeout); - - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); -} - -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } - - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; - - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } - - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); - - // html5 - if (!res && str) { - res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; - - this[MAP] = Object.create(null); - - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); - - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } - - return; - } - - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } - - // sequence> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } - - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } - - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } - - return this[MAP][key].join(', '); - } - - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; - - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; - - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } - - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } - - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } - - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } - - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } - - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } - - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } - - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } - - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } -} -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; - -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); - -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; - - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} - -const INTERNAL = Symbol('internal'); - -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} - -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } - - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; - - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } - - this[INTERNAL].index = index + 1; - - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); - -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object - */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); - - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } - - return obj; -} - -/** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; -} - -const INTERNALS$1 = Symbol('Response internals'); - -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http.STATUS_CODES; - -/** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - Body.call(this, body, opts); - - const status = opts.status || 200; - const headers = new Headers(opts.headers); - - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } - - get url() { - return this[INTERNALS$1].url || ''; - } - - get status() { - return this[INTERNALS$1].status; - } - - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } - - get redirected() { - return this[INTERNALS$1].counter > 0; - } - - get statusText() { - return this[INTERNALS$1].statusText; - } - - get headers() { - return this[INTERNALS$1].headers; - } - - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } -} - -Body.mixIn(Response.prototype); - -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); - -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); - -const INTERNALS$2 = Symbol('Request internals'); - -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = Url.parse; -const format_url = Url.format; - -const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; - -/** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} - -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} - -/** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - let parsedURL; - - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parse_url(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parse_url(`${input}`); - } - input = {}; - } else { - parsedURL = parse_url(input.url); - } - - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); - - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } - - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; - - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); - - const headers = new Headers(init.headers || input.headers || {}); - - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; - - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } - - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; - - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } - - get method() { - return this[INTERNALS$2].method; - } - - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } - - get headers() { - return this[INTERNALS$2].headers; - } - - get redirect() { - return this[INTERNALS$2].redirect; - } - - get signal() { - return this[INTERNALS$2].signal; - } - - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } -} - -Body.mixIn(Request.prototype); - -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); - -/** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); - - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } - - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } - - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } - - if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } - - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } - - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } - - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } - - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } - - if (!headers.has('Connection') && !agent) { - headers.set('Connection', 'close'); - } - - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js - - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); -} - -/** - * abort-error.js - * - * AbortError interface for cancelled requests - */ - -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); - - this.type = 'aborted'; - this.message = message; - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; - -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = Stream.PassThrough; -const resolve_url = Url.resolve; - -/** - * Fetch function - * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise - */ -function fetch(url, opts) { - - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } - - Body.Promise = fetch.Promise; - - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); - - const send = (options.protocol === 'https:' ? https : http).request; - const signal = request.signal; - - let response = null; - - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof Stream.Readable) { - request.body.destroy(error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; - - if (signal && signal.aborted) { - abort(); - return; - } - - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; - - // send request - const req = send(options); - let reqTimeout; - - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } - - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } - - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } - - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - finalize(); - }); - - req.on('response', function (res) { - clearTimeout(reqTimeout); - - const headers = createHeadersLenient(res.headers); - - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); - - // HTTP fetch step 5.3 - const locationURL = location === null ? null : resolve_url(request.url, location); - - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } - - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; - - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } - - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } - - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); - - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; - - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); - - // HTTP-network fetch step 12.1.1.4: handle content codings - - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } - - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH - }; - - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } - - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib.createInflate()); - } else { - body = body.pipe(zlib.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - return; - } - - // for br - if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { - body = body.pipe(zlib.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } - - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); - - writeToStream(req, request); - }); -} -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; - -// expose Promise -fetch.Promise = global.Promise; - -module.exports = exports = fetch; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports["default"] = exports; -exports.Headers = Headers; -exports.Request = Request; -exports.Response = Response; -exports.FetchError = FetchError; - - /***/ }), /***/ 8222: diff --git a/dist/index.js.map b/dist/index.js.map index 8621a74f..719749ec 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;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;;;;;;;;;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;;;;;;;;;ACrDA;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;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;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;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;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;;;;;;;;;AC9CA;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;;;;;;;;;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;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;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;;;;;;;;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;;;;;;;;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;;;;;;;;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;;;;;;;;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;;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;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;;;;;;;;;AC/KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;;;;;;;;AC1CA;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;AACA;AACA;AACA;AACA;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;;;;;;;;ACxCA;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;;;;;;;;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;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjjBA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3rMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;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;;;;;;;;ACxCA;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;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;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9iCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACv3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7gBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;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;;;;;;;;;AC1UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;ACvDA;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;;;;;;;;;ACxDA;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;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;ACrDA;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;;;;;;;;;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;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;ACxBA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;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;;;;;;;;;ACrEA;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;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;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;;;;;;;;;ACnEA;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;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;;;;;;;;;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;;;;;;;;AC7CA;AACA;AACA;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;;;;;;;;;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;;;;;;;AC1BA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjRA;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;AACA;AACA;AACA;AACA;;;;;;;;;ACtQA;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;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxjBA;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;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChqDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChxCA;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;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;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;;;;;;;;;ACvQA;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;;;;;;;;AChCA;;;;;;;;;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;;;AC7BA;AACA;;;;AEDA;AACA;AACA;AACA","sources":["../webpack://@kunalnagarco/action-cve/./lib/constants.js","../webpack://@kunalnagarco/action-cve/./lib/destinations/index.js","../webpack://@kunalnagarco/action-cve/./lib/destinations/microsoft-teams.js","../webpack://@kunalnagarco/action-cve/./lib/destinations/pager-duty.js","../webpack://@kunalnagarco/action-cve/./lib/destinations/slack.js","../webpack://@kunalnagarco/action-cve/./lib/destinations/zenduty.js","../webpack://@kunalnagarco/action-cve/./lib/entities/advisory.js","../webpack://@kunalnagarco/action-cve/./lib/entities/alert.js","../webpack://@kunalnagarco/action-cve/./lib/entities/index.js","../webpack://@kunalnagarco/action-cve/./lib/entities/repository.js","../webpack://@kunalnagarco/action-cve/./lib/entities/vulnerability.js","../webpack://@kunalnagarco/action-cve/./lib/fetch-alerts.js","../webpack://@kunalnagarco/action-cve/./lib/main.js","../webpack://@kunalnagarco/action-cve/./lib/utils/adaptive-card/index.js","../webpack://@kunalnagarco/action-cve/./lib/utils/index.js","../webpack://@kunalnagarco/action-cve/./lib/utils/request/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/core/lib/command.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/core/lib/core.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/core/lib/file-command.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/core/lib/oidc-utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/core/lib/utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/github/lib/context.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/github/lib/github.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/github/lib/internal/utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/github/lib/utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/http-client/auth.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/http-client/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/http-client/proxy.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/auth-token/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/core/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/endpoint/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/graphql/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/plugin-paginate-rest/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/request-error/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/request/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@pagerduty/pdjs/build/src/api.js","../webpack://@kunalnagarco/action-cve/./node_modules/@pagerduty/pdjs/build/src/common.js","../webpack://@kunalnagarco/action-cve/./node_modules/@pagerduty/pdjs/build/src/events.js","../webpack://@kunalnagarco/action-cve/./node_modules/@pagerduty/pdjs/build/src/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@slack/webhook/dist/IncomingWebhook.js","../webpack://@kunalnagarco/action-cve/./node_modules/@slack/webhook/dist/errors.js","../webpack://@kunalnagarco/action-cve/./node_modules/@slack/webhook/dist/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@slack/webhook/dist/instrument.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/activity-request.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/adaptive-applet.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/adaptivecards.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/card-elements.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/card-object.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/channel-adapter.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/controls/collection.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/controls/constants.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/controls/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/controls/menu-item.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/controls/popup-control.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/controls/popup-menu.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/enums.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/host-capabilities.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/host-config.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/registry.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/serialization.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/shared.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/strings.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/table.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/text-formatters.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/adapters/http.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/adapters/xhr.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/axios.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/cancel/Cancel.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/cancel/CancelToken.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/cancel/isCancel.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/Axios.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/InterceptorManager.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/buildFullPath.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/createError.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/dispatchRequest.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/enhanceError.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/mergeConfig.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/settle.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/transformData.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/defaults.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/bind.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/buildURL.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/combineURLs.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/cookies.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/isAbsoluteURL.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/isAxiosError.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/isURLSameOrigin.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/normalizeHeaderName.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/parseHeaders.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/spread.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/validator.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/before-after-hook/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/before-after-hook/lib/add.js","../webpack://@kunalnagarco/action-cve/./node_modules/before-after-hook/lib/register.js","../webpack://@kunalnagarco/action-cve/./node_modules/before-after-hook/lib/remove.js","../webpack://@kunalnagarco/action-cve/./node_modules/browser-or-node/lib/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/cross-fetch/dist/node-ponyfill.js","../webpack://@kunalnagarco/action-cve/./node_modules/cross-fetch/node_modules/node-fetch/lib/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/debug/src/browser.js","../webpack://@kunalnagarco/action-cve/./node_modules/debug/src/common.js","../webpack://@kunalnagarco/action-cve/./node_modules/debug/src/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/debug/src/node.js","../webpack://@kunalnagarco/action-cve/./node_modules/deprecation/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/follow-redirects/debug.js","../webpack://@kunalnagarco/action-cve/./node_modules/follow-redirects/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/has-flag/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/is-plain-object/dist/is-plain-object.js","../webpack://@kunalnagarco/action-cve/./node_modules/ms/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/lib/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/tr46/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/webidl-conversions/lib/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/whatwg-url/lib/URL-impl.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/whatwg-url/lib/URL.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/whatwg-url/lib/public-api.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/whatwg-url/lib/utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/once/once.js","../webpack://@kunalnagarco/action-cve/./node_modules/supports-color/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/tunnel/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/tunnel/lib/tunnel.js","../webpack://@kunalnagarco/action-cve/./node_modules/universal-user-agent/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/wrappy/wrappy.js","../webpack://@kunalnagarco/action-cve/./node_modules/@vercel/ncc/dist/ncc/@@notfound.js","../webpack://@kunalnagarco/action-cve/external node-commonjs \"assert\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"events\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"fs\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"http\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"https\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"net\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"os\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"path\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"punycode\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"stream\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"tls\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"tty\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"url\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"util\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"zlib\"","../webpack://@kunalnagarco/action-cve/webpack/bootstrap","../webpack://@kunalnagarco/action-cve/webpack/runtime/compat","../webpack://@kunalnagarco/action-cve/webpack/before-startup","../webpack://@kunalnagarco/action-cve/webpack/startup","../webpack://@kunalnagarco/action-cve/webpack/after-startup"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ACTION_URL = exports.ACTION_SHORT_SUMMARY = exports.ACTION_ICON = void 0;\nexports.ACTION_ICON = 'https://github.com/kunalnagarco/action-cve/raw/main/icons/ladybug.png';\nexports.ACTION_SHORT_SUMMARY = 'GitHub Action - @kunalnagarco/action-cve';\nexports.ACTION_URL = 'https://github.com/kunalnagarco/action-cve';\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./slack\"), exports);\n__exportStar(require(\"./pager-duty\"), exports);\n__exportStar(require(\"./zenduty\"), exports);\n__exportStar(require(\"./microsoft-teams\"), exports);\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToMicrosoftTeams = void 0;\n/* eslint-disable i18n-text/no-en */\nconst utils_1 = require(\"../utils\");\nconst constants_1 = require(\"../constants\");\nconst createTableRow = (key, value) => {\n const row = (0, utils_1.createRow)();\n const keyColumn = (0, utils_1.createColumn)();\n keyColumn.addItem((0, utils_1.createTextBlock)(key, true));\n row.addColumn(keyColumn);\n const valueColumn = (0, utils_1.createColumn)();\n valueColumn.addItem((0, utils_1.createTextBlock)(value));\n row.addColumn(valueColumn);\n return row;\n};\nconst createTableButtonRow = (url) => {\n const row = (0, utils_1.createRow)();\n const keyColumn = (0, utils_1.createColumn)();\n keyColumn.addItem((0, utils_1.createTextBlock)('Advisory URL', true));\n row.addColumn(keyColumn);\n const urlColumn = (0, utils_1.createColumn)();\n urlColumn.addItem((0, utils_1.createLinkButton)('View Advisory', url));\n row.addColumn(urlColumn);\n return row;\n};\nconst sendAlertsToMicrosoftTeams = (webhookUrl, alerts) => __awaiter(void 0, void 0, void 0, function* () {\n var _a, _b, _c, _d, _e;\n const alertCount = alerts.length;\n const repositoryOwner = alerts[0].repository.owner;\n const repositoryName = alerts[0].repository.name;\n const adaptiveCard = (0, utils_1.createAdaptiveCard)();\n adaptiveCard.addItem((0, utils_1.createTextBlock)(constants_1.ACTION_SHORT_SUMMARY));\n adaptiveCard.addItem((0, utils_1.createTextBlock)(`You have ${alertCount} vulnerabilities in ${repositoryOwner}/${repositoryName}`));\n for (const alert of alerts) {\n const container = (0, utils_1.createContainer)(true, true);\n container.addItem(createTableRow('Package Name', alert.packageName));\n container.addItem(createTableRow('Vulnerability Version Range', ((_a = alert.vulnerability) === null || _a === void 0 ? void 0 : _a.vulnerableVersionRange) || ''));\n container.addItem(createTableRow('Patched Version', ((_b = alert.vulnerability) === null || _b === void 0 ? void 0 : _b.firstPatchedVersion) || ''));\n container.addItem(createTableRow('Severity', ((_c = alert.advisory) === null || _c === void 0 ? void 0 : _c.severity) || ''));\n container.addItem(createTableRow('Summary', ((_d = alert.advisory) === null || _d === void 0 ? void 0 : _d.summary) || ''));\n container.addItem(createTableButtonRow(((_e = alert.advisory) === null || _e === void 0 ? void 0 : _e.url) || ''));\n adaptiveCard.addItem(container);\n }\n const body = {\n type: 'message',\n attachments: [\n {\n contentType: 'application/vnd.microsoft.card.adaptive',\n contentUrl: null,\n content: adaptiveCard.toJSON(),\n },\n ],\n };\n yield (0, utils_1.request)(webhookUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n });\n});\nexports.sendAlertsToMicrosoftTeams = sendAlertsToMicrosoftTeams;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToPagerDuty = void 0;\nconst constants_1 = require(\"../constants\");\nconst pdjs_1 = require(\"@pagerduty/pdjs\");\nconst sendAlertsToPagerDuty = (integrationKey, alerts) => __awaiter(void 0, void 0, void 0, function* () {\n yield (0, pdjs_1.event)({\n data: {\n routing_key: integrationKey,\n event_action: 'trigger',\n payload: {\n summary: `You have ${alerts.length} vulnerabilities in ${alerts[0].repository.owner}/${alerts[0].repository.name}`,\n source: 'GitHub Dependabot Alerts',\n severity: 'info',\n custom_details: Object.assign({}, alerts),\n },\n images: [\n {\n src: constants_1.ACTION_ICON,\n alt: constants_1.ACTION_SHORT_SUMMARY,\n href: constants_1.ACTION_URL,\n },\n ],\n },\n });\n});\nexports.sendAlertsToPagerDuty = sendAlertsToPagerDuty;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToSlack = exports.validateSlackWebhookUrl = void 0;\nconst constants_1 = require(\"../constants\");\nconst webhook_1 = require(\"@slack/webhook\");\nconst createSummaryBlock = (alertCount, repositoryName, repositoryOwner) => {\n return {\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `You have ${alertCount} vulnerabilities in *${repositoryOwner}/${repositoryName}*`,\n },\n };\n};\nconst createDividerBlock = () => {\n return {\n type: 'divider',\n };\n};\nconst createAlertBlock = (alert) => {\n var _a, _b, _c, _d, _e;\n return {\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `\n*Package name:* ${alert.packageName}\n*Vulnerability Version Range:* ${(_a = alert.vulnerability) === null || _a === void 0 ? void 0 : _a.vulnerableVersionRange}\n*Patched Version:* ${(_b = alert.vulnerability) === null || _b === void 0 ? void 0 : _b.firstPatchedVersion}\n*Severity:* ${(_c = alert.advisory) === null || _c === void 0 ? void 0 : _c.severity}\n*Summary:* ${(_d = alert.advisory) === null || _d === void 0 ? void 0 : _d.summary}\n `,\n },\n accessory: {\n type: 'button',\n text: {\n type: 'plain_text',\n text: 'View Advisory',\n emoji: true,\n },\n style: 'danger',\n url: (_e = alert.advisory) === null || _e === void 0 ? void 0 : _e.url,\n },\n };\n};\nconst validateSlackWebhookUrl = (url) => {\n const regexPattern = new RegExp(/^https:\\/\\/hooks\\.slack\\.com\\/services\\/T[a-zA-Z0-9_]{8,10}\\/B[a-zA-Z0-9_]{10}\\/[a-zA-Z0-9_]{24}/);\n return regexPattern.test(url);\n};\nexports.validateSlackWebhookUrl = validateSlackWebhookUrl;\nconst sendAlertsToSlack = (webhookUrl, alerts) => __awaiter(void 0, void 0, void 0, function* () {\n const webhook = new webhook_1.IncomingWebhook(webhookUrl);\n const alertBlocks = [];\n for (const alert of alerts) {\n alertBlocks.push(createAlertBlock(alert));\n }\n yield webhook.send({\n blocks: [\n createSummaryBlock(alerts.length, alerts[0].repository.name, alerts[0].repository.owner),\n createDividerBlock(),\n ...alertBlocks,\n ],\n icon_url: constants_1.ACTION_ICON,\n username: constants_1.ACTION_SHORT_SUMMARY,\n });\n});\nexports.sendAlertsToSlack = sendAlertsToSlack;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToZenduty = void 0;\nconst constants_1 = require(\"../constants\");\nconst utils_1 = require(\"../utils\");\nconst sendAlertsToZenduty = (apiKey, serviceId, escalationPolicyId, alerts) => __awaiter(void 0, void 0, void 0, function* () {\n var _a, _b, _c, _d;\n let summary = `\n You have ${alerts.length} vulnerabilities in ${alerts[0].repository.owner}/${alerts[0].repository.name}\n\n ---\n\n `;\n for (const alert of alerts) {\n summary += `\n Package name: ${alert.packageName}\n Vulnerability Version Range: ${(_a = alert.vulnerability) === null || _a === void 0 ? void 0 : _a.vulnerableVersionRange}\n Patched Version: ${(_b = alert.vulnerability) === null || _b === void 0 ? void 0 : _b.firstPatchedVersion}\n Severity: ${(_c = alert.advisory) === null || _c === void 0 ? void 0 : _c.severity}\n Summary: ${(_d = alert.advisory) === null || _d === void 0 ? void 0 : _d.summary}\n `;\n }\n summary += `\n\n ---\n `;\n const payload = {\n service: serviceId,\n escalation_policy: escalationPolicyId,\n title: `${constants_1.ACTION_SHORT_SUMMARY} - ${alerts[0].repository.name}`,\n urgency: 0,\n summary,\n };\n // eslint-disable-next-line i18n-text/no-en\n const bearer = `Token ${apiKey}`;\n yield (0, utils_1.request)('https://www.zenduty.com/api/incidents/', {\n method: 'POST',\n headers: {\n Authorization: bearer,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n});\nexports.sendAlertsToZenduty = sendAlertsToZenduty;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toAdvisory = void 0;\nconst toAdvisory = (securityAdvisory) => ({\n cvssScore: securityAdvisory.cvss.score,\n severity: securityAdvisory.severity,\n summary: securityAdvisory.summary,\n description: securityAdvisory.description,\n url: securityAdvisory.permalink,\n publishedAt: securityAdvisory.publishedAt,\n updatedAt: securityAdvisory.updatedAt,\n withdrawnAt: securityAdvisory.withdrawnAt,\n});\nexports.toAdvisory = toAdvisory;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toAlert = void 0;\nconst advisory_1 = require(\"./advisory\");\nconst repository_1 = require(\"./repository\");\nconst vulnerability_1 = require(\"./vulnerability\");\nconst toAlert = (repositoryVulnerabilityAlert) => {\n var _a;\n return ({\n repository: (0, repository_1.toRepository)(repositoryVulnerabilityAlert.repository),\n packageName: ((_a = repositoryVulnerabilityAlert.securityVulnerability) === null || _a === void 0 ? void 0 : _a.package.name) || '',\n advisory: repositoryVulnerabilityAlert.securityAdvisory\n ? (0, advisory_1.toAdvisory)(repositoryVulnerabilityAlert.securityAdvisory)\n : undefined,\n vulnerability: repositoryVulnerabilityAlert.securityVulnerability\n ? (0, vulnerability_1.toVulnerability)(repositoryVulnerabilityAlert.securityVulnerability)\n : undefined,\n manifest: repositoryVulnerabilityAlert.vulnerableManifestFilename,\n createdAt: repositoryVulnerabilityAlert.createdAt,\n });\n};\nexports.toAlert = toAlert;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./repository\"), exports);\n__exportStar(require(\"./advisory\"), exports);\n__exportStar(require(\"./alert\"), exports);\n__exportStar(require(\"./vulnerability\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toRepository = void 0;\nconst toRepository = (repository) => ({\n name: repository.name,\n owner: repository.owner.login,\n});\nexports.toRepository = toRepository;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toVulnerability = void 0;\nconst toVulnerability = (securityVulnerability) => {\n var _a;\n return ({\n firstPatchedVersion: (_a = securityVulnerability.firstPatchedVersion) === null || _a === void 0 ? void 0 : _a.identifier,\n vulnerableVersionRange: securityVulnerability.vulnerableVersionRange,\n updatedAt: securityVulnerability.updatedAt,\n });\n};\nexports.toVulnerability = toVulnerability;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchAlerts = void 0;\nconst entities_1 = require(\"./entities\");\nconst github_1 = require(\"@actions/github\");\nconst fetchAlerts = (gitHubPersonalAccessToken, repositoryName, repositoryOwner, count) => __awaiter(void 0, void 0, void 0, function* () {\n var _a;\n const octokit = (0, github_1.getOctokit)(gitHubPersonalAccessToken);\n const { repository } = yield octokit.graphql(`\n query {\n repository(owner:\"${repositoryOwner}\" name:\"${repositoryName}\") {\n vulnerabilityAlerts(last: ${count}) {\n edges {\n node {\n id\n repository {\n name\n owner {\n login\n }\n }\n securityAdvisory {\n id\n description\n cvss {\n score\n vectorString\n }\n permalink\n severity\n summary\n }\n securityVulnerability {\n firstPatchedVersion {\n identifier\n }\n package {\n ecosystem\n name\n }\n vulnerableVersionRange\n advisory {\n cvss {\n score\n vectorString\n }\n summary\n }\n }\n }\n }\n }\n }\n }\n `);\n const gitHubAlerts = (_a = repository.vulnerabilityAlerts) === null || _a === void 0 ? void 0 : _a.edges;\n if (gitHubAlerts) {\n const alerts = [];\n for (const gitHubAlert of gitHubAlerts) {\n if (gitHubAlert && gitHubAlert.node) {\n alerts.push((0, entities_1.toAlert)(gitHubAlert.node));\n }\n }\n return alerts;\n }\n return [];\n});\nexports.fetchAlerts = fetchAlerts;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core_1 = require(\"@actions/core\");\nconst destinations_1 = require(\"./destinations\");\nconst github_1 = require(\"@actions/github\");\nconst fetch_alerts_1 = require(\"./fetch-alerts\");\nfunction run() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const token = (0, core_1.getInput)('token');\n const microsoftTeamsWebhookUrl = (0, core_1.getInput)('microsoft_teams_webhook');\n const slackWebhookUrl = (0, core_1.getInput)('slack_webhook');\n const pagerDutyIntegrationKey = (0, core_1.getInput)('pager_duty_integration_key');\n const zenDutyApiKey = (0, core_1.getInput)('zenduty_api_key');\n const zenDutyServiceId = (0, core_1.getInput)('zenduty_service_id');\n const zenDutyEscalationPolicyId = (0, core_1.getInput)('zenduty_escalation_policy_id');\n const count = parseInt((0, core_1.getInput)('count'));\n const owner = github_1.context.repo.owner;\n const repo = github_1.context.repo.repo;\n const alerts = yield (0, fetch_alerts_1.fetchAlerts)(token, repo, owner, count);\n if (alerts.length > 0) {\n if (microsoftTeamsWebhookUrl) {\n yield (0, destinations_1.sendAlertsToMicrosoftTeams)(microsoftTeamsWebhookUrl, alerts);\n }\n if (slackWebhookUrl) {\n if (!(0, destinations_1.validateSlackWebhookUrl)(slackWebhookUrl)) {\n (0, core_1.setFailed)(new Error('Invalid Slack Webhook URL'));\n }\n else {\n yield (0, destinations_1.sendAlertsToSlack)(slackWebhookUrl, alerts);\n }\n }\n if (pagerDutyIntegrationKey) {\n yield (0, destinations_1.sendAlertsToPagerDuty)(pagerDutyIntegrationKey, alerts);\n }\n if (zenDutyApiKey) {\n if (zenDutyServiceId && zenDutyEscalationPolicyId) {\n yield (0, destinations_1.sendAlertsToZenduty)(zenDutyApiKey, zenDutyServiceId, zenDutyEscalationPolicyId, alerts);\n }\n else {\n (0, core_1.setFailed)(new Error('Check your Zenduty Service ID and Escalation Policy ID'));\n }\n }\n }\n }\n catch (err) {\n if (err instanceof Error) {\n (0, core_1.setFailed)(err);\n }\n }\n });\n}\nrun();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createAdaptiveCard = exports.createLinkButton = exports.createColumn = exports.createTextBlock = exports.createRow = exports.createContainer = void 0;\nconst adaptivecards_1 = require(\"adaptivecards\");\nconst createContainer = (isSpacingLarge, isStyleEmphasis) => {\n const container = new adaptivecards_1.Container();\n if (isSpacingLarge) {\n container.spacing = adaptivecards_1.Spacing.Large;\n }\n if (isStyleEmphasis) {\n container.style = 'emphasis';\n }\n return container;\n};\nexports.createContainer = createContainer;\nconst createRow = () => {\n return new adaptivecards_1.ColumnSet();\n};\nexports.createRow = createRow;\nconst createTextBlock = (text, isBold = false, isWrap = true) => {\n const textBlock = new adaptivecards_1.TextBlock(text);\n if (isBold) {\n textBlock.weight = adaptivecards_1.TextWeight.Bolder;\n }\n textBlock.wrap = isWrap;\n return textBlock;\n};\nexports.createTextBlock = createTextBlock;\nconst createColumn = () => {\n return new adaptivecards_1.Column();\n};\nexports.createColumn = createColumn;\nconst createLinkButton = (text, url) => {\n const linkButton = new adaptivecards_1.ActionSet();\n const action = new adaptivecards_1.OpenUrlAction();\n action.title = text;\n action.url = url;\n linkButton.addAction(action);\n return linkButton;\n};\nexports.createLinkButton = createLinkButton;\nconst createAdaptiveCard = () => {\n const adaptiveCard = new adaptivecards_1.AdaptiveCard();\n adaptiveCard.version = new adaptivecards_1.Version(1, 2);\n return adaptiveCard;\n};\nexports.createAdaptiveCard = createAdaptiveCard;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./request\"), exports);\n__exportStar(require(\"./adaptive-card\"), exports);\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.request = void 0;\nconst node_fetch_1 = __importDefault(require(\"node-fetch\"));\nconst request = (url, options) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, node_fetch_1.default)(url, Object.assign({}, options));\n});\nexports.request = request;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n const delimiter = '_GitHubActionsFileCommandDelimeter_';\n const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;\n file_command_1.issueCommand('ENV', commandValue);\n }\n else {\n command_1.issueCommand('set-env', { name }, convertedVal);\n }\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n return inputs;\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, value);\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issueCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\nfunction issueCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueCommand = issueCommand;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.result.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = void 0;\nconst fs_1 = require(\"fs\");\nconst os_1 = require(\"os\");\nclass Context {\n /**\n * Hydrate the context from the environment\n */\n constructor() {\n var _a, _b, _c;\n this.payload = {};\n if (process.env.GITHUB_EVENT_PATH) {\n if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) {\n this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));\n }\n else {\n const path = process.env.GITHUB_EVENT_PATH;\n process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`);\n }\n }\n this.eventName = process.env.GITHUB_EVENT_NAME;\n this.sha = process.env.GITHUB_SHA;\n this.ref = process.env.GITHUB_REF;\n this.workflow = process.env.GITHUB_WORKFLOW;\n this.action = process.env.GITHUB_ACTION;\n this.actor = process.env.GITHUB_ACTOR;\n this.job = process.env.GITHUB_JOB;\n this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);\n this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);\n this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;\n this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;\n this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;\n }\n get issue() {\n const payload = this.payload;\n return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });\n }\n get repo() {\n if (process.env.GITHUB_REPOSITORY) {\n const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');\n return { owner, repo };\n }\n if (this.payload.repository) {\n return {\n owner: this.payload.repository.owner.login,\n repo: this.payload.repository.name\n };\n }\n throw new Error(\"context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'\");\n }\n}\nexports.Context = Context;\n//# sourceMappingURL=context.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokit = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst utils_1 = require(\"./utils\");\nexports.context = new Context.Context();\n/**\n * Returns a hydrated octokit ready to use for GitHub Actions\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokit(token, options) {\n return new utils_1.GitHub(utils_1.getOctokitOptions(token, options));\n}\nexports.getOctokit = getOctokit;\n//# sourceMappingURL=github.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getApiBaseUrl = exports.getProxyAgent = exports.getAuthString = void 0;\nconst httpClient = __importStar(require(\"@actions/http-client\"));\nfunction getAuthString(token, options) {\n if (!token && !options.auth) {\n throw new Error('Parameter token or opts.auth is required');\n }\n else if (token && options.auth) {\n throw new Error('Parameters token and opts.auth may not both be specified');\n }\n return typeof options.auth === 'string' ? options.auth : `token ${token}`;\n}\nexports.getAuthString = getAuthString;\nfunction getProxyAgent(destinationUrl) {\n const hc = new httpClient.HttpClient();\n return hc.getAgent(destinationUrl);\n}\nexports.getProxyAgent = getProxyAgent;\nfunction getApiBaseUrl() {\n return process.env['GITHUB_API_URL'] || 'https://api.github.com';\n}\nexports.getApiBaseUrl = getApiBaseUrl;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokitOptions = exports.GitHub = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst Utils = __importStar(require(\"./internal/utils\"));\n// octokit + plugins\nconst core_1 = require(\"@octokit/core\");\nconst plugin_rest_endpoint_methods_1 = require(\"@octokit/plugin-rest-endpoint-methods\");\nconst plugin_paginate_rest_1 = require(\"@octokit/plugin-paginate-rest\");\nexports.context = new Context.Context();\nconst baseUrl = Utils.getApiBaseUrl();\nconst defaults = {\n baseUrl,\n request: {\n agent: Utils.getProxyAgent(baseUrl)\n }\n};\nexports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(defaults);\n/**\n * Convience function to correctly format Octokit Options to pass into the constructor.\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokitOptions(token, options) {\n const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller\n // Auth\n const auth = Utils.getAuthString(token, opts);\n if (auth) {\n opts.auth = auth;\n }\n return opts;\n}\nexports.getOctokitOptions = getOctokitOptions;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n options.headers['Authorization'] =\n 'Basic ' +\n Buffer.from(this.username + ':' + this.password).toString('base64');\n }\n // This handler cannot handle 401\n canHandleAuthentication(response) {\n return false;\n }\n handleAuthentication(httpClient, requestInfo, objs) {\n return null;\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n options.headers['Authorization'] = 'Bearer ' + this.token;\n }\n // This handler cannot handle 401\n canHandleAuthentication(response) {\n return false;\n }\n handleAuthentication(httpClient, requestInfo, objs) {\n return null;\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n options.headers['Authorization'] =\n 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64');\n }\n // This handler cannot handle 401\n canHandleAuthentication(response) {\n return false;\n }\n handleAuthentication(httpClient, requestInfo, objs) {\n return null;\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst http = require(\"http\");\nconst https = require(\"https\");\nconst pm = require(\"./proxy\");\nlet tunnel;\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers = exports.Headers || (exports.Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n let proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return new Promise(async (resolve, reject) => {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n let parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n }\n get(requestUrl, additionalHeaders) {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n }\n del(requestUrl, additionalHeaders) {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n }\n post(requestUrl, data, additionalHeaders) {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n }\n patch(requestUrl, data, additionalHeaders) {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n }\n put(requestUrl, data, additionalHeaders) {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n }\n head(requestUrl, additionalHeaders) {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n async getJson(requestUrl, additionalHeaders = {}) {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n let res = await this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async postJson(requestUrl, obj, additionalHeaders = {}) {\n let data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n let res = await this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async putJson(requestUrl, obj, additionalHeaders = {}) {\n let data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n let res = await this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async patchJson(requestUrl, obj, additionalHeaders = {}) {\n let data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n let res = await this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n async request(verb, requestUrl, data, headers) {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n let parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n while (numTries < maxTries) {\n response = await this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (let i = 0; i < this.handlers.length; i++) {\n if (this.handlers[i].canHandleAuthentication(response)) {\n authenticationHandler = this.handlers[i];\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n let parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol == 'https:' &&\n parsedUrl.protocol != parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n await response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (let header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = await this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n await response.readBody();\n await this._performExponentialBackoff(numTries);\n }\n }\n return response;\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return new Promise((resolve, reject) => {\n let callbackForResult = function (err, res) {\n if (err) {\n reject(err);\n }\n resolve(res);\n };\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n let socket;\n if (typeof data === 'string') {\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n let handleResult = (err, res) => {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n };\n let req = info.httpModule.request(info.options, (msg) => {\n let res = new HttpClientResponse(msg);\n handleResult(null, res);\n });\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error('Request timeout: ' + info.options.path), null);\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err, null);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n let parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n this.handlers.forEach(handler => {\n handler.prepareRequest(info.options);\n });\n }\n return info;\n }\n _mergeHeaders(headers) {\n const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n let proxyUrl = pm.getProxyUrl(parsedUrl);\n let useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (this._keepAlive && !useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (!!agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (!!this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n if (useProxy) {\n // If using proxy, need tunnel\n if (!tunnel) {\n tunnel = require('tunnel');\n }\n const agentOptions = {\n maxSockets: maxSockets,\n keepAlive: this._keepAlive,\n proxy: {\n ...((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n }),\n host: proxyUrl.hostname,\n port: proxyUrl.port\n }\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if reusing agent across request and tunneling agent isn't assigned create a new agent\n if (this._keepAlive && !agent) {\n const options = { keepAlive: this._keepAlive, maxSockets: maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n // if not using private agent and tunnel agent isn't setup then use global agent\n if (!agent) {\n agent = usingSsl ? https.globalAgent : http.globalAgent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _performExponentialBackoff(retryNumber) {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n }\n static dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n let a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n async _processResponse(res, options) {\n return new Promise(async (resolve, reject) => {\n const statusCode = res.message.statusCode;\n const response = {\n statusCode: statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode == HttpCodes.NotFound) {\n resolve(response);\n }\n let obj;\n let contents;\n // get the result from the body\n try {\n contents = await res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, HttpClient.dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = 'Failed request: (' + statusCode + ')';\n }\n let err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n });\n }\n}\nexports.HttpClient = HttpClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction getProxyUrl(reqUrl) {\n let usingSsl = reqUrl.protocol === 'https:';\n let proxyUrl;\n if (checkBypass(reqUrl)) {\n return proxyUrl;\n }\n let proxyVar;\n if (usingSsl) {\n proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n if (proxyVar) {\n proxyUrl = new URL(proxyVar);\n }\n return proxyUrl;\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n let upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (let upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperReqHosts.some(x => x === upperNoProxyItem)) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nasync function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp ? \"app\" : isInstallation ? \"installation\" : isUserToServer ? \"user-to-server\" : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType\n };\n}\n\n/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nfunction withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n\n return `token ${token}`;\n}\n\nasync function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n\nconst createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n\nexports.createTokenAuth = createTokenAuth;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar universalUserAgent = require('universal-user-agent');\nvar beforeAfterHook = require('before-after-hook');\nvar request = require('@octokit/request');\nvar graphql = require('@octokit/graphql');\nvar authToken = require('@octokit/auth-token');\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nconst VERSION = \"3.5.1\";\n\nconst _excluded = [\"authStrategy\"];\nclass Octokit {\n constructor(options = {}) {\n const hook = new beforeAfterHook.Collection();\n const requestDefaults = {\n baseUrl: request.request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\")\n }),\n mediaType: {\n previews: [],\n format: \"\"\n }\n }; // prepend default user agent with `options.userAgent` if set\n\n requestDefaults.headers[\"user-agent\"] = [options.userAgent, `octokit-core.js/${VERSION} ${universalUserAgent.getUserAgent()}`].filter(Boolean).join(\" \");\n\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n\n this.request = request.request.defaults(requestDefaults);\n this.graphql = graphql.withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => {},\n info: () => {},\n warn: console.warn.bind(console),\n error: console.error.bind(console)\n }, options.log);\n this.hook = hook; // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\"\n });\n } else {\n // (2)\n const auth = authToken.createTokenAuth(options.auth); // @ts-ignore ¯\\_(ツ)_/¯\n\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n } else {\n const {\n authStrategy\n } = options,\n otherOptions = _objectWithoutProperties(options, _excluded);\n\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions\n }, options.auth)); // @ts-ignore ¯\\_(ツ)_/¯\n\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n } // apply plugins\n // https://stackoverflow.com/a/16345172\n\n\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach(plugin => {\n Object.assign(this, plugin(this, options));\n });\n }\n\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`\n } : null));\n }\n\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n\n\n static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }\n\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n\nexports.Octokit = Octokit;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar isPlainObject = require('is-plain-object');\nvar universalUserAgent = require('universal-user-agent');\n\nfunction lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n\nfunction mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach(key => {\n if (isPlainObject.isPlainObject(options[key])) {\n if (!(key in defaults)) Object.assign(result, {\n [key]: options[key]\n });else result[key] = mergeDeep(defaults[key], options[key]);\n } else {\n Object.assign(result, {\n [key]: options[key]\n });\n }\n });\n return result;\n}\n\nfunction removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n\n return obj;\n}\n\nfunction merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? {\n method,\n url\n } : {\n url: method\n }, options);\n } else {\n options = Object.assign({}, route);\n } // lowercase header names before merging with defaults to avoid duplicates\n\n\n options.headers = lowercaseKeys(options.headers); // remove properties with undefined values before merging\n\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten\n\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews);\n }\n\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n\nfunction addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n\n if (names.length === 0) {\n return url;\n }\n\n return url + separator + names.map(name => {\n if (name === \"q\") {\n return \"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\");\n }\n\n return `${name}=${encodeURIComponent(parameters[name])}`;\n }).join(\"&\");\n}\n\nconst urlVariableRegex = /\\{[^}]+\\}/g;\n\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\n\nfunction extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n\n if (!matches) {\n return [];\n }\n\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n\nfunction omit(object, keysToOmit) {\n return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n\n// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n\n return part;\n }).join(\"\");\n}\n\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n\nfunction encodeValue(operator, value, key) {\n value = operator === \"+\" || operator === \"#\" ? encodeReserved(value) : encodeUnreserved(value);\n\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n } else {\n return value;\n }\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\n\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\n\nfunction getValues(context, operator, key, modifier) {\n var value = context[key],\n result = [];\n\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n value = value.toString();\n\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n } else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n } else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n const tmp = [];\n\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n } else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n } else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n } else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n } else if (value === \"\") {\n result.push(\"\");\n }\n }\n\n return result;\n}\n\nfunction parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\n\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n\n if (operator && operator !== \"+\") {\n var separator = \",\";\n\n if (operator === \"?\") {\n separator = \"&\";\n } else if (operator !== \"#\") {\n separator = operator;\n }\n\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n } else {\n return values.join(\",\");\n }\n } else {\n return encodeReserved(literal);\n }\n });\n}\n\nfunction parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible\n\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\"method\", \"baseUrl\", \"url\", \"headers\", \"request\", \"mediaType\"]); // extract variable names from URL to calculate remaining variables later\n\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n\n const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(\",\");\n }\n\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => {\n const format = options.mediaType.format ? `.${options.mediaType.format}` : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n }).join(\",\");\n }\n } // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n\n\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n } else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n } else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n } else {\n headers[\"content-length\"] = 0;\n }\n }\n } // default content-type for JSON if body is set\n\n\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n\n\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n } // Only return body/request keys if present\n\n\n return Object.assign({\n method,\n url,\n headers\n }, typeof body !== \"undefined\" ? {\n body\n } : null, options.request ? {\n request: options.request\n } : null);\n}\n\nfunction endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n\nfunction withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse\n });\n}\n\nconst VERSION = \"6.0.12\";\n\nconst userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\n\nconst DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\",\n previews: []\n }\n};\n\nconst endpoint = withDefaults(null, DEFAULTS);\n\nexports.endpoint = endpoint;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar request = require('@octokit/request');\nvar universalUserAgent = require('universal-user-agent');\n\nconst VERSION = \"4.8.0\";\n\nfunction _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\\n` + data.errors.map(e => ` - ${e.message}`).join(\"\\n\");\n}\n\nclass GraphqlResponseError extends Error {\n constructor(request, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\"; // Expose the errors and response data in their shorthand properties.\n\n this.errors = response.errors;\n this.data = response.data; // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n\n}\n\nconst NON_VARIABLE_OPTIONS = [\"method\", \"baseUrl\", \"url\", \"headers\", \"request\", \"query\", \"mediaType\"];\nconst FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`));\n }\n\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;\n return Promise.reject(new Error(`[@octokit/graphql] \"${key}\" cannot be used as variable name`));\n }\n }\n\n const parsedOptions = typeof query === \"string\" ? Object.assign({\n query\n }, options) : query;\n const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n\n if (!result.variables) {\n result.variables = {};\n }\n\n result.variables[key] = parsedOptions[key];\n return result;\n }, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix\n // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451\n\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n\n return request(requestOptions).then(response => {\n if (response.data.errors) {\n const headers = {};\n\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n\n throw new GraphqlResponseError(requestOptions, headers, response.data);\n }\n\n return response.data.data;\n });\n}\n\nfunction withDefaults(request$1, newDefaults) {\n const newRequest = request$1.defaults(newDefaults);\n\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: request.request.endpoint\n });\n}\n\nconst graphql$1 = withDefaults(request.request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\n\nexports.GraphqlResponseError = GraphqlResponseError;\nexports.graphql = graphql$1;\nexports.withCustomRequest = withCustomRequest;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst VERSION = \"2.17.0\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\n/**\n * Some “list” response that can be paginated have a different response structure\n *\n * They have a `total_count` key in the response (search also has `incomplete_results`,\n * /installation/repositories also has `repository_selection`), as well as a key with\n * the list of the items which name varies from endpoint to endpoint.\n *\n * Octokit normalizes these responses so that paginated results are always returned following\n * the same structure. One challenge is that if the list response has only one page, no Link\n * header is provided, so this header alone is not sufficient to check wether a response is\n * paginated or not.\n *\n * We check if a \"total_count\" key is present in the response data, but also make sure that\n * a \"url\" property is not, as the \"Get the combined status for a specific ref\" endpoint would\n * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref\n */\nfunction normalizePaginatedListResponse(response) {\n // endpoints can respond with 204 if repository is empty\n if (!response.data) {\n return _objectSpread2(_objectSpread2({}, response), {}, {\n data: []\n });\n }\n\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization) return response; // keep the additional properties intact as there is currently no other way\n // to retrieve the same information.\n\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n\n response.data.total_count = totalCount;\n return response;\n}\n\nfunction iterator(octokit, route, parameters) {\n const options = typeof route === \"function\" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url) return {\n done: true\n };\n\n try {\n const response = await requestMethod({\n method,\n url,\n headers\n });\n const normalizedResponse = normalizePaginatedListResponse(response); // `response.headers.link` format:\n // '; rel=\"next\", ; rel=\"last\"'\n // sets `url` to undefined if \"next\" URL is not present or `link` header is not set\n\n url = ((normalizedResponse.headers.link || \"\").match(/<([^>]+)>;\\s*rel=\"next\"/) || [])[1];\n return {\n value: normalizedResponse\n };\n } catch (error) {\n if (error.status !== 409) throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: []\n }\n };\n }\n }\n\n })\n };\n}\n\nfunction paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = undefined;\n }\n\n return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);\n}\n\nfunction gather(octokit, results, iterator, mapFn) {\n return iterator.next().then(result => {\n if (result.done) {\n return results;\n }\n\n let earlyExit = false;\n\n function done() {\n earlyExit = true;\n }\n\n results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);\n\n if (earlyExit) {\n return results;\n }\n\n return gather(octokit, results, iterator, mapFn);\n });\n}\n\nconst composePaginateRest = Object.assign(paginate, {\n iterator\n});\n\nconst paginatingEndpoints = [\"GET /app/hook/deliveries\", \"GET /app/installations\", \"GET /applications/grants\", \"GET /authorizations\", \"GET /enterprises/{enterprise}/actions/permissions/organizations\", \"GET /enterprises/{enterprise}/actions/runner-groups\", \"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations\", \"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners\", \"GET /enterprises/{enterprise}/actions/runners\", \"GET /enterprises/{enterprise}/actions/runners/downloads\", \"GET /events\", \"GET /gists\", \"GET /gists/public\", \"GET /gists/starred\", \"GET /gists/{gist_id}/comments\", \"GET /gists/{gist_id}/commits\", \"GET /gists/{gist_id}/forks\", \"GET /installation/repositories\", \"GET /issues\", \"GET /marketplace_listing/plans\", \"GET /marketplace_listing/plans/{plan_id}/accounts\", \"GET /marketplace_listing/stubbed/plans\", \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\", \"GET /networks/{owner}/{repo}/events\", \"GET /notifications\", \"GET /organizations\", \"GET /orgs/{org}/actions/permissions/repositories\", \"GET /orgs/{org}/actions/runner-groups\", \"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories\", \"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners\", \"GET /orgs/{org}/actions/runners\", \"GET /orgs/{org}/actions/runners/downloads\", \"GET /orgs/{org}/actions/secrets\", \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\", \"GET /orgs/{org}/blocks\", \"GET /orgs/{org}/credential-authorizations\", \"GET /orgs/{org}/events\", \"GET /orgs/{org}/failed_invitations\", \"GET /orgs/{org}/hooks\", \"GET /orgs/{org}/hooks/{hook_id}/deliveries\", \"GET /orgs/{org}/installations\", \"GET /orgs/{org}/invitations\", \"GET /orgs/{org}/invitations/{invitation_id}/teams\", \"GET /orgs/{org}/issues\", \"GET /orgs/{org}/members\", \"GET /orgs/{org}/migrations\", \"GET /orgs/{org}/migrations/{migration_id}/repositories\", \"GET /orgs/{org}/outside_collaborators\", \"GET /orgs/{org}/packages\", \"GET /orgs/{org}/projects\", \"GET /orgs/{org}/public_members\", \"GET /orgs/{org}/repos\", \"GET /orgs/{org}/secret-scanning/alerts\", \"GET /orgs/{org}/team-sync/groups\", \"GET /orgs/{org}/teams\", \"GET /orgs/{org}/teams/{team_slug}/discussions\", \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\", \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\", \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\", \"GET /orgs/{org}/teams/{team_slug}/invitations\", \"GET /orgs/{org}/teams/{team_slug}/members\", \"GET /orgs/{org}/teams/{team_slug}/projects\", \"GET /orgs/{org}/teams/{team_slug}/repos\", \"GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings\", \"GET /orgs/{org}/teams/{team_slug}/teams\", \"GET /projects/columns/{column_id}/cards\", \"GET /projects/{project_id}/collaborators\", \"GET /projects/{project_id}/columns\", \"GET /repos/{owner}/{repo}/actions/artifacts\", \"GET /repos/{owner}/{repo}/actions/runners\", \"GET /repos/{owner}/{repo}/actions/runners/downloads\", \"GET /repos/{owner}/{repo}/actions/runs\", \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\", \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\", \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\", \"GET /repos/{owner}/{repo}/actions/secrets\", \"GET /repos/{owner}/{repo}/actions/workflows\", \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\", \"GET /repos/{owner}/{repo}/assignees\", \"GET /repos/{owner}/{repo}/autolinks\", \"GET /repos/{owner}/{repo}/branches\", \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\", \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\", \"GET /repos/{owner}/{repo}/code-scanning/alerts\", \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\", \"GET /repos/{owner}/{repo}/code-scanning/analyses\", \"GET /repos/{owner}/{repo}/collaborators\", \"GET /repos/{owner}/{repo}/comments\", \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\", \"GET /repos/{owner}/{repo}/commits\", \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\", \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\", \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\", \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\", \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\", \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\", \"GET /repos/{owner}/{repo}/contributors\", \"GET /repos/{owner}/{repo}/deployments\", \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\", \"GET /repos/{owner}/{repo}/events\", \"GET /repos/{owner}/{repo}/forks\", \"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\", \"GET /repos/{owner}/{repo}/hooks\", \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\", \"GET /repos/{owner}/{repo}/invitations\", \"GET /repos/{owner}/{repo}/issues\", \"GET /repos/{owner}/{repo}/issues/comments\", \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\", \"GET /repos/{owner}/{repo}/issues/events\", \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\", \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\", \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\", \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\", \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\", \"GET /repos/{owner}/{repo}/keys\", \"GET /repos/{owner}/{repo}/labels\", \"GET /repos/{owner}/{repo}/milestones\", \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\", \"GET /repos/{owner}/{repo}/notifications\", \"GET /repos/{owner}/{repo}/pages/builds\", \"GET /repos/{owner}/{repo}/projects\", \"GET /repos/{owner}/{repo}/pulls\", \"GET /repos/{owner}/{repo}/pulls/comments\", \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\", \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\", \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\", \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\", \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\", \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\", \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\", \"GET /repos/{owner}/{repo}/releases\", \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\", \"GET /repos/{owner}/{repo}/secret-scanning/alerts\", \"GET /repos/{owner}/{repo}/stargazers\", \"GET /repos/{owner}/{repo}/subscribers\", \"GET /repos/{owner}/{repo}/tags\", \"GET /repos/{owner}/{repo}/teams\", \"GET /repositories\", \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\", \"GET /scim/v2/enterprises/{enterprise}/Groups\", \"GET /scim/v2/enterprises/{enterprise}/Users\", \"GET /scim/v2/organizations/{org}/Users\", \"GET /search/code\", \"GET /search/commits\", \"GET /search/issues\", \"GET /search/labels\", \"GET /search/repositories\", \"GET /search/topics\", \"GET /search/users\", \"GET /teams/{team_id}/discussions\", \"GET /teams/{team_id}/discussions/{discussion_number}/comments\", \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\", \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\", \"GET /teams/{team_id}/invitations\", \"GET /teams/{team_id}/members\", \"GET /teams/{team_id}/projects\", \"GET /teams/{team_id}/repos\", \"GET /teams/{team_id}/team-sync/group-mappings\", \"GET /teams/{team_id}/teams\", \"GET /user/blocks\", \"GET /user/emails\", \"GET /user/followers\", \"GET /user/following\", \"GET /user/gpg_keys\", \"GET /user/installations\", \"GET /user/installations/{installation_id}/repositories\", \"GET /user/issues\", \"GET /user/keys\", \"GET /user/marketplace_purchases\", \"GET /user/marketplace_purchases/stubbed\", \"GET /user/memberships/orgs\", \"GET /user/migrations\", \"GET /user/migrations/{migration_id}/repositories\", \"GET /user/orgs\", \"GET /user/packages\", \"GET /user/public_emails\", \"GET /user/repos\", \"GET /user/repository_invitations\", \"GET /user/starred\", \"GET /user/subscriptions\", \"GET /user/teams\", \"GET /users\", \"GET /users/{username}/events\", \"GET /users/{username}/events/orgs/{org}\", \"GET /users/{username}/events/public\", \"GET /users/{username}/followers\", \"GET /users/{username}/following\", \"GET /users/{username}/gists\", \"GET /users/{username}/gpg_keys\", \"GET /users/{username}/keys\", \"GET /users/{username}/orgs\", \"GET /users/{username}/packages\", \"GET /users/{username}/projects\", \"GET /users/{username}/received_events\", \"GET /users/{username}/received_events/public\", \"GET /users/{username}/repos\", \"GET /users/{username}/starred\", \"GET /users/{username}/subscriptions\"];\n\nfunction isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n } else {\n return false;\n }\n}\n\n/**\n * @param octokit Octokit instance\n * @param options Options passed to Octokit constructor\n */\n\nfunction paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit)\n })\n };\n}\npaginateRest.VERSION = VERSION;\n\nexports.composePaginateRest = composePaginateRest;\nexports.isPaginatingEndpoint = isPaginatingEndpoint;\nexports.paginateRest = paginateRest;\nexports.paginatingEndpoints = paginatingEndpoints;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nconst Endpoints = {\n actions: {\n addSelectedRepoToOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"],\n approveWorkflowRun: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\"],\n cancelWorkflowRun: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\"],\n createOrUpdateEnvironmentSecret: [\"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n createRegistrationTokenForOrg: [\"POST /orgs/{org}/actions/runners/registration-token\"],\n createRegistrationTokenForRepo: [\"POST /repos/{owner}/{repo}/actions/runners/registration-token\"],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\"POST /repos/{owner}/{repo}/actions/runners/remove-token\"],\n createWorkflowDispatch: [\"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\"],\n deleteArtifact: [\"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n deleteEnvironmentSecret: [\"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteRepoSecret: [\"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n deleteSelfHostedRunnerFromOrg: [\"DELETE /orgs/{org}/actions/runners/{runner_id}\"],\n deleteSelfHostedRunnerFromRepo: [\"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\"],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"],\n disableSelectedRepositoryGithubActionsOrganization: [\"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\"],\n disableWorkflow: [\"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\"],\n downloadArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\"],\n downloadJobLogsForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\"],\n downloadWorkflowRunAttemptLogs: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\"],\n downloadWorkflowRunLogs: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"],\n enableSelectedRepositoryGithubActionsOrganization: [\"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\"],\n enableWorkflow: [\"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\"],\n getAllowedActionsOrganization: [\"GET /orgs/{org}/actions/permissions/selected-actions\"],\n getAllowedActionsRepository: [\"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\"],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getEnvironmentPublicKey: [\"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\"],\n getEnvironmentSecret: [\"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"],\n getGithubActionsPermissionsOrganization: [\"GET /orgs/{org}/actions/permissions\"],\n getGithubActionsPermissionsRepository: [\"GET /repos/{owner}/{repo}/actions/permissions\"],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getPendingDeploymentsForRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"],\n getRepoPermissions: [\"GET /repos/{owner}/{repo}/actions/permissions\", {}, {\n renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"]\n }],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getReviewsForRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\"],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\"],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\"],\n getWorkflowRunUsage: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\"],\n getWorkflowUsage: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\"],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\"GET /repositories/{repository_id}/environments/{environment_name}/secrets\"],\n listJobsForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\"],\n listJobsForWorkflowRunAttempt: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\"],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\"GET /repos/{owner}/{repo}/actions/runners/downloads\"],\n listSelectedReposForOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\"],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\"GET /orgs/{org}/actions/permissions/repositories\"],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\"],\n listWorkflowRuns: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\"],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n removeSelectedRepoFromOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"],\n reviewPendingDeploymentsForRun: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"],\n setAllowedActionsOrganization: [\"PUT /orgs/{org}/actions/permissions/selected-actions\"],\n setAllowedActionsRepository: [\"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\"],\n setGithubActionsPermissionsOrganization: [\"PUT /orgs/{org}/actions/permissions\"],\n setGithubActionsPermissionsRepository: [\"PUT /repos/{owner}/{repo}/actions/permissions\"],\n setSelectedReposForOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\"],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\"PUT /orgs/{org}/actions/permissions/repositories\"]\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\"DELETE /notifications/threads/{thread_id}/subscription\"],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\"GET /notifications/threads/{thread_id}/subscription\"],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\"GET /users/{username}/events/orgs/{org}\"],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\"GET /users/{username}/received_events/public\"],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\"GET /repos/{owner}/{repo}/notifications\"],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\"PUT /notifications/threads/{thread_id}/subscription\"],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"]\n },\n apps: {\n addRepoToInstallation: [\"PUT /user/installations/{installation_id}/repositories/{repository_id}\", {}, {\n renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"]\n }],\n addRepoToInstallationForAuthenticatedUser: [\"PUT /user/installations/{installation_id}/repositories/{repository_id}\"],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createContentAttachment: [\"POST /content_references/{content_reference_id}/attachments\", {\n mediaType: {\n previews: [\"corsair\"]\n }\n }],\n createContentAttachmentForRepo: [\"POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments\", {\n mediaType: {\n previews: [\"corsair\"]\n }\n }],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\"POST /app/installations/{installation_id}/access_tokens\"],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\"GET /marketplace_listing/accounts/{account_id}\"],\n getSubscriptionPlanForAccountStubbed: [\"GET /marketplace_listing/stubbed/accounts/{account_id}\"],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\"],\n listInstallationReposForAuthenticatedUser: [\"GET /user/installations/{installation_id}/repositories\"],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\"GET /user/marketplace_purchases/stubbed\"],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\"POST /app/hook/deliveries/{delivery_id}/attempts\"],\n removeRepoFromInstallation: [\"DELETE /user/installations/{installation_id}/repositories/{repository_id}\", {}, {\n renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"]\n }],\n removeRepoFromInstallationForAuthenticatedUser: [\"DELETE /user/installations/{installation_id}/repositories/{repository_id}\"],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\"DELETE /app/installations/{installation_id}/suspended\"],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"]\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\"GET /users/{username}/settings/billing/actions\"],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\"GET /users/{username}/settings/billing/packages\"],\n getSharedStorageBillingOrg: [\"GET /orgs/{org}/settings/billing/shared-storage\"],\n getSharedStorageBillingUser: [\"GET /users/{username}/settings/billing/shared-storage\"]\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\"],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\"],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\"],\n rerequestSuite: [\"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\"],\n setSuitesPreferences: [\"PATCH /repos/{owner}/{repo}/check-suites/preferences\"],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"]\n },\n codeScanning: {\n deleteAnalysis: [\"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\"],\n getAlert: [\"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\", {}, {\n renamedParameters: {\n alert_id: \"alert_number\"\n }\n }],\n getAnalysis: [\"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\"],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\", {}, {\n renamed: [\"codeScanning\", \"listAlertInstances\"]\n }],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\"],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"]\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"]\n },\n emojis: {\n get: [\"GET /emojis\"]\n },\n enterpriseAdmin: {\n disableSelectedOrganizationGithubActionsEnterprise: [\"DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\"],\n enableSelectedOrganizationGithubActionsEnterprise: [\"PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\"],\n getAllowedActionsEnterprise: [\"GET /enterprises/{enterprise}/actions/permissions/selected-actions\"],\n getGithubActionsPermissionsEnterprise: [\"GET /enterprises/{enterprise}/actions/permissions\"],\n listSelectedOrganizationsEnabledGithubActionsEnterprise: [\"GET /enterprises/{enterprise}/actions/permissions/organizations\"],\n setAllowedActionsEnterprise: [\"PUT /enterprises/{enterprise}/actions/permissions/selected-actions\"],\n setGithubActionsPermissionsEnterprise: [\"PUT /enterprises/{enterprise}/actions/permissions\"],\n setSelectedOrganizationsEnabledGithubActionsEnterprise: [\"PUT /enterprises/{enterprise}/actions/permissions/organizations\"]\n },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"]\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"]\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"]\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\"GET /user/interaction-limits\", {}, {\n renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"]\n }],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\"DELETE /repos/{owner}/{repo}/interaction-limits\"],\n removeRestrictionsForYourPublicRepos: [\"DELETE /user/interaction-limits\", {}, {\n renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"]\n }],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\"PUT /user/interaction-limits\", {}, {\n renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"]\n }]\n },\n issues: {\n addAssignees: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\"],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\"],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\"],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n removeAssignees: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\"],\n removeLabel: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\"],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\"]\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"]\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\"POST /markdown/raw\", {\n headers: {\n \"content-type\": \"text/plain; charset=utf-8\"\n }\n }]\n },\n meta: {\n get: [\"GET /meta\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"]\n },\n migrations: {\n cancelImport: [\"DELETE /repos/{owner}/{repo}/import\"],\n deleteArchiveForAuthenticatedUser: [\"DELETE /user/migrations/{migration_id}/archive\"],\n deleteArchiveForOrg: [\"DELETE /orgs/{org}/migrations/{migration_id}/archive\"],\n downloadArchiveForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/archive\"],\n getArchiveForAuthenticatedUser: [\"GET /user/migrations/{migration_id}/archive\"],\n getCommitAuthors: [\"GET /repos/{owner}/{repo}/import/authors\"],\n getImportStatus: [\"GET /repos/{owner}/{repo}/import\"],\n getLargeFiles: [\"GET /repos/{owner}/{repo}/import/large_files\"],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\"GET /user/migrations/{migration_id}/repositories\"],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\"GET /user/migrations/{migration_id}/repositories\", {}, {\n renamed: [\"migrations\", \"listReposForAuthenticatedUser\"]\n }],\n mapCommitAuthor: [\"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\"],\n setLfsPreference: [\"PATCH /repos/{owner}/{repo}/import/lfs\"],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\"PUT /repos/{owner}/{repo}/import\"],\n unlockRepoForAuthenticatedUser: [\"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\"],\n unlockRepoForOrg: [\"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\"],\n updateImport: [\"PATCH /repos/{owner}/{repo}/import\"]\n },\n orgs: {\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\"PUT /orgs/{org}/outside_collaborators/{username}\"],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n get: [\"GET /orgs/{org}\"],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\"],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\"DELETE /orgs/{org}/outside_collaborators/{username}\"],\n removePublicMembershipForAuthenticatedUser: [\"DELETE /orgs/{org}/public_members/{username}\"],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\"PUT /orgs/{org}/public_members/{username}\"],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\"PATCH /user/memberships/orgs/{org}\"],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"]\n },\n packages: {\n deletePackageForAuthenticatedUser: [\"DELETE /user/packages/{package_type}/{package_name}\"],\n deletePackageForOrg: [\"DELETE /orgs/{org}/packages/{package_type}/{package_name}\"],\n deletePackageForUser: [\"DELETE /users/{username}/packages/{package_type}/{package_name}\"],\n deletePackageVersionForAuthenticatedUser: [\"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"],\n deletePackageVersionForOrg: [\"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"],\n deletePackageVersionForUser: [\"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\", {}, {\n renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"]\n }],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\"GET /user/packages/{package_type}/{package_name}/versions\", {}, {\n renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\"]\n }],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\"GET /user/packages/{package_type}/{package_name}/versions\"],\n getAllPackageVersionsForPackageOwnedByOrg: [\"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\"],\n getAllPackageVersionsForPackageOwnedByUser: [\"GET /users/{username}/packages/{package_type}/{package_name}/versions\"],\n getPackageForAuthenticatedUser: [\"GET /user/packages/{package_type}/{package_name}\"],\n getPackageForOrganization: [\"GET /orgs/{org}/packages/{package_type}/{package_name}\"],\n getPackageForUser: [\"GET /users/{username}/packages/{package_type}/{package_name}\"],\n getPackageVersionForAuthenticatedUser: [\"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"],\n getPackageVersionForOrganization: [\"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"],\n getPackageVersionForUser: [\"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\"POST /user/packages/{package_type}/{package_name}/restore{?token}\"],\n restorePackageForOrg: [\"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\"],\n restorePackageForUser: [\"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\"],\n restorePackageVersionForAuthenticatedUser: [\"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"],\n restorePackageVersionForOrg: [\"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"],\n restorePackageVersionForUser: [\"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"]\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\"GET /projects/{project_id}/collaborators/{username}/permission\"],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\"DELETE /projects/{project_id}/collaborators/{username}\"],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"]\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\"],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\"],\n deletePendingReview: [\"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"],\n deleteReviewComment: [\"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n dismissReview: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\"],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\"],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"],\n listReviewComments: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\"],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"],\n requestReviewers: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"],\n submitReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\"],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\"],\n updateReview: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"],\n updateReviewComment: [\"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\"]\n },\n rateLimit: {\n get: [\"GET /rate_limit\"]\n },\n reactions: {\n createForCommitComment: [\"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\"],\n createForIssue: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n createForIssueComment: [\"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"],\n createForPullRequestReviewComment: [\"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"],\n createForRelease: [\"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\"],\n createForTeamDiscussionCommentInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"],\n createForTeamDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"],\n deleteForCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\"],\n deleteForIssue: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\"],\n deleteForIssueComment: [\"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\"],\n deleteForPullRequestComment: [\"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\"],\n deleteForTeamDiscussion: [\"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\"],\n deleteForTeamDiscussionComment: [\"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\"],\n listForCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\"],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"],\n listForPullRequestReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"],\n listForTeamDiscussionCommentInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"],\n listForTeamDiscussionInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"]\n },\n repos: {\n acceptInvitation: [\"PATCH /user/repository_invitations/{invitation_id}\", {}, {\n renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"]\n }],\n acceptInvitationForAuthenticatedUser: [\"PATCH /user/repository_invitations/{invitation_id}\"],\n addAppAccessRestrictions: [\"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\", {}, {\n mapToData: \"apps\"\n }],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\", {}, {\n mapToData: \"contexts\"\n }],\n addTeamAccessRestrictions: [\"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\", {}, {\n mapToData: \"teams\"\n }],\n addUserAccessRestrictions: [\"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\", {}, {\n mapToData: \"users\"\n }],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\"GET /repos/{owner}/{repo}/vulnerability-alerts\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\"GET /repos/{owner}/{repo}/compare/{basehead}\"],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\"],\n createCommitSignatureProtection: [\"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentStatus: [\"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateEnvironment: [\"PUT /repos/{owner}/{repo}/environments/{environment_name}\"],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createUsingTemplate: [\"POST /repos/{template_owner}/{template_repo}/generate\"],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\"DELETE /user/repository_invitations/{invitation_id}\", {}, {\n renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"]\n }],\n declineInvitationForAuthenticatedUser: [\"DELETE /user/repository_invitations/{invitation_id}\"],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"],\n deleteAdminBranchProtection: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"],\n deleteAnEnvironment: [\"DELETE /repos/{owner}/{repo}/environments/{environment_name}\"],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\"],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\"],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\"DELETE /repos/{owner}/{repo}/automated-security-fixes\"],\n disableLfsForRepo: [\"DELETE /repos/{owner}/{repo}/lfs\"],\n disableVulnerabilityAlerts: [\"DELETE /repos/{owner}/{repo}/vulnerability-alerts\"],\n downloadArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\", {}, {\n renamed: [\"repos\", \"downloadZipballArchive\"]\n }],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\"PUT /repos/{owner}/{repo}/automated-security-fixes\"],\n enableLfsForRepo: [\"PUT /repos/{owner}/{repo}/lfs\"],\n enableVulnerabilityAlerts: [\"PUT /repos/{owner}/{repo}/vulnerability-alerts\"],\n generateReleaseNotes: [\"POST /repos/{owner}/{repo}/releases/generate-notes\"],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"],\n getAdminBranchProtection: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\"],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\", {\n mediaType: {\n previews: [\"mercy\"]\n }\n }],\n getAppsWithAccessToProtectedBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\"],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection\"],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\"GET /repos/{owner}/{repo}/collaborators/{username}/permission\"],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentStatus: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\"],\n getEnvironment: [\"GET /repos/{owner}/{repo}/environments/{environment_name}\"],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getStatusChecksProtection: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"],\n getTeamsWithAccessToProtectedBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\"],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\"],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\"],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\"],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\"],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/statuses\"],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentStatuses: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\"],\n listReleaseAssets: [\"GET /repos/{owner}/{repo}/releases/{release_id}/assets\"],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"],\n removeAppAccessRestrictions: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\", {}, {\n mapToData: \"apps\"\n }],\n removeCollaborator: [\"DELETE /repos/{owner}/{repo}/collaborators/{username}\"],\n removeStatusCheckContexts: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\", {}, {\n mapToData: \"contexts\"\n }],\n removeStatusCheckProtection: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"],\n removeTeamAccessRestrictions: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\", {}, {\n mapToData: \"teams\"\n }],\n removeUserAccessRestrictions: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\", {}, {\n mapToData: \"users\"\n }],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\", {\n mediaType: {\n previews: [\"mercy\"]\n }\n }],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"],\n setAppAccessRestrictions: [\"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\", {}, {\n mapToData: \"apps\"\n }],\n setStatusCheckContexts: [\"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\", {}, {\n mapToData: \"contexts\"\n }],\n setTeamAccessRestrictions: [\"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\", {}, {\n mapToData: \"teams\"\n }],\n setUserAccessRestrictions: [\"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\", {}, {\n mapToData: \"users\"\n }],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\"PUT /repos/{owner}/{repo}/branches/{branch}/protection\"],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\"],\n updatePullRequestReviewProtection: [\"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n updateStatusCheckPotection: [\"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\", {}, {\n renamed: [\"repos\", \"updateStatusCheckProtection\"]\n }],\n updateStatusCheckProtection: [\"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\"],\n uploadReleaseAsset: [\"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\", {\n baseUrl: \"https://uploads.github.com\"\n }]\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\", {\n mediaType: {\n previews: [\"mercy\"]\n }\n }],\n users: [\"GET /search/users\"]\n },\n secretScanning: {\n getAlert: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n updateAlert: [\"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"]\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\"],\n addOrUpdateProjectPermissionsInOrg: [\"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\"],\n addOrUpdateRepoPermissionsInOrg: [\"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"],\n checkPermissionsForProjectInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\"],\n checkPermissionsForRepoInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"],\n deleteDiscussionInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"],\n getDiscussionInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"],\n getMembershipForUserInOrg: [\"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\"],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/invitations\"],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\"],\n removeProjectInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\"],\n removeRepoInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"],\n updateDiscussionCommentInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"],\n updateDiscussionInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"]\n },\n users: {\n addEmailForAuthenticated: [\"POST /user/emails\", {}, {\n renamed: [\"users\", \"addEmailForAuthenticatedUser\"]\n }],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\"POST /user/gpg_keys\", {}, {\n renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"]\n }],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\"POST /user/keys\", {}, {\n renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"]\n }],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n deleteEmailForAuthenticated: [\"DELETE /user/emails\", {}, {\n renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"]\n }],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\"DELETE /user/gpg_keys/{gpg_key_id}\", {}, {\n renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"]\n }],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\"DELETE /user/keys/{key_id}\", {}, {\n renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"]\n }],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\"GET /user/gpg_keys/{gpg_key_id}\", {}, {\n renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"]\n }],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\"GET /user/keys/{key_id}\", {}, {\n renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"]\n }],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\"GET /user/blocks\", {}, {\n renamed: [\"users\", \"listBlockedByAuthenticatedUser\"]\n }],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\"GET /user/emails\", {}, {\n renamed: [\"users\", \"listEmailsForAuthenticatedUser\"]\n }],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\"GET /user/following\", {}, {\n renamed: [\"users\", \"listFollowedByAuthenticatedUser\"]\n }],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\"GET /user/gpg_keys\", {}, {\n renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"]\n }],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\"GET /user/public_emails\", {}, {\n renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"]\n }],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\"GET /user/keys\", {}, {\n renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"]\n }],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\"PATCH /user/email/visibility\", {}, {\n renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"]\n }],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\"PATCH /user/email/visibility\"],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"]\n }\n};\n\nconst VERSION = \"5.13.0\";\n\nfunction endpointsToMethods(octokit, endpointsMap) {\n const newMethods = {};\n\n for (const [scope, endpoints] of Object.entries(endpointsMap)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign({\n method,\n url\n }, defaults);\n\n if (!newMethods[scope]) {\n newMethods[scope] = {};\n }\n\n const scopeMethods = newMethods[scope];\n\n if (decorations) {\n scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations);\n continue;\n }\n\n scopeMethods[methodName] = octokit.request.defaults(endpointDefaults);\n }\n }\n\n return newMethods;\n}\n\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n /* istanbul ignore next */\n\n function withDecorations(...args) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n let options = requestWithDefaults.endpoint.merge(...args); // There are currently no other decorations than `.mapToData`\n\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: undefined\n });\n return requestWithDefaults(options);\n }\n\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`);\n }\n\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n\n if (decorations.renamedParameters) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n const options = requestWithDefaults.endpoint.merge(...args);\n\n for (const [name, alias] of Object.entries(decorations.renamedParameters)) {\n if (name in options) {\n octokit.log.warn(`\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`);\n\n if (!(alias in options)) {\n options[alias] = options[name];\n }\n\n delete options[name];\n }\n }\n\n return requestWithDefaults(options);\n } // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n\n\n return requestWithDefaults(...args);\n }\n\n return Object.assign(withDecorations, requestWithDefaults);\n}\n\nfunction restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit, Endpoints);\n return {\n rest: api\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nfunction legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit, Endpoints);\n return _objectSpread2(_objectSpread2({}, api), {}, {\n rest: api\n });\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n\nexports.legacyRestEndpointMethods = legacyRestEndpointMethods;\nexports.restEndpointMethods = restEndpointMethods;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar deprecation = require('deprecation');\nvar once = _interopDefault(require('once'));\n\nconst logOnceCode = once(deprecation => console.warn(deprecation));\nconst logOnceHeaders = once(deprecation => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\n\nclass RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n } // redact request credentials without mutating original request options\n\n\n const requestCopy = Object.assign({}, options.request);\n\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\")\n });\n }\n\n requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\") // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy; // deprecations\n\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new deprecation.Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n }\n\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new deprecation.Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n }\n\n });\n }\n\n}\n\nexports.RequestError = RequestError;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar endpoint = require('@octokit/endpoint');\nvar universalUserAgent = require('universal-user-agent');\nvar isPlainObject = require('is-plain-object');\nvar nodeFetch = _interopDefault(require('node-fetch'));\nvar requestError = require('@octokit/request-error');\n\nconst VERSION = \"5.6.2\";\n\nfunction getBufferResponse(response) {\n return response.arrayBuffer();\n}\n\nfunction fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;\n\n if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n\n let headers = {};\n let status;\n let url;\n const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect\n }, // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request)).then(async response => {\n url = response.url;\n status = response.status;\n\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n\n if (status === 204 || status === 205) {\n return;\n } // GitHub API returns 200 for HEAD requests\n\n\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n\n throw new requestError.RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined\n },\n request: requestOptions\n });\n }\n\n if (status === 304) {\n throw new requestError.RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response)\n },\n request: requestOptions\n });\n }\n\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new requestError.RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data\n },\n request: requestOptions\n });\n throw error;\n }\n\n return getResponseData(response);\n }).then(data => {\n return {\n status,\n url,\n headers,\n data\n };\n }).catch(error => {\n if (error instanceof requestError.RequestError) throw error;\n throw new requestError.RequestError(error.message, 500, {\n request: requestOptions\n });\n });\n}\n\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n\n return getBufferResponse(response);\n}\n\nfunction toErrorMessage(data) {\n if (typeof data === \"string\") return data; // istanbul ignore else - just in case\n\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n\n return data.message;\n } // istanbul ignore next - just in case\n\n\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n\nfunction withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n}\n\nconst request = withDefaults(endpoint.endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}`\n }\n});\n\nexports.request = request;\n//# sourceMappingURL=index.js.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.api = void 0;\nconst common_1 = require(\"./common\");\nfunction api(apiParameters) {\n var _a;\n // If the apiParameters don't include `endpoint` treat it as a partial\n // application.\n if (!apiParameters.endpoint && !apiParameters.url) {\n return partialCall(apiParameters);\n }\n const types = {\n bearer: 'Bearer ',\n token: 'Token token=',\n };\n const { endpoint, server = 'api.pagerduty.com', token, tokenType = apiParameters.tokenType || 'token', url, version = 2, data, ...rest } = apiParameters;\n const config = {\n method: 'GET',\n ...rest,\n headers: {\n Accept: `application/vnd.pagerduty+json;version=${version}`,\n Authorization: `${types[tokenType]}${token}`,\n ...rest.headers,\n },\n };\n // Allow `data` for `queryParameters` for requests without bodies.\n if (isReadonlyRequest(config.method) && data) {\n config.queryParameters =\n (_a = config.queryParameters) !== null && _a !== void 0 ? _a : data;\n }\n else {\n config.body = JSON.stringify(data);\n }\n return apiRequest(url !== null && url !== void 0 ? url : `https://${server}/${endpoint.replace(/^\\/+/, '')}`, config);\n}\nexports.api = api;\nfunction apiRequest(url, options) {\n return (0, common_1.request)(url, options).then((response) => {\n const apiResponse = response;\n apiResponse.response = response;\n if (response.status === 204) {\n return Promise.resolve(apiResponse);\n }\n return response\n .json()\n .then((data) => {\n const resource = resourceKey(url, options.method);\n apiResponse.next = nextFunc(url, options, data);\n apiResponse.data = data;\n apiResponse.resource = resource ? data[resource] : null;\n return apiResponse;\n })\n .catch(() => Promise.reject(apiResponse));\n });\n}\nfunction resourceKey(url, method) {\n const resource = url.match(/.+.com\\/(?[\\w]+)/);\n if (resource) {\n const resourceName = resource[1];\n if (method && method.toLowerCase() === 'get') {\n return resourceName;\n }\n if (resourceName.endsWith('ies')) {\n return resourceName.slice(0, -3) + 'y';\n }\n else if (resourceName.endsWith('s')) {\n return resourceName.slice(0, -1);\n }\n return resourceName;\n }\n return null;\n}\nfunction isReadonlyRequest(method) {\n var _a;\n return !['PUT', 'POST', 'DELETE', 'PATCH'].includes((_a = method.toUpperCase()) !== null && _a !== void 0 ? _a : 'GET');\n}\nfunction isOffsetPagination(data) {\n if (data.offset !== undefined) {\n return true;\n }\n return false;\n}\nfunction isCursorPagination(data) {\n if (data.cursor !== undefined) {\n return true;\n }\n return false;\n}\nfunction nextFunc(url, options, data) {\n if (isOffsetPagination(data)) {\n if ((data === null || data === void 0 ? void 0 : data.more) && typeof data.offset !== undefined && data.limit) {\n return () => apiRequest(url, {\n ...options,\n queryParameters: {\n ...options.queryParameters,\n limit: data.limit.toString(),\n offset: (data.limit + data.offset).toString(),\n },\n });\n }\n }\n else if (isCursorPagination(data)) {\n if (data === null || data === void 0 ? void 0 : data.cursor) {\n return () => apiRequest(url, {\n ...options,\n queryParameters: {\n ...options.queryParameters,\n cursor: data.cursor,\n limit: data.limit.toString(),\n },\n });\n }\n }\n return undefined;\n}\nfunction partialCall(apiParameters) {\n const partialParameters = apiParameters;\n const partial = ((apiParameters) => api({ ...partialParameters, ...apiParameters }));\n const shorthand = (method) => (endpoint, shorthandParameters) => api({\n endpoint,\n method,\n ...partialParameters,\n ...shorthandParameters,\n });\n partial.get = shorthand('get');\n partial.post = shorthand('post');\n partial.put = shorthand('put');\n partial.patch = shorthand('patch');\n partial.delete = shorthand('delete');\n partial.all = (endpoint, shorthandParameters) => {\n function allInner(responses) {\n const response = responses[responses.length - 1];\n if (!response.next) {\n // Base case, resolve and return all responses.\n return Promise.resolve(responses);\n }\n // If there are still more resources to get then concat and repeat.\n return response\n .next()\n .then(response => allInner(responses.concat([response])));\n }\n function repackResponses(responses) {\n // Repack the responses object to make it more user friendly.\n const repackedResponse = responses.shift(); // Use the first response to build the standard response object\n repackedResponse.data = [repackedResponse.data];\n responses.forEach(response => {\n repackedResponse.data = repackedResponse.data.concat(response.data);\n repackedResponse.resource = repackedResponse.resource.concat(response.resource);\n });\n return Promise.resolve(repackedResponse);\n }\n const method = 'get';\n return api({\n endpoint,\n method,\n ...partialParameters,\n ...shorthandParameters,\n })\n .then(response => allInner([response]))\n .then(responses => repackResponses(responses));\n };\n return partial;\n}\n//# sourceMappingURL=api.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.request = void 0;\n/* LEGACY-BROWSER-SUPPORT-START */\nconst cross_fetch_1 = require(\"cross-fetch\");\nconst browser_or_node_1 = require(\"browser-or-node\");\n/* LEGACY-BROWSER-SUPPORT-END */\nconst VERSION = '2.0.0';\nfunction request(url, options = {}) {\n const { queryParameters, requestTimeout = 30000 } = options;\n url = new URL(url.toString());\n url = applyParameters(url, queryParameters);\n options = applyTimeout(options, requestTimeout);\n return fetch_retry(url.toString(), 3, {\n ...options,\n headers: new cross_fetch_1.Headers({\n 'Content-Type': 'application/json; charset=utf-8',\n /* LEGACY-BROWSER-SUPPORT-START */\n ...userAgentHeader(),\n /* LEGACY-BROWSER-SUPPORT-END */\n ...options.headers,\n }),\n });\n}\nexports.request = request;\nfunction fetch_retry(url, retries, options) {\n return new Promise((resolve, reject) => {\n (0, cross_fetch_1.default)(url, options)\n .then(response => {\n // We don't want to `reject` when retries have finished\n // Instead simply stop trying and return.\n if (retries === 0)\n return resolve(response);\n if (response.status === 429) {\n const { retryTimeout = 20000 } = options;\n retryTimeoutPromise(retryTimeout).then(() => {\n fetch_retry(url, retries - 1, options)\n .then(resolve)\n .catch(reject);\n });\n }\n else {\n clearTimeout(options.requestTimer);\n resolve(response);\n }\n })\n .catch(reject);\n });\n}\nconst retryTimeoutPromise = (milliseconds) => {\n return new Promise(resolve => setTimeout(resolve, milliseconds));\n};\nfunction userAgentHeader() {\n if (browser_or_node_1.isNode) {\n return {\n 'User-Agent': `pdjs/${VERSION} (${process.version}/${process.platform})`,\n };\n }\n else if (browser_or_node_1.isWebWorker) {\n return {\n 'User-Agent': `pdjs/${VERSION} (WebWorker)`,\n };\n }\n else if (browser_or_node_1.isJsDom) {\n return {\n 'User-Agent': `pdjs/${VERSION} (JsDom)`,\n };\n }\n else if (browser_or_node_1.isDeno) {\n return {\n 'User-Agent': `pdjs/${VERSION} (Deno)`,\n };\n }\n else if (browser_or_node_1.isBrowser) {\n return {\n // Note: This will not work consistently for all browsers as some silently drop the userAgent Header.\n 'User-Agent': `pdjs/${VERSION} (${window.navigator.userAgent})`,\n };\n }\n else {\n return {};\n }\n}\nfunction applyParameters(url, queryParameters) {\n if (!queryParameters)\n return url;\n const combinedParameters = url.searchParams;\n for (const key of Object.keys(queryParameters)) {\n const parameter = queryParameters[key];\n if (Array.isArray(parameter)) {\n // Support for array based keys like `additional_fields[]`\n parameter.forEach(item => {\n combinedParameters.append(key, item);\n });\n }\n else {\n combinedParameters.append(key, parameter);\n }\n }\n url.search = combinedParameters.toString();\n return url;\n}\nfunction applyTimeout(init, timeout) {\n if (!timeout)\n return init;\n const timer = setTimeout(() => { }, timeout);\n return {\n ...init,\n requestTimer: timer,\n };\n}\n//# sourceMappingURL=common.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.change = exports.resolve = exports.acknowledge = exports.trigger = exports.event = void 0;\nconst common_1 = require(\"./common\");\nfunction event(eventParameters) {\n const { server = 'events.pagerduty.com', type = 'event', data, ...config } = eventParameters;\n let url = `https://${server}/v2/enqueue`;\n if (type === 'change') {\n url = `https://${server}/v2/change/enqueue`;\n }\n return eventFetch(url, {\n method: 'POST',\n body: JSON.stringify(data),\n ...config,\n });\n}\nexports.event = event;\nconst shorthand = (action) => (eventParameters) => {\n const typeField = 'event_action';\n return event({\n ...eventParameters,\n data: {\n ...eventParameters.data,\n [typeField]: action,\n },\n });\n};\nexports.trigger = shorthand('trigger');\nexports.acknowledge = shorthand('acknowledge');\nexports.resolve = shorthand('resolve');\nconst change = (eventParameters) => event({ ...eventParameters, type: 'change' });\nexports.change = change;\nfunction eventFetch(url, options) {\n return (0, common_1.request)(url, options).then((response) => {\n const apiResponse = response;\n return response.json().then((data) => {\n apiResponse.data = data;\n apiResponse.response = response;\n return apiResponse;\n });\n });\n}\n//# sourceMappingURL=events.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolve = exports.acknowledge = exports.trigger = exports.change = exports.event = exports.api = void 0;\nvar api_1 = require(\"./api\");\nObject.defineProperty(exports, \"api\", { enumerable: true, get: function () { return api_1.api; } });\nvar events_1 = require(\"./events\");\nObject.defineProperty(exports, \"event\", { enumerable: true, get: function () { return events_1.event; } });\nObject.defineProperty(exports, \"change\", { enumerable: true, get: function () { return events_1.change; } });\nObject.defineProperty(exports, \"trigger\", { enumerable: true, get: function () { return events_1.trigger; } });\nObject.defineProperty(exports, \"acknowledge\", { enumerable: true, get: function () { return events_1.acknowledge; } });\nObject.defineProperty(exports, \"resolve\", { enumerable: true, get: function () { return events_1.resolve; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IncomingWebhook = void 0;\nconst axios_1 = __importDefault(require(\"axios\"));\nconst errors_1 = require(\"./errors\");\nconst instrument_1 = require(\"./instrument\");\n/**\n * A client for Slack's Incoming Webhooks\n */\nclass IncomingWebhook {\n constructor(url, defaults = {\n timeout: 0,\n }) {\n if (url === undefined) {\n throw new Error('Incoming webhook URL is required');\n }\n this.url = url;\n this.defaults = defaults;\n this.axios = axios_1.default.create({\n baseURL: url,\n httpAgent: defaults.agent,\n httpsAgent: defaults.agent,\n maxRedirects: 0,\n proxy: false,\n timeout: defaults.timeout,\n headers: {\n 'User-Agent': (0, instrument_1.getUserAgent)(),\n },\n });\n delete this.defaults.agent;\n }\n /**\n * Send a notification to a conversation\n * @param message - the message (a simple string, or an object describing the message)\n */\n async send(message) {\n // NOTE: no support for TLS config\n let payload = Object.assign({}, this.defaults);\n if (typeof message === 'string') {\n payload.text = message;\n }\n else {\n payload = Object.assign(payload, message);\n }\n try {\n const response = await this.axios.post(this.url, payload);\n return this.buildResult(response);\n }\n catch (error) {\n // Wrap errors in this packages own error types (abstract the implementation details' types)\n if (error.response !== undefined) {\n throw (0, errors_1.httpErrorWithOriginal)(error);\n }\n else if (error.request !== undefined) {\n throw (0, errors_1.requestErrorWithOriginal)(error);\n }\n else {\n throw error;\n }\n }\n }\n /**\n * Processes an HTTP response into an IncomingWebhookResult.\n */\n // eslint-disable-next-line class-methods-use-this\n buildResult(response) {\n return {\n text: response.data,\n };\n }\n}\nexports.IncomingWebhook = IncomingWebhook;\n//# sourceMappingURL=IncomingWebhook.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.httpErrorWithOriginal = exports.requestErrorWithOriginal = exports.ErrorCode = void 0;\n/**\n * A dictionary of codes for errors produced by this package\n */\nvar ErrorCode;\n(function (ErrorCode) {\n ErrorCode[\"RequestError\"] = \"slack_webhook_request_error\";\n ErrorCode[\"HTTPError\"] = \"slack_webhook_http_error\";\n})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));\n/**\n * Factory for producing a {@link CodedError} from a generic error\n */\nfunction errorWithCode(error, code) {\n // NOTE: might be able to return something more specific than a CodedError with conditional typing\n const codedError = error;\n codedError.code = code;\n return codedError;\n}\n/**\n * A factory to create IncomingWebhookRequestError objects\n * @param original The original error\n */\nfunction requestErrorWithOriginal(original) {\n const error = errorWithCode(new Error(`A request error occurred: ${original.message}`), ErrorCode.RequestError);\n error.original = original;\n return error;\n}\nexports.requestErrorWithOriginal = requestErrorWithOriginal;\n/**\n * A factory to create IncomingWebhookHTTPError objects\n * @param original The original error\n */\nfunction httpErrorWithOriginal(original) {\n const error = errorWithCode(new Error(`An HTTP protocol error occurred: statusCode = ${original.response.status}`), ErrorCode.HTTPError);\n error.original = original;\n return error;\n}\nexports.httpErrorWithOriginal = httpErrorWithOriginal;\n//# sourceMappingURL=errors.js.map","\"use strict\";\n/// \nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ErrorCode = exports.IncomingWebhook = void 0;\nvar IncomingWebhook_1 = require(\"./IncomingWebhook\");\nObject.defineProperty(exports, \"IncomingWebhook\", { enumerable: true, get: function () { return IncomingWebhook_1.IncomingWebhook; } });\nvar errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"ErrorCode\", { enumerable: true, get: function () { return errors_1.ErrorCode; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUserAgent = exports.addAppMetadata = void 0;\nconst os = __importStar(require(\"os\"));\nconst packageJson = require('../package.json'); // eslint-disable-line import/no-commonjs, @typescript-eslint/no-var-requires\n/**\n * Replaces occurrences of '/' with ':' in a string, since '/' is meaningful inside User-Agent strings as a separator.\n */\nfunction replaceSlashes(s) {\n return s.replace('/', ':');\n}\nconst baseUserAgent = `${replaceSlashes(packageJson.name)}/${packageJson.version} ` +\n `node/${process.version.replace('v', '')} ` +\n `${os.platform()}/${os.release()}`;\nconst appMetadata = {};\n/**\n * Appends the app metadata into the User-Agent value\n * @param appMetadata.name name of tool to be counted in instrumentation\n * @param appMetadata.version version of tool to be counted in instrumentation\n */\nfunction addAppMetadata({ name, version }) {\n appMetadata[replaceSlashes(name)] = version;\n}\nexports.addAppMetadata = addAppMetadata;\n/**\n * Returns the current User-Agent value for instrumentation\n */\nfunction getUserAgent() {\n const appIdentifier = Object.entries(appMetadata).map(([name, version]) => `${name}/${version}`).join(' ');\n // only prepend the appIdentifier when its not empty\n return ((appIdentifier.length > 0) ? `${appIdentifier} ` : '') + baseUserAgent;\n}\nexports.getUserAgent = getUserAgent;\n//# sourceMappingURL=instrument.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LoginRequestResponse = exports.ErrorResponse = exports.SuccessResponse = exports.ActivityResponse = exports.ActivityRequestError = exports.ActivityRequestTrigger = void 0;\nvar ActivityRequestTrigger;\n(function (ActivityRequestTrigger) {\n ActivityRequestTrigger[\"Automatic\"] = \"automatic\";\n ActivityRequestTrigger[\"Manual\"] = \"manual\";\n})(ActivityRequestTrigger = exports.ActivityRequestTrigger || (exports.ActivityRequestTrigger = {}));\nvar ActivityRequestError = /** @class */ (function () {\n function ActivityRequestError(code, message) {\n this.code = code;\n this.message = message;\n }\n return ActivityRequestError;\n}());\nexports.ActivityRequestError = ActivityRequestError;\nvar ActivityResponse = /** @class */ (function () {\n function ActivityResponse(request) {\n this.request = request;\n }\n return ActivityResponse;\n}());\nexports.ActivityResponse = ActivityResponse;\nvar SuccessResponse = /** @class */ (function (_super) {\n __extends(SuccessResponse, _super);\n function SuccessResponse(request, rawContent) {\n var _this = _super.call(this, request) || this;\n _this.request = request;\n _this.rawContent = rawContent;\n return _this;\n }\n return SuccessResponse;\n}(ActivityResponse));\nexports.SuccessResponse = SuccessResponse;\nvar ErrorResponse = /** @class */ (function (_super) {\n __extends(ErrorResponse, _super);\n function ErrorResponse(request, error) {\n var _this = _super.call(this, request) || this;\n _this.request = request;\n _this.error = error;\n return _this;\n }\n return ErrorResponse;\n}(ActivityResponse));\nexports.ErrorResponse = ErrorResponse;\nvar LoginRequestResponse = /** @class */ (function (_super) {\n __extends(LoginRequestResponse, _super);\n function LoginRequestResponse(request, _auth) {\n var _this = _super.call(this, request) || this;\n _this.request = request;\n _this._auth = _auth;\n for (var _i = 0, _a = _this._auth.buttons; _i < _a.length; _i++) {\n var button = _a[_i];\n if (button.type === \"signin\" && button.value !== undefined) {\n try {\n new URL(button.value);\n _this.signinButton = button;\n break;\n }\n catch (e) {\n // Ignore parsing error\n }\n }\n }\n return _this;\n }\n Object.defineProperty(LoginRequestResponse.prototype, \"tokenExchangeResource\", {\n get: function () {\n return this._auth.tokenExchangeResource;\n },\n enumerable: false,\n configurable: true\n });\n return LoginRequestResponse;\n}(ActivityResponse));\nexports.LoginRequestResponse = LoginRequestResponse;\n//# sourceMappingURL=activity-request.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AdaptiveApplet = void 0;\nvar Enums = require(\"./enums\");\nvar Utils = require(\"./utils\");\nvar shared_1 = require(\"./shared\");\nvar activity_request_1 = require(\"./activity-request\");\nvar strings_1 = require(\"./strings\");\nvar card_elements_1 = require(\"./card-elements\");\nvar serialization_1 = require(\"./serialization\");\nfunction logEvent(level, message) {\n var optionalParams = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n optionalParams[_i - 2] = arguments[_i];\n }\n if (shared_1.GlobalSettings.applets.logEnabled) {\n if (shared_1.GlobalSettings.applets.onLogEvent) {\n shared_1.GlobalSettings.applets.onLogEvent(level, message, optionalParams);\n }\n else {\n switch (level) {\n case Enums.LogLevel.Warning:\n console.warn(message, optionalParams);\n break;\n case Enums.LogLevel.Error:\n console.error(message, optionalParams);\n break;\n default:\n console.log(message, optionalParams);\n break;\n }\n }\n }\n}\nvar ActivityRequest = /** @class */ (function () {\n function ActivityRequest(action, trigger, consecutiveRefreshes) {\n this.action = action;\n this.trigger = trigger;\n this.consecutiveRefreshes = consecutiveRefreshes;\n this.attemptNumber = 0;\n }\n ActivityRequest.prototype.retryAsync = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (this.onSend) {\n this.onSend(this);\n }\n return [2 /*return*/];\n });\n });\n };\n return ActivityRequest;\n}());\nvar AdaptiveApplet = /** @class */ (function () {\n function AdaptiveApplet() {\n this._allowAutomaticCardUpdate = false;\n this.renderedElement = document.createElement(\"div\");\n this.renderedElement.className = \"aaf-cardHost\";\n this.renderedElement.style.position = \"relative\";\n this.renderedElement.style.display = \"flex\";\n this.renderedElement.style.flexDirection = \"column\";\n this._cardHostElement = document.createElement(\"div\");\n this._refreshButtonHostElement = document.createElement(\"div\");\n this._refreshButtonHostElement.className = \"aaf-refreshButtonHost\";\n this._refreshButtonHostElement.style.display = \"none\";\n this.renderedElement.appendChild(this._cardHostElement);\n this.renderedElement.appendChild(this._refreshButtonHostElement);\n }\n AdaptiveApplet.prototype.displayCard = function (card) {\n if (card.renderedElement) {\n Utils.clearElementChildren(this._cardHostElement);\n this._refreshButtonHostElement.style.display = \"none\";\n this._cardHostElement.appendChild(card.renderedElement);\n }\n else {\n throw new Error(\"displayCard: undefined card.\");\n }\n };\n AdaptiveApplet.prototype.showManualRefreshButton = function (refreshAction) {\n var _this = this;\n var displayBuiltInManualRefreshButton = this.onShowManualRefreshButton ? this.onShowManualRefreshButton(this) : true;\n if (displayBuiltInManualRefreshButton) {\n this._refreshButtonHostElement.style.display = \"none\";\n var renderedRefreshButton = undefined;\n if (this.onRenderManualRefreshButton) {\n renderedRefreshButton = this.onRenderManualRefreshButton(this);\n }\n else {\n var message = strings_1.Strings.runtime.refreshThisCard();\n if (shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Automatic) {\n var autoRefreshPausedMessage = strings_1.Strings.runtime.automaticRefreshPaused();\n if (autoRefreshPausedMessage[autoRefreshPausedMessage.length - 1] !== \" \") {\n autoRefreshPausedMessage += \" \";\n }\n message = strings_1.Strings.runtime.clckToRestartAutomaticRefresh();\n }\n var cardPayload = {\n type: \"AdaptiveCard\",\n version: \"1.2\",\n body: [\n {\n type: \"RichTextBlock\",\n horizontalAlignment: \"right\",\n inlines: [\n {\n type: \"TextRun\",\n text: message,\n selectAction: {\n type: \"Action.Submit\",\n id: \"refreshCard\"\n }\n }\n ]\n }\n ]\n };\n var card = new card_elements_1.AdaptiveCard();\n card.parse(cardPayload, new card_elements_1.SerializationContext(serialization_1.Versions.v1_2));\n card.onExecuteAction = function (action) {\n if (action.id === \"refreshCard\") {\n Utils.clearElementChildren(_this._refreshButtonHostElement);\n _this.internalExecuteAction(refreshAction, activity_request_1.ActivityRequestTrigger.Automatic, 0);\n }\n };\n renderedRefreshButton = card.render();\n }\n if (renderedRefreshButton) {\n Utils.clearElementChildren(this._refreshButtonHostElement);\n this._refreshButtonHostElement.appendChild(renderedRefreshButton);\n this._refreshButtonHostElement.style.removeProperty(\"display\");\n }\n }\n };\n AdaptiveApplet.prototype.createActivityRequest = function (action, trigger, consecutiveRefreshes) {\n var _this = this;\n if (this.card) {\n var request_1 = new ActivityRequest(action, trigger, consecutiveRefreshes);\n request_1.onSend = function (sender) {\n sender.attemptNumber++;\n _this.internalSendActivityRequestAsync(request_1);\n };\n var cancel = this.onPrepareActivityRequest ? !this.onPrepareActivityRequest(this, request_1, action) : false;\n return cancel ? undefined : request_1;\n }\n else {\n throw new Error(\"createActivityRequest: no card has been set.\");\n }\n };\n AdaptiveApplet.prototype.createMagicCodeInputCard = function (attemptNumber) {\n var payload = {\n type: \"AdaptiveCard\",\n version: \"1.0\",\n body: [\n {\n type: \"TextBlock\",\n color: \"attention\",\n text: attemptNumber === 1 ? undefined : \"That didn't work... let's try again.\",\n wrap: true,\n horizontalAlignment: \"center\"\n },\n {\n type: \"TextBlock\",\n text: \"Please login in the popup. You will obtain a magic code. Paste that code below and select \\\"Submit\\\"\",\n wrap: true,\n horizontalAlignment: \"center\"\n },\n {\n type: \"Input.Text\",\n id: \"magicCode\",\n placeholder: \"Enter magic code\"\n },\n {\n type: \"ActionSet\",\n horizontalAlignment: \"center\",\n actions: [\n {\n type: \"Action.Submit\",\n id: AdaptiveApplet.submitMagicCodeActionId,\n title: \"Submit\"\n },\n {\n type: \"Action.Submit\",\n id: AdaptiveApplet.cancelMagicCodeAuthActionId,\n title: \"Cancel\"\n }\n ]\n }\n ]\n };\n var card = new card_elements_1.AdaptiveCard();\n card.parse(payload);\n return card;\n };\n AdaptiveApplet.prototype.cancelAutomaticRefresh = function () {\n if (this._allowAutomaticCardUpdate) {\n logEvent(Enums.LogLevel.Warning, \"Automatic card refresh has been cancelled as a result of the user interacting with the card.\");\n }\n this._allowAutomaticCardUpdate = false;\n };\n AdaptiveApplet.prototype.createSerializationContext = function () {\n return this.onCreateSerializationContext ? this.onCreateSerializationContext(this) : new card_elements_1.SerializationContext();\n };\n AdaptiveApplet.prototype.internalSetCard = function (payload, consecutiveRefreshes) {\n var _this = this;\n if (typeof payload === \"object\" && payload[\"type\"] === \"AdaptiveCard\") {\n this._cardPayload = payload;\n }\n if (this._cardPayload) {\n try {\n var card = new card_elements_1.AdaptiveCard();\n if (this.hostConfig) {\n card.hostConfig = this.hostConfig;\n }\n var serializationContext = this.createSerializationContext();\n card.parse(this._cardPayload, serializationContext);\n var doChangeCard = this.onCardChanging ? this.onCardChanging(this, this._cardPayload) : true;\n if (doChangeCard) {\n this._card = card;\n if (this._card.authentication && this._card.authentication.tokenExchangeResource && this.onPrefetchSSOToken) {\n this.onPrefetchSSOToken(this, this._card.authentication.tokenExchangeResource);\n }\n this._card.onExecuteAction = function (action) {\n // If the user takes an action, cancel any pending automatic refresh\n _this.cancelAutomaticRefresh();\n _this.internalExecuteAction(action, activity_request_1.ActivityRequestTrigger.Manual, 0);\n };\n this._card.onInputValueChanged = function (input) {\n // If the user modifies an input, cancel any pending automatic refresh\n _this.cancelAutomaticRefresh();\n };\n this._card.render();\n if (this._card.renderedElement) {\n this.displayCard(this._card);\n if (this.onCardChanged) {\n this.onCardChanged(this);\n }\n if (this._card.refresh) {\n if (shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Automatic && consecutiveRefreshes < shared_1.GlobalSettings.applets.refresh.maximumConsecutiveAutomaticRefreshes) {\n if (shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes <= 0) {\n logEvent(Enums.LogLevel.Info, \"Triggering automatic card refresh number \" + (consecutiveRefreshes + 1));\n this.internalExecuteAction(this._card.refresh.action, activity_request_1.ActivityRequestTrigger.Automatic, consecutiveRefreshes + 1);\n }\n else {\n logEvent(Enums.LogLevel.Info, \"Scheduling automatic card refresh number \" + (consecutiveRefreshes + 1) + \" in \" + shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes + \"ms\");\n var action_1 = this._card.refresh.action;\n this._allowAutomaticCardUpdate = true;\n window.setTimeout(function () {\n if (_this._allowAutomaticCardUpdate) {\n _this.internalExecuteAction(action_1, activity_request_1.ActivityRequestTrigger.Automatic, consecutiveRefreshes + 1);\n }\n }, shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes);\n }\n }\n else if (shared_1.GlobalSettings.applets.refresh.mode !== Enums.RefreshMode.Disabled) {\n if (consecutiveRefreshes > 0) {\n logEvent(Enums.LogLevel.Warning, \"Stopping automatic refreshes after \" + consecutiveRefreshes + \" consecutive refreshes.\");\n }\n else {\n logEvent(Enums.LogLevel.Warning, \"The card has a refresh section, but automatic refreshes are disabled.\");\n }\n if (shared_1.GlobalSettings.applets.refresh.allowManualRefreshesAfterAutomaticRefreshes || shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Manual) {\n logEvent(Enums.LogLevel.Info, \"Showing manual refresh button.\");\n this.showManualRefreshButton(this._card.refresh.action);\n }\n }\n }\n }\n }\n }\n catch (error) {\n // Ignore all errors\n logEvent(Enums.LogLevel.Error, \"setCard: \" + error);\n }\n }\n };\n AdaptiveApplet.prototype.internalExecuteAction = function (action, trigger, consecutiveRefreshes) {\n if (action instanceof card_elements_1.ExecuteAction) {\n if (this.channelAdapter) {\n var request = this.createActivityRequest(action, trigger, consecutiveRefreshes);\n if (request) {\n request.retryAsync();\n }\n }\n else {\n throw new Error(\"internalExecuteAction: No channel adapter set.\");\n }\n }\n if (this.onAction) {\n this.onAction(this, action);\n }\n };\n AdaptiveApplet.prototype.createProgressOverlay = function (request) {\n if (!this._progressOverlay) {\n if (this.onCreateProgressOverlay) {\n this._progressOverlay = this.onCreateProgressOverlay(this, request);\n }\n else {\n this._progressOverlay = document.createElement(\"div\");\n this._progressOverlay.className = \"aaf-progress-overlay\";\n var spinner = document.createElement(\"div\");\n spinner.className = \"aaf-spinner\";\n spinner.style.width = \"28px\";\n spinner.style.height = \"28px\";\n this._progressOverlay.appendChild(spinner);\n }\n }\n return this._progressOverlay;\n };\n AdaptiveApplet.prototype.removeProgressOverlay = function (request) {\n if (this.onRemoveProgressOverlay) {\n this.onRemoveProgressOverlay(this, request);\n }\n if (this._progressOverlay !== undefined) {\n this.renderedElement.removeChild(this._progressOverlay);\n this._progressOverlay = undefined;\n }\n };\n AdaptiveApplet.prototype.activityRequestSucceeded = function (response, parsedContent) {\n if (this.onActivityRequestSucceeded) {\n this.onActivityRequestSucceeded(this, response, parsedContent);\n }\n };\n AdaptiveApplet.prototype.activityRequestFailed = function (response) {\n return this.onActivityRequestFailed ? this.onActivityRequestFailed(this, response) : shared_1.GlobalSettings.applets.defaultTimeBetweenRetryAttempts;\n };\n AdaptiveApplet.prototype.showAuthCodeInputDialog = function (request) {\n var _this = this;\n var showBuiltInAuthCodeInputCard = this.onShowAuthCodeInputDialog ? this.onShowAuthCodeInputDialog(this, request) : true;\n if (showBuiltInAuthCodeInputCard) {\n var authCodeInputCard = this.createMagicCodeInputCard(request.attemptNumber);\n authCodeInputCard.render();\n authCodeInputCard.onExecuteAction = function (submitMagicCodeAction) {\n if (_this.card && submitMagicCodeAction instanceof card_elements_1.SubmitAction) {\n switch (submitMagicCodeAction.id) {\n case AdaptiveApplet.submitMagicCodeActionId:\n var authCode = undefined;\n if (submitMagicCodeAction.data && typeof submitMagicCodeAction.data[\"magicCode\"] === \"string\") {\n authCode = submitMagicCodeAction.data[\"magicCode\"];\n }\n if (authCode) {\n _this.displayCard(_this.card);\n request.authCode = authCode;\n request.retryAsync();\n }\n else {\n alert(\"Please enter the magic code you received.\");\n }\n break;\n case AdaptiveApplet.cancelMagicCodeAuthActionId:\n logEvent(Enums.LogLevel.Warning, \"Authentication cancelled by user.\");\n _this.displayCard(_this.card);\n break;\n default:\n logEvent(Enums.LogLevel.Error, \"Unespected action taken from magic code input card (id = \" + submitMagicCodeAction.id + \")\");\n alert(strings_1.Strings.magicCodeInputCard.somethingWentWrong());\n break;\n }\n }\n };\n this.displayCard(authCodeInputCard);\n }\n };\n AdaptiveApplet.prototype.internalSendActivityRequestAsync = function (request) {\n return __awaiter(this, void 0, void 0, function () {\n var overlay, done, _loop_1, this_1, state_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.channelAdapter) {\n throw new Error(\"internalSendActivityRequestAsync: channelAdapter is not set.\");\n }\n overlay = this.createProgressOverlay(request);\n if (overlay !== undefined) {\n this.renderedElement.appendChild(overlay);\n }\n done = false;\n _loop_1 = function () {\n var response, error_1, parsedContent, retryIn_1, attemptOAuth, left, top_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n response = undefined;\n if (request.attemptNumber === 1) {\n logEvent(Enums.LogLevel.Info, \"Sending activity request to channel (attempt \" + request.attemptNumber + \")\");\n }\n else {\n logEvent(Enums.LogLevel.Info, \"Re-sending activity request to channel (attempt \" + request.attemptNumber + \")\");\n }\n _b.label = 1;\n case 1:\n _b.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this_1.channelAdapter.sendRequestAsync(request)];\n case 2:\n response = _b.sent();\n return [3 /*break*/, 4];\n case 3:\n error_1 = _b.sent();\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \" + error_1);\n this_1.removeProgressOverlay(request);\n done = true;\n return [3 /*break*/, 4];\n case 4:\n if (!response) return [3 /*break*/, 10];\n if (!(response instanceof activity_request_1.SuccessResponse)) return [3 /*break*/, 5];\n this_1.removeProgressOverlay(request);\n if (response.rawContent === undefined) {\n throw new Error(\"internalSendActivityRequestAsync: Action.Execute result is undefined\");\n }\n parsedContent = response.rawContent;\n try {\n parsedContent = JSON.parse(response.rawContent);\n }\n catch (_c) {\n // Leave parseContent as is\n }\n if (typeof parsedContent === \"string\") {\n logEvent(Enums.LogLevel.Info, \"The activity request returned a string after \" + request.attemptNumber + \" attempt(s).\");\n this_1.activityRequestSucceeded(response, parsedContent);\n }\n else if (typeof parsedContent === \"object\" && parsedContent[\"type\"] === \"AdaptiveCard\") {\n logEvent(Enums.LogLevel.Info, \"The activity request returned an Adaptive Card after \" + request.attemptNumber + \" attempt(s).\");\n this_1.internalSetCard(parsedContent, request.consecutiveRefreshes);\n this_1.activityRequestSucceeded(response, this_1.card);\n }\n else {\n throw new Error(\"internalSendActivityRequestAsync: Action.Execute result is of unsupported type (\" + typeof response.rawContent + \")\");\n }\n done = true;\n return [3 /*break*/, 10];\n case 5:\n if (!(response instanceof activity_request_1.ErrorResponse)) return [3 /*break*/, 9];\n retryIn_1 = this_1.activityRequestFailed(response);\n if (!(retryIn_1 >= 0 && request.attemptNumber < shared_1.GlobalSettings.applets.maximumRetryAttempts)) return [3 /*break*/, 7];\n logEvent(Enums.LogLevel.Warning, \"Activity request failed: \" + response.error.message + \". Retrying in \" + retryIn_1 + \"ms\");\n request.attemptNumber++;\n return [4 /*yield*/, new Promise(function (resolve, reject) {\n window.setTimeout(function () { resolve(); }, retryIn_1);\n })];\n case 6:\n _b.sent();\n return [3 /*break*/, 8];\n case 7:\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \" + response.error.message + \". Giving up after \" + request.attemptNumber + \" attempt(s)\");\n this_1.removeProgressOverlay(request);\n done = true;\n _b.label = 8;\n case 8: return [3 /*break*/, 10];\n case 9:\n if (response instanceof activity_request_1.LoginRequestResponse) {\n logEvent(Enums.LogLevel.Info, \"The activity request returned a LoginRequestResponse after \" + request.attemptNumber + \" attempt(s).\");\n if (request.attemptNumber <= shared_1.GlobalSettings.applets.maximumRetryAttempts) {\n attemptOAuth = true;\n if (response.tokenExchangeResource && this_1.onSSOTokenNeeded) {\n // Attempt to use SSO. The host will return true if it can handle SSO, in which case\n // we bypass OAuth\n attemptOAuth = !this_1.onSSOTokenNeeded(this_1, request, response.tokenExchangeResource);\n }\n if (attemptOAuth) {\n // Attempt to use OAuth\n this_1.removeProgressOverlay(request);\n if (response.signinButton === undefined) {\n throw new Error(\"internalSendActivityRequestAsync: the login request doesn't contain a valid signin URL.\");\n }\n logEvent(Enums.LogLevel.Info, \"Login required at \" + response.signinButton.value);\n if (this_1.onShowSigninPrompt) {\n // Bypass the built-in auth prompt if the host app handles it\n this_1.onShowSigninPrompt(this_1, request, response.signinButton);\n }\n else {\n this_1.showAuthCodeInputDialog(request);\n left = window.screenX + (window.outerWidth - shared_1.GlobalSettings.applets.authPromptWidth) / 2;\n top_1 = window.screenY + (window.outerHeight - shared_1.GlobalSettings.applets.authPromptHeight) / 2;\n window.open(response.signinButton.value, response.signinButton.title ? response.signinButton.title : \"Sign in\", \"width=\" + shared_1.GlobalSettings.applets.authPromptWidth + \",height=\" + shared_1.GlobalSettings.applets.authPromptHeight + \",left=\" + left + \",top=\" + top_1);\n }\n }\n }\n else {\n logEvent(Enums.LogLevel.Error, \"Authentication failed. Giving up after \" + request.attemptNumber + \" attempt(s)\");\n alert(strings_1.Strings.magicCodeInputCard.authenticationFailed());\n }\n return [2 /*return*/, \"break\"];\n }\n else {\n throw new Error(\"Unhandled response type: \" + response.toString());\n }\n _b.label = 10;\n case 10: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n _a.label = 1;\n case 1:\n if (!!done) return [3 /*break*/, 3];\n return [5 /*yield**/, _loop_1()];\n case 2:\n state_1 = _a.sent();\n if (state_1 === \"break\")\n return [3 /*break*/, 3];\n return [3 /*break*/, 1];\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n AdaptiveApplet.prototype.refreshCard = function () {\n if (this._card && this._card.refresh) {\n this.internalExecuteAction(this._card.refresh.action, activity_request_1.ActivityRequestTrigger.Manual, 0);\n }\n };\n AdaptiveApplet.prototype.setCard = function (payload) {\n this.internalSetCard(payload, 0);\n };\n Object.defineProperty(AdaptiveApplet.prototype, \"card\", {\n get: function () {\n return this._card;\n },\n enumerable: false,\n configurable: true\n });\n AdaptiveApplet.submitMagicCodeActionId = \"submitMagicCode\";\n AdaptiveApplet.cancelMagicCodeAuthActionId = \"cancelMagicCodeAuth\";\n return AdaptiveApplet;\n}());\nexports.AdaptiveApplet = AdaptiveApplet;\n//# sourceMappingURL=adaptive-applet.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n__exportStar(require(\"./strings\"), exports);\n__exportStar(require(\"./enums\"), exports);\n__exportStar(require(\"./shared\"), exports);\n__exportStar(require(\"./utils\"), exports);\n__exportStar(require(\"./serialization\"), exports);\n__exportStar(require(\"./host-capabilities\"), exports);\n__exportStar(require(\"./host-config\"), exports);\n__exportStar(require(\"./registry\"), exports);\n__exportStar(require(\"./card-object\"), exports);\n__exportStar(require(\"./card-elements\"), exports);\n__exportStar(require(\"./table\"), exports);\n__exportStar(require(\"./channel-adapter\"), exports);\n__exportStar(require(\"./activity-request\"), exports);\n__exportStar(require(\"./adaptive-applet\"), exports);\n//# sourceMappingURL=adaptivecards.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SerializationContext = exports.AdaptiveCard = exports.Authentication = exports.TokenExchangeResource = exports.AuthCardButton = exports.RefreshDefinition = exports.RefreshActionProperty = exports.ContainerWithActions = exports.ColumnSet = exports.Column = exports.Container = exports.BackgroundImage = exports.ContainerBase = exports.StylableCardElementContainer = exports.ContainerStyleProperty = exports.ActionSet = exports.ShowCardAction = exports.HttpAction = exports.HttpHeader = exports.ToggleVisibilityAction = exports.OpenUrlAction = exports.ExecuteAction = exports.SubmitAction = exports.SubmitActionBase = exports.Action = exports.TimeInput = exports.TimeProperty = exports.DateInput = exports.NumberInput = exports.ChoiceSetInput = exports.Choice = exports.ToggleInput = exports.TextInput = exports.Input = exports.Media = exports.MediaSource = exports.ImageSet = exports.CardElementContainer = exports.Image = exports.FactSet = exports.Fact = exports.RichTextBlock = exports.TextRun = exports.TextBlock = exports.BaseTextBlock = exports.ActionProperty = exports.CardElement = exports.renderSeparation = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Enums = require(\"./enums\");\nvar shared_1 = require(\"./shared\");\nvar Utils = require(\"./utils\");\nvar host_config_1 = require(\"./host-config\");\nvar TextFormatters = require(\"./text-formatters\");\nvar card_object_1 = require(\"./card-object\");\nvar serialization_1 = require(\"./serialization\");\nvar registry_1 = require(\"./registry\");\nvar strings_1 = require(\"./strings\");\nvar controls_1 = require(\"./controls\");\nfunction renderSeparation(hostConfig, separationDefinition, orientation) {\n if (separationDefinition.spacing > 0 || (separationDefinition.lineThickness && separationDefinition.lineThickness > 0)) {\n var separator = document.createElement(\"div\");\n separator.className = hostConfig.makeCssClassName(\"ac-\" + (orientation == Enums.Orientation.Horizontal ? \"horizontal\" : \"vertical\") + \"-separator\");\n separator.setAttribute(\"aria-hidden\", \"true\");\n var color = separationDefinition.lineColor ? Utils.stringToCssColor(separationDefinition.lineColor) : \"\";\n if (orientation == Enums.Orientation.Horizontal) {\n if (separationDefinition.lineThickness) {\n separator.style.paddingTop = (separationDefinition.spacing / 2) + \"px\";\n separator.style.marginBottom = (separationDefinition.spacing / 2) + \"px\";\n separator.style.borderBottom = separationDefinition.lineThickness + \"px solid \" + color;\n }\n else {\n separator.style.height = separationDefinition.spacing + \"px\";\n }\n }\n else {\n if (separationDefinition.lineThickness) {\n separator.style.paddingLeft = (separationDefinition.spacing / 2) + \"px\";\n separator.style.marginRight = (separationDefinition.spacing / 2) + \"px\";\n separator.style.borderRight = separationDefinition.lineThickness + \"px solid \" + color;\n }\n else {\n separator.style.width = separationDefinition.spacing + \"px\";\n }\n }\n separator.style.overflow = \"hidden\";\n separator.style.flex = \"0 0 auto\";\n return separator;\n }\n else {\n return undefined;\n }\n}\nexports.renderSeparation = renderSeparation;\nvar CardElement = /** @class */ (function (_super) {\n __extends(CardElement, _super);\n function CardElement() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._truncatedDueToOverflow = false;\n return _this;\n }\n Object.defineProperty(CardElement.prototype, \"lang\", {\n get: function () {\n var lang = this.getValue(CardElement.langProperty);\n if (lang) {\n return lang;\n }\n else {\n if (this.parent) {\n return this.parent.lang;\n }\n else {\n return undefined;\n }\n }\n },\n set: function (value) {\n this.setValue(CardElement.langProperty, value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"isVisible\", {\n get: function () {\n return this.getValue(CardElement.isVisibleProperty);\n },\n set: function (value) {\n // If the element is going to be hidden, reset any changes that were due\n // to overflow truncation (this ensures that if the element is later\n // un-hidden it has the right content)\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && !value) {\n this.undoOverflowTruncation();\n }\n if (this.isVisible !== value) {\n this.setValue(CardElement.isVisibleProperty, value);\n this.updateRenderedElementVisibility();\n if (this._renderedElement) {\n raiseElementVisibilityChangedEvent(this);\n }\n }\n if (this._renderedElement) {\n this._renderedElement.setAttribute(\"aria-expanded\", value.toString());\n }\n },\n enumerable: false,\n configurable: true\n });\n CardElement.prototype.internalRenderSeparator = function () {\n var renderedSeparator = renderSeparation(this.hostConfig, {\n spacing: this.hostConfig.getEffectiveSpacing(this.spacing),\n lineThickness: this.separator ? this.hostConfig.separator.lineThickness : undefined,\n lineColor: this.separator ? this.hostConfig.separator.lineColor : undefined\n }, this.separatorOrientation);\n if (shared_1.GlobalSettings.alwaysBleedSeparators && renderedSeparator && this.separatorOrientation == Enums.Orientation.Horizontal) {\n // Adjust separator's margins if the option to always bleed separators is turned on\n var parentContainer = this.getParentContainer();\n if (parentContainer && parentContainer.getEffectivePadding()) {\n var parentPhysicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(parentContainer.getEffectivePadding());\n renderedSeparator.style.marginLeft = \"-\" + parentPhysicalPadding.left + \"px\";\n renderedSeparator.style.marginRight = \"-\" + parentPhysicalPadding.right + \"px\";\n }\n }\n return renderedSeparator;\n };\n CardElement.prototype.updateRenderedElementVisibility = function () {\n var displayMode = this.isDesignMode() || this.isVisible ? this._defaultRenderedElementDisplayMode : \"none\";\n if (this._renderedElement) {\n if (displayMode) {\n this._renderedElement.style.display = displayMode;\n }\n else {\n this._renderedElement.style.removeProperty(\"display\");\n }\n }\n if (this._separatorElement) {\n if (this.parent && this.parent.isFirstElement(this)) {\n this._separatorElement.style.display = \"none\";\n }\n else {\n if (displayMode) {\n this._separatorElement.style.display = displayMode;\n }\n else {\n this._separatorElement.style.removeProperty(\"display\");\n }\n }\n }\n };\n CardElement.prototype.hideElementDueToOverflow = function () {\n if (this._renderedElement && this.isVisible) {\n this._renderedElement.style.visibility = \"hidden\";\n this.isVisible = false;\n raiseElementVisibilityChangedEvent(this, false);\n }\n };\n CardElement.prototype.showElementHiddenDueToOverflow = function () {\n if (this._renderedElement && !this.isVisible) {\n this._renderedElement.style.removeProperty(\"visibility\");\n this.isVisible = true;\n raiseElementVisibilityChangedEvent(this, false);\n }\n };\n // Marked private to emulate internal access\n CardElement.prototype.handleOverflow = function (maxHeight) {\n if (this.isVisible || this.isHiddenDueToOverflow()) {\n var handled = this.truncateOverflow(maxHeight);\n // Even if we were unable to truncate the element to fit this time,\n // it still could have been previously truncated\n this._truncatedDueToOverflow = handled || this._truncatedDueToOverflow;\n if (!handled) {\n this.hideElementDueToOverflow();\n }\n else if (handled && !this.isVisible) {\n this.showElementHiddenDueToOverflow();\n }\n }\n };\n // Marked private to emulate internal access\n CardElement.prototype.resetOverflow = function () {\n var sizeChanged = false;\n if (this._truncatedDueToOverflow) {\n this.undoOverflowTruncation();\n this._truncatedDueToOverflow = false;\n sizeChanged = true;\n }\n if (this.isHiddenDueToOverflow()) {\n this.showElementHiddenDueToOverflow();\n }\n return sizeChanged;\n };\n CardElement.prototype.getDefaultSerializationContext = function () {\n return new SerializationContext();\n };\n CardElement.prototype.createPlaceholderElement = function () {\n var styleDefinition = this.getEffectiveStyleDefinition();\n var foregroundCssColor = Utils.stringToCssColor(styleDefinition.foregroundColors.default.subtle);\n var element = document.createElement(\"div\");\n element.style.border = \"1px dashed \" + foregroundCssColor;\n element.style.padding = \"4px\";\n element.style.minHeight = \"32px\";\n element.style.fontSize = \"10px\";\n element.style.color = foregroundCssColor;\n element.innerText = \"Empty \" + this.getJsonTypeName();\n return element;\n };\n CardElement.prototype.adjustRenderedElementSize = function (renderedElement) {\n if (this.height === \"auto\") {\n renderedElement.style.flex = \"0 0 auto\";\n }\n else {\n renderedElement.style.flex = \"1 1 auto\";\n }\n };\n CardElement.prototype.isDisplayed = function () {\n return this._renderedElement !== undefined && this.isVisible && this._renderedElement.offsetHeight > 0;\n };\n CardElement.prototype.overrideInternalRender = function () {\n return this.internalRender();\n };\n CardElement.prototype.applyPadding = function () {\n if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) {\n if (shared_1.GlobalSettings.alwaysBleedSeparators && !this.isBleeding()) {\n var padding = new shared_1.PaddingDefinition();\n this.getImmediateSurroundingPadding(padding);\n var physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(padding);\n this.separatorElement.style.marginLeft = \"-\" + physicalPadding.left + \"px\";\n this.separatorElement.style.marginRight = \"-\" + physicalPadding.right + \"px\";\n }\n else {\n this.separatorElement.style.marginRight = \"0\";\n this.separatorElement.style.marginLeft = \"0\";\n }\n }\n };\n /*\n * Called when this element overflows the bottom of the card.\n * maxHeight will be the amount of space still available on the card (0 if\n * the element is fully off the card).\n */\n CardElement.prototype.truncateOverflow = function (maxHeight) {\n // Child implementations should return true if the element handled\n // the truncation request such that its content fits within maxHeight,\n // false if the element should fall back to being hidden\n return false;\n };\n /*\n * This should reverse any changes performed in truncateOverflow().\n */\n CardElement.prototype.undoOverflowTruncation = function () { };\n CardElement.prototype.getDefaultPadding = function () {\n return new shared_1.PaddingDefinition();\n };\n CardElement.prototype.getHasBackground = function () {\n return false;\n };\n CardElement.prototype.getHasBorder = function () {\n return false;\n };\n CardElement.prototype.getPadding = function () {\n return this._padding;\n };\n CardElement.prototype.setPadding = function (value) {\n this._padding = value;\n };\n CardElement.prototype.shouldSerialize = function (context) {\n return context.elementRegistry.findByName(this.getJsonTypeName()) !== undefined;\n };\n Object.defineProperty(CardElement.prototype, \"useDefaultSizing\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"separatorOrientation\", {\n get: function () {\n return Enums.Orientation.Horizontal;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"defaultStyle\", {\n get: function () {\n return Enums.ContainerStyle.Default;\n },\n enumerable: false,\n configurable: true\n });\n CardElement.prototype.parse = function (source, context) {\n _super.prototype.parse.call(this, source, context ? context : new SerializationContext());\n };\n CardElement.prototype.asString = function () {\n return \"\";\n };\n CardElement.prototype.isBleeding = function () {\n return false;\n };\n CardElement.prototype.getEffectiveStyle = function () {\n if (this.parent) {\n return this.parent.getEffectiveStyle();\n }\n return this.defaultStyle;\n };\n CardElement.prototype.getEffectiveStyleDefinition = function () {\n return this.hostConfig.containerStyles.getStyleByName(this.getEffectiveStyle());\n };\n CardElement.prototype.getEffectiveTextStyleDefinition = function () {\n if (this.parent) {\n return this.parent.getEffectiveTextStyleDefinition();\n }\n return this.hostConfig.textStyles.default;\n };\n CardElement.prototype.getForbiddenActionTypes = function () {\n return [];\n };\n CardElement.prototype.getImmediateSurroundingPadding = function (result, processTop, processRight, processBottom, processLeft) {\n if (processTop === void 0) { processTop = true; }\n if (processRight === void 0) { processRight = true; }\n if (processBottom === void 0) { processBottom = true; }\n if (processLeft === void 0) { processLeft = true; }\n if (this.parent) {\n var doProcessTop = processTop && this.parent.isTopElement(this);\n var doProcessRight = processRight && this.parent.isRightMostElement(this);\n var doProcessBottom = processBottom && this.parent.isBottomElement(this);\n var doProcessLeft = processLeft && this.parent.isLeftMostElement(this);\n var effectivePadding = this.parent.getEffectivePadding();\n if (effectivePadding) {\n if (doProcessTop && effectivePadding.top != Enums.Spacing.None) {\n result.top = effectivePadding.top;\n doProcessTop = false;\n }\n if (doProcessRight && effectivePadding.right != Enums.Spacing.None) {\n result.right = effectivePadding.right;\n doProcessRight = false;\n }\n if (doProcessBottom && effectivePadding.bottom != Enums.Spacing.None) {\n result.bottom = effectivePadding.bottom;\n doProcessBottom = false;\n }\n if (doProcessLeft && effectivePadding.left != Enums.Spacing.None) {\n result.left = effectivePadding.left;\n doProcessLeft = false;\n }\n }\n if (doProcessTop || doProcessRight || doProcessBottom || doProcessLeft) {\n this.parent.getImmediateSurroundingPadding(result, doProcessTop, doProcessRight, doProcessBottom, doProcessLeft);\n }\n }\n };\n CardElement.prototype.getActionCount = function () {\n return 0;\n };\n CardElement.prototype.getActionAt = function (index) {\n throw new Error(strings_1.Strings.errors.indexOutOfRange(index));\n };\n CardElement.prototype.indexOfAction = function (action) {\n for (var i = 0; i < this.getActionCount(); i++) {\n if (this.getActionAt(i) === action) {\n return i;\n }\n }\n return -1;\n };\n CardElement.prototype.remove = function () {\n if (this.parent && this.parent instanceof CardElementContainer) {\n return this.parent.removeItem(this);\n }\n return false;\n };\n CardElement.prototype.render = function () {\n this._renderedElement = this.overrideInternalRender();\n this._separatorElement = this.internalRenderSeparator();\n if (this._renderedElement) {\n if (this.id) {\n this._renderedElement.id = this.id;\n }\n if (this.customCssSelector) {\n this._renderedElement.classList.add(this.customCssSelector);\n }\n this._renderedElement.style.boxSizing = \"border-box\";\n this._defaultRenderedElementDisplayMode = this._renderedElement.style.display ? this._renderedElement.style.display : undefined;\n this.adjustRenderedElementSize(this._renderedElement);\n this.updateLayout(false);\n }\n else if (this.isDesignMode()) {\n this._renderedElement = this.createPlaceholderElement();\n }\n return this._renderedElement;\n };\n CardElement.prototype.updateLayout = function (processChildren) {\n if (processChildren === void 0) { processChildren = true; }\n this.updateRenderedElementVisibility();\n this.applyPadding();\n };\n CardElement.prototype.indexOf = function (cardElement) {\n return -1;\n };\n CardElement.prototype.isDesignMode = function () {\n var rootElement = this.getRootElement();\n return rootElement instanceof AdaptiveCard && rootElement.designMode;\n };\n CardElement.prototype.isFirstElement = function (element) {\n return true;\n };\n CardElement.prototype.isLastElement = function (element) {\n return true;\n };\n CardElement.prototype.isAtTheVeryLeft = function () {\n return this.parent ? this.parent.isLeftMostElement(this) && this.parent.isAtTheVeryLeft() : true;\n };\n CardElement.prototype.isAtTheVeryRight = function () {\n return this.parent ? this.parent.isRightMostElement(this) && this.parent.isAtTheVeryRight() : true;\n };\n CardElement.prototype.isAtTheVeryTop = function () {\n return this.parent ? this.parent.isFirstElement(this) && this.parent.isAtTheVeryTop() : true;\n };\n CardElement.prototype.isAtTheVeryBottom = function () {\n return this.parent ? this.parent.isLastElement(this) && this.parent.isAtTheVeryBottom() : true;\n };\n CardElement.prototype.isBleedingAtTop = function () {\n return false;\n };\n CardElement.prototype.isBleedingAtBottom = function () {\n return false;\n };\n CardElement.prototype.isLeftMostElement = function (element) {\n return true;\n };\n CardElement.prototype.isRightMostElement = function (element) {\n return true;\n };\n CardElement.prototype.isTopElement = function (element) {\n return this.isFirstElement(element);\n };\n CardElement.prototype.isBottomElement = function (element) {\n return this.isLastElement(element);\n };\n CardElement.prototype.isHiddenDueToOverflow = function () {\n return this._renderedElement !== undefined && this._renderedElement.style.visibility == 'hidden';\n };\n CardElement.prototype.getRootElement = function () {\n return this.getRootObject();\n };\n CardElement.prototype.getParentContainer = function () {\n var currentElement = this.parent;\n while (currentElement) {\n if (currentElement instanceof Container) {\n return currentElement;\n }\n currentElement = currentElement.parent;\n }\n return undefined;\n };\n CardElement.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n return [];\n };\n CardElement.prototype.getResourceInformation = function () {\n return [];\n };\n CardElement.prototype.getElementById = function (id) {\n return this.id === id ? this : undefined;\n };\n CardElement.prototype.getActionById = function (id) {\n return undefined;\n };\n CardElement.prototype.getEffectivePadding = function () {\n var padding = this.getPadding();\n return padding ? padding : this.getDefaultPadding();\n };\n CardElement.prototype.getEffectiveHorizontalAlignment = function () {\n if (this.horizontalAlignment !== undefined) {\n return this.horizontalAlignment;\n }\n if (this.parent) {\n return this.parent.getEffectiveHorizontalAlignment();\n }\n return Enums.HorizontalAlignment.Left;\n };\n Object.defineProperty(CardElement.prototype, \"hostConfig\", {\n get: function () {\n if (this._hostConfig) {\n return this._hostConfig;\n }\n else {\n if (this.parent) {\n return this.parent.hostConfig;\n }\n else {\n return host_config_1.defaultHostConfig;\n }\n }\n },\n set: function (value) {\n this._hostConfig = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"index\", {\n get: function () {\n if (this.parent) {\n return this.parent.indexOf(this);\n }\n else {\n return 0;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"isInteractive\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"isStandalone\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"isInline\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"hasVisibleSeparator\", {\n get: function () {\n if (this.parent && this.separatorElement) {\n return !this.parent.isFirstElement(this) && (this.isVisible || this.isDesignMode());\n }\n else {\n return false;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"separatorElement\", {\n get: function () {\n return this._separatorElement;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: false,\n configurable: true\n });\n CardElement.langProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"lang\", true, /^[a-z]{2,3}$/ig);\n CardElement.isVisibleProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"isVisible\", true);\n CardElement.separatorProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"separator\", false);\n CardElement.heightProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_1, \"height\", [\n { value: \"auto\" },\n { value: \"stretch\" }\n ], \"auto\");\n CardElement.horizontalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"horizontalAlignment\", Enums.HorizontalAlignment);\n CardElement.spacingProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"spacing\", Enums.Spacing, Enums.Spacing.Default);\n __decorate([\n serialization_1.property(CardElement.horizontalAlignmentProperty)\n ], CardElement.prototype, \"horizontalAlignment\", void 0);\n __decorate([\n serialization_1.property(CardElement.spacingProperty)\n ], CardElement.prototype, \"spacing\", void 0);\n __decorate([\n serialization_1.property(CardElement.separatorProperty)\n ], CardElement.prototype, \"separator\", void 0);\n __decorate([\n serialization_1.property(CardElement.heightProperty)\n ], CardElement.prototype, \"height\", void 0);\n __decorate([\n serialization_1.property(CardElement.langProperty)\n ], CardElement.prototype, \"lang\", null);\n __decorate([\n serialization_1.property(CardElement.isVisibleProperty)\n ], CardElement.prototype, \"isVisible\", null);\n return CardElement;\n}(card_object_1.CardObject));\nexports.CardElement = CardElement;\nvar ActionProperty = /** @class */ (function (_super) {\n __extends(ActionProperty, _super);\n function ActionProperty(targetVersion, name, forbiddenActionTypes) {\n if (forbiddenActionTypes === void 0) { forbiddenActionTypes = []; }\n var _this = _super.call(this, targetVersion, name, undefined) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.forbiddenActionTypes = forbiddenActionTypes;\n return _this;\n }\n ActionProperty.prototype.parse = function (sender, source, context) {\n var parent = sender;\n return context.parseAction(parent, source[this.name], this.forbiddenActionTypes, parent.isDesignMode());\n };\n ActionProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeValue(target, this.name, value ? value.toJSON(context) : undefined, undefined, true);\n };\n return ActionProperty;\n}(serialization_1.PropertyDefinition));\nexports.ActionProperty = ActionProperty;\nvar BaseTextBlock = /** @class */ (function (_super) {\n __extends(BaseTextBlock, _super);\n function BaseTextBlock(text) {\n var _this = _super.call(this) || this;\n _this.ariaHidden = false;\n if (text) {\n _this.text = text;\n }\n return _this;\n }\n BaseTextBlock.prototype.populateSchema = function (schema) {\n _super.prototype.populateSchema.call(this, schema);\n // selectAction is declared on BaseTextBlock but is only exposed on TextRun,\n // so the property is removed from the BaseTextBlock schema.\n schema.remove(BaseTextBlock.selectActionProperty);\n };\n Object.defineProperty(BaseTextBlock.prototype, \"text\", {\n get: function () {\n return this.getValue(BaseTextBlock.textProperty);\n },\n set: function (value) {\n this.setText(value);\n },\n enumerable: false,\n configurable: true\n });\n //#endregion\n BaseTextBlock.prototype.getFontSize = function (fontType) {\n switch (this.effectiveSize) {\n case Enums.TextSize.Small:\n return fontType.fontSizes.small;\n case Enums.TextSize.Medium:\n return fontType.fontSizes.medium;\n case Enums.TextSize.Large:\n return fontType.fontSizes.large;\n case Enums.TextSize.ExtraLarge:\n return fontType.fontSizes.extraLarge;\n default:\n return fontType.fontSizes.default;\n }\n };\n BaseTextBlock.prototype.getColorDefinition = function (colorSet, color) {\n switch (color) {\n case Enums.TextColor.Accent:\n return colorSet.accent;\n case Enums.TextColor.Dark:\n return colorSet.dark;\n case Enums.TextColor.Light:\n return colorSet.light;\n case Enums.TextColor.Good:\n return colorSet.good;\n case Enums.TextColor.Warning:\n return colorSet.warning;\n case Enums.TextColor.Attention:\n return colorSet.attention;\n default:\n return colorSet.default;\n }\n };\n BaseTextBlock.prototype.setText = function (value) {\n this.setValue(BaseTextBlock.textProperty, value);\n };\n BaseTextBlock.prototype.init = function (textDefinition) {\n this.size = textDefinition.size;\n this.weight = textDefinition.weight;\n this.color = textDefinition.color;\n this.isSubtle = textDefinition.isSubtle;\n };\n BaseTextBlock.prototype.asString = function () {\n return this.text;\n };\n BaseTextBlock.prototype.applyStylesTo = function (targetElement) {\n var fontType = this.hostConfig.getFontTypeDefinition(this.effectiveFontType);\n if (fontType.fontFamily) {\n targetElement.style.fontFamily = fontType.fontFamily;\n }\n var fontSize;\n switch (this.effectiveSize) {\n case Enums.TextSize.Small:\n fontSize = fontType.fontSizes.small;\n break;\n case Enums.TextSize.Medium:\n fontSize = fontType.fontSizes.medium;\n break;\n case Enums.TextSize.Large:\n fontSize = fontType.fontSizes.large;\n break;\n case Enums.TextSize.ExtraLarge:\n fontSize = fontType.fontSizes.extraLarge;\n break;\n default:\n fontSize = fontType.fontSizes.default;\n break;\n }\n targetElement.style.fontSize = fontSize + \"px\";\n var colorDefinition = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor);\n targetElement.style.color = Utils.stringToCssColor(this.effectiveIsSubtle ? colorDefinition.subtle : colorDefinition.default);\n var fontWeight;\n switch (this.effectiveWeight) {\n case Enums.TextWeight.Lighter:\n fontWeight = fontType.fontWeights.lighter;\n break;\n case Enums.TextWeight.Bolder:\n fontWeight = fontType.fontWeights.bolder;\n break;\n default:\n fontWeight = fontType.fontWeights.default;\n break;\n }\n targetElement.style.fontWeight = fontWeight.toString();\n if (this.ariaHidden) {\n targetElement.setAttribute(\"aria-hidden\", \"true\");\n }\n };\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveColor\", {\n get: function () {\n return this.color !== undefined ? this.color : this.getEffectiveTextStyleDefinition().color;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveFontType\", {\n get: function () {\n return this.fontType !== undefined ? this.fontType : this.getEffectiveTextStyleDefinition().fontType;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveIsSubtle\", {\n get: function () {\n return this.isSubtle !== undefined ? this.isSubtle : this.getEffectiveTextStyleDefinition().isSubtle;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveSize\", {\n get: function () {\n return this.size !== undefined ? this.size : this.getEffectiveTextStyleDefinition().size;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveWeight\", {\n get: function () {\n return this.weight !== undefined ? this.weight : this.getEffectiveTextStyleDefinition().weight;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n BaseTextBlock.textProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"text\", true);\n BaseTextBlock.sizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"size\", Enums.TextSize);\n BaseTextBlock.weightProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"weight\", Enums.TextWeight);\n BaseTextBlock.colorProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"color\", Enums.TextColor);\n BaseTextBlock.isSubtleProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"isSubtle\");\n BaseTextBlock.fontTypeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"fontType\", Enums.FontType);\n BaseTextBlock.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, \"selectAction\", [\"Action.ShowCard\"]);\n __decorate([\n serialization_1.property(BaseTextBlock.sizeProperty)\n ], BaseTextBlock.prototype, \"size\", void 0);\n __decorate([\n serialization_1.property(BaseTextBlock.weightProperty)\n ], BaseTextBlock.prototype, \"weight\", void 0);\n __decorate([\n serialization_1.property(BaseTextBlock.colorProperty)\n ], BaseTextBlock.prototype, \"color\", void 0);\n __decorate([\n serialization_1.property(BaseTextBlock.fontTypeProperty)\n ], BaseTextBlock.prototype, \"fontType\", void 0);\n __decorate([\n serialization_1.property(BaseTextBlock.isSubtleProperty)\n ], BaseTextBlock.prototype, \"isSubtle\", void 0);\n __decorate([\n serialization_1.property(BaseTextBlock.textProperty)\n ], BaseTextBlock.prototype, \"text\", null);\n __decorate([\n serialization_1.property(BaseTextBlock.selectActionProperty)\n ], BaseTextBlock.prototype, \"selectAction\", void 0);\n return BaseTextBlock;\n}(CardElement));\nexports.BaseTextBlock = BaseTextBlock;\nvar TextBlock = /** @class */ (function (_super) {\n __extends(TextBlock, _super);\n function TextBlock() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.wrap = false;\n _this._treatAsPlainText = true;\n _this.useMarkdown = true;\n return _this;\n }\n TextBlock.prototype.restoreOriginalContent = function () {\n if (this.renderedElement !== undefined) {\n if (this.maxLines && this.maxLines > 0) {\n this.renderedElement.style.maxHeight = this._computedLineHeight * this.maxLines + \"px\";\n }\n this.renderedElement.innerHTML = this._originalInnerHtml;\n }\n };\n TextBlock.prototype.truncateIfSupported = function (maxHeight) {\n if (this.renderedElement !== undefined) {\n // For now, only truncate TextBlocks that contain just a single\n // paragraph -- since the maxLines calculation doesn't take into\n // account Markdown lists\n var children = this.renderedElement.children;\n var isTextOnly = !children.length;\n var truncationSupported = isTextOnly || children.length == 1 && children[0].tagName.toLowerCase() == 'p';\n if (truncationSupported) {\n var element = isTextOnly ? this.renderedElement : children[0];\n Utils.truncate(element, maxHeight, this._computedLineHeight);\n return true;\n }\n }\n return false;\n };\n TextBlock.prototype.setText = function (value) {\n _super.prototype.setText.call(this, value);\n this._processedText = undefined;\n };\n TextBlock.prototype.internalRender = function () {\n var _this = this;\n this._processedText = undefined;\n if (this.text) {\n var preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);\n var hostConfig = this.hostConfig;\n var element = void 0;\n if (this.forElementId) {\n var labelElement = document.createElement(\"label\");\n labelElement.htmlFor = this.forElementId;\n element = labelElement;\n }\n else {\n element = document.createElement(\"div\");\n }\n element.classList.add(hostConfig.makeCssClassName(\"ac-textBlock\"));\n element.style.overflow = \"hidden\";\n this.applyStylesTo(element);\n if (this.style === \"heading\") {\n element.setAttribute(\"role\", \"heading\");\n var headingLevel = this.hostConfig.textBlock.headingLevel;\n if (headingLevel !== undefined && headingLevel > 0) {\n element.setAttribute(\"aria-level\", headingLevel.toString());\n }\n }\n if (this.selectAction && hostConfig.supportsInteractivity) {\n element.onclick = function (e) {\n if (_this.selectAction && _this.selectAction.isEnabled) {\n e.preventDefault();\n e.cancelBubble = true;\n _this.selectAction.execute();\n }\n };\n this.selectAction.setupElementForAccessibility(element);\n if (this.selectAction.isEnabled) {\n element.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\n }\n }\n if (!this._processedText) {\n this._treatAsPlainText = true;\n var formattedText = TextFormatters.formatText(this.lang, preProcessedText);\n if (this.useMarkdown && formattedText) {\n if (shared_1.GlobalSettings.allowMarkForTextHighlighting) {\n formattedText = formattedText.replace(//g, \"===\").replace(/<\\/mark>/g, \"/==/\");\n }\n var markdownProcessingResult = AdaptiveCard.applyMarkdown(formattedText);\n if (markdownProcessingResult.didProcess && markdownProcessingResult.outputHtml) {\n this._processedText = markdownProcessingResult.outputHtml;\n this._treatAsPlainText = false;\n // Only process tag if markdown processing was applied because\n // markdown processing is also responsible for sanitizing the input string\n if (shared_1.GlobalSettings.allowMarkForTextHighlighting && this._processedText) {\n var markStyle = \"\";\n var effectiveStyle = this.getEffectiveStyleDefinition();\n if (effectiveStyle.highlightBackgroundColor) {\n markStyle += \"background-color: \" + effectiveStyle.highlightBackgroundColor + \";\";\n }\n if (effectiveStyle.highlightForegroundColor) {\n markStyle += \"color: \" + effectiveStyle.highlightForegroundColor + \";\";\n }\n if (markStyle) {\n markStyle = 'style=\"' + markStyle + '\"';\n }\n this._processedText = this._processedText.replace(/===/g, \"\").replace(/\\/==\\//g, \"\");\n }\n }\n else {\n this._processedText = formattedText;\n this._treatAsPlainText = true;\n }\n }\n else {\n this._processedText = formattedText;\n this._treatAsPlainText = true;\n }\n }\n if (!this._processedText) {\n this._processedText = \"\";\n }\n if (this._treatAsPlainText) {\n element.innerText = this._processedText;\n }\n else {\n element.innerHTML = this._processedText;\n }\n if (element.firstElementChild instanceof HTMLElement) {\n var firstElementChild = element.firstElementChild;\n firstElementChild.style.marginTop = \"0px\";\n firstElementChild.style.width = \"100%\";\n if (!this.wrap) {\n firstElementChild.style.overflow = \"hidden\";\n firstElementChild.style.textOverflow = \"ellipsis\";\n }\n }\n if (element.lastElementChild instanceof HTMLElement) {\n element.lastElementChild.style.marginBottom = \"0px\";\n }\n var anchors = element.getElementsByTagName(\"a\");\n for (var i = 0; i < anchors.length; i++) {\n var anchor = anchors[i];\n anchor.classList.add(hostConfig.makeCssClassName(\"ac-anchor\"));\n anchor.target = \"_blank\";\n anchor.onclick = function (e) {\n if (raiseAnchorClickedEvent(_this, e.target, e)) {\n e.preventDefault();\n e.cancelBubble = true;\n }\n };\n anchor.oncontextmenu = function (e) {\n if (raiseAnchorClickedEvent(_this, e.target, e)) {\n e.preventDefault();\n e.cancelBubble = true;\n return false;\n }\n return true;\n };\n }\n if (this.wrap) {\n element.style.wordWrap = \"break-word\";\n if (this.maxLines && this.maxLines > 0) {\n element.style.overflow = \"hidden\";\n if (Utils.isInternetExplorer() || !shared_1.GlobalSettings.useWebkitLineClamp) {\n element.style.maxHeight = (this._computedLineHeight * this.maxLines) + \"px\";\n }\n else {\n // While non standard, --webkit-line-clamp works in every browser (except IE)\n // and is a great solution to support the maxLines feature with ellipsis\n // truncation. With --webkit-line-clamp there is need to use explicit line heights\n element.style.removeProperty(\"line-height\");\n element.style.display = \"-webkit-box\";\n element.style.webkitBoxOrient = \"vertical\";\n element.style.webkitLineClamp = this.maxLines.toString();\n }\n }\n }\n else {\n element.style.whiteSpace = \"nowrap\";\n element.style.textOverflow = \"ellipsis\";\n }\n if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation || shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\n this._originalInnerHtml = element.innerHTML;\n }\n return element;\n }\n else {\n return undefined;\n }\n };\n TextBlock.prototype.truncateOverflow = function (maxHeight) {\n if (maxHeight >= this._computedLineHeight) {\n return this.truncateIfSupported(maxHeight);\n }\n return false;\n };\n TextBlock.prototype.undoOverflowTruncation = function () {\n this.restoreOriginalContent();\n if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines) {\n var maxHeight = this._computedLineHeight * this.maxLines;\n this.truncateIfSupported(maxHeight);\n }\n };\n TextBlock.prototype.applyStylesTo = function (targetElement) {\n _super.prototype.applyStylesTo.call(this, targetElement);\n switch (this.getEffectiveHorizontalAlignment()) {\n case Enums.HorizontalAlignment.Center:\n targetElement.style.textAlign = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n targetElement.style.textAlign = \"end\";\n break;\n default:\n targetElement.style.textAlign = \"start\";\n break;\n }\n var lineHeights = this.hostConfig.lineHeights;\n if (lineHeights) {\n switch (this.effectiveSize) {\n case Enums.TextSize.Small:\n this._computedLineHeight = lineHeights.small;\n break;\n case Enums.TextSize.Medium:\n this._computedLineHeight = lineHeights.medium;\n break;\n case Enums.TextSize.Large:\n this._computedLineHeight = lineHeights.large;\n break;\n case Enums.TextSize.ExtraLarge:\n this._computedLineHeight = lineHeights.extraLarge;\n break;\n default:\n this._computedLineHeight = lineHeights.default;\n break;\n }\n }\n else {\n // Looks like 1.33 is the magic number to compute line-height\n // from font size.\n this._computedLineHeight = this.getFontSize(this.hostConfig.getFontTypeDefinition(this.effectiveFontType)) * 1.33;\n }\n targetElement.style.lineHeight = this._computedLineHeight + \"px\";\n };\n TextBlock.prototype.getJsonTypeName = function () {\n return \"TextBlock\";\n };\n TextBlock.prototype.getEffectiveTextStyleDefinition = function () {\n if (this.style) {\n return this.hostConfig.textStyles.getStyleByName(this.style);\n }\n return _super.prototype.getEffectiveTextStyleDefinition.call(this);\n };\n TextBlock.prototype.updateLayout = function (processChildren) {\n if (processChildren === void 0) { processChildren = false; }\n _super.prototype.updateLayout.call(this, processChildren);\n if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines && this.isDisplayed()) {\n // Reset the element's innerHTML in case the available room for\n // content has increased\n this.restoreOriginalContent();\n this.truncateIfSupported(this._computedLineHeight * this.maxLines);\n }\n };\n TextBlock.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"wrap\", false);\n TextBlock.maxLinesProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"maxLines\");\n TextBlock.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_5, \"style\", [\n { value: \"default\" },\n { value: \"columnHeader\" },\n { value: \"heading\" }\n ]);\n __decorate([\n serialization_1.property(TextBlock.wrapProperty)\n ], TextBlock.prototype, \"wrap\", void 0);\n __decorate([\n serialization_1.property(TextBlock.maxLinesProperty)\n ], TextBlock.prototype, \"maxLines\", void 0);\n __decorate([\n serialization_1.property(TextBlock.styleProperty)\n ], TextBlock.prototype, \"style\", void 0);\n return TextBlock;\n}(BaseTextBlock));\nexports.TextBlock = TextBlock;\nvar TextRun = /** @class */ (function (_super) {\n __extends(TextRun, _super);\n function TextRun() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.italic = false;\n _this.strikethrough = false;\n _this.highlight = false;\n _this.underline = false;\n return _this;\n }\n TextRun.prototype.populateSchema = function (schema) {\n _super.prototype.populateSchema.call(this, schema);\n schema.add(BaseTextBlock.selectActionProperty);\n };\n //#endregion\n TextRun.prototype.internalRender = function () {\n var _this = this;\n if (this.text) {\n var preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);\n var hostConfig = this.hostConfig;\n var formattedText = TextFormatters.formatText(this.lang, preProcessedText);\n if (!formattedText) {\n formattedText = \"\";\n }\n var element = document.createElement(\"span\");\n element.classList.add(hostConfig.makeCssClassName(\"ac-textRun\"));\n this.applyStylesTo(element);\n if (this.selectAction && hostConfig.supportsInteractivity) {\n var anchor = document.createElement(\"a\");\n anchor.classList.add(hostConfig.makeCssClassName(\"ac-anchor\"));\n var href = this.selectAction.getHref();\n anchor.href = href ? href : \"\";\n anchor.target = \"_blank\";\n anchor.onclick = function (e) {\n if (_this.selectAction && _this.selectAction.isEnabled) {\n e.preventDefault();\n e.cancelBubble = true;\n _this.selectAction.execute();\n }\n };\n this.selectAction.setupElementForAccessibility(anchor);\n anchor.innerText = formattedText;\n element.appendChild(anchor);\n }\n else {\n element.innerText = formattedText;\n }\n return element;\n }\n else {\n return undefined;\n }\n };\n TextRun.prototype.applyStylesTo = function (targetElement) {\n _super.prototype.applyStylesTo.call(this, targetElement);\n if (this.italic) {\n targetElement.style.fontStyle = \"italic\";\n }\n if (this.strikethrough) {\n targetElement.style.textDecoration = \"line-through\";\n }\n if (this.highlight) {\n var colorDefinition = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor);\n targetElement.style.backgroundColor = Utils.stringToCssColor(this.effectiveIsSubtle ? colorDefinition.highlightColors.subtle : colorDefinition.highlightColors.default);\n }\n if (this.underline) {\n targetElement.style.textDecoration = \"underline\";\n }\n };\n TextRun.prototype.getJsonTypeName = function () {\n return \"TextRun\";\n };\n Object.defineProperty(TextRun.prototype, \"isStandalone\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TextRun.prototype, \"isInline\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n TextRun.italicProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"italic\", false);\n TextRun.strikethroughProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"strikethrough\", false);\n TextRun.highlightProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"highlight\", false);\n TextRun.underlineProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, \"underline\", false);\n __decorate([\n serialization_1.property(TextRun.italicProperty)\n ], TextRun.prototype, \"italic\", void 0);\n __decorate([\n serialization_1.property(TextRun.strikethroughProperty)\n ], TextRun.prototype, \"strikethrough\", void 0);\n __decorate([\n serialization_1.property(TextRun.highlightProperty)\n ], TextRun.prototype, \"highlight\", void 0);\n __decorate([\n serialization_1.property(TextRun.underlineProperty)\n ], TextRun.prototype, \"underline\", void 0);\n return TextRun;\n}(BaseTextBlock));\nexports.TextRun = TextRun;\nvar RichTextBlock = /** @class */ (function (_super) {\n __extends(RichTextBlock, _super);\n function RichTextBlock() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._inlines = [];\n return _this;\n }\n RichTextBlock.prototype.internalAddInline = function (inline, forceAdd) {\n if (forceAdd === void 0) { forceAdd = false; }\n if (!inline.isInline) {\n throw new Error(strings_1.Strings.errors.elementCannotBeUsedAsInline());\n }\n var doAdd = inline.parent === undefined || forceAdd;\n if (!doAdd && inline.parent != this) {\n throw new Error(strings_1.Strings.errors.inlineAlreadyParented());\n }\n else {\n inline.setParent(this);\n this._inlines.push(inline);\n }\n };\n RichTextBlock.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this._inlines = [];\n if (Array.isArray(source[\"inlines\"])) {\n for (var _i = 0, _a = source[\"inlines\"]; _i < _a.length; _i++) {\n var jsonInline = _a[_i];\n var inline = void 0;\n if (typeof jsonInline === \"string\") {\n var textRun = new TextRun();\n textRun.text = jsonInline;\n inline = textRun;\n }\n else {\n // No fallback for inlines in 1.2\n inline = context.parseElement(this, jsonInline, false);\n }\n if (inline) {\n this.internalAddInline(inline, true);\n }\n }\n }\n };\n RichTextBlock.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n if (this._inlines.length > 0) {\n var jsonInlines = [];\n for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {\n var inline = _a[_i];\n jsonInlines.push(inline.toJSON(context));\n }\n context.serializeValue(target, \"inlines\", jsonInlines);\n }\n };\n RichTextBlock.prototype.internalRender = function () {\n if (this._inlines.length > 0) {\n var element = void 0;\n if (this.forElementId) {\n var labelElement = document.createElement(\"label\");\n labelElement.htmlFor = this.forElementId;\n element = labelElement;\n }\n else {\n element = document.createElement(\"div\");\n }\n element.className = this.hostConfig.makeCssClassName(\"ac-richTextBlock\");\n switch (this.getEffectiveHorizontalAlignment()) {\n case Enums.HorizontalAlignment.Center:\n element.style.textAlign = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n element.style.textAlign = \"end\";\n break;\n default:\n element.style.textAlign = \"start\";\n break;\n }\n var renderedInlines = 0;\n for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {\n var inline = _a[_i];\n var renderedInline = inline.render();\n if (renderedInline) {\n element.appendChild(renderedInline);\n renderedInlines++;\n }\n }\n if (renderedInlines > 0) {\n return element;\n }\n }\n return undefined;\n };\n RichTextBlock.prototype.asString = function () {\n var result = \"\";\n for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {\n var inline = _a[_i];\n result += inline.asString();\n }\n return result;\n };\n RichTextBlock.prototype.getJsonTypeName = function () {\n return \"RichTextBlock\";\n };\n RichTextBlock.prototype.getInlineCount = function () {\n return this._inlines.length;\n };\n RichTextBlock.prototype.getInlineAt = function (index) {\n if (index >= 0 && index < this._inlines.length) {\n return this._inlines[index];\n }\n else {\n throw new Error(strings_1.Strings.errors.indexOutOfRange(index));\n }\n };\n RichTextBlock.prototype.addInline = function (inline) {\n if (typeof inline === \"string\") {\n this.internalAddInline(new TextRun(inline));\n }\n else {\n this.internalAddInline(inline);\n }\n };\n RichTextBlock.prototype.removeInline = function (inline) {\n var index = this._inlines.indexOf(inline);\n if (index >= 0) {\n this._inlines[index].setParent(undefined);\n this._inlines.splice(index, 1);\n return true;\n }\n return false;\n };\n return RichTextBlock;\n}(CardElement));\nexports.RichTextBlock = RichTextBlock;\nvar Fact = /** @class */ (function (_super) {\n __extends(Fact, _super);\n function Fact(name, value) {\n var _this = _super.call(this) || this;\n _this.name = name;\n _this.value = value;\n return _this;\n }\n //#endregion\n Fact.prototype.getSchemaKey = function () {\n return \"Fact\";\n };\n //#region Schema\n Fact.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\n Fact.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\n __decorate([\n serialization_1.property(Fact.titleProperty)\n ], Fact.prototype, \"name\", void 0);\n __decorate([\n serialization_1.property(Fact.valueProperty)\n ], Fact.prototype, \"value\", void 0);\n return Fact;\n}(serialization_1.SerializableObject));\nexports.Fact = Fact;\nvar FactSet = /** @class */ (function (_super) {\n __extends(FactSet, _super);\n function FactSet() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(FactSet.prototype, \"useDefaultSizing\", {\n //#endregion\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n FactSet.prototype.internalRender = function () {\n var element = undefined;\n var hostConfig = this.hostConfig;\n if (this.facts.length > 0) {\n element = document.createElement(\"table\");\n element.style.borderWidth = \"0px\";\n element.style.borderSpacing = \"0px\";\n element.style.borderStyle = \"none\";\n element.style.borderCollapse = \"collapse\";\n element.style.display = \"block\";\n element.style.overflow = \"hidden\";\n element.classList.add(hostConfig.makeCssClassName(\"ac-factset\"));\n element.setAttribute(\"role\", \"presentation\");\n for (var i = 0; i < this.facts.length; i++) {\n var trElement = document.createElement(\"tr\");\n if (i > 0) {\n trElement.style.marginTop = hostConfig.factSet.spacing + \"px\";\n }\n // Title column\n var tdElement = document.createElement(\"td\");\n tdElement.style.padding = \"0\";\n tdElement.classList.add(hostConfig.makeCssClassName(\"ac-fact-title\"));\n if (hostConfig.factSet.title.maxWidth) {\n tdElement.style.maxWidth = hostConfig.factSet.title.maxWidth + \"px\";\n }\n tdElement.style.verticalAlign = \"top\";\n var textBlock = new TextBlock();\n textBlock.setParent(this);\n textBlock.text = (!this.facts[i].name && this.isDesignMode()) ? \"Title\" : this.facts[i].name;\n textBlock.size = hostConfig.factSet.title.size;\n textBlock.color = hostConfig.factSet.title.color;\n textBlock.isSubtle = hostConfig.factSet.title.isSubtle;\n textBlock.weight = hostConfig.factSet.title.weight;\n textBlock.wrap = hostConfig.factSet.title.wrap;\n textBlock.spacing = Enums.Spacing.None;\n Utils.appendChild(tdElement, textBlock.render());\n Utils.appendChild(trElement, tdElement);\n // Spacer column\n tdElement = document.createElement(\"td\");\n tdElement.style.width = \"10px\";\n Utils.appendChild(trElement, tdElement);\n // Value column\n tdElement = document.createElement(\"td\");\n tdElement.style.padding = \"0\";\n tdElement.style.verticalAlign = \"top\";\n tdElement.classList.add(hostConfig.makeCssClassName(\"ac-fact-value\"));\n textBlock = new TextBlock();\n textBlock.setParent(this);\n textBlock.text = this.facts[i].value;\n textBlock.size = hostConfig.factSet.value.size;\n textBlock.color = hostConfig.factSet.value.color;\n textBlock.isSubtle = hostConfig.factSet.value.isSubtle;\n textBlock.weight = hostConfig.factSet.value.weight;\n textBlock.wrap = hostConfig.factSet.value.wrap;\n textBlock.spacing = Enums.Spacing.None;\n Utils.appendChild(tdElement, textBlock.render());\n Utils.appendChild(trElement, tdElement);\n Utils.appendChild(element, trElement);\n }\n }\n return element;\n };\n FactSet.prototype.getJsonTypeName = function () {\n return \"FactSet\";\n };\n //#region Schema\n FactSet.factsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"facts\", Fact);\n __decorate([\n serialization_1.property(FactSet.factsProperty)\n ], FactSet.prototype, \"facts\", void 0);\n return FactSet;\n}(CardElement));\nexports.FactSet = FactSet;\nvar ImageDimensionProperty = /** @class */ (function (_super) {\n __extends(ImageDimensionProperty, _super);\n function ImageDimensionProperty(targetVersion, name, internalName, fallbackProperty) {\n var _this = _super.call(this, targetVersion, name) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.internalName = internalName;\n _this.fallbackProperty = fallbackProperty;\n return _this;\n }\n ImageDimensionProperty.prototype.getInternalName = function () {\n return this.internalName;\n };\n ImageDimensionProperty.prototype.parse = function (sender, source, context) {\n var result = undefined;\n var sourceValue = source[this.name];\n if (sourceValue === undefined) {\n return this.defaultValue;\n }\n var isValid = false;\n if (typeof sourceValue === \"string\") {\n try {\n var size = shared_1.SizeAndUnit.parse(sourceValue, true);\n if (size.unit == Enums.SizeUnit.Pixel) {\n result = size.physicalSize;\n isValid = true;\n }\n }\n catch (_a) {\n // Swallow the exception\n }\n // If the source value isn't valid per this property definition,\n // check its validity per the fallback property, if specified\n if (!isValid && this.fallbackProperty) {\n isValid = this.fallbackProperty.isValidValue(sourceValue, context);\n }\n }\n if (!isValid) {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));\n }\n return result;\n };\n ImageDimensionProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeValue(target, this.name, typeof value === \"number\" && !isNaN(value) ? value + \"px\" : undefined);\n };\n return ImageDimensionProperty;\n}(serialization_1.PropertyDefinition));\nvar Image = /** @class */ (function (_super) {\n __extends(Image, _super);\n function Image() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.size = Enums.Size.Auto;\n _this.style = Enums.ImageStyle.Default;\n return _this;\n }\n Image.prototype.populateSchema = function (schema) {\n _super.prototype.populateSchema.call(this, schema);\n schema.remove(CardElement.heightProperty);\n };\n //#endregion\n Image.prototype.applySize = function (element) {\n if (this.pixelWidth || this.pixelHeight) {\n if (this.pixelWidth) {\n element.style.width = this.pixelWidth + \"px\";\n }\n if (this.pixelHeight) {\n element.style.height = this.pixelHeight + \"px\";\n }\n }\n else {\n if (this.maxHeight) {\n // If the image is constrained in height, we set its height property and\n // auto and stretch are ignored (default to medium). THis is necessary for\n // ImageSet which uses a maximum image height as opposed to the cards width\n // as a constraining dimension\n switch (this.size) {\n case Enums.Size.Small:\n element.style.height = this.hostConfig.imageSizes.small + \"px\";\n break;\n case Enums.Size.Large:\n element.style.height = this.hostConfig.imageSizes.large + \"px\";\n break;\n default:\n element.style.height = this.hostConfig.imageSizes.medium + \"px\";\n break;\n }\n element.style.maxHeight = this.maxHeight + \"px\";\n }\n else {\n switch (this.size) {\n case Enums.Size.Stretch:\n element.style.width = \"100%\";\n break;\n case Enums.Size.Auto:\n element.style.maxWidth = \"100%\";\n break;\n case Enums.Size.Small:\n element.style.width = this.hostConfig.imageSizes.small + \"px\";\n break;\n case Enums.Size.Large:\n element.style.width = this.hostConfig.imageSizes.large + \"px\";\n break;\n case Enums.Size.Medium:\n element.style.width = this.hostConfig.imageSizes.medium + \"px\";\n break;\n }\n element.style.maxHeight = \"100%\";\n }\n }\n };\n Object.defineProperty(Image.prototype, \"useDefaultSizing\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Image.prototype.internalRender = function () {\n var _this = this;\n var element = undefined;\n if (this.url) {\n element = document.createElement(\"div\");\n element.style.display = \"flex\";\n element.style.alignItems = \"flex-start\";\n // Cache hostConfig to avoid walking the parent hierarchy multiple times\n var hostConfig = this.hostConfig;\n switch (this.getEffectiveHorizontalAlignment()) {\n case Enums.HorizontalAlignment.Center:\n element.style.justifyContent = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n element.style.justifyContent = \"flex-end\";\n break;\n default:\n element.style.justifyContent = \"flex-start\";\n break;\n }\n var imageElement = document.createElement(\"img\");\n imageElement.onload = function (e) {\n raiseImageLoadedEvent(_this);\n };\n imageElement.onerror = function (e) {\n if (_this.renderedElement) {\n var card = _this.getRootElement();\n _this.renderedElement.innerHTML = \"\";\n if (card && card.designMode) {\n var errorElement = document.createElement(\"div\");\n errorElement.style.display = \"flex\";\n errorElement.style.alignItems = \"center\";\n errorElement.style.justifyContent = \"center\";\n errorElement.style.backgroundColor = \"#EEEEEE\";\n errorElement.style.color = \"black\";\n errorElement.innerText = \":-(\";\n errorElement.style.padding = \"10px\";\n _this.applySize(errorElement);\n _this.renderedElement.appendChild(errorElement);\n }\n }\n raiseImageLoadedEvent(_this);\n };\n imageElement.style.minWidth = \"0\";\n imageElement.classList.add(hostConfig.makeCssClassName(\"ac-image\"));\n if (this.selectAction && hostConfig.supportsInteractivity) {\n imageElement.onkeypress = function (e) {\n if (_this.selectAction && _this.selectAction.isEnabled && (e.code == \"Enter\" || e.code == \"Space\")) { // enter or space pressed\n e.preventDefault();\n e.cancelBubble = true;\n _this.selectAction.execute();\n }\n };\n imageElement.onclick = function (e) {\n if (_this.selectAction && _this.selectAction.isEnabled) {\n e.preventDefault();\n e.cancelBubble = true;\n _this.selectAction.execute();\n }\n };\n this.selectAction.setupElementForAccessibility(imageElement);\n if (this.selectAction.isEnabled) {\n imageElement.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\n }\n }\n this.applySize(imageElement);\n if (this.style === Enums.ImageStyle.Person) {\n imageElement.style.borderRadius = \"50%\";\n imageElement.style.backgroundPosition = \"50% 50%\";\n imageElement.style.backgroundRepeat = \"no-repeat\";\n }\n imageElement.style.backgroundColor = Utils.stringToCssColor(this.backgroundColor);\n imageElement.src = this.preProcessPropertyValue(Image.urlProperty);\n var altTextProperty = this.preProcessPropertyValue(Image.altTextProperty);\n if (altTextProperty) {\n imageElement.alt = altTextProperty;\n }\n element.appendChild(imageElement);\n }\n return element;\n };\n Image.prototype.getJsonTypeName = function () {\n return \"Image\";\n };\n Image.prototype.getActionById = function (id) {\n var result = _super.prototype.getActionById.call(this, id);\n if (!result && this.selectAction) {\n result = this.selectAction.getActionById(id);\n }\n return result;\n };\n Image.prototype.getResourceInformation = function () {\n return this.url ? [{ url: this.url, mimeType: \"image\" }] : [];\n };\n Image.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"url\");\n Image.altTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"altText\");\n Image.backgroundColorProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"backgroundColor\");\n Image.styleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"style\", Enums.ImageStyle, Enums.ImageStyle.Default);\n Image.sizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"size\", Enums.Size, Enums.Size.Auto);\n Image.pixelWidthProperty = new ImageDimensionProperty(serialization_1.Versions.v1_1, \"width\", \"pixelWidth\");\n Image.pixelHeightProperty = new ImageDimensionProperty(serialization_1.Versions.v1_1, \"height\", \"pixelHeight\", CardElement.heightProperty);\n Image.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, \"selectAction\", [\"Action.ShowCard\"]);\n __decorate([\n serialization_1.property(Image.urlProperty)\n ], Image.prototype, \"url\", void 0);\n __decorate([\n serialization_1.property(Image.altTextProperty)\n ], Image.prototype, \"altText\", void 0);\n __decorate([\n serialization_1.property(Image.backgroundColorProperty)\n ], Image.prototype, \"backgroundColor\", void 0);\n __decorate([\n serialization_1.property(Image.sizeProperty)\n ], Image.prototype, \"size\", void 0);\n __decorate([\n serialization_1.property(Image.styleProperty)\n ], Image.prototype, \"style\", void 0);\n __decorate([\n serialization_1.property(Image.pixelWidthProperty)\n ], Image.prototype, \"pixelWidth\", void 0);\n __decorate([\n serialization_1.property(Image.pixelHeightProperty)\n ], Image.prototype, \"pixelHeight\", void 0);\n __decorate([\n serialization_1.property(Image.selectActionProperty)\n ], Image.prototype, \"selectAction\", void 0);\n return Image;\n}(CardElement));\nexports.Image = Image;\nvar CardElementContainer = /** @class */ (function (_super) {\n __extends(CardElementContainer, _super);\n function CardElementContainer() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.allowVerticalOverflow = false;\n return _this;\n }\n CardElementContainer.prototype.populateSchema = function (schema) {\n _super.prototype.populateSchema.call(this, schema);\n if (!this.isSelectable) {\n schema.remove(CardElementContainer.selectActionProperty);\n }\n };\n //#endregion\n CardElementContainer.prototype.isElementAllowed = function (element) {\n return this.hostConfig.supportsInteractivity || !element.isInteractive;\n };\n CardElementContainer.prototype.applyPadding = function () {\n _super.prototype.applyPadding.call(this);\n if (!this.renderedElement) {\n return;\n }\n var physicalPadding = new shared_1.SpacingDefinition();\n if (this.getEffectivePadding()) {\n physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding());\n }\n this.renderedElement.style.paddingTop = physicalPadding.top + \"px\";\n this.renderedElement.style.paddingRight = physicalPadding.right + \"px\";\n this.renderedElement.style.paddingBottom = physicalPadding.bottom + \"px\";\n this.renderedElement.style.paddingLeft = physicalPadding.left + \"px\";\n this.renderedElement.style.marginRight = \"0\";\n this.renderedElement.style.marginLeft = \"0\";\n };\n Object.defineProperty(CardElementContainer.prototype, \"isSelectable\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n CardElementContainer.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n for (var i = 0; i < this.getItemCount(); i++) {\n var item = this.getItemAt(i);\n if (!this.hostConfig.supportsInteractivity && item.isInteractive) {\n context.addFailure(this, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.interactivityNotAllowed());\n }\n if (!this.isElementAllowed(item)) {\n context.addFailure(this, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(item.getJsonTypeName()));\n }\n item.internalValidateProperties(context);\n }\n if (this._selectAction) {\n this._selectAction.internalValidateProperties(context);\n }\n };\n CardElementContainer.prototype.render = function () {\n var _this = this;\n var element = _super.prototype.render.call(this);\n if (element) {\n var hostConfig = this.hostConfig;\n if (this.allowVerticalOverflow) {\n element.style.overflowX = \"hidden\";\n element.style.overflowY = \"auto\";\n }\n if (element && this.isSelectable && this._selectAction && hostConfig.supportsInteractivity) {\n element.onclick = function (e) {\n if (_this._selectAction && _this._selectAction.isEnabled) {\n e.preventDefault();\n e.cancelBubble = true;\n _this._selectAction.execute();\n }\n };\n element.onkeypress = function (e) {\n if (_this._selectAction && _this._selectAction.isEnabled && (e.code == \"Enter\" || e.code == \"Space\")) {\n // Enter or space pressed\n e.preventDefault();\n e.cancelBubble = true;\n _this._selectAction.execute();\n }\n };\n this._selectAction.setupElementForAccessibility(element);\n if (this._selectAction.isEnabled) {\n element.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\n }\n }\n }\n return element;\n };\n CardElementContainer.prototype.updateLayout = function (processChildren) {\n if (processChildren === void 0) { processChildren = true; }\n _super.prototype.updateLayout.call(this, processChildren);\n if (processChildren) {\n for (var i = 0; i < this.getItemCount(); i++) {\n this.getItemAt(i).updateLayout();\n }\n }\n };\n CardElementContainer.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n var result = [];\n for (var i = 0; i < this.getItemCount(); i++) {\n result = result.concat(this.getItemAt(i).getAllInputs(processActions));\n }\n return result;\n };\n CardElementContainer.prototype.getResourceInformation = function () {\n var result = [];\n for (var i = 0; i < this.getItemCount(); i++) {\n result = result.concat(this.getItemAt(i).getResourceInformation());\n }\n return result;\n };\n CardElementContainer.prototype.getElementById = function (id) {\n var result = _super.prototype.getElementById.call(this, id);\n if (!result) {\n for (var i = 0; i < this.getItemCount(); i++) {\n result = this.getItemAt(i).getElementById(id);\n if (result) {\n break;\n }\n }\n }\n return result;\n };\n /**\n * @inheritdoc\n */\n CardElementContainer.prototype.findDOMNodeOwner = function (node) {\n var target = undefined;\n for (var i = 0; i < this.getItemCount(); i++) {\n // recur through child elements\n target = this.getItemAt(i).findDOMNodeOwner(node);\n if (target) {\n return target;\n }\n }\n // if not found in children, defer to parent implementation\n return _super.prototype.findDOMNodeOwner.call(this, node);\n };\n CardElementContainer.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, \"selectAction\", [\"Action.ShowCard\"]);\n __decorate([\n serialization_1.property(CardElementContainer.selectActionProperty)\n ], CardElementContainer.prototype, \"_selectAction\", void 0);\n return CardElementContainer;\n}(CardElement));\nexports.CardElementContainer = CardElementContainer;\nvar ImageSet = /** @class */ (function (_super) {\n __extends(ImageSet, _super);\n function ImageSet() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._images = [];\n _this.imageSize = Enums.ImageSize.Medium;\n return _this;\n }\n //#endregion\n ImageSet.prototype.internalRender = function () {\n var element = undefined;\n if (this._images.length > 0) {\n element = document.createElement(\"div\");\n element.style.display = \"flex\";\n element.style.flexWrap = \"wrap\";\n for (var _i = 0, _a = this._images; _i < _a.length; _i++) {\n var image = _a[_i];\n switch (this.imageSize) {\n case Enums.ImageSize.Small:\n image.size = Enums.Size.Small;\n break;\n case Enums.ImageSize.Large:\n image.size = Enums.Size.Large;\n break;\n default:\n image.size = Enums.Size.Medium;\n break;\n }\n image.maxHeight = this.hostConfig.imageSet.maxImageHeight;\n var renderedImage = image.render();\n if (renderedImage) {\n renderedImage.style.display = \"inline-flex\";\n renderedImage.style.margin = \"0px\";\n renderedImage.style.marginRight = \"10px\";\n Utils.appendChild(element, renderedImage);\n }\n }\n }\n return element;\n };\n ImageSet.prototype.getItemCount = function () {\n return this._images.length;\n };\n ImageSet.prototype.getItemAt = function (index) {\n return this._images[index];\n };\n ImageSet.prototype.getFirstVisibleRenderedItem = function () {\n return this._images && this._images.length > 0 ? this._images[0] : undefined;\n };\n ImageSet.prototype.getLastVisibleRenderedItem = function () {\n return this._images && this._images.length > 0 ? this._images[this._images.length - 1] : undefined;\n };\n ImageSet.prototype.removeItem = function (item) {\n if (item instanceof Image) {\n var itemIndex = this._images.indexOf(item);\n if (itemIndex >= 0) {\n this._images.splice(itemIndex, 1);\n item.setParent(undefined);\n this.updateLayout();\n return true;\n }\n }\n return false;\n };\n ImageSet.prototype.getJsonTypeName = function () {\n return \"ImageSet\";\n };\n ImageSet.prototype.addImage = function (image) {\n if (!image.parent) {\n this._images.push(image);\n image.setParent(this);\n }\n else {\n throw new Error(\"This image already belongs to another ImageSet\");\n }\n };\n ImageSet.prototype.indexOf = function (cardElement) {\n return cardElement instanceof Image ? this._images.indexOf(cardElement) : -1;\n };\n ImageSet.imagesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"images\", Image, function (sender, item) { item.setParent(sender); });\n ImageSet.imageSizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"imageSize\", Enums.ImageSize, Enums.ImageSize.Medium);\n __decorate([\n serialization_1.property(ImageSet.imagesProperty)\n ], ImageSet.prototype, \"_images\", void 0);\n __decorate([\n serialization_1.property(ImageSet.imageSizeProperty)\n ], ImageSet.prototype, \"imageSize\", void 0);\n return ImageSet;\n}(CardElementContainer));\nexports.ImageSet = ImageSet;\nvar MediaSource = /** @class */ (function (_super) {\n __extends(MediaSource, _super);\n function MediaSource(url, mimeType) {\n var _this = _super.call(this) || this;\n _this.url = url;\n _this.mimeType = mimeType;\n return _this;\n }\n //#endregion\n MediaSource.prototype.getSchemaKey = function () {\n return \"MediaSource\";\n };\n MediaSource.prototype.isValid = function () {\n return this.mimeType && this.url ? true : false;\n };\n MediaSource.prototype.render = function () {\n var result = undefined;\n if (this.isValid()) {\n result = document.createElement(\"source\");\n result.src = this.url;\n result.type = this.mimeType;\n }\n return result;\n };\n //#region Schema\n MediaSource.mimeTypeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"mimeType\");\n MediaSource.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"url\");\n __decorate([\n serialization_1.property(MediaSource.mimeTypeProperty)\n ], MediaSource.prototype, \"mimeType\", void 0);\n __decorate([\n serialization_1.property(MediaSource.urlProperty)\n ], MediaSource.prototype, \"url\", void 0);\n return MediaSource;\n}(serialization_1.SerializableObject));\nexports.MediaSource = MediaSource;\nvar Media = /** @class */ (function (_super) {\n __extends(Media, _super);\n function Media() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.sources = [];\n return _this;\n }\n Media.prototype.getPosterUrl = function () {\n return this.poster ? this.poster : this.hostConfig.media.defaultPoster;\n };\n Media.prototype.processSources = function () {\n this._selectedSources = [];\n this._selectedMediaType = undefined;\n for (var _i = 0, _a = this.sources; _i < _a.length; _i++) {\n var source = _a[_i];\n var mimeComponents = source.mimeType ? source.mimeType.split('/') : [];\n if (mimeComponents.length == 2) {\n if (!this._selectedMediaType) {\n var index = Media.supportedMediaTypes.indexOf(mimeComponents[0]);\n if (index >= 0) {\n this._selectedMediaType = Media.supportedMediaTypes[index];\n }\n }\n if (mimeComponents[0] == this._selectedMediaType) {\n this._selectedSources.push(source);\n }\n }\n }\n };\n Media.prototype.handlePlayButtonInvoke = function (event) {\n if (this.hostConfig.media.allowInlinePlayback) {\n event.preventDefault();\n event.cancelBubble = true;\n if (this.renderedElement) {\n var mediaPlayerElement = this.renderMediaPlayer();\n this.renderedElement.innerHTML = \"\";\n this.renderedElement.appendChild(mediaPlayerElement);\n mediaPlayerElement.play();\n mediaPlayerElement.focus();\n }\n }\n else {\n if (Media.onPlay) {\n event.preventDefault();\n event.cancelBubble = true;\n Media.onPlay(this);\n }\n }\n };\n Media.prototype.renderPoster = function () {\n var _this = this;\n var playButtonArrowWidth = 12;\n var playButtonArrowHeight = 15;\n var posterRootElement = document.createElement(\"div\");\n posterRootElement.className = this.hostConfig.makeCssClassName(\"ac-media-poster\");\n posterRootElement.setAttribute(\"role\", \"contentinfo\");\n posterRootElement.setAttribute(\"aria-label\", this.altText ? this.altText : strings_1.Strings.defaults.mediaPlayerAriaLabel());\n posterRootElement.style.position = \"relative\";\n posterRootElement.style.display = \"flex\";\n var posterUrl = this.getPosterUrl();\n if (posterUrl) {\n var posterImageElement_1 = document.createElement(\"img\");\n posterImageElement_1.style.width = \"100%\";\n posterImageElement_1.style.height = \"100%\";\n posterImageElement_1.setAttribute(\"role\", \"presentation\");\n posterImageElement_1.onerror = function (e) {\n if (posterImageElement_1.parentNode) {\n posterImageElement_1.parentNode.removeChild(posterImageElement_1);\n }\n posterRootElement.classList.add(\"empty\");\n posterRootElement.style.minHeight = \"150px\";\n };\n posterImageElement_1.src = posterUrl;\n posterRootElement.appendChild(posterImageElement_1);\n }\n else {\n posterRootElement.classList.add(\"empty\");\n posterRootElement.style.minHeight = \"150px\";\n }\n if (this.hostConfig.supportsInteractivity && this._selectedSources.length > 0) {\n var playButtonOuterElement = document.createElement(\"div\");\n playButtonOuterElement.tabIndex = 0;\n playButtonOuterElement.setAttribute(\"role\", \"button\");\n playButtonOuterElement.setAttribute(\"aria-label\", strings_1.Strings.defaults.mediaPlayerPlayMedia());\n playButtonOuterElement.className = this.hostConfig.makeCssClassName(\"ac-media-playButton\");\n playButtonOuterElement.style.display = \"flex\";\n playButtonOuterElement.style.alignItems = \"center\";\n playButtonOuterElement.style.justifyContent = \"center\";\n playButtonOuterElement.onclick = function (e) {\n _this.handlePlayButtonInvoke(e);\n };\n playButtonOuterElement.onkeypress = function (e) {\n if (e.code == \"Enter\" || e.code == \"Space\") { // space or enter\n _this.handlePlayButtonInvoke(e);\n }\n };\n var playButtonInnerElement = document.createElement(\"div\");\n playButtonInnerElement.className = this.hostConfig.makeCssClassName(\"ac-media-playButton-arrow\");\n playButtonInnerElement.style.width = playButtonArrowWidth + \"px\";\n playButtonInnerElement.style.height = playButtonArrowHeight + \"px\";\n playButtonInnerElement.style.borderTopWidth = (playButtonArrowHeight / 2) + \"px\";\n playButtonInnerElement.style.borderBottomWidth = (playButtonArrowHeight / 2) + \"px\";\n playButtonInnerElement.style.borderLeftWidth = playButtonArrowWidth + \"px\";\n playButtonInnerElement.style.borderRightWidth = \"0\";\n playButtonInnerElement.style.borderStyle = \"solid\";\n playButtonInnerElement.style.borderTopColor = \"transparent\";\n playButtonInnerElement.style.borderRightColor = \"transparent\";\n playButtonInnerElement.style.borderBottomColor = \"transparent\";\n playButtonInnerElement.style.transform = \"translate(\" + (playButtonArrowWidth / 10) + \"px,0px)\";\n playButtonOuterElement.appendChild(playButtonInnerElement);\n var playButtonContainer = document.createElement(\"div\");\n playButtonContainer.style.position = \"absolute\";\n playButtonContainer.style.left = \"0\";\n playButtonContainer.style.top = \"0\";\n playButtonContainer.style.width = \"100%\";\n playButtonContainer.style.height = \"100%\";\n playButtonContainer.style.display = \"flex\";\n playButtonContainer.style.justifyContent = \"center\";\n playButtonContainer.style.alignItems = \"center\";\n playButtonContainer.appendChild(playButtonOuterElement);\n posterRootElement.appendChild(playButtonContainer);\n }\n return posterRootElement;\n };\n Media.prototype.renderMediaPlayer = function () {\n var mediaElement;\n if (this._selectedMediaType == \"video\") {\n var videoPlayer = document.createElement(\"video\");\n var posterUrl = this.getPosterUrl();\n if (posterUrl) {\n videoPlayer.poster = posterUrl;\n }\n mediaElement = videoPlayer;\n }\n else {\n mediaElement = document.createElement(\"audio\");\n }\n mediaElement.setAttribute(\"aria-label\", this.altText ? this.altText : strings_1.Strings.defaults.mediaPlayerAriaLabel());\n mediaElement.setAttribute(\"webkit-playsinline\", \"\");\n mediaElement.setAttribute(\"playsinline\", \"\");\n mediaElement.autoplay = true;\n mediaElement.controls = true;\n if (Utils.isMobileOS()) {\n mediaElement.muted = true;\n }\n mediaElement.preload = \"none\";\n mediaElement.style.width = \"100%\";\n for (var _i = 0, _a = this.sources; _i < _a.length; _i++) {\n var source = _a[_i];\n var renderedSource = source.render();\n Utils.appendChild(mediaElement, renderedSource);\n }\n return mediaElement;\n };\n Media.prototype.internalRender = function () {\n var element = document.createElement(\"div\");\n element.className = this.hostConfig.makeCssClassName(\"ac-media\");\n this.processSources();\n element.appendChild(this.renderPoster());\n return element;\n };\n Media.prototype.getJsonTypeName = function () {\n return \"Media\";\n };\n Media.prototype.getResourceInformation = function () {\n var result = [];\n var posterUrl = this.getPosterUrl();\n if (posterUrl) {\n result.push({ url: posterUrl, mimeType: \"image\" });\n }\n for (var _i = 0, _a = this.sources; _i < _a.length; _i++) {\n var mediaSource = _a[_i];\n if (mediaSource.isValid()) {\n result.push({\n url: mediaSource.url,\n mimeType: mediaSource.mimeType\n });\n }\n }\n return result;\n };\n Object.defineProperty(Media.prototype, \"selectedMediaType\", {\n get: function () {\n return this._selectedMediaType;\n },\n enumerable: false,\n configurable: true\n });\n Media.sourcesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_1, \"sources\", MediaSource);\n Media.posterProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"poster\");\n Media.altTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"altText\");\n //#endregion\n Media.supportedMediaTypes = [\"audio\", \"video\"];\n __decorate([\n serialization_1.property(Media.sourcesProperty)\n ], Media.prototype, \"sources\", void 0);\n __decorate([\n serialization_1.property(Media.posterProperty)\n ], Media.prototype, \"poster\", void 0);\n __decorate([\n serialization_1.property(Media.altTextProperty)\n ], Media.prototype, \"altText\", void 0);\n return Media;\n}(CardElement));\nexports.Media = Media;\nvar Input = /** @class */ (function (_super) {\n __extends(Input, _super);\n function Input() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Input.prototype.getAllLabelIds = function () {\n var labelIds = [];\n if (this.labelledBy) {\n labelIds.push(this.labelledBy);\n }\n if (this._renderedLabelElement) {\n labelIds.push(this._renderedLabelElement.id);\n }\n if (this._renderedErrorMessageElement) {\n labelIds.push(this._renderedErrorMessageElement.id);\n }\n return labelIds;\n };\n Input.prototype.updateInputControlAriaLabelledBy = function () {\n if (this._renderedInputControlElement) {\n var labelIds = this.getAllLabelIds();\n if (labelIds.length > 0) {\n this._renderedInputControlElement.setAttribute(\"aria-labelledby\", labelIds.join(\" \"));\n }\n else {\n this._renderedInputControlElement.removeAttribute(\"aria-labelledby\");\n }\n }\n };\n Object.defineProperty(Input.prototype, \"isNullable\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Input.prototype, \"renderedInputControlElement\", {\n get: function () {\n return this._renderedInputControlElement;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Input.prototype, \"inputControlContainerElement\", {\n get: function () {\n return this._inputControlContainerElement;\n },\n enumerable: false,\n configurable: true\n });\n Input.prototype.overrideInternalRender = function () {\n var hostConfig = this.hostConfig;\n this._outerContainerElement = document.createElement(\"div\");\n this._outerContainerElement.style.display = \"flex\";\n this._outerContainerElement.style.flexDirection = \"column\";\n var renderedInputControlId = Utils.generateUniqueId();\n if (this.label) {\n var labelRichTextBlock = new RichTextBlock();\n labelRichTextBlock.setParent(this);\n labelRichTextBlock.forElementId = renderedInputControlId;\n var labelInline = new TextRun(this.label);\n labelRichTextBlock.addInline(labelInline);\n if (this.isRequired) {\n labelInline.init(hostConfig.inputs.label.requiredInputs);\n var isRequiredCueInline = new TextRun(hostConfig.inputs.label.requiredInputs.suffix);\n isRequiredCueInline.color = hostConfig.inputs.label.requiredInputs.suffixColor;\n isRequiredCueInline.ariaHidden = true;\n labelRichTextBlock.addInline(isRequiredCueInline);\n }\n else {\n labelInline.init(hostConfig.inputs.label.optionalInputs);\n }\n this._renderedLabelElement = labelRichTextBlock.render();\n if (this._renderedLabelElement) {\n this._renderedLabelElement.id = Utils.generateUniqueId();\n this._renderedLabelElement.style.marginBottom = hostConfig.getEffectiveSpacing(hostConfig.inputs.label.inputSpacing) + \"px\";\n this._outerContainerElement.appendChild(this._renderedLabelElement);\n }\n }\n this._inputControlContainerElement = document.createElement(\"div\");\n this._inputControlContainerElement.className = hostConfig.makeCssClassName(\"ac-input-container\");\n this._inputControlContainerElement.style.display = \"flex\";\n if (this.height === \"stretch\") {\n this._inputControlContainerElement.style.alignItems = \"stretch\";\n this._inputControlContainerElement.style.flex = \"1 1 auto\";\n }\n this._renderedInputControlElement = this.internalRender();\n if (this._renderedInputControlElement) {\n this._renderedInputControlElement.id = renderedInputControlId;\n this._renderedInputControlElement.style.minWidth = \"0px\";\n if (this.isNullable && this.isRequired) {\n this._renderedInputControlElement.setAttribute(\"aria-required\", \"true\");\n this._renderedInputControlElement.classList.add(hostConfig.makeCssClassName(\"ac-input-required\"));\n }\n this._inputControlContainerElement.appendChild(this._renderedInputControlElement);\n this._outerContainerElement.appendChild(this._inputControlContainerElement);\n this.updateInputControlAriaLabelledBy();\n return this._outerContainerElement;\n }\n return undefined;\n };\n Input.prototype.valueChanged = function () {\n if (this.isValid()) {\n this.resetValidationFailureCue();\n }\n if (this.onValueChanged) {\n this.onValueChanged(this);\n }\n raiseInputValueChangedEvent(this);\n };\n Input.prototype.resetValidationFailureCue = function () {\n if (this.renderedInputControlElement) {\n this.renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName(\"ac-input-validation-failed\"));\n this.updateInputControlAriaLabelledBy();\n if (this._renderedErrorMessageElement) {\n this._outerContainerElement.removeChild(this._renderedErrorMessageElement);\n this._renderedErrorMessageElement = undefined;\n }\n }\n };\n Input.prototype.showValidationErrorMessage = function () {\n if (this.renderedElement && this.errorMessage && shared_1.GlobalSettings.displayInputValidationErrors) {\n var errorMessageTextBlock = new TextBlock();\n errorMessageTextBlock.setParent(this);\n errorMessageTextBlock.text = this.errorMessage;\n errorMessageTextBlock.wrap = true;\n errorMessageTextBlock.init(this.hostConfig.inputs.errorMessage);\n this._renderedErrorMessageElement = errorMessageTextBlock.render();\n if (this._renderedErrorMessageElement) {\n this._renderedErrorMessageElement.id = Utils.generateUniqueId();\n this._outerContainerElement.appendChild(this._renderedErrorMessageElement);\n this.updateInputControlAriaLabelledBy();\n }\n }\n };\n Input.prototype.focus = function () {\n if (this._renderedInputControlElement) {\n this._renderedInputControlElement.focus();\n }\n };\n Input.prototype.isValid = function () {\n return true;\n };\n Input.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (!this.id) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.inputsMustHaveUniqueId());\n }\n if (this.isRequired) {\n if (!this.label) {\n context.addFailure(this, Enums.ValidationEvent.RequiredInputsShouldHaveLabel, \"Required inputs should have a label\");\n }\n if (!this.errorMessage) {\n context.addFailure(this, Enums.ValidationEvent.RequiredInputsShouldHaveErrorMessage, \"Required inputs should have an error message\");\n }\n }\n };\n Input.prototype.validateValue = function () {\n this.resetValidationFailureCue();\n var result = this.isRequired ? this.isSet() && this.isValid() : this.isValid();\n if (!result && this.renderedInputControlElement) {\n this.renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName(\"ac-input-validation-failed\"));\n this.showValidationErrorMessage();\n }\n return result;\n };\n Input.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n return [this];\n };\n Object.defineProperty(Input.prototype, \"isInteractive\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n Input.labelProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, \"label\", true);\n Input.isRequiredProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, \"isRequired\", false);\n Input.errorMessageProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, \"errorMessage\", true);\n __decorate([\n serialization_1.property(Input.labelProperty)\n ], Input.prototype, \"label\", void 0);\n __decorate([\n serialization_1.property(Input.isRequiredProperty)\n ], Input.prototype, \"isRequired\", void 0);\n __decorate([\n serialization_1.property(Input.errorMessageProperty)\n ], Input.prototype, \"errorMessage\", void 0);\n return Input;\n}(CardElement));\nexports.Input = Input;\nvar TextInput = /** @class */ (function (_super) {\n __extends(TextInput, _super);\n function TextInput() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.isMultiline = false;\n _this.style = Enums.InputTextStyle.Text;\n return _this;\n }\n //#endregion\n TextInput.prototype.setupInput = function (input) {\n var _this = this;\n input.style.flex = \"1 1 auto\";\n input.tabIndex = 0;\n if (this.placeholder) {\n input.placeholder = this.placeholder;\n input.setAttribute(\"aria-label\", this.placeholder);\n }\n if (this.defaultValue) {\n input.value = this.defaultValue;\n }\n if (this.maxLength && this.maxLength > 0) {\n input.maxLength = this.maxLength;\n }\n input.oninput = function () { _this.valueChanged(); };\n input.onkeypress = function (e) {\n // Ctrl+Enter pressed\n if (e.ctrlKey && e.code === \"Enter\" && _this.inlineAction && _this.inlineAction.isEnabled) {\n _this.inlineAction.execute();\n }\n };\n };\n TextInput.prototype.internalRender = function () {\n var result;\n if (this.isMultiline && this.style !== Enums.InputTextStyle.Password) {\n result = document.createElement(\"textarea\");\n result.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-textInput\", \"ac-multiline\");\n if (this.height === \"stretch\") {\n result.style.height = \"initial\";\n }\n }\n else {\n result = document.createElement(\"input\");\n result.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-textInput\");\n result.type = Enums.InputTextStyle[this.style].toLowerCase();\n }\n this.setupInput(result);\n return result;\n };\n TextInput.prototype.overrideInternalRender = function () {\n var _this = this;\n var renderedInputControl = _super.prototype.overrideInternalRender.call(this);\n if (this.inlineAction) {\n var button_1 = document.createElement(\"button\");\n button_1.className = this.hostConfig.makeCssClassName(this.inlineAction.isEnabled ? \"ac-inlineActionButton\" : \"ac-inlineActionButton-disabled\");\n button_1.onclick = function (e) {\n if (_this.inlineAction && _this.inlineAction.isEnabled) {\n e.preventDefault();\n e.cancelBubble = true;\n _this.inlineAction.execute();\n }\n };\n if (this.inlineAction.iconUrl) {\n button_1.classList.add(\"iconOnly\");\n var icon_1 = document.createElement(\"img\");\n icon_1.style.height = \"100%\";\n icon_1.setAttribute(\"role\", \"presentation\");\n // The below trick is necessary as a workaround in Chrome where the icon is initially displayed\n // at its native size then resized to 100% of the button's height. This cfreates an unpleasant\n // flicker. On top of that, Chrome's flex implementation fails to prperly re-layout the button\n // after the image has loaded and been gicven its final size. The below trick also fixes that.\n icon_1.style.display = \"none\";\n icon_1.onload = function () {\n icon_1.style.removeProperty(\"display\");\n };\n icon_1.onerror = function () {\n button_1.removeChild(icon_1);\n button_1.classList.remove(\"iconOnly\");\n button_1.classList.add(\"textOnly\");\n button_1.textContent = _this.inlineAction && _this.inlineAction.title ? _this.inlineAction.title : strings_1.Strings.defaults.inlineActionTitle();\n };\n icon_1.src = this.inlineAction.iconUrl;\n button_1.appendChild(icon_1);\n button_1.title = this.inlineAction.title ? this.inlineAction.title : strings_1.Strings.defaults.inlineActionTitle();\n }\n else {\n button_1.classList.add(\"textOnly\");\n button_1.textContent = this.inlineAction.title ? this.inlineAction.title : strings_1.Strings.defaults.inlineActionTitle();\n }\n this.inlineAction.setupElementForAccessibility(button_1, true);\n button_1.style.marginLeft = \"8px\";\n this.inputControlContainerElement.appendChild(button_1);\n }\n return renderedInputControl;\n };\n TextInput.prototype.getJsonTypeName = function () {\n return \"Input.Text\";\n };\n TextInput.prototype.getActionById = function (id) {\n var result = _super.prototype.getActionById.call(this, id);\n if (!result && this.inlineAction) {\n result = this.inlineAction.getActionById(id);\n }\n return result;\n };\n TextInput.prototype.isSet = function () {\n return this.value ? true : false;\n };\n TextInput.prototype.isValid = function () {\n if (!this.value) {\n return true;\n }\n if (this.regex) {\n return new RegExp(this.regex, \"g\").test(this.value);\n }\n return true;\n };\n Object.defineProperty(TextInput.prototype, \"value\", {\n get: function () {\n if (this.renderedInputControlElement) {\n if (this.isMultiline) {\n return this.renderedInputControlElement.value;\n }\n else {\n return this.renderedInputControlElement.value;\n }\n }\n else {\n return undefined;\n }\n },\n enumerable: false,\n configurable: true\n });\n TextInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\n TextInput.maxLengthProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"maxLength\");\n TextInput.isMultilineProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"isMultiline\", false);\n TextInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\n TextInput.styleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"style\", Enums.InputTextStyle, Enums.InputTextStyle.Text, [\n { value: Enums.InputTextStyle.Text },\n { value: Enums.InputTextStyle.Tel },\n { value: Enums.InputTextStyle.Url },\n { value: Enums.InputTextStyle.Email },\n { value: Enums.InputTextStyle.Password, targetVersion: serialization_1.Versions.v1_5 }\n ]);\n TextInput.inlineActionProperty = new ActionProperty(serialization_1.Versions.v1_0, \"inlineAction\", [\"Action.ShowCard\"]);\n TextInput.regexProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, \"regex\", true);\n __decorate([\n serialization_1.property(TextInput.valueProperty)\n ], TextInput.prototype, \"defaultValue\", void 0);\n __decorate([\n serialization_1.property(TextInput.maxLengthProperty)\n ], TextInput.prototype, \"maxLength\", void 0);\n __decorate([\n serialization_1.property(TextInput.isMultilineProperty)\n ], TextInput.prototype, \"isMultiline\", void 0);\n __decorate([\n serialization_1.property(TextInput.placeholderProperty)\n ], TextInput.prototype, \"placeholder\", void 0);\n __decorate([\n serialization_1.property(TextInput.styleProperty)\n ], TextInput.prototype, \"style\", void 0);\n __decorate([\n serialization_1.property(TextInput.inlineActionProperty)\n ], TextInput.prototype, \"inlineAction\", void 0);\n __decorate([\n serialization_1.property(TextInput.regexProperty)\n ], TextInput.prototype, \"regex\", void 0);\n return TextInput;\n}(Input));\nexports.TextInput = TextInput;\nvar ToggleInput = /** @class */ (function (_super) {\n __extends(ToggleInput, _super);\n function ToggleInput() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.valueOn = \"true\";\n _this.valueOff = \"false\";\n _this.wrap = false;\n return _this;\n }\n ToggleInput.prototype.updateInputControlAriaLabelledBy = function () {\n if (this._checkboxInputElement) {\n var joinedLabelIds = this.getAllLabelIds().join(\" \");\n if (this._checkboxInputLabelElement && this._checkboxInputLabelElement.id) {\n joinedLabelIds += \" \" + this._checkboxInputLabelElement.id;\n }\n if (joinedLabelIds) {\n this._checkboxInputElement.setAttribute(\"aria-labelledby\", joinedLabelIds);\n }\n else {\n this._checkboxInputElement.removeAttribute(\"aria-labelledby\");\n }\n }\n };\n ToggleInput.prototype.internalRender = function () {\n var _this = this;\n var element = document.createElement(\"div\");\n element.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-toggleInput\");\n element.style.width = \"100%\";\n element.style.display = \"flex\";\n element.style.alignItems = \"center\";\n this._checkboxInputElement = document.createElement(\"input\");\n this._checkboxInputElement.id = Utils.generateUniqueId();\n this._checkboxInputElement.type = \"checkbox\";\n this._checkboxInputElement.style.display = \"inline-block\";\n this._checkboxInputElement.style.verticalAlign = \"middle\";\n this._checkboxInputElement.style.margin = \"0\";\n this._checkboxInputElement.style.flex = \"0 0 auto\";\n if (this.title) {\n this._checkboxInputElement.setAttribute(\"aria-label\", this.title);\n }\n if (this.isRequired) {\n this._checkboxInputElement.setAttribute(\"aria-required\", \"true\");\n }\n this._checkboxInputElement.tabIndex = 0;\n if (this.defaultValue == this.valueOn) {\n this._checkboxInputElement.checked = true;\n }\n this._checkboxInputElement.onchange = function () { _this.valueChanged(); };\n Utils.appendChild(element, this._checkboxInputElement);\n if (this.title || this.isDesignMode()) {\n var label = new TextBlock();\n label.setParent(this);\n label.forElementId = this._checkboxInputElement.id;\n label.hostConfig = this.hostConfig;\n label.text = !this.title ? this.getJsonTypeName() : this.title;\n label.useMarkdown = shared_1.GlobalSettings.useMarkdownInRadioButtonAndCheckbox;\n label.wrap = this.wrap;\n this._checkboxInputLabelElement = label.render();\n if (this._checkboxInputLabelElement) {\n this._checkboxInputLabelElement.id = Utils.generateUniqueId();\n this._checkboxInputLabelElement.style.display = \"inline-block\";\n this._checkboxInputLabelElement.style.flex = \"1 1 auto\";\n this._checkboxInputLabelElement.style.marginLeft = \"6px\";\n this._checkboxInputLabelElement.style.verticalAlign = \"middle\";\n var spacerElement = document.createElement(\"div\");\n spacerElement.style.width = \"6px\";\n Utils.appendChild(element, spacerElement);\n Utils.appendChild(element, this._checkboxInputLabelElement);\n }\n }\n return element;\n };\n Object.defineProperty(ToggleInput.prototype, \"isNullable\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n ToggleInput.prototype.getJsonTypeName = function () {\n return \"Input.Toggle\";\n };\n ToggleInput.prototype.focus = function () {\n if (this._checkboxInputElement) {\n this._checkboxInputElement.focus();\n }\n };\n ToggleInput.prototype.isSet = function () {\n if (this.isRequired) {\n return this.value === this.valueOn;\n }\n return this.value ? true : false;\n };\n Object.defineProperty(ToggleInput.prototype, \"value\", {\n get: function () {\n if (this._checkboxInputElement) {\n return this._checkboxInputElement.checked ? this.valueOn : this.valueOff;\n }\n else {\n return undefined;\n }\n },\n enumerable: false,\n configurable: true\n });\n ToggleInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\n ToggleInput.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\n ToggleInput.valueOnProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"valueOn\", true, undefined, \"true\", function (sender) { return \"true\"; });\n ToggleInput.valueOffProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"valueOff\", true, undefined, \"false\", function (sender) { return \"false\"; });\n ToggleInput.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"wrap\", false);\n __decorate([\n serialization_1.property(ToggleInput.valueProperty)\n ], ToggleInput.prototype, \"defaultValue\", void 0);\n __decorate([\n serialization_1.property(ToggleInput.titleProperty)\n ], ToggleInput.prototype, \"title\", void 0);\n __decorate([\n serialization_1.property(ToggleInput.valueOnProperty)\n ], ToggleInput.prototype, \"valueOn\", void 0);\n __decorate([\n serialization_1.property(ToggleInput.valueOffProperty)\n ], ToggleInput.prototype, \"valueOff\", void 0);\n __decorate([\n serialization_1.property(ToggleInput.wrapProperty)\n ], ToggleInput.prototype, \"wrap\", void 0);\n return ToggleInput;\n}(Input));\nexports.ToggleInput = ToggleInput;\nvar Choice = /** @class */ (function (_super) {\n __extends(Choice, _super);\n function Choice(title, value) {\n var _this = _super.call(this) || this;\n _this.title = title;\n _this.value = value;\n return _this;\n }\n //#endregion\n Choice.prototype.getSchemaKey = function () {\n return \"Choice\";\n };\n //#region Schema\n Choice.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\n Choice.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\n __decorate([\n serialization_1.property(Choice.titleProperty)\n ], Choice.prototype, \"title\", void 0);\n __decorate([\n serialization_1.property(Choice.valueProperty)\n ], Choice.prototype, \"value\", void 0);\n return Choice;\n}(serialization_1.SerializableObject));\nexports.Choice = Choice;\nvar ChoiceSetInput = /** @class */ (function (_super) {\n __extends(ChoiceSetInput, _super);\n function ChoiceSetInput() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.isMultiSelect = false;\n _this.wrap = false;\n _this.choices = [];\n return _this;\n }\n Object.defineProperty(ChoiceSetInput.prototype, \"isCompact\", {\n get: function () {\n return !this.style || this.style === \"compact\";\n },\n set: function (value) {\n this.style = value ? undefined : \"expanded\";\n },\n enumerable: false,\n configurable: true\n });\n ChoiceSetInput.getUniqueCategoryName = function () {\n var uniqueCategoryName = \"__ac-category\" + ChoiceSetInput.uniqueCategoryCounter;\n ChoiceSetInput.uniqueCategoryCounter++;\n return uniqueCategoryName;\n };\n // Make sure `aria-current` is applied to the currently-selected item\n ChoiceSetInput.prototype.internalApplyAriaCurrent = function () {\n if (this._selectElement) {\n var options = this._selectElement.options;\n if (options) {\n for (var i = 0; i < options.length; i++) {\n if (options[i].selected) {\n options[i].setAttribute(\"aria-current\", \"true\");\n }\n else {\n options[i].removeAttribute(\"aria-current\");\n }\n }\n }\n }\n };\n ChoiceSetInput.prototype.renderCompoundInput = function (cssClassName, type, defaultValues) {\n var _this = this;\n var element = document.createElement(\"div\");\n element.className = this.hostConfig.makeCssClassName(\"ac-input\", cssClassName);\n element.style.width = \"100%\";\n this._toggleInputs = [];\n this._labels = [];\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\n var choice = _a[_i];\n var input = document.createElement(\"input\");\n input.id = Utils.generateUniqueId();\n input.type = type;\n input.style.margin = \"0\";\n input.style.display = \"inline-block\";\n input.style.verticalAlign = \"middle\";\n input.style.flex = \"0 0 auto\";\n input.name = this.id ? this.id : this._uniqueCategoryName;\n if (this.isRequired) {\n input.setAttribute(\"aria-required\", \"true\");\n }\n if (choice.value) {\n input.value = choice.value;\n }\n if (choice.title) {\n input.setAttribute(\"aria-label\", choice.title);\n }\n if (defaultValues && choice.value) {\n if (defaultValues.indexOf(choice.value) >= 0) {\n input.checked = true;\n }\n }\n input.onchange = function () { _this.valueChanged(); };\n this._toggleInputs.push(input);\n var compoundInput = document.createElement(\"div\");\n compoundInput.style.display = \"flex\";\n compoundInput.style.alignItems = \"center\";\n Utils.appendChild(compoundInput, input);\n var label = new TextBlock();\n label.setParent(this);\n label.forElementId = input.id;\n label.hostConfig = this.hostConfig;\n label.text = choice.title ? choice.title : \"Choice \" + this._toggleInputs.length;\n label.useMarkdown = shared_1.GlobalSettings.useMarkdownInRadioButtonAndCheckbox;\n label.wrap = this.wrap;\n var labelElement = label.render();\n this._labels.push(labelElement);\n if (labelElement) {\n labelElement.id = Utils.generateUniqueId();\n labelElement.style.display = \"inline-block\";\n labelElement.style.flex = \"1 1 auto\";\n labelElement.style.marginLeft = \"6px\";\n labelElement.style.verticalAlign = \"middle\";\n var spacerElement = document.createElement(\"div\");\n spacerElement.style.width = \"6px\";\n Utils.appendChild(compoundInput, spacerElement);\n Utils.appendChild(compoundInput, labelElement);\n }\n Utils.appendChild(element, compoundInput);\n }\n return element;\n };\n ChoiceSetInput.prototype.updateInputControlAriaLabelledBy = function () {\n if ((this.isMultiSelect || this.style === \"expanded\") && this._toggleInputs && this._labels) {\n var labelIds = this.getAllLabelIds();\n for (var i = 0; i < this._toggleInputs.length; i++) {\n var joinedLabelIds = labelIds.join(\" \");\n var label = this._labels[i];\n if (label && label.id) {\n joinedLabelIds += \" \" + label.id;\n }\n if (joinedLabelIds) {\n this._toggleInputs[i].setAttribute(\"aria-labelledby\", joinedLabelIds);\n }\n else {\n this._toggleInputs[i].removeAttribute(\"aria-labelledby\");\n }\n }\n }\n else {\n _super.prototype.updateInputControlAriaLabelledBy.call(this);\n }\n };\n ChoiceSetInput.prototype.internalRender = function () {\n var _this = this;\n this._uniqueCategoryName = ChoiceSetInput.getUniqueCategoryName();\n if (this.isMultiSelect) {\n // Render as a list of toggle inputs\n return this.renderCompoundInput(\"ac-choiceSetInput-multiSelect\", \"checkbox\", this.defaultValue ? this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator) : undefined);\n }\n else {\n if (this.style === \"expanded\") {\n // Render as a series of radio buttons\n return this.renderCompoundInput(\"ac-choiceSetInput-expanded\", \"radio\", this.defaultValue ? [this.defaultValue] : undefined);\n }\n else if (this.style === \"filtered\") {\n // Render as a text input coupled with a datalist\n var inputContainer = document.createElement(\"div\");\n inputContainer.style.width = \"100%\";\n this._textInput = document.createElement(\"input\");\n this._textInput.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-multichoiceInput\", \"ac-choiceSetInput-filtered\");\n this._textInput.type = \"text\";\n this._textInput.style.width = \"100%\";\n this._textInput.oninput = function () {\n _this.valueChanged();\n if (_this._textInput) {\n // Remove aria-label when value is not empty so narration software doesn't\n // read the placeholder\n if (_this.value) {\n _this._textInput.removeAttribute(\"placeholder\");\n _this._textInput.removeAttribute(\"aria-label\");\n }\n else if (_this.placeholder) {\n _this._textInput.placeholder = _this.placeholder;\n _this._textInput.setAttribute(\"aria-label\", _this.placeholder);\n }\n }\n };\n if (this.defaultValue) {\n this._textInput.value = this.defaultValue;\n }\n if (this.placeholder && !this._textInput.value) {\n this._textInput.placeholder = this.placeholder;\n this._textInput.setAttribute(\"aria-label\", this.placeholder);\n }\n var dataList = document.createElement(\"datalist\");\n dataList.id = Utils.generateUniqueId();\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\n var choice = _a[_i];\n var option = document.createElement(\"option\");\n // To fix https://stackoverflow.com/questions/29882361/show-datalist-labels-but-submit-the-actual-value\n // value is mapped to choice.title other than choice.value\n option.value = choice.title;\n option.setAttribute(\"aria-label\", choice.title);\n dataList.appendChild(option);\n }\n this._textInput.setAttribute(\"list\", dataList.id);\n inputContainer.append(this._textInput, dataList);\n return inputContainer;\n }\n else {\n // Render as a combo box\n this._selectElement = document.createElement(\"select\");\n this._selectElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-multichoiceInput\", \"ac-choiceSetInput-compact\");\n this._selectElement.style.width = \"100%\";\n var option = document.createElement(\"option\");\n option.selected = true;\n option.disabled = true;\n option.hidden = true;\n option.value = \"\";\n if (this.placeholder) {\n option.text = this.placeholder;\n }\n Utils.appendChild(this._selectElement, option);\n for (var _b = 0, _c = this.choices; _b < _c.length; _b++) {\n var choice = _c[_b];\n var option_1 = document.createElement(\"option\");\n option_1.value = choice.value;\n option_1.text = choice.title;\n option_1.setAttribute(\"aria-label\", choice.title);\n if (choice.value == this.defaultValue) {\n option_1.selected = true;\n }\n Utils.appendChild(this._selectElement, option_1);\n }\n this._selectElement.onchange = function () {\n _this.internalApplyAriaCurrent();\n _this.valueChanged();\n };\n this.internalApplyAriaCurrent();\n return this._selectElement;\n }\n }\n };\n ChoiceSetInput.prototype.getJsonTypeName = function () {\n return \"Input.ChoiceSet\";\n };\n ChoiceSetInput.prototype.focus = function () {\n if (this._toggleInputs && (this.isMultiSelect || this.style === \"expanded\")) {\n if (this._toggleInputs.length > 0) {\n this._toggleInputs[0].focus();\n }\n }\n else if (this._textInput) {\n this._textInput.focus();\n }\n else {\n _super.prototype.focus.call(this);\n }\n };\n ChoiceSetInput.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (this.choices.length == 0) {\n context.addFailure(this, Enums.ValidationEvent.CollectionCantBeEmpty, strings_1.Strings.errors.choiceSetMustHaveAtLeastOneChoice());\n }\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\n var choice = _a[_i];\n if (!choice.title || !choice.value) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.choiceSetChoicesMustHaveTitleAndValue());\n }\n }\n };\n ChoiceSetInput.prototype.isSet = function () {\n return this.value ? true : false;\n };\n ChoiceSetInput.prototype.isValid = function () {\n if (this._textInput) {\n if (this.value === \"\" || this.value === this.placeholder) {\n return true;\n }\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\n var choice = _a[_i];\n if (this.value === choice.value) {\n return true;\n }\n }\n return false;\n }\n return _super.prototype.isValid.call(this);\n };\n Object.defineProperty(ChoiceSetInput.prototype, \"value\", {\n get: function () {\n if (!this.isMultiSelect) {\n if (this._selectElement) {\n return this._selectElement.selectedIndex > 0 ? this._selectElement.value : undefined;\n }\n else if (this._textInput) {\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\n var choice = _a[_i];\n if (choice.title && this._textInput.value === choice.title) {\n return choice.value;\n }\n }\n return this._textInput.value;\n }\n else if (this._toggleInputs && this._toggleInputs.length > 0) {\n for (var _b = 0, _c = this._toggleInputs; _b < _c.length; _b++) {\n var toggleInput = _c[_b];\n if (toggleInput.checked) {\n return toggleInput.value;\n }\n }\n }\n return undefined;\n }\n else {\n if (!this._toggleInputs || this._toggleInputs.length == 0) {\n return undefined;\n }\n var result = \"\";\n for (var _d = 0, _e = this._toggleInputs; _d < _e.length; _d++) {\n var toggleInput = _e[_d];\n if (toggleInput.checked) {\n if (result != \"\") {\n result += this.hostConfig.choiceSetInputValueSeparator;\n }\n result += toggleInput.value;\n }\n }\n return result ? result : undefined;\n }\n },\n enumerable: false,\n configurable: true\n });\n ChoiceSetInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\n ChoiceSetInput.choicesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"choices\", Choice);\n ChoiceSetInput.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_0, \"style\", [\n { value: \"compact\" },\n { value: \"expanded\" },\n { value: \"filtered\", targetVersion: serialization_1.Versions.v1_5 }\n ], \"compact\");\n ChoiceSetInput.isMultiSelectProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"isMultiSelect\", false);\n ChoiceSetInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\n ChoiceSetInput.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"wrap\", false);\n //#endregion\n ChoiceSetInput.uniqueCategoryCounter = 0;\n __decorate([\n serialization_1.property(ChoiceSetInput.valueProperty)\n ], ChoiceSetInput.prototype, \"defaultValue\", void 0);\n __decorate([\n serialization_1.property(ChoiceSetInput.styleProperty)\n ], ChoiceSetInput.prototype, \"style\", void 0);\n __decorate([\n serialization_1.property(ChoiceSetInput.isMultiSelectProperty)\n ], ChoiceSetInput.prototype, \"isMultiSelect\", void 0);\n __decorate([\n serialization_1.property(ChoiceSetInput.placeholderProperty)\n ], ChoiceSetInput.prototype, \"placeholder\", void 0);\n __decorate([\n serialization_1.property(ChoiceSetInput.wrapProperty)\n ], ChoiceSetInput.prototype, \"wrap\", void 0);\n __decorate([\n serialization_1.property(ChoiceSetInput.choicesProperty)\n ], ChoiceSetInput.prototype, \"choices\", void 0);\n return ChoiceSetInput;\n}(Input));\nexports.ChoiceSetInput = ChoiceSetInput;\nvar NumberInput = /** @class */ (function (_super) {\n __extends(NumberInput, _super);\n function NumberInput() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NumberInput.prototype.internalRender = function () {\n var _this = this;\n this._numberInputElement = document.createElement(\"input\");\n this._numberInputElement.setAttribute(\"type\", \"number\");\n if (this.min !== undefined) {\n this._numberInputElement.setAttribute(\"min\", this.min.toString());\n }\n if (this.max !== undefined) {\n this._numberInputElement.setAttribute(\"max\", this.max.toString());\n }\n this._numberInputElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-numberInput\");\n this._numberInputElement.style.width = \"100%\";\n this._numberInputElement.tabIndex = 0;\n if (this.defaultValue !== undefined) {\n this._numberInputElement.valueAsNumber = this.defaultValue;\n }\n if (this.placeholder) {\n this._numberInputElement.placeholder = this.placeholder;\n this._numberInputElement.setAttribute(\"aria-label\", this.placeholder);\n }\n this._numberInputElement.oninput = function () { _this.valueChanged(); };\n return this._numberInputElement;\n };\n NumberInput.prototype.getJsonTypeName = function () {\n return \"Input.Number\";\n };\n NumberInput.prototype.isSet = function () {\n return this.value !== undefined && !isNaN(this.value);\n };\n NumberInput.prototype.isValid = function () {\n if (this.value === undefined) {\n return !this.isRequired;\n }\n var result = true;\n if (this.min !== undefined) {\n result = result && (this.value >= this.min);\n }\n if (this.max !== undefined) {\n result = result && (this.value <= this.max);\n }\n return result;\n };\n Object.defineProperty(NumberInput.prototype, \"value\", {\n get: function () {\n return this._numberInputElement ? this._numberInputElement.valueAsNumber : undefined;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n NumberInput.valueProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"value\");\n NumberInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\n NumberInput.minProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"min\");\n NumberInput.maxProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"max\");\n __decorate([\n serialization_1.property(NumberInput.valueProperty)\n ], NumberInput.prototype, \"defaultValue\", void 0);\n __decorate([\n serialization_1.property(NumberInput.minProperty)\n ], NumberInput.prototype, \"min\", void 0);\n __decorate([\n serialization_1.property(NumberInput.maxProperty)\n ], NumberInput.prototype, \"max\", void 0);\n __decorate([\n serialization_1.property(NumberInput.placeholderProperty)\n ], NumberInput.prototype, \"placeholder\", void 0);\n return NumberInput;\n}(Input));\nexports.NumberInput = NumberInput;\nvar DateInput = /** @class */ (function (_super) {\n __extends(DateInput, _super);\n function DateInput() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DateInput.prototype.internalRender = function () {\n var _this = this;\n this._dateInputElement = document.createElement(\"input\");\n this._dateInputElement.setAttribute(\"type\", \"date\");\n if (this.min) {\n this._dateInputElement.setAttribute(\"min\", this.min);\n }\n if (this.max) {\n this._dateInputElement.setAttribute(\"max\", this.max);\n }\n if (this.placeholder) {\n this._dateInputElement.placeholder = this.placeholder;\n this._dateInputElement.setAttribute(\"aria-label\", this.placeholder);\n }\n this._dateInputElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-dateInput\");\n this._dateInputElement.style.width = \"100%\";\n this._dateInputElement.oninput = function () { _this.valueChanged(); };\n if (this.defaultValue) {\n this._dateInputElement.value = this.defaultValue;\n }\n return this._dateInputElement;\n };\n DateInput.prototype.getJsonTypeName = function () {\n return \"Input.Date\";\n };\n DateInput.prototype.isSet = function () {\n return this.value ? true : false;\n };\n DateInput.prototype.isValid = function () {\n if (!this.value) {\n return !this.isRequired;\n }\n var valueAsDate = new Date(this.value);\n var result = true;\n if (this.min) {\n var minDate = new Date(this.min);\n result = result && (valueAsDate >= minDate);\n }\n if (this.max) {\n var maxDate = new Date(this.max);\n result = result && (valueAsDate <= maxDate);\n }\n return result;\n };\n Object.defineProperty(DateInput.prototype, \"value\", {\n get: function () {\n return this._dateInputElement ? this._dateInputElement.value : undefined;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n DateInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\n DateInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\n DateInput.minProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"min\");\n DateInput.maxProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"max\");\n __decorate([\n serialization_1.property(DateInput.valueProperty)\n ], DateInput.prototype, \"defaultValue\", void 0);\n __decorate([\n serialization_1.property(DateInput.minProperty)\n ], DateInput.prototype, \"min\", void 0);\n __decorate([\n serialization_1.property(DateInput.maxProperty)\n ], DateInput.prototype, \"max\", void 0);\n __decorate([\n serialization_1.property(DateInput.placeholderProperty)\n ], DateInput.prototype, \"placeholder\", void 0);\n return DateInput;\n}(Input));\nexports.DateInput = DateInput;\nvar TimeProperty = /** @class */ (function (_super) {\n __extends(TimeProperty, _super);\n function TimeProperty(targetVersion, name) {\n var _this = _super.call(this, targetVersion, name, function (sender, property, source, context) {\n var value = source[property.name];\n if (typeof value === \"string\" && value && /^[0-9]{2}:[0-9]{2}$/.test(value)) {\n return value;\n }\n return undefined;\n }, function (sender, property, target, value, context) {\n context.serializeValue(target, property.name, value);\n }) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n return _this;\n }\n return TimeProperty;\n}(serialization_1.CustomProperty));\nexports.TimeProperty = TimeProperty;\nvar TimeInput = /** @class */ (function (_super) {\n __extends(TimeInput, _super);\n function TimeInput() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TimeInput.convertTimeStringToDate = function (timeString) {\n return new Date(\"1973-09-04T\" + timeString + \":00Z\");\n };\n TimeInput.prototype.internalRender = function () {\n var _this = this;\n this._timeInputElement = document.createElement(\"input\");\n this._timeInputElement.setAttribute(\"type\", \"time\");\n this._timeInputElement.setAttribute(\"min\", this.min);\n this._timeInputElement.setAttribute(\"max\", this.max);\n this._timeInputElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-timeInput\");\n this._timeInputElement.style.width = \"100%\";\n this._timeInputElement.oninput = function () { _this.valueChanged(); };\n if (this.placeholder) {\n this._timeInputElement.placeholder = this.placeholder;\n this._timeInputElement.setAttribute(\"aria-label\", this.placeholder);\n }\n if (this.defaultValue) {\n this._timeInputElement.value = this.defaultValue;\n }\n return this._timeInputElement;\n };\n TimeInput.prototype.getJsonTypeName = function () {\n return \"Input.Time\";\n };\n TimeInput.prototype.isSet = function () {\n return this.value ? true : false;\n };\n TimeInput.prototype.isValid = function () {\n if (!this.value) {\n return !this.isRequired;\n }\n var valueAsDate = TimeInput.convertTimeStringToDate(this.value);\n var result = true;\n if (this.min) {\n var minDate = TimeInput.convertTimeStringToDate(this.min);\n result = result && (valueAsDate >= minDate);\n }\n if (this.max) {\n var maxDate = TimeInput.convertTimeStringToDate(this.max);\n result = result && (valueAsDate <= maxDate);\n }\n return result;\n };\n Object.defineProperty(TimeInput.prototype, \"value\", {\n get: function () {\n return this._timeInputElement ? this._timeInputElement.value : undefined;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n TimeInput.valueProperty = new TimeProperty(serialization_1.Versions.v1_0, \"value\");\n TimeInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\n TimeInput.minProperty = new TimeProperty(serialization_1.Versions.v1_0, \"min\");\n TimeInput.maxProperty = new TimeProperty(serialization_1.Versions.v1_0, \"max\");\n __decorate([\n serialization_1.property(TimeInput.valueProperty)\n ], TimeInput.prototype, \"defaultValue\", void 0);\n __decorate([\n serialization_1.property(TimeInput.minProperty)\n ], TimeInput.prototype, \"min\", void 0);\n __decorate([\n serialization_1.property(TimeInput.maxProperty)\n ], TimeInput.prototype, \"max\", void 0);\n __decorate([\n serialization_1.property(TimeInput.placeholderProperty)\n ], TimeInput.prototype, \"placeholder\", void 0);\n return TimeInput;\n}(Input));\nexports.TimeInput = TimeInput;\nvar Action = /** @class */ (function (_super) {\n __extends(Action, _super);\n function Action() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.style = Enums.ActionStyle.Default;\n _this.mode = Enums.ActionMode.Primary;\n _this._state = 0 /* Normal */;\n _this._isFocusable = true;\n return _this;\n }\n //#endregion\n Action.prototype.renderButtonContent = function () {\n if (this.renderedElement) {\n // Cache hostConfig for perf\n var hostConfig = this.hostConfig;\n var titleElement = document.createElement(\"div\");\n titleElement.style.overflow = \"hidden\";\n titleElement.style.textOverflow = \"ellipsis\";\n if (!(hostConfig.actions.iconPlacement == Enums.ActionIconPlacement.AboveTitle || hostConfig.actions.allowTitleToWrap)) {\n titleElement.style.whiteSpace = \"nowrap\";\n }\n if (this.title) {\n titleElement.innerText = this.title;\n }\n if (!this.iconUrl) {\n this.renderedElement.classList.add(\"noIcon\");\n this.renderedElement.appendChild(titleElement);\n }\n else {\n var iconElement = document.createElement(\"img\");\n iconElement.src = this.iconUrl;\n iconElement.style.width = hostConfig.actions.iconSize + \"px\";\n iconElement.style.height = hostConfig.actions.iconSize + \"px\";\n iconElement.style.flex = \"0 0 auto\";\n if (hostConfig.actions.iconPlacement == Enums.ActionIconPlacement.AboveTitle) {\n this.renderedElement.classList.add(\"iconAbove\");\n this.renderedElement.style.flexDirection = \"column\";\n if (this.title) {\n iconElement.style.marginBottom = \"6px\";\n }\n }\n else {\n this.renderedElement.classList.add(\"iconLeft\");\n iconElement.style.maxHeight = \"100%\";\n if (this.title) {\n iconElement.style.marginRight = \"6px\";\n }\n }\n this.renderedElement.appendChild(iconElement);\n this.renderedElement.appendChild(titleElement);\n }\n }\n };\n Action.prototype.getParentContainer = function () {\n if (this.parent instanceof Container) {\n return this.parent;\n }\n return this.parent ? this.parent.getParentContainer() : undefined;\n };\n Action.prototype.updateCssClasses = function () {\n var _a, _b;\n if (this.parent && this.renderedElement) {\n var hostConfig = this.parent.hostConfig;\n this.renderedElement.className = hostConfig.makeCssClassName(this.isEnabled ? \"ac-pushButton\" : \"ac-pushButton-disabled\");\n var parentContainer = this.getParentContainer();\n if (parentContainer) {\n var parentContainerStyle = parentContainer.getEffectiveStyle();\n if (parentContainerStyle) {\n this.renderedElement.classList.add(\"style-\" + parentContainerStyle);\n }\n }\n this.renderedElement.tabIndex = this.isFocusable ? 0 : -1;\n switch (this._state) {\n case 1 /* Expanded */:\n this.renderedElement.classList.add(hostConfig.makeCssClassName(\"expanded\"));\n break;\n case 2 /* Subdued */:\n this.renderedElement.classList.add(hostConfig.makeCssClassName(\"subdued\"));\n break;\n }\n if (this.style && this.isEnabled) {\n if (this.style === Enums.ActionStyle.Positive) {\n (_a = this.renderedElement.classList).add.apply(_a, hostConfig.makeCssClassNames(\"primary\", \"style-positive\"));\n }\n else {\n (_b = this.renderedElement.classList).add.apply(_b, hostConfig.makeCssClassNames(\"style-\" + this.style.toLowerCase()));\n }\n }\n }\n };\n Action.prototype.getDefaultSerializationContext = function () {\n return new SerializationContext();\n };\n Action.prototype.internalGetReferencedInputs = function () {\n return {};\n };\n Action.prototype.internalPrepareForExecution = function (inputs) {\n // Do nothing in base implementation\n };\n Action.prototype.internalValidateInputs = function (referencedInputs) {\n var result = [];\n if (referencedInputs) {\n for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) {\n var key = _a[_i];\n var input = referencedInputs[key];\n if (!input.validateValue()) {\n result.push(input);\n }\n }\n }\n return result;\n };\n Action.prototype.shouldSerialize = function (context) {\n return context.actionRegistry.findByName(this.getJsonTypeName()) !== undefined;\n };\n Action.prototype.raiseExecuteActionEvent = function () {\n if (this.onExecute) {\n this.onExecute(this);\n }\n raiseExecuteActionEvent(this);\n };\n Action.prototype.getHref = function () {\n return \"\";\n };\n Action.prototype.getAriaRole = function () {\n return \"button\";\n };\n Action.prototype.setupElementForAccessibility = function (element, promoteTooltipToLabel) {\n if (promoteTooltipToLabel === void 0) { promoteTooltipToLabel = false; }\n element.tabIndex = this.isEnabled ? 0 : -1;\n element.setAttribute(\"role\", this.getAriaRole());\n if (element instanceof HTMLButtonElement) {\n element.disabled = !this.isEnabled;\n }\n if (!this.isEnabled) {\n element.setAttribute(\"aria-disabled\", \"true\");\n }\n else {\n element.classList.add(this.hostConfig.makeCssClassName(\"ac-selectable\"));\n }\n if (this.title) {\n element.setAttribute(\"aria-label\", this.title);\n element.title = this.title;\n }\n if (this.tooltip) {\n var targetAriaAttribute = promoteTooltipToLabel ? (this.title ? \"aria-description\" : \"aria-label\") : \"aria-description\";\n element.setAttribute(targetAriaAttribute, this.tooltip);\n element.title = this.tooltip;\n }\n };\n Action.prototype.parse = function (source, context) {\n return _super.prototype.parse.call(this, source, context ? context : new SerializationContext());\n };\n Action.prototype.render = function () {\n var _this = this;\n var buttonElement = document.createElement(\"button\");\n buttonElement.type = \"button\";\n buttonElement.style.display = \"flex\";\n buttonElement.style.alignItems = \"center\";\n buttonElement.style.justifyContent = \"center\";\n buttonElement.onclick = function (e) {\n if (_this.isEnabled) {\n e.preventDefault();\n e.cancelBubble = true;\n _this.execute();\n }\n };\n this._renderedElement = buttonElement;\n this.renderButtonContent();\n this.updateCssClasses();\n this.setupElementForAccessibility(buttonElement);\n };\n Action.prototype.execute = function () {\n if (this._actionCollection) {\n this._actionCollection.actionExecuted(this);\n }\n this.raiseExecuteActionEvent();\n };\n Action.prototype.prepareForExecution = function () {\n var referencedInputs = this.getReferencedInputs();\n var invalidInputs = this.internalValidateInputs(referencedInputs);\n if (invalidInputs.length > 0) {\n invalidInputs[0].focus();\n return false;\n }\n this.internalPrepareForExecution(referencedInputs);\n return true;\n };\n ;\n Action.prototype.remove = function () {\n if (this._actionCollection) {\n return this._actionCollection.removeAction(this);\n }\n return false;\n };\n Action.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n return [];\n };\n Action.prototype.getResourceInformation = function () {\n return this.iconUrl ? [{ url: this.iconUrl, mimeType: \"image\" }] : [];\n };\n Action.prototype.getActionById = function (id) {\n return this.id === id ? this : undefined;\n };\n Action.prototype.getReferencedInputs = function () {\n return this.internalGetReferencedInputs();\n };\n /**\n * Validates the inputs associated with this action.\n *\n * @returns A list of inputs that failed validation, or an empty array if no input failed validation.\n */\n Action.prototype.validateInputs = function () {\n return this.internalValidateInputs(this.getReferencedInputs());\n };\n Object.defineProperty(Action.prototype, \"isPrimary\", {\n get: function () {\n return this.style == Enums.ActionStyle.Positive;\n },\n set: function (value) {\n if (value) {\n this.style = Enums.ActionStyle.Positive;\n }\n else {\n if (this.style == Enums.ActionStyle.Positive) {\n this.style = Enums.ActionStyle.Default;\n }\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Action.prototype, \"hostConfig\", {\n get: function () {\n return this.parent ? this.parent.hostConfig : host_config_1.defaultHostConfig;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Action.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Action.prototype, \"state\", {\n get: function () {\n return this._state;\n },\n set: function (value) {\n if (this._state !== value) {\n this._state = value;\n this.updateCssClasses();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Action.prototype, \"isFocusable\", {\n get: function () {\n return this._isFocusable;\n },\n set: function (value) {\n if (this._isFocusable !== value) {\n this._isFocusable = value;\n this.updateCssClasses();\n }\n },\n enumerable: false,\n configurable: true\n });\n Action.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\n Action.iconUrlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"iconUrl\");\n Action.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_2, \"style\", [\n { value: Enums.ActionStyle.Default },\n { value: Enums.ActionStyle.Positive },\n { value: Enums.ActionStyle.Destructive }\n ], Enums.ActionStyle.Default);\n Action.modeProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_5, \"mode\", [\n { value: Enums.ActionMode.Primary },\n { value: Enums.ActionMode.Secondary }\n ], Enums.ActionMode.Primary);\n Action.tooltipProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_5, \"tooltip\");\n Action.isEnabledProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, \"isEnabled\", true);\n __decorate([\n serialization_1.property(Action.titleProperty)\n ], Action.prototype, \"title\", void 0);\n __decorate([\n serialization_1.property(Action.iconUrlProperty)\n ], Action.prototype, \"iconUrl\", void 0);\n __decorate([\n serialization_1.property(Action.styleProperty)\n ], Action.prototype, \"style\", void 0);\n __decorate([\n serialization_1.property(Action.modeProperty)\n ], Action.prototype, \"mode\", void 0);\n __decorate([\n serialization_1.property(Action.tooltipProperty)\n ], Action.prototype, \"tooltip\", void 0);\n __decorate([\n serialization_1.property(Action.isEnabledProperty)\n ], Action.prototype, \"isEnabled\", void 0);\n return Action;\n}(card_object_1.CardObject));\nexports.Action = Action;\nvar SubmitActionBase = /** @class */ (function (_super) {\n __extends(SubmitActionBase, _super);\n function SubmitActionBase() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n //#endregion\n _this._isPrepared = false;\n return _this;\n }\n SubmitActionBase.prototype.internalGetReferencedInputs = function () {\n var result = {};\n if (this.associatedInputs !== \"none\") {\n var current = this.parent;\n var inputs = [];\n while (current) {\n inputs = inputs.concat(current.getAllInputs(false));\n current = current.parent;\n }\n for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {\n var input = inputs_1[_i];\n if (input.id) {\n result[input.id] = input;\n }\n }\n }\n return result;\n };\n SubmitActionBase.prototype.internalPrepareForExecution = function (inputs) {\n if (this._originalData) {\n this._processedData = JSON.parse(JSON.stringify(this._originalData));\n }\n else {\n this._processedData = {};\n }\n if (this._processedData && inputs) {\n for (var _i = 0, _a = Object.keys(inputs); _i < _a.length; _i++) {\n var key = _a[_i];\n var input = inputs[key];\n if (input.id && input.isSet()) {\n this._processedData[input.id] = typeof input.value === \"string\" ? input.value : input.value.toString();\n }\n }\n }\n this._isPrepared = true;\n };\n Object.defineProperty(SubmitActionBase.prototype, \"data\", {\n get: function () {\n return this._isPrepared ? this._processedData : this._originalData;\n },\n set: function (value) {\n this._originalData = value;\n this._isPrepared = false;\n },\n enumerable: false,\n configurable: true\n });\n SubmitActionBase.dataProperty = new serialization_1.PropertyDefinition(serialization_1.Versions.v1_0, \"data\");\n SubmitActionBase.associatedInputsProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_3, \"associatedInputs\", function (sender, property, source, context) {\n var value = source[property.name];\n if (value !== undefined && typeof value === \"string\") {\n return value.toLowerCase() === \"none\" ? \"none\" : \"auto\";\n }\n return undefined;\n }, function (sender, property, target, value, context) {\n context.serializeValue(target, property.name, value);\n });\n __decorate([\n serialization_1.property(SubmitActionBase.dataProperty)\n ], SubmitActionBase.prototype, \"_originalData\", void 0);\n __decorate([\n serialization_1.property(SubmitActionBase.associatedInputsProperty)\n ], SubmitActionBase.prototype, \"associatedInputs\", void 0);\n return SubmitActionBase;\n}(Action));\nexports.SubmitActionBase = SubmitActionBase;\nvar SubmitAction = /** @class */ (function (_super) {\n __extends(SubmitAction, _super);\n function SubmitAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SubmitAction.prototype.getJsonTypeName = function () {\n return SubmitAction.JsonTypeName;\n };\n // Note the \"weird\" way this field is declared is to work around a breaking\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n SubmitAction.JsonTypeName = \"Action.Submit\";\n return SubmitAction;\n}(SubmitActionBase));\nexports.SubmitAction = SubmitAction;\nvar ExecuteAction = /** @class */ (function (_super) {\n __extends(ExecuteAction, _super);\n function ExecuteAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n //#endregion\n ExecuteAction.prototype.getJsonTypeName = function () {\n return ExecuteAction.JsonTypeName;\n };\n // Note the \"weird\" way this field is declared is to work around a breaking\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n ExecuteAction.JsonTypeName = \"Action.Execute\";\n //#region Schema\n ExecuteAction.verbProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"verb\");\n __decorate([\n serialization_1.property(ExecuteAction.verbProperty)\n ], ExecuteAction.prototype, \"verb\", void 0);\n return ExecuteAction;\n}(SubmitActionBase));\nexports.ExecuteAction = ExecuteAction;\nvar OpenUrlAction = /** @class */ (function (_super) {\n __extends(OpenUrlAction, _super);\n function OpenUrlAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n OpenUrlAction.prototype.getJsonTypeName = function () {\n return OpenUrlAction.JsonTypeName;\n };\n OpenUrlAction.prototype.getAriaRole = function () {\n return \"link\";\n };\n OpenUrlAction.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (!this.url) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"url\"));\n }\n };\n OpenUrlAction.prototype.getHref = function () {\n return this.url;\n };\n //#region Schema\n OpenUrlAction.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"url\");\n //#endregion\n // Note the \"weird\" way this field is declared is to work around a breaking\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n OpenUrlAction.JsonTypeName = \"Action.OpenUrl\";\n __decorate([\n serialization_1.property(OpenUrlAction.urlProperty)\n ], OpenUrlAction.prototype, \"url\", void 0);\n return OpenUrlAction;\n}(Action));\nexports.OpenUrlAction = OpenUrlAction;\nvar ToggleVisibilityAction = /** @class */ (function (_super) {\n __extends(ToggleVisibilityAction, _super);\n function ToggleVisibilityAction() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.targetElements = {};\n return _this;\n }\n ToggleVisibilityAction.prototype.updateAriaControlsAttribute = function () {\n // apply aria labels to make it clear which elements this action will toggle\n if (this.targetElements) {\n var elementIds = Object.keys(this.targetElements);\n if (this._renderedElement) {\n if (elementIds.length > 0) {\n this._renderedElement.setAttribute(\"aria-controls\", elementIds.join(\" \"));\n }\n else {\n this._renderedElement.removeAttribute(\"aria-controls\");\n }\n }\n }\n };\n ToggleVisibilityAction.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (!this.targetElements) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"targetElements\"));\n }\n };\n ToggleVisibilityAction.prototype.getJsonTypeName = function () {\n return ToggleVisibilityAction.JsonTypeName;\n };\n ToggleVisibilityAction.prototype.render = function () {\n _super.prototype.render.call(this);\n this.updateAriaControlsAttribute();\n };\n ToggleVisibilityAction.prototype.execute = function () {\n if (this.parent) {\n for (var _i = 0, _a = Object.keys(this.targetElements); _i < _a.length; _i++) {\n var elementId = _a[_i];\n var targetElement = this.parent.getRootElement().getElementById(elementId);\n if (targetElement) {\n if (typeof this.targetElements[elementId] === \"boolean\") {\n targetElement.isVisible = this.targetElements[elementId];\n }\n else {\n targetElement.isVisible = !targetElement.isVisible;\n }\n }\n }\n }\n };\n ToggleVisibilityAction.prototype.addTargetElement = function (elementId, isVisible) {\n if (isVisible === void 0) { isVisible = undefined; }\n this.targetElements[elementId] = isVisible;\n this.updateAriaControlsAttribute();\n };\n ToggleVisibilityAction.prototype.removeTargetElement = function (elementId) {\n delete this.targetElements[elementId];\n this.updateAriaControlsAttribute();\n };\n ToggleVisibilityAction.targetElementsProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_2, \"targetElements\", function (sender, property, source, context) {\n var result = {};\n if (Array.isArray(source[property.name])) {\n for (var _i = 0, _a = source[property.name]; _i < _a.length; _i++) {\n var item = _a[_i];\n if (typeof item === \"string\") {\n result[item] = undefined;\n }\n else if (typeof item === \"object\") {\n var elementId = item[\"elementId\"];\n if (typeof elementId === \"string\") {\n result[elementId] = Utils.parseBool(item[\"isVisible\"]);\n }\n }\n }\n }\n return result;\n }, function (sender, property, target, value, context) {\n var targetElements = [];\n for (var _i = 0, _a = Object.keys(value); _i < _a.length; _i++) {\n var id = _a[_i];\n if (typeof value[id] === \"boolean\") {\n targetElements.push({\n elementId: id,\n isVisible: value[id]\n });\n }\n else {\n targetElements.push(id);\n }\n }\n context.serializeArray(target, property.name, targetElements);\n }, {}, function (sender) { return {}; });\n //#endregion\n // Note the \"weird\" way this field is declared is to work around a breaking\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n ToggleVisibilityAction.JsonTypeName = \"Action.ToggleVisibility\";\n __decorate([\n serialization_1.property(ToggleVisibilityAction.targetElementsProperty)\n ], ToggleVisibilityAction.prototype, \"targetElements\", void 0);\n return ToggleVisibilityAction;\n}(Action));\nexports.ToggleVisibilityAction = ToggleVisibilityAction;\nvar StringWithSubstitutionProperty = /** @class */ (function (_super) {\n __extends(StringWithSubstitutionProperty, _super);\n function StringWithSubstitutionProperty(targetVersion, name) {\n var _this = _super.call(this, targetVersion, name, undefined, function () { return new shared_1.StringWithSubstitutions(); }) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n return _this;\n }\n StringWithSubstitutionProperty.prototype.parse = function (sender, source, context) {\n var result = new shared_1.StringWithSubstitutions();\n result.set(Utils.parseString(source[this.name]));\n return result;\n };\n StringWithSubstitutionProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeValue(target, this.name, value.getOriginal());\n };\n return StringWithSubstitutionProperty;\n}(serialization_1.PropertyDefinition));\nvar HttpHeader = /** @class */ (function (_super) {\n __extends(HttpHeader, _super);\n //#endregion\n function HttpHeader(name, value) {\n if (name === void 0) { name = \"\"; }\n if (value === void 0) { value = \"\"; }\n var _this = _super.call(this) || this;\n _this.name = name;\n _this.value = value;\n return _this;\n }\n HttpHeader.prototype.getSchemaKey = function () {\n return \"HttpHeader\";\n };\n HttpHeader.prototype.getReferencedInputs = function (inputs, referencedInputs) {\n this._value.getReferencedInputs(inputs, referencedInputs);\n };\n HttpHeader.prototype.prepareForExecution = function (inputs) {\n this._value.substituteInputValues(inputs, shared_1.ContentTypes.applicationXWwwFormUrlencoded);\n };\n Object.defineProperty(HttpHeader.prototype, \"value\", {\n get: function () {\n return this._value.get();\n },\n set: function (newValue) {\n this._value.set(newValue);\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n HttpHeader.nameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"name\");\n HttpHeader.valueProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, \"value\");\n __decorate([\n serialization_1.property(HttpHeader.nameProperty)\n ], HttpHeader.prototype, \"name\", void 0);\n __decorate([\n serialization_1.property(HttpHeader.valueProperty)\n ], HttpHeader.prototype, \"_value\", void 0);\n return HttpHeader;\n}(serialization_1.SerializableObject));\nexports.HttpHeader = HttpHeader;\nvar HttpAction = /** @class */ (function (_super) {\n __extends(HttpAction, _super);\n function HttpAction() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._ignoreInputValidation = false;\n return _this;\n }\n HttpAction.prototype.internalGetReferencedInputs = function () {\n var allInputs = this.parent ? this.parent.getRootElement().getAllInputs() : [];\n var result = {};\n this._url.getReferencedInputs(allInputs, result);\n for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {\n var header = _a[_i];\n header.getReferencedInputs(allInputs, result);\n }\n this._body.getReferencedInputs(allInputs, result);\n return result;\n };\n HttpAction.prototype.internalPrepareForExecution = function (inputs) {\n if (inputs) {\n this._url.substituteInputValues(inputs, shared_1.ContentTypes.applicationXWwwFormUrlencoded);\n var contentType = shared_1.ContentTypes.applicationJson;\n for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {\n var header = _a[_i];\n header.prepareForExecution(inputs);\n if (header.name && header.name.toLowerCase() == \"content-type\") {\n contentType = header.value;\n }\n }\n this._body.substituteInputValues(inputs, contentType);\n }\n };\n ;\n HttpAction.prototype.getJsonTypeName = function () {\n return HttpAction.JsonTypeName;\n };\n HttpAction.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (!this.url) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"url\"));\n }\n if (this.headers.length > 0) {\n for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {\n var header = _a[_i];\n if (!header.name) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.actionHttpHeadersMustHaveNameAndValue());\n }\n }\n }\n };\n Object.defineProperty(HttpAction.prototype, \"ignoreInputValidation\", {\n get: function () {\n return this._ignoreInputValidation;\n },\n set: function (value) {\n this._ignoreInputValidation = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(HttpAction.prototype, \"url\", {\n get: function () {\n return this._url.get();\n },\n set: function (value) {\n this._url.set(value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(HttpAction.prototype, \"body\", {\n get: function () {\n return this._body.get();\n },\n set: function (value) {\n this._body.set(value);\n },\n enumerable: false,\n configurable: true\n });\n HttpAction.urlProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, \"url\");\n HttpAction.bodyProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, \"body\");\n HttpAction.methodProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"method\");\n HttpAction.headersProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"headers\", HttpHeader);\n HttpAction.ignoreInputValidationProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, \"ignoreInputValidation\", false);\n //#endregion\n // Note the \"weird\" way this field is declared is to work around a breaking\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n HttpAction.JsonTypeName = \"Action.Http\";\n __decorate([\n serialization_1.property(HttpAction.urlProperty)\n ], HttpAction.prototype, \"_url\", void 0);\n __decorate([\n serialization_1.property(HttpAction.bodyProperty)\n ], HttpAction.prototype, \"_body\", void 0);\n __decorate([\n serialization_1.property(HttpAction.methodProperty)\n ], HttpAction.prototype, \"method\", void 0);\n __decorate([\n serialization_1.property(HttpAction.headersProperty)\n ], HttpAction.prototype, \"headers\", void 0);\n __decorate([\n serialization_1.property(HttpAction.ignoreInputValidationProperty)\n ], HttpAction.prototype, \"_ignoreInputValidation\", void 0);\n return HttpAction;\n}(Action));\nexports.HttpAction = HttpAction;\nvar ShowCardAction = /** @class */ (function (_super) {\n __extends(ShowCardAction, _super);\n function ShowCardAction() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.card = new InlineAdaptiveCard();\n return _this;\n }\n ShowCardAction.prototype.updateCssClasses = function () {\n _super.prototype.updateCssClasses.call(this);\n if (this.renderedElement) {\n var effectiveHostConfig = this.parent ? this.parent.hostConfig : host_config_1.defaultHostConfig;\n this.renderedElement.classList.add(effectiveHostConfig.makeCssClassName(\"expandable\"));\n this.renderedElement.setAttribute(\"aria-expanded\", (this.state === 1 /* Expanded */).toString());\n }\n };\n ShowCardAction.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n var jsonCard = source[\"card\"];\n if (jsonCard) {\n this.card.parse(jsonCard, context);\n }\n else {\n context.logParseEvent(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.showCardMustHaveCard());\n }\n };\n ShowCardAction.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n if (this.card) {\n context.serializeValue(target, \"card\", this.card.toJSON(context));\n }\n };\n ShowCardAction.prototype.raiseExecuteActionEvent = function () {\n if (this.hostConfig.actions.showCard.actionMode === Enums.ShowCardActionMode.Popup) {\n // Only raise the event in Popup mode.\n _super.prototype.raiseExecuteActionEvent.call(this);\n }\n };\n ShowCardAction.prototype.getJsonTypeName = function () {\n return ShowCardAction.JsonTypeName;\n };\n ShowCardAction.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n this.card.internalValidateProperties(context);\n };\n ShowCardAction.prototype.setParent = function (value) {\n _super.prototype.setParent.call(this, value);\n this.card.setParent(value);\n };\n ShowCardAction.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n return this.card.getAllInputs(processActions);\n };\n ShowCardAction.prototype.getResourceInformation = function () {\n return _super.prototype.getResourceInformation.call(this).concat(this.card.getResourceInformation());\n };\n ShowCardAction.prototype.getActionById = function (id) {\n var result = _super.prototype.getActionById.call(this, id);\n if (!result) {\n result = this.card.getActionById(id);\n }\n return result;\n };\n // Note the \"weird\" way this field is declared is to work around a breaking\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n ShowCardAction.JsonTypeName = \"Action.ShowCard\";\n return ShowCardAction;\n}(Action));\nexports.ShowCardAction = ShowCardAction;\nvar OverflowAction = /** @class */ (function (_super) {\n __extends(OverflowAction, _super);\n function OverflowAction(actions) {\n var _this = _super.call(this) || this;\n _this.actions = actions;\n _this.title = strings_1.Strings.defaults.overflowButtonText();\n return _this;\n }\n OverflowAction.prototype.getActions = function () {\n return this.actions;\n };\n OverflowAction.prototype.getJsonTypeName = function () {\n return ShowCardAction.JsonTypeName;\n };\n OverflowAction.prototype.execute = function () {\n var _this = this;\n var _a;\n var shouldDisplayPopupMenu = !raiseDisplayOverflowActionMenuEvent(this, this.renderedElement);\n if (shouldDisplayPopupMenu && this.renderedElement) {\n var contextMenu_1 = new controls_1.PopupMenu();\n contextMenu_1.hostConfig = this.hostConfig;\n var _loop_1 = function (i) {\n var menuItem = new controls_1.MenuItem(i.toString(), (_a = this_1.actions[i].title) !== null && _a !== void 0 ? _a : \"\");\n menuItem.isEnabled = this_1.actions[i].isEnabled;\n menuItem.onClick = function () {\n var actionToExecute = _this.actions[i];\n contextMenu_1.closePopup(false);\n if (actionToExecute.isEnabled) {\n actionToExecute.execute();\n }\n };\n contextMenu_1.items.add(menuItem);\n };\n var this_1 = this;\n for (var i = 0; i < this.actions.length; i++) {\n _loop_1(i);\n }\n ;\n contextMenu_1.popup(this.renderedElement);\n }\n };\n OverflowAction.JsonTypeName = \"Action.Overflow\";\n return OverflowAction;\n}(Action));\nvar ActionCollection = /** @class */ (function () {\n function ActionCollection(owner) {\n this._items = [];\n this._renderedActions = [];\n this._owner = owner;\n }\n ActionCollection.prototype.isActionAllowed = function (action) {\n var forbiddenTypes = this._owner.getForbiddenActionTypes();\n if (forbiddenTypes) {\n for (var _i = 0, forbiddenTypes_1 = forbiddenTypes; _i < forbiddenTypes_1.length; _i++) {\n var forbiddenType = forbiddenTypes_1[_i];\n if (action.constructor === forbiddenType) {\n return false;\n }\n }\n }\n return true;\n };\n ActionCollection.prototype.refreshContainer = function () {\n this._actionCardContainer.innerHTML = \"\";\n if (!this._actionCard) {\n this._actionCardContainer.style.marginTop = \"0px\";\n return;\n }\n this._actionCardContainer.style.marginTop = this.renderedActionCount > 0 ? this._owner.hostConfig.actions.showCard.inlineTopMargin + \"px\" : \"0px\";\n var padding = this._owner.getEffectivePadding();\n this._owner.getImmediateSurroundingPadding(padding);\n var physicalPadding = this._owner.hostConfig.paddingDefinitionToSpacingDefinition(padding);\n if (this._actionCard) {\n this._actionCard.style.paddingLeft = physicalPadding.left + \"px\";\n this._actionCard.style.paddingRight = physicalPadding.right + \"px\";\n this._actionCard.style.marginLeft = \"-\" + physicalPadding.left + \"px\";\n this._actionCard.style.marginRight = \"-\" + physicalPadding.right + \"px\";\n if (physicalPadding.bottom != 0 && !this._owner.isDesignMode()) {\n this._actionCard.style.paddingBottom = physicalPadding.bottom + \"px\";\n this._actionCard.style.marginBottom = \"-\" + physicalPadding.bottom + \"px\";\n }\n Utils.appendChild(this._actionCardContainer, this._actionCard);\n }\n };\n ActionCollection.prototype.layoutChanged = function () {\n this._owner.getRootElement().updateLayout();\n };\n ActionCollection.prototype.showActionCard = function (action, suppressStyle, raiseEvent) {\n if (suppressStyle === void 0) { suppressStyle = false; }\n if (raiseEvent === void 0) { raiseEvent = true; }\n action.card.suppressStyle = suppressStyle;\n // Always re-render a ShowCard action in design mode; reuse already rendered ShowCard (if available) otherwise\n var renderedCard = action.card.renderedElement && !this._owner.isDesignMode() ? action.card.renderedElement : action.card.render();\n this._actionCard = renderedCard;\n this._expandedAction = action;\n this.refreshContainer();\n if (raiseEvent) {\n this.layoutChanged();\n raiseInlineCardExpandedEvent(action, true);\n }\n };\n ActionCollection.prototype.collapseExpandedAction = function () {\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\n var action = _a[_i];\n action.state = 0 /* Normal */;\n }\n var previouslyExpandedAction = this._expandedAction;\n this._expandedAction = undefined;\n this._actionCard = undefined;\n this.refreshContainer();\n if (previouslyExpandedAction) {\n this.layoutChanged();\n raiseInlineCardExpandedEvent(previouslyExpandedAction, false);\n }\n };\n ActionCollection.prototype.expandShowCardAction = function (action, raiseEvent) {\n var _this = this;\n var afterSelectedAction = false;\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\n var renderedAction = _a[_i];\n // Remove actions after selected action from tabOrder, to skip focus directly to expanded card\n if (afterSelectedAction) {\n renderedAction.isFocusable = false;\n }\n if (renderedAction !== action) {\n renderedAction.state = 2 /* Subdued */;\n }\n else {\n renderedAction.state = 1 /* Expanded */;\n afterSelectedAction = true;\n if (renderedAction.renderedElement) {\n renderedAction.renderedElement.onblur = function (e) {\n for (var _i = 0, _a = _this._renderedActions; _i < _a.length; _i++) {\n var ra = _a[_i];\n ra.isFocusable = true;\n }\n };\n }\n }\n }\n this.showActionCard(action, !(this._owner.isAtTheVeryLeft() && this._owner.isAtTheVeryRight()), raiseEvent);\n };\n ActionCollection.prototype.actionExecuted = function (action) {\n if (!(action instanceof ShowCardAction)) {\n this.collapseExpandedAction();\n }\n else {\n if (action === this._expandedAction) {\n this.collapseExpandedAction();\n }\n else if (this._owner.hostConfig.actions.showCard.actionMode === Enums.ShowCardActionMode.Inline) {\n this.expandShowCardAction(action, true);\n }\n }\n };\n ActionCollection.prototype.parse = function (source, context) {\n this.clear();\n if (Array.isArray(source)) {\n for (var _i = 0, source_1 = source; _i < source_1.length; _i++) {\n var jsonAction = source_1[_i];\n var action = context.parseAction(this._owner, jsonAction, [], !this._owner.isDesignMode());\n if (action) {\n this.addAction(action);\n }\n }\n }\n };\n ActionCollection.prototype.toJSON = function (target, propertyName, context) {\n context.serializeArray(target, propertyName, this._items);\n };\n ActionCollection.prototype.getActionAt = function (id) {\n return this._items[id];\n };\n ActionCollection.prototype.getActionCount = function () {\n return this._items.length;\n };\n ActionCollection.prototype.getActionById = function (id) {\n var result = undefined;\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n result = item.getActionById(id);\n if (result) {\n break;\n }\n }\n return result;\n };\n ActionCollection.prototype.validateProperties = function (context) {\n if (this._owner.hostConfig.actions.maxActions && this._items.length > this._owner.hostConfig.actions.maxActions) {\n context.addFailure(this._owner, Enums.ValidationEvent.TooManyActions, strings_1.Strings.errors.tooManyActions(this._owner.hostConfig.actions.maxActions));\n }\n if (this._items.length > 0 && !this._owner.hostConfig.supportsInteractivity) {\n context.addFailure(this._owner, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.interactivityNotAllowed());\n }\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n if (!this.isActionAllowed(item)) {\n context.addFailure(this._owner, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(item.getJsonTypeName()));\n }\n item.internalValidateProperties(context);\n }\n };\n ActionCollection.prototype.render = function (orientation, isDesignMode) {\n // Cache hostConfig for better perf\n var hostConfig = this._owner.hostConfig;\n if (!hostConfig.supportsInteractivity) {\n return undefined;\n }\n var element = document.createElement(\"div\");\n var maxActions = hostConfig.actions.maxActions ? Math.min(hostConfig.actions.maxActions, this._items.length) : this._items.length;\n this._actionCardContainer = document.createElement(\"div\");\n this._renderedActions = [];\n if (hostConfig.actions.preExpandSingleShowCardAction && maxActions == 1 && this._items[0] instanceof ShowCardAction && this.isActionAllowed(this._items[0])) {\n this.showActionCard(this._items[0], true);\n this._renderedActions.push(this._items[0]);\n }\n else {\n var buttonStrip = document.createElement(\"div\");\n buttonStrip.className = hostConfig.makeCssClassName(\"ac-actionSet\");\n buttonStrip.style.display = \"flex\";\n buttonStrip.setAttribute(\"role\", \"menubar\");\n if (orientation == Enums.Orientation.Horizontal) {\n buttonStrip.style.flexDirection = \"row\";\n if (this._owner.horizontalAlignment && hostConfig.actions.actionAlignment != Enums.ActionAlignment.Stretch) {\n switch (this._owner.horizontalAlignment) {\n case Enums.HorizontalAlignment.Center:\n buttonStrip.style.justifyContent = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n buttonStrip.style.justifyContent = \"flex-end\";\n break;\n default:\n buttonStrip.style.justifyContent = \"flex-start\";\n break;\n }\n }\n else {\n switch (hostConfig.actions.actionAlignment) {\n case Enums.ActionAlignment.Center:\n buttonStrip.style.justifyContent = \"center\";\n break;\n case Enums.ActionAlignment.Right:\n buttonStrip.style.justifyContent = \"flex-end\";\n break;\n default:\n buttonStrip.style.justifyContent = \"flex-start\";\n break;\n }\n }\n }\n else {\n buttonStrip.style.flexDirection = \"column\";\n if (this._owner.horizontalAlignment && hostConfig.actions.actionAlignment != Enums.ActionAlignment.Stretch) {\n switch (this._owner.horizontalAlignment) {\n case Enums.HorizontalAlignment.Center:\n buttonStrip.style.alignItems = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n buttonStrip.style.alignItems = \"flex-end\";\n break;\n default:\n buttonStrip.style.alignItems = \"flex-start\";\n break;\n }\n }\n else {\n switch (hostConfig.actions.actionAlignment) {\n case Enums.ActionAlignment.Center:\n buttonStrip.style.alignItems = \"center\";\n break;\n case Enums.ActionAlignment.Right:\n buttonStrip.style.alignItems = \"flex-end\";\n break;\n case Enums.ActionAlignment.Stretch:\n buttonStrip.style.alignItems = \"stretch\";\n break;\n default:\n buttonStrip.style.alignItems = \"flex-start\";\n break;\n }\n }\n }\n var allowedActions = this._items.filter(this.isActionAllowed.bind(this));\n var primaryActions_1 = [];\n var secondaryActions_1 = [];\n if (!this._owner.isDesignMode()) {\n allowedActions.forEach(function (action) { return action.mode === Enums.ActionMode.Secondary ? secondaryActions_1.push(action) : primaryActions_1.push(action); });\n // If primaryActions.length > maxActions, extra actions are moved to overflow\n var overflowPrimaryActions = primaryActions_1.splice(hostConfig.actions.maxActions);\n if (shared_1.GlobalSettings.allowMoreThanMaxActionsInOverflowMenu) {\n secondaryActions_1.push.apply(secondaryActions_1, overflowPrimaryActions);\n }\n var shouldRenderOverflowActionButton = true;\n if (secondaryActions_1.length > 0) {\n if (!this._overflowAction) {\n this._overflowAction = new OverflowAction(secondaryActions_1);\n this._overflowAction.setParent(this._owner);\n this._overflowAction[\"_actionCollection\"] = this;\n }\n var isRootAction = this._owner instanceof AdaptiveCard && !this._owner.parent;\n shouldRenderOverflowActionButton = !raiseRenderOverflowActionsEvent(this._overflowAction, isRootAction);\n }\n if (this._overflowAction && shouldRenderOverflowActionButton) {\n primaryActions_1.push(this._overflowAction);\n }\n }\n else {\n primaryActions_1 = allowedActions;\n }\n for (var i = 0; i < primaryActions_1.length; i++) {\n var action = primaryActions_1[i];\n action.render();\n if (action.renderedElement) {\n if (primaryActions_1.length > 1) {\n action.renderedElement.setAttribute(\"aria-posinset\", (i + 1).toString());\n action.renderedElement.setAttribute(\"aria-setsize\", primaryActions_1.length.toString());\n action.renderedElement.setAttribute(\"role\", \"menuitem\");\n }\n if (hostConfig.actions.actionsOrientation == Enums.Orientation.Horizontal && hostConfig.actions.actionAlignment == Enums.ActionAlignment.Stretch) {\n action.renderedElement.style.flex = \"0 1 100%\";\n }\n else {\n action.renderedElement.style.flex = \"0 1 auto\";\n }\n buttonStrip.appendChild(action.renderedElement);\n this._renderedActions.push(action);\n if (i < primaryActions_1.length - 1 && hostConfig.actions.buttonSpacing > 0) {\n var spacer = document.createElement(\"div\");\n if (orientation === Enums.Orientation.Horizontal) {\n spacer.style.flex = \"0 0 auto\";\n spacer.style.width = hostConfig.actions.buttonSpacing + \"px\";\n }\n else {\n spacer.style.height = hostConfig.actions.buttonSpacing + \"px\";\n }\n Utils.appendChild(buttonStrip, spacer);\n }\n }\n }\n var buttonStripContainer = document.createElement(\"div\");\n buttonStripContainer.style.overflow = \"hidden\";\n buttonStripContainer.appendChild(buttonStrip);\n Utils.appendChild(element, buttonStripContainer);\n }\n Utils.appendChild(element, this._actionCardContainer);\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\n var renderedAction = _a[_i];\n if (renderedAction.state == 1 /* Expanded */) {\n this.expandShowCardAction(renderedAction, false);\n break;\n }\n }\n return this._renderedActions.length > 0 ? element : undefined;\n };\n ActionCollection.prototype.addAction = function (action) {\n if (!action) {\n throw new Error(\"The action parameter cannot be null.\");\n }\n if ((!action.parent || action.parent === this._owner) && this._items.indexOf(action) < 0) {\n this._items.push(action);\n if (!action.parent) {\n action.setParent(this._owner);\n }\n action[\"_actionCollection\"] = this;\n }\n else {\n throw new Error(strings_1.Strings.errors.actionAlreadyParented());\n }\n };\n ActionCollection.prototype.removeAction = function (action) {\n if (this.expandedAction && this._expandedAction == action) {\n this.collapseExpandedAction();\n }\n var actionIndex = this._items.indexOf(action);\n if (actionIndex >= 0) {\n this._items.splice(actionIndex, 1);\n action.setParent(undefined);\n action[\"_actionCollection\"] = undefined;\n for (var i = 0; i < this._renderedActions.length; i++) {\n if (this._renderedActions[i] == action) {\n this._renderedActions.splice(i, 1);\n break;\n }\n }\n return true;\n }\n return false;\n };\n ActionCollection.prototype.clear = function () {\n this._items = [];\n this._renderedActions = [];\n this._expandedAction = undefined;\n };\n ActionCollection.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n var result = [];\n if (processActions) {\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var action = _a[_i];\n result = result.concat(action.getAllInputs());\n }\n }\n return result;\n };\n ActionCollection.prototype.getResourceInformation = function () {\n var result = [];\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var action = _a[_i];\n result = result.concat(action.getResourceInformation());\n }\n return result;\n };\n Object.defineProperty(ActionCollection.prototype, \"renderedActionCount\", {\n get: function () {\n return this._renderedActions.length;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ActionCollection.prototype, \"expandedAction\", {\n get: function () {\n return this._expandedAction;\n },\n enumerable: false,\n configurable: true\n });\n return ActionCollection;\n}());\nvar ActionSet = /** @class */ (function (_super) {\n __extends(ActionSet, _super);\n function ActionSet() {\n var _this = _super.call(this) || this;\n _this._actionCollection = new ActionCollection(_this);\n return _this;\n }\n ActionSet.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this._actionCollection.parse(source[\"actions\"], context);\n };\n ActionSet.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n this._actionCollection.toJSON(target, \"actions\", context);\n };\n ActionSet.prototype.internalRender = function () {\n return this._actionCollection.render(this.orientation !== undefined ? this.orientation : this.hostConfig.actions.actionsOrientation, this.isDesignMode());\n };\n ActionSet.prototype.isBleedingAtBottom = function () {\n if (this._actionCollection.renderedActionCount == 0) {\n return _super.prototype.isBleedingAtBottom.call(this);\n }\n else {\n if (this._actionCollection.getActionCount() == 1) {\n return this._actionCollection.expandedAction !== undefined && !this.hostConfig.actions.preExpandSingleShowCardAction;\n }\n else {\n return this._actionCollection.expandedAction !== undefined;\n }\n }\n };\n ActionSet.prototype.getJsonTypeName = function () {\n return \"ActionSet\";\n };\n ActionSet.prototype.getActionCount = function () {\n return this._actionCollection.getActionCount();\n };\n ActionSet.prototype.getActionAt = function (index) {\n if (index >= 0 && index < this.getActionCount()) {\n return this._actionCollection.getActionAt(index);\n }\n else {\n return _super.prototype.getActionAt.call(this, index);\n }\n };\n ActionSet.prototype.getActionById = function (id) {\n var result = this._actionCollection.getActionById(id);\n return result ? result : _super.prototype.getActionById.call(this, id);\n };\n ActionSet.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n this._actionCollection.validateProperties(context);\n };\n ActionSet.prototype.addAction = function (action) {\n this._actionCollection.addAction(action);\n };\n ActionSet.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n return processActions ? this._actionCollection.getAllInputs() : [];\n };\n ActionSet.prototype.getResourceInformation = function () {\n return this._actionCollection.getResourceInformation();\n };\n /**\n * @inheritdoc\n */\n ActionSet.prototype.findDOMNodeOwner = function (node) {\n var target = undefined;\n for (var i = 0; i < this.getActionCount(); i++) {\n var action = this.getActionAt(i);\n if (action) {\n // recur through each Action\n target = action.findDOMNodeOwner(node);\n if (target) {\n return target;\n }\n }\n }\n // if not found in any Action, defer to parent implementation\n return _super.prototype.findDOMNodeOwner.call(this, node);\n };\n Object.defineProperty(ActionSet.prototype, \"isInteractive\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n ActionSet.orientationProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_1, \"orientation\", Enums.Orientation);\n __decorate([\n serialization_1.property(ActionSet.orientationProperty)\n ], ActionSet.prototype, \"orientation\", void 0);\n return ActionSet;\n}(CardElement));\nexports.ActionSet = ActionSet;\nvar ContainerStyleProperty = /** @class */ (function (_super) {\n __extends(ContainerStyleProperty, _super);\n function ContainerStyleProperty(targetVersion, name, defaultValue, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, [\n { value: Enums.ContainerStyle.Default },\n { value: Enums.ContainerStyle.Emphasis },\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Accent },\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Good },\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Attention },\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Warning }\n ], defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n return _this;\n }\n return ContainerStyleProperty;\n}(serialization_1.ValueSetProperty));\nexports.ContainerStyleProperty = ContainerStyleProperty;\nvar StylableCardElementContainer = /** @class */ (function (_super) {\n __extends(StylableCardElementContainer, _super);\n function StylableCardElementContainer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(StylableCardElementContainer.prototype, \"style\", {\n get: function () {\n if (this.allowCustomStyle) {\n var style = this.getValue(StylableCardElementContainer.styleProperty);\n if (style && this.hostConfig.containerStyles.getStyleByName(style)) {\n return style;\n }\n }\n return undefined;\n },\n set: function (value) {\n this.setValue(StylableCardElementContainer.styleProperty, value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StylableCardElementContainer.prototype, \"allowCustomStyle\", {\n //#endregion\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StylableCardElementContainer.prototype, \"hasExplicitStyle\", {\n get: function () {\n return this.getValue(StylableCardElementContainer.styleProperty) !== undefined;\n },\n enumerable: false,\n configurable: true\n });\n StylableCardElementContainer.prototype.applyBorder = function () {\n // No border in base implementation\n };\n StylableCardElementContainer.prototype.applyBackground = function () {\n if (this.renderedElement) {\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));\n if (styleDefinition.backgroundColor) {\n var bgColor = Utils.stringToCssColor(styleDefinition.backgroundColor);\n this.renderedElement.style.backgroundColor = bgColor;\n }\n }\n };\n StylableCardElementContainer.prototype.applyPadding = function () {\n _super.prototype.applyPadding.call(this);\n if (!this.renderedElement) {\n return;\n }\n var physicalPadding = new shared_1.SpacingDefinition();\n if (this.getEffectivePadding()) {\n physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding());\n }\n this.renderedElement.style.paddingTop = physicalPadding.top + \"px\";\n this.renderedElement.style.paddingRight = physicalPadding.right + \"px\";\n this.renderedElement.style.paddingBottom = physicalPadding.bottom + \"px\";\n this.renderedElement.style.paddingLeft = physicalPadding.left + \"px\";\n if (this.isBleeding()) {\n // Bleed into the first parent that does have padding\n var padding = new shared_1.PaddingDefinition();\n this.getImmediateSurroundingPadding(padding);\n var surroundingPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(padding);\n this.renderedElement.style.marginRight = \"-\" + surroundingPadding.right + \"px\";\n this.renderedElement.style.marginLeft = \"-\" + surroundingPadding.left + \"px\";\n if (!this.isDesignMode()) {\n this.renderedElement.style.marginTop = \"-\" + surroundingPadding.top + \"px\";\n this.renderedElement.style.marginBottom = \"-\" + surroundingPadding.bottom + \"px\";\n }\n if (this.separatorElement && this.separatorOrientation == Enums.Orientation.Horizontal) {\n this.separatorElement.style.marginLeft = \"-\" + surroundingPadding.left + \"px\";\n this.separatorElement.style.marginRight = \"-\" + surroundingPadding.right + \"px\";\n }\n }\n else {\n this.renderedElement.style.marginRight = \"0\";\n this.renderedElement.style.marginLeft = \"0\";\n this.renderedElement.style.marginTop = \"0\";\n this.renderedElement.style.marginBottom = \"0\";\n if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) {\n this.separatorElement.style.marginRight = \"0\";\n this.separatorElement.style.marginLeft = \"0\";\n }\n }\n };\n StylableCardElementContainer.prototype.getHasBackground = function () {\n var currentElement = this.parent;\n while (currentElement) {\n var currentElementHasBackgroundImage = currentElement instanceof Container ? currentElement.backgroundImage.isValid() : false;\n if (currentElement instanceof StylableCardElementContainer) {\n if (this.hasExplicitStyle && (currentElement.getEffectiveStyle() != this.getEffectiveStyle() || currentElementHasBackgroundImage)) {\n return true;\n }\n }\n currentElement = currentElement.parent;\n }\n return false;\n };\n StylableCardElementContainer.prototype.getDefaultPadding = function () {\n return this.getHasBackground() || this.getHasBorder() ?\n new shared_1.PaddingDefinition(Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding) : _super.prototype.getDefaultPadding.call(this);\n };\n StylableCardElementContainer.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n var explicitStyle = this.getValue(StylableCardElementContainer.styleProperty);\n if (explicitStyle !== undefined) {\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(explicitStyle);\n if (!styleDefinition) {\n context.addFailure(this, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(explicitStyle, \"style\"));\n }\n }\n };\n StylableCardElementContainer.prototype.render = function () {\n var renderedElement = _super.prototype.render.call(this);\n if (renderedElement && this.getHasBackground()) {\n this.applyBackground();\n }\n this.applyBorder();\n return renderedElement;\n };\n StylableCardElementContainer.prototype.getEffectiveStyle = function () {\n var effectiveStyle = this.style;\n return effectiveStyle ? effectiveStyle : _super.prototype.getEffectiveStyle.call(this);\n };\n //#region Schema\n StylableCardElementContainer.styleProperty = new ContainerStyleProperty(serialization_1.Versions.v1_0, \"style\");\n __decorate([\n serialization_1.property(StylableCardElementContainer.styleProperty)\n ], StylableCardElementContainer.prototype, \"style\", null);\n return StylableCardElementContainer;\n}(CardElementContainer));\nexports.StylableCardElementContainer = StylableCardElementContainer;\nvar ContainerBase = /** @class */ (function (_super) {\n __extends(ContainerBase, _super);\n function ContainerBase() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._bleed = false;\n return _this;\n }\n //#endregion\n ContainerBase.prototype.adjustRenderedElementSize = function (renderedElement) {\n _super.prototype.adjustRenderedElementSize.call(this, renderedElement);\n if (this.minPixelHeight) {\n renderedElement.style.minHeight = this.minPixelHeight + \"px\";\n }\n };\n ContainerBase.prototype.getHasExpandedAction = function () {\n return false;\n };\n ContainerBase.prototype.getBleed = function () {\n return this._bleed;\n };\n ContainerBase.prototype.setBleed = function (value) {\n this._bleed = value;\n };\n Object.defineProperty(ContainerBase.prototype, \"renderedActionCount\", {\n get: function () {\n return 0;\n },\n enumerable: false,\n configurable: true\n });\n ContainerBase.prototype.isBleeding = function () {\n return (this.getHasBackground() || this.hostConfig.alwaysAllowBleed) && this.getBleed();\n };\n ContainerBase.bleedProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"bleed\", false);\n ContainerBase.minHeightProperty = new serialization_1.PixelSizeProperty(serialization_1.Versions.v1_2, \"minHeight\");\n __decorate([\n serialization_1.property(ContainerBase.bleedProperty)\n ], ContainerBase.prototype, \"_bleed\", void 0);\n __decorate([\n serialization_1.property(ContainerBase.minHeightProperty)\n ], ContainerBase.prototype, \"minPixelHeight\", void 0);\n return ContainerBase;\n}(StylableCardElementContainer));\nexports.ContainerBase = ContainerBase;\nvar BackgroundImage = /** @class */ (function (_super) {\n __extends(BackgroundImage, _super);\n function BackgroundImage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n //#endregion\n BackgroundImage.prototype.getSchemaKey = function () {\n return \"BackgroundImage\";\n };\n BackgroundImage.prototype.internalParse = function (source, context) {\n if (typeof source === \"string\") {\n this.resetDefaultValues();\n this.url = source;\n }\n else {\n return _super.prototype.internalParse.call(this, source, context);\n }\n };\n BackgroundImage.prototype.apply = function (element) {\n if (this.url && element.renderedElement) {\n element.renderedElement.style.backgroundImage = \"url('\" + element.preProcessPropertyValue(BackgroundImage.urlProperty, this.url) + \"')\";\n switch (this.fillMode) {\n case Enums.FillMode.Repeat:\n element.renderedElement.style.backgroundRepeat = \"repeat\";\n break;\n case Enums.FillMode.RepeatHorizontally:\n element.renderedElement.style.backgroundRepeat = \"repeat-x\";\n break;\n case Enums.FillMode.RepeatVertically:\n element.renderedElement.style.backgroundRepeat = \"repeat-y\";\n break;\n case Enums.FillMode.Cover:\n default:\n element.renderedElement.style.backgroundRepeat = \"no-repeat\";\n element.renderedElement.style.backgroundSize = \"cover\";\n break;\n }\n switch (this.horizontalAlignment) {\n case Enums.HorizontalAlignment.Center:\n element.renderedElement.style.backgroundPositionX = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n element.renderedElement.style.backgroundPositionX = \"right\";\n break;\n }\n switch (this.verticalAlignment) {\n case Enums.VerticalAlignment.Center:\n element.renderedElement.style.backgroundPositionY = \"center\";\n break;\n case Enums.VerticalAlignment.Bottom:\n element.renderedElement.style.backgroundPositionY = \"bottom\";\n break;\n }\n }\n };\n BackgroundImage.prototype.isValid = function () {\n return this.url ? true : false;\n };\n //#region Schema\n BackgroundImage.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"url\");\n BackgroundImage.fillModeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"fillMode\", Enums.FillMode, Enums.FillMode.Cover);\n BackgroundImage.horizontalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"horizontalAlignment\", Enums.HorizontalAlignment, Enums.HorizontalAlignment.Left);\n BackgroundImage.verticalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"verticalAlignment\", Enums.VerticalAlignment, Enums.VerticalAlignment.Top);\n __decorate([\n serialization_1.property(BackgroundImage.urlProperty)\n ], BackgroundImage.prototype, \"url\", void 0);\n __decorate([\n serialization_1.property(BackgroundImage.fillModeProperty)\n ], BackgroundImage.prototype, \"fillMode\", void 0);\n __decorate([\n serialization_1.property(BackgroundImage.horizontalAlignmentProperty)\n ], BackgroundImage.prototype, \"horizontalAlignment\", void 0);\n __decorate([\n serialization_1.property(BackgroundImage.verticalAlignmentProperty)\n ], BackgroundImage.prototype, \"verticalAlignment\", void 0);\n return BackgroundImage;\n}(serialization_1.SerializableObject));\nexports.BackgroundImage = BackgroundImage;\nvar Container = /** @class */ (function (_super) {\n __extends(Container, _super);\n function Container() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n //#endregion\n _this._items = [];\n _this._renderedItems = [];\n return _this;\n }\n Object.defineProperty(Container.prototype, \"backgroundImage\", {\n get: function () {\n return this.getValue(Container.backgroundImageProperty);\n },\n enumerable: false,\n configurable: true\n });\n Container.prototype.insertItemAt = function (item, index, forceInsert) {\n if (!item.parent || forceInsert) {\n if (item.isStandalone) {\n if (index < 0 || index >= this._items.length) {\n this._items.push(item);\n }\n else {\n this._items.splice(index, 0, item);\n }\n item.setParent(this);\n }\n else {\n throw new Error(strings_1.Strings.errors.elementTypeNotStandalone(item.getJsonTypeName()));\n }\n }\n else {\n throw new Error(strings_1.Strings.errors.elementAlreadyParented());\n }\n };\n Container.prototype.getItemsCollectionPropertyName = function () {\n return \"items\";\n };\n Container.prototype.applyBackground = function () {\n if (this.backgroundImage.isValid() && this.renderedElement) {\n this.backgroundImage.apply(this);\n }\n _super.prototype.applyBackground.call(this);\n };\n Container.prototype.internalRender = function () {\n this._renderedItems = [];\n // Cache hostConfig to avoid walking the parent hierarchy several times\n var hostConfig = this.hostConfig;\n var element = document.createElement(\"div\");\n if (this.rtl !== undefined) {\n element.dir = this.rtl ? \"rtl\" : \"ltr\";\n }\n element.classList.add(hostConfig.makeCssClassName(\"ac-container\"));\n element.style.display = \"flex\";\n element.style.flexDirection = \"column\";\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\n // Forces the container to be at least as tall as its content.\n //\n // Fixes a quirk in Chrome where, for nested flex elements, the\n // inner element's height would never exceed the outer element's\n // height. This caused overflow truncation to break -- containers\n // would always be measured as not overflowing, since their heights\n // were constrained by their parents as opposed to truly reflecting\n // the height of their content.\n //\n // See the \"Browser Rendering Notes\" section of this answer:\n // https://stackoverflow.com/questions/36247140/why-doesnt-flex-item-shrink-past-content-size\n element.style.minHeight = '-webkit-min-content';\n }\n switch (this.getEffectiveVerticalContentAlignment()) {\n case Enums.VerticalAlignment.Center:\n element.style.justifyContent = \"center\";\n break;\n case Enums.VerticalAlignment.Bottom:\n element.style.justifyContent = \"flex-end\";\n break;\n default:\n element.style.justifyContent = \"flex-start\";\n break;\n }\n if (this._items.length > 0) {\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n var renderedItem = this.isElementAllowed(item) ? item.render() : undefined;\n if (renderedItem) {\n if (this._renderedItems.length > 0 && item.separatorElement) {\n item.separatorElement.style.flex = \"0 0 auto\";\n Utils.appendChild(element, item.separatorElement);\n }\n Utils.appendChild(element, renderedItem);\n this._renderedItems.push(item);\n }\n }\n }\n else {\n if (this.isDesignMode()) {\n var placeholderElement = this.createPlaceholderElement();\n placeholderElement.style.width = \"100%\";\n placeholderElement.style.height = \"100%\";\n element.appendChild(placeholderElement);\n }\n }\n return element;\n };\n Container.prototype.truncateOverflow = function (maxHeight) {\n if (this.renderedElement) {\n // Add 1 to account for rounding differences between browsers\n var boundary_1 = this.renderedElement.offsetTop + maxHeight + 1;\n var handleElement_1 = function (cardElement) {\n var elt = cardElement.renderedElement;\n if (elt) {\n switch (Utils.getFitStatus(elt, boundary_1)) {\n case Enums.ContainerFitStatus.FullyInContainer:\n var sizeChanged = cardElement['resetOverflow']();\n // If the element's size changed after resetting content,\n // we have to check if it still fits fully in the card\n if (sizeChanged) {\n handleElement_1(cardElement);\n }\n break;\n case Enums.ContainerFitStatus.Overflowing:\n var maxHeight_1 = boundary_1 - elt.offsetTop;\n cardElement['handleOverflow'](maxHeight_1);\n break;\n case Enums.ContainerFitStatus.FullyOutOfContainer:\n cardElement['handleOverflow'](0);\n break;\n }\n }\n };\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n handleElement_1(item);\n }\n return true;\n }\n return false;\n };\n Container.prototype.undoOverflowTruncation = function () {\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n item['resetOverflow']();\n }\n };\n Container.prototype.getHasBackground = function () {\n return this.backgroundImage.isValid() || _super.prototype.getHasBackground.call(this);\n };\n Container.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this.clear();\n this.setShouldFallback(false);\n var jsonItems = source[this.getItemsCollectionPropertyName()];\n if (Array.isArray(jsonItems)) {\n for (var _i = 0, jsonItems_1 = jsonItems; _i < jsonItems_1.length; _i++) {\n var item = jsonItems_1[_i];\n var element = context.parseElement(this, item, !this.isDesignMode());\n if (element) {\n this.insertItemAt(element, -1, true);\n }\n }\n }\n };\n Container.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n context.serializeArray(target, this.getItemsCollectionPropertyName(), this._items);\n };\n Object.defineProperty(Container.prototype, \"isSelectable\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Container.prototype.getEffectiveVerticalContentAlignment = function () {\n if (this.verticalContentAlignment !== undefined) {\n return this.verticalContentAlignment;\n }\n var parentContainer = this.getParentContainer();\n return parentContainer ? parentContainer.getEffectiveVerticalContentAlignment() : Enums.VerticalAlignment.Top;\n };\n Container.prototype.getItemCount = function () {\n return this._items.length;\n };\n Container.prototype.getItemAt = function (index) {\n return this._items[index];\n };\n Container.prototype.getFirstVisibleRenderedItem = function () {\n if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {\n for (var _i = 0, _a = this._renderedItems; _i < _a.length; _i++) {\n var item = _a[_i];\n if (item.isVisible) {\n return item;\n }\n }\n ;\n }\n return undefined;\n };\n Container.prototype.getLastVisibleRenderedItem = function () {\n if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {\n for (var i = this._renderedItems.length - 1; i >= 0; i--) {\n if (this._renderedItems[i].isVisible) {\n return this._renderedItems[i];\n }\n }\n }\n return undefined;\n };\n Container.prototype.getJsonTypeName = function () {\n return \"Container\";\n };\n Container.prototype.isFirstElement = function (element) {\n var designMode = this.isDesignMode();\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n if (item.isVisible || designMode) {\n return item == element;\n }\n }\n return false;\n };\n Container.prototype.isLastElement = function (element) {\n var designMode = this.isDesignMode();\n for (var i = this._items.length - 1; i >= 0; i--) {\n if (this._items[i].isVisible || designMode) {\n return this._items[i] == element;\n }\n }\n return false;\n };\n Container.prototype.isRtl = function () {\n if (this.rtl !== undefined) {\n return this.rtl;\n }\n else {\n var parentContainer = this.getParentContainer();\n return parentContainer ? parentContainer.isRtl() : false;\n }\n };\n Container.prototype.isBleedingAtTop = function () {\n var firstRenderedItem = this.getFirstVisibleRenderedItem();\n return this.isBleeding() || (firstRenderedItem ? firstRenderedItem.isBleedingAtTop() : false);\n };\n Container.prototype.isBleedingAtBottom = function () {\n var lastRenderedItem = this.getLastVisibleRenderedItem();\n return this.isBleeding() || (lastRenderedItem ? lastRenderedItem.isBleedingAtBottom() && lastRenderedItem.getEffectiveStyle() == this.getEffectiveStyle() : false);\n };\n Container.prototype.indexOf = function (cardElement) {\n return this._items.indexOf(cardElement);\n };\n Container.prototype.addItem = function (item) {\n this.insertItemAt(item, -1, false);\n };\n Container.prototype.insertItemBefore = function (item, insertBefore) {\n this.insertItemAt(item, this._items.indexOf(insertBefore), false);\n };\n Container.prototype.insertItemAfter = function (item, insertAfter) {\n this.insertItemAt(item, this._items.indexOf(insertAfter) + 1, false);\n };\n Container.prototype.removeItem = function (item) {\n var itemIndex = this._items.indexOf(item);\n if (itemIndex >= 0) {\n this._items.splice(itemIndex, 1);\n item.setParent(undefined);\n this.updateLayout();\n return true;\n }\n return false;\n };\n Container.prototype.clear = function () {\n this._items = [];\n this._renderedItems = [];\n };\n Container.prototype.getResourceInformation = function () {\n var result = _super.prototype.getResourceInformation.call(this);\n if (this.backgroundImage.isValid()) {\n result.push({\n url: this.backgroundImage.url,\n mimeType: \"image\"\n });\n }\n return result;\n };\n Container.prototype.getActionById = function (id) {\n var result = _super.prototype.getActionById.call(this, id);\n if (!result) {\n if (this.selectAction) {\n result = this.selectAction.getActionById(id);\n }\n if (!result) {\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n result = item.getActionById(id);\n if (result) {\n break;\n }\n }\n }\n }\n return result;\n };\n Object.defineProperty(Container.prototype, \"padding\", {\n get: function () {\n return this.getPadding();\n },\n set: function (value) {\n this.setPadding(value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"selectAction\", {\n get: function () {\n return this._selectAction;\n },\n set: function (value) {\n this._selectAction = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"bleed\", {\n get: function () {\n return this.getBleed();\n },\n set: function (value) {\n this.setBleed(value);\n },\n enumerable: false,\n configurable: true\n });\n Container.backgroundImageProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_0, \"backgroundImage\", BackgroundImage);\n Container.verticalContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_1, \"verticalContentAlignment\", Enums.VerticalAlignment);\n Container.rtlProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"rtl\");\n __decorate([\n serialization_1.property(Container.backgroundImageProperty)\n ], Container.prototype, \"backgroundImage\", null);\n __decorate([\n serialization_1.property(Container.verticalContentAlignmentProperty)\n ], Container.prototype, \"verticalContentAlignment\", void 0);\n __decorate([\n serialization_1.property(Container.rtlProperty)\n ], Container.prototype, \"rtl\", void 0);\n return Container;\n}(ContainerBase));\nexports.Container = Container;\nvar Column = /** @class */ (function (_super) {\n __extends(Column, _super);\n function Column(width) {\n if (width === void 0) { width = \"stretch\"; }\n var _this = _super.call(this) || this;\n _this.width = \"stretch\";\n //#endregion\n _this._computedWeight = 0;\n _this.width = width;\n return _this;\n }\n Column.prototype.adjustRenderedElementSize = function (renderedElement) {\n var minDesignTimeColumnHeight = 20;\n if (this.isDesignMode()) {\n renderedElement.style.minWidth = \"20px\";\n renderedElement.style.minHeight = (!this.minPixelHeight ? minDesignTimeColumnHeight : Math.max(this.minPixelHeight, minDesignTimeColumnHeight)) + \"px\";\n }\n else {\n renderedElement.style.minWidth = \"0\";\n if (this.minPixelHeight) {\n renderedElement.style.minHeight = this.minPixelHeight + \"px\";\n }\n }\n if (this.width === \"auto\") {\n renderedElement.style.flex = \"0 1 auto\";\n }\n else if (this.width === \"stretch\") {\n renderedElement.style.flex = \"1 1 50px\";\n }\n else if (this.width instanceof shared_1.SizeAndUnit) {\n if (this.width.unit == Enums.SizeUnit.Pixel) {\n renderedElement.style.flex = \"0 0 auto\";\n renderedElement.style.width = this.width.physicalSize + \"px\";\n }\n else {\n renderedElement.style.flex = \"1 1 \" + (this._computedWeight > 0 ? this._computedWeight : this.width.physicalSize) + \"%\";\n }\n }\n };\n Column.prototype.shouldSerialize = function (context) {\n return true;\n };\n Object.defineProperty(Column.prototype, \"separatorOrientation\", {\n get: function () {\n return Enums.Orientation.Vertical;\n },\n enumerable: false,\n configurable: true\n });\n Column.prototype.getJsonTypeName = function () {\n return \"Column\";\n };\n Object.defineProperty(Column.prototype, \"hasVisibleSeparator\", {\n get: function () {\n if (this.parent && this.parent instanceof ColumnSet) {\n return this.separatorElement !== undefined && !this.parent.isLeftMostElement(this);\n }\n else {\n return false;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Column.prototype, \"isStandalone\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n Column.widthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, \"width\", function (sender, property, source, context) {\n var result = property.defaultValue;\n var value = source[property.name];\n var invalidWidth = false;\n if (typeof value === \"number\" && !isNaN(value)) {\n result = new shared_1.SizeAndUnit(value, Enums.SizeUnit.Weight);\n }\n else if (value === \"auto\" || value === \"stretch\") {\n result = value;\n }\n else if (typeof value === \"string\") {\n try {\n result = shared_1.SizeAndUnit.parse(value);\n if (result.unit === Enums.SizeUnit.Pixel && property.targetVersion.compareTo(context.targetVersion) > 0) {\n invalidWidth = true;\n }\n }\n catch (e) {\n invalidWidth = true;\n }\n }\n else {\n invalidWidth = true;\n }\n if (invalidWidth) {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidColumnWidth(value));\n result = \"auto\";\n }\n return result;\n }, function (sender, property, target, value, context) {\n if (value instanceof shared_1.SizeAndUnit) {\n if (value.unit === Enums.SizeUnit.Pixel) {\n context.serializeValue(target, \"width\", value.physicalSize + \"px\");\n }\n else {\n context.serializeNumber(target, \"width\", value.physicalSize);\n }\n }\n else {\n context.serializeValue(target, \"width\", value);\n }\n }, \"stretch\");\n __decorate([\n serialization_1.property(Column.widthProperty)\n ], Column.prototype, \"width\", void 0);\n return Column;\n}(Container));\nexports.Column = Column;\nvar ColumnSet = /** @class */ (function (_super) {\n __extends(ColumnSet, _super);\n function ColumnSet() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._columns = [];\n return _this;\n }\n ColumnSet.prototype.createColumnInstance = function (source, context) {\n return context.parseCardObject(this, source, [], // Forbidden types not supported for elements for now\n !this.isDesignMode(), function (typeName) {\n return !typeName || typeName === \"Column\" ? new Column() : undefined;\n }, function (typeName, errorType) {\n context.logParseEvent(undefined, Enums.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\n });\n };\n ColumnSet.prototype.internalRender = function () {\n this._renderedColumns = [];\n if (this._columns.length > 0) {\n // Cache hostConfig to avoid walking the parent hierarchy several times\n var hostConfig = this.hostConfig;\n var element = document.createElement(\"div\");\n element.className = hostConfig.makeCssClassName(\"ac-columnSet\");\n element.style.display = \"flex\";\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\n // See comment in Container.internalRender()\n element.style.minHeight = '-webkit-min-content';\n }\n switch (this.getEffectiveHorizontalAlignment()) {\n case Enums.HorizontalAlignment.Center:\n element.style.justifyContent = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n element.style.justifyContent = \"flex-end\";\n break;\n default:\n element.style.justifyContent = \"flex-start\";\n break;\n }\n var totalWeight = 0;\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n if (column.width instanceof shared_1.SizeAndUnit && (column.width.unit == Enums.SizeUnit.Weight)) {\n totalWeight += column.width.physicalSize;\n }\n }\n for (var _b = 0, _c = this._columns; _b < _c.length; _b++) {\n var column = _c[_b];\n if (column.width instanceof shared_1.SizeAndUnit && column.width.unit == Enums.SizeUnit.Weight && totalWeight > 0) {\n var computedWeight = 100 / totalWeight * column.width.physicalSize;\n // Best way to emulate \"internal\" access I know of\n column[\"_computedWeight\"] = computedWeight;\n }\n var renderedColumn = column.render();\n if (renderedColumn) {\n if (this._renderedColumns.length > 0 && column.separatorElement) {\n column.separatorElement.style.flex = \"0 0 auto\";\n Utils.appendChild(element, column.separatorElement);\n }\n Utils.appendChild(element, renderedColumn);\n this._renderedColumns.push(column);\n }\n }\n return this._renderedColumns.length > 0 ? element : undefined;\n }\n else {\n return undefined;\n }\n };\n ColumnSet.prototype.truncateOverflow = function (maxHeight) {\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n column['handleOverflow'](maxHeight);\n }\n return true;\n };\n ColumnSet.prototype.undoOverflowTruncation = function () {\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n column['resetOverflow']();\n }\n };\n Object.defineProperty(ColumnSet.prototype, \"isSelectable\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n ColumnSet.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this._columns = [];\n this._renderedColumns = [];\n var jsonColumns = source[\"columns\"];\n if (Array.isArray(jsonColumns)) {\n for (var _i = 0, jsonColumns_1 = jsonColumns; _i < jsonColumns_1.length; _i++) {\n var item = jsonColumns_1[_i];\n var column = this.createColumnInstance(item, context);\n if (column) {\n this._columns.push(column);\n }\n }\n }\n };\n ColumnSet.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n context.serializeArray(target, \"columns\", this._columns);\n };\n ColumnSet.prototype.isFirstElement = function (element) {\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n if (column.isVisible) {\n return column == element;\n }\n }\n return false;\n };\n ColumnSet.prototype.isBleedingAtTop = function () {\n if (this.isBleeding()) {\n return true;\n }\n if (this._renderedColumns && this._renderedColumns.length > 0) {\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n if (column.isBleedingAtTop()) {\n return true;\n }\n }\n }\n return false;\n };\n ColumnSet.prototype.isBleedingAtBottom = function () {\n if (this.isBleeding()) {\n return true;\n }\n if (this._renderedColumns && this._renderedColumns.length > 0) {\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n if (column.isBleedingAtBottom()) {\n return true;\n }\n }\n }\n return false;\n };\n ColumnSet.prototype.getItemCount = function () {\n return this._columns.length;\n };\n ColumnSet.prototype.getFirstVisibleRenderedItem = function () {\n if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {\n return this._renderedColumns[0];\n }\n else {\n return undefined;\n }\n };\n ColumnSet.prototype.getLastVisibleRenderedItem = function () {\n if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {\n return this._renderedColumns[this._renderedColumns.length - 1];\n }\n else {\n return undefined;\n }\n };\n ColumnSet.prototype.getColumnAt = function (index) {\n return this._columns[index];\n };\n ColumnSet.prototype.getItemAt = function (index) {\n return this.getColumnAt(index);\n };\n ColumnSet.prototype.getJsonTypeName = function () {\n return \"ColumnSet\";\n };\n ColumnSet.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n var weightedColumns = 0;\n var stretchedColumns = 0;\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n if (typeof column.width === \"number\") {\n weightedColumns++;\n }\n else if (column.width === \"stretch\") {\n stretchedColumns++;\n }\n }\n if (weightedColumns > 0 && stretchedColumns > 0) {\n context.addFailure(this, Enums.ValidationEvent.Hint, strings_1.Strings.hints.dontUseWeightedAndStrecthedColumnsInSameSet());\n }\n };\n ColumnSet.prototype.addColumn = function (column) {\n if (!column.parent) {\n this._columns.push(column);\n column.setParent(this);\n }\n else {\n throw new Error(strings_1.Strings.errors.columnAlreadyBelongsToAnotherSet());\n }\n };\n ColumnSet.prototype.removeItem = function (item) {\n if (item instanceof Column) {\n var itemIndex = this._columns.indexOf(item);\n if (itemIndex >= 0) {\n this._columns.splice(itemIndex, 1);\n item.setParent(undefined);\n this.updateLayout();\n return true;\n }\n }\n return false;\n };\n ColumnSet.prototype.indexOf = function (cardElement) {\n return cardElement instanceof Column ? this._columns.indexOf(cardElement) : -1;\n };\n ColumnSet.prototype.isLeftMostElement = function (element) {\n return this._columns.indexOf(element) == 0;\n };\n ColumnSet.prototype.isRightMostElement = function (element) {\n return this._columns.indexOf(element) == this._columns.length - 1;\n };\n ColumnSet.prototype.isTopElement = function (element) {\n return this._columns.indexOf(element) >= 0;\n };\n ColumnSet.prototype.isBottomElement = function (element) {\n return this._columns.indexOf(element) >= 0;\n };\n ColumnSet.prototype.getActionById = function (id) {\n var result = undefined;\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n result = column.getActionById(id);\n if (result) {\n break;\n }\n }\n return result;\n };\n Object.defineProperty(ColumnSet.prototype, \"bleed\", {\n get: function () {\n return this.getBleed();\n },\n set: function (value) {\n this.setBleed(value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ColumnSet.prototype, \"padding\", {\n get: function () {\n return this.getPadding();\n },\n set: function (value) {\n this.setPadding(value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ColumnSet.prototype, \"selectAction\", {\n get: function () {\n return this._selectAction;\n },\n set: function (value) {\n this._selectAction = value;\n },\n enumerable: false,\n configurable: true\n });\n return ColumnSet;\n}(ContainerBase));\nexports.ColumnSet = ColumnSet;\nfunction raiseImageLoadedEvent(image) {\n var card = image.getRootElement();\n var onImageLoadedHandler = (card && card.onImageLoaded) ? card.onImageLoaded : AdaptiveCard.onImageLoaded;\n if (onImageLoadedHandler) {\n onImageLoadedHandler(image);\n }\n}\nfunction raiseAnchorClickedEvent(element, anchor, ev) {\n var card = element.getRootElement();\n var onAnchorClickedHandler = (card && card.onAnchorClicked) ? card.onAnchorClicked : AdaptiveCard.onAnchorClicked;\n return onAnchorClickedHandler !== undefined ? onAnchorClickedHandler(element, anchor, ev) : false;\n}\nfunction raiseExecuteActionEvent(action) {\n var card = action.parent ? action.parent.getRootElement() : undefined;\n var onExecuteActionHandler = (card && card.onExecuteAction) ? card.onExecuteAction : AdaptiveCard.onExecuteAction;\n if (action.prepareForExecution() && onExecuteActionHandler) {\n onExecuteActionHandler(action);\n }\n}\nfunction raiseInlineCardExpandedEvent(action, isExpanded) {\n var card = action.parent ? action.parent.getRootElement() : undefined;\n var onInlineCardExpandedHandler = (card && card.onInlineCardExpanded) ? card.onInlineCardExpanded : AdaptiveCard.onInlineCardExpanded;\n if (onInlineCardExpandedHandler) {\n onInlineCardExpandedHandler(action, isExpanded);\n }\n}\nfunction raiseInputValueChangedEvent(input) {\n var card = input.getRootElement();\n var onInputValueChangedHandler = (card && card.onInputValueChanged) ? card.onInputValueChanged : AdaptiveCard.onInputValueChanged;\n if (onInputValueChangedHandler) {\n onInputValueChangedHandler(input);\n }\n}\nfunction raiseElementVisibilityChangedEvent(element, shouldUpdateLayout) {\n if (shouldUpdateLayout === void 0) { shouldUpdateLayout = true; }\n var rootElement = element.getRootElement();\n if (shouldUpdateLayout) {\n rootElement.updateLayout();\n }\n var card = rootElement;\n var onElementVisibilityChangedHandler = (card && card.onElementVisibilityChanged) ? card.onElementVisibilityChanged : AdaptiveCard.onElementVisibilityChanged;\n if (onElementVisibilityChangedHandler !== undefined) {\n onElementVisibilityChangedHandler(element);\n }\n}\n/**\n * @returns return false to continue with default context menu; return true to skip SDK default context menu\n */\nfunction raiseDisplayOverflowActionMenuEvent(action, target) {\n var card = action.parent ? action.parent.getRootElement() : undefined;\n var onDisplayOverflowActionMenuHandler = (card && card.onDisplayOverflowActionMenu) ? card.onDisplayOverflowActionMenu : AdaptiveCard.onDisplayOverflowActionMenu;\n return onDisplayOverflowActionMenuHandler !== undefined ? onDisplayOverflowActionMenuHandler(action.getActions(), target) : false;\n}\n/**\n * @returns return false to continue with default action button; return true to skip SDK default action button\n */\nfunction raiseRenderOverflowActionsEvent(action, isAtRootLevelActions) {\n var card = action.parent ? action.parent.getRootElement() : undefined;\n var onRenderOverflowActionsHandler = (card && card.onRenderOverflowActions) ? card.onRenderOverflowActions : AdaptiveCard.onRenderOverflowActions;\n return onRenderOverflowActionsHandler !== undefined ? onRenderOverflowActionsHandler(action.getActions(), isAtRootLevelActions) : false;\n}\nvar ContainerWithActions = /** @class */ (function (_super) {\n __extends(ContainerWithActions, _super);\n function ContainerWithActions() {\n var _this = _super.call(this) || this;\n _this._actionCollection = new ActionCollection(_this);\n return _this;\n }\n ContainerWithActions.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this._actionCollection.parse(source[\"actions\"], context);\n };\n ContainerWithActions.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n this._actionCollection.toJSON(target, \"actions\", context);\n };\n ContainerWithActions.prototype.internalRender = function () {\n var element = _super.prototype.internalRender.call(this);\n if (element) {\n var renderedActions = this._actionCollection.render(this.hostConfig.actions.actionsOrientation, false);\n if (renderedActions) {\n Utils.appendChild(element, renderSeparation(this.hostConfig, {\n spacing: this.hostConfig.getEffectiveSpacing(this.hostConfig.actions.spacing)\n }, Enums.Orientation.Horizontal));\n Utils.appendChild(element, renderedActions);\n }\n if (this.renderIfEmpty) {\n return element;\n }\n else {\n return element.children.length > 0 ? element : undefined;\n }\n }\n else {\n return undefined;\n }\n };\n ContainerWithActions.prototype.getHasExpandedAction = function () {\n if (this.renderedActionCount == 0) {\n return false;\n }\n else if (this.renderedActionCount == 1) {\n return this._actionCollection.expandedAction !== undefined && !this.hostConfig.actions.preExpandSingleShowCardAction;\n }\n else {\n return this._actionCollection.expandedAction !== undefined;\n }\n };\n Object.defineProperty(ContainerWithActions.prototype, \"renderedActionCount\", {\n get: function () {\n return this._actionCollection.renderedActionCount;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ContainerWithActions.prototype, \"renderIfEmpty\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n ContainerWithActions.prototype.getActionCount = function () {\n return this._actionCollection.getActionCount();\n };\n ContainerWithActions.prototype.getActionAt = function (index) {\n if (index >= 0 && index < this.getActionCount()) {\n return this._actionCollection.getActionAt(index);\n }\n else {\n return _super.prototype.getActionAt.call(this, index);\n }\n };\n ContainerWithActions.prototype.getActionById = function (id) {\n var result = this._actionCollection.getActionById(id);\n return result ? result : _super.prototype.getActionById.call(this, id);\n };\n ContainerWithActions.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (this._actionCollection) {\n this._actionCollection.validateProperties(context);\n }\n };\n ContainerWithActions.prototype.isLastElement = function (element) {\n return _super.prototype.isLastElement.call(this, element) && this._actionCollection.getActionCount() == 0;\n };\n ContainerWithActions.prototype.addAction = function (action) {\n this._actionCollection.addAction(action);\n };\n ContainerWithActions.prototype.clear = function () {\n _super.prototype.clear.call(this);\n this._actionCollection.clear();\n };\n ContainerWithActions.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n var result = _super.prototype.getAllInputs.call(this, processActions);\n if (processActions) {\n result = result.concat(this._actionCollection.getAllInputs(processActions));\n }\n return result;\n };\n ContainerWithActions.prototype.getResourceInformation = function () {\n return _super.prototype.getResourceInformation.call(this).concat(this._actionCollection.getResourceInformation());\n };\n ContainerWithActions.prototype.isBleedingAtBottom = function () {\n if (this._actionCollection.renderedActionCount == 0) {\n return _super.prototype.isBleedingAtBottom.call(this);\n }\n else {\n if (this._actionCollection.getActionCount() == 1) {\n return this._actionCollection.expandedAction !== undefined && !this.hostConfig.actions.preExpandSingleShowCardAction;\n }\n else {\n return this._actionCollection.expandedAction !== undefined;\n }\n }\n };\n Object.defineProperty(ContainerWithActions.prototype, \"isStandalone\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n return ContainerWithActions;\n}(Container));\nexports.ContainerWithActions = ContainerWithActions;\nvar RefreshActionProperty = /** @class */ (function (_super) {\n __extends(RefreshActionProperty, _super);\n function RefreshActionProperty(targetVersion, name) {\n var _this = _super.call(this, targetVersion, name, undefined) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n return _this;\n }\n RefreshActionProperty.prototype.parse = function (sender, source, context) {\n var action = context.parseAction(sender.parent, source[this.name], [], false);\n if (action !== undefined) {\n if (action instanceof ExecuteAction) {\n return action;\n }\n context.logParseEvent(sender, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(action.getJsonTypeName()));\n }\n context.logParseEvent(sender, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"action\"));\n return undefined;\n };\n RefreshActionProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeValue(target, this.name, value ? value.toJSON(context) : undefined, undefined, true);\n };\n return RefreshActionProperty;\n}(serialization_1.PropertyDefinition));\nexports.RefreshActionProperty = RefreshActionProperty;\nvar RefreshDefinition = /** @class */ (function (_super) {\n __extends(RefreshDefinition, _super);\n function RefreshDefinition() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(RefreshDefinition.prototype, \"action\", {\n get: function () {\n return this.getValue(RefreshDefinition.actionProperty);\n },\n set: function (value) {\n this.setValue(RefreshDefinition.actionProperty, value);\n if (value) {\n value.setParent(this.parent);\n }\n },\n enumerable: false,\n configurable: true\n });\n RefreshDefinition.prototype.getSchemaKey = function () {\n return \"RefreshDefinition\";\n };\n //#region Schema\n RefreshDefinition.actionProperty = new RefreshActionProperty(serialization_1.Versions.v1_4, \"action\");\n RefreshDefinition.userIdsProperty = new serialization_1.StringArrayProperty(serialization_1.Versions.v1_4, \"userIds\");\n __decorate([\n serialization_1.property(RefreshDefinition.actionProperty)\n ], RefreshDefinition.prototype, \"action\", null);\n __decorate([\n serialization_1.property(RefreshDefinition.userIdsProperty)\n ], RefreshDefinition.prototype, \"userIds\", void 0);\n return RefreshDefinition;\n}(serialization_1.SerializableObject));\nexports.RefreshDefinition = RefreshDefinition;\nvar AuthCardButton = /** @class */ (function (_super) {\n __extends(AuthCardButton, _super);\n function AuthCardButton() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AuthCardButton.prototype.getSchemaKey = function () {\n return \"AuthCardButton\";\n };\n //#region Schema\n AuthCardButton.typeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"type\");\n AuthCardButton.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"title\");\n AuthCardButton.imageProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"image\");\n AuthCardButton.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"value\");\n __decorate([\n serialization_1.property(AuthCardButton.typeProperty)\n ], AuthCardButton.prototype, \"type\", void 0);\n __decorate([\n serialization_1.property(AuthCardButton.titleProperty)\n ], AuthCardButton.prototype, \"title\", void 0);\n __decorate([\n serialization_1.property(AuthCardButton.imageProperty)\n ], AuthCardButton.prototype, \"image\", void 0);\n __decorate([\n serialization_1.property(AuthCardButton.valueProperty)\n ], AuthCardButton.prototype, \"value\", void 0);\n return AuthCardButton;\n}(serialization_1.SerializableObject));\nexports.AuthCardButton = AuthCardButton;\nvar TokenExchangeResource = /** @class */ (function (_super) {\n __extends(TokenExchangeResource, _super);\n function TokenExchangeResource() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TokenExchangeResource.prototype.getSchemaKey = function () {\n return \"TokenExchangeResource\";\n };\n //#region Schema\n TokenExchangeResource.idProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"id\");\n TokenExchangeResource.uriProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"uri\");\n TokenExchangeResource.providerIdProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"providerId\");\n __decorate([\n serialization_1.property(TokenExchangeResource.idProperty)\n ], TokenExchangeResource.prototype, \"id\", void 0);\n __decorate([\n serialization_1.property(TokenExchangeResource.uriProperty)\n ], TokenExchangeResource.prototype, \"uri\", void 0);\n __decorate([\n serialization_1.property(TokenExchangeResource.providerIdProperty)\n ], TokenExchangeResource.prototype, \"providerId\", void 0);\n return TokenExchangeResource;\n}(serialization_1.SerializableObject));\nexports.TokenExchangeResource = TokenExchangeResource;\nvar Authentication = /** @class */ (function (_super) {\n __extends(Authentication, _super);\n function Authentication() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Authentication.prototype.getSchemaKey = function () {\n return \"Authentication\";\n };\n //#region Schema\n Authentication.textProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"text\");\n Authentication.connectionNameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"connectionName\");\n Authentication.buttonsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_4, \"buttons\", AuthCardButton);\n Authentication.tokenExchangeResourceProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, \"tokenExchangeResource\", TokenExchangeResource, true);\n __decorate([\n serialization_1.property(Authentication.textProperty)\n ], Authentication.prototype, \"text\", void 0);\n __decorate([\n serialization_1.property(Authentication.connectionNameProperty)\n ], Authentication.prototype, \"connectionName\", void 0);\n __decorate([\n serialization_1.property(Authentication.buttonsProperty)\n ], Authentication.prototype, \"buttons\", void 0);\n __decorate([\n serialization_1.property(Authentication.tokenExchangeResourceProperty)\n ], Authentication.prototype, \"tokenExchangeResource\", void 0);\n return Authentication;\n}(serialization_1.SerializableObject));\nexports.Authentication = Authentication;\n// @dynamic\nvar AdaptiveCard = /** @class */ (function (_super) {\n __extends(AdaptiveCard, _super);\n function AdaptiveCard() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.designMode = false;\n return _this;\n }\n Object.defineProperty(AdaptiveCard.prototype, \"refresh\", {\n get: function () {\n return this.getValue(AdaptiveCard.refreshProperty);\n },\n set: function (value) {\n this.setValue(AdaptiveCard.refreshProperty, value);\n if (value) {\n value.parent = this;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AdaptiveCard, \"processMarkdown\", {\n get: function () {\n throw new Error(strings_1.Strings.errors.processMarkdownEventRemoved());\n },\n set: function (value) {\n throw new Error(strings_1.Strings.errors.processMarkdownEventRemoved());\n },\n enumerable: false,\n configurable: true\n });\n AdaptiveCard.applyMarkdown = function (text) {\n var result = {\n didProcess: false\n };\n if (AdaptiveCard.onProcessMarkdown) {\n AdaptiveCard.onProcessMarkdown(text, result);\n }\n else if (window.markdownit) {\n // Check for markdownit\n var markdownIt = window.markdownit;\n result.outputHtml = markdownIt().render(text);\n result.didProcess = true;\n }\n else {\n console.warn(strings_1.Strings.errors.markdownProcessingNotEnabled);\n }\n return result;\n };\n AdaptiveCard.prototype.isVersionSupported = function () {\n if (this.bypassVersionCheck) {\n return true;\n }\n else {\n var unsupportedVersion = !this.version ||\n !this.version.isValid ||\n (this.maxVersion.major < this.version.major) ||\n (this.maxVersion.major == this.version.major && this.maxVersion.minor < this.version.minor);\n return !unsupportedVersion;\n }\n };\n AdaptiveCard.prototype.getDefaultSerializationContext = function () {\n return new SerializationContext(this.version);\n };\n AdaptiveCard.prototype.getItemsCollectionPropertyName = function () {\n return \"body\";\n };\n AdaptiveCard.prototype.internalParse = function (source, context) {\n this._fallbackCard = undefined;\n var fallbackElement = context.parseElement(undefined, source[\"fallback\"], !this.isDesignMode());\n if (fallbackElement) {\n this._fallbackCard = new AdaptiveCard();\n this._fallbackCard.addItem(fallbackElement);\n }\n _super.prototype.internalParse.call(this, source, context);\n };\n AdaptiveCard.prototype.internalToJSON = function (target, context) {\n this.setValue(AdaptiveCard.versionProperty, context.targetVersion);\n _super.prototype.internalToJSON.call(this, target, context);\n };\n AdaptiveCard.prototype.internalRender = function () {\n var renderedElement = _super.prototype.internalRender.call(this);\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && renderedElement) {\n // Unlike containers, the root card element should be allowed to\n // be shorter than its content (otherwise the overflow truncation\n // logic would never get triggered)\n renderedElement.style.removeProperty(\"minHeight\");\n }\n return renderedElement;\n };\n AdaptiveCard.prototype.getHasBackground = function () {\n return true;\n };\n AdaptiveCard.prototype.getDefaultPadding = function () {\n return new shared_1.PaddingDefinition(Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding);\n };\n AdaptiveCard.prototype.shouldSerialize = function (context) {\n return true;\n };\n Object.defineProperty(AdaptiveCard.prototype, \"renderIfEmpty\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AdaptiveCard.prototype, \"bypassVersionCheck\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AdaptiveCard.prototype, \"allowCustomStyle\", {\n get: function () {\n return this.hostConfig.adaptiveCard && this.hostConfig.adaptiveCard.allowCustomStyle;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AdaptiveCard.prototype, \"hasBackground\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n AdaptiveCard.prototype.getJsonTypeName = function () {\n return \"AdaptiveCard\";\n };\n AdaptiveCard.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (this.getValue(CardElement.typeNameProperty) !== \"AdaptiveCard\") {\n context.addFailure(this, Enums.ValidationEvent.MissingCardType, strings_1.Strings.errors.invalidCardType());\n }\n if (!this.bypassVersionCheck && !this.version) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"version\"));\n }\n else if (!this.isVersionSupported()) {\n context.addFailure(this, Enums.ValidationEvent.UnsupportedCardVersion, strings_1.Strings.errors.unsupportedCardVersion(this.version.toString(), this.maxVersion.toString()));\n }\n };\n AdaptiveCard.prototype.render = function (target) {\n var renderedCard;\n if (this.shouldFallback() && this._fallbackCard) {\n this._fallbackCard.hostConfig = this.hostConfig;\n renderedCard = this._fallbackCard.render();\n }\n else {\n renderedCard = _super.prototype.render.call(this);\n if (renderedCard) {\n renderedCard.classList.add(this.hostConfig.makeCssClassName(\"ac-adaptiveCard\"));\n // Having a tabIndex on the root container for a card can mess up accessibility in some scenarios.\n // However, we've shipped this behavior before, and so can't just turn it off in a point release. For\n // now, to unblock accessibility scenarios for our customers, we've got an option to turn it off. In a\n // future release, we should strongly consider flipping the default such that we *don't* emit a tabIndex\n // by default.\n if (shared_1.GlobalSettings.setTabIndexAtCardRoot) {\n renderedCard.tabIndex = 0;\n }\n if (this.speak) {\n renderedCard.setAttribute(\"aria-label\", this.speak);\n }\n }\n }\n if (target) {\n Utils.appendChild(target, renderedCard);\n this.updateLayout();\n }\n return renderedCard;\n };\n AdaptiveCard.prototype.updateLayout = function (processChildren) {\n if (processChildren === void 0) { processChildren = true; }\n _super.prototype.updateLayout.call(this, processChildren);\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && this.isDisplayed()) {\n var padding = this.hostConfig.getEffectiveSpacing(Enums.Spacing.Default);\n this['handleOverflow'](this.renderedElement.offsetHeight - padding);\n }\n };\n AdaptiveCard.prototype.shouldFallback = function () {\n return _super.prototype.shouldFallback.call(this) || !this.isVersionSupported();\n };\n Object.defineProperty(AdaptiveCard.prototype, \"hasVisibleSeparator\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n AdaptiveCard.schemaUrl = \"http://adaptivecards.io/schemas/adaptive-card.json\";\n //#region Schema\n AdaptiveCard.$schemaProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, \"$schema\", function (sender, property, source, context) {\n return AdaptiveCard.schemaUrl;\n }, function (sender, property, target, value, context) {\n context.serializeValue(target, property.name, AdaptiveCard.schemaUrl);\n });\n AdaptiveCard.versionProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, \"version\", function (sender, property, source, context) {\n var version = serialization_1.Version.parse(source[property.name], context);\n if (version === undefined) {\n version = serialization_1.Versions.latest;\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidCardVersion(version.toString()));\n }\n return version;\n }, function (sender, property, target, value, context) {\n if (value !== undefined) {\n context.serializeValue(target, property.name, value.toString());\n }\n }, serialization_1.Versions.v1_0);\n AdaptiveCard.fallbackTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"fallbackText\");\n AdaptiveCard.speakProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"speak\");\n AdaptiveCard.refreshProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, \"refresh\", RefreshDefinition, true);\n AdaptiveCard.authenticationProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, \"authentication\", Authentication, true);\n __decorate([\n serialization_1.property(AdaptiveCard.versionProperty)\n ], AdaptiveCard.prototype, \"version\", void 0);\n __decorate([\n serialization_1.property(AdaptiveCard.fallbackTextProperty)\n ], AdaptiveCard.prototype, \"fallbackText\", void 0);\n __decorate([\n serialization_1.property(AdaptiveCard.speakProperty)\n ], AdaptiveCard.prototype, \"speak\", void 0);\n __decorate([\n serialization_1.property(AdaptiveCard.refreshProperty)\n ], AdaptiveCard.prototype, \"refresh\", null);\n __decorate([\n serialization_1.property(AdaptiveCard.authenticationProperty)\n ], AdaptiveCard.prototype, \"authentication\", void 0);\n return AdaptiveCard;\n}(ContainerWithActions));\nexports.AdaptiveCard = AdaptiveCard;\nvar InlineAdaptiveCard = /** @class */ (function (_super) {\n __extends(InlineAdaptiveCard, _super);\n function InlineAdaptiveCard() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.suppressStyle = false;\n return _this;\n }\n InlineAdaptiveCard.prototype.getSchemaKey = function () {\n return \"InlineAdaptiveCard\";\n };\n InlineAdaptiveCard.prototype.populateSchema = function (schema) {\n _super.prototype.populateSchema.call(this, schema);\n schema.remove(AdaptiveCard.$schemaProperty, AdaptiveCard.versionProperty);\n };\n //#endregion\n InlineAdaptiveCard.prototype.getDefaultPadding = function () {\n return new shared_1.PaddingDefinition(this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding, Enums.Spacing.Padding, this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding, Enums.Spacing.Padding);\n };\n Object.defineProperty(InlineAdaptiveCard.prototype, \"bypassVersionCheck\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(InlineAdaptiveCard.prototype, \"defaultStyle\", {\n get: function () {\n if (this.suppressStyle) {\n return Enums.ContainerStyle.Default;\n }\n else {\n return this.hostConfig.actions.showCard.style ? this.hostConfig.actions.showCard.style : Enums.ContainerStyle.Emphasis;\n }\n },\n enumerable: false,\n configurable: true\n });\n InlineAdaptiveCard.prototype.render = function (target) {\n var renderedCard = _super.prototype.render.call(this, target);\n if (renderedCard) {\n renderedCard.setAttribute(\"aria-live\", \"polite\");\n renderedCard.removeAttribute(\"tabindex\");\n }\n return renderedCard;\n };\n return InlineAdaptiveCard;\n}(AdaptiveCard));\nvar SerializationContext = /** @class */ (function (_super) {\n __extends(SerializationContext, _super);\n function SerializationContext() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SerializationContext.prototype.internalParseCardObject = function (parent, source, forbiddenTypeNames, allowFallback, createInstanceCallback, logParseEvent) {\n var result = undefined;\n if (source && typeof source === \"object\") {\n var typeName = Utils.parseString(source[\"type\"]);\n if (typeName && forbiddenTypeNames.indexOf(typeName) >= 0) {\n logParseEvent(typeName, Enums.TypeErrorType.ForbiddenType);\n }\n else {\n var tryToFallback = false;\n result = createInstanceCallback(typeName);\n if (!result) {\n tryToFallback = shared_1.GlobalSettings.enableFallback && allowFallback;\n logParseEvent(typeName, Enums.TypeErrorType.UnknownType);\n }\n else {\n result.setParent(parent);\n result.parse(source, this);\n tryToFallback = shared_1.GlobalSettings.enableFallback && allowFallback && result.shouldFallback();\n }\n if (tryToFallback) {\n var fallback = source[\"fallback\"];\n if (!fallback && parent) {\n parent.setShouldFallback(true);\n }\n if (typeof fallback === \"string\" && fallback.toLowerCase() === \"drop\") {\n result = undefined;\n }\n else if (typeof fallback === \"object\") {\n result = this.internalParseCardObject(parent, fallback, forbiddenTypeNames, true, createInstanceCallback, logParseEvent);\n }\n }\n }\n }\n return result;\n };\n SerializationContext.prototype.cardObjectParsed = function (o, source) {\n if (o instanceof Action && this.onParseAction) {\n this.onParseAction(o, source, this);\n }\n else if (o instanceof CardElement && this.onParseElement) {\n this.onParseElement(o, source, this);\n }\n };\n SerializationContext.prototype.shouldSerialize = function (o) {\n if (o instanceof Action) {\n return this.actionRegistry.findByName(o.getJsonTypeName()) !== undefined;\n }\n else if (o instanceof CardElement) {\n return this.elementRegistry.findByName(o.getJsonTypeName()) !== undefined;\n }\n else {\n return true;\n }\n };\n SerializationContext.prototype.parseCardObject = function (parent, source, forbiddenTypeNames, allowFallback, createInstanceCallback, logParseEvent) {\n var result = this.internalParseCardObject(parent, source, forbiddenTypeNames, allowFallback, createInstanceCallback, logParseEvent);\n if (result !== undefined) {\n this.cardObjectParsed(result, source);\n }\n return result;\n };\n SerializationContext.prototype.parseElement = function (parent, source, allowFallback) {\n var _this = this;\n return this.parseCardObject(parent, source, [], // Forbidden types not supported for elements for now\n allowFallback, function (typeName) {\n return _this.elementRegistry.createInstance(typeName, _this.targetVersion);\n }, function (typeName, errorType) {\n if (errorType === Enums.TypeErrorType.UnknownType) {\n _this.logParseEvent(undefined, Enums.ValidationEvent.UnknownElementType, strings_1.Strings.errors.unknownElementType(typeName));\n }\n else {\n _this.logParseEvent(undefined, Enums.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\n }\n });\n };\n SerializationContext.prototype.parseAction = function (parent, source, forbiddenActionTypes, allowFallback) {\n var _this = this;\n return this.parseCardObject(parent, source, forbiddenActionTypes, allowFallback, function (typeName) {\n return _this.actionRegistry.createInstance(typeName, _this.targetVersion);\n }, function (typeName, errorType) {\n if (errorType == Enums.TypeErrorType.UnknownType) {\n _this.logParseEvent(undefined, Enums.ValidationEvent.UnknownActionType, strings_1.Strings.errors.unknownActionType(typeName));\n }\n else {\n _this.logParseEvent(undefined, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(typeName));\n }\n });\n };\n Object.defineProperty(SerializationContext.prototype, \"elementRegistry\", {\n get: function () {\n return this._elementRegistry ? this._elementRegistry : registry_1.GlobalRegistry.elements;\n },\n enumerable: false,\n configurable: true\n });\n // Not using a property setter here because the setter should accept \"undefined\"\n // whereas the getter should never return undefined.\n SerializationContext.prototype.setElementRegistry = function (value) {\n this._elementRegistry = value;\n };\n Object.defineProperty(SerializationContext.prototype, \"actionRegistry\", {\n get: function () {\n return this._actionRegistry ? this._actionRegistry : registry_1.GlobalRegistry.actions;\n },\n enumerable: false,\n configurable: true\n });\n // Not using a property setter here because the setter should accept \"undefined\"\n // whereas the getter should never return undefined.\n SerializationContext.prototype.setActionRegistry = function (value) {\n this._actionRegistry = value;\n };\n return SerializationContext;\n}(serialization_1.BaseSerializationContext));\nexports.SerializationContext = SerializationContext;\nregistry_1.GlobalRegistry.defaultElements.register(\"Container\", Container);\nregistry_1.GlobalRegistry.defaultElements.register(\"TextBlock\", TextBlock);\nregistry_1.GlobalRegistry.defaultElements.register(\"RichTextBlock\", RichTextBlock, serialization_1.Versions.v1_2);\nregistry_1.GlobalRegistry.defaultElements.register(\"TextRun\", TextRun, serialization_1.Versions.v1_2);\nregistry_1.GlobalRegistry.defaultElements.register(\"Image\", Image);\nregistry_1.GlobalRegistry.defaultElements.register(\"ImageSet\", ImageSet);\nregistry_1.GlobalRegistry.defaultElements.register(\"Media\", Media, serialization_1.Versions.v1_1);\nregistry_1.GlobalRegistry.defaultElements.register(\"FactSet\", FactSet);\nregistry_1.GlobalRegistry.defaultElements.register(\"ColumnSet\", ColumnSet);\nregistry_1.GlobalRegistry.defaultElements.register(\"ActionSet\", ActionSet, serialization_1.Versions.v1_2);\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Text\", TextInput);\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Date\", DateInput);\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Time\", TimeInput);\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Number\", NumberInput);\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.ChoiceSet\", ChoiceSetInput);\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Toggle\", ToggleInput);\nregistry_1.GlobalRegistry.defaultActions.register(OpenUrlAction.JsonTypeName, OpenUrlAction);\nregistry_1.GlobalRegistry.defaultActions.register(SubmitAction.JsonTypeName, SubmitAction);\nregistry_1.GlobalRegistry.defaultActions.register(ShowCardAction.JsonTypeName, ShowCardAction);\nregistry_1.GlobalRegistry.defaultActions.register(ToggleVisibilityAction.JsonTypeName, ToggleVisibilityAction, serialization_1.Versions.v1_2);\nregistry_1.GlobalRegistry.defaultActions.register(ExecuteAction.JsonTypeName, ExecuteAction, serialization_1.Versions.v1_4);\n//# sourceMappingURL=card-elements.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CardObject = exports.ValidationResults = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Enums = require(\"./enums\");\nvar strings_1 = require(\"./strings\");\nvar shared_1 = require(\"./shared\");\nvar host_capabilities_1 = require(\"./host-capabilities\");\nvar serialization_1 = require(\"./serialization\");\nvar ValidationResults = /** @class */ (function () {\n function ValidationResults() {\n this.allIds = {};\n this.validationEvents = [];\n }\n ValidationResults.prototype.addFailure = function (cardObject, event, message) {\n this.validationEvents.push({\n phase: Enums.ValidationPhase.Validation,\n source: cardObject,\n event: event,\n message: message\n });\n };\n return ValidationResults;\n}());\nexports.ValidationResults = ValidationResults;\nvar CardObject = /** @class */ (function (_super) {\n __extends(CardObject, _super);\n function CardObject() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n //#endregion\n _this._shouldFallback = false;\n return _this;\n }\n CardObject.prototype.getSchemaKey = function () {\n return this.getJsonTypeName();\n };\n Object.defineProperty(CardObject.prototype, \"requires\", {\n get: function () {\n return this.getValue(CardObject.requiresProperty);\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Checks if this CardObject contains the given DOM Node.\n * @param node The DOM Node to look for.\n * @returns `true` if the DOM Node was found, `false` otherwise.\n */\n CardObject.prototype.contains = function (node) {\n if (this._renderedElement) {\n return this._renderedElement.contains(node);\n }\n return false;\n };\n CardObject.prototype.preProcessPropertyValue = function (property, propertyValue) {\n var value = propertyValue === undefined ? this.getValue(property) : propertyValue;\n if (shared_1.GlobalSettings.allowPreProcessingPropertyValues) {\n var currentObject = this;\n while (currentObject && !currentObject.onPreProcessPropertyValue) {\n currentObject = currentObject.parent;\n }\n if (currentObject && currentObject.onPreProcessPropertyValue) {\n return currentObject.onPreProcessPropertyValue(this, property, value);\n }\n }\n return value;\n };\n CardObject.prototype.setParent = function (value) {\n this._parent = value;\n };\n CardObject.prototype.setShouldFallback = function (value) {\n this._shouldFallback = value;\n };\n CardObject.prototype.shouldFallback = function () {\n return this._shouldFallback || !this.requires.areAllMet(this.hostConfig.hostCapabilities);\n };\n CardObject.prototype.getRootObject = function () {\n var rootObject = this;\n while (rootObject.parent) {\n rootObject = rootObject.parent;\n }\n return rootObject;\n };\n CardObject.prototype.internalValidateProperties = function (context) {\n if (this.id) {\n if (context.allIds.hasOwnProperty(this.id)) {\n if (context.allIds[this.id] == 1) {\n context.addFailure(this, Enums.ValidationEvent.DuplicateId, strings_1.Strings.errors.duplicateId(this.id));\n }\n context.allIds[this.id] += 1;\n }\n else {\n context.allIds[this.id] = 1;\n }\n }\n };\n CardObject.prototype.validateProperties = function () {\n var result = new ValidationResults();\n this.internalValidateProperties(result);\n return result;\n };\n /**\n * Recursively searches this CardObject and any children to find the\n * innermost CardObject that owns the given DOM Node.\n *\n * @param node The DOM Node to look for.\n *\n * @returns The owner of the given DOM Node, or `undefined` if no owner was found.\n */\n CardObject.prototype.findDOMNodeOwner = function (node) {\n // default implementation for CardObjects with no associated children\n return this.contains(node) ? this : undefined;\n };\n Object.defineProperty(CardObject.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardObject.prototype, \"renderedElement\", {\n get: function () {\n return this._renderedElement;\n },\n enumerable: false,\n configurable: true\n });\n CardObject.typeNameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"type\", undefined, undefined, undefined, function (sender) {\n return sender.getJsonTypeName();\n });\n CardObject.idProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"id\");\n CardObject.requiresProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_2, \"requires\", host_capabilities_1.HostCapabilities, false, new host_capabilities_1.HostCapabilities());\n __decorate([\n serialization_1.property(CardObject.idProperty)\n ], CardObject.prototype, \"id\", void 0);\n __decorate([\n serialization_1.property(CardObject.requiresProperty)\n ], CardObject.prototype, \"requires\", null);\n return CardObject;\n}(serialization_1.SerializableObject));\nexports.CardObject = CardObject;\n//# sourceMappingURL=card-object.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChannelAdapter = void 0;\nvar ChannelAdapter = /** @class */ (function () {\n function ChannelAdapter() {\n }\n return ChannelAdapter;\n}());\nexports.ChannelAdapter = ChannelAdapter;\n//# sourceMappingURL=channel-adapter.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Collection = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Collection = /** @class */ (function () {\n function Collection() {\n this._items = [];\n }\n Collection.prototype.get = function (index) {\n return this._items[index];\n };\n Collection.prototype.add = function (item) {\n this._items.push(item);\n if (this.onItemAdded) {\n this.onItemAdded(item);\n }\n };\n Collection.prototype.remove = function (item) {\n var i = this._items.indexOf(item);\n if (i >= 0) {\n this._items = this._items.splice(i, 1);\n if (this.onItemRemoved) {\n this.onItemRemoved(item);\n }\n }\n };\n Collection.prototype.indexOf = function (item) {\n return this._items.indexOf(item);\n };\n Object.defineProperty(Collection.prototype, \"length\", {\n get: function () {\n return this._items.length;\n },\n enumerable: false,\n configurable: true\n });\n return Collection;\n}());\nexports.Collection = Collection;\n//# sourceMappingURL=collection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Constants = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Constants = /** @class */ (function () {\n function Constants() {\n }\n Constants.keys = {\n tab: \"Tab\",\n enter: \"Enter\",\n escape: \"Escape\",\n space: \" \",\n up: \"ArrowUp\",\n down: \"ArrowDown\",\n delete: \"Delete\"\n };\n return Constants;\n}());\nexports.Constants = Constants;\n//# sourceMappingURL=constants.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./menu-item\"), exports);\n__exportStar(require(\"./popup-menu\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MenuItem = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar host_config_1 = require(\"../host-config\");\nvar constants_1 = require(\"./constants\");\nvar MenuItem = /** @class */ (function () {\n function MenuItem(key, value) {\n this._isEnabled = true;\n this.key = key;\n this._value = value;\n }\n MenuItem.prototype.click = function () {\n if (this.isEnabled && this.onClick) {\n this.onClick(this);\n }\n };\n MenuItem.prototype.updateCssClasses = function () {\n if (this._element) {\n var effectiveHostConfig = this._hostConfig ? this._hostConfig : host_config_1.defaultHostConfig;\n this._element.className = effectiveHostConfig.makeCssClassName(\"ac-ctrl\");\n this._element.classList.add(effectiveHostConfig.makeCssClassName(this.isEnabled ? \"ac-ctrl-dropdown-item\" : \"ac-ctrl-dropdown-item-disabled\"));\n if (!this.isEnabled) {\n this._element.classList.add(effectiveHostConfig.makeCssClassName(\"ac-disabled\"));\n }\n }\n };\n MenuItem.prototype.toString = function () {\n return this.value;\n };\n MenuItem.prototype.render = function (hostConfig) {\n var _this = this;\n this._hostConfig = hostConfig;\n if (!this._element) {\n this._element = document.createElement(\"span\");\n this._element.innerText = this.value;\n this._element.setAttribute(\"role\", \"menuitem\");\n if (!this.isEnabled) {\n this._element.setAttribute(\"aria-disabled\", \"true\");\n }\n this._element.setAttribute(\"aria-selected\", \"false\");\n this._element.onmouseup = function (e) { _this.click(); };\n this._element.onkeydown = function (e) {\n if (e.key === constants_1.Constants.keys.enter) {\n e.cancelBubble = true;\n _this.click();\n }\n };\n this.updateCssClasses();\n }\n return this._element;\n };\n Object.defineProperty(MenuItem.prototype, \"value\", {\n get: function () {\n return this._value;\n },\n set: function (newValue) {\n this._value = newValue;\n if (this._element) {\n this._element.innerText = newValue;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MenuItem.prototype, \"isEnabled\", {\n get: function () {\n return this._isEnabled;\n },\n set: function (value) {\n if (this._isEnabled !== value) {\n this._isEnabled = value;\n this.updateCssClasses();\n }\n },\n enumerable: false,\n configurable: true\n });\n return MenuItem;\n}());\nexports.MenuItem = MenuItem;\n//# sourceMappingURL=menu-item.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PopupControl = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar constants_1 = require(\"./constants\");\nvar Utils = require(\"../utils\");\nvar host_config_1 = require(\"../host-config\");\nvar PopupControl = /** @class */ (function () {\n function PopupControl() {\n this._isOpen = false;\n }\n PopupControl.prototype.keyDown = function (e) {\n switch (e.key) {\n case constants_1.Constants.keys.escape:\n this.closePopup(true);\n break;\n }\n };\n PopupControl.prototype.render = function (rootElementBounds) {\n var _this = this;\n var element = document.createElement(\"div\");\n element.tabIndex = 0;\n element.className = this.hostConfig.makeCssClassName(\"ac-ctrl\", \"ac-ctrl-popup-container\");\n element.setAttribute(\"role\", \"dialog\");\n element.setAttribute(\"aria-modal\", \"true\");\n element.onkeydown = function (e) {\n _this.keyDown(e);\n return !e.cancelBubble;\n };\n element.appendChild(this.renderContent());\n return element;\n };\n PopupControl.prototype.focus = function () {\n if (this._popupElement) {\n this._popupElement.firstElementChild.focus();\n }\n };\n PopupControl.prototype.popup = function (rootElement) {\n var _a, _b, _c, _d, _e;\n var _this = this;\n if (!this._isOpen) {\n this._overlayElement = document.createElement(\"div\");\n this._overlayElement.className = this.hostConfig.makeCssClassName(\"ac-ctrl-overlay\");\n this._overlayElement.tabIndex = 0;\n this._overlayElement.style.width = document.documentElement.scrollWidth + \"px\";\n this._overlayElement.style.height = document.documentElement.scrollHeight + \"px\";\n this._overlayElement.onfocus = function (e) { _this.closePopup(true); };\n document.body.appendChild(this._overlayElement);\n var rootElementBounds = rootElement.getBoundingClientRect();\n this._popupElement = this.render(rootElementBounds);\n (_a = this._popupElement.classList).remove.apply(_a, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideLeftToRight\", \"ac-ctrl-slideRightToLeft\", \"ac-ctrl-slideTopToBottom\", \"ac-ctrl-slideRightToLeft\"));\n window.addEventListener(\"resize\", function (e) { _this.closePopup(true); });\n var rootElementLabel = rootElement.getAttribute(\"aria-label\");\n if (rootElementLabel) {\n this._popupElement.setAttribute(\"aria-label\", rootElementLabel);\n }\n this._overlayElement.appendChild(this._popupElement);\n var popupElementBounds = this._popupElement.getBoundingClientRect();\n var availableSpaceBelow = window.innerHeight - rootElementBounds.bottom;\n var availableSpaceAbove = rootElementBounds.top;\n var availableSpaceRight = window.innerWidth - rootElementBounds.left;\n var availableSpaceRight = window.innerWidth - rootElementBounds.right;\n var availableSpaceLeft = rootElementBounds.left;\n var left = rootElementBounds.left + Utils.getScrollX();\n var top;\n if (availableSpaceAbove < popupElementBounds.height && availableSpaceBelow < popupElementBounds.height) {\n // Not enough space above or below root element\n var actualPopupHeight = Math.min(popupElementBounds.height, window.innerHeight);\n this._popupElement.style.maxHeight = actualPopupHeight + \"px\";\n if (actualPopupHeight < popupElementBounds.height) {\n top = Utils.getScrollY();\n }\n else {\n top = Utils.getScrollY() + rootElementBounds.top + (rootElementBounds.height - actualPopupHeight) / 2;\n }\n if (availableSpaceLeft < popupElementBounds.width && availableSpaceRight < popupElementBounds.width) {\n // Not enough space left or right of root element\n var actualPopupWidth = Math.min(popupElementBounds.width, window.innerWidth);\n this._popupElement.style.maxWidth = actualPopupWidth + \"px\";\n if (actualPopupWidth < popupElementBounds.width) {\n left = Utils.getScrollX();\n }\n else {\n left = Utils.getScrollX() + rootElementBounds.left + (rootElementBounds.width - actualPopupWidth) / 2;\n }\n }\n else {\n // Enough space on the left or right of the root element\n if (availableSpaceRight >= popupElementBounds.width) {\n left = Utils.getScrollX() + rootElementBounds.right;\n (_b = this._popupElement.classList).add.apply(_b, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideLeftToRight\"));\n }\n else {\n left = Utils.getScrollX() + rootElementBounds.left - popupElementBounds.width;\n (_c = this._popupElement.classList).add.apply(_c, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideRightToLeft\"));\n }\n }\n }\n else {\n // Enough space above or below root element\n if (availableSpaceBelow >= popupElementBounds.height) {\n top = Utils.getScrollY() + rootElementBounds.bottom;\n (_d = this._popupElement.classList).add.apply(_d, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideTopToBottom\"));\n }\n else {\n top = Utils.getScrollY() + rootElementBounds.top - popupElementBounds.height;\n (_e = this._popupElement.classList).add.apply(_e, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideBottomToTop\"));\n }\n if (availableSpaceRight < popupElementBounds.width) {\n left = Utils.getScrollX() + rootElementBounds.right - popupElementBounds.width;\n }\n }\n this._popupElement.style.left = left + \"px\";\n this._popupElement.style.top = top + \"px\";\n this._popupElement.focus();\n this._isOpen = true;\n }\n };\n PopupControl.prototype.closePopup = function (wasCancelled) {\n if (this._isOpen) {\n document.body.removeChild(this._overlayElement);\n this._isOpen = false;\n if (this.onClose) {\n this.onClose(this, wasCancelled);\n }\n }\n };\n Object.defineProperty(PopupControl.prototype, \"hostConfig\", {\n get: function () {\n return this._hostConfig ? this._hostConfig : host_config_1.defaultHostConfig;\n },\n set: function (value) {\n this._hostConfig = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(PopupControl.prototype, \"isOpen\", {\n get: function () {\n return this._isOpen;\n },\n enumerable: false,\n configurable: true\n });\n return PopupControl;\n}());\nexports.PopupControl = PopupControl;\n//# sourceMappingURL=popup-control.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PopupMenu = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar constants_1 = require(\"./constants\");\nvar collection_1 = require(\"./collection\");\nvar popup_control_1 = require(\"./popup-control\");\nvar PopupMenu = /** @class */ (function (_super) {\n __extends(PopupMenu, _super);\n function PopupMenu() {\n var _this = _super.call(this) || this;\n _this._items = new collection_1.Collection();\n _this._renderedItems = [];\n _this._selectedIndex = -1;\n return _this;\n }\n PopupMenu.prototype.renderContent = function () {\n var element = document.createElement(\"div\");\n element.className = this.hostConfig.makeCssClassName(\"ac-ctrl ac-popup\");\n element.setAttribute(\"role\", \"listbox\");\n for (var i = 0; i < this._items.length; i++) {\n var renderedItem = this._items.get(i).render(this.hostConfig);\n renderedItem.tabIndex = 0;\n element.appendChild(renderedItem);\n if (i == this.selectedIndex) {\n renderedItem.focus();\n }\n this._renderedItems.push(renderedItem);\n }\n return element;\n };\n PopupMenu.prototype.keyDown = function (e) {\n _super.prototype.keyDown.call(this, e);\n var selectedItemIndex = this._selectedIndex;\n switch (e.key) {\n case constants_1.Constants.keys.tab:\n this.closePopup(true);\n break;\n /*\n case Constants.keys.enter:\n if (this.selectedIndex >= 0) {\n this.selectedIndex = this.selectedIndex;\n\n this.close();\n }\n\n break;\n */\n case constants_1.Constants.keys.up:\n if (selectedItemIndex <= 0) {\n selectedItemIndex = this._renderedItems.length - 1;\n }\n else {\n selectedItemIndex--;\n if (selectedItemIndex < 0) {\n selectedItemIndex = this._renderedItems.length - 1;\n }\n }\n this.selectedIndex = selectedItemIndex;\n e.cancelBubble = true;\n break;\n case constants_1.Constants.keys.down:\n if (selectedItemIndex < 0) {\n selectedItemIndex = 0;\n }\n else {\n selectedItemIndex++;\n if (selectedItemIndex >= this._renderedItems.length) {\n selectedItemIndex = 0;\n }\n }\n this.selectedIndex = selectedItemIndex;\n e.cancelBubble = true;\n break;\n }\n };\n Object.defineProperty(PopupMenu.prototype, \"items\", {\n get: function () {\n return this._items;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(PopupMenu.prototype, \"selectedIndex\", {\n get: function () {\n return this._selectedIndex;\n },\n set: function (index) {\n if (index >= 0 && index < this._renderedItems.length) {\n this._renderedItems[index].focus();\n this._selectedIndex = index;\n }\n },\n enumerable: false,\n configurable: true\n });\n return PopupMenu;\n}(popup_control_1.PopupControl));\nexports.PopupMenu = PopupMenu;\n//# sourceMappingURL=popup-menu.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LogLevel = exports.RefreshMode = exports.TypeErrorType = exports.ContainerFitStatus = exports.ValidationEvent = exports.ValidationPhase = exports.ContainerStyle = exports.InputTextStyle = exports.ActionIconPlacement = exports.FillMode = exports.Orientation = exports.ShowCardActionMode = exports.ImageStyle = exports.ActionAlignment = exports.VerticalAlignment = exports.HorizontalAlignment = exports.TextColor = exports.Spacing = exports.FontType = exports.TextWeight = exports.TextSize = exports.SizeUnit = exports.ImageSize = exports.Size = exports.ActionMode = exports.ActionStyle = void 0;\n// Note the \"weird\" way these readonly fields are declared is to work around\n// a breaking change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n// and adopt this syntax for all other static readonly fields.\nvar ActionStyle = /** @class */ (function () {\n function ActionStyle() {\n }\n ActionStyle.Default = \"default\";\n ActionStyle.Positive = \"positive\";\n ActionStyle.Destructive = \"destructive\";\n return ActionStyle;\n}());\nexports.ActionStyle = ActionStyle;\nvar ActionMode = /** @class */ (function () {\n function ActionMode() {\n }\n ActionMode.Primary = \"primary\";\n ActionMode.Secondary = \"secondary\";\n return ActionMode;\n}());\nexports.ActionMode = ActionMode;\nvar Size;\n(function (Size) {\n Size[Size[\"Auto\"] = 0] = \"Auto\";\n Size[Size[\"Stretch\"] = 1] = \"Stretch\";\n Size[Size[\"Small\"] = 2] = \"Small\";\n Size[Size[\"Medium\"] = 3] = \"Medium\";\n Size[Size[\"Large\"] = 4] = \"Large\";\n})(Size = exports.Size || (exports.Size = {}));\nvar ImageSize;\n(function (ImageSize) {\n ImageSize[ImageSize[\"Small\"] = 0] = \"Small\";\n ImageSize[ImageSize[\"Medium\"] = 1] = \"Medium\";\n ImageSize[ImageSize[\"Large\"] = 2] = \"Large\";\n})(ImageSize = exports.ImageSize || (exports.ImageSize = {}));\nvar SizeUnit;\n(function (SizeUnit) {\n SizeUnit[SizeUnit[\"Weight\"] = 0] = \"Weight\";\n SizeUnit[SizeUnit[\"Pixel\"] = 1] = \"Pixel\";\n})(SizeUnit = exports.SizeUnit || (exports.SizeUnit = {}));\nvar TextSize;\n(function (TextSize) {\n TextSize[TextSize[\"Small\"] = 0] = \"Small\";\n TextSize[TextSize[\"Default\"] = 1] = \"Default\";\n TextSize[TextSize[\"Medium\"] = 2] = \"Medium\";\n TextSize[TextSize[\"Large\"] = 3] = \"Large\";\n TextSize[TextSize[\"ExtraLarge\"] = 4] = \"ExtraLarge\";\n})(TextSize = exports.TextSize || (exports.TextSize = {}));\nvar TextWeight;\n(function (TextWeight) {\n TextWeight[TextWeight[\"Lighter\"] = 0] = \"Lighter\";\n TextWeight[TextWeight[\"Default\"] = 1] = \"Default\";\n TextWeight[TextWeight[\"Bolder\"] = 2] = \"Bolder\";\n})(TextWeight = exports.TextWeight || (exports.TextWeight = {}));\nvar FontType;\n(function (FontType) {\n FontType[FontType[\"Default\"] = 0] = \"Default\";\n FontType[FontType[\"Monospace\"] = 1] = \"Monospace\";\n})(FontType = exports.FontType || (exports.FontType = {}));\nvar Spacing;\n(function (Spacing) {\n Spacing[Spacing[\"None\"] = 0] = \"None\";\n Spacing[Spacing[\"Small\"] = 1] = \"Small\";\n Spacing[Spacing[\"Default\"] = 2] = \"Default\";\n Spacing[Spacing[\"Medium\"] = 3] = \"Medium\";\n Spacing[Spacing[\"Large\"] = 4] = \"Large\";\n Spacing[Spacing[\"ExtraLarge\"] = 5] = \"ExtraLarge\";\n Spacing[Spacing[\"Padding\"] = 6] = \"Padding\";\n})(Spacing = exports.Spacing || (exports.Spacing = {}));\nvar TextColor;\n(function (TextColor) {\n TextColor[TextColor[\"Default\"] = 0] = \"Default\";\n TextColor[TextColor[\"Dark\"] = 1] = \"Dark\";\n TextColor[TextColor[\"Light\"] = 2] = \"Light\";\n TextColor[TextColor[\"Accent\"] = 3] = \"Accent\";\n TextColor[TextColor[\"Good\"] = 4] = \"Good\";\n TextColor[TextColor[\"Warning\"] = 5] = \"Warning\";\n TextColor[TextColor[\"Attention\"] = 6] = \"Attention\";\n})(TextColor = exports.TextColor || (exports.TextColor = {}));\nvar HorizontalAlignment;\n(function (HorizontalAlignment) {\n HorizontalAlignment[HorizontalAlignment[\"Left\"] = 0] = \"Left\";\n HorizontalAlignment[HorizontalAlignment[\"Center\"] = 1] = \"Center\";\n HorizontalAlignment[HorizontalAlignment[\"Right\"] = 2] = \"Right\";\n})(HorizontalAlignment = exports.HorizontalAlignment || (exports.HorizontalAlignment = {}));\nvar VerticalAlignment;\n(function (VerticalAlignment) {\n VerticalAlignment[VerticalAlignment[\"Top\"] = 0] = \"Top\";\n VerticalAlignment[VerticalAlignment[\"Center\"] = 1] = \"Center\";\n VerticalAlignment[VerticalAlignment[\"Bottom\"] = 2] = \"Bottom\";\n})(VerticalAlignment = exports.VerticalAlignment || (exports.VerticalAlignment = {}));\nvar ActionAlignment;\n(function (ActionAlignment) {\n ActionAlignment[ActionAlignment[\"Left\"] = 0] = \"Left\";\n ActionAlignment[ActionAlignment[\"Center\"] = 1] = \"Center\";\n ActionAlignment[ActionAlignment[\"Right\"] = 2] = \"Right\";\n ActionAlignment[ActionAlignment[\"Stretch\"] = 3] = \"Stretch\";\n})(ActionAlignment = exports.ActionAlignment || (exports.ActionAlignment = {}));\nvar ImageStyle;\n(function (ImageStyle) {\n ImageStyle[ImageStyle[\"Default\"] = 0] = \"Default\";\n ImageStyle[ImageStyle[\"Person\"] = 1] = \"Person\";\n})(ImageStyle = exports.ImageStyle || (exports.ImageStyle = {}));\nvar ShowCardActionMode;\n(function (ShowCardActionMode) {\n ShowCardActionMode[ShowCardActionMode[\"Inline\"] = 0] = \"Inline\";\n ShowCardActionMode[ShowCardActionMode[\"Popup\"] = 1] = \"Popup\";\n})(ShowCardActionMode = exports.ShowCardActionMode || (exports.ShowCardActionMode = {}));\nvar Orientation;\n(function (Orientation) {\n Orientation[Orientation[\"Horizontal\"] = 0] = \"Horizontal\";\n Orientation[Orientation[\"Vertical\"] = 1] = \"Vertical\";\n})(Orientation = exports.Orientation || (exports.Orientation = {}));\nvar FillMode;\n(function (FillMode) {\n FillMode[FillMode[\"Cover\"] = 0] = \"Cover\";\n FillMode[FillMode[\"RepeatHorizontally\"] = 1] = \"RepeatHorizontally\";\n FillMode[FillMode[\"RepeatVertically\"] = 2] = \"RepeatVertically\";\n FillMode[FillMode[\"Repeat\"] = 3] = \"Repeat\";\n})(FillMode = exports.FillMode || (exports.FillMode = {}));\nvar ActionIconPlacement;\n(function (ActionIconPlacement) {\n ActionIconPlacement[ActionIconPlacement[\"LeftOfTitle\"] = 0] = \"LeftOfTitle\";\n ActionIconPlacement[ActionIconPlacement[\"AboveTitle\"] = 1] = \"AboveTitle\";\n})(ActionIconPlacement = exports.ActionIconPlacement || (exports.ActionIconPlacement = {}));\nvar InputTextStyle;\n(function (InputTextStyle) {\n InputTextStyle[InputTextStyle[\"Text\"] = 0] = \"Text\";\n InputTextStyle[InputTextStyle[\"Tel\"] = 1] = \"Tel\";\n InputTextStyle[InputTextStyle[\"Url\"] = 2] = \"Url\";\n InputTextStyle[InputTextStyle[\"Email\"] = 3] = \"Email\";\n InputTextStyle[InputTextStyle[\"Password\"] = 4] = \"Password\";\n})(InputTextStyle = exports.InputTextStyle || (exports.InputTextStyle = {}));\n/*\n This should really be a string enum, e.g.\n\n export enum ContainerStyle {\n Default = \"default\",\n Emphasis = \"emphasis\"\n }\n\n However, some hosts do not use a version of TypeScript\n recent enough to understand string enums. This is\n a compatible construct that does not require using\n a more recent version of TypeScript.\n\n Also note the \"weird\" way these readonly fields are declared is to work around\n a breaking change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n and adopt this syntax for all other static readonly fields.\n*/\nvar ContainerStyle = /** @class */ (function () {\n function ContainerStyle() {\n }\n ContainerStyle.Default = \"default\";\n ContainerStyle.Emphasis = \"emphasis\";\n ContainerStyle.Accent = \"accent\";\n ContainerStyle.Good = \"good\";\n ContainerStyle.Attention = \"attention\";\n ContainerStyle.Warning = \"warning\";\n return ContainerStyle;\n}());\nexports.ContainerStyle = ContainerStyle;\nvar ValidationPhase;\n(function (ValidationPhase) {\n ValidationPhase[ValidationPhase[\"Parse\"] = 0] = \"Parse\";\n ValidationPhase[ValidationPhase[\"ToJSON\"] = 1] = \"ToJSON\";\n ValidationPhase[ValidationPhase[\"Validation\"] = 2] = \"Validation\";\n})(ValidationPhase = exports.ValidationPhase || (exports.ValidationPhase = {}));\nvar ValidationEvent;\n(function (ValidationEvent) {\n ValidationEvent[ValidationEvent[\"Hint\"] = 0] = \"Hint\";\n ValidationEvent[ValidationEvent[\"ActionTypeNotAllowed\"] = 1] = \"ActionTypeNotAllowed\";\n ValidationEvent[ValidationEvent[\"CollectionCantBeEmpty\"] = 2] = \"CollectionCantBeEmpty\";\n ValidationEvent[ValidationEvent[\"Deprecated\"] = 3] = \"Deprecated\";\n ValidationEvent[ValidationEvent[\"ElementTypeNotAllowed\"] = 4] = \"ElementTypeNotAllowed\";\n ValidationEvent[ValidationEvent[\"InteractivityNotAllowed\"] = 5] = \"InteractivityNotAllowed\";\n ValidationEvent[ValidationEvent[\"InvalidPropertyValue\"] = 6] = \"InvalidPropertyValue\";\n ValidationEvent[ValidationEvent[\"MissingCardType\"] = 7] = \"MissingCardType\";\n ValidationEvent[ValidationEvent[\"PropertyCantBeNull\"] = 8] = \"PropertyCantBeNull\";\n ValidationEvent[ValidationEvent[\"TooManyActions\"] = 9] = \"TooManyActions\";\n ValidationEvent[ValidationEvent[\"UnknownActionType\"] = 10] = \"UnknownActionType\";\n ValidationEvent[ValidationEvent[\"UnknownElementType\"] = 11] = \"UnknownElementType\";\n ValidationEvent[ValidationEvent[\"UnsupportedCardVersion\"] = 12] = \"UnsupportedCardVersion\";\n ValidationEvent[ValidationEvent[\"DuplicateId\"] = 13] = \"DuplicateId\";\n ValidationEvent[ValidationEvent[\"UnsupportedProperty\"] = 14] = \"UnsupportedProperty\";\n ValidationEvent[ValidationEvent[\"RequiredInputsShouldHaveLabel\"] = 15] = \"RequiredInputsShouldHaveLabel\";\n ValidationEvent[ValidationEvent[\"RequiredInputsShouldHaveErrorMessage\"] = 16] = \"RequiredInputsShouldHaveErrorMessage\";\n ValidationEvent[ValidationEvent[\"Other\"] = 17] = \"Other\";\n})(ValidationEvent = exports.ValidationEvent || (exports.ValidationEvent = {}));\nvar ContainerFitStatus;\n(function (ContainerFitStatus) {\n ContainerFitStatus[ContainerFitStatus[\"FullyInContainer\"] = 0] = \"FullyInContainer\";\n ContainerFitStatus[ContainerFitStatus[\"Overflowing\"] = 1] = \"Overflowing\";\n ContainerFitStatus[ContainerFitStatus[\"FullyOutOfContainer\"] = 2] = \"FullyOutOfContainer\";\n})(ContainerFitStatus = exports.ContainerFitStatus || (exports.ContainerFitStatus = {}));\nvar TypeErrorType;\n(function (TypeErrorType) {\n TypeErrorType[TypeErrorType[\"UnknownType\"] = 0] = \"UnknownType\";\n TypeErrorType[TypeErrorType[\"ForbiddenType\"] = 1] = \"ForbiddenType\";\n})(TypeErrorType = exports.TypeErrorType || (exports.TypeErrorType = {}));\nvar RefreshMode;\n(function (RefreshMode) {\n RefreshMode[RefreshMode[\"Disabled\"] = 0] = \"Disabled\";\n RefreshMode[RefreshMode[\"Manual\"] = 1] = \"Manual\";\n RefreshMode[RefreshMode[\"Automatic\"] = 2] = \"Automatic\";\n})(RefreshMode = exports.RefreshMode || (exports.RefreshMode = {}));\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"Info\"] = 0] = \"Info\";\n LogLevel[LogLevel[\"Warning\"] = 1] = \"Warning\";\n LogLevel[LogLevel[\"Error\"] = 2] = \"Error\";\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\n//# sourceMappingURL=enums.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HostCapabilities = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar serialization_1 = require(\"./serialization\");\nvar HostCapabilities = /** @class */ (function (_super) {\n __extends(HostCapabilities, _super);\n function HostCapabilities() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._capabilities = {};\n return _this;\n }\n HostCapabilities.prototype.getSchemaKey = function () {\n return \"HostCapabilities\";\n };\n HostCapabilities.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n if (source) {\n for (var name_1 in source) {\n var jsonVersion = source[name_1];\n if (typeof jsonVersion === \"string\") {\n if (jsonVersion == \"*\") {\n this.addCapability(name_1, \"*\");\n }\n else {\n var version = serialization_1.Version.parse(jsonVersion, context);\n if (version && version.isValid) {\n this.addCapability(name_1, version);\n }\n }\n }\n }\n }\n };\n HostCapabilities.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n for (var key in this._capabilities) {\n target[key] = this._capabilities[key];\n }\n };\n HostCapabilities.prototype.addCapability = function (name, version) {\n this._capabilities[name] = version;\n };\n HostCapabilities.prototype.removeCapability = function (name) {\n delete this._capabilities[name];\n };\n HostCapabilities.prototype.clear = function () {\n this._capabilities = {};\n };\n HostCapabilities.prototype.hasCapability = function (name, version) {\n if (this._capabilities.hasOwnProperty(name)) {\n if (version == \"*\" || this._capabilities[name] == \"*\") {\n return true;\n }\n return version.compareTo(this._capabilities[name]) <= 0;\n }\n return false;\n };\n HostCapabilities.prototype.areAllMet = function (hostCapabilities) {\n for (var capabilityName in this._capabilities) {\n if (!hostCapabilities.hasCapability(capabilityName, this._capabilities[capabilityName])) {\n return false;\n }\n }\n return true;\n };\n return HostCapabilities;\n}(serialization_1.SerializableObject));\nexports.HostCapabilities = HostCapabilities;\n//# sourceMappingURL=host-capabilities.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultHostConfig = exports.HostConfig = exports.FontTypeSet = exports.FontTypeDefinition = exports.ContainerStyleSet = exports.ContainerStyleDefinition = exports.ColorSetDefinition = exports.ActionsConfig = exports.ShowCardActionConfig = exports.FactSetConfig = exports.FactTitleDefinition = exports.FactTextDefinition = exports.InputConfig = exports.InputLabelConfig = exports.RequiredInputLabelTextDefinition = exports.TextBlockConfig = exports.TextStyleSet = exports.TextStyleDefinition = exports.BaseTextDefinition = exports.TableConfig = exports.MediaConfig = exports.ImageSetConfig = exports.AdaptiveCardConfig = exports.TextColorDefinition = exports.ColorDefinition = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Enums = require(\"./enums\");\nvar Utils = require(\"./utils\");\nvar Shared = require(\"./shared\");\nvar host_capabilities_1 = require(\"./host-capabilities\");\nfunction parseHostConfigEnum(targetEnum, value, defaultValue) {\n if (typeof value === \"string\") {\n var parsedValue = Utils.parseEnum(targetEnum, value, defaultValue);\n return parsedValue !== undefined ? parsedValue : defaultValue;\n }\n else if (typeof value === \"number\") {\n return value;\n }\n else {\n return defaultValue;\n }\n}\nvar ColorDefinition = /** @class */ (function () {\n function ColorDefinition(defaultColor, subtleColor) {\n this.default = \"#000000\";\n this.subtle = \"#666666\";\n if (defaultColor) {\n this.default = defaultColor;\n }\n if (subtleColor) {\n this.subtle = subtleColor;\n }\n }\n ColorDefinition.prototype.parse = function (obj) {\n if (obj) {\n this.default = obj[\"default\"] || this.default;\n this.subtle = obj[\"subtle\"] || this.subtle;\n }\n };\n return ColorDefinition;\n}());\nexports.ColorDefinition = ColorDefinition;\nvar TextColorDefinition = /** @class */ (function (_super) {\n __extends(TextColorDefinition, _super);\n function TextColorDefinition() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.highlightColors = new ColorDefinition(\"#22000000\", \"#11000000\");\n return _this;\n }\n TextColorDefinition.prototype.parse = function (obj) {\n _super.prototype.parse.call(this, obj);\n if (obj) {\n this.highlightColors.parse(obj[\"highlightColors\"]);\n }\n };\n return TextColorDefinition;\n}(ColorDefinition));\nexports.TextColorDefinition = TextColorDefinition;\nvar AdaptiveCardConfig = /** @class */ (function () {\n function AdaptiveCardConfig(obj) {\n this.allowCustomStyle = false;\n if (obj) {\n this.allowCustomStyle = obj[\"allowCustomStyle\"] || this.allowCustomStyle;\n }\n }\n return AdaptiveCardConfig;\n}());\nexports.AdaptiveCardConfig = AdaptiveCardConfig;\nvar ImageSetConfig = /** @class */ (function () {\n function ImageSetConfig(obj) {\n this.imageSize = Enums.Size.Medium;\n this.maxImageHeight = 100;\n if (obj) {\n this.imageSize = obj[\"imageSize\"] != null ? obj[\"imageSize\"] : this.imageSize;\n this.maxImageHeight = Utils.parseNumber(obj[\"maxImageHeight\"], 100);\n }\n }\n ImageSetConfig.prototype.toJSON = function () {\n return {\n imageSize: Enums.Size[this.imageSize],\n maxImageHeight: this.maxImageHeight\n };\n };\n return ImageSetConfig;\n}());\nexports.ImageSetConfig = ImageSetConfig;\nvar MediaConfig = /** @class */ (function () {\n function MediaConfig(obj) {\n this.allowInlinePlayback = true;\n if (obj) {\n this.defaultPoster = obj[\"defaultPoster\"];\n this.allowInlinePlayback = obj[\"allowInlinePlayback\"] || this.allowInlinePlayback;\n }\n }\n MediaConfig.prototype.toJSON = function () {\n return {\n defaultPoster: this.defaultPoster,\n allowInlinePlayback: this.allowInlinePlayback\n };\n };\n return MediaConfig;\n}());\nexports.MediaConfig = MediaConfig;\nvar TableConfig = /** @class */ (function () {\n function TableConfig(obj) {\n this.cellSpacing = 8;\n if (obj) {\n this.cellSpacing = obj.cellSpacing && typeof obj.cellSpacing === \"number\" ? obj.cellSpacing : this.cellSpacing;\n }\n }\n TableConfig.prototype.toJSON = function () {\n return {\n cellSpacing: this.cellSpacing\n };\n };\n return TableConfig;\n}());\nexports.TableConfig = TableConfig;\nvar BaseTextDefinition = /** @class */ (function () {\n function BaseTextDefinition(obj) {\n this.size = Enums.TextSize.Default;\n this.color = Enums.TextColor.Default;\n this.isSubtle = false;\n this.weight = Enums.TextWeight.Default;\n this.parse(obj);\n }\n ;\n BaseTextDefinition.prototype.parse = function (obj) {\n if (obj) {\n this.size = parseHostConfigEnum(Enums.TextSize, obj[\"size\"], this.size);\n this.color = parseHostConfigEnum(Enums.TextColor, obj[\"color\"], this.color);\n this.isSubtle = obj.isSubtle !== undefined && typeof obj.isSubtle === \"boolean\" ? obj.isSubtle : this.isSubtle;\n this.weight = parseHostConfigEnum(Enums.TextWeight, obj[\"weight\"], this.getDefaultWeight());\n }\n };\n BaseTextDefinition.prototype.getDefaultWeight = function () {\n return Enums.TextWeight.Default;\n };\n BaseTextDefinition.prototype.toJSON = function () {\n return {\n size: Enums.TextSize[this.size],\n color: Enums.TextColor[this.color],\n isSubtle: this.isSubtle,\n weight: Enums.TextWeight[this.weight]\n };\n };\n return BaseTextDefinition;\n}());\nexports.BaseTextDefinition = BaseTextDefinition;\nvar TextStyleDefinition = /** @class */ (function (_super) {\n __extends(TextStyleDefinition, _super);\n function TextStyleDefinition() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.fontType = Enums.FontType.Default;\n return _this;\n }\n TextStyleDefinition.prototype.parse = function (obj) {\n _super.prototype.parse.call(this, obj);\n if (obj) {\n this.fontType = parseHostConfigEnum(Enums.FontType, obj.fontType, this.fontType);\n }\n };\n return TextStyleDefinition;\n}(BaseTextDefinition));\nexports.TextStyleDefinition = TextStyleDefinition;\nvar TextStyleSet = /** @class */ (function () {\n function TextStyleSet(obj) {\n this.default = new TextStyleDefinition();\n this.heading = new TextStyleDefinition({\n size: \"Large\",\n weight: \"Bolder\"\n });\n this.columnHeader = new TextStyleDefinition({\n weight: \"Bolder\"\n });\n if (obj) {\n this.heading.parse(obj.heading);\n this.columnHeader.parse(obj.columnHeader);\n }\n }\n TextStyleSet.prototype.getStyleByName = function (name) {\n switch (name.toLowerCase()) {\n case \"heading\":\n return this.heading;\n case \"columnHeader\":\n return this.columnHeader;\n default:\n return this.default;\n }\n };\n return TextStyleSet;\n}());\nexports.TextStyleSet = TextStyleSet;\nvar TextBlockConfig = /** @class */ (function () {\n function TextBlockConfig(obj) {\n if (obj) {\n this.headingLevel = Utils.parseNumber(obj.headingLevel);\n }\n }\n return TextBlockConfig;\n}());\nexports.TextBlockConfig = TextBlockConfig;\nvar RequiredInputLabelTextDefinition = /** @class */ (function (_super) {\n __extends(RequiredInputLabelTextDefinition, _super);\n function RequiredInputLabelTextDefinition() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.suffix = \" *\";\n _this.suffixColor = Enums.TextColor.Attention;\n return _this;\n }\n RequiredInputLabelTextDefinition.prototype.parse = function (obj) {\n _super.prototype.parse.call(this, obj);\n if (obj) {\n this.suffix = obj[\"suffix\"] || this.suffix;\n this.suffixColor = parseHostConfigEnum(Enums.TextColor, obj[\"suffixColor\"], this.suffixColor);\n }\n };\n RequiredInputLabelTextDefinition.prototype.toJSON = function () {\n var result = _super.prototype.toJSON.call(this);\n result[\"suffix\"] = this.suffix;\n result[\"suffixColor\"] = Enums.TextColor[this.suffixColor];\n return result;\n };\n return RequiredInputLabelTextDefinition;\n}(BaseTextDefinition));\nexports.RequiredInputLabelTextDefinition = RequiredInputLabelTextDefinition;\nvar InputLabelConfig = /** @class */ (function () {\n function InputLabelConfig(obj) {\n this.inputSpacing = Enums.Spacing.Small;\n this.requiredInputs = new RequiredInputLabelTextDefinition();\n this.optionalInputs = new BaseTextDefinition();\n if (obj) {\n this.inputSpacing = parseHostConfigEnum(Enums.Spacing, obj[\"inputSpacing\"], this.inputSpacing);\n this.requiredInputs = new RequiredInputLabelTextDefinition(obj[\"requiredInputs\"]);\n this.optionalInputs = new BaseTextDefinition(obj[\"optionalInputs\"]);\n }\n }\n return InputLabelConfig;\n}());\nexports.InputLabelConfig = InputLabelConfig;\nvar InputConfig = /** @class */ (function () {\n function InputConfig(obj) {\n this.label = new InputLabelConfig();\n this.errorMessage = new BaseTextDefinition({ color: Enums.TextColor.Attention });\n if (obj) {\n this.label = new InputLabelConfig(obj[\"label\"]);\n this.errorMessage = new BaseTextDefinition(obj[\"errorMessage\"]);\n }\n }\n return InputConfig;\n}());\nexports.InputConfig = InputConfig;\nvar FactTextDefinition = /** @class */ (function (_super) {\n __extends(FactTextDefinition, _super);\n function FactTextDefinition() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.wrap = true;\n return _this;\n }\n FactTextDefinition.prototype.parse = function (obj) {\n _super.prototype.parse.call(this, obj);\n if (obj) {\n this.wrap = obj[\"wrap\"] != null ? obj[\"wrap\"] : this.wrap;\n }\n };\n FactTextDefinition.prototype.toJSON = function () {\n var result = _super.prototype.toJSON.call(this);\n result[\"wrap\"] = this.wrap;\n return result;\n };\n return FactTextDefinition;\n}(BaseTextDefinition));\nexports.FactTextDefinition = FactTextDefinition;\nvar FactTitleDefinition = /** @class */ (function (_super) {\n __extends(FactTitleDefinition, _super);\n function FactTitleDefinition(obj) {\n var _this = _super.call(this, obj) || this;\n _this.maxWidth = 150;\n _this.weight = Enums.TextWeight.Bolder;\n if (obj) {\n _this.maxWidth = obj[\"maxWidth\"] != null ? obj[\"maxWidth\"] : _this.maxWidth;\n _this.weight = parseHostConfigEnum(Enums.TextWeight, obj[\"weight\"], Enums.TextWeight.Bolder);\n }\n return _this;\n }\n FactTitleDefinition.prototype.getDefaultWeight = function () {\n return Enums.TextWeight.Bolder;\n };\n return FactTitleDefinition;\n}(FactTextDefinition));\nexports.FactTitleDefinition = FactTitleDefinition;\nvar FactSetConfig = /** @class */ (function () {\n function FactSetConfig(obj) {\n this.title = new FactTitleDefinition();\n this.value = new FactTextDefinition();\n this.spacing = 10;\n if (obj) {\n this.title = new FactTitleDefinition(obj[\"title\"]);\n this.value = new FactTextDefinition(obj[\"value\"]);\n this.spacing = obj.spacing && obj.spacing != null ? obj.spacing && obj.spacing : this.spacing;\n }\n }\n return FactSetConfig;\n}());\nexports.FactSetConfig = FactSetConfig;\nvar ShowCardActionConfig = /** @class */ (function () {\n function ShowCardActionConfig(obj) {\n this.actionMode = Enums.ShowCardActionMode.Inline;\n this.inlineTopMargin = 16;\n this.style = Enums.ContainerStyle.Emphasis;\n if (obj) {\n this.actionMode = parseHostConfigEnum(Enums.ShowCardActionMode, obj[\"actionMode\"], Enums.ShowCardActionMode.Inline);\n this.inlineTopMargin = obj[\"inlineTopMargin\"] != null ? obj[\"inlineTopMargin\"] : this.inlineTopMargin;\n this.style = obj[\"style\"] && typeof obj[\"style\"] === \"string\" ? obj[\"style\"] : Enums.ContainerStyle.Emphasis;\n }\n }\n ShowCardActionConfig.prototype.toJSON = function () {\n return {\n actionMode: Enums.ShowCardActionMode[this.actionMode],\n inlineTopMargin: this.inlineTopMargin,\n style: this.style\n };\n };\n return ShowCardActionConfig;\n}());\nexports.ShowCardActionConfig = ShowCardActionConfig;\nvar ActionsConfig = /** @class */ (function () {\n function ActionsConfig(obj) {\n this.maxActions = 5;\n this.spacing = Enums.Spacing.Default;\n this.buttonSpacing = 20;\n this.showCard = new ShowCardActionConfig();\n this.preExpandSingleShowCardAction = false;\n this.actionsOrientation = Enums.Orientation.Horizontal;\n this.actionAlignment = Enums.ActionAlignment.Left;\n this.iconPlacement = Enums.ActionIconPlacement.LeftOfTitle;\n this.allowTitleToWrap = false;\n this.iconSize = 16;\n if (obj) {\n this.maxActions = obj[\"maxActions\"] != null ? obj[\"maxActions\"] : this.maxActions;\n this.spacing = parseHostConfigEnum(Enums.Spacing, obj.spacing && obj.spacing, Enums.Spacing.Default);\n this.buttonSpacing = obj[\"buttonSpacing\"] != null ? obj[\"buttonSpacing\"] : this.buttonSpacing;\n this.showCard = new ShowCardActionConfig(obj[\"showCard\"]);\n this.preExpandSingleShowCardAction = Utils.parseBool(obj[\"preExpandSingleShowCardAction\"], false);\n this.actionsOrientation = parseHostConfigEnum(Enums.Orientation, obj[\"actionsOrientation\"], Enums.Orientation.Horizontal);\n this.actionAlignment = parseHostConfigEnum(Enums.ActionAlignment, obj[\"actionAlignment\"], Enums.ActionAlignment.Left);\n this.iconPlacement = parseHostConfigEnum(Enums.ActionIconPlacement, obj[\"iconPlacement\"], Enums.ActionIconPlacement.LeftOfTitle);\n this.allowTitleToWrap = obj[\"allowTitleToWrap\"] != null ? obj[\"allowTitleToWrap\"] : this.allowTitleToWrap;\n try {\n var sizeAndUnit = Shared.SizeAndUnit.parse(obj[\"iconSize\"]);\n if (sizeAndUnit.unit == Enums.SizeUnit.Pixel) {\n this.iconSize = sizeAndUnit.physicalSize;\n }\n }\n catch (e) {\n // Swallow this, keep default icon size\n }\n }\n }\n ActionsConfig.prototype.toJSON = function () {\n return {\n maxActions: this.maxActions,\n spacing: Enums.Spacing[this.spacing],\n buttonSpacing: this.buttonSpacing,\n showCard: this.showCard,\n preExpandSingleShowCardAction: this.preExpandSingleShowCardAction,\n actionsOrientation: Enums.Orientation[this.actionsOrientation],\n actionAlignment: Enums.ActionAlignment[this.actionAlignment]\n };\n };\n return ActionsConfig;\n}());\nexports.ActionsConfig = ActionsConfig;\nvar ColorSetDefinition = /** @class */ (function () {\n function ColorSetDefinition(obj) {\n this.default = new TextColorDefinition();\n this.dark = new TextColorDefinition();\n this.light = new TextColorDefinition();\n this.accent = new TextColorDefinition();\n this.good = new TextColorDefinition();\n this.warning = new TextColorDefinition();\n this.attention = new TextColorDefinition();\n this.parse(obj);\n }\n ColorSetDefinition.prototype.parseSingleColor = function (obj, propertyName) {\n if (obj) {\n this[propertyName].parse(obj[propertyName]);\n }\n };\n ColorSetDefinition.prototype.parse = function (obj) {\n if (obj) {\n this.parseSingleColor(obj, \"default\");\n this.parseSingleColor(obj, \"dark\");\n this.parseSingleColor(obj, \"light\");\n this.parseSingleColor(obj, \"accent\");\n this.parseSingleColor(obj, \"good\");\n this.parseSingleColor(obj, \"warning\");\n this.parseSingleColor(obj, \"attention\");\n }\n };\n return ColorSetDefinition;\n}());\nexports.ColorSetDefinition = ColorSetDefinition;\nvar ContainerStyleDefinition = /** @class */ (function () {\n function ContainerStyleDefinition(obj) {\n this.foregroundColors = new ColorSetDefinition({\n \"default\": { default: \"#333333\", subtle: \"#EE333333\" },\n \"dark\": { default: \"#000000\", subtle: \"#66000000\" },\n \"light\": { default: \"#FFFFFF\", subtle: \"#33000000\" },\n \"accent\": { default: \"#2E89FC\", subtle: \"#882E89FC\" },\n \"good\": { default: \"#028A02\", subtle: \"#DD027502\" },\n \"warning\": { default: \"#E69500\", subtle: \"#DDE69500\" },\n \"attention\": { default: \"#CC3300\", subtle: \"#DDCC3300\" }\n });\n this.parse(obj);\n }\n ContainerStyleDefinition.prototype.parse = function (obj) {\n if (obj) {\n this.backgroundColor = obj[\"backgroundColor\"];\n this.foregroundColors.parse(obj[\"foregroundColors\"]);\n this.highlightBackgroundColor = obj[\"highlightBackgroundColor\"];\n this.highlightForegroundColor = obj[\"highlightForegroundColor\"];\n this.borderColor = obj[\"borderColor\"];\n }\n };\n Object.defineProperty(ContainerStyleDefinition.prototype, \"isBuiltIn\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n return ContainerStyleDefinition;\n}());\nexports.ContainerStyleDefinition = ContainerStyleDefinition;\nvar BuiltInContainerStyleDefinition = /** @class */ (function (_super) {\n __extends(BuiltInContainerStyleDefinition, _super);\n function BuiltInContainerStyleDefinition() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(BuiltInContainerStyleDefinition.prototype, \"isBuiltIn\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n return BuiltInContainerStyleDefinition;\n}(ContainerStyleDefinition));\nvar ContainerStyleSet = /** @class */ (function () {\n function ContainerStyleSet(obj) {\n this._allStyles = {};\n this._allStyles[Enums.ContainerStyle.Default] = new BuiltInContainerStyleDefinition();\n this._allStyles[Enums.ContainerStyle.Emphasis] = new BuiltInContainerStyleDefinition();\n this._allStyles[Enums.ContainerStyle.Accent] = new BuiltInContainerStyleDefinition();\n this._allStyles[Enums.ContainerStyle.Good] = new BuiltInContainerStyleDefinition();\n this._allStyles[Enums.ContainerStyle.Attention] = new BuiltInContainerStyleDefinition();\n this._allStyles[Enums.ContainerStyle.Warning] = new BuiltInContainerStyleDefinition();\n if (obj) {\n this._allStyles[Enums.ContainerStyle.Default].parse(obj[Enums.ContainerStyle.Default]);\n this._allStyles[Enums.ContainerStyle.Emphasis].parse(obj[Enums.ContainerStyle.Emphasis]);\n this._allStyles[Enums.ContainerStyle.Accent].parse(obj[Enums.ContainerStyle.Accent]);\n this._allStyles[Enums.ContainerStyle.Good].parse(obj[Enums.ContainerStyle.Good]);\n this._allStyles[Enums.ContainerStyle.Attention].parse(obj[Enums.ContainerStyle.Attention]);\n this._allStyles[Enums.ContainerStyle.Warning].parse(obj[Enums.ContainerStyle.Warning]);\n var customStyleArray = obj[\"customStyles\"];\n if (customStyleArray && Array.isArray(customStyleArray)) {\n for (var _i = 0, customStyleArray_1 = customStyleArray; _i < customStyleArray_1.length; _i++) {\n var customStyle = customStyleArray_1[_i];\n if (customStyle) {\n var styleName = customStyle[\"name\"];\n if (styleName && typeof styleName === \"string\") {\n if (this._allStyles.hasOwnProperty(styleName)) {\n this._allStyles[styleName].parse(customStyle[\"style\"]);\n }\n else {\n this._allStyles[styleName] = new ContainerStyleDefinition(customStyle[\"style\"]);\n }\n }\n }\n }\n }\n }\n }\n ContainerStyleSet.prototype.toJSON = function () {\n var _this = this;\n var customStyleArray = [];\n Object.keys(this._allStyles).forEach(function (key) {\n if (!_this._allStyles[key].isBuiltIn) {\n customStyleArray.push({\n name: key,\n style: _this._allStyles[key]\n });\n }\n });\n var result = {\n default: this.default,\n emphasis: this.emphasis\n };\n if (customStyleArray.length > 0) {\n result.customStyles = customStyleArray;\n }\n return result;\n };\n ContainerStyleSet.prototype.getStyleByName = function (name, defaultValue) {\n if (name && this._allStyles.hasOwnProperty(name)) {\n return this._allStyles[name];\n }\n else {\n return defaultValue ? defaultValue : this._allStyles[Enums.ContainerStyle.Default];\n }\n };\n Object.defineProperty(ContainerStyleSet.prototype, \"default\", {\n get: function () {\n return this._allStyles[Enums.ContainerStyle.Default];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ContainerStyleSet.prototype, \"emphasis\", {\n get: function () {\n return this._allStyles[Enums.ContainerStyle.Emphasis];\n },\n enumerable: false,\n configurable: true\n });\n return ContainerStyleSet;\n}());\nexports.ContainerStyleSet = ContainerStyleSet;\nvar FontTypeDefinition = /** @class */ (function () {\n function FontTypeDefinition(fontFamily) {\n this.fontFamily = \"Segoe UI,Segoe,Segoe WP,Helvetica Neue,Helvetica,sans-serif\";\n this.fontSizes = {\n small: 12,\n default: 14,\n medium: 17,\n large: 21,\n extraLarge: 26\n };\n this.fontWeights = {\n lighter: 200,\n default: 400,\n bolder: 600\n };\n if (fontFamily) {\n this.fontFamily = fontFamily;\n }\n }\n FontTypeDefinition.prototype.parse = function (obj) {\n this.fontFamily = obj[\"fontFamily\"] || this.fontFamily;\n this.fontSizes = {\n small: obj.fontSizes && obj.fontSizes[\"small\"] || this.fontSizes.small,\n default: obj.fontSizes && obj.fontSizes[\"default\"] || this.fontSizes.default,\n medium: obj.fontSizes && obj.fontSizes[\"medium\"] || this.fontSizes.medium,\n large: obj.fontSizes && obj.fontSizes[\"large\"] || this.fontSizes.large,\n extraLarge: obj.fontSizes && obj.fontSizes[\"extraLarge\"] || this.fontSizes.extraLarge\n };\n this.fontWeights = {\n lighter: obj.fontWeights && obj.fontWeights[\"lighter\"] || this.fontWeights.lighter,\n default: obj.fontWeights && obj.fontWeights[\"default\"] || this.fontWeights.default,\n bolder: obj.fontWeights && obj.fontWeights[\"bolder\"] || this.fontWeights.bolder\n };\n };\n FontTypeDefinition.monospace = new FontTypeDefinition(\"'Courier New', Courier, monospace\");\n return FontTypeDefinition;\n}());\nexports.FontTypeDefinition = FontTypeDefinition;\nvar FontTypeSet = /** @class */ (function () {\n function FontTypeSet(obj) {\n this.default = new FontTypeDefinition();\n this.monospace = new FontTypeDefinition(\"'Courier New', Courier, monospace\");\n if (obj) {\n this.default.parse(obj[\"default\"]);\n this.monospace.parse(obj[\"monospace\"]);\n }\n }\n FontTypeSet.prototype.getStyleDefinition = function (style) {\n switch (style) {\n case Enums.FontType.Monospace:\n return this.monospace;\n case Enums.FontType.Default:\n default:\n return this.default;\n }\n };\n return FontTypeSet;\n}());\nexports.FontTypeSet = FontTypeSet;\nvar HostConfig = /** @class */ (function () {\n function HostConfig(obj) {\n this.hostCapabilities = new host_capabilities_1.HostCapabilities();\n this.choiceSetInputValueSeparator = \",\";\n this.supportsInteractivity = true;\n this.spacing = {\n small: 3,\n default: 8,\n medium: 20,\n large: 30,\n extraLarge: 40,\n padding: 15\n };\n this.separator = {\n lineThickness: 1,\n lineColor: \"#EEEEEE\"\n };\n this.imageSizes = {\n small: 40,\n medium: 80,\n large: 160\n };\n this.containerStyles = new ContainerStyleSet();\n this.inputs = new InputConfig();\n this.actions = new ActionsConfig();\n this.adaptiveCard = new AdaptiveCardConfig();\n this.imageSet = new ImageSetConfig();\n this.media = new MediaConfig();\n this.factSet = new FactSetConfig();\n this.table = new TableConfig();\n this.textStyles = new TextStyleSet();\n this.textBlock = new TextBlockConfig();\n this.alwaysAllowBleed = false;\n if (obj) {\n if (typeof obj === \"string\" || obj instanceof String) {\n obj = JSON.parse(obj);\n }\n this.choiceSetInputValueSeparator = (obj && typeof obj[\"choiceSetInputValueSeparator\"] === \"string\") ? obj[\"choiceSetInputValueSeparator\"] : this.choiceSetInputValueSeparator;\n this.supportsInteractivity = (obj && typeof obj[\"supportsInteractivity\"] === \"boolean\") ? obj[\"supportsInteractivity\"] : this.supportsInteractivity;\n this._legacyFontType = new FontTypeDefinition();\n this._legacyFontType.parse(obj);\n if (obj.fontTypes) {\n this.fontTypes = new FontTypeSet(obj.fontTypes);\n }\n if (obj.lineHeights) {\n this.lineHeights = {\n small: obj.lineHeights[\"small\"],\n default: obj.lineHeights[\"default\"],\n medium: obj.lineHeights[\"medium\"],\n large: obj.lineHeights[\"large\"],\n extraLarge: obj.lineHeights[\"extraLarge\"]\n };\n }\n ;\n this.imageSizes = {\n small: obj.imageSizes && obj.imageSizes[\"small\"] || this.imageSizes.small,\n medium: obj.imageSizes && obj.imageSizes[\"medium\"] || this.imageSizes.medium,\n large: obj.imageSizes && obj.imageSizes[\"large\"] || this.imageSizes.large,\n };\n this.containerStyles = new ContainerStyleSet(obj[\"containerStyles\"]);\n this.spacing = {\n small: obj.spacing && obj.spacing[\"small\"] || this.spacing.small,\n default: obj.spacing && obj.spacing[\"default\"] || this.spacing.default,\n medium: obj.spacing && obj.spacing[\"medium\"] || this.spacing.medium,\n large: obj.spacing && obj.spacing[\"large\"] || this.spacing.large,\n extraLarge: obj.spacing && obj.spacing[\"extraLarge\"] || this.spacing.extraLarge,\n padding: obj.spacing && obj.spacing[\"padding\"] || this.spacing.padding\n };\n this.separator = {\n lineThickness: obj.separator && obj.separator[\"lineThickness\"] || this.separator.lineThickness,\n lineColor: obj.separator && obj.separator[\"lineColor\"] || this.separator.lineColor\n };\n this.inputs = new InputConfig(obj.inputs || this.inputs);\n this.actions = new ActionsConfig(obj.actions || this.actions);\n this.adaptiveCard = new AdaptiveCardConfig(obj.adaptiveCard || this.adaptiveCard);\n this.imageSet = new ImageSetConfig(obj[\"imageSet\"]);\n this.factSet = new FactSetConfig(obj[\"factSet\"]);\n this.textStyles = new TextStyleSet(obj[\"textStyles\"]);\n this.textBlock = new TextBlockConfig(obj[\"textBlock\"]);\n }\n }\n HostConfig.prototype.getFontTypeDefinition = function (style) {\n if (this.fontTypes) {\n return this.fontTypes.getStyleDefinition(style);\n }\n else {\n return style == Enums.FontType.Monospace ? FontTypeDefinition.monospace : this._legacyFontType;\n }\n };\n HostConfig.prototype.getEffectiveSpacing = function (spacing) {\n switch (spacing) {\n case Enums.Spacing.Small:\n return this.spacing.small;\n case Enums.Spacing.Default:\n return this.spacing.default;\n case Enums.Spacing.Medium:\n return this.spacing.medium;\n case Enums.Spacing.Large:\n return this.spacing.large;\n case Enums.Spacing.ExtraLarge:\n return this.spacing.extraLarge;\n case Enums.Spacing.Padding:\n return this.spacing.padding;\n default:\n return 0;\n }\n };\n HostConfig.prototype.paddingDefinitionToSpacingDefinition = function (paddingDefinition) {\n return new Shared.SpacingDefinition(this.getEffectiveSpacing(paddingDefinition.top), this.getEffectiveSpacing(paddingDefinition.right), this.getEffectiveSpacing(paddingDefinition.bottom), this.getEffectiveSpacing(paddingDefinition.left));\n };\n HostConfig.prototype.makeCssClassNames = function () {\n var classNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n classNames[_i] = arguments[_i];\n }\n var result = [];\n for (var _a = 0, classNames_1 = classNames; _a < classNames_1.length; _a++) {\n var className = classNames_1[_a];\n result.push((this.cssClassNamePrefix ? this.cssClassNamePrefix + \"-\" : \"\") + className);\n }\n return result;\n };\n HostConfig.prototype.makeCssClassName = function () {\n var classNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n classNames[_i] = arguments[_i];\n }\n var result = this.makeCssClassNames.apply(this, classNames).join(\" \");\n return result ? result : \"\";\n };\n Object.defineProperty(HostConfig.prototype, \"fontFamily\", {\n get: function () {\n return this._legacyFontType.fontFamily;\n },\n set: function (value) {\n this._legacyFontType.fontFamily = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(HostConfig.prototype, \"fontSizes\", {\n get: function () {\n return this._legacyFontType.fontSizes;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(HostConfig.prototype, \"fontWeights\", {\n get: function () {\n return this._legacyFontType.fontWeights;\n },\n enumerable: false,\n configurable: true\n });\n return HostConfig;\n}());\nexports.HostConfig = HostConfig;\nexports.defaultHostConfig = new HostConfig({\n supportsInteractivity: true,\n spacing: {\n small: 10,\n default: 20,\n medium: 30,\n large: 40,\n extraLarge: 50,\n padding: 20\n },\n separator: {\n lineThickness: 1,\n lineColor: \"#EEEEEE\"\n },\n fontTypes: {\n default: {\n fontFamily: \"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif\",\n fontSizes: {\n small: 12,\n default: 14,\n medium: 17,\n large: 21,\n extraLarge: 26\n },\n fontWeights: {\n lighter: 200,\n default: 400,\n bolder: 600\n }\n },\n monospace: {\n fontFamily: \"'Courier New', Courier, monospace\",\n fontSizes: {\n small: 12,\n default: 14,\n medium: 17,\n large: 21,\n extraLarge: 26\n },\n fontWeights: {\n lighter: 200,\n default: 400,\n bolder: 600\n }\n }\n },\n imageSizes: {\n small: 40,\n medium: 80,\n large: 160\n },\n containerStyles: {\n default: {\n backgroundColor: \"#FFFFFF\",\n foregroundColors: {\n default: {\n default: \"#333333\",\n subtle: \"#EE333333\"\n },\n dark: {\n default: \"#000000\",\n subtle: \"#66000000\"\n },\n light: {\n default: \"#FFFFFF\",\n subtle: \"#33000000\"\n },\n accent: {\n default: \"#2E89FC\",\n subtle: \"#882E89FC\"\n },\n attention: {\n default: \"#cc3300\",\n subtle: \"#DDcc3300\"\n },\n good: {\n default: \"#028A02\",\n subtle: \"#DD027502\"\n },\n warning: {\n default: \"#e69500\",\n subtle: \"#DDe69500\"\n }\n }\n },\n emphasis: {\n backgroundColor: \"#08000000\",\n foregroundColors: {\n default: {\n default: \"#333333\",\n subtle: \"#EE333333\"\n },\n dark: {\n default: \"#000000\",\n subtle: \"#66000000\"\n },\n light: {\n default: \"#FFFFFF\",\n subtle: \"#33000000\"\n },\n accent: {\n default: \"#2E89FC\",\n subtle: \"#882E89FC\"\n },\n attention: {\n default: \"#cc3300\",\n subtle: \"#DDcc3300\"\n },\n good: {\n default: \"#028A02\",\n subtle: \"#DD027502\"\n },\n warning: {\n default: \"#e69500\",\n subtle: \"#DDe69500\"\n }\n }\n },\n accent: {\n backgroundColor: \"#C7DEF9\",\n foregroundColors: {\n default: {\n default: \"#333333\",\n subtle: \"#EE333333\"\n },\n dark: {\n default: \"#000000\",\n subtle: \"#66000000\"\n },\n light: {\n default: \"#FFFFFF\",\n subtle: \"#33000000\"\n },\n accent: {\n default: \"#2E89FC\",\n subtle: \"#882E89FC\"\n },\n attention: {\n default: \"#cc3300\",\n subtle: \"#DDcc3300\"\n },\n good: {\n default: \"#028A02\",\n subtle: \"#DD027502\"\n },\n warning: {\n default: \"#e69500\",\n subtle: \"#DDe69500\"\n }\n }\n },\n good: {\n backgroundColor: \"#CCFFCC\",\n foregroundColors: {\n default: {\n default: \"#333333\",\n subtle: \"#EE333333\"\n },\n dark: {\n default: \"#000000\",\n subtle: \"#66000000\"\n },\n light: {\n default: \"#FFFFFF\",\n subtle: \"#33000000\"\n },\n accent: {\n default: \"#2E89FC\",\n subtle: \"#882E89FC\"\n },\n attention: {\n default: \"#cc3300\",\n subtle: \"#DDcc3300\"\n },\n good: {\n default: \"#028A02\",\n subtle: \"#DD027502\"\n },\n warning: {\n default: \"#e69500\",\n subtle: \"#DDe69500\"\n }\n }\n },\n attention: {\n backgroundColor: \"#FFC5B2\",\n foregroundColors: {\n default: {\n default: \"#333333\",\n subtle: \"#EE333333\"\n },\n dark: {\n default: \"#000000\",\n subtle: \"#66000000\"\n },\n light: {\n default: \"#FFFFFF\",\n subtle: \"#33000000\"\n },\n accent: {\n default: \"#2E89FC\",\n subtle: \"#882E89FC\"\n },\n attention: {\n default: \"#cc3300\",\n subtle: \"#DDcc3300\"\n },\n good: {\n default: \"#028A02\",\n subtle: \"#DD027502\"\n },\n warning: {\n default: \"#e69500\",\n subtle: \"#DDe69500\"\n }\n }\n },\n warning: {\n backgroundColor: \"#FFE2B2\",\n foregroundColors: {\n default: {\n default: \"#333333\",\n subtle: \"#EE333333\"\n },\n dark: {\n default: \"#000000\",\n subtle: \"#66000000\"\n },\n light: {\n default: \"#FFFFFF\",\n subtle: \"#33000000\"\n },\n accent: {\n default: \"#2E89FC\",\n subtle: \"#882E89FC\"\n },\n attention: {\n default: \"#cc3300\",\n subtle: \"#DDcc3300\"\n },\n good: {\n default: \"#028A02\",\n subtle: \"#DD027502\"\n },\n warning: {\n default: \"#e69500\",\n subtle: \"#DDe69500\"\n }\n }\n }\n },\n inputs: {\n label: {\n requiredInputs: {\n color: Enums.TextColor.Accent,\n size: Enums.TextSize.ExtraLarge,\n weight: Enums.TextWeight.Bolder,\n isSubtle: true,\n suffix: \" (required)\",\n suffixColor: Enums.TextColor.Good\n },\n optionalInputs: {\n color: Enums.TextColor.Warning,\n size: Enums.TextSize.Medium,\n weight: Enums.TextWeight.Lighter,\n isSubtle: false\n }\n },\n errorMessage: {\n color: Enums.TextColor.Accent,\n size: Enums.TextSize.Small,\n weight: Enums.TextWeight.Bolder\n }\n },\n actions: {\n maxActions: 5,\n spacing: Enums.Spacing.Default,\n buttonSpacing: 10,\n showCard: {\n actionMode: Enums.ShowCardActionMode.Inline,\n inlineTopMargin: 16\n },\n actionsOrientation: Enums.Orientation.Horizontal,\n actionAlignment: Enums.ActionAlignment.Left\n },\n adaptiveCard: {\n allowCustomStyle: false\n },\n imageSet: {\n imageSize: Enums.Size.Medium,\n maxImageHeight: 100\n },\n factSet: {\n title: {\n color: Enums.TextColor.Default,\n size: Enums.TextSize.Default,\n isSubtle: false,\n weight: Enums.TextWeight.Bolder,\n wrap: true,\n maxWidth: 150,\n },\n value: {\n color: Enums.TextColor.Default,\n size: Enums.TextSize.Default,\n isSubtle: false,\n weight: Enums.TextWeight.Default,\n wrap: true,\n },\n spacing: 10\n }\n});\n//# sourceMappingURL=host-config.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GlobalRegistry = exports.CardObjectRegistry = void 0;\nvar serialization_1 = require(\"./serialization\");\nvar CardObjectRegistry = /** @class */ (function () {\n function CardObjectRegistry() {\n this._items = {};\n }\n CardObjectRegistry.prototype.findByName = function (typeName) {\n return this._items.hasOwnProperty(typeName) ? this._items[typeName] : undefined;\n };\n CardObjectRegistry.prototype.clear = function () {\n this._items = {};\n };\n CardObjectRegistry.prototype.copyTo = function (target) {\n var keys = Object.keys(this._items);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n var typeRegistration = this._items[key];\n target.register(typeRegistration.typeName, typeRegistration.objectType, typeRegistration.schemaVersion);\n }\n };\n CardObjectRegistry.prototype.register = function (typeName, objectType, schemaVersion) {\n if (schemaVersion === void 0) { schemaVersion = serialization_1.Versions.v1_0; }\n var registrationInfo = this.findByName(typeName);\n if (registrationInfo !== undefined) {\n registrationInfo.objectType = objectType;\n }\n else {\n registrationInfo = {\n typeName: typeName,\n objectType: objectType,\n schemaVersion: schemaVersion\n };\n }\n this._items[typeName] = registrationInfo;\n };\n CardObjectRegistry.prototype.unregister = function (typeName) {\n delete this._items[typeName];\n };\n CardObjectRegistry.prototype.createInstance = function (typeName, targetVersion) {\n var registrationInfo = this.findByName(typeName);\n return (registrationInfo && registrationInfo.schemaVersion.compareTo(targetVersion) <= 0) ? new registrationInfo.objectType() : undefined;\n };\n CardObjectRegistry.prototype.getItemCount = function () {\n return Object.keys(this._items).length;\n };\n CardObjectRegistry.prototype.getItemAt = function (index) {\n var _this = this;\n return Object.keys(this._items).map(function (e) { return _this._items[e]; })[index];\n };\n return CardObjectRegistry;\n}());\nexports.CardObjectRegistry = CardObjectRegistry;\nvar GlobalRegistry = /** @class */ (function () {\n function GlobalRegistry() {\n }\n GlobalRegistry.populateWithDefaultElements = function (registry) {\n registry.clear();\n GlobalRegistry.defaultElements.copyTo(registry);\n };\n GlobalRegistry.populateWithDefaultActions = function (registry) {\n registry.clear();\n GlobalRegistry.defaultActions.copyTo(registry);\n };\n Object.defineProperty(GlobalRegistry, \"elements\", {\n get: function () {\n if (!GlobalRegistry._elements) {\n GlobalRegistry._elements = new CardObjectRegistry();\n GlobalRegistry.populateWithDefaultElements(GlobalRegistry._elements);\n }\n return GlobalRegistry._elements;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(GlobalRegistry, \"actions\", {\n get: function () {\n if (!GlobalRegistry._actions) {\n GlobalRegistry._actions = new CardObjectRegistry();\n GlobalRegistry.populateWithDefaultActions(GlobalRegistry._actions);\n }\n return GlobalRegistry._actions;\n },\n enumerable: false,\n configurable: true\n });\n GlobalRegistry.reset = function () {\n GlobalRegistry._elements = undefined;\n GlobalRegistry._actions = undefined;\n };\n GlobalRegistry.defaultElements = new CardObjectRegistry();\n GlobalRegistry.defaultActions = new CardObjectRegistry();\n return GlobalRegistry;\n}());\nexports.GlobalRegistry = GlobalRegistry;\n//# sourceMappingURL=registry.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SerializableObject = exports.property = exports.SerializableObjectSchema = exports.CustomProperty = exports.SerializableObjectCollectionProperty = exports.SerializableObjectProperty = exports.EnumProperty = exports.ValueSetProperty = exports.StringArrayProperty = exports.PixelSizeProperty = exports.NumProperty = exports.BoolProperty = exports.StringProperty = exports.PropertyDefinition = exports.BaseSerializationContext = exports.isVersionLessOrEqual = exports.Versions = exports.Version = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar shared_1 = require(\"./shared\");\nvar Utils = require(\"./utils\");\nvar Enums = require(\"./enums\");\nvar strings_1 = require(\"./strings\");\nvar Version = /** @class */ (function () {\n function Version(major, minor, label) {\n if (major === void 0) { major = 1; }\n if (minor === void 0) { minor = 1; }\n this._isValid = true;\n this._major = major;\n this._minor = minor;\n this._label = label;\n }\n Version.parse = function (versionString, context) {\n if (!versionString) {\n return undefined;\n }\n var result = new Version();\n result._versionString = versionString;\n var regEx = /(\\d+).(\\d+)/gi;\n var matches = regEx.exec(versionString);\n if (matches != null && matches.length == 3) {\n result._major = parseInt(matches[1]);\n result._minor = parseInt(matches[2]);\n }\n else {\n result._isValid = false;\n }\n if (!result._isValid) {\n context.logParseEvent(undefined, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidVersionString(result._versionString));\n }\n return result;\n };\n Version.prototype.toString = function () {\n return !this._isValid ? this._versionString : this._major + \".\" + this._minor;\n };\n Version.prototype.toJSON = function () {\n return this.toString();\n };\n Version.prototype.compareTo = function (otherVersion) {\n if (!this.isValid || !otherVersion.isValid) {\n throw new Error(\"Cannot compare invalid version.\");\n }\n if (this.major > otherVersion.major) {\n return 1;\n }\n else if (this.major < otherVersion.major) {\n return -1;\n }\n else if (this.minor > otherVersion.minor) {\n return 1;\n }\n else if (this.minor < otherVersion.minor) {\n return -1;\n }\n return 0;\n };\n Object.defineProperty(Version.prototype, \"label\", {\n get: function () {\n return this._label ? this._label : this.toString();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Version.prototype, \"major\", {\n get: function () {\n return this._major;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Version.prototype, \"minor\", {\n get: function () {\n return this._minor;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Version.prototype, \"isValid\", {\n get: function () {\n return this._isValid;\n },\n enumerable: false,\n configurable: true\n });\n return Version;\n}());\nexports.Version = Version;\nvar Versions = /** @class */ (function () {\n function Versions() {\n }\n Versions.v1_0 = new Version(1, 0);\n Versions.v1_1 = new Version(1, 1);\n Versions.v1_2 = new Version(1, 2);\n Versions.v1_3 = new Version(1, 3);\n Versions.v1_4 = new Version(1, 4);\n Versions.v1_5 = new Version(1, 5);\n Versions.latest = Versions.v1_5;\n return Versions;\n}());\nexports.Versions = Versions;\nfunction isVersionLessOrEqual(version, targetVersion) {\n if (version instanceof Version) {\n if (targetVersion instanceof Version) {\n return targetVersion.compareTo(version) >= 0;\n }\n else {\n // Target version is *\n return true;\n }\n }\n else {\n // Version is *\n return true;\n }\n}\nexports.isVersionLessOrEqual = isVersionLessOrEqual;\nvar BaseSerializationContext = /** @class */ (function () {\n function BaseSerializationContext(targetVersion) {\n if (targetVersion === void 0) { targetVersion = Versions.latest; }\n this.targetVersion = targetVersion;\n this._validationEvents = [];\n }\n BaseSerializationContext.prototype.serializeValue = function (target, propertyName, propertyValue, defaultValue, forceDeleteIfNullOrDefault) {\n if (defaultValue === void 0) { defaultValue = undefined; }\n if (forceDeleteIfNullOrDefault === void 0) { forceDeleteIfNullOrDefault = false; }\n if (propertyValue === null || propertyValue === undefined || propertyValue === defaultValue) {\n if (!shared_1.GlobalSettings.enableFullJsonRoundTrip || forceDeleteIfNullOrDefault) {\n delete target[propertyName];\n }\n }\n else if (propertyValue === defaultValue) {\n delete target[propertyName];\n }\n else {\n target[propertyName] = propertyValue;\n }\n };\n BaseSerializationContext.prototype.serializeString = function (target, propertyName, propertyValue, defaultValue) {\n if (propertyValue === null || propertyValue === undefined || propertyValue === defaultValue) {\n delete target[propertyName];\n }\n else {\n target[propertyName] = propertyValue;\n }\n };\n BaseSerializationContext.prototype.serializeBool = function (target, propertyName, propertyValue, defaultValue) {\n if (propertyValue === null || propertyValue === undefined || propertyValue === defaultValue) {\n delete target[propertyName];\n }\n else {\n target[propertyName] = propertyValue;\n }\n };\n BaseSerializationContext.prototype.serializeNumber = function (target, propertyName, propertyValue, defaultValue) {\n if (propertyValue === null || propertyValue === undefined || propertyValue === defaultValue || isNaN(propertyValue)) {\n delete target[propertyName];\n }\n else {\n target[propertyName] = propertyValue;\n }\n };\n BaseSerializationContext.prototype.serializeEnum = function (enumType, target, propertyName, propertyValue, defaultValue) {\n if (defaultValue === void 0) { defaultValue = undefined; }\n if (propertyValue === null || propertyValue === undefined || propertyValue === defaultValue) {\n delete target[propertyName];\n }\n else {\n target[propertyName] = enumType[propertyValue];\n }\n };\n BaseSerializationContext.prototype.serializeArray = function (target, propertyName, propertyValue) {\n var items = [];\n if (propertyValue) {\n for (var _i = 0, propertyValue_1 = propertyValue; _i < propertyValue_1.length; _i++) {\n var item = propertyValue_1[_i];\n var serializedItem = undefined;\n if (item instanceof SerializableObject) {\n serializedItem = item.toJSON(this);\n }\n else if (item.toJSON) {\n serializedItem = item.toJSON();\n }\n else {\n serializedItem = item;\n }\n if (serializedItem !== undefined) {\n items.push(serializedItem);\n }\n }\n }\n if (items.length == 0) {\n if (target.hasOwnProperty(propertyName) && Array.isArray(target[propertyName])) {\n delete target[propertyName];\n }\n }\n else {\n this.serializeValue(target, propertyName, items);\n }\n };\n BaseSerializationContext.prototype.clearEvents = function () {\n this._validationEvents = [];\n };\n BaseSerializationContext.prototype.logEvent = function (source, phase, event, message) {\n this._validationEvents.push({\n source: source,\n phase: phase,\n event: event,\n message: message\n });\n };\n BaseSerializationContext.prototype.logParseEvent = function (source, event, message) {\n this.logEvent(source, Enums.ValidationPhase.Parse, event, message);\n };\n BaseSerializationContext.prototype.getEventAt = function (index) {\n return this._validationEvents[index];\n };\n Object.defineProperty(BaseSerializationContext.prototype, \"eventCount\", {\n get: function () {\n return this._validationEvents.length;\n },\n enumerable: false,\n configurable: true\n });\n return BaseSerializationContext;\n}());\nexports.BaseSerializationContext = BaseSerializationContext;\nvar SimpleSerializationContext = /** @class */ (function (_super) {\n __extends(SimpleSerializationContext, _super);\n function SimpleSerializationContext() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return SimpleSerializationContext;\n}(BaseSerializationContext));\nvar PropertyDefinition = /** @class */ (function () {\n function PropertyDefinition(targetVersion, name, defaultValue, onGetInitialValue) {\n this.targetVersion = targetVersion;\n this.name = name;\n this.defaultValue = defaultValue;\n this.onGetInitialValue = onGetInitialValue;\n this.isSerializationEnabled = true;\n this.sequentialNumber = PropertyDefinition._sequentialNumber;\n PropertyDefinition._sequentialNumber++;\n }\n PropertyDefinition.prototype.getInternalName = function () {\n return this.name;\n };\n PropertyDefinition.prototype.parse = function (sender, source, context) {\n return source[this.name];\n };\n PropertyDefinition.prototype.toJSON = function (sender, target, value, context) {\n context.serializeValue(target, this.name, value, this.defaultValue);\n };\n PropertyDefinition._sequentialNumber = 0;\n return PropertyDefinition;\n}());\nexports.PropertyDefinition = PropertyDefinition;\nvar StringProperty = /** @class */ (function (_super) {\n __extends(StringProperty, _super);\n function StringProperty(targetVersion, name, treatEmptyAsUndefined, regEx, defaultValue, onGetInitialValue) {\n if (treatEmptyAsUndefined === void 0) { treatEmptyAsUndefined = true; }\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.treatEmptyAsUndefined = treatEmptyAsUndefined;\n _this.regEx = regEx;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n return _this;\n }\n StringProperty.prototype.parse = function (sender, source, context) {\n var parsedValue = Utils.parseString(source[this.name], this.defaultValue);\n var isUndefined = parsedValue === undefined || (parsedValue === \"\" && this.treatEmptyAsUndefined);\n if (!isUndefined && this.regEx !== undefined) {\n var matches = this.regEx.exec(parsedValue);\n if (!matches) {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(parsedValue, this.name));\n return undefined;\n }\n }\n return parsedValue;\n };\n StringProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeString(target, this.name, value === \"\" && this.treatEmptyAsUndefined ? undefined : value, this.defaultValue);\n };\n return StringProperty;\n}(PropertyDefinition));\nexports.StringProperty = StringProperty;\nvar BoolProperty = /** @class */ (function (_super) {\n __extends(BoolProperty, _super);\n function BoolProperty(targetVersion, name, defaultValue, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n return _this;\n }\n BoolProperty.prototype.parse = function (sender, source, context) {\n return Utils.parseBool(source[this.name], this.defaultValue);\n };\n BoolProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeBool(target, this.name, value, this.defaultValue);\n };\n return BoolProperty;\n}(PropertyDefinition));\nexports.BoolProperty = BoolProperty;\nvar NumProperty = /** @class */ (function (_super) {\n __extends(NumProperty, _super);\n function NumProperty(targetVersion, name, defaultValue, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n return _this;\n }\n NumProperty.prototype.parse = function (sender, source, context) {\n return Utils.parseNumber(source[this.name], this.defaultValue);\n };\n NumProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeNumber(target, this.name, value, this.defaultValue);\n };\n return NumProperty;\n}(PropertyDefinition));\nexports.NumProperty = NumProperty;\nvar PixelSizeProperty = /** @class */ (function (_super) {\n __extends(PixelSizeProperty, _super);\n function PixelSizeProperty() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PixelSizeProperty.prototype.parse = function (sender, source, context) {\n var result = undefined;\n var value = source[this.name];\n if (typeof value === \"string\") {\n var isValid = false;\n try {\n var size = shared_1.SizeAndUnit.parse(value, true);\n if (size.unit == Enums.SizeUnit.Pixel) {\n result = size.physicalSize;\n isValid = true;\n }\n }\n catch (_a) {\n // Do nothing. A parse error is emitted below\n }\n if (!isValid) {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(source[this.name], \"minHeight\"));\n }\n }\n return result;\n };\n PixelSizeProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeValue(target, this.name, typeof value === \"number\" && !isNaN(value) ? value + \"px\" : undefined);\n };\n return PixelSizeProperty;\n}(PropertyDefinition));\nexports.PixelSizeProperty = PixelSizeProperty;\nvar StringArrayProperty = /** @class */ (function (_super) {\n __extends(StringArrayProperty, _super);\n function StringArrayProperty(targetVersion, name, defaultValue, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n return _this;\n }\n StringArrayProperty.prototype.parse = function (sender, source, context) {\n var sourceValue = source[this.name];\n if (sourceValue === undefined || !Array.isArray(sourceValue)) {\n return this.defaultValue;\n }\n var result = [];\n for (var _i = 0, sourceValue_1 = sourceValue; _i < sourceValue_1.length; _i++) {\n var value = sourceValue_1[_i];\n if (typeof value === \"string\") {\n result.push(value);\n }\n else {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, \"Invalid array value \\\"\" + value + \"\\\" of type \\\"\" + typeof value + \"\\\" ignored for \\\"\" + this.name + \"\\\".\");\n }\n }\n return result;\n };\n StringArrayProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeArray(target, this.name, value);\n };\n return StringArrayProperty;\n}(PropertyDefinition));\nexports.StringArrayProperty = StringArrayProperty;\nvar ValueSetProperty = /** @class */ (function (_super) {\n __extends(ValueSetProperty, _super);\n function ValueSetProperty(targetVersion, name, values, defaultValue, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.values = values;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n return _this;\n }\n ValueSetProperty.prototype.isValidValue = function (value, context) {\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\n var versionedValue = _a[_i];\n if (value.toLowerCase() === versionedValue.value.toLowerCase()) {\n var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;\n return targetVersion.compareTo(context.targetVersion) <= 0;\n }\n }\n return false;\n };\n ValueSetProperty.prototype.parse = function (sender, source, context) {\n var sourceValue = source[this.name];\n if (sourceValue === undefined) {\n return this.defaultValue;\n }\n if (typeof sourceValue === \"string\") {\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\n var versionedValue = _a[_i];\n if (sourceValue.toLowerCase() === versionedValue.value.toLowerCase()) {\n var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\n return versionedValue.value;\n }\n else {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(sourceValue, this.name, targetVersion.toString(), context.targetVersion.toString()));\n return this.defaultValue;\n }\n }\n }\n }\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));\n return this.defaultValue;\n };\n ValueSetProperty.prototype.toJSON = function (sender, target, value, context) {\n var invalidValue = false;\n if (value !== undefined) {\n invalidValue = true;\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\n var versionedValue = _a[_i];\n if (versionedValue.value === value) {\n var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\n invalidValue = false;\n break;\n }\n else {\n context.logEvent(sender, Enums.ValidationPhase.ToJSON, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(value, this.name, targetVersion.toString(), context.targetVersion.toString()));\n }\n }\n }\n }\n if (!invalidValue) {\n context.serializeValue(target, this.name, value, this.defaultValue, true);\n }\n };\n return ValueSetProperty;\n}(PropertyDefinition));\nexports.ValueSetProperty = ValueSetProperty;\nvar EnumProperty = /** @class */ (function (_super) {\n __extends(EnumProperty, _super);\n function EnumProperty(targetVersion, name, enumType, defaultValue, values, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.enumType = enumType;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n _this._values = [];\n if (!values) {\n for (var key in enumType) {\n var keyAsNumber = parseInt(key, 10);\n if (keyAsNumber >= 0) {\n _this._values.push({ value: keyAsNumber });\n }\n }\n }\n else {\n _this._values = values;\n }\n return _this;\n }\n EnumProperty.prototype.parse = function (sender, source, context) {\n var sourceValue = source[this.name];\n if (typeof sourceValue !== \"string\") {\n return this.defaultValue;\n }\n var enumValue = Utils.getEnumValueByName(this.enumType, sourceValue);\n if (enumValue !== undefined) {\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\n var versionedValue = _a[_i];\n if (versionedValue.value === enumValue) {\n var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\n return enumValue;\n }\n else {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(sourceValue, this.name, targetVersion.toString(), context.targetVersion.toString()));\n return this.defaultValue;\n }\n }\n }\n }\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));\n return this.defaultValue;\n };\n EnumProperty.prototype.toJSON = function (sender, target, value, context) {\n var invalidValue = false;\n if (value !== undefined) {\n invalidValue = true;\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\n var versionedValue = _a[_i];\n if (versionedValue.value === value) {\n var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\n invalidValue = false;\n break;\n }\n else {\n context.logEvent(sender, Enums.ValidationPhase.ToJSON, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(value, this.name));\n }\n }\n }\n }\n if (!invalidValue) {\n context.serializeEnum(this.enumType, target, this.name, value, this.defaultValue);\n }\n };\n Object.defineProperty(EnumProperty.prototype, \"values\", {\n get: function () {\n return this._values;\n },\n enumerable: false,\n configurable: true\n });\n return EnumProperty;\n}(PropertyDefinition));\nexports.EnumProperty = EnumProperty;\nvar SerializableObjectProperty = /** @class */ (function (_super) {\n __extends(SerializableObjectProperty, _super);\n function SerializableObjectProperty(targetVersion, name, objectType, nullable, defaultValue) {\n if (nullable === void 0) { nullable = false; }\n var _this = _super.call(this, targetVersion, name, defaultValue, function (sender) { return _this.nullable ? undefined : new _this.objectType(); }) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.objectType = objectType;\n _this.nullable = nullable;\n return _this;\n }\n SerializableObjectProperty.prototype.parse = function (sender, source, context) {\n var sourceValue = source[this.name];\n if (sourceValue === undefined) {\n return this.onGetInitialValue ? this.onGetInitialValue(sender) : this.defaultValue;\n }\n var result = new this.objectType();\n result.parse(sourceValue, context);\n return result;\n };\n SerializableObjectProperty.prototype.toJSON = function (sender, target, value, context) {\n var serializedValue = undefined;\n if (value !== undefined && !value.hasAllDefaultValues()) {\n serializedValue = value.toJSON(context);\n }\n if (typeof serializedValue === \"object\" && Object.keys(serializedValue).length === 0) {\n serializedValue = undefined;\n }\n context.serializeValue(target, this.name, serializedValue, this.defaultValue, true);\n };\n return SerializableObjectProperty;\n}(PropertyDefinition));\nexports.SerializableObjectProperty = SerializableObjectProperty;\nvar SerializableObjectCollectionProperty = /** @class */ (function (_super) {\n __extends(SerializableObjectCollectionProperty, _super);\n function SerializableObjectCollectionProperty(targetVersion, name, objectType, onItemAdded) {\n var _this = _super.call(this, targetVersion, name, undefined, function (sender) { return []; }) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.objectType = objectType;\n _this.onItemAdded = onItemAdded;\n return _this;\n }\n SerializableObjectCollectionProperty.prototype.parse = function (sender, source, context) {\n var result = [];\n var sourceCollection = source[this.name];\n if (Array.isArray(sourceCollection)) {\n for (var _i = 0, sourceCollection_1 = sourceCollection; _i < sourceCollection_1.length; _i++) {\n var sourceItem = sourceCollection_1[_i];\n var item = new this.objectType();\n item.parse(sourceItem, context);\n result.push(item);\n if (this.onItemAdded) {\n this.onItemAdded(sender, item);\n }\n }\n }\n return result.length > 0 ? result : (this.onGetInitialValue ? this.onGetInitialValue(sender) : undefined);\n };\n SerializableObjectCollectionProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeArray(target, this.name, value);\n };\n return SerializableObjectCollectionProperty;\n}(PropertyDefinition));\nexports.SerializableObjectCollectionProperty = SerializableObjectCollectionProperty;\nvar CustomProperty = /** @class */ (function (_super) {\n __extends(CustomProperty, _super);\n function CustomProperty(targetVersion, name, onParse, onToJSON, defaultValue, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.onParse = onParse;\n _this.onToJSON = onToJSON;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n if (!_this.onParse) {\n throw new Error(\"CustomPropertyDefinition instances must have an onParse handler.\");\n }\n if (!_this.onToJSON) {\n throw new Error(\"CustomPropertyDefinition instances must have an onToJSON handler.\");\n }\n return _this;\n }\n CustomProperty.prototype.parse = function (sender, source, context) {\n return this.onParse(sender, this, source, context);\n };\n CustomProperty.prototype.toJSON = function (sender, target, value, context) {\n this.onToJSON(sender, this, target, value, context);\n };\n return CustomProperty;\n}(PropertyDefinition));\nexports.CustomProperty = CustomProperty;\nvar SerializableObjectSchema = /** @class */ (function () {\n function SerializableObjectSchema() {\n this._properties = [];\n }\n SerializableObjectSchema.prototype.indexOf = function (property) {\n for (var i = 0; i < this._properties.length; i++) {\n if (this._properties[i] === property) {\n return i;\n }\n }\n return -1;\n };\n SerializableObjectSchema.prototype.add = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n for (var i = 0; i < properties.length; i++) {\n if (this.indexOf(properties[i]) === -1) {\n this._properties.push(properties[i]);\n }\n }\n };\n SerializableObjectSchema.prototype.remove = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n for (var _a = 0, properties_1 = properties; _a < properties_1.length; _a++) {\n var property_1 = properties_1[_a];\n while (true) {\n var index = this.indexOf(property_1);\n if (index >= 0) {\n this._properties.splice(index, 1);\n }\n else {\n break;\n }\n }\n }\n };\n SerializableObjectSchema.prototype.getItemAt = function (index) {\n return this._properties[index];\n };\n SerializableObjectSchema.prototype.getCount = function () {\n return this._properties.length;\n };\n return SerializableObjectSchema;\n}());\nexports.SerializableObjectSchema = SerializableObjectSchema;\n// This is a decorator function, used to map SerializableObject descendant class members to\n// schema properties\nfunction property(property) {\n return function (target, propertyKey) {\n var descriptor = Object.getOwnPropertyDescriptor(target, propertyKey) || {};\n if (!descriptor.get && !descriptor.set) {\n descriptor.get = function () { return this.getValue(property); };\n descriptor.set = function (value) { this.setValue(property, value); };\n Object.defineProperty(target, propertyKey, descriptor);\n }\n };\n}\nexports.property = property;\nvar SerializableObject = /** @class */ (function () {\n function SerializableObject() {\n this._propertyBag = {};\n this._rawProperties = {};\n this.maxVersion = SerializableObject.defaultMaxVersion;\n var s = this.getSchema();\n for (var i = 0; i < s.getCount(); i++) {\n var property_2 = s.getItemAt(i);\n if (property_2.onGetInitialValue) {\n this.setValue(property_2, property_2.onGetInitialValue(this));\n }\n }\n }\n SerializableObject.prototype.getDefaultSerializationContext = function () {\n return new SimpleSerializationContext();\n };\n SerializableObject.prototype.populateSchema = function (schema) {\n var ctor = this.constructor;\n var properties = [];\n for (var propertyName in ctor) {\n try {\n var propertyValue = ctor[propertyName];\n if (propertyValue instanceof PropertyDefinition) {\n properties.push(propertyValue);\n }\n }\n catch (_a) {\n // If a property happens to have a getter function and\n // it throws an exception, we need to catch it here\n }\n }\n if (properties.length > 0) {\n var sortedProperties = properties.sort(function (p1, p2) {\n if (p1.sequentialNumber > p2.sequentialNumber) {\n return 1;\n }\n else if (p1.sequentialNumber < p2.sequentialNumber) {\n return -1;\n }\n return 0;\n });\n schema.add.apply(schema, sortedProperties);\n }\n if (SerializableObject.onRegisterCustomProperties) {\n SerializableObject.onRegisterCustomProperties(this, schema);\n }\n };\n SerializableObject.prototype.getValue = function (property) {\n return this._propertyBag.hasOwnProperty(property.getInternalName()) ? this._propertyBag[property.getInternalName()] : property.defaultValue;\n };\n SerializableObject.prototype.setValue = function (property, value) {\n if (value === undefined || value === null) {\n delete this._propertyBag[property.getInternalName()];\n }\n else {\n this._propertyBag[property.getInternalName()] = value;\n }\n };\n SerializableObject.prototype.internalParse = function (source, context) {\n this._propertyBag = {};\n this._rawProperties = shared_1.GlobalSettings.enableFullJsonRoundTrip ? (source ? source : {}) : {};\n if (source) {\n var s = this.getSchema();\n for (var i = 0; i < s.getCount(); i++) {\n var property_3 = s.getItemAt(i);\n if (property_3.isSerializationEnabled) {\n var propertyValue = property_3.onGetInitialValue ? property_3.onGetInitialValue(this) : undefined;\n if (source.hasOwnProperty(property_3.name)) {\n if (property_3.targetVersion.compareTo(context.targetVersion) <= 0) {\n propertyValue = property_3.parse(this, source, context);\n }\n else {\n context.logParseEvent(this, Enums.ValidationEvent.UnsupportedProperty, strings_1.Strings.errors.propertyNotSupported(property_3.name, property_3.targetVersion.toString(), context.targetVersion.toString()));\n }\n }\n this.setValue(property_3, propertyValue);\n }\n }\n }\n else {\n this.resetDefaultValues();\n }\n };\n SerializableObject.prototype.internalToJSON = function (target, context) {\n var s = this.getSchema();\n var serializedProperties = [];\n for (var i = 0; i < s.getCount(); i++) {\n var property_4 = s.getItemAt(i);\n // Avoid serializing the same property multiple times. This is necessary\n // because some property definitions map to the same underlying schema\n // property\n if (property_4.isSerializationEnabled && property_4.targetVersion.compareTo(context.targetVersion) <= 0 && serializedProperties.indexOf(property_4.name) === -1) {\n property_4.toJSON(this, target, this.getValue(property_4), context);\n serializedProperties.push(property_4.name);\n }\n }\n };\n SerializableObject.prototype.shouldSerialize = function (context) {\n return true;\n };\n SerializableObject.prototype.parse = function (source, context) {\n this.internalParse(source, context ? context : new SimpleSerializationContext());\n };\n SerializableObject.prototype.toJSON = function (context) {\n var effectiveContext;\n if (context && context instanceof BaseSerializationContext) {\n effectiveContext = context;\n }\n else {\n effectiveContext = this.getDefaultSerializationContext();\n effectiveContext.toJSONOriginalParam = context;\n }\n if (this.shouldSerialize(effectiveContext)) {\n var result = void 0;\n if (shared_1.GlobalSettings.enableFullJsonRoundTrip && this._rawProperties && typeof this._rawProperties === \"object\") {\n result = this._rawProperties;\n }\n else {\n result = {};\n }\n this.internalToJSON(result, effectiveContext);\n return result;\n }\n else {\n return undefined;\n }\n };\n SerializableObject.prototype.hasDefaultValue = function (property) {\n return this.getValue(property) === property.defaultValue;\n };\n SerializableObject.prototype.hasAllDefaultValues = function () {\n var s = this.getSchema();\n for (var i = 0; i < s.getCount(); i++) {\n var property_5 = s.getItemAt(i);\n if (!this.hasDefaultValue(property_5)) {\n return false;\n }\n }\n return true;\n };\n SerializableObject.prototype.resetDefaultValues = function () {\n var s = this.getSchema();\n for (var i = 0; i < s.getCount(); i++) {\n var property_6 = s.getItemAt(i);\n this.setValue(property_6, property_6.defaultValue);\n }\n };\n SerializableObject.prototype.setCustomProperty = function (name, value) {\n var shouldDeleteProperty = (typeof value === \"string\" && !value) || value === undefined || value === null;\n if (shouldDeleteProperty) {\n delete this._rawProperties[name];\n }\n else {\n this._rawProperties[name] = value;\n }\n };\n SerializableObject.prototype.getCustomProperty = function (name) {\n return this._rawProperties[name];\n };\n SerializableObject.prototype.getSchema = function () {\n var schema = SerializableObject._schemaCache[this.getSchemaKey()];\n if (!schema) {\n schema = new SerializableObjectSchema();\n this.populateSchema(schema);\n SerializableObject._schemaCache[this.getSchemaKey()] = schema;\n }\n return schema;\n };\n SerializableObject.defaultMaxVersion = Versions.latest;\n SerializableObject._schemaCache = {};\n return SerializableObject;\n}());\nexports.SerializableObject = SerializableObject;\n//# sourceMappingURL=serialization.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UUID = exports.SizeAndUnit = exports.PaddingDefinition = exports.SpacingDefinition = exports.StringWithSubstitutions = exports.ContentTypes = exports.GlobalSettings = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Enums = require(\"./enums\");\nvar GlobalSettings = /** @class */ (function () {\n function GlobalSettings() {\n }\n GlobalSettings.useAdvancedTextBlockTruncation = true;\n GlobalSettings.useAdvancedCardBottomTruncation = false;\n GlobalSettings.useMarkdownInRadioButtonAndCheckbox = true;\n GlobalSettings.allowMarkForTextHighlighting = false;\n GlobalSettings.alwaysBleedSeparators = false;\n GlobalSettings.enableFullJsonRoundTrip = false;\n GlobalSettings.displayInputValidationErrors = true;\n GlobalSettings.allowPreProcessingPropertyValues = false;\n GlobalSettings.setTabIndexAtCardRoot = true;\n GlobalSettings.enableFallback = true;\n GlobalSettings.useWebkitLineClamp = true;\n GlobalSettings.allowMoreThanMaxActionsInOverflowMenu = false;\n GlobalSettings.applets = {\n logEnabled: true,\n logLevel: Enums.LogLevel.Error,\n maximumRetryAttempts: 3,\n defaultTimeBetweenRetryAttempts: 3000,\n authPromptWidth: 400,\n authPromptHeight: 600,\n refresh: {\n mode: Enums.RefreshMode.Manual,\n timeBetweenAutomaticRefreshes: 3000,\n maximumConsecutiveAutomaticRefreshes: 3,\n allowManualRefreshesAfterAutomaticRefreshes: true\n }\n };\n return GlobalSettings;\n}());\nexports.GlobalSettings = GlobalSettings;\nexports.ContentTypes = {\n applicationJson: \"application/json\",\n applicationXWwwFormUrlencoded: \"application/x-www-form-urlencoded\"\n};\nvar StringWithSubstitutions = /** @class */ (function () {\n function StringWithSubstitutions() {\n this._isProcessed = false;\n }\n StringWithSubstitutions.prototype.getReferencedInputs = function (inputs, referencedInputs) {\n if (!referencedInputs) {\n throw new Error(\"The referencedInputs parameter cannot be null.\");\n }\n for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {\n var input = inputs_1[_i];\n var matches = new RegExp(\"\\\\{{2}(\" + input.id + \").value\\\\}{2}\", \"gi\").exec(this._original);\n if (matches != null && input.id) {\n referencedInputs[input.id] = input;\n }\n }\n };\n StringWithSubstitutions.prototype.substituteInputValues = function (inputs, contentType) {\n this._processed = this._original;\n if (this._original) {\n var regEx = /\\{{2}([a-z0-9_$@]+).value\\}{2}/gi;\n var matches = void 0;\n while ((matches = regEx.exec(this._original)) !== null) {\n for (var _i = 0, _a = Object.keys(inputs); _i < _a.length; _i++) {\n var key = _a[_i];\n if (key.toLowerCase() == matches[1].toLowerCase()) {\n var matchedInput = inputs[key];\n var valueForReplace = \"\";\n if (matchedInput.value) {\n valueForReplace = matchedInput.value;\n }\n if (contentType === exports.ContentTypes.applicationJson) {\n valueForReplace = JSON.stringify(valueForReplace);\n valueForReplace = valueForReplace.slice(1, -1);\n }\n else if (contentType === exports.ContentTypes.applicationXWwwFormUrlencoded) {\n valueForReplace = encodeURIComponent(valueForReplace);\n }\n this._processed = this._processed.replace(matches[0], valueForReplace);\n break;\n }\n }\n }\n }\n this._isProcessed = true;\n };\n StringWithSubstitutions.prototype.getOriginal = function () {\n return this._original;\n };\n StringWithSubstitutions.prototype.get = function () {\n if (!this._isProcessed) {\n return this._original;\n }\n else {\n return this._processed;\n }\n };\n StringWithSubstitutions.prototype.set = function (value) {\n this._original = value;\n this._isProcessed = false;\n };\n return StringWithSubstitutions;\n}());\nexports.StringWithSubstitutions = StringWithSubstitutions;\nvar SpacingDefinition = /** @class */ (function () {\n function SpacingDefinition(top, right, bottom, left) {\n if (top === void 0) { top = 0; }\n if (right === void 0) { right = 0; }\n if (bottom === void 0) { bottom = 0; }\n if (left === void 0) { left = 0; }\n this.left = 0;\n this.top = 0;\n this.right = 0;\n this.bottom = 0;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n this.left = left;\n }\n return SpacingDefinition;\n}());\nexports.SpacingDefinition = SpacingDefinition;\nvar PaddingDefinition = /** @class */ (function () {\n function PaddingDefinition(top, right, bottom, left) {\n if (top === void 0) { top = Enums.Spacing.None; }\n if (right === void 0) { right = Enums.Spacing.None; }\n if (bottom === void 0) { bottom = Enums.Spacing.None; }\n if (left === void 0) { left = Enums.Spacing.None; }\n this.top = Enums.Spacing.None;\n this.right = Enums.Spacing.None;\n this.bottom = Enums.Spacing.None;\n this.left = Enums.Spacing.None;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n this.left = left;\n }\n return PaddingDefinition;\n}());\nexports.PaddingDefinition = PaddingDefinition;\nvar SizeAndUnit = /** @class */ (function () {\n function SizeAndUnit(physicalSize, unit) {\n this.physicalSize = physicalSize;\n this.unit = unit;\n }\n SizeAndUnit.parse = function (input, requireUnitSpecifier) {\n if (requireUnitSpecifier === void 0) { requireUnitSpecifier = false; }\n var result = new SizeAndUnit(0, Enums.SizeUnit.Weight);\n if (typeof input === \"number\") {\n result.physicalSize = input;\n return result;\n }\n else if (typeof input === \"string\") {\n var regExp = /^([0-9]+)(px|\\*)?$/g;\n var matches = regExp.exec(input);\n var expectedMatchCount = requireUnitSpecifier ? 3 : 2;\n if (matches && matches.length >= expectedMatchCount) {\n result.physicalSize = parseInt(matches[1]);\n if (matches.length == 3) {\n if (matches[2] == \"px\") {\n result.unit = Enums.SizeUnit.Pixel;\n }\n }\n return result;\n }\n }\n throw new Error(\"Invalid size: \" + input);\n };\n return SizeAndUnit;\n}());\nexports.SizeAndUnit = SizeAndUnit;\n/**\n * Fast UUID generator, RFC4122 version 4 compliant.\n * @author Jeff Ward (jcward.com).\n * @license MIT license\n * @link http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\n **/\nvar UUID = /** @class */ (function () {\n function UUID() {\n }\n UUID.generate = function () {\n var d0 = Math.random() * 0xffffffff | 0;\n var d1 = Math.random() * 0xffffffff | 0;\n var d2 = Math.random() * 0xffffffff | 0;\n var d3 = Math.random() * 0xffffffff | 0;\n return UUID.lut[d0 & 0xff] + UUID.lut[d0 >> 8 & 0xff] + UUID.lut[d0 >> 16 & 0xff] + UUID.lut[d0 >> 24 & 0xff] + '-' +\n UUID.lut[d1 & 0xff] + UUID.lut[d1 >> 8 & 0xff] + '-' + UUID.lut[d1 >> 16 & 0x0f | 0x40] + UUID.lut[d1 >> 24 & 0xff] + '-' +\n UUID.lut[d2 & 0x3f | 0x80] + UUID.lut[d2 >> 8 & 0xff] + '-' + UUID.lut[d2 >> 16 & 0xff] + UUID.lut[d2 >> 24 & 0xff] +\n UUID.lut[d3 & 0xff] + UUID.lut[d3 >> 8 & 0xff] + UUID.lut[d3 >> 16 & 0xff] + UUID.lut[d3 >> 24 & 0xff];\n };\n UUID.initialize = function () {\n for (var i = 0; i < 256; i++) {\n UUID.lut[i] = (i < 16 ? '0' : '') + i.toString(16);\n }\n };\n UUID.lut = [];\n return UUID;\n}());\nexports.UUID = UUID;\nUUID.initialize();\n//# sourceMappingURL=shared.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Strings = void 0;\nvar Strings = /** @class */ (function () {\n function Strings() {\n }\n Strings.errors = {\n unknownElementType: function (typeName) { return \"Unknown element type \\\"\" + typeName + \"\\\". Fallback will be used if present.\"; },\n unknownActionType: function (typeName) { return \"Unknown action type \\\"\" + typeName + \"\\\". Fallback will be used if present.\"; },\n elementTypeNotAllowed: function (typeName) { return \"Element type \\\"\" + typeName + \"\\\" is not allowed in this context.\"; },\n actionTypeNotAllowed: function (typeName) { return \"Action type \\\"\" + typeName + \"\\\" is not allowed in this context.\"; },\n invalidPropertyValue: function (value, propertyName) { return \"Invalid value \\\"\" + value + \"\\\" for property \\\"\" + propertyName + \"\\\".\"; },\n showCardMustHaveCard: function () { return \"\\\"An Action.ShowCard must have its \\\"card\\\" property set to a valid AdaptiveCard object.\"; },\n invalidColumnWidth: function (invalidWidth) { return \"Invalid column width \\\"\" + invalidWidth + \"\\\" - defaulting to \\\"auto\\\".\"; },\n invalidCardVersion: function (defaultingToVersion) { return \"Invalid card version. Defaulting to \\\"\" + defaultingToVersion + \"\\\".\"; },\n invalidVersionString: function (versionString) { return \"Invalid version string \\\"\" + versionString + \"\\\".\"; },\n propertyValueNotSupported: function (value, propertyName, supportedInVersion, versionUsed) { return \"Value \\\"\" + value + \"\\\" for property \\\"\" + propertyName + \"\\\" is supported in version \" + supportedInVersion + \", but you are using version \" + versionUsed + \".\"; },\n propertyNotSupported: function (propertyName, supportedInVersion, versionUsed) { return \"Property \\\"\" + propertyName + \"\\\" is supported in version \" + supportedInVersion + \", but you are using version \" + versionUsed + \".\"; },\n indexOutOfRange: function (index) { return \"Index out of range (\" + index + \").\"; },\n elementCannotBeUsedAsInline: function () { return \"RichTextBlock.addInline: the specified card element cannot be used as a RichTextBlock inline.\"; },\n inlineAlreadyParented: function () { return \"RichTextBlock.addInline: the specified inline already belongs to another RichTextBlock.\"; },\n interactivityNotAllowed: function () { return \"Interactivity is not allowed.\"; },\n inputsMustHaveUniqueId: function () { return \"All inputs must have a unique Id.\"; },\n choiceSetMustHaveAtLeastOneChoice: function () { return \"An Input.ChoiceSet must have at least one choice defined.\"; },\n choiceSetChoicesMustHaveTitleAndValue: function () { return \"All choices in an Input.ChoiceSet must have their title and value properties set.\"; },\n propertyMustBeSet: function (propertyName) { return \"Property \\\"\" + propertyName + \"\\\" must be set.\"; },\n actionHttpHeadersMustHaveNameAndValue: function () { return \"All headers of an Action.Http must have their name and value properties set.\"; },\n tooManyActions: function (maximumActions) { return \"Maximum number of actions exceeded (\" + maximumActions + \").\"; },\n columnAlreadyBelongsToAnotherSet: function () { return \"This column already belongs to another ColumnSet.\"; },\n invalidCardType: function () { return \"Invalid or missing card type. Make sure the card's type property is set to \\\"AdaptiveCard\\\".\"; },\n unsupportedCardVersion: function (version, maxSupportedVersion) { return \"The specified card version (\" + version + \") is not supported. The maximum supported card version is \" + maxSupportedVersion + \".\"; },\n duplicateId: function (id) { return \"Duplicate Id \\\"\" + id + \"\\\".\"; },\n markdownProcessingNotEnabled: function () { return \"Markdown processing isn't enabled. Please see https://www.npmjs.com/package/adaptivecards#supporting-markdown\"; },\n processMarkdownEventRemoved: function () { return \"The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead.\"; },\n elementAlreadyParented: function () { return \"The element already belongs to another container.\"; },\n actionAlreadyParented: function () { return \"The action already belongs to another element.\"; },\n elementTypeNotStandalone: function (typeName) { return \"Elements of type \" + typeName + \" cannot be used as standalone elements.\"; }\n };\n Strings.magicCodeInputCard = {\n tryAgain: function () { return \"That didn't work... let's try again.\"; },\n pleaseLogin: function () { return \"Please login in the popup. You will obtain a magic code. Paste that code below and select \\\"Submit\\\"\"; },\n enterMagicCode: function () { return \"Enter magic code\"; },\n pleaseEnterMagicCodeYouReceived: function () { return \"Please enter the magic code you received.\"; },\n submit: function () { return \"Submit\"; },\n cancel: function () { return \"Cancel\"; },\n somethingWentWrong: function () { return \"Something went wrong. This action can't be handled.\"; },\n authenticationFailed: function () { return \"Authentication failed.\"; }\n };\n Strings.runtime = {\n automaticRefreshPaused: function () { return \"Automatic refresh paused.\"; },\n clckToRestartAutomaticRefresh: function () { return \"Click to restart.\"; },\n refreshThisCard: function () { return \"Refresh this card\"; }\n };\n Strings.hints = {\n dontUseWeightedAndStrecthedColumnsInSameSet: function () { return \"It is not recommended to use weighted and stretched columns in the same ColumnSet, because in such a situation stretched columns will always get the minimum amount of space.\"; }\n };\n Strings.defaults = {\n inlineActionTitle: function () { return \"Inline Action\"; },\n overflowButtonText: function () { return \"...\"; },\n mediaPlayerAriaLabel: function () { return \"Media content\"; },\n mediaPlayerPlayMedia: function () { return \"Play media\"; }\n };\n return Strings;\n}());\nexports.Strings = Strings;\n//# sourceMappingURL=strings.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Table = exports.TableRow = exports.TableCell = exports.StylableContainer = exports.TableColumnDefinition = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar card_elements_1 = require(\"./card-elements\");\nvar enums_1 = require(\"./enums\");\nvar registry_1 = require(\"./registry\");\nvar serialization_1 = require(\"./serialization\");\nvar shared_1 = require(\"./shared\");\nvar strings_1 = require(\"./strings\");\nvar utils_1 = require(\"./utils\");\nvar TableColumnDefinition = /** @class */ (function (_super) {\n __extends(TableColumnDefinition, _super);\n function TableColumnDefinition() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.width = new shared_1.SizeAndUnit(1, enums_1.SizeUnit.Weight);\n return _this;\n }\n TableColumnDefinition.prototype.getSchemaKey = function () {\n return \"ColumnDefinition\";\n };\n TableColumnDefinition.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"horizontalCellContentAlignment\", enums_1.HorizontalAlignment);\n TableColumnDefinition.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"verticalCellContentAlignment\", enums_1.VerticalAlignment);\n TableColumnDefinition.widthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_5, \"width\", function (sender, property, source, context) {\n var result = property.defaultValue;\n var value = source[property.name];\n var invalidWidth = false;\n if (typeof value === \"number\" && !isNaN(value)) {\n result = new shared_1.SizeAndUnit(value, enums_1.SizeUnit.Weight);\n }\n else if (typeof value === \"string\") {\n try {\n result = shared_1.SizeAndUnit.parse(value);\n }\n catch (e) {\n invalidWidth = true;\n }\n }\n else {\n invalidWidth = true;\n }\n if (invalidWidth) {\n context.logParseEvent(sender, enums_1.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidColumnWidth(value));\n }\n return result;\n }, function (sender, property, target, value, context) {\n if (value.unit === enums_1.SizeUnit.Pixel) {\n context.serializeValue(target, \"width\", value.physicalSize + \"px\");\n }\n else {\n context.serializeNumber(target, \"width\", value.physicalSize);\n }\n }, new shared_1.SizeAndUnit(1, enums_1.SizeUnit.Weight));\n __decorate([\n serialization_1.property(TableColumnDefinition.horizontalCellContentAlignmentProperty)\n ], TableColumnDefinition.prototype, \"horizontalCellContentAlignment\", void 0);\n __decorate([\n serialization_1.property(TableColumnDefinition.verticalCellContentAlignmentProperty)\n ], TableColumnDefinition.prototype, \"verticalCellContentAlignment\", void 0);\n __decorate([\n serialization_1.property(TableColumnDefinition.widthProperty)\n ], TableColumnDefinition.prototype, \"width\", void 0);\n return TableColumnDefinition;\n}(serialization_1.SerializableObject));\nexports.TableColumnDefinition = TableColumnDefinition;\nvar StylableContainer = /** @class */ (function (_super) {\n __extends(StylableContainer, _super);\n function StylableContainer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._items = [];\n return _this;\n }\n StylableContainer.prototype.parseItem = function (source, context) {\n var _this = this;\n return context.parseCardObject(this, source, [], // Forbidden types not supported for elements for now\n !this.isDesignMode(), function (typeName) {\n return _this.createItemInstance(typeName);\n }, function (typeName, errorType) {\n context.logParseEvent(undefined, enums_1.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\n });\n };\n StylableContainer.prototype.internalAddItem = function (item) {\n if (!item.parent) {\n this._items.push(item);\n item.setParent(this);\n }\n else {\n throw new Error(strings_1.Strings.errors.elementAlreadyParented());\n }\n };\n StylableContainer.prototype.internalRemoveItem = function (item) {\n var itemIndex = this._items.indexOf(item);\n if (itemIndex >= 0) {\n this._items.splice(itemIndex, 1);\n item.setParent(undefined);\n this.updateLayout();\n return true;\n }\n return false;\n };\n StylableContainer.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this._items = [];\n var items = source[this.getCollectionPropertyName()];\n if (Array.isArray(items)) {\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\n var item = items_1[_i];\n var instance = this.parseItem(item, context);\n if (instance) {\n this._items.push(instance);\n }\n }\n }\n };\n StylableContainer.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n context.serializeArray(target, this.getCollectionPropertyName(), this._items);\n };\n StylableContainer.prototype.removeItem = function (item) {\n return this.internalRemoveItem(item);\n };\n StylableContainer.prototype.getItemCount = function () {\n return this._items.length;\n };\n StylableContainer.prototype.getItemAt = function (index) {\n return this._items[index];\n };\n StylableContainer.prototype.getFirstVisibleRenderedItem = function () {\n return this.getItemCount() > 0 ? this.getItemAt(0) : undefined;\n };\n StylableContainer.prototype.getLastVisibleRenderedItem = function () {\n return this.getItemCount() > 0 ? this.getItemAt(this.getItemCount() - 1) : undefined;\n };\n return StylableContainer;\n}(card_elements_1.StylableCardElementContainer));\nexports.StylableContainer = StylableContainer;\nvar TableCell = /** @class */ (function (_super) {\n __extends(TableCell, _super);\n function TableCell() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._columnIndex = -1;\n _this._cellType = \"data\";\n return _this;\n }\n TableCell.prototype.getHasBorder = function () {\n return this.parentRow.parentTable.showGridLines;\n };\n TableCell.prototype.applyBorder = function () {\n if (this.renderedElement && this.getHasBorder()) {\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.parentRow.parentTable.gridStyle);\n if (styleDefinition.borderColor) {\n var borderColor = utils_1.stringToCssColor(styleDefinition.borderColor);\n if (borderColor) {\n this.renderedElement.style.borderRight = \"1px solid \" + borderColor;\n this.renderedElement.style.borderBottom = \"1px solid \" + borderColor;\n }\n }\n }\n };\n TableCell.prototype.getDefaultPadding = function () {\n return this.getHasBackground() || this.getHasBorder() ?\n new shared_1.PaddingDefinition(enums_1.Spacing.Small, enums_1.Spacing.Small, enums_1.Spacing.Small, enums_1.Spacing.Small) : _super.prototype.getDefaultPadding.call(this);\n };\n TableCell.prototype.internalRender = function () {\n var cellElement = _super.prototype.internalRender.call(this);\n if (cellElement) {\n cellElement.setAttribute(\"role\", this.cellType === \"data\" ? \"cell\" : \"columnheader\");\n cellElement.style.minWidth = \"0\";\n if (this.cellType === \"header\") {\n cellElement.setAttribute(\"scope\", \"col\");\n }\n }\n return cellElement;\n };\n TableCell.prototype.shouldSerialize = function (context) {\n return true;\n };\n TableCell.prototype.getJsonTypeName = function () {\n return \"TableCell\";\n };\n TableCell.prototype.getEffectiveTextStyleDefinition = function () {\n if (this.cellType === \"header\") {\n return this.hostConfig.textStyles.columnHeader;\n }\n return _super.prototype.getEffectiveTextStyleDefinition.call(this);\n };\n TableCell.prototype.getEffectiveHorizontalAlignment = function () {\n if (this.horizontalAlignment !== undefined) {\n return this.horizontalAlignment;\n }\n if (this.parentRow.horizontalCellContentAlignment !== undefined) {\n return this.parentRow.horizontalCellContentAlignment;\n }\n if (this.columnIndex >= 0) {\n var horizontalAlignment = this.parentRow.parentTable.getColumnAt(this.columnIndex).horizontalCellContentAlignment;\n if (horizontalAlignment !== undefined) {\n return horizontalAlignment;\n }\n }\n if (this.parentRow.parentTable.horizontalCellContentAlignment !== undefined) {\n return this.parentRow.parentTable.horizontalCellContentAlignment;\n }\n return _super.prototype.getEffectiveHorizontalAlignment.call(this);\n };\n TableCell.prototype.getEffectiveVerticalContentAlignment = function () {\n if (this.verticalContentAlignment !== undefined) {\n return this.verticalContentAlignment;\n }\n if (this.parentRow.verticalCellContentAlignment !== undefined) {\n return this.parentRow.verticalCellContentAlignment;\n }\n if (this.columnIndex >= 0) {\n var verticalAlignment = this.parentRow.parentTable.getColumnAt(this.columnIndex).verticalCellContentAlignment;\n if (verticalAlignment !== undefined) {\n return verticalAlignment;\n }\n }\n if (this.parentRow.parentTable.verticalCellContentAlignment !== undefined) {\n return this.parentRow.parentTable.verticalCellContentAlignment;\n }\n return _super.prototype.getEffectiveVerticalContentAlignment.call(this);\n };\n Object.defineProperty(TableCell.prototype, \"columnIndex\", {\n get: function () {\n return this._columnIndex;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableCell.prototype, \"cellType\", {\n get: function () {\n return this._cellType;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableCell.prototype, \"parentRow\", {\n get: function () {\n return this.parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableCell.prototype, \"isStandalone\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n return TableCell;\n}(card_elements_1.Container));\nexports.TableCell = TableCell;\nvar TableRow = /** @class */ (function (_super) {\n __extends(TableRow, _super);\n function TableRow() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n //#endregion\n TableRow.prototype.getDefaultPadding = function () {\n return new shared_1.PaddingDefinition(enums_1.Spacing.None, enums_1.Spacing.None, enums_1.Spacing.None, enums_1.Spacing.None);\n };\n TableRow.prototype.applyBackground = function () {\n if (this.renderedElement) {\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));\n if (styleDefinition.backgroundColor) {\n var bgColor = utils_1.stringToCssColor(styleDefinition.backgroundColor);\n this.renderedElement.style.backgroundColor = bgColor;\n }\n }\n };\n TableRow.prototype.getCollectionPropertyName = function () {\n return \"cells\";\n };\n TableRow.prototype.createItemInstance = function (typeName) {\n return !typeName || typeName === \"TableCell\" ? new TableCell() : undefined;\n };\n TableRow.prototype.internalRender = function () {\n var isFirstRow = this.getIsFirstRow();\n var cellSpacing = this.hostConfig.table.cellSpacing;\n var rowElement = document.createElement(\"div\");\n rowElement.setAttribute(\"role\", \"row\");\n rowElement.style.display = \"flex\";\n rowElement.style.flexDirection = \"row\";\n for (var i = 0; i < Math.min(this.getItemCount(), this.parentTable.getColumnCount()); i++) {\n var cell = this.getItemAt(i);\n // Cheating a bit in order to keep cellType read-only\n cell[\"_columnIndex\"] = i;\n cell[\"_cellType\"] = (this.parentTable.firstRowAsHeaders && isFirstRow) ? \"header\" : \"data\";\n var renderedCell = cell.render();\n if (renderedCell) {\n var column = this.parentTable.getColumnAt(i);\n if (column.computedWidth.unit === enums_1.SizeUnit.Pixel) {\n renderedCell.style.flex = \"0 0 \" + column.computedWidth.physicalSize + \"px\";\n }\n else {\n renderedCell.style.flex = \"1 1 \" + column.computedWidth.physicalSize + \"%\";\n }\n if (i > 0 && !this.parentTable.showGridLines && cellSpacing > 0) {\n renderedCell.style.marginLeft = cellSpacing + \"px\";\n }\n rowElement.appendChild(renderedCell);\n }\n }\n return rowElement.children.length > 0 ? rowElement : undefined;\n };\n TableRow.prototype.shouldSerialize = function (context) {\n return true;\n };\n TableRow.prototype.addCell = function (cell) {\n this.internalAddItem(cell);\n };\n TableRow.prototype.removeCellAt = function (columnIndex) {\n if (columnIndex >= 0 && columnIndex < this.getItemCount()) {\n return this.removeItem(this.getItemAt(columnIndex));\n }\n return false;\n };\n TableRow.prototype.ensureHasEnoughCells = function (cellCount) {\n while (this.getItemCount() < cellCount) {\n this.addCell(new TableCell());\n }\n };\n TableRow.prototype.getJsonTypeName = function () {\n return \"TableRow\";\n };\n TableRow.prototype.getIsFirstRow = function () {\n return this.parentTable.getItemAt(0) === this;\n };\n Object.defineProperty(TableRow.prototype, \"parentTable\", {\n get: function () {\n return this.parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableRow.prototype, \"isStandalone\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n TableRow.styleProperty = new card_elements_1.ContainerStyleProperty(serialization_1.Versions.v1_5, \"style\");\n TableRow.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"horizontalCellContentAlignment\", enums_1.HorizontalAlignment);\n TableRow.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"verticalCellContentAlignment\", enums_1.VerticalAlignment);\n __decorate([\n serialization_1.property(TableRow.horizontalCellContentAlignmentProperty)\n ], TableRow.prototype, \"horizontalCellContentAlignment\", void 0);\n __decorate([\n serialization_1.property(TableRow.verticalCellContentAlignmentProperty)\n ], TableRow.prototype, \"verticalCellContentAlignment\", void 0);\n return TableRow;\n}(StylableContainer));\nexports.TableRow = TableRow;\nvar Table = /** @class */ (function (_super) {\n __extends(Table, _super);\n function Table() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._columns = [];\n _this.firstRowAsHeaders = true;\n _this.showGridLines = true;\n return _this;\n }\n Object.defineProperty(Table.prototype, \"gridStyle\", {\n get: function () {\n var style = this.getValue(Table.gridStyleProperty);\n if (style && this.hostConfig.containerStyles.getStyleByName(style)) {\n return style;\n }\n return undefined;\n },\n set: function (value) {\n this.setValue(Table.gridStyleProperty, value);\n },\n enumerable: false,\n configurable: true\n });\n //#endregion\n Table.prototype.ensureRowsHaveEnoughCells = function () {\n for (var i = 0; i < this.getItemCount(); i++) {\n this.getItemAt(i).ensureHasEnoughCells(this.getColumnCount());\n }\n };\n Table.prototype.removeCellsFromColumn = function (columnIndex) {\n for (var i = 0; i < this.getItemCount(); i++) {\n this.getItemAt(i).removeCellAt(columnIndex);\n }\n };\n Table.prototype.getCollectionPropertyName = function () {\n return \"rows\";\n };\n Table.prototype.createItemInstance = function (typeName) {\n return !typeName || typeName === \"TableRow\" ? new TableRow() : undefined;\n };\n Table.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this.ensureRowsHaveEnoughCells();\n };\n Table.prototype.internalRender = function () {\n if (this.getItemCount() > 0) {\n var totalWeights = 0;\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n if (column.width.unit === enums_1.SizeUnit.Weight) {\n totalWeights += column.width.physicalSize;\n }\n }\n for (var _b = 0, _c = this._columns; _b < _c.length; _b++) {\n var column = _c[_b];\n if (column.width.unit === enums_1.SizeUnit.Pixel) {\n column.computedWidth = new shared_1.SizeAndUnit(column.width.physicalSize, enums_1.SizeUnit.Pixel);\n }\n else {\n column.computedWidth = new shared_1.SizeAndUnit(100 / totalWeights * column.width.physicalSize, enums_1.SizeUnit.Weight);\n }\n }\n var tableElement = document.createElement(\"div\");\n tableElement.setAttribute(\"role\", \"table\");\n tableElement.style.display = \"flex\";\n tableElement.style.flexDirection = \"column\";\n if (this.showGridLines) {\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.gridStyle);\n if (styleDefinition.borderColor) {\n var borderColor = utils_1.stringToCssColor(styleDefinition.borderColor);\n if (borderColor) {\n tableElement.style.borderTop = \"1px solid \" + borderColor;\n tableElement.style.borderLeft = \"1px solid \" + borderColor;\n }\n }\n }\n var cellSpacing = this.hostConfig.table.cellSpacing;\n for (var i = 0; i < this.getItemCount(); i++) {\n var renderedRow = this.getItemAt(i).render();\n if (renderedRow) {\n if (i > 0 && !this.showGridLines && cellSpacing > 0) {\n var separatorRow = document.createElement(\"div\");\n separatorRow.setAttribute(\"aria-hidden\", \"true\");\n separatorRow.style.height = cellSpacing + \"px\";\n tableElement.appendChild(separatorRow);\n }\n tableElement.appendChild(renderedRow);\n }\n }\n return tableElement;\n }\n return undefined;\n };\n Table.prototype.addColumn = function (column) {\n this._columns.push(column);\n this.ensureRowsHaveEnoughCells();\n };\n Table.prototype.removeColumn = function (column) {\n var index = this._columns.indexOf(column);\n if (index >= 0) {\n this.removeCellsFromColumn(index);\n this._columns.splice(index, 1);\n }\n };\n Table.prototype.getColumnCount = function () {\n return this._columns.length;\n };\n Table.prototype.getColumnAt = function (index) {\n return this._columns[index];\n };\n Table.prototype.addRow = function (row) {\n this.internalAddItem(row);\n row.ensureHasEnoughCells(this.getColumnCount());\n };\n Table.prototype.getJsonTypeName = function () {\n return \"Table\";\n };\n Table.columnsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_5, \"columns\", TableColumnDefinition);\n Table.firstRowAsHeadersProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, \"firstRowAsHeaders\", true);\n Table.showGridLinesProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, \"showGridLines\", true);\n Table.gridStyleProperty = new card_elements_1.ContainerStyleProperty(serialization_1.Versions.v1_5, \"gridStyle\");\n Table.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"horizontalCellContentAlignment\", enums_1.HorizontalAlignment);\n Table.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"verticalCellContentAlignment\", enums_1.VerticalAlignment);\n __decorate([\n serialization_1.property(Table.columnsProperty)\n ], Table.prototype, \"_columns\", void 0);\n __decorate([\n serialization_1.property(Table.firstRowAsHeadersProperty)\n ], Table.prototype, \"firstRowAsHeaders\", void 0);\n __decorate([\n serialization_1.property(Table.showGridLinesProperty)\n ], Table.prototype, \"showGridLines\", void 0);\n __decorate([\n serialization_1.property(Table.gridStyleProperty)\n ], Table.prototype, \"gridStyle\", null);\n __decorate([\n serialization_1.property(Table.horizontalCellContentAlignmentProperty)\n ], Table.prototype, \"horizontalCellContentAlignment\", void 0);\n __decorate([\n serialization_1.property(Table.verticalCellContentAlignmentProperty)\n ], Table.prototype, \"verticalCellContentAlignment\", void 0);\n return Table;\n}(StylableContainer));\nexports.Table = Table;\nregistry_1.GlobalRegistry.defaultElements.register(\"Table\", Table, serialization_1.Versions.v1_5);\n//# sourceMappingURL=table.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatText = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar AbstractTextFormatter = /** @class */ (function () {\n function AbstractTextFormatter(regularExpression) {\n this._regularExpression = regularExpression;\n }\n AbstractTextFormatter.prototype.format = function (lang, input) {\n var matches;\n if (input) {\n var result = input;\n while ((matches = this._regularExpression.exec(input)) != null) {\n result = result.replace(matches[0], this.internalFormat(lang, matches));\n }\n ;\n return result;\n }\n else {\n return input;\n }\n };\n return AbstractTextFormatter;\n}());\nvar DateFormatter = /** @class */ (function (_super) {\n __extends(DateFormatter, _super);\n function DateFormatter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DateFormatter.prototype.internalFormat = function (lang, matches) {\n var date = new Date(Date.parse(matches[1]));\n var format = matches[2] != undefined ? matches[2].toLowerCase() : \"compact\";\n if (format != \"compact\") {\n return date.toLocaleDateString(lang, { day: \"numeric\", weekday: format, month: format, year: \"numeric\" });\n }\n else {\n return date.toLocaleDateString();\n }\n };\n return DateFormatter;\n}(AbstractTextFormatter));\nvar TimeFormatter = /** @class */ (function (_super) {\n __extends(TimeFormatter, _super);\n function TimeFormatter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TimeFormatter.prototype.internalFormat = function (lang, matches) {\n var date = new Date(Date.parse(matches[1]));\n return date.toLocaleTimeString(lang, { hour: 'numeric', minute: '2-digit' });\n };\n return TimeFormatter;\n}(AbstractTextFormatter));\nfunction formatText(lang, text) {\n var formatters = [\n new DateFormatter(/\\{{2}DATE\\((\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|(?:(?:-|\\+)\\d{2}:\\d{2})))(?:, ?(COMPACT|LONG|SHORT))?\\)\\}{2}/g),\n new TimeFormatter(/\\{{2}TIME\\((\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|(?:(?:-|\\+)\\d{2}:\\d{2})))\\)\\}{2}/g)\n ];\n var result = text;\n for (var _i = 0, formatters_1 = formatters; _i < formatters_1.length; _i++) {\n var formatter = formatters_1[_i];\n result = formatter.format(lang, result);\n }\n return result;\n}\nexports.formatText = formatText;\n//# sourceMappingURL=text-formatters.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearElementChildren = exports.getScrollY = exports.getScrollX = exports.getFitStatus = exports.truncate = exports.stringToCssColor = exports.parseEnum = exports.getEnumValueByName = exports.parseBool = exports.parseNumber = exports.parseString = exports.appendChild = exports.generateUniqueId = exports.isMobileOS = exports.isInternetExplorer = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Enums = require(\"./enums\");\nvar Shared = require(\"./shared\");\nfunction isInternetExplorer() {\n // The documentMode property only exists in IE\n return window.document.documentMode !== undefined;\n}\nexports.isInternetExplorer = isInternetExplorer;\nfunction isMobileOS() {\n var userAgent = window.navigator.userAgent;\n return !!userAgent.match(/Android/i) || !!userAgent.match(/iPad/i) || !!userAgent.match(/iPhone/i);\n}\nexports.isMobileOS = isMobileOS;\n/**\n * Generate a UUID prepended with \"__ac-\"\n */\nfunction generateUniqueId() {\n return \"__ac-\" + Shared.UUID.generate();\n}\nexports.generateUniqueId = generateUniqueId;\nfunction appendChild(node, child) {\n if (child) {\n node.appendChild(child);\n }\n}\nexports.appendChild = appendChild;\nfunction parseString(obj, defaultValue) {\n return typeof obj === \"string\" ? obj : defaultValue;\n}\nexports.parseString = parseString;\nfunction parseNumber(obj, defaultValue) {\n return typeof obj === \"number\" ? obj : defaultValue;\n}\nexports.parseNumber = parseNumber;\nfunction parseBool(value, defaultValue) {\n if (typeof value === \"boolean\") {\n return value;\n }\n else if (typeof value === \"string\") {\n switch (value.toLowerCase()) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n return defaultValue;\n }\n }\n return defaultValue;\n}\nexports.parseBool = parseBool;\nfunction getEnumValueByName(enumType, name) {\n for (var key in enumType) {\n var keyAsNumber = parseInt(key, 10);\n if (keyAsNumber >= 0) {\n var value = enumType[key];\n if (value && typeof value === \"string\" && value.toLowerCase() === name.toLowerCase()) {\n return keyAsNumber;\n }\n }\n }\n return undefined;\n}\nexports.getEnumValueByName = getEnumValueByName;\nfunction parseEnum(enumType, name, defaultValue) {\n if (!name) {\n return defaultValue;\n }\n var enumValue = getEnumValueByName(enumType, name);\n return enumValue !== undefined ? enumValue : defaultValue;\n}\nexports.parseEnum = parseEnum;\nfunction stringToCssColor(color) {\n if (color) {\n var regEx = /#([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?/gi;\n var matches = regEx.exec(color);\n if (matches && matches[4]) {\n var a = parseInt(matches[1], 16) / 255;\n var r = parseInt(matches[2], 16);\n var g = parseInt(matches[3], 16);\n var b = parseInt(matches[4], 16);\n return \"rgba(\" + r + \",\" + g + \",\" + b + \",\" + a + \")\";\n }\n }\n return color;\n}\nexports.stringToCssColor = stringToCssColor;\nfunction truncate(element, maxHeight, lineHeight) {\n var fits = function () {\n // Allow a one pixel overflow to account for rounding differences\n // between browsers\n return maxHeight - element.scrollHeight >= -1.0;\n };\n if (fits())\n return;\n var fullText = element.innerHTML;\n var truncateAt = function (idx) {\n element.innerHTML = fullText.substring(0, idx) + '...';\n };\n var breakableIndices = findBreakableIndices(fullText);\n var lo = 0;\n var hi = breakableIndices.length;\n var bestBreakIdx = 0;\n // Do a binary search for the longest string that fits\n while (lo < hi) {\n var mid = Math.floor((lo + hi) / 2);\n truncateAt(breakableIndices[mid]);\n if (fits()) {\n bestBreakIdx = breakableIndices[mid];\n lo = mid + 1;\n }\n else {\n hi = mid;\n }\n }\n truncateAt(bestBreakIdx);\n // If we have extra room, try to expand the string letter by letter\n // (covers the case where we have to break in the middle of a long word)\n if (lineHeight && maxHeight - element.scrollHeight >= lineHeight - 1.0) {\n var idx = findNextCharacter(fullText, bestBreakIdx);\n while (idx < fullText.length) {\n truncateAt(idx);\n if (fits()) {\n bestBreakIdx = idx;\n idx = findNextCharacter(fullText, idx);\n }\n else {\n break;\n }\n }\n truncateAt(bestBreakIdx);\n }\n}\nexports.truncate = truncate;\nfunction findBreakableIndices(html) {\n var results = [];\n var idx = findNextCharacter(html, -1);\n while (idx < html.length) {\n if (html[idx] == ' ') {\n results.push(idx);\n }\n idx = findNextCharacter(html, idx);\n }\n return results;\n}\nfunction findNextCharacter(html, currIdx) {\n currIdx += 1;\n // If we found the start of an HTML tag, keep advancing until we get\n // past it, so we don't end up truncating in the middle of the tag\n while (currIdx < html.length && html[currIdx] == '<') {\n while (currIdx < html.length && html[currIdx++] != '>')\n ;\n }\n return currIdx;\n}\nfunction getFitStatus(element, containerEnd) {\n var start = element.offsetTop;\n var end = start + element.clientHeight;\n if (end <= containerEnd) {\n return Enums.ContainerFitStatus.FullyInContainer;\n }\n else if (start < containerEnd) {\n return Enums.ContainerFitStatus.Overflowing;\n }\n else {\n return Enums.ContainerFitStatus.FullyOutOfContainer;\n }\n}\nexports.getFitStatus = getFitStatus;\nfunction getScrollX() {\n return window.pageXOffset;\n}\nexports.getScrollX = getScrollX;\nfunction getScrollY() {\n return window.pageYOffset;\n}\nexports.getScrollY = getScrollY;\nfunction clearElementChildren(element) {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n}\nexports.clearElementChildren = clearElementChildren;\n//# sourceMappingURL=utils.js.map","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildFullPath = require('../core/buildFullPath');\nvar buildURL = require('./../helpers/buildURL');\nvar http = require('http');\nvar https = require('https');\nvar httpFollow = require('follow-redirects').http;\nvar httpsFollow = require('follow-redirects').https;\nvar url = require('url');\nvar zlib = require('zlib');\nvar pkg = require('./../../package.json');\nvar createError = require('../core/createError');\nvar enhanceError = require('../core/enhanceError');\n\nvar isHttps = /https:?/;\n\n/**\n *\n * @param {http.ClientRequestArgs} options\n * @param {AxiosProxyConfig} proxy\n * @param {string} location\n */\nfunction setProxy(options, proxy, location) {\n options.hostname = proxy.host;\n options.host = proxy.host;\n options.port = proxy.port;\n options.path = location;\n\n // Basic proxy authorization\n if (proxy.auth) {\n var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');\n options.headers['Proxy-Authorization'] = 'Basic ' + base64;\n }\n\n // If a proxy is used, any redirects must also pass through the proxy\n options.beforeRedirect = function beforeRedirect(redirection) {\n redirection.headers.host = redirection.host;\n setProxy(redirection, proxy, redirection.href);\n };\n}\n\n/*eslint consistent-return:0*/\nmodule.exports = function httpAdapter(config) {\n return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {\n var resolve = function resolve(value) {\n resolvePromise(value);\n };\n var reject = function reject(value) {\n rejectPromise(value);\n };\n var data = config.data;\n var headers = config.headers;\n\n // Set User-Agent (required by some servers)\n // See https://github.com/axios/axios/issues/69\n if ('User-Agent' in headers || 'user-agent' in headers) {\n // User-Agent is specified; handle case where no UA header is desired\n if (!headers['User-Agent'] && !headers['user-agent']) {\n delete headers['User-Agent'];\n delete headers['user-agent'];\n }\n // Otherwise, use specified value\n } else {\n // Only set header if it hasn't been set in config\n headers['User-Agent'] = 'axios/' + pkg.version;\n }\n\n if (data && !utils.isStream(data)) {\n if (Buffer.isBuffer(data)) {\n // Nothing to do...\n } else if (utils.isArrayBuffer(data)) {\n data = Buffer.from(new Uint8Array(data));\n } else if (utils.isString(data)) {\n data = Buffer.from(data, 'utf-8');\n } else {\n return reject(createError(\n 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',\n config\n ));\n }\n\n // Add Content-Length header if data exists\n headers['Content-Length'] = data.length;\n }\n\n // HTTP basic authentication\n var auth = undefined;\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n auth = username + ':' + password;\n }\n\n // Parse url\n var fullPath = buildFullPath(config.baseURL, config.url);\n var parsed = url.parse(fullPath);\n var protocol = parsed.protocol || 'http:';\n\n if (!auth && parsed.auth) {\n var urlAuth = parsed.auth.split(':');\n var urlUsername = urlAuth[0] || '';\n var urlPassword = urlAuth[1] || '';\n auth = urlUsername + ':' + urlPassword;\n }\n\n if (auth) {\n delete headers.Authorization;\n }\n\n var isHttpsRequest = isHttps.test(protocol);\n var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;\n\n var options = {\n path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\\?/, ''),\n method: config.method.toUpperCase(),\n headers: headers,\n agent: agent,\n agents: { http: config.httpAgent, https: config.httpsAgent },\n auth: auth\n };\n\n if (config.socketPath) {\n options.socketPath = config.socketPath;\n } else {\n options.hostname = parsed.hostname;\n options.port = parsed.port;\n }\n\n var proxy = config.proxy;\n if (!proxy && proxy !== false) {\n var proxyEnv = protocol.slice(0, -1) + '_proxy';\n var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];\n if (proxyUrl) {\n var parsedProxyUrl = url.parse(proxyUrl);\n var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;\n var shouldProxy = true;\n\n if (noProxyEnv) {\n var noProxy = noProxyEnv.split(',').map(function trim(s) {\n return s.trim();\n });\n\n shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {\n if (!proxyElement) {\n return false;\n }\n if (proxyElement === '*') {\n return true;\n }\n if (proxyElement[0] === '.' &&\n parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {\n return true;\n }\n\n return parsed.hostname === proxyElement;\n });\n }\n\n if (shouldProxy) {\n proxy = {\n host: parsedProxyUrl.hostname,\n port: parsedProxyUrl.port,\n protocol: parsedProxyUrl.protocol\n };\n\n if (parsedProxyUrl.auth) {\n var proxyUrlAuth = parsedProxyUrl.auth.split(':');\n proxy.auth = {\n username: proxyUrlAuth[0],\n password: proxyUrlAuth[1]\n };\n }\n }\n }\n }\n\n if (proxy) {\n options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');\n setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);\n }\n\n var transport;\n var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);\n if (config.transport) {\n transport = config.transport;\n } else if (config.maxRedirects === 0) {\n transport = isHttpsProxy ? https : http;\n } else {\n if (config.maxRedirects) {\n options.maxRedirects = config.maxRedirects;\n }\n transport = isHttpsProxy ? httpsFollow : httpFollow;\n }\n\n if (config.maxBodyLength > -1) {\n options.maxBodyLength = config.maxBodyLength;\n }\n\n // Create the request\n var req = transport.request(options, function handleResponse(res) {\n if (req.aborted) return;\n\n // uncompress the response body transparently if required\n var stream = res;\n\n // return the last request in case of redirects\n var lastRequest = res.req || req;\n\n\n // if no content, is HEAD request or decompress disabled we should not decompress\n if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) {\n switch (res.headers['content-encoding']) {\n /*eslint default-case:0*/\n case 'gzip':\n case 'compress':\n case 'deflate':\n // add the unzipper to the body stream processing pipeline\n stream = stream.pipe(zlib.createUnzip());\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n }\n }\n\n var response = {\n status: res.statusCode,\n statusText: res.statusMessage,\n headers: res.headers,\n config: config,\n request: lastRequest\n };\n\n if (config.responseType === 'stream') {\n response.data = stream;\n settle(resolve, reject, response);\n } else {\n var responseBuffer = [];\n var totalResponseBytes = 0;\n stream.on('data', function handleStreamData(chunk) {\n responseBuffer.push(chunk);\n totalResponseBytes += chunk.length;\n\n // make sure the content length is not over the maxContentLength if specified\n if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {\n stream.destroy();\n reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',\n config, null, lastRequest));\n }\n });\n\n stream.on('error', function handleStreamError(err) {\n if (req.aborted) return;\n reject(enhanceError(err, config, null, lastRequest));\n });\n\n stream.on('end', function handleStreamEnd() {\n var responseData = Buffer.concat(responseBuffer);\n if (config.responseType !== 'arraybuffer') {\n responseData = responseData.toString(config.responseEncoding);\n if (!config.responseEncoding || config.responseEncoding === 'utf8') {\n responseData = utils.stripBOM(responseData);\n }\n }\n\n response.data = responseData;\n settle(resolve, reject, response);\n });\n }\n });\n\n // Handle errors\n req.on('error', function handleRequestError(err) {\n if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return;\n reject(enhanceError(err, config, null, req));\n });\n\n // Handle request timeout\n if (config.timeout) {\n // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.\n var timeout = parseInt(config.timeout, 10);\n\n if (isNaN(timeout)) {\n reject(createError(\n 'error trying to parse `config.timeout` to int',\n config,\n 'ERR_PARSE_TIMEOUT',\n req\n ));\n\n return;\n }\n\n // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.\n // And timer callback will be fired, and abort() will be invoked before connection, then get \"socket hang up\" and code ECONNRESET.\n // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.\n // And then these socket which be hang up will devoring CPU little by little.\n // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.\n req.setTimeout(timeout, function handleRequestTimeout() {\n req.abort();\n reject(createError(\n 'timeout of ' + timeout + 'ms exceeded',\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n req\n ));\n });\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (req.aborted) return;\n\n req.abort();\n reject(cancel);\n });\n }\n\n // Send the request\n if (utils.isStream(data)) {\n data.on('error', function handleStreamError(err) {\n reject(enhanceError(err, config, null, req));\n }).pipe(req);\n } else {\n req.end(data);\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('./../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar enhanceError = require('./core/enhanceError');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar pkg = require('./../../package.json');\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\nvar currentVerArr = pkg.version.split('.');\n\n/**\n * Compare package versions\n * @param {string} version\n * @param {string?} thanVersion\n * @returns {boolean}\n */\nfunction isOlderVersion(version, thanVersion) {\n var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;\n var destVer = version.split('.');\n for (var i = 0; i < 3; i++) {\n if (pkgVersionArr[i] > destVer[i]) {\n return true;\n } else if (pkgVersionArr[i] < destVer[i]) {\n return false;\n }\n }\n return false;\n}\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator\n * @param {string?} version\n * @param {string} message\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n var isDeprecated = version && isOlderVersion(version);\n\n function formatMessage(opt, desc) {\n return '[Axios v' + pkg.version + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed in ' + version));\n }\n\n if (isDeprecated && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n isOlderVersion: isOlderVersion,\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","var register = require('./lib/register')\nvar addHook = require('./lib/add')\nvar removeHook = require('./lib/remove')\n\n// bind with array of arguments: https://stackoverflow.com/a/21792913\nvar bind = Function.bind\nvar bindable = bind.bind(bind)\n\nfunction bindApi (hook, state, name) {\n var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state])\n hook.api = { remove: removeHookRef }\n hook.remove = removeHookRef\n\n ;['before', 'error', 'after', 'wrap'].forEach(function (kind) {\n var args = name ? [state, kind, name] : [state, kind]\n hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args)\n })\n}\n\nfunction HookSingular () {\n var singularHookName = 'h'\n var singularHookState = {\n registry: {}\n }\n var singularHook = register.bind(null, singularHookState, singularHookName)\n bindApi(singularHook, singularHookState, singularHookName)\n return singularHook\n}\n\nfunction HookCollection () {\n var state = {\n registry: {}\n }\n\n var hook = register.bind(null, state)\n bindApi(hook, state)\n\n return hook\n}\n\nvar collectionHookDeprecationMessageDisplayed = false\nfunction Hook () {\n if (!collectionHookDeprecationMessageDisplayed) {\n console.warn('[before-after-hook]: \"Hook()\" repurposing warning, use \"Hook.Collection()\". Read more: https://git.io/upgrade-before-after-hook-to-1.4')\n collectionHookDeprecationMessageDisplayed = true\n }\n return HookCollection()\n}\n\nHook.Singular = HookSingular.bind()\nHook.Collection = HookCollection.bind()\n\nmodule.exports = Hook\n// expose constructors as a named property for TypeScript\nmodule.exports.Hook = Hook\nmodule.exports.Singular = Hook.Singular\nmodule.exports.Collection = Hook.Collection\n","module.exports = addHook;\n\nfunction addHook(state, kind, name, hook) {\n var orig = hook;\n if (!state.registry[name]) {\n state.registry[name] = [];\n }\n\n if (kind === \"before\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(orig.bind(null, options))\n .then(method.bind(null, options));\n };\n }\n\n if (kind === \"after\") {\n hook = function (method, options) {\n var result;\n return Promise.resolve()\n .then(method.bind(null, options))\n .then(function (result_) {\n result = result_;\n return orig(result, options);\n })\n .then(function () {\n return result;\n });\n };\n }\n\n if (kind === \"error\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(method.bind(null, options))\n .catch(function (error) {\n return orig(error, options);\n });\n };\n }\n\n state.registry[name].push({\n hook: hook,\n orig: orig,\n });\n}\n","module.exports = register;\n\nfunction register(state, name, method, options) {\n if (typeof method !== \"function\") {\n throw new Error(\"method for before hook must be a function\");\n }\n\n if (!options) {\n options = {};\n }\n\n if (Array.isArray(name)) {\n return name.reverse().reduce(function (callback, name) {\n return register.bind(null, state, name, callback, options);\n }, method)();\n }\n\n return Promise.resolve().then(function () {\n if (!state.registry[name]) {\n return method(options);\n }\n\n return state.registry[name].reduce(function (method, registered) {\n return registered.hook.bind(null, method, options);\n }, method)();\n });\n}\n","module.exports = removeHook;\n\nfunction removeHook(state, name, method) {\n if (!state.registry[name]) {\n return;\n }\n\n var index = state.registry[name]\n .map(function (registered) {\n return registered.orig;\n })\n .indexOf(method);\n\n if (index === -1) {\n return;\n }\n\n state.registry[name].splice(index, 1);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n\nvar isNode = typeof process !== \"undefined\" && process.versions != null && process.versions.node != null;\n\nvar isWebWorker = (typeof self === \"undefined\" ? \"undefined\" : _typeof(self)) === \"object\" && self.constructor && self.constructor.name === \"DedicatedWorkerGlobalScope\";\n\n/**\n * @see https://github.com/jsdom/jsdom/releases/tag/12.0.0\n * @see https://github.com/jsdom/jsdom/issues/1537\n */\nvar isJsDom = typeof window !== \"undefined\" && window.name === \"nodejs\" || typeof navigator !== \"undefined\" && (navigator.userAgent.includes(\"Node.js\") || navigator.userAgent.includes(\"jsdom\"));\n\nvar isDeno = typeof Deno !== \"undefined\" && typeof Deno.core !== \"undefined\";\n\nexports.isBrowser = isBrowser;\nexports.isWebWorker = isWebWorker;\nexports.isNode = isNode;\nexports.isJsDom = isJsDom;\nexports.isDeno = isDeno;","const nodeFetch = require('node-fetch')\nconst realFetch = nodeFetch.default || nodeFetch\n\nconst fetch = function (url, options) {\n // Support schemaless URIs on the server for parity with the browser.\n // Ex: //github.com/ -> https://github.com/\n if (/^\\/\\//.test(url)) {\n url = 'https:' + url\n }\n return realFetch.call(this, url, options)\n}\n\nfetch.ponyfill = true\n\nmodule.exports = exports = fetch\nexports.fetch = fetch\nexports.Headers = nodeFetch.Headers\nexports.Request = nodeFetch.Request\nexports.Response = nodeFetch.Response\n\n// Needed for TypeScript consumers without esModuleInterop.\nexports.default = fetch\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar Stream = _interopDefault(require('stream'));\nvar http = _interopDefault(require('http'));\nvar Url = _interopDefault(require('url'));\nvar https = _interopDefault(require('https'));\nvar zlib = _interopDefault(require('zlib'));\n\n// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js\n\n// fix for \"Readable\" isn't a named export issue\nconst Readable = Stream.Readable;\n\nconst BUFFER = Symbol('buffer');\nconst TYPE = Symbol('type');\n\nclass Blob {\n\tconstructor() {\n\t\tthis[TYPE] = '';\n\n\t\tconst blobParts = arguments[0];\n\t\tconst options = arguments[1];\n\n\t\tconst buffers = [];\n\t\tlet size = 0;\n\n\t\tif (blobParts) {\n\t\t\tconst a = blobParts;\n\t\t\tconst length = Number(a.length);\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tconst element = a[i];\n\t\t\t\tlet buffer;\n\t\t\t\tif (element instanceof Buffer) {\n\t\t\t\t\tbuffer = element;\n\t\t\t\t} else if (ArrayBuffer.isView(element)) {\n\t\t\t\t\tbuffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);\n\t\t\t\t} else if (element instanceof ArrayBuffer) {\n\t\t\t\t\tbuffer = Buffer.from(element);\n\t\t\t\t} else if (element instanceof Blob) {\n\t\t\t\t\tbuffer = element[BUFFER];\n\t\t\t\t} else {\n\t\t\t\t\tbuffer = Buffer.from(typeof element === 'string' ? element : String(element));\n\t\t\t\t}\n\t\t\t\tsize += buffer.length;\n\t\t\t\tbuffers.push(buffer);\n\t\t\t}\n\t\t}\n\n\t\tthis[BUFFER] = Buffer.concat(buffers);\n\n\t\tlet type = options && options.type !== undefined && String(options.type).toLowerCase();\n\t\tif (type && !/[^\\u0020-\\u007E]/.test(type)) {\n\t\t\tthis[TYPE] = type;\n\t\t}\n\t}\n\tget size() {\n\t\treturn this[BUFFER].length;\n\t}\n\tget type() {\n\t\treturn this[TYPE];\n\t}\n\ttext() {\n\t\treturn Promise.resolve(this[BUFFER].toString());\n\t}\n\tarrayBuffer() {\n\t\tconst buf = this[BUFFER];\n\t\tconst ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\treturn Promise.resolve(ab);\n\t}\n\tstream() {\n\t\tconst readable = new Readable();\n\t\treadable._read = function () {};\n\t\treadable.push(this[BUFFER]);\n\t\treadable.push(null);\n\t\treturn readable;\n\t}\n\ttoString() {\n\t\treturn '[object Blob]';\n\t}\n\tslice() {\n\t\tconst size = this.size;\n\n\t\tconst start = arguments[0];\n\t\tconst end = arguments[1];\n\t\tlet relativeStart, relativeEnd;\n\t\tif (start === undefined) {\n\t\t\trelativeStart = 0;\n\t\t} else if (start < 0) {\n\t\t\trelativeStart = Math.max(size + start, 0);\n\t\t} else {\n\t\t\trelativeStart = Math.min(start, size);\n\t\t}\n\t\tif (end === undefined) {\n\t\t\trelativeEnd = size;\n\t\t} else if (end < 0) {\n\t\t\trelativeEnd = Math.max(size + end, 0);\n\t\t} else {\n\t\t\trelativeEnd = Math.min(end, size);\n\t\t}\n\t\tconst span = Math.max(relativeEnd - relativeStart, 0);\n\n\t\tconst buffer = this[BUFFER];\n\t\tconst slicedBuffer = buffer.slice(relativeStart, relativeStart + span);\n\t\tconst blob = new Blob([], { type: arguments[2] });\n\t\tblob[BUFFER] = slicedBuffer;\n\t\treturn blob;\n\t}\n}\n\nObject.defineProperties(Blob.prototype, {\n\tsize: { enumerable: true },\n\ttype: { enumerable: true },\n\tslice: { enumerable: true }\n});\n\nObject.defineProperty(Blob.prototype, Symbol.toStringTag, {\n\tvalue: 'Blob',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error message for human\n * @param String type Error type for machine\n * @param String systemError For Node.js system error\n * @return FetchError\n */\nfunction FetchError(message, type, systemError) {\n Error.call(this, message);\n\n this.message = message;\n this.type = type;\n\n // when err.type is `system`, err.code contains system error code\n if (systemError) {\n this.code = this.errno = systemError.code;\n }\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nFetchError.prototype = Object.create(Error.prototype);\nFetchError.prototype.constructor = FetchError;\nFetchError.prototype.name = 'FetchError';\n\nlet convert;\ntry {\n\tconvert = require('encoding').convert;\n} catch (e) {}\n\nconst INTERNALS = Symbol('Body internals');\n\n// fix an issue where \"PassThrough\" isn't a named export for node <10\nconst PassThrough = Stream.PassThrough;\n\n/**\n * Body mixin\n *\n * Ref: https://fetch.spec.whatwg.org/#body\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nfunction Body(body) {\n\tvar _this = this;\n\n\tvar _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n\t _ref$size = _ref.size;\n\n\tlet size = _ref$size === undefined ? 0 : _ref$size;\n\tvar _ref$timeout = _ref.timeout;\n\tlet timeout = _ref$timeout === undefined ? 0 : _ref$timeout;\n\n\tif (body == null) {\n\t\t// body is undefined or null\n\t\tbody = null;\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\tbody = Buffer.from(body.toString());\n\t} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\tbody = Buffer.from(body);\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\tbody = Buffer.from(body.buffer, body.byteOffset, body.byteLength);\n\t} else if (body instanceof Stream) ; else {\n\t\t// none of the above\n\t\t// coerce to string then buffer\n\t\tbody = Buffer.from(String(body));\n\t}\n\tthis[INTERNALS] = {\n\t\tbody,\n\t\tdisturbed: false,\n\t\terror: null\n\t};\n\tthis.size = size;\n\tthis.timeout = timeout;\n\n\tif (body instanceof Stream) {\n\t\tbody.on('error', function (err) {\n\t\t\tconst error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);\n\t\t\t_this[INTERNALS].error = error;\n\t\t});\n\t}\n}\n\nBody.prototype = {\n\tget body() {\n\t\treturn this[INTERNALS].body;\n\t},\n\n\tget bodyUsed() {\n\t\treturn this[INTERNALS].disturbed;\n\t},\n\n\t/**\n * Decode response as ArrayBuffer\n *\n * @return Promise\n */\n\tarrayBuffer() {\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\t});\n\t},\n\n\t/**\n * Return raw response as Blob\n *\n * @return Promise\n */\n\tblob() {\n\t\tlet ct = this.headers && this.headers.get('content-type') || '';\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn Object.assign(\n\t\t\t// Prevent copying\n\t\t\tnew Blob([], {\n\t\t\t\ttype: ct.toLowerCase()\n\t\t\t}), {\n\t\t\t\t[BUFFER]: buf\n\t\t\t});\n\t\t});\n\t},\n\n\t/**\n * Decode response as json\n *\n * @return Promise\n */\n\tjson() {\n\t\tvar _this2 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(buffer.toString());\n\t\t\t} catch (err) {\n\t\t\t\treturn Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n * Decode response as text\n *\n * @return Promise\n */\n\ttext() {\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn buffer.toString();\n\t\t});\n\t},\n\n\t/**\n * Decode response as buffer (non-spec api)\n *\n * @return Promise\n */\n\tbuffer() {\n\t\treturn consumeBody.call(this);\n\t},\n\n\t/**\n * Decode response as text, while automatically detecting the encoding and\n * trying to decode to UTF-8 (non-spec api)\n *\n * @return Promise\n */\n\ttextConverted() {\n\t\tvar _this3 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn convertBody(buffer, _this3.headers);\n\t\t});\n\t}\n};\n\n// In browsers, all properties are enumerable.\nObject.defineProperties(Body.prototype, {\n\tbody: { enumerable: true },\n\tbodyUsed: { enumerable: true },\n\tarrayBuffer: { enumerable: true },\n\tblob: { enumerable: true },\n\tjson: { enumerable: true },\n\ttext: { enumerable: true }\n});\n\nBody.mixIn = function (proto) {\n\tfor (const name of Object.getOwnPropertyNames(Body.prototype)) {\n\t\t// istanbul ignore else: future proof\n\t\tif (!(name in proto)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(Body.prototype, name);\n\t\t\tObject.defineProperty(proto, name, desc);\n\t\t}\n\t}\n};\n\n/**\n * Consume and convert an entire Body to a Buffer.\n *\n * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body\n *\n * @return Promise\n */\nfunction consumeBody() {\n\tvar _this4 = this;\n\n\tif (this[INTERNALS].disturbed) {\n\t\treturn Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));\n\t}\n\n\tthis[INTERNALS].disturbed = true;\n\n\tif (this[INTERNALS].error) {\n\t\treturn Body.Promise.reject(this[INTERNALS].error);\n\t}\n\n\tlet body = this.body;\n\n\t// body is null\n\tif (body === null) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is blob\n\tif (isBlob(body)) {\n\t\tbody = body.stream();\n\t}\n\n\t// body is buffer\n\tif (Buffer.isBuffer(body)) {\n\t\treturn Body.Promise.resolve(body);\n\t}\n\n\t// istanbul ignore if: should never happen\n\tif (!(body instanceof Stream)) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is stream\n\t// get ready to actually consume the body\n\tlet accum = [];\n\tlet accumBytes = 0;\n\tlet abort = false;\n\n\treturn new Body.Promise(function (resolve, reject) {\n\t\tlet resTimeout;\n\n\t\t// allow timeout on slow response body\n\t\tif (_this4.timeout) {\n\t\t\tresTimeout = setTimeout(function () {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));\n\t\t\t}, _this4.timeout);\n\t\t}\n\n\t\t// handle stream errors\n\t\tbody.on('error', function (err) {\n\t\t\tif (err.name === 'AbortError') {\n\t\t\t\t// if the request was aborted, reject with this Error\n\t\t\t\tabort = true;\n\t\t\t\treject(err);\n\t\t\t} else {\n\t\t\t\t// other errors, such as incorrect content-encoding\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\n\t\tbody.on('data', function (chunk) {\n\t\t\tif (abort || chunk === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_this4.size && accumBytes + chunk.length > _this4.size) {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taccumBytes += chunk.length;\n\t\t\taccum.push(chunk);\n\t\t});\n\n\t\tbody.on('end', function () {\n\t\t\tif (abort) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(resTimeout);\n\n\t\t\ttry {\n\t\t\t\tresolve(Buffer.concat(accum, accumBytes));\n\t\t\t} catch (err) {\n\t\t\t\t// handle streams that have accumulated too much data (issue #414)\n\t\t\t\treject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect buffer encoding and convert to target encoding\n * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding\n *\n * @param Buffer buffer Incoming buffer\n * @param String encoding Target encoding\n * @return String\n */\nfunction convertBody(buffer, headers) {\n\tif (typeof convert !== 'function') {\n\t\tthrow new Error('The package `encoding` must be installed to use the textConverted() function');\n\t}\n\n\tconst ct = headers.get('content-type');\n\tlet charset = 'utf-8';\n\tlet res, str;\n\n\t// header\n\tif (ct) {\n\t\tres = /charset=([^;]*)/i.exec(ct);\n\t}\n\n\t// no charset in content type, peek at response body for at most 1024 bytes\n\tstr = buffer.slice(0, 1024).toString();\n\n\t// html5\n\tif (!res && str) {\n\t\tres = / 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n\t\tthis[MAP] = Object.create(null);\n\n\t\tif (init instanceof Headers) {\n\t\t\tconst rawHeaders = init.raw();\n\t\t\tconst headerNames = Object.keys(rawHeaders);\n\n\t\t\tfor (const headerName of headerNames) {\n\t\t\t\tfor (const value of rawHeaders[headerName]) {\n\t\t\t\t\tthis.append(headerName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't worry about converting prop to ByteString here as append()\n\t\t// will handle it.\n\t\tif (init == null) ; else if (typeof init === 'object') {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\tif (method != null) {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// sequence>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tconst pairs = [];\n\t\t\t\tfor (const pair of init) {\n\t\t\t\t\tif (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be iterable');\n\t\t\t\t\t}\n\t\t\t\t\tpairs.push(Array.from(pair));\n\t\t\t\t}\n\n\t\t\t\tfor (const pair of pairs) {\n\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t}\n\t\t\t\t\tthis.append(pair[0], pair[1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// record\n\t\t\t\tfor (const key of Object.keys(init)) {\n\t\t\t\t\tconst value = init[key];\n\t\t\t\t\tthis.append(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Provided initializer must be an object');\n\t\t}\n\t}\n\n\t/**\n * Return combined header value given name\n *\n * @param String name Header name\n * @return Mixed\n */\n\tget(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this[MAP][key].join(', ');\n\t}\n\n\t/**\n * Iterate over all headers\n *\n * @param Function callback Executed for each item with parameters (value, name, thisArg)\n * @param Boolean thisArg `this` context for callback function\n * @return Void\n */\n\tforEach(callback) {\n\t\tlet thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\tlet pairs = getHeaders(this);\n\t\tlet i = 0;\n\t\twhile (i < pairs.length) {\n\t\t\tvar _pairs$i = pairs[i];\n\t\t\tconst name = _pairs$i[0],\n\t\t\t value = _pairs$i[1];\n\n\t\t\tcallback.call(thisArg, value, name, this);\n\t\t\tpairs = getHeaders(this);\n\t\t\ti++;\n\t\t}\n\t}\n\n\t/**\n * Overwrite header values given name\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tset(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}\n\n\t/**\n * Append a value onto existing header\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tappend(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP][name] = [value];\n\t\t}\n\t}\n\n\t/**\n * Check for header name existence\n *\n * @param String name Header name\n * @return Boolean\n */\n\thas(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\treturn find(this[MAP], name) !== undefined;\n\t}\n\n\t/**\n * Delete all header values given name\n *\n * @param String name Header name\n * @return Void\n */\n\tdelete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP][key];\n\t\t}\n\t}\n\n\t/**\n * Return raw headers (non-spec api)\n *\n * @return Object\n */\n\traw() {\n\t\treturn this[MAP];\n\t}\n\n\t/**\n * Get an iterator on keys.\n *\n * @return Iterator\n */\n\tkeys() {\n\t\treturn createHeadersIterator(this, 'key');\n\t}\n\n\t/**\n * Get an iterator on values.\n *\n * @return Iterator\n */\n\tvalues() {\n\t\treturn createHeadersIterator(this, 'value');\n\t}\n\n\t/**\n * Get an iterator on entries.\n *\n * This is the default iterator of the Headers object.\n *\n * @return Iterator\n */\n\t[Symbol.iterator]() {\n\t\treturn createHeadersIterator(this, 'key+value');\n\t}\n}\nHeaders.prototype.entries = Headers.prototype[Symbol.iterator];\n\nObject.defineProperty(Headers.prototype, Symbol.toStringTag, {\n\tvalue: 'Headers',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Headers.prototype, {\n\tget: { enumerable: true },\n\tforEach: { enumerable: true },\n\tset: { enumerable: true },\n\tappend: { enumerable: true },\n\thas: { enumerable: true },\n\tdelete: { enumerable: true },\n\tkeys: { enumerable: true },\n\tvalues: { enumerable: true },\n\tentries: { enumerable: true }\n});\n\nfunction getHeaders(headers) {\n\tlet kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';\n\n\tconst keys = Object.keys(headers[MAP]).sort();\n\treturn keys.map(kind === 'key' ? function (k) {\n\t\treturn k.toLowerCase();\n\t} : kind === 'value' ? function (k) {\n\t\treturn headers[MAP][k].join(', ');\n\t} : function (k) {\n\t\treturn [k.toLowerCase(), headers[MAP][k].join(', ')];\n\t});\n}\n\nconst INTERNAL = Symbol('internal');\n\nfunction createHeadersIterator(target, kind) {\n\tconst iterator = Object.create(HeadersIteratorPrototype);\n\titerator[INTERNAL] = {\n\t\ttarget,\n\t\tkind,\n\t\tindex: 0\n\t};\n\treturn iterator;\n}\n\nconst HeadersIteratorPrototype = Object.setPrototypeOf({\n\tnext() {\n\t\t// istanbul ignore if\n\t\tif (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {\n\t\t\tthrow new TypeError('Value of `this` is not a HeadersIterator');\n\t\t}\n\n\t\tvar _INTERNAL = this[INTERNAL];\n\t\tconst target = _INTERNAL.target,\n\t\t kind = _INTERNAL.kind,\n\t\t index = _INTERNAL.index;\n\n\t\tconst values = getHeaders(target, kind);\n\t\tconst len = values.length;\n\t\tif (index >= len) {\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tthis[INTERNAL].index = index + 1;\n\n\t\treturn {\n\t\t\tvalue: values[index],\n\t\t\tdone: false\n\t\t};\n\t}\n}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));\n\nObject.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {\n\tvalue: 'HeadersIterator',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * Export the Headers object in a form that Node.js can consume.\n *\n * @param Headers headers\n * @return Object\n */\nfunction exportNodeCompatibleHeaders(headers) {\n\tconst obj = Object.assign({ __proto__: null }, headers[MAP]);\n\n\t// http.request() only supports string as Host header. This hack makes\n\t// specifying custom Host header possible.\n\tconst hostHeaderKey = find(headers[MAP], 'Host');\n\tif (hostHeaderKey !== undefined) {\n\t\tobj[hostHeaderKey] = obj[hostHeaderKey][0];\n\t}\n\n\treturn obj;\n}\n\n/**\n * Create a Headers object from an object of headers, ignoring those that do\n * not conform to HTTP grammar productions.\n *\n * @param Object obj Object of headers\n * @return Headers\n */\nfunction createHeadersLenient(obj) {\n\tconst headers = new Headers();\n\tfor (const name of Object.keys(obj)) {\n\t\tif (invalidTokenRegex.test(name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(obj[name])) {\n\t\t\tfor (const val of obj[name]) {\n\t\t\t\tif (invalidHeaderCharRegex.test(val)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (headers[MAP][name] === undefined) {\n\t\t\t\t\theaders[MAP][name] = [val];\n\t\t\t\t} else {\n\t\t\t\t\theaders[MAP][name].push(val);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!invalidHeaderCharRegex.test(obj[name])) {\n\t\t\theaders[MAP][name] = [obj[name]];\n\t\t}\n\t}\n\treturn headers;\n}\n\nconst INTERNALS$1 = Symbol('Response internals');\n\n// fix an issue where \"STATUS_CODES\" aren't a named export for node <10\nconst STATUS_CODES = http.STATUS_CODES;\n\n/**\n * Response class\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nclass Response {\n\tconstructor() {\n\t\tlet body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\tlet opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tBody.call(this, body, opts);\n\n\t\tconst status = opts.status || 200;\n\t\tconst headers = new Headers(opts.headers);\n\n\t\tif (body != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(body);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tthis[INTERNALS$1] = {\n\t\t\turl: opts.url,\n\t\t\tstatus,\n\t\t\tstatusText: opts.statusText || STATUS_CODES[status],\n\t\t\theaders,\n\t\t\tcounter: opts.counter\n\t\t};\n\t}\n\n\tget url() {\n\t\treturn this[INTERNALS$1].url || '';\n\t}\n\n\tget status() {\n\t\treturn this[INTERNALS$1].status;\n\t}\n\n\t/**\n * Convenience property representing if the request ended normally\n */\n\tget ok() {\n\t\treturn this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;\n\t}\n\n\tget redirected() {\n\t\treturn this[INTERNALS$1].counter > 0;\n\t}\n\n\tget statusText() {\n\t\treturn this[INTERNALS$1].statusText;\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$1].headers;\n\t}\n\n\t/**\n * Clone this response\n *\n * @return Response\n */\n\tclone() {\n\t\treturn new Response(clone(this), {\n\t\t\turl: this.url,\n\t\t\tstatus: this.status,\n\t\t\tstatusText: this.statusText,\n\t\t\theaders: this.headers,\n\t\t\tok: this.ok,\n\t\t\tredirected: this.redirected\n\t\t});\n\t}\n}\n\nBody.mixIn(Response.prototype);\n\nObject.defineProperties(Response.prototype, {\n\turl: { enumerable: true },\n\tstatus: { enumerable: true },\n\tok: { enumerable: true },\n\tredirected: { enumerable: true },\n\tstatusText: { enumerable: true },\n\theaders: { enumerable: true },\n\tclone: { enumerable: true }\n});\n\nObject.defineProperty(Response.prototype, Symbol.toStringTag, {\n\tvalue: 'Response',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nconst INTERNALS$2 = Symbol('Request internals');\n\n// fix an issue where \"format\", \"parse\" aren't a named export for node <10\nconst parse_url = Url.parse;\nconst format_url = Url.format;\n\nconst streamDestructionSupported = 'destroy' in Stream.Readable.prototype;\n\n/**\n * Check if a value is an instance of Request.\n *\n * @param Mixed input\n * @return Boolean\n */\nfunction isRequest(input) {\n\treturn typeof input === 'object' && typeof input[INTERNALS$2] === 'object';\n}\n\nfunction isAbortSignal(signal) {\n\tconst proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);\n\treturn !!(proto && proto.constructor.name === 'AbortSignal');\n}\n\n/**\n * Request class\n *\n * @param Mixed input Url or Request instance\n * @param Object init Custom options\n * @return Void\n */\nclass Request {\n\tconstructor(input) {\n\t\tlet init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tlet parsedURL;\n\n\t\t// normalize input\n\t\tif (!isRequest(input)) {\n\t\t\tif (input && input.href) {\n\t\t\t\t// in order to support Node.js' Url objects; though WHATWG's URL objects\n\t\t\t\t// will fall into this branch also (since their `toString()` will return\n\t\t\t\t// `href` property anyway)\n\t\t\t\tparsedURL = parse_url(input.href);\n\t\t\t} else {\n\t\t\t\t// coerce input to a string before attempting to parse\n\t\t\t\tparsedURL = parse_url(`${input}`);\n\t\t\t}\n\t\t\tinput = {};\n\t\t} else {\n\t\t\tparsedURL = parse_url(input.url);\n\t\t}\n\n\t\tlet method = init.method || input.method || 'GET';\n\t\tmethod = method.toUpperCase();\n\n\t\tif ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {\n\t\t\tthrow new TypeError('Request with GET/HEAD method cannot have body');\n\t\t}\n\n\t\tlet inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n\n\t\tBody.call(this, inputBody, {\n\t\t\ttimeout: init.timeout || input.timeout || 0,\n\t\t\tsize: init.size || input.size || 0\n\t\t});\n\n\t\tconst headers = new Headers(init.headers || input.headers || {});\n\n\t\tif (inputBody != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(inputBody);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tlet signal = isRequest(input) ? input.signal : null;\n\t\tif ('signal' in init) signal = init.signal;\n\n\t\tif (signal != null && !isAbortSignal(signal)) {\n\t\t\tthrow new TypeError('Expected signal to be an instanceof AbortSignal');\n\t\t}\n\n\t\tthis[INTERNALS$2] = {\n\t\t\tmethod,\n\t\t\tredirect: init.redirect || input.redirect || 'follow',\n\t\t\theaders,\n\t\t\tparsedURL,\n\t\t\tsignal\n\t\t};\n\n\t\t// node-fetch-only options\n\t\tthis.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n\t\tthis.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n\t\tthis.counter = init.counter || input.counter || 0;\n\t\tthis.agent = init.agent || input.agent;\n\t}\n\n\tget method() {\n\t\treturn this[INTERNALS$2].method;\n\t}\n\n\tget url() {\n\t\treturn format_url(this[INTERNALS$2].parsedURL);\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$2].headers;\n\t}\n\n\tget redirect() {\n\t\treturn this[INTERNALS$2].redirect;\n\t}\n\n\tget signal() {\n\t\treturn this[INTERNALS$2].signal;\n\t}\n\n\t/**\n * Clone this request\n *\n * @return Request\n */\n\tclone() {\n\t\treturn new Request(this);\n\t}\n}\n\nBody.mixIn(Request.prototype);\n\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n\tvalue: 'Request',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Request.prototype, {\n\tmethod: { enumerable: true },\n\turl: { enumerable: true },\n\theaders: { enumerable: true },\n\tredirect: { enumerable: true },\n\tclone: { enumerable: true },\n\tsignal: { enumerable: true }\n});\n\n/**\n * Convert a Request to Node.js http request options.\n *\n * @param Request A Request instance\n * @return Object The options object to be passed to http.request\n */\nfunction getNodeRequestOptions(request) {\n\tconst parsedURL = request[INTERNALS$2].parsedURL;\n\tconst headers = new Headers(request[INTERNALS$2].headers);\n\n\t// fetch step 1.3\n\tif (!headers.has('Accept')) {\n\t\theaders.set('Accept', '*/*');\n\t}\n\n\t// Basic fetch\n\tif (!parsedURL.protocol || !parsedURL.hostname) {\n\t\tthrow new TypeError('Only absolute URLs are supported');\n\t}\n\n\tif (!/^https?:$/.test(parsedURL.protocol)) {\n\t\tthrow new TypeError('Only HTTP(S) protocols are supported');\n\t}\n\n\tif (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {\n\t\tthrow new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');\n\t}\n\n\t// HTTP-network-or-cache fetch steps 2.4-2.7\n\tlet contentLengthValue = null;\n\tif (request.body == null && /^(POST|PUT)$/i.test(request.method)) {\n\t\tcontentLengthValue = '0';\n\t}\n\tif (request.body != null) {\n\t\tconst totalBytes = getTotalBytes(request);\n\t\tif (typeof totalBytes === 'number') {\n\t\t\tcontentLengthValue = String(totalBytes);\n\t\t}\n\t}\n\tif (contentLengthValue) {\n\t\theaders.set('Content-Length', contentLengthValue);\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.11\n\tif (!headers.has('User-Agent')) {\n\t\theaders.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.15\n\tif (request.compress && !headers.has('Accept-Encoding')) {\n\t\theaders.set('Accept-Encoding', 'gzip,deflate');\n\t}\n\n\tlet agent = request.agent;\n\tif (typeof agent === 'function') {\n\t\tagent = agent(parsedURL);\n\t}\n\n\tif (!headers.has('Connection') && !agent) {\n\t\theaders.set('Connection', 'close');\n\t}\n\n\t// HTTP-network fetch step 4.2\n\t// chunked encoding is handled by Node.js\n\n\treturn Object.assign({}, parsedURL, {\n\t\tmethod: request.method,\n\t\theaders: exportNodeCompatibleHeaders(headers),\n\t\tagent\n\t});\n}\n\n/**\n * abort-error.js\n *\n * AbortError interface for cancelled requests\n */\n\n/**\n * Create AbortError instance\n *\n * @param String message Error message for human\n * @return AbortError\n */\nfunction AbortError(message) {\n Error.call(this, message);\n\n this.type = 'aborted';\n this.message = message;\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nAbortError.prototype = Object.create(Error.prototype);\nAbortError.prototype.constructor = AbortError;\nAbortError.prototype.name = 'AbortError';\n\n// fix an issue where \"PassThrough\", \"resolve\" aren't a named export for node <10\nconst PassThrough$1 = Stream.PassThrough;\nconst resolve_url = Url.resolve;\n\n/**\n * Fetch function\n *\n * @param Mixed url Absolute url or Request instance\n * @param Object opts Fetch options\n * @return Promise\n */\nfunction fetch(url, opts) {\n\n\t// allow custom promise\n\tif (!fetch.Promise) {\n\t\tthrow new Error('native promise missing, set fetch.Promise to your favorite alternative');\n\t}\n\n\tBody.Promise = fetch.Promise;\n\n\t// wrap http.request into fetch\n\treturn new fetch.Promise(function (resolve, reject) {\n\t\t// build request object\n\t\tconst request = new Request(url, opts);\n\t\tconst options = getNodeRequestOptions(request);\n\n\t\tconst send = (options.protocol === 'https:' ? https : http).request;\n\t\tconst signal = request.signal;\n\n\t\tlet response = null;\n\n\t\tconst abort = function abort() {\n\t\t\tlet error = new AbortError('The user aborted a request.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof Stream.Readable) {\n\t\t\t\trequest.body.destroy(error);\n\t\t\t}\n\t\t\tif (!response || !response.body) return;\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = function abortAndFinalize() {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// send request\n\t\tconst req = send(options);\n\t\tlet reqTimeout;\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tfunction finalize() {\n\t\t\treq.abort();\n\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\tclearTimeout(reqTimeout);\n\t\t}\n\n\t\tif (request.timeout) {\n\t\t\treq.once('socket', function (socket) {\n\t\t\t\treqTimeout = setTimeout(function () {\n\t\t\t\t\treject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));\n\t\t\t\t\tfinalize();\n\t\t\t\t}, request.timeout);\n\t\t\t});\n\t\t}\n\n\t\treq.on('error', function (err) {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));\n\t\t\tfinalize();\n\t\t});\n\n\t\treq.on('response', function (res) {\n\t\t\tclearTimeout(reqTimeout);\n\n\t\t\tconst headers = createHeadersLenient(res.headers);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (fetch.isRedirect(res.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tconst locationURL = location === null ? null : resolve_url(request.url, location);\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.\n\t\t\t\t\t\tif (locationURL !== null) {\n\t\t\t\t\t\t\t// handle corrupted header\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\theaders.set('Location', locationURL);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow':\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOpts = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: request.body,\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\ttimeout: request.timeout,\n\t\t\t\t\t\t\tsize: request.size\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {\n\t\t\t\t\t\t\trequestOpts.method = 'GET';\n\t\t\t\t\t\t\trequestOpts.body = undefined;\n\t\t\t\t\t\t\trequestOpts.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOpts)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// prepare response\n\t\t\tres.once('end', function () {\n\t\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\t});\n\t\t\tlet body = res.pipe(new PassThrough$1());\n\n\t\t\tconst response_options = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: res.statusCode,\n\t\t\t\tstatusText: res.statusMessage,\n\t\t\t\theaders: headers,\n\t\t\t\tsize: request.size,\n\t\t\t\ttimeout: request.timeout,\n\t\t\t\tcounter: request.counter\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: zlib.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: zlib.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// for gzip\n\t\t\tif (codings == 'gzip' || codings == 'x-gzip') {\n\t\t\t\tbody = body.pipe(zlib.createGunzip(zlibOptions));\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for deflate\n\t\t\tif (codings == 'deflate' || codings == 'x-deflate') {\n\t\t\t\t// handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = res.pipe(new PassThrough$1());\n\t\t\t\traw.once('data', function (chunk) {\n\t\t\t\t\t// see http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflate());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflateRaw());\n\t\t\t\t\t}\n\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for br\n\t\t\tif (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {\n\t\t\t\tbody = body.pipe(zlib.createBrotliDecompress());\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// otherwise, use response as-is\n\t\t\tresponse = new Response(body, response_options);\n\t\t\tresolve(response);\n\t\t});\n\n\t\twriteToStream(req, request);\n\t});\n}\n/**\n * Redirect code matching\n *\n * @param Number code Status code\n * @return Boolean\n */\nfetch.isRedirect = function (code) {\n\treturn code === 301 || code === 302 || code === 303 || code === 307 || code === 308;\n};\n\n// expose Promise\nfetch.Promise = global.Promise;\n\nmodule.exports = exports = fetch;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = exports;\nexports.Headers = Headers;\nexports.Request = Request;\nexports.Response = Response;\nexports.FetchError = FetchError;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.format(...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nclass Deprecation extends Error {\n constructor(message) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = 'Deprecation';\n }\n\n}\n\nexports.Deprecation = Deprecation;\n","var debug;\n\nmodule.exports = function () {\n if (!debug) {\n try {\n /* eslint global-require: off */\n debug = require(\"debug\")(\"follow-redirects\");\n }\n catch (error) { /* */ }\n if (typeof debug !== \"function\") {\n debug = function () { /* */ };\n }\n }\n debug.apply(null, arguments);\n};\n","var url = require(\"url\");\nvar URL = url.URL;\nvar http = require(\"http\");\nvar https = require(\"https\");\nvar Writable = require(\"stream\").Writable;\nvar assert = require(\"assert\");\nvar debug = require(\"./debug\");\n\n// Create handlers that pass events from native requests\nvar events = [\"abort\", \"aborted\", \"connect\", \"error\", \"socket\", \"timeout\"];\nvar eventHandlers = Object.create(null);\nevents.forEach(function (event) {\n eventHandlers[event] = function (arg1, arg2, arg3) {\n this._redirectable.emit(event, arg1, arg2, arg3);\n };\n});\n\n// Error types with codes\nvar RedirectionError = createErrorType(\n \"ERR_FR_REDIRECTION_FAILURE\",\n \"Redirected request failed\"\n);\nvar TooManyRedirectsError = createErrorType(\n \"ERR_FR_TOO_MANY_REDIRECTS\",\n \"Maximum number of redirects exceeded\"\n);\nvar MaxBodyLengthExceededError = createErrorType(\n \"ERR_FR_MAX_BODY_LENGTH_EXCEEDED\",\n \"Request body larger than maxBodyLength limit\"\n);\nvar WriteAfterEndError = createErrorType(\n \"ERR_STREAM_WRITE_AFTER_END\",\n \"write after end\"\n);\n\n// An HTTP(S) request that can be redirected\nfunction RedirectableRequest(options, responseCallback) {\n // Initialize the request\n Writable.call(this);\n this._sanitizeOptions(options);\n this._options = options;\n this._ended = false;\n this._ending = false;\n this._redirectCount = 0;\n this._redirects = [];\n this._requestBodyLength = 0;\n this._requestBodyBuffers = [];\n\n // Attach a callback if passed\n if (responseCallback) {\n this.on(\"response\", responseCallback);\n }\n\n // React to responses of native requests\n var self = this;\n this._onNativeResponse = function (response) {\n self._processResponse(response);\n };\n\n // Perform the first request\n this._performRequest();\n}\nRedirectableRequest.prototype = Object.create(Writable.prototype);\n\nRedirectableRequest.prototype.abort = function () {\n abortRequest(this._currentRequest);\n this.emit(\"abort\");\n};\n\n// Writes buffered data to the current native request\nRedirectableRequest.prototype.write = function (data, encoding, callback) {\n // Writing is not allowed if end has been called\n if (this._ending) {\n throw new WriteAfterEndError();\n }\n\n // Validate input and shift parameters if necessary\n if (!(typeof data === \"string\" || typeof data === \"object\" && (\"length\" in data))) {\n throw new TypeError(\"data should be a string, Buffer or Uint8Array\");\n }\n if (typeof encoding === \"function\") {\n callback = encoding;\n encoding = null;\n }\n\n // Ignore empty buffers, since writing them doesn't invoke the callback\n // https://github.com/nodejs/node/issues/22066\n if (data.length === 0) {\n if (callback) {\n callback();\n }\n return;\n }\n // Only write when we don't exceed the maximum body length\n if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {\n this._requestBodyLength += data.length;\n this._requestBodyBuffers.push({ data: data, encoding: encoding });\n this._currentRequest.write(data, encoding, callback);\n }\n // Error when we exceed the maximum body length\n else {\n this.emit(\"error\", new MaxBodyLengthExceededError());\n this.abort();\n }\n};\n\n// Ends the current native request\nRedirectableRequest.prototype.end = function (data, encoding, callback) {\n // Shift parameters if necessary\n if (typeof data === \"function\") {\n callback = data;\n data = encoding = null;\n }\n else if (typeof encoding === \"function\") {\n callback = encoding;\n encoding = null;\n }\n\n // Write data if needed and end\n if (!data) {\n this._ended = this._ending = true;\n this._currentRequest.end(null, null, callback);\n }\n else {\n var self = this;\n var currentRequest = this._currentRequest;\n this.write(data, encoding, function () {\n self._ended = true;\n currentRequest.end(null, null, callback);\n });\n this._ending = true;\n }\n};\n\n// Sets a header value on the current native request\nRedirectableRequest.prototype.setHeader = function (name, value) {\n this._options.headers[name] = value;\n this._currentRequest.setHeader(name, value);\n};\n\n// Clears a header value on the current native request\nRedirectableRequest.prototype.removeHeader = function (name) {\n delete this._options.headers[name];\n this._currentRequest.removeHeader(name);\n};\n\n// Global timeout for all underlying requests\nRedirectableRequest.prototype.setTimeout = function (msecs, callback) {\n var self = this;\n\n // Destroys the socket on timeout\n function destroyOnTimeout(socket) {\n socket.setTimeout(msecs);\n socket.removeListener(\"timeout\", socket.destroy);\n socket.addListener(\"timeout\", socket.destroy);\n }\n\n // Sets up a timer to trigger a timeout event\n function startTimer(socket) {\n if (self._timeout) {\n clearTimeout(self._timeout);\n }\n self._timeout = setTimeout(function () {\n self.emit(\"timeout\");\n clearTimer();\n }, msecs);\n destroyOnTimeout(socket);\n }\n\n // Stops a timeout from triggering\n function clearTimer() {\n // Clear the timeout\n if (self._timeout) {\n clearTimeout(self._timeout);\n self._timeout = null;\n }\n\n // Clean up all attached listeners\n self.removeListener(\"abort\", clearTimer);\n self.removeListener(\"error\", clearTimer);\n self.removeListener(\"response\", clearTimer);\n if (callback) {\n self.removeListener(\"timeout\", callback);\n }\n if (!self.socket) {\n self._currentRequest.removeListener(\"socket\", startTimer);\n }\n }\n\n // Attach callback if passed\n if (callback) {\n this.on(\"timeout\", callback);\n }\n\n // Start the timer if or when the socket is opened\n if (this.socket) {\n startTimer(this.socket);\n }\n else {\n this._currentRequest.once(\"socket\", startTimer);\n }\n\n // Clean up on events\n this.on(\"socket\", destroyOnTimeout);\n this.on(\"abort\", clearTimer);\n this.on(\"error\", clearTimer);\n this.on(\"response\", clearTimer);\n\n return this;\n};\n\n// Proxy all other public ClientRequest methods\n[\n \"flushHeaders\", \"getHeader\",\n \"setNoDelay\", \"setSocketKeepAlive\",\n].forEach(function (method) {\n RedirectableRequest.prototype[method] = function (a, b) {\n return this._currentRequest[method](a, b);\n };\n});\n\n// Proxy all public ClientRequest properties\n[\"aborted\", \"connection\", \"socket\"].forEach(function (property) {\n Object.defineProperty(RedirectableRequest.prototype, property, {\n get: function () { return this._currentRequest[property]; },\n });\n});\n\nRedirectableRequest.prototype._sanitizeOptions = function (options) {\n // Ensure headers are always present\n if (!options.headers) {\n options.headers = {};\n }\n\n // Since http.request treats host as an alias of hostname,\n // but the url module interprets host as hostname plus port,\n // eliminate the host property to avoid confusion.\n if (options.host) {\n // Use hostname if set, because it has precedence\n if (!options.hostname) {\n options.hostname = options.host;\n }\n delete options.host;\n }\n\n // Complete the URL object when necessary\n if (!options.pathname && options.path) {\n var searchPos = options.path.indexOf(\"?\");\n if (searchPos < 0) {\n options.pathname = options.path;\n }\n else {\n options.pathname = options.path.substring(0, searchPos);\n options.search = options.path.substring(searchPos);\n }\n }\n};\n\n\n// Executes the next native request (initial or redirect)\nRedirectableRequest.prototype._performRequest = function () {\n // Load the native protocol\n var protocol = this._options.protocol;\n var nativeProtocol = this._options.nativeProtocols[protocol];\n if (!nativeProtocol) {\n this.emit(\"error\", new TypeError(\"Unsupported protocol \" + protocol));\n return;\n }\n\n // If specified, use the agent corresponding to the protocol\n // (HTTP and HTTPS use different types of agents)\n if (this._options.agents) {\n var scheme = protocol.substr(0, protocol.length - 1);\n this._options.agent = this._options.agents[scheme];\n }\n\n // Create the native request\n var request = this._currentRequest =\n nativeProtocol.request(this._options, this._onNativeResponse);\n this._currentUrl = url.format(this._options);\n\n // Set up event handlers\n request._redirectable = this;\n for (var e = 0; e < events.length; e++) {\n request.on(events[e], eventHandlers[events[e]]);\n }\n\n // End a redirected request\n // (The first request must be ended explicitly with RedirectableRequest#end)\n if (this._isRedirect) {\n // Write the request entity and end.\n var i = 0;\n var self = this;\n var buffers = this._requestBodyBuffers;\n (function writeNext(error) {\n // Only write if this request has not been redirected yet\n /* istanbul ignore else */\n if (request === self._currentRequest) {\n // Report any write errors\n /* istanbul ignore if */\n if (error) {\n self.emit(\"error\", error);\n }\n // Write the next buffer if there are still left\n else if (i < buffers.length) {\n var buffer = buffers[i++];\n /* istanbul ignore else */\n if (!request.finished) {\n request.write(buffer.data, buffer.encoding, writeNext);\n }\n }\n // End the request if `end` has been called on us\n else if (self._ended) {\n request.end();\n }\n }\n }());\n }\n};\n\n// Processes a response from the current native request\nRedirectableRequest.prototype._processResponse = function (response) {\n // Store the redirected response\n var statusCode = response.statusCode;\n if (this._options.trackRedirects) {\n this._redirects.push({\n url: this._currentUrl,\n headers: response.headers,\n statusCode: statusCode,\n });\n }\n\n // RFC7231§6.4: The 3xx (Redirection) class of status code indicates\n // that further action needs to be taken by the user agent in order to\n // fulfill the request. If a Location header field is provided,\n // the user agent MAY automatically redirect its request to the URI\n // referenced by the Location field value,\n // even if the specific status code is not understood.\n var location = response.headers.location;\n if (location && this._options.followRedirects !== false &&\n statusCode >= 300 && statusCode < 400) {\n // Abort the current request\n abortRequest(this._currentRequest);\n // Discard the remainder of the response to avoid waiting for data\n response.destroy();\n\n // RFC7231§6.4: A client SHOULD detect and intervene\n // in cyclical redirections (i.e., \"infinite\" redirection loops).\n if (++this._redirectCount > this._options.maxRedirects) {\n this.emit(\"error\", new TooManyRedirectsError());\n return;\n }\n\n // RFC7231§6.4: Automatic redirection needs to done with\n // care for methods not known to be safe, […]\n // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change\n // the request method from POST to GET for the subsequent request.\n if ((statusCode === 301 || statusCode === 302) && this._options.method === \"POST\" ||\n // RFC7231§6.4.4: The 303 (See Other) status code indicates that\n // the server is redirecting the user agent to a different resource […]\n // A user agent can perform a retrieval request targeting that URI\n // (a GET or HEAD request if using HTTP) […]\n (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {\n this._options.method = \"GET\";\n // Drop a possible entity and headers related to it\n this._requestBodyBuffers = [];\n removeMatchingHeaders(/^content-/i, this._options.headers);\n }\n\n // Drop the Host header, as the redirect might lead to a different host\n var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);\n\n // If the redirect is relative, carry over the host of the last request\n var currentUrlParts = url.parse(this._currentUrl);\n var currentHost = currentHostHeader || currentUrlParts.host;\n var currentUrl = /^\\w+:/.test(location) ? this._currentUrl :\n url.format(Object.assign(currentUrlParts, { host: currentHost }));\n\n // Determine the URL of the redirection\n var redirectUrl;\n try {\n redirectUrl = url.resolve(currentUrl, location);\n }\n catch (cause) {\n this.emit(\"error\", new RedirectionError(cause));\n return;\n }\n\n // Create the redirected request\n debug(\"redirecting to\", redirectUrl);\n this._isRedirect = true;\n var redirectUrlParts = url.parse(redirectUrl);\n Object.assign(this._options, redirectUrlParts);\n\n // Drop the confidential headers when redirecting to another domain\n if (!(redirectUrlParts.host === currentHost || isSubdomainOf(redirectUrlParts.host, currentHost))) {\n removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);\n }\n\n // Evaluate the beforeRedirect callback\n if (typeof this._options.beforeRedirect === \"function\") {\n var responseDetails = { headers: response.headers };\n try {\n this._options.beforeRedirect.call(null, this._options, responseDetails);\n }\n catch (err) {\n this.emit(\"error\", err);\n return;\n }\n this._sanitizeOptions(this._options);\n }\n\n // Perform the redirected request\n try {\n this._performRequest();\n }\n catch (cause) {\n this.emit(\"error\", new RedirectionError(cause));\n }\n }\n else {\n // The response is not a redirect; return it as-is\n response.responseUrl = this._currentUrl;\n response.redirects = this._redirects;\n this.emit(\"response\", response);\n\n // Clean up\n this._requestBodyBuffers = [];\n }\n};\n\n// Wraps the key/value object of protocols with redirect functionality\nfunction wrap(protocols) {\n // Default settings\n var exports = {\n maxRedirects: 21,\n maxBodyLength: 10 * 1024 * 1024,\n };\n\n // Wrap each protocol\n var nativeProtocols = {};\n Object.keys(protocols).forEach(function (scheme) {\n var protocol = scheme + \":\";\n var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];\n var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);\n\n // Executes a request, following redirects\n function request(input, options, callback) {\n // Parse parameters\n if (typeof input === \"string\") {\n var urlStr = input;\n try {\n input = urlToOptions(new URL(urlStr));\n }\n catch (err) {\n /* istanbul ignore next */\n input = url.parse(urlStr);\n }\n }\n else if (URL && (input instanceof URL)) {\n input = urlToOptions(input);\n }\n else {\n callback = options;\n options = input;\n input = { protocol: protocol };\n }\n if (typeof options === \"function\") {\n callback = options;\n options = null;\n }\n\n // Set defaults\n options = Object.assign({\n maxRedirects: exports.maxRedirects,\n maxBodyLength: exports.maxBodyLength,\n }, input, options);\n options.nativeProtocols = nativeProtocols;\n\n assert.equal(options.protocol, protocol, \"protocol mismatch\");\n debug(\"options\", options);\n return new RedirectableRequest(options, callback);\n }\n\n // Executes a GET request, following redirects\n function get(input, options, callback) {\n var wrappedRequest = wrappedProtocol.request(input, options, callback);\n wrappedRequest.end();\n return wrappedRequest;\n }\n\n // Expose the properties on the wrapped protocol\n Object.defineProperties(wrappedProtocol, {\n request: { value: request, configurable: true, enumerable: true, writable: true },\n get: { value: get, configurable: true, enumerable: true, writable: true },\n });\n });\n return exports;\n}\n\n/* istanbul ignore next */\nfunction noop() { /* empty */ }\n\n// from https://github.com/nodejs/node/blob/master/lib/internal/url.js\nfunction urlToOptions(urlObject) {\n var options = {\n protocol: urlObject.protocol,\n hostname: urlObject.hostname.startsWith(\"[\") ?\n /* istanbul ignore next */\n urlObject.hostname.slice(1, -1) :\n urlObject.hostname,\n hash: urlObject.hash,\n search: urlObject.search,\n pathname: urlObject.pathname,\n path: urlObject.pathname + urlObject.search,\n href: urlObject.href,\n };\n if (urlObject.port !== \"\") {\n options.port = Number(urlObject.port);\n }\n return options;\n}\n\nfunction removeMatchingHeaders(regex, headers) {\n var lastValue;\n for (var header in headers) {\n if (regex.test(header)) {\n lastValue = headers[header];\n delete headers[header];\n }\n }\n return (lastValue === null || typeof lastValue === \"undefined\") ?\n undefined : String(lastValue).trim();\n}\n\nfunction createErrorType(code, defaultMessage) {\n function CustomError(cause) {\n Error.captureStackTrace(this, this.constructor);\n if (!cause) {\n this.message = defaultMessage;\n }\n else {\n this.message = defaultMessage + \": \" + cause.message;\n this.cause = cause;\n }\n }\n CustomError.prototype = new Error();\n CustomError.prototype.constructor = CustomError;\n CustomError.prototype.name = \"Error [\" + code + \"]\";\n CustomError.prototype.code = code;\n return CustomError;\n}\n\nfunction abortRequest(request) {\n for (var e = 0; e < events.length; e++) {\n request.removeListener(events[e], eventHandlers[events[e]]);\n }\n request.on(\"error\", noop);\n request.abort();\n}\n\nfunction isSubdomainOf(subdomain, domain) {\n const dot = subdomain.length - domain.length - 1;\n return dot > 0 && subdomain[dot] === \".\" && subdomain.endsWith(domain);\n}\n\n// Exports\nmodule.exports = wrap({ http: http, https: https });\nmodule.exports.wrap = wrap;\n","'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/*!\n * is-plain-object \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexports.isPlainObject = isPlainObject;\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar Stream = _interopDefault(require('stream'));\nvar http = _interopDefault(require('http'));\nvar Url = _interopDefault(require('url'));\nvar whatwgUrl = _interopDefault(require('whatwg-url'));\nvar https = _interopDefault(require('https'));\nvar zlib = _interopDefault(require('zlib'));\n\n// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js\n\n// fix for \"Readable\" isn't a named export issue\nconst Readable = Stream.Readable;\n\nconst BUFFER = Symbol('buffer');\nconst TYPE = Symbol('type');\n\nclass Blob {\n\tconstructor() {\n\t\tthis[TYPE] = '';\n\n\t\tconst blobParts = arguments[0];\n\t\tconst options = arguments[1];\n\n\t\tconst buffers = [];\n\t\tlet size = 0;\n\n\t\tif (blobParts) {\n\t\t\tconst a = blobParts;\n\t\t\tconst length = Number(a.length);\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tconst element = a[i];\n\t\t\t\tlet buffer;\n\t\t\t\tif (element instanceof Buffer) {\n\t\t\t\t\tbuffer = element;\n\t\t\t\t} else if (ArrayBuffer.isView(element)) {\n\t\t\t\t\tbuffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);\n\t\t\t\t} else if (element instanceof ArrayBuffer) {\n\t\t\t\t\tbuffer = Buffer.from(element);\n\t\t\t\t} else if (element instanceof Blob) {\n\t\t\t\t\tbuffer = element[BUFFER];\n\t\t\t\t} else {\n\t\t\t\t\tbuffer = Buffer.from(typeof element === 'string' ? element : String(element));\n\t\t\t\t}\n\t\t\t\tsize += buffer.length;\n\t\t\t\tbuffers.push(buffer);\n\t\t\t}\n\t\t}\n\n\t\tthis[BUFFER] = Buffer.concat(buffers);\n\n\t\tlet type = options && options.type !== undefined && String(options.type).toLowerCase();\n\t\tif (type && !/[^\\u0020-\\u007E]/.test(type)) {\n\t\t\tthis[TYPE] = type;\n\t\t}\n\t}\n\tget size() {\n\t\treturn this[BUFFER].length;\n\t}\n\tget type() {\n\t\treturn this[TYPE];\n\t}\n\ttext() {\n\t\treturn Promise.resolve(this[BUFFER].toString());\n\t}\n\tarrayBuffer() {\n\t\tconst buf = this[BUFFER];\n\t\tconst ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\treturn Promise.resolve(ab);\n\t}\n\tstream() {\n\t\tconst readable = new Readable();\n\t\treadable._read = function () {};\n\t\treadable.push(this[BUFFER]);\n\t\treadable.push(null);\n\t\treturn readable;\n\t}\n\ttoString() {\n\t\treturn '[object Blob]';\n\t}\n\tslice() {\n\t\tconst size = this.size;\n\n\t\tconst start = arguments[0];\n\t\tconst end = arguments[1];\n\t\tlet relativeStart, relativeEnd;\n\t\tif (start === undefined) {\n\t\t\trelativeStart = 0;\n\t\t} else if (start < 0) {\n\t\t\trelativeStart = Math.max(size + start, 0);\n\t\t} else {\n\t\t\trelativeStart = Math.min(start, size);\n\t\t}\n\t\tif (end === undefined) {\n\t\t\trelativeEnd = size;\n\t\t} else if (end < 0) {\n\t\t\trelativeEnd = Math.max(size + end, 0);\n\t\t} else {\n\t\t\trelativeEnd = Math.min(end, size);\n\t\t}\n\t\tconst span = Math.max(relativeEnd - relativeStart, 0);\n\n\t\tconst buffer = this[BUFFER];\n\t\tconst slicedBuffer = buffer.slice(relativeStart, relativeStart + span);\n\t\tconst blob = new Blob([], { type: arguments[2] });\n\t\tblob[BUFFER] = slicedBuffer;\n\t\treturn blob;\n\t}\n}\n\nObject.defineProperties(Blob.prototype, {\n\tsize: { enumerable: true },\n\ttype: { enumerable: true },\n\tslice: { enumerable: true }\n});\n\nObject.defineProperty(Blob.prototype, Symbol.toStringTag, {\n\tvalue: 'Blob',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error message for human\n * @param String type Error type for machine\n * @param String systemError For Node.js system error\n * @return FetchError\n */\nfunction FetchError(message, type, systemError) {\n Error.call(this, message);\n\n this.message = message;\n this.type = type;\n\n // when err.type is `system`, err.code contains system error code\n if (systemError) {\n this.code = this.errno = systemError.code;\n }\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nFetchError.prototype = Object.create(Error.prototype);\nFetchError.prototype.constructor = FetchError;\nFetchError.prototype.name = 'FetchError';\n\nlet convert;\ntry {\n\tconvert = require('encoding').convert;\n} catch (e) {}\n\nconst INTERNALS = Symbol('Body internals');\n\n// fix an issue where \"PassThrough\" isn't a named export for node <10\nconst PassThrough = Stream.PassThrough;\n\n/**\n * Body mixin\n *\n * Ref: https://fetch.spec.whatwg.org/#body\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nfunction Body(body) {\n\tvar _this = this;\n\n\tvar _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n\t _ref$size = _ref.size;\n\n\tlet size = _ref$size === undefined ? 0 : _ref$size;\n\tvar _ref$timeout = _ref.timeout;\n\tlet timeout = _ref$timeout === undefined ? 0 : _ref$timeout;\n\n\tif (body == null) {\n\t\t// body is undefined or null\n\t\tbody = null;\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\tbody = Buffer.from(body.toString());\n\t} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\tbody = Buffer.from(body);\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\tbody = Buffer.from(body.buffer, body.byteOffset, body.byteLength);\n\t} else if (body instanceof Stream) ; else {\n\t\t// none of the above\n\t\t// coerce to string then buffer\n\t\tbody = Buffer.from(String(body));\n\t}\n\tthis[INTERNALS] = {\n\t\tbody,\n\t\tdisturbed: false,\n\t\terror: null\n\t};\n\tthis.size = size;\n\tthis.timeout = timeout;\n\n\tif (body instanceof Stream) {\n\t\tbody.on('error', function (err) {\n\t\t\tconst error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);\n\t\t\t_this[INTERNALS].error = error;\n\t\t});\n\t}\n}\n\nBody.prototype = {\n\tget body() {\n\t\treturn this[INTERNALS].body;\n\t},\n\n\tget bodyUsed() {\n\t\treturn this[INTERNALS].disturbed;\n\t},\n\n\t/**\n * Decode response as ArrayBuffer\n *\n * @return Promise\n */\n\tarrayBuffer() {\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\t});\n\t},\n\n\t/**\n * Return raw response as Blob\n *\n * @return Promise\n */\n\tblob() {\n\t\tlet ct = this.headers && this.headers.get('content-type') || '';\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn Object.assign(\n\t\t\t// Prevent copying\n\t\t\tnew Blob([], {\n\t\t\t\ttype: ct.toLowerCase()\n\t\t\t}), {\n\t\t\t\t[BUFFER]: buf\n\t\t\t});\n\t\t});\n\t},\n\n\t/**\n * Decode response as json\n *\n * @return Promise\n */\n\tjson() {\n\t\tvar _this2 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(buffer.toString());\n\t\t\t} catch (err) {\n\t\t\t\treturn Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n * Decode response as text\n *\n * @return Promise\n */\n\ttext() {\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn buffer.toString();\n\t\t});\n\t},\n\n\t/**\n * Decode response as buffer (non-spec api)\n *\n * @return Promise\n */\n\tbuffer() {\n\t\treturn consumeBody.call(this);\n\t},\n\n\t/**\n * Decode response as text, while automatically detecting the encoding and\n * trying to decode to UTF-8 (non-spec api)\n *\n * @return Promise\n */\n\ttextConverted() {\n\t\tvar _this3 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn convertBody(buffer, _this3.headers);\n\t\t});\n\t}\n};\n\n// In browsers, all properties are enumerable.\nObject.defineProperties(Body.prototype, {\n\tbody: { enumerable: true },\n\tbodyUsed: { enumerable: true },\n\tarrayBuffer: { enumerable: true },\n\tblob: { enumerable: true },\n\tjson: { enumerable: true },\n\ttext: { enumerable: true }\n});\n\nBody.mixIn = function (proto) {\n\tfor (const name of Object.getOwnPropertyNames(Body.prototype)) {\n\t\t// istanbul ignore else: future proof\n\t\tif (!(name in proto)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(Body.prototype, name);\n\t\t\tObject.defineProperty(proto, name, desc);\n\t\t}\n\t}\n};\n\n/**\n * Consume and convert an entire Body to a Buffer.\n *\n * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body\n *\n * @return Promise\n */\nfunction consumeBody() {\n\tvar _this4 = this;\n\n\tif (this[INTERNALS].disturbed) {\n\t\treturn Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));\n\t}\n\n\tthis[INTERNALS].disturbed = true;\n\n\tif (this[INTERNALS].error) {\n\t\treturn Body.Promise.reject(this[INTERNALS].error);\n\t}\n\n\tlet body = this.body;\n\n\t// body is null\n\tif (body === null) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is blob\n\tif (isBlob(body)) {\n\t\tbody = body.stream();\n\t}\n\n\t// body is buffer\n\tif (Buffer.isBuffer(body)) {\n\t\treturn Body.Promise.resolve(body);\n\t}\n\n\t// istanbul ignore if: should never happen\n\tif (!(body instanceof Stream)) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is stream\n\t// get ready to actually consume the body\n\tlet accum = [];\n\tlet accumBytes = 0;\n\tlet abort = false;\n\n\treturn new Body.Promise(function (resolve, reject) {\n\t\tlet resTimeout;\n\n\t\t// allow timeout on slow response body\n\t\tif (_this4.timeout) {\n\t\t\tresTimeout = setTimeout(function () {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));\n\t\t\t}, _this4.timeout);\n\t\t}\n\n\t\t// handle stream errors\n\t\tbody.on('error', function (err) {\n\t\t\tif (err.name === 'AbortError') {\n\t\t\t\t// if the request was aborted, reject with this Error\n\t\t\t\tabort = true;\n\t\t\t\treject(err);\n\t\t\t} else {\n\t\t\t\t// other errors, such as incorrect content-encoding\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\n\t\tbody.on('data', function (chunk) {\n\t\t\tif (abort || chunk === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_this4.size && accumBytes + chunk.length > _this4.size) {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taccumBytes += chunk.length;\n\t\t\taccum.push(chunk);\n\t\t});\n\n\t\tbody.on('end', function () {\n\t\t\tif (abort) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(resTimeout);\n\n\t\t\ttry {\n\t\t\t\tresolve(Buffer.concat(accum, accumBytes));\n\t\t\t} catch (err) {\n\t\t\t\t// handle streams that have accumulated too much data (issue #414)\n\t\t\t\treject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect buffer encoding and convert to target encoding\n * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding\n *\n * @param Buffer buffer Incoming buffer\n * @param String encoding Target encoding\n * @return String\n */\nfunction convertBody(buffer, headers) {\n\tif (typeof convert !== 'function') {\n\t\tthrow new Error('The package `encoding` must be installed to use the textConverted() function');\n\t}\n\n\tconst ct = headers.get('content-type');\n\tlet charset = 'utf-8';\n\tlet res, str;\n\n\t// header\n\tif (ct) {\n\t\tres = /charset=([^;]*)/i.exec(ct);\n\t}\n\n\t// no charset in content type, peek at response body for at most 1024 bytes\n\tstr = buffer.slice(0, 1024).toString();\n\n\t// html5\n\tif (!res && str) {\n\t\tres = / 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n\t\tthis[MAP] = Object.create(null);\n\n\t\tif (init instanceof Headers) {\n\t\t\tconst rawHeaders = init.raw();\n\t\t\tconst headerNames = Object.keys(rawHeaders);\n\n\t\t\tfor (const headerName of headerNames) {\n\t\t\t\tfor (const value of rawHeaders[headerName]) {\n\t\t\t\t\tthis.append(headerName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't worry about converting prop to ByteString here as append()\n\t\t// will handle it.\n\t\tif (init == null) ; else if (typeof init === 'object') {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\tif (method != null) {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// sequence>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tconst pairs = [];\n\t\t\t\tfor (const pair of init) {\n\t\t\t\t\tif (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be iterable');\n\t\t\t\t\t}\n\t\t\t\t\tpairs.push(Array.from(pair));\n\t\t\t\t}\n\n\t\t\t\tfor (const pair of pairs) {\n\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t}\n\t\t\t\t\tthis.append(pair[0], pair[1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// record\n\t\t\t\tfor (const key of Object.keys(init)) {\n\t\t\t\t\tconst value = init[key];\n\t\t\t\t\tthis.append(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Provided initializer must be an object');\n\t\t}\n\t}\n\n\t/**\n * Return combined header value given name\n *\n * @param String name Header name\n * @return Mixed\n */\n\tget(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this[MAP][key].join(', ');\n\t}\n\n\t/**\n * Iterate over all headers\n *\n * @param Function callback Executed for each item with parameters (value, name, thisArg)\n * @param Boolean thisArg `this` context for callback function\n * @return Void\n */\n\tforEach(callback) {\n\t\tlet thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\tlet pairs = getHeaders(this);\n\t\tlet i = 0;\n\t\twhile (i < pairs.length) {\n\t\t\tvar _pairs$i = pairs[i];\n\t\t\tconst name = _pairs$i[0],\n\t\t\t value = _pairs$i[1];\n\n\t\t\tcallback.call(thisArg, value, name, this);\n\t\t\tpairs = getHeaders(this);\n\t\t\ti++;\n\t\t}\n\t}\n\n\t/**\n * Overwrite header values given name\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tset(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}\n\n\t/**\n * Append a value onto existing header\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tappend(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP][name] = [value];\n\t\t}\n\t}\n\n\t/**\n * Check for header name existence\n *\n * @param String name Header name\n * @return Boolean\n */\n\thas(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\treturn find(this[MAP], name) !== undefined;\n\t}\n\n\t/**\n * Delete all header values given name\n *\n * @param String name Header name\n * @return Void\n */\n\tdelete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP][key];\n\t\t}\n\t}\n\n\t/**\n * Return raw headers (non-spec api)\n *\n * @return Object\n */\n\traw() {\n\t\treturn this[MAP];\n\t}\n\n\t/**\n * Get an iterator on keys.\n *\n * @return Iterator\n */\n\tkeys() {\n\t\treturn createHeadersIterator(this, 'key');\n\t}\n\n\t/**\n * Get an iterator on values.\n *\n * @return Iterator\n */\n\tvalues() {\n\t\treturn createHeadersIterator(this, 'value');\n\t}\n\n\t/**\n * Get an iterator on entries.\n *\n * This is the default iterator of the Headers object.\n *\n * @return Iterator\n */\n\t[Symbol.iterator]() {\n\t\treturn createHeadersIterator(this, 'key+value');\n\t}\n}\nHeaders.prototype.entries = Headers.prototype[Symbol.iterator];\n\nObject.defineProperty(Headers.prototype, Symbol.toStringTag, {\n\tvalue: 'Headers',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Headers.prototype, {\n\tget: { enumerable: true },\n\tforEach: { enumerable: true },\n\tset: { enumerable: true },\n\tappend: { enumerable: true },\n\thas: { enumerable: true },\n\tdelete: { enumerable: true },\n\tkeys: { enumerable: true },\n\tvalues: { enumerable: true },\n\tentries: { enumerable: true }\n});\n\nfunction getHeaders(headers) {\n\tlet kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';\n\n\tconst keys = Object.keys(headers[MAP]).sort();\n\treturn keys.map(kind === 'key' ? function (k) {\n\t\treturn k.toLowerCase();\n\t} : kind === 'value' ? function (k) {\n\t\treturn headers[MAP][k].join(', ');\n\t} : function (k) {\n\t\treturn [k.toLowerCase(), headers[MAP][k].join(', ')];\n\t});\n}\n\nconst INTERNAL = Symbol('internal');\n\nfunction createHeadersIterator(target, kind) {\n\tconst iterator = Object.create(HeadersIteratorPrototype);\n\titerator[INTERNAL] = {\n\t\ttarget,\n\t\tkind,\n\t\tindex: 0\n\t};\n\treturn iterator;\n}\n\nconst HeadersIteratorPrototype = Object.setPrototypeOf({\n\tnext() {\n\t\t// istanbul ignore if\n\t\tif (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {\n\t\t\tthrow new TypeError('Value of `this` is not a HeadersIterator');\n\t\t}\n\n\t\tvar _INTERNAL = this[INTERNAL];\n\t\tconst target = _INTERNAL.target,\n\t\t kind = _INTERNAL.kind,\n\t\t index = _INTERNAL.index;\n\n\t\tconst values = getHeaders(target, kind);\n\t\tconst len = values.length;\n\t\tif (index >= len) {\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tthis[INTERNAL].index = index + 1;\n\n\t\treturn {\n\t\t\tvalue: values[index],\n\t\t\tdone: false\n\t\t};\n\t}\n}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));\n\nObject.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {\n\tvalue: 'HeadersIterator',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * Export the Headers object in a form that Node.js can consume.\n *\n * @param Headers headers\n * @return Object\n */\nfunction exportNodeCompatibleHeaders(headers) {\n\tconst obj = Object.assign({ __proto__: null }, headers[MAP]);\n\n\t// http.request() only supports string as Host header. This hack makes\n\t// specifying custom Host header possible.\n\tconst hostHeaderKey = find(headers[MAP], 'Host');\n\tif (hostHeaderKey !== undefined) {\n\t\tobj[hostHeaderKey] = obj[hostHeaderKey][0];\n\t}\n\n\treturn obj;\n}\n\n/**\n * Create a Headers object from an object of headers, ignoring those that do\n * not conform to HTTP grammar productions.\n *\n * @param Object obj Object of headers\n * @return Headers\n */\nfunction createHeadersLenient(obj) {\n\tconst headers = new Headers();\n\tfor (const name of Object.keys(obj)) {\n\t\tif (invalidTokenRegex.test(name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(obj[name])) {\n\t\t\tfor (const val of obj[name]) {\n\t\t\t\tif (invalidHeaderCharRegex.test(val)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (headers[MAP][name] === undefined) {\n\t\t\t\t\theaders[MAP][name] = [val];\n\t\t\t\t} else {\n\t\t\t\t\theaders[MAP][name].push(val);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!invalidHeaderCharRegex.test(obj[name])) {\n\t\t\theaders[MAP][name] = [obj[name]];\n\t\t}\n\t}\n\treturn headers;\n}\n\nconst INTERNALS$1 = Symbol('Response internals');\n\n// fix an issue where \"STATUS_CODES\" aren't a named export for node <10\nconst STATUS_CODES = http.STATUS_CODES;\n\n/**\n * Response class\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nclass Response {\n\tconstructor() {\n\t\tlet body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\tlet opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tBody.call(this, body, opts);\n\n\t\tconst status = opts.status || 200;\n\t\tconst headers = new Headers(opts.headers);\n\n\t\tif (body != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(body);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tthis[INTERNALS$1] = {\n\t\t\turl: opts.url,\n\t\t\tstatus,\n\t\t\tstatusText: opts.statusText || STATUS_CODES[status],\n\t\t\theaders,\n\t\t\tcounter: opts.counter\n\t\t};\n\t}\n\n\tget url() {\n\t\treturn this[INTERNALS$1].url || '';\n\t}\n\n\tget status() {\n\t\treturn this[INTERNALS$1].status;\n\t}\n\n\t/**\n * Convenience property representing if the request ended normally\n */\n\tget ok() {\n\t\treturn this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;\n\t}\n\n\tget redirected() {\n\t\treturn this[INTERNALS$1].counter > 0;\n\t}\n\n\tget statusText() {\n\t\treturn this[INTERNALS$1].statusText;\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$1].headers;\n\t}\n\n\t/**\n * Clone this response\n *\n * @return Response\n */\n\tclone() {\n\t\treturn new Response(clone(this), {\n\t\t\turl: this.url,\n\t\t\tstatus: this.status,\n\t\t\tstatusText: this.statusText,\n\t\t\theaders: this.headers,\n\t\t\tok: this.ok,\n\t\t\tredirected: this.redirected\n\t\t});\n\t}\n}\n\nBody.mixIn(Response.prototype);\n\nObject.defineProperties(Response.prototype, {\n\turl: { enumerable: true },\n\tstatus: { enumerable: true },\n\tok: { enumerable: true },\n\tredirected: { enumerable: true },\n\tstatusText: { enumerable: true },\n\theaders: { enumerable: true },\n\tclone: { enumerable: true }\n});\n\nObject.defineProperty(Response.prototype, Symbol.toStringTag, {\n\tvalue: 'Response',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nconst INTERNALS$2 = Symbol('Request internals');\nconst URL = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"format\", \"parse\" aren't a named export for node <10\nconst parse_url = Url.parse;\nconst format_url = Url.format;\n\n/**\n * Wrapper around `new URL` to handle arbitrary URLs\n *\n * @param {string} urlStr\n * @return {void}\n */\nfunction parseURL(urlStr) {\n\t/*\n \tCheck whether the URL is absolute or not\n \t\tScheme: https://tools.ietf.org/html/rfc3986#section-3.1\n \tAbsolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\n */\n\tif (/^[a-zA-Z][a-zA-Z\\d+\\-.]*:/.exec(urlStr)) {\n\t\turlStr = new URL(urlStr).toString();\n\t}\n\n\t// Fallback to old implementation for arbitrary URLs\n\treturn parse_url(urlStr);\n}\n\nconst streamDestructionSupported = 'destroy' in Stream.Readable.prototype;\n\n/**\n * Check if a value is an instance of Request.\n *\n * @param Mixed input\n * @return Boolean\n */\nfunction isRequest(input) {\n\treturn typeof input === 'object' && typeof input[INTERNALS$2] === 'object';\n}\n\nfunction isAbortSignal(signal) {\n\tconst proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);\n\treturn !!(proto && proto.constructor.name === 'AbortSignal');\n}\n\n/**\n * Request class\n *\n * @param Mixed input Url or Request instance\n * @param Object init Custom options\n * @return Void\n */\nclass Request {\n\tconstructor(input) {\n\t\tlet init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tlet parsedURL;\n\n\t\t// normalize input\n\t\tif (!isRequest(input)) {\n\t\t\tif (input && input.href) {\n\t\t\t\t// in order to support Node.js' Url objects; though WHATWG's URL objects\n\t\t\t\t// will fall into this branch also (since their `toString()` will return\n\t\t\t\t// `href` property anyway)\n\t\t\t\tparsedURL = parseURL(input.href);\n\t\t\t} else {\n\t\t\t\t// coerce input to a string before attempting to parse\n\t\t\t\tparsedURL = parseURL(`${input}`);\n\t\t\t}\n\t\t\tinput = {};\n\t\t} else {\n\t\t\tparsedURL = parseURL(input.url);\n\t\t}\n\n\t\tlet method = init.method || input.method || 'GET';\n\t\tmethod = method.toUpperCase();\n\n\t\tif ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {\n\t\t\tthrow new TypeError('Request with GET/HEAD method cannot have body');\n\t\t}\n\n\t\tlet inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n\n\t\tBody.call(this, inputBody, {\n\t\t\ttimeout: init.timeout || input.timeout || 0,\n\t\t\tsize: init.size || input.size || 0\n\t\t});\n\n\t\tconst headers = new Headers(init.headers || input.headers || {});\n\n\t\tif (inputBody != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(inputBody);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tlet signal = isRequest(input) ? input.signal : null;\n\t\tif ('signal' in init) signal = init.signal;\n\n\t\tif (signal != null && !isAbortSignal(signal)) {\n\t\t\tthrow new TypeError('Expected signal to be an instanceof AbortSignal');\n\t\t}\n\n\t\tthis[INTERNALS$2] = {\n\t\t\tmethod,\n\t\t\tredirect: init.redirect || input.redirect || 'follow',\n\t\t\theaders,\n\t\t\tparsedURL,\n\t\t\tsignal\n\t\t};\n\n\t\t// node-fetch-only options\n\t\tthis.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n\t\tthis.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n\t\tthis.counter = init.counter || input.counter || 0;\n\t\tthis.agent = init.agent || input.agent;\n\t}\n\n\tget method() {\n\t\treturn this[INTERNALS$2].method;\n\t}\n\n\tget url() {\n\t\treturn format_url(this[INTERNALS$2].parsedURL);\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$2].headers;\n\t}\n\n\tget redirect() {\n\t\treturn this[INTERNALS$2].redirect;\n\t}\n\n\tget signal() {\n\t\treturn this[INTERNALS$2].signal;\n\t}\n\n\t/**\n * Clone this request\n *\n * @return Request\n */\n\tclone() {\n\t\treturn new Request(this);\n\t}\n}\n\nBody.mixIn(Request.prototype);\n\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n\tvalue: 'Request',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Request.prototype, {\n\tmethod: { enumerable: true },\n\turl: { enumerable: true },\n\theaders: { enumerable: true },\n\tredirect: { enumerable: true },\n\tclone: { enumerable: true },\n\tsignal: { enumerable: true }\n});\n\n/**\n * Convert a Request to Node.js http request options.\n *\n * @param Request A Request instance\n * @return Object The options object to be passed to http.request\n */\nfunction getNodeRequestOptions(request) {\n\tconst parsedURL = request[INTERNALS$2].parsedURL;\n\tconst headers = new Headers(request[INTERNALS$2].headers);\n\n\t// fetch step 1.3\n\tif (!headers.has('Accept')) {\n\t\theaders.set('Accept', '*/*');\n\t}\n\n\t// Basic fetch\n\tif (!parsedURL.protocol || !parsedURL.hostname) {\n\t\tthrow new TypeError('Only absolute URLs are supported');\n\t}\n\n\tif (!/^https?:$/.test(parsedURL.protocol)) {\n\t\tthrow new TypeError('Only HTTP(S) protocols are supported');\n\t}\n\n\tif (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {\n\t\tthrow new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');\n\t}\n\n\t// HTTP-network-or-cache fetch steps 2.4-2.7\n\tlet contentLengthValue = null;\n\tif (request.body == null && /^(POST|PUT)$/i.test(request.method)) {\n\t\tcontentLengthValue = '0';\n\t}\n\tif (request.body != null) {\n\t\tconst totalBytes = getTotalBytes(request);\n\t\tif (typeof totalBytes === 'number') {\n\t\t\tcontentLengthValue = String(totalBytes);\n\t\t}\n\t}\n\tif (contentLengthValue) {\n\t\theaders.set('Content-Length', contentLengthValue);\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.11\n\tif (!headers.has('User-Agent')) {\n\t\theaders.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.15\n\tif (request.compress && !headers.has('Accept-Encoding')) {\n\t\theaders.set('Accept-Encoding', 'gzip,deflate');\n\t}\n\n\tlet agent = request.agent;\n\tif (typeof agent === 'function') {\n\t\tagent = agent(parsedURL);\n\t}\n\n\tif (!headers.has('Connection') && !agent) {\n\t\theaders.set('Connection', 'close');\n\t}\n\n\t// HTTP-network fetch step 4.2\n\t// chunked encoding is handled by Node.js\n\n\treturn Object.assign({}, parsedURL, {\n\t\tmethod: request.method,\n\t\theaders: exportNodeCompatibleHeaders(headers),\n\t\tagent\n\t});\n}\n\n/**\n * abort-error.js\n *\n * AbortError interface for cancelled requests\n */\n\n/**\n * Create AbortError instance\n *\n * @param String message Error message for human\n * @return AbortError\n */\nfunction AbortError(message) {\n Error.call(this, message);\n\n this.type = 'aborted';\n this.message = message;\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nAbortError.prototype = Object.create(Error.prototype);\nAbortError.prototype.constructor = AbortError;\nAbortError.prototype.name = 'AbortError';\n\nconst URL$1 = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"PassThrough\", \"resolve\" aren't a named export for node <10\nconst PassThrough$1 = Stream.PassThrough;\n\nconst isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {\n\tconst orig = new URL$1(original).hostname;\n\tconst dest = new URL$1(destination).hostname;\n\n\treturn orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);\n};\n\n/**\n * Fetch function\n *\n * @param Mixed url Absolute url or Request instance\n * @param Object opts Fetch options\n * @return Promise\n */\nfunction fetch(url, opts) {\n\n\t// allow custom promise\n\tif (!fetch.Promise) {\n\t\tthrow new Error('native promise missing, set fetch.Promise to your favorite alternative');\n\t}\n\n\tBody.Promise = fetch.Promise;\n\n\t// wrap http.request into fetch\n\treturn new fetch.Promise(function (resolve, reject) {\n\t\t// build request object\n\t\tconst request = new Request(url, opts);\n\t\tconst options = getNodeRequestOptions(request);\n\n\t\tconst send = (options.protocol === 'https:' ? https : http).request;\n\t\tconst signal = request.signal;\n\n\t\tlet response = null;\n\n\t\tconst abort = function abort() {\n\t\t\tlet error = new AbortError('The user aborted a request.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof Stream.Readable) {\n\t\t\t\trequest.body.destroy(error);\n\t\t\t}\n\t\t\tif (!response || !response.body) return;\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = function abortAndFinalize() {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// send request\n\t\tconst req = send(options);\n\t\tlet reqTimeout;\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tfunction finalize() {\n\t\t\treq.abort();\n\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\tclearTimeout(reqTimeout);\n\t\t}\n\n\t\tif (request.timeout) {\n\t\t\treq.once('socket', function (socket) {\n\t\t\t\treqTimeout = setTimeout(function () {\n\t\t\t\t\treject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));\n\t\t\t\t\tfinalize();\n\t\t\t\t}, request.timeout);\n\t\t\t});\n\t\t}\n\n\t\treq.on('error', function (err) {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));\n\t\t\tfinalize();\n\t\t});\n\n\t\treq.on('response', function (res) {\n\t\t\tclearTimeout(reqTimeout);\n\n\t\t\tconst headers = createHeadersLenient(res.headers);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (fetch.isRedirect(res.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tlet locationURL = null;\n\t\t\t\ttry {\n\t\t\t\t\tlocationURL = location === null ? null : new URL$1(location, request.url).toString();\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// error here can only be invalid URL in Location: header\n\t\t\t\t\t// do not throw when options.redirect == manual\n\t\t\t\t\t// let the user extract the errorneous redirect URL\n\t\t\t\t\tif (request.redirect !== 'manual') {\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.\n\t\t\t\t\t\tif (locationURL !== null) {\n\t\t\t\t\t\t\t// handle corrupted header\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\theaders.set('Location', locationURL);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow':\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOpts = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: request.body,\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\ttimeout: request.timeout,\n\t\t\t\t\t\t\tsize: request.size\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (!isDomainOrSubdomain(request.url, locationURL)) {\n\t\t\t\t\t\t\tfor (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {\n\t\t\t\t\t\t\t\trequestOpts.headers.delete(name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {\n\t\t\t\t\t\t\trequestOpts.method = 'GET';\n\t\t\t\t\t\t\trequestOpts.body = undefined;\n\t\t\t\t\t\t\trequestOpts.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOpts)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// prepare response\n\t\t\tres.once('end', function () {\n\t\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\t});\n\t\t\tlet body = res.pipe(new PassThrough$1());\n\n\t\t\tconst response_options = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: res.statusCode,\n\t\t\t\tstatusText: res.statusMessage,\n\t\t\t\theaders: headers,\n\t\t\t\tsize: request.size,\n\t\t\t\ttimeout: request.timeout,\n\t\t\t\tcounter: request.counter\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: zlib.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: zlib.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// for gzip\n\t\t\tif (codings == 'gzip' || codings == 'x-gzip') {\n\t\t\t\tbody = body.pipe(zlib.createGunzip(zlibOptions));\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for deflate\n\t\t\tif (codings == 'deflate' || codings == 'x-deflate') {\n\t\t\t\t// handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = res.pipe(new PassThrough$1());\n\t\t\t\traw.once('data', function (chunk) {\n\t\t\t\t\t// see http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflate());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflateRaw());\n\t\t\t\t\t}\n\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for br\n\t\t\tif (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {\n\t\t\t\tbody = body.pipe(zlib.createBrotliDecompress());\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// otherwise, use response as-is\n\t\t\tresponse = new Response(body, response_options);\n\t\t\tresolve(response);\n\t\t});\n\n\t\twriteToStream(req, request);\n\t});\n}\n/**\n * Redirect code matching\n *\n * @param Number code Status code\n * @return Boolean\n */\nfetch.isRedirect = function (code) {\n\treturn code === 301 || code === 302 || code === 303 || code === 307 || code === 308;\n};\n\n// expose Promise\nfetch.Promise = global.Promise;\n\nmodule.exports = exports = fetch;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = exports;\nexports.Headers = Headers;\nexports.Request = Request;\nexports.Response = Response;\nexports.FetchError = FetchError;\n","\"use strict\";\n\nvar punycode = require(\"punycode\");\nvar mappingTable = require(\"./lib/mappingTable.json\");\n\nvar PROCESSING_OPTIONS = {\n TRANSITIONAL: 0,\n NONTRANSITIONAL: 1\n};\n\nfunction normalize(str) { // fix bug in v8\n return str.split('\\u0000').map(function (s) { return s.normalize('NFC'); }).join('\\u0000');\n}\n\nfunction findStatus(val) {\n var start = 0;\n var end = mappingTable.length - 1;\n\n while (start <= end) {\n var mid = Math.floor((start + end) / 2);\n\n var target = mappingTable[mid];\n if (target[0][0] <= val && target[0][1] >= val) {\n return target;\n } else if (target[0][0] > val) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n\n return null;\n}\n\nvar regexAstralSymbols = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n\nfunction countSymbols(string) {\n return string\n // replace every surrogate pair with a BMP symbol\n .replace(regexAstralSymbols, '_')\n // then get the length\n .length;\n}\n\nfunction mapChars(domain_name, useSTD3, processing_option) {\n var hasError = false;\n var processed = \"\";\n\n var len = countSymbols(domain_name);\n for (var i = 0; i < len; ++i) {\n var codePoint = domain_name.codePointAt(i);\n var status = findStatus(codePoint);\n\n switch (status[1]) {\n case \"disallowed\":\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n break;\n case \"ignored\":\n break;\n case \"mapped\":\n processed += String.fromCodePoint.apply(String, status[2]);\n break;\n case \"deviation\":\n if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {\n processed += String.fromCodePoint.apply(String, status[2]);\n } else {\n processed += String.fromCodePoint(codePoint);\n }\n break;\n case \"valid\":\n processed += String.fromCodePoint(codePoint);\n break;\n case \"disallowed_STD3_mapped\":\n if (useSTD3) {\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n } else {\n processed += String.fromCodePoint.apply(String, status[2]);\n }\n break;\n case \"disallowed_STD3_valid\":\n if (useSTD3) {\n hasError = true;\n }\n\n processed += String.fromCodePoint(codePoint);\n break;\n }\n }\n\n return {\n string: processed,\n error: hasError\n };\n}\n\nvar combiningMarksRegex = /[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E4-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFC-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2D]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDE2C-\\uDE37\\uDEDF-\\uDEEA\\uDF01-\\uDF03\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDE30-\\uDE40\\uDEAB-\\uDEB7]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDF51-\\uDF7E\\uDF8F-\\uDF92]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD83A[\\uDCD0-\\uDCD6]|\\uDB40[\\uDD00-\\uDDEF]/;\n\nfunction validateLabel(label, processing_option) {\n if (label.substr(0, 4) === \"xn--\") {\n label = punycode.toUnicode(label);\n processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;\n }\n\n var error = false;\n\n if (normalize(label) !== label ||\n (label[3] === \"-\" && label[4] === \"-\") ||\n label[0] === \"-\" || label[label.length - 1] === \"-\" ||\n label.indexOf(\".\") !== -1 ||\n label.search(combiningMarksRegex) === 0) {\n error = true;\n }\n\n var len = countSymbols(label);\n for (var i = 0; i < len; ++i) {\n var status = findStatus(label.codePointAt(i));\n if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== \"valid\") ||\n (processing === PROCESSING_OPTIONS.NONTRANSITIONAL &&\n status[1] !== \"valid\" && status[1] !== \"deviation\")) {\n error = true;\n break;\n }\n }\n\n return {\n label: label,\n error: error\n };\n}\n\nfunction processing(domain_name, useSTD3, processing_option) {\n var result = mapChars(domain_name, useSTD3, processing_option);\n result.string = normalize(result.string);\n\n var labels = result.string.split(\".\");\n for (var i = 0; i < labels.length; ++i) {\n try {\n var validation = validateLabel(labels[i]);\n labels[i] = validation.label;\n result.error = result.error || validation.error;\n } catch(e) {\n result.error = true;\n }\n }\n\n return {\n string: labels.join(\".\"),\n error: result.error\n };\n}\n\nmodule.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) {\n var result = processing(domain_name, useSTD3, processing_option);\n var labels = result.string.split(\".\");\n labels = labels.map(function(l) {\n try {\n return punycode.toASCII(l);\n } catch(e) {\n result.error = true;\n return l;\n }\n });\n\n if (verifyDnsLength) {\n var total = labels.slice(0, labels.length - 1).join(\".\").length;\n if (total.length > 253 || total.length === 0) {\n result.error = true;\n }\n\n for (var i=0; i < labels.length; ++i) {\n if (labels.length > 63 || labels.length === 0) {\n result.error = true;\n break;\n }\n }\n }\n\n if (result.error) return null;\n return labels.join(\".\");\n};\n\nmodule.exports.toUnicode = function(domain_name, useSTD3) {\n var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL);\n\n return {\n domain: result.string,\n error: result.error\n };\n};\n\nmodule.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;\n","\"use strict\";\n\nvar conversions = {};\nmodule.exports = conversions;\n\nfunction sign(x) {\n return x < 0 ? -1 : 1;\n}\n\nfunction evenRound(x) {\n // Round x to the nearest integer, choosing the even integer if it lies halfway between two.\n if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor)\n return Math.floor(x);\n } else {\n return Math.round(x);\n }\n}\n\nfunction createNumberConversion(bitLength, typeOpts) {\n if (!typeOpts.unsigned) {\n --bitLength;\n }\n const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength);\n const upperBound = Math.pow(2, bitLength) - 1;\n\n const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength);\n const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1);\n\n return function(V, opts) {\n if (!opts) opts = {};\n\n let x = +V;\n\n if (opts.enforceRange) {\n if (!Number.isFinite(x)) {\n throw new TypeError(\"Argument is not a finite number\");\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n if (x < lowerBound || x > upperBound) {\n throw new TypeError(\"Argument is not in byte range\");\n }\n\n return x;\n }\n\n if (!isNaN(x) && opts.clamp) {\n x = evenRound(x);\n\n if (x < lowerBound) x = lowerBound;\n if (x > upperBound) x = upperBound;\n return x;\n }\n\n if (!Number.isFinite(x) || x === 0) {\n return 0;\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n x = x % moduloVal;\n\n if (!typeOpts.unsigned && x >= moduloBound) {\n return x - moduloVal;\n } else if (typeOpts.unsigned) {\n if (x < 0) {\n x += moduloVal;\n } else if (x === -0) { // don't return negative zero\n return 0;\n }\n }\n\n return x;\n }\n}\n\nconversions[\"void\"] = function () {\n return undefined;\n};\n\nconversions[\"boolean\"] = function (val) {\n return !!val;\n};\n\nconversions[\"byte\"] = createNumberConversion(8, { unsigned: false });\nconversions[\"octet\"] = createNumberConversion(8, { unsigned: true });\n\nconversions[\"short\"] = createNumberConversion(16, { unsigned: false });\nconversions[\"unsigned short\"] = createNumberConversion(16, { unsigned: true });\n\nconversions[\"long\"] = createNumberConversion(32, { unsigned: false });\nconversions[\"unsigned long\"] = createNumberConversion(32, { unsigned: true });\n\nconversions[\"long long\"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 });\nconversions[\"unsigned long long\"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 });\n\nconversions[\"double\"] = function (V) {\n const x = +V;\n\n if (!Number.isFinite(x)) {\n throw new TypeError(\"Argument is not a finite floating-point value\");\n }\n\n return x;\n};\n\nconversions[\"unrestricted double\"] = function (V) {\n const x = +V;\n\n if (isNaN(x)) {\n throw new TypeError(\"Argument is NaN\");\n }\n\n return x;\n};\n\n// not quite valid, but good enough for JS\nconversions[\"float\"] = conversions[\"double\"];\nconversions[\"unrestricted float\"] = conversions[\"unrestricted double\"];\n\nconversions[\"DOMString\"] = function (V, opts) {\n if (!opts) opts = {};\n\n if (opts.treatNullAsEmptyString && V === null) {\n return \"\";\n }\n\n return String(V);\n};\n\nconversions[\"ByteString\"] = function (V, opts) {\n const x = String(V);\n let c = undefined;\n for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) {\n if (c > 255) {\n throw new TypeError(\"Argument is not a valid bytestring\");\n }\n }\n\n return x;\n};\n\nconversions[\"USVString\"] = function (V) {\n const S = String(V);\n const n = S.length;\n const U = [];\n for (let i = 0; i < n; ++i) {\n const c = S.charCodeAt(i);\n if (c < 0xD800 || c > 0xDFFF) {\n U.push(String.fromCodePoint(c));\n } else if (0xDC00 <= c && c <= 0xDFFF) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n if (i === n - 1) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n const d = S.charCodeAt(i + 1);\n if (0xDC00 <= d && d <= 0xDFFF) {\n const a = c & 0x3FF;\n const b = d & 0x3FF;\n U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b));\n ++i;\n } else {\n U.push(String.fromCodePoint(0xFFFD));\n }\n }\n }\n }\n\n return U.join('');\n};\n\nconversions[\"Date\"] = function (V, opts) {\n if (!(V instanceof Date)) {\n throw new TypeError(\"Argument is not a Date object\");\n }\n if (isNaN(V)) {\n return undefined;\n }\n\n return V;\n};\n\nconversions[\"RegExp\"] = function (V, opts) {\n if (!(V instanceof RegExp)) {\n V = new RegExp(V);\n }\n\n return V;\n};\n","\"use strict\";\nconst usm = require(\"./url-state-machine\");\n\nexports.implementation = class URLImpl {\n constructor(constructorArgs) {\n const url = constructorArgs[0];\n const base = constructorArgs[1];\n\n let parsedBase = null;\n if (base !== undefined) {\n parsedBase = usm.basicURLParse(base);\n if (parsedBase === \"failure\") {\n throw new TypeError(\"Invalid base URL\");\n }\n }\n\n const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });\n if (parsedURL === \"failure\") {\n throw new TypeError(\"Invalid URL\");\n }\n\n this._url = parsedURL;\n\n // TODO: query stuff\n }\n\n get href() {\n return usm.serializeURL(this._url);\n }\n\n set href(v) {\n const parsedURL = usm.basicURLParse(v);\n if (parsedURL === \"failure\") {\n throw new TypeError(\"Invalid URL\");\n }\n\n this._url = parsedURL;\n }\n\n get origin() {\n return usm.serializeURLOrigin(this._url);\n }\n\n get protocol() {\n return this._url.scheme + \":\";\n }\n\n set protocol(v) {\n usm.basicURLParse(v + \":\", { url: this._url, stateOverride: \"scheme start\" });\n }\n\n get username() {\n return this._url.username;\n }\n\n set username(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setTheUsername(this._url, v);\n }\n\n get password() {\n return this._url.password;\n }\n\n set password(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setThePassword(this._url, v);\n }\n\n get host() {\n const url = this._url;\n\n if (url.host === null) {\n return \"\";\n }\n\n if (url.port === null) {\n return usm.serializeHost(url.host);\n }\n\n return usm.serializeHost(url.host) + \":\" + usm.serializeInteger(url.port);\n }\n\n set host(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"host\" });\n }\n\n get hostname() {\n if (this._url.host === null) {\n return \"\";\n }\n\n return usm.serializeHost(this._url.host);\n }\n\n set hostname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"hostname\" });\n }\n\n get port() {\n if (this._url.port === null) {\n return \"\";\n }\n\n return usm.serializeInteger(this._url.port);\n }\n\n set port(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n if (v === \"\") {\n this._url.port = null;\n } else {\n usm.basicURLParse(v, { url: this._url, stateOverride: \"port\" });\n }\n }\n\n get pathname() {\n if (this._url.cannotBeABaseURL) {\n return this._url.path[0];\n }\n\n if (this._url.path.length === 0) {\n return \"\";\n }\n\n return \"/\" + this._url.path.join(\"/\");\n }\n\n set pathname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n this._url.path = [];\n usm.basicURLParse(v, { url: this._url, stateOverride: \"path start\" });\n }\n\n get search() {\n if (this._url.query === null || this._url.query === \"\") {\n return \"\";\n }\n\n return \"?\" + this._url.query;\n }\n\n set search(v) {\n // TODO: query stuff\n\n const url = this._url;\n\n if (v === \"\") {\n url.query = null;\n return;\n }\n\n const input = v[0] === \"?\" ? v.substring(1) : v;\n url.query = \"\";\n usm.basicURLParse(input, { url, stateOverride: \"query\" });\n }\n\n get hash() {\n if (this._url.fragment === null || this._url.fragment === \"\") {\n return \"\";\n }\n\n return \"#\" + this._url.fragment;\n }\n\n set hash(v) {\n if (v === \"\") {\n this._url.fragment = null;\n return;\n }\n\n const input = v[0] === \"#\" ? v.substring(1) : v;\n this._url.fragment = \"\";\n usm.basicURLParse(input, { url: this._url, stateOverride: \"fragment\" });\n }\n\n toJSON() {\n return this.href;\n }\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\nconst Impl = require(\".//URL-impl.js\");\n\nconst impl = utils.implSymbol;\n\nfunction URL(url) {\n if (!this || this[impl] || !(this instanceof URL)) {\n throw new TypeError(\"Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.\");\n }\n if (arguments.length < 1) {\n throw new TypeError(\"Failed to construct 'URL': 1 argument required, but only \" + arguments.length + \" present.\");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 2; ++i) {\n args[i] = arguments[i];\n }\n args[0] = conversions[\"USVString\"](args[0]);\n if (args[1] !== undefined) {\n args[1] = conversions[\"USVString\"](args[1]);\n }\n\n module.exports.setup(this, args);\n}\n\nURL.prototype.toJSON = function toJSON() {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 0; ++i) {\n args[i] = arguments[i];\n }\n return this[impl].toJSON.apply(this[impl], args);\n};\nObject.defineProperty(URL.prototype, \"href\", {\n get() {\n return this[impl].href;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].href = V;\n },\n enumerable: true,\n configurable: true\n});\n\nURL.prototype.toString = function () {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n return this.href;\n};\n\nObject.defineProperty(URL.prototype, \"origin\", {\n get() {\n return this[impl].origin;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"protocol\", {\n get() {\n return this[impl].protocol;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].protocol = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"username\", {\n get() {\n return this[impl].username;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].username = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"password\", {\n get() {\n return this[impl].password;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].password = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"host\", {\n get() {\n return this[impl].host;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].host = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"hostname\", {\n get() {\n return this[impl].hostname;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].hostname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"port\", {\n get() {\n return this[impl].port;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].port = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"pathname\", {\n get() {\n return this[impl].pathname;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].pathname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"search\", {\n get() {\n return this[impl].search;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].search = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"hash\", {\n get() {\n return this[impl].hash;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].hash = V;\n },\n enumerable: true,\n configurable: true\n});\n\n\nmodule.exports = {\n is(obj) {\n return !!obj && obj[impl] instanceof Impl.implementation;\n },\n create(constructorArgs, privateData) {\n let obj = Object.create(URL.prototype);\n this.setup(obj, constructorArgs, privateData);\n return obj;\n },\n setup(obj, constructorArgs, privateData) {\n if (!privateData) privateData = {};\n privateData.wrapper = obj;\n\n obj[impl] = new Impl.implementation(constructorArgs, privateData);\n obj[impl][utils.wrapperSymbol] = obj;\n },\n interface: URL,\n expose: {\n Window: { URL: URL },\n Worker: { URL: URL }\n }\n};\n\n","\"use strict\";\n\nexports.URL = require(\"./URL\").interface;\nexports.serializeURL = require(\"./url-state-machine\").serializeURL;\nexports.serializeURLOrigin = require(\"./url-state-machine\").serializeURLOrigin;\nexports.basicURLParse = require(\"./url-state-machine\").basicURLParse;\nexports.setTheUsername = require(\"./url-state-machine\").setTheUsername;\nexports.setThePassword = require(\"./url-state-machine\").setThePassword;\nexports.serializeHost = require(\"./url-state-machine\").serializeHost;\nexports.serializeInteger = require(\"./url-state-machine\").serializeInteger;\nexports.parseURL = require(\"./url-state-machine\").parseURL;\n","\"use strict\";\r\nconst punycode = require(\"punycode\");\r\nconst tr46 = require(\"tr46\");\r\n\r\nconst specialSchemes = {\r\n ftp: 21,\r\n file: null,\r\n gopher: 70,\r\n http: 80,\r\n https: 443,\r\n ws: 80,\r\n wss: 443\r\n};\r\n\r\nconst failure = Symbol(\"failure\");\r\n\r\nfunction countSymbols(str) {\r\n return punycode.ucs2.decode(str).length;\r\n}\r\n\r\nfunction at(input, idx) {\r\n const c = input[idx];\r\n return isNaN(c) ? undefined : String.fromCodePoint(c);\r\n}\r\n\r\nfunction isASCIIDigit(c) {\r\n return c >= 0x30 && c <= 0x39;\r\n}\r\n\r\nfunction isASCIIAlpha(c) {\r\n return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);\r\n}\r\n\r\nfunction isASCIIAlphanumeric(c) {\r\n return isASCIIAlpha(c) || isASCIIDigit(c);\r\n}\r\n\r\nfunction isASCIIHex(c) {\r\n return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66);\r\n}\r\n\r\nfunction isSingleDot(buffer) {\r\n return buffer === \".\" || buffer.toLowerCase() === \"%2e\";\r\n}\r\n\r\nfunction isDoubleDot(buffer) {\r\n buffer = buffer.toLowerCase();\r\n return buffer === \"..\" || buffer === \"%2e.\" || buffer === \".%2e\" || buffer === \"%2e%2e\";\r\n}\r\n\r\nfunction isWindowsDriveLetterCodePoints(cp1, cp2) {\r\n return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124);\r\n}\r\n\r\nfunction isWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === \":\" || string[1] === \"|\");\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === \":\";\r\n}\r\n\r\nfunction containsForbiddenHostCodePoint(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|%|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction containsForbiddenHostCodePointExcludingPercent(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction isSpecialScheme(scheme) {\r\n return specialSchemes[scheme] !== undefined;\r\n}\r\n\r\nfunction isSpecial(url) {\r\n return isSpecialScheme(url.scheme);\r\n}\r\n\r\nfunction defaultPort(scheme) {\r\n return specialSchemes[scheme];\r\n}\r\n\r\nfunction percentEncode(c) {\r\n let hex = c.toString(16).toUpperCase();\r\n if (hex.length === 1) {\r\n hex = \"0\" + hex;\r\n }\r\n\r\n return \"%\" + hex;\r\n}\r\n\r\nfunction utf8PercentEncode(c) {\r\n const buf = new Buffer(c);\r\n\r\n let str = \"\";\r\n\r\n for (let i = 0; i < buf.length; ++i) {\r\n str += percentEncode(buf[i]);\r\n }\r\n\r\n return str;\r\n}\r\n\r\nfunction utf8PercentDecode(str) {\r\n const input = new Buffer(str);\r\n const output = [];\r\n for (let i = 0; i < input.length; ++i) {\r\n if (input[i] !== 37) {\r\n output.push(input[i]);\r\n } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {\r\n output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));\r\n i += 2;\r\n } else {\r\n output.push(input[i]);\r\n }\r\n }\r\n return new Buffer(output).toString();\r\n}\r\n\r\nfunction isC0ControlPercentEncode(c) {\r\n return c <= 0x1F || c > 0x7E;\r\n}\r\n\r\nconst extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]);\r\nfunction isPathPercentEncode(c) {\r\n return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c);\r\n}\r\n\r\nconst extraUserinfoPercentEncodeSet =\r\n new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]);\r\nfunction isUserinfoPercentEncode(c) {\r\n return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);\r\n}\r\n\r\nfunction percentEncodeChar(c, encodeSetPredicate) {\r\n const cStr = String.fromCodePoint(c);\r\n\r\n if (encodeSetPredicate(c)) {\r\n return utf8PercentEncode(cStr);\r\n }\r\n\r\n return cStr;\r\n}\r\n\r\nfunction parseIPv4Number(input) {\r\n let R = 10;\r\n\r\n if (input.length >= 2 && input.charAt(0) === \"0\" && input.charAt(1).toLowerCase() === \"x\") {\r\n input = input.substring(2);\r\n R = 16;\r\n } else if (input.length >= 2 && input.charAt(0) === \"0\") {\r\n input = input.substring(1);\r\n R = 8;\r\n }\r\n\r\n if (input === \"\") {\r\n return 0;\r\n }\r\n\r\n const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/);\r\n if (regex.test(input)) {\r\n return failure;\r\n }\r\n\r\n return parseInt(input, R);\r\n}\r\n\r\nfunction parseIPv4(input) {\r\n const parts = input.split(\".\");\r\n if (parts[parts.length - 1] === \"\") {\r\n if (parts.length > 1) {\r\n parts.pop();\r\n }\r\n }\r\n\r\n if (parts.length > 4) {\r\n return input;\r\n }\r\n\r\n const numbers = [];\r\n for (const part of parts) {\r\n if (part === \"\") {\r\n return input;\r\n }\r\n const n = parseIPv4Number(part);\r\n if (n === failure) {\r\n return input;\r\n }\r\n\r\n numbers.push(n);\r\n }\r\n\r\n for (let i = 0; i < numbers.length - 1; ++i) {\r\n if (numbers[i] > 255) {\r\n return failure;\r\n }\r\n }\r\n if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) {\r\n return failure;\r\n }\r\n\r\n let ipv4 = numbers.pop();\r\n let counter = 0;\r\n\r\n for (const n of numbers) {\r\n ipv4 += n * Math.pow(256, 3 - counter);\r\n ++counter;\r\n }\r\n\r\n return ipv4;\r\n}\r\n\r\nfunction serializeIPv4(address) {\r\n let output = \"\";\r\n let n = address;\r\n\r\n for (let i = 1; i <= 4; ++i) {\r\n output = String(n % 256) + output;\r\n if (i !== 4) {\r\n output = \".\" + output;\r\n }\r\n n = Math.floor(n / 256);\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseIPv6(input) {\r\n const address = [0, 0, 0, 0, 0, 0, 0, 0];\r\n let pieceIndex = 0;\r\n let compress = null;\r\n let pointer = 0;\r\n\r\n input = punycode.ucs2.decode(input);\r\n\r\n if (input[pointer] === 58) {\r\n if (input[pointer + 1] !== 58) {\r\n return failure;\r\n }\r\n\r\n pointer += 2;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n }\r\n\r\n while (pointer < input.length) {\r\n if (pieceIndex === 8) {\r\n return failure;\r\n }\r\n\r\n if (input[pointer] === 58) {\r\n if (compress !== null) {\r\n return failure;\r\n }\r\n ++pointer;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n continue;\r\n }\r\n\r\n let value = 0;\r\n let length = 0;\r\n\r\n while (length < 4 && isASCIIHex(input[pointer])) {\r\n value = value * 0x10 + parseInt(at(input, pointer), 16);\r\n ++pointer;\r\n ++length;\r\n }\r\n\r\n if (input[pointer] === 46) {\r\n if (length === 0) {\r\n return failure;\r\n }\r\n\r\n pointer -= length;\r\n\r\n if (pieceIndex > 6) {\r\n return failure;\r\n }\r\n\r\n let numbersSeen = 0;\r\n\r\n while (input[pointer] !== undefined) {\r\n let ipv4Piece = null;\r\n\r\n if (numbersSeen > 0) {\r\n if (input[pointer] === 46 && numbersSeen < 4) {\r\n ++pointer;\r\n } else {\r\n return failure;\r\n }\r\n }\r\n\r\n if (!isASCIIDigit(input[pointer])) {\r\n return failure;\r\n }\r\n\r\n while (isASCIIDigit(input[pointer])) {\r\n const number = parseInt(at(input, pointer));\r\n if (ipv4Piece === null) {\r\n ipv4Piece = number;\r\n } else if (ipv4Piece === 0) {\r\n return failure;\r\n } else {\r\n ipv4Piece = ipv4Piece * 10 + number;\r\n }\r\n if (ipv4Piece > 255) {\r\n return failure;\r\n }\r\n ++pointer;\r\n }\r\n\r\n address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece;\r\n\r\n ++numbersSeen;\r\n\r\n if (numbersSeen === 2 || numbersSeen === 4) {\r\n ++pieceIndex;\r\n }\r\n }\r\n\r\n if (numbersSeen !== 4) {\r\n return failure;\r\n }\r\n\r\n break;\r\n } else if (input[pointer] === 58) {\r\n ++pointer;\r\n if (input[pointer] === undefined) {\r\n return failure;\r\n }\r\n } else if (input[pointer] !== undefined) {\r\n return failure;\r\n }\r\n\r\n address[pieceIndex] = value;\r\n ++pieceIndex;\r\n }\r\n\r\n if (compress !== null) {\r\n let swaps = pieceIndex - compress;\r\n pieceIndex = 7;\r\n while (pieceIndex !== 0 && swaps > 0) {\r\n const temp = address[compress + swaps - 1];\r\n address[compress + swaps - 1] = address[pieceIndex];\r\n address[pieceIndex] = temp;\r\n --pieceIndex;\r\n --swaps;\r\n }\r\n } else if (compress === null && pieceIndex !== 8) {\r\n return failure;\r\n }\r\n\r\n return address;\r\n}\r\n\r\nfunction serializeIPv6(address) {\r\n let output = \"\";\r\n const seqResult = findLongestZeroSequence(address);\r\n const compress = seqResult.idx;\r\n let ignore0 = false;\r\n\r\n for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) {\r\n if (ignore0 && address[pieceIndex] === 0) {\r\n continue;\r\n } else if (ignore0) {\r\n ignore0 = false;\r\n }\r\n\r\n if (compress === pieceIndex) {\r\n const separator = pieceIndex === 0 ? \"::\" : \":\";\r\n output += separator;\r\n ignore0 = true;\r\n continue;\r\n }\r\n\r\n output += address[pieceIndex].toString(16);\r\n\r\n if (pieceIndex !== 7) {\r\n output += \":\";\r\n }\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseHost(input, isSpecialArg) {\r\n if (input[0] === \"[\") {\r\n if (input[input.length - 1] !== \"]\") {\r\n return failure;\r\n }\r\n\r\n return parseIPv6(input.substring(1, input.length - 1));\r\n }\r\n\r\n if (!isSpecialArg) {\r\n return parseOpaqueHost(input);\r\n }\r\n\r\n const domain = utf8PercentDecode(input);\r\n const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false);\r\n if (asciiDomain === null) {\r\n return failure;\r\n }\r\n\r\n if (containsForbiddenHostCodePoint(asciiDomain)) {\r\n return failure;\r\n }\r\n\r\n const ipv4Host = parseIPv4(asciiDomain);\r\n if (typeof ipv4Host === \"number\" || ipv4Host === failure) {\r\n return ipv4Host;\r\n }\r\n\r\n return asciiDomain;\r\n}\r\n\r\nfunction parseOpaqueHost(input) {\r\n if (containsForbiddenHostCodePointExcludingPercent(input)) {\r\n return failure;\r\n }\r\n\r\n let output = \"\";\r\n const decoded = punycode.ucs2.decode(input);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n output += percentEncodeChar(decoded[i], isC0ControlPercentEncode);\r\n }\r\n return output;\r\n}\r\n\r\nfunction findLongestZeroSequence(arr) {\r\n let maxIdx = null;\r\n let maxLen = 1; // only find elements > 1\r\n let currStart = null;\r\n let currLen = 0;\r\n\r\n for (let i = 0; i < arr.length; ++i) {\r\n if (arr[i] !== 0) {\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n currStart = null;\r\n currLen = 0;\r\n } else {\r\n if (currStart === null) {\r\n currStart = i;\r\n }\r\n ++currLen;\r\n }\r\n }\r\n\r\n // if trailing zeros\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n return {\r\n idx: maxIdx,\r\n len: maxLen\r\n };\r\n}\r\n\r\nfunction serializeHost(host) {\r\n if (typeof host === \"number\") {\r\n return serializeIPv4(host);\r\n }\r\n\r\n // IPv6 serializer\r\n if (host instanceof Array) {\r\n return \"[\" + serializeIPv6(host) + \"]\";\r\n }\r\n\r\n return host;\r\n}\r\n\r\nfunction trimControlChars(url) {\r\n return url.replace(/^[\\u0000-\\u001F\\u0020]+|[\\u0000-\\u001F\\u0020]+$/g, \"\");\r\n}\r\n\r\nfunction trimTabAndNewline(url) {\r\n return url.replace(/\\u0009|\\u000A|\\u000D/g, \"\");\r\n}\r\n\r\nfunction shortenPath(url) {\r\n const path = url.path;\r\n if (path.length === 0) {\r\n return;\r\n }\r\n if (url.scheme === \"file\" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) {\r\n return;\r\n }\r\n\r\n path.pop();\r\n}\r\n\r\nfunction includesCredentials(url) {\r\n return url.username !== \"\" || url.password !== \"\";\r\n}\r\n\r\nfunction cannotHaveAUsernamePasswordPort(url) {\r\n return url.host === null || url.host === \"\" || url.cannotBeABaseURL || url.scheme === \"file\";\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetter(string) {\r\n return /^[A-Za-z]:$/.test(string);\r\n}\r\n\r\nfunction URLStateMachine(input, base, encodingOverride, url, stateOverride) {\r\n this.pointer = 0;\r\n this.input = input;\r\n this.base = base || null;\r\n this.encodingOverride = encodingOverride || \"utf-8\";\r\n this.stateOverride = stateOverride;\r\n this.url = url;\r\n this.failure = false;\r\n this.parseError = false;\r\n\r\n if (!this.url) {\r\n this.url = {\r\n scheme: \"\",\r\n username: \"\",\r\n password: \"\",\r\n host: null,\r\n port: null,\r\n path: [],\r\n query: null,\r\n fragment: null,\r\n\r\n cannotBeABaseURL: false\r\n };\r\n\r\n const res = trimControlChars(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n }\r\n\r\n const res = trimTabAndNewline(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n\r\n this.state = stateOverride || \"scheme start\";\r\n\r\n this.buffer = \"\";\r\n this.atFlag = false;\r\n this.arrFlag = false;\r\n this.passwordTokenSeenFlag = false;\r\n\r\n this.input = punycode.ucs2.decode(this.input);\r\n\r\n for (; this.pointer <= this.input.length; ++this.pointer) {\r\n const c = this.input[this.pointer];\r\n const cStr = isNaN(c) ? undefined : String.fromCodePoint(c);\r\n\r\n // exec state machine\r\n const ret = this[\"parse \" + this.state](c, cStr);\r\n if (!ret) {\r\n break; // terminate algorithm\r\n } else if (ret === failure) {\r\n this.failure = true;\r\n break;\r\n }\r\n }\r\n}\r\n\r\nURLStateMachine.prototype[\"parse scheme start\"] = function parseSchemeStart(c, cStr) {\r\n if (isASCIIAlpha(c)) {\r\n this.buffer += cStr.toLowerCase();\r\n this.state = \"scheme\";\r\n } else if (!this.stateOverride) {\r\n this.state = \"no scheme\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse scheme\"] = function parseScheme(c, cStr) {\r\n if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) {\r\n this.buffer += cStr.toLowerCase();\r\n } else if (c === 58) {\r\n if (this.stateOverride) {\r\n if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === \"file\") {\r\n return false;\r\n }\r\n\r\n if (this.url.scheme === \"file\" && (this.url.host === \"\" || this.url.host === null)) {\r\n return false;\r\n }\r\n }\r\n this.url.scheme = this.buffer;\r\n this.buffer = \"\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n if (this.url.scheme === \"file\") {\r\n if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file\";\r\n } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) {\r\n this.state = \"special relative or authority\";\r\n } else if (isSpecial(this.url)) {\r\n this.state = \"special authority slashes\";\r\n } else if (this.input[this.pointer + 1] === 47) {\r\n this.state = \"path or authority\";\r\n ++this.pointer;\r\n } else {\r\n this.url.cannotBeABaseURL = true;\r\n this.url.path.push(\"\");\r\n this.state = \"cannot-be-a-base-URL path\";\r\n }\r\n } else if (!this.stateOverride) {\r\n this.buffer = \"\";\r\n this.state = \"no scheme\";\r\n this.pointer = -1;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse no scheme\"] = function parseNoScheme(c) {\r\n if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) {\r\n return failure;\r\n } else if (this.base.cannotBeABaseURL && c === 35) {\r\n this.url.scheme = this.base.scheme;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.url.cannotBeABaseURL = true;\r\n this.state = \"fragment\";\r\n } else if (this.base.scheme === \"file\") {\r\n this.state = \"file\";\r\n --this.pointer;\r\n } else {\r\n this.state = \"relative\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special relative or authority\"] = function parseSpecialRelativeOrAuthority(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = \"special authority ignore slashes\";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = \"relative\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path or authority\"] = function parsePathOrAuthority(c) {\r\n if (c === 47) {\r\n this.state = \"authority\";\r\n } else {\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse relative\"] = function parseRelative(c) {\r\n this.url.scheme = this.base.scheme;\r\n if (isNaN(c)) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 47) {\r\n this.state = \"relative slash\";\r\n } else if (c === 63) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n this.state = \"relative slash\";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice(0, this.base.path.length - 1);\r\n\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse relative slash\"] = function parseRelativeSlash(c) {\r\n if (isSpecial(this.url) && (c === 47 || c === 92)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"special authority ignore slashes\";\r\n } else if (c === 47) {\r\n this.state = \"authority\";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special authority slashes\"] = function parseSpecialAuthoritySlashes(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = \"special authority ignore slashes\";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = \"special authority ignore slashes\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special authority ignore slashes\"] = function parseSpecialAuthorityIgnoreSlashes(c) {\r\n if (c !== 47 && c !== 92) {\r\n this.state = \"authority\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse authority\"] = function parseAuthority(c, cStr) {\r\n if (c === 64) {\r\n this.parseError = true;\r\n if (this.atFlag) {\r\n this.buffer = \"%40\" + this.buffer;\r\n }\r\n this.atFlag = true;\r\n\r\n // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars\r\n const len = countSymbols(this.buffer);\r\n for (let pointer = 0; pointer < len; ++pointer) {\r\n const codePoint = this.buffer.codePointAt(pointer);\r\n\r\n if (codePoint === 58 && !this.passwordTokenSeenFlag) {\r\n this.passwordTokenSeenFlag = true;\r\n continue;\r\n }\r\n const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode);\r\n if (this.passwordTokenSeenFlag) {\r\n this.url.password += encodedCodePoints;\r\n } else {\r\n this.url.username += encodedCodePoints;\r\n }\r\n }\r\n this.buffer = \"\";\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n if (this.atFlag && this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.pointer -= countSymbols(this.buffer) + 1;\r\n this.buffer = \"\";\r\n this.state = \"host\";\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse hostname\"] =\r\nURLStateMachine.prototype[\"parse host\"] = function parseHostName(c, cStr) {\r\n if (this.stateOverride && this.url.scheme === \"file\") {\r\n --this.pointer;\r\n this.state = \"file host\";\r\n } else if (c === 58 && !this.arrFlag) {\r\n if (this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = \"\";\r\n this.state = \"port\";\r\n if (this.stateOverride === \"hostname\") {\r\n return false;\r\n }\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n --this.pointer;\r\n if (isSpecial(this.url) && this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n } else if (this.stateOverride && this.buffer === \"\" &&\r\n (includesCredentials(this.url) || this.url.port !== null)) {\r\n this.parseError = true;\r\n return false;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = \"\";\r\n this.state = \"path start\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n } else {\r\n if (c === 91) {\r\n this.arrFlag = true;\r\n } else if (c === 93) {\r\n this.arrFlag = false;\r\n }\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse port\"] = function parsePort(c, cStr) {\r\n if (isASCIIDigit(c)) {\r\n this.buffer += cStr;\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92) ||\r\n this.stateOverride) {\r\n if (this.buffer !== \"\") {\r\n const port = parseInt(this.buffer);\r\n if (port > Math.pow(2, 16) - 1) {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.url.port = port === defaultPort(this.url.scheme) ? null : port;\r\n this.buffer = \"\";\r\n }\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = \"path start\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nconst fileOtherwiseCodePoints = new Set([47, 92, 63, 35]);\r\n\r\nURLStateMachine.prototype[\"parse file\"] = function parseFile(c) {\r\n this.url.scheme = \"file\";\r\n\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file slash\";\r\n } else if (this.base !== null && this.base.scheme === \"file\") {\r\n if (isNaN(c)) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 63) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else {\r\n if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points\r\n !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) ||\r\n (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points\r\n !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n shortenPath(this.url);\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n } else {\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse file slash\"] = function parseFileSlash(c) {\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file host\";\r\n } else {\r\n if (this.base !== null && this.base.scheme === \"file\") {\r\n if (isNormalizedWindowsDriveLetterString(this.base.path[0])) {\r\n this.url.path.push(this.base.path[0]);\r\n } else {\r\n this.url.host = this.base.host;\r\n }\r\n }\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse file host\"] = function parseFileHost(c, cStr) {\r\n if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) {\r\n --this.pointer;\r\n if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) {\r\n this.parseError = true;\r\n this.state = \"path\";\r\n } else if (this.buffer === \"\") {\r\n this.url.host = \"\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = \"path start\";\r\n } else {\r\n let host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n if (host === \"localhost\") {\r\n host = \"\";\r\n }\r\n this.url.host = host;\r\n\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n\r\n this.buffer = \"\";\r\n this.state = \"path start\";\r\n }\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path start\"] = function parsePathStart(c) {\r\n if (isSpecial(this.url)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"path\";\r\n\r\n if (c !== 47 && c !== 92) {\r\n --this.pointer;\r\n }\r\n } else if (!this.stateOverride && c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (!this.stateOverride && c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else if (c !== undefined) {\r\n this.state = \"path\";\r\n if (c !== 47) {\r\n --this.pointer;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path\"] = function parsePath(c) {\r\n if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) ||\r\n (!this.stateOverride && (c === 63 || c === 35))) {\r\n if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n }\r\n\r\n if (isDoubleDot(this.buffer)) {\r\n shortenPath(this.url);\r\n if (c !== 47 && !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push(\"\");\r\n }\r\n } else if (isSingleDot(this.buffer) && c !== 47 &&\r\n !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push(\"\");\r\n } else if (!isSingleDot(this.buffer)) {\r\n if (this.url.scheme === \"file\" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) {\r\n if (this.url.host !== \"\" && this.url.host !== null) {\r\n this.parseError = true;\r\n this.url.host = \"\";\r\n }\r\n this.buffer = this.buffer[0] + \":\";\r\n }\r\n this.url.path.push(this.buffer);\r\n }\r\n this.buffer = \"\";\r\n if (this.url.scheme === \"file\" && (c === undefined || c === 63 || c === 35)) {\r\n while (this.url.path.length > 1 && this.url.path[0] === \"\") {\r\n this.parseError = true;\r\n this.url.path.shift();\r\n }\r\n }\r\n if (c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n }\r\n if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += percentEncodeChar(c, isPathPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse cannot-be-a-base-URL path\"] = function parseCannotBeABaseURLPath(c) {\r\n if (c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else {\r\n // TODO: Add: not a URL code point\r\n if (!isNaN(c) && c !== 37) {\r\n this.parseError = true;\r\n }\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n if (!isNaN(c)) {\r\n this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse query\"] = function parseQuery(c, cStr) {\r\n if (isNaN(c) || (!this.stateOverride && c === 35)) {\r\n if (!isSpecial(this.url) || this.url.scheme === \"ws\" || this.url.scheme === \"wss\") {\r\n this.encodingOverride = \"utf-8\";\r\n }\r\n\r\n const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead\r\n for (let i = 0; i < buffer.length; ++i) {\r\n if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 ||\r\n buffer[i] === 0x3C || buffer[i] === 0x3E) {\r\n this.url.query += percentEncode(buffer[i]);\r\n } else {\r\n this.url.query += String.fromCodePoint(buffer[i]);\r\n }\r\n }\r\n\r\n this.buffer = \"\";\r\n if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse fragment\"] = function parseFragment(c) {\r\n if (isNaN(c)) { // do nothing\r\n } else if (c === 0x0) {\r\n this.parseError = true;\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nfunction serializeURL(url, excludeFragment) {\r\n let output = url.scheme + \":\";\r\n if (url.host !== null) {\r\n output += \"//\";\r\n\r\n if (url.username !== \"\" || url.password !== \"\") {\r\n output += url.username;\r\n if (url.password !== \"\") {\r\n output += \":\" + url.password;\r\n }\r\n output += \"@\";\r\n }\r\n\r\n output += serializeHost(url.host);\r\n\r\n if (url.port !== null) {\r\n output += \":\" + url.port;\r\n }\r\n } else if (url.host === null && url.scheme === \"file\") {\r\n output += \"//\";\r\n }\r\n\r\n if (url.cannotBeABaseURL) {\r\n output += url.path[0];\r\n } else {\r\n for (const string of url.path) {\r\n output += \"/\" + string;\r\n }\r\n }\r\n\r\n if (url.query !== null) {\r\n output += \"?\" + url.query;\r\n }\r\n\r\n if (!excludeFragment && url.fragment !== null) {\r\n output += \"#\" + url.fragment;\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction serializeOrigin(tuple) {\r\n let result = tuple.scheme + \"://\";\r\n result += serializeHost(tuple.host);\r\n\r\n if (tuple.port !== null) {\r\n result += \":\" + tuple.port;\r\n }\r\n\r\n return result;\r\n}\r\n\r\nmodule.exports.serializeURL = serializeURL;\r\n\r\nmodule.exports.serializeURLOrigin = function (url) {\r\n // https://url.spec.whatwg.org/#concept-url-origin\r\n switch (url.scheme) {\r\n case \"blob\":\r\n try {\r\n return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0]));\r\n } catch (e) {\r\n // serializing an opaque origin returns \"null\"\r\n return \"null\";\r\n }\r\n case \"ftp\":\r\n case \"gopher\":\r\n case \"http\":\r\n case \"https\":\r\n case \"ws\":\r\n case \"wss\":\r\n return serializeOrigin({\r\n scheme: url.scheme,\r\n host: url.host,\r\n port: url.port\r\n });\r\n case \"file\":\r\n // spec says \"exercise to the reader\", chrome says \"file://\"\r\n return \"file://\";\r\n default:\r\n // serializing an opaque origin returns \"null\"\r\n return \"null\";\r\n }\r\n};\r\n\r\nmodule.exports.basicURLParse = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride);\r\n if (usm.failure) {\r\n return \"failure\";\r\n }\r\n\r\n return usm.url;\r\n};\r\n\r\nmodule.exports.setTheUsername = function (url, username) {\r\n url.username = \"\";\r\n const decoded = punycode.ucs2.decode(username);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.setThePassword = function (url, password) {\r\n url.password = \"\";\r\n const decoded = punycode.ucs2.decode(password);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.serializeHost = serializeHost;\r\n\r\nmodule.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;\r\n\r\nmodule.exports.serializeInteger = function (integer) {\r\n return String(integer);\r\n};\r\n\r\nmodule.exports.parseURL = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n // We don't handle blobs, so this just delegates:\r\n return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });\r\n};\r\n","\"use strict\";\n\nmodule.exports.mixin = function mixin(target, source) {\n const keys = Object.getOwnPropertyNames(source);\n for (let i = 0; i < keys.length; ++i) {\n Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));\n }\n};\n\nmodule.exports.wrapperSymbol = Symbol(\"wrapper\");\nmodule.exports.implSymbol = Symbol(\"impl\");\n\nmodule.exports.wrapperForImpl = function (impl) {\n return impl[module.exports.wrapperSymbol];\n};\n\nmodule.exports.implForWrapper = function (wrapper) {\n return wrapper[module.exports.implSymbol];\n};\n\n","var wrappy = require('wrappy')\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n","'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n","module.exports = require('./lib/tunnel');\n","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction getUserAgent() {\n if (typeof navigator === \"object\" && \"userAgent\" in navigator) {\n return navigator.userAgent;\n }\n\n if (typeof process === \"object\" && \"version\" in process) {\n return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;\n }\n\n return \"\";\n}\n\nexports.getUserAgent = getUserAgent;\n//# sourceMappingURL=index.js.map\n","// Returns a wrapper function that returns a wrapped callback\n// The wrapper function should do some stuff, and return a\n// presumably different callback function.\n// This makes sure that own properties are retained, so that\n// decorations and such are not lost along the way.\nmodule.exports = wrappy\nfunction wrappy (fn, cb) {\n if (fn && cb) return wrappy(fn)(cb)\n\n if (typeof fn !== 'function')\n throw new TypeError('need wrapper function')\n\n Object.keys(fn).forEach(function (k) {\n wrapper[k] = fn[k]\n })\n\n return wrapper\n\n function wrapper() {\n var args = new Array(arguments.length)\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i]\n }\n var ret = fn.apply(this, args)\n var cb = args[args.length-1]\n if (typeof ret === 'function' && ret !== cb) {\n Object.keys(cb).forEach(function (k) {\n ret[k] = cb[k]\n })\n }\n return ret\n }\n}\n",null,"module.exports = require(\"assert\");","module.exports = require(\"events\");","module.exports = require(\"fs\");","module.exports = require(\"http\");","module.exports = require(\"https\");","module.exports = require(\"net\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"punycode\");","module.exports = require(\"stream\");","module.exports = require(\"tls\");","module.exports = require(\"tty\");","module.exports = require(\"url\");","module.exports = require(\"util\");","module.exports = require(\"zlib\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(3109);\n",""],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;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;;;;;;;;;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;;;;;;;;;ACrDA;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;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;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;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;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;;;;;;;;;AC9CA;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;;;;;;;;;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;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;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;;;;;;;;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;;;;;;;;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;;;;;;;;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;;;;;;;;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;;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;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;;;;;;;;;AC/KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;;;;;;;;AC1CA;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;AACA;AACA;AACA;AACA;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;;;;;;;;ACxCA;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;;;;;;;;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;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjjBA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3rMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;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;;;;;;;;ACxCA;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;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;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9iCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACv3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7gBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;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;;;;;;;;;AC1UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;ACvDA;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;;;;;;;;;ACxDA;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;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;ACrDA;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;;;;;;;;;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;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;ACxBA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;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;;;;;;;;;ACrEA;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;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;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;;;;;;;;;ACnEA;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;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;;;;;;;;;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;;;;;;;;AC7CA;AACA;AACA;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;;;;;;;;;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;;;;;;;AC1BA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjRA;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;AACA;AACA;AACA;AACA;;;;;;;;;ACtQA;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;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxjBA;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;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChqDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChxCA;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;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;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;;;;;;;;;ACvQA;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;;;;;;;;AChCA;;;;;;;;;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;;;AC7BA;AACA;;;;AEDA;AACA;AACA;AACA","sources":["../webpack://@kunalnagarco/action-cve/./lib/constants.js","../webpack://@kunalnagarco/action-cve/./lib/destinations/index.js","../webpack://@kunalnagarco/action-cve/./lib/destinations/microsoft-teams.js","../webpack://@kunalnagarco/action-cve/./lib/destinations/pager-duty.js","../webpack://@kunalnagarco/action-cve/./lib/destinations/slack.js","../webpack://@kunalnagarco/action-cve/./lib/destinations/zenduty.js","../webpack://@kunalnagarco/action-cve/./lib/entities/advisory.js","../webpack://@kunalnagarco/action-cve/./lib/entities/alert.js","../webpack://@kunalnagarco/action-cve/./lib/entities/index.js","../webpack://@kunalnagarco/action-cve/./lib/entities/repository.js","../webpack://@kunalnagarco/action-cve/./lib/entities/vulnerability.js","../webpack://@kunalnagarco/action-cve/./lib/fetch-alerts.js","../webpack://@kunalnagarco/action-cve/./lib/main.js","../webpack://@kunalnagarco/action-cve/./lib/utils/adaptive-card/index.js","../webpack://@kunalnagarco/action-cve/./lib/utils/index.js","../webpack://@kunalnagarco/action-cve/./lib/utils/request/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/core/lib/command.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/core/lib/core.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/core/lib/file-command.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/core/lib/oidc-utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/core/lib/utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/github/lib/context.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/github/lib/github.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/github/lib/internal/utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/github/lib/utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/http-client/auth.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/http-client/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@actions/http-client/proxy.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/auth-token/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/core/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/endpoint/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/graphql/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/plugin-paginate-rest/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/request-error/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@octokit/request/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@pagerduty/pdjs/build/src/api.js","../webpack://@kunalnagarco/action-cve/./node_modules/@pagerduty/pdjs/build/src/common.js","../webpack://@kunalnagarco/action-cve/./node_modules/@pagerduty/pdjs/build/src/events.js","../webpack://@kunalnagarco/action-cve/./node_modules/@pagerduty/pdjs/build/src/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@slack/webhook/dist/IncomingWebhook.js","../webpack://@kunalnagarco/action-cve/./node_modules/@slack/webhook/dist/errors.js","../webpack://@kunalnagarco/action-cve/./node_modules/@slack/webhook/dist/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/@slack/webhook/dist/instrument.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/activity-request.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/adaptive-applet.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/adaptivecards.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/card-elements.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/card-object.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/channel-adapter.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/controls/collection.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/controls/constants.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/controls/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/controls/menu-item.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/controls/popup-control.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/controls/popup-menu.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/enums.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/host-capabilities.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/host-config.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/registry.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/serialization.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/shared.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/strings.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/table.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/text-formatters.js","../webpack://@kunalnagarco/action-cve/./node_modules/adaptivecards/lib/utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/adapters/http.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/adapters/xhr.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/axios.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/cancel/Cancel.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/cancel/CancelToken.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/cancel/isCancel.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/Axios.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/InterceptorManager.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/buildFullPath.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/createError.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/dispatchRequest.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/enhanceError.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/mergeConfig.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/settle.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/core/transformData.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/defaults.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/bind.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/buildURL.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/combineURLs.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/cookies.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/isAbsoluteURL.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/isAxiosError.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/isURLSameOrigin.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/normalizeHeaderName.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/parseHeaders.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/spread.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/helpers/validator.js","../webpack://@kunalnagarco/action-cve/./node_modules/axios/lib/utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/before-after-hook/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/before-after-hook/lib/add.js","../webpack://@kunalnagarco/action-cve/./node_modules/before-after-hook/lib/register.js","../webpack://@kunalnagarco/action-cve/./node_modules/before-after-hook/lib/remove.js","../webpack://@kunalnagarco/action-cve/./node_modules/browser-or-node/lib/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/cross-fetch/dist/node-ponyfill.js","../webpack://@kunalnagarco/action-cve/./node_modules/debug/src/browser.js","../webpack://@kunalnagarco/action-cve/./node_modules/debug/src/common.js","../webpack://@kunalnagarco/action-cve/./node_modules/debug/src/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/debug/src/node.js","../webpack://@kunalnagarco/action-cve/./node_modules/deprecation/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/follow-redirects/debug.js","../webpack://@kunalnagarco/action-cve/./node_modules/follow-redirects/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/has-flag/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/is-plain-object/dist/is-plain-object.js","../webpack://@kunalnagarco/action-cve/./node_modules/ms/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/lib/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/tr46/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/webidl-conversions/lib/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/whatwg-url/lib/URL-impl.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/whatwg-url/lib/URL.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/whatwg-url/lib/public-api.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js","../webpack://@kunalnagarco/action-cve/./node_modules/node-fetch/node_modules/whatwg-url/lib/utils.js","../webpack://@kunalnagarco/action-cve/./node_modules/once/once.js","../webpack://@kunalnagarco/action-cve/./node_modules/supports-color/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/tunnel/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/tunnel/lib/tunnel.js","../webpack://@kunalnagarco/action-cve/./node_modules/universal-user-agent/dist-node/index.js","../webpack://@kunalnagarco/action-cve/./node_modules/wrappy/wrappy.js","../webpack://@kunalnagarco/action-cve/./node_modules/@vercel/ncc/dist/ncc/@@notfound.js","../webpack://@kunalnagarco/action-cve/external node-commonjs \"assert\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"events\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"fs\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"http\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"https\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"net\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"os\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"path\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"punycode\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"stream\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"tls\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"tty\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"url\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"util\"","../webpack://@kunalnagarco/action-cve/external node-commonjs \"zlib\"","../webpack://@kunalnagarco/action-cve/webpack/bootstrap","../webpack://@kunalnagarco/action-cve/webpack/runtime/compat","../webpack://@kunalnagarco/action-cve/webpack/before-startup","../webpack://@kunalnagarco/action-cve/webpack/startup","../webpack://@kunalnagarco/action-cve/webpack/after-startup"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ACTION_URL = exports.ACTION_SHORT_SUMMARY = exports.ACTION_ICON = void 0;\nexports.ACTION_ICON = 'https://github.com/kunalnagarco/action-cve/raw/main/icons/ladybug.png';\nexports.ACTION_SHORT_SUMMARY = 'GitHub Action - @kunalnagarco/action-cve';\nexports.ACTION_URL = 'https://github.com/kunalnagarco/action-cve';\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./slack\"), exports);\n__exportStar(require(\"./pager-duty\"), exports);\n__exportStar(require(\"./zenduty\"), exports);\n__exportStar(require(\"./microsoft-teams\"), exports);\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToMicrosoftTeams = void 0;\n/* eslint-disable i18n-text/no-en */\nconst utils_1 = require(\"../utils\");\nconst constants_1 = require(\"../constants\");\nconst createTableRow = (key, value) => {\n const row = (0, utils_1.createRow)();\n const keyColumn = (0, utils_1.createColumn)();\n keyColumn.addItem((0, utils_1.createTextBlock)(key, true));\n row.addColumn(keyColumn);\n const valueColumn = (0, utils_1.createColumn)();\n valueColumn.addItem((0, utils_1.createTextBlock)(value));\n row.addColumn(valueColumn);\n return row;\n};\nconst createTableButtonRow = (url) => {\n const row = (0, utils_1.createRow)();\n const keyColumn = (0, utils_1.createColumn)();\n keyColumn.addItem((0, utils_1.createTextBlock)('Advisory URL', true));\n row.addColumn(keyColumn);\n const urlColumn = (0, utils_1.createColumn)();\n urlColumn.addItem((0, utils_1.createLinkButton)('View Advisory', url));\n row.addColumn(urlColumn);\n return row;\n};\nconst sendAlertsToMicrosoftTeams = (webhookUrl, alerts) => __awaiter(void 0, void 0, void 0, function* () {\n var _a, _b, _c, _d, _e;\n const alertCount = alerts.length;\n const repositoryOwner = alerts[0].repository.owner;\n const repositoryName = alerts[0].repository.name;\n const adaptiveCard = (0, utils_1.createAdaptiveCard)();\n adaptiveCard.addItem((0, utils_1.createTextBlock)(constants_1.ACTION_SHORT_SUMMARY));\n adaptiveCard.addItem((0, utils_1.createTextBlock)(`You have ${alertCount} vulnerabilities in ${repositoryOwner}/${repositoryName}`));\n for (const alert of alerts) {\n const container = (0, utils_1.createContainer)(true, true);\n container.addItem(createTableRow('Package Name', alert.packageName));\n container.addItem(createTableRow('Vulnerability Version Range', ((_a = alert.vulnerability) === null || _a === void 0 ? void 0 : _a.vulnerableVersionRange) || ''));\n container.addItem(createTableRow('Patched Version', ((_b = alert.vulnerability) === null || _b === void 0 ? void 0 : _b.firstPatchedVersion) || ''));\n container.addItem(createTableRow('Severity', ((_c = alert.advisory) === null || _c === void 0 ? void 0 : _c.severity) || ''));\n container.addItem(createTableRow('Summary', ((_d = alert.advisory) === null || _d === void 0 ? void 0 : _d.summary) || ''));\n container.addItem(createTableButtonRow(((_e = alert.advisory) === null || _e === void 0 ? void 0 : _e.url) || ''));\n adaptiveCard.addItem(container);\n }\n const body = {\n type: 'message',\n attachments: [\n {\n contentType: 'application/vnd.microsoft.card.adaptive',\n contentUrl: null,\n content: adaptiveCard.toJSON(),\n },\n ],\n };\n yield (0, utils_1.request)(webhookUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n });\n});\nexports.sendAlertsToMicrosoftTeams = sendAlertsToMicrosoftTeams;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToPagerDuty = void 0;\nconst constants_1 = require(\"../constants\");\nconst pdjs_1 = require(\"@pagerduty/pdjs\");\nconst sendAlertsToPagerDuty = (integrationKey, alerts) => __awaiter(void 0, void 0, void 0, function* () {\n yield (0, pdjs_1.event)({\n data: {\n routing_key: integrationKey,\n event_action: 'trigger',\n payload: {\n summary: `You have ${alerts.length} vulnerabilities in ${alerts[0].repository.owner}/${alerts[0].repository.name}`,\n source: 'GitHub Dependabot Alerts',\n severity: 'info',\n custom_details: Object.assign({}, alerts),\n },\n images: [\n {\n src: constants_1.ACTION_ICON,\n alt: constants_1.ACTION_SHORT_SUMMARY,\n href: constants_1.ACTION_URL,\n },\n ],\n },\n });\n});\nexports.sendAlertsToPagerDuty = sendAlertsToPagerDuty;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToSlack = exports.validateSlackWebhookUrl = void 0;\nconst constants_1 = require(\"../constants\");\nconst webhook_1 = require(\"@slack/webhook\");\nconst createSummaryBlock = (alertCount, repositoryName, repositoryOwner) => {\n return {\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `You have ${alertCount} vulnerabilities in *${repositoryOwner}/${repositoryName}*`,\n },\n };\n};\nconst createDividerBlock = () => {\n return {\n type: 'divider',\n };\n};\nconst createAlertBlock = (alert) => {\n var _a, _b, _c, _d, _e;\n return {\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `\n*Package name:* ${alert.packageName}\n*Vulnerability Version Range:* ${(_a = alert.vulnerability) === null || _a === void 0 ? void 0 : _a.vulnerableVersionRange}\n*Patched Version:* ${(_b = alert.vulnerability) === null || _b === void 0 ? void 0 : _b.firstPatchedVersion}\n*Severity:* ${(_c = alert.advisory) === null || _c === void 0 ? void 0 : _c.severity}\n*Summary:* ${(_d = alert.advisory) === null || _d === void 0 ? void 0 : _d.summary}\n `,\n },\n accessory: {\n type: 'button',\n text: {\n type: 'plain_text',\n text: 'View Advisory',\n emoji: true,\n },\n style: 'danger',\n url: (_e = alert.advisory) === null || _e === void 0 ? void 0 : _e.url,\n },\n };\n};\nconst validateSlackWebhookUrl = (url) => {\n const regexPattern = new RegExp(/^https:\\/\\/hooks\\.slack\\.com\\/services\\/T[a-zA-Z0-9_]{8,10}\\/B[a-zA-Z0-9_]{10}\\/[a-zA-Z0-9_]{24}/);\n return regexPattern.test(url);\n};\nexports.validateSlackWebhookUrl = validateSlackWebhookUrl;\nconst sendAlertsToSlack = (webhookUrl, alerts) => __awaiter(void 0, void 0, void 0, function* () {\n const webhook = new webhook_1.IncomingWebhook(webhookUrl);\n const alertBlocks = [];\n for (const alert of alerts) {\n alertBlocks.push(createAlertBlock(alert));\n }\n yield webhook.send({\n blocks: [\n createSummaryBlock(alerts.length, alerts[0].repository.name, alerts[0].repository.owner),\n createDividerBlock(),\n ...alertBlocks,\n ],\n icon_url: constants_1.ACTION_ICON,\n username: constants_1.ACTION_SHORT_SUMMARY,\n });\n});\nexports.sendAlertsToSlack = sendAlertsToSlack;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToZenduty = void 0;\nconst constants_1 = require(\"../constants\");\nconst utils_1 = require(\"../utils\");\nconst sendAlertsToZenduty = (apiKey, serviceId, escalationPolicyId, alerts) => __awaiter(void 0, void 0, void 0, function* () {\n var _a, _b, _c, _d;\n let summary = `\n You have ${alerts.length} vulnerabilities in ${alerts[0].repository.owner}/${alerts[0].repository.name}\n\n ---\n\n `;\n for (const alert of alerts) {\n summary += `\n Package name: ${alert.packageName}\n Vulnerability Version Range: ${(_a = alert.vulnerability) === null || _a === void 0 ? void 0 : _a.vulnerableVersionRange}\n Patched Version: ${(_b = alert.vulnerability) === null || _b === void 0 ? void 0 : _b.firstPatchedVersion}\n Severity: ${(_c = alert.advisory) === null || _c === void 0 ? void 0 : _c.severity}\n Summary: ${(_d = alert.advisory) === null || _d === void 0 ? void 0 : _d.summary}\n `;\n }\n summary += `\n\n ---\n `;\n const payload = {\n service: serviceId,\n escalation_policy: escalationPolicyId,\n title: `${constants_1.ACTION_SHORT_SUMMARY} - ${alerts[0].repository.name}`,\n urgency: 0,\n summary,\n };\n // eslint-disable-next-line i18n-text/no-en\n const bearer = `Token ${apiKey}`;\n yield (0, utils_1.request)('https://www.zenduty.com/api/incidents/', {\n method: 'POST',\n headers: {\n Authorization: bearer,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n});\nexports.sendAlertsToZenduty = sendAlertsToZenduty;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toAdvisory = void 0;\nconst toAdvisory = (securityAdvisory) => ({\n cvssScore: securityAdvisory.cvss.score,\n severity: securityAdvisory.severity,\n summary: securityAdvisory.summary,\n description: securityAdvisory.description,\n url: securityAdvisory.permalink,\n publishedAt: securityAdvisory.publishedAt,\n updatedAt: securityAdvisory.updatedAt,\n withdrawnAt: securityAdvisory.withdrawnAt,\n});\nexports.toAdvisory = toAdvisory;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toAlert = void 0;\nconst advisory_1 = require(\"./advisory\");\nconst repository_1 = require(\"./repository\");\nconst vulnerability_1 = require(\"./vulnerability\");\nconst toAlert = (repositoryVulnerabilityAlert) => {\n var _a;\n return ({\n repository: (0, repository_1.toRepository)(repositoryVulnerabilityAlert.repository),\n packageName: ((_a = repositoryVulnerabilityAlert.securityVulnerability) === null || _a === void 0 ? void 0 : _a.package.name) || '',\n advisory: repositoryVulnerabilityAlert.securityAdvisory\n ? (0, advisory_1.toAdvisory)(repositoryVulnerabilityAlert.securityAdvisory)\n : undefined,\n vulnerability: repositoryVulnerabilityAlert.securityVulnerability\n ? (0, vulnerability_1.toVulnerability)(repositoryVulnerabilityAlert.securityVulnerability)\n : undefined,\n manifest: repositoryVulnerabilityAlert.vulnerableManifestFilename,\n createdAt: repositoryVulnerabilityAlert.createdAt,\n });\n};\nexports.toAlert = toAlert;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./repository\"), exports);\n__exportStar(require(\"./advisory\"), exports);\n__exportStar(require(\"./alert\"), exports);\n__exportStar(require(\"./vulnerability\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toRepository = void 0;\nconst toRepository = (repository) => ({\n name: repository.name,\n owner: repository.owner.login,\n});\nexports.toRepository = toRepository;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toVulnerability = void 0;\nconst toVulnerability = (securityVulnerability) => {\n var _a;\n return ({\n firstPatchedVersion: (_a = securityVulnerability.firstPatchedVersion) === null || _a === void 0 ? void 0 : _a.identifier,\n vulnerableVersionRange: securityVulnerability.vulnerableVersionRange,\n updatedAt: securityVulnerability.updatedAt,\n });\n};\nexports.toVulnerability = toVulnerability;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchAlerts = void 0;\nconst entities_1 = require(\"./entities\");\nconst github_1 = require(\"@actions/github\");\nconst fetchAlerts = (gitHubPersonalAccessToken, repositoryName, repositoryOwner, count) => __awaiter(void 0, void 0, void 0, function* () {\n var _a;\n const octokit = (0, github_1.getOctokit)(gitHubPersonalAccessToken);\n const { repository } = yield octokit.graphql(`\n query {\n repository(owner:\"${repositoryOwner}\" name:\"${repositoryName}\") {\n vulnerabilityAlerts(last: ${count}) {\n edges {\n node {\n id\n repository {\n name\n owner {\n login\n }\n }\n securityAdvisory {\n id\n description\n cvss {\n score\n vectorString\n }\n permalink\n severity\n summary\n }\n securityVulnerability {\n firstPatchedVersion {\n identifier\n }\n package {\n ecosystem\n name\n }\n vulnerableVersionRange\n advisory {\n cvss {\n score\n vectorString\n }\n summary\n }\n }\n }\n }\n }\n }\n }\n `);\n const gitHubAlerts = (_a = repository.vulnerabilityAlerts) === null || _a === void 0 ? void 0 : _a.edges;\n if (gitHubAlerts) {\n const alerts = [];\n for (const gitHubAlert of gitHubAlerts) {\n if (gitHubAlert && gitHubAlert.node) {\n alerts.push((0, entities_1.toAlert)(gitHubAlert.node));\n }\n }\n return alerts;\n }\n return [];\n});\nexports.fetchAlerts = fetchAlerts;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core_1 = require(\"@actions/core\");\nconst destinations_1 = require(\"./destinations\");\nconst github_1 = require(\"@actions/github\");\nconst fetch_alerts_1 = require(\"./fetch-alerts\");\nfunction run() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const token = (0, core_1.getInput)('token');\n const microsoftTeamsWebhookUrl = (0, core_1.getInput)('microsoft_teams_webhook');\n const slackWebhookUrl = (0, core_1.getInput)('slack_webhook');\n const pagerDutyIntegrationKey = (0, core_1.getInput)('pager_duty_integration_key');\n const zenDutyApiKey = (0, core_1.getInput)('zenduty_api_key');\n const zenDutyServiceId = (0, core_1.getInput)('zenduty_service_id');\n const zenDutyEscalationPolicyId = (0, core_1.getInput)('zenduty_escalation_policy_id');\n const count = parseInt((0, core_1.getInput)('count'));\n const owner = github_1.context.repo.owner;\n const repo = github_1.context.repo.repo;\n const alerts = yield (0, fetch_alerts_1.fetchAlerts)(token, repo, owner, count);\n if (alerts.length > 0) {\n if (microsoftTeamsWebhookUrl) {\n yield (0, destinations_1.sendAlertsToMicrosoftTeams)(microsoftTeamsWebhookUrl, alerts);\n }\n if (slackWebhookUrl) {\n if (!(0, destinations_1.validateSlackWebhookUrl)(slackWebhookUrl)) {\n (0, core_1.setFailed)(new Error('Invalid Slack Webhook URL'));\n }\n else {\n yield (0, destinations_1.sendAlertsToSlack)(slackWebhookUrl, alerts);\n }\n }\n if (pagerDutyIntegrationKey) {\n yield (0, destinations_1.sendAlertsToPagerDuty)(pagerDutyIntegrationKey, alerts);\n }\n if (zenDutyApiKey) {\n if (zenDutyServiceId && zenDutyEscalationPolicyId) {\n yield (0, destinations_1.sendAlertsToZenduty)(zenDutyApiKey, zenDutyServiceId, zenDutyEscalationPolicyId, alerts);\n }\n else {\n (0, core_1.setFailed)(new Error('Check your Zenduty Service ID and Escalation Policy ID'));\n }\n }\n }\n }\n catch (err) {\n if (err instanceof Error) {\n (0, core_1.setFailed)(err);\n }\n }\n });\n}\nrun();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createAdaptiveCard = exports.createLinkButton = exports.createColumn = exports.createTextBlock = exports.createRow = exports.createContainer = void 0;\nconst adaptivecards_1 = require(\"adaptivecards\");\nconst createContainer = (isSpacingLarge, isStyleEmphasis) => {\n const container = new adaptivecards_1.Container();\n if (isSpacingLarge) {\n container.spacing = adaptivecards_1.Spacing.Large;\n }\n if (isStyleEmphasis) {\n container.style = 'emphasis';\n }\n return container;\n};\nexports.createContainer = createContainer;\nconst createRow = () => {\n return new adaptivecards_1.ColumnSet();\n};\nexports.createRow = createRow;\nconst createTextBlock = (text, isBold = false, isWrap = true) => {\n const textBlock = new adaptivecards_1.TextBlock(text);\n if (isBold) {\n textBlock.weight = adaptivecards_1.TextWeight.Bolder;\n }\n textBlock.wrap = isWrap;\n return textBlock;\n};\nexports.createTextBlock = createTextBlock;\nconst createColumn = () => {\n return new adaptivecards_1.Column();\n};\nexports.createColumn = createColumn;\nconst createLinkButton = (text, url) => {\n const linkButton = new adaptivecards_1.ActionSet();\n const action = new adaptivecards_1.OpenUrlAction();\n action.title = text;\n action.url = url;\n linkButton.addAction(action);\n return linkButton;\n};\nexports.createLinkButton = createLinkButton;\nconst createAdaptiveCard = () => {\n const adaptiveCard = new adaptivecards_1.AdaptiveCard();\n adaptiveCard.version = new adaptivecards_1.Version(1, 2);\n return adaptiveCard;\n};\nexports.createAdaptiveCard = createAdaptiveCard;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./request\"), exports);\n__exportStar(require(\"./adaptive-card\"), exports);\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.request = void 0;\nconst node_fetch_1 = __importDefault(require(\"node-fetch\"));\nconst request = (url, options) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, node_fetch_1.default)(url, Object.assign({}, options));\n});\nexports.request = request;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n const delimiter = '_GitHubActionsFileCommandDelimeter_';\n const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;\n file_command_1.issueCommand('ENV', commandValue);\n }\n else {\n command_1.issueCommand('set-env', { name }, convertedVal);\n }\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n return inputs;\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, value);\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issueCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\nfunction issueCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueCommand = issueCommand;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.result.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = void 0;\nconst fs_1 = require(\"fs\");\nconst os_1 = require(\"os\");\nclass Context {\n /**\n * Hydrate the context from the environment\n */\n constructor() {\n var _a, _b, _c;\n this.payload = {};\n if (process.env.GITHUB_EVENT_PATH) {\n if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) {\n this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));\n }\n else {\n const path = process.env.GITHUB_EVENT_PATH;\n process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`);\n }\n }\n this.eventName = process.env.GITHUB_EVENT_NAME;\n this.sha = process.env.GITHUB_SHA;\n this.ref = process.env.GITHUB_REF;\n this.workflow = process.env.GITHUB_WORKFLOW;\n this.action = process.env.GITHUB_ACTION;\n this.actor = process.env.GITHUB_ACTOR;\n this.job = process.env.GITHUB_JOB;\n this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);\n this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);\n this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;\n this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;\n this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;\n }\n get issue() {\n const payload = this.payload;\n return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });\n }\n get repo() {\n if (process.env.GITHUB_REPOSITORY) {\n const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');\n return { owner, repo };\n }\n if (this.payload.repository) {\n return {\n owner: this.payload.repository.owner.login,\n repo: this.payload.repository.name\n };\n }\n throw new Error(\"context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'\");\n }\n}\nexports.Context = Context;\n//# sourceMappingURL=context.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokit = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst utils_1 = require(\"./utils\");\nexports.context = new Context.Context();\n/**\n * Returns a hydrated octokit ready to use for GitHub Actions\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokit(token, options) {\n return new utils_1.GitHub(utils_1.getOctokitOptions(token, options));\n}\nexports.getOctokit = getOctokit;\n//# sourceMappingURL=github.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getApiBaseUrl = exports.getProxyAgent = exports.getAuthString = void 0;\nconst httpClient = __importStar(require(\"@actions/http-client\"));\nfunction getAuthString(token, options) {\n if (!token && !options.auth) {\n throw new Error('Parameter token or opts.auth is required');\n }\n else if (token && options.auth) {\n throw new Error('Parameters token and opts.auth may not both be specified');\n }\n return typeof options.auth === 'string' ? options.auth : `token ${token}`;\n}\nexports.getAuthString = getAuthString;\nfunction getProxyAgent(destinationUrl) {\n const hc = new httpClient.HttpClient();\n return hc.getAgent(destinationUrl);\n}\nexports.getProxyAgent = getProxyAgent;\nfunction getApiBaseUrl() {\n return process.env['GITHUB_API_URL'] || 'https://api.github.com';\n}\nexports.getApiBaseUrl = getApiBaseUrl;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokitOptions = exports.GitHub = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst Utils = __importStar(require(\"./internal/utils\"));\n// octokit + plugins\nconst core_1 = require(\"@octokit/core\");\nconst plugin_rest_endpoint_methods_1 = require(\"@octokit/plugin-rest-endpoint-methods\");\nconst plugin_paginate_rest_1 = require(\"@octokit/plugin-paginate-rest\");\nexports.context = new Context.Context();\nconst baseUrl = Utils.getApiBaseUrl();\nconst defaults = {\n baseUrl,\n request: {\n agent: Utils.getProxyAgent(baseUrl)\n }\n};\nexports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(defaults);\n/**\n * Convience function to correctly format Octokit Options to pass into the constructor.\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokitOptions(token, options) {\n const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller\n // Auth\n const auth = Utils.getAuthString(token, opts);\n if (auth) {\n opts.auth = auth;\n }\n return opts;\n}\nexports.getOctokitOptions = getOctokitOptions;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n options.headers['Authorization'] =\n 'Basic ' +\n Buffer.from(this.username + ':' + this.password).toString('base64');\n }\n // This handler cannot handle 401\n canHandleAuthentication(response) {\n return false;\n }\n handleAuthentication(httpClient, requestInfo, objs) {\n return null;\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n options.headers['Authorization'] = 'Bearer ' + this.token;\n }\n // This handler cannot handle 401\n canHandleAuthentication(response) {\n return false;\n }\n handleAuthentication(httpClient, requestInfo, objs) {\n return null;\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n options.headers['Authorization'] =\n 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64');\n }\n // This handler cannot handle 401\n canHandleAuthentication(response) {\n return false;\n }\n handleAuthentication(httpClient, requestInfo, objs) {\n return null;\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst http = require(\"http\");\nconst https = require(\"https\");\nconst pm = require(\"./proxy\");\nlet tunnel;\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers = exports.Headers || (exports.Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n let proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return new Promise(async (resolve, reject) => {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n let parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n }\n get(requestUrl, additionalHeaders) {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n }\n del(requestUrl, additionalHeaders) {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n }\n post(requestUrl, data, additionalHeaders) {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n }\n patch(requestUrl, data, additionalHeaders) {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n }\n put(requestUrl, data, additionalHeaders) {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n }\n head(requestUrl, additionalHeaders) {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n async getJson(requestUrl, additionalHeaders = {}) {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n let res = await this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async postJson(requestUrl, obj, additionalHeaders = {}) {\n let data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n let res = await this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async putJson(requestUrl, obj, additionalHeaders = {}) {\n let data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n let res = await this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async patchJson(requestUrl, obj, additionalHeaders = {}) {\n let data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n let res = await this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n async request(verb, requestUrl, data, headers) {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n let parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n while (numTries < maxTries) {\n response = await this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (let i = 0; i < this.handlers.length; i++) {\n if (this.handlers[i].canHandleAuthentication(response)) {\n authenticationHandler = this.handlers[i];\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n let parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol == 'https:' &&\n parsedUrl.protocol != parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n await response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (let header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = await this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n await response.readBody();\n await this._performExponentialBackoff(numTries);\n }\n }\n return response;\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return new Promise((resolve, reject) => {\n let callbackForResult = function (err, res) {\n if (err) {\n reject(err);\n }\n resolve(res);\n };\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n let socket;\n if (typeof data === 'string') {\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n let handleResult = (err, res) => {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n };\n let req = info.httpModule.request(info.options, (msg) => {\n let res = new HttpClientResponse(msg);\n handleResult(null, res);\n });\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error('Request timeout: ' + info.options.path), null);\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err, null);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n let parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n this.handlers.forEach(handler => {\n handler.prepareRequest(info.options);\n });\n }\n return info;\n }\n _mergeHeaders(headers) {\n const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n let proxyUrl = pm.getProxyUrl(parsedUrl);\n let useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (this._keepAlive && !useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (!!agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (!!this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n if (useProxy) {\n // If using proxy, need tunnel\n if (!tunnel) {\n tunnel = require('tunnel');\n }\n const agentOptions = {\n maxSockets: maxSockets,\n keepAlive: this._keepAlive,\n proxy: {\n ...((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n }),\n host: proxyUrl.hostname,\n port: proxyUrl.port\n }\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if reusing agent across request and tunneling agent isn't assigned create a new agent\n if (this._keepAlive && !agent) {\n const options = { keepAlive: this._keepAlive, maxSockets: maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n // if not using private agent and tunnel agent isn't setup then use global agent\n if (!agent) {\n agent = usingSsl ? https.globalAgent : http.globalAgent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _performExponentialBackoff(retryNumber) {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n }\n static dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n let a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n async _processResponse(res, options) {\n return new Promise(async (resolve, reject) => {\n const statusCode = res.message.statusCode;\n const response = {\n statusCode: statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode == HttpCodes.NotFound) {\n resolve(response);\n }\n let obj;\n let contents;\n // get the result from the body\n try {\n contents = await res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, HttpClient.dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = 'Failed request: (' + statusCode + ')';\n }\n let err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n });\n }\n}\nexports.HttpClient = HttpClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction getProxyUrl(reqUrl) {\n let usingSsl = reqUrl.protocol === 'https:';\n let proxyUrl;\n if (checkBypass(reqUrl)) {\n return proxyUrl;\n }\n let proxyVar;\n if (usingSsl) {\n proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n if (proxyVar) {\n proxyUrl = new URL(proxyVar);\n }\n return proxyUrl;\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n let upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (let upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperReqHosts.some(x => x === upperNoProxyItem)) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nasync function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp ? \"app\" : isInstallation ? \"installation\" : isUserToServer ? \"user-to-server\" : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType\n };\n}\n\n/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nfunction withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n\n return `token ${token}`;\n}\n\nasync function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n\nconst createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n\nexports.createTokenAuth = createTokenAuth;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar universalUserAgent = require('universal-user-agent');\nvar beforeAfterHook = require('before-after-hook');\nvar request = require('@octokit/request');\nvar graphql = require('@octokit/graphql');\nvar authToken = require('@octokit/auth-token');\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nconst VERSION = \"3.5.1\";\n\nconst _excluded = [\"authStrategy\"];\nclass Octokit {\n constructor(options = {}) {\n const hook = new beforeAfterHook.Collection();\n const requestDefaults = {\n baseUrl: request.request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\")\n }),\n mediaType: {\n previews: [],\n format: \"\"\n }\n }; // prepend default user agent with `options.userAgent` if set\n\n requestDefaults.headers[\"user-agent\"] = [options.userAgent, `octokit-core.js/${VERSION} ${universalUserAgent.getUserAgent()}`].filter(Boolean).join(\" \");\n\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n\n this.request = request.request.defaults(requestDefaults);\n this.graphql = graphql.withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => {},\n info: () => {},\n warn: console.warn.bind(console),\n error: console.error.bind(console)\n }, options.log);\n this.hook = hook; // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\"\n });\n } else {\n // (2)\n const auth = authToken.createTokenAuth(options.auth); // @ts-ignore ¯\\_(ツ)_/¯\n\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n } else {\n const {\n authStrategy\n } = options,\n otherOptions = _objectWithoutProperties(options, _excluded);\n\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions\n }, options.auth)); // @ts-ignore ¯\\_(ツ)_/¯\n\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n } // apply plugins\n // https://stackoverflow.com/a/16345172\n\n\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach(plugin => {\n Object.assign(this, plugin(this, options));\n });\n }\n\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`\n } : null));\n }\n\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n\n\n static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }\n\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n\nexports.Octokit = Octokit;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar isPlainObject = require('is-plain-object');\nvar universalUserAgent = require('universal-user-agent');\n\nfunction lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n\nfunction mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach(key => {\n if (isPlainObject.isPlainObject(options[key])) {\n if (!(key in defaults)) Object.assign(result, {\n [key]: options[key]\n });else result[key] = mergeDeep(defaults[key], options[key]);\n } else {\n Object.assign(result, {\n [key]: options[key]\n });\n }\n });\n return result;\n}\n\nfunction removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n\n return obj;\n}\n\nfunction merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? {\n method,\n url\n } : {\n url: method\n }, options);\n } else {\n options = Object.assign({}, route);\n } // lowercase header names before merging with defaults to avoid duplicates\n\n\n options.headers = lowercaseKeys(options.headers); // remove properties with undefined values before merging\n\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten\n\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews);\n }\n\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n\nfunction addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n\n if (names.length === 0) {\n return url;\n }\n\n return url + separator + names.map(name => {\n if (name === \"q\") {\n return \"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\");\n }\n\n return `${name}=${encodeURIComponent(parameters[name])}`;\n }).join(\"&\");\n}\n\nconst urlVariableRegex = /\\{[^}]+\\}/g;\n\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\n\nfunction extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n\n if (!matches) {\n return [];\n }\n\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n\nfunction omit(object, keysToOmit) {\n return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n\n// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n\n return part;\n }).join(\"\");\n}\n\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n\nfunction encodeValue(operator, value, key) {\n value = operator === \"+\" || operator === \"#\" ? encodeReserved(value) : encodeUnreserved(value);\n\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n } else {\n return value;\n }\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\n\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\n\nfunction getValues(context, operator, key, modifier) {\n var value = context[key],\n result = [];\n\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n value = value.toString();\n\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n } else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n } else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n const tmp = [];\n\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n } else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n } else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n } else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n } else if (value === \"\") {\n result.push(\"\");\n }\n }\n\n return result;\n}\n\nfunction parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\n\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n\n if (operator && operator !== \"+\") {\n var separator = \",\";\n\n if (operator === \"?\") {\n separator = \"&\";\n } else if (operator !== \"#\") {\n separator = operator;\n }\n\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n } else {\n return values.join(\",\");\n }\n } else {\n return encodeReserved(literal);\n }\n });\n}\n\nfunction parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible\n\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\"method\", \"baseUrl\", \"url\", \"headers\", \"request\", \"mediaType\"]); // extract variable names from URL to calculate remaining variables later\n\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n\n const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(\",\");\n }\n\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => {\n const format = options.mediaType.format ? `.${options.mediaType.format}` : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n }).join(\",\");\n }\n } // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n\n\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n } else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n } else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n } else {\n headers[\"content-length\"] = 0;\n }\n }\n } // default content-type for JSON if body is set\n\n\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n\n\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n } // Only return body/request keys if present\n\n\n return Object.assign({\n method,\n url,\n headers\n }, typeof body !== \"undefined\" ? {\n body\n } : null, options.request ? {\n request: options.request\n } : null);\n}\n\nfunction endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n\nfunction withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse\n });\n}\n\nconst VERSION = \"6.0.12\";\n\nconst userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\n\nconst DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\",\n previews: []\n }\n};\n\nconst endpoint = withDefaults(null, DEFAULTS);\n\nexports.endpoint = endpoint;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar request = require('@octokit/request');\nvar universalUserAgent = require('universal-user-agent');\n\nconst VERSION = \"4.8.0\";\n\nfunction _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\\n` + data.errors.map(e => ` - ${e.message}`).join(\"\\n\");\n}\n\nclass GraphqlResponseError extends Error {\n constructor(request, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\"; // Expose the errors and response data in their shorthand properties.\n\n this.errors = response.errors;\n this.data = response.data; // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n\n}\n\nconst NON_VARIABLE_OPTIONS = [\"method\", \"baseUrl\", \"url\", \"headers\", \"request\", \"query\", \"mediaType\"];\nconst FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`));\n }\n\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;\n return Promise.reject(new Error(`[@octokit/graphql] \"${key}\" cannot be used as variable name`));\n }\n }\n\n const parsedOptions = typeof query === \"string\" ? Object.assign({\n query\n }, options) : query;\n const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n\n if (!result.variables) {\n result.variables = {};\n }\n\n result.variables[key] = parsedOptions[key];\n return result;\n }, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix\n // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451\n\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n\n return request(requestOptions).then(response => {\n if (response.data.errors) {\n const headers = {};\n\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n\n throw new GraphqlResponseError(requestOptions, headers, response.data);\n }\n\n return response.data.data;\n });\n}\n\nfunction withDefaults(request$1, newDefaults) {\n const newRequest = request$1.defaults(newDefaults);\n\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: request.request.endpoint\n });\n}\n\nconst graphql$1 = withDefaults(request.request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\n\nexports.GraphqlResponseError = GraphqlResponseError;\nexports.graphql = graphql$1;\nexports.withCustomRequest = withCustomRequest;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst VERSION = \"2.17.0\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\n/**\n * Some “list” response that can be paginated have a different response structure\n *\n * They have a `total_count` key in the response (search also has `incomplete_results`,\n * /installation/repositories also has `repository_selection`), as well as a key with\n * the list of the items which name varies from endpoint to endpoint.\n *\n * Octokit normalizes these responses so that paginated results are always returned following\n * the same structure. One challenge is that if the list response has only one page, no Link\n * header is provided, so this header alone is not sufficient to check wether a response is\n * paginated or not.\n *\n * We check if a \"total_count\" key is present in the response data, but also make sure that\n * a \"url\" property is not, as the \"Get the combined status for a specific ref\" endpoint would\n * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref\n */\nfunction normalizePaginatedListResponse(response) {\n // endpoints can respond with 204 if repository is empty\n if (!response.data) {\n return _objectSpread2(_objectSpread2({}, response), {}, {\n data: []\n });\n }\n\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization) return response; // keep the additional properties intact as there is currently no other way\n // to retrieve the same information.\n\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n\n response.data.total_count = totalCount;\n return response;\n}\n\nfunction iterator(octokit, route, parameters) {\n const options = typeof route === \"function\" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url) return {\n done: true\n };\n\n try {\n const response = await requestMethod({\n method,\n url,\n headers\n });\n const normalizedResponse = normalizePaginatedListResponse(response); // `response.headers.link` format:\n // '; rel=\"next\", ; rel=\"last\"'\n // sets `url` to undefined if \"next\" URL is not present or `link` header is not set\n\n url = ((normalizedResponse.headers.link || \"\").match(/<([^>]+)>;\\s*rel=\"next\"/) || [])[1];\n return {\n value: normalizedResponse\n };\n } catch (error) {\n if (error.status !== 409) throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: []\n }\n };\n }\n }\n\n })\n };\n}\n\nfunction paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = undefined;\n }\n\n return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);\n}\n\nfunction gather(octokit, results, iterator, mapFn) {\n return iterator.next().then(result => {\n if (result.done) {\n return results;\n }\n\n let earlyExit = false;\n\n function done() {\n earlyExit = true;\n }\n\n results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);\n\n if (earlyExit) {\n return results;\n }\n\n return gather(octokit, results, iterator, mapFn);\n });\n}\n\nconst composePaginateRest = Object.assign(paginate, {\n iterator\n});\n\nconst paginatingEndpoints = [\"GET /app/hook/deliveries\", \"GET /app/installations\", \"GET /applications/grants\", \"GET /authorizations\", \"GET /enterprises/{enterprise}/actions/permissions/organizations\", \"GET /enterprises/{enterprise}/actions/runner-groups\", \"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations\", \"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners\", \"GET /enterprises/{enterprise}/actions/runners\", \"GET /enterprises/{enterprise}/actions/runners/downloads\", \"GET /events\", \"GET /gists\", \"GET /gists/public\", \"GET /gists/starred\", \"GET /gists/{gist_id}/comments\", \"GET /gists/{gist_id}/commits\", \"GET /gists/{gist_id}/forks\", \"GET /installation/repositories\", \"GET /issues\", \"GET /marketplace_listing/plans\", \"GET /marketplace_listing/plans/{plan_id}/accounts\", \"GET /marketplace_listing/stubbed/plans\", \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\", \"GET /networks/{owner}/{repo}/events\", \"GET /notifications\", \"GET /organizations\", \"GET /orgs/{org}/actions/permissions/repositories\", \"GET /orgs/{org}/actions/runner-groups\", \"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories\", \"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners\", \"GET /orgs/{org}/actions/runners\", \"GET /orgs/{org}/actions/runners/downloads\", \"GET /orgs/{org}/actions/secrets\", \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\", \"GET /orgs/{org}/blocks\", \"GET /orgs/{org}/credential-authorizations\", \"GET /orgs/{org}/events\", \"GET /orgs/{org}/failed_invitations\", \"GET /orgs/{org}/hooks\", \"GET /orgs/{org}/hooks/{hook_id}/deliveries\", \"GET /orgs/{org}/installations\", \"GET /orgs/{org}/invitations\", \"GET /orgs/{org}/invitations/{invitation_id}/teams\", \"GET /orgs/{org}/issues\", \"GET /orgs/{org}/members\", \"GET /orgs/{org}/migrations\", \"GET /orgs/{org}/migrations/{migration_id}/repositories\", \"GET /orgs/{org}/outside_collaborators\", \"GET /orgs/{org}/packages\", \"GET /orgs/{org}/projects\", \"GET /orgs/{org}/public_members\", \"GET /orgs/{org}/repos\", \"GET /orgs/{org}/secret-scanning/alerts\", \"GET /orgs/{org}/team-sync/groups\", \"GET /orgs/{org}/teams\", \"GET /orgs/{org}/teams/{team_slug}/discussions\", \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\", \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\", \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\", \"GET /orgs/{org}/teams/{team_slug}/invitations\", \"GET /orgs/{org}/teams/{team_slug}/members\", \"GET /orgs/{org}/teams/{team_slug}/projects\", \"GET /orgs/{org}/teams/{team_slug}/repos\", \"GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings\", \"GET /orgs/{org}/teams/{team_slug}/teams\", \"GET /projects/columns/{column_id}/cards\", \"GET /projects/{project_id}/collaborators\", \"GET /projects/{project_id}/columns\", \"GET /repos/{owner}/{repo}/actions/artifacts\", \"GET /repos/{owner}/{repo}/actions/runners\", \"GET /repos/{owner}/{repo}/actions/runners/downloads\", \"GET /repos/{owner}/{repo}/actions/runs\", \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\", \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\", \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\", \"GET /repos/{owner}/{repo}/actions/secrets\", \"GET /repos/{owner}/{repo}/actions/workflows\", \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\", \"GET /repos/{owner}/{repo}/assignees\", \"GET /repos/{owner}/{repo}/autolinks\", \"GET /repos/{owner}/{repo}/branches\", \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\", \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\", \"GET /repos/{owner}/{repo}/code-scanning/alerts\", \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\", \"GET /repos/{owner}/{repo}/code-scanning/analyses\", \"GET /repos/{owner}/{repo}/collaborators\", \"GET /repos/{owner}/{repo}/comments\", \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\", \"GET /repos/{owner}/{repo}/commits\", \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\", \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\", \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\", \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\", \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\", \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\", \"GET /repos/{owner}/{repo}/contributors\", \"GET /repos/{owner}/{repo}/deployments\", \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\", \"GET /repos/{owner}/{repo}/events\", \"GET /repos/{owner}/{repo}/forks\", \"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\", \"GET /repos/{owner}/{repo}/hooks\", \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\", \"GET /repos/{owner}/{repo}/invitations\", \"GET /repos/{owner}/{repo}/issues\", \"GET /repos/{owner}/{repo}/issues/comments\", \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\", \"GET /repos/{owner}/{repo}/issues/events\", \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\", \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\", \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\", \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\", \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\", \"GET /repos/{owner}/{repo}/keys\", \"GET /repos/{owner}/{repo}/labels\", \"GET /repos/{owner}/{repo}/milestones\", \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\", \"GET /repos/{owner}/{repo}/notifications\", \"GET /repos/{owner}/{repo}/pages/builds\", \"GET /repos/{owner}/{repo}/projects\", \"GET /repos/{owner}/{repo}/pulls\", \"GET /repos/{owner}/{repo}/pulls/comments\", \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\", \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\", \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\", \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\", \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\", \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\", \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\", \"GET /repos/{owner}/{repo}/releases\", \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\", \"GET /repos/{owner}/{repo}/secret-scanning/alerts\", \"GET /repos/{owner}/{repo}/stargazers\", \"GET /repos/{owner}/{repo}/subscribers\", \"GET /repos/{owner}/{repo}/tags\", \"GET /repos/{owner}/{repo}/teams\", \"GET /repositories\", \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\", \"GET /scim/v2/enterprises/{enterprise}/Groups\", \"GET /scim/v2/enterprises/{enterprise}/Users\", \"GET /scim/v2/organizations/{org}/Users\", \"GET /search/code\", \"GET /search/commits\", \"GET /search/issues\", \"GET /search/labels\", \"GET /search/repositories\", \"GET /search/topics\", \"GET /search/users\", \"GET /teams/{team_id}/discussions\", \"GET /teams/{team_id}/discussions/{discussion_number}/comments\", \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\", \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\", \"GET /teams/{team_id}/invitations\", \"GET /teams/{team_id}/members\", \"GET /teams/{team_id}/projects\", \"GET /teams/{team_id}/repos\", \"GET /teams/{team_id}/team-sync/group-mappings\", \"GET /teams/{team_id}/teams\", \"GET /user/blocks\", \"GET /user/emails\", \"GET /user/followers\", \"GET /user/following\", \"GET /user/gpg_keys\", \"GET /user/installations\", \"GET /user/installations/{installation_id}/repositories\", \"GET /user/issues\", \"GET /user/keys\", \"GET /user/marketplace_purchases\", \"GET /user/marketplace_purchases/stubbed\", \"GET /user/memberships/orgs\", \"GET /user/migrations\", \"GET /user/migrations/{migration_id}/repositories\", \"GET /user/orgs\", \"GET /user/packages\", \"GET /user/public_emails\", \"GET /user/repos\", \"GET /user/repository_invitations\", \"GET /user/starred\", \"GET /user/subscriptions\", \"GET /user/teams\", \"GET /users\", \"GET /users/{username}/events\", \"GET /users/{username}/events/orgs/{org}\", \"GET /users/{username}/events/public\", \"GET /users/{username}/followers\", \"GET /users/{username}/following\", \"GET /users/{username}/gists\", \"GET /users/{username}/gpg_keys\", \"GET /users/{username}/keys\", \"GET /users/{username}/orgs\", \"GET /users/{username}/packages\", \"GET /users/{username}/projects\", \"GET /users/{username}/received_events\", \"GET /users/{username}/received_events/public\", \"GET /users/{username}/repos\", \"GET /users/{username}/starred\", \"GET /users/{username}/subscriptions\"];\n\nfunction isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n } else {\n return false;\n }\n}\n\n/**\n * @param octokit Octokit instance\n * @param options Options passed to Octokit constructor\n */\n\nfunction paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit)\n })\n };\n}\npaginateRest.VERSION = VERSION;\n\nexports.composePaginateRest = composePaginateRest;\nexports.isPaginatingEndpoint = isPaginatingEndpoint;\nexports.paginateRest = paginateRest;\nexports.paginatingEndpoints = paginatingEndpoints;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nconst Endpoints = {\n actions: {\n addSelectedRepoToOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"],\n approveWorkflowRun: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\"],\n cancelWorkflowRun: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\"],\n createOrUpdateEnvironmentSecret: [\"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n createRegistrationTokenForOrg: [\"POST /orgs/{org}/actions/runners/registration-token\"],\n createRegistrationTokenForRepo: [\"POST /repos/{owner}/{repo}/actions/runners/registration-token\"],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\"POST /repos/{owner}/{repo}/actions/runners/remove-token\"],\n createWorkflowDispatch: [\"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\"],\n deleteArtifact: [\"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n deleteEnvironmentSecret: [\"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteRepoSecret: [\"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n deleteSelfHostedRunnerFromOrg: [\"DELETE /orgs/{org}/actions/runners/{runner_id}\"],\n deleteSelfHostedRunnerFromRepo: [\"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\"],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"],\n disableSelectedRepositoryGithubActionsOrganization: [\"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\"],\n disableWorkflow: [\"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\"],\n downloadArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\"],\n downloadJobLogsForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\"],\n downloadWorkflowRunAttemptLogs: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\"],\n downloadWorkflowRunLogs: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"],\n enableSelectedRepositoryGithubActionsOrganization: [\"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\"],\n enableWorkflow: [\"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\"],\n getAllowedActionsOrganization: [\"GET /orgs/{org}/actions/permissions/selected-actions\"],\n getAllowedActionsRepository: [\"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\"],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getEnvironmentPublicKey: [\"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\"],\n getEnvironmentSecret: [\"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"],\n getGithubActionsPermissionsOrganization: [\"GET /orgs/{org}/actions/permissions\"],\n getGithubActionsPermissionsRepository: [\"GET /repos/{owner}/{repo}/actions/permissions\"],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getPendingDeploymentsForRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"],\n getRepoPermissions: [\"GET /repos/{owner}/{repo}/actions/permissions\", {}, {\n renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"]\n }],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getReviewsForRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\"],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\"],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\"],\n getWorkflowRunUsage: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\"],\n getWorkflowUsage: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\"],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\"GET /repositories/{repository_id}/environments/{environment_name}/secrets\"],\n listJobsForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\"],\n listJobsForWorkflowRunAttempt: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\"],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\"GET /repos/{owner}/{repo}/actions/runners/downloads\"],\n listSelectedReposForOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\"],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\"GET /orgs/{org}/actions/permissions/repositories\"],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\"],\n listWorkflowRuns: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\"],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n removeSelectedRepoFromOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"],\n reviewPendingDeploymentsForRun: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"],\n setAllowedActionsOrganization: [\"PUT /orgs/{org}/actions/permissions/selected-actions\"],\n setAllowedActionsRepository: [\"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\"],\n setGithubActionsPermissionsOrganization: [\"PUT /orgs/{org}/actions/permissions\"],\n setGithubActionsPermissionsRepository: [\"PUT /repos/{owner}/{repo}/actions/permissions\"],\n setSelectedReposForOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\"],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\"PUT /orgs/{org}/actions/permissions/repositories\"]\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\"DELETE /notifications/threads/{thread_id}/subscription\"],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\"GET /notifications/threads/{thread_id}/subscription\"],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\"GET /users/{username}/events/orgs/{org}\"],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\"GET /users/{username}/received_events/public\"],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\"GET /repos/{owner}/{repo}/notifications\"],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\"PUT /notifications/threads/{thread_id}/subscription\"],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"]\n },\n apps: {\n addRepoToInstallation: [\"PUT /user/installations/{installation_id}/repositories/{repository_id}\", {}, {\n renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"]\n }],\n addRepoToInstallationForAuthenticatedUser: [\"PUT /user/installations/{installation_id}/repositories/{repository_id}\"],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createContentAttachment: [\"POST /content_references/{content_reference_id}/attachments\", {\n mediaType: {\n previews: [\"corsair\"]\n }\n }],\n createContentAttachmentForRepo: [\"POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments\", {\n mediaType: {\n previews: [\"corsair\"]\n }\n }],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\"POST /app/installations/{installation_id}/access_tokens\"],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\"GET /marketplace_listing/accounts/{account_id}\"],\n getSubscriptionPlanForAccountStubbed: [\"GET /marketplace_listing/stubbed/accounts/{account_id}\"],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\"],\n listInstallationReposForAuthenticatedUser: [\"GET /user/installations/{installation_id}/repositories\"],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\"GET /user/marketplace_purchases/stubbed\"],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\"POST /app/hook/deliveries/{delivery_id}/attempts\"],\n removeRepoFromInstallation: [\"DELETE /user/installations/{installation_id}/repositories/{repository_id}\", {}, {\n renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"]\n }],\n removeRepoFromInstallationForAuthenticatedUser: [\"DELETE /user/installations/{installation_id}/repositories/{repository_id}\"],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\"DELETE /app/installations/{installation_id}/suspended\"],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"]\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\"GET /users/{username}/settings/billing/actions\"],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\"GET /users/{username}/settings/billing/packages\"],\n getSharedStorageBillingOrg: [\"GET /orgs/{org}/settings/billing/shared-storage\"],\n getSharedStorageBillingUser: [\"GET /users/{username}/settings/billing/shared-storage\"]\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\"],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\"],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\"],\n rerequestSuite: [\"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\"],\n setSuitesPreferences: [\"PATCH /repos/{owner}/{repo}/check-suites/preferences\"],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"]\n },\n codeScanning: {\n deleteAnalysis: [\"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\"],\n getAlert: [\"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\", {}, {\n renamedParameters: {\n alert_id: \"alert_number\"\n }\n }],\n getAnalysis: [\"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\"],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\", {}, {\n renamed: [\"codeScanning\", \"listAlertInstances\"]\n }],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\"],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"]\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"]\n },\n emojis: {\n get: [\"GET /emojis\"]\n },\n enterpriseAdmin: {\n disableSelectedOrganizationGithubActionsEnterprise: [\"DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\"],\n enableSelectedOrganizationGithubActionsEnterprise: [\"PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\"],\n getAllowedActionsEnterprise: [\"GET /enterprises/{enterprise}/actions/permissions/selected-actions\"],\n getGithubActionsPermissionsEnterprise: [\"GET /enterprises/{enterprise}/actions/permissions\"],\n listSelectedOrganizationsEnabledGithubActionsEnterprise: [\"GET /enterprises/{enterprise}/actions/permissions/organizations\"],\n setAllowedActionsEnterprise: [\"PUT /enterprises/{enterprise}/actions/permissions/selected-actions\"],\n setGithubActionsPermissionsEnterprise: [\"PUT /enterprises/{enterprise}/actions/permissions\"],\n setSelectedOrganizationsEnabledGithubActionsEnterprise: [\"PUT /enterprises/{enterprise}/actions/permissions/organizations\"]\n },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"]\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"]\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"]\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\"GET /user/interaction-limits\", {}, {\n renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"]\n }],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\"DELETE /repos/{owner}/{repo}/interaction-limits\"],\n removeRestrictionsForYourPublicRepos: [\"DELETE /user/interaction-limits\", {}, {\n renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"]\n }],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\"PUT /user/interaction-limits\", {}, {\n renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"]\n }]\n },\n issues: {\n addAssignees: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\"],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\"],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\"],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n removeAssignees: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\"],\n removeLabel: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\"],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\"]\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"]\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\"POST /markdown/raw\", {\n headers: {\n \"content-type\": \"text/plain; charset=utf-8\"\n }\n }]\n },\n meta: {\n get: [\"GET /meta\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"]\n },\n migrations: {\n cancelImport: [\"DELETE /repos/{owner}/{repo}/import\"],\n deleteArchiveForAuthenticatedUser: [\"DELETE /user/migrations/{migration_id}/archive\"],\n deleteArchiveForOrg: [\"DELETE /orgs/{org}/migrations/{migration_id}/archive\"],\n downloadArchiveForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/archive\"],\n getArchiveForAuthenticatedUser: [\"GET /user/migrations/{migration_id}/archive\"],\n getCommitAuthors: [\"GET /repos/{owner}/{repo}/import/authors\"],\n getImportStatus: [\"GET /repos/{owner}/{repo}/import\"],\n getLargeFiles: [\"GET /repos/{owner}/{repo}/import/large_files\"],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\"GET /user/migrations/{migration_id}/repositories\"],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\"GET /user/migrations/{migration_id}/repositories\", {}, {\n renamed: [\"migrations\", \"listReposForAuthenticatedUser\"]\n }],\n mapCommitAuthor: [\"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\"],\n setLfsPreference: [\"PATCH /repos/{owner}/{repo}/import/lfs\"],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\"PUT /repos/{owner}/{repo}/import\"],\n unlockRepoForAuthenticatedUser: [\"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\"],\n unlockRepoForOrg: [\"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\"],\n updateImport: [\"PATCH /repos/{owner}/{repo}/import\"]\n },\n orgs: {\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\"PUT /orgs/{org}/outside_collaborators/{username}\"],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n get: [\"GET /orgs/{org}\"],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\"],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\"DELETE /orgs/{org}/outside_collaborators/{username}\"],\n removePublicMembershipForAuthenticatedUser: [\"DELETE /orgs/{org}/public_members/{username}\"],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\"PUT /orgs/{org}/public_members/{username}\"],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\"PATCH /user/memberships/orgs/{org}\"],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"]\n },\n packages: {\n deletePackageForAuthenticatedUser: [\"DELETE /user/packages/{package_type}/{package_name}\"],\n deletePackageForOrg: [\"DELETE /orgs/{org}/packages/{package_type}/{package_name}\"],\n deletePackageForUser: [\"DELETE /users/{username}/packages/{package_type}/{package_name}\"],\n deletePackageVersionForAuthenticatedUser: [\"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"],\n deletePackageVersionForOrg: [\"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"],\n deletePackageVersionForUser: [\"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\", {}, {\n renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"]\n }],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\"GET /user/packages/{package_type}/{package_name}/versions\", {}, {\n renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\"]\n }],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\"GET /user/packages/{package_type}/{package_name}/versions\"],\n getAllPackageVersionsForPackageOwnedByOrg: [\"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\"],\n getAllPackageVersionsForPackageOwnedByUser: [\"GET /users/{username}/packages/{package_type}/{package_name}/versions\"],\n getPackageForAuthenticatedUser: [\"GET /user/packages/{package_type}/{package_name}\"],\n getPackageForOrganization: [\"GET /orgs/{org}/packages/{package_type}/{package_name}\"],\n getPackageForUser: [\"GET /users/{username}/packages/{package_type}/{package_name}\"],\n getPackageVersionForAuthenticatedUser: [\"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"],\n getPackageVersionForOrganization: [\"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"],\n getPackageVersionForUser: [\"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\"POST /user/packages/{package_type}/{package_name}/restore{?token}\"],\n restorePackageForOrg: [\"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\"],\n restorePackageForUser: [\"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\"],\n restorePackageVersionForAuthenticatedUser: [\"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"],\n restorePackageVersionForOrg: [\"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"],\n restorePackageVersionForUser: [\"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"]\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\"GET /projects/{project_id}/collaborators/{username}/permission\"],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\"DELETE /projects/{project_id}/collaborators/{username}\"],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"]\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\"],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\"],\n deletePendingReview: [\"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"],\n deleteReviewComment: [\"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n dismissReview: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\"],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\"],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"],\n listReviewComments: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\"],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"],\n requestReviewers: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"],\n submitReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\"],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\"],\n updateReview: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"],\n updateReviewComment: [\"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\"]\n },\n rateLimit: {\n get: [\"GET /rate_limit\"]\n },\n reactions: {\n createForCommitComment: [\"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\"],\n createForIssue: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n createForIssueComment: [\"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"],\n createForPullRequestReviewComment: [\"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"],\n createForRelease: [\"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\"],\n createForTeamDiscussionCommentInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"],\n createForTeamDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"],\n deleteForCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\"],\n deleteForIssue: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\"],\n deleteForIssueComment: [\"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\"],\n deleteForPullRequestComment: [\"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\"],\n deleteForTeamDiscussion: [\"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\"],\n deleteForTeamDiscussionComment: [\"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\"],\n listForCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\"],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"],\n listForPullRequestReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"],\n listForTeamDiscussionCommentInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"],\n listForTeamDiscussionInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"]\n },\n repos: {\n acceptInvitation: [\"PATCH /user/repository_invitations/{invitation_id}\", {}, {\n renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"]\n }],\n acceptInvitationForAuthenticatedUser: [\"PATCH /user/repository_invitations/{invitation_id}\"],\n addAppAccessRestrictions: [\"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\", {}, {\n mapToData: \"apps\"\n }],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\", {}, {\n mapToData: \"contexts\"\n }],\n addTeamAccessRestrictions: [\"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\", {}, {\n mapToData: \"teams\"\n }],\n addUserAccessRestrictions: [\"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\", {}, {\n mapToData: \"users\"\n }],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\"GET /repos/{owner}/{repo}/vulnerability-alerts\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\"GET /repos/{owner}/{repo}/compare/{basehead}\"],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\"],\n createCommitSignatureProtection: [\"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentStatus: [\"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateEnvironment: [\"PUT /repos/{owner}/{repo}/environments/{environment_name}\"],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createUsingTemplate: [\"POST /repos/{template_owner}/{template_repo}/generate\"],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\"DELETE /user/repository_invitations/{invitation_id}\", {}, {\n renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"]\n }],\n declineInvitationForAuthenticatedUser: [\"DELETE /user/repository_invitations/{invitation_id}\"],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"],\n deleteAdminBranchProtection: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"],\n deleteAnEnvironment: [\"DELETE /repos/{owner}/{repo}/environments/{environment_name}\"],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\"],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\"],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\"DELETE /repos/{owner}/{repo}/automated-security-fixes\"],\n disableLfsForRepo: [\"DELETE /repos/{owner}/{repo}/lfs\"],\n disableVulnerabilityAlerts: [\"DELETE /repos/{owner}/{repo}/vulnerability-alerts\"],\n downloadArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\", {}, {\n renamed: [\"repos\", \"downloadZipballArchive\"]\n }],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\"PUT /repos/{owner}/{repo}/automated-security-fixes\"],\n enableLfsForRepo: [\"PUT /repos/{owner}/{repo}/lfs\"],\n enableVulnerabilityAlerts: [\"PUT /repos/{owner}/{repo}/vulnerability-alerts\"],\n generateReleaseNotes: [\"POST /repos/{owner}/{repo}/releases/generate-notes\"],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"],\n getAdminBranchProtection: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\"],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\", {\n mediaType: {\n previews: [\"mercy\"]\n }\n }],\n getAppsWithAccessToProtectedBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\"],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection\"],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\"GET /repos/{owner}/{repo}/collaborators/{username}/permission\"],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentStatus: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\"],\n getEnvironment: [\"GET /repos/{owner}/{repo}/environments/{environment_name}\"],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getStatusChecksProtection: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"],\n getTeamsWithAccessToProtectedBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\"],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\"],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\"],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\"],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\"],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/statuses\"],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentStatuses: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\"],\n listReleaseAssets: [\"GET /repos/{owner}/{repo}/releases/{release_id}/assets\"],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"],\n removeAppAccessRestrictions: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\", {}, {\n mapToData: \"apps\"\n }],\n removeCollaborator: [\"DELETE /repos/{owner}/{repo}/collaborators/{username}\"],\n removeStatusCheckContexts: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\", {}, {\n mapToData: \"contexts\"\n }],\n removeStatusCheckProtection: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"],\n removeTeamAccessRestrictions: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\", {}, {\n mapToData: \"teams\"\n }],\n removeUserAccessRestrictions: [\"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\", {}, {\n mapToData: \"users\"\n }],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\", {\n mediaType: {\n previews: [\"mercy\"]\n }\n }],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"],\n setAppAccessRestrictions: [\"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\", {}, {\n mapToData: \"apps\"\n }],\n setStatusCheckContexts: [\"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\", {}, {\n mapToData: \"contexts\"\n }],\n setTeamAccessRestrictions: [\"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\", {}, {\n mapToData: \"teams\"\n }],\n setUserAccessRestrictions: [\"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\", {}, {\n mapToData: \"users\"\n }],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\"PUT /repos/{owner}/{repo}/branches/{branch}/protection\"],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\"],\n updatePullRequestReviewProtection: [\"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n updateStatusCheckPotection: [\"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\", {}, {\n renamed: [\"repos\", \"updateStatusCheckProtection\"]\n }],\n updateStatusCheckProtection: [\"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\"],\n uploadReleaseAsset: [\"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\", {\n baseUrl: \"https://uploads.github.com\"\n }]\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\", {\n mediaType: {\n previews: [\"mercy\"]\n }\n }],\n users: [\"GET /search/users\"]\n },\n secretScanning: {\n getAlert: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n updateAlert: [\"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"]\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\"],\n addOrUpdateProjectPermissionsInOrg: [\"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\"],\n addOrUpdateRepoPermissionsInOrg: [\"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"],\n checkPermissionsForProjectInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\"],\n checkPermissionsForRepoInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"],\n deleteDiscussionInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"],\n getDiscussionInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"],\n getMembershipForUserInOrg: [\"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\"],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/invitations\"],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\"],\n removeProjectInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\"],\n removeRepoInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"],\n updateDiscussionCommentInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"],\n updateDiscussionInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"]\n },\n users: {\n addEmailForAuthenticated: [\"POST /user/emails\", {}, {\n renamed: [\"users\", \"addEmailForAuthenticatedUser\"]\n }],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\"POST /user/gpg_keys\", {}, {\n renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"]\n }],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\"POST /user/keys\", {}, {\n renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"]\n }],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n deleteEmailForAuthenticated: [\"DELETE /user/emails\", {}, {\n renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"]\n }],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\"DELETE /user/gpg_keys/{gpg_key_id}\", {}, {\n renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"]\n }],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\"DELETE /user/keys/{key_id}\", {}, {\n renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"]\n }],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\"GET /user/gpg_keys/{gpg_key_id}\", {}, {\n renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"]\n }],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\"GET /user/keys/{key_id}\", {}, {\n renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"]\n }],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\"GET /user/blocks\", {}, {\n renamed: [\"users\", \"listBlockedByAuthenticatedUser\"]\n }],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\"GET /user/emails\", {}, {\n renamed: [\"users\", \"listEmailsForAuthenticatedUser\"]\n }],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\"GET /user/following\", {}, {\n renamed: [\"users\", \"listFollowedByAuthenticatedUser\"]\n }],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\"GET /user/gpg_keys\", {}, {\n renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"]\n }],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\"GET /user/public_emails\", {}, {\n renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"]\n }],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\"GET /user/keys\", {}, {\n renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"]\n }],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\"PATCH /user/email/visibility\", {}, {\n renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"]\n }],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\"PATCH /user/email/visibility\"],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"]\n }\n};\n\nconst VERSION = \"5.13.0\";\n\nfunction endpointsToMethods(octokit, endpointsMap) {\n const newMethods = {};\n\n for (const [scope, endpoints] of Object.entries(endpointsMap)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign({\n method,\n url\n }, defaults);\n\n if (!newMethods[scope]) {\n newMethods[scope] = {};\n }\n\n const scopeMethods = newMethods[scope];\n\n if (decorations) {\n scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations);\n continue;\n }\n\n scopeMethods[methodName] = octokit.request.defaults(endpointDefaults);\n }\n }\n\n return newMethods;\n}\n\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n /* istanbul ignore next */\n\n function withDecorations(...args) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n let options = requestWithDefaults.endpoint.merge(...args); // There are currently no other decorations than `.mapToData`\n\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: undefined\n });\n return requestWithDefaults(options);\n }\n\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`);\n }\n\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n\n if (decorations.renamedParameters) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n const options = requestWithDefaults.endpoint.merge(...args);\n\n for (const [name, alias] of Object.entries(decorations.renamedParameters)) {\n if (name in options) {\n octokit.log.warn(`\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`);\n\n if (!(alias in options)) {\n options[alias] = options[name];\n }\n\n delete options[name];\n }\n }\n\n return requestWithDefaults(options);\n } // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n\n\n return requestWithDefaults(...args);\n }\n\n return Object.assign(withDecorations, requestWithDefaults);\n}\n\nfunction restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit, Endpoints);\n return {\n rest: api\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nfunction legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit, Endpoints);\n return _objectSpread2(_objectSpread2({}, api), {}, {\n rest: api\n });\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n\nexports.legacyRestEndpointMethods = legacyRestEndpointMethods;\nexports.restEndpointMethods = restEndpointMethods;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar deprecation = require('deprecation');\nvar once = _interopDefault(require('once'));\n\nconst logOnceCode = once(deprecation => console.warn(deprecation));\nconst logOnceHeaders = once(deprecation => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\n\nclass RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n } // redact request credentials without mutating original request options\n\n\n const requestCopy = Object.assign({}, options.request);\n\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\")\n });\n }\n\n requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\") // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy; // deprecations\n\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new deprecation.Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n }\n\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new deprecation.Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n }\n\n });\n }\n\n}\n\nexports.RequestError = RequestError;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar endpoint = require('@octokit/endpoint');\nvar universalUserAgent = require('universal-user-agent');\nvar isPlainObject = require('is-plain-object');\nvar nodeFetch = _interopDefault(require('node-fetch'));\nvar requestError = require('@octokit/request-error');\n\nconst VERSION = \"5.6.3\";\n\nfunction getBufferResponse(response) {\n return response.arrayBuffer();\n}\n\nfunction fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;\n\n if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n\n let headers = {};\n let status;\n let url;\n const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect\n }, // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request)).then(async response => {\n url = response.url;\n status = response.status;\n\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n\n if (status === 204 || status === 205) {\n return;\n } // GitHub API returns 200 for HEAD requests\n\n\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n\n throw new requestError.RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined\n },\n request: requestOptions\n });\n }\n\n if (status === 304) {\n throw new requestError.RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response)\n },\n request: requestOptions\n });\n }\n\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new requestError.RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data\n },\n request: requestOptions\n });\n throw error;\n }\n\n return getResponseData(response);\n }).then(data => {\n return {\n status,\n url,\n headers,\n data\n };\n }).catch(error => {\n if (error instanceof requestError.RequestError) throw error;\n throw new requestError.RequestError(error.message, 500, {\n request: requestOptions\n });\n });\n}\n\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n\n return getBufferResponse(response);\n}\n\nfunction toErrorMessage(data) {\n if (typeof data === \"string\") return data; // istanbul ignore else - just in case\n\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n\n return data.message;\n } // istanbul ignore next - just in case\n\n\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n\nfunction withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n}\n\nconst request = withDefaults(endpoint.endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}`\n }\n});\n\nexports.request = request;\n//# sourceMappingURL=index.js.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.api = void 0;\nconst common_1 = require(\"./common\");\nfunction api(apiParameters) {\n var _a;\n // If the apiParameters don't include `endpoint` treat it as a partial\n // application.\n if (!apiParameters.endpoint && !apiParameters.url) {\n return partialCall(apiParameters);\n }\n const types = {\n bearer: 'Bearer ',\n token: 'Token token=',\n };\n const { endpoint, server = 'api.pagerduty.com', token, tokenType = apiParameters.tokenType || 'token', url, version = 2, data, ...rest } = apiParameters;\n const config = {\n method: 'GET',\n ...rest,\n headers: {\n Accept: `application/vnd.pagerduty+json;version=${version}`,\n Authorization: `${types[tokenType]}${token}`,\n ...rest.headers,\n },\n };\n // Allow `data` for `queryParameters` for requests without bodies.\n if (isReadonlyRequest(config.method) && data) {\n config.queryParameters =\n (_a = config.queryParameters) !== null && _a !== void 0 ? _a : data;\n }\n else {\n config.body = JSON.stringify(data);\n }\n return apiRequest(url !== null && url !== void 0 ? url : `https://${server}/${endpoint.replace(/^\\/+/, '')}`, config);\n}\nexports.api = api;\nfunction apiRequest(url, options) {\n return (0, common_1.request)(url, options).then((response) => {\n const apiResponse = response;\n apiResponse.response = response;\n if (response.status === 204) {\n return Promise.resolve(apiResponse);\n }\n return response\n .json()\n .then((data) => {\n const resource = resourceKey(url, options.method);\n apiResponse.next = nextFunc(url, options, data);\n apiResponse.data = data;\n apiResponse.resource = resource ? data[resource] : null;\n return apiResponse;\n })\n .catch(() => Promise.reject(apiResponse));\n });\n}\nfunction resourceKey(url, method) {\n const resource = url.match(/.+.com\\/(?[\\w]+)/);\n if (resource) {\n const resourceName = resource[1];\n if (method && method.toLowerCase() === 'get') {\n return resourceName;\n }\n if (resourceName.endsWith('ies')) {\n return resourceName.slice(0, -3) + 'y';\n }\n else if (resourceName.endsWith('s')) {\n return resourceName.slice(0, -1);\n }\n return resourceName;\n }\n return null;\n}\nfunction isReadonlyRequest(method) {\n var _a;\n return !['PUT', 'POST', 'DELETE', 'PATCH'].includes((_a = method.toUpperCase()) !== null && _a !== void 0 ? _a : 'GET');\n}\nfunction isOffsetPagination(data) {\n if (data.offset !== undefined) {\n return true;\n }\n return false;\n}\nfunction isCursorPagination(data) {\n if (data.cursor !== undefined) {\n return true;\n }\n return false;\n}\nfunction nextFunc(url, options, data) {\n if (isOffsetPagination(data)) {\n if ((data === null || data === void 0 ? void 0 : data.more) && typeof data.offset !== undefined && data.limit) {\n return () => apiRequest(url, {\n ...options,\n queryParameters: {\n ...options.queryParameters,\n limit: data.limit.toString(),\n offset: (data.limit + data.offset).toString(),\n },\n });\n }\n }\n else if (isCursorPagination(data)) {\n if (data === null || data === void 0 ? void 0 : data.cursor) {\n return () => apiRequest(url, {\n ...options,\n queryParameters: {\n ...options.queryParameters,\n cursor: data.cursor,\n limit: data.limit.toString(),\n },\n });\n }\n }\n return undefined;\n}\nfunction partialCall(apiParameters) {\n const partialParameters = apiParameters;\n const partial = ((apiParameters) => api({ ...partialParameters, ...apiParameters }));\n const shorthand = (method) => (endpoint, shorthandParameters) => api({\n endpoint,\n method,\n ...partialParameters,\n ...shorthandParameters,\n });\n partial.get = shorthand('get');\n partial.post = shorthand('post');\n partial.put = shorthand('put');\n partial.patch = shorthand('patch');\n partial.delete = shorthand('delete');\n partial.all = (endpoint, shorthandParameters) => {\n function allInner(responses) {\n const response = responses[responses.length - 1];\n if (!response.next) {\n // Base case, resolve and return all responses.\n return Promise.resolve(responses);\n }\n // If there are still more resources to get then concat and repeat.\n return response\n .next()\n .then(response => allInner(responses.concat([response])));\n }\n function repackResponses(responses) {\n // Repack the responses object to make it more user friendly.\n const repackedResponse = responses.shift(); // Use the first response to build the standard response object\n repackedResponse.data = [repackedResponse.data];\n responses.forEach(response => {\n repackedResponse.data = repackedResponse.data.concat(response.data);\n repackedResponse.resource = repackedResponse.resource.concat(response.resource);\n });\n return Promise.resolve(repackedResponse);\n }\n const method = 'get';\n return api({\n endpoint,\n method,\n ...partialParameters,\n ...shorthandParameters,\n })\n .then(response => allInner([response]))\n .then(responses => repackResponses(responses));\n };\n return partial;\n}\n//# sourceMappingURL=api.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.request = void 0;\n/* LEGACY-BROWSER-SUPPORT-START */\nconst cross_fetch_1 = require(\"cross-fetch\");\nconst browser_or_node_1 = require(\"browser-or-node\");\n/* LEGACY-BROWSER-SUPPORT-END */\nconst VERSION = '2.0.0';\nfunction request(url, options = {}) {\n const { queryParameters, requestTimeout = 30000 } = options;\n url = new URL(url.toString());\n url = applyParameters(url, queryParameters);\n options = applyTimeout(options, requestTimeout);\n return fetch_retry(url.toString(), 3, {\n ...options,\n headers: new cross_fetch_1.Headers({\n 'Content-Type': 'application/json; charset=utf-8',\n /* LEGACY-BROWSER-SUPPORT-START */\n ...userAgentHeader(),\n /* LEGACY-BROWSER-SUPPORT-END */\n ...options.headers,\n }),\n });\n}\nexports.request = request;\nfunction fetch_retry(url, retries, options) {\n return new Promise((resolve, reject) => {\n (0, cross_fetch_1.default)(url, options)\n .then(response => {\n // We don't want to `reject` when retries have finished\n // Instead simply stop trying and return.\n if (retries === 0)\n return resolve(response);\n if (response.status === 429) {\n const { retryTimeout = 20000 } = options;\n retryTimeoutPromise(retryTimeout).then(() => {\n fetch_retry(url, retries - 1, options)\n .then(resolve)\n .catch(reject);\n });\n }\n else {\n clearTimeout(options.requestTimer);\n resolve(response);\n }\n })\n .catch(reject);\n });\n}\nconst retryTimeoutPromise = (milliseconds) => {\n return new Promise(resolve => setTimeout(resolve, milliseconds));\n};\nfunction userAgentHeader() {\n if (browser_or_node_1.isNode) {\n return {\n 'User-Agent': `pdjs/${VERSION} (${process.version}/${process.platform})`,\n };\n }\n else if (browser_or_node_1.isWebWorker) {\n return {\n 'User-Agent': `pdjs/${VERSION} (WebWorker)`,\n };\n }\n else if (browser_or_node_1.isJsDom) {\n return {\n 'User-Agent': `pdjs/${VERSION} (JsDom)`,\n };\n }\n else if (browser_or_node_1.isDeno) {\n return {\n 'User-Agent': `pdjs/${VERSION} (Deno)`,\n };\n }\n else if (browser_or_node_1.isBrowser) {\n return {\n // Note: This will not work consistently for all browsers as some silently drop the userAgent Header.\n 'User-Agent': `pdjs/${VERSION} (${window.navigator.userAgent})`,\n };\n }\n else {\n return {};\n }\n}\nfunction applyParameters(url, queryParameters) {\n if (!queryParameters)\n return url;\n const combinedParameters = url.searchParams;\n for (const key of Object.keys(queryParameters)) {\n const parameter = queryParameters[key];\n if (Array.isArray(parameter)) {\n // Support for array based keys like `additional_fields[]`\n parameter.forEach(item => {\n combinedParameters.append(key, item);\n });\n }\n else {\n combinedParameters.append(key, parameter);\n }\n }\n url.search = combinedParameters.toString();\n return url;\n}\nfunction applyTimeout(init, timeout) {\n if (!timeout)\n return init;\n const timer = setTimeout(() => { }, timeout);\n return {\n ...init,\n requestTimer: timer,\n };\n}\n//# sourceMappingURL=common.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.change = exports.resolve = exports.acknowledge = exports.trigger = exports.event = void 0;\nconst common_1 = require(\"./common\");\nfunction event(eventParameters) {\n const { server = 'events.pagerduty.com', type = 'event', data, ...config } = eventParameters;\n let url = `https://${server}/v2/enqueue`;\n if (type === 'change') {\n url = `https://${server}/v2/change/enqueue`;\n }\n return eventFetch(url, {\n method: 'POST',\n body: JSON.stringify(data),\n ...config,\n });\n}\nexports.event = event;\nconst shorthand = (action) => (eventParameters) => {\n const typeField = 'event_action';\n return event({\n ...eventParameters,\n data: {\n ...eventParameters.data,\n [typeField]: action,\n },\n });\n};\nexports.trigger = shorthand('trigger');\nexports.acknowledge = shorthand('acknowledge');\nexports.resolve = shorthand('resolve');\nconst change = (eventParameters) => event({ ...eventParameters, type: 'change' });\nexports.change = change;\nfunction eventFetch(url, options) {\n return (0, common_1.request)(url, options).then((response) => {\n const apiResponse = response;\n return response.json().then((data) => {\n apiResponse.data = data;\n apiResponse.response = response;\n return apiResponse;\n });\n });\n}\n//# sourceMappingURL=events.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolve = exports.acknowledge = exports.trigger = exports.change = exports.event = exports.api = void 0;\nvar api_1 = require(\"./api\");\nObject.defineProperty(exports, \"api\", { enumerable: true, get: function () { return api_1.api; } });\nvar events_1 = require(\"./events\");\nObject.defineProperty(exports, \"event\", { enumerable: true, get: function () { return events_1.event; } });\nObject.defineProperty(exports, \"change\", { enumerable: true, get: function () { return events_1.change; } });\nObject.defineProperty(exports, \"trigger\", { enumerable: true, get: function () { return events_1.trigger; } });\nObject.defineProperty(exports, \"acknowledge\", { enumerable: true, get: function () { return events_1.acknowledge; } });\nObject.defineProperty(exports, \"resolve\", { enumerable: true, get: function () { return events_1.resolve; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IncomingWebhook = void 0;\nconst axios_1 = __importDefault(require(\"axios\"));\nconst errors_1 = require(\"./errors\");\nconst instrument_1 = require(\"./instrument\");\n/**\n * A client for Slack's Incoming Webhooks\n */\nclass IncomingWebhook {\n constructor(url, defaults = {\n timeout: 0,\n }) {\n if (url === undefined) {\n throw new Error('Incoming webhook URL is required');\n }\n this.url = url;\n this.defaults = defaults;\n this.axios = axios_1.default.create({\n baseURL: url,\n httpAgent: defaults.agent,\n httpsAgent: defaults.agent,\n maxRedirects: 0,\n proxy: false,\n timeout: defaults.timeout,\n headers: {\n 'User-Agent': (0, instrument_1.getUserAgent)(),\n },\n });\n delete this.defaults.agent;\n }\n /**\n * Send a notification to a conversation\n * @param message - the message (a simple string, or an object describing the message)\n */\n async send(message) {\n // NOTE: no support for TLS config\n let payload = Object.assign({}, this.defaults);\n if (typeof message === 'string') {\n payload.text = message;\n }\n else {\n payload = Object.assign(payload, message);\n }\n try {\n const response = await this.axios.post(this.url, payload);\n return this.buildResult(response);\n }\n catch (error) {\n // Wrap errors in this packages own error types (abstract the implementation details' types)\n if (error.response !== undefined) {\n throw (0, errors_1.httpErrorWithOriginal)(error);\n }\n else if (error.request !== undefined) {\n throw (0, errors_1.requestErrorWithOriginal)(error);\n }\n else {\n throw error;\n }\n }\n }\n /**\n * Processes an HTTP response into an IncomingWebhookResult.\n */\n // eslint-disable-next-line class-methods-use-this\n buildResult(response) {\n return {\n text: response.data,\n };\n }\n}\nexports.IncomingWebhook = IncomingWebhook;\n//# sourceMappingURL=IncomingWebhook.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.httpErrorWithOriginal = exports.requestErrorWithOriginal = exports.ErrorCode = void 0;\n/**\n * A dictionary of codes for errors produced by this package\n */\nvar ErrorCode;\n(function (ErrorCode) {\n ErrorCode[\"RequestError\"] = \"slack_webhook_request_error\";\n ErrorCode[\"HTTPError\"] = \"slack_webhook_http_error\";\n})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));\n/**\n * Factory for producing a {@link CodedError} from a generic error\n */\nfunction errorWithCode(error, code) {\n // NOTE: might be able to return something more specific than a CodedError with conditional typing\n const codedError = error;\n codedError.code = code;\n return codedError;\n}\n/**\n * A factory to create IncomingWebhookRequestError objects\n * @param original The original error\n */\nfunction requestErrorWithOriginal(original) {\n const error = errorWithCode(new Error(`A request error occurred: ${original.message}`), ErrorCode.RequestError);\n error.original = original;\n return error;\n}\nexports.requestErrorWithOriginal = requestErrorWithOriginal;\n/**\n * A factory to create IncomingWebhookHTTPError objects\n * @param original The original error\n */\nfunction httpErrorWithOriginal(original) {\n const error = errorWithCode(new Error(`An HTTP protocol error occurred: statusCode = ${original.response.status}`), ErrorCode.HTTPError);\n error.original = original;\n return error;\n}\nexports.httpErrorWithOriginal = httpErrorWithOriginal;\n//# sourceMappingURL=errors.js.map","\"use strict\";\n/// \nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ErrorCode = exports.IncomingWebhook = void 0;\nvar IncomingWebhook_1 = require(\"./IncomingWebhook\");\nObject.defineProperty(exports, \"IncomingWebhook\", { enumerable: true, get: function () { return IncomingWebhook_1.IncomingWebhook; } });\nvar errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"ErrorCode\", { enumerable: true, get: function () { return errors_1.ErrorCode; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUserAgent = exports.addAppMetadata = void 0;\nconst os = __importStar(require(\"os\"));\nconst packageJson = require('../package.json'); // eslint-disable-line import/no-commonjs, @typescript-eslint/no-var-requires\n/**\n * Replaces occurrences of '/' with ':' in a string, since '/' is meaningful inside User-Agent strings as a separator.\n */\nfunction replaceSlashes(s) {\n return s.replace('/', ':');\n}\nconst baseUserAgent = `${replaceSlashes(packageJson.name)}/${packageJson.version} ` +\n `node/${process.version.replace('v', '')} ` +\n `${os.platform()}/${os.release()}`;\nconst appMetadata = {};\n/**\n * Appends the app metadata into the User-Agent value\n * @param appMetadata.name name of tool to be counted in instrumentation\n * @param appMetadata.version version of tool to be counted in instrumentation\n */\nfunction addAppMetadata({ name, version }) {\n appMetadata[replaceSlashes(name)] = version;\n}\nexports.addAppMetadata = addAppMetadata;\n/**\n * Returns the current User-Agent value for instrumentation\n */\nfunction getUserAgent() {\n const appIdentifier = Object.entries(appMetadata).map(([name, version]) => `${name}/${version}`).join(' ');\n // only prepend the appIdentifier when its not empty\n return ((appIdentifier.length > 0) ? `${appIdentifier} ` : '') + baseUserAgent;\n}\nexports.getUserAgent = getUserAgent;\n//# sourceMappingURL=instrument.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LoginRequestResponse = exports.ErrorResponse = exports.SuccessResponse = exports.ActivityResponse = exports.ActivityRequestError = exports.ActivityRequestTrigger = void 0;\nvar ActivityRequestTrigger;\n(function (ActivityRequestTrigger) {\n ActivityRequestTrigger[\"Automatic\"] = \"automatic\";\n ActivityRequestTrigger[\"Manual\"] = \"manual\";\n})(ActivityRequestTrigger = exports.ActivityRequestTrigger || (exports.ActivityRequestTrigger = {}));\nvar ActivityRequestError = /** @class */ (function () {\n function ActivityRequestError(code, message) {\n this.code = code;\n this.message = message;\n }\n return ActivityRequestError;\n}());\nexports.ActivityRequestError = ActivityRequestError;\nvar ActivityResponse = /** @class */ (function () {\n function ActivityResponse(request) {\n this.request = request;\n }\n return ActivityResponse;\n}());\nexports.ActivityResponse = ActivityResponse;\nvar SuccessResponse = /** @class */ (function (_super) {\n __extends(SuccessResponse, _super);\n function SuccessResponse(request, rawContent) {\n var _this = _super.call(this, request) || this;\n _this.request = request;\n _this.rawContent = rawContent;\n return _this;\n }\n return SuccessResponse;\n}(ActivityResponse));\nexports.SuccessResponse = SuccessResponse;\nvar ErrorResponse = /** @class */ (function (_super) {\n __extends(ErrorResponse, _super);\n function ErrorResponse(request, error) {\n var _this = _super.call(this, request) || this;\n _this.request = request;\n _this.error = error;\n return _this;\n }\n return ErrorResponse;\n}(ActivityResponse));\nexports.ErrorResponse = ErrorResponse;\nvar LoginRequestResponse = /** @class */ (function (_super) {\n __extends(LoginRequestResponse, _super);\n function LoginRequestResponse(request, _auth) {\n var _this = _super.call(this, request) || this;\n _this.request = request;\n _this._auth = _auth;\n for (var _i = 0, _a = _this._auth.buttons; _i < _a.length; _i++) {\n var button = _a[_i];\n if (button.type === \"signin\" && button.value !== undefined) {\n try {\n new URL(button.value);\n _this.signinButton = button;\n break;\n }\n catch (e) {\n // Ignore parsing error\n }\n }\n }\n return _this;\n }\n Object.defineProperty(LoginRequestResponse.prototype, \"tokenExchangeResource\", {\n get: function () {\n return this._auth.tokenExchangeResource;\n },\n enumerable: false,\n configurable: true\n });\n return LoginRequestResponse;\n}(ActivityResponse));\nexports.LoginRequestResponse = LoginRequestResponse;\n//# sourceMappingURL=activity-request.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AdaptiveApplet = void 0;\nvar Enums = require(\"./enums\");\nvar Utils = require(\"./utils\");\nvar shared_1 = require(\"./shared\");\nvar activity_request_1 = require(\"./activity-request\");\nvar strings_1 = require(\"./strings\");\nvar card_elements_1 = require(\"./card-elements\");\nvar serialization_1 = require(\"./serialization\");\nfunction logEvent(level, message) {\n var optionalParams = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n optionalParams[_i - 2] = arguments[_i];\n }\n if (shared_1.GlobalSettings.applets.logEnabled) {\n if (shared_1.GlobalSettings.applets.onLogEvent) {\n shared_1.GlobalSettings.applets.onLogEvent(level, message, optionalParams);\n }\n else {\n switch (level) {\n case Enums.LogLevel.Warning:\n console.warn(message, optionalParams);\n break;\n case Enums.LogLevel.Error:\n console.error(message, optionalParams);\n break;\n default:\n console.log(message, optionalParams);\n break;\n }\n }\n }\n}\nvar ActivityRequest = /** @class */ (function () {\n function ActivityRequest(action, trigger, consecutiveRefreshes) {\n this.action = action;\n this.trigger = trigger;\n this.consecutiveRefreshes = consecutiveRefreshes;\n this.attemptNumber = 0;\n }\n ActivityRequest.prototype.retryAsync = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (this.onSend) {\n this.onSend(this);\n }\n return [2 /*return*/];\n });\n });\n };\n return ActivityRequest;\n}());\nvar AdaptiveApplet = /** @class */ (function () {\n function AdaptiveApplet() {\n this._allowAutomaticCardUpdate = false;\n this.renderedElement = document.createElement(\"div\");\n this.renderedElement.className = \"aaf-cardHost\";\n this.renderedElement.style.position = \"relative\";\n this.renderedElement.style.display = \"flex\";\n this.renderedElement.style.flexDirection = \"column\";\n this._cardHostElement = document.createElement(\"div\");\n this._refreshButtonHostElement = document.createElement(\"div\");\n this._refreshButtonHostElement.className = \"aaf-refreshButtonHost\";\n this._refreshButtonHostElement.style.display = \"none\";\n this.renderedElement.appendChild(this._cardHostElement);\n this.renderedElement.appendChild(this._refreshButtonHostElement);\n }\n AdaptiveApplet.prototype.displayCard = function (card) {\n if (card.renderedElement) {\n Utils.clearElementChildren(this._cardHostElement);\n this._refreshButtonHostElement.style.display = \"none\";\n this._cardHostElement.appendChild(card.renderedElement);\n }\n else {\n throw new Error(\"displayCard: undefined card.\");\n }\n };\n AdaptiveApplet.prototype.showManualRefreshButton = function (refreshAction) {\n var _this = this;\n var displayBuiltInManualRefreshButton = this.onShowManualRefreshButton ? this.onShowManualRefreshButton(this) : true;\n if (displayBuiltInManualRefreshButton) {\n this._refreshButtonHostElement.style.display = \"none\";\n var renderedRefreshButton = undefined;\n if (this.onRenderManualRefreshButton) {\n renderedRefreshButton = this.onRenderManualRefreshButton(this);\n }\n else {\n var message = strings_1.Strings.runtime.refreshThisCard();\n if (shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Automatic) {\n var autoRefreshPausedMessage = strings_1.Strings.runtime.automaticRefreshPaused();\n if (autoRefreshPausedMessage[autoRefreshPausedMessage.length - 1] !== \" \") {\n autoRefreshPausedMessage += \" \";\n }\n message = strings_1.Strings.runtime.clckToRestartAutomaticRefresh();\n }\n var cardPayload = {\n type: \"AdaptiveCard\",\n version: \"1.2\",\n body: [\n {\n type: \"RichTextBlock\",\n horizontalAlignment: \"right\",\n inlines: [\n {\n type: \"TextRun\",\n text: message,\n selectAction: {\n type: \"Action.Submit\",\n id: \"refreshCard\"\n }\n }\n ]\n }\n ]\n };\n var card = new card_elements_1.AdaptiveCard();\n card.parse(cardPayload, new card_elements_1.SerializationContext(serialization_1.Versions.v1_2));\n card.onExecuteAction = function (action) {\n if (action.id === \"refreshCard\") {\n Utils.clearElementChildren(_this._refreshButtonHostElement);\n _this.internalExecuteAction(refreshAction, activity_request_1.ActivityRequestTrigger.Automatic, 0);\n }\n };\n renderedRefreshButton = card.render();\n }\n if (renderedRefreshButton) {\n Utils.clearElementChildren(this._refreshButtonHostElement);\n this._refreshButtonHostElement.appendChild(renderedRefreshButton);\n this._refreshButtonHostElement.style.removeProperty(\"display\");\n }\n }\n };\n AdaptiveApplet.prototype.createActivityRequest = function (action, trigger, consecutiveRefreshes) {\n var _this = this;\n if (this.card) {\n var request_1 = new ActivityRequest(action, trigger, consecutiveRefreshes);\n request_1.onSend = function (sender) {\n sender.attemptNumber++;\n _this.internalSendActivityRequestAsync(request_1);\n };\n var cancel = this.onPrepareActivityRequest ? !this.onPrepareActivityRequest(this, request_1, action) : false;\n return cancel ? undefined : request_1;\n }\n else {\n throw new Error(\"createActivityRequest: no card has been set.\");\n }\n };\n AdaptiveApplet.prototype.createMagicCodeInputCard = function (attemptNumber) {\n var payload = {\n type: \"AdaptiveCard\",\n version: \"1.0\",\n body: [\n {\n type: \"TextBlock\",\n color: \"attention\",\n text: attemptNumber === 1 ? undefined : \"That didn't work... let's try again.\",\n wrap: true,\n horizontalAlignment: \"center\"\n },\n {\n type: \"TextBlock\",\n text: \"Please login in the popup. You will obtain a magic code. Paste that code below and select \\\"Submit\\\"\",\n wrap: true,\n horizontalAlignment: \"center\"\n },\n {\n type: \"Input.Text\",\n id: \"magicCode\",\n placeholder: \"Enter magic code\"\n },\n {\n type: \"ActionSet\",\n horizontalAlignment: \"center\",\n actions: [\n {\n type: \"Action.Submit\",\n id: AdaptiveApplet.submitMagicCodeActionId,\n title: \"Submit\"\n },\n {\n type: \"Action.Submit\",\n id: AdaptiveApplet.cancelMagicCodeAuthActionId,\n title: \"Cancel\"\n }\n ]\n }\n ]\n };\n var card = new card_elements_1.AdaptiveCard();\n card.parse(payload);\n return card;\n };\n AdaptiveApplet.prototype.cancelAutomaticRefresh = function () {\n if (this._allowAutomaticCardUpdate) {\n logEvent(Enums.LogLevel.Warning, \"Automatic card refresh has been cancelled as a result of the user interacting with the card.\");\n }\n this._allowAutomaticCardUpdate = false;\n };\n AdaptiveApplet.prototype.createSerializationContext = function () {\n return this.onCreateSerializationContext ? this.onCreateSerializationContext(this) : new card_elements_1.SerializationContext();\n };\n AdaptiveApplet.prototype.internalSetCard = function (payload, consecutiveRefreshes) {\n var _this = this;\n if (typeof payload === \"object\" && payload[\"type\"] === \"AdaptiveCard\") {\n this._cardPayload = payload;\n }\n if (this._cardPayload) {\n try {\n var card = new card_elements_1.AdaptiveCard();\n if (this.hostConfig) {\n card.hostConfig = this.hostConfig;\n }\n var serializationContext = this.createSerializationContext();\n card.parse(this._cardPayload, serializationContext);\n var doChangeCard = this.onCardChanging ? this.onCardChanging(this, this._cardPayload) : true;\n if (doChangeCard) {\n this._card = card;\n if (this._card.authentication && this._card.authentication.tokenExchangeResource && this.onPrefetchSSOToken) {\n this.onPrefetchSSOToken(this, this._card.authentication.tokenExchangeResource);\n }\n this._card.onExecuteAction = function (action) {\n // If the user takes an action, cancel any pending automatic refresh\n _this.cancelAutomaticRefresh();\n _this.internalExecuteAction(action, activity_request_1.ActivityRequestTrigger.Manual, 0);\n };\n this._card.onInputValueChanged = function (input) {\n // If the user modifies an input, cancel any pending automatic refresh\n _this.cancelAutomaticRefresh();\n };\n this._card.render();\n if (this._card.renderedElement) {\n this.displayCard(this._card);\n if (this.onCardChanged) {\n this.onCardChanged(this);\n }\n if (this._card.refresh) {\n if (shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Automatic && consecutiveRefreshes < shared_1.GlobalSettings.applets.refresh.maximumConsecutiveAutomaticRefreshes) {\n if (shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes <= 0) {\n logEvent(Enums.LogLevel.Info, \"Triggering automatic card refresh number \" + (consecutiveRefreshes + 1));\n this.internalExecuteAction(this._card.refresh.action, activity_request_1.ActivityRequestTrigger.Automatic, consecutiveRefreshes + 1);\n }\n else {\n logEvent(Enums.LogLevel.Info, \"Scheduling automatic card refresh number \" + (consecutiveRefreshes + 1) + \" in \" + shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes + \"ms\");\n var action_1 = this._card.refresh.action;\n this._allowAutomaticCardUpdate = true;\n window.setTimeout(function () {\n if (_this._allowAutomaticCardUpdate) {\n _this.internalExecuteAction(action_1, activity_request_1.ActivityRequestTrigger.Automatic, consecutiveRefreshes + 1);\n }\n }, shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes);\n }\n }\n else if (shared_1.GlobalSettings.applets.refresh.mode !== Enums.RefreshMode.Disabled) {\n if (consecutiveRefreshes > 0) {\n logEvent(Enums.LogLevel.Warning, \"Stopping automatic refreshes after \" + consecutiveRefreshes + \" consecutive refreshes.\");\n }\n else {\n logEvent(Enums.LogLevel.Warning, \"The card has a refresh section, but automatic refreshes are disabled.\");\n }\n if (shared_1.GlobalSettings.applets.refresh.allowManualRefreshesAfterAutomaticRefreshes || shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Manual) {\n logEvent(Enums.LogLevel.Info, \"Showing manual refresh button.\");\n this.showManualRefreshButton(this._card.refresh.action);\n }\n }\n }\n }\n }\n }\n catch (error) {\n // Ignore all errors\n logEvent(Enums.LogLevel.Error, \"setCard: \" + error);\n }\n }\n };\n AdaptiveApplet.prototype.internalExecuteAction = function (action, trigger, consecutiveRefreshes) {\n if (action instanceof card_elements_1.ExecuteAction) {\n if (this.channelAdapter) {\n var request = this.createActivityRequest(action, trigger, consecutiveRefreshes);\n if (request) {\n request.retryAsync();\n }\n }\n else {\n throw new Error(\"internalExecuteAction: No channel adapter set.\");\n }\n }\n if (this.onAction) {\n this.onAction(this, action);\n }\n };\n AdaptiveApplet.prototype.createProgressOverlay = function (request) {\n if (!this._progressOverlay) {\n if (this.onCreateProgressOverlay) {\n this._progressOverlay = this.onCreateProgressOverlay(this, request);\n }\n else {\n this._progressOverlay = document.createElement(\"div\");\n this._progressOverlay.className = \"aaf-progress-overlay\";\n var spinner = document.createElement(\"div\");\n spinner.className = \"aaf-spinner\";\n spinner.style.width = \"28px\";\n spinner.style.height = \"28px\";\n this._progressOverlay.appendChild(spinner);\n }\n }\n return this._progressOverlay;\n };\n AdaptiveApplet.prototype.removeProgressOverlay = function (request) {\n if (this.onRemoveProgressOverlay) {\n this.onRemoveProgressOverlay(this, request);\n }\n if (this._progressOverlay !== undefined) {\n this.renderedElement.removeChild(this._progressOverlay);\n this._progressOverlay = undefined;\n }\n };\n AdaptiveApplet.prototype.activityRequestSucceeded = function (response, parsedContent) {\n if (this.onActivityRequestSucceeded) {\n this.onActivityRequestSucceeded(this, response, parsedContent);\n }\n };\n AdaptiveApplet.prototype.activityRequestFailed = function (response) {\n return this.onActivityRequestFailed ? this.onActivityRequestFailed(this, response) : shared_1.GlobalSettings.applets.defaultTimeBetweenRetryAttempts;\n };\n AdaptiveApplet.prototype.showAuthCodeInputDialog = function (request) {\n var _this = this;\n var showBuiltInAuthCodeInputCard = this.onShowAuthCodeInputDialog ? this.onShowAuthCodeInputDialog(this, request) : true;\n if (showBuiltInAuthCodeInputCard) {\n var authCodeInputCard = this.createMagicCodeInputCard(request.attemptNumber);\n authCodeInputCard.render();\n authCodeInputCard.onExecuteAction = function (submitMagicCodeAction) {\n if (_this.card && submitMagicCodeAction instanceof card_elements_1.SubmitAction) {\n switch (submitMagicCodeAction.id) {\n case AdaptiveApplet.submitMagicCodeActionId:\n var authCode = undefined;\n if (submitMagicCodeAction.data && typeof submitMagicCodeAction.data[\"magicCode\"] === \"string\") {\n authCode = submitMagicCodeAction.data[\"magicCode\"];\n }\n if (authCode) {\n _this.displayCard(_this.card);\n request.authCode = authCode;\n request.retryAsync();\n }\n else {\n alert(\"Please enter the magic code you received.\");\n }\n break;\n case AdaptiveApplet.cancelMagicCodeAuthActionId:\n logEvent(Enums.LogLevel.Warning, \"Authentication cancelled by user.\");\n _this.displayCard(_this.card);\n break;\n default:\n logEvent(Enums.LogLevel.Error, \"Unespected action taken from magic code input card (id = \" + submitMagicCodeAction.id + \")\");\n alert(strings_1.Strings.magicCodeInputCard.somethingWentWrong());\n break;\n }\n }\n };\n this.displayCard(authCodeInputCard);\n }\n };\n AdaptiveApplet.prototype.internalSendActivityRequestAsync = function (request) {\n return __awaiter(this, void 0, void 0, function () {\n var overlay, done, _loop_1, this_1, state_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.channelAdapter) {\n throw new Error(\"internalSendActivityRequestAsync: channelAdapter is not set.\");\n }\n overlay = this.createProgressOverlay(request);\n if (overlay !== undefined) {\n this.renderedElement.appendChild(overlay);\n }\n done = false;\n _loop_1 = function () {\n var response, error_1, parsedContent, retryIn_1, attemptOAuth, left, top_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n response = undefined;\n if (request.attemptNumber === 1) {\n logEvent(Enums.LogLevel.Info, \"Sending activity request to channel (attempt \" + request.attemptNumber + \")\");\n }\n else {\n logEvent(Enums.LogLevel.Info, \"Re-sending activity request to channel (attempt \" + request.attemptNumber + \")\");\n }\n _b.label = 1;\n case 1:\n _b.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this_1.channelAdapter.sendRequestAsync(request)];\n case 2:\n response = _b.sent();\n return [3 /*break*/, 4];\n case 3:\n error_1 = _b.sent();\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \" + error_1);\n this_1.removeProgressOverlay(request);\n done = true;\n return [3 /*break*/, 4];\n case 4:\n if (!response) return [3 /*break*/, 10];\n if (!(response instanceof activity_request_1.SuccessResponse)) return [3 /*break*/, 5];\n this_1.removeProgressOverlay(request);\n if (response.rawContent === undefined) {\n throw new Error(\"internalSendActivityRequestAsync: Action.Execute result is undefined\");\n }\n parsedContent = response.rawContent;\n try {\n parsedContent = JSON.parse(response.rawContent);\n }\n catch (_c) {\n // Leave parseContent as is\n }\n if (typeof parsedContent === \"string\") {\n logEvent(Enums.LogLevel.Info, \"The activity request returned a string after \" + request.attemptNumber + \" attempt(s).\");\n this_1.activityRequestSucceeded(response, parsedContent);\n }\n else if (typeof parsedContent === \"object\" && parsedContent[\"type\"] === \"AdaptiveCard\") {\n logEvent(Enums.LogLevel.Info, \"The activity request returned an Adaptive Card after \" + request.attemptNumber + \" attempt(s).\");\n this_1.internalSetCard(parsedContent, request.consecutiveRefreshes);\n this_1.activityRequestSucceeded(response, this_1.card);\n }\n else {\n throw new Error(\"internalSendActivityRequestAsync: Action.Execute result is of unsupported type (\" + typeof response.rawContent + \")\");\n }\n done = true;\n return [3 /*break*/, 10];\n case 5:\n if (!(response instanceof activity_request_1.ErrorResponse)) return [3 /*break*/, 9];\n retryIn_1 = this_1.activityRequestFailed(response);\n if (!(retryIn_1 >= 0 && request.attemptNumber < shared_1.GlobalSettings.applets.maximumRetryAttempts)) return [3 /*break*/, 7];\n logEvent(Enums.LogLevel.Warning, \"Activity request failed: \" + response.error.message + \". Retrying in \" + retryIn_1 + \"ms\");\n request.attemptNumber++;\n return [4 /*yield*/, new Promise(function (resolve, reject) {\n window.setTimeout(function () { resolve(); }, retryIn_1);\n })];\n case 6:\n _b.sent();\n return [3 /*break*/, 8];\n case 7:\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \" + response.error.message + \". Giving up after \" + request.attemptNumber + \" attempt(s)\");\n this_1.removeProgressOverlay(request);\n done = true;\n _b.label = 8;\n case 8: return [3 /*break*/, 10];\n case 9:\n if (response instanceof activity_request_1.LoginRequestResponse) {\n logEvent(Enums.LogLevel.Info, \"The activity request returned a LoginRequestResponse after \" + request.attemptNumber + \" attempt(s).\");\n if (request.attemptNumber <= shared_1.GlobalSettings.applets.maximumRetryAttempts) {\n attemptOAuth = true;\n if (response.tokenExchangeResource && this_1.onSSOTokenNeeded) {\n // Attempt to use SSO. The host will return true if it can handle SSO, in which case\n // we bypass OAuth\n attemptOAuth = !this_1.onSSOTokenNeeded(this_1, request, response.tokenExchangeResource);\n }\n if (attemptOAuth) {\n // Attempt to use OAuth\n this_1.removeProgressOverlay(request);\n if (response.signinButton === undefined) {\n throw new Error(\"internalSendActivityRequestAsync: the login request doesn't contain a valid signin URL.\");\n }\n logEvent(Enums.LogLevel.Info, \"Login required at \" + response.signinButton.value);\n if (this_1.onShowSigninPrompt) {\n // Bypass the built-in auth prompt if the host app handles it\n this_1.onShowSigninPrompt(this_1, request, response.signinButton);\n }\n else {\n this_1.showAuthCodeInputDialog(request);\n left = window.screenX + (window.outerWidth - shared_1.GlobalSettings.applets.authPromptWidth) / 2;\n top_1 = window.screenY + (window.outerHeight - shared_1.GlobalSettings.applets.authPromptHeight) / 2;\n window.open(response.signinButton.value, response.signinButton.title ? response.signinButton.title : \"Sign in\", \"width=\" + shared_1.GlobalSettings.applets.authPromptWidth + \",height=\" + shared_1.GlobalSettings.applets.authPromptHeight + \",left=\" + left + \",top=\" + top_1);\n }\n }\n }\n else {\n logEvent(Enums.LogLevel.Error, \"Authentication failed. Giving up after \" + request.attemptNumber + \" attempt(s)\");\n alert(strings_1.Strings.magicCodeInputCard.authenticationFailed());\n }\n return [2 /*return*/, \"break\"];\n }\n else {\n throw new Error(\"Unhandled response type: \" + response.toString());\n }\n _b.label = 10;\n case 10: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n _a.label = 1;\n case 1:\n if (!!done) return [3 /*break*/, 3];\n return [5 /*yield**/, _loop_1()];\n case 2:\n state_1 = _a.sent();\n if (state_1 === \"break\")\n return [3 /*break*/, 3];\n return [3 /*break*/, 1];\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n AdaptiveApplet.prototype.refreshCard = function () {\n if (this._card && this._card.refresh) {\n this.internalExecuteAction(this._card.refresh.action, activity_request_1.ActivityRequestTrigger.Manual, 0);\n }\n };\n AdaptiveApplet.prototype.setCard = function (payload) {\n this.internalSetCard(payload, 0);\n };\n Object.defineProperty(AdaptiveApplet.prototype, \"card\", {\n get: function () {\n return this._card;\n },\n enumerable: false,\n configurable: true\n });\n AdaptiveApplet.submitMagicCodeActionId = \"submitMagicCode\";\n AdaptiveApplet.cancelMagicCodeAuthActionId = \"cancelMagicCodeAuth\";\n return AdaptiveApplet;\n}());\nexports.AdaptiveApplet = AdaptiveApplet;\n//# sourceMappingURL=adaptive-applet.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n__exportStar(require(\"./strings\"), exports);\n__exportStar(require(\"./enums\"), exports);\n__exportStar(require(\"./shared\"), exports);\n__exportStar(require(\"./utils\"), exports);\n__exportStar(require(\"./serialization\"), exports);\n__exportStar(require(\"./host-capabilities\"), exports);\n__exportStar(require(\"./host-config\"), exports);\n__exportStar(require(\"./registry\"), exports);\n__exportStar(require(\"./card-object\"), exports);\n__exportStar(require(\"./card-elements\"), exports);\n__exportStar(require(\"./table\"), exports);\n__exportStar(require(\"./channel-adapter\"), exports);\n__exportStar(require(\"./activity-request\"), exports);\n__exportStar(require(\"./adaptive-applet\"), exports);\n//# sourceMappingURL=adaptivecards.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SerializationContext = exports.AdaptiveCard = exports.Authentication = exports.TokenExchangeResource = exports.AuthCardButton = exports.RefreshDefinition = exports.RefreshActionProperty = exports.ContainerWithActions = exports.ColumnSet = exports.Column = exports.Container = exports.BackgroundImage = exports.ContainerBase = exports.StylableCardElementContainer = exports.ContainerStyleProperty = exports.ActionSet = exports.ShowCardAction = exports.HttpAction = exports.HttpHeader = exports.ToggleVisibilityAction = exports.OpenUrlAction = exports.ExecuteAction = exports.SubmitAction = exports.SubmitActionBase = exports.Action = exports.TimeInput = exports.TimeProperty = exports.DateInput = exports.NumberInput = exports.ChoiceSetInput = exports.Choice = exports.ToggleInput = exports.TextInput = exports.Input = exports.Media = exports.MediaSource = exports.ImageSet = exports.CardElementContainer = exports.Image = exports.FactSet = exports.Fact = exports.RichTextBlock = exports.TextRun = exports.TextBlock = exports.BaseTextBlock = exports.ActionProperty = exports.CardElement = exports.renderSeparation = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Enums = require(\"./enums\");\nvar shared_1 = require(\"./shared\");\nvar Utils = require(\"./utils\");\nvar host_config_1 = require(\"./host-config\");\nvar TextFormatters = require(\"./text-formatters\");\nvar card_object_1 = require(\"./card-object\");\nvar serialization_1 = require(\"./serialization\");\nvar registry_1 = require(\"./registry\");\nvar strings_1 = require(\"./strings\");\nvar controls_1 = require(\"./controls\");\nfunction renderSeparation(hostConfig, separationDefinition, orientation) {\n if (separationDefinition.spacing > 0 || (separationDefinition.lineThickness && separationDefinition.lineThickness > 0)) {\n var separator = document.createElement(\"div\");\n separator.className = hostConfig.makeCssClassName(\"ac-\" + (orientation == Enums.Orientation.Horizontal ? \"horizontal\" : \"vertical\") + \"-separator\");\n separator.setAttribute(\"aria-hidden\", \"true\");\n var color = separationDefinition.lineColor ? Utils.stringToCssColor(separationDefinition.lineColor) : \"\";\n if (orientation == Enums.Orientation.Horizontal) {\n if (separationDefinition.lineThickness) {\n separator.style.paddingTop = (separationDefinition.spacing / 2) + \"px\";\n separator.style.marginBottom = (separationDefinition.spacing / 2) + \"px\";\n separator.style.borderBottom = separationDefinition.lineThickness + \"px solid \" + color;\n }\n else {\n separator.style.height = separationDefinition.spacing + \"px\";\n }\n }\n else {\n if (separationDefinition.lineThickness) {\n separator.style.paddingLeft = (separationDefinition.spacing / 2) + \"px\";\n separator.style.marginRight = (separationDefinition.spacing / 2) + \"px\";\n separator.style.borderRight = separationDefinition.lineThickness + \"px solid \" + color;\n }\n else {\n separator.style.width = separationDefinition.spacing + \"px\";\n }\n }\n separator.style.overflow = \"hidden\";\n separator.style.flex = \"0 0 auto\";\n return separator;\n }\n else {\n return undefined;\n }\n}\nexports.renderSeparation = renderSeparation;\nvar CardElement = /** @class */ (function (_super) {\n __extends(CardElement, _super);\n function CardElement() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._truncatedDueToOverflow = false;\n return _this;\n }\n Object.defineProperty(CardElement.prototype, \"lang\", {\n get: function () {\n var lang = this.getValue(CardElement.langProperty);\n if (lang) {\n return lang;\n }\n else {\n if (this.parent) {\n return this.parent.lang;\n }\n else {\n return undefined;\n }\n }\n },\n set: function (value) {\n this.setValue(CardElement.langProperty, value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"isVisible\", {\n get: function () {\n return this.getValue(CardElement.isVisibleProperty);\n },\n set: function (value) {\n // If the element is going to be hidden, reset any changes that were due\n // to overflow truncation (this ensures that if the element is later\n // un-hidden it has the right content)\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && !value) {\n this.undoOverflowTruncation();\n }\n if (this.isVisible !== value) {\n this.setValue(CardElement.isVisibleProperty, value);\n this.updateRenderedElementVisibility();\n if (this._renderedElement) {\n raiseElementVisibilityChangedEvent(this);\n }\n }\n if (this._renderedElement) {\n this._renderedElement.setAttribute(\"aria-expanded\", value.toString());\n }\n },\n enumerable: false,\n configurable: true\n });\n CardElement.prototype.internalRenderSeparator = function () {\n var renderedSeparator = renderSeparation(this.hostConfig, {\n spacing: this.hostConfig.getEffectiveSpacing(this.spacing),\n lineThickness: this.separator ? this.hostConfig.separator.lineThickness : undefined,\n lineColor: this.separator ? this.hostConfig.separator.lineColor : undefined\n }, this.separatorOrientation);\n if (shared_1.GlobalSettings.alwaysBleedSeparators && renderedSeparator && this.separatorOrientation == Enums.Orientation.Horizontal) {\n // Adjust separator's margins if the option to always bleed separators is turned on\n var parentContainer = this.getParentContainer();\n if (parentContainer && parentContainer.getEffectivePadding()) {\n var parentPhysicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(parentContainer.getEffectivePadding());\n renderedSeparator.style.marginLeft = \"-\" + parentPhysicalPadding.left + \"px\";\n renderedSeparator.style.marginRight = \"-\" + parentPhysicalPadding.right + \"px\";\n }\n }\n return renderedSeparator;\n };\n CardElement.prototype.updateRenderedElementVisibility = function () {\n var displayMode = this.isDesignMode() || this.isVisible ? this._defaultRenderedElementDisplayMode : \"none\";\n if (this._renderedElement) {\n if (displayMode) {\n this._renderedElement.style.display = displayMode;\n }\n else {\n this._renderedElement.style.removeProperty(\"display\");\n }\n }\n if (this._separatorElement) {\n if (this.parent && this.parent.isFirstElement(this)) {\n this._separatorElement.style.display = \"none\";\n }\n else {\n if (displayMode) {\n this._separatorElement.style.display = displayMode;\n }\n else {\n this._separatorElement.style.removeProperty(\"display\");\n }\n }\n }\n };\n CardElement.prototype.hideElementDueToOverflow = function () {\n if (this._renderedElement && this.isVisible) {\n this._renderedElement.style.visibility = \"hidden\";\n this.isVisible = false;\n raiseElementVisibilityChangedEvent(this, false);\n }\n };\n CardElement.prototype.showElementHiddenDueToOverflow = function () {\n if (this._renderedElement && !this.isVisible) {\n this._renderedElement.style.removeProperty(\"visibility\");\n this.isVisible = true;\n raiseElementVisibilityChangedEvent(this, false);\n }\n };\n // Marked private to emulate internal access\n CardElement.prototype.handleOverflow = function (maxHeight) {\n if (this.isVisible || this.isHiddenDueToOverflow()) {\n var handled = this.truncateOverflow(maxHeight);\n // Even if we were unable to truncate the element to fit this time,\n // it still could have been previously truncated\n this._truncatedDueToOverflow = handled || this._truncatedDueToOverflow;\n if (!handled) {\n this.hideElementDueToOverflow();\n }\n else if (handled && !this.isVisible) {\n this.showElementHiddenDueToOverflow();\n }\n }\n };\n // Marked private to emulate internal access\n CardElement.prototype.resetOverflow = function () {\n var sizeChanged = false;\n if (this._truncatedDueToOverflow) {\n this.undoOverflowTruncation();\n this._truncatedDueToOverflow = false;\n sizeChanged = true;\n }\n if (this.isHiddenDueToOverflow()) {\n this.showElementHiddenDueToOverflow();\n }\n return sizeChanged;\n };\n CardElement.prototype.getDefaultSerializationContext = function () {\n return new SerializationContext();\n };\n CardElement.prototype.createPlaceholderElement = function () {\n var styleDefinition = this.getEffectiveStyleDefinition();\n var foregroundCssColor = Utils.stringToCssColor(styleDefinition.foregroundColors.default.subtle);\n var element = document.createElement(\"div\");\n element.style.border = \"1px dashed \" + foregroundCssColor;\n element.style.padding = \"4px\";\n element.style.minHeight = \"32px\";\n element.style.fontSize = \"10px\";\n element.style.color = foregroundCssColor;\n element.innerText = \"Empty \" + this.getJsonTypeName();\n return element;\n };\n CardElement.prototype.adjustRenderedElementSize = function (renderedElement) {\n if (this.height === \"auto\") {\n renderedElement.style.flex = \"0 0 auto\";\n }\n else {\n renderedElement.style.flex = \"1 1 auto\";\n }\n };\n CardElement.prototype.isDisplayed = function () {\n return this._renderedElement !== undefined && this.isVisible && this._renderedElement.offsetHeight > 0;\n };\n CardElement.prototype.overrideInternalRender = function () {\n return this.internalRender();\n };\n CardElement.prototype.applyPadding = function () {\n if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) {\n if (shared_1.GlobalSettings.alwaysBleedSeparators && !this.isBleeding()) {\n var padding = new shared_1.PaddingDefinition();\n this.getImmediateSurroundingPadding(padding);\n var physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(padding);\n this.separatorElement.style.marginLeft = \"-\" + physicalPadding.left + \"px\";\n this.separatorElement.style.marginRight = \"-\" + physicalPadding.right + \"px\";\n }\n else {\n this.separatorElement.style.marginRight = \"0\";\n this.separatorElement.style.marginLeft = \"0\";\n }\n }\n };\n /*\n * Called when this element overflows the bottom of the card.\n * maxHeight will be the amount of space still available on the card (0 if\n * the element is fully off the card).\n */\n CardElement.prototype.truncateOverflow = function (maxHeight) {\n // Child implementations should return true if the element handled\n // the truncation request such that its content fits within maxHeight,\n // false if the element should fall back to being hidden\n return false;\n };\n /*\n * This should reverse any changes performed in truncateOverflow().\n */\n CardElement.prototype.undoOverflowTruncation = function () { };\n CardElement.prototype.getDefaultPadding = function () {\n return new shared_1.PaddingDefinition();\n };\n CardElement.prototype.getHasBackground = function () {\n return false;\n };\n CardElement.prototype.getHasBorder = function () {\n return false;\n };\n CardElement.prototype.getPadding = function () {\n return this._padding;\n };\n CardElement.prototype.setPadding = function (value) {\n this._padding = value;\n };\n CardElement.prototype.shouldSerialize = function (context) {\n return context.elementRegistry.findByName(this.getJsonTypeName()) !== undefined;\n };\n Object.defineProperty(CardElement.prototype, \"useDefaultSizing\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"separatorOrientation\", {\n get: function () {\n return Enums.Orientation.Horizontal;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"defaultStyle\", {\n get: function () {\n return Enums.ContainerStyle.Default;\n },\n enumerable: false,\n configurable: true\n });\n CardElement.prototype.parse = function (source, context) {\n _super.prototype.parse.call(this, source, context ? context : new SerializationContext());\n };\n CardElement.prototype.asString = function () {\n return \"\";\n };\n CardElement.prototype.isBleeding = function () {\n return false;\n };\n CardElement.prototype.getEffectiveStyle = function () {\n if (this.parent) {\n return this.parent.getEffectiveStyle();\n }\n return this.defaultStyle;\n };\n CardElement.prototype.getEffectiveStyleDefinition = function () {\n return this.hostConfig.containerStyles.getStyleByName(this.getEffectiveStyle());\n };\n CardElement.prototype.getEffectiveTextStyleDefinition = function () {\n if (this.parent) {\n return this.parent.getEffectiveTextStyleDefinition();\n }\n return this.hostConfig.textStyles.default;\n };\n CardElement.prototype.getForbiddenActionTypes = function () {\n return [];\n };\n CardElement.prototype.getImmediateSurroundingPadding = function (result, processTop, processRight, processBottom, processLeft) {\n if (processTop === void 0) { processTop = true; }\n if (processRight === void 0) { processRight = true; }\n if (processBottom === void 0) { processBottom = true; }\n if (processLeft === void 0) { processLeft = true; }\n if (this.parent) {\n var doProcessTop = processTop && this.parent.isTopElement(this);\n var doProcessRight = processRight && this.parent.isRightMostElement(this);\n var doProcessBottom = processBottom && this.parent.isBottomElement(this);\n var doProcessLeft = processLeft && this.parent.isLeftMostElement(this);\n var effectivePadding = this.parent.getEffectivePadding();\n if (effectivePadding) {\n if (doProcessTop && effectivePadding.top != Enums.Spacing.None) {\n result.top = effectivePadding.top;\n doProcessTop = false;\n }\n if (doProcessRight && effectivePadding.right != Enums.Spacing.None) {\n result.right = effectivePadding.right;\n doProcessRight = false;\n }\n if (doProcessBottom && effectivePadding.bottom != Enums.Spacing.None) {\n result.bottom = effectivePadding.bottom;\n doProcessBottom = false;\n }\n if (doProcessLeft && effectivePadding.left != Enums.Spacing.None) {\n result.left = effectivePadding.left;\n doProcessLeft = false;\n }\n }\n if (doProcessTop || doProcessRight || doProcessBottom || doProcessLeft) {\n this.parent.getImmediateSurroundingPadding(result, doProcessTop, doProcessRight, doProcessBottom, doProcessLeft);\n }\n }\n };\n CardElement.prototype.getActionCount = function () {\n return 0;\n };\n CardElement.prototype.getActionAt = function (index) {\n throw new Error(strings_1.Strings.errors.indexOutOfRange(index));\n };\n CardElement.prototype.indexOfAction = function (action) {\n for (var i = 0; i < this.getActionCount(); i++) {\n if (this.getActionAt(i) === action) {\n return i;\n }\n }\n return -1;\n };\n CardElement.prototype.remove = function () {\n if (this.parent && this.parent instanceof CardElementContainer) {\n return this.parent.removeItem(this);\n }\n return false;\n };\n CardElement.prototype.render = function () {\n this._renderedElement = this.overrideInternalRender();\n this._separatorElement = this.internalRenderSeparator();\n if (this._renderedElement) {\n if (this.id) {\n this._renderedElement.id = this.id;\n }\n if (this.customCssSelector) {\n this._renderedElement.classList.add(this.customCssSelector);\n }\n this._renderedElement.style.boxSizing = \"border-box\";\n this._defaultRenderedElementDisplayMode = this._renderedElement.style.display ? this._renderedElement.style.display : undefined;\n this.adjustRenderedElementSize(this._renderedElement);\n this.updateLayout(false);\n }\n else if (this.isDesignMode()) {\n this._renderedElement = this.createPlaceholderElement();\n }\n return this._renderedElement;\n };\n CardElement.prototype.updateLayout = function (processChildren) {\n if (processChildren === void 0) { processChildren = true; }\n this.updateRenderedElementVisibility();\n this.applyPadding();\n };\n CardElement.prototype.indexOf = function (cardElement) {\n return -1;\n };\n CardElement.prototype.isDesignMode = function () {\n var rootElement = this.getRootElement();\n return rootElement instanceof AdaptiveCard && rootElement.designMode;\n };\n CardElement.prototype.isFirstElement = function (element) {\n return true;\n };\n CardElement.prototype.isLastElement = function (element) {\n return true;\n };\n CardElement.prototype.isAtTheVeryLeft = function () {\n return this.parent ? this.parent.isLeftMostElement(this) && this.parent.isAtTheVeryLeft() : true;\n };\n CardElement.prototype.isAtTheVeryRight = function () {\n return this.parent ? this.parent.isRightMostElement(this) && this.parent.isAtTheVeryRight() : true;\n };\n CardElement.prototype.isAtTheVeryTop = function () {\n return this.parent ? this.parent.isFirstElement(this) && this.parent.isAtTheVeryTop() : true;\n };\n CardElement.prototype.isAtTheVeryBottom = function () {\n return this.parent ? this.parent.isLastElement(this) && this.parent.isAtTheVeryBottom() : true;\n };\n CardElement.prototype.isBleedingAtTop = function () {\n return false;\n };\n CardElement.prototype.isBleedingAtBottom = function () {\n return false;\n };\n CardElement.prototype.isLeftMostElement = function (element) {\n return true;\n };\n CardElement.prototype.isRightMostElement = function (element) {\n return true;\n };\n CardElement.prototype.isTopElement = function (element) {\n return this.isFirstElement(element);\n };\n CardElement.prototype.isBottomElement = function (element) {\n return this.isLastElement(element);\n };\n CardElement.prototype.isHiddenDueToOverflow = function () {\n return this._renderedElement !== undefined && this._renderedElement.style.visibility == 'hidden';\n };\n CardElement.prototype.getRootElement = function () {\n return this.getRootObject();\n };\n CardElement.prototype.getParentContainer = function () {\n var currentElement = this.parent;\n while (currentElement) {\n if (currentElement instanceof Container) {\n return currentElement;\n }\n currentElement = currentElement.parent;\n }\n return undefined;\n };\n CardElement.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n return [];\n };\n CardElement.prototype.getResourceInformation = function () {\n return [];\n };\n CardElement.prototype.getElementById = function (id) {\n return this.id === id ? this : undefined;\n };\n CardElement.prototype.getActionById = function (id) {\n return undefined;\n };\n CardElement.prototype.getEffectivePadding = function () {\n var padding = this.getPadding();\n return padding ? padding : this.getDefaultPadding();\n };\n CardElement.prototype.getEffectiveHorizontalAlignment = function () {\n if (this.horizontalAlignment !== undefined) {\n return this.horizontalAlignment;\n }\n if (this.parent) {\n return this.parent.getEffectiveHorizontalAlignment();\n }\n return Enums.HorizontalAlignment.Left;\n };\n Object.defineProperty(CardElement.prototype, \"hostConfig\", {\n get: function () {\n if (this._hostConfig) {\n return this._hostConfig;\n }\n else {\n if (this.parent) {\n return this.parent.hostConfig;\n }\n else {\n return host_config_1.defaultHostConfig;\n }\n }\n },\n set: function (value) {\n this._hostConfig = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"index\", {\n get: function () {\n if (this.parent) {\n return this.parent.indexOf(this);\n }\n else {\n return 0;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"isInteractive\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"isStandalone\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"isInline\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"hasVisibleSeparator\", {\n get: function () {\n if (this.parent && this.separatorElement) {\n return !this.parent.isFirstElement(this) && (this.isVisible || this.isDesignMode());\n }\n else {\n return false;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"separatorElement\", {\n get: function () {\n return this._separatorElement;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardElement.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: false,\n configurable: true\n });\n CardElement.langProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"lang\", true, /^[a-z]{2,3}$/ig);\n CardElement.isVisibleProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"isVisible\", true);\n CardElement.separatorProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"separator\", false);\n CardElement.heightProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_1, \"height\", [\n { value: \"auto\" },\n { value: \"stretch\" }\n ], \"auto\");\n CardElement.horizontalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"horizontalAlignment\", Enums.HorizontalAlignment);\n CardElement.spacingProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"spacing\", Enums.Spacing, Enums.Spacing.Default);\n __decorate([\n serialization_1.property(CardElement.horizontalAlignmentProperty)\n ], CardElement.prototype, \"horizontalAlignment\", void 0);\n __decorate([\n serialization_1.property(CardElement.spacingProperty)\n ], CardElement.prototype, \"spacing\", void 0);\n __decorate([\n serialization_1.property(CardElement.separatorProperty)\n ], CardElement.prototype, \"separator\", void 0);\n __decorate([\n serialization_1.property(CardElement.heightProperty)\n ], CardElement.prototype, \"height\", void 0);\n __decorate([\n serialization_1.property(CardElement.langProperty)\n ], CardElement.prototype, \"lang\", null);\n __decorate([\n serialization_1.property(CardElement.isVisibleProperty)\n ], CardElement.prototype, \"isVisible\", null);\n return CardElement;\n}(card_object_1.CardObject));\nexports.CardElement = CardElement;\nvar ActionProperty = /** @class */ (function (_super) {\n __extends(ActionProperty, _super);\n function ActionProperty(targetVersion, name, forbiddenActionTypes) {\n if (forbiddenActionTypes === void 0) { forbiddenActionTypes = []; }\n var _this = _super.call(this, targetVersion, name, undefined) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.forbiddenActionTypes = forbiddenActionTypes;\n return _this;\n }\n ActionProperty.prototype.parse = function (sender, source, context) {\n var parent = sender;\n return context.parseAction(parent, source[this.name], this.forbiddenActionTypes, parent.isDesignMode());\n };\n ActionProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeValue(target, this.name, value ? value.toJSON(context) : undefined, undefined, true);\n };\n return ActionProperty;\n}(serialization_1.PropertyDefinition));\nexports.ActionProperty = ActionProperty;\nvar BaseTextBlock = /** @class */ (function (_super) {\n __extends(BaseTextBlock, _super);\n function BaseTextBlock(text) {\n var _this = _super.call(this) || this;\n _this.ariaHidden = false;\n if (text) {\n _this.text = text;\n }\n return _this;\n }\n BaseTextBlock.prototype.populateSchema = function (schema) {\n _super.prototype.populateSchema.call(this, schema);\n // selectAction is declared on BaseTextBlock but is only exposed on TextRun,\n // so the property is removed from the BaseTextBlock schema.\n schema.remove(BaseTextBlock.selectActionProperty);\n };\n Object.defineProperty(BaseTextBlock.prototype, \"text\", {\n get: function () {\n return this.getValue(BaseTextBlock.textProperty);\n },\n set: function (value) {\n this.setText(value);\n },\n enumerable: false,\n configurable: true\n });\n //#endregion\n BaseTextBlock.prototype.getFontSize = function (fontType) {\n switch (this.effectiveSize) {\n case Enums.TextSize.Small:\n return fontType.fontSizes.small;\n case Enums.TextSize.Medium:\n return fontType.fontSizes.medium;\n case Enums.TextSize.Large:\n return fontType.fontSizes.large;\n case Enums.TextSize.ExtraLarge:\n return fontType.fontSizes.extraLarge;\n default:\n return fontType.fontSizes.default;\n }\n };\n BaseTextBlock.prototype.getColorDefinition = function (colorSet, color) {\n switch (color) {\n case Enums.TextColor.Accent:\n return colorSet.accent;\n case Enums.TextColor.Dark:\n return colorSet.dark;\n case Enums.TextColor.Light:\n return colorSet.light;\n case Enums.TextColor.Good:\n return colorSet.good;\n case Enums.TextColor.Warning:\n return colorSet.warning;\n case Enums.TextColor.Attention:\n return colorSet.attention;\n default:\n return colorSet.default;\n }\n };\n BaseTextBlock.prototype.setText = function (value) {\n this.setValue(BaseTextBlock.textProperty, value);\n };\n BaseTextBlock.prototype.init = function (textDefinition) {\n this.size = textDefinition.size;\n this.weight = textDefinition.weight;\n this.color = textDefinition.color;\n this.isSubtle = textDefinition.isSubtle;\n };\n BaseTextBlock.prototype.asString = function () {\n return this.text;\n };\n BaseTextBlock.prototype.applyStylesTo = function (targetElement) {\n var fontType = this.hostConfig.getFontTypeDefinition(this.effectiveFontType);\n if (fontType.fontFamily) {\n targetElement.style.fontFamily = fontType.fontFamily;\n }\n var fontSize;\n switch (this.effectiveSize) {\n case Enums.TextSize.Small:\n fontSize = fontType.fontSizes.small;\n break;\n case Enums.TextSize.Medium:\n fontSize = fontType.fontSizes.medium;\n break;\n case Enums.TextSize.Large:\n fontSize = fontType.fontSizes.large;\n break;\n case Enums.TextSize.ExtraLarge:\n fontSize = fontType.fontSizes.extraLarge;\n break;\n default:\n fontSize = fontType.fontSizes.default;\n break;\n }\n targetElement.style.fontSize = fontSize + \"px\";\n var colorDefinition = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor);\n targetElement.style.color = Utils.stringToCssColor(this.effectiveIsSubtle ? colorDefinition.subtle : colorDefinition.default);\n var fontWeight;\n switch (this.effectiveWeight) {\n case Enums.TextWeight.Lighter:\n fontWeight = fontType.fontWeights.lighter;\n break;\n case Enums.TextWeight.Bolder:\n fontWeight = fontType.fontWeights.bolder;\n break;\n default:\n fontWeight = fontType.fontWeights.default;\n break;\n }\n targetElement.style.fontWeight = fontWeight.toString();\n if (this.ariaHidden) {\n targetElement.setAttribute(\"aria-hidden\", \"true\");\n }\n };\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveColor\", {\n get: function () {\n return this.color !== undefined ? this.color : this.getEffectiveTextStyleDefinition().color;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveFontType\", {\n get: function () {\n return this.fontType !== undefined ? this.fontType : this.getEffectiveTextStyleDefinition().fontType;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveIsSubtle\", {\n get: function () {\n return this.isSubtle !== undefined ? this.isSubtle : this.getEffectiveTextStyleDefinition().isSubtle;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveSize\", {\n get: function () {\n return this.size !== undefined ? this.size : this.getEffectiveTextStyleDefinition().size;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveWeight\", {\n get: function () {\n return this.weight !== undefined ? this.weight : this.getEffectiveTextStyleDefinition().weight;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n BaseTextBlock.textProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"text\", true);\n BaseTextBlock.sizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"size\", Enums.TextSize);\n BaseTextBlock.weightProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"weight\", Enums.TextWeight);\n BaseTextBlock.colorProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"color\", Enums.TextColor);\n BaseTextBlock.isSubtleProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"isSubtle\");\n BaseTextBlock.fontTypeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"fontType\", Enums.FontType);\n BaseTextBlock.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, \"selectAction\", [\"Action.ShowCard\"]);\n __decorate([\n serialization_1.property(BaseTextBlock.sizeProperty)\n ], BaseTextBlock.prototype, \"size\", void 0);\n __decorate([\n serialization_1.property(BaseTextBlock.weightProperty)\n ], BaseTextBlock.prototype, \"weight\", void 0);\n __decorate([\n serialization_1.property(BaseTextBlock.colorProperty)\n ], BaseTextBlock.prototype, \"color\", void 0);\n __decorate([\n serialization_1.property(BaseTextBlock.fontTypeProperty)\n ], BaseTextBlock.prototype, \"fontType\", void 0);\n __decorate([\n serialization_1.property(BaseTextBlock.isSubtleProperty)\n ], BaseTextBlock.prototype, \"isSubtle\", void 0);\n __decorate([\n serialization_1.property(BaseTextBlock.textProperty)\n ], BaseTextBlock.prototype, \"text\", null);\n __decorate([\n serialization_1.property(BaseTextBlock.selectActionProperty)\n ], BaseTextBlock.prototype, \"selectAction\", void 0);\n return BaseTextBlock;\n}(CardElement));\nexports.BaseTextBlock = BaseTextBlock;\nvar TextBlock = /** @class */ (function (_super) {\n __extends(TextBlock, _super);\n function TextBlock() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.wrap = false;\n _this._treatAsPlainText = true;\n _this.useMarkdown = true;\n return _this;\n }\n TextBlock.prototype.restoreOriginalContent = function () {\n if (this.renderedElement !== undefined) {\n if (this.maxLines && this.maxLines > 0) {\n this.renderedElement.style.maxHeight = this._computedLineHeight * this.maxLines + \"px\";\n }\n this.renderedElement.innerHTML = this._originalInnerHtml;\n }\n };\n TextBlock.prototype.truncateIfSupported = function (maxHeight) {\n if (this.renderedElement !== undefined) {\n // For now, only truncate TextBlocks that contain just a single\n // paragraph -- since the maxLines calculation doesn't take into\n // account Markdown lists\n var children = this.renderedElement.children;\n var isTextOnly = !children.length;\n var truncationSupported = isTextOnly || children.length == 1 && children[0].tagName.toLowerCase() == 'p';\n if (truncationSupported) {\n var element = isTextOnly ? this.renderedElement : children[0];\n Utils.truncate(element, maxHeight, this._computedLineHeight);\n return true;\n }\n }\n return false;\n };\n TextBlock.prototype.setText = function (value) {\n _super.prototype.setText.call(this, value);\n this._processedText = undefined;\n };\n TextBlock.prototype.internalRender = function () {\n var _this = this;\n this._processedText = undefined;\n if (this.text) {\n var preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);\n var hostConfig = this.hostConfig;\n var element = void 0;\n if (this.forElementId) {\n var labelElement = document.createElement(\"label\");\n labelElement.htmlFor = this.forElementId;\n element = labelElement;\n }\n else {\n element = document.createElement(\"div\");\n }\n element.classList.add(hostConfig.makeCssClassName(\"ac-textBlock\"));\n element.style.overflow = \"hidden\";\n this.applyStylesTo(element);\n if (this.style === \"heading\") {\n element.setAttribute(\"role\", \"heading\");\n var headingLevel = this.hostConfig.textBlock.headingLevel;\n if (headingLevel !== undefined && headingLevel > 0) {\n element.setAttribute(\"aria-level\", headingLevel.toString());\n }\n }\n if (this.selectAction && hostConfig.supportsInteractivity) {\n element.onclick = function (e) {\n if (_this.selectAction && _this.selectAction.isEnabled) {\n e.preventDefault();\n e.cancelBubble = true;\n _this.selectAction.execute();\n }\n };\n this.selectAction.setupElementForAccessibility(element);\n if (this.selectAction.isEnabled) {\n element.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\n }\n }\n if (!this._processedText) {\n this._treatAsPlainText = true;\n var formattedText = TextFormatters.formatText(this.lang, preProcessedText);\n if (this.useMarkdown && formattedText) {\n if (shared_1.GlobalSettings.allowMarkForTextHighlighting) {\n formattedText = formattedText.replace(//g, \"===\").replace(/<\\/mark>/g, \"/==/\");\n }\n var markdownProcessingResult = AdaptiveCard.applyMarkdown(formattedText);\n if (markdownProcessingResult.didProcess && markdownProcessingResult.outputHtml) {\n this._processedText = markdownProcessingResult.outputHtml;\n this._treatAsPlainText = false;\n // Only process tag if markdown processing was applied because\n // markdown processing is also responsible for sanitizing the input string\n if (shared_1.GlobalSettings.allowMarkForTextHighlighting && this._processedText) {\n var markStyle = \"\";\n var effectiveStyle = this.getEffectiveStyleDefinition();\n if (effectiveStyle.highlightBackgroundColor) {\n markStyle += \"background-color: \" + effectiveStyle.highlightBackgroundColor + \";\";\n }\n if (effectiveStyle.highlightForegroundColor) {\n markStyle += \"color: \" + effectiveStyle.highlightForegroundColor + \";\";\n }\n if (markStyle) {\n markStyle = 'style=\"' + markStyle + '\"';\n }\n this._processedText = this._processedText.replace(/===/g, \"\").replace(/\\/==\\//g, \"\");\n }\n }\n else {\n this._processedText = formattedText;\n this._treatAsPlainText = true;\n }\n }\n else {\n this._processedText = formattedText;\n this._treatAsPlainText = true;\n }\n }\n if (!this._processedText) {\n this._processedText = \"\";\n }\n if (this._treatAsPlainText) {\n element.innerText = this._processedText;\n }\n else {\n element.innerHTML = this._processedText;\n }\n if (element.firstElementChild instanceof HTMLElement) {\n var firstElementChild = element.firstElementChild;\n firstElementChild.style.marginTop = \"0px\";\n firstElementChild.style.width = \"100%\";\n if (!this.wrap) {\n firstElementChild.style.overflow = \"hidden\";\n firstElementChild.style.textOverflow = \"ellipsis\";\n }\n }\n if (element.lastElementChild instanceof HTMLElement) {\n element.lastElementChild.style.marginBottom = \"0px\";\n }\n var anchors = element.getElementsByTagName(\"a\");\n for (var i = 0; i < anchors.length; i++) {\n var anchor = anchors[i];\n anchor.classList.add(hostConfig.makeCssClassName(\"ac-anchor\"));\n anchor.target = \"_blank\";\n anchor.onclick = function (e) {\n if (raiseAnchorClickedEvent(_this, e.target, e)) {\n e.preventDefault();\n e.cancelBubble = true;\n }\n };\n anchor.oncontextmenu = function (e) {\n if (raiseAnchorClickedEvent(_this, e.target, e)) {\n e.preventDefault();\n e.cancelBubble = true;\n return false;\n }\n return true;\n };\n }\n if (this.wrap) {\n element.style.wordWrap = \"break-word\";\n if (this.maxLines && this.maxLines > 0) {\n element.style.overflow = \"hidden\";\n if (Utils.isInternetExplorer() || !shared_1.GlobalSettings.useWebkitLineClamp) {\n element.style.maxHeight = (this._computedLineHeight * this.maxLines) + \"px\";\n }\n else {\n // While non standard, --webkit-line-clamp works in every browser (except IE)\n // and is a great solution to support the maxLines feature with ellipsis\n // truncation. With --webkit-line-clamp there is need to use explicit line heights\n element.style.removeProperty(\"line-height\");\n element.style.display = \"-webkit-box\";\n element.style.webkitBoxOrient = \"vertical\";\n element.style.webkitLineClamp = this.maxLines.toString();\n }\n }\n }\n else {\n element.style.whiteSpace = \"nowrap\";\n element.style.textOverflow = \"ellipsis\";\n }\n if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation || shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\n this._originalInnerHtml = element.innerHTML;\n }\n return element;\n }\n else {\n return undefined;\n }\n };\n TextBlock.prototype.truncateOverflow = function (maxHeight) {\n if (maxHeight >= this._computedLineHeight) {\n return this.truncateIfSupported(maxHeight);\n }\n return false;\n };\n TextBlock.prototype.undoOverflowTruncation = function () {\n this.restoreOriginalContent();\n if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines) {\n var maxHeight = this._computedLineHeight * this.maxLines;\n this.truncateIfSupported(maxHeight);\n }\n };\n TextBlock.prototype.applyStylesTo = function (targetElement) {\n _super.prototype.applyStylesTo.call(this, targetElement);\n switch (this.getEffectiveHorizontalAlignment()) {\n case Enums.HorizontalAlignment.Center:\n targetElement.style.textAlign = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n targetElement.style.textAlign = \"end\";\n break;\n default:\n targetElement.style.textAlign = \"start\";\n break;\n }\n var lineHeights = this.hostConfig.lineHeights;\n if (lineHeights) {\n switch (this.effectiveSize) {\n case Enums.TextSize.Small:\n this._computedLineHeight = lineHeights.small;\n break;\n case Enums.TextSize.Medium:\n this._computedLineHeight = lineHeights.medium;\n break;\n case Enums.TextSize.Large:\n this._computedLineHeight = lineHeights.large;\n break;\n case Enums.TextSize.ExtraLarge:\n this._computedLineHeight = lineHeights.extraLarge;\n break;\n default:\n this._computedLineHeight = lineHeights.default;\n break;\n }\n }\n else {\n // Looks like 1.33 is the magic number to compute line-height\n // from font size.\n this._computedLineHeight = this.getFontSize(this.hostConfig.getFontTypeDefinition(this.effectiveFontType)) * 1.33;\n }\n targetElement.style.lineHeight = this._computedLineHeight + \"px\";\n };\n TextBlock.prototype.getJsonTypeName = function () {\n return \"TextBlock\";\n };\n TextBlock.prototype.getEffectiveTextStyleDefinition = function () {\n if (this.style) {\n return this.hostConfig.textStyles.getStyleByName(this.style);\n }\n return _super.prototype.getEffectiveTextStyleDefinition.call(this);\n };\n TextBlock.prototype.updateLayout = function (processChildren) {\n if (processChildren === void 0) { processChildren = false; }\n _super.prototype.updateLayout.call(this, processChildren);\n if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines && this.isDisplayed()) {\n // Reset the element's innerHTML in case the available room for\n // content has increased\n this.restoreOriginalContent();\n this.truncateIfSupported(this._computedLineHeight * this.maxLines);\n }\n };\n TextBlock.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"wrap\", false);\n TextBlock.maxLinesProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"maxLines\");\n TextBlock.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_5, \"style\", [\n { value: \"default\" },\n { value: \"columnHeader\" },\n { value: \"heading\" }\n ]);\n __decorate([\n serialization_1.property(TextBlock.wrapProperty)\n ], TextBlock.prototype, \"wrap\", void 0);\n __decorate([\n serialization_1.property(TextBlock.maxLinesProperty)\n ], TextBlock.prototype, \"maxLines\", void 0);\n __decorate([\n serialization_1.property(TextBlock.styleProperty)\n ], TextBlock.prototype, \"style\", void 0);\n return TextBlock;\n}(BaseTextBlock));\nexports.TextBlock = TextBlock;\nvar TextRun = /** @class */ (function (_super) {\n __extends(TextRun, _super);\n function TextRun() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.italic = false;\n _this.strikethrough = false;\n _this.highlight = false;\n _this.underline = false;\n return _this;\n }\n TextRun.prototype.populateSchema = function (schema) {\n _super.prototype.populateSchema.call(this, schema);\n schema.add(BaseTextBlock.selectActionProperty);\n };\n //#endregion\n TextRun.prototype.internalRender = function () {\n var _this = this;\n if (this.text) {\n var preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);\n var hostConfig = this.hostConfig;\n var formattedText = TextFormatters.formatText(this.lang, preProcessedText);\n if (!formattedText) {\n formattedText = \"\";\n }\n var element = document.createElement(\"span\");\n element.classList.add(hostConfig.makeCssClassName(\"ac-textRun\"));\n this.applyStylesTo(element);\n if (this.selectAction && hostConfig.supportsInteractivity) {\n var anchor = document.createElement(\"a\");\n anchor.classList.add(hostConfig.makeCssClassName(\"ac-anchor\"));\n var href = this.selectAction.getHref();\n anchor.href = href ? href : \"\";\n anchor.target = \"_blank\";\n anchor.onclick = function (e) {\n if (_this.selectAction && _this.selectAction.isEnabled) {\n e.preventDefault();\n e.cancelBubble = true;\n _this.selectAction.execute();\n }\n };\n this.selectAction.setupElementForAccessibility(anchor);\n anchor.innerText = formattedText;\n element.appendChild(anchor);\n }\n else {\n element.innerText = formattedText;\n }\n return element;\n }\n else {\n return undefined;\n }\n };\n TextRun.prototype.applyStylesTo = function (targetElement) {\n _super.prototype.applyStylesTo.call(this, targetElement);\n if (this.italic) {\n targetElement.style.fontStyle = \"italic\";\n }\n if (this.strikethrough) {\n targetElement.style.textDecoration = \"line-through\";\n }\n if (this.highlight) {\n var colorDefinition = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor);\n targetElement.style.backgroundColor = Utils.stringToCssColor(this.effectiveIsSubtle ? colorDefinition.highlightColors.subtle : colorDefinition.highlightColors.default);\n }\n if (this.underline) {\n targetElement.style.textDecoration = \"underline\";\n }\n };\n TextRun.prototype.getJsonTypeName = function () {\n return \"TextRun\";\n };\n Object.defineProperty(TextRun.prototype, \"isStandalone\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TextRun.prototype, \"isInline\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n TextRun.italicProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"italic\", false);\n TextRun.strikethroughProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"strikethrough\", false);\n TextRun.highlightProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"highlight\", false);\n TextRun.underlineProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, \"underline\", false);\n __decorate([\n serialization_1.property(TextRun.italicProperty)\n ], TextRun.prototype, \"italic\", void 0);\n __decorate([\n serialization_1.property(TextRun.strikethroughProperty)\n ], TextRun.prototype, \"strikethrough\", void 0);\n __decorate([\n serialization_1.property(TextRun.highlightProperty)\n ], TextRun.prototype, \"highlight\", void 0);\n __decorate([\n serialization_1.property(TextRun.underlineProperty)\n ], TextRun.prototype, \"underline\", void 0);\n return TextRun;\n}(BaseTextBlock));\nexports.TextRun = TextRun;\nvar RichTextBlock = /** @class */ (function (_super) {\n __extends(RichTextBlock, _super);\n function RichTextBlock() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._inlines = [];\n return _this;\n }\n RichTextBlock.prototype.internalAddInline = function (inline, forceAdd) {\n if (forceAdd === void 0) { forceAdd = false; }\n if (!inline.isInline) {\n throw new Error(strings_1.Strings.errors.elementCannotBeUsedAsInline());\n }\n var doAdd = inline.parent === undefined || forceAdd;\n if (!doAdd && inline.parent != this) {\n throw new Error(strings_1.Strings.errors.inlineAlreadyParented());\n }\n else {\n inline.setParent(this);\n this._inlines.push(inline);\n }\n };\n RichTextBlock.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this._inlines = [];\n if (Array.isArray(source[\"inlines\"])) {\n for (var _i = 0, _a = source[\"inlines\"]; _i < _a.length; _i++) {\n var jsonInline = _a[_i];\n var inline = void 0;\n if (typeof jsonInline === \"string\") {\n var textRun = new TextRun();\n textRun.text = jsonInline;\n inline = textRun;\n }\n else {\n // No fallback for inlines in 1.2\n inline = context.parseElement(this, jsonInline, false);\n }\n if (inline) {\n this.internalAddInline(inline, true);\n }\n }\n }\n };\n RichTextBlock.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n if (this._inlines.length > 0) {\n var jsonInlines = [];\n for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {\n var inline = _a[_i];\n jsonInlines.push(inline.toJSON(context));\n }\n context.serializeValue(target, \"inlines\", jsonInlines);\n }\n };\n RichTextBlock.prototype.internalRender = function () {\n if (this._inlines.length > 0) {\n var element = void 0;\n if (this.forElementId) {\n var labelElement = document.createElement(\"label\");\n labelElement.htmlFor = this.forElementId;\n element = labelElement;\n }\n else {\n element = document.createElement(\"div\");\n }\n element.className = this.hostConfig.makeCssClassName(\"ac-richTextBlock\");\n switch (this.getEffectiveHorizontalAlignment()) {\n case Enums.HorizontalAlignment.Center:\n element.style.textAlign = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n element.style.textAlign = \"end\";\n break;\n default:\n element.style.textAlign = \"start\";\n break;\n }\n var renderedInlines = 0;\n for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {\n var inline = _a[_i];\n var renderedInline = inline.render();\n if (renderedInline) {\n element.appendChild(renderedInline);\n renderedInlines++;\n }\n }\n if (renderedInlines > 0) {\n return element;\n }\n }\n return undefined;\n };\n RichTextBlock.prototype.asString = function () {\n var result = \"\";\n for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {\n var inline = _a[_i];\n result += inline.asString();\n }\n return result;\n };\n RichTextBlock.prototype.getJsonTypeName = function () {\n return \"RichTextBlock\";\n };\n RichTextBlock.prototype.getInlineCount = function () {\n return this._inlines.length;\n };\n RichTextBlock.prototype.getInlineAt = function (index) {\n if (index >= 0 && index < this._inlines.length) {\n return this._inlines[index];\n }\n else {\n throw new Error(strings_1.Strings.errors.indexOutOfRange(index));\n }\n };\n RichTextBlock.prototype.addInline = function (inline) {\n if (typeof inline === \"string\") {\n this.internalAddInline(new TextRun(inline));\n }\n else {\n this.internalAddInline(inline);\n }\n };\n RichTextBlock.prototype.removeInline = function (inline) {\n var index = this._inlines.indexOf(inline);\n if (index >= 0) {\n this._inlines[index].setParent(undefined);\n this._inlines.splice(index, 1);\n return true;\n }\n return false;\n };\n return RichTextBlock;\n}(CardElement));\nexports.RichTextBlock = RichTextBlock;\nvar Fact = /** @class */ (function (_super) {\n __extends(Fact, _super);\n function Fact(name, value) {\n var _this = _super.call(this) || this;\n _this.name = name;\n _this.value = value;\n return _this;\n }\n //#endregion\n Fact.prototype.getSchemaKey = function () {\n return \"Fact\";\n };\n //#region Schema\n Fact.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\n Fact.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\n __decorate([\n serialization_1.property(Fact.titleProperty)\n ], Fact.prototype, \"name\", void 0);\n __decorate([\n serialization_1.property(Fact.valueProperty)\n ], Fact.prototype, \"value\", void 0);\n return Fact;\n}(serialization_1.SerializableObject));\nexports.Fact = Fact;\nvar FactSet = /** @class */ (function (_super) {\n __extends(FactSet, _super);\n function FactSet() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(FactSet.prototype, \"useDefaultSizing\", {\n //#endregion\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n FactSet.prototype.internalRender = function () {\n var element = undefined;\n var hostConfig = this.hostConfig;\n if (this.facts.length > 0) {\n element = document.createElement(\"table\");\n element.style.borderWidth = \"0px\";\n element.style.borderSpacing = \"0px\";\n element.style.borderStyle = \"none\";\n element.style.borderCollapse = \"collapse\";\n element.style.display = \"block\";\n element.style.overflow = \"hidden\";\n element.classList.add(hostConfig.makeCssClassName(\"ac-factset\"));\n element.setAttribute(\"role\", \"presentation\");\n for (var i = 0; i < this.facts.length; i++) {\n var trElement = document.createElement(\"tr\");\n if (i > 0) {\n trElement.style.marginTop = hostConfig.factSet.spacing + \"px\";\n }\n // Title column\n var tdElement = document.createElement(\"td\");\n tdElement.style.padding = \"0\";\n tdElement.classList.add(hostConfig.makeCssClassName(\"ac-fact-title\"));\n if (hostConfig.factSet.title.maxWidth) {\n tdElement.style.maxWidth = hostConfig.factSet.title.maxWidth + \"px\";\n }\n tdElement.style.verticalAlign = \"top\";\n var textBlock = new TextBlock();\n textBlock.setParent(this);\n textBlock.text = (!this.facts[i].name && this.isDesignMode()) ? \"Title\" : this.facts[i].name;\n textBlock.size = hostConfig.factSet.title.size;\n textBlock.color = hostConfig.factSet.title.color;\n textBlock.isSubtle = hostConfig.factSet.title.isSubtle;\n textBlock.weight = hostConfig.factSet.title.weight;\n textBlock.wrap = hostConfig.factSet.title.wrap;\n textBlock.spacing = Enums.Spacing.None;\n Utils.appendChild(tdElement, textBlock.render());\n Utils.appendChild(trElement, tdElement);\n // Spacer column\n tdElement = document.createElement(\"td\");\n tdElement.style.width = \"10px\";\n Utils.appendChild(trElement, tdElement);\n // Value column\n tdElement = document.createElement(\"td\");\n tdElement.style.padding = \"0\";\n tdElement.style.verticalAlign = \"top\";\n tdElement.classList.add(hostConfig.makeCssClassName(\"ac-fact-value\"));\n textBlock = new TextBlock();\n textBlock.setParent(this);\n textBlock.text = this.facts[i].value;\n textBlock.size = hostConfig.factSet.value.size;\n textBlock.color = hostConfig.factSet.value.color;\n textBlock.isSubtle = hostConfig.factSet.value.isSubtle;\n textBlock.weight = hostConfig.factSet.value.weight;\n textBlock.wrap = hostConfig.factSet.value.wrap;\n textBlock.spacing = Enums.Spacing.None;\n Utils.appendChild(tdElement, textBlock.render());\n Utils.appendChild(trElement, tdElement);\n Utils.appendChild(element, trElement);\n }\n }\n return element;\n };\n FactSet.prototype.getJsonTypeName = function () {\n return \"FactSet\";\n };\n //#region Schema\n FactSet.factsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"facts\", Fact);\n __decorate([\n serialization_1.property(FactSet.factsProperty)\n ], FactSet.prototype, \"facts\", void 0);\n return FactSet;\n}(CardElement));\nexports.FactSet = FactSet;\nvar ImageDimensionProperty = /** @class */ (function (_super) {\n __extends(ImageDimensionProperty, _super);\n function ImageDimensionProperty(targetVersion, name, internalName, fallbackProperty) {\n var _this = _super.call(this, targetVersion, name) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.internalName = internalName;\n _this.fallbackProperty = fallbackProperty;\n return _this;\n }\n ImageDimensionProperty.prototype.getInternalName = function () {\n return this.internalName;\n };\n ImageDimensionProperty.prototype.parse = function (sender, source, context) {\n var result = undefined;\n var sourceValue = source[this.name];\n if (sourceValue === undefined) {\n return this.defaultValue;\n }\n var isValid = false;\n if (typeof sourceValue === \"string\") {\n try {\n var size = shared_1.SizeAndUnit.parse(sourceValue, true);\n if (size.unit == Enums.SizeUnit.Pixel) {\n result = size.physicalSize;\n isValid = true;\n }\n }\n catch (_a) {\n // Swallow the exception\n }\n // If the source value isn't valid per this property definition,\n // check its validity per the fallback property, if specified\n if (!isValid && this.fallbackProperty) {\n isValid = this.fallbackProperty.isValidValue(sourceValue, context);\n }\n }\n if (!isValid) {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));\n }\n return result;\n };\n ImageDimensionProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeValue(target, this.name, typeof value === \"number\" && !isNaN(value) ? value + \"px\" : undefined);\n };\n return ImageDimensionProperty;\n}(serialization_1.PropertyDefinition));\nvar Image = /** @class */ (function (_super) {\n __extends(Image, _super);\n function Image() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.size = Enums.Size.Auto;\n _this.style = Enums.ImageStyle.Default;\n return _this;\n }\n Image.prototype.populateSchema = function (schema) {\n _super.prototype.populateSchema.call(this, schema);\n schema.remove(CardElement.heightProperty);\n };\n //#endregion\n Image.prototype.applySize = function (element) {\n if (this.pixelWidth || this.pixelHeight) {\n if (this.pixelWidth) {\n element.style.width = this.pixelWidth + \"px\";\n }\n if (this.pixelHeight) {\n element.style.height = this.pixelHeight + \"px\";\n }\n }\n else {\n if (this.maxHeight) {\n // If the image is constrained in height, we set its height property and\n // auto and stretch are ignored (default to medium). THis is necessary for\n // ImageSet which uses a maximum image height as opposed to the cards width\n // as a constraining dimension\n switch (this.size) {\n case Enums.Size.Small:\n element.style.height = this.hostConfig.imageSizes.small + \"px\";\n break;\n case Enums.Size.Large:\n element.style.height = this.hostConfig.imageSizes.large + \"px\";\n break;\n default:\n element.style.height = this.hostConfig.imageSizes.medium + \"px\";\n break;\n }\n element.style.maxHeight = this.maxHeight + \"px\";\n }\n else {\n switch (this.size) {\n case Enums.Size.Stretch:\n element.style.width = \"100%\";\n break;\n case Enums.Size.Auto:\n element.style.maxWidth = \"100%\";\n break;\n case Enums.Size.Small:\n element.style.width = this.hostConfig.imageSizes.small + \"px\";\n break;\n case Enums.Size.Large:\n element.style.width = this.hostConfig.imageSizes.large + \"px\";\n break;\n case Enums.Size.Medium:\n element.style.width = this.hostConfig.imageSizes.medium + \"px\";\n break;\n }\n element.style.maxHeight = \"100%\";\n }\n }\n };\n Object.defineProperty(Image.prototype, \"useDefaultSizing\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Image.prototype.internalRender = function () {\n var _this = this;\n var element = undefined;\n if (this.url) {\n element = document.createElement(\"div\");\n element.style.display = \"flex\";\n element.style.alignItems = \"flex-start\";\n // Cache hostConfig to avoid walking the parent hierarchy multiple times\n var hostConfig = this.hostConfig;\n switch (this.getEffectiveHorizontalAlignment()) {\n case Enums.HorizontalAlignment.Center:\n element.style.justifyContent = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n element.style.justifyContent = \"flex-end\";\n break;\n default:\n element.style.justifyContent = \"flex-start\";\n break;\n }\n var imageElement = document.createElement(\"img\");\n imageElement.onload = function (e) {\n raiseImageLoadedEvent(_this);\n };\n imageElement.onerror = function (e) {\n if (_this.renderedElement) {\n var card = _this.getRootElement();\n _this.renderedElement.innerHTML = \"\";\n if (card && card.designMode) {\n var errorElement = document.createElement(\"div\");\n errorElement.style.display = \"flex\";\n errorElement.style.alignItems = \"center\";\n errorElement.style.justifyContent = \"center\";\n errorElement.style.backgroundColor = \"#EEEEEE\";\n errorElement.style.color = \"black\";\n errorElement.innerText = \":-(\";\n errorElement.style.padding = \"10px\";\n _this.applySize(errorElement);\n _this.renderedElement.appendChild(errorElement);\n }\n }\n raiseImageLoadedEvent(_this);\n };\n imageElement.style.minWidth = \"0\";\n imageElement.classList.add(hostConfig.makeCssClassName(\"ac-image\"));\n if (this.selectAction && hostConfig.supportsInteractivity) {\n imageElement.onkeypress = function (e) {\n if (_this.selectAction && _this.selectAction.isEnabled && (e.code == \"Enter\" || e.code == \"Space\")) { // enter or space pressed\n e.preventDefault();\n e.cancelBubble = true;\n _this.selectAction.execute();\n }\n };\n imageElement.onclick = function (e) {\n if (_this.selectAction && _this.selectAction.isEnabled) {\n e.preventDefault();\n e.cancelBubble = true;\n _this.selectAction.execute();\n }\n };\n this.selectAction.setupElementForAccessibility(imageElement);\n if (this.selectAction.isEnabled) {\n imageElement.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\n }\n }\n this.applySize(imageElement);\n if (this.style === Enums.ImageStyle.Person) {\n imageElement.style.borderRadius = \"50%\";\n imageElement.style.backgroundPosition = \"50% 50%\";\n imageElement.style.backgroundRepeat = \"no-repeat\";\n }\n imageElement.style.backgroundColor = Utils.stringToCssColor(this.backgroundColor);\n imageElement.src = this.preProcessPropertyValue(Image.urlProperty);\n var altTextProperty = this.preProcessPropertyValue(Image.altTextProperty);\n if (altTextProperty) {\n imageElement.alt = altTextProperty;\n }\n element.appendChild(imageElement);\n }\n return element;\n };\n Image.prototype.getJsonTypeName = function () {\n return \"Image\";\n };\n Image.prototype.getActionById = function (id) {\n var result = _super.prototype.getActionById.call(this, id);\n if (!result && this.selectAction) {\n result = this.selectAction.getActionById(id);\n }\n return result;\n };\n Image.prototype.getResourceInformation = function () {\n return this.url ? [{ url: this.url, mimeType: \"image\" }] : [];\n };\n Image.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"url\");\n Image.altTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"altText\");\n Image.backgroundColorProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"backgroundColor\");\n Image.styleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"style\", Enums.ImageStyle, Enums.ImageStyle.Default);\n Image.sizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"size\", Enums.Size, Enums.Size.Auto);\n Image.pixelWidthProperty = new ImageDimensionProperty(serialization_1.Versions.v1_1, \"width\", \"pixelWidth\");\n Image.pixelHeightProperty = new ImageDimensionProperty(serialization_1.Versions.v1_1, \"height\", \"pixelHeight\", CardElement.heightProperty);\n Image.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, \"selectAction\", [\"Action.ShowCard\"]);\n __decorate([\n serialization_1.property(Image.urlProperty)\n ], Image.prototype, \"url\", void 0);\n __decorate([\n serialization_1.property(Image.altTextProperty)\n ], Image.prototype, \"altText\", void 0);\n __decorate([\n serialization_1.property(Image.backgroundColorProperty)\n ], Image.prototype, \"backgroundColor\", void 0);\n __decorate([\n serialization_1.property(Image.sizeProperty)\n ], Image.prototype, \"size\", void 0);\n __decorate([\n serialization_1.property(Image.styleProperty)\n ], Image.prototype, \"style\", void 0);\n __decorate([\n serialization_1.property(Image.pixelWidthProperty)\n ], Image.prototype, \"pixelWidth\", void 0);\n __decorate([\n serialization_1.property(Image.pixelHeightProperty)\n ], Image.prototype, \"pixelHeight\", void 0);\n __decorate([\n serialization_1.property(Image.selectActionProperty)\n ], Image.prototype, \"selectAction\", void 0);\n return Image;\n}(CardElement));\nexports.Image = Image;\nvar CardElementContainer = /** @class */ (function (_super) {\n __extends(CardElementContainer, _super);\n function CardElementContainer() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.allowVerticalOverflow = false;\n return _this;\n }\n CardElementContainer.prototype.populateSchema = function (schema) {\n _super.prototype.populateSchema.call(this, schema);\n if (!this.isSelectable) {\n schema.remove(CardElementContainer.selectActionProperty);\n }\n };\n //#endregion\n CardElementContainer.prototype.isElementAllowed = function (element) {\n return this.hostConfig.supportsInteractivity || !element.isInteractive;\n };\n CardElementContainer.prototype.applyPadding = function () {\n _super.prototype.applyPadding.call(this);\n if (!this.renderedElement) {\n return;\n }\n var physicalPadding = new shared_1.SpacingDefinition();\n if (this.getEffectivePadding()) {\n physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding());\n }\n this.renderedElement.style.paddingTop = physicalPadding.top + \"px\";\n this.renderedElement.style.paddingRight = physicalPadding.right + \"px\";\n this.renderedElement.style.paddingBottom = physicalPadding.bottom + \"px\";\n this.renderedElement.style.paddingLeft = physicalPadding.left + \"px\";\n this.renderedElement.style.marginRight = \"0\";\n this.renderedElement.style.marginLeft = \"0\";\n };\n Object.defineProperty(CardElementContainer.prototype, \"isSelectable\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n CardElementContainer.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n for (var i = 0; i < this.getItemCount(); i++) {\n var item = this.getItemAt(i);\n if (!this.hostConfig.supportsInteractivity && item.isInteractive) {\n context.addFailure(this, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.interactivityNotAllowed());\n }\n if (!this.isElementAllowed(item)) {\n context.addFailure(this, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(item.getJsonTypeName()));\n }\n item.internalValidateProperties(context);\n }\n if (this._selectAction) {\n this._selectAction.internalValidateProperties(context);\n }\n };\n CardElementContainer.prototype.render = function () {\n var _this = this;\n var element = _super.prototype.render.call(this);\n if (element) {\n var hostConfig = this.hostConfig;\n if (this.allowVerticalOverflow) {\n element.style.overflowX = \"hidden\";\n element.style.overflowY = \"auto\";\n }\n if (element && this.isSelectable && this._selectAction && hostConfig.supportsInteractivity) {\n element.onclick = function (e) {\n if (_this._selectAction && _this._selectAction.isEnabled) {\n e.preventDefault();\n e.cancelBubble = true;\n _this._selectAction.execute();\n }\n };\n element.onkeypress = function (e) {\n if (_this._selectAction && _this._selectAction.isEnabled && (e.code == \"Enter\" || e.code == \"Space\")) {\n // Enter or space pressed\n e.preventDefault();\n e.cancelBubble = true;\n _this._selectAction.execute();\n }\n };\n this._selectAction.setupElementForAccessibility(element);\n if (this._selectAction.isEnabled) {\n element.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\n }\n }\n }\n return element;\n };\n CardElementContainer.prototype.updateLayout = function (processChildren) {\n if (processChildren === void 0) { processChildren = true; }\n _super.prototype.updateLayout.call(this, processChildren);\n if (processChildren) {\n for (var i = 0; i < this.getItemCount(); i++) {\n this.getItemAt(i).updateLayout();\n }\n }\n };\n CardElementContainer.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n var result = [];\n for (var i = 0; i < this.getItemCount(); i++) {\n result = result.concat(this.getItemAt(i).getAllInputs(processActions));\n }\n return result;\n };\n CardElementContainer.prototype.getResourceInformation = function () {\n var result = [];\n for (var i = 0; i < this.getItemCount(); i++) {\n result = result.concat(this.getItemAt(i).getResourceInformation());\n }\n return result;\n };\n CardElementContainer.prototype.getElementById = function (id) {\n var result = _super.prototype.getElementById.call(this, id);\n if (!result) {\n for (var i = 0; i < this.getItemCount(); i++) {\n result = this.getItemAt(i).getElementById(id);\n if (result) {\n break;\n }\n }\n }\n return result;\n };\n /**\n * @inheritdoc\n */\n CardElementContainer.prototype.findDOMNodeOwner = function (node) {\n var target = undefined;\n for (var i = 0; i < this.getItemCount(); i++) {\n // recur through child elements\n target = this.getItemAt(i).findDOMNodeOwner(node);\n if (target) {\n return target;\n }\n }\n // if not found in children, defer to parent implementation\n return _super.prototype.findDOMNodeOwner.call(this, node);\n };\n CardElementContainer.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, \"selectAction\", [\"Action.ShowCard\"]);\n __decorate([\n serialization_1.property(CardElementContainer.selectActionProperty)\n ], CardElementContainer.prototype, \"_selectAction\", void 0);\n return CardElementContainer;\n}(CardElement));\nexports.CardElementContainer = CardElementContainer;\nvar ImageSet = /** @class */ (function (_super) {\n __extends(ImageSet, _super);\n function ImageSet() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._images = [];\n _this.imageSize = Enums.ImageSize.Medium;\n return _this;\n }\n //#endregion\n ImageSet.prototype.internalRender = function () {\n var element = undefined;\n if (this._images.length > 0) {\n element = document.createElement(\"div\");\n element.style.display = \"flex\";\n element.style.flexWrap = \"wrap\";\n for (var _i = 0, _a = this._images; _i < _a.length; _i++) {\n var image = _a[_i];\n switch (this.imageSize) {\n case Enums.ImageSize.Small:\n image.size = Enums.Size.Small;\n break;\n case Enums.ImageSize.Large:\n image.size = Enums.Size.Large;\n break;\n default:\n image.size = Enums.Size.Medium;\n break;\n }\n image.maxHeight = this.hostConfig.imageSet.maxImageHeight;\n var renderedImage = image.render();\n if (renderedImage) {\n renderedImage.style.display = \"inline-flex\";\n renderedImage.style.margin = \"0px\";\n renderedImage.style.marginRight = \"10px\";\n Utils.appendChild(element, renderedImage);\n }\n }\n }\n return element;\n };\n ImageSet.prototype.getItemCount = function () {\n return this._images.length;\n };\n ImageSet.prototype.getItemAt = function (index) {\n return this._images[index];\n };\n ImageSet.prototype.getFirstVisibleRenderedItem = function () {\n return this._images && this._images.length > 0 ? this._images[0] : undefined;\n };\n ImageSet.prototype.getLastVisibleRenderedItem = function () {\n return this._images && this._images.length > 0 ? this._images[this._images.length - 1] : undefined;\n };\n ImageSet.prototype.removeItem = function (item) {\n if (item instanceof Image) {\n var itemIndex = this._images.indexOf(item);\n if (itemIndex >= 0) {\n this._images.splice(itemIndex, 1);\n item.setParent(undefined);\n this.updateLayout();\n return true;\n }\n }\n return false;\n };\n ImageSet.prototype.getJsonTypeName = function () {\n return \"ImageSet\";\n };\n ImageSet.prototype.addImage = function (image) {\n if (!image.parent) {\n this._images.push(image);\n image.setParent(this);\n }\n else {\n throw new Error(\"This image already belongs to another ImageSet\");\n }\n };\n ImageSet.prototype.indexOf = function (cardElement) {\n return cardElement instanceof Image ? this._images.indexOf(cardElement) : -1;\n };\n ImageSet.imagesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"images\", Image, function (sender, item) { item.setParent(sender); });\n ImageSet.imageSizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"imageSize\", Enums.ImageSize, Enums.ImageSize.Medium);\n __decorate([\n serialization_1.property(ImageSet.imagesProperty)\n ], ImageSet.prototype, \"_images\", void 0);\n __decorate([\n serialization_1.property(ImageSet.imageSizeProperty)\n ], ImageSet.prototype, \"imageSize\", void 0);\n return ImageSet;\n}(CardElementContainer));\nexports.ImageSet = ImageSet;\nvar MediaSource = /** @class */ (function (_super) {\n __extends(MediaSource, _super);\n function MediaSource(url, mimeType) {\n var _this = _super.call(this) || this;\n _this.url = url;\n _this.mimeType = mimeType;\n return _this;\n }\n //#endregion\n MediaSource.prototype.getSchemaKey = function () {\n return \"MediaSource\";\n };\n MediaSource.prototype.isValid = function () {\n return this.mimeType && this.url ? true : false;\n };\n MediaSource.prototype.render = function () {\n var result = undefined;\n if (this.isValid()) {\n result = document.createElement(\"source\");\n result.src = this.url;\n result.type = this.mimeType;\n }\n return result;\n };\n //#region Schema\n MediaSource.mimeTypeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"mimeType\");\n MediaSource.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"url\");\n __decorate([\n serialization_1.property(MediaSource.mimeTypeProperty)\n ], MediaSource.prototype, \"mimeType\", void 0);\n __decorate([\n serialization_1.property(MediaSource.urlProperty)\n ], MediaSource.prototype, \"url\", void 0);\n return MediaSource;\n}(serialization_1.SerializableObject));\nexports.MediaSource = MediaSource;\nvar Media = /** @class */ (function (_super) {\n __extends(Media, _super);\n function Media() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.sources = [];\n return _this;\n }\n Media.prototype.getPosterUrl = function () {\n return this.poster ? this.poster : this.hostConfig.media.defaultPoster;\n };\n Media.prototype.processSources = function () {\n this._selectedSources = [];\n this._selectedMediaType = undefined;\n for (var _i = 0, _a = this.sources; _i < _a.length; _i++) {\n var source = _a[_i];\n var mimeComponents = source.mimeType ? source.mimeType.split('/') : [];\n if (mimeComponents.length == 2) {\n if (!this._selectedMediaType) {\n var index = Media.supportedMediaTypes.indexOf(mimeComponents[0]);\n if (index >= 0) {\n this._selectedMediaType = Media.supportedMediaTypes[index];\n }\n }\n if (mimeComponents[0] == this._selectedMediaType) {\n this._selectedSources.push(source);\n }\n }\n }\n };\n Media.prototype.handlePlayButtonInvoke = function (event) {\n if (this.hostConfig.media.allowInlinePlayback) {\n event.preventDefault();\n event.cancelBubble = true;\n if (this.renderedElement) {\n var mediaPlayerElement = this.renderMediaPlayer();\n this.renderedElement.innerHTML = \"\";\n this.renderedElement.appendChild(mediaPlayerElement);\n mediaPlayerElement.play();\n mediaPlayerElement.focus();\n }\n }\n else {\n if (Media.onPlay) {\n event.preventDefault();\n event.cancelBubble = true;\n Media.onPlay(this);\n }\n }\n };\n Media.prototype.renderPoster = function () {\n var _this = this;\n var playButtonArrowWidth = 12;\n var playButtonArrowHeight = 15;\n var posterRootElement = document.createElement(\"div\");\n posterRootElement.className = this.hostConfig.makeCssClassName(\"ac-media-poster\");\n posterRootElement.setAttribute(\"role\", \"contentinfo\");\n posterRootElement.setAttribute(\"aria-label\", this.altText ? this.altText : strings_1.Strings.defaults.mediaPlayerAriaLabel());\n posterRootElement.style.position = \"relative\";\n posterRootElement.style.display = \"flex\";\n var posterUrl = this.getPosterUrl();\n if (posterUrl) {\n var posterImageElement_1 = document.createElement(\"img\");\n posterImageElement_1.style.width = \"100%\";\n posterImageElement_1.style.height = \"100%\";\n posterImageElement_1.setAttribute(\"role\", \"presentation\");\n posterImageElement_1.onerror = function (e) {\n if (posterImageElement_1.parentNode) {\n posterImageElement_1.parentNode.removeChild(posterImageElement_1);\n }\n posterRootElement.classList.add(\"empty\");\n posterRootElement.style.minHeight = \"150px\";\n };\n posterImageElement_1.src = posterUrl;\n posterRootElement.appendChild(posterImageElement_1);\n }\n else {\n posterRootElement.classList.add(\"empty\");\n posterRootElement.style.minHeight = \"150px\";\n }\n if (this.hostConfig.supportsInteractivity && this._selectedSources.length > 0) {\n var playButtonOuterElement = document.createElement(\"div\");\n playButtonOuterElement.tabIndex = 0;\n playButtonOuterElement.setAttribute(\"role\", \"button\");\n playButtonOuterElement.setAttribute(\"aria-label\", strings_1.Strings.defaults.mediaPlayerPlayMedia());\n playButtonOuterElement.className = this.hostConfig.makeCssClassName(\"ac-media-playButton\");\n playButtonOuterElement.style.display = \"flex\";\n playButtonOuterElement.style.alignItems = \"center\";\n playButtonOuterElement.style.justifyContent = \"center\";\n playButtonOuterElement.onclick = function (e) {\n _this.handlePlayButtonInvoke(e);\n };\n playButtonOuterElement.onkeypress = function (e) {\n if (e.code == \"Enter\" || e.code == \"Space\") { // space or enter\n _this.handlePlayButtonInvoke(e);\n }\n };\n var playButtonInnerElement = document.createElement(\"div\");\n playButtonInnerElement.className = this.hostConfig.makeCssClassName(\"ac-media-playButton-arrow\");\n playButtonInnerElement.style.width = playButtonArrowWidth + \"px\";\n playButtonInnerElement.style.height = playButtonArrowHeight + \"px\";\n playButtonInnerElement.style.borderTopWidth = (playButtonArrowHeight / 2) + \"px\";\n playButtonInnerElement.style.borderBottomWidth = (playButtonArrowHeight / 2) + \"px\";\n playButtonInnerElement.style.borderLeftWidth = playButtonArrowWidth + \"px\";\n playButtonInnerElement.style.borderRightWidth = \"0\";\n playButtonInnerElement.style.borderStyle = \"solid\";\n playButtonInnerElement.style.borderTopColor = \"transparent\";\n playButtonInnerElement.style.borderRightColor = \"transparent\";\n playButtonInnerElement.style.borderBottomColor = \"transparent\";\n playButtonInnerElement.style.transform = \"translate(\" + (playButtonArrowWidth / 10) + \"px,0px)\";\n playButtonOuterElement.appendChild(playButtonInnerElement);\n var playButtonContainer = document.createElement(\"div\");\n playButtonContainer.style.position = \"absolute\";\n playButtonContainer.style.left = \"0\";\n playButtonContainer.style.top = \"0\";\n playButtonContainer.style.width = \"100%\";\n playButtonContainer.style.height = \"100%\";\n playButtonContainer.style.display = \"flex\";\n playButtonContainer.style.justifyContent = \"center\";\n playButtonContainer.style.alignItems = \"center\";\n playButtonContainer.appendChild(playButtonOuterElement);\n posterRootElement.appendChild(playButtonContainer);\n }\n return posterRootElement;\n };\n Media.prototype.renderMediaPlayer = function () {\n var mediaElement;\n if (this._selectedMediaType == \"video\") {\n var videoPlayer = document.createElement(\"video\");\n var posterUrl = this.getPosterUrl();\n if (posterUrl) {\n videoPlayer.poster = posterUrl;\n }\n mediaElement = videoPlayer;\n }\n else {\n mediaElement = document.createElement(\"audio\");\n }\n mediaElement.setAttribute(\"aria-label\", this.altText ? this.altText : strings_1.Strings.defaults.mediaPlayerAriaLabel());\n mediaElement.setAttribute(\"webkit-playsinline\", \"\");\n mediaElement.setAttribute(\"playsinline\", \"\");\n mediaElement.autoplay = true;\n mediaElement.controls = true;\n if (Utils.isMobileOS()) {\n mediaElement.muted = true;\n }\n mediaElement.preload = \"none\";\n mediaElement.style.width = \"100%\";\n for (var _i = 0, _a = this.sources; _i < _a.length; _i++) {\n var source = _a[_i];\n var renderedSource = source.render();\n Utils.appendChild(mediaElement, renderedSource);\n }\n return mediaElement;\n };\n Media.prototype.internalRender = function () {\n var element = document.createElement(\"div\");\n element.className = this.hostConfig.makeCssClassName(\"ac-media\");\n this.processSources();\n element.appendChild(this.renderPoster());\n return element;\n };\n Media.prototype.getJsonTypeName = function () {\n return \"Media\";\n };\n Media.prototype.getResourceInformation = function () {\n var result = [];\n var posterUrl = this.getPosterUrl();\n if (posterUrl) {\n result.push({ url: posterUrl, mimeType: \"image\" });\n }\n for (var _i = 0, _a = this.sources; _i < _a.length; _i++) {\n var mediaSource = _a[_i];\n if (mediaSource.isValid()) {\n result.push({\n url: mediaSource.url,\n mimeType: mediaSource.mimeType\n });\n }\n }\n return result;\n };\n Object.defineProperty(Media.prototype, \"selectedMediaType\", {\n get: function () {\n return this._selectedMediaType;\n },\n enumerable: false,\n configurable: true\n });\n Media.sourcesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_1, \"sources\", MediaSource);\n Media.posterProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"poster\");\n Media.altTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"altText\");\n //#endregion\n Media.supportedMediaTypes = [\"audio\", \"video\"];\n __decorate([\n serialization_1.property(Media.sourcesProperty)\n ], Media.prototype, \"sources\", void 0);\n __decorate([\n serialization_1.property(Media.posterProperty)\n ], Media.prototype, \"poster\", void 0);\n __decorate([\n serialization_1.property(Media.altTextProperty)\n ], Media.prototype, \"altText\", void 0);\n return Media;\n}(CardElement));\nexports.Media = Media;\nvar Input = /** @class */ (function (_super) {\n __extends(Input, _super);\n function Input() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Input.prototype.getAllLabelIds = function () {\n var labelIds = [];\n if (this.labelledBy) {\n labelIds.push(this.labelledBy);\n }\n if (this._renderedLabelElement) {\n labelIds.push(this._renderedLabelElement.id);\n }\n if (this._renderedErrorMessageElement) {\n labelIds.push(this._renderedErrorMessageElement.id);\n }\n return labelIds;\n };\n Input.prototype.updateInputControlAriaLabelledBy = function () {\n if (this._renderedInputControlElement) {\n var labelIds = this.getAllLabelIds();\n if (labelIds.length > 0) {\n this._renderedInputControlElement.setAttribute(\"aria-labelledby\", labelIds.join(\" \"));\n }\n else {\n this._renderedInputControlElement.removeAttribute(\"aria-labelledby\");\n }\n }\n };\n Object.defineProperty(Input.prototype, \"isNullable\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Input.prototype, \"renderedInputControlElement\", {\n get: function () {\n return this._renderedInputControlElement;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Input.prototype, \"inputControlContainerElement\", {\n get: function () {\n return this._inputControlContainerElement;\n },\n enumerable: false,\n configurable: true\n });\n Input.prototype.overrideInternalRender = function () {\n var hostConfig = this.hostConfig;\n this._outerContainerElement = document.createElement(\"div\");\n this._outerContainerElement.style.display = \"flex\";\n this._outerContainerElement.style.flexDirection = \"column\";\n var renderedInputControlId = Utils.generateUniqueId();\n if (this.label) {\n var labelRichTextBlock = new RichTextBlock();\n labelRichTextBlock.setParent(this);\n labelRichTextBlock.forElementId = renderedInputControlId;\n var labelInline = new TextRun(this.label);\n labelRichTextBlock.addInline(labelInline);\n if (this.isRequired) {\n labelInline.init(hostConfig.inputs.label.requiredInputs);\n var isRequiredCueInline = new TextRun(hostConfig.inputs.label.requiredInputs.suffix);\n isRequiredCueInline.color = hostConfig.inputs.label.requiredInputs.suffixColor;\n isRequiredCueInline.ariaHidden = true;\n labelRichTextBlock.addInline(isRequiredCueInline);\n }\n else {\n labelInline.init(hostConfig.inputs.label.optionalInputs);\n }\n this._renderedLabelElement = labelRichTextBlock.render();\n if (this._renderedLabelElement) {\n this._renderedLabelElement.id = Utils.generateUniqueId();\n this._renderedLabelElement.style.marginBottom = hostConfig.getEffectiveSpacing(hostConfig.inputs.label.inputSpacing) + \"px\";\n this._outerContainerElement.appendChild(this._renderedLabelElement);\n }\n }\n this._inputControlContainerElement = document.createElement(\"div\");\n this._inputControlContainerElement.className = hostConfig.makeCssClassName(\"ac-input-container\");\n this._inputControlContainerElement.style.display = \"flex\";\n if (this.height === \"stretch\") {\n this._inputControlContainerElement.style.alignItems = \"stretch\";\n this._inputControlContainerElement.style.flex = \"1 1 auto\";\n }\n this._renderedInputControlElement = this.internalRender();\n if (this._renderedInputControlElement) {\n this._renderedInputControlElement.id = renderedInputControlId;\n this._renderedInputControlElement.style.minWidth = \"0px\";\n if (this.isNullable && this.isRequired) {\n this._renderedInputControlElement.setAttribute(\"aria-required\", \"true\");\n this._renderedInputControlElement.classList.add(hostConfig.makeCssClassName(\"ac-input-required\"));\n }\n this._inputControlContainerElement.appendChild(this._renderedInputControlElement);\n this._outerContainerElement.appendChild(this._inputControlContainerElement);\n this.updateInputControlAriaLabelledBy();\n return this._outerContainerElement;\n }\n return undefined;\n };\n Input.prototype.valueChanged = function () {\n if (this.isValid()) {\n this.resetValidationFailureCue();\n }\n if (this.onValueChanged) {\n this.onValueChanged(this);\n }\n raiseInputValueChangedEvent(this);\n };\n Input.prototype.resetValidationFailureCue = function () {\n if (this.renderedInputControlElement) {\n this.renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName(\"ac-input-validation-failed\"));\n this.updateInputControlAriaLabelledBy();\n if (this._renderedErrorMessageElement) {\n this._outerContainerElement.removeChild(this._renderedErrorMessageElement);\n this._renderedErrorMessageElement = undefined;\n }\n }\n };\n Input.prototype.showValidationErrorMessage = function () {\n if (this.renderedElement && this.errorMessage && shared_1.GlobalSettings.displayInputValidationErrors) {\n var errorMessageTextBlock = new TextBlock();\n errorMessageTextBlock.setParent(this);\n errorMessageTextBlock.text = this.errorMessage;\n errorMessageTextBlock.wrap = true;\n errorMessageTextBlock.init(this.hostConfig.inputs.errorMessage);\n this._renderedErrorMessageElement = errorMessageTextBlock.render();\n if (this._renderedErrorMessageElement) {\n this._renderedErrorMessageElement.id = Utils.generateUniqueId();\n this._outerContainerElement.appendChild(this._renderedErrorMessageElement);\n this.updateInputControlAriaLabelledBy();\n }\n }\n };\n Input.prototype.focus = function () {\n if (this._renderedInputControlElement) {\n this._renderedInputControlElement.focus();\n }\n };\n Input.prototype.isValid = function () {\n return true;\n };\n Input.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (!this.id) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.inputsMustHaveUniqueId());\n }\n if (this.isRequired) {\n if (!this.label) {\n context.addFailure(this, Enums.ValidationEvent.RequiredInputsShouldHaveLabel, \"Required inputs should have a label\");\n }\n if (!this.errorMessage) {\n context.addFailure(this, Enums.ValidationEvent.RequiredInputsShouldHaveErrorMessage, \"Required inputs should have an error message\");\n }\n }\n };\n Input.prototype.validateValue = function () {\n this.resetValidationFailureCue();\n var result = this.isRequired ? this.isSet() && this.isValid() : this.isValid();\n if (!result && this.renderedInputControlElement) {\n this.renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName(\"ac-input-validation-failed\"));\n this.showValidationErrorMessage();\n }\n return result;\n };\n Input.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n return [this];\n };\n Object.defineProperty(Input.prototype, \"isInteractive\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n Input.labelProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, \"label\", true);\n Input.isRequiredProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, \"isRequired\", false);\n Input.errorMessageProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, \"errorMessage\", true);\n __decorate([\n serialization_1.property(Input.labelProperty)\n ], Input.prototype, \"label\", void 0);\n __decorate([\n serialization_1.property(Input.isRequiredProperty)\n ], Input.prototype, \"isRequired\", void 0);\n __decorate([\n serialization_1.property(Input.errorMessageProperty)\n ], Input.prototype, \"errorMessage\", void 0);\n return Input;\n}(CardElement));\nexports.Input = Input;\nvar TextInput = /** @class */ (function (_super) {\n __extends(TextInput, _super);\n function TextInput() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.isMultiline = false;\n _this.style = Enums.InputTextStyle.Text;\n return _this;\n }\n //#endregion\n TextInput.prototype.setupInput = function (input) {\n var _this = this;\n input.style.flex = \"1 1 auto\";\n input.tabIndex = 0;\n if (this.placeholder) {\n input.placeholder = this.placeholder;\n input.setAttribute(\"aria-label\", this.placeholder);\n }\n if (this.defaultValue) {\n input.value = this.defaultValue;\n }\n if (this.maxLength && this.maxLength > 0) {\n input.maxLength = this.maxLength;\n }\n input.oninput = function () { _this.valueChanged(); };\n input.onkeypress = function (e) {\n // Ctrl+Enter pressed\n if (e.ctrlKey && e.code === \"Enter\" && _this.inlineAction && _this.inlineAction.isEnabled) {\n _this.inlineAction.execute();\n }\n };\n };\n TextInput.prototype.internalRender = function () {\n var result;\n if (this.isMultiline && this.style !== Enums.InputTextStyle.Password) {\n result = document.createElement(\"textarea\");\n result.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-textInput\", \"ac-multiline\");\n if (this.height === \"stretch\") {\n result.style.height = \"initial\";\n }\n }\n else {\n result = document.createElement(\"input\");\n result.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-textInput\");\n result.type = Enums.InputTextStyle[this.style].toLowerCase();\n }\n this.setupInput(result);\n return result;\n };\n TextInput.prototype.overrideInternalRender = function () {\n var _this = this;\n var renderedInputControl = _super.prototype.overrideInternalRender.call(this);\n if (this.inlineAction) {\n var button_1 = document.createElement(\"button\");\n button_1.className = this.hostConfig.makeCssClassName(this.inlineAction.isEnabled ? \"ac-inlineActionButton\" : \"ac-inlineActionButton-disabled\");\n button_1.onclick = function (e) {\n if (_this.inlineAction && _this.inlineAction.isEnabled) {\n e.preventDefault();\n e.cancelBubble = true;\n _this.inlineAction.execute();\n }\n };\n if (this.inlineAction.iconUrl) {\n button_1.classList.add(\"iconOnly\");\n var icon_1 = document.createElement(\"img\");\n icon_1.style.height = \"100%\";\n icon_1.setAttribute(\"role\", \"presentation\");\n // The below trick is necessary as a workaround in Chrome where the icon is initially displayed\n // at its native size then resized to 100% of the button's height. This cfreates an unpleasant\n // flicker. On top of that, Chrome's flex implementation fails to prperly re-layout the button\n // after the image has loaded and been gicven its final size. The below trick also fixes that.\n icon_1.style.display = \"none\";\n icon_1.onload = function () {\n icon_1.style.removeProperty(\"display\");\n };\n icon_1.onerror = function () {\n button_1.removeChild(icon_1);\n button_1.classList.remove(\"iconOnly\");\n button_1.classList.add(\"textOnly\");\n button_1.textContent = _this.inlineAction && _this.inlineAction.title ? _this.inlineAction.title : strings_1.Strings.defaults.inlineActionTitle();\n };\n icon_1.src = this.inlineAction.iconUrl;\n button_1.appendChild(icon_1);\n button_1.title = this.inlineAction.title ? this.inlineAction.title : strings_1.Strings.defaults.inlineActionTitle();\n }\n else {\n button_1.classList.add(\"textOnly\");\n button_1.textContent = this.inlineAction.title ? this.inlineAction.title : strings_1.Strings.defaults.inlineActionTitle();\n }\n this.inlineAction.setupElementForAccessibility(button_1, true);\n button_1.style.marginLeft = \"8px\";\n this.inputControlContainerElement.appendChild(button_1);\n }\n return renderedInputControl;\n };\n TextInput.prototype.getJsonTypeName = function () {\n return \"Input.Text\";\n };\n TextInput.prototype.getActionById = function (id) {\n var result = _super.prototype.getActionById.call(this, id);\n if (!result && this.inlineAction) {\n result = this.inlineAction.getActionById(id);\n }\n return result;\n };\n TextInput.prototype.isSet = function () {\n return this.value ? true : false;\n };\n TextInput.prototype.isValid = function () {\n if (!this.value) {\n return true;\n }\n if (this.regex) {\n return new RegExp(this.regex, \"g\").test(this.value);\n }\n return true;\n };\n Object.defineProperty(TextInput.prototype, \"value\", {\n get: function () {\n if (this.renderedInputControlElement) {\n if (this.isMultiline) {\n return this.renderedInputControlElement.value;\n }\n else {\n return this.renderedInputControlElement.value;\n }\n }\n else {\n return undefined;\n }\n },\n enumerable: false,\n configurable: true\n });\n TextInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\n TextInput.maxLengthProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"maxLength\");\n TextInput.isMultilineProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"isMultiline\", false);\n TextInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\n TextInput.styleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"style\", Enums.InputTextStyle, Enums.InputTextStyle.Text, [\n { value: Enums.InputTextStyle.Text },\n { value: Enums.InputTextStyle.Tel },\n { value: Enums.InputTextStyle.Url },\n { value: Enums.InputTextStyle.Email },\n { value: Enums.InputTextStyle.Password, targetVersion: serialization_1.Versions.v1_5 }\n ]);\n TextInput.inlineActionProperty = new ActionProperty(serialization_1.Versions.v1_0, \"inlineAction\", [\"Action.ShowCard\"]);\n TextInput.regexProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, \"regex\", true);\n __decorate([\n serialization_1.property(TextInput.valueProperty)\n ], TextInput.prototype, \"defaultValue\", void 0);\n __decorate([\n serialization_1.property(TextInput.maxLengthProperty)\n ], TextInput.prototype, \"maxLength\", void 0);\n __decorate([\n serialization_1.property(TextInput.isMultilineProperty)\n ], TextInput.prototype, \"isMultiline\", void 0);\n __decorate([\n serialization_1.property(TextInput.placeholderProperty)\n ], TextInput.prototype, \"placeholder\", void 0);\n __decorate([\n serialization_1.property(TextInput.styleProperty)\n ], TextInput.prototype, \"style\", void 0);\n __decorate([\n serialization_1.property(TextInput.inlineActionProperty)\n ], TextInput.prototype, \"inlineAction\", void 0);\n __decorate([\n serialization_1.property(TextInput.regexProperty)\n ], TextInput.prototype, \"regex\", void 0);\n return TextInput;\n}(Input));\nexports.TextInput = TextInput;\nvar ToggleInput = /** @class */ (function (_super) {\n __extends(ToggleInput, _super);\n function ToggleInput() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.valueOn = \"true\";\n _this.valueOff = \"false\";\n _this.wrap = false;\n return _this;\n }\n ToggleInput.prototype.updateInputControlAriaLabelledBy = function () {\n if (this._checkboxInputElement) {\n var joinedLabelIds = this.getAllLabelIds().join(\" \");\n if (this._checkboxInputLabelElement && this._checkboxInputLabelElement.id) {\n joinedLabelIds += \" \" + this._checkboxInputLabelElement.id;\n }\n if (joinedLabelIds) {\n this._checkboxInputElement.setAttribute(\"aria-labelledby\", joinedLabelIds);\n }\n else {\n this._checkboxInputElement.removeAttribute(\"aria-labelledby\");\n }\n }\n };\n ToggleInput.prototype.internalRender = function () {\n var _this = this;\n var element = document.createElement(\"div\");\n element.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-toggleInput\");\n element.style.width = \"100%\";\n element.style.display = \"flex\";\n element.style.alignItems = \"center\";\n this._checkboxInputElement = document.createElement(\"input\");\n this._checkboxInputElement.id = Utils.generateUniqueId();\n this._checkboxInputElement.type = \"checkbox\";\n this._checkboxInputElement.style.display = \"inline-block\";\n this._checkboxInputElement.style.verticalAlign = \"middle\";\n this._checkboxInputElement.style.margin = \"0\";\n this._checkboxInputElement.style.flex = \"0 0 auto\";\n if (this.title) {\n this._checkboxInputElement.setAttribute(\"aria-label\", this.title);\n }\n if (this.isRequired) {\n this._checkboxInputElement.setAttribute(\"aria-required\", \"true\");\n }\n this._checkboxInputElement.tabIndex = 0;\n if (this.defaultValue == this.valueOn) {\n this._checkboxInputElement.checked = true;\n }\n this._checkboxInputElement.onchange = function () { _this.valueChanged(); };\n Utils.appendChild(element, this._checkboxInputElement);\n if (this.title || this.isDesignMode()) {\n var label = new TextBlock();\n label.setParent(this);\n label.forElementId = this._checkboxInputElement.id;\n label.hostConfig = this.hostConfig;\n label.text = !this.title ? this.getJsonTypeName() : this.title;\n label.useMarkdown = shared_1.GlobalSettings.useMarkdownInRadioButtonAndCheckbox;\n label.wrap = this.wrap;\n this._checkboxInputLabelElement = label.render();\n if (this._checkboxInputLabelElement) {\n this._checkboxInputLabelElement.id = Utils.generateUniqueId();\n this._checkboxInputLabelElement.style.display = \"inline-block\";\n this._checkboxInputLabelElement.style.flex = \"1 1 auto\";\n this._checkboxInputLabelElement.style.marginLeft = \"6px\";\n this._checkboxInputLabelElement.style.verticalAlign = \"middle\";\n var spacerElement = document.createElement(\"div\");\n spacerElement.style.width = \"6px\";\n Utils.appendChild(element, spacerElement);\n Utils.appendChild(element, this._checkboxInputLabelElement);\n }\n }\n return element;\n };\n Object.defineProperty(ToggleInput.prototype, \"isNullable\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n ToggleInput.prototype.getJsonTypeName = function () {\n return \"Input.Toggle\";\n };\n ToggleInput.prototype.focus = function () {\n if (this._checkboxInputElement) {\n this._checkboxInputElement.focus();\n }\n };\n ToggleInput.prototype.isSet = function () {\n if (this.isRequired) {\n return this.value === this.valueOn;\n }\n return this.value ? true : false;\n };\n Object.defineProperty(ToggleInput.prototype, \"value\", {\n get: function () {\n if (this._checkboxInputElement) {\n return this._checkboxInputElement.checked ? this.valueOn : this.valueOff;\n }\n else {\n return undefined;\n }\n },\n enumerable: false,\n configurable: true\n });\n ToggleInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\n ToggleInput.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\n ToggleInput.valueOnProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"valueOn\", true, undefined, \"true\", function (sender) { return \"true\"; });\n ToggleInput.valueOffProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"valueOff\", true, undefined, \"false\", function (sender) { return \"false\"; });\n ToggleInput.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"wrap\", false);\n __decorate([\n serialization_1.property(ToggleInput.valueProperty)\n ], ToggleInput.prototype, \"defaultValue\", void 0);\n __decorate([\n serialization_1.property(ToggleInput.titleProperty)\n ], ToggleInput.prototype, \"title\", void 0);\n __decorate([\n serialization_1.property(ToggleInput.valueOnProperty)\n ], ToggleInput.prototype, \"valueOn\", void 0);\n __decorate([\n serialization_1.property(ToggleInput.valueOffProperty)\n ], ToggleInput.prototype, \"valueOff\", void 0);\n __decorate([\n serialization_1.property(ToggleInput.wrapProperty)\n ], ToggleInput.prototype, \"wrap\", void 0);\n return ToggleInput;\n}(Input));\nexports.ToggleInput = ToggleInput;\nvar Choice = /** @class */ (function (_super) {\n __extends(Choice, _super);\n function Choice(title, value) {\n var _this = _super.call(this) || this;\n _this.title = title;\n _this.value = value;\n return _this;\n }\n //#endregion\n Choice.prototype.getSchemaKey = function () {\n return \"Choice\";\n };\n //#region Schema\n Choice.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\n Choice.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\n __decorate([\n serialization_1.property(Choice.titleProperty)\n ], Choice.prototype, \"title\", void 0);\n __decorate([\n serialization_1.property(Choice.valueProperty)\n ], Choice.prototype, \"value\", void 0);\n return Choice;\n}(serialization_1.SerializableObject));\nexports.Choice = Choice;\nvar ChoiceSetInput = /** @class */ (function (_super) {\n __extends(ChoiceSetInput, _super);\n function ChoiceSetInput() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.isMultiSelect = false;\n _this.wrap = false;\n _this.choices = [];\n return _this;\n }\n Object.defineProperty(ChoiceSetInput.prototype, \"isCompact\", {\n get: function () {\n return !this.style || this.style === \"compact\";\n },\n set: function (value) {\n this.style = value ? undefined : \"expanded\";\n },\n enumerable: false,\n configurable: true\n });\n ChoiceSetInput.getUniqueCategoryName = function () {\n var uniqueCategoryName = \"__ac-category\" + ChoiceSetInput.uniqueCategoryCounter;\n ChoiceSetInput.uniqueCategoryCounter++;\n return uniqueCategoryName;\n };\n // Make sure `aria-current` is applied to the currently-selected item\n ChoiceSetInput.prototype.internalApplyAriaCurrent = function () {\n if (this._selectElement) {\n var options = this._selectElement.options;\n if (options) {\n for (var i = 0; i < options.length; i++) {\n if (options[i].selected) {\n options[i].setAttribute(\"aria-current\", \"true\");\n }\n else {\n options[i].removeAttribute(\"aria-current\");\n }\n }\n }\n }\n };\n ChoiceSetInput.prototype.renderCompoundInput = function (cssClassName, type, defaultValues) {\n var _this = this;\n var element = document.createElement(\"div\");\n element.className = this.hostConfig.makeCssClassName(\"ac-input\", cssClassName);\n element.style.width = \"100%\";\n this._toggleInputs = [];\n this._labels = [];\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\n var choice = _a[_i];\n var input = document.createElement(\"input\");\n input.id = Utils.generateUniqueId();\n input.type = type;\n input.style.margin = \"0\";\n input.style.display = \"inline-block\";\n input.style.verticalAlign = \"middle\";\n input.style.flex = \"0 0 auto\";\n input.name = this.id ? this.id : this._uniqueCategoryName;\n if (this.isRequired) {\n input.setAttribute(\"aria-required\", \"true\");\n }\n if (choice.value) {\n input.value = choice.value;\n }\n if (choice.title) {\n input.setAttribute(\"aria-label\", choice.title);\n }\n if (defaultValues && choice.value) {\n if (defaultValues.indexOf(choice.value) >= 0) {\n input.checked = true;\n }\n }\n input.onchange = function () { _this.valueChanged(); };\n this._toggleInputs.push(input);\n var compoundInput = document.createElement(\"div\");\n compoundInput.style.display = \"flex\";\n compoundInput.style.alignItems = \"center\";\n Utils.appendChild(compoundInput, input);\n var label = new TextBlock();\n label.setParent(this);\n label.forElementId = input.id;\n label.hostConfig = this.hostConfig;\n label.text = choice.title ? choice.title : \"Choice \" + this._toggleInputs.length;\n label.useMarkdown = shared_1.GlobalSettings.useMarkdownInRadioButtonAndCheckbox;\n label.wrap = this.wrap;\n var labelElement = label.render();\n this._labels.push(labelElement);\n if (labelElement) {\n labelElement.id = Utils.generateUniqueId();\n labelElement.style.display = \"inline-block\";\n labelElement.style.flex = \"1 1 auto\";\n labelElement.style.marginLeft = \"6px\";\n labelElement.style.verticalAlign = \"middle\";\n var spacerElement = document.createElement(\"div\");\n spacerElement.style.width = \"6px\";\n Utils.appendChild(compoundInput, spacerElement);\n Utils.appendChild(compoundInput, labelElement);\n }\n Utils.appendChild(element, compoundInput);\n }\n return element;\n };\n ChoiceSetInput.prototype.updateInputControlAriaLabelledBy = function () {\n if ((this.isMultiSelect || this.style === \"expanded\") && this._toggleInputs && this._labels) {\n var labelIds = this.getAllLabelIds();\n for (var i = 0; i < this._toggleInputs.length; i++) {\n var joinedLabelIds = labelIds.join(\" \");\n var label = this._labels[i];\n if (label && label.id) {\n joinedLabelIds += \" \" + label.id;\n }\n if (joinedLabelIds) {\n this._toggleInputs[i].setAttribute(\"aria-labelledby\", joinedLabelIds);\n }\n else {\n this._toggleInputs[i].removeAttribute(\"aria-labelledby\");\n }\n }\n }\n else {\n _super.prototype.updateInputControlAriaLabelledBy.call(this);\n }\n };\n ChoiceSetInput.prototype.internalRender = function () {\n var _this = this;\n this._uniqueCategoryName = ChoiceSetInput.getUniqueCategoryName();\n if (this.isMultiSelect) {\n // Render as a list of toggle inputs\n return this.renderCompoundInput(\"ac-choiceSetInput-multiSelect\", \"checkbox\", this.defaultValue ? this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator) : undefined);\n }\n else {\n if (this.style === \"expanded\") {\n // Render as a series of radio buttons\n return this.renderCompoundInput(\"ac-choiceSetInput-expanded\", \"radio\", this.defaultValue ? [this.defaultValue] : undefined);\n }\n else if (this.style === \"filtered\") {\n // Render as a text input coupled with a datalist\n var inputContainer = document.createElement(\"div\");\n inputContainer.style.width = \"100%\";\n this._textInput = document.createElement(\"input\");\n this._textInput.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-multichoiceInput\", \"ac-choiceSetInput-filtered\");\n this._textInput.type = \"text\";\n this._textInput.style.width = \"100%\";\n this._textInput.oninput = function () {\n _this.valueChanged();\n if (_this._textInput) {\n // Remove aria-label when value is not empty so narration software doesn't\n // read the placeholder\n if (_this.value) {\n _this._textInput.removeAttribute(\"placeholder\");\n _this._textInput.removeAttribute(\"aria-label\");\n }\n else if (_this.placeholder) {\n _this._textInput.placeholder = _this.placeholder;\n _this._textInput.setAttribute(\"aria-label\", _this.placeholder);\n }\n }\n };\n if (this.defaultValue) {\n this._textInput.value = this.defaultValue;\n }\n if (this.placeholder && !this._textInput.value) {\n this._textInput.placeholder = this.placeholder;\n this._textInput.setAttribute(\"aria-label\", this.placeholder);\n }\n var dataList = document.createElement(\"datalist\");\n dataList.id = Utils.generateUniqueId();\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\n var choice = _a[_i];\n var option = document.createElement(\"option\");\n // To fix https://stackoverflow.com/questions/29882361/show-datalist-labels-but-submit-the-actual-value\n // value is mapped to choice.title other than choice.value\n option.value = choice.title;\n option.setAttribute(\"aria-label\", choice.title);\n dataList.appendChild(option);\n }\n this._textInput.setAttribute(\"list\", dataList.id);\n inputContainer.append(this._textInput, dataList);\n return inputContainer;\n }\n else {\n // Render as a combo box\n this._selectElement = document.createElement(\"select\");\n this._selectElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-multichoiceInput\", \"ac-choiceSetInput-compact\");\n this._selectElement.style.width = \"100%\";\n var option = document.createElement(\"option\");\n option.selected = true;\n option.disabled = true;\n option.hidden = true;\n option.value = \"\";\n if (this.placeholder) {\n option.text = this.placeholder;\n }\n Utils.appendChild(this._selectElement, option);\n for (var _b = 0, _c = this.choices; _b < _c.length; _b++) {\n var choice = _c[_b];\n var option_1 = document.createElement(\"option\");\n option_1.value = choice.value;\n option_1.text = choice.title;\n option_1.setAttribute(\"aria-label\", choice.title);\n if (choice.value == this.defaultValue) {\n option_1.selected = true;\n }\n Utils.appendChild(this._selectElement, option_1);\n }\n this._selectElement.onchange = function () {\n _this.internalApplyAriaCurrent();\n _this.valueChanged();\n };\n this.internalApplyAriaCurrent();\n return this._selectElement;\n }\n }\n };\n ChoiceSetInput.prototype.getJsonTypeName = function () {\n return \"Input.ChoiceSet\";\n };\n ChoiceSetInput.prototype.focus = function () {\n if (this._toggleInputs && (this.isMultiSelect || this.style === \"expanded\")) {\n if (this._toggleInputs.length > 0) {\n this._toggleInputs[0].focus();\n }\n }\n else if (this._textInput) {\n this._textInput.focus();\n }\n else {\n _super.prototype.focus.call(this);\n }\n };\n ChoiceSetInput.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (this.choices.length == 0) {\n context.addFailure(this, Enums.ValidationEvent.CollectionCantBeEmpty, strings_1.Strings.errors.choiceSetMustHaveAtLeastOneChoice());\n }\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\n var choice = _a[_i];\n if (!choice.title || !choice.value) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.choiceSetChoicesMustHaveTitleAndValue());\n }\n }\n };\n ChoiceSetInput.prototype.isSet = function () {\n return this.value ? true : false;\n };\n ChoiceSetInput.prototype.isValid = function () {\n if (this._textInput) {\n if (this.value === \"\" || this.value === this.placeholder) {\n return true;\n }\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\n var choice = _a[_i];\n if (this.value === choice.value) {\n return true;\n }\n }\n return false;\n }\n return _super.prototype.isValid.call(this);\n };\n Object.defineProperty(ChoiceSetInput.prototype, \"value\", {\n get: function () {\n if (!this.isMultiSelect) {\n if (this._selectElement) {\n return this._selectElement.selectedIndex > 0 ? this._selectElement.value : undefined;\n }\n else if (this._textInput) {\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\n var choice = _a[_i];\n if (choice.title && this._textInput.value === choice.title) {\n return choice.value;\n }\n }\n return this._textInput.value;\n }\n else if (this._toggleInputs && this._toggleInputs.length > 0) {\n for (var _b = 0, _c = this._toggleInputs; _b < _c.length; _b++) {\n var toggleInput = _c[_b];\n if (toggleInput.checked) {\n return toggleInput.value;\n }\n }\n }\n return undefined;\n }\n else {\n if (!this._toggleInputs || this._toggleInputs.length == 0) {\n return undefined;\n }\n var result = \"\";\n for (var _d = 0, _e = this._toggleInputs; _d < _e.length; _d++) {\n var toggleInput = _e[_d];\n if (toggleInput.checked) {\n if (result != \"\") {\n result += this.hostConfig.choiceSetInputValueSeparator;\n }\n result += toggleInput.value;\n }\n }\n return result ? result : undefined;\n }\n },\n enumerable: false,\n configurable: true\n });\n ChoiceSetInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\n ChoiceSetInput.choicesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"choices\", Choice);\n ChoiceSetInput.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_0, \"style\", [\n { value: \"compact\" },\n { value: \"expanded\" },\n { value: \"filtered\", targetVersion: serialization_1.Versions.v1_5 }\n ], \"compact\");\n ChoiceSetInput.isMultiSelectProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"isMultiSelect\", false);\n ChoiceSetInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\n ChoiceSetInput.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"wrap\", false);\n //#endregion\n ChoiceSetInput.uniqueCategoryCounter = 0;\n __decorate([\n serialization_1.property(ChoiceSetInput.valueProperty)\n ], ChoiceSetInput.prototype, \"defaultValue\", void 0);\n __decorate([\n serialization_1.property(ChoiceSetInput.styleProperty)\n ], ChoiceSetInput.prototype, \"style\", void 0);\n __decorate([\n serialization_1.property(ChoiceSetInput.isMultiSelectProperty)\n ], ChoiceSetInput.prototype, \"isMultiSelect\", void 0);\n __decorate([\n serialization_1.property(ChoiceSetInput.placeholderProperty)\n ], ChoiceSetInput.prototype, \"placeholder\", void 0);\n __decorate([\n serialization_1.property(ChoiceSetInput.wrapProperty)\n ], ChoiceSetInput.prototype, \"wrap\", void 0);\n __decorate([\n serialization_1.property(ChoiceSetInput.choicesProperty)\n ], ChoiceSetInput.prototype, \"choices\", void 0);\n return ChoiceSetInput;\n}(Input));\nexports.ChoiceSetInput = ChoiceSetInput;\nvar NumberInput = /** @class */ (function (_super) {\n __extends(NumberInput, _super);\n function NumberInput() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NumberInput.prototype.internalRender = function () {\n var _this = this;\n this._numberInputElement = document.createElement(\"input\");\n this._numberInputElement.setAttribute(\"type\", \"number\");\n if (this.min !== undefined) {\n this._numberInputElement.setAttribute(\"min\", this.min.toString());\n }\n if (this.max !== undefined) {\n this._numberInputElement.setAttribute(\"max\", this.max.toString());\n }\n this._numberInputElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-numberInput\");\n this._numberInputElement.style.width = \"100%\";\n this._numberInputElement.tabIndex = 0;\n if (this.defaultValue !== undefined) {\n this._numberInputElement.valueAsNumber = this.defaultValue;\n }\n if (this.placeholder) {\n this._numberInputElement.placeholder = this.placeholder;\n this._numberInputElement.setAttribute(\"aria-label\", this.placeholder);\n }\n this._numberInputElement.oninput = function () { _this.valueChanged(); };\n return this._numberInputElement;\n };\n NumberInput.prototype.getJsonTypeName = function () {\n return \"Input.Number\";\n };\n NumberInput.prototype.isSet = function () {\n return this.value !== undefined && !isNaN(this.value);\n };\n NumberInput.prototype.isValid = function () {\n if (this.value === undefined) {\n return !this.isRequired;\n }\n var result = true;\n if (this.min !== undefined) {\n result = result && (this.value >= this.min);\n }\n if (this.max !== undefined) {\n result = result && (this.value <= this.max);\n }\n return result;\n };\n Object.defineProperty(NumberInput.prototype, \"value\", {\n get: function () {\n return this._numberInputElement ? this._numberInputElement.valueAsNumber : undefined;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n NumberInput.valueProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"value\");\n NumberInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\n NumberInput.minProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"min\");\n NumberInput.maxProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"max\");\n __decorate([\n serialization_1.property(NumberInput.valueProperty)\n ], NumberInput.prototype, \"defaultValue\", void 0);\n __decorate([\n serialization_1.property(NumberInput.minProperty)\n ], NumberInput.prototype, \"min\", void 0);\n __decorate([\n serialization_1.property(NumberInput.maxProperty)\n ], NumberInput.prototype, \"max\", void 0);\n __decorate([\n serialization_1.property(NumberInput.placeholderProperty)\n ], NumberInput.prototype, \"placeholder\", void 0);\n return NumberInput;\n}(Input));\nexports.NumberInput = NumberInput;\nvar DateInput = /** @class */ (function (_super) {\n __extends(DateInput, _super);\n function DateInput() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DateInput.prototype.internalRender = function () {\n var _this = this;\n this._dateInputElement = document.createElement(\"input\");\n this._dateInputElement.setAttribute(\"type\", \"date\");\n if (this.min) {\n this._dateInputElement.setAttribute(\"min\", this.min);\n }\n if (this.max) {\n this._dateInputElement.setAttribute(\"max\", this.max);\n }\n if (this.placeholder) {\n this._dateInputElement.placeholder = this.placeholder;\n this._dateInputElement.setAttribute(\"aria-label\", this.placeholder);\n }\n this._dateInputElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-dateInput\");\n this._dateInputElement.style.width = \"100%\";\n this._dateInputElement.oninput = function () { _this.valueChanged(); };\n if (this.defaultValue) {\n this._dateInputElement.value = this.defaultValue;\n }\n return this._dateInputElement;\n };\n DateInput.prototype.getJsonTypeName = function () {\n return \"Input.Date\";\n };\n DateInput.prototype.isSet = function () {\n return this.value ? true : false;\n };\n DateInput.prototype.isValid = function () {\n if (!this.value) {\n return !this.isRequired;\n }\n var valueAsDate = new Date(this.value);\n var result = true;\n if (this.min) {\n var minDate = new Date(this.min);\n result = result && (valueAsDate >= minDate);\n }\n if (this.max) {\n var maxDate = new Date(this.max);\n result = result && (valueAsDate <= maxDate);\n }\n return result;\n };\n Object.defineProperty(DateInput.prototype, \"value\", {\n get: function () {\n return this._dateInputElement ? this._dateInputElement.value : undefined;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n DateInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\n DateInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\n DateInput.minProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"min\");\n DateInput.maxProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"max\");\n __decorate([\n serialization_1.property(DateInput.valueProperty)\n ], DateInput.prototype, \"defaultValue\", void 0);\n __decorate([\n serialization_1.property(DateInput.minProperty)\n ], DateInput.prototype, \"min\", void 0);\n __decorate([\n serialization_1.property(DateInput.maxProperty)\n ], DateInput.prototype, \"max\", void 0);\n __decorate([\n serialization_1.property(DateInput.placeholderProperty)\n ], DateInput.prototype, \"placeholder\", void 0);\n return DateInput;\n}(Input));\nexports.DateInput = DateInput;\nvar TimeProperty = /** @class */ (function (_super) {\n __extends(TimeProperty, _super);\n function TimeProperty(targetVersion, name) {\n var _this = _super.call(this, targetVersion, name, function (sender, property, source, context) {\n var value = source[property.name];\n if (typeof value === \"string\" && value && /^[0-9]{2}:[0-9]{2}$/.test(value)) {\n return value;\n }\n return undefined;\n }, function (sender, property, target, value, context) {\n context.serializeValue(target, property.name, value);\n }) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n return _this;\n }\n return TimeProperty;\n}(serialization_1.CustomProperty));\nexports.TimeProperty = TimeProperty;\nvar TimeInput = /** @class */ (function (_super) {\n __extends(TimeInput, _super);\n function TimeInput() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TimeInput.convertTimeStringToDate = function (timeString) {\n return new Date(\"1973-09-04T\" + timeString + \":00Z\");\n };\n TimeInput.prototype.internalRender = function () {\n var _this = this;\n this._timeInputElement = document.createElement(\"input\");\n this._timeInputElement.setAttribute(\"type\", \"time\");\n this._timeInputElement.setAttribute(\"min\", this.min);\n this._timeInputElement.setAttribute(\"max\", this.max);\n this._timeInputElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-timeInput\");\n this._timeInputElement.style.width = \"100%\";\n this._timeInputElement.oninput = function () { _this.valueChanged(); };\n if (this.placeholder) {\n this._timeInputElement.placeholder = this.placeholder;\n this._timeInputElement.setAttribute(\"aria-label\", this.placeholder);\n }\n if (this.defaultValue) {\n this._timeInputElement.value = this.defaultValue;\n }\n return this._timeInputElement;\n };\n TimeInput.prototype.getJsonTypeName = function () {\n return \"Input.Time\";\n };\n TimeInput.prototype.isSet = function () {\n return this.value ? true : false;\n };\n TimeInput.prototype.isValid = function () {\n if (!this.value) {\n return !this.isRequired;\n }\n var valueAsDate = TimeInput.convertTimeStringToDate(this.value);\n var result = true;\n if (this.min) {\n var minDate = TimeInput.convertTimeStringToDate(this.min);\n result = result && (valueAsDate >= minDate);\n }\n if (this.max) {\n var maxDate = TimeInput.convertTimeStringToDate(this.max);\n result = result && (valueAsDate <= maxDate);\n }\n return result;\n };\n Object.defineProperty(TimeInput.prototype, \"value\", {\n get: function () {\n return this._timeInputElement ? this._timeInputElement.value : undefined;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n TimeInput.valueProperty = new TimeProperty(serialization_1.Versions.v1_0, \"value\");\n TimeInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\n TimeInput.minProperty = new TimeProperty(serialization_1.Versions.v1_0, \"min\");\n TimeInput.maxProperty = new TimeProperty(serialization_1.Versions.v1_0, \"max\");\n __decorate([\n serialization_1.property(TimeInput.valueProperty)\n ], TimeInput.prototype, \"defaultValue\", void 0);\n __decorate([\n serialization_1.property(TimeInput.minProperty)\n ], TimeInput.prototype, \"min\", void 0);\n __decorate([\n serialization_1.property(TimeInput.maxProperty)\n ], TimeInput.prototype, \"max\", void 0);\n __decorate([\n serialization_1.property(TimeInput.placeholderProperty)\n ], TimeInput.prototype, \"placeholder\", void 0);\n return TimeInput;\n}(Input));\nexports.TimeInput = TimeInput;\nvar Action = /** @class */ (function (_super) {\n __extends(Action, _super);\n function Action() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.style = Enums.ActionStyle.Default;\n _this.mode = Enums.ActionMode.Primary;\n _this._state = 0 /* Normal */;\n _this._isFocusable = true;\n return _this;\n }\n //#endregion\n Action.prototype.renderButtonContent = function () {\n if (this.renderedElement) {\n // Cache hostConfig for perf\n var hostConfig = this.hostConfig;\n var titleElement = document.createElement(\"div\");\n titleElement.style.overflow = \"hidden\";\n titleElement.style.textOverflow = \"ellipsis\";\n if (!(hostConfig.actions.iconPlacement == Enums.ActionIconPlacement.AboveTitle || hostConfig.actions.allowTitleToWrap)) {\n titleElement.style.whiteSpace = \"nowrap\";\n }\n if (this.title) {\n titleElement.innerText = this.title;\n }\n if (!this.iconUrl) {\n this.renderedElement.classList.add(\"noIcon\");\n this.renderedElement.appendChild(titleElement);\n }\n else {\n var iconElement = document.createElement(\"img\");\n iconElement.src = this.iconUrl;\n iconElement.style.width = hostConfig.actions.iconSize + \"px\";\n iconElement.style.height = hostConfig.actions.iconSize + \"px\";\n iconElement.style.flex = \"0 0 auto\";\n if (hostConfig.actions.iconPlacement == Enums.ActionIconPlacement.AboveTitle) {\n this.renderedElement.classList.add(\"iconAbove\");\n this.renderedElement.style.flexDirection = \"column\";\n if (this.title) {\n iconElement.style.marginBottom = \"6px\";\n }\n }\n else {\n this.renderedElement.classList.add(\"iconLeft\");\n iconElement.style.maxHeight = \"100%\";\n if (this.title) {\n iconElement.style.marginRight = \"6px\";\n }\n }\n this.renderedElement.appendChild(iconElement);\n this.renderedElement.appendChild(titleElement);\n }\n }\n };\n Action.prototype.getParentContainer = function () {\n if (this.parent instanceof Container) {\n return this.parent;\n }\n return this.parent ? this.parent.getParentContainer() : undefined;\n };\n Action.prototype.updateCssClasses = function () {\n var _a, _b;\n if (this.parent && this.renderedElement) {\n var hostConfig = this.parent.hostConfig;\n this.renderedElement.className = hostConfig.makeCssClassName(this.isEnabled ? \"ac-pushButton\" : \"ac-pushButton-disabled\");\n var parentContainer = this.getParentContainer();\n if (parentContainer) {\n var parentContainerStyle = parentContainer.getEffectiveStyle();\n if (parentContainerStyle) {\n this.renderedElement.classList.add(\"style-\" + parentContainerStyle);\n }\n }\n this.renderedElement.tabIndex = this.isFocusable ? 0 : -1;\n switch (this._state) {\n case 1 /* Expanded */:\n this.renderedElement.classList.add(hostConfig.makeCssClassName(\"expanded\"));\n break;\n case 2 /* Subdued */:\n this.renderedElement.classList.add(hostConfig.makeCssClassName(\"subdued\"));\n break;\n }\n if (this.style && this.isEnabled) {\n if (this.style === Enums.ActionStyle.Positive) {\n (_a = this.renderedElement.classList).add.apply(_a, hostConfig.makeCssClassNames(\"primary\", \"style-positive\"));\n }\n else {\n (_b = this.renderedElement.classList).add.apply(_b, hostConfig.makeCssClassNames(\"style-\" + this.style.toLowerCase()));\n }\n }\n }\n };\n Action.prototype.getDefaultSerializationContext = function () {\n return new SerializationContext();\n };\n Action.prototype.internalGetReferencedInputs = function () {\n return {};\n };\n Action.prototype.internalPrepareForExecution = function (inputs) {\n // Do nothing in base implementation\n };\n Action.prototype.internalValidateInputs = function (referencedInputs) {\n var result = [];\n if (referencedInputs) {\n for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) {\n var key = _a[_i];\n var input = referencedInputs[key];\n if (!input.validateValue()) {\n result.push(input);\n }\n }\n }\n return result;\n };\n Action.prototype.shouldSerialize = function (context) {\n return context.actionRegistry.findByName(this.getJsonTypeName()) !== undefined;\n };\n Action.prototype.raiseExecuteActionEvent = function () {\n if (this.onExecute) {\n this.onExecute(this);\n }\n raiseExecuteActionEvent(this);\n };\n Action.prototype.getHref = function () {\n return \"\";\n };\n Action.prototype.getAriaRole = function () {\n return \"button\";\n };\n Action.prototype.setupElementForAccessibility = function (element, promoteTooltipToLabel) {\n if (promoteTooltipToLabel === void 0) { promoteTooltipToLabel = false; }\n element.tabIndex = this.isEnabled ? 0 : -1;\n element.setAttribute(\"role\", this.getAriaRole());\n if (element instanceof HTMLButtonElement) {\n element.disabled = !this.isEnabled;\n }\n if (!this.isEnabled) {\n element.setAttribute(\"aria-disabled\", \"true\");\n }\n else {\n element.classList.add(this.hostConfig.makeCssClassName(\"ac-selectable\"));\n }\n if (this.title) {\n element.setAttribute(\"aria-label\", this.title);\n element.title = this.title;\n }\n if (this.tooltip) {\n var targetAriaAttribute = promoteTooltipToLabel ? (this.title ? \"aria-description\" : \"aria-label\") : \"aria-description\";\n element.setAttribute(targetAriaAttribute, this.tooltip);\n element.title = this.tooltip;\n }\n };\n Action.prototype.parse = function (source, context) {\n return _super.prototype.parse.call(this, source, context ? context : new SerializationContext());\n };\n Action.prototype.render = function () {\n var _this = this;\n var buttonElement = document.createElement(\"button\");\n buttonElement.type = \"button\";\n buttonElement.style.display = \"flex\";\n buttonElement.style.alignItems = \"center\";\n buttonElement.style.justifyContent = \"center\";\n buttonElement.onclick = function (e) {\n if (_this.isEnabled) {\n e.preventDefault();\n e.cancelBubble = true;\n _this.execute();\n }\n };\n this._renderedElement = buttonElement;\n this.renderButtonContent();\n this.updateCssClasses();\n this.setupElementForAccessibility(buttonElement);\n };\n Action.prototype.execute = function () {\n if (this._actionCollection) {\n this._actionCollection.actionExecuted(this);\n }\n this.raiseExecuteActionEvent();\n };\n Action.prototype.prepareForExecution = function () {\n var referencedInputs = this.getReferencedInputs();\n var invalidInputs = this.internalValidateInputs(referencedInputs);\n if (invalidInputs.length > 0) {\n invalidInputs[0].focus();\n return false;\n }\n this.internalPrepareForExecution(referencedInputs);\n return true;\n };\n ;\n Action.prototype.remove = function () {\n if (this._actionCollection) {\n return this._actionCollection.removeAction(this);\n }\n return false;\n };\n Action.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n return [];\n };\n Action.prototype.getResourceInformation = function () {\n return this.iconUrl ? [{ url: this.iconUrl, mimeType: \"image\" }] : [];\n };\n Action.prototype.getActionById = function (id) {\n return this.id === id ? this : undefined;\n };\n Action.prototype.getReferencedInputs = function () {\n return this.internalGetReferencedInputs();\n };\n /**\n * Validates the inputs associated with this action.\n *\n * @returns A list of inputs that failed validation, or an empty array if no input failed validation.\n */\n Action.prototype.validateInputs = function () {\n return this.internalValidateInputs(this.getReferencedInputs());\n };\n Object.defineProperty(Action.prototype, \"isPrimary\", {\n get: function () {\n return this.style == Enums.ActionStyle.Positive;\n },\n set: function (value) {\n if (value) {\n this.style = Enums.ActionStyle.Positive;\n }\n else {\n if (this.style == Enums.ActionStyle.Positive) {\n this.style = Enums.ActionStyle.Default;\n }\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Action.prototype, \"hostConfig\", {\n get: function () {\n return this.parent ? this.parent.hostConfig : host_config_1.defaultHostConfig;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Action.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Action.prototype, \"state\", {\n get: function () {\n return this._state;\n },\n set: function (value) {\n if (this._state !== value) {\n this._state = value;\n this.updateCssClasses();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Action.prototype, \"isFocusable\", {\n get: function () {\n return this._isFocusable;\n },\n set: function (value) {\n if (this._isFocusable !== value) {\n this._isFocusable = value;\n this.updateCssClasses();\n }\n },\n enumerable: false,\n configurable: true\n });\n Action.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\n Action.iconUrlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"iconUrl\");\n Action.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_2, \"style\", [\n { value: Enums.ActionStyle.Default },\n { value: Enums.ActionStyle.Positive },\n { value: Enums.ActionStyle.Destructive }\n ], Enums.ActionStyle.Default);\n Action.modeProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_5, \"mode\", [\n { value: Enums.ActionMode.Primary },\n { value: Enums.ActionMode.Secondary }\n ], Enums.ActionMode.Primary);\n Action.tooltipProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_5, \"tooltip\");\n Action.isEnabledProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, \"isEnabled\", true);\n __decorate([\n serialization_1.property(Action.titleProperty)\n ], Action.prototype, \"title\", void 0);\n __decorate([\n serialization_1.property(Action.iconUrlProperty)\n ], Action.prototype, \"iconUrl\", void 0);\n __decorate([\n serialization_1.property(Action.styleProperty)\n ], Action.prototype, \"style\", void 0);\n __decorate([\n serialization_1.property(Action.modeProperty)\n ], Action.prototype, \"mode\", void 0);\n __decorate([\n serialization_1.property(Action.tooltipProperty)\n ], Action.prototype, \"tooltip\", void 0);\n __decorate([\n serialization_1.property(Action.isEnabledProperty)\n ], Action.prototype, \"isEnabled\", void 0);\n return Action;\n}(card_object_1.CardObject));\nexports.Action = Action;\nvar SubmitActionBase = /** @class */ (function (_super) {\n __extends(SubmitActionBase, _super);\n function SubmitActionBase() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n //#endregion\n _this._isPrepared = false;\n return _this;\n }\n SubmitActionBase.prototype.internalGetReferencedInputs = function () {\n var result = {};\n if (this.associatedInputs !== \"none\") {\n var current = this.parent;\n var inputs = [];\n while (current) {\n inputs = inputs.concat(current.getAllInputs(false));\n current = current.parent;\n }\n for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {\n var input = inputs_1[_i];\n if (input.id) {\n result[input.id] = input;\n }\n }\n }\n return result;\n };\n SubmitActionBase.prototype.internalPrepareForExecution = function (inputs) {\n if (this._originalData) {\n this._processedData = JSON.parse(JSON.stringify(this._originalData));\n }\n else {\n this._processedData = {};\n }\n if (this._processedData && inputs) {\n for (var _i = 0, _a = Object.keys(inputs); _i < _a.length; _i++) {\n var key = _a[_i];\n var input = inputs[key];\n if (input.id && input.isSet()) {\n this._processedData[input.id] = typeof input.value === \"string\" ? input.value : input.value.toString();\n }\n }\n }\n this._isPrepared = true;\n };\n Object.defineProperty(SubmitActionBase.prototype, \"data\", {\n get: function () {\n return this._isPrepared ? this._processedData : this._originalData;\n },\n set: function (value) {\n this._originalData = value;\n this._isPrepared = false;\n },\n enumerable: false,\n configurable: true\n });\n SubmitActionBase.dataProperty = new serialization_1.PropertyDefinition(serialization_1.Versions.v1_0, \"data\");\n SubmitActionBase.associatedInputsProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_3, \"associatedInputs\", function (sender, property, source, context) {\n var value = source[property.name];\n if (value !== undefined && typeof value === \"string\") {\n return value.toLowerCase() === \"none\" ? \"none\" : \"auto\";\n }\n return undefined;\n }, function (sender, property, target, value, context) {\n context.serializeValue(target, property.name, value);\n });\n __decorate([\n serialization_1.property(SubmitActionBase.dataProperty)\n ], SubmitActionBase.prototype, \"_originalData\", void 0);\n __decorate([\n serialization_1.property(SubmitActionBase.associatedInputsProperty)\n ], SubmitActionBase.prototype, \"associatedInputs\", void 0);\n return SubmitActionBase;\n}(Action));\nexports.SubmitActionBase = SubmitActionBase;\nvar SubmitAction = /** @class */ (function (_super) {\n __extends(SubmitAction, _super);\n function SubmitAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SubmitAction.prototype.getJsonTypeName = function () {\n return SubmitAction.JsonTypeName;\n };\n // Note the \"weird\" way this field is declared is to work around a breaking\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n SubmitAction.JsonTypeName = \"Action.Submit\";\n return SubmitAction;\n}(SubmitActionBase));\nexports.SubmitAction = SubmitAction;\nvar ExecuteAction = /** @class */ (function (_super) {\n __extends(ExecuteAction, _super);\n function ExecuteAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n //#endregion\n ExecuteAction.prototype.getJsonTypeName = function () {\n return ExecuteAction.JsonTypeName;\n };\n // Note the \"weird\" way this field is declared is to work around a breaking\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n ExecuteAction.JsonTypeName = \"Action.Execute\";\n //#region Schema\n ExecuteAction.verbProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"verb\");\n __decorate([\n serialization_1.property(ExecuteAction.verbProperty)\n ], ExecuteAction.prototype, \"verb\", void 0);\n return ExecuteAction;\n}(SubmitActionBase));\nexports.ExecuteAction = ExecuteAction;\nvar OpenUrlAction = /** @class */ (function (_super) {\n __extends(OpenUrlAction, _super);\n function OpenUrlAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n OpenUrlAction.prototype.getJsonTypeName = function () {\n return OpenUrlAction.JsonTypeName;\n };\n OpenUrlAction.prototype.getAriaRole = function () {\n return \"link\";\n };\n OpenUrlAction.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (!this.url) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"url\"));\n }\n };\n OpenUrlAction.prototype.getHref = function () {\n return this.url;\n };\n //#region Schema\n OpenUrlAction.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"url\");\n //#endregion\n // Note the \"weird\" way this field is declared is to work around a breaking\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n OpenUrlAction.JsonTypeName = \"Action.OpenUrl\";\n __decorate([\n serialization_1.property(OpenUrlAction.urlProperty)\n ], OpenUrlAction.prototype, \"url\", void 0);\n return OpenUrlAction;\n}(Action));\nexports.OpenUrlAction = OpenUrlAction;\nvar ToggleVisibilityAction = /** @class */ (function (_super) {\n __extends(ToggleVisibilityAction, _super);\n function ToggleVisibilityAction() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.targetElements = {};\n return _this;\n }\n ToggleVisibilityAction.prototype.updateAriaControlsAttribute = function () {\n // apply aria labels to make it clear which elements this action will toggle\n if (this.targetElements) {\n var elementIds = Object.keys(this.targetElements);\n if (this._renderedElement) {\n if (elementIds.length > 0) {\n this._renderedElement.setAttribute(\"aria-controls\", elementIds.join(\" \"));\n }\n else {\n this._renderedElement.removeAttribute(\"aria-controls\");\n }\n }\n }\n };\n ToggleVisibilityAction.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (!this.targetElements) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"targetElements\"));\n }\n };\n ToggleVisibilityAction.prototype.getJsonTypeName = function () {\n return ToggleVisibilityAction.JsonTypeName;\n };\n ToggleVisibilityAction.prototype.render = function () {\n _super.prototype.render.call(this);\n this.updateAriaControlsAttribute();\n };\n ToggleVisibilityAction.prototype.execute = function () {\n if (this.parent) {\n for (var _i = 0, _a = Object.keys(this.targetElements); _i < _a.length; _i++) {\n var elementId = _a[_i];\n var targetElement = this.parent.getRootElement().getElementById(elementId);\n if (targetElement) {\n if (typeof this.targetElements[elementId] === \"boolean\") {\n targetElement.isVisible = this.targetElements[elementId];\n }\n else {\n targetElement.isVisible = !targetElement.isVisible;\n }\n }\n }\n }\n };\n ToggleVisibilityAction.prototype.addTargetElement = function (elementId, isVisible) {\n if (isVisible === void 0) { isVisible = undefined; }\n this.targetElements[elementId] = isVisible;\n this.updateAriaControlsAttribute();\n };\n ToggleVisibilityAction.prototype.removeTargetElement = function (elementId) {\n delete this.targetElements[elementId];\n this.updateAriaControlsAttribute();\n };\n ToggleVisibilityAction.targetElementsProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_2, \"targetElements\", function (sender, property, source, context) {\n var result = {};\n if (Array.isArray(source[property.name])) {\n for (var _i = 0, _a = source[property.name]; _i < _a.length; _i++) {\n var item = _a[_i];\n if (typeof item === \"string\") {\n result[item] = undefined;\n }\n else if (typeof item === \"object\") {\n var elementId = item[\"elementId\"];\n if (typeof elementId === \"string\") {\n result[elementId] = Utils.parseBool(item[\"isVisible\"]);\n }\n }\n }\n }\n return result;\n }, function (sender, property, target, value, context) {\n var targetElements = [];\n for (var _i = 0, _a = Object.keys(value); _i < _a.length; _i++) {\n var id = _a[_i];\n if (typeof value[id] === \"boolean\") {\n targetElements.push({\n elementId: id,\n isVisible: value[id]\n });\n }\n else {\n targetElements.push(id);\n }\n }\n context.serializeArray(target, property.name, targetElements);\n }, {}, function (sender) { return {}; });\n //#endregion\n // Note the \"weird\" way this field is declared is to work around a breaking\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n ToggleVisibilityAction.JsonTypeName = \"Action.ToggleVisibility\";\n __decorate([\n serialization_1.property(ToggleVisibilityAction.targetElementsProperty)\n ], ToggleVisibilityAction.prototype, \"targetElements\", void 0);\n return ToggleVisibilityAction;\n}(Action));\nexports.ToggleVisibilityAction = ToggleVisibilityAction;\nvar StringWithSubstitutionProperty = /** @class */ (function (_super) {\n __extends(StringWithSubstitutionProperty, _super);\n function StringWithSubstitutionProperty(targetVersion, name) {\n var _this = _super.call(this, targetVersion, name, undefined, function () { return new shared_1.StringWithSubstitutions(); }) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n return _this;\n }\n StringWithSubstitutionProperty.prototype.parse = function (sender, source, context) {\n var result = new shared_1.StringWithSubstitutions();\n result.set(Utils.parseString(source[this.name]));\n return result;\n };\n StringWithSubstitutionProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeValue(target, this.name, value.getOriginal());\n };\n return StringWithSubstitutionProperty;\n}(serialization_1.PropertyDefinition));\nvar HttpHeader = /** @class */ (function (_super) {\n __extends(HttpHeader, _super);\n //#endregion\n function HttpHeader(name, value) {\n if (name === void 0) { name = \"\"; }\n if (value === void 0) { value = \"\"; }\n var _this = _super.call(this) || this;\n _this.name = name;\n _this.value = value;\n return _this;\n }\n HttpHeader.prototype.getSchemaKey = function () {\n return \"HttpHeader\";\n };\n HttpHeader.prototype.getReferencedInputs = function (inputs, referencedInputs) {\n this._value.getReferencedInputs(inputs, referencedInputs);\n };\n HttpHeader.prototype.prepareForExecution = function (inputs) {\n this._value.substituteInputValues(inputs, shared_1.ContentTypes.applicationXWwwFormUrlencoded);\n };\n Object.defineProperty(HttpHeader.prototype, \"value\", {\n get: function () {\n return this._value.get();\n },\n set: function (newValue) {\n this._value.set(newValue);\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n HttpHeader.nameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"name\");\n HttpHeader.valueProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, \"value\");\n __decorate([\n serialization_1.property(HttpHeader.nameProperty)\n ], HttpHeader.prototype, \"name\", void 0);\n __decorate([\n serialization_1.property(HttpHeader.valueProperty)\n ], HttpHeader.prototype, \"_value\", void 0);\n return HttpHeader;\n}(serialization_1.SerializableObject));\nexports.HttpHeader = HttpHeader;\nvar HttpAction = /** @class */ (function (_super) {\n __extends(HttpAction, _super);\n function HttpAction() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._ignoreInputValidation = false;\n return _this;\n }\n HttpAction.prototype.internalGetReferencedInputs = function () {\n var allInputs = this.parent ? this.parent.getRootElement().getAllInputs() : [];\n var result = {};\n this._url.getReferencedInputs(allInputs, result);\n for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {\n var header = _a[_i];\n header.getReferencedInputs(allInputs, result);\n }\n this._body.getReferencedInputs(allInputs, result);\n return result;\n };\n HttpAction.prototype.internalPrepareForExecution = function (inputs) {\n if (inputs) {\n this._url.substituteInputValues(inputs, shared_1.ContentTypes.applicationXWwwFormUrlencoded);\n var contentType = shared_1.ContentTypes.applicationJson;\n for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {\n var header = _a[_i];\n header.prepareForExecution(inputs);\n if (header.name && header.name.toLowerCase() == \"content-type\") {\n contentType = header.value;\n }\n }\n this._body.substituteInputValues(inputs, contentType);\n }\n };\n ;\n HttpAction.prototype.getJsonTypeName = function () {\n return HttpAction.JsonTypeName;\n };\n HttpAction.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (!this.url) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"url\"));\n }\n if (this.headers.length > 0) {\n for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {\n var header = _a[_i];\n if (!header.name) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.actionHttpHeadersMustHaveNameAndValue());\n }\n }\n }\n };\n Object.defineProperty(HttpAction.prototype, \"ignoreInputValidation\", {\n get: function () {\n return this._ignoreInputValidation;\n },\n set: function (value) {\n this._ignoreInputValidation = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(HttpAction.prototype, \"url\", {\n get: function () {\n return this._url.get();\n },\n set: function (value) {\n this._url.set(value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(HttpAction.prototype, \"body\", {\n get: function () {\n return this._body.get();\n },\n set: function (value) {\n this._body.set(value);\n },\n enumerable: false,\n configurable: true\n });\n HttpAction.urlProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, \"url\");\n HttpAction.bodyProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, \"body\");\n HttpAction.methodProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"method\");\n HttpAction.headersProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"headers\", HttpHeader);\n HttpAction.ignoreInputValidationProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, \"ignoreInputValidation\", false);\n //#endregion\n // Note the \"weird\" way this field is declared is to work around a breaking\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n HttpAction.JsonTypeName = \"Action.Http\";\n __decorate([\n serialization_1.property(HttpAction.urlProperty)\n ], HttpAction.prototype, \"_url\", void 0);\n __decorate([\n serialization_1.property(HttpAction.bodyProperty)\n ], HttpAction.prototype, \"_body\", void 0);\n __decorate([\n serialization_1.property(HttpAction.methodProperty)\n ], HttpAction.prototype, \"method\", void 0);\n __decorate([\n serialization_1.property(HttpAction.headersProperty)\n ], HttpAction.prototype, \"headers\", void 0);\n __decorate([\n serialization_1.property(HttpAction.ignoreInputValidationProperty)\n ], HttpAction.prototype, \"_ignoreInputValidation\", void 0);\n return HttpAction;\n}(Action));\nexports.HttpAction = HttpAction;\nvar ShowCardAction = /** @class */ (function (_super) {\n __extends(ShowCardAction, _super);\n function ShowCardAction() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.card = new InlineAdaptiveCard();\n return _this;\n }\n ShowCardAction.prototype.updateCssClasses = function () {\n _super.prototype.updateCssClasses.call(this);\n if (this.renderedElement) {\n var effectiveHostConfig = this.parent ? this.parent.hostConfig : host_config_1.defaultHostConfig;\n this.renderedElement.classList.add(effectiveHostConfig.makeCssClassName(\"expandable\"));\n this.renderedElement.setAttribute(\"aria-expanded\", (this.state === 1 /* Expanded */).toString());\n }\n };\n ShowCardAction.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n var jsonCard = source[\"card\"];\n if (jsonCard) {\n this.card.parse(jsonCard, context);\n }\n else {\n context.logParseEvent(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.showCardMustHaveCard());\n }\n };\n ShowCardAction.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n if (this.card) {\n context.serializeValue(target, \"card\", this.card.toJSON(context));\n }\n };\n ShowCardAction.prototype.raiseExecuteActionEvent = function () {\n if (this.hostConfig.actions.showCard.actionMode === Enums.ShowCardActionMode.Popup) {\n // Only raise the event in Popup mode.\n _super.prototype.raiseExecuteActionEvent.call(this);\n }\n };\n ShowCardAction.prototype.getJsonTypeName = function () {\n return ShowCardAction.JsonTypeName;\n };\n ShowCardAction.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n this.card.internalValidateProperties(context);\n };\n ShowCardAction.prototype.setParent = function (value) {\n _super.prototype.setParent.call(this, value);\n this.card.setParent(value);\n };\n ShowCardAction.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n return this.card.getAllInputs(processActions);\n };\n ShowCardAction.prototype.getResourceInformation = function () {\n return _super.prototype.getResourceInformation.call(this).concat(this.card.getResourceInformation());\n };\n ShowCardAction.prototype.getActionById = function (id) {\n var result = _super.prototype.getActionById.call(this, id);\n if (!result) {\n result = this.card.getActionById(id);\n }\n return result;\n };\n // Note the \"weird\" way this field is declared is to work around a breaking\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n ShowCardAction.JsonTypeName = \"Action.ShowCard\";\n return ShowCardAction;\n}(Action));\nexports.ShowCardAction = ShowCardAction;\nvar OverflowAction = /** @class */ (function (_super) {\n __extends(OverflowAction, _super);\n function OverflowAction(actions) {\n var _this = _super.call(this) || this;\n _this.actions = actions;\n _this.title = strings_1.Strings.defaults.overflowButtonText();\n return _this;\n }\n OverflowAction.prototype.getActions = function () {\n return this.actions;\n };\n OverflowAction.prototype.getJsonTypeName = function () {\n return ShowCardAction.JsonTypeName;\n };\n OverflowAction.prototype.execute = function () {\n var _this = this;\n var _a;\n var shouldDisplayPopupMenu = !raiseDisplayOverflowActionMenuEvent(this, this.renderedElement);\n if (shouldDisplayPopupMenu && this.renderedElement) {\n var contextMenu_1 = new controls_1.PopupMenu();\n contextMenu_1.hostConfig = this.hostConfig;\n var _loop_1 = function (i) {\n var menuItem = new controls_1.MenuItem(i.toString(), (_a = this_1.actions[i].title) !== null && _a !== void 0 ? _a : \"\");\n menuItem.isEnabled = this_1.actions[i].isEnabled;\n menuItem.onClick = function () {\n var actionToExecute = _this.actions[i];\n contextMenu_1.closePopup(false);\n if (actionToExecute.isEnabled) {\n actionToExecute.execute();\n }\n };\n contextMenu_1.items.add(menuItem);\n };\n var this_1 = this;\n for (var i = 0; i < this.actions.length; i++) {\n _loop_1(i);\n }\n ;\n contextMenu_1.popup(this.renderedElement);\n }\n };\n OverflowAction.JsonTypeName = \"Action.Overflow\";\n return OverflowAction;\n}(Action));\nvar ActionCollection = /** @class */ (function () {\n function ActionCollection(owner) {\n this._items = [];\n this._renderedActions = [];\n this._owner = owner;\n }\n ActionCollection.prototype.isActionAllowed = function (action) {\n var forbiddenTypes = this._owner.getForbiddenActionTypes();\n if (forbiddenTypes) {\n for (var _i = 0, forbiddenTypes_1 = forbiddenTypes; _i < forbiddenTypes_1.length; _i++) {\n var forbiddenType = forbiddenTypes_1[_i];\n if (action.constructor === forbiddenType) {\n return false;\n }\n }\n }\n return true;\n };\n ActionCollection.prototype.refreshContainer = function () {\n this._actionCardContainer.innerHTML = \"\";\n if (!this._actionCard) {\n this._actionCardContainer.style.marginTop = \"0px\";\n return;\n }\n this._actionCardContainer.style.marginTop = this.renderedActionCount > 0 ? this._owner.hostConfig.actions.showCard.inlineTopMargin + \"px\" : \"0px\";\n var padding = this._owner.getEffectivePadding();\n this._owner.getImmediateSurroundingPadding(padding);\n var physicalPadding = this._owner.hostConfig.paddingDefinitionToSpacingDefinition(padding);\n if (this._actionCard) {\n this._actionCard.style.paddingLeft = physicalPadding.left + \"px\";\n this._actionCard.style.paddingRight = physicalPadding.right + \"px\";\n this._actionCard.style.marginLeft = \"-\" + physicalPadding.left + \"px\";\n this._actionCard.style.marginRight = \"-\" + physicalPadding.right + \"px\";\n if (physicalPadding.bottom != 0 && !this._owner.isDesignMode()) {\n this._actionCard.style.paddingBottom = physicalPadding.bottom + \"px\";\n this._actionCard.style.marginBottom = \"-\" + physicalPadding.bottom + \"px\";\n }\n Utils.appendChild(this._actionCardContainer, this._actionCard);\n }\n };\n ActionCollection.prototype.layoutChanged = function () {\n this._owner.getRootElement().updateLayout();\n };\n ActionCollection.prototype.showActionCard = function (action, suppressStyle, raiseEvent) {\n if (suppressStyle === void 0) { suppressStyle = false; }\n if (raiseEvent === void 0) { raiseEvent = true; }\n action.card.suppressStyle = suppressStyle;\n // Always re-render a ShowCard action in design mode; reuse already rendered ShowCard (if available) otherwise\n var renderedCard = action.card.renderedElement && !this._owner.isDesignMode() ? action.card.renderedElement : action.card.render();\n this._actionCard = renderedCard;\n this._expandedAction = action;\n this.refreshContainer();\n if (raiseEvent) {\n this.layoutChanged();\n raiseInlineCardExpandedEvent(action, true);\n }\n };\n ActionCollection.prototype.collapseExpandedAction = function () {\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\n var action = _a[_i];\n action.state = 0 /* Normal */;\n }\n var previouslyExpandedAction = this._expandedAction;\n this._expandedAction = undefined;\n this._actionCard = undefined;\n this.refreshContainer();\n if (previouslyExpandedAction) {\n this.layoutChanged();\n raiseInlineCardExpandedEvent(previouslyExpandedAction, false);\n }\n };\n ActionCollection.prototype.expandShowCardAction = function (action, raiseEvent) {\n var _this = this;\n var afterSelectedAction = false;\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\n var renderedAction = _a[_i];\n // Remove actions after selected action from tabOrder, to skip focus directly to expanded card\n if (afterSelectedAction) {\n renderedAction.isFocusable = false;\n }\n if (renderedAction !== action) {\n renderedAction.state = 2 /* Subdued */;\n }\n else {\n renderedAction.state = 1 /* Expanded */;\n afterSelectedAction = true;\n if (renderedAction.renderedElement) {\n renderedAction.renderedElement.onblur = function (e) {\n for (var _i = 0, _a = _this._renderedActions; _i < _a.length; _i++) {\n var ra = _a[_i];\n ra.isFocusable = true;\n }\n };\n }\n }\n }\n this.showActionCard(action, !(this._owner.isAtTheVeryLeft() && this._owner.isAtTheVeryRight()), raiseEvent);\n };\n ActionCollection.prototype.actionExecuted = function (action) {\n if (!(action instanceof ShowCardAction)) {\n this.collapseExpandedAction();\n }\n else {\n if (action === this._expandedAction) {\n this.collapseExpandedAction();\n }\n else if (this._owner.hostConfig.actions.showCard.actionMode === Enums.ShowCardActionMode.Inline) {\n this.expandShowCardAction(action, true);\n }\n }\n };\n ActionCollection.prototype.parse = function (source, context) {\n this.clear();\n if (Array.isArray(source)) {\n for (var _i = 0, source_1 = source; _i < source_1.length; _i++) {\n var jsonAction = source_1[_i];\n var action = context.parseAction(this._owner, jsonAction, [], !this._owner.isDesignMode());\n if (action) {\n this.addAction(action);\n }\n }\n }\n };\n ActionCollection.prototype.toJSON = function (target, propertyName, context) {\n context.serializeArray(target, propertyName, this._items);\n };\n ActionCollection.prototype.getActionAt = function (id) {\n return this._items[id];\n };\n ActionCollection.prototype.getActionCount = function () {\n return this._items.length;\n };\n ActionCollection.prototype.getActionById = function (id) {\n var result = undefined;\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n result = item.getActionById(id);\n if (result) {\n break;\n }\n }\n return result;\n };\n ActionCollection.prototype.validateProperties = function (context) {\n if (this._owner.hostConfig.actions.maxActions && this._items.length > this._owner.hostConfig.actions.maxActions) {\n context.addFailure(this._owner, Enums.ValidationEvent.TooManyActions, strings_1.Strings.errors.tooManyActions(this._owner.hostConfig.actions.maxActions));\n }\n if (this._items.length > 0 && !this._owner.hostConfig.supportsInteractivity) {\n context.addFailure(this._owner, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.interactivityNotAllowed());\n }\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n if (!this.isActionAllowed(item)) {\n context.addFailure(this._owner, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(item.getJsonTypeName()));\n }\n item.internalValidateProperties(context);\n }\n };\n ActionCollection.prototype.render = function (orientation, isDesignMode) {\n // Cache hostConfig for better perf\n var hostConfig = this._owner.hostConfig;\n if (!hostConfig.supportsInteractivity) {\n return undefined;\n }\n var element = document.createElement(\"div\");\n var maxActions = hostConfig.actions.maxActions ? Math.min(hostConfig.actions.maxActions, this._items.length) : this._items.length;\n this._actionCardContainer = document.createElement(\"div\");\n this._renderedActions = [];\n if (hostConfig.actions.preExpandSingleShowCardAction && maxActions == 1 && this._items[0] instanceof ShowCardAction && this.isActionAllowed(this._items[0])) {\n this.showActionCard(this._items[0], true);\n this._renderedActions.push(this._items[0]);\n }\n else {\n var buttonStrip = document.createElement(\"div\");\n buttonStrip.className = hostConfig.makeCssClassName(\"ac-actionSet\");\n buttonStrip.style.display = \"flex\";\n buttonStrip.setAttribute(\"role\", \"menubar\");\n if (orientation == Enums.Orientation.Horizontal) {\n buttonStrip.style.flexDirection = \"row\";\n if (this._owner.horizontalAlignment && hostConfig.actions.actionAlignment != Enums.ActionAlignment.Stretch) {\n switch (this._owner.horizontalAlignment) {\n case Enums.HorizontalAlignment.Center:\n buttonStrip.style.justifyContent = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n buttonStrip.style.justifyContent = \"flex-end\";\n break;\n default:\n buttonStrip.style.justifyContent = \"flex-start\";\n break;\n }\n }\n else {\n switch (hostConfig.actions.actionAlignment) {\n case Enums.ActionAlignment.Center:\n buttonStrip.style.justifyContent = \"center\";\n break;\n case Enums.ActionAlignment.Right:\n buttonStrip.style.justifyContent = \"flex-end\";\n break;\n default:\n buttonStrip.style.justifyContent = \"flex-start\";\n break;\n }\n }\n }\n else {\n buttonStrip.style.flexDirection = \"column\";\n if (this._owner.horizontalAlignment && hostConfig.actions.actionAlignment != Enums.ActionAlignment.Stretch) {\n switch (this._owner.horizontalAlignment) {\n case Enums.HorizontalAlignment.Center:\n buttonStrip.style.alignItems = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n buttonStrip.style.alignItems = \"flex-end\";\n break;\n default:\n buttonStrip.style.alignItems = \"flex-start\";\n break;\n }\n }\n else {\n switch (hostConfig.actions.actionAlignment) {\n case Enums.ActionAlignment.Center:\n buttonStrip.style.alignItems = \"center\";\n break;\n case Enums.ActionAlignment.Right:\n buttonStrip.style.alignItems = \"flex-end\";\n break;\n case Enums.ActionAlignment.Stretch:\n buttonStrip.style.alignItems = \"stretch\";\n break;\n default:\n buttonStrip.style.alignItems = \"flex-start\";\n break;\n }\n }\n }\n var allowedActions = this._items.filter(this.isActionAllowed.bind(this));\n var primaryActions_1 = [];\n var secondaryActions_1 = [];\n if (!this._owner.isDesignMode()) {\n allowedActions.forEach(function (action) { return action.mode === Enums.ActionMode.Secondary ? secondaryActions_1.push(action) : primaryActions_1.push(action); });\n // If primaryActions.length > maxActions, extra actions are moved to overflow\n var overflowPrimaryActions = primaryActions_1.splice(hostConfig.actions.maxActions);\n if (shared_1.GlobalSettings.allowMoreThanMaxActionsInOverflowMenu) {\n secondaryActions_1.push.apply(secondaryActions_1, overflowPrimaryActions);\n }\n var shouldRenderOverflowActionButton = true;\n if (secondaryActions_1.length > 0) {\n if (!this._overflowAction) {\n this._overflowAction = new OverflowAction(secondaryActions_1);\n this._overflowAction.setParent(this._owner);\n this._overflowAction[\"_actionCollection\"] = this;\n }\n var isRootAction = this._owner instanceof AdaptiveCard && !this._owner.parent;\n shouldRenderOverflowActionButton = !raiseRenderOverflowActionsEvent(this._overflowAction, isRootAction);\n }\n if (this._overflowAction && shouldRenderOverflowActionButton) {\n primaryActions_1.push(this._overflowAction);\n }\n }\n else {\n primaryActions_1 = allowedActions;\n }\n for (var i = 0; i < primaryActions_1.length; i++) {\n var action = primaryActions_1[i];\n action.render();\n if (action.renderedElement) {\n if (primaryActions_1.length > 1) {\n action.renderedElement.setAttribute(\"aria-posinset\", (i + 1).toString());\n action.renderedElement.setAttribute(\"aria-setsize\", primaryActions_1.length.toString());\n action.renderedElement.setAttribute(\"role\", \"menuitem\");\n }\n if (hostConfig.actions.actionsOrientation == Enums.Orientation.Horizontal && hostConfig.actions.actionAlignment == Enums.ActionAlignment.Stretch) {\n action.renderedElement.style.flex = \"0 1 100%\";\n }\n else {\n action.renderedElement.style.flex = \"0 1 auto\";\n }\n buttonStrip.appendChild(action.renderedElement);\n this._renderedActions.push(action);\n if (i < primaryActions_1.length - 1 && hostConfig.actions.buttonSpacing > 0) {\n var spacer = document.createElement(\"div\");\n if (orientation === Enums.Orientation.Horizontal) {\n spacer.style.flex = \"0 0 auto\";\n spacer.style.width = hostConfig.actions.buttonSpacing + \"px\";\n }\n else {\n spacer.style.height = hostConfig.actions.buttonSpacing + \"px\";\n }\n Utils.appendChild(buttonStrip, spacer);\n }\n }\n }\n var buttonStripContainer = document.createElement(\"div\");\n buttonStripContainer.style.overflow = \"hidden\";\n buttonStripContainer.appendChild(buttonStrip);\n Utils.appendChild(element, buttonStripContainer);\n }\n Utils.appendChild(element, this._actionCardContainer);\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\n var renderedAction = _a[_i];\n if (renderedAction.state == 1 /* Expanded */) {\n this.expandShowCardAction(renderedAction, false);\n break;\n }\n }\n return this._renderedActions.length > 0 ? element : undefined;\n };\n ActionCollection.prototype.addAction = function (action) {\n if (!action) {\n throw new Error(\"The action parameter cannot be null.\");\n }\n if ((!action.parent || action.parent === this._owner) && this._items.indexOf(action) < 0) {\n this._items.push(action);\n if (!action.parent) {\n action.setParent(this._owner);\n }\n action[\"_actionCollection\"] = this;\n }\n else {\n throw new Error(strings_1.Strings.errors.actionAlreadyParented());\n }\n };\n ActionCollection.prototype.removeAction = function (action) {\n if (this.expandedAction && this._expandedAction == action) {\n this.collapseExpandedAction();\n }\n var actionIndex = this._items.indexOf(action);\n if (actionIndex >= 0) {\n this._items.splice(actionIndex, 1);\n action.setParent(undefined);\n action[\"_actionCollection\"] = undefined;\n for (var i = 0; i < this._renderedActions.length; i++) {\n if (this._renderedActions[i] == action) {\n this._renderedActions.splice(i, 1);\n break;\n }\n }\n return true;\n }\n return false;\n };\n ActionCollection.prototype.clear = function () {\n this._items = [];\n this._renderedActions = [];\n this._expandedAction = undefined;\n };\n ActionCollection.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n var result = [];\n if (processActions) {\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var action = _a[_i];\n result = result.concat(action.getAllInputs());\n }\n }\n return result;\n };\n ActionCollection.prototype.getResourceInformation = function () {\n var result = [];\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var action = _a[_i];\n result = result.concat(action.getResourceInformation());\n }\n return result;\n };\n Object.defineProperty(ActionCollection.prototype, \"renderedActionCount\", {\n get: function () {\n return this._renderedActions.length;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ActionCollection.prototype, \"expandedAction\", {\n get: function () {\n return this._expandedAction;\n },\n enumerable: false,\n configurable: true\n });\n return ActionCollection;\n}());\nvar ActionSet = /** @class */ (function (_super) {\n __extends(ActionSet, _super);\n function ActionSet() {\n var _this = _super.call(this) || this;\n _this._actionCollection = new ActionCollection(_this);\n return _this;\n }\n ActionSet.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this._actionCollection.parse(source[\"actions\"], context);\n };\n ActionSet.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n this._actionCollection.toJSON(target, \"actions\", context);\n };\n ActionSet.prototype.internalRender = function () {\n return this._actionCollection.render(this.orientation !== undefined ? this.orientation : this.hostConfig.actions.actionsOrientation, this.isDesignMode());\n };\n ActionSet.prototype.isBleedingAtBottom = function () {\n if (this._actionCollection.renderedActionCount == 0) {\n return _super.prototype.isBleedingAtBottom.call(this);\n }\n else {\n if (this._actionCollection.getActionCount() == 1) {\n return this._actionCollection.expandedAction !== undefined && !this.hostConfig.actions.preExpandSingleShowCardAction;\n }\n else {\n return this._actionCollection.expandedAction !== undefined;\n }\n }\n };\n ActionSet.prototype.getJsonTypeName = function () {\n return \"ActionSet\";\n };\n ActionSet.prototype.getActionCount = function () {\n return this._actionCollection.getActionCount();\n };\n ActionSet.prototype.getActionAt = function (index) {\n if (index >= 0 && index < this.getActionCount()) {\n return this._actionCollection.getActionAt(index);\n }\n else {\n return _super.prototype.getActionAt.call(this, index);\n }\n };\n ActionSet.prototype.getActionById = function (id) {\n var result = this._actionCollection.getActionById(id);\n return result ? result : _super.prototype.getActionById.call(this, id);\n };\n ActionSet.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n this._actionCollection.validateProperties(context);\n };\n ActionSet.prototype.addAction = function (action) {\n this._actionCollection.addAction(action);\n };\n ActionSet.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n return processActions ? this._actionCollection.getAllInputs() : [];\n };\n ActionSet.prototype.getResourceInformation = function () {\n return this._actionCollection.getResourceInformation();\n };\n /**\n * @inheritdoc\n */\n ActionSet.prototype.findDOMNodeOwner = function (node) {\n var target = undefined;\n for (var i = 0; i < this.getActionCount(); i++) {\n var action = this.getActionAt(i);\n if (action) {\n // recur through each Action\n target = action.findDOMNodeOwner(node);\n if (target) {\n return target;\n }\n }\n }\n // if not found in any Action, defer to parent implementation\n return _super.prototype.findDOMNodeOwner.call(this, node);\n };\n Object.defineProperty(ActionSet.prototype, \"isInteractive\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n ActionSet.orientationProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_1, \"orientation\", Enums.Orientation);\n __decorate([\n serialization_1.property(ActionSet.orientationProperty)\n ], ActionSet.prototype, \"orientation\", void 0);\n return ActionSet;\n}(CardElement));\nexports.ActionSet = ActionSet;\nvar ContainerStyleProperty = /** @class */ (function (_super) {\n __extends(ContainerStyleProperty, _super);\n function ContainerStyleProperty(targetVersion, name, defaultValue, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, [\n { value: Enums.ContainerStyle.Default },\n { value: Enums.ContainerStyle.Emphasis },\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Accent },\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Good },\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Attention },\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Warning }\n ], defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n return _this;\n }\n return ContainerStyleProperty;\n}(serialization_1.ValueSetProperty));\nexports.ContainerStyleProperty = ContainerStyleProperty;\nvar StylableCardElementContainer = /** @class */ (function (_super) {\n __extends(StylableCardElementContainer, _super);\n function StylableCardElementContainer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(StylableCardElementContainer.prototype, \"style\", {\n get: function () {\n if (this.allowCustomStyle) {\n var style = this.getValue(StylableCardElementContainer.styleProperty);\n if (style && this.hostConfig.containerStyles.getStyleByName(style)) {\n return style;\n }\n }\n return undefined;\n },\n set: function (value) {\n this.setValue(StylableCardElementContainer.styleProperty, value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StylableCardElementContainer.prototype, \"allowCustomStyle\", {\n //#endregion\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StylableCardElementContainer.prototype, \"hasExplicitStyle\", {\n get: function () {\n return this.getValue(StylableCardElementContainer.styleProperty) !== undefined;\n },\n enumerable: false,\n configurable: true\n });\n StylableCardElementContainer.prototype.applyBorder = function () {\n // No border in base implementation\n };\n StylableCardElementContainer.prototype.applyBackground = function () {\n if (this.renderedElement) {\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));\n if (styleDefinition.backgroundColor) {\n var bgColor = Utils.stringToCssColor(styleDefinition.backgroundColor);\n this.renderedElement.style.backgroundColor = bgColor;\n }\n }\n };\n StylableCardElementContainer.prototype.applyPadding = function () {\n _super.prototype.applyPadding.call(this);\n if (!this.renderedElement) {\n return;\n }\n var physicalPadding = new shared_1.SpacingDefinition();\n if (this.getEffectivePadding()) {\n physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding());\n }\n this.renderedElement.style.paddingTop = physicalPadding.top + \"px\";\n this.renderedElement.style.paddingRight = physicalPadding.right + \"px\";\n this.renderedElement.style.paddingBottom = physicalPadding.bottom + \"px\";\n this.renderedElement.style.paddingLeft = physicalPadding.left + \"px\";\n if (this.isBleeding()) {\n // Bleed into the first parent that does have padding\n var padding = new shared_1.PaddingDefinition();\n this.getImmediateSurroundingPadding(padding);\n var surroundingPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(padding);\n this.renderedElement.style.marginRight = \"-\" + surroundingPadding.right + \"px\";\n this.renderedElement.style.marginLeft = \"-\" + surroundingPadding.left + \"px\";\n if (!this.isDesignMode()) {\n this.renderedElement.style.marginTop = \"-\" + surroundingPadding.top + \"px\";\n this.renderedElement.style.marginBottom = \"-\" + surroundingPadding.bottom + \"px\";\n }\n if (this.separatorElement && this.separatorOrientation == Enums.Orientation.Horizontal) {\n this.separatorElement.style.marginLeft = \"-\" + surroundingPadding.left + \"px\";\n this.separatorElement.style.marginRight = \"-\" + surroundingPadding.right + \"px\";\n }\n }\n else {\n this.renderedElement.style.marginRight = \"0\";\n this.renderedElement.style.marginLeft = \"0\";\n this.renderedElement.style.marginTop = \"0\";\n this.renderedElement.style.marginBottom = \"0\";\n if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) {\n this.separatorElement.style.marginRight = \"0\";\n this.separatorElement.style.marginLeft = \"0\";\n }\n }\n };\n StylableCardElementContainer.prototype.getHasBackground = function () {\n var currentElement = this.parent;\n while (currentElement) {\n var currentElementHasBackgroundImage = currentElement instanceof Container ? currentElement.backgroundImage.isValid() : false;\n if (currentElement instanceof StylableCardElementContainer) {\n if (this.hasExplicitStyle && (currentElement.getEffectiveStyle() != this.getEffectiveStyle() || currentElementHasBackgroundImage)) {\n return true;\n }\n }\n currentElement = currentElement.parent;\n }\n return false;\n };\n StylableCardElementContainer.prototype.getDefaultPadding = function () {\n return this.getHasBackground() || this.getHasBorder() ?\n new shared_1.PaddingDefinition(Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding) : _super.prototype.getDefaultPadding.call(this);\n };\n StylableCardElementContainer.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n var explicitStyle = this.getValue(StylableCardElementContainer.styleProperty);\n if (explicitStyle !== undefined) {\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(explicitStyle);\n if (!styleDefinition) {\n context.addFailure(this, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(explicitStyle, \"style\"));\n }\n }\n };\n StylableCardElementContainer.prototype.render = function () {\n var renderedElement = _super.prototype.render.call(this);\n if (renderedElement && this.getHasBackground()) {\n this.applyBackground();\n }\n this.applyBorder();\n return renderedElement;\n };\n StylableCardElementContainer.prototype.getEffectiveStyle = function () {\n var effectiveStyle = this.style;\n return effectiveStyle ? effectiveStyle : _super.prototype.getEffectiveStyle.call(this);\n };\n //#region Schema\n StylableCardElementContainer.styleProperty = new ContainerStyleProperty(serialization_1.Versions.v1_0, \"style\");\n __decorate([\n serialization_1.property(StylableCardElementContainer.styleProperty)\n ], StylableCardElementContainer.prototype, \"style\", null);\n return StylableCardElementContainer;\n}(CardElementContainer));\nexports.StylableCardElementContainer = StylableCardElementContainer;\nvar ContainerBase = /** @class */ (function (_super) {\n __extends(ContainerBase, _super);\n function ContainerBase() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._bleed = false;\n return _this;\n }\n //#endregion\n ContainerBase.prototype.adjustRenderedElementSize = function (renderedElement) {\n _super.prototype.adjustRenderedElementSize.call(this, renderedElement);\n if (this.minPixelHeight) {\n renderedElement.style.minHeight = this.minPixelHeight + \"px\";\n }\n };\n ContainerBase.prototype.getHasExpandedAction = function () {\n return false;\n };\n ContainerBase.prototype.getBleed = function () {\n return this._bleed;\n };\n ContainerBase.prototype.setBleed = function (value) {\n this._bleed = value;\n };\n Object.defineProperty(ContainerBase.prototype, \"renderedActionCount\", {\n get: function () {\n return 0;\n },\n enumerable: false,\n configurable: true\n });\n ContainerBase.prototype.isBleeding = function () {\n return (this.getHasBackground() || this.hostConfig.alwaysAllowBleed) && this.getBleed();\n };\n ContainerBase.bleedProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"bleed\", false);\n ContainerBase.minHeightProperty = new serialization_1.PixelSizeProperty(serialization_1.Versions.v1_2, \"minHeight\");\n __decorate([\n serialization_1.property(ContainerBase.bleedProperty)\n ], ContainerBase.prototype, \"_bleed\", void 0);\n __decorate([\n serialization_1.property(ContainerBase.minHeightProperty)\n ], ContainerBase.prototype, \"minPixelHeight\", void 0);\n return ContainerBase;\n}(StylableCardElementContainer));\nexports.ContainerBase = ContainerBase;\nvar BackgroundImage = /** @class */ (function (_super) {\n __extends(BackgroundImage, _super);\n function BackgroundImage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n //#endregion\n BackgroundImage.prototype.getSchemaKey = function () {\n return \"BackgroundImage\";\n };\n BackgroundImage.prototype.internalParse = function (source, context) {\n if (typeof source === \"string\") {\n this.resetDefaultValues();\n this.url = source;\n }\n else {\n return _super.prototype.internalParse.call(this, source, context);\n }\n };\n BackgroundImage.prototype.apply = function (element) {\n if (this.url && element.renderedElement) {\n element.renderedElement.style.backgroundImage = \"url('\" + element.preProcessPropertyValue(BackgroundImage.urlProperty, this.url) + \"')\";\n switch (this.fillMode) {\n case Enums.FillMode.Repeat:\n element.renderedElement.style.backgroundRepeat = \"repeat\";\n break;\n case Enums.FillMode.RepeatHorizontally:\n element.renderedElement.style.backgroundRepeat = \"repeat-x\";\n break;\n case Enums.FillMode.RepeatVertically:\n element.renderedElement.style.backgroundRepeat = \"repeat-y\";\n break;\n case Enums.FillMode.Cover:\n default:\n element.renderedElement.style.backgroundRepeat = \"no-repeat\";\n element.renderedElement.style.backgroundSize = \"cover\";\n break;\n }\n switch (this.horizontalAlignment) {\n case Enums.HorizontalAlignment.Center:\n element.renderedElement.style.backgroundPositionX = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n element.renderedElement.style.backgroundPositionX = \"right\";\n break;\n }\n switch (this.verticalAlignment) {\n case Enums.VerticalAlignment.Center:\n element.renderedElement.style.backgroundPositionY = \"center\";\n break;\n case Enums.VerticalAlignment.Bottom:\n element.renderedElement.style.backgroundPositionY = \"bottom\";\n break;\n }\n }\n };\n BackgroundImage.prototype.isValid = function () {\n return this.url ? true : false;\n };\n //#region Schema\n BackgroundImage.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"url\");\n BackgroundImage.fillModeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"fillMode\", Enums.FillMode, Enums.FillMode.Cover);\n BackgroundImage.horizontalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"horizontalAlignment\", Enums.HorizontalAlignment, Enums.HorizontalAlignment.Left);\n BackgroundImage.verticalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"verticalAlignment\", Enums.VerticalAlignment, Enums.VerticalAlignment.Top);\n __decorate([\n serialization_1.property(BackgroundImage.urlProperty)\n ], BackgroundImage.prototype, \"url\", void 0);\n __decorate([\n serialization_1.property(BackgroundImage.fillModeProperty)\n ], BackgroundImage.prototype, \"fillMode\", void 0);\n __decorate([\n serialization_1.property(BackgroundImage.horizontalAlignmentProperty)\n ], BackgroundImage.prototype, \"horizontalAlignment\", void 0);\n __decorate([\n serialization_1.property(BackgroundImage.verticalAlignmentProperty)\n ], BackgroundImage.prototype, \"verticalAlignment\", void 0);\n return BackgroundImage;\n}(serialization_1.SerializableObject));\nexports.BackgroundImage = BackgroundImage;\nvar Container = /** @class */ (function (_super) {\n __extends(Container, _super);\n function Container() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n //#endregion\n _this._items = [];\n _this._renderedItems = [];\n return _this;\n }\n Object.defineProperty(Container.prototype, \"backgroundImage\", {\n get: function () {\n return this.getValue(Container.backgroundImageProperty);\n },\n enumerable: false,\n configurable: true\n });\n Container.prototype.insertItemAt = function (item, index, forceInsert) {\n if (!item.parent || forceInsert) {\n if (item.isStandalone) {\n if (index < 0 || index >= this._items.length) {\n this._items.push(item);\n }\n else {\n this._items.splice(index, 0, item);\n }\n item.setParent(this);\n }\n else {\n throw new Error(strings_1.Strings.errors.elementTypeNotStandalone(item.getJsonTypeName()));\n }\n }\n else {\n throw new Error(strings_1.Strings.errors.elementAlreadyParented());\n }\n };\n Container.prototype.getItemsCollectionPropertyName = function () {\n return \"items\";\n };\n Container.prototype.applyBackground = function () {\n if (this.backgroundImage.isValid() && this.renderedElement) {\n this.backgroundImage.apply(this);\n }\n _super.prototype.applyBackground.call(this);\n };\n Container.prototype.internalRender = function () {\n this._renderedItems = [];\n // Cache hostConfig to avoid walking the parent hierarchy several times\n var hostConfig = this.hostConfig;\n var element = document.createElement(\"div\");\n if (this.rtl !== undefined) {\n element.dir = this.rtl ? \"rtl\" : \"ltr\";\n }\n element.classList.add(hostConfig.makeCssClassName(\"ac-container\"));\n element.style.display = \"flex\";\n element.style.flexDirection = \"column\";\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\n // Forces the container to be at least as tall as its content.\n //\n // Fixes a quirk in Chrome where, for nested flex elements, the\n // inner element's height would never exceed the outer element's\n // height. This caused overflow truncation to break -- containers\n // would always be measured as not overflowing, since their heights\n // were constrained by their parents as opposed to truly reflecting\n // the height of their content.\n //\n // See the \"Browser Rendering Notes\" section of this answer:\n // https://stackoverflow.com/questions/36247140/why-doesnt-flex-item-shrink-past-content-size\n element.style.minHeight = '-webkit-min-content';\n }\n switch (this.getEffectiveVerticalContentAlignment()) {\n case Enums.VerticalAlignment.Center:\n element.style.justifyContent = \"center\";\n break;\n case Enums.VerticalAlignment.Bottom:\n element.style.justifyContent = \"flex-end\";\n break;\n default:\n element.style.justifyContent = \"flex-start\";\n break;\n }\n if (this._items.length > 0) {\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n var renderedItem = this.isElementAllowed(item) ? item.render() : undefined;\n if (renderedItem) {\n if (this._renderedItems.length > 0 && item.separatorElement) {\n item.separatorElement.style.flex = \"0 0 auto\";\n Utils.appendChild(element, item.separatorElement);\n }\n Utils.appendChild(element, renderedItem);\n this._renderedItems.push(item);\n }\n }\n }\n else {\n if (this.isDesignMode()) {\n var placeholderElement = this.createPlaceholderElement();\n placeholderElement.style.width = \"100%\";\n placeholderElement.style.height = \"100%\";\n element.appendChild(placeholderElement);\n }\n }\n return element;\n };\n Container.prototype.truncateOverflow = function (maxHeight) {\n if (this.renderedElement) {\n // Add 1 to account for rounding differences between browsers\n var boundary_1 = this.renderedElement.offsetTop + maxHeight + 1;\n var handleElement_1 = function (cardElement) {\n var elt = cardElement.renderedElement;\n if (elt) {\n switch (Utils.getFitStatus(elt, boundary_1)) {\n case Enums.ContainerFitStatus.FullyInContainer:\n var sizeChanged = cardElement['resetOverflow']();\n // If the element's size changed after resetting content,\n // we have to check if it still fits fully in the card\n if (sizeChanged) {\n handleElement_1(cardElement);\n }\n break;\n case Enums.ContainerFitStatus.Overflowing:\n var maxHeight_1 = boundary_1 - elt.offsetTop;\n cardElement['handleOverflow'](maxHeight_1);\n break;\n case Enums.ContainerFitStatus.FullyOutOfContainer:\n cardElement['handleOverflow'](0);\n break;\n }\n }\n };\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n handleElement_1(item);\n }\n return true;\n }\n return false;\n };\n Container.prototype.undoOverflowTruncation = function () {\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n item['resetOverflow']();\n }\n };\n Container.prototype.getHasBackground = function () {\n return this.backgroundImage.isValid() || _super.prototype.getHasBackground.call(this);\n };\n Container.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this.clear();\n this.setShouldFallback(false);\n var jsonItems = source[this.getItemsCollectionPropertyName()];\n if (Array.isArray(jsonItems)) {\n for (var _i = 0, jsonItems_1 = jsonItems; _i < jsonItems_1.length; _i++) {\n var item = jsonItems_1[_i];\n var element = context.parseElement(this, item, !this.isDesignMode());\n if (element) {\n this.insertItemAt(element, -1, true);\n }\n }\n }\n };\n Container.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n context.serializeArray(target, this.getItemsCollectionPropertyName(), this._items);\n };\n Object.defineProperty(Container.prototype, \"isSelectable\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Container.prototype.getEffectiveVerticalContentAlignment = function () {\n if (this.verticalContentAlignment !== undefined) {\n return this.verticalContentAlignment;\n }\n var parentContainer = this.getParentContainer();\n return parentContainer ? parentContainer.getEffectiveVerticalContentAlignment() : Enums.VerticalAlignment.Top;\n };\n Container.prototype.getItemCount = function () {\n return this._items.length;\n };\n Container.prototype.getItemAt = function (index) {\n return this._items[index];\n };\n Container.prototype.getFirstVisibleRenderedItem = function () {\n if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {\n for (var _i = 0, _a = this._renderedItems; _i < _a.length; _i++) {\n var item = _a[_i];\n if (item.isVisible) {\n return item;\n }\n }\n ;\n }\n return undefined;\n };\n Container.prototype.getLastVisibleRenderedItem = function () {\n if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {\n for (var i = this._renderedItems.length - 1; i >= 0; i--) {\n if (this._renderedItems[i].isVisible) {\n return this._renderedItems[i];\n }\n }\n }\n return undefined;\n };\n Container.prototype.getJsonTypeName = function () {\n return \"Container\";\n };\n Container.prototype.isFirstElement = function (element) {\n var designMode = this.isDesignMode();\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n if (item.isVisible || designMode) {\n return item == element;\n }\n }\n return false;\n };\n Container.prototype.isLastElement = function (element) {\n var designMode = this.isDesignMode();\n for (var i = this._items.length - 1; i >= 0; i--) {\n if (this._items[i].isVisible || designMode) {\n return this._items[i] == element;\n }\n }\n return false;\n };\n Container.prototype.isRtl = function () {\n if (this.rtl !== undefined) {\n return this.rtl;\n }\n else {\n var parentContainer = this.getParentContainer();\n return parentContainer ? parentContainer.isRtl() : false;\n }\n };\n Container.prototype.isBleedingAtTop = function () {\n var firstRenderedItem = this.getFirstVisibleRenderedItem();\n return this.isBleeding() || (firstRenderedItem ? firstRenderedItem.isBleedingAtTop() : false);\n };\n Container.prototype.isBleedingAtBottom = function () {\n var lastRenderedItem = this.getLastVisibleRenderedItem();\n return this.isBleeding() || (lastRenderedItem ? lastRenderedItem.isBleedingAtBottom() && lastRenderedItem.getEffectiveStyle() == this.getEffectiveStyle() : false);\n };\n Container.prototype.indexOf = function (cardElement) {\n return this._items.indexOf(cardElement);\n };\n Container.prototype.addItem = function (item) {\n this.insertItemAt(item, -1, false);\n };\n Container.prototype.insertItemBefore = function (item, insertBefore) {\n this.insertItemAt(item, this._items.indexOf(insertBefore), false);\n };\n Container.prototype.insertItemAfter = function (item, insertAfter) {\n this.insertItemAt(item, this._items.indexOf(insertAfter) + 1, false);\n };\n Container.prototype.removeItem = function (item) {\n var itemIndex = this._items.indexOf(item);\n if (itemIndex >= 0) {\n this._items.splice(itemIndex, 1);\n item.setParent(undefined);\n this.updateLayout();\n return true;\n }\n return false;\n };\n Container.prototype.clear = function () {\n this._items = [];\n this._renderedItems = [];\n };\n Container.prototype.getResourceInformation = function () {\n var result = _super.prototype.getResourceInformation.call(this);\n if (this.backgroundImage.isValid()) {\n result.push({\n url: this.backgroundImage.url,\n mimeType: \"image\"\n });\n }\n return result;\n };\n Container.prototype.getActionById = function (id) {\n var result = _super.prototype.getActionById.call(this, id);\n if (!result) {\n if (this.selectAction) {\n result = this.selectAction.getActionById(id);\n }\n if (!result) {\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var item = _a[_i];\n result = item.getActionById(id);\n if (result) {\n break;\n }\n }\n }\n }\n return result;\n };\n Object.defineProperty(Container.prototype, \"padding\", {\n get: function () {\n return this.getPadding();\n },\n set: function (value) {\n this.setPadding(value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"selectAction\", {\n get: function () {\n return this._selectAction;\n },\n set: function (value) {\n this._selectAction = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"bleed\", {\n get: function () {\n return this.getBleed();\n },\n set: function (value) {\n this.setBleed(value);\n },\n enumerable: false,\n configurable: true\n });\n Container.backgroundImageProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_0, \"backgroundImage\", BackgroundImage);\n Container.verticalContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_1, \"verticalContentAlignment\", Enums.VerticalAlignment);\n Container.rtlProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"rtl\");\n __decorate([\n serialization_1.property(Container.backgroundImageProperty)\n ], Container.prototype, \"backgroundImage\", null);\n __decorate([\n serialization_1.property(Container.verticalContentAlignmentProperty)\n ], Container.prototype, \"verticalContentAlignment\", void 0);\n __decorate([\n serialization_1.property(Container.rtlProperty)\n ], Container.prototype, \"rtl\", void 0);\n return Container;\n}(ContainerBase));\nexports.Container = Container;\nvar Column = /** @class */ (function (_super) {\n __extends(Column, _super);\n function Column(width) {\n if (width === void 0) { width = \"stretch\"; }\n var _this = _super.call(this) || this;\n _this.width = \"stretch\";\n //#endregion\n _this._computedWeight = 0;\n _this.width = width;\n return _this;\n }\n Column.prototype.adjustRenderedElementSize = function (renderedElement) {\n var minDesignTimeColumnHeight = 20;\n if (this.isDesignMode()) {\n renderedElement.style.minWidth = \"20px\";\n renderedElement.style.minHeight = (!this.minPixelHeight ? minDesignTimeColumnHeight : Math.max(this.minPixelHeight, minDesignTimeColumnHeight)) + \"px\";\n }\n else {\n renderedElement.style.minWidth = \"0\";\n if (this.minPixelHeight) {\n renderedElement.style.minHeight = this.minPixelHeight + \"px\";\n }\n }\n if (this.width === \"auto\") {\n renderedElement.style.flex = \"0 1 auto\";\n }\n else if (this.width === \"stretch\") {\n renderedElement.style.flex = \"1 1 50px\";\n }\n else if (this.width instanceof shared_1.SizeAndUnit) {\n if (this.width.unit == Enums.SizeUnit.Pixel) {\n renderedElement.style.flex = \"0 0 auto\";\n renderedElement.style.width = this.width.physicalSize + \"px\";\n }\n else {\n renderedElement.style.flex = \"1 1 \" + (this._computedWeight > 0 ? this._computedWeight : this.width.physicalSize) + \"%\";\n }\n }\n };\n Column.prototype.shouldSerialize = function (context) {\n return true;\n };\n Object.defineProperty(Column.prototype, \"separatorOrientation\", {\n get: function () {\n return Enums.Orientation.Vertical;\n },\n enumerable: false,\n configurable: true\n });\n Column.prototype.getJsonTypeName = function () {\n return \"Column\";\n };\n Object.defineProperty(Column.prototype, \"hasVisibleSeparator\", {\n get: function () {\n if (this.parent && this.parent instanceof ColumnSet) {\n return this.separatorElement !== undefined && !this.parent.isLeftMostElement(this);\n }\n else {\n return false;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Column.prototype, \"isStandalone\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n Column.widthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, \"width\", function (sender, property, source, context) {\n var result = property.defaultValue;\n var value = source[property.name];\n var invalidWidth = false;\n if (typeof value === \"number\" && !isNaN(value)) {\n result = new shared_1.SizeAndUnit(value, Enums.SizeUnit.Weight);\n }\n else if (value === \"auto\" || value === \"stretch\") {\n result = value;\n }\n else if (typeof value === \"string\") {\n try {\n result = shared_1.SizeAndUnit.parse(value);\n if (result.unit === Enums.SizeUnit.Pixel && property.targetVersion.compareTo(context.targetVersion) > 0) {\n invalidWidth = true;\n }\n }\n catch (e) {\n invalidWidth = true;\n }\n }\n else {\n invalidWidth = true;\n }\n if (invalidWidth) {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidColumnWidth(value));\n result = \"auto\";\n }\n return result;\n }, function (sender, property, target, value, context) {\n if (value instanceof shared_1.SizeAndUnit) {\n if (value.unit === Enums.SizeUnit.Pixel) {\n context.serializeValue(target, \"width\", value.physicalSize + \"px\");\n }\n else {\n context.serializeNumber(target, \"width\", value.physicalSize);\n }\n }\n else {\n context.serializeValue(target, \"width\", value);\n }\n }, \"stretch\");\n __decorate([\n serialization_1.property(Column.widthProperty)\n ], Column.prototype, \"width\", void 0);\n return Column;\n}(Container));\nexports.Column = Column;\nvar ColumnSet = /** @class */ (function (_super) {\n __extends(ColumnSet, _super);\n function ColumnSet() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._columns = [];\n return _this;\n }\n ColumnSet.prototype.createColumnInstance = function (source, context) {\n return context.parseCardObject(this, source, [], // Forbidden types not supported for elements for now\n !this.isDesignMode(), function (typeName) {\n return !typeName || typeName === \"Column\" ? new Column() : undefined;\n }, function (typeName, errorType) {\n context.logParseEvent(undefined, Enums.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\n });\n };\n ColumnSet.prototype.internalRender = function () {\n this._renderedColumns = [];\n if (this._columns.length > 0) {\n // Cache hostConfig to avoid walking the parent hierarchy several times\n var hostConfig = this.hostConfig;\n var element = document.createElement(\"div\");\n element.className = hostConfig.makeCssClassName(\"ac-columnSet\");\n element.style.display = \"flex\";\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\n // See comment in Container.internalRender()\n element.style.minHeight = '-webkit-min-content';\n }\n switch (this.getEffectiveHorizontalAlignment()) {\n case Enums.HorizontalAlignment.Center:\n element.style.justifyContent = \"center\";\n break;\n case Enums.HorizontalAlignment.Right:\n element.style.justifyContent = \"flex-end\";\n break;\n default:\n element.style.justifyContent = \"flex-start\";\n break;\n }\n var totalWeight = 0;\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n if (column.width instanceof shared_1.SizeAndUnit && (column.width.unit == Enums.SizeUnit.Weight)) {\n totalWeight += column.width.physicalSize;\n }\n }\n for (var _b = 0, _c = this._columns; _b < _c.length; _b++) {\n var column = _c[_b];\n if (column.width instanceof shared_1.SizeAndUnit && column.width.unit == Enums.SizeUnit.Weight && totalWeight > 0) {\n var computedWeight = 100 / totalWeight * column.width.physicalSize;\n // Best way to emulate \"internal\" access I know of\n column[\"_computedWeight\"] = computedWeight;\n }\n var renderedColumn = column.render();\n if (renderedColumn) {\n if (this._renderedColumns.length > 0 && column.separatorElement) {\n column.separatorElement.style.flex = \"0 0 auto\";\n Utils.appendChild(element, column.separatorElement);\n }\n Utils.appendChild(element, renderedColumn);\n this._renderedColumns.push(column);\n }\n }\n return this._renderedColumns.length > 0 ? element : undefined;\n }\n else {\n return undefined;\n }\n };\n ColumnSet.prototype.truncateOverflow = function (maxHeight) {\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n column['handleOverflow'](maxHeight);\n }\n return true;\n };\n ColumnSet.prototype.undoOverflowTruncation = function () {\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n column['resetOverflow']();\n }\n };\n Object.defineProperty(ColumnSet.prototype, \"isSelectable\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n ColumnSet.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this._columns = [];\n this._renderedColumns = [];\n var jsonColumns = source[\"columns\"];\n if (Array.isArray(jsonColumns)) {\n for (var _i = 0, jsonColumns_1 = jsonColumns; _i < jsonColumns_1.length; _i++) {\n var item = jsonColumns_1[_i];\n var column = this.createColumnInstance(item, context);\n if (column) {\n this._columns.push(column);\n }\n }\n }\n };\n ColumnSet.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n context.serializeArray(target, \"columns\", this._columns);\n };\n ColumnSet.prototype.isFirstElement = function (element) {\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n if (column.isVisible) {\n return column == element;\n }\n }\n return false;\n };\n ColumnSet.prototype.isBleedingAtTop = function () {\n if (this.isBleeding()) {\n return true;\n }\n if (this._renderedColumns && this._renderedColumns.length > 0) {\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n if (column.isBleedingAtTop()) {\n return true;\n }\n }\n }\n return false;\n };\n ColumnSet.prototype.isBleedingAtBottom = function () {\n if (this.isBleeding()) {\n return true;\n }\n if (this._renderedColumns && this._renderedColumns.length > 0) {\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n if (column.isBleedingAtBottom()) {\n return true;\n }\n }\n }\n return false;\n };\n ColumnSet.prototype.getItemCount = function () {\n return this._columns.length;\n };\n ColumnSet.prototype.getFirstVisibleRenderedItem = function () {\n if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {\n return this._renderedColumns[0];\n }\n else {\n return undefined;\n }\n };\n ColumnSet.prototype.getLastVisibleRenderedItem = function () {\n if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {\n return this._renderedColumns[this._renderedColumns.length - 1];\n }\n else {\n return undefined;\n }\n };\n ColumnSet.prototype.getColumnAt = function (index) {\n return this._columns[index];\n };\n ColumnSet.prototype.getItemAt = function (index) {\n return this.getColumnAt(index);\n };\n ColumnSet.prototype.getJsonTypeName = function () {\n return \"ColumnSet\";\n };\n ColumnSet.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n var weightedColumns = 0;\n var stretchedColumns = 0;\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n if (typeof column.width === \"number\") {\n weightedColumns++;\n }\n else if (column.width === \"stretch\") {\n stretchedColumns++;\n }\n }\n if (weightedColumns > 0 && stretchedColumns > 0) {\n context.addFailure(this, Enums.ValidationEvent.Hint, strings_1.Strings.hints.dontUseWeightedAndStrecthedColumnsInSameSet());\n }\n };\n ColumnSet.prototype.addColumn = function (column) {\n if (!column.parent) {\n this._columns.push(column);\n column.setParent(this);\n }\n else {\n throw new Error(strings_1.Strings.errors.columnAlreadyBelongsToAnotherSet());\n }\n };\n ColumnSet.prototype.removeItem = function (item) {\n if (item instanceof Column) {\n var itemIndex = this._columns.indexOf(item);\n if (itemIndex >= 0) {\n this._columns.splice(itemIndex, 1);\n item.setParent(undefined);\n this.updateLayout();\n return true;\n }\n }\n return false;\n };\n ColumnSet.prototype.indexOf = function (cardElement) {\n return cardElement instanceof Column ? this._columns.indexOf(cardElement) : -1;\n };\n ColumnSet.prototype.isLeftMostElement = function (element) {\n return this._columns.indexOf(element) == 0;\n };\n ColumnSet.prototype.isRightMostElement = function (element) {\n return this._columns.indexOf(element) == this._columns.length - 1;\n };\n ColumnSet.prototype.isTopElement = function (element) {\n return this._columns.indexOf(element) >= 0;\n };\n ColumnSet.prototype.isBottomElement = function (element) {\n return this._columns.indexOf(element) >= 0;\n };\n ColumnSet.prototype.getActionById = function (id) {\n var result = undefined;\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n result = column.getActionById(id);\n if (result) {\n break;\n }\n }\n return result;\n };\n Object.defineProperty(ColumnSet.prototype, \"bleed\", {\n get: function () {\n return this.getBleed();\n },\n set: function (value) {\n this.setBleed(value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ColumnSet.prototype, \"padding\", {\n get: function () {\n return this.getPadding();\n },\n set: function (value) {\n this.setPadding(value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ColumnSet.prototype, \"selectAction\", {\n get: function () {\n return this._selectAction;\n },\n set: function (value) {\n this._selectAction = value;\n },\n enumerable: false,\n configurable: true\n });\n return ColumnSet;\n}(ContainerBase));\nexports.ColumnSet = ColumnSet;\nfunction raiseImageLoadedEvent(image) {\n var card = image.getRootElement();\n var onImageLoadedHandler = (card && card.onImageLoaded) ? card.onImageLoaded : AdaptiveCard.onImageLoaded;\n if (onImageLoadedHandler) {\n onImageLoadedHandler(image);\n }\n}\nfunction raiseAnchorClickedEvent(element, anchor, ev) {\n var card = element.getRootElement();\n var onAnchorClickedHandler = (card && card.onAnchorClicked) ? card.onAnchorClicked : AdaptiveCard.onAnchorClicked;\n return onAnchorClickedHandler !== undefined ? onAnchorClickedHandler(element, anchor, ev) : false;\n}\nfunction raiseExecuteActionEvent(action) {\n var card = action.parent ? action.parent.getRootElement() : undefined;\n var onExecuteActionHandler = (card && card.onExecuteAction) ? card.onExecuteAction : AdaptiveCard.onExecuteAction;\n if (action.prepareForExecution() && onExecuteActionHandler) {\n onExecuteActionHandler(action);\n }\n}\nfunction raiseInlineCardExpandedEvent(action, isExpanded) {\n var card = action.parent ? action.parent.getRootElement() : undefined;\n var onInlineCardExpandedHandler = (card && card.onInlineCardExpanded) ? card.onInlineCardExpanded : AdaptiveCard.onInlineCardExpanded;\n if (onInlineCardExpandedHandler) {\n onInlineCardExpandedHandler(action, isExpanded);\n }\n}\nfunction raiseInputValueChangedEvent(input) {\n var card = input.getRootElement();\n var onInputValueChangedHandler = (card && card.onInputValueChanged) ? card.onInputValueChanged : AdaptiveCard.onInputValueChanged;\n if (onInputValueChangedHandler) {\n onInputValueChangedHandler(input);\n }\n}\nfunction raiseElementVisibilityChangedEvent(element, shouldUpdateLayout) {\n if (shouldUpdateLayout === void 0) { shouldUpdateLayout = true; }\n var rootElement = element.getRootElement();\n if (shouldUpdateLayout) {\n rootElement.updateLayout();\n }\n var card = rootElement;\n var onElementVisibilityChangedHandler = (card && card.onElementVisibilityChanged) ? card.onElementVisibilityChanged : AdaptiveCard.onElementVisibilityChanged;\n if (onElementVisibilityChangedHandler !== undefined) {\n onElementVisibilityChangedHandler(element);\n }\n}\n/**\n * @returns return false to continue with default context menu; return true to skip SDK default context menu\n */\nfunction raiseDisplayOverflowActionMenuEvent(action, target) {\n var card = action.parent ? action.parent.getRootElement() : undefined;\n var onDisplayOverflowActionMenuHandler = (card && card.onDisplayOverflowActionMenu) ? card.onDisplayOverflowActionMenu : AdaptiveCard.onDisplayOverflowActionMenu;\n return onDisplayOverflowActionMenuHandler !== undefined ? onDisplayOverflowActionMenuHandler(action.getActions(), target) : false;\n}\n/**\n * @returns return false to continue with default action button; return true to skip SDK default action button\n */\nfunction raiseRenderOverflowActionsEvent(action, isAtRootLevelActions) {\n var card = action.parent ? action.parent.getRootElement() : undefined;\n var onRenderOverflowActionsHandler = (card && card.onRenderOverflowActions) ? card.onRenderOverflowActions : AdaptiveCard.onRenderOverflowActions;\n return onRenderOverflowActionsHandler !== undefined ? onRenderOverflowActionsHandler(action.getActions(), isAtRootLevelActions) : false;\n}\nvar ContainerWithActions = /** @class */ (function (_super) {\n __extends(ContainerWithActions, _super);\n function ContainerWithActions() {\n var _this = _super.call(this) || this;\n _this._actionCollection = new ActionCollection(_this);\n return _this;\n }\n ContainerWithActions.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this._actionCollection.parse(source[\"actions\"], context);\n };\n ContainerWithActions.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n this._actionCollection.toJSON(target, \"actions\", context);\n };\n ContainerWithActions.prototype.internalRender = function () {\n var element = _super.prototype.internalRender.call(this);\n if (element) {\n var renderedActions = this._actionCollection.render(this.hostConfig.actions.actionsOrientation, false);\n if (renderedActions) {\n Utils.appendChild(element, renderSeparation(this.hostConfig, {\n spacing: this.hostConfig.getEffectiveSpacing(this.hostConfig.actions.spacing)\n }, Enums.Orientation.Horizontal));\n Utils.appendChild(element, renderedActions);\n }\n if (this.renderIfEmpty) {\n return element;\n }\n else {\n return element.children.length > 0 ? element : undefined;\n }\n }\n else {\n return undefined;\n }\n };\n ContainerWithActions.prototype.getHasExpandedAction = function () {\n if (this.renderedActionCount == 0) {\n return false;\n }\n else if (this.renderedActionCount == 1) {\n return this._actionCollection.expandedAction !== undefined && !this.hostConfig.actions.preExpandSingleShowCardAction;\n }\n else {\n return this._actionCollection.expandedAction !== undefined;\n }\n };\n Object.defineProperty(ContainerWithActions.prototype, \"renderedActionCount\", {\n get: function () {\n return this._actionCollection.renderedActionCount;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ContainerWithActions.prototype, \"renderIfEmpty\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n ContainerWithActions.prototype.getActionCount = function () {\n return this._actionCollection.getActionCount();\n };\n ContainerWithActions.prototype.getActionAt = function (index) {\n if (index >= 0 && index < this.getActionCount()) {\n return this._actionCollection.getActionAt(index);\n }\n else {\n return _super.prototype.getActionAt.call(this, index);\n }\n };\n ContainerWithActions.prototype.getActionById = function (id) {\n var result = this._actionCollection.getActionById(id);\n return result ? result : _super.prototype.getActionById.call(this, id);\n };\n ContainerWithActions.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (this._actionCollection) {\n this._actionCollection.validateProperties(context);\n }\n };\n ContainerWithActions.prototype.isLastElement = function (element) {\n return _super.prototype.isLastElement.call(this, element) && this._actionCollection.getActionCount() == 0;\n };\n ContainerWithActions.prototype.addAction = function (action) {\n this._actionCollection.addAction(action);\n };\n ContainerWithActions.prototype.clear = function () {\n _super.prototype.clear.call(this);\n this._actionCollection.clear();\n };\n ContainerWithActions.prototype.getAllInputs = function (processActions) {\n if (processActions === void 0) { processActions = true; }\n var result = _super.prototype.getAllInputs.call(this, processActions);\n if (processActions) {\n result = result.concat(this._actionCollection.getAllInputs(processActions));\n }\n return result;\n };\n ContainerWithActions.prototype.getResourceInformation = function () {\n return _super.prototype.getResourceInformation.call(this).concat(this._actionCollection.getResourceInformation());\n };\n ContainerWithActions.prototype.isBleedingAtBottom = function () {\n if (this._actionCollection.renderedActionCount == 0) {\n return _super.prototype.isBleedingAtBottom.call(this);\n }\n else {\n if (this._actionCollection.getActionCount() == 1) {\n return this._actionCollection.expandedAction !== undefined && !this.hostConfig.actions.preExpandSingleShowCardAction;\n }\n else {\n return this._actionCollection.expandedAction !== undefined;\n }\n }\n };\n Object.defineProperty(ContainerWithActions.prototype, \"isStandalone\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n return ContainerWithActions;\n}(Container));\nexports.ContainerWithActions = ContainerWithActions;\nvar RefreshActionProperty = /** @class */ (function (_super) {\n __extends(RefreshActionProperty, _super);\n function RefreshActionProperty(targetVersion, name) {\n var _this = _super.call(this, targetVersion, name, undefined) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n return _this;\n }\n RefreshActionProperty.prototype.parse = function (sender, source, context) {\n var action = context.parseAction(sender.parent, source[this.name], [], false);\n if (action !== undefined) {\n if (action instanceof ExecuteAction) {\n return action;\n }\n context.logParseEvent(sender, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(action.getJsonTypeName()));\n }\n context.logParseEvent(sender, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"action\"));\n return undefined;\n };\n RefreshActionProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeValue(target, this.name, value ? value.toJSON(context) : undefined, undefined, true);\n };\n return RefreshActionProperty;\n}(serialization_1.PropertyDefinition));\nexports.RefreshActionProperty = RefreshActionProperty;\nvar RefreshDefinition = /** @class */ (function (_super) {\n __extends(RefreshDefinition, _super);\n function RefreshDefinition() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(RefreshDefinition.prototype, \"action\", {\n get: function () {\n return this.getValue(RefreshDefinition.actionProperty);\n },\n set: function (value) {\n this.setValue(RefreshDefinition.actionProperty, value);\n if (value) {\n value.setParent(this.parent);\n }\n },\n enumerable: false,\n configurable: true\n });\n RefreshDefinition.prototype.getSchemaKey = function () {\n return \"RefreshDefinition\";\n };\n //#region Schema\n RefreshDefinition.actionProperty = new RefreshActionProperty(serialization_1.Versions.v1_4, \"action\");\n RefreshDefinition.userIdsProperty = new serialization_1.StringArrayProperty(serialization_1.Versions.v1_4, \"userIds\");\n __decorate([\n serialization_1.property(RefreshDefinition.actionProperty)\n ], RefreshDefinition.prototype, \"action\", null);\n __decorate([\n serialization_1.property(RefreshDefinition.userIdsProperty)\n ], RefreshDefinition.prototype, \"userIds\", void 0);\n return RefreshDefinition;\n}(serialization_1.SerializableObject));\nexports.RefreshDefinition = RefreshDefinition;\nvar AuthCardButton = /** @class */ (function (_super) {\n __extends(AuthCardButton, _super);\n function AuthCardButton() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AuthCardButton.prototype.getSchemaKey = function () {\n return \"AuthCardButton\";\n };\n //#region Schema\n AuthCardButton.typeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"type\");\n AuthCardButton.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"title\");\n AuthCardButton.imageProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"image\");\n AuthCardButton.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"value\");\n __decorate([\n serialization_1.property(AuthCardButton.typeProperty)\n ], AuthCardButton.prototype, \"type\", void 0);\n __decorate([\n serialization_1.property(AuthCardButton.titleProperty)\n ], AuthCardButton.prototype, \"title\", void 0);\n __decorate([\n serialization_1.property(AuthCardButton.imageProperty)\n ], AuthCardButton.prototype, \"image\", void 0);\n __decorate([\n serialization_1.property(AuthCardButton.valueProperty)\n ], AuthCardButton.prototype, \"value\", void 0);\n return AuthCardButton;\n}(serialization_1.SerializableObject));\nexports.AuthCardButton = AuthCardButton;\nvar TokenExchangeResource = /** @class */ (function (_super) {\n __extends(TokenExchangeResource, _super);\n function TokenExchangeResource() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TokenExchangeResource.prototype.getSchemaKey = function () {\n return \"TokenExchangeResource\";\n };\n //#region Schema\n TokenExchangeResource.idProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"id\");\n TokenExchangeResource.uriProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"uri\");\n TokenExchangeResource.providerIdProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"providerId\");\n __decorate([\n serialization_1.property(TokenExchangeResource.idProperty)\n ], TokenExchangeResource.prototype, \"id\", void 0);\n __decorate([\n serialization_1.property(TokenExchangeResource.uriProperty)\n ], TokenExchangeResource.prototype, \"uri\", void 0);\n __decorate([\n serialization_1.property(TokenExchangeResource.providerIdProperty)\n ], TokenExchangeResource.prototype, \"providerId\", void 0);\n return TokenExchangeResource;\n}(serialization_1.SerializableObject));\nexports.TokenExchangeResource = TokenExchangeResource;\nvar Authentication = /** @class */ (function (_super) {\n __extends(Authentication, _super);\n function Authentication() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Authentication.prototype.getSchemaKey = function () {\n return \"Authentication\";\n };\n //#region Schema\n Authentication.textProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"text\");\n Authentication.connectionNameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"connectionName\");\n Authentication.buttonsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_4, \"buttons\", AuthCardButton);\n Authentication.tokenExchangeResourceProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, \"tokenExchangeResource\", TokenExchangeResource, true);\n __decorate([\n serialization_1.property(Authentication.textProperty)\n ], Authentication.prototype, \"text\", void 0);\n __decorate([\n serialization_1.property(Authentication.connectionNameProperty)\n ], Authentication.prototype, \"connectionName\", void 0);\n __decorate([\n serialization_1.property(Authentication.buttonsProperty)\n ], Authentication.prototype, \"buttons\", void 0);\n __decorate([\n serialization_1.property(Authentication.tokenExchangeResourceProperty)\n ], Authentication.prototype, \"tokenExchangeResource\", void 0);\n return Authentication;\n}(serialization_1.SerializableObject));\nexports.Authentication = Authentication;\n// @dynamic\nvar AdaptiveCard = /** @class */ (function (_super) {\n __extends(AdaptiveCard, _super);\n function AdaptiveCard() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.designMode = false;\n return _this;\n }\n Object.defineProperty(AdaptiveCard.prototype, \"refresh\", {\n get: function () {\n return this.getValue(AdaptiveCard.refreshProperty);\n },\n set: function (value) {\n this.setValue(AdaptiveCard.refreshProperty, value);\n if (value) {\n value.parent = this;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AdaptiveCard, \"processMarkdown\", {\n get: function () {\n throw new Error(strings_1.Strings.errors.processMarkdownEventRemoved());\n },\n set: function (value) {\n throw new Error(strings_1.Strings.errors.processMarkdownEventRemoved());\n },\n enumerable: false,\n configurable: true\n });\n AdaptiveCard.applyMarkdown = function (text) {\n var result = {\n didProcess: false\n };\n if (AdaptiveCard.onProcessMarkdown) {\n AdaptiveCard.onProcessMarkdown(text, result);\n }\n else if (window.markdownit) {\n // Check for markdownit\n var markdownIt = window.markdownit;\n result.outputHtml = markdownIt().render(text);\n result.didProcess = true;\n }\n else {\n console.warn(strings_1.Strings.errors.markdownProcessingNotEnabled);\n }\n return result;\n };\n AdaptiveCard.prototype.isVersionSupported = function () {\n if (this.bypassVersionCheck) {\n return true;\n }\n else {\n var unsupportedVersion = !this.version ||\n !this.version.isValid ||\n (this.maxVersion.major < this.version.major) ||\n (this.maxVersion.major == this.version.major && this.maxVersion.minor < this.version.minor);\n return !unsupportedVersion;\n }\n };\n AdaptiveCard.prototype.getDefaultSerializationContext = function () {\n return new SerializationContext(this.version);\n };\n AdaptiveCard.prototype.getItemsCollectionPropertyName = function () {\n return \"body\";\n };\n AdaptiveCard.prototype.internalParse = function (source, context) {\n this._fallbackCard = undefined;\n var fallbackElement = context.parseElement(undefined, source[\"fallback\"], !this.isDesignMode());\n if (fallbackElement) {\n this._fallbackCard = new AdaptiveCard();\n this._fallbackCard.addItem(fallbackElement);\n }\n _super.prototype.internalParse.call(this, source, context);\n };\n AdaptiveCard.prototype.internalToJSON = function (target, context) {\n this.setValue(AdaptiveCard.versionProperty, context.targetVersion);\n _super.prototype.internalToJSON.call(this, target, context);\n };\n AdaptiveCard.prototype.internalRender = function () {\n var renderedElement = _super.prototype.internalRender.call(this);\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && renderedElement) {\n // Unlike containers, the root card element should be allowed to\n // be shorter than its content (otherwise the overflow truncation\n // logic would never get triggered)\n renderedElement.style.removeProperty(\"minHeight\");\n }\n return renderedElement;\n };\n AdaptiveCard.prototype.getHasBackground = function () {\n return true;\n };\n AdaptiveCard.prototype.getDefaultPadding = function () {\n return new shared_1.PaddingDefinition(Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding);\n };\n AdaptiveCard.prototype.shouldSerialize = function (context) {\n return true;\n };\n Object.defineProperty(AdaptiveCard.prototype, \"renderIfEmpty\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AdaptiveCard.prototype, \"bypassVersionCheck\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AdaptiveCard.prototype, \"allowCustomStyle\", {\n get: function () {\n return this.hostConfig.adaptiveCard && this.hostConfig.adaptiveCard.allowCustomStyle;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AdaptiveCard.prototype, \"hasBackground\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n AdaptiveCard.prototype.getJsonTypeName = function () {\n return \"AdaptiveCard\";\n };\n AdaptiveCard.prototype.internalValidateProperties = function (context) {\n _super.prototype.internalValidateProperties.call(this, context);\n if (this.getValue(CardElement.typeNameProperty) !== \"AdaptiveCard\") {\n context.addFailure(this, Enums.ValidationEvent.MissingCardType, strings_1.Strings.errors.invalidCardType());\n }\n if (!this.bypassVersionCheck && !this.version) {\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"version\"));\n }\n else if (!this.isVersionSupported()) {\n context.addFailure(this, Enums.ValidationEvent.UnsupportedCardVersion, strings_1.Strings.errors.unsupportedCardVersion(this.version.toString(), this.maxVersion.toString()));\n }\n };\n AdaptiveCard.prototype.render = function (target) {\n var renderedCard;\n if (this.shouldFallback() && this._fallbackCard) {\n this._fallbackCard.hostConfig = this.hostConfig;\n renderedCard = this._fallbackCard.render();\n }\n else {\n renderedCard = _super.prototype.render.call(this);\n if (renderedCard) {\n renderedCard.classList.add(this.hostConfig.makeCssClassName(\"ac-adaptiveCard\"));\n // Having a tabIndex on the root container for a card can mess up accessibility in some scenarios.\n // However, we've shipped this behavior before, and so can't just turn it off in a point release. For\n // now, to unblock accessibility scenarios for our customers, we've got an option to turn it off. In a\n // future release, we should strongly consider flipping the default such that we *don't* emit a tabIndex\n // by default.\n if (shared_1.GlobalSettings.setTabIndexAtCardRoot) {\n renderedCard.tabIndex = 0;\n }\n if (this.speak) {\n renderedCard.setAttribute(\"aria-label\", this.speak);\n }\n }\n }\n if (target) {\n Utils.appendChild(target, renderedCard);\n this.updateLayout();\n }\n return renderedCard;\n };\n AdaptiveCard.prototype.updateLayout = function (processChildren) {\n if (processChildren === void 0) { processChildren = true; }\n _super.prototype.updateLayout.call(this, processChildren);\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && this.isDisplayed()) {\n var padding = this.hostConfig.getEffectiveSpacing(Enums.Spacing.Default);\n this['handleOverflow'](this.renderedElement.offsetHeight - padding);\n }\n };\n AdaptiveCard.prototype.shouldFallback = function () {\n return _super.prototype.shouldFallback.call(this) || !this.isVersionSupported();\n };\n Object.defineProperty(AdaptiveCard.prototype, \"hasVisibleSeparator\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n AdaptiveCard.schemaUrl = \"http://adaptivecards.io/schemas/adaptive-card.json\";\n //#region Schema\n AdaptiveCard.$schemaProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, \"$schema\", function (sender, property, source, context) {\n return AdaptiveCard.schemaUrl;\n }, function (sender, property, target, value, context) {\n context.serializeValue(target, property.name, AdaptiveCard.schemaUrl);\n });\n AdaptiveCard.versionProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, \"version\", function (sender, property, source, context) {\n var version = serialization_1.Version.parse(source[property.name], context);\n if (version === undefined) {\n version = serialization_1.Versions.latest;\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidCardVersion(version.toString()));\n }\n return version;\n }, function (sender, property, target, value, context) {\n if (value !== undefined) {\n context.serializeValue(target, property.name, value.toString());\n }\n }, serialization_1.Versions.v1_0);\n AdaptiveCard.fallbackTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"fallbackText\");\n AdaptiveCard.speakProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"speak\");\n AdaptiveCard.refreshProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, \"refresh\", RefreshDefinition, true);\n AdaptiveCard.authenticationProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, \"authentication\", Authentication, true);\n __decorate([\n serialization_1.property(AdaptiveCard.versionProperty)\n ], AdaptiveCard.prototype, \"version\", void 0);\n __decorate([\n serialization_1.property(AdaptiveCard.fallbackTextProperty)\n ], AdaptiveCard.prototype, \"fallbackText\", void 0);\n __decorate([\n serialization_1.property(AdaptiveCard.speakProperty)\n ], AdaptiveCard.prototype, \"speak\", void 0);\n __decorate([\n serialization_1.property(AdaptiveCard.refreshProperty)\n ], AdaptiveCard.prototype, \"refresh\", null);\n __decorate([\n serialization_1.property(AdaptiveCard.authenticationProperty)\n ], AdaptiveCard.prototype, \"authentication\", void 0);\n return AdaptiveCard;\n}(ContainerWithActions));\nexports.AdaptiveCard = AdaptiveCard;\nvar InlineAdaptiveCard = /** @class */ (function (_super) {\n __extends(InlineAdaptiveCard, _super);\n function InlineAdaptiveCard() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.suppressStyle = false;\n return _this;\n }\n InlineAdaptiveCard.prototype.getSchemaKey = function () {\n return \"InlineAdaptiveCard\";\n };\n InlineAdaptiveCard.prototype.populateSchema = function (schema) {\n _super.prototype.populateSchema.call(this, schema);\n schema.remove(AdaptiveCard.$schemaProperty, AdaptiveCard.versionProperty);\n };\n //#endregion\n InlineAdaptiveCard.prototype.getDefaultPadding = function () {\n return new shared_1.PaddingDefinition(this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding, Enums.Spacing.Padding, this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding, Enums.Spacing.Padding);\n };\n Object.defineProperty(InlineAdaptiveCard.prototype, \"bypassVersionCheck\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(InlineAdaptiveCard.prototype, \"defaultStyle\", {\n get: function () {\n if (this.suppressStyle) {\n return Enums.ContainerStyle.Default;\n }\n else {\n return this.hostConfig.actions.showCard.style ? this.hostConfig.actions.showCard.style : Enums.ContainerStyle.Emphasis;\n }\n },\n enumerable: false,\n configurable: true\n });\n InlineAdaptiveCard.prototype.render = function (target) {\n var renderedCard = _super.prototype.render.call(this, target);\n if (renderedCard) {\n renderedCard.setAttribute(\"aria-live\", \"polite\");\n renderedCard.removeAttribute(\"tabindex\");\n }\n return renderedCard;\n };\n return InlineAdaptiveCard;\n}(AdaptiveCard));\nvar SerializationContext = /** @class */ (function (_super) {\n __extends(SerializationContext, _super);\n function SerializationContext() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SerializationContext.prototype.internalParseCardObject = function (parent, source, forbiddenTypeNames, allowFallback, createInstanceCallback, logParseEvent) {\n var result = undefined;\n if (source && typeof source === \"object\") {\n var typeName = Utils.parseString(source[\"type\"]);\n if (typeName && forbiddenTypeNames.indexOf(typeName) >= 0) {\n logParseEvent(typeName, Enums.TypeErrorType.ForbiddenType);\n }\n else {\n var tryToFallback = false;\n result = createInstanceCallback(typeName);\n if (!result) {\n tryToFallback = shared_1.GlobalSettings.enableFallback && allowFallback;\n logParseEvent(typeName, Enums.TypeErrorType.UnknownType);\n }\n else {\n result.setParent(parent);\n result.parse(source, this);\n tryToFallback = shared_1.GlobalSettings.enableFallback && allowFallback && result.shouldFallback();\n }\n if (tryToFallback) {\n var fallback = source[\"fallback\"];\n if (!fallback && parent) {\n parent.setShouldFallback(true);\n }\n if (typeof fallback === \"string\" && fallback.toLowerCase() === \"drop\") {\n result = undefined;\n }\n else if (typeof fallback === \"object\") {\n result = this.internalParseCardObject(parent, fallback, forbiddenTypeNames, true, createInstanceCallback, logParseEvent);\n }\n }\n }\n }\n return result;\n };\n SerializationContext.prototype.cardObjectParsed = function (o, source) {\n if (o instanceof Action && this.onParseAction) {\n this.onParseAction(o, source, this);\n }\n else if (o instanceof CardElement && this.onParseElement) {\n this.onParseElement(o, source, this);\n }\n };\n SerializationContext.prototype.shouldSerialize = function (o) {\n if (o instanceof Action) {\n return this.actionRegistry.findByName(o.getJsonTypeName()) !== undefined;\n }\n else if (o instanceof CardElement) {\n return this.elementRegistry.findByName(o.getJsonTypeName()) !== undefined;\n }\n else {\n return true;\n }\n };\n SerializationContext.prototype.parseCardObject = function (parent, source, forbiddenTypeNames, allowFallback, createInstanceCallback, logParseEvent) {\n var result = this.internalParseCardObject(parent, source, forbiddenTypeNames, allowFallback, createInstanceCallback, logParseEvent);\n if (result !== undefined) {\n this.cardObjectParsed(result, source);\n }\n return result;\n };\n SerializationContext.prototype.parseElement = function (parent, source, allowFallback) {\n var _this = this;\n return this.parseCardObject(parent, source, [], // Forbidden types not supported for elements for now\n allowFallback, function (typeName) {\n return _this.elementRegistry.createInstance(typeName, _this.targetVersion);\n }, function (typeName, errorType) {\n if (errorType === Enums.TypeErrorType.UnknownType) {\n _this.logParseEvent(undefined, Enums.ValidationEvent.UnknownElementType, strings_1.Strings.errors.unknownElementType(typeName));\n }\n else {\n _this.logParseEvent(undefined, Enums.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\n }\n });\n };\n SerializationContext.prototype.parseAction = function (parent, source, forbiddenActionTypes, allowFallback) {\n var _this = this;\n return this.parseCardObject(parent, source, forbiddenActionTypes, allowFallback, function (typeName) {\n return _this.actionRegistry.createInstance(typeName, _this.targetVersion);\n }, function (typeName, errorType) {\n if (errorType == Enums.TypeErrorType.UnknownType) {\n _this.logParseEvent(undefined, Enums.ValidationEvent.UnknownActionType, strings_1.Strings.errors.unknownActionType(typeName));\n }\n else {\n _this.logParseEvent(undefined, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(typeName));\n }\n });\n };\n Object.defineProperty(SerializationContext.prototype, \"elementRegistry\", {\n get: function () {\n return this._elementRegistry ? this._elementRegistry : registry_1.GlobalRegistry.elements;\n },\n enumerable: false,\n configurable: true\n });\n // Not using a property setter here because the setter should accept \"undefined\"\n // whereas the getter should never return undefined.\n SerializationContext.prototype.setElementRegistry = function (value) {\n this._elementRegistry = value;\n };\n Object.defineProperty(SerializationContext.prototype, \"actionRegistry\", {\n get: function () {\n return this._actionRegistry ? this._actionRegistry : registry_1.GlobalRegistry.actions;\n },\n enumerable: false,\n configurable: true\n });\n // Not using a property setter here because the setter should accept \"undefined\"\n // whereas the getter should never return undefined.\n SerializationContext.prototype.setActionRegistry = function (value) {\n this._actionRegistry = value;\n };\n return SerializationContext;\n}(serialization_1.BaseSerializationContext));\nexports.SerializationContext = SerializationContext;\nregistry_1.GlobalRegistry.defaultElements.register(\"Container\", Container);\nregistry_1.GlobalRegistry.defaultElements.register(\"TextBlock\", TextBlock);\nregistry_1.GlobalRegistry.defaultElements.register(\"RichTextBlock\", RichTextBlock, serialization_1.Versions.v1_2);\nregistry_1.GlobalRegistry.defaultElements.register(\"TextRun\", TextRun, serialization_1.Versions.v1_2);\nregistry_1.GlobalRegistry.defaultElements.register(\"Image\", Image);\nregistry_1.GlobalRegistry.defaultElements.register(\"ImageSet\", ImageSet);\nregistry_1.GlobalRegistry.defaultElements.register(\"Media\", Media, serialization_1.Versions.v1_1);\nregistry_1.GlobalRegistry.defaultElements.register(\"FactSet\", FactSet);\nregistry_1.GlobalRegistry.defaultElements.register(\"ColumnSet\", ColumnSet);\nregistry_1.GlobalRegistry.defaultElements.register(\"ActionSet\", ActionSet, serialization_1.Versions.v1_2);\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Text\", TextInput);\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Date\", DateInput);\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Time\", TimeInput);\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Number\", NumberInput);\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.ChoiceSet\", ChoiceSetInput);\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Toggle\", ToggleInput);\nregistry_1.GlobalRegistry.defaultActions.register(OpenUrlAction.JsonTypeName, OpenUrlAction);\nregistry_1.GlobalRegistry.defaultActions.register(SubmitAction.JsonTypeName, SubmitAction);\nregistry_1.GlobalRegistry.defaultActions.register(ShowCardAction.JsonTypeName, ShowCardAction);\nregistry_1.GlobalRegistry.defaultActions.register(ToggleVisibilityAction.JsonTypeName, ToggleVisibilityAction, serialization_1.Versions.v1_2);\nregistry_1.GlobalRegistry.defaultActions.register(ExecuteAction.JsonTypeName, ExecuteAction, serialization_1.Versions.v1_4);\n//# sourceMappingURL=card-elements.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CardObject = exports.ValidationResults = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Enums = require(\"./enums\");\nvar strings_1 = require(\"./strings\");\nvar shared_1 = require(\"./shared\");\nvar host_capabilities_1 = require(\"./host-capabilities\");\nvar serialization_1 = require(\"./serialization\");\nvar ValidationResults = /** @class */ (function () {\n function ValidationResults() {\n this.allIds = {};\n this.validationEvents = [];\n }\n ValidationResults.prototype.addFailure = function (cardObject, event, message) {\n this.validationEvents.push({\n phase: Enums.ValidationPhase.Validation,\n source: cardObject,\n event: event,\n message: message\n });\n };\n return ValidationResults;\n}());\nexports.ValidationResults = ValidationResults;\nvar CardObject = /** @class */ (function (_super) {\n __extends(CardObject, _super);\n function CardObject() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n //#endregion\n _this._shouldFallback = false;\n return _this;\n }\n CardObject.prototype.getSchemaKey = function () {\n return this.getJsonTypeName();\n };\n Object.defineProperty(CardObject.prototype, \"requires\", {\n get: function () {\n return this.getValue(CardObject.requiresProperty);\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Checks if this CardObject contains the given DOM Node.\n * @param node The DOM Node to look for.\n * @returns `true` if the DOM Node was found, `false` otherwise.\n */\n CardObject.prototype.contains = function (node) {\n if (this._renderedElement) {\n return this._renderedElement.contains(node);\n }\n return false;\n };\n CardObject.prototype.preProcessPropertyValue = function (property, propertyValue) {\n var value = propertyValue === undefined ? this.getValue(property) : propertyValue;\n if (shared_1.GlobalSettings.allowPreProcessingPropertyValues) {\n var currentObject = this;\n while (currentObject && !currentObject.onPreProcessPropertyValue) {\n currentObject = currentObject.parent;\n }\n if (currentObject && currentObject.onPreProcessPropertyValue) {\n return currentObject.onPreProcessPropertyValue(this, property, value);\n }\n }\n return value;\n };\n CardObject.prototype.setParent = function (value) {\n this._parent = value;\n };\n CardObject.prototype.setShouldFallback = function (value) {\n this._shouldFallback = value;\n };\n CardObject.prototype.shouldFallback = function () {\n return this._shouldFallback || !this.requires.areAllMet(this.hostConfig.hostCapabilities);\n };\n CardObject.prototype.getRootObject = function () {\n var rootObject = this;\n while (rootObject.parent) {\n rootObject = rootObject.parent;\n }\n return rootObject;\n };\n CardObject.prototype.internalValidateProperties = function (context) {\n if (this.id) {\n if (context.allIds.hasOwnProperty(this.id)) {\n if (context.allIds[this.id] == 1) {\n context.addFailure(this, Enums.ValidationEvent.DuplicateId, strings_1.Strings.errors.duplicateId(this.id));\n }\n context.allIds[this.id] += 1;\n }\n else {\n context.allIds[this.id] = 1;\n }\n }\n };\n CardObject.prototype.validateProperties = function () {\n var result = new ValidationResults();\n this.internalValidateProperties(result);\n return result;\n };\n /**\n * Recursively searches this CardObject and any children to find the\n * innermost CardObject that owns the given DOM Node.\n *\n * @param node The DOM Node to look for.\n *\n * @returns The owner of the given DOM Node, or `undefined` if no owner was found.\n */\n CardObject.prototype.findDOMNodeOwner = function (node) {\n // default implementation for CardObjects with no associated children\n return this.contains(node) ? this : undefined;\n };\n Object.defineProperty(CardObject.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CardObject.prototype, \"renderedElement\", {\n get: function () {\n return this._renderedElement;\n },\n enumerable: false,\n configurable: true\n });\n CardObject.typeNameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"type\", undefined, undefined, undefined, function (sender) {\n return sender.getJsonTypeName();\n });\n CardObject.idProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"id\");\n CardObject.requiresProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_2, \"requires\", host_capabilities_1.HostCapabilities, false, new host_capabilities_1.HostCapabilities());\n __decorate([\n serialization_1.property(CardObject.idProperty)\n ], CardObject.prototype, \"id\", void 0);\n __decorate([\n serialization_1.property(CardObject.requiresProperty)\n ], CardObject.prototype, \"requires\", null);\n return CardObject;\n}(serialization_1.SerializableObject));\nexports.CardObject = CardObject;\n//# sourceMappingURL=card-object.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChannelAdapter = void 0;\nvar ChannelAdapter = /** @class */ (function () {\n function ChannelAdapter() {\n }\n return ChannelAdapter;\n}());\nexports.ChannelAdapter = ChannelAdapter;\n//# sourceMappingURL=channel-adapter.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Collection = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Collection = /** @class */ (function () {\n function Collection() {\n this._items = [];\n }\n Collection.prototype.get = function (index) {\n return this._items[index];\n };\n Collection.prototype.add = function (item) {\n this._items.push(item);\n if (this.onItemAdded) {\n this.onItemAdded(item);\n }\n };\n Collection.prototype.remove = function (item) {\n var i = this._items.indexOf(item);\n if (i >= 0) {\n this._items = this._items.splice(i, 1);\n if (this.onItemRemoved) {\n this.onItemRemoved(item);\n }\n }\n };\n Collection.prototype.indexOf = function (item) {\n return this._items.indexOf(item);\n };\n Object.defineProperty(Collection.prototype, \"length\", {\n get: function () {\n return this._items.length;\n },\n enumerable: false,\n configurable: true\n });\n return Collection;\n}());\nexports.Collection = Collection;\n//# sourceMappingURL=collection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Constants = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Constants = /** @class */ (function () {\n function Constants() {\n }\n Constants.keys = {\n tab: \"Tab\",\n enter: \"Enter\",\n escape: \"Escape\",\n space: \" \",\n up: \"ArrowUp\",\n down: \"ArrowDown\",\n delete: \"Delete\"\n };\n return Constants;\n}());\nexports.Constants = Constants;\n//# sourceMappingURL=constants.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./menu-item\"), exports);\n__exportStar(require(\"./popup-menu\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MenuItem = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar host_config_1 = require(\"../host-config\");\nvar constants_1 = require(\"./constants\");\nvar MenuItem = /** @class */ (function () {\n function MenuItem(key, value) {\n this._isEnabled = true;\n this.key = key;\n this._value = value;\n }\n MenuItem.prototype.click = function () {\n if (this.isEnabled && this.onClick) {\n this.onClick(this);\n }\n };\n MenuItem.prototype.updateCssClasses = function () {\n if (this._element) {\n var effectiveHostConfig = this._hostConfig ? this._hostConfig : host_config_1.defaultHostConfig;\n this._element.className = effectiveHostConfig.makeCssClassName(\"ac-ctrl\");\n this._element.classList.add(effectiveHostConfig.makeCssClassName(this.isEnabled ? \"ac-ctrl-dropdown-item\" : \"ac-ctrl-dropdown-item-disabled\"));\n if (!this.isEnabled) {\n this._element.classList.add(effectiveHostConfig.makeCssClassName(\"ac-disabled\"));\n }\n }\n };\n MenuItem.prototype.toString = function () {\n return this.value;\n };\n MenuItem.prototype.render = function (hostConfig) {\n var _this = this;\n this._hostConfig = hostConfig;\n if (!this._element) {\n this._element = document.createElement(\"span\");\n this._element.innerText = this.value;\n this._element.setAttribute(\"role\", \"menuitem\");\n if (!this.isEnabled) {\n this._element.setAttribute(\"aria-disabled\", \"true\");\n }\n this._element.setAttribute(\"aria-selected\", \"false\");\n this._element.onmouseup = function (e) { _this.click(); };\n this._element.onkeydown = function (e) {\n if (e.key === constants_1.Constants.keys.enter) {\n e.cancelBubble = true;\n _this.click();\n }\n };\n this.updateCssClasses();\n }\n return this._element;\n };\n Object.defineProperty(MenuItem.prototype, \"value\", {\n get: function () {\n return this._value;\n },\n set: function (newValue) {\n this._value = newValue;\n if (this._element) {\n this._element.innerText = newValue;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MenuItem.prototype, \"isEnabled\", {\n get: function () {\n return this._isEnabled;\n },\n set: function (value) {\n if (this._isEnabled !== value) {\n this._isEnabled = value;\n this.updateCssClasses();\n }\n },\n enumerable: false,\n configurable: true\n });\n return MenuItem;\n}());\nexports.MenuItem = MenuItem;\n//# sourceMappingURL=menu-item.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PopupControl = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar constants_1 = require(\"./constants\");\nvar Utils = require(\"../utils\");\nvar host_config_1 = require(\"../host-config\");\nvar PopupControl = /** @class */ (function () {\n function PopupControl() {\n this._isOpen = false;\n }\n PopupControl.prototype.keyDown = function (e) {\n switch (e.key) {\n case constants_1.Constants.keys.escape:\n this.closePopup(true);\n break;\n }\n };\n PopupControl.prototype.render = function (rootElementBounds) {\n var _this = this;\n var element = document.createElement(\"div\");\n element.tabIndex = 0;\n element.className = this.hostConfig.makeCssClassName(\"ac-ctrl\", \"ac-ctrl-popup-container\");\n element.setAttribute(\"role\", \"dialog\");\n element.setAttribute(\"aria-modal\", \"true\");\n element.onkeydown = function (e) {\n _this.keyDown(e);\n return !e.cancelBubble;\n };\n element.appendChild(this.renderContent());\n return element;\n };\n PopupControl.prototype.focus = function () {\n if (this._popupElement) {\n this._popupElement.firstElementChild.focus();\n }\n };\n PopupControl.prototype.popup = function (rootElement) {\n var _a, _b, _c, _d, _e;\n var _this = this;\n if (!this._isOpen) {\n this._overlayElement = document.createElement(\"div\");\n this._overlayElement.className = this.hostConfig.makeCssClassName(\"ac-ctrl-overlay\");\n this._overlayElement.tabIndex = 0;\n this._overlayElement.style.width = document.documentElement.scrollWidth + \"px\";\n this._overlayElement.style.height = document.documentElement.scrollHeight + \"px\";\n this._overlayElement.onfocus = function (e) { _this.closePopup(true); };\n document.body.appendChild(this._overlayElement);\n var rootElementBounds = rootElement.getBoundingClientRect();\n this._popupElement = this.render(rootElementBounds);\n (_a = this._popupElement.classList).remove.apply(_a, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideLeftToRight\", \"ac-ctrl-slideRightToLeft\", \"ac-ctrl-slideTopToBottom\", \"ac-ctrl-slideRightToLeft\"));\n window.addEventListener(\"resize\", function (e) { _this.closePopup(true); });\n var rootElementLabel = rootElement.getAttribute(\"aria-label\");\n if (rootElementLabel) {\n this._popupElement.setAttribute(\"aria-label\", rootElementLabel);\n }\n this._overlayElement.appendChild(this._popupElement);\n var popupElementBounds = this._popupElement.getBoundingClientRect();\n var availableSpaceBelow = window.innerHeight - rootElementBounds.bottom;\n var availableSpaceAbove = rootElementBounds.top;\n var availableSpaceRight = window.innerWidth - rootElementBounds.left;\n var availableSpaceRight = window.innerWidth - rootElementBounds.right;\n var availableSpaceLeft = rootElementBounds.left;\n var left = rootElementBounds.left + Utils.getScrollX();\n var top;\n if (availableSpaceAbove < popupElementBounds.height && availableSpaceBelow < popupElementBounds.height) {\n // Not enough space above or below root element\n var actualPopupHeight = Math.min(popupElementBounds.height, window.innerHeight);\n this._popupElement.style.maxHeight = actualPopupHeight + \"px\";\n if (actualPopupHeight < popupElementBounds.height) {\n top = Utils.getScrollY();\n }\n else {\n top = Utils.getScrollY() + rootElementBounds.top + (rootElementBounds.height - actualPopupHeight) / 2;\n }\n if (availableSpaceLeft < popupElementBounds.width && availableSpaceRight < popupElementBounds.width) {\n // Not enough space left or right of root element\n var actualPopupWidth = Math.min(popupElementBounds.width, window.innerWidth);\n this._popupElement.style.maxWidth = actualPopupWidth + \"px\";\n if (actualPopupWidth < popupElementBounds.width) {\n left = Utils.getScrollX();\n }\n else {\n left = Utils.getScrollX() + rootElementBounds.left + (rootElementBounds.width - actualPopupWidth) / 2;\n }\n }\n else {\n // Enough space on the left or right of the root element\n if (availableSpaceRight >= popupElementBounds.width) {\n left = Utils.getScrollX() + rootElementBounds.right;\n (_b = this._popupElement.classList).add.apply(_b, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideLeftToRight\"));\n }\n else {\n left = Utils.getScrollX() + rootElementBounds.left - popupElementBounds.width;\n (_c = this._popupElement.classList).add.apply(_c, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideRightToLeft\"));\n }\n }\n }\n else {\n // Enough space above or below root element\n if (availableSpaceBelow >= popupElementBounds.height) {\n top = Utils.getScrollY() + rootElementBounds.bottom;\n (_d = this._popupElement.classList).add.apply(_d, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideTopToBottom\"));\n }\n else {\n top = Utils.getScrollY() + rootElementBounds.top - popupElementBounds.height;\n (_e = this._popupElement.classList).add.apply(_e, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideBottomToTop\"));\n }\n if (availableSpaceRight < popupElementBounds.width) {\n left = Utils.getScrollX() + rootElementBounds.right - popupElementBounds.width;\n }\n }\n this._popupElement.style.left = left + \"px\";\n this._popupElement.style.top = top + \"px\";\n this._popupElement.focus();\n this._isOpen = true;\n }\n };\n PopupControl.prototype.closePopup = function (wasCancelled) {\n if (this._isOpen) {\n document.body.removeChild(this._overlayElement);\n this._isOpen = false;\n if (this.onClose) {\n this.onClose(this, wasCancelled);\n }\n }\n };\n Object.defineProperty(PopupControl.prototype, \"hostConfig\", {\n get: function () {\n return this._hostConfig ? this._hostConfig : host_config_1.defaultHostConfig;\n },\n set: function (value) {\n this._hostConfig = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(PopupControl.prototype, \"isOpen\", {\n get: function () {\n return this._isOpen;\n },\n enumerable: false,\n configurable: true\n });\n return PopupControl;\n}());\nexports.PopupControl = PopupControl;\n//# sourceMappingURL=popup-control.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PopupMenu = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar constants_1 = require(\"./constants\");\nvar collection_1 = require(\"./collection\");\nvar popup_control_1 = require(\"./popup-control\");\nvar PopupMenu = /** @class */ (function (_super) {\n __extends(PopupMenu, _super);\n function PopupMenu() {\n var _this = _super.call(this) || this;\n _this._items = new collection_1.Collection();\n _this._renderedItems = [];\n _this._selectedIndex = -1;\n return _this;\n }\n PopupMenu.prototype.renderContent = function () {\n var element = document.createElement(\"div\");\n element.className = this.hostConfig.makeCssClassName(\"ac-ctrl ac-popup\");\n element.setAttribute(\"role\", \"listbox\");\n for (var i = 0; i < this._items.length; i++) {\n var renderedItem = this._items.get(i).render(this.hostConfig);\n renderedItem.tabIndex = 0;\n element.appendChild(renderedItem);\n if (i == this.selectedIndex) {\n renderedItem.focus();\n }\n this._renderedItems.push(renderedItem);\n }\n return element;\n };\n PopupMenu.prototype.keyDown = function (e) {\n _super.prototype.keyDown.call(this, e);\n var selectedItemIndex = this._selectedIndex;\n switch (e.key) {\n case constants_1.Constants.keys.tab:\n this.closePopup(true);\n break;\n /*\n case Constants.keys.enter:\n if (this.selectedIndex >= 0) {\n this.selectedIndex = this.selectedIndex;\n\n this.close();\n }\n\n break;\n */\n case constants_1.Constants.keys.up:\n if (selectedItemIndex <= 0) {\n selectedItemIndex = this._renderedItems.length - 1;\n }\n else {\n selectedItemIndex--;\n if (selectedItemIndex < 0) {\n selectedItemIndex = this._renderedItems.length - 1;\n }\n }\n this.selectedIndex = selectedItemIndex;\n e.cancelBubble = true;\n break;\n case constants_1.Constants.keys.down:\n if (selectedItemIndex < 0) {\n selectedItemIndex = 0;\n }\n else {\n selectedItemIndex++;\n if (selectedItemIndex >= this._renderedItems.length) {\n selectedItemIndex = 0;\n }\n }\n this.selectedIndex = selectedItemIndex;\n e.cancelBubble = true;\n break;\n }\n };\n Object.defineProperty(PopupMenu.prototype, \"items\", {\n get: function () {\n return this._items;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(PopupMenu.prototype, \"selectedIndex\", {\n get: function () {\n return this._selectedIndex;\n },\n set: function (index) {\n if (index >= 0 && index < this._renderedItems.length) {\n this._renderedItems[index].focus();\n this._selectedIndex = index;\n }\n },\n enumerable: false,\n configurable: true\n });\n return PopupMenu;\n}(popup_control_1.PopupControl));\nexports.PopupMenu = PopupMenu;\n//# sourceMappingURL=popup-menu.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LogLevel = exports.RefreshMode = exports.TypeErrorType = exports.ContainerFitStatus = exports.ValidationEvent = exports.ValidationPhase = exports.ContainerStyle = exports.InputTextStyle = exports.ActionIconPlacement = exports.FillMode = exports.Orientation = exports.ShowCardActionMode = exports.ImageStyle = exports.ActionAlignment = exports.VerticalAlignment = exports.HorizontalAlignment = exports.TextColor = exports.Spacing = exports.FontType = exports.TextWeight = exports.TextSize = exports.SizeUnit = exports.ImageSize = exports.Size = exports.ActionMode = exports.ActionStyle = void 0;\n// Note the \"weird\" way these readonly fields are declared is to work around\n// a breaking change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n// and adopt this syntax for all other static readonly fields.\nvar ActionStyle = /** @class */ (function () {\n function ActionStyle() {\n }\n ActionStyle.Default = \"default\";\n ActionStyle.Positive = \"positive\";\n ActionStyle.Destructive = \"destructive\";\n return ActionStyle;\n}());\nexports.ActionStyle = ActionStyle;\nvar ActionMode = /** @class */ (function () {\n function ActionMode() {\n }\n ActionMode.Primary = \"primary\";\n ActionMode.Secondary = \"secondary\";\n return ActionMode;\n}());\nexports.ActionMode = ActionMode;\nvar Size;\n(function (Size) {\n Size[Size[\"Auto\"] = 0] = \"Auto\";\n Size[Size[\"Stretch\"] = 1] = \"Stretch\";\n Size[Size[\"Small\"] = 2] = \"Small\";\n Size[Size[\"Medium\"] = 3] = \"Medium\";\n Size[Size[\"Large\"] = 4] = \"Large\";\n})(Size = exports.Size || (exports.Size = {}));\nvar ImageSize;\n(function (ImageSize) {\n ImageSize[ImageSize[\"Small\"] = 0] = \"Small\";\n ImageSize[ImageSize[\"Medium\"] = 1] = \"Medium\";\n ImageSize[ImageSize[\"Large\"] = 2] = \"Large\";\n})(ImageSize = exports.ImageSize || (exports.ImageSize = {}));\nvar SizeUnit;\n(function (SizeUnit) {\n SizeUnit[SizeUnit[\"Weight\"] = 0] = \"Weight\";\n SizeUnit[SizeUnit[\"Pixel\"] = 1] = \"Pixel\";\n})(SizeUnit = exports.SizeUnit || (exports.SizeUnit = {}));\nvar TextSize;\n(function (TextSize) {\n TextSize[TextSize[\"Small\"] = 0] = \"Small\";\n TextSize[TextSize[\"Default\"] = 1] = \"Default\";\n TextSize[TextSize[\"Medium\"] = 2] = \"Medium\";\n TextSize[TextSize[\"Large\"] = 3] = \"Large\";\n TextSize[TextSize[\"ExtraLarge\"] = 4] = \"ExtraLarge\";\n})(TextSize = exports.TextSize || (exports.TextSize = {}));\nvar TextWeight;\n(function (TextWeight) {\n TextWeight[TextWeight[\"Lighter\"] = 0] = \"Lighter\";\n TextWeight[TextWeight[\"Default\"] = 1] = \"Default\";\n TextWeight[TextWeight[\"Bolder\"] = 2] = \"Bolder\";\n})(TextWeight = exports.TextWeight || (exports.TextWeight = {}));\nvar FontType;\n(function (FontType) {\n FontType[FontType[\"Default\"] = 0] = \"Default\";\n FontType[FontType[\"Monospace\"] = 1] = \"Monospace\";\n})(FontType = exports.FontType || (exports.FontType = {}));\nvar Spacing;\n(function (Spacing) {\n Spacing[Spacing[\"None\"] = 0] = \"None\";\n Spacing[Spacing[\"Small\"] = 1] = \"Small\";\n Spacing[Spacing[\"Default\"] = 2] = \"Default\";\n Spacing[Spacing[\"Medium\"] = 3] = \"Medium\";\n Spacing[Spacing[\"Large\"] = 4] = \"Large\";\n Spacing[Spacing[\"ExtraLarge\"] = 5] = \"ExtraLarge\";\n Spacing[Spacing[\"Padding\"] = 6] = \"Padding\";\n})(Spacing = exports.Spacing || (exports.Spacing = {}));\nvar TextColor;\n(function (TextColor) {\n TextColor[TextColor[\"Default\"] = 0] = \"Default\";\n TextColor[TextColor[\"Dark\"] = 1] = \"Dark\";\n TextColor[TextColor[\"Light\"] = 2] = \"Light\";\n TextColor[TextColor[\"Accent\"] = 3] = \"Accent\";\n TextColor[TextColor[\"Good\"] = 4] = \"Good\";\n TextColor[TextColor[\"Warning\"] = 5] = \"Warning\";\n TextColor[TextColor[\"Attention\"] = 6] = \"Attention\";\n})(TextColor = exports.TextColor || (exports.TextColor = {}));\nvar HorizontalAlignment;\n(function (HorizontalAlignment) {\n HorizontalAlignment[HorizontalAlignment[\"Left\"] = 0] = \"Left\";\n HorizontalAlignment[HorizontalAlignment[\"Center\"] = 1] = \"Center\";\n HorizontalAlignment[HorizontalAlignment[\"Right\"] = 2] = \"Right\";\n})(HorizontalAlignment = exports.HorizontalAlignment || (exports.HorizontalAlignment = {}));\nvar VerticalAlignment;\n(function (VerticalAlignment) {\n VerticalAlignment[VerticalAlignment[\"Top\"] = 0] = \"Top\";\n VerticalAlignment[VerticalAlignment[\"Center\"] = 1] = \"Center\";\n VerticalAlignment[VerticalAlignment[\"Bottom\"] = 2] = \"Bottom\";\n})(VerticalAlignment = exports.VerticalAlignment || (exports.VerticalAlignment = {}));\nvar ActionAlignment;\n(function (ActionAlignment) {\n ActionAlignment[ActionAlignment[\"Left\"] = 0] = \"Left\";\n ActionAlignment[ActionAlignment[\"Center\"] = 1] = \"Center\";\n ActionAlignment[ActionAlignment[\"Right\"] = 2] = \"Right\";\n ActionAlignment[ActionAlignment[\"Stretch\"] = 3] = \"Stretch\";\n})(ActionAlignment = exports.ActionAlignment || (exports.ActionAlignment = {}));\nvar ImageStyle;\n(function (ImageStyle) {\n ImageStyle[ImageStyle[\"Default\"] = 0] = \"Default\";\n ImageStyle[ImageStyle[\"Person\"] = 1] = \"Person\";\n})(ImageStyle = exports.ImageStyle || (exports.ImageStyle = {}));\nvar ShowCardActionMode;\n(function (ShowCardActionMode) {\n ShowCardActionMode[ShowCardActionMode[\"Inline\"] = 0] = \"Inline\";\n ShowCardActionMode[ShowCardActionMode[\"Popup\"] = 1] = \"Popup\";\n})(ShowCardActionMode = exports.ShowCardActionMode || (exports.ShowCardActionMode = {}));\nvar Orientation;\n(function (Orientation) {\n Orientation[Orientation[\"Horizontal\"] = 0] = \"Horizontal\";\n Orientation[Orientation[\"Vertical\"] = 1] = \"Vertical\";\n})(Orientation = exports.Orientation || (exports.Orientation = {}));\nvar FillMode;\n(function (FillMode) {\n FillMode[FillMode[\"Cover\"] = 0] = \"Cover\";\n FillMode[FillMode[\"RepeatHorizontally\"] = 1] = \"RepeatHorizontally\";\n FillMode[FillMode[\"RepeatVertically\"] = 2] = \"RepeatVertically\";\n FillMode[FillMode[\"Repeat\"] = 3] = \"Repeat\";\n})(FillMode = exports.FillMode || (exports.FillMode = {}));\nvar ActionIconPlacement;\n(function (ActionIconPlacement) {\n ActionIconPlacement[ActionIconPlacement[\"LeftOfTitle\"] = 0] = \"LeftOfTitle\";\n ActionIconPlacement[ActionIconPlacement[\"AboveTitle\"] = 1] = \"AboveTitle\";\n})(ActionIconPlacement = exports.ActionIconPlacement || (exports.ActionIconPlacement = {}));\nvar InputTextStyle;\n(function (InputTextStyle) {\n InputTextStyle[InputTextStyle[\"Text\"] = 0] = \"Text\";\n InputTextStyle[InputTextStyle[\"Tel\"] = 1] = \"Tel\";\n InputTextStyle[InputTextStyle[\"Url\"] = 2] = \"Url\";\n InputTextStyle[InputTextStyle[\"Email\"] = 3] = \"Email\";\n InputTextStyle[InputTextStyle[\"Password\"] = 4] = \"Password\";\n})(InputTextStyle = exports.InputTextStyle || (exports.InputTextStyle = {}));\n/*\n This should really be a string enum, e.g.\n\n export enum ContainerStyle {\n Default = \"default\",\n Emphasis = \"emphasis\"\n }\n\n However, some hosts do not use a version of TypeScript\n recent enough to understand string enums. This is\n a compatible construct that does not require using\n a more recent version of TypeScript.\n\n Also note the \"weird\" way these readonly fields are declared is to work around\n a breaking change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\n and adopt this syntax for all other static readonly fields.\n*/\nvar ContainerStyle = /** @class */ (function () {\n function ContainerStyle() {\n }\n ContainerStyle.Default = \"default\";\n ContainerStyle.Emphasis = \"emphasis\";\n ContainerStyle.Accent = \"accent\";\n ContainerStyle.Good = \"good\";\n ContainerStyle.Attention = \"attention\";\n ContainerStyle.Warning = \"warning\";\n return ContainerStyle;\n}());\nexports.ContainerStyle = ContainerStyle;\nvar ValidationPhase;\n(function (ValidationPhase) {\n ValidationPhase[ValidationPhase[\"Parse\"] = 0] = \"Parse\";\n ValidationPhase[ValidationPhase[\"ToJSON\"] = 1] = \"ToJSON\";\n ValidationPhase[ValidationPhase[\"Validation\"] = 2] = \"Validation\";\n})(ValidationPhase = exports.ValidationPhase || (exports.ValidationPhase = {}));\nvar ValidationEvent;\n(function (ValidationEvent) {\n ValidationEvent[ValidationEvent[\"Hint\"] = 0] = \"Hint\";\n ValidationEvent[ValidationEvent[\"ActionTypeNotAllowed\"] = 1] = \"ActionTypeNotAllowed\";\n ValidationEvent[ValidationEvent[\"CollectionCantBeEmpty\"] = 2] = \"CollectionCantBeEmpty\";\n ValidationEvent[ValidationEvent[\"Deprecated\"] = 3] = \"Deprecated\";\n ValidationEvent[ValidationEvent[\"ElementTypeNotAllowed\"] = 4] = \"ElementTypeNotAllowed\";\n ValidationEvent[ValidationEvent[\"InteractivityNotAllowed\"] = 5] = \"InteractivityNotAllowed\";\n ValidationEvent[ValidationEvent[\"InvalidPropertyValue\"] = 6] = \"InvalidPropertyValue\";\n ValidationEvent[ValidationEvent[\"MissingCardType\"] = 7] = \"MissingCardType\";\n ValidationEvent[ValidationEvent[\"PropertyCantBeNull\"] = 8] = \"PropertyCantBeNull\";\n ValidationEvent[ValidationEvent[\"TooManyActions\"] = 9] = \"TooManyActions\";\n ValidationEvent[ValidationEvent[\"UnknownActionType\"] = 10] = \"UnknownActionType\";\n ValidationEvent[ValidationEvent[\"UnknownElementType\"] = 11] = \"UnknownElementType\";\n ValidationEvent[ValidationEvent[\"UnsupportedCardVersion\"] = 12] = \"UnsupportedCardVersion\";\n ValidationEvent[ValidationEvent[\"DuplicateId\"] = 13] = \"DuplicateId\";\n ValidationEvent[ValidationEvent[\"UnsupportedProperty\"] = 14] = \"UnsupportedProperty\";\n ValidationEvent[ValidationEvent[\"RequiredInputsShouldHaveLabel\"] = 15] = \"RequiredInputsShouldHaveLabel\";\n ValidationEvent[ValidationEvent[\"RequiredInputsShouldHaveErrorMessage\"] = 16] = \"RequiredInputsShouldHaveErrorMessage\";\n ValidationEvent[ValidationEvent[\"Other\"] = 17] = \"Other\";\n})(ValidationEvent = exports.ValidationEvent || (exports.ValidationEvent = {}));\nvar ContainerFitStatus;\n(function (ContainerFitStatus) {\n ContainerFitStatus[ContainerFitStatus[\"FullyInContainer\"] = 0] = \"FullyInContainer\";\n ContainerFitStatus[ContainerFitStatus[\"Overflowing\"] = 1] = \"Overflowing\";\n ContainerFitStatus[ContainerFitStatus[\"FullyOutOfContainer\"] = 2] = \"FullyOutOfContainer\";\n})(ContainerFitStatus = exports.ContainerFitStatus || (exports.ContainerFitStatus = {}));\nvar TypeErrorType;\n(function (TypeErrorType) {\n TypeErrorType[TypeErrorType[\"UnknownType\"] = 0] = \"UnknownType\";\n TypeErrorType[TypeErrorType[\"ForbiddenType\"] = 1] = \"ForbiddenType\";\n})(TypeErrorType = exports.TypeErrorType || (exports.TypeErrorType = {}));\nvar RefreshMode;\n(function (RefreshMode) {\n RefreshMode[RefreshMode[\"Disabled\"] = 0] = \"Disabled\";\n RefreshMode[RefreshMode[\"Manual\"] = 1] = \"Manual\";\n RefreshMode[RefreshMode[\"Automatic\"] = 2] = \"Automatic\";\n})(RefreshMode = exports.RefreshMode || (exports.RefreshMode = {}));\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"Info\"] = 0] = \"Info\";\n LogLevel[LogLevel[\"Warning\"] = 1] = \"Warning\";\n LogLevel[LogLevel[\"Error\"] = 2] = \"Error\";\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\n//# sourceMappingURL=enums.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HostCapabilities = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar serialization_1 = require(\"./serialization\");\nvar HostCapabilities = /** @class */ (function (_super) {\n __extends(HostCapabilities, _super);\n function HostCapabilities() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._capabilities = {};\n return _this;\n }\n HostCapabilities.prototype.getSchemaKey = function () {\n return \"HostCapabilities\";\n };\n HostCapabilities.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n if (source) {\n for (var name_1 in source) {\n var jsonVersion = source[name_1];\n if (typeof jsonVersion === \"string\") {\n if (jsonVersion == \"*\") {\n this.addCapability(name_1, \"*\");\n }\n else {\n var version = serialization_1.Version.parse(jsonVersion, context);\n if (version && version.isValid) {\n this.addCapability(name_1, version);\n }\n }\n }\n }\n }\n };\n HostCapabilities.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n for (var key in this._capabilities) {\n target[key] = this._capabilities[key];\n }\n };\n HostCapabilities.prototype.addCapability = function (name, version) {\n this._capabilities[name] = version;\n };\n HostCapabilities.prototype.removeCapability = function (name) {\n delete this._capabilities[name];\n };\n HostCapabilities.prototype.clear = function () {\n this._capabilities = {};\n };\n HostCapabilities.prototype.hasCapability = function (name, version) {\n if (this._capabilities.hasOwnProperty(name)) {\n if (version == \"*\" || this._capabilities[name] == \"*\") {\n return true;\n }\n return version.compareTo(this._capabilities[name]) <= 0;\n }\n return false;\n };\n HostCapabilities.prototype.areAllMet = function (hostCapabilities) {\n for (var capabilityName in this._capabilities) {\n if (!hostCapabilities.hasCapability(capabilityName, this._capabilities[capabilityName])) {\n return false;\n }\n }\n return true;\n };\n return HostCapabilities;\n}(serialization_1.SerializableObject));\nexports.HostCapabilities = HostCapabilities;\n//# sourceMappingURL=host-capabilities.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultHostConfig = exports.HostConfig = exports.FontTypeSet = exports.FontTypeDefinition = exports.ContainerStyleSet = exports.ContainerStyleDefinition = exports.ColorSetDefinition = exports.ActionsConfig = exports.ShowCardActionConfig = exports.FactSetConfig = exports.FactTitleDefinition = exports.FactTextDefinition = exports.InputConfig = exports.InputLabelConfig = exports.RequiredInputLabelTextDefinition = exports.TextBlockConfig = exports.TextStyleSet = exports.TextStyleDefinition = exports.BaseTextDefinition = exports.TableConfig = exports.MediaConfig = exports.ImageSetConfig = exports.AdaptiveCardConfig = exports.TextColorDefinition = exports.ColorDefinition = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Enums = require(\"./enums\");\nvar Utils = require(\"./utils\");\nvar Shared = require(\"./shared\");\nvar host_capabilities_1 = require(\"./host-capabilities\");\nfunction parseHostConfigEnum(targetEnum, value, defaultValue) {\n if (typeof value === \"string\") {\n var parsedValue = Utils.parseEnum(targetEnum, value, defaultValue);\n return parsedValue !== undefined ? parsedValue : defaultValue;\n }\n else if (typeof value === \"number\") {\n return value;\n }\n else {\n return defaultValue;\n }\n}\nvar ColorDefinition = /** @class */ (function () {\n function ColorDefinition(defaultColor, subtleColor) {\n this.default = \"#000000\";\n this.subtle = \"#666666\";\n if (defaultColor) {\n this.default = defaultColor;\n }\n if (subtleColor) {\n this.subtle = subtleColor;\n }\n }\n ColorDefinition.prototype.parse = function (obj) {\n if (obj) {\n this.default = obj[\"default\"] || this.default;\n this.subtle = obj[\"subtle\"] || this.subtle;\n }\n };\n return ColorDefinition;\n}());\nexports.ColorDefinition = ColorDefinition;\nvar TextColorDefinition = /** @class */ (function (_super) {\n __extends(TextColorDefinition, _super);\n function TextColorDefinition() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.highlightColors = new ColorDefinition(\"#22000000\", \"#11000000\");\n return _this;\n }\n TextColorDefinition.prototype.parse = function (obj) {\n _super.prototype.parse.call(this, obj);\n if (obj) {\n this.highlightColors.parse(obj[\"highlightColors\"]);\n }\n };\n return TextColorDefinition;\n}(ColorDefinition));\nexports.TextColorDefinition = TextColorDefinition;\nvar AdaptiveCardConfig = /** @class */ (function () {\n function AdaptiveCardConfig(obj) {\n this.allowCustomStyle = false;\n if (obj) {\n this.allowCustomStyle = obj[\"allowCustomStyle\"] || this.allowCustomStyle;\n }\n }\n return AdaptiveCardConfig;\n}());\nexports.AdaptiveCardConfig = AdaptiveCardConfig;\nvar ImageSetConfig = /** @class */ (function () {\n function ImageSetConfig(obj) {\n this.imageSize = Enums.Size.Medium;\n this.maxImageHeight = 100;\n if (obj) {\n this.imageSize = obj[\"imageSize\"] != null ? obj[\"imageSize\"] : this.imageSize;\n this.maxImageHeight = Utils.parseNumber(obj[\"maxImageHeight\"], 100);\n }\n }\n ImageSetConfig.prototype.toJSON = function () {\n return {\n imageSize: Enums.Size[this.imageSize],\n maxImageHeight: this.maxImageHeight\n };\n };\n return ImageSetConfig;\n}());\nexports.ImageSetConfig = ImageSetConfig;\nvar MediaConfig = /** @class */ (function () {\n function MediaConfig(obj) {\n this.allowInlinePlayback = true;\n if (obj) {\n this.defaultPoster = obj[\"defaultPoster\"];\n this.allowInlinePlayback = obj[\"allowInlinePlayback\"] || this.allowInlinePlayback;\n }\n }\n MediaConfig.prototype.toJSON = function () {\n return {\n defaultPoster: this.defaultPoster,\n allowInlinePlayback: this.allowInlinePlayback\n };\n };\n return MediaConfig;\n}());\nexports.MediaConfig = MediaConfig;\nvar TableConfig = /** @class */ (function () {\n function TableConfig(obj) {\n this.cellSpacing = 8;\n if (obj) {\n this.cellSpacing = obj.cellSpacing && typeof obj.cellSpacing === \"number\" ? obj.cellSpacing : this.cellSpacing;\n }\n }\n TableConfig.prototype.toJSON = function () {\n return {\n cellSpacing: this.cellSpacing\n };\n };\n return TableConfig;\n}());\nexports.TableConfig = TableConfig;\nvar BaseTextDefinition = /** @class */ (function () {\n function BaseTextDefinition(obj) {\n this.size = Enums.TextSize.Default;\n this.color = Enums.TextColor.Default;\n this.isSubtle = false;\n this.weight = Enums.TextWeight.Default;\n this.parse(obj);\n }\n ;\n BaseTextDefinition.prototype.parse = function (obj) {\n if (obj) {\n this.size = parseHostConfigEnum(Enums.TextSize, obj[\"size\"], this.size);\n this.color = parseHostConfigEnum(Enums.TextColor, obj[\"color\"], this.color);\n this.isSubtle = obj.isSubtle !== undefined && typeof obj.isSubtle === \"boolean\" ? obj.isSubtle : this.isSubtle;\n this.weight = parseHostConfigEnum(Enums.TextWeight, obj[\"weight\"], this.getDefaultWeight());\n }\n };\n BaseTextDefinition.prototype.getDefaultWeight = function () {\n return Enums.TextWeight.Default;\n };\n BaseTextDefinition.prototype.toJSON = function () {\n return {\n size: Enums.TextSize[this.size],\n color: Enums.TextColor[this.color],\n isSubtle: this.isSubtle,\n weight: Enums.TextWeight[this.weight]\n };\n };\n return BaseTextDefinition;\n}());\nexports.BaseTextDefinition = BaseTextDefinition;\nvar TextStyleDefinition = /** @class */ (function (_super) {\n __extends(TextStyleDefinition, _super);\n function TextStyleDefinition() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.fontType = Enums.FontType.Default;\n return _this;\n }\n TextStyleDefinition.prototype.parse = function (obj) {\n _super.prototype.parse.call(this, obj);\n if (obj) {\n this.fontType = parseHostConfigEnum(Enums.FontType, obj.fontType, this.fontType);\n }\n };\n return TextStyleDefinition;\n}(BaseTextDefinition));\nexports.TextStyleDefinition = TextStyleDefinition;\nvar TextStyleSet = /** @class */ (function () {\n function TextStyleSet(obj) {\n this.default = new TextStyleDefinition();\n this.heading = new TextStyleDefinition({\n size: \"Large\",\n weight: \"Bolder\"\n });\n this.columnHeader = new TextStyleDefinition({\n weight: \"Bolder\"\n });\n if (obj) {\n this.heading.parse(obj.heading);\n this.columnHeader.parse(obj.columnHeader);\n }\n }\n TextStyleSet.prototype.getStyleByName = function (name) {\n switch (name.toLowerCase()) {\n case \"heading\":\n return this.heading;\n case \"columnHeader\":\n return this.columnHeader;\n default:\n return this.default;\n }\n };\n return TextStyleSet;\n}());\nexports.TextStyleSet = TextStyleSet;\nvar TextBlockConfig = /** @class */ (function () {\n function TextBlockConfig(obj) {\n if (obj) {\n this.headingLevel = Utils.parseNumber(obj.headingLevel);\n }\n }\n return TextBlockConfig;\n}());\nexports.TextBlockConfig = TextBlockConfig;\nvar RequiredInputLabelTextDefinition = /** @class */ (function (_super) {\n __extends(RequiredInputLabelTextDefinition, _super);\n function RequiredInputLabelTextDefinition() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.suffix = \" *\";\n _this.suffixColor = Enums.TextColor.Attention;\n return _this;\n }\n RequiredInputLabelTextDefinition.prototype.parse = function (obj) {\n _super.prototype.parse.call(this, obj);\n if (obj) {\n this.suffix = obj[\"suffix\"] || this.suffix;\n this.suffixColor = parseHostConfigEnum(Enums.TextColor, obj[\"suffixColor\"], this.suffixColor);\n }\n };\n RequiredInputLabelTextDefinition.prototype.toJSON = function () {\n var result = _super.prototype.toJSON.call(this);\n result[\"suffix\"] = this.suffix;\n result[\"suffixColor\"] = Enums.TextColor[this.suffixColor];\n return result;\n };\n return RequiredInputLabelTextDefinition;\n}(BaseTextDefinition));\nexports.RequiredInputLabelTextDefinition = RequiredInputLabelTextDefinition;\nvar InputLabelConfig = /** @class */ (function () {\n function InputLabelConfig(obj) {\n this.inputSpacing = Enums.Spacing.Small;\n this.requiredInputs = new RequiredInputLabelTextDefinition();\n this.optionalInputs = new BaseTextDefinition();\n if (obj) {\n this.inputSpacing = parseHostConfigEnum(Enums.Spacing, obj[\"inputSpacing\"], this.inputSpacing);\n this.requiredInputs = new RequiredInputLabelTextDefinition(obj[\"requiredInputs\"]);\n this.optionalInputs = new BaseTextDefinition(obj[\"optionalInputs\"]);\n }\n }\n return InputLabelConfig;\n}());\nexports.InputLabelConfig = InputLabelConfig;\nvar InputConfig = /** @class */ (function () {\n function InputConfig(obj) {\n this.label = new InputLabelConfig();\n this.errorMessage = new BaseTextDefinition({ color: Enums.TextColor.Attention });\n if (obj) {\n this.label = new InputLabelConfig(obj[\"label\"]);\n this.errorMessage = new BaseTextDefinition(obj[\"errorMessage\"]);\n }\n }\n return InputConfig;\n}());\nexports.InputConfig = InputConfig;\nvar FactTextDefinition = /** @class */ (function (_super) {\n __extends(FactTextDefinition, _super);\n function FactTextDefinition() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.wrap = true;\n return _this;\n }\n FactTextDefinition.prototype.parse = function (obj) {\n _super.prototype.parse.call(this, obj);\n if (obj) {\n this.wrap = obj[\"wrap\"] != null ? obj[\"wrap\"] : this.wrap;\n }\n };\n FactTextDefinition.prototype.toJSON = function () {\n var result = _super.prototype.toJSON.call(this);\n result[\"wrap\"] = this.wrap;\n return result;\n };\n return FactTextDefinition;\n}(BaseTextDefinition));\nexports.FactTextDefinition = FactTextDefinition;\nvar FactTitleDefinition = /** @class */ (function (_super) {\n __extends(FactTitleDefinition, _super);\n function FactTitleDefinition(obj) {\n var _this = _super.call(this, obj) || this;\n _this.maxWidth = 150;\n _this.weight = Enums.TextWeight.Bolder;\n if (obj) {\n _this.maxWidth = obj[\"maxWidth\"] != null ? obj[\"maxWidth\"] : _this.maxWidth;\n _this.weight = parseHostConfigEnum(Enums.TextWeight, obj[\"weight\"], Enums.TextWeight.Bolder);\n }\n return _this;\n }\n FactTitleDefinition.prototype.getDefaultWeight = function () {\n return Enums.TextWeight.Bolder;\n };\n return FactTitleDefinition;\n}(FactTextDefinition));\nexports.FactTitleDefinition = FactTitleDefinition;\nvar FactSetConfig = /** @class */ (function () {\n function FactSetConfig(obj) {\n this.title = new FactTitleDefinition();\n this.value = new FactTextDefinition();\n this.spacing = 10;\n if (obj) {\n this.title = new FactTitleDefinition(obj[\"title\"]);\n this.value = new FactTextDefinition(obj[\"value\"]);\n this.spacing = obj.spacing && obj.spacing != null ? obj.spacing && obj.spacing : this.spacing;\n }\n }\n return FactSetConfig;\n}());\nexports.FactSetConfig = FactSetConfig;\nvar ShowCardActionConfig = /** @class */ (function () {\n function ShowCardActionConfig(obj) {\n this.actionMode = Enums.ShowCardActionMode.Inline;\n this.inlineTopMargin = 16;\n this.style = Enums.ContainerStyle.Emphasis;\n if (obj) {\n this.actionMode = parseHostConfigEnum(Enums.ShowCardActionMode, obj[\"actionMode\"], Enums.ShowCardActionMode.Inline);\n this.inlineTopMargin = obj[\"inlineTopMargin\"] != null ? obj[\"inlineTopMargin\"] : this.inlineTopMargin;\n this.style = obj[\"style\"] && typeof obj[\"style\"] === \"string\" ? obj[\"style\"] : Enums.ContainerStyle.Emphasis;\n }\n }\n ShowCardActionConfig.prototype.toJSON = function () {\n return {\n actionMode: Enums.ShowCardActionMode[this.actionMode],\n inlineTopMargin: this.inlineTopMargin,\n style: this.style\n };\n };\n return ShowCardActionConfig;\n}());\nexports.ShowCardActionConfig = ShowCardActionConfig;\nvar ActionsConfig = /** @class */ (function () {\n function ActionsConfig(obj) {\n this.maxActions = 5;\n this.spacing = Enums.Spacing.Default;\n this.buttonSpacing = 20;\n this.showCard = new ShowCardActionConfig();\n this.preExpandSingleShowCardAction = false;\n this.actionsOrientation = Enums.Orientation.Horizontal;\n this.actionAlignment = Enums.ActionAlignment.Left;\n this.iconPlacement = Enums.ActionIconPlacement.LeftOfTitle;\n this.allowTitleToWrap = false;\n this.iconSize = 16;\n if (obj) {\n this.maxActions = obj[\"maxActions\"] != null ? obj[\"maxActions\"] : this.maxActions;\n this.spacing = parseHostConfigEnum(Enums.Spacing, obj.spacing && obj.spacing, Enums.Spacing.Default);\n this.buttonSpacing = obj[\"buttonSpacing\"] != null ? obj[\"buttonSpacing\"] : this.buttonSpacing;\n this.showCard = new ShowCardActionConfig(obj[\"showCard\"]);\n this.preExpandSingleShowCardAction = Utils.parseBool(obj[\"preExpandSingleShowCardAction\"], false);\n this.actionsOrientation = parseHostConfigEnum(Enums.Orientation, obj[\"actionsOrientation\"], Enums.Orientation.Horizontal);\n this.actionAlignment = parseHostConfigEnum(Enums.ActionAlignment, obj[\"actionAlignment\"], Enums.ActionAlignment.Left);\n this.iconPlacement = parseHostConfigEnum(Enums.ActionIconPlacement, obj[\"iconPlacement\"], Enums.ActionIconPlacement.LeftOfTitle);\n this.allowTitleToWrap = obj[\"allowTitleToWrap\"] != null ? obj[\"allowTitleToWrap\"] : this.allowTitleToWrap;\n try {\n var sizeAndUnit = Shared.SizeAndUnit.parse(obj[\"iconSize\"]);\n if (sizeAndUnit.unit == Enums.SizeUnit.Pixel) {\n this.iconSize = sizeAndUnit.physicalSize;\n }\n }\n catch (e) {\n // Swallow this, keep default icon size\n }\n }\n }\n ActionsConfig.prototype.toJSON = function () {\n return {\n maxActions: this.maxActions,\n spacing: Enums.Spacing[this.spacing],\n buttonSpacing: this.buttonSpacing,\n showCard: this.showCard,\n preExpandSingleShowCardAction: this.preExpandSingleShowCardAction,\n actionsOrientation: Enums.Orientation[this.actionsOrientation],\n actionAlignment: Enums.ActionAlignment[this.actionAlignment]\n };\n };\n return ActionsConfig;\n}());\nexports.ActionsConfig = ActionsConfig;\nvar ColorSetDefinition = /** @class */ (function () {\n function ColorSetDefinition(obj) {\n this.default = new TextColorDefinition();\n this.dark = new TextColorDefinition();\n this.light = new TextColorDefinition();\n this.accent = new TextColorDefinition();\n this.good = new TextColorDefinition();\n this.warning = new TextColorDefinition();\n this.attention = new TextColorDefinition();\n this.parse(obj);\n }\n ColorSetDefinition.prototype.parseSingleColor = function (obj, propertyName) {\n if (obj) {\n this[propertyName].parse(obj[propertyName]);\n }\n };\n ColorSetDefinition.prototype.parse = function (obj) {\n if (obj) {\n this.parseSingleColor(obj, \"default\");\n this.parseSingleColor(obj, \"dark\");\n this.parseSingleColor(obj, \"light\");\n this.parseSingleColor(obj, \"accent\");\n this.parseSingleColor(obj, \"good\");\n this.parseSingleColor(obj, \"warning\");\n this.parseSingleColor(obj, \"attention\");\n }\n };\n return ColorSetDefinition;\n}());\nexports.ColorSetDefinition = ColorSetDefinition;\nvar ContainerStyleDefinition = /** @class */ (function () {\n function ContainerStyleDefinition(obj) {\n this.foregroundColors = new ColorSetDefinition({\n \"default\": { default: \"#333333\", subtle: \"#EE333333\" },\n \"dark\": { default: \"#000000\", subtle: \"#66000000\" },\n \"light\": { default: \"#FFFFFF\", subtle: \"#33000000\" },\n \"accent\": { default: \"#2E89FC\", subtle: \"#882E89FC\" },\n \"good\": { default: \"#028A02\", subtle: \"#DD027502\" },\n \"warning\": { default: \"#E69500\", subtle: \"#DDE69500\" },\n \"attention\": { default: \"#CC3300\", subtle: \"#DDCC3300\" }\n });\n this.parse(obj);\n }\n ContainerStyleDefinition.prototype.parse = function (obj) {\n if (obj) {\n this.backgroundColor = obj[\"backgroundColor\"];\n this.foregroundColors.parse(obj[\"foregroundColors\"]);\n this.highlightBackgroundColor = obj[\"highlightBackgroundColor\"];\n this.highlightForegroundColor = obj[\"highlightForegroundColor\"];\n this.borderColor = obj[\"borderColor\"];\n }\n };\n Object.defineProperty(ContainerStyleDefinition.prototype, \"isBuiltIn\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n return ContainerStyleDefinition;\n}());\nexports.ContainerStyleDefinition = ContainerStyleDefinition;\nvar BuiltInContainerStyleDefinition = /** @class */ (function (_super) {\n __extends(BuiltInContainerStyleDefinition, _super);\n function BuiltInContainerStyleDefinition() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(BuiltInContainerStyleDefinition.prototype, \"isBuiltIn\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n return BuiltInContainerStyleDefinition;\n}(ContainerStyleDefinition));\nvar ContainerStyleSet = /** @class */ (function () {\n function ContainerStyleSet(obj) {\n this._allStyles = {};\n this._allStyles[Enums.ContainerStyle.Default] = new BuiltInContainerStyleDefinition();\n this._allStyles[Enums.ContainerStyle.Emphasis] = new BuiltInContainerStyleDefinition();\n this._allStyles[Enums.ContainerStyle.Accent] = new BuiltInContainerStyleDefinition();\n this._allStyles[Enums.ContainerStyle.Good] = new BuiltInContainerStyleDefinition();\n this._allStyles[Enums.ContainerStyle.Attention] = new BuiltInContainerStyleDefinition();\n this._allStyles[Enums.ContainerStyle.Warning] = new BuiltInContainerStyleDefinition();\n if (obj) {\n this._allStyles[Enums.ContainerStyle.Default].parse(obj[Enums.ContainerStyle.Default]);\n this._allStyles[Enums.ContainerStyle.Emphasis].parse(obj[Enums.ContainerStyle.Emphasis]);\n this._allStyles[Enums.ContainerStyle.Accent].parse(obj[Enums.ContainerStyle.Accent]);\n this._allStyles[Enums.ContainerStyle.Good].parse(obj[Enums.ContainerStyle.Good]);\n this._allStyles[Enums.ContainerStyle.Attention].parse(obj[Enums.ContainerStyle.Attention]);\n this._allStyles[Enums.ContainerStyle.Warning].parse(obj[Enums.ContainerStyle.Warning]);\n var customStyleArray = obj[\"customStyles\"];\n if (customStyleArray && Array.isArray(customStyleArray)) {\n for (var _i = 0, customStyleArray_1 = customStyleArray; _i < customStyleArray_1.length; _i++) {\n var customStyle = customStyleArray_1[_i];\n if (customStyle) {\n var styleName = customStyle[\"name\"];\n if (styleName && typeof styleName === \"string\") {\n if (this._allStyles.hasOwnProperty(styleName)) {\n this._allStyles[styleName].parse(customStyle[\"style\"]);\n }\n else {\n this._allStyles[styleName] = new ContainerStyleDefinition(customStyle[\"style\"]);\n }\n }\n }\n }\n }\n }\n }\n ContainerStyleSet.prototype.toJSON = function () {\n var _this = this;\n var customStyleArray = [];\n Object.keys(this._allStyles).forEach(function (key) {\n if (!_this._allStyles[key].isBuiltIn) {\n customStyleArray.push({\n name: key,\n style: _this._allStyles[key]\n });\n }\n });\n var result = {\n default: this.default,\n emphasis: this.emphasis\n };\n if (customStyleArray.length > 0) {\n result.customStyles = customStyleArray;\n }\n return result;\n };\n ContainerStyleSet.prototype.getStyleByName = function (name, defaultValue) {\n if (name && this._allStyles.hasOwnProperty(name)) {\n return this._allStyles[name];\n }\n else {\n return defaultValue ? defaultValue : this._allStyles[Enums.ContainerStyle.Default];\n }\n };\n Object.defineProperty(ContainerStyleSet.prototype, \"default\", {\n get: function () {\n return this._allStyles[Enums.ContainerStyle.Default];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ContainerStyleSet.prototype, \"emphasis\", {\n get: function () {\n return this._allStyles[Enums.ContainerStyle.Emphasis];\n },\n enumerable: false,\n configurable: true\n });\n return ContainerStyleSet;\n}());\nexports.ContainerStyleSet = ContainerStyleSet;\nvar FontTypeDefinition = /** @class */ (function () {\n function FontTypeDefinition(fontFamily) {\n this.fontFamily = \"Segoe UI,Segoe,Segoe WP,Helvetica Neue,Helvetica,sans-serif\";\n this.fontSizes = {\n small: 12,\n default: 14,\n medium: 17,\n large: 21,\n extraLarge: 26\n };\n this.fontWeights = {\n lighter: 200,\n default: 400,\n bolder: 600\n };\n if (fontFamily) {\n this.fontFamily = fontFamily;\n }\n }\n FontTypeDefinition.prototype.parse = function (obj) {\n this.fontFamily = obj[\"fontFamily\"] || this.fontFamily;\n this.fontSizes = {\n small: obj.fontSizes && obj.fontSizes[\"small\"] || this.fontSizes.small,\n default: obj.fontSizes && obj.fontSizes[\"default\"] || this.fontSizes.default,\n medium: obj.fontSizes && obj.fontSizes[\"medium\"] || this.fontSizes.medium,\n large: obj.fontSizes && obj.fontSizes[\"large\"] || this.fontSizes.large,\n extraLarge: obj.fontSizes && obj.fontSizes[\"extraLarge\"] || this.fontSizes.extraLarge\n };\n this.fontWeights = {\n lighter: obj.fontWeights && obj.fontWeights[\"lighter\"] || this.fontWeights.lighter,\n default: obj.fontWeights && obj.fontWeights[\"default\"] || this.fontWeights.default,\n bolder: obj.fontWeights && obj.fontWeights[\"bolder\"] || this.fontWeights.bolder\n };\n };\n FontTypeDefinition.monospace = new FontTypeDefinition(\"'Courier New', Courier, monospace\");\n return FontTypeDefinition;\n}());\nexports.FontTypeDefinition = FontTypeDefinition;\nvar FontTypeSet = /** @class */ (function () {\n function FontTypeSet(obj) {\n this.default = new FontTypeDefinition();\n this.monospace = new FontTypeDefinition(\"'Courier New', Courier, monospace\");\n if (obj) {\n this.default.parse(obj[\"default\"]);\n this.monospace.parse(obj[\"monospace\"]);\n }\n }\n FontTypeSet.prototype.getStyleDefinition = function (style) {\n switch (style) {\n case Enums.FontType.Monospace:\n return this.monospace;\n case Enums.FontType.Default:\n default:\n return this.default;\n }\n };\n return FontTypeSet;\n}());\nexports.FontTypeSet = FontTypeSet;\nvar HostConfig = /** @class */ (function () {\n function HostConfig(obj) {\n this.hostCapabilities = new host_capabilities_1.HostCapabilities();\n this.choiceSetInputValueSeparator = \",\";\n this.supportsInteractivity = true;\n this.spacing = {\n small: 3,\n default: 8,\n medium: 20,\n large: 30,\n extraLarge: 40,\n padding: 15\n };\n this.separator = {\n lineThickness: 1,\n lineColor: \"#EEEEEE\"\n };\n this.imageSizes = {\n small: 40,\n medium: 80,\n large: 160\n };\n this.containerStyles = new ContainerStyleSet();\n this.inputs = new InputConfig();\n this.actions = new ActionsConfig();\n this.adaptiveCard = new AdaptiveCardConfig();\n this.imageSet = new ImageSetConfig();\n this.media = new MediaConfig();\n this.factSet = new FactSetConfig();\n this.table = new TableConfig();\n this.textStyles = new TextStyleSet();\n this.textBlock = new TextBlockConfig();\n this.alwaysAllowBleed = false;\n if (obj) {\n if (typeof obj === \"string\" || obj instanceof String) {\n obj = JSON.parse(obj);\n }\n this.choiceSetInputValueSeparator = (obj && typeof obj[\"choiceSetInputValueSeparator\"] === \"string\") ? obj[\"choiceSetInputValueSeparator\"] : this.choiceSetInputValueSeparator;\n this.supportsInteractivity = (obj && typeof obj[\"supportsInteractivity\"] === \"boolean\") ? obj[\"supportsInteractivity\"] : this.supportsInteractivity;\n this._legacyFontType = new FontTypeDefinition();\n this._legacyFontType.parse(obj);\n if (obj.fontTypes) {\n this.fontTypes = new FontTypeSet(obj.fontTypes);\n }\n if (obj.lineHeights) {\n this.lineHeights = {\n small: obj.lineHeights[\"small\"],\n default: obj.lineHeights[\"default\"],\n medium: obj.lineHeights[\"medium\"],\n large: obj.lineHeights[\"large\"],\n extraLarge: obj.lineHeights[\"extraLarge\"]\n };\n }\n ;\n this.imageSizes = {\n small: obj.imageSizes && obj.imageSizes[\"small\"] || this.imageSizes.small,\n medium: obj.imageSizes && obj.imageSizes[\"medium\"] || this.imageSizes.medium,\n large: obj.imageSizes && obj.imageSizes[\"large\"] || this.imageSizes.large,\n };\n this.containerStyles = new ContainerStyleSet(obj[\"containerStyles\"]);\n this.spacing = {\n small: obj.spacing && obj.spacing[\"small\"] || this.spacing.small,\n default: obj.spacing && obj.spacing[\"default\"] || this.spacing.default,\n medium: obj.spacing && obj.spacing[\"medium\"] || this.spacing.medium,\n large: obj.spacing && obj.spacing[\"large\"] || this.spacing.large,\n extraLarge: obj.spacing && obj.spacing[\"extraLarge\"] || this.spacing.extraLarge,\n padding: obj.spacing && obj.spacing[\"padding\"] || this.spacing.padding\n };\n this.separator = {\n lineThickness: obj.separator && obj.separator[\"lineThickness\"] || this.separator.lineThickness,\n lineColor: obj.separator && obj.separator[\"lineColor\"] || this.separator.lineColor\n };\n this.inputs = new InputConfig(obj.inputs || this.inputs);\n this.actions = new ActionsConfig(obj.actions || this.actions);\n this.adaptiveCard = new AdaptiveCardConfig(obj.adaptiveCard || this.adaptiveCard);\n this.imageSet = new ImageSetConfig(obj[\"imageSet\"]);\n this.factSet = new FactSetConfig(obj[\"factSet\"]);\n this.textStyles = new TextStyleSet(obj[\"textStyles\"]);\n this.textBlock = new TextBlockConfig(obj[\"textBlock\"]);\n }\n }\n HostConfig.prototype.getFontTypeDefinition = function (style) {\n if (this.fontTypes) {\n return this.fontTypes.getStyleDefinition(style);\n }\n else {\n return style == Enums.FontType.Monospace ? FontTypeDefinition.monospace : this._legacyFontType;\n }\n };\n HostConfig.prototype.getEffectiveSpacing = function (spacing) {\n switch (spacing) {\n case Enums.Spacing.Small:\n return this.spacing.small;\n case Enums.Spacing.Default:\n return this.spacing.default;\n case Enums.Spacing.Medium:\n return this.spacing.medium;\n case Enums.Spacing.Large:\n return this.spacing.large;\n case Enums.Spacing.ExtraLarge:\n return this.spacing.extraLarge;\n case Enums.Spacing.Padding:\n return this.spacing.padding;\n default:\n return 0;\n }\n };\n HostConfig.prototype.paddingDefinitionToSpacingDefinition = function (paddingDefinition) {\n return new Shared.SpacingDefinition(this.getEffectiveSpacing(paddingDefinition.top), this.getEffectiveSpacing(paddingDefinition.right), this.getEffectiveSpacing(paddingDefinition.bottom), this.getEffectiveSpacing(paddingDefinition.left));\n };\n HostConfig.prototype.makeCssClassNames = function () {\n var classNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n classNames[_i] = arguments[_i];\n }\n var result = [];\n for (var _a = 0, classNames_1 = classNames; _a < classNames_1.length; _a++) {\n var className = classNames_1[_a];\n result.push((this.cssClassNamePrefix ? this.cssClassNamePrefix + \"-\" : \"\") + className);\n }\n return result;\n };\n HostConfig.prototype.makeCssClassName = function () {\n var classNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n classNames[_i] = arguments[_i];\n }\n var result = this.makeCssClassNames.apply(this, classNames).join(\" \");\n return result ? result : \"\";\n };\n Object.defineProperty(HostConfig.prototype, \"fontFamily\", {\n get: function () {\n return this._legacyFontType.fontFamily;\n },\n set: function (value) {\n this._legacyFontType.fontFamily = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(HostConfig.prototype, \"fontSizes\", {\n get: function () {\n return this._legacyFontType.fontSizes;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(HostConfig.prototype, \"fontWeights\", {\n get: function () {\n return this._legacyFontType.fontWeights;\n },\n enumerable: false,\n configurable: true\n });\n return HostConfig;\n}());\nexports.HostConfig = HostConfig;\nexports.defaultHostConfig = new HostConfig({\n supportsInteractivity: true,\n spacing: {\n small: 10,\n default: 20,\n medium: 30,\n large: 40,\n extraLarge: 50,\n padding: 20\n },\n separator: {\n lineThickness: 1,\n lineColor: \"#EEEEEE\"\n },\n fontTypes: {\n default: {\n fontFamily: \"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif\",\n fontSizes: {\n small: 12,\n default: 14,\n medium: 17,\n large: 21,\n extraLarge: 26\n },\n fontWeights: {\n lighter: 200,\n default: 400,\n bolder: 600\n }\n },\n monospace: {\n fontFamily: \"'Courier New', Courier, monospace\",\n fontSizes: {\n small: 12,\n default: 14,\n medium: 17,\n large: 21,\n extraLarge: 26\n },\n fontWeights: {\n lighter: 200,\n default: 400,\n bolder: 600\n }\n }\n },\n imageSizes: {\n small: 40,\n medium: 80,\n large: 160\n },\n containerStyles: {\n default: {\n backgroundColor: \"#FFFFFF\",\n foregroundColors: {\n default: {\n default: \"#333333\",\n subtle: \"#EE333333\"\n },\n dark: {\n default: \"#000000\",\n subtle: \"#66000000\"\n },\n light: {\n default: \"#FFFFFF\",\n subtle: \"#33000000\"\n },\n accent: {\n default: \"#2E89FC\",\n subtle: \"#882E89FC\"\n },\n attention: {\n default: \"#cc3300\",\n subtle: \"#DDcc3300\"\n },\n good: {\n default: \"#028A02\",\n subtle: \"#DD027502\"\n },\n warning: {\n default: \"#e69500\",\n subtle: \"#DDe69500\"\n }\n }\n },\n emphasis: {\n backgroundColor: \"#08000000\",\n foregroundColors: {\n default: {\n default: \"#333333\",\n subtle: \"#EE333333\"\n },\n dark: {\n default: \"#000000\",\n subtle: \"#66000000\"\n },\n light: {\n default: \"#FFFFFF\",\n subtle: \"#33000000\"\n },\n accent: {\n default: \"#2E89FC\",\n subtle: \"#882E89FC\"\n },\n attention: {\n default: \"#cc3300\",\n subtle: \"#DDcc3300\"\n },\n good: {\n default: \"#028A02\",\n subtle: \"#DD027502\"\n },\n warning: {\n default: \"#e69500\",\n subtle: \"#DDe69500\"\n }\n }\n },\n accent: {\n backgroundColor: \"#C7DEF9\",\n foregroundColors: {\n default: {\n default: \"#333333\",\n subtle: \"#EE333333\"\n },\n dark: {\n default: \"#000000\",\n subtle: \"#66000000\"\n },\n light: {\n default: \"#FFFFFF\",\n subtle: \"#33000000\"\n },\n accent: {\n default: \"#2E89FC\",\n subtle: \"#882E89FC\"\n },\n attention: {\n default: \"#cc3300\",\n subtle: \"#DDcc3300\"\n },\n good: {\n default: \"#028A02\",\n subtle: \"#DD027502\"\n },\n warning: {\n default: \"#e69500\",\n subtle: \"#DDe69500\"\n }\n }\n },\n good: {\n backgroundColor: \"#CCFFCC\",\n foregroundColors: {\n default: {\n default: \"#333333\",\n subtle: \"#EE333333\"\n },\n dark: {\n default: \"#000000\",\n subtle: \"#66000000\"\n },\n light: {\n default: \"#FFFFFF\",\n subtle: \"#33000000\"\n },\n accent: {\n default: \"#2E89FC\",\n subtle: \"#882E89FC\"\n },\n attention: {\n default: \"#cc3300\",\n subtle: \"#DDcc3300\"\n },\n good: {\n default: \"#028A02\",\n subtle: \"#DD027502\"\n },\n warning: {\n default: \"#e69500\",\n subtle: \"#DDe69500\"\n }\n }\n },\n attention: {\n backgroundColor: \"#FFC5B2\",\n foregroundColors: {\n default: {\n default: \"#333333\",\n subtle: \"#EE333333\"\n },\n dark: {\n default: \"#000000\",\n subtle: \"#66000000\"\n },\n light: {\n default: \"#FFFFFF\",\n subtle: \"#33000000\"\n },\n accent: {\n default: \"#2E89FC\",\n subtle: \"#882E89FC\"\n },\n attention: {\n default: \"#cc3300\",\n subtle: \"#DDcc3300\"\n },\n good: {\n default: \"#028A02\",\n subtle: \"#DD027502\"\n },\n warning: {\n default: \"#e69500\",\n subtle: \"#DDe69500\"\n }\n }\n },\n warning: {\n backgroundColor: \"#FFE2B2\",\n foregroundColors: {\n default: {\n default: \"#333333\",\n subtle: \"#EE333333\"\n },\n dark: {\n default: \"#000000\",\n subtle: \"#66000000\"\n },\n light: {\n default: \"#FFFFFF\",\n subtle: \"#33000000\"\n },\n accent: {\n default: \"#2E89FC\",\n subtle: \"#882E89FC\"\n },\n attention: {\n default: \"#cc3300\",\n subtle: \"#DDcc3300\"\n },\n good: {\n default: \"#028A02\",\n subtle: \"#DD027502\"\n },\n warning: {\n default: \"#e69500\",\n subtle: \"#DDe69500\"\n }\n }\n }\n },\n inputs: {\n label: {\n requiredInputs: {\n color: Enums.TextColor.Accent,\n size: Enums.TextSize.ExtraLarge,\n weight: Enums.TextWeight.Bolder,\n isSubtle: true,\n suffix: \" (required)\",\n suffixColor: Enums.TextColor.Good\n },\n optionalInputs: {\n color: Enums.TextColor.Warning,\n size: Enums.TextSize.Medium,\n weight: Enums.TextWeight.Lighter,\n isSubtle: false\n }\n },\n errorMessage: {\n color: Enums.TextColor.Accent,\n size: Enums.TextSize.Small,\n weight: Enums.TextWeight.Bolder\n }\n },\n actions: {\n maxActions: 5,\n spacing: Enums.Spacing.Default,\n buttonSpacing: 10,\n showCard: {\n actionMode: Enums.ShowCardActionMode.Inline,\n inlineTopMargin: 16\n },\n actionsOrientation: Enums.Orientation.Horizontal,\n actionAlignment: Enums.ActionAlignment.Left\n },\n adaptiveCard: {\n allowCustomStyle: false\n },\n imageSet: {\n imageSize: Enums.Size.Medium,\n maxImageHeight: 100\n },\n factSet: {\n title: {\n color: Enums.TextColor.Default,\n size: Enums.TextSize.Default,\n isSubtle: false,\n weight: Enums.TextWeight.Bolder,\n wrap: true,\n maxWidth: 150,\n },\n value: {\n color: Enums.TextColor.Default,\n size: Enums.TextSize.Default,\n isSubtle: false,\n weight: Enums.TextWeight.Default,\n wrap: true,\n },\n spacing: 10\n }\n});\n//# sourceMappingURL=host-config.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GlobalRegistry = exports.CardObjectRegistry = void 0;\nvar serialization_1 = require(\"./serialization\");\nvar CardObjectRegistry = /** @class */ (function () {\n function CardObjectRegistry() {\n this._items = {};\n }\n CardObjectRegistry.prototype.findByName = function (typeName) {\n return this._items.hasOwnProperty(typeName) ? this._items[typeName] : undefined;\n };\n CardObjectRegistry.prototype.clear = function () {\n this._items = {};\n };\n CardObjectRegistry.prototype.copyTo = function (target) {\n var keys = Object.keys(this._items);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n var typeRegistration = this._items[key];\n target.register(typeRegistration.typeName, typeRegistration.objectType, typeRegistration.schemaVersion);\n }\n };\n CardObjectRegistry.prototype.register = function (typeName, objectType, schemaVersion) {\n if (schemaVersion === void 0) { schemaVersion = serialization_1.Versions.v1_0; }\n var registrationInfo = this.findByName(typeName);\n if (registrationInfo !== undefined) {\n registrationInfo.objectType = objectType;\n }\n else {\n registrationInfo = {\n typeName: typeName,\n objectType: objectType,\n schemaVersion: schemaVersion\n };\n }\n this._items[typeName] = registrationInfo;\n };\n CardObjectRegistry.prototype.unregister = function (typeName) {\n delete this._items[typeName];\n };\n CardObjectRegistry.prototype.createInstance = function (typeName, targetVersion) {\n var registrationInfo = this.findByName(typeName);\n return (registrationInfo && registrationInfo.schemaVersion.compareTo(targetVersion) <= 0) ? new registrationInfo.objectType() : undefined;\n };\n CardObjectRegistry.prototype.getItemCount = function () {\n return Object.keys(this._items).length;\n };\n CardObjectRegistry.prototype.getItemAt = function (index) {\n var _this = this;\n return Object.keys(this._items).map(function (e) { return _this._items[e]; })[index];\n };\n return CardObjectRegistry;\n}());\nexports.CardObjectRegistry = CardObjectRegistry;\nvar GlobalRegistry = /** @class */ (function () {\n function GlobalRegistry() {\n }\n GlobalRegistry.populateWithDefaultElements = function (registry) {\n registry.clear();\n GlobalRegistry.defaultElements.copyTo(registry);\n };\n GlobalRegistry.populateWithDefaultActions = function (registry) {\n registry.clear();\n GlobalRegistry.defaultActions.copyTo(registry);\n };\n Object.defineProperty(GlobalRegistry, \"elements\", {\n get: function () {\n if (!GlobalRegistry._elements) {\n GlobalRegistry._elements = new CardObjectRegistry();\n GlobalRegistry.populateWithDefaultElements(GlobalRegistry._elements);\n }\n return GlobalRegistry._elements;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(GlobalRegistry, \"actions\", {\n get: function () {\n if (!GlobalRegistry._actions) {\n GlobalRegistry._actions = new CardObjectRegistry();\n GlobalRegistry.populateWithDefaultActions(GlobalRegistry._actions);\n }\n return GlobalRegistry._actions;\n },\n enumerable: false,\n configurable: true\n });\n GlobalRegistry.reset = function () {\n GlobalRegistry._elements = undefined;\n GlobalRegistry._actions = undefined;\n };\n GlobalRegistry.defaultElements = new CardObjectRegistry();\n GlobalRegistry.defaultActions = new CardObjectRegistry();\n return GlobalRegistry;\n}());\nexports.GlobalRegistry = GlobalRegistry;\n//# sourceMappingURL=registry.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SerializableObject = exports.property = exports.SerializableObjectSchema = exports.CustomProperty = exports.SerializableObjectCollectionProperty = exports.SerializableObjectProperty = exports.EnumProperty = exports.ValueSetProperty = exports.StringArrayProperty = exports.PixelSizeProperty = exports.NumProperty = exports.BoolProperty = exports.StringProperty = exports.PropertyDefinition = exports.BaseSerializationContext = exports.isVersionLessOrEqual = exports.Versions = exports.Version = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar shared_1 = require(\"./shared\");\nvar Utils = require(\"./utils\");\nvar Enums = require(\"./enums\");\nvar strings_1 = require(\"./strings\");\nvar Version = /** @class */ (function () {\n function Version(major, minor, label) {\n if (major === void 0) { major = 1; }\n if (minor === void 0) { minor = 1; }\n this._isValid = true;\n this._major = major;\n this._minor = minor;\n this._label = label;\n }\n Version.parse = function (versionString, context) {\n if (!versionString) {\n return undefined;\n }\n var result = new Version();\n result._versionString = versionString;\n var regEx = /(\\d+).(\\d+)/gi;\n var matches = regEx.exec(versionString);\n if (matches != null && matches.length == 3) {\n result._major = parseInt(matches[1]);\n result._minor = parseInt(matches[2]);\n }\n else {\n result._isValid = false;\n }\n if (!result._isValid) {\n context.logParseEvent(undefined, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidVersionString(result._versionString));\n }\n return result;\n };\n Version.prototype.toString = function () {\n return !this._isValid ? this._versionString : this._major + \".\" + this._minor;\n };\n Version.prototype.toJSON = function () {\n return this.toString();\n };\n Version.prototype.compareTo = function (otherVersion) {\n if (!this.isValid || !otherVersion.isValid) {\n throw new Error(\"Cannot compare invalid version.\");\n }\n if (this.major > otherVersion.major) {\n return 1;\n }\n else if (this.major < otherVersion.major) {\n return -1;\n }\n else if (this.minor > otherVersion.minor) {\n return 1;\n }\n else if (this.minor < otherVersion.minor) {\n return -1;\n }\n return 0;\n };\n Object.defineProperty(Version.prototype, \"label\", {\n get: function () {\n return this._label ? this._label : this.toString();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Version.prototype, \"major\", {\n get: function () {\n return this._major;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Version.prototype, \"minor\", {\n get: function () {\n return this._minor;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Version.prototype, \"isValid\", {\n get: function () {\n return this._isValid;\n },\n enumerable: false,\n configurable: true\n });\n return Version;\n}());\nexports.Version = Version;\nvar Versions = /** @class */ (function () {\n function Versions() {\n }\n Versions.v1_0 = new Version(1, 0);\n Versions.v1_1 = new Version(1, 1);\n Versions.v1_2 = new Version(1, 2);\n Versions.v1_3 = new Version(1, 3);\n Versions.v1_4 = new Version(1, 4);\n Versions.v1_5 = new Version(1, 5);\n Versions.latest = Versions.v1_5;\n return Versions;\n}());\nexports.Versions = Versions;\nfunction isVersionLessOrEqual(version, targetVersion) {\n if (version instanceof Version) {\n if (targetVersion instanceof Version) {\n return targetVersion.compareTo(version) >= 0;\n }\n else {\n // Target version is *\n return true;\n }\n }\n else {\n // Version is *\n return true;\n }\n}\nexports.isVersionLessOrEqual = isVersionLessOrEqual;\nvar BaseSerializationContext = /** @class */ (function () {\n function BaseSerializationContext(targetVersion) {\n if (targetVersion === void 0) { targetVersion = Versions.latest; }\n this.targetVersion = targetVersion;\n this._validationEvents = [];\n }\n BaseSerializationContext.prototype.serializeValue = function (target, propertyName, propertyValue, defaultValue, forceDeleteIfNullOrDefault) {\n if (defaultValue === void 0) { defaultValue = undefined; }\n if (forceDeleteIfNullOrDefault === void 0) { forceDeleteIfNullOrDefault = false; }\n if (propertyValue === null || propertyValue === undefined || propertyValue === defaultValue) {\n if (!shared_1.GlobalSettings.enableFullJsonRoundTrip || forceDeleteIfNullOrDefault) {\n delete target[propertyName];\n }\n }\n else if (propertyValue === defaultValue) {\n delete target[propertyName];\n }\n else {\n target[propertyName] = propertyValue;\n }\n };\n BaseSerializationContext.prototype.serializeString = function (target, propertyName, propertyValue, defaultValue) {\n if (propertyValue === null || propertyValue === undefined || propertyValue === defaultValue) {\n delete target[propertyName];\n }\n else {\n target[propertyName] = propertyValue;\n }\n };\n BaseSerializationContext.prototype.serializeBool = function (target, propertyName, propertyValue, defaultValue) {\n if (propertyValue === null || propertyValue === undefined || propertyValue === defaultValue) {\n delete target[propertyName];\n }\n else {\n target[propertyName] = propertyValue;\n }\n };\n BaseSerializationContext.prototype.serializeNumber = function (target, propertyName, propertyValue, defaultValue) {\n if (propertyValue === null || propertyValue === undefined || propertyValue === defaultValue || isNaN(propertyValue)) {\n delete target[propertyName];\n }\n else {\n target[propertyName] = propertyValue;\n }\n };\n BaseSerializationContext.prototype.serializeEnum = function (enumType, target, propertyName, propertyValue, defaultValue) {\n if (defaultValue === void 0) { defaultValue = undefined; }\n if (propertyValue === null || propertyValue === undefined || propertyValue === defaultValue) {\n delete target[propertyName];\n }\n else {\n target[propertyName] = enumType[propertyValue];\n }\n };\n BaseSerializationContext.prototype.serializeArray = function (target, propertyName, propertyValue) {\n var items = [];\n if (propertyValue) {\n for (var _i = 0, propertyValue_1 = propertyValue; _i < propertyValue_1.length; _i++) {\n var item = propertyValue_1[_i];\n var serializedItem = undefined;\n if (item instanceof SerializableObject) {\n serializedItem = item.toJSON(this);\n }\n else if (item.toJSON) {\n serializedItem = item.toJSON();\n }\n else {\n serializedItem = item;\n }\n if (serializedItem !== undefined) {\n items.push(serializedItem);\n }\n }\n }\n if (items.length == 0) {\n if (target.hasOwnProperty(propertyName) && Array.isArray(target[propertyName])) {\n delete target[propertyName];\n }\n }\n else {\n this.serializeValue(target, propertyName, items);\n }\n };\n BaseSerializationContext.prototype.clearEvents = function () {\n this._validationEvents = [];\n };\n BaseSerializationContext.prototype.logEvent = function (source, phase, event, message) {\n this._validationEvents.push({\n source: source,\n phase: phase,\n event: event,\n message: message\n });\n };\n BaseSerializationContext.prototype.logParseEvent = function (source, event, message) {\n this.logEvent(source, Enums.ValidationPhase.Parse, event, message);\n };\n BaseSerializationContext.prototype.getEventAt = function (index) {\n return this._validationEvents[index];\n };\n Object.defineProperty(BaseSerializationContext.prototype, \"eventCount\", {\n get: function () {\n return this._validationEvents.length;\n },\n enumerable: false,\n configurable: true\n });\n return BaseSerializationContext;\n}());\nexports.BaseSerializationContext = BaseSerializationContext;\nvar SimpleSerializationContext = /** @class */ (function (_super) {\n __extends(SimpleSerializationContext, _super);\n function SimpleSerializationContext() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return SimpleSerializationContext;\n}(BaseSerializationContext));\nvar PropertyDefinition = /** @class */ (function () {\n function PropertyDefinition(targetVersion, name, defaultValue, onGetInitialValue) {\n this.targetVersion = targetVersion;\n this.name = name;\n this.defaultValue = defaultValue;\n this.onGetInitialValue = onGetInitialValue;\n this.isSerializationEnabled = true;\n this.sequentialNumber = PropertyDefinition._sequentialNumber;\n PropertyDefinition._sequentialNumber++;\n }\n PropertyDefinition.prototype.getInternalName = function () {\n return this.name;\n };\n PropertyDefinition.prototype.parse = function (sender, source, context) {\n return source[this.name];\n };\n PropertyDefinition.prototype.toJSON = function (sender, target, value, context) {\n context.serializeValue(target, this.name, value, this.defaultValue);\n };\n PropertyDefinition._sequentialNumber = 0;\n return PropertyDefinition;\n}());\nexports.PropertyDefinition = PropertyDefinition;\nvar StringProperty = /** @class */ (function (_super) {\n __extends(StringProperty, _super);\n function StringProperty(targetVersion, name, treatEmptyAsUndefined, regEx, defaultValue, onGetInitialValue) {\n if (treatEmptyAsUndefined === void 0) { treatEmptyAsUndefined = true; }\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.treatEmptyAsUndefined = treatEmptyAsUndefined;\n _this.regEx = regEx;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n return _this;\n }\n StringProperty.prototype.parse = function (sender, source, context) {\n var parsedValue = Utils.parseString(source[this.name], this.defaultValue);\n var isUndefined = parsedValue === undefined || (parsedValue === \"\" && this.treatEmptyAsUndefined);\n if (!isUndefined && this.regEx !== undefined) {\n var matches = this.regEx.exec(parsedValue);\n if (!matches) {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(parsedValue, this.name));\n return undefined;\n }\n }\n return parsedValue;\n };\n StringProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeString(target, this.name, value === \"\" && this.treatEmptyAsUndefined ? undefined : value, this.defaultValue);\n };\n return StringProperty;\n}(PropertyDefinition));\nexports.StringProperty = StringProperty;\nvar BoolProperty = /** @class */ (function (_super) {\n __extends(BoolProperty, _super);\n function BoolProperty(targetVersion, name, defaultValue, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n return _this;\n }\n BoolProperty.prototype.parse = function (sender, source, context) {\n return Utils.parseBool(source[this.name], this.defaultValue);\n };\n BoolProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeBool(target, this.name, value, this.defaultValue);\n };\n return BoolProperty;\n}(PropertyDefinition));\nexports.BoolProperty = BoolProperty;\nvar NumProperty = /** @class */ (function (_super) {\n __extends(NumProperty, _super);\n function NumProperty(targetVersion, name, defaultValue, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n return _this;\n }\n NumProperty.prototype.parse = function (sender, source, context) {\n return Utils.parseNumber(source[this.name], this.defaultValue);\n };\n NumProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeNumber(target, this.name, value, this.defaultValue);\n };\n return NumProperty;\n}(PropertyDefinition));\nexports.NumProperty = NumProperty;\nvar PixelSizeProperty = /** @class */ (function (_super) {\n __extends(PixelSizeProperty, _super);\n function PixelSizeProperty() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PixelSizeProperty.prototype.parse = function (sender, source, context) {\n var result = undefined;\n var value = source[this.name];\n if (typeof value === \"string\") {\n var isValid = false;\n try {\n var size = shared_1.SizeAndUnit.parse(value, true);\n if (size.unit == Enums.SizeUnit.Pixel) {\n result = size.physicalSize;\n isValid = true;\n }\n }\n catch (_a) {\n // Do nothing. A parse error is emitted below\n }\n if (!isValid) {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(source[this.name], \"minHeight\"));\n }\n }\n return result;\n };\n PixelSizeProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeValue(target, this.name, typeof value === \"number\" && !isNaN(value) ? value + \"px\" : undefined);\n };\n return PixelSizeProperty;\n}(PropertyDefinition));\nexports.PixelSizeProperty = PixelSizeProperty;\nvar StringArrayProperty = /** @class */ (function (_super) {\n __extends(StringArrayProperty, _super);\n function StringArrayProperty(targetVersion, name, defaultValue, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n return _this;\n }\n StringArrayProperty.prototype.parse = function (sender, source, context) {\n var sourceValue = source[this.name];\n if (sourceValue === undefined || !Array.isArray(sourceValue)) {\n return this.defaultValue;\n }\n var result = [];\n for (var _i = 0, sourceValue_1 = sourceValue; _i < sourceValue_1.length; _i++) {\n var value = sourceValue_1[_i];\n if (typeof value === \"string\") {\n result.push(value);\n }\n else {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, \"Invalid array value \\\"\" + value + \"\\\" of type \\\"\" + typeof value + \"\\\" ignored for \\\"\" + this.name + \"\\\".\");\n }\n }\n return result;\n };\n StringArrayProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeArray(target, this.name, value);\n };\n return StringArrayProperty;\n}(PropertyDefinition));\nexports.StringArrayProperty = StringArrayProperty;\nvar ValueSetProperty = /** @class */ (function (_super) {\n __extends(ValueSetProperty, _super);\n function ValueSetProperty(targetVersion, name, values, defaultValue, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.values = values;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n return _this;\n }\n ValueSetProperty.prototype.isValidValue = function (value, context) {\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\n var versionedValue = _a[_i];\n if (value.toLowerCase() === versionedValue.value.toLowerCase()) {\n var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;\n return targetVersion.compareTo(context.targetVersion) <= 0;\n }\n }\n return false;\n };\n ValueSetProperty.prototype.parse = function (sender, source, context) {\n var sourceValue = source[this.name];\n if (sourceValue === undefined) {\n return this.defaultValue;\n }\n if (typeof sourceValue === \"string\") {\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\n var versionedValue = _a[_i];\n if (sourceValue.toLowerCase() === versionedValue.value.toLowerCase()) {\n var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\n return versionedValue.value;\n }\n else {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(sourceValue, this.name, targetVersion.toString(), context.targetVersion.toString()));\n return this.defaultValue;\n }\n }\n }\n }\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));\n return this.defaultValue;\n };\n ValueSetProperty.prototype.toJSON = function (sender, target, value, context) {\n var invalidValue = false;\n if (value !== undefined) {\n invalidValue = true;\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\n var versionedValue = _a[_i];\n if (versionedValue.value === value) {\n var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\n invalidValue = false;\n break;\n }\n else {\n context.logEvent(sender, Enums.ValidationPhase.ToJSON, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(value, this.name, targetVersion.toString(), context.targetVersion.toString()));\n }\n }\n }\n }\n if (!invalidValue) {\n context.serializeValue(target, this.name, value, this.defaultValue, true);\n }\n };\n return ValueSetProperty;\n}(PropertyDefinition));\nexports.ValueSetProperty = ValueSetProperty;\nvar EnumProperty = /** @class */ (function (_super) {\n __extends(EnumProperty, _super);\n function EnumProperty(targetVersion, name, enumType, defaultValue, values, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.enumType = enumType;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n _this._values = [];\n if (!values) {\n for (var key in enumType) {\n var keyAsNumber = parseInt(key, 10);\n if (keyAsNumber >= 0) {\n _this._values.push({ value: keyAsNumber });\n }\n }\n }\n else {\n _this._values = values;\n }\n return _this;\n }\n EnumProperty.prototype.parse = function (sender, source, context) {\n var sourceValue = source[this.name];\n if (typeof sourceValue !== \"string\") {\n return this.defaultValue;\n }\n var enumValue = Utils.getEnumValueByName(this.enumType, sourceValue);\n if (enumValue !== undefined) {\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\n var versionedValue = _a[_i];\n if (versionedValue.value === enumValue) {\n var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\n return enumValue;\n }\n else {\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(sourceValue, this.name, targetVersion.toString(), context.targetVersion.toString()));\n return this.defaultValue;\n }\n }\n }\n }\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));\n return this.defaultValue;\n };\n EnumProperty.prototype.toJSON = function (sender, target, value, context) {\n var invalidValue = false;\n if (value !== undefined) {\n invalidValue = true;\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\n var versionedValue = _a[_i];\n if (versionedValue.value === value) {\n var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\n invalidValue = false;\n break;\n }\n else {\n context.logEvent(sender, Enums.ValidationPhase.ToJSON, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(value, this.name));\n }\n }\n }\n }\n if (!invalidValue) {\n context.serializeEnum(this.enumType, target, this.name, value, this.defaultValue);\n }\n };\n Object.defineProperty(EnumProperty.prototype, \"values\", {\n get: function () {\n return this._values;\n },\n enumerable: false,\n configurable: true\n });\n return EnumProperty;\n}(PropertyDefinition));\nexports.EnumProperty = EnumProperty;\nvar SerializableObjectProperty = /** @class */ (function (_super) {\n __extends(SerializableObjectProperty, _super);\n function SerializableObjectProperty(targetVersion, name, objectType, nullable, defaultValue) {\n if (nullable === void 0) { nullable = false; }\n var _this = _super.call(this, targetVersion, name, defaultValue, function (sender) { return _this.nullable ? undefined : new _this.objectType(); }) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.objectType = objectType;\n _this.nullable = nullable;\n return _this;\n }\n SerializableObjectProperty.prototype.parse = function (sender, source, context) {\n var sourceValue = source[this.name];\n if (sourceValue === undefined) {\n return this.onGetInitialValue ? this.onGetInitialValue(sender) : this.defaultValue;\n }\n var result = new this.objectType();\n result.parse(sourceValue, context);\n return result;\n };\n SerializableObjectProperty.prototype.toJSON = function (sender, target, value, context) {\n var serializedValue = undefined;\n if (value !== undefined && !value.hasAllDefaultValues()) {\n serializedValue = value.toJSON(context);\n }\n if (typeof serializedValue === \"object\" && Object.keys(serializedValue).length === 0) {\n serializedValue = undefined;\n }\n context.serializeValue(target, this.name, serializedValue, this.defaultValue, true);\n };\n return SerializableObjectProperty;\n}(PropertyDefinition));\nexports.SerializableObjectProperty = SerializableObjectProperty;\nvar SerializableObjectCollectionProperty = /** @class */ (function (_super) {\n __extends(SerializableObjectCollectionProperty, _super);\n function SerializableObjectCollectionProperty(targetVersion, name, objectType, onItemAdded) {\n var _this = _super.call(this, targetVersion, name, undefined, function (sender) { return []; }) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.objectType = objectType;\n _this.onItemAdded = onItemAdded;\n return _this;\n }\n SerializableObjectCollectionProperty.prototype.parse = function (sender, source, context) {\n var result = [];\n var sourceCollection = source[this.name];\n if (Array.isArray(sourceCollection)) {\n for (var _i = 0, sourceCollection_1 = sourceCollection; _i < sourceCollection_1.length; _i++) {\n var sourceItem = sourceCollection_1[_i];\n var item = new this.objectType();\n item.parse(sourceItem, context);\n result.push(item);\n if (this.onItemAdded) {\n this.onItemAdded(sender, item);\n }\n }\n }\n return result.length > 0 ? result : (this.onGetInitialValue ? this.onGetInitialValue(sender) : undefined);\n };\n SerializableObjectCollectionProperty.prototype.toJSON = function (sender, target, value, context) {\n context.serializeArray(target, this.name, value);\n };\n return SerializableObjectCollectionProperty;\n}(PropertyDefinition));\nexports.SerializableObjectCollectionProperty = SerializableObjectCollectionProperty;\nvar CustomProperty = /** @class */ (function (_super) {\n __extends(CustomProperty, _super);\n function CustomProperty(targetVersion, name, onParse, onToJSON, defaultValue, onGetInitialValue) {\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\n _this.targetVersion = targetVersion;\n _this.name = name;\n _this.onParse = onParse;\n _this.onToJSON = onToJSON;\n _this.defaultValue = defaultValue;\n _this.onGetInitialValue = onGetInitialValue;\n if (!_this.onParse) {\n throw new Error(\"CustomPropertyDefinition instances must have an onParse handler.\");\n }\n if (!_this.onToJSON) {\n throw new Error(\"CustomPropertyDefinition instances must have an onToJSON handler.\");\n }\n return _this;\n }\n CustomProperty.prototype.parse = function (sender, source, context) {\n return this.onParse(sender, this, source, context);\n };\n CustomProperty.prototype.toJSON = function (sender, target, value, context) {\n this.onToJSON(sender, this, target, value, context);\n };\n return CustomProperty;\n}(PropertyDefinition));\nexports.CustomProperty = CustomProperty;\nvar SerializableObjectSchema = /** @class */ (function () {\n function SerializableObjectSchema() {\n this._properties = [];\n }\n SerializableObjectSchema.prototype.indexOf = function (property) {\n for (var i = 0; i < this._properties.length; i++) {\n if (this._properties[i] === property) {\n return i;\n }\n }\n return -1;\n };\n SerializableObjectSchema.prototype.add = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n for (var i = 0; i < properties.length; i++) {\n if (this.indexOf(properties[i]) === -1) {\n this._properties.push(properties[i]);\n }\n }\n };\n SerializableObjectSchema.prototype.remove = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n for (var _a = 0, properties_1 = properties; _a < properties_1.length; _a++) {\n var property_1 = properties_1[_a];\n while (true) {\n var index = this.indexOf(property_1);\n if (index >= 0) {\n this._properties.splice(index, 1);\n }\n else {\n break;\n }\n }\n }\n };\n SerializableObjectSchema.prototype.getItemAt = function (index) {\n return this._properties[index];\n };\n SerializableObjectSchema.prototype.getCount = function () {\n return this._properties.length;\n };\n return SerializableObjectSchema;\n}());\nexports.SerializableObjectSchema = SerializableObjectSchema;\n// This is a decorator function, used to map SerializableObject descendant class members to\n// schema properties\nfunction property(property) {\n return function (target, propertyKey) {\n var descriptor = Object.getOwnPropertyDescriptor(target, propertyKey) || {};\n if (!descriptor.get && !descriptor.set) {\n descriptor.get = function () { return this.getValue(property); };\n descriptor.set = function (value) { this.setValue(property, value); };\n Object.defineProperty(target, propertyKey, descriptor);\n }\n };\n}\nexports.property = property;\nvar SerializableObject = /** @class */ (function () {\n function SerializableObject() {\n this._propertyBag = {};\n this._rawProperties = {};\n this.maxVersion = SerializableObject.defaultMaxVersion;\n var s = this.getSchema();\n for (var i = 0; i < s.getCount(); i++) {\n var property_2 = s.getItemAt(i);\n if (property_2.onGetInitialValue) {\n this.setValue(property_2, property_2.onGetInitialValue(this));\n }\n }\n }\n SerializableObject.prototype.getDefaultSerializationContext = function () {\n return new SimpleSerializationContext();\n };\n SerializableObject.prototype.populateSchema = function (schema) {\n var ctor = this.constructor;\n var properties = [];\n for (var propertyName in ctor) {\n try {\n var propertyValue = ctor[propertyName];\n if (propertyValue instanceof PropertyDefinition) {\n properties.push(propertyValue);\n }\n }\n catch (_a) {\n // If a property happens to have a getter function and\n // it throws an exception, we need to catch it here\n }\n }\n if (properties.length > 0) {\n var sortedProperties = properties.sort(function (p1, p2) {\n if (p1.sequentialNumber > p2.sequentialNumber) {\n return 1;\n }\n else if (p1.sequentialNumber < p2.sequentialNumber) {\n return -1;\n }\n return 0;\n });\n schema.add.apply(schema, sortedProperties);\n }\n if (SerializableObject.onRegisterCustomProperties) {\n SerializableObject.onRegisterCustomProperties(this, schema);\n }\n };\n SerializableObject.prototype.getValue = function (property) {\n return this._propertyBag.hasOwnProperty(property.getInternalName()) ? this._propertyBag[property.getInternalName()] : property.defaultValue;\n };\n SerializableObject.prototype.setValue = function (property, value) {\n if (value === undefined || value === null) {\n delete this._propertyBag[property.getInternalName()];\n }\n else {\n this._propertyBag[property.getInternalName()] = value;\n }\n };\n SerializableObject.prototype.internalParse = function (source, context) {\n this._propertyBag = {};\n this._rawProperties = shared_1.GlobalSettings.enableFullJsonRoundTrip ? (source ? source : {}) : {};\n if (source) {\n var s = this.getSchema();\n for (var i = 0; i < s.getCount(); i++) {\n var property_3 = s.getItemAt(i);\n if (property_3.isSerializationEnabled) {\n var propertyValue = property_3.onGetInitialValue ? property_3.onGetInitialValue(this) : undefined;\n if (source.hasOwnProperty(property_3.name)) {\n if (property_3.targetVersion.compareTo(context.targetVersion) <= 0) {\n propertyValue = property_3.parse(this, source, context);\n }\n else {\n context.logParseEvent(this, Enums.ValidationEvent.UnsupportedProperty, strings_1.Strings.errors.propertyNotSupported(property_3.name, property_3.targetVersion.toString(), context.targetVersion.toString()));\n }\n }\n this.setValue(property_3, propertyValue);\n }\n }\n }\n else {\n this.resetDefaultValues();\n }\n };\n SerializableObject.prototype.internalToJSON = function (target, context) {\n var s = this.getSchema();\n var serializedProperties = [];\n for (var i = 0; i < s.getCount(); i++) {\n var property_4 = s.getItemAt(i);\n // Avoid serializing the same property multiple times. This is necessary\n // because some property definitions map to the same underlying schema\n // property\n if (property_4.isSerializationEnabled && property_4.targetVersion.compareTo(context.targetVersion) <= 0 && serializedProperties.indexOf(property_4.name) === -1) {\n property_4.toJSON(this, target, this.getValue(property_4), context);\n serializedProperties.push(property_4.name);\n }\n }\n };\n SerializableObject.prototype.shouldSerialize = function (context) {\n return true;\n };\n SerializableObject.prototype.parse = function (source, context) {\n this.internalParse(source, context ? context : new SimpleSerializationContext());\n };\n SerializableObject.prototype.toJSON = function (context) {\n var effectiveContext;\n if (context && context instanceof BaseSerializationContext) {\n effectiveContext = context;\n }\n else {\n effectiveContext = this.getDefaultSerializationContext();\n effectiveContext.toJSONOriginalParam = context;\n }\n if (this.shouldSerialize(effectiveContext)) {\n var result = void 0;\n if (shared_1.GlobalSettings.enableFullJsonRoundTrip && this._rawProperties && typeof this._rawProperties === \"object\") {\n result = this._rawProperties;\n }\n else {\n result = {};\n }\n this.internalToJSON(result, effectiveContext);\n return result;\n }\n else {\n return undefined;\n }\n };\n SerializableObject.prototype.hasDefaultValue = function (property) {\n return this.getValue(property) === property.defaultValue;\n };\n SerializableObject.prototype.hasAllDefaultValues = function () {\n var s = this.getSchema();\n for (var i = 0; i < s.getCount(); i++) {\n var property_5 = s.getItemAt(i);\n if (!this.hasDefaultValue(property_5)) {\n return false;\n }\n }\n return true;\n };\n SerializableObject.prototype.resetDefaultValues = function () {\n var s = this.getSchema();\n for (var i = 0; i < s.getCount(); i++) {\n var property_6 = s.getItemAt(i);\n this.setValue(property_6, property_6.defaultValue);\n }\n };\n SerializableObject.prototype.setCustomProperty = function (name, value) {\n var shouldDeleteProperty = (typeof value === \"string\" && !value) || value === undefined || value === null;\n if (shouldDeleteProperty) {\n delete this._rawProperties[name];\n }\n else {\n this._rawProperties[name] = value;\n }\n };\n SerializableObject.prototype.getCustomProperty = function (name) {\n return this._rawProperties[name];\n };\n SerializableObject.prototype.getSchema = function () {\n var schema = SerializableObject._schemaCache[this.getSchemaKey()];\n if (!schema) {\n schema = new SerializableObjectSchema();\n this.populateSchema(schema);\n SerializableObject._schemaCache[this.getSchemaKey()] = schema;\n }\n return schema;\n };\n SerializableObject.defaultMaxVersion = Versions.latest;\n SerializableObject._schemaCache = {};\n return SerializableObject;\n}());\nexports.SerializableObject = SerializableObject;\n//# sourceMappingURL=serialization.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UUID = exports.SizeAndUnit = exports.PaddingDefinition = exports.SpacingDefinition = exports.StringWithSubstitutions = exports.ContentTypes = exports.GlobalSettings = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Enums = require(\"./enums\");\nvar GlobalSettings = /** @class */ (function () {\n function GlobalSettings() {\n }\n GlobalSettings.useAdvancedTextBlockTruncation = true;\n GlobalSettings.useAdvancedCardBottomTruncation = false;\n GlobalSettings.useMarkdownInRadioButtonAndCheckbox = true;\n GlobalSettings.allowMarkForTextHighlighting = false;\n GlobalSettings.alwaysBleedSeparators = false;\n GlobalSettings.enableFullJsonRoundTrip = false;\n GlobalSettings.displayInputValidationErrors = true;\n GlobalSettings.allowPreProcessingPropertyValues = false;\n GlobalSettings.setTabIndexAtCardRoot = true;\n GlobalSettings.enableFallback = true;\n GlobalSettings.useWebkitLineClamp = true;\n GlobalSettings.allowMoreThanMaxActionsInOverflowMenu = false;\n GlobalSettings.applets = {\n logEnabled: true,\n logLevel: Enums.LogLevel.Error,\n maximumRetryAttempts: 3,\n defaultTimeBetweenRetryAttempts: 3000,\n authPromptWidth: 400,\n authPromptHeight: 600,\n refresh: {\n mode: Enums.RefreshMode.Manual,\n timeBetweenAutomaticRefreshes: 3000,\n maximumConsecutiveAutomaticRefreshes: 3,\n allowManualRefreshesAfterAutomaticRefreshes: true\n }\n };\n return GlobalSettings;\n}());\nexports.GlobalSettings = GlobalSettings;\nexports.ContentTypes = {\n applicationJson: \"application/json\",\n applicationXWwwFormUrlencoded: \"application/x-www-form-urlencoded\"\n};\nvar StringWithSubstitutions = /** @class */ (function () {\n function StringWithSubstitutions() {\n this._isProcessed = false;\n }\n StringWithSubstitutions.prototype.getReferencedInputs = function (inputs, referencedInputs) {\n if (!referencedInputs) {\n throw new Error(\"The referencedInputs parameter cannot be null.\");\n }\n for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {\n var input = inputs_1[_i];\n var matches = new RegExp(\"\\\\{{2}(\" + input.id + \").value\\\\}{2}\", \"gi\").exec(this._original);\n if (matches != null && input.id) {\n referencedInputs[input.id] = input;\n }\n }\n };\n StringWithSubstitutions.prototype.substituteInputValues = function (inputs, contentType) {\n this._processed = this._original;\n if (this._original) {\n var regEx = /\\{{2}([a-z0-9_$@]+).value\\}{2}/gi;\n var matches = void 0;\n while ((matches = regEx.exec(this._original)) !== null) {\n for (var _i = 0, _a = Object.keys(inputs); _i < _a.length; _i++) {\n var key = _a[_i];\n if (key.toLowerCase() == matches[1].toLowerCase()) {\n var matchedInput = inputs[key];\n var valueForReplace = \"\";\n if (matchedInput.value) {\n valueForReplace = matchedInput.value;\n }\n if (contentType === exports.ContentTypes.applicationJson) {\n valueForReplace = JSON.stringify(valueForReplace);\n valueForReplace = valueForReplace.slice(1, -1);\n }\n else if (contentType === exports.ContentTypes.applicationXWwwFormUrlencoded) {\n valueForReplace = encodeURIComponent(valueForReplace);\n }\n this._processed = this._processed.replace(matches[0], valueForReplace);\n break;\n }\n }\n }\n }\n this._isProcessed = true;\n };\n StringWithSubstitutions.prototype.getOriginal = function () {\n return this._original;\n };\n StringWithSubstitutions.prototype.get = function () {\n if (!this._isProcessed) {\n return this._original;\n }\n else {\n return this._processed;\n }\n };\n StringWithSubstitutions.prototype.set = function (value) {\n this._original = value;\n this._isProcessed = false;\n };\n return StringWithSubstitutions;\n}());\nexports.StringWithSubstitutions = StringWithSubstitutions;\nvar SpacingDefinition = /** @class */ (function () {\n function SpacingDefinition(top, right, bottom, left) {\n if (top === void 0) { top = 0; }\n if (right === void 0) { right = 0; }\n if (bottom === void 0) { bottom = 0; }\n if (left === void 0) { left = 0; }\n this.left = 0;\n this.top = 0;\n this.right = 0;\n this.bottom = 0;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n this.left = left;\n }\n return SpacingDefinition;\n}());\nexports.SpacingDefinition = SpacingDefinition;\nvar PaddingDefinition = /** @class */ (function () {\n function PaddingDefinition(top, right, bottom, left) {\n if (top === void 0) { top = Enums.Spacing.None; }\n if (right === void 0) { right = Enums.Spacing.None; }\n if (bottom === void 0) { bottom = Enums.Spacing.None; }\n if (left === void 0) { left = Enums.Spacing.None; }\n this.top = Enums.Spacing.None;\n this.right = Enums.Spacing.None;\n this.bottom = Enums.Spacing.None;\n this.left = Enums.Spacing.None;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n this.left = left;\n }\n return PaddingDefinition;\n}());\nexports.PaddingDefinition = PaddingDefinition;\nvar SizeAndUnit = /** @class */ (function () {\n function SizeAndUnit(physicalSize, unit) {\n this.physicalSize = physicalSize;\n this.unit = unit;\n }\n SizeAndUnit.parse = function (input, requireUnitSpecifier) {\n if (requireUnitSpecifier === void 0) { requireUnitSpecifier = false; }\n var result = new SizeAndUnit(0, Enums.SizeUnit.Weight);\n if (typeof input === \"number\") {\n result.physicalSize = input;\n return result;\n }\n else if (typeof input === \"string\") {\n var regExp = /^([0-9]+)(px|\\*)?$/g;\n var matches = regExp.exec(input);\n var expectedMatchCount = requireUnitSpecifier ? 3 : 2;\n if (matches && matches.length >= expectedMatchCount) {\n result.physicalSize = parseInt(matches[1]);\n if (matches.length == 3) {\n if (matches[2] == \"px\") {\n result.unit = Enums.SizeUnit.Pixel;\n }\n }\n return result;\n }\n }\n throw new Error(\"Invalid size: \" + input);\n };\n return SizeAndUnit;\n}());\nexports.SizeAndUnit = SizeAndUnit;\n/**\n * Fast UUID generator, RFC4122 version 4 compliant.\n * @author Jeff Ward (jcward.com).\n * @license MIT license\n * @link http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\n **/\nvar UUID = /** @class */ (function () {\n function UUID() {\n }\n UUID.generate = function () {\n var d0 = Math.random() * 0xffffffff | 0;\n var d1 = Math.random() * 0xffffffff | 0;\n var d2 = Math.random() * 0xffffffff | 0;\n var d3 = Math.random() * 0xffffffff | 0;\n return UUID.lut[d0 & 0xff] + UUID.lut[d0 >> 8 & 0xff] + UUID.lut[d0 >> 16 & 0xff] + UUID.lut[d0 >> 24 & 0xff] + '-' +\n UUID.lut[d1 & 0xff] + UUID.lut[d1 >> 8 & 0xff] + '-' + UUID.lut[d1 >> 16 & 0x0f | 0x40] + UUID.lut[d1 >> 24 & 0xff] + '-' +\n UUID.lut[d2 & 0x3f | 0x80] + UUID.lut[d2 >> 8 & 0xff] + '-' + UUID.lut[d2 >> 16 & 0xff] + UUID.lut[d2 >> 24 & 0xff] +\n UUID.lut[d3 & 0xff] + UUID.lut[d3 >> 8 & 0xff] + UUID.lut[d3 >> 16 & 0xff] + UUID.lut[d3 >> 24 & 0xff];\n };\n UUID.initialize = function () {\n for (var i = 0; i < 256; i++) {\n UUID.lut[i] = (i < 16 ? '0' : '') + i.toString(16);\n }\n };\n UUID.lut = [];\n return UUID;\n}());\nexports.UUID = UUID;\nUUID.initialize();\n//# sourceMappingURL=shared.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Strings = void 0;\nvar Strings = /** @class */ (function () {\n function Strings() {\n }\n Strings.errors = {\n unknownElementType: function (typeName) { return \"Unknown element type \\\"\" + typeName + \"\\\". Fallback will be used if present.\"; },\n unknownActionType: function (typeName) { return \"Unknown action type \\\"\" + typeName + \"\\\". Fallback will be used if present.\"; },\n elementTypeNotAllowed: function (typeName) { return \"Element type \\\"\" + typeName + \"\\\" is not allowed in this context.\"; },\n actionTypeNotAllowed: function (typeName) { return \"Action type \\\"\" + typeName + \"\\\" is not allowed in this context.\"; },\n invalidPropertyValue: function (value, propertyName) { return \"Invalid value \\\"\" + value + \"\\\" for property \\\"\" + propertyName + \"\\\".\"; },\n showCardMustHaveCard: function () { return \"\\\"An Action.ShowCard must have its \\\"card\\\" property set to a valid AdaptiveCard object.\"; },\n invalidColumnWidth: function (invalidWidth) { return \"Invalid column width \\\"\" + invalidWidth + \"\\\" - defaulting to \\\"auto\\\".\"; },\n invalidCardVersion: function (defaultingToVersion) { return \"Invalid card version. Defaulting to \\\"\" + defaultingToVersion + \"\\\".\"; },\n invalidVersionString: function (versionString) { return \"Invalid version string \\\"\" + versionString + \"\\\".\"; },\n propertyValueNotSupported: function (value, propertyName, supportedInVersion, versionUsed) { return \"Value \\\"\" + value + \"\\\" for property \\\"\" + propertyName + \"\\\" is supported in version \" + supportedInVersion + \", but you are using version \" + versionUsed + \".\"; },\n propertyNotSupported: function (propertyName, supportedInVersion, versionUsed) { return \"Property \\\"\" + propertyName + \"\\\" is supported in version \" + supportedInVersion + \", but you are using version \" + versionUsed + \".\"; },\n indexOutOfRange: function (index) { return \"Index out of range (\" + index + \").\"; },\n elementCannotBeUsedAsInline: function () { return \"RichTextBlock.addInline: the specified card element cannot be used as a RichTextBlock inline.\"; },\n inlineAlreadyParented: function () { return \"RichTextBlock.addInline: the specified inline already belongs to another RichTextBlock.\"; },\n interactivityNotAllowed: function () { return \"Interactivity is not allowed.\"; },\n inputsMustHaveUniqueId: function () { return \"All inputs must have a unique Id.\"; },\n choiceSetMustHaveAtLeastOneChoice: function () { return \"An Input.ChoiceSet must have at least one choice defined.\"; },\n choiceSetChoicesMustHaveTitleAndValue: function () { return \"All choices in an Input.ChoiceSet must have their title and value properties set.\"; },\n propertyMustBeSet: function (propertyName) { return \"Property \\\"\" + propertyName + \"\\\" must be set.\"; },\n actionHttpHeadersMustHaveNameAndValue: function () { return \"All headers of an Action.Http must have their name and value properties set.\"; },\n tooManyActions: function (maximumActions) { return \"Maximum number of actions exceeded (\" + maximumActions + \").\"; },\n columnAlreadyBelongsToAnotherSet: function () { return \"This column already belongs to another ColumnSet.\"; },\n invalidCardType: function () { return \"Invalid or missing card type. Make sure the card's type property is set to \\\"AdaptiveCard\\\".\"; },\n unsupportedCardVersion: function (version, maxSupportedVersion) { return \"The specified card version (\" + version + \") is not supported. The maximum supported card version is \" + maxSupportedVersion + \".\"; },\n duplicateId: function (id) { return \"Duplicate Id \\\"\" + id + \"\\\".\"; },\n markdownProcessingNotEnabled: function () { return \"Markdown processing isn't enabled. Please see https://www.npmjs.com/package/adaptivecards#supporting-markdown\"; },\n processMarkdownEventRemoved: function () { return \"The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead.\"; },\n elementAlreadyParented: function () { return \"The element already belongs to another container.\"; },\n actionAlreadyParented: function () { return \"The action already belongs to another element.\"; },\n elementTypeNotStandalone: function (typeName) { return \"Elements of type \" + typeName + \" cannot be used as standalone elements.\"; }\n };\n Strings.magicCodeInputCard = {\n tryAgain: function () { return \"That didn't work... let's try again.\"; },\n pleaseLogin: function () { return \"Please login in the popup. You will obtain a magic code. Paste that code below and select \\\"Submit\\\"\"; },\n enterMagicCode: function () { return \"Enter magic code\"; },\n pleaseEnterMagicCodeYouReceived: function () { return \"Please enter the magic code you received.\"; },\n submit: function () { return \"Submit\"; },\n cancel: function () { return \"Cancel\"; },\n somethingWentWrong: function () { return \"Something went wrong. This action can't be handled.\"; },\n authenticationFailed: function () { return \"Authentication failed.\"; }\n };\n Strings.runtime = {\n automaticRefreshPaused: function () { return \"Automatic refresh paused.\"; },\n clckToRestartAutomaticRefresh: function () { return \"Click to restart.\"; },\n refreshThisCard: function () { return \"Refresh this card\"; }\n };\n Strings.hints = {\n dontUseWeightedAndStrecthedColumnsInSameSet: function () { return \"It is not recommended to use weighted and stretched columns in the same ColumnSet, because in such a situation stretched columns will always get the minimum amount of space.\"; }\n };\n Strings.defaults = {\n inlineActionTitle: function () { return \"Inline Action\"; },\n overflowButtonText: function () { return \"...\"; },\n mediaPlayerAriaLabel: function () { return \"Media content\"; },\n mediaPlayerPlayMedia: function () { return \"Play media\"; }\n };\n return Strings;\n}());\nexports.Strings = Strings;\n//# sourceMappingURL=strings.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Table = exports.TableRow = exports.TableCell = exports.StylableContainer = exports.TableColumnDefinition = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar card_elements_1 = require(\"./card-elements\");\nvar enums_1 = require(\"./enums\");\nvar registry_1 = require(\"./registry\");\nvar serialization_1 = require(\"./serialization\");\nvar shared_1 = require(\"./shared\");\nvar strings_1 = require(\"./strings\");\nvar utils_1 = require(\"./utils\");\nvar TableColumnDefinition = /** @class */ (function (_super) {\n __extends(TableColumnDefinition, _super);\n function TableColumnDefinition() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.width = new shared_1.SizeAndUnit(1, enums_1.SizeUnit.Weight);\n return _this;\n }\n TableColumnDefinition.prototype.getSchemaKey = function () {\n return \"ColumnDefinition\";\n };\n TableColumnDefinition.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"horizontalCellContentAlignment\", enums_1.HorizontalAlignment);\n TableColumnDefinition.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"verticalCellContentAlignment\", enums_1.VerticalAlignment);\n TableColumnDefinition.widthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_5, \"width\", function (sender, property, source, context) {\n var result = property.defaultValue;\n var value = source[property.name];\n var invalidWidth = false;\n if (typeof value === \"number\" && !isNaN(value)) {\n result = new shared_1.SizeAndUnit(value, enums_1.SizeUnit.Weight);\n }\n else if (typeof value === \"string\") {\n try {\n result = shared_1.SizeAndUnit.parse(value);\n }\n catch (e) {\n invalidWidth = true;\n }\n }\n else {\n invalidWidth = true;\n }\n if (invalidWidth) {\n context.logParseEvent(sender, enums_1.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidColumnWidth(value));\n }\n return result;\n }, function (sender, property, target, value, context) {\n if (value.unit === enums_1.SizeUnit.Pixel) {\n context.serializeValue(target, \"width\", value.physicalSize + \"px\");\n }\n else {\n context.serializeNumber(target, \"width\", value.physicalSize);\n }\n }, new shared_1.SizeAndUnit(1, enums_1.SizeUnit.Weight));\n __decorate([\n serialization_1.property(TableColumnDefinition.horizontalCellContentAlignmentProperty)\n ], TableColumnDefinition.prototype, \"horizontalCellContentAlignment\", void 0);\n __decorate([\n serialization_1.property(TableColumnDefinition.verticalCellContentAlignmentProperty)\n ], TableColumnDefinition.prototype, \"verticalCellContentAlignment\", void 0);\n __decorate([\n serialization_1.property(TableColumnDefinition.widthProperty)\n ], TableColumnDefinition.prototype, \"width\", void 0);\n return TableColumnDefinition;\n}(serialization_1.SerializableObject));\nexports.TableColumnDefinition = TableColumnDefinition;\nvar StylableContainer = /** @class */ (function (_super) {\n __extends(StylableContainer, _super);\n function StylableContainer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._items = [];\n return _this;\n }\n StylableContainer.prototype.parseItem = function (source, context) {\n var _this = this;\n return context.parseCardObject(this, source, [], // Forbidden types not supported for elements for now\n !this.isDesignMode(), function (typeName) {\n return _this.createItemInstance(typeName);\n }, function (typeName, errorType) {\n context.logParseEvent(undefined, enums_1.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\n });\n };\n StylableContainer.prototype.internalAddItem = function (item) {\n if (!item.parent) {\n this._items.push(item);\n item.setParent(this);\n }\n else {\n throw new Error(strings_1.Strings.errors.elementAlreadyParented());\n }\n };\n StylableContainer.prototype.internalRemoveItem = function (item) {\n var itemIndex = this._items.indexOf(item);\n if (itemIndex >= 0) {\n this._items.splice(itemIndex, 1);\n item.setParent(undefined);\n this.updateLayout();\n return true;\n }\n return false;\n };\n StylableContainer.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this._items = [];\n var items = source[this.getCollectionPropertyName()];\n if (Array.isArray(items)) {\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\n var item = items_1[_i];\n var instance = this.parseItem(item, context);\n if (instance) {\n this._items.push(instance);\n }\n }\n }\n };\n StylableContainer.prototype.internalToJSON = function (target, context) {\n _super.prototype.internalToJSON.call(this, target, context);\n context.serializeArray(target, this.getCollectionPropertyName(), this._items);\n };\n StylableContainer.prototype.removeItem = function (item) {\n return this.internalRemoveItem(item);\n };\n StylableContainer.prototype.getItemCount = function () {\n return this._items.length;\n };\n StylableContainer.prototype.getItemAt = function (index) {\n return this._items[index];\n };\n StylableContainer.prototype.getFirstVisibleRenderedItem = function () {\n return this.getItemCount() > 0 ? this.getItemAt(0) : undefined;\n };\n StylableContainer.prototype.getLastVisibleRenderedItem = function () {\n return this.getItemCount() > 0 ? this.getItemAt(this.getItemCount() - 1) : undefined;\n };\n return StylableContainer;\n}(card_elements_1.StylableCardElementContainer));\nexports.StylableContainer = StylableContainer;\nvar TableCell = /** @class */ (function (_super) {\n __extends(TableCell, _super);\n function TableCell() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._columnIndex = -1;\n _this._cellType = \"data\";\n return _this;\n }\n TableCell.prototype.getHasBorder = function () {\n return this.parentRow.parentTable.showGridLines;\n };\n TableCell.prototype.applyBorder = function () {\n if (this.renderedElement && this.getHasBorder()) {\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.parentRow.parentTable.gridStyle);\n if (styleDefinition.borderColor) {\n var borderColor = utils_1.stringToCssColor(styleDefinition.borderColor);\n if (borderColor) {\n this.renderedElement.style.borderRight = \"1px solid \" + borderColor;\n this.renderedElement.style.borderBottom = \"1px solid \" + borderColor;\n }\n }\n }\n };\n TableCell.prototype.getDefaultPadding = function () {\n return this.getHasBackground() || this.getHasBorder() ?\n new shared_1.PaddingDefinition(enums_1.Spacing.Small, enums_1.Spacing.Small, enums_1.Spacing.Small, enums_1.Spacing.Small) : _super.prototype.getDefaultPadding.call(this);\n };\n TableCell.prototype.internalRender = function () {\n var cellElement = _super.prototype.internalRender.call(this);\n if (cellElement) {\n cellElement.setAttribute(\"role\", this.cellType === \"data\" ? \"cell\" : \"columnheader\");\n cellElement.style.minWidth = \"0\";\n if (this.cellType === \"header\") {\n cellElement.setAttribute(\"scope\", \"col\");\n }\n }\n return cellElement;\n };\n TableCell.prototype.shouldSerialize = function (context) {\n return true;\n };\n TableCell.prototype.getJsonTypeName = function () {\n return \"TableCell\";\n };\n TableCell.prototype.getEffectiveTextStyleDefinition = function () {\n if (this.cellType === \"header\") {\n return this.hostConfig.textStyles.columnHeader;\n }\n return _super.prototype.getEffectiveTextStyleDefinition.call(this);\n };\n TableCell.prototype.getEffectiveHorizontalAlignment = function () {\n if (this.horizontalAlignment !== undefined) {\n return this.horizontalAlignment;\n }\n if (this.parentRow.horizontalCellContentAlignment !== undefined) {\n return this.parentRow.horizontalCellContentAlignment;\n }\n if (this.columnIndex >= 0) {\n var horizontalAlignment = this.parentRow.parentTable.getColumnAt(this.columnIndex).horizontalCellContentAlignment;\n if (horizontalAlignment !== undefined) {\n return horizontalAlignment;\n }\n }\n if (this.parentRow.parentTable.horizontalCellContentAlignment !== undefined) {\n return this.parentRow.parentTable.horizontalCellContentAlignment;\n }\n return _super.prototype.getEffectiveHorizontalAlignment.call(this);\n };\n TableCell.prototype.getEffectiveVerticalContentAlignment = function () {\n if (this.verticalContentAlignment !== undefined) {\n return this.verticalContentAlignment;\n }\n if (this.parentRow.verticalCellContentAlignment !== undefined) {\n return this.parentRow.verticalCellContentAlignment;\n }\n if (this.columnIndex >= 0) {\n var verticalAlignment = this.parentRow.parentTable.getColumnAt(this.columnIndex).verticalCellContentAlignment;\n if (verticalAlignment !== undefined) {\n return verticalAlignment;\n }\n }\n if (this.parentRow.parentTable.verticalCellContentAlignment !== undefined) {\n return this.parentRow.parentTable.verticalCellContentAlignment;\n }\n return _super.prototype.getEffectiveVerticalContentAlignment.call(this);\n };\n Object.defineProperty(TableCell.prototype, \"columnIndex\", {\n get: function () {\n return this._columnIndex;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableCell.prototype, \"cellType\", {\n get: function () {\n return this._cellType;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableCell.prototype, \"parentRow\", {\n get: function () {\n return this.parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableCell.prototype, \"isStandalone\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n return TableCell;\n}(card_elements_1.Container));\nexports.TableCell = TableCell;\nvar TableRow = /** @class */ (function (_super) {\n __extends(TableRow, _super);\n function TableRow() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n //#endregion\n TableRow.prototype.getDefaultPadding = function () {\n return new shared_1.PaddingDefinition(enums_1.Spacing.None, enums_1.Spacing.None, enums_1.Spacing.None, enums_1.Spacing.None);\n };\n TableRow.prototype.applyBackground = function () {\n if (this.renderedElement) {\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));\n if (styleDefinition.backgroundColor) {\n var bgColor = utils_1.stringToCssColor(styleDefinition.backgroundColor);\n this.renderedElement.style.backgroundColor = bgColor;\n }\n }\n };\n TableRow.prototype.getCollectionPropertyName = function () {\n return \"cells\";\n };\n TableRow.prototype.createItemInstance = function (typeName) {\n return !typeName || typeName === \"TableCell\" ? new TableCell() : undefined;\n };\n TableRow.prototype.internalRender = function () {\n var isFirstRow = this.getIsFirstRow();\n var cellSpacing = this.hostConfig.table.cellSpacing;\n var rowElement = document.createElement(\"div\");\n rowElement.setAttribute(\"role\", \"row\");\n rowElement.style.display = \"flex\";\n rowElement.style.flexDirection = \"row\";\n for (var i = 0; i < Math.min(this.getItemCount(), this.parentTable.getColumnCount()); i++) {\n var cell = this.getItemAt(i);\n // Cheating a bit in order to keep cellType read-only\n cell[\"_columnIndex\"] = i;\n cell[\"_cellType\"] = (this.parentTable.firstRowAsHeaders && isFirstRow) ? \"header\" : \"data\";\n var renderedCell = cell.render();\n if (renderedCell) {\n var column = this.parentTable.getColumnAt(i);\n if (column.computedWidth.unit === enums_1.SizeUnit.Pixel) {\n renderedCell.style.flex = \"0 0 \" + column.computedWidth.physicalSize + \"px\";\n }\n else {\n renderedCell.style.flex = \"1 1 \" + column.computedWidth.physicalSize + \"%\";\n }\n if (i > 0 && !this.parentTable.showGridLines && cellSpacing > 0) {\n renderedCell.style.marginLeft = cellSpacing + \"px\";\n }\n rowElement.appendChild(renderedCell);\n }\n }\n return rowElement.children.length > 0 ? rowElement : undefined;\n };\n TableRow.prototype.shouldSerialize = function (context) {\n return true;\n };\n TableRow.prototype.addCell = function (cell) {\n this.internalAddItem(cell);\n };\n TableRow.prototype.removeCellAt = function (columnIndex) {\n if (columnIndex >= 0 && columnIndex < this.getItemCount()) {\n return this.removeItem(this.getItemAt(columnIndex));\n }\n return false;\n };\n TableRow.prototype.ensureHasEnoughCells = function (cellCount) {\n while (this.getItemCount() < cellCount) {\n this.addCell(new TableCell());\n }\n };\n TableRow.prototype.getJsonTypeName = function () {\n return \"TableRow\";\n };\n TableRow.prototype.getIsFirstRow = function () {\n return this.parentTable.getItemAt(0) === this;\n };\n Object.defineProperty(TableRow.prototype, \"parentTable\", {\n get: function () {\n return this.parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableRow.prototype, \"isStandalone\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n //#region Schema\n TableRow.styleProperty = new card_elements_1.ContainerStyleProperty(serialization_1.Versions.v1_5, \"style\");\n TableRow.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"horizontalCellContentAlignment\", enums_1.HorizontalAlignment);\n TableRow.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"verticalCellContentAlignment\", enums_1.VerticalAlignment);\n __decorate([\n serialization_1.property(TableRow.horizontalCellContentAlignmentProperty)\n ], TableRow.prototype, \"horizontalCellContentAlignment\", void 0);\n __decorate([\n serialization_1.property(TableRow.verticalCellContentAlignmentProperty)\n ], TableRow.prototype, \"verticalCellContentAlignment\", void 0);\n return TableRow;\n}(StylableContainer));\nexports.TableRow = TableRow;\nvar Table = /** @class */ (function (_super) {\n __extends(Table, _super);\n function Table() {\n //#region Schema\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._columns = [];\n _this.firstRowAsHeaders = true;\n _this.showGridLines = true;\n return _this;\n }\n Object.defineProperty(Table.prototype, \"gridStyle\", {\n get: function () {\n var style = this.getValue(Table.gridStyleProperty);\n if (style && this.hostConfig.containerStyles.getStyleByName(style)) {\n return style;\n }\n return undefined;\n },\n set: function (value) {\n this.setValue(Table.gridStyleProperty, value);\n },\n enumerable: false,\n configurable: true\n });\n //#endregion\n Table.prototype.ensureRowsHaveEnoughCells = function () {\n for (var i = 0; i < this.getItemCount(); i++) {\n this.getItemAt(i).ensureHasEnoughCells(this.getColumnCount());\n }\n };\n Table.prototype.removeCellsFromColumn = function (columnIndex) {\n for (var i = 0; i < this.getItemCount(); i++) {\n this.getItemAt(i).removeCellAt(columnIndex);\n }\n };\n Table.prototype.getCollectionPropertyName = function () {\n return \"rows\";\n };\n Table.prototype.createItemInstance = function (typeName) {\n return !typeName || typeName === \"TableRow\" ? new TableRow() : undefined;\n };\n Table.prototype.internalParse = function (source, context) {\n _super.prototype.internalParse.call(this, source, context);\n this.ensureRowsHaveEnoughCells();\n };\n Table.prototype.internalRender = function () {\n if (this.getItemCount() > 0) {\n var totalWeights = 0;\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\n var column = _a[_i];\n if (column.width.unit === enums_1.SizeUnit.Weight) {\n totalWeights += column.width.physicalSize;\n }\n }\n for (var _b = 0, _c = this._columns; _b < _c.length; _b++) {\n var column = _c[_b];\n if (column.width.unit === enums_1.SizeUnit.Pixel) {\n column.computedWidth = new shared_1.SizeAndUnit(column.width.physicalSize, enums_1.SizeUnit.Pixel);\n }\n else {\n column.computedWidth = new shared_1.SizeAndUnit(100 / totalWeights * column.width.physicalSize, enums_1.SizeUnit.Weight);\n }\n }\n var tableElement = document.createElement(\"div\");\n tableElement.setAttribute(\"role\", \"table\");\n tableElement.style.display = \"flex\";\n tableElement.style.flexDirection = \"column\";\n if (this.showGridLines) {\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.gridStyle);\n if (styleDefinition.borderColor) {\n var borderColor = utils_1.stringToCssColor(styleDefinition.borderColor);\n if (borderColor) {\n tableElement.style.borderTop = \"1px solid \" + borderColor;\n tableElement.style.borderLeft = \"1px solid \" + borderColor;\n }\n }\n }\n var cellSpacing = this.hostConfig.table.cellSpacing;\n for (var i = 0; i < this.getItemCount(); i++) {\n var renderedRow = this.getItemAt(i).render();\n if (renderedRow) {\n if (i > 0 && !this.showGridLines && cellSpacing > 0) {\n var separatorRow = document.createElement(\"div\");\n separatorRow.setAttribute(\"aria-hidden\", \"true\");\n separatorRow.style.height = cellSpacing + \"px\";\n tableElement.appendChild(separatorRow);\n }\n tableElement.appendChild(renderedRow);\n }\n }\n return tableElement;\n }\n return undefined;\n };\n Table.prototype.addColumn = function (column) {\n this._columns.push(column);\n this.ensureRowsHaveEnoughCells();\n };\n Table.prototype.removeColumn = function (column) {\n var index = this._columns.indexOf(column);\n if (index >= 0) {\n this.removeCellsFromColumn(index);\n this._columns.splice(index, 1);\n }\n };\n Table.prototype.getColumnCount = function () {\n return this._columns.length;\n };\n Table.prototype.getColumnAt = function (index) {\n return this._columns[index];\n };\n Table.prototype.addRow = function (row) {\n this.internalAddItem(row);\n row.ensureHasEnoughCells(this.getColumnCount());\n };\n Table.prototype.getJsonTypeName = function () {\n return \"Table\";\n };\n Table.columnsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_5, \"columns\", TableColumnDefinition);\n Table.firstRowAsHeadersProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, \"firstRowAsHeaders\", true);\n Table.showGridLinesProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, \"showGridLines\", true);\n Table.gridStyleProperty = new card_elements_1.ContainerStyleProperty(serialization_1.Versions.v1_5, \"gridStyle\");\n Table.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"horizontalCellContentAlignment\", enums_1.HorizontalAlignment);\n Table.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"verticalCellContentAlignment\", enums_1.VerticalAlignment);\n __decorate([\n serialization_1.property(Table.columnsProperty)\n ], Table.prototype, \"_columns\", void 0);\n __decorate([\n serialization_1.property(Table.firstRowAsHeadersProperty)\n ], Table.prototype, \"firstRowAsHeaders\", void 0);\n __decorate([\n serialization_1.property(Table.showGridLinesProperty)\n ], Table.prototype, \"showGridLines\", void 0);\n __decorate([\n serialization_1.property(Table.gridStyleProperty)\n ], Table.prototype, \"gridStyle\", null);\n __decorate([\n serialization_1.property(Table.horizontalCellContentAlignmentProperty)\n ], Table.prototype, \"horizontalCellContentAlignment\", void 0);\n __decorate([\n serialization_1.property(Table.verticalCellContentAlignmentProperty)\n ], Table.prototype, \"verticalCellContentAlignment\", void 0);\n return Table;\n}(StylableContainer));\nexports.Table = Table;\nregistry_1.GlobalRegistry.defaultElements.register(\"Table\", Table, serialization_1.Versions.v1_5);\n//# sourceMappingURL=table.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatText = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar AbstractTextFormatter = /** @class */ (function () {\n function AbstractTextFormatter(regularExpression) {\n this._regularExpression = regularExpression;\n }\n AbstractTextFormatter.prototype.format = function (lang, input) {\n var matches;\n if (input) {\n var result = input;\n while ((matches = this._regularExpression.exec(input)) != null) {\n result = result.replace(matches[0], this.internalFormat(lang, matches));\n }\n ;\n return result;\n }\n else {\n return input;\n }\n };\n return AbstractTextFormatter;\n}());\nvar DateFormatter = /** @class */ (function (_super) {\n __extends(DateFormatter, _super);\n function DateFormatter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DateFormatter.prototype.internalFormat = function (lang, matches) {\n var date = new Date(Date.parse(matches[1]));\n var format = matches[2] != undefined ? matches[2].toLowerCase() : \"compact\";\n if (format != \"compact\") {\n return date.toLocaleDateString(lang, { day: \"numeric\", weekday: format, month: format, year: \"numeric\" });\n }\n else {\n return date.toLocaleDateString();\n }\n };\n return DateFormatter;\n}(AbstractTextFormatter));\nvar TimeFormatter = /** @class */ (function (_super) {\n __extends(TimeFormatter, _super);\n function TimeFormatter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TimeFormatter.prototype.internalFormat = function (lang, matches) {\n var date = new Date(Date.parse(matches[1]));\n return date.toLocaleTimeString(lang, { hour: 'numeric', minute: '2-digit' });\n };\n return TimeFormatter;\n}(AbstractTextFormatter));\nfunction formatText(lang, text) {\n var formatters = [\n new DateFormatter(/\\{{2}DATE\\((\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|(?:(?:-|\\+)\\d{2}:\\d{2})))(?:, ?(COMPACT|LONG|SHORT))?\\)\\}{2}/g),\n new TimeFormatter(/\\{{2}TIME\\((\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|(?:(?:-|\\+)\\d{2}:\\d{2})))\\)\\}{2}/g)\n ];\n var result = text;\n for (var _i = 0, formatters_1 = formatters; _i < formatters_1.length; _i++) {\n var formatter = formatters_1[_i];\n result = formatter.format(lang, result);\n }\n return result;\n}\nexports.formatText = formatText;\n//# sourceMappingURL=text-formatters.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearElementChildren = exports.getScrollY = exports.getScrollX = exports.getFitStatus = exports.truncate = exports.stringToCssColor = exports.parseEnum = exports.getEnumValueByName = exports.parseBool = exports.parseNumber = exports.parseString = exports.appendChild = exports.generateUniqueId = exports.isMobileOS = exports.isInternetExplorer = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar Enums = require(\"./enums\");\nvar Shared = require(\"./shared\");\nfunction isInternetExplorer() {\n // The documentMode property only exists in IE\n return window.document.documentMode !== undefined;\n}\nexports.isInternetExplorer = isInternetExplorer;\nfunction isMobileOS() {\n var userAgent = window.navigator.userAgent;\n return !!userAgent.match(/Android/i) || !!userAgent.match(/iPad/i) || !!userAgent.match(/iPhone/i);\n}\nexports.isMobileOS = isMobileOS;\n/**\n * Generate a UUID prepended with \"__ac-\"\n */\nfunction generateUniqueId() {\n return \"__ac-\" + Shared.UUID.generate();\n}\nexports.generateUniqueId = generateUniqueId;\nfunction appendChild(node, child) {\n if (child) {\n node.appendChild(child);\n }\n}\nexports.appendChild = appendChild;\nfunction parseString(obj, defaultValue) {\n return typeof obj === \"string\" ? obj : defaultValue;\n}\nexports.parseString = parseString;\nfunction parseNumber(obj, defaultValue) {\n return typeof obj === \"number\" ? obj : defaultValue;\n}\nexports.parseNumber = parseNumber;\nfunction parseBool(value, defaultValue) {\n if (typeof value === \"boolean\") {\n return value;\n }\n else if (typeof value === \"string\") {\n switch (value.toLowerCase()) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n return defaultValue;\n }\n }\n return defaultValue;\n}\nexports.parseBool = parseBool;\nfunction getEnumValueByName(enumType, name) {\n for (var key in enumType) {\n var keyAsNumber = parseInt(key, 10);\n if (keyAsNumber >= 0) {\n var value = enumType[key];\n if (value && typeof value === \"string\" && value.toLowerCase() === name.toLowerCase()) {\n return keyAsNumber;\n }\n }\n }\n return undefined;\n}\nexports.getEnumValueByName = getEnumValueByName;\nfunction parseEnum(enumType, name, defaultValue) {\n if (!name) {\n return defaultValue;\n }\n var enumValue = getEnumValueByName(enumType, name);\n return enumValue !== undefined ? enumValue : defaultValue;\n}\nexports.parseEnum = parseEnum;\nfunction stringToCssColor(color) {\n if (color) {\n var regEx = /#([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?/gi;\n var matches = regEx.exec(color);\n if (matches && matches[4]) {\n var a = parseInt(matches[1], 16) / 255;\n var r = parseInt(matches[2], 16);\n var g = parseInt(matches[3], 16);\n var b = parseInt(matches[4], 16);\n return \"rgba(\" + r + \",\" + g + \",\" + b + \",\" + a + \")\";\n }\n }\n return color;\n}\nexports.stringToCssColor = stringToCssColor;\nfunction truncate(element, maxHeight, lineHeight) {\n var fits = function () {\n // Allow a one pixel overflow to account for rounding differences\n // between browsers\n return maxHeight - element.scrollHeight >= -1.0;\n };\n if (fits())\n return;\n var fullText = element.innerHTML;\n var truncateAt = function (idx) {\n element.innerHTML = fullText.substring(0, idx) + '...';\n };\n var breakableIndices = findBreakableIndices(fullText);\n var lo = 0;\n var hi = breakableIndices.length;\n var bestBreakIdx = 0;\n // Do a binary search for the longest string that fits\n while (lo < hi) {\n var mid = Math.floor((lo + hi) / 2);\n truncateAt(breakableIndices[mid]);\n if (fits()) {\n bestBreakIdx = breakableIndices[mid];\n lo = mid + 1;\n }\n else {\n hi = mid;\n }\n }\n truncateAt(bestBreakIdx);\n // If we have extra room, try to expand the string letter by letter\n // (covers the case where we have to break in the middle of a long word)\n if (lineHeight && maxHeight - element.scrollHeight >= lineHeight - 1.0) {\n var idx = findNextCharacter(fullText, bestBreakIdx);\n while (idx < fullText.length) {\n truncateAt(idx);\n if (fits()) {\n bestBreakIdx = idx;\n idx = findNextCharacter(fullText, idx);\n }\n else {\n break;\n }\n }\n truncateAt(bestBreakIdx);\n }\n}\nexports.truncate = truncate;\nfunction findBreakableIndices(html) {\n var results = [];\n var idx = findNextCharacter(html, -1);\n while (idx < html.length) {\n if (html[idx] == ' ') {\n results.push(idx);\n }\n idx = findNextCharacter(html, idx);\n }\n return results;\n}\nfunction findNextCharacter(html, currIdx) {\n currIdx += 1;\n // If we found the start of an HTML tag, keep advancing until we get\n // past it, so we don't end up truncating in the middle of the tag\n while (currIdx < html.length && html[currIdx] == '<') {\n while (currIdx < html.length && html[currIdx++] != '>')\n ;\n }\n return currIdx;\n}\nfunction getFitStatus(element, containerEnd) {\n var start = element.offsetTop;\n var end = start + element.clientHeight;\n if (end <= containerEnd) {\n return Enums.ContainerFitStatus.FullyInContainer;\n }\n else if (start < containerEnd) {\n return Enums.ContainerFitStatus.Overflowing;\n }\n else {\n return Enums.ContainerFitStatus.FullyOutOfContainer;\n }\n}\nexports.getFitStatus = getFitStatus;\nfunction getScrollX() {\n return window.pageXOffset;\n}\nexports.getScrollX = getScrollX;\nfunction getScrollY() {\n return window.pageYOffset;\n}\nexports.getScrollY = getScrollY;\nfunction clearElementChildren(element) {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n}\nexports.clearElementChildren = clearElementChildren;\n//# sourceMappingURL=utils.js.map","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildFullPath = require('../core/buildFullPath');\nvar buildURL = require('./../helpers/buildURL');\nvar http = require('http');\nvar https = require('https');\nvar httpFollow = require('follow-redirects').http;\nvar httpsFollow = require('follow-redirects').https;\nvar url = require('url');\nvar zlib = require('zlib');\nvar pkg = require('./../../package.json');\nvar createError = require('../core/createError');\nvar enhanceError = require('../core/enhanceError');\n\nvar isHttps = /https:?/;\n\n/**\n *\n * @param {http.ClientRequestArgs} options\n * @param {AxiosProxyConfig} proxy\n * @param {string} location\n */\nfunction setProxy(options, proxy, location) {\n options.hostname = proxy.host;\n options.host = proxy.host;\n options.port = proxy.port;\n options.path = location;\n\n // Basic proxy authorization\n if (proxy.auth) {\n var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');\n options.headers['Proxy-Authorization'] = 'Basic ' + base64;\n }\n\n // If a proxy is used, any redirects must also pass through the proxy\n options.beforeRedirect = function beforeRedirect(redirection) {\n redirection.headers.host = redirection.host;\n setProxy(redirection, proxy, redirection.href);\n };\n}\n\n/*eslint consistent-return:0*/\nmodule.exports = function httpAdapter(config) {\n return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {\n var resolve = function resolve(value) {\n resolvePromise(value);\n };\n var reject = function reject(value) {\n rejectPromise(value);\n };\n var data = config.data;\n var headers = config.headers;\n\n // Set User-Agent (required by some servers)\n // See https://github.com/axios/axios/issues/69\n if ('User-Agent' in headers || 'user-agent' in headers) {\n // User-Agent is specified; handle case where no UA header is desired\n if (!headers['User-Agent'] && !headers['user-agent']) {\n delete headers['User-Agent'];\n delete headers['user-agent'];\n }\n // Otherwise, use specified value\n } else {\n // Only set header if it hasn't been set in config\n headers['User-Agent'] = 'axios/' + pkg.version;\n }\n\n if (data && !utils.isStream(data)) {\n if (Buffer.isBuffer(data)) {\n // Nothing to do...\n } else if (utils.isArrayBuffer(data)) {\n data = Buffer.from(new Uint8Array(data));\n } else if (utils.isString(data)) {\n data = Buffer.from(data, 'utf-8');\n } else {\n return reject(createError(\n 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',\n config\n ));\n }\n\n // Add Content-Length header if data exists\n headers['Content-Length'] = data.length;\n }\n\n // HTTP basic authentication\n var auth = undefined;\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n auth = username + ':' + password;\n }\n\n // Parse url\n var fullPath = buildFullPath(config.baseURL, config.url);\n var parsed = url.parse(fullPath);\n var protocol = parsed.protocol || 'http:';\n\n if (!auth && parsed.auth) {\n var urlAuth = parsed.auth.split(':');\n var urlUsername = urlAuth[0] || '';\n var urlPassword = urlAuth[1] || '';\n auth = urlUsername + ':' + urlPassword;\n }\n\n if (auth) {\n delete headers.Authorization;\n }\n\n var isHttpsRequest = isHttps.test(protocol);\n var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;\n\n var options = {\n path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\\?/, ''),\n method: config.method.toUpperCase(),\n headers: headers,\n agent: agent,\n agents: { http: config.httpAgent, https: config.httpsAgent },\n auth: auth\n };\n\n if (config.socketPath) {\n options.socketPath = config.socketPath;\n } else {\n options.hostname = parsed.hostname;\n options.port = parsed.port;\n }\n\n var proxy = config.proxy;\n if (!proxy && proxy !== false) {\n var proxyEnv = protocol.slice(0, -1) + '_proxy';\n var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];\n if (proxyUrl) {\n var parsedProxyUrl = url.parse(proxyUrl);\n var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;\n var shouldProxy = true;\n\n if (noProxyEnv) {\n var noProxy = noProxyEnv.split(',').map(function trim(s) {\n return s.trim();\n });\n\n shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {\n if (!proxyElement) {\n return false;\n }\n if (proxyElement === '*') {\n return true;\n }\n if (proxyElement[0] === '.' &&\n parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {\n return true;\n }\n\n return parsed.hostname === proxyElement;\n });\n }\n\n if (shouldProxy) {\n proxy = {\n host: parsedProxyUrl.hostname,\n port: parsedProxyUrl.port,\n protocol: parsedProxyUrl.protocol\n };\n\n if (parsedProxyUrl.auth) {\n var proxyUrlAuth = parsedProxyUrl.auth.split(':');\n proxy.auth = {\n username: proxyUrlAuth[0],\n password: proxyUrlAuth[1]\n };\n }\n }\n }\n }\n\n if (proxy) {\n options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');\n setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);\n }\n\n var transport;\n var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);\n if (config.transport) {\n transport = config.transport;\n } else if (config.maxRedirects === 0) {\n transport = isHttpsProxy ? https : http;\n } else {\n if (config.maxRedirects) {\n options.maxRedirects = config.maxRedirects;\n }\n transport = isHttpsProxy ? httpsFollow : httpFollow;\n }\n\n if (config.maxBodyLength > -1) {\n options.maxBodyLength = config.maxBodyLength;\n }\n\n // Create the request\n var req = transport.request(options, function handleResponse(res) {\n if (req.aborted) return;\n\n // uncompress the response body transparently if required\n var stream = res;\n\n // return the last request in case of redirects\n var lastRequest = res.req || req;\n\n\n // if no content, is HEAD request or decompress disabled we should not decompress\n if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) {\n switch (res.headers['content-encoding']) {\n /*eslint default-case:0*/\n case 'gzip':\n case 'compress':\n case 'deflate':\n // add the unzipper to the body stream processing pipeline\n stream = stream.pipe(zlib.createUnzip());\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n }\n }\n\n var response = {\n status: res.statusCode,\n statusText: res.statusMessage,\n headers: res.headers,\n config: config,\n request: lastRequest\n };\n\n if (config.responseType === 'stream') {\n response.data = stream;\n settle(resolve, reject, response);\n } else {\n var responseBuffer = [];\n var totalResponseBytes = 0;\n stream.on('data', function handleStreamData(chunk) {\n responseBuffer.push(chunk);\n totalResponseBytes += chunk.length;\n\n // make sure the content length is not over the maxContentLength if specified\n if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {\n stream.destroy();\n reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',\n config, null, lastRequest));\n }\n });\n\n stream.on('error', function handleStreamError(err) {\n if (req.aborted) return;\n reject(enhanceError(err, config, null, lastRequest));\n });\n\n stream.on('end', function handleStreamEnd() {\n var responseData = Buffer.concat(responseBuffer);\n if (config.responseType !== 'arraybuffer') {\n responseData = responseData.toString(config.responseEncoding);\n if (!config.responseEncoding || config.responseEncoding === 'utf8') {\n responseData = utils.stripBOM(responseData);\n }\n }\n\n response.data = responseData;\n settle(resolve, reject, response);\n });\n }\n });\n\n // Handle errors\n req.on('error', function handleRequestError(err) {\n if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return;\n reject(enhanceError(err, config, null, req));\n });\n\n // Handle request timeout\n if (config.timeout) {\n // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.\n var timeout = parseInt(config.timeout, 10);\n\n if (isNaN(timeout)) {\n reject(createError(\n 'error trying to parse `config.timeout` to int',\n config,\n 'ERR_PARSE_TIMEOUT',\n req\n ));\n\n return;\n }\n\n // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.\n // And timer callback will be fired, and abort() will be invoked before connection, then get \"socket hang up\" and code ECONNRESET.\n // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.\n // And then these socket which be hang up will devoring CPU little by little.\n // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.\n req.setTimeout(timeout, function handleRequestTimeout() {\n req.abort();\n reject(createError(\n 'timeout of ' + timeout + 'ms exceeded',\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n req\n ));\n });\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (req.aborted) return;\n\n req.abort();\n reject(cancel);\n });\n }\n\n // Send the request\n if (utils.isStream(data)) {\n data.on('error', function handleStreamError(err) {\n reject(enhanceError(err, config, null, req));\n }).pipe(req);\n } else {\n req.end(data);\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('./../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar enhanceError = require('./core/enhanceError');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar pkg = require('./../../package.json');\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\nvar currentVerArr = pkg.version.split('.');\n\n/**\n * Compare package versions\n * @param {string} version\n * @param {string?} thanVersion\n * @returns {boolean}\n */\nfunction isOlderVersion(version, thanVersion) {\n var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;\n var destVer = version.split('.');\n for (var i = 0; i < 3; i++) {\n if (pkgVersionArr[i] > destVer[i]) {\n return true;\n } else if (pkgVersionArr[i] < destVer[i]) {\n return false;\n }\n }\n return false;\n}\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator\n * @param {string?} version\n * @param {string} message\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n var isDeprecated = version && isOlderVersion(version);\n\n function formatMessage(opt, desc) {\n return '[Axios v' + pkg.version + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed in ' + version));\n }\n\n if (isDeprecated && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n isOlderVersion: isOlderVersion,\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","var register = require('./lib/register')\nvar addHook = require('./lib/add')\nvar removeHook = require('./lib/remove')\n\n// bind with array of arguments: https://stackoverflow.com/a/21792913\nvar bind = Function.bind\nvar bindable = bind.bind(bind)\n\nfunction bindApi (hook, state, name) {\n var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state])\n hook.api = { remove: removeHookRef }\n hook.remove = removeHookRef\n\n ;['before', 'error', 'after', 'wrap'].forEach(function (kind) {\n var args = name ? [state, kind, name] : [state, kind]\n hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args)\n })\n}\n\nfunction HookSingular () {\n var singularHookName = 'h'\n var singularHookState = {\n registry: {}\n }\n var singularHook = register.bind(null, singularHookState, singularHookName)\n bindApi(singularHook, singularHookState, singularHookName)\n return singularHook\n}\n\nfunction HookCollection () {\n var state = {\n registry: {}\n }\n\n var hook = register.bind(null, state)\n bindApi(hook, state)\n\n return hook\n}\n\nvar collectionHookDeprecationMessageDisplayed = false\nfunction Hook () {\n if (!collectionHookDeprecationMessageDisplayed) {\n console.warn('[before-after-hook]: \"Hook()\" repurposing warning, use \"Hook.Collection()\". Read more: https://git.io/upgrade-before-after-hook-to-1.4')\n collectionHookDeprecationMessageDisplayed = true\n }\n return HookCollection()\n}\n\nHook.Singular = HookSingular.bind()\nHook.Collection = HookCollection.bind()\n\nmodule.exports = Hook\n// expose constructors as a named property for TypeScript\nmodule.exports.Hook = Hook\nmodule.exports.Singular = Hook.Singular\nmodule.exports.Collection = Hook.Collection\n","module.exports = addHook;\n\nfunction addHook(state, kind, name, hook) {\n var orig = hook;\n if (!state.registry[name]) {\n state.registry[name] = [];\n }\n\n if (kind === \"before\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(orig.bind(null, options))\n .then(method.bind(null, options));\n };\n }\n\n if (kind === \"after\") {\n hook = function (method, options) {\n var result;\n return Promise.resolve()\n .then(method.bind(null, options))\n .then(function (result_) {\n result = result_;\n return orig(result, options);\n })\n .then(function () {\n return result;\n });\n };\n }\n\n if (kind === \"error\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(method.bind(null, options))\n .catch(function (error) {\n return orig(error, options);\n });\n };\n }\n\n state.registry[name].push({\n hook: hook,\n orig: orig,\n });\n}\n","module.exports = register;\n\nfunction register(state, name, method, options) {\n if (typeof method !== \"function\") {\n throw new Error(\"method for before hook must be a function\");\n }\n\n if (!options) {\n options = {};\n }\n\n if (Array.isArray(name)) {\n return name.reverse().reduce(function (callback, name) {\n return register.bind(null, state, name, callback, options);\n }, method)();\n }\n\n return Promise.resolve().then(function () {\n if (!state.registry[name]) {\n return method(options);\n }\n\n return state.registry[name].reduce(function (method, registered) {\n return registered.hook.bind(null, method, options);\n }, method)();\n });\n}\n","module.exports = removeHook;\n\nfunction removeHook(state, name, method) {\n if (!state.registry[name]) {\n return;\n }\n\n var index = state.registry[name]\n .map(function (registered) {\n return registered.orig;\n })\n .indexOf(method);\n\n if (index === -1) {\n return;\n }\n\n state.registry[name].splice(index, 1);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n\nvar isNode = typeof process !== \"undefined\" && process.versions != null && process.versions.node != null;\n\nvar isWebWorker = (typeof self === \"undefined\" ? \"undefined\" : _typeof(self)) === \"object\" && self.constructor && self.constructor.name === \"DedicatedWorkerGlobalScope\";\n\n/**\n * @see https://github.com/jsdom/jsdom/releases/tag/12.0.0\n * @see https://github.com/jsdom/jsdom/issues/1537\n */\nvar isJsDom = typeof window !== \"undefined\" && window.name === \"nodejs\" || typeof navigator !== \"undefined\" && (navigator.userAgent.includes(\"Node.js\") || navigator.userAgent.includes(\"jsdom\"));\n\nvar isDeno = typeof Deno !== \"undefined\" && typeof Deno.core !== \"undefined\";\n\nexports.isBrowser = isBrowser;\nexports.isWebWorker = isWebWorker;\nexports.isNode = isNode;\nexports.isJsDom = isJsDom;\nexports.isDeno = isDeno;","const nodeFetch = require('node-fetch')\nconst realFetch = nodeFetch.default || nodeFetch\n\nconst fetch = function (url, options) {\n // Support schemaless URIs on the server for parity with the browser.\n // Ex: //github.com/ -> https://github.com/\n if (/^\\/\\//.test(url)) {\n url = 'https:' + url\n }\n return realFetch.call(this, url, options)\n}\n\nfetch.ponyfill = true\n\nmodule.exports = exports = fetch\nexports.fetch = fetch\nexports.Headers = nodeFetch.Headers\nexports.Request = nodeFetch.Request\nexports.Response = nodeFetch.Response\n\n// Needed for TypeScript consumers without esModuleInterop.\nexports.default = fetch\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.format(...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nclass Deprecation extends Error {\n constructor(message) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = 'Deprecation';\n }\n\n}\n\nexports.Deprecation = Deprecation;\n","var debug;\n\nmodule.exports = function () {\n if (!debug) {\n try {\n /* eslint global-require: off */\n debug = require(\"debug\")(\"follow-redirects\");\n }\n catch (error) { /* */ }\n if (typeof debug !== \"function\") {\n debug = function () { /* */ };\n }\n }\n debug.apply(null, arguments);\n};\n","var url = require(\"url\");\nvar URL = url.URL;\nvar http = require(\"http\");\nvar https = require(\"https\");\nvar Writable = require(\"stream\").Writable;\nvar assert = require(\"assert\");\nvar debug = require(\"./debug\");\n\n// Create handlers that pass events from native requests\nvar events = [\"abort\", \"aborted\", \"connect\", \"error\", \"socket\", \"timeout\"];\nvar eventHandlers = Object.create(null);\nevents.forEach(function (event) {\n eventHandlers[event] = function (arg1, arg2, arg3) {\n this._redirectable.emit(event, arg1, arg2, arg3);\n };\n});\n\n// Error types with codes\nvar RedirectionError = createErrorType(\n \"ERR_FR_REDIRECTION_FAILURE\",\n \"Redirected request failed\"\n);\nvar TooManyRedirectsError = createErrorType(\n \"ERR_FR_TOO_MANY_REDIRECTS\",\n \"Maximum number of redirects exceeded\"\n);\nvar MaxBodyLengthExceededError = createErrorType(\n \"ERR_FR_MAX_BODY_LENGTH_EXCEEDED\",\n \"Request body larger than maxBodyLength limit\"\n);\nvar WriteAfterEndError = createErrorType(\n \"ERR_STREAM_WRITE_AFTER_END\",\n \"write after end\"\n);\n\n// An HTTP(S) request that can be redirected\nfunction RedirectableRequest(options, responseCallback) {\n // Initialize the request\n Writable.call(this);\n this._sanitizeOptions(options);\n this._options = options;\n this._ended = false;\n this._ending = false;\n this._redirectCount = 0;\n this._redirects = [];\n this._requestBodyLength = 0;\n this._requestBodyBuffers = [];\n\n // Attach a callback if passed\n if (responseCallback) {\n this.on(\"response\", responseCallback);\n }\n\n // React to responses of native requests\n var self = this;\n this._onNativeResponse = function (response) {\n self._processResponse(response);\n };\n\n // Perform the first request\n this._performRequest();\n}\nRedirectableRequest.prototype = Object.create(Writable.prototype);\n\nRedirectableRequest.prototype.abort = function () {\n abortRequest(this._currentRequest);\n this.emit(\"abort\");\n};\n\n// Writes buffered data to the current native request\nRedirectableRequest.prototype.write = function (data, encoding, callback) {\n // Writing is not allowed if end has been called\n if (this._ending) {\n throw new WriteAfterEndError();\n }\n\n // Validate input and shift parameters if necessary\n if (!(typeof data === \"string\" || typeof data === \"object\" && (\"length\" in data))) {\n throw new TypeError(\"data should be a string, Buffer or Uint8Array\");\n }\n if (typeof encoding === \"function\") {\n callback = encoding;\n encoding = null;\n }\n\n // Ignore empty buffers, since writing them doesn't invoke the callback\n // https://github.com/nodejs/node/issues/22066\n if (data.length === 0) {\n if (callback) {\n callback();\n }\n return;\n }\n // Only write when we don't exceed the maximum body length\n if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {\n this._requestBodyLength += data.length;\n this._requestBodyBuffers.push({ data: data, encoding: encoding });\n this._currentRequest.write(data, encoding, callback);\n }\n // Error when we exceed the maximum body length\n else {\n this.emit(\"error\", new MaxBodyLengthExceededError());\n this.abort();\n }\n};\n\n// Ends the current native request\nRedirectableRequest.prototype.end = function (data, encoding, callback) {\n // Shift parameters if necessary\n if (typeof data === \"function\") {\n callback = data;\n data = encoding = null;\n }\n else if (typeof encoding === \"function\") {\n callback = encoding;\n encoding = null;\n }\n\n // Write data if needed and end\n if (!data) {\n this._ended = this._ending = true;\n this._currentRequest.end(null, null, callback);\n }\n else {\n var self = this;\n var currentRequest = this._currentRequest;\n this.write(data, encoding, function () {\n self._ended = true;\n currentRequest.end(null, null, callback);\n });\n this._ending = true;\n }\n};\n\n// Sets a header value on the current native request\nRedirectableRequest.prototype.setHeader = function (name, value) {\n this._options.headers[name] = value;\n this._currentRequest.setHeader(name, value);\n};\n\n// Clears a header value on the current native request\nRedirectableRequest.prototype.removeHeader = function (name) {\n delete this._options.headers[name];\n this._currentRequest.removeHeader(name);\n};\n\n// Global timeout for all underlying requests\nRedirectableRequest.prototype.setTimeout = function (msecs, callback) {\n var self = this;\n\n // Destroys the socket on timeout\n function destroyOnTimeout(socket) {\n socket.setTimeout(msecs);\n socket.removeListener(\"timeout\", socket.destroy);\n socket.addListener(\"timeout\", socket.destroy);\n }\n\n // Sets up a timer to trigger a timeout event\n function startTimer(socket) {\n if (self._timeout) {\n clearTimeout(self._timeout);\n }\n self._timeout = setTimeout(function () {\n self.emit(\"timeout\");\n clearTimer();\n }, msecs);\n destroyOnTimeout(socket);\n }\n\n // Stops a timeout from triggering\n function clearTimer() {\n // Clear the timeout\n if (self._timeout) {\n clearTimeout(self._timeout);\n self._timeout = null;\n }\n\n // Clean up all attached listeners\n self.removeListener(\"abort\", clearTimer);\n self.removeListener(\"error\", clearTimer);\n self.removeListener(\"response\", clearTimer);\n if (callback) {\n self.removeListener(\"timeout\", callback);\n }\n if (!self.socket) {\n self._currentRequest.removeListener(\"socket\", startTimer);\n }\n }\n\n // Attach callback if passed\n if (callback) {\n this.on(\"timeout\", callback);\n }\n\n // Start the timer if or when the socket is opened\n if (this.socket) {\n startTimer(this.socket);\n }\n else {\n this._currentRequest.once(\"socket\", startTimer);\n }\n\n // Clean up on events\n this.on(\"socket\", destroyOnTimeout);\n this.on(\"abort\", clearTimer);\n this.on(\"error\", clearTimer);\n this.on(\"response\", clearTimer);\n\n return this;\n};\n\n// Proxy all other public ClientRequest methods\n[\n \"flushHeaders\", \"getHeader\",\n \"setNoDelay\", \"setSocketKeepAlive\",\n].forEach(function (method) {\n RedirectableRequest.prototype[method] = function (a, b) {\n return this._currentRequest[method](a, b);\n };\n});\n\n// Proxy all public ClientRequest properties\n[\"aborted\", \"connection\", \"socket\"].forEach(function (property) {\n Object.defineProperty(RedirectableRequest.prototype, property, {\n get: function () { return this._currentRequest[property]; },\n });\n});\n\nRedirectableRequest.prototype._sanitizeOptions = function (options) {\n // Ensure headers are always present\n if (!options.headers) {\n options.headers = {};\n }\n\n // Since http.request treats host as an alias of hostname,\n // but the url module interprets host as hostname plus port,\n // eliminate the host property to avoid confusion.\n if (options.host) {\n // Use hostname if set, because it has precedence\n if (!options.hostname) {\n options.hostname = options.host;\n }\n delete options.host;\n }\n\n // Complete the URL object when necessary\n if (!options.pathname && options.path) {\n var searchPos = options.path.indexOf(\"?\");\n if (searchPos < 0) {\n options.pathname = options.path;\n }\n else {\n options.pathname = options.path.substring(0, searchPos);\n options.search = options.path.substring(searchPos);\n }\n }\n};\n\n\n// Executes the next native request (initial or redirect)\nRedirectableRequest.prototype._performRequest = function () {\n // Load the native protocol\n var protocol = this._options.protocol;\n var nativeProtocol = this._options.nativeProtocols[protocol];\n if (!nativeProtocol) {\n this.emit(\"error\", new TypeError(\"Unsupported protocol \" + protocol));\n return;\n }\n\n // If specified, use the agent corresponding to the protocol\n // (HTTP and HTTPS use different types of agents)\n if (this._options.agents) {\n var scheme = protocol.substr(0, protocol.length - 1);\n this._options.agent = this._options.agents[scheme];\n }\n\n // Create the native request\n var request = this._currentRequest =\n nativeProtocol.request(this._options, this._onNativeResponse);\n this._currentUrl = url.format(this._options);\n\n // Set up event handlers\n request._redirectable = this;\n for (var e = 0; e < events.length; e++) {\n request.on(events[e], eventHandlers[events[e]]);\n }\n\n // End a redirected request\n // (The first request must be ended explicitly with RedirectableRequest#end)\n if (this._isRedirect) {\n // Write the request entity and end.\n var i = 0;\n var self = this;\n var buffers = this._requestBodyBuffers;\n (function writeNext(error) {\n // Only write if this request has not been redirected yet\n /* istanbul ignore else */\n if (request === self._currentRequest) {\n // Report any write errors\n /* istanbul ignore if */\n if (error) {\n self.emit(\"error\", error);\n }\n // Write the next buffer if there are still left\n else if (i < buffers.length) {\n var buffer = buffers[i++];\n /* istanbul ignore else */\n if (!request.finished) {\n request.write(buffer.data, buffer.encoding, writeNext);\n }\n }\n // End the request if `end` has been called on us\n else if (self._ended) {\n request.end();\n }\n }\n }());\n }\n};\n\n// Processes a response from the current native request\nRedirectableRequest.prototype._processResponse = function (response) {\n // Store the redirected response\n var statusCode = response.statusCode;\n if (this._options.trackRedirects) {\n this._redirects.push({\n url: this._currentUrl,\n headers: response.headers,\n statusCode: statusCode,\n });\n }\n\n // RFC7231§6.4: The 3xx (Redirection) class of status code indicates\n // that further action needs to be taken by the user agent in order to\n // fulfill the request. If a Location header field is provided,\n // the user agent MAY automatically redirect its request to the URI\n // referenced by the Location field value,\n // even if the specific status code is not understood.\n var location = response.headers.location;\n if (location && this._options.followRedirects !== false &&\n statusCode >= 300 && statusCode < 400) {\n // Abort the current request\n abortRequest(this._currentRequest);\n // Discard the remainder of the response to avoid waiting for data\n response.destroy();\n\n // RFC7231§6.4: A client SHOULD detect and intervene\n // in cyclical redirections (i.e., \"infinite\" redirection loops).\n if (++this._redirectCount > this._options.maxRedirects) {\n this.emit(\"error\", new TooManyRedirectsError());\n return;\n }\n\n // RFC7231§6.4: Automatic redirection needs to done with\n // care for methods not known to be safe, […]\n // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change\n // the request method from POST to GET for the subsequent request.\n if ((statusCode === 301 || statusCode === 302) && this._options.method === \"POST\" ||\n // RFC7231§6.4.4: The 303 (See Other) status code indicates that\n // the server is redirecting the user agent to a different resource […]\n // A user agent can perform a retrieval request targeting that URI\n // (a GET or HEAD request if using HTTP) […]\n (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {\n this._options.method = \"GET\";\n // Drop a possible entity and headers related to it\n this._requestBodyBuffers = [];\n removeMatchingHeaders(/^content-/i, this._options.headers);\n }\n\n // Drop the Host header, as the redirect might lead to a different host\n var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);\n\n // If the redirect is relative, carry over the host of the last request\n var currentUrlParts = url.parse(this._currentUrl);\n var currentHost = currentHostHeader || currentUrlParts.host;\n var currentUrl = /^\\w+:/.test(location) ? this._currentUrl :\n url.format(Object.assign(currentUrlParts, { host: currentHost }));\n\n // Determine the URL of the redirection\n var redirectUrl;\n try {\n redirectUrl = url.resolve(currentUrl, location);\n }\n catch (cause) {\n this.emit(\"error\", new RedirectionError(cause));\n return;\n }\n\n // Create the redirected request\n debug(\"redirecting to\", redirectUrl);\n this._isRedirect = true;\n var redirectUrlParts = url.parse(redirectUrl);\n Object.assign(this._options, redirectUrlParts);\n\n // Drop the confidential headers when redirecting to another domain\n if (!(redirectUrlParts.host === currentHost || isSubdomainOf(redirectUrlParts.host, currentHost))) {\n removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);\n }\n\n // Evaluate the beforeRedirect callback\n if (typeof this._options.beforeRedirect === \"function\") {\n var responseDetails = { headers: response.headers };\n try {\n this._options.beforeRedirect.call(null, this._options, responseDetails);\n }\n catch (err) {\n this.emit(\"error\", err);\n return;\n }\n this._sanitizeOptions(this._options);\n }\n\n // Perform the redirected request\n try {\n this._performRequest();\n }\n catch (cause) {\n this.emit(\"error\", new RedirectionError(cause));\n }\n }\n else {\n // The response is not a redirect; return it as-is\n response.responseUrl = this._currentUrl;\n response.redirects = this._redirects;\n this.emit(\"response\", response);\n\n // Clean up\n this._requestBodyBuffers = [];\n }\n};\n\n// Wraps the key/value object of protocols with redirect functionality\nfunction wrap(protocols) {\n // Default settings\n var exports = {\n maxRedirects: 21,\n maxBodyLength: 10 * 1024 * 1024,\n };\n\n // Wrap each protocol\n var nativeProtocols = {};\n Object.keys(protocols).forEach(function (scheme) {\n var protocol = scheme + \":\";\n var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];\n var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);\n\n // Executes a request, following redirects\n function request(input, options, callback) {\n // Parse parameters\n if (typeof input === \"string\") {\n var urlStr = input;\n try {\n input = urlToOptions(new URL(urlStr));\n }\n catch (err) {\n /* istanbul ignore next */\n input = url.parse(urlStr);\n }\n }\n else if (URL && (input instanceof URL)) {\n input = urlToOptions(input);\n }\n else {\n callback = options;\n options = input;\n input = { protocol: protocol };\n }\n if (typeof options === \"function\") {\n callback = options;\n options = null;\n }\n\n // Set defaults\n options = Object.assign({\n maxRedirects: exports.maxRedirects,\n maxBodyLength: exports.maxBodyLength,\n }, input, options);\n options.nativeProtocols = nativeProtocols;\n\n assert.equal(options.protocol, protocol, \"protocol mismatch\");\n debug(\"options\", options);\n return new RedirectableRequest(options, callback);\n }\n\n // Executes a GET request, following redirects\n function get(input, options, callback) {\n var wrappedRequest = wrappedProtocol.request(input, options, callback);\n wrappedRequest.end();\n return wrappedRequest;\n }\n\n // Expose the properties on the wrapped protocol\n Object.defineProperties(wrappedProtocol, {\n request: { value: request, configurable: true, enumerable: true, writable: true },\n get: { value: get, configurable: true, enumerable: true, writable: true },\n });\n });\n return exports;\n}\n\n/* istanbul ignore next */\nfunction noop() { /* empty */ }\n\n// from https://github.com/nodejs/node/blob/master/lib/internal/url.js\nfunction urlToOptions(urlObject) {\n var options = {\n protocol: urlObject.protocol,\n hostname: urlObject.hostname.startsWith(\"[\") ?\n /* istanbul ignore next */\n urlObject.hostname.slice(1, -1) :\n urlObject.hostname,\n hash: urlObject.hash,\n search: urlObject.search,\n pathname: urlObject.pathname,\n path: urlObject.pathname + urlObject.search,\n href: urlObject.href,\n };\n if (urlObject.port !== \"\") {\n options.port = Number(urlObject.port);\n }\n return options;\n}\n\nfunction removeMatchingHeaders(regex, headers) {\n var lastValue;\n for (var header in headers) {\n if (regex.test(header)) {\n lastValue = headers[header];\n delete headers[header];\n }\n }\n return (lastValue === null || typeof lastValue === \"undefined\") ?\n undefined : String(lastValue).trim();\n}\n\nfunction createErrorType(code, defaultMessage) {\n function CustomError(cause) {\n Error.captureStackTrace(this, this.constructor);\n if (!cause) {\n this.message = defaultMessage;\n }\n else {\n this.message = defaultMessage + \": \" + cause.message;\n this.cause = cause;\n }\n }\n CustomError.prototype = new Error();\n CustomError.prototype.constructor = CustomError;\n CustomError.prototype.name = \"Error [\" + code + \"]\";\n CustomError.prototype.code = code;\n return CustomError;\n}\n\nfunction abortRequest(request) {\n for (var e = 0; e < events.length; e++) {\n request.removeListener(events[e], eventHandlers[events[e]]);\n }\n request.on(\"error\", noop);\n request.abort();\n}\n\nfunction isSubdomainOf(subdomain, domain) {\n const dot = subdomain.length - domain.length - 1;\n return dot > 0 && subdomain[dot] === \".\" && subdomain.endsWith(domain);\n}\n\n// Exports\nmodule.exports = wrap({ http: http, https: https });\nmodule.exports.wrap = wrap;\n","'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/*!\n * is-plain-object \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexports.isPlainObject = isPlainObject;\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar Stream = _interopDefault(require('stream'));\nvar http = _interopDefault(require('http'));\nvar Url = _interopDefault(require('url'));\nvar whatwgUrl = _interopDefault(require('whatwg-url'));\nvar https = _interopDefault(require('https'));\nvar zlib = _interopDefault(require('zlib'));\n\n// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js\n\n// fix for \"Readable\" isn't a named export issue\nconst Readable = Stream.Readable;\n\nconst BUFFER = Symbol('buffer');\nconst TYPE = Symbol('type');\n\nclass Blob {\n\tconstructor() {\n\t\tthis[TYPE] = '';\n\n\t\tconst blobParts = arguments[0];\n\t\tconst options = arguments[1];\n\n\t\tconst buffers = [];\n\t\tlet size = 0;\n\n\t\tif (blobParts) {\n\t\t\tconst a = blobParts;\n\t\t\tconst length = Number(a.length);\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tconst element = a[i];\n\t\t\t\tlet buffer;\n\t\t\t\tif (element instanceof Buffer) {\n\t\t\t\t\tbuffer = element;\n\t\t\t\t} else if (ArrayBuffer.isView(element)) {\n\t\t\t\t\tbuffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);\n\t\t\t\t} else if (element instanceof ArrayBuffer) {\n\t\t\t\t\tbuffer = Buffer.from(element);\n\t\t\t\t} else if (element instanceof Blob) {\n\t\t\t\t\tbuffer = element[BUFFER];\n\t\t\t\t} else {\n\t\t\t\t\tbuffer = Buffer.from(typeof element === 'string' ? element : String(element));\n\t\t\t\t}\n\t\t\t\tsize += buffer.length;\n\t\t\t\tbuffers.push(buffer);\n\t\t\t}\n\t\t}\n\n\t\tthis[BUFFER] = Buffer.concat(buffers);\n\n\t\tlet type = options && options.type !== undefined && String(options.type).toLowerCase();\n\t\tif (type && !/[^\\u0020-\\u007E]/.test(type)) {\n\t\t\tthis[TYPE] = type;\n\t\t}\n\t}\n\tget size() {\n\t\treturn this[BUFFER].length;\n\t}\n\tget type() {\n\t\treturn this[TYPE];\n\t}\n\ttext() {\n\t\treturn Promise.resolve(this[BUFFER].toString());\n\t}\n\tarrayBuffer() {\n\t\tconst buf = this[BUFFER];\n\t\tconst ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\treturn Promise.resolve(ab);\n\t}\n\tstream() {\n\t\tconst readable = new Readable();\n\t\treadable._read = function () {};\n\t\treadable.push(this[BUFFER]);\n\t\treadable.push(null);\n\t\treturn readable;\n\t}\n\ttoString() {\n\t\treturn '[object Blob]';\n\t}\n\tslice() {\n\t\tconst size = this.size;\n\n\t\tconst start = arguments[0];\n\t\tconst end = arguments[1];\n\t\tlet relativeStart, relativeEnd;\n\t\tif (start === undefined) {\n\t\t\trelativeStart = 0;\n\t\t} else if (start < 0) {\n\t\t\trelativeStart = Math.max(size + start, 0);\n\t\t} else {\n\t\t\trelativeStart = Math.min(start, size);\n\t\t}\n\t\tif (end === undefined) {\n\t\t\trelativeEnd = size;\n\t\t} else if (end < 0) {\n\t\t\trelativeEnd = Math.max(size + end, 0);\n\t\t} else {\n\t\t\trelativeEnd = Math.min(end, size);\n\t\t}\n\t\tconst span = Math.max(relativeEnd - relativeStart, 0);\n\n\t\tconst buffer = this[BUFFER];\n\t\tconst slicedBuffer = buffer.slice(relativeStart, relativeStart + span);\n\t\tconst blob = new Blob([], { type: arguments[2] });\n\t\tblob[BUFFER] = slicedBuffer;\n\t\treturn blob;\n\t}\n}\n\nObject.defineProperties(Blob.prototype, {\n\tsize: { enumerable: true },\n\ttype: { enumerable: true },\n\tslice: { enumerable: true }\n});\n\nObject.defineProperty(Blob.prototype, Symbol.toStringTag, {\n\tvalue: 'Blob',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error message for human\n * @param String type Error type for machine\n * @param String systemError For Node.js system error\n * @return FetchError\n */\nfunction FetchError(message, type, systemError) {\n Error.call(this, message);\n\n this.message = message;\n this.type = type;\n\n // when err.type is `system`, err.code contains system error code\n if (systemError) {\n this.code = this.errno = systemError.code;\n }\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nFetchError.prototype = Object.create(Error.prototype);\nFetchError.prototype.constructor = FetchError;\nFetchError.prototype.name = 'FetchError';\n\nlet convert;\ntry {\n\tconvert = require('encoding').convert;\n} catch (e) {}\n\nconst INTERNALS = Symbol('Body internals');\n\n// fix an issue where \"PassThrough\" isn't a named export for node <10\nconst PassThrough = Stream.PassThrough;\n\n/**\n * Body mixin\n *\n * Ref: https://fetch.spec.whatwg.org/#body\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nfunction Body(body) {\n\tvar _this = this;\n\n\tvar _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n\t _ref$size = _ref.size;\n\n\tlet size = _ref$size === undefined ? 0 : _ref$size;\n\tvar _ref$timeout = _ref.timeout;\n\tlet timeout = _ref$timeout === undefined ? 0 : _ref$timeout;\n\n\tif (body == null) {\n\t\t// body is undefined or null\n\t\tbody = null;\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\tbody = Buffer.from(body.toString());\n\t} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\tbody = Buffer.from(body);\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\tbody = Buffer.from(body.buffer, body.byteOffset, body.byteLength);\n\t} else if (body instanceof Stream) ; else {\n\t\t// none of the above\n\t\t// coerce to string then buffer\n\t\tbody = Buffer.from(String(body));\n\t}\n\tthis[INTERNALS] = {\n\t\tbody,\n\t\tdisturbed: false,\n\t\terror: null\n\t};\n\tthis.size = size;\n\tthis.timeout = timeout;\n\n\tif (body instanceof Stream) {\n\t\tbody.on('error', function (err) {\n\t\t\tconst error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);\n\t\t\t_this[INTERNALS].error = error;\n\t\t});\n\t}\n}\n\nBody.prototype = {\n\tget body() {\n\t\treturn this[INTERNALS].body;\n\t},\n\n\tget bodyUsed() {\n\t\treturn this[INTERNALS].disturbed;\n\t},\n\n\t/**\n * Decode response as ArrayBuffer\n *\n * @return Promise\n */\n\tarrayBuffer() {\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\t});\n\t},\n\n\t/**\n * Return raw response as Blob\n *\n * @return Promise\n */\n\tblob() {\n\t\tlet ct = this.headers && this.headers.get('content-type') || '';\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn Object.assign(\n\t\t\t// Prevent copying\n\t\t\tnew Blob([], {\n\t\t\t\ttype: ct.toLowerCase()\n\t\t\t}), {\n\t\t\t\t[BUFFER]: buf\n\t\t\t});\n\t\t});\n\t},\n\n\t/**\n * Decode response as json\n *\n * @return Promise\n */\n\tjson() {\n\t\tvar _this2 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(buffer.toString());\n\t\t\t} catch (err) {\n\t\t\t\treturn Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n * Decode response as text\n *\n * @return Promise\n */\n\ttext() {\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn buffer.toString();\n\t\t});\n\t},\n\n\t/**\n * Decode response as buffer (non-spec api)\n *\n * @return Promise\n */\n\tbuffer() {\n\t\treturn consumeBody.call(this);\n\t},\n\n\t/**\n * Decode response as text, while automatically detecting the encoding and\n * trying to decode to UTF-8 (non-spec api)\n *\n * @return Promise\n */\n\ttextConverted() {\n\t\tvar _this3 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn convertBody(buffer, _this3.headers);\n\t\t});\n\t}\n};\n\n// In browsers, all properties are enumerable.\nObject.defineProperties(Body.prototype, {\n\tbody: { enumerable: true },\n\tbodyUsed: { enumerable: true },\n\tarrayBuffer: { enumerable: true },\n\tblob: { enumerable: true },\n\tjson: { enumerable: true },\n\ttext: { enumerable: true }\n});\n\nBody.mixIn = function (proto) {\n\tfor (const name of Object.getOwnPropertyNames(Body.prototype)) {\n\t\t// istanbul ignore else: future proof\n\t\tif (!(name in proto)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(Body.prototype, name);\n\t\t\tObject.defineProperty(proto, name, desc);\n\t\t}\n\t}\n};\n\n/**\n * Consume and convert an entire Body to a Buffer.\n *\n * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body\n *\n * @return Promise\n */\nfunction consumeBody() {\n\tvar _this4 = this;\n\n\tif (this[INTERNALS].disturbed) {\n\t\treturn Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));\n\t}\n\n\tthis[INTERNALS].disturbed = true;\n\n\tif (this[INTERNALS].error) {\n\t\treturn Body.Promise.reject(this[INTERNALS].error);\n\t}\n\n\tlet body = this.body;\n\n\t// body is null\n\tif (body === null) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is blob\n\tif (isBlob(body)) {\n\t\tbody = body.stream();\n\t}\n\n\t// body is buffer\n\tif (Buffer.isBuffer(body)) {\n\t\treturn Body.Promise.resolve(body);\n\t}\n\n\t// istanbul ignore if: should never happen\n\tif (!(body instanceof Stream)) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is stream\n\t// get ready to actually consume the body\n\tlet accum = [];\n\tlet accumBytes = 0;\n\tlet abort = false;\n\n\treturn new Body.Promise(function (resolve, reject) {\n\t\tlet resTimeout;\n\n\t\t// allow timeout on slow response body\n\t\tif (_this4.timeout) {\n\t\t\tresTimeout = setTimeout(function () {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));\n\t\t\t}, _this4.timeout);\n\t\t}\n\n\t\t// handle stream errors\n\t\tbody.on('error', function (err) {\n\t\t\tif (err.name === 'AbortError') {\n\t\t\t\t// if the request was aborted, reject with this Error\n\t\t\t\tabort = true;\n\t\t\t\treject(err);\n\t\t\t} else {\n\t\t\t\t// other errors, such as incorrect content-encoding\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\n\t\tbody.on('data', function (chunk) {\n\t\t\tif (abort || chunk === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_this4.size && accumBytes + chunk.length > _this4.size) {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taccumBytes += chunk.length;\n\t\t\taccum.push(chunk);\n\t\t});\n\n\t\tbody.on('end', function () {\n\t\t\tif (abort) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(resTimeout);\n\n\t\t\ttry {\n\t\t\t\tresolve(Buffer.concat(accum, accumBytes));\n\t\t\t} catch (err) {\n\t\t\t\t// handle streams that have accumulated too much data (issue #414)\n\t\t\t\treject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect buffer encoding and convert to target encoding\n * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding\n *\n * @param Buffer buffer Incoming buffer\n * @param String encoding Target encoding\n * @return String\n */\nfunction convertBody(buffer, headers) {\n\tif (typeof convert !== 'function') {\n\t\tthrow new Error('The package `encoding` must be installed to use the textConverted() function');\n\t}\n\n\tconst ct = headers.get('content-type');\n\tlet charset = 'utf-8';\n\tlet res, str;\n\n\t// header\n\tif (ct) {\n\t\tres = /charset=([^;]*)/i.exec(ct);\n\t}\n\n\t// no charset in content type, peek at response body for at most 1024 bytes\n\tstr = buffer.slice(0, 1024).toString();\n\n\t// html5\n\tif (!res && str) {\n\t\tres = / 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n\t\tthis[MAP] = Object.create(null);\n\n\t\tif (init instanceof Headers) {\n\t\t\tconst rawHeaders = init.raw();\n\t\t\tconst headerNames = Object.keys(rawHeaders);\n\n\t\t\tfor (const headerName of headerNames) {\n\t\t\t\tfor (const value of rawHeaders[headerName]) {\n\t\t\t\t\tthis.append(headerName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't worry about converting prop to ByteString here as append()\n\t\t// will handle it.\n\t\tif (init == null) ; else if (typeof init === 'object') {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\tif (method != null) {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// sequence>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tconst pairs = [];\n\t\t\t\tfor (const pair of init) {\n\t\t\t\t\tif (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be iterable');\n\t\t\t\t\t}\n\t\t\t\t\tpairs.push(Array.from(pair));\n\t\t\t\t}\n\n\t\t\t\tfor (const pair of pairs) {\n\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t}\n\t\t\t\t\tthis.append(pair[0], pair[1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// record\n\t\t\t\tfor (const key of Object.keys(init)) {\n\t\t\t\t\tconst value = init[key];\n\t\t\t\t\tthis.append(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Provided initializer must be an object');\n\t\t}\n\t}\n\n\t/**\n * Return combined header value given name\n *\n * @param String name Header name\n * @return Mixed\n */\n\tget(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this[MAP][key].join(', ');\n\t}\n\n\t/**\n * Iterate over all headers\n *\n * @param Function callback Executed for each item with parameters (value, name, thisArg)\n * @param Boolean thisArg `this` context for callback function\n * @return Void\n */\n\tforEach(callback) {\n\t\tlet thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\tlet pairs = getHeaders(this);\n\t\tlet i = 0;\n\t\twhile (i < pairs.length) {\n\t\t\tvar _pairs$i = pairs[i];\n\t\t\tconst name = _pairs$i[0],\n\t\t\t value = _pairs$i[1];\n\n\t\t\tcallback.call(thisArg, value, name, this);\n\t\t\tpairs = getHeaders(this);\n\t\t\ti++;\n\t\t}\n\t}\n\n\t/**\n * Overwrite header values given name\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tset(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}\n\n\t/**\n * Append a value onto existing header\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tappend(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP][name] = [value];\n\t\t}\n\t}\n\n\t/**\n * Check for header name existence\n *\n * @param String name Header name\n * @return Boolean\n */\n\thas(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\treturn find(this[MAP], name) !== undefined;\n\t}\n\n\t/**\n * Delete all header values given name\n *\n * @param String name Header name\n * @return Void\n */\n\tdelete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP][key];\n\t\t}\n\t}\n\n\t/**\n * Return raw headers (non-spec api)\n *\n * @return Object\n */\n\traw() {\n\t\treturn this[MAP];\n\t}\n\n\t/**\n * Get an iterator on keys.\n *\n * @return Iterator\n */\n\tkeys() {\n\t\treturn createHeadersIterator(this, 'key');\n\t}\n\n\t/**\n * Get an iterator on values.\n *\n * @return Iterator\n */\n\tvalues() {\n\t\treturn createHeadersIterator(this, 'value');\n\t}\n\n\t/**\n * Get an iterator on entries.\n *\n * This is the default iterator of the Headers object.\n *\n * @return Iterator\n */\n\t[Symbol.iterator]() {\n\t\treturn createHeadersIterator(this, 'key+value');\n\t}\n}\nHeaders.prototype.entries = Headers.prototype[Symbol.iterator];\n\nObject.defineProperty(Headers.prototype, Symbol.toStringTag, {\n\tvalue: 'Headers',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Headers.prototype, {\n\tget: { enumerable: true },\n\tforEach: { enumerable: true },\n\tset: { enumerable: true },\n\tappend: { enumerable: true },\n\thas: { enumerable: true },\n\tdelete: { enumerable: true },\n\tkeys: { enumerable: true },\n\tvalues: { enumerable: true },\n\tentries: { enumerable: true }\n});\n\nfunction getHeaders(headers) {\n\tlet kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';\n\n\tconst keys = Object.keys(headers[MAP]).sort();\n\treturn keys.map(kind === 'key' ? function (k) {\n\t\treturn k.toLowerCase();\n\t} : kind === 'value' ? function (k) {\n\t\treturn headers[MAP][k].join(', ');\n\t} : function (k) {\n\t\treturn [k.toLowerCase(), headers[MAP][k].join(', ')];\n\t});\n}\n\nconst INTERNAL = Symbol('internal');\n\nfunction createHeadersIterator(target, kind) {\n\tconst iterator = Object.create(HeadersIteratorPrototype);\n\titerator[INTERNAL] = {\n\t\ttarget,\n\t\tkind,\n\t\tindex: 0\n\t};\n\treturn iterator;\n}\n\nconst HeadersIteratorPrototype = Object.setPrototypeOf({\n\tnext() {\n\t\t// istanbul ignore if\n\t\tif (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {\n\t\t\tthrow new TypeError('Value of `this` is not a HeadersIterator');\n\t\t}\n\n\t\tvar _INTERNAL = this[INTERNAL];\n\t\tconst target = _INTERNAL.target,\n\t\t kind = _INTERNAL.kind,\n\t\t index = _INTERNAL.index;\n\n\t\tconst values = getHeaders(target, kind);\n\t\tconst len = values.length;\n\t\tif (index >= len) {\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tthis[INTERNAL].index = index + 1;\n\n\t\treturn {\n\t\t\tvalue: values[index],\n\t\t\tdone: false\n\t\t};\n\t}\n}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));\n\nObject.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {\n\tvalue: 'HeadersIterator',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * Export the Headers object in a form that Node.js can consume.\n *\n * @param Headers headers\n * @return Object\n */\nfunction exportNodeCompatibleHeaders(headers) {\n\tconst obj = Object.assign({ __proto__: null }, headers[MAP]);\n\n\t// http.request() only supports string as Host header. This hack makes\n\t// specifying custom Host header possible.\n\tconst hostHeaderKey = find(headers[MAP], 'Host');\n\tif (hostHeaderKey !== undefined) {\n\t\tobj[hostHeaderKey] = obj[hostHeaderKey][0];\n\t}\n\n\treturn obj;\n}\n\n/**\n * Create a Headers object from an object of headers, ignoring those that do\n * not conform to HTTP grammar productions.\n *\n * @param Object obj Object of headers\n * @return Headers\n */\nfunction createHeadersLenient(obj) {\n\tconst headers = new Headers();\n\tfor (const name of Object.keys(obj)) {\n\t\tif (invalidTokenRegex.test(name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(obj[name])) {\n\t\t\tfor (const val of obj[name]) {\n\t\t\t\tif (invalidHeaderCharRegex.test(val)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (headers[MAP][name] === undefined) {\n\t\t\t\t\theaders[MAP][name] = [val];\n\t\t\t\t} else {\n\t\t\t\t\theaders[MAP][name].push(val);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!invalidHeaderCharRegex.test(obj[name])) {\n\t\t\theaders[MAP][name] = [obj[name]];\n\t\t}\n\t}\n\treturn headers;\n}\n\nconst INTERNALS$1 = Symbol('Response internals');\n\n// fix an issue where \"STATUS_CODES\" aren't a named export for node <10\nconst STATUS_CODES = http.STATUS_CODES;\n\n/**\n * Response class\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nclass Response {\n\tconstructor() {\n\t\tlet body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\tlet opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tBody.call(this, body, opts);\n\n\t\tconst status = opts.status || 200;\n\t\tconst headers = new Headers(opts.headers);\n\n\t\tif (body != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(body);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tthis[INTERNALS$1] = {\n\t\t\turl: opts.url,\n\t\t\tstatus,\n\t\t\tstatusText: opts.statusText || STATUS_CODES[status],\n\t\t\theaders,\n\t\t\tcounter: opts.counter\n\t\t};\n\t}\n\n\tget url() {\n\t\treturn this[INTERNALS$1].url || '';\n\t}\n\n\tget status() {\n\t\treturn this[INTERNALS$1].status;\n\t}\n\n\t/**\n * Convenience property representing if the request ended normally\n */\n\tget ok() {\n\t\treturn this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;\n\t}\n\n\tget redirected() {\n\t\treturn this[INTERNALS$1].counter > 0;\n\t}\n\n\tget statusText() {\n\t\treturn this[INTERNALS$1].statusText;\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$1].headers;\n\t}\n\n\t/**\n * Clone this response\n *\n * @return Response\n */\n\tclone() {\n\t\treturn new Response(clone(this), {\n\t\t\turl: this.url,\n\t\t\tstatus: this.status,\n\t\t\tstatusText: this.statusText,\n\t\t\theaders: this.headers,\n\t\t\tok: this.ok,\n\t\t\tredirected: this.redirected\n\t\t});\n\t}\n}\n\nBody.mixIn(Response.prototype);\n\nObject.defineProperties(Response.prototype, {\n\turl: { enumerable: true },\n\tstatus: { enumerable: true },\n\tok: { enumerable: true },\n\tredirected: { enumerable: true },\n\tstatusText: { enumerable: true },\n\theaders: { enumerable: true },\n\tclone: { enumerable: true }\n});\n\nObject.defineProperty(Response.prototype, Symbol.toStringTag, {\n\tvalue: 'Response',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nconst INTERNALS$2 = Symbol('Request internals');\nconst URL = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"format\", \"parse\" aren't a named export for node <10\nconst parse_url = Url.parse;\nconst format_url = Url.format;\n\n/**\n * Wrapper around `new URL` to handle arbitrary URLs\n *\n * @param {string} urlStr\n * @return {void}\n */\nfunction parseURL(urlStr) {\n\t/*\n \tCheck whether the URL is absolute or not\n \t\tScheme: https://tools.ietf.org/html/rfc3986#section-3.1\n \tAbsolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\n */\n\tif (/^[a-zA-Z][a-zA-Z\\d+\\-.]*:/.exec(urlStr)) {\n\t\turlStr = new URL(urlStr).toString();\n\t}\n\n\t// Fallback to old implementation for arbitrary URLs\n\treturn parse_url(urlStr);\n}\n\nconst streamDestructionSupported = 'destroy' in Stream.Readable.prototype;\n\n/**\n * Check if a value is an instance of Request.\n *\n * @param Mixed input\n * @return Boolean\n */\nfunction isRequest(input) {\n\treturn typeof input === 'object' && typeof input[INTERNALS$2] === 'object';\n}\n\nfunction isAbortSignal(signal) {\n\tconst proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);\n\treturn !!(proto && proto.constructor.name === 'AbortSignal');\n}\n\n/**\n * Request class\n *\n * @param Mixed input Url or Request instance\n * @param Object init Custom options\n * @return Void\n */\nclass Request {\n\tconstructor(input) {\n\t\tlet init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tlet parsedURL;\n\n\t\t// normalize input\n\t\tif (!isRequest(input)) {\n\t\t\tif (input && input.href) {\n\t\t\t\t// in order to support Node.js' Url objects; though WHATWG's URL objects\n\t\t\t\t// will fall into this branch also (since their `toString()` will return\n\t\t\t\t// `href` property anyway)\n\t\t\t\tparsedURL = parseURL(input.href);\n\t\t\t} else {\n\t\t\t\t// coerce input to a string before attempting to parse\n\t\t\t\tparsedURL = parseURL(`${input}`);\n\t\t\t}\n\t\t\tinput = {};\n\t\t} else {\n\t\t\tparsedURL = parseURL(input.url);\n\t\t}\n\n\t\tlet method = init.method || input.method || 'GET';\n\t\tmethod = method.toUpperCase();\n\n\t\tif ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {\n\t\t\tthrow new TypeError('Request with GET/HEAD method cannot have body');\n\t\t}\n\n\t\tlet inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n\n\t\tBody.call(this, inputBody, {\n\t\t\ttimeout: init.timeout || input.timeout || 0,\n\t\t\tsize: init.size || input.size || 0\n\t\t});\n\n\t\tconst headers = new Headers(init.headers || input.headers || {});\n\n\t\tif (inputBody != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(inputBody);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tlet signal = isRequest(input) ? input.signal : null;\n\t\tif ('signal' in init) signal = init.signal;\n\n\t\tif (signal != null && !isAbortSignal(signal)) {\n\t\t\tthrow new TypeError('Expected signal to be an instanceof AbortSignal');\n\t\t}\n\n\t\tthis[INTERNALS$2] = {\n\t\t\tmethod,\n\t\t\tredirect: init.redirect || input.redirect || 'follow',\n\t\t\theaders,\n\t\t\tparsedURL,\n\t\t\tsignal\n\t\t};\n\n\t\t// node-fetch-only options\n\t\tthis.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n\t\tthis.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n\t\tthis.counter = init.counter || input.counter || 0;\n\t\tthis.agent = init.agent || input.agent;\n\t}\n\n\tget method() {\n\t\treturn this[INTERNALS$2].method;\n\t}\n\n\tget url() {\n\t\treturn format_url(this[INTERNALS$2].parsedURL);\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$2].headers;\n\t}\n\n\tget redirect() {\n\t\treturn this[INTERNALS$2].redirect;\n\t}\n\n\tget signal() {\n\t\treturn this[INTERNALS$2].signal;\n\t}\n\n\t/**\n * Clone this request\n *\n * @return Request\n */\n\tclone() {\n\t\treturn new Request(this);\n\t}\n}\n\nBody.mixIn(Request.prototype);\n\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n\tvalue: 'Request',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Request.prototype, {\n\tmethod: { enumerable: true },\n\turl: { enumerable: true },\n\theaders: { enumerable: true },\n\tredirect: { enumerable: true },\n\tclone: { enumerable: true },\n\tsignal: { enumerable: true }\n});\n\n/**\n * Convert a Request to Node.js http request options.\n *\n * @param Request A Request instance\n * @return Object The options object to be passed to http.request\n */\nfunction getNodeRequestOptions(request) {\n\tconst parsedURL = request[INTERNALS$2].parsedURL;\n\tconst headers = new Headers(request[INTERNALS$2].headers);\n\n\t// fetch step 1.3\n\tif (!headers.has('Accept')) {\n\t\theaders.set('Accept', '*/*');\n\t}\n\n\t// Basic fetch\n\tif (!parsedURL.protocol || !parsedURL.hostname) {\n\t\tthrow new TypeError('Only absolute URLs are supported');\n\t}\n\n\tif (!/^https?:$/.test(parsedURL.protocol)) {\n\t\tthrow new TypeError('Only HTTP(S) protocols are supported');\n\t}\n\n\tif (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {\n\t\tthrow new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');\n\t}\n\n\t// HTTP-network-or-cache fetch steps 2.4-2.7\n\tlet contentLengthValue = null;\n\tif (request.body == null && /^(POST|PUT)$/i.test(request.method)) {\n\t\tcontentLengthValue = '0';\n\t}\n\tif (request.body != null) {\n\t\tconst totalBytes = getTotalBytes(request);\n\t\tif (typeof totalBytes === 'number') {\n\t\t\tcontentLengthValue = String(totalBytes);\n\t\t}\n\t}\n\tif (contentLengthValue) {\n\t\theaders.set('Content-Length', contentLengthValue);\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.11\n\tif (!headers.has('User-Agent')) {\n\t\theaders.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.15\n\tif (request.compress && !headers.has('Accept-Encoding')) {\n\t\theaders.set('Accept-Encoding', 'gzip,deflate');\n\t}\n\n\tlet agent = request.agent;\n\tif (typeof agent === 'function') {\n\t\tagent = agent(parsedURL);\n\t}\n\n\tif (!headers.has('Connection') && !agent) {\n\t\theaders.set('Connection', 'close');\n\t}\n\n\t// HTTP-network fetch step 4.2\n\t// chunked encoding is handled by Node.js\n\n\treturn Object.assign({}, parsedURL, {\n\t\tmethod: request.method,\n\t\theaders: exportNodeCompatibleHeaders(headers),\n\t\tagent\n\t});\n}\n\n/**\n * abort-error.js\n *\n * AbortError interface for cancelled requests\n */\n\n/**\n * Create AbortError instance\n *\n * @param String message Error message for human\n * @return AbortError\n */\nfunction AbortError(message) {\n Error.call(this, message);\n\n this.type = 'aborted';\n this.message = message;\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nAbortError.prototype = Object.create(Error.prototype);\nAbortError.prototype.constructor = AbortError;\nAbortError.prototype.name = 'AbortError';\n\nconst URL$1 = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"PassThrough\", \"resolve\" aren't a named export for node <10\nconst PassThrough$1 = Stream.PassThrough;\n\nconst isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {\n\tconst orig = new URL$1(original).hostname;\n\tconst dest = new URL$1(destination).hostname;\n\n\treturn orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);\n};\n\n/**\n * Fetch function\n *\n * @param Mixed url Absolute url or Request instance\n * @param Object opts Fetch options\n * @return Promise\n */\nfunction fetch(url, opts) {\n\n\t// allow custom promise\n\tif (!fetch.Promise) {\n\t\tthrow new Error('native promise missing, set fetch.Promise to your favorite alternative');\n\t}\n\n\tBody.Promise = fetch.Promise;\n\n\t// wrap http.request into fetch\n\treturn new fetch.Promise(function (resolve, reject) {\n\t\t// build request object\n\t\tconst request = new Request(url, opts);\n\t\tconst options = getNodeRequestOptions(request);\n\n\t\tconst send = (options.protocol === 'https:' ? https : http).request;\n\t\tconst signal = request.signal;\n\n\t\tlet response = null;\n\n\t\tconst abort = function abort() {\n\t\t\tlet error = new AbortError('The user aborted a request.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof Stream.Readable) {\n\t\t\t\trequest.body.destroy(error);\n\t\t\t}\n\t\t\tif (!response || !response.body) return;\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = function abortAndFinalize() {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// send request\n\t\tconst req = send(options);\n\t\tlet reqTimeout;\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tfunction finalize() {\n\t\t\treq.abort();\n\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\tclearTimeout(reqTimeout);\n\t\t}\n\n\t\tif (request.timeout) {\n\t\t\treq.once('socket', function (socket) {\n\t\t\t\treqTimeout = setTimeout(function () {\n\t\t\t\t\treject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));\n\t\t\t\t\tfinalize();\n\t\t\t\t}, request.timeout);\n\t\t\t});\n\t\t}\n\n\t\treq.on('error', function (err) {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));\n\t\t\tfinalize();\n\t\t});\n\n\t\treq.on('response', function (res) {\n\t\t\tclearTimeout(reqTimeout);\n\n\t\t\tconst headers = createHeadersLenient(res.headers);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (fetch.isRedirect(res.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tlet locationURL = null;\n\t\t\t\ttry {\n\t\t\t\t\tlocationURL = location === null ? null : new URL$1(location, request.url).toString();\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// error here can only be invalid URL in Location: header\n\t\t\t\t\t// do not throw when options.redirect == manual\n\t\t\t\t\t// let the user extract the errorneous redirect URL\n\t\t\t\t\tif (request.redirect !== 'manual') {\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.\n\t\t\t\t\t\tif (locationURL !== null) {\n\t\t\t\t\t\t\t// handle corrupted header\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\theaders.set('Location', locationURL);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow':\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOpts = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: request.body,\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\ttimeout: request.timeout,\n\t\t\t\t\t\t\tsize: request.size\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (!isDomainOrSubdomain(request.url, locationURL)) {\n\t\t\t\t\t\t\tfor (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {\n\t\t\t\t\t\t\t\trequestOpts.headers.delete(name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {\n\t\t\t\t\t\t\trequestOpts.method = 'GET';\n\t\t\t\t\t\t\trequestOpts.body = undefined;\n\t\t\t\t\t\t\trequestOpts.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOpts)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// prepare response\n\t\t\tres.once('end', function () {\n\t\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\t});\n\t\t\tlet body = res.pipe(new PassThrough$1());\n\n\t\t\tconst response_options = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: res.statusCode,\n\t\t\t\tstatusText: res.statusMessage,\n\t\t\t\theaders: headers,\n\t\t\t\tsize: request.size,\n\t\t\t\ttimeout: request.timeout,\n\t\t\t\tcounter: request.counter\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: zlib.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: zlib.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// for gzip\n\t\t\tif (codings == 'gzip' || codings == 'x-gzip') {\n\t\t\t\tbody = body.pipe(zlib.createGunzip(zlibOptions));\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for deflate\n\t\t\tif (codings == 'deflate' || codings == 'x-deflate') {\n\t\t\t\t// handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = res.pipe(new PassThrough$1());\n\t\t\t\traw.once('data', function (chunk) {\n\t\t\t\t\t// see http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflate());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflateRaw());\n\t\t\t\t\t}\n\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for br\n\t\t\tif (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {\n\t\t\t\tbody = body.pipe(zlib.createBrotliDecompress());\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// otherwise, use response as-is\n\t\t\tresponse = new Response(body, response_options);\n\t\t\tresolve(response);\n\t\t});\n\n\t\twriteToStream(req, request);\n\t});\n}\n/**\n * Redirect code matching\n *\n * @param Number code Status code\n * @return Boolean\n */\nfetch.isRedirect = function (code) {\n\treturn code === 301 || code === 302 || code === 303 || code === 307 || code === 308;\n};\n\n// expose Promise\nfetch.Promise = global.Promise;\n\nmodule.exports = exports = fetch;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = exports;\nexports.Headers = Headers;\nexports.Request = Request;\nexports.Response = Response;\nexports.FetchError = FetchError;\n","\"use strict\";\n\nvar punycode = require(\"punycode\");\nvar mappingTable = require(\"./lib/mappingTable.json\");\n\nvar PROCESSING_OPTIONS = {\n TRANSITIONAL: 0,\n NONTRANSITIONAL: 1\n};\n\nfunction normalize(str) { // fix bug in v8\n return str.split('\\u0000').map(function (s) { return s.normalize('NFC'); }).join('\\u0000');\n}\n\nfunction findStatus(val) {\n var start = 0;\n var end = mappingTable.length - 1;\n\n while (start <= end) {\n var mid = Math.floor((start + end) / 2);\n\n var target = mappingTable[mid];\n if (target[0][0] <= val && target[0][1] >= val) {\n return target;\n } else if (target[0][0] > val) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n\n return null;\n}\n\nvar regexAstralSymbols = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n\nfunction countSymbols(string) {\n return string\n // replace every surrogate pair with a BMP symbol\n .replace(regexAstralSymbols, '_')\n // then get the length\n .length;\n}\n\nfunction mapChars(domain_name, useSTD3, processing_option) {\n var hasError = false;\n var processed = \"\";\n\n var len = countSymbols(domain_name);\n for (var i = 0; i < len; ++i) {\n var codePoint = domain_name.codePointAt(i);\n var status = findStatus(codePoint);\n\n switch (status[1]) {\n case \"disallowed\":\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n break;\n case \"ignored\":\n break;\n case \"mapped\":\n processed += String.fromCodePoint.apply(String, status[2]);\n break;\n case \"deviation\":\n if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {\n processed += String.fromCodePoint.apply(String, status[2]);\n } else {\n processed += String.fromCodePoint(codePoint);\n }\n break;\n case \"valid\":\n processed += String.fromCodePoint(codePoint);\n break;\n case \"disallowed_STD3_mapped\":\n if (useSTD3) {\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n } else {\n processed += String.fromCodePoint.apply(String, status[2]);\n }\n break;\n case \"disallowed_STD3_valid\":\n if (useSTD3) {\n hasError = true;\n }\n\n processed += String.fromCodePoint(codePoint);\n break;\n }\n }\n\n return {\n string: processed,\n error: hasError\n };\n}\n\nvar combiningMarksRegex = /[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E4-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFC-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2D]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDE2C-\\uDE37\\uDEDF-\\uDEEA\\uDF01-\\uDF03\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDE30-\\uDE40\\uDEAB-\\uDEB7]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDF51-\\uDF7E\\uDF8F-\\uDF92]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD83A[\\uDCD0-\\uDCD6]|\\uDB40[\\uDD00-\\uDDEF]/;\n\nfunction validateLabel(label, processing_option) {\n if (label.substr(0, 4) === \"xn--\") {\n label = punycode.toUnicode(label);\n processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;\n }\n\n var error = false;\n\n if (normalize(label) !== label ||\n (label[3] === \"-\" && label[4] === \"-\") ||\n label[0] === \"-\" || label[label.length - 1] === \"-\" ||\n label.indexOf(\".\") !== -1 ||\n label.search(combiningMarksRegex) === 0) {\n error = true;\n }\n\n var len = countSymbols(label);\n for (var i = 0; i < len; ++i) {\n var status = findStatus(label.codePointAt(i));\n if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== \"valid\") ||\n (processing === PROCESSING_OPTIONS.NONTRANSITIONAL &&\n status[1] !== \"valid\" && status[1] !== \"deviation\")) {\n error = true;\n break;\n }\n }\n\n return {\n label: label,\n error: error\n };\n}\n\nfunction processing(domain_name, useSTD3, processing_option) {\n var result = mapChars(domain_name, useSTD3, processing_option);\n result.string = normalize(result.string);\n\n var labels = result.string.split(\".\");\n for (var i = 0; i < labels.length; ++i) {\n try {\n var validation = validateLabel(labels[i]);\n labels[i] = validation.label;\n result.error = result.error || validation.error;\n } catch(e) {\n result.error = true;\n }\n }\n\n return {\n string: labels.join(\".\"),\n error: result.error\n };\n}\n\nmodule.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) {\n var result = processing(domain_name, useSTD3, processing_option);\n var labels = result.string.split(\".\");\n labels = labels.map(function(l) {\n try {\n return punycode.toASCII(l);\n } catch(e) {\n result.error = true;\n return l;\n }\n });\n\n if (verifyDnsLength) {\n var total = labels.slice(0, labels.length - 1).join(\".\").length;\n if (total.length > 253 || total.length === 0) {\n result.error = true;\n }\n\n for (var i=0; i < labels.length; ++i) {\n if (labels.length > 63 || labels.length === 0) {\n result.error = true;\n break;\n }\n }\n }\n\n if (result.error) return null;\n return labels.join(\".\");\n};\n\nmodule.exports.toUnicode = function(domain_name, useSTD3) {\n var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL);\n\n return {\n domain: result.string,\n error: result.error\n };\n};\n\nmodule.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;\n","\"use strict\";\n\nvar conversions = {};\nmodule.exports = conversions;\n\nfunction sign(x) {\n return x < 0 ? -1 : 1;\n}\n\nfunction evenRound(x) {\n // Round x to the nearest integer, choosing the even integer if it lies halfway between two.\n if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor)\n return Math.floor(x);\n } else {\n return Math.round(x);\n }\n}\n\nfunction createNumberConversion(bitLength, typeOpts) {\n if (!typeOpts.unsigned) {\n --bitLength;\n }\n const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength);\n const upperBound = Math.pow(2, bitLength) - 1;\n\n const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength);\n const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1);\n\n return function(V, opts) {\n if (!opts) opts = {};\n\n let x = +V;\n\n if (opts.enforceRange) {\n if (!Number.isFinite(x)) {\n throw new TypeError(\"Argument is not a finite number\");\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n if (x < lowerBound || x > upperBound) {\n throw new TypeError(\"Argument is not in byte range\");\n }\n\n return x;\n }\n\n if (!isNaN(x) && opts.clamp) {\n x = evenRound(x);\n\n if (x < lowerBound) x = lowerBound;\n if (x > upperBound) x = upperBound;\n return x;\n }\n\n if (!Number.isFinite(x) || x === 0) {\n return 0;\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n x = x % moduloVal;\n\n if (!typeOpts.unsigned && x >= moduloBound) {\n return x - moduloVal;\n } else if (typeOpts.unsigned) {\n if (x < 0) {\n x += moduloVal;\n } else if (x === -0) { // don't return negative zero\n return 0;\n }\n }\n\n return x;\n }\n}\n\nconversions[\"void\"] = function () {\n return undefined;\n};\n\nconversions[\"boolean\"] = function (val) {\n return !!val;\n};\n\nconversions[\"byte\"] = createNumberConversion(8, { unsigned: false });\nconversions[\"octet\"] = createNumberConversion(8, { unsigned: true });\n\nconversions[\"short\"] = createNumberConversion(16, { unsigned: false });\nconversions[\"unsigned short\"] = createNumberConversion(16, { unsigned: true });\n\nconversions[\"long\"] = createNumberConversion(32, { unsigned: false });\nconversions[\"unsigned long\"] = createNumberConversion(32, { unsigned: true });\n\nconversions[\"long long\"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 });\nconversions[\"unsigned long long\"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 });\n\nconversions[\"double\"] = function (V) {\n const x = +V;\n\n if (!Number.isFinite(x)) {\n throw new TypeError(\"Argument is not a finite floating-point value\");\n }\n\n return x;\n};\n\nconversions[\"unrestricted double\"] = function (V) {\n const x = +V;\n\n if (isNaN(x)) {\n throw new TypeError(\"Argument is NaN\");\n }\n\n return x;\n};\n\n// not quite valid, but good enough for JS\nconversions[\"float\"] = conversions[\"double\"];\nconversions[\"unrestricted float\"] = conversions[\"unrestricted double\"];\n\nconversions[\"DOMString\"] = function (V, opts) {\n if (!opts) opts = {};\n\n if (opts.treatNullAsEmptyString && V === null) {\n return \"\";\n }\n\n return String(V);\n};\n\nconversions[\"ByteString\"] = function (V, opts) {\n const x = String(V);\n let c = undefined;\n for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) {\n if (c > 255) {\n throw new TypeError(\"Argument is not a valid bytestring\");\n }\n }\n\n return x;\n};\n\nconversions[\"USVString\"] = function (V) {\n const S = String(V);\n const n = S.length;\n const U = [];\n for (let i = 0; i < n; ++i) {\n const c = S.charCodeAt(i);\n if (c < 0xD800 || c > 0xDFFF) {\n U.push(String.fromCodePoint(c));\n } else if (0xDC00 <= c && c <= 0xDFFF) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n if (i === n - 1) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n const d = S.charCodeAt(i + 1);\n if (0xDC00 <= d && d <= 0xDFFF) {\n const a = c & 0x3FF;\n const b = d & 0x3FF;\n U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b));\n ++i;\n } else {\n U.push(String.fromCodePoint(0xFFFD));\n }\n }\n }\n }\n\n return U.join('');\n};\n\nconversions[\"Date\"] = function (V, opts) {\n if (!(V instanceof Date)) {\n throw new TypeError(\"Argument is not a Date object\");\n }\n if (isNaN(V)) {\n return undefined;\n }\n\n return V;\n};\n\nconversions[\"RegExp\"] = function (V, opts) {\n if (!(V instanceof RegExp)) {\n V = new RegExp(V);\n }\n\n return V;\n};\n","\"use strict\";\nconst usm = require(\"./url-state-machine\");\n\nexports.implementation = class URLImpl {\n constructor(constructorArgs) {\n const url = constructorArgs[0];\n const base = constructorArgs[1];\n\n let parsedBase = null;\n if (base !== undefined) {\n parsedBase = usm.basicURLParse(base);\n if (parsedBase === \"failure\") {\n throw new TypeError(\"Invalid base URL\");\n }\n }\n\n const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });\n if (parsedURL === \"failure\") {\n throw new TypeError(\"Invalid URL\");\n }\n\n this._url = parsedURL;\n\n // TODO: query stuff\n }\n\n get href() {\n return usm.serializeURL(this._url);\n }\n\n set href(v) {\n const parsedURL = usm.basicURLParse(v);\n if (parsedURL === \"failure\") {\n throw new TypeError(\"Invalid URL\");\n }\n\n this._url = parsedURL;\n }\n\n get origin() {\n return usm.serializeURLOrigin(this._url);\n }\n\n get protocol() {\n return this._url.scheme + \":\";\n }\n\n set protocol(v) {\n usm.basicURLParse(v + \":\", { url: this._url, stateOverride: \"scheme start\" });\n }\n\n get username() {\n return this._url.username;\n }\n\n set username(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setTheUsername(this._url, v);\n }\n\n get password() {\n return this._url.password;\n }\n\n set password(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setThePassword(this._url, v);\n }\n\n get host() {\n const url = this._url;\n\n if (url.host === null) {\n return \"\";\n }\n\n if (url.port === null) {\n return usm.serializeHost(url.host);\n }\n\n return usm.serializeHost(url.host) + \":\" + usm.serializeInteger(url.port);\n }\n\n set host(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"host\" });\n }\n\n get hostname() {\n if (this._url.host === null) {\n return \"\";\n }\n\n return usm.serializeHost(this._url.host);\n }\n\n set hostname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"hostname\" });\n }\n\n get port() {\n if (this._url.port === null) {\n return \"\";\n }\n\n return usm.serializeInteger(this._url.port);\n }\n\n set port(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n if (v === \"\") {\n this._url.port = null;\n } else {\n usm.basicURLParse(v, { url: this._url, stateOverride: \"port\" });\n }\n }\n\n get pathname() {\n if (this._url.cannotBeABaseURL) {\n return this._url.path[0];\n }\n\n if (this._url.path.length === 0) {\n return \"\";\n }\n\n return \"/\" + this._url.path.join(\"/\");\n }\n\n set pathname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n this._url.path = [];\n usm.basicURLParse(v, { url: this._url, stateOverride: \"path start\" });\n }\n\n get search() {\n if (this._url.query === null || this._url.query === \"\") {\n return \"\";\n }\n\n return \"?\" + this._url.query;\n }\n\n set search(v) {\n // TODO: query stuff\n\n const url = this._url;\n\n if (v === \"\") {\n url.query = null;\n return;\n }\n\n const input = v[0] === \"?\" ? v.substring(1) : v;\n url.query = \"\";\n usm.basicURLParse(input, { url, stateOverride: \"query\" });\n }\n\n get hash() {\n if (this._url.fragment === null || this._url.fragment === \"\") {\n return \"\";\n }\n\n return \"#\" + this._url.fragment;\n }\n\n set hash(v) {\n if (v === \"\") {\n this._url.fragment = null;\n return;\n }\n\n const input = v[0] === \"#\" ? v.substring(1) : v;\n this._url.fragment = \"\";\n usm.basicURLParse(input, { url: this._url, stateOverride: \"fragment\" });\n }\n\n toJSON() {\n return this.href;\n }\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\nconst Impl = require(\".//URL-impl.js\");\n\nconst impl = utils.implSymbol;\n\nfunction URL(url) {\n if (!this || this[impl] || !(this instanceof URL)) {\n throw new TypeError(\"Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.\");\n }\n if (arguments.length < 1) {\n throw new TypeError(\"Failed to construct 'URL': 1 argument required, but only \" + arguments.length + \" present.\");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 2; ++i) {\n args[i] = arguments[i];\n }\n args[0] = conversions[\"USVString\"](args[0]);\n if (args[1] !== undefined) {\n args[1] = conversions[\"USVString\"](args[1]);\n }\n\n module.exports.setup(this, args);\n}\n\nURL.prototype.toJSON = function toJSON() {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 0; ++i) {\n args[i] = arguments[i];\n }\n return this[impl].toJSON.apply(this[impl], args);\n};\nObject.defineProperty(URL.prototype, \"href\", {\n get() {\n return this[impl].href;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].href = V;\n },\n enumerable: true,\n configurable: true\n});\n\nURL.prototype.toString = function () {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n return this.href;\n};\n\nObject.defineProperty(URL.prototype, \"origin\", {\n get() {\n return this[impl].origin;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"protocol\", {\n get() {\n return this[impl].protocol;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].protocol = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"username\", {\n get() {\n return this[impl].username;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].username = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"password\", {\n get() {\n return this[impl].password;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].password = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"host\", {\n get() {\n return this[impl].host;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].host = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"hostname\", {\n get() {\n return this[impl].hostname;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].hostname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"port\", {\n get() {\n return this[impl].port;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].port = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"pathname\", {\n get() {\n return this[impl].pathname;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].pathname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"search\", {\n get() {\n return this[impl].search;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].search = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"hash\", {\n get() {\n return this[impl].hash;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].hash = V;\n },\n enumerable: true,\n configurable: true\n});\n\n\nmodule.exports = {\n is(obj) {\n return !!obj && obj[impl] instanceof Impl.implementation;\n },\n create(constructorArgs, privateData) {\n let obj = Object.create(URL.prototype);\n this.setup(obj, constructorArgs, privateData);\n return obj;\n },\n setup(obj, constructorArgs, privateData) {\n if (!privateData) privateData = {};\n privateData.wrapper = obj;\n\n obj[impl] = new Impl.implementation(constructorArgs, privateData);\n obj[impl][utils.wrapperSymbol] = obj;\n },\n interface: URL,\n expose: {\n Window: { URL: URL },\n Worker: { URL: URL }\n }\n};\n\n","\"use strict\";\n\nexports.URL = require(\"./URL\").interface;\nexports.serializeURL = require(\"./url-state-machine\").serializeURL;\nexports.serializeURLOrigin = require(\"./url-state-machine\").serializeURLOrigin;\nexports.basicURLParse = require(\"./url-state-machine\").basicURLParse;\nexports.setTheUsername = require(\"./url-state-machine\").setTheUsername;\nexports.setThePassword = require(\"./url-state-machine\").setThePassword;\nexports.serializeHost = require(\"./url-state-machine\").serializeHost;\nexports.serializeInteger = require(\"./url-state-machine\").serializeInteger;\nexports.parseURL = require(\"./url-state-machine\").parseURL;\n","\"use strict\";\r\nconst punycode = require(\"punycode\");\r\nconst tr46 = require(\"tr46\");\r\n\r\nconst specialSchemes = {\r\n ftp: 21,\r\n file: null,\r\n gopher: 70,\r\n http: 80,\r\n https: 443,\r\n ws: 80,\r\n wss: 443\r\n};\r\n\r\nconst failure = Symbol(\"failure\");\r\n\r\nfunction countSymbols(str) {\r\n return punycode.ucs2.decode(str).length;\r\n}\r\n\r\nfunction at(input, idx) {\r\n const c = input[idx];\r\n return isNaN(c) ? undefined : String.fromCodePoint(c);\r\n}\r\n\r\nfunction isASCIIDigit(c) {\r\n return c >= 0x30 && c <= 0x39;\r\n}\r\n\r\nfunction isASCIIAlpha(c) {\r\n return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);\r\n}\r\n\r\nfunction isASCIIAlphanumeric(c) {\r\n return isASCIIAlpha(c) || isASCIIDigit(c);\r\n}\r\n\r\nfunction isASCIIHex(c) {\r\n return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66);\r\n}\r\n\r\nfunction isSingleDot(buffer) {\r\n return buffer === \".\" || buffer.toLowerCase() === \"%2e\";\r\n}\r\n\r\nfunction isDoubleDot(buffer) {\r\n buffer = buffer.toLowerCase();\r\n return buffer === \"..\" || buffer === \"%2e.\" || buffer === \".%2e\" || buffer === \"%2e%2e\";\r\n}\r\n\r\nfunction isWindowsDriveLetterCodePoints(cp1, cp2) {\r\n return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124);\r\n}\r\n\r\nfunction isWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === \":\" || string[1] === \"|\");\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === \":\";\r\n}\r\n\r\nfunction containsForbiddenHostCodePoint(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|%|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction containsForbiddenHostCodePointExcludingPercent(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction isSpecialScheme(scheme) {\r\n return specialSchemes[scheme] !== undefined;\r\n}\r\n\r\nfunction isSpecial(url) {\r\n return isSpecialScheme(url.scheme);\r\n}\r\n\r\nfunction defaultPort(scheme) {\r\n return specialSchemes[scheme];\r\n}\r\n\r\nfunction percentEncode(c) {\r\n let hex = c.toString(16).toUpperCase();\r\n if (hex.length === 1) {\r\n hex = \"0\" + hex;\r\n }\r\n\r\n return \"%\" + hex;\r\n}\r\n\r\nfunction utf8PercentEncode(c) {\r\n const buf = new Buffer(c);\r\n\r\n let str = \"\";\r\n\r\n for (let i = 0; i < buf.length; ++i) {\r\n str += percentEncode(buf[i]);\r\n }\r\n\r\n return str;\r\n}\r\n\r\nfunction utf8PercentDecode(str) {\r\n const input = new Buffer(str);\r\n const output = [];\r\n for (let i = 0; i < input.length; ++i) {\r\n if (input[i] !== 37) {\r\n output.push(input[i]);\r\n } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {\r\n output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));\r\n i += 2;\r\n } else {\r\n output.push(input[i]);\r\n }\r\n }\r\n return new Buffer(output).toString();\r\n}\r\n\r\nfunction isC0ControlPercentEncode(c) {\r\n return c <= 0x1F || c > 0x7E;\r\n}\r\n\r\nconst extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]);\r\nfunction isPathPercentEncode(c) {\r\n return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c);\r\n}\r\n\r\nconst extraUserinfoPercentEncodeSet =\r\n new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]);\r\nfunction isUserinfoPercentEncode(c) {\r\n return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);\r\n}\r\n\r\nfunction percentEncodeChar(c, encodeSetPredicate) {\r\n const cStr = String.fromCodePoint(c);\r\n\r\n if (encodeSetPredicate(c)) {\r\n return utf8PercentEncode(cStr);\r\n }\r\n\r\n return cStr;\r\n}\r\n\r\nfunction parseIPv4Number(input) {\r\n let R = 10;\r\n\r\n if (input.length >= 2 && input.charAt(0) === \"0\" && input.charAt(1).toLowerCase() === \"x\") {\r\n input = input.substring(2);\r\n R = 16;\r\n } else if (input.length >= 2 && input.charAt(0) === \"0\") {\r\n input = input.substring(1);\r\n R = 8;\r\n }\r\n\r\n if (input === \"\") {\r\n return 0;\r\n }\r\n\r\n const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/);\r\n if (regex.test(input)) {\r\n return failure;\r\n }\r\n\r\n return parseInt(input, R);\r\n}\r\n\r\nfunction parseIPv4(input) {\r\n const parts = input.split(\".\");\r\n if (parts[parts.length - 1] === \"\") {\r\n if (parts.length > 1) {\r\n parts.pop();\r\n }\r\n }\r\n\r\n if (parts.length > 4) {\r\n return input;\r\n }\r\n\r\n const numbers = [];\r\n for (const part of parts) {\r\n if (part === \"\") {\r\n return input;\r\n }\r\n const n = parseIPv4Number(part);\r\n if (n === failure) {\r\n return input;\r\n }\r\n\r\n numbers.push(n);\r\n }\r\n\r\n for (let i = 0; i < numbers.length - 1; ++i) {\r\n if (numbers[i] > 255) {\r\n return failure;\r\n }\r\n }\r\n if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) {\r\n return failure;\r\n }\r\n\r\n let ipv4 = numbers.pop();\r\n let counter = 0;\r\n\r\n for (const n of numbers) {\r\n ipv4 += n * Math.pow(256, 3 - counter);\r\n ++counter;\r\n }\r\n\r\n return ipv4;\r\n}\r\n\r\nfunction serializeIPv4(address) {\r\n let output = \"\";\r\n let n = address;\r\n\r\n for (let i = 1; i <= 4; ++i) {\r\n output = String(n % 256) + output;\r\n if (i !== 4) {\r\n output = \".\" + output;\r\n }\r\n n = Math.floor(n / 256);\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseIPv6(input) {\r\n const address = [0, 0, 0, 0, 0, 0, 0, 0];\r\n let pieceIndex = 0;\r\n let compress = null;\r\n let pointer = 0;\r\n\r\n input = punycode.ucs2.decode(input);\r\n\r\n if (input[pointer] === 58) {\r\n if (input[pointer + 1] !== 58) {\r\n return failure;\r\n }\r\n\r\n pointer += 2;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n }\r\n\r\n while (pointer < input.length) {\r\n if (pieceIndex === 8) {\r\n return failure;\r\n }\r\n\r\n if (input[pointer] === 58) {\r\n if (compress !== null) {\r\n return failure;\r\n }\r\n ++pointer;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n continue;\r\n }\r\n\r\n let value = 0;\r\n let length = 0;\r\n\r\n while (length < 4 && isASCIIHex(input[pointer])) {\r\n value = value * 0x10 + parseInt(at(input, pointer), 16);\r\n ++pointer;\r\n ++length;\r\n }\r\n\r\n if (input[pointer] === 46) {\r\n if (length === 0) {\r\n return failure;\r\n }\r\n\r\n pointer -= length;\r\n\r\n if (pieceIndex > 6) {\r\n return failure;\r\n }\r\n\r\n let numbersSeen = 0;\r\n\r\n while (input[pointer] !== undefined) {\r\n let ipv4Piece = null;\r\n\r\n if (numbersSeen > 0) {\r\n if (input[pointer] === 46 && numbersSeen < 4) {\r\n ++pointer;\r\n } else {\r\n return failure;\r\n }\r\n }\r\n\r\n if (!isASCIIDigit(input[pointer])) {\r\n return failure;\r\n }\r\n\r\n while (isASCIIDigit(input[pointer])) {\r\n const number = parseInt(at(input, pointer));\r\n if (ipv4Piece === null) {\r\n ipv4Piece = number;\r\n } else if (ipv4Piece === 0) {\r\n return failure;\r\n } else {\r\n ipv4Piece = ipv4Piece * 10 + number;\r\n }\r\n if (ipv4Piece > 255) {\r\n return failure;\r\n }\r\n ++pointer;\r\n }\r\n\r\n address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece;\r\n\r\n ++numbersSeen;\r\n\r\n if (numbersSeen === 2 || numbersSeen === 4) {\r\n ++pieceIndex;\r\n }\r\n }\r\n\r\n if (numbersSeen !== 4) {\r\n return failure;\r\n }\r\n\r\n break;\r\n } else if (input[pointer] === 58) {\r\n ++pointer;\r\n if (input[pointer] === undefined) {\r\n return failure;\r\n }\r\n } else if (input[pointer] !== undefined) {\r\n return failure;\r\n }\r\n\r\n address[pieceIndex] = value;\r\n ++pieceIndex;\r\n }\r\n\r\n if (compress !== null) {\r\n let swaps = pieceIndex - compress;\r\n pieceIndex = 7;\r\n while (pieceIndex !== 0 && swaps > 0) {\r\n const temp = address[compress + swaps - 1];\r\n address[compress + swaps - 1] = address[pieceIndex];\r\n address[pieceIndex] = temp;\r\n --pieceIndex;\r\n --swaps;\r\n }\r\n } else if (compress === null && pieceIndex !== 8) {\r\n return failure;\r\n }\r\n\r\n return address;\r\n}\r\n\r\nfunction serializeIPv6(address) {\r\n let output = \"\";\r\n const seqResult = findLongestZeroSequence(address);\r\n const compress = seqResult.idx;\r\n let ignore0 = false;\r\n\r\n for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) {\r\n if (ignore0 && address[pieceIndex] === 0) {\r\n continue;\r\n } else if (ignore0) {\r\n ignore0 = false;\r\n }\r\n\r\n if (compress === pieceIndex) {\r\n const separator = pieceIndex === 0 ? \"::\" : \":\";\r\n output += separator;\r\n ignore0 = true;\r\n continue;\r\n }\r\n\r\n output += address[pieceIndex].toString(16);\r\n\r\n if (pieceIndex !== 7) {\r\n output += \":\";\r\n }\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseHost(input, isSpecialArg) {\r\n if (input[0] === \"[\") {\r\n if (input[input.length - 1] !== \"]\") {\r\n return failure;\r\n }\r\n\r\n return parseIPv6(input.substring(1, input.length - 1));\r\n }\r\n\r\n if (!isSpecialArg) {\r\n return parseOpaqueHost(input);\r\n }\r\n\r\n const domain = utf8PercentDecode(input);\r\n const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false);\r\n if (asciiDomain === null) {\r\n return failure;\r\n }\r\n\r\n if (containsForbiddenHostCodePoint(asciiDomain)) {\r\n return failure;\r\n }\r\n\r\n const ipv4Host = parseIPv4(asciiDomain);\r\n if (typeof ipv4Host === \"number\" || ipv4Host === failure) {\r\n return ipv4Host;\r\n }\r\n\r\n return asciiDomain;\r\n}\r\n\r\nfunction parseOpaqueHost(input) {\r\n if (containsForbiddenHostCodePointExcludingPercent(input)) {\r\n return failure;\r\n }\r\n\r\n let output = \"\";\r\n const decoded = punycode.ucs2.decode(input);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n output += percentEncodeChar(decoded[i], isC0ControlPercentEncode);\r\n }\r\n return output;\r\n}\r\n\r\nfunction findLongestZeroSequence(arr) {\r\n let maxIdx = null;\r\n let maxLen = 1; // only find elements > 1\r\n let currStart = null;\r\n let currLen = 0;\r\n\r\n for (let i = 0; i < arr.length; ++i) {\r\n if (arr[i] !== 0) {\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n currStart = null;\r\n currLen = 0;\r\n } else {\r\n if (currStart === null) {\r\n currStart = i;\r\n }\r\n ++currLen;\r\n }\r\n }\r\n\r\n // if trailing zeros\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n return {\r\n idx: maxIdx,\r\n len: maxLen\r\n };\r\n}\r\n\r\nfunction serializeHost(host) {\r\n if (typeof host === \"number\") {\r\n return serializeIPv4(host);\r\n }\r\n\r\n // IPv6 serializer\r\n if (host instanceof Array) {\r\n return \"[\" + serializeIPv6(host) + \"]\";\r\n }\r\n\r\n return host;\r\n}\r\n\r\nfunction trimControlChars(url) {\r\n return url.replace(/^[\\u0000-\\u001F\\u0020]+|[\\u0000-\\u001F\\u0020]+$/g, \"\");\r\n}\r\n\r\nfunction trimTabAndNewline(url) {\r\n return url.replace(/\\u0009|\\u000A|\\u000D/g, \"\");\r\n}\r\n\r\nfunction shortenPath(url) {\r\n const path = url.path;\r\n if (path.length === 0) {\r\n return;\r\n }\r\n if (url.scheme === \"file\" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) {\r\n return;\r\n }\r\n\r\n path.pop();\r\n}\r\n\r\nfunction includesCredentials(url) {\r\n return url.username !== \"\" || url.password !== \"\";\r\n}\r\n\r\nfunction cannotHaveAUsernamePasswordPort(url) {\r\n return url.host === null || url.host === \"\" || url.cannotBeABaseURL || url.scheme === \"file\";\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetter(string) {\r\n return /^[A-Za-z]:$/.test(string);\r\n}\r\n\r\nfunction URLStateMachine(input, base, encodingOverride, url, stateOverride) {\r\n this.pointer = 0;\r\n this.input = input;\r\n this.base = base || null;\r\n this.encodingOverride = encodingOverride || \"utf-8\";\r\n this.stateOverride = stateOverride;\r\n this.url = url;\r\n this.failure = false;\r\n this.parseError = false;\r\n\r\n if (!this.url) {\r\n this.url = {\r\n scheme: \"\",\r\n username: \"\",\r\n password: \"\",\r\n host: null,\r\n port: null,\r\n path: [],\r\n query: null,\r\n fragment: null,\r\n\r\n cannotBeABaseURL: false\r\n };\r\n\r\n const res = trimControlChars(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n }\r\n\r\n const res = trimTabAndNewline(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n\r\n this.state = stateOverride || \"scheme start\";\r\n\r\n this.buffer = \"\";\r\n this.atFlag = false;\r\n this.arrFlag = false;\r\n this.passwordTokenSeenFlag = false;\r\n\r\n this.input = punycode.ucs2.decode(this.input);\r\n\r\n for (; this.pointer <= this.input.length; ++this.pointer) {\r\n const c = this.input[this.pointer];\r\n const cStr = isNaN(c) ? undefined : String.fromCodePoint(c);\r\n\r\n // exec state machine\r\n const ret = this[\"parse \" + this.state](c, cStr);\r\n if (!ret) {\r\n break; // terminate algorithm\r\n } else if (ret === failure) {\r\n this.failure = true;\r\n break;\r\n }\r\n }\r\n}\r\n\r\nURLStateMachine.prototype[\"parse scheme start\"] = function parseSchemeStart(c, cStr) {\r\n if (isASCIIAlpha(c)) {\r\n this.buffer += cStr.toLowerCase();\r\n this.state = \"scheme\";\r\n } else if (!this.stateOverride) {\r\n this.state = \"no scheme\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse scheme\"] = function parseScheme(c, cStr) {\r\n if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) {\r\n this.buffer += cStr.toLowerCase();\r\n } else if (c === 58) {\r\n if (this.stateOverride) {\r\n if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === \"file\") {\r\n return false;\r\n }\r\n\r\n if (this.url.scheme === \"file\" && (this.url.host === \"\" || this.url.host === null)) {\r\n return false;\r\n }\r\n }\r\n this.url.scheme = this.buffer;\r\n this.buffer = \"\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n if (this.url.scheme === \"file\") {\r\n if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file\";\r\n } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) {\r\n this.state = \"special relative or authority\";\r\n } else if (isSpecial(this.url)) {\r\n this.state = \"special authority slashes\";\r\n } else if (this.input[this.pointer + 1] === 47) {\r\n this.state = \"path or authority\";\r\n ++this.pointer;\r\n } else {\r\n this.url.cannotBeABaseURL = true;\r\n this.url.path.push(\"\");\r\n this.state = \"cannot-be-a-base-URL path\";\r\n }\r\n } else if (!this.stateOverride) {\r\n this.buffer = \"\";\r\n this.state = \"no scheme\";\r\n this.pointer = -1;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse no scheme\"] = function parseNoScheme(c) {\r\n if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) {\r\n return failure;\r\n } else if (this.base.cannotBeABaseURL && c === 35) {\r\n this.url.scheme = this.base.scheme;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.url.cannotBeABaseURL = true;\r\n this.state = \"fragment\";\r\n } else if (this.base.scheme === \"file\") {\r\n this.state = \"file\";\r\n --this.pointer;\r\n } else {\r\n this.state = \"relative\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special relative or authority\"] = function parseSpecialRelativeOrAuthority(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = \"special authority ignore slashes\";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = \"relative\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path or authority\"] = function parsePathOrAuthority(c) {\r\n if (c === 47) {\r\n this.state = \"authority\";\r\n } else {\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse relative\"] = function parseRelative(c) {\r\n this.url.scheme = this.base.scheme;\r\n if (isNaN(c)) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 47) {\r\n this.state = \"relative slash\";\r\n } else if (c === 63) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n this.state = \"relative slash\";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice(0, this.base.path.length - 1);\r\n\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse relative slash\"] = function parseRelativeSlash(c) {\r\n if (isSpecial(this.url) && (c === 47 || c === 92)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"special authority ignore slashes\";\r\n } else if (c === 47) {\r\n this.state = \"authority\";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special authority slashes\"] = function parseSpecialAuthoritySlashes(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = \"special authority ignore slashes\";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = \"special authority ignore slashes\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special authority ignore slashes\"] = function parseSpecialAuthorityIgnoreSlashes(c) {\r\n if (c !== 47 && c !== 92) {\r\n this.state = \"authority\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse authority\"] = function parseAuthority(c, cStr) {\r\n if (c === 64) {\r\n this.parseError = true;\r\n if (this.atFlag) {\r\n this.buffer = \"%40\" + this.buffer;\r\n }\r\n this.atFlag = true;\r\n\r\n // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars\r\n const len = countSymbols(this.buffer);\r\n for (let pointer = 0; pointer < len; ++pointer) {\r\n const codePoint = this.buffer.codePointAt(pointer);\r\n\r\n if (codePoint === 58 && !this.passwordTokenSeenFlag) {\r\n this.passwordTokenSeenFlag = true;\r\n continue;\r\n }\r\n const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode);\r\n if (this.passwordTokenSeenFlag) {\r\n this.url.password += encodedCodePoints;\r\n } else {\r\n this.url.username += encodedCodePoints;\r\n }\r\n }\r\n this.buffer = \"\";\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n if (this.atFlag && this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.pointer -= countSymbols(this.buffer) + 1;\r\n this.buffer = \"\";\r\n this.state = \"host\";\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse hostname\"] =\r\nURLStateMachine.prototype[\"parse host\"] = function parseHostName(c, cStr) {\r\n if (this.stateOverride && this.url.scheme === \"file\") {\r\n --this.pointer;\r\n this.state = \"file host\";\r\n } else if (c === 58 && !this.arrFlag) {\r\n if (this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = \"\";\r\n this.state = \"port\";\r\n if (this.stateOverride === \"hostname\") {\r\n return false;\r\n }\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n --this.pointer;\r\n if (isSpecial(this.url) && this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n } else if (this.stateOverride && this.buffer === \"\" &&\r\n (includesCredentials(this.url) || this.url.port !== null)) {\r\n this.parseError = true;\r\n return false;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = \"\";\r\n this.state = \"path start\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n } else {\r\n if (c === 91) {\r\n this.arrFlag = true;\r\n } else if (c === 93) {\r\n this.arrFlag = false;\r\n }\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse port\"] = function parsePort(c, cStr) {\r\n if (isASCIIDigit(c)) {\r\n this.buffer += cStr;\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92) ||\r\n this.stateOverride) {\r\n if (this.buffer !== \"\") {\r\n const port = parseInt(this.buffer);\r\n if (port > Math.pow(2, 16) - 1) {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.url.port = port === defaultPort(this.url.scheme) ? null : port;\r\n this.buffer = \"\";\r\n }\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = \"path start\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nconst fileOtherwiseCodePoints = new Set([47, 92, 63, 35]);\r\n\r\nURLStateMachine.prototype[\"parse file\"] = function parseFile(c) {\r\n this.url.scheme = \"file\";\r\n\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file slash\";\r\n } else if (this.base !== null && this.base.scheme === \"file\") {\r\n if (isNaN(c)) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 63) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else {\r\n if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points\r\n !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) ||\r\n (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points\r\n !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n shortenPath(this.url);\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n } else {\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse file slash\"] = function parseFileSlash(c) {\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file host\";\r\n } else {\r\n if (this.base !== null && this.base.scheme === \"file\") {\r\n if (isNormalizedWindowsDriveLetterString(this.base.path[0])) {\r\n this.url.path.push(this.base.path[0]);\r\n } else {\r\n this.url.host = this.base.host;\r\n }\r\n }\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse file host\"] = function parseFileHost(c, cStr) {\r\n if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) {\r\n --this.pointer;\r\n if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) {\r\n this.parseError = true;\r\n this.state = \"path\";\r\n } else if (this.buffer === \"\") {\r\n this.url.host = \"\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = \"path start\";\r\n } else {\r\n let host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n if (host === \"localhost\") {\r\n host = \"\";\r\n }\r\n this.url.host = host;\r\n\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n\r\n this.buffer = \"\";\r\n this.state = \"path start\";\r\n }\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path start\"] = function parsePathStart(c) {\r\n if (isSpecial(this.url)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"path\";\r\n\r\n if (c !== 47 && c !== 92) {\r\n --this.pointer;\r\n }\r\n } else if (!this.stateOverride && c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (!this.stateOverride && c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else if (c !== undefined) {\r\n this.state = \"path\";\r\n if (c !== 47) {\r\n --this.pointer;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path\"] = function parsePath(c) {\r\n if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) ||\r\n (!this.stateOverride && (c === 63 || c === 35))) {\r\n if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n }\r\n\r\n if (isDoubleDot(this.buffer)) {\r\n shortenPath(this.url);\r\n if (c !== 47 && !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push(\"\");\r\n }\r\n } else if (isSingleDot(this.buffer) && c !== 47 &&\r\n !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push(\"\");\r\n } else if (!isSingleDot(this.buffer)) {\r\n if (this.url.scheme === \"file\" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) {\r\n if (this.url.host !== \"\" && this.url.host !== null) {\r\n this.parseError = true;\r\n this.url.host = \"\";\r\n }\r\n this.buffer = this.buffer[0] + \":\";\r\n }\r\n this.url.path.push(this.buffer);\r\n }\r\n this.buffer = \"\";\r\n if (this.url.scheme === \"file\" && (c === undefined || c === 63 || c === 35)) {\r\n while (this.url.path.length > 1 && this.url.path[0] === \"\") {\r\n this.parseError = true;\r\n this.url.path.shift();\r\n }\r\n }\r\n if (c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n }\r\n if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += percentEncodeChar(c, isPathPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse cannot-be-a-base-URL path\"] = function parseCannotBeABaseURLPath(c) {\r\n if (c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else {\r\n // TODO: Add: not a URL code point\r\n if (!isNaN(c) && c !== 37) {\r\n this.parseError = true;\r\n }\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n if (!isNaN(c)) {\r\n this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse query\"] = function parseQuery(c, cStr) {\r\n if (isNaN(c) || (!this.stateOverride && c === 35)) {\r\n if (!isSpecial(this.url) || this.url.scheme === \"ws\" || this.url.scheme === \"wss\") {\r\n this.encodingOverride = \"utf-8\";\r\n }\r\n\r\n const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead\r\n for (let i = 0; i < buffer.length; ++i) {\r\n if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 ||\r\n buffer[i] === 0x3C || buffer[i] === 0x3E) {\r\n this.url.query += percentEncode(buffer[i]);\r\n } else {\r\n this.url.query += String.fromCodePoint(buffer[i]);\r\n }\r\n }\r\n\r\n this.buffer = \"\";\r\n if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse fragment\"] = function parseFragment(c) {\r\n if (isNaN(c)) { // do nothing\r\n } else if (c === 0x0) {\r\n this.parseError = true;\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nfunction serializeURL(url, excludeFragment) {\r\n let output = url.scheme + \":\";\r\n if (url.host !== null) {\r\n output += \"//\";\r\n\r\n if (url.username !== \"\" || url.password !== \"\") {\r\n output += url.username;\r\n if (url.password !== \"\") {\r\n output += \":\" + url.password;\r\n }\r\n output += \"@\";\r\n }\r\n\r\n output += serializeHost(url.host);\r\n\r\n if (url.port !== null) {\r\n output += \":\" + url.port;\r\n }\r\n } else if (url.host === null && url.scheme === \"file\") {\r\n output += \"//\";\r\n }\r\n\r\n if (url.cannotBeABaseURL) {\r\n output += url.path[0];\r\n } else {\r\n for (const string of url.path) {\r\n output += \"/\" + string;\r\n }\r\n }\r\n\r\n if (url.query !== null) {\r\n output += \"?\" + url.query;\r\n }\r\n\r\n if (!excludeFragment && url.fragment !== null) {\r\n output += \"#\" + url.fragment;\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction serializeOrigin(tuple) {\r\n let result = tuple.scheme + \"://\";\r\n result += serializeHost(tuple.host);\r\n\r\n if (tuple.port !== null) {\r\n result += \":\" + tuple.port;\r\n }\r\n\r\n return result;\r\n}\r\n\r\nmodule.exports.serializeURL = serializeURL;\r\n\r\nmodule.exports.serializeURLOrigin = function (url) {\r\n // https://url.spec.whatwg.org/#concept-url-origin\r\n switch (url.scheme) {\r\n case \"blob\":\r\n try {\r\n return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0]));\r\n } catch (e) {\r\n // serializing an opaque origin returns \"null\"\r\n return \"null\";\r\n }\r\n case \"ftp\":\r\n case \"gopher\":\r\n case \"http\":\r\n case \"https\":\r\n case \"ws\":\r\n case \"wss\":\r\n return serializeOrigin({\r\n scheme: url.scheme,\r\n host: url.host,\r\n port: url.port\r\n });\r\n case \"file\":\r\n // spec says \"exercise to the reader\", chrome says \"file://\"\r\n return \"file://\";\r\n default:\r\n // serializing an opaque origin returns \"null\"\r\n return \"null\";\r\n }\r\n};\r\n\r\nmodule.exports.basicURLParse = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride);\r\n if (usm.failure) {\r\n return \"failure\";\r\n }\r\n\r\n return usm.url;\r\n};\r\n\r\nmodule.exports.setTheUsername = function (url, username) {\r\n url.username = \"\";\r\n const decoded = punycode.ucs2.decode(username);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.setThePassword = function (url, password) {\r\n url.password = \"\";\r\n const decoded = punycode.ucs2.decode(password);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.serializeHost = serializeHost;\r\n\r\nmodule.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;\r\n\r\nmodule.exports.serializeInteger = function (integer) {\r\n return String(integer);\r\n};\r\n\r\nmodule.exports.parseURL = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n // We don't handle blobs, so this just delegates:\r\n return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });\r\n};\r\n","\"use strict\";\n\nmodule.exports.mixin = function mixin(target, source) {\n const keys = Object.getOwnPropertyNames(source);\n for (let i = 0; i < keys.length; ++i) {\n Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));\n }\n};\n\nmodule.exports.wrapperSymbol = Symbol(\"wrapper\");\nmodule.exports.implSymbol = Symbol(\"impl\");\n\nmodule.exports.wrapperForImpl = function (impl) {\n return impl[module.exports.wrapperSymbol];\n};\n\nmodule.exports.implForWrapper = function (wrapper) {\n return wrapper[module.exports.implSymbol];\n};\n\n","var wrappy = require('wrappy')\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n","'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n","module.exports = require('./lib/tunnel');\n","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction getUserAgent() {\n if (typeof navigator === \"object\" && \"userAgent\" in navigator) {\n return navigator.userAgent;\n }\n\n if (typeof process === \"object\" && \"version\" in process) {\n return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;\n }\n\n return \"\";\n}\n\nexports.getUserAgent = getUserAgent;\n//# sourceMappingURL=index.js.map\n","// Returns a wrapper function that returns a wrapped callback\n// The wrapper function should do some stuff, and return a\n// presumably different callback function.\n// This makes sure that own properties are retained, so that\n// decorations and such are not lost along the way.\nmodule.exports = wrappy\nfunction wrappy (fn, cb) {\n if (fn && cb) return wrappy(fn)(cb)\n\n if (typeof fn !== 'function')\n throw new TypeError('need wrapper function')\n\n Object.keys(fn).forEach(function (k) {\n wrapper[k] = fn[k]\n })\n\n return wrapper\n\n function wrapper() {\n var args = new Array(arguments.length)\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i]\n }\n var ret = fn.apply(this, args)\n var cb = args[args.length-1]\n if (typeof ret === 'function' && ret !== cb) {\n Object.keys(cb).forEach(function (k) {\n ret[k] = cb[k]\n })\n }\n return ret\n }\n}\n",null,"module.exports = require(\"assert\");","module.exports = require(\"events\");","module.exports = require(\"fs\");","module.exports = require(\"http\");","module.exports = require(\"https\");","module.exports = require(\"net\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"punycode\");","module.exports = require(\"stream\");","module.exports = require(\"tls\");","module.exports = require(\"tty\");","module.exports = require(\"url\");","module.exports = require(\"util\");","module.exports = require(\"zlib\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(3109);\n",""],"names":[],"sourceRoot":""} \ No newline at end of file