{"version":3,"file":"ApiClient-C2RN_7o7.js","sources":["../../../node_modules/lodash.debounce/index.js","../../shared/ApiClient.jsx"],"sourcesContent":["/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","import debounce from \"lodash.debounce\";\r\nimport { serialize } from \"../epay3Utilities\";\r\n\r\nexport const api = {\r\n get,\r\n post,\r\n put,\r\n};\r\n\r\nexport const baseUrl = window?.epay?.baseUrl;\r\n\r\n/** @type {string | null} */\r\nlet payableStatementId = null;\r\n\r\n/**\r\n * Set the payableStatementId in order to fetch recent activity\r\n * @param {string} id\r\n */\r\nexport function setPayableStatementId(id) {\r\n payableStatementId = id;\r\n}\r\n\r\n// This function will be called when the user switches back to the page\r\nfunction handlePageVisibility() {\r\n if (document.visibilityState === \"visible\") {\r\n getRecentActivity();\r\n }\r\n}\r\n\r\ndocument.addEventListener(\"visibilitychange\", handlePageVisibility);\r\n\r\n/**\r\n * Makes a GET request to the specified URL.\r\n * @template [T=any]\r\n * @param {string} url - The URL to request.\r\n * @returns {Promise}\r\n */\r\nasync function get(url) {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: {\r\n Accept: \"application/json\",\r\n },\r\n };\r\n\r\n return handleResponse(url, requestOptions);\r\n}\r\n\r\n/**\r\n * Makes a GET request to the specified URL.\r\n * @param {string} url - The URL to request.\r\n * @returns {string}\r\n */\r\nexport function buildUrl(url) {\r\n if (url.startsWith(\".\") || url.startsWith(\"http\")) return url;\r\n\r\n if (url.startsWith(\"/\")) {\r\n return `${baseUrl}${url.substring(1)}`;\r\n }\r\n\r\n return `${baseUrl}${url}`;\r\n}\r\n\r\n/**\r\n * Retrieves and processes the recent activity for a given payable statement item.\r\n * The function is debounced to avoid calling it more than once every 5 minutes.\r\n * If there is activity then the banners are displayed.\r\n * If payableStatementId is undefined then it's a noop\r\n * payableStatementItemId - Should be set in the page by calling {@link setPayableStatementId}\r\n\r\n * @function\r\n * @async\r\n * @returns {void} No return value but invokes either `setModifiedMessage` or `setViewedMessage` based on activity.\r\n */\r\nconst getRecentActivity = debounce(\r\n async function () {\r\n if (!payableStatementId) return;\r\n\r\n const url = `/PayablesConnect/RecentActivity?id=${payableStatementId}`;\r\n const recentActivity = await get(url);\r\n if (recentActivity?.length) {\r\n window.hideModifiedMessage();\r\n window.hideViewedMessage();\r\n for (const activity of recentActivity) {\r\n if (activity.IsModified) {\r\n window.setModifiedMessage(activity.Message);\r\n } else {\r\n window.setViewedMessage(activity.Message);\r\n }\r\n }\r\n }\r\n },\r\n 5 * 60 * 1000,\r\n {\r\n leading: true, // don't wait to make first call\r\n trailing: false,\r\n }\r\n);\r\n\r\n/**\r\n * Makes a POST request to the specified URL with the provided body.\r\n * @template [T=any]\r\n * @param {string} url - The URL to request.\r\n * @param {Object} data - The body of the request.\r\n * @param {AbortSignal} [signal] - optional - An abort signal.\r\n * @returns {Promise}\r\n */\r\nasync function post(url, data, signal) {\r\n // Parsing form data properly in our tests is annoying and we can't post json without removing the anti forgery check\r\n if (process.env.NODE_ENV === \"test\") {\r\n return postJson(url, data);\r\n }\r\n\r\n const formData = serialize(data, { indices: true });\r\n const requestOptions = {\r\n method: \"POST\",\r\n body: formData,\r\n signal,\r\n };\r\n return handleResponse(url, requestOptions);\r\n}\r\n\r\n/**\r\n * Makes a JSON POST request to the specified URL with the provided body.\r\n * @param {string} url - The URL to request.\r\n * @param {Object} data - The body of the request.\r\n * @returns {Promise}\r\n */\r\nasync function postJson(url, data) {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n },\r\n body: JSON.stringify(data),\r\n };\r\n return handleResponse(url, requestOptions);\r\n}\r\n\r\n/**\r\n * Makes a PUT request to the specified URL with the provided body.\r\n * @param {string} url - The URL to request.\r\n * @param {Object} body - The body of the request.\r\n * @returns {Promise}\r\n */\r\nasync function put(url, body) {\r\n const requestOptions = {\r\n method: \"PUT\",\r\n headers: { \"Content-Type\": \"application/json\" },\r\n body: JSON.stringify(body),\r\n };\r\n return handleResponse(url, requestOptions);\r\n}\r\n\r\n/**\r\n * Handles the response from a fetch request.\r\n * @param {string} url\r\n * @param {RequestInit | undefined} requestOptions\r\n * @returns {Promise}\r\n */\r\nasync function handleResponse(url, requestOptions) {\r\n const fullUrl = buildUrl(url);\r\n if (!fullUrl.includes(\"RecentActivity\")) {\r\n getRecentActivity();\r\n }\r\n\r\n const response = await fetch(fullUrl, requestOptions);\r\n\r\n let data = undefined;\r\n try {\r\n const text = await response.text();\r\n data = text && JSON.parse(text);\r\n } catch (e) {\r\n console.log(\"Error parsing server response\", e);\r\n }\r\n\r\n if (!response.ok) {\r\n const error = data || response.statusText || response.status;\r\n\r\n // because we don't consistently case the \"Success\" flag\r\n if (typeof error !== 'number' && !Array.isArray(data) && (!Object.hasOwn(error, \"Success\") || !Object.hasOwn(error, \"success\"))) {\r\n error.Success = error.success = false;\r\n }\r\n\r\n if (response.status === 417 && data?.code === \"REMFA\") {\r\n document.dispatchEvent(new CustomEvent(\"mfa-verify-modal:create\"));\r\n }\r\n\r\n return Promise.reject({\r\n error,\r\n httpStatusCode: response.status,\r\n httpStatusText: response.statusText,\r\n });\r\n }\r\n\r\n // attempt to augment the data structure with the status codes and stuff\r\n if (typeof data === \"object\" && !Array.isArray(data)) {\r\n return { ...data, httpStatusCode: response.status, httpStatusText: response.statusText };\r\n }\r\n\r\n return data;\r\n}\r\n"],"names":["FUNC_ERROR_TEXT","NAN","symbolTag","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","freeGlobal","global","freeSelf","root","objectProto","objectToString","nativeMax","nativeMin","now","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","toNumber","isObject","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","value","type","isObjectLike","isSymbol","other","isBinary","lodash_debounce","api","get","post","put","baseUrl","_a","payableStatementId","setPayableStatementId","id","handlePageVisibility","getRecentActivity","url","handleResponse","buildUrl","recentActivity","activity","data","signal","requestOptions","serialize","body","fullUrl","response","text","e","error"],"mappings":"gGAUA,IAAIA,EAAkB,sBAGlBC,EAAM,IAGNC,EAAY,kBAGZC,EAAS,aAGTC,EAAa,qBAGbC,EAAa,aAGbC,EAAY,cAGZC,EAAe,SAGfC,EAAa,OAAOC,GAAU,UAAYA,GAAUA,EAAO,SAAW,QAAUA,EAGhFC,EAAW,OAAO,MAAQ,UAAY,MAAQ,KAAK,SAAW,QAAU,KAGxEC,EAAOH,GAAcE,GAAY,SAAS,aAAa,EAAG,EAG1DE,EAAc,OAAO,UAOrBC,EAAiBD,EAAY,SAG7BE,EAAY,KAAK,IACjBC,EAAY,KAAK,IAkBjBC,EAAM,UAAW,CACnB,OAAOL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