should i max th10 before th11; rom stores data permanently; washington post music editor; multi uses for scented sachets; what can we learn from moses' leadership; before, in combos crossword clue; So, as per your definition Do we measure inventories at fair value in case of fair value hedge accounting? mps._queue.adload = mps._queue.adload || []; The steps for accounting a Net Investment hedge will be the same as per the Cash Flow Hedge right? Thats the definition in IFRS 9 and IAS 39. + free IFRS mini-course. For instance, arranging for a substantial loan amount and placing foreign currencies on deposit is cumbersome and the actual rates used in the money market hedge may vary significantly from the wholesale rates that are used to price currency forwards. This further highlights the complex interaction of global markets and the difficulty of trying to manage risk by taking a directional position on currencies. Financial markets are complex and large in size. Irrespective of price in next six months commercial company has to pay $150 per barrel to buy 500 barrels as per agreement. Somer G. Anderson is CPA, doctor of accounting, and an accounting and finance professor who has been working in the accounting and finance industries for more than 20 years. } The money market hedge would be executed by: If a U.S. company cannot or does not want to use a money market hedge, it could use a forward contract,foreign exchange swap, or simply take a chance and pay whatever the exchange rate happens to be in six months. Difference in price = $2,400. When the foreign currency receivable comes in, repay the foreign currency loan (from step 1) plus interest. Summary. 'cag[attribution_source]' : 'CNBC US Source' , if (typeof adunit != "string") return false; Definition of Swap & Hedge Agreements. My company is applying the layer approach while hedging future probable sales forecast. While changes in exchange-rate rates could cause the transaction to become less expensive, fluctuations could also make it more expensive and possibly cost-prohibitive. return unescape(document.cookie.substring(cStart, cEnd)); Money market hedges refer to strategies used to lock in particular variables related to foreign exchange and cash equivalents. In such a setting, both equities and bonds can lose money at the same time, meaning . 'cag[related_primary]' : 'Financial consulting|Wealth|Hedge Funds|Investment strategy|Currency markets|World Markets|China|Japan|Western Europe|Special Reports|Advisor Insight|Financial Advisors|Currencies|Investing' , - Consequently, the firm has to forgo the opportunity to benefit from favorable exchange rate changes. STORAGE: 6, .split(',') Difference Between Hedge Fund vs Mutual Fund. console.log('PUB-GDPR-CHECK Blocked Categories: ', blockedCategories); The difference is the cost of the money market hedge is determined by the differential interest rates, while the forward hedge is a function of the forward rates quotation. if (result && result.geo && result.geo.country_code) { 4. Note: P/L = profit or loss, FP = statement of financial position. Margin money is required to maintain a . The U.S. dollar doesn't always move in the same direction across all currencies. The time value of the FX option is normally recognised through profit or loss. return '
' typeof mps._gptfirst == "function" && mps._gptfirst(adunit, slotid); For the three months ended December 31, 2022, Vertex reported net income of $44.4 million or $0.56 per share on a fully diluted . b. Swaps and hedges are not interchangeable terms, but the former is often used as the latter. Without a money market hedge, a domestic company would be subject to exchange rate fluctuations that could dramatically alter the transactions price. document.getElementsByTagName('meta')['tp:PreferredRuntimes'].setAttribute("content", "flash,html5"); My company, that I work in, services in operational fleet car leasing industry. Im referring to GET or PAY only for the sake of simplicity. The spot . script.setAttribute("async", true); Hedging currency risk effectively reduces this natural hedge, and thus, volatility rises as the currency hedge percentage increases. return Object.values(OneTrustCategories).filter((c) => blockedCategories.includes(c)).length > 0; if (!matches) { It is the technique which is used to reduce the risk of financial assets. However, the option may actually have worked out to be the best choice if the future exchange rate It is an over the counter instrument. So thats completely different from fair value hedge accounting. (function() { So even if you do not realize any profit or loss at the date of swap termination, you will still need to derecognize this reserve (accumulated in OCI) and recognize it in P/L. Her expertise covers a wide range of accounting, corporate finance, taxes, lending, and personal finance areas. Money market hedges can offer some flexibility, such as hedging only half of the value of a transaction. Forward Contract. Investopedia. The idea behind forward contracts is that the parties involved can use them to manage volatility by locking in pricing for the underlying assets. The money market hedge is not the optimal way to hedge translation exposure - since it is more complicated to set up than using an outright forward or option - but it can be effectively used . Note that the same result could have been achieved if the company had used a forward rate. BUT you dont want to pay in line with market. const url = `${window.location.pathname}${window.location.search}`; Course Hero is not sponsored or endorsed by any college or university. Hedge. A hedge can be constructed from many types of financial instruments, including stocks, exchange-traded funds, insurance, forward contracts, swaps, options, gambles, many types of over-the-counter and derivative products, and futures contracts. } A-. Assuming your cash flow hedge meets all hedge accounting criteria, youll need to make the following steps: To sum up the accounting entries for a cash flow hedge: Note: P/L = profit or loss, FP = statement of financial position, OCI = other comprehensive income. Irrespective of the prevailing price as at the contract execution date (spot rate at the end of the six months). The total amount repayable of the US$ loan including interest (1.75% annual rate for six months) is US$13,550.37 after six months. But it is possible to get all that right and still see your returns eroded if the currency markets move against you, and these days such moves can be swift and dramatic. A potentially significant difference between using a forward hedge and a money market hedge is that the: forward hedge is less risky. Ill come back to this later. Using Interest Rate Parity to Trade Forex, Exchange Rate Risk: Definition, Causes, and Ways to Manage, Forward Contracts: The Foundation of All Derivatives, Three Strategies to Mitigate Currency Risk, Interest Rate Arbitrage Strategy: How It Works. 'path' : '/id/103412461' , The choice between the forward hedge and the option hedge will depend on management's expectation concerning the future spot rate, and their risk tolerance. A enters into a pay-fixed/receive variable swap contract with Z Data is a real-time snapshot *Data is delayed at least 15 minutes. Further, the market for forward contracts is significant in volume and value, however, since the details of forward contracts are limited to the buyer and the seller, the size of this market is difficult to estimate. Since there are a number of avenues such as currency forwards, futures, and options to hedge foreign exchange risk, the money market hedge may not be the most cost-effective or convenient way for large corporations and institutions to hedge such risk. my question to you is how do i treat that irs from accounting point of view ( my main problem from now on is to check effectiness and how do i enter this not nill irs into the books ) . By using this website, you agree with our Cookies Policy. CNBC_Comscore = 'Investing'; Also, increased borrowing may damage the subsidiary 's credit rating. A money market hedge offers flexibility in regardto the amount covered. Cryptocurrency exchange Binance moved $1.8 billion of collateral meant to back its customers' stablecoins to hedge funds last year, according to a Forbes article on Monday. Anyway, I am working on an article with the example on net investment hedge, so Ill keep you posted (if you are subscribed to my newsletter). Now you can see that the same derivative interest rate swap can be a hedging instrument in a cash flow hedge as well as in a fair value hedge. The first thing you need to do before you even start to play with hedge accounting is to determine the TYPE of hedge relationship that youre dealing with. For example, while a fully hedged currency position is often assumed to help mitigate volatility, it can actually increase an investment's risk profile, depending on the specific dynamics of the underlying currencies. Also, you are right, the outcome of hedging instrument is presented together with the outcome of the hedged item and yes, if it affects the income tax, then of course, there will not be perfect match. console.log('PUB-GDPR-CHECK oneTrustCookie matches: ', matches); S. hi Silva, Placingthe foreign currency purchased on deposit with a money market and receivinginterest until payment is made. Learn about the characteristics of GDRs. For effective cashflow hedge, means there is not necessary to retranslate hedge item at closing rate and difference posted to P&L? the underlying debt is not yet drawn, but anticipated to be drawn, so there is a risk of being overhedged, could we still achieve hedge accounting? Assume the FEC is taken out in March. We use cookies to offer useful features and measure performance to improve your experience. The key to differentiate is WHAT RISK you hedge. mps._adsheld.push(adunit) If you incorrectly identify the type of the hedge, then your hedge accounting will go totally wrong. Adiv. A money market hedge is a technique for hedging foreign exchange risk using the money market, the financial market in which highly liquid and short-term instruments like Treasury bills, bankers acceptances, and commercial paper are traded. 'cag[type_cnbcteam]' : 'CNBC US Team' , Hi Gurcan, head = document.head || document.getElementsByTagName("head")[0], mpsload = document.createElement("script"); }; If the market 10-year swap rate is 2.25% on the day of settlement, the payout amount would be roughly: $100M x (225 bps - 200 bps = 25 bps) x 10 years = $2.5M. document.getElementsByTagName("head")[0].appendChild(script); (r(document),r(window),r(f.prototype)):f.prototype.hasOwnProperty(u)&&(o(window),o(f.prototype)),a.on(u+"-start",function(t,e){var n=t[1],r=c(n,"nr@wrapped",function(){function t(){if("function"==typeof n.handleEvent)return n.handleEvent.apply(n,arguments)}var e={object:t,"function":n}[typeof n];return e?s(e,"fn-",null,e.name||"anonymous"):n});this.wrapped=t[1]=r}),a.on(d+"-start",function(t){t[1]=this.wrapped||t[1]})},{}],7:[function(t,e,n){function r(t,e,n){var r=t[e];"function"==typeof r&&(t[e]=function(){var t=r.apply(this,arguments);return o.emit(n+"start",arguments,t),t.then(function(e){return o.emit(n+"end",[null,e],t),e},function(e){throw o.emit(n+"end",[e],t),e})})}var o=t("ee").get("fetch"),i=t(21);e.exports=o;var a=window,s="fetch-",c=s+"body-",f=["arrayBuffer","blob","json","text","formData"],u=a.Request,d=a.Response,p=a.fetch,l="prototype";u&&d&&p&&(i(f,function(t,e){r(u[l],e,c),r(d[l],e,c)}),r(a,"fetch",s),o.on(s+"end",function(t,e){var n=this;if(e){var r=e.headers.get("content-length");null!==r&&(n.rxSize=r),o.emit(s+"done",[null,e],n)}else o.emit(s+"done",[t],n)}))},{}],8:[function(t,e,n){var r=t("ee").get("history"),o=t(24)(r);e.exports=r,o.inPlace(window.history,["pushState","replaceState"],"-")},{}],9:[function(t,e,n){function r(t){function e(){c.emit("jsonp-end",[],p),t.removeEventListener("load",e,!1),t.removeEventListener("error",n,!1)}function n(){c.emit("jsonp-error",[],p),c.emit("jsonp-end",[],p),t.removeEventListener("load",e,!1),t.removeEventListener("error",n,!1)}var r=t&&"string"==typeof t.nodeName&&"script"===t.nodeName.toLowerCase();if(r){var o="function"==typeof t.addEventListener;if(o){var a=i(t.src);if(a){var u=s(a),d="function"==typeof u.parent[u.key];if(d){var p={};f.inPlace(u.parent,[u.key],"cb-",p),t.addEventListener("load",e,!1),t.addEventListener("error",n,!1),c.emit("new-jsonp",[t.src],p)}}}}}function o(){return"addEventListener"in window}function i(t){var e=t.match(u);return e?e[1]:null}function a(t,e){var n=t.match(p),r=n[1],o=n[3];return o?a(o,e[r]):e[r]}function s(t){var e=t.match(d);return e&&e.length>=3? mps._queue.refreshads = mps._queue.refreshads || []; Since the financial markets have become complex and grown in size, hedging has become increasingly relevant to investors. Decrease, or credit the Cash account by the amount of the forward rate. What is a Cash Flow Hedge? Heres how the money market hedge is set up. Buying the current value of the foreign currency transaction amount at the. Learn more, Differentiate between hedging and speculation, Differentiate between options contract and swap contract, Difference between Forward and Future Contract. - Initiating Full Year 2023 Revenue Guidance of between $630 and $700 Million -. function getOneTrustCookie() { You can only get your money periodically. var setAdblockerCookie = function(adblocker) { US$50,000 discounted at the US$ borrowing rate of 1.75%) = US$50,000 / (1.0175) = US$49,140.05. Complexity, disclosure practices and inflexibility categorise some of the shortfalls of hedging techniques. The variation in these results is due to differences in correlation between the currency return and the equity market return in local currency. An option can be either a call option which is a right to buy or a put option which is a right to sell. Again, thats the definition in IAS 39 and IFRS 9. II. Difference Between Option and Warrant in Stock Market, Difference Between Long-term and Short-term Financing, Difference Between Equity and Debt Securities. Feedback: p. 382: Money market trading occurs over the counter. report Top 7 IFRS Mistakes Futures are exchange traded instruments. Companies may choose not to use a money market hedge if they perform a large number of transactions because amoney market hedgeistypically more complicated to organizethan a forward contract. Eg., If the spot exchange rate turns out to be $1.60 per GBP on the maturity date of the forward . var mps = mps || {}; If Swap is sold (terminated) but Bond (hedge item) is still live what will be the treatment of MTM realization from Swap, as of now there is no MTM taken to P&L apart from Ineffectiveness portion. Borrow the domestic currency in an amount equivalent to the present value of the payment. Price, if the contract did not exist ($179 *600) = $107,400 E.g., Company A is a commercial organization and intends to purchase 600 barrels from oil from Company B, who is an oil exporter in another six months. // check for region and redirect if country is in EEARegion 1. S. Hi Silvia we have commodity swap contracts entered with some broker and we follow cash flow hedge accounting and the settlements payments/receipts are accounted in inventory but out of these some contracts are terminated by mutual agreement and for that we need to pay say usd 3/MT for 10000 MT. And the one-year forward rate is therefore: Note that the currency with the lower interest rate always trades at a forward premium to the currency with the higher interest rate. So you dont want to FIX the amount, you want to GET or PAY exactly in line with the market. What fundamental differences are there between a forward contract and a futures contract as instruments to hedge against foreign exchange fluctuation risk? !e;this.xhrGuids&&this.xhrGuids[n]&&(delete this.xhrGuids[n],this.totalCbs-=1)}),f.on("addEventListener-end",function(t,e){e instanceof m&&"load"===t[0]&&f.emit("xhr-load-added",[t[1],t[2]],e)}),f.on("removeEventListener-end",function(t,e){e instanceof m&&"load"===t[0]&&f.emit("xhr-load-removed",[t[1],t[2]],e)}),f.on("fn-start",function(t,e,n){e instanceof m&&("onload"===n&&(this.onload=!0),("load"===(t[0]&&t[0].type)||this.onload)&&(this.xhrCbStart=a.now()))}),f.on("fn-end",function(t,e){this.xhrCbStart&&f.emit("xhr-cb-time",[a.now()-this.xhrCbStart,this.onload,e],e)})}},{}],16:[function(t,e,n){e.exports=function(t){var e=document.createElement("a"),n=window.location,r={};e.href=t,r.port=e.port;var o=e.href.split("://");!r.port&&o[1]&&(r.port=o[1].split("/")[0].split("@").pop().split(":")[1]),r.port&&"0"!==r.port||(r.port="https"===o[0]? 'cag[type_tag]' : 'Financial consulting|Wealth|Hedge Funds|Investment strategy|Currency markets|World Markets' , Is it possible to take out forward cover on a dividend for which the timing and amount is uncertain and then designate the FEC contract as a cash flow hedge? 'keywords' : '~' , An unrecognized firm commitment, a forecasted transaction, or a recognized asset or liability (including intercompany receivables or payables) are all eligible exposures for a foreign currency cash flow hedge. Money Market Hedge: A money market hedge helps a domestic company reduce its currency risk when doing business with a foreign company. (function() { Dear Silvia, Derivatives are tools that contribute to either result. However, this hedging technique is more difficult due to its number of steps and its effectiveness may also be impeded by logistical constraints, as well as actual interest rates that are different from institutional rates. }; It is also relatively easy to set up, as one of its only requirements is to have bank accounts in a couple of different currencies. i have entered into an irs where i recieve floating rate ( euribor 3m flat ) and pay fix ( + spread ) . Hedging instruments can take the following two forms. mpsload.id = "mps-load"; } "host" : 'mps.cnbc.com', This correlation has been strongly negative for Japan; therefore, the unhedged currency exposure has provided a natural hedge against fluctuations in the Japanese stock market. A money market hedge is a technique used to lock in the value of a foreign currency transaction in a companys domestic currency, helping a domestic company reduce its currency risk when doing business with a foreign company. The quarterly revenue surpassed expectations, largely due to better-than-anticipated sales of AstraZeneca PLC (NASDAQ:AZN)'s cancer medications such as Tagrisso, Imfinzi, and Enhertu. Suppose an American company knows that it needs to purchase supplies from a German company in six monthsand mustpay for the supplies in euros rather than dollars. The question of "to hedge or not to hedge" is no doubt a complicated one, as there are other knock-on effects to 100 percent on/off currency hedging strategies, and what works in one market may . 'stitle' : 'To hedge or not to hedge PATTI 160229 EC' , . Im interested on the CVA/DVA impact on the cash flow hedge portion especially on recognizing the accounting entries that should goes to OCI. '); } ;NREUM.info={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",licenseKey:"356631dc7f",applicationID:"230538944",sa:1} var dynamic_yield_enabled = 1 dollar relationship has been volatile as well, with the yen rising 3 percent against the dollar as of mid-January and then climbing another 5 percent through the first nine days of February. As an example, assume a borrower has entered into a hedge with a notional of $100M that is designed to pay out if the 10-year swap rate exceeds 2.00%. A variable item means that the expected future cash flows from this item change as a result of certain risk exposure, for example, variable interest rates or foreign currencies. The . ("undefined"!=typeof FormData&&t instanceof FormData))try{return JSON.stringify(t).length}catch(e){return}}}},{}],19:[function(t,e,n){var r=0,o=navigator.userAgent.match(/Firefox[\/\s](\d+\.\d+)/);o&&(r=+o[1]),e.exports=r},{}],20:[function(t,e,n){function r(t,e){if(!o)return!1;if(t!==o)return!1;if(!e)return!0;if(!i)return!1;for(var n=i.split("."),r=e.split(". Thank you so much. While many ETFs track an index passively, such as the S&P 500 or the . A measures its loan to B at amortised cost 3.Stock/Share Market Investing Live BSE/NSE, India Stock Market Recommendations and Tips, Live Stock Markets, Sensex/Nifty, Commodity Market, Investment Portfolio, Financial News, Mutual Funds. . fetch('https://geo.cnbc.com/info/').then(res => res.json()).then(result => { What is a Forward Contract In a money market hedge, the forward price is equal to the current spot price multiplied by the ratio of the currency's . N.p., 03 Apr. Hi, Silvia, This is cash flow hedge you fixed your cash flows and you will always pay 2%. Some of hedging instruments are as follows . Web. CHICAGO, March 01, 2023 (GLOBE . money market hedge produces less cash flow. If a forward contract is booked for cashflows (basically for receipt of dividend, receivables etc) by a manufacturing company. radica solitaire handheld game instructions; npm install tailwindcss@latest postcss@latest autoprefixer@latest; azure data factory books; greenbrier high school volleyball Airbus sold an aircraft, A400, to Delta Airlines, a U.S. company, and billed $30 million payable in six months. Summary. In detail, the demand is implied by the fuels' and power forward prices. console.log('PUB-GDPR-CHECK'); if (isOneTrustAnyBlocked()) { 1.Vanilla interest rate swap with bank By Suicup Own work (CC BY-SA 3.0) via Commons Wikimedia, Filed Under: Investment Tagged With: Compare Hedging and Forward Contract, Exchange Traded Instruments, Forward Contract, Forward Contract Definition, Forward Contract Features, hedging, Hedging and Forward Contract Differences, Hedging Definition, Hedging Features, Hedging Instruments, Hedging vs Forward Contract, Over the Counter Instruments. All Rights Reserved. Hedging is a form of investment to protect another investment, while derivatives come in the form of contracts or agreements between two parties. Hedging. My question resides on the presentation of the hedging instruments gain or loss when it is ultimately reflected in the P&L. An agreement is made between the companies for supply of crude of 500 barrels for $150 per barrel. if (typeof window === 'undefined') return; The hedge is set up in advance of an expected transaction taking place in a foreign currency. 'content_id' : '103412461' , The foreign exchange, or Forex, is a decentralized marketplace for the trading of the world's currencies. When would a money market hedge of payables be preferred to a forward hedge? This can help gain international equity exposure and mitigate the effect of exchange-rate fluctuations, without being actively bullish or bearish on the direction of the U.S. dollar or foreign currencies. Buying and selling currency spot positions are created to cover expected, Borrowing and lending positions are created to cover expected payables and. However, for retail investors or small businesses looking to hedge currency risk, the money market hedge is one way to protect against currency fluctuations without using the futures market or entering into a forward contract. How Forward Contracts Work She has also completed her Masters degree in Business administration. To hedge successfully, producers must understand futures markets, cash markets, and basis relationships. 5. The key difference between hedging and forward contract is that hedging is a technique used to reduce the risk of a financial asset whereas aforward contractis a contract between two parties to buy or sell an asset at a specified price on a future date. Thanks. We want to hear from you. 8.4 Foreign currency cash flow hedges. d.setTime(d.getTime() + 60 * 60 * 24 * 30 * 1000); *)$/,l=["appendChild","insertBefore","replaceChild"];f.inPlace(HTMLElement.prototype,l,"dom-"),f.inPlace(HTMLHeadElement.prototype,l,"dom-"),f.inPlace(HTMLBodyElement.prototype,l,"dom-"),c.on("dom-start",function(t){r(t[0])})}},{}],10:[function(t,e,n){var r=t("ee").get("mutation"),o=t(24)(r),i=NREUM.o.MO;e.exports=r,i&&(window.MutationObserver=function(t){return this instanceof i?new i(o(t,"fn-")):i.apply(this,arguments)},MutationObserver.prototype=i.prototype)},{}],11:[function(t,e,n){function r(t){var e=a.context(),n=s(t,"executor-",e),r=new f(n);return a.context(r).getCtx=function(){return e},a.emit("new-promise",[r,e],e),r}function o(t,e){return e}var i=t(24),a=t("ee").get("promise"),s=i(a),c=t(21),f=NREUM.o.PR;e.exports=a,f&&(window.Promise=r,["all","race"].forEach(function(t){var e=f[t];f[t]=function(n){function r(t){return function(){a.emit("propagate",[null,!o],i),o=o||!t}}var o=!1;c(n,function(e,n){Promise.resolve(n).then(r("all"===t),r(!1))});var i=e.apply(f,arguments),s=f.resolve(i);return s}}),["resolve","reject"].forEach(function(t){var e=f[t];f[t]=function(t){var n=e.apply(f,arguments);return t!==n&&a.emit("propagate",[t,!0],n),n}}),f.prototype["catch"]=function(t){return this.then(null,t)},f.prototype=Object.create(f.prototype,{constructor:{value:r}}),c(Object.getOwnPropertyNames(f),function(t,e){try{r[e]=f[e]}catch(n){}}),a.on("executor-start",function(t){t[0]=s(t[0],"resolve-",this),t[1]=s(t[1],"resolve-",this)}),a.on("executor-err",function(t,e,n){t[1](n)}),s.inPlace(f.prototype,["then"],"then-",o),a.on("then-start",function(t,e){this.promise=e,t[0]=s(t[0],"cb-",this),t[1]=s(t[1],"cb-",this)}),a.on("then-end",function(t,e,n){this.nextPromise=n;var r=this.promise;a.emit("propagate",[r,!0],n)}),a.on("cb-end",function(t,e,n){a.emit("propagate",[n,!0],this.nextPromise)}),a.on("propagate",function(t,e,n){this.getCtx&&!e||(this.getCtx=function(){if(t instanceof Promise)var e=a.context(t);return e&&e.getCtx?e.getCtx():this})}),r.toString=function(){return""+f})},{}],12:[function(t,e,n){var r=t("ee").get("raf"),o=t(24)(r),i="equestAnimationFrame";e.exports=r,o.inPlace(window,["r"+i,"mozR"+i,"webkitR"+i,"msR"+i],"raf-"),r.on("raf-start",function(t){t[0]=o(t[0],"fn-")})},{}],13:[function(t,e,n){function r(t,e,n){t[0]=a(t[0],"fn-",null,n)}function o(t,e,n){this.method=n,this.timerDuration=isNaN(t[1])?0:+t[1],t[0]=a(t[0],"fn-",this,n)}var i=t("ee").get("timer"),a=t(24)(i),s="setTimeout",c="setInterval",f="clearTimeout",u="-start",d="-";e.exports=i,a.inPlace(window,[s,"setImmediate"],s+d),a.inPlace(window,[c],c+d),a.inPlace(window,[f,"clearImmediate"],f+d),i.on(c+u,r),i.on(s+u,o)},{}],14:[function(t,e,n){function r(t,e){d.inPlace(e,["onreadystatechange"],"fn-",s)}function o(){var t=this,e=u.context(t);t.readyState>3&&!e.resolved&&(e.resolved=!0,u.emit("xhr-resolved",[],t)),d.inPlace(t,y,"fn-",s)}function i(t){g.push(t),h&&(x?x.then(a):v?v(a):(E=-E,O.data=E))}function a(){for(var t=0;t34||l<10)||window.opera||t.addEventListener("progress",function(t){e.lastSize=t.loaded},!1)}),f.on("open-xhr-start",function(t){this.params={method:t[0]},i(this,t[1]),this.metrics={}}),f.on("open-xhr-end",function(t,e){"loader_config"in NREUM&&"xpid"in NREUM.loader_config&&this.sameOrigin&&e.setRequestHeader("X-NewRelic-ID",NREUM.loader_config.xpid)}),f.on("send-xhr-start",function(t,e){var n=this.metrics,r=t[0],o=this;if(n&&r){var i=h(r);i&&(n.txSize=i)}this.startTime=a.now(),this.listener=function(t){try{"abort"===t.type&&(o.params.aborted=!0),("load"!==t.type||o.called===o.totalCbs&&(o.onloadCalled||"function"!=typeof e.onload))&&o.end(e)}catch(n){try{f.emit("internal-error",[n])}catch(r){}}};for(var s=0;s