The Wayback Machine - https://web.archive.org/web/20201213085416/https://www.hwnninjurylaw.com/lexington/

Lexington Personal Injury Lawyers

' $("#four").one('click', function(){ $('#new-player').html(iframe); }); });

Trust Hare, Wynn, Newell & Newton, LLP With Your Case


Hare, Wynn, Newell & Newton, LLP
325 W Main St #210, Lexington, KY 40507
(859) 550-2900

Contact the dedicated Lexington personal injury attorneys at Hare, Wynn, Newell & Newton, LLP if you have been injured in a life-changing accident.

Injuries happen at the most unexpected moments. A quick trip to the store. A slip and fall at work. An incident while on a family vacation. When tragedy strikes, it can turn your world upside down, leaving long-lasting health issues and emotional trauma.  Find comfort in knowing that you do not have to face your suffering alone.

Call Hare, Wynn, Newell & Newton, LLP today at (859) 550-2900 if you need a team of personal injury attorneys who have the knowledge, skill, and dedication to help you get your life back together.

Why Hire Hare, Wynn, Newell & Newton, LLP For Your Case?

Suffering a catastrophic injury is, undoubtedly, one of the scariest experiences any individual can ever live through. From being overwhelmed with medical bills to dealing with your insurance company or missing substantial amounts of work, your injury can lead to a host of issues that you might not understand how to overcome.

That’s where Hare, Wynn, Newell & Newton, LLP steps in. Our trustworthy Lexington personal injury lawyers will guide you through the entire claims process and deliver personalized attention and care. We’ll work hard to ensure you obtain the compensation you need to take care of medical bills, lost wages, and any lingering pain and suffering you are dealing with.

In order to build a comprehensive case, we work with a team of experts that includes:

  • Medical professionals
  • Investigators
  • Car accident reconstruction experts
  • Engineers

Our attorneys work with a number of teams to prove that negligence was involved. This helps make sure you are paid the full amount you deserved to recover from an injury and pay for damages to your property.

What to Do If You Have Been Injured

At Hare, Wynn, Newell & Newton, LLP, we believe that keeping our clients informed is absolutely essential to developing a strong claim. If you have suffered from an injury, you’ll want to take the following steps immediately after the incident:

Step 1: Notify the appropriate party. If you’re in a motor vehicle accident, you should call 911 and wait for law enforcement to arrive at the scene. For injuries sustained on someone else’s property, notify management, and fill out an incident report.

Step 2: Take photos of the scene. Evidence is crucial in any personal injury case. If you can take pictures of the dangerous conditions that led to your injuries, that could improve your chance of recovering compensation. For example, if you tripped on a cracked sidewalk in front of a business, take a picture of it.

Step 3: Obtain the at-fault party’s insurance information. After a car crash, you can ask for the other driver’s auto insurance details. If you get hurt in a slip and fall accident or from medical malpractice, ask for the facility’s general liability insurance.

Step 4: Talk to people who saw the accident occur. Write down their names and phone numbers so they can provide witness statements for the insurance claim or lawsuit.

Step 5: Seek medical treatment immediately. Don’t wait to schedule an initial appointment. Insurance companies look at gaps in treatment as evidence that the injury wasn’t serious or you don’t require medical attention. Be sure to continue treating until your medical providers release you from their care.

Step 6: Hire a Lexington personal injury lawyer to assist you with your case.

Speak With One of Our Lexington Injury Lawyers

What Does a Personal Injury Investigation Look Like?

You should enlist the help of a qualified Lexington injury lawyer when you get hurt due to someone else’s careless actions. We have experience investigating personal injury cases and will ensure we collect sufficient evidence that proves fault.

Initial consultation. The first step in any investigation is to meet with you and discuss the details of your case. We’ll review all the information to determine what caused the accident and who was at fault.

Accident/incident report. We’ll request a copy of the accident/incident report. If your injuries were due to something like medical malpractice or premises liability, we’ll ask for a copy from the medical facility, manager, or business owner. For car crashes, we can request an accident report that law enforcement completed.

Witnesses. We will try to find people who saw what happened and get their statements. Witnesses could improve the chance of recovering compensation if they confirm your recollection of events.

Security footage. If there was a security camera in the area, we’ll obtain a copy of the footage to review. This type of evidence could provide irrefutable proof of who was responsible for your injuries.

Medical treatment. We’ll speak with your doctors and review the medical records. We need to make sure they’re accurate and explicitly state the injury you suffered and how it occurred.

Accident scene evidence. If we’re able to visit the scene of the accident, we’ll collect evidence, such as photos. There might be a defect that caused someone to get hurt in some situations, such as a pothole in a parking lot.

Our Lexington Personal Injury Practice Areas

If you or someone you love has suffered a severe injury, you need the best legal representation that Lexington has to offer. The seasoned attorneys at Hare, Wynn, Newell & Newton, LLP have a proven track record of success that spans over a century.

We know how to deliver personalized attention and results that help cover medical bills, property damages, pain and suffering, and any emotional trauma you might have suffered from your personal injury.

At Hare, Wynn, Newell & Newton, LLP, our personal injury lawyers can provide services that cater to victims of:

When you or your loved one has faced a catastrophic injury, you need the experienced and unmatched reputation of Hare, Wynn, Newell & Newton, LLP to work for you. Rest assured that our Lexington personal injury attorneys will lift you up and help you recover the compensation you need to begin the healing process.

Contact us today at (859) 550-2900 and start on the path to recovery.

What Are the Damages Available for Injuries?

Damages are an attempt to measure the financial burden a plaintiff has undergone due to the injuries caused by the liable party’s actions. There are several types of damages that can be awarded to a winning plaintiff, including:

  • Compensatory damages – These are damages the defendant must pay for the injuries they caused.
  • Punitive damages – This form of damage is meant to punish the losing party and are essentially charged as a fine.

It is worth noting that the state of Kentucky places no caps on damages that can be received in a personal injury case. Both economic damages and non-economic damages are uncapped.

Depending on the circumstances surrounding your claim, our qualified Lexington personal injury attorneys can help you to recover compensation that includes but is not limited to:

  • Medical expenses – When you file a personal injury claim, you can fight for compensation to cover not only current medical expenses and future medical expenses related to your injury.
  • Disfigurement – If your injury caused a major alteration to your physical appearance and affects your ability to live a “normal life,” disfigurement damages may be obtained.
  • Property damage – Hare, Wynn, Newell & Newton, LLP will help to recover compensation associated with lost property (ex. your car in a car accident).
  • Pain and suffering – This compensation covers quality of life changes and will vary from case to case.
  • Emotional distress and trauma – Personal injury accidents are traumatic. Our personal injury attorneys will fight to obtain the compensation you need for counseling or other activities that can help to give you back some peace of mind.
  • Loss of income and future earnings – Recovery for any lost or future wages if your injury does not allow you to return to work.
  • Loss of consortium – Personal injury accidents don’t just affect victims; they also affect your loved ones. This type of compensation helps cover injuries that affect a victim’s ability to interact with their spouse or children.
  • Physical impairment – Paid to victims of accidents who are no longer able to enjoy activities that they previously did.

If you are considering filing a personal injury claim, be aware that there is a statute of limitations that sets a deadline for filing such a claim. In Kentucky, this deadline is ONE YEAR AFTER the accident date (in most cases).

Contact Our Lexington, KY Office Today

Common Injuries Suffered from Personal Injury Accidents

The injuries accident victims sustain depend on each individual situation. Some accidents cause more physical harm than others. There’s a range of injuries that could result from an accident, from minor to severe. Some people recover completely within a few months, while others end up with permanent disability or impairment.

Following are some of the most common injuries we see that result from personal injury accidents:

  • Traumatic brain injury: This occurs when blunt force trauma interferes with normal brain functioning. It could impact physical abilities, cognitive function, and even cause death.
  • Back injuries: There are various muscles and soft tissue in the back that could become damaged in an accident. A pinched nerve, sprain, herniated disc, or bulging disc could all cause pain and possibly lead to permanent medical conditions.
  • Spinal cord injuries: Injury to the nerves, vertebrae, or another part of the spinal cord can affect someone’s ability to sit up, walk, and move around. Paralysis is a severe disability that could occur if there’s enough damage.
  • Loss of limb or amputation: You could lose a limb in a car accident or require amputation if the damage is too severe to repair. Sepsis or infection could also lead to a necessary surgical amputation. In serious situations, the victim could die without amputating the infected limb.
  • Broken bones: Some breaks only require immobilization and rest to heal. Others are more complicated. If the damage is bad enough, surgery might be necessary. Many people need ongoing physical therapy to get full mobility back in the affected area of the body.
  • Neck injuries: This type of injury could involve a sprain or strain to the ligaments, tendons, or muscles. It’s commonly caused by whiplash when the head snaps forward and backward quickly. Recovery might require physical therapy and pain management. Some people suffer from pain and lack of mobility for the rest of their life.
  • Burns: Many burns happen due to motor vehicle accidents, defective products, workplace accidents, and explosions. Some are superficial first-degree burns, while others are debilitating and require a skin graft. Severe cases involve damage to all layers of skin and affect the tissue and muscle beneath.
  • Psychological trauma: Even when wounds heal, and people make a full physical recovery from their injuries, the psychological effects could be long-lasting. Common psychological injuries include post-traumatic stress disorder (PTSD), anxiety, and depression.
  • Internal organ damage: Different types of accidents or scenarios could lead to damage to internal organs. Examples include:
    • Ruptured spleen
    • Internal bleeding
    • Punctured organs from broken ribs
    • Ruptured abdominal aorta
    • Punctured lung

Timeline of a Personal Injury Case

  • Accident and Injuries Occur – Personal injury accidents like car wrecks, falls, nursing home abuse, and dog bites often leave victims with severe and life-threatening injuries.When victims are injured through no fault of their own, they have a legal right to file a personal injury claim against the person, business, or other negligent party that harmed them and fight for compensation.
  • Victim Gets Medical Treatment – The top priority after an accident is your health. Victims sometimes don’t want to get medical attention after an accident because they think they’re fine.It’s critical to see a doctor as soon as possible to get the treatment you need. Many injuries don’t appear until weeks or months after an accident, and they can worsen without treatment.Seeing a physician is also an essential step in getting the compensation you’re owed after an accident.Without a timely medical report, insurance might argue your injuries aren’t as bad as you claim or that something besides the accident caused them.
  • Victim Hires a Lawyer – Hiring an experienced personal injury attorney helps to increase your chances of getting the full compensation you deserve.Most personal injury attorneys will not charge any fees unless they recover compensation for your accident.
  • Attorney Investigates Case – To win a personal injury claim, you need solid evidence to prove who was liable for the accident, show that they caused the accident by doing something negligent or wrongful, and demonstrate that this accident caused your injuries and damages.Your attorney will investigate your accident to gather these essential pieces of evidence on your behalf.
  • Lawyer Files Claim for the Victim – Many personal injury claims are settled out of court before a lawsuit even begins. Your attorney can help you file a personal injury claim and make sure the paperwork and documentation you submit is complete and convincing.They’ll also help determine how much your case is worth to help you understand whether insurance is making an offer that will cover your current and future expenses from the accident.Additionally, your lawyer will negotiate with the negligent party’s insurer and other representatives on your behalf and help you fight for the full compensation you’re owed.
  • Lawsuit Begins – If insurance won’t agree to a fair settlement, your lawyer can handle the paperwork and all other details needed to file a personal injury lawsuit on your behalf.They can also use their knowledge of statutes of limitations and other local and state laws to help ensure your suit is filed on time and at the correct location.Plus, they can help carry out any actions required by law related to the lawsuit, such as serving the negligent party with an official notice of the suit against them.
  • Discovery – This phase is where the victim and defendant investigate what the other party is claiming, and they send each other questions and requests for documents. They might also interview or “depose” each relevant party, as well as witnesses to the accident.The discovery phase might turn into a long waiting period for victims because it often takes several months or over a year for more complex cases.
  • Mediation – Depending on the court and local laws, the parties to a lawsuit might enter mediation voluntarily or under court orders before the case goes to trial. This is a process where a neutral third party works with each relevant party and their lawyers to try to reach a settlement.
  • Trial – If the parties in a personal injury claim can’t reach an agreeable settlement in mediation, then the case will go to trial. Depending on the court’s calendar and whether the trial is with a full jury or just a judge, it can sometimes take a while to set a trial date.If the case is complex or involves multiple parties, the trial itself might last for days, weeks, or even months. During the trial, each side will present their arguments and evidence for the court to decide who owes compensation for the accident and how much they must pay the victim.

Personal Injury Timeline Infographic

How Much Does a Personal Injury Lawyer Cost?

Many accident victims will choose not to seek legal representation due to the expensive fees and associated costs. You might feel overwhelmed by the prospect of spending more money than you already have. You’re already paying for medical treatment and might be out of work because your injury prevents you from performing your job duties.

We know the stress you’re experiencing and don’t want to add to your financial burden. That’s why we take cases on a contingency-fee-basis. We don’t charge upfront fees or costs to represent you in your case. You won’t have to pay us until we collect compensation from an insurance claim or lawsuit. If we lose your case, you won’t owe us anything.

Serving Injured Individuals and Their Families in Lexington

Kentucky Statutes of Limitations for Filing Lawsuits

There are deadlines known as statutes of limitations for anyone who wants to file a lawsuit against the negligent party that caused their injuries. If you miss the deadline, you could lose your right to compensation.

Following are statutes of limitations for injuries, property damage, and fatalities:

  • Injuries: one year
  • Property damage: two years
  • Medical malpractice: one year
  • Wrongful death: one year

There are special circumstances where you could pause the clock on the statute of limitations:

  • You were under 18 years old or of unsound mind at the time of the accident. The clock wouldn’t start until you turn 18 or become legally competent.
  • If the at-fault party leaves the state at any point before you file suit, the clock would pause. Once they return, the clock would begin again, and their absence period wouldn’t count towards the statute.

 

Personal Injury Lawsuits in Lexington

Personal injury accidents tend to occur because a person acted negligently. Negligence is the legal theory that refers to one party’s failure to provide a reasonable degree of care to prevent harm to another. To prove negligence, our attorneys will establish the following five elements:

  • The defendant (liable party) owed you a “duty of care.”
  • The defendant breached the duty of care and failed to act as a reasonable person would have acted in the given situation.
  • You would not have been injured, had it not been for the defendant’s duty of care failure.
  • Your injuries are a direct result of the defendant’s failure and not some other cause.
  • The defendant is liable for damages.

Lawsuits are complicated legal procedures. If you try to handle it alone, you’ll likely lose your case. You could say something that diminishes your case’s value or get intimidated by the defense attorneys into accepting less compensation than you deserve. When you hire one of our Lexington personal injury lawyers, we’ll take care of each step below:

Step 1: File an initial complaint that includes:

  • All parties involved in the accident;
  • Elements of facts related to the case, such as how the incident happened;
  • Allegations being made against the at-fault party and how their actions caused your injuries; and
  • The damages you’re seeking.

Step 2: Prepare the summons. A summons is a document sent to defendants to let them know when they’re expected to appear in court. Multiple parties could serve a summons, but the easiest option is to hire a process server. There’s a fee we’ll need to pay for them to track down the defendant and give them the legal documents we prepared.

Step 3: File the complaint and summons. We’ll file the documents with the court where the accident occurred. We can use the state’s e-filing system to save time and money on traditional filing methods in person.

Step 4: Affidavit of Service. The process server will send us an Affidavit of Service once the defendant has been served the complaint and summons. It will include the date, time, and location where they received the documents. We will e-file with the court to inform them that we completed this step. It will begin a countdown to the deadline that the defendant has to file an answer.

Step 5: Answer: The defendant will have 20 days from the date they were served to file an answer to our complaint. If they miss the deadline, it could result in a default judgment, and the court might rule in your favor.

Step 6: If the defendant files their answer on time, the discovery process will begin. During this stage, both sides will prepare legal documents to send to each other:

  • Request for admissions: Admit or deny different statements associated with the case under oath.
  • Request for production: Request a copy of all evidence the opposing party found during their investigation.
  • Interrogatories: A list of questions that must be answered and signed in front of a notary public.

Step 7: During discovery, we can also schedule depositions. A deposition is a documented interview where we will meet with the defendant and their attorney to ask relevant questions about the case. The defense attorney might request a deposition from you as well.

Step 8: Some legal matters allow for mediation. Mediation is a meeting between both sides where they try to come to a settlement agreement. If we can settle the case for fair monetary value, we can avoid going to court.

Step 9: If we can’t reach a settlement with the defense attorney, we’ll have to move forward with preparing for trial. We’ll gather all the evidence we found, locate witnesses we can call to the stand, and consult with experts about the facts of the case. We’ll prepare arguments we can use in court and find a way to discount the defense attorney’s claims.

Step 10: Once the trial concludes, the judge or jury will issue a judgment. That judgment will indicate whether the defendant must pay you the compensation you’re seeking.

Hare, Wynn, Newell & Newton, LLP is ready to advocate for you. If you have been the victim of a personal injury, contact us right now at (859) 550-2900 for a free consultation.

Injured in an Accident? We Can Help!

The Personal Injury Claims Process

Most personal injury cases settle before they ever go to trial. Sometimes there’s clear evidence of liability, and the insurance company can’t dispute our request for a specific settlement amount. Insurance claims are typically easier to navigate than lawsuits. There are fewer steps involved, and the claimant doesn’t have mediations or depositions to participate in.

A typical claims process will involve the following steps:

File claim. The first step we’ll need to take is to figure out who caused your injuries, so we know who to file the claim with. Once we do that, we’ll request their liability insurance information so we can send a notice of claim letter. The letter will include:

  • Notice that we’re representing you
  • Date, time, and location of the accident
  • Brief description of how the accident occurred
  • Request for a copy of the insurance policy and other associated documents

Investigate. We’ll perform a thorough investigation into what happened and obtain crucial evidence that proves the at-fault party caused your injuries. Examples of evidence we’ll obtain include:

  • Eyewitness statements
  • Video surveillance footage
  • Photos of the accident scene
  • Copies of your medical records
  • Accident/incident reports
  • Available insurance policies

Communicate with the insurance adjuster. The insurance adjuster assigned to the claim might request specific details from us about the accident, your treatment, and injuries. They’ll send us forms to fill out while they’re performing their own investigation. Sometimes they’ll send authorizations so they can request copies of your medical records, but we can reject those.

If you receive anything in the mail, let us review it first. You’re under no legal obligation to complete any documents from the at-fault party’s insurance company.

Demand letterWhen we finish our investigation, we’ll prepare a demand letter and documentation to send to the insurance company. The demand letter will include details such as:

  • Date, time, location, and description of the accident
  • Injuries you sustained
  • Every doctor and facility you went to for medical treatment
  • Total expenses associated with the accident
  • Settlement amount we believe will compensate you for all of your damages

Negotiation. After the insurance adjuster reviews everything, they’ll either agree to our settlement request or provide a counteroffer. We’ll negotiate until we reach an agreement.

Lawsuit. If we’re unable to reach a fair settlement agreement, we can file a lawsuit against the at-fault party in order to pursue the comprehensive compensation you need.

How Working With Hare, Wynn, Newell & Newton, LLP Can Benefit You

Personal injury claims can become very complex and too challenging for an individual to handle on their own. That’s why securing the legal guidance of a qualified Lexington personal injury lawyer is so important to developing a compelling case.

When you choose to work with the Lexington personal injury lawyers at Hare, Wynn, Newell & Newton, LLP, you will benefit from a team that:

  • Has a wide range of experience handling claims similar to yours. Our team thoroughly understands Kentucky law, bad faith insurance tactics, and how much your claim is actually worth.
  • Can adequately deal with insurance companies. Unfortunately, insurance companies do not have your best interest at heart. Their goal is to provide you the minimal amount of recovery for your personal injury. Hare, Wynn, Newell & Newton, LLP will ensure that you get everything that is owed to you.
  • Can properly investigate your injury and claim. Our team will investigate and prepare your claim, determine liability, obtain relevant evidence, answer all questions you may have, negotiate with your insurance company, and successfully represent you in trial if necessary.
  • Will protect you from the bad faith dealings. At Hare, Wynn, Newell & Newton, LLP, we know how major insurance companies work. and we aren’t afraid to fight back. Insurance companies will try to intimidate you if they believe you are working alone. But with Hare, Wynn, Newell & Newton, LLP by your side, they’ll know you mean business.
  • Help to improve your odds of success and obtain full compensation. A personal injury claim can be a tough battle to prove. But Hare, Wynn, Newell & Newton, LLP can give you the upper hand you need to come out on top. Plus, we’ll help to improve your chances of securing a full recovery for your injuries.
  • Our attorneys are not afraid to take your case to trial. Not every personal injury attorney has the experience or skill to take your case to trial. At Hare, Wynn, Newell & Newton, LLP, our trial attorneys are ready to represent you in court if your case requires it. Liable parties are much more likely to offer a better settlement when they know you are willing to take your case to trial.

Contact the Lexington Personal Law Firm of Hare, Wynn, Newell & Newton, LLP

If you sustained injuries due to the negligence of someone else, contact Hare, Wynn, Newell & Newton, LLP immediately. We’ll begin working on your case and fight exhaustively to protect your rights. We know the compensation you’re entitled to and will ensure the opposing party treats you fairly. We won’t give up until you receive the maximum financial award you deserve.

Our legal team has the experience, resources, and knowledge to build a strong case that gets positive results. We understand the pain you’ve had to endure. You’re struggling to recover from your injuries and can’t afford your expensive medical bills. We’ll relieve your burden by handling every step of the process. You’ll have time to focus on healing so you can move forward with your life.

Call Hare, Wynn, Newell & Newton, LLP today at (859) 550-2900 if you need help with your personal injury case. We’re ready to take your call and get you on the road to recovery.

Frequently Asked Questions

  • What is the value of my case?

    The compensation you deserve will depend on various details associated with your personal injury case. An insurance adjuster or jury might consider the following factors when determining a fair number:

    • Type and severity of the injury
    • Amount of medical treatment required
    • Inability to return to work due to the injury
    • Length of the recovery period
    • How the injury affects daily life
    • Total costs incurred from the accident
    • Statements made by witnesses
    • Details on the accident/incident report
    • Availability of sufficient evidence proving fault
    • If the injury causes a disability or impairment
    • Insurance coverage available from the at-fault party
  • What is pure comparative fault?

    Pure comparative fault is a rule that could diminish your total damages depending on the percentage of blame you share. If you have a total of $100,000 in damages, you could seek the full $100,000 in compensation under normal circumstances. However, if you’re partially at fault for the accident, the maximum monetary damages you could recover would decrease.

    For example, let’s say your total damages are $100,000. If the insurance company determines you were 20% responsible for the injuries you sustained, the most compensation you could seek would be $80,000. You could still pursue an insurance claim or lawsuit, even if you share 1% of the blame. As long as you’re not 100% liable, you’re entitled to a financial award.

  • How long does an insurance claim take to settle?

    It depends. Some personal injury cases only take a few weeks to resolve, while others could take years. Typically, if there’s no question of who caused the accident, the insurance company will likely be willing to settle for the available liability coverage. However, if there’s conflicting information or a lack of sufficient evidence, it could take a while to prove you deserve compensation.

  • How long after an accident should I wait to see a doctor?

    You should seek medical treatment immediately after leaving the accident scene. The longer you wait, the easier it will be for the insurance company to deny your claim. If you don’t have consistent medical care documentation, they’ll argue that you didn’t sustain injuries in the accident, or it’s not serious enough to require treatment.

  • Can I switch to another Lexington personal injury lawyer?

    Yes. Even if you already have a lawyer handling your case, you can switch to someone else. If you’re not satisfied with the progress they’re making or can’t get them to return your calls, you have the right to retain services from another law firm. Common reasons accident victims change to another lawyer include:

    • Calls and emails go unreturned
    • You don’t fully trust them
    • They won’t explain how the legal process works
    • They don’t seem to have a good strategy
    • The case is taking too long to resolve
    • They pressure you into accepting lower compensation than you think you deserve
    • They won’t listen to your needs associated with the case

Hear from Our Clients

See what our clients are saying about working with us.

“Constant Contact”

Couldn’t be more please with my experience with Hare, Wynn, Newell and Newton! I changed my case representation to them after a poor experience with another lawyer and was incredibly happy that I did! Mr. Jonathan Fannin did a superb job on my case resulting in a quick and favorable settlement in my favor. He was in constant contact with me and I was immediately informed on anything going on with my case. Cannot say enough about Hare, Wynn, Newell and Newton! I would highly recommend them!

“Exceptional Work”

Brian Vines did exceptional work for me. Would definitely use this law firm again.

“Very Professional Law Firm”

I had an excellent experience with this very professional law firm. Brian and Matt were very professional and approached my personal injury case with diligence and urgency. They were very good to work with and worked hard to provide me the maximum settlement. I would highly recommend this firm and would use them again if needed.

Separator
ABA Defending Logo
Multi-Million Dollar Advocate Forum
Best Lawyers Logo
SuperLawyers Logo
American Justice Logo
National Trial Lawyers Logo
Expertise Logo 2020
' ); }); $("#videomodal").on("hidden.bs.modal", function () { var $this = $(this).find("iframe"); tempSrc = $this.attr("src"); $this.attr("src", ""); $this.attr("src", tempSrc); }); $("#homepagevideo a").on("click", function () { $("#yt-player").html( ' ' ); }); /*Homepage logo */ $(".mobile-logos").slick({ slidesToShow: 7, slidesToScroll: 1, autoplaySpeed: 3000, autoplay: true, dots: false, prevArrow: false, nextArrow: false, responsive: [ { breakpoint: 1200, settings: { slidesToShow: 4, slidesToScroll: 1, }, }, { breakpoint: 768, settings: { slidesToShow: 3, slidesToScroll: 1, }, }, { breakpoint: 500, settings: { slidesToShow: 1, slidesToScroll: 1, }, }, ], }); // Slick-clone is not lazyloading the images causing them to not work this is a fx // We are removing data-src and data-srcset and adding the image src itself for the cloned version $(".mobile-logos .slick-cloned img").each(function () { var imageSource = $(this).attr("data-src"); $(this) .attr("src", imageSource) .removeAttr("data-src data-srcset data-sizes"); }); /*Attorney page slider */ $(".attorneys-slider").slick({ slidesToShow: 6, slidesToScroll: 1, autoplaySpeed: 3000, autoplay: false, responsive: [ { breakpoint: 1200, settings: { slidesToShow: 5, slidesToScroll: 1, }, }, { breakpoint: 1025, settings: { slidesToShow: 3, slidesToScroll: 1, }, }, { breakpoint: 768, settings: { slidesToShow: 1, slidesToScroll: 1, }, }, ], }); $(".community-logos-slider").slick({ slidesToShow: 7, slidesToScroll: 1, autoplaySpeed: 3000, autoplay: false, responsive: [ { breakpoint: 1200, settings: { slidesToShow: 5, slidesToScroll: 1, }, }, { breakpoint: 1025, settings: { slidesToShow: 3, slidesToScroll: 1, }, }, { breakpoint: 768, settings: { slidesToShow: 1, slidesToScroll: 1, }, }, ], }); // Reviews Schema $(".carousel-slider-slick").slick({ slidesToShow: 1, slidesToScroll: 1, autoplaySpeed: 3000, autoplay: true, dots: false, prevArrow: false, nextArrow: false, adaptiveHeight: true, }); /*Changing list background Cases we handle section */ var caseHandle = $(".case-handle"); var caseHandleBackground = caseHandle.css("background-image"); // saving the main background image url ( needed if we want to return back to the main image mouse-leave) caseHandle.find("a").hover(function changebackground() { var anchorbackground = $(this).data("name"); // Grabing the data-name from anchor tags caseHandle.css({ background: 'url("' + anchorbackground + '")', "background-size": "cover", "background-position": "center center", "background-repeat": "no-repeat", }); // using throttle to allow only 1 click // Function to Return the original background when the mouse leaves the link /* }, function(){ caseHandle.css({background: caseHandleBackground, 'background-size':'cover','background-position':'center center', 'background-repeat': 'no-repeat'}); */ //returning the main background on mouse leave }); // Loading Lazy Images $("p").each(function () { var $this = $(this); if ($this.html().replace(/\s| /g, "").length == 0) $this.remove(); }); }); // one scroll end /*HomePage New Banner*/ $(document).ready(function () { $(".navbar-toggle").click(function () { $(this).toggleClass("open"); $(".navbar-default .navbar-nav").slideToggle(""); }); $(".back-top a").hide(); $(window).scroll(function () { if ($(this).scrollTop() > 100) { $(".back-top a").fadeIn(); } else { $(".back-top a").fadeOut(); } }); $(".back-top a").click(function () { $("html, body").animate( { scrollTop: 0, }, 800 ); return false; }); (function () { "use strict"; var toggles = document.querySelectorAll(".navbar-toggle"); for (var i = toggles.length - 1; i >= 0; i--) { var toggle = toggles[i]; toggleHandler(toggle); } function toggleHandler(toggle) { toggle.addEventListener("click", function (e) { e.preventDefault(); this.classList.contains("is-active") === true ? this.classList.remove("is-active") : this.classList.add("is-active"); }); } })(); var TopbarOffset = $(".primery-header").offset(); // getting the new offset for the topbar after the expand to avoid a jump when expanded! $(".warning-message-accordion input").click(function () { var warning_message_height = $(this).height(); console.log(warning_message_height); if ($(".homepage-header").hasClass("message-clicked")) { $(".primery-header.homepage-header").css("margin-top", "110px"); $(".homepage-header").removeClass("message-clicked"); } else { $(".primery-header.homepage-header").css( "margin-top", warning_message_height + 60 ); $(".homepage-header").addClass("message-clicked"); } TopbarOffset = $(".primery-header").offset(); console.log(TopbarOffset); }); $(window).on("scroll", function () { if ($(this).scrollTop() > TopbarOffset.top) { $(".primery-header").addClass("fixed-header"); } else { $(".primery-header").removeClass("fixed-header"); } }); var windowsize = $(window).width(); if (windowsize > 768) { ajax_fonts(); } else { setTimeout("ajax_fonts()", 2500); } // AOS intialization AOS.init({ startEvent: "load", disable: "mobile", }); new LazyLoad({ elements_selector: "div, .lazy", callback_enter: function (element) {}, callback_set: function (element) {}, callback_error: function (element) { element.src = "https://web.archive.org/web/20201213085416/https://placeholdit.imgix.net/~text?txtsize=21&txt=Fallback%20image&w=220&h=280"; }, }); /* $(window).scroll(function () { if ($(window).scrollTop() > 1) { $('.primery-header').addClass('fixed-header'); } else { $('.primery-header').removeClass('fixed-header'); } }); */ $(window).scroll(function () { if ($(this).scrollTop() > 20) { $(".addnum").addClass("numscroll"); } else { $(".addnum").removeClass("numscroll"); } }); // Equal Height Js (equalheight = function (a) { var e, b = 0, c = 0, d = new Array(); $(a).each(function () { if ( ((e = $(this)), $(e).height("auto"), (topPostion = e.position().top), c != topPostion) ) { for (currentDiv = 0; currentDiv < d.length; currentDiv++) d[currentDiv].height(b); (d.length = 0), (c = topPostion), (b = e.height()), d.push(e); } else d.push(e), (b = b < e.height() ? e.height() : b); for (currentDiv = 0; currentDiv < d.length; currentDiv++) d[currentDiv].height(b); }); }), $(window).on("load resize ready", function () { equalheight(".eq-height"); }); $(".flex-box-item").mouseenter(function () { $(this).addClass("flex-box-item-hovered"); $(this).find("a").addClass("btn btn-blue"); }); $(".flex-box-item").mouseleave(function () { $(this).removeClass("flex-box-item-hovered"); $(this).find("a").removeClass("btn btn-blue"); }); // var src = $("#modal-container-1").find('iframe').attr('src'); $(".button").click(function () { var buttonId = $(this).attr("id"); $("#modal-container-1").removeAttr("class").addClass(buttonId); $("body").addClass("modal-active"); // $('#modal-container-1').find('iframe').attr('src', src); }); $("#modal-container-1").click(function () { $(this).addClass("out"); $("body").removeClass("modal-active"); // $(this).find('iframe').attr('src', ''); var memory = $(this).html(); $(this).html(memory); }); }); function openVideo(event) { $("#videomodal").modal("show"); $("#yt-player").html( '' ); } function ajax_fonts() { $.ajax({ beforeSend: function (xhr) { xhr.overrideMimeType("application/octet-stream"); }, success: function (data) { $(".opacity0").addClass("opacity1"); $("", { rel: "stylesheet", href: "/wp-content/themes/Hare Theme 2018/css/font.css", }).appendTo("head"); }, }); var script = document.createElement("script"); script.async = true; script.type = "text/javascript"; var target = "https://web.archive.org/web/20201213085416/https://www.clickcease.com/monitor/stat.js"; script.src = target; var elem = document.head; elem.appendChild(script); }

');c.document.close();setTimeout(function(){c.focus();c.print();setTimeout(function(){b._canvasJSContainer.removeChild(d)},1E3)},500)};p.prototype.getPercentAndTotal=function(a,d){var b=null,c=null, e=null;if(0<=a.type.indexOf("stacked"))c=0,b=d.x.getTime?d.x.getTime():d.x,b in a.plotUnit.yTotals&&(c=a.plotUnit.yTotals[b],e=isNaN(d.y)?0:100*(d.y/c));else if("pie"===a.type||"doughnut"===a.type||"funnel"===a.type||"pyramid"===a.type){for(b=c=0;b=m||"undefined"=== typeof m||0>=v||"undefined"===typeof v)){if("horizontal"===this.orientation){n.textBlock=new ka(this.ctx,{x:0,y:0,maxWidth:v,maxHeight:this.itemWrap?m:this.lineHeight,angle:0,text:n.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"});n.textBlock.measureText();null!==this.itemWidth&&(n.textBlock.width=this.itemWidth-(r+l+("line"===n.chartType||"spline"===n.chartType||"stepLine"=== n.chartType?2*0.1*this.lineHeight:0)));if(!q||q.width+Math.round(n.textBlock.width+r+l+(0===q.width?0:this.horizontalSpacing)+("line"===n.chartType||"spline"===n.chartType||"stepLine"===n.chartType?2*0.1*this.lineHeight:0))>g)q={items:[],width:0},h.push(q),this.height+=f,f=0;f=Math.max(f,n.textBlock.height)}else n.textBlock=new ka(this.ctx,{x:0,y:0,maxWidth:x,maxHeight:!0===this.itemWrap?m:1.5*this.fontSize,angle:0,text:n.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily, fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"}),n.textBlock.measureText(),null!==this.itemWidth&&(n.textBlock.width=this.itemWidth-(r+l+("line"===n.chartType||"spline"===n.chartType||"stepLine"===n.chartType?2*0.1*this.lineHeight:0))),this.height>0,0),this.dataPoints.length):0):(s=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,s=0>0,0),this.dataPoints.length):0));for(;;){g=0a?c.x/a:a/c.x: Math.abs(c.x-a);qs-e&&s+e>=this.dataPoints.length)break;-1===m?(e++,m=1):m=-1}return d||b.dataPoint.x!==a?d&&null!==b.dataPoint?b:null:b};F.prototype.getDataPointAtXY=function(a,d,b){if(!this.dataPoints||0===this.dataPoints.length||athis.chart.plotArea.x2||dthis.chart.plotArea.y2)return null;b=b||!1;var c=[],e=0,g=0,m=1,l=!1,k=Infinity, h=0,s=0,q=0;if("none"!==this.chart.plotInfo.axisPlacement)if(q=(this.chart.axisX[0]?this.chart.axisX[0]:this.chart.axisX2[0]).getXValueAt({x:a,y:d}),this.axisX.logarithmic)var n=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),q=1>0,0),this.dataPoints.length):0;else n=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,q=0> 0,0),this.dataPoints.length):0;for(;;){g=0=n.x1&&(a<=n.x2&&d>=n.y1&&d<=n.y2)&&(c.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(n.x1- a),Math.abs(n.x2-a),Math.abs(n.y1-d),Math.abs(n.y2-d))}),l=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var u=na("markerSize",f,this)||4,r=b?20:u,p=Math.sqrt(Math.pow(n.x1-a,2)+Math.pow(n.y1-d,2));p<=r&&c.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:p});n=Math.abs(n.x1-a);n<=k?k=n:0r&&(p=Math.atan2(d-u.y,a-u.x),0>p&&(p+=2*Math.PI),p=Number(((180*(p/Math.PI)%360+360)%360).toFixed(12)),u=Number(((180*(n.startAngle/Math.PI)%360+360)%360).toFixed(12)),r=Number(((180*(n.endAngle/Math.PI)%360+360)%360).toFixed(12)),0===r&&1=r&&0!==f.y&&(r+=360,pu&&pp.y1&&dp.y6?(g=p.x6+(p.x5-p.x6)/(p.y5-p.y6)*(d-p.y6),p=p.x3+(p.x4-p.x3)/(p.y4-p.y3)*(d-p.y3)):(g=p.x1+(p.x6-p.x1)/(p.y6-p.y1)*(d-p.y1),p=p.x2+(p.x3-p.x2)/(p.y3-p.y2)*(d-p.y2)):(g=p.x1+(p.x4-p.x1)/(p.y4-p.y1)*(d-p.y1),p=p.x2+(p.x3-p.x2)/(p.y3-p.y2)*(d-p.y2)),a>g&&a

=n.x1-n.borderThickness/2&&a<=n.x2+n.borderThickness/2&&d>=n.y4-n.borderThickness/2&&d<=n.y1+n.borderThickness/ 2||Math.abs(n.x2-a+n.x1-a)=n.y1&&d<=n.y4)c.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(n.x1-a),Math.abs(n.x2-a),Math.abs(n.y2-d),Math.abs(n.y3-d))}),l=!0;break;case "candlestick":if(a>=n.x1-n.borderThickness/2&&a<=n.x2+n.borderThickness/2&&d>=n.y2-n.borderThickness/2&&d<=n.y3+n.borderThickness/2||Math.abs(n.x2-a+n.x1-a)=n.y1&&d<=n.y4)c.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(n.x1-a), Math.abs(n.x2-a),Math.abs(n.y2-d),Math.abs(n.y3-d))}),l=!0;break;case "ohlc":if(Math.abs(n.x2-a+n.x1-a)=n.y2&&d<=n.y3||a>=n.x1&&a<=(n.x2+n.x1)/2&&d>=n.y1-n.borderThickness/2&&d<=n.y1+n.borderThickness/2||a>=(n.x1+n.x2)/2&&a<=n.x2&&d>=n.y4-n.borderThickness/2&&d<=n.y4+n.borderThickness/2)c.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(n.x1-a),Math.abs(n.x2-a),Math.abs(n.y2-d),Math.abs(n.y3-d))}),l=!0}if(l||1E3q-e&&q+e>= this.dataPoints.length)break;-1===m?(e++,m=1):m=-1}a=null;for(d=0;dq[f].endValue;f++);a=f=q[f].startValue&&b<=q[f].endValue;p=b;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:p,label:this.labels[p]?this.labels[p]:null}):"axisX"===this.type&&this.labels[p]?this.labels[p]:ba(p,this.valueFormatString,this.chart._cultureInfo),a=new ka(this.ctx,{x:0,y:0,maxWidth:g,maxHeight:m,angle:this.labelAngle,text:this.prefix+a+this.suffix,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius, horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle",borderThickness:0}),this._labels.push({position:p,textBlock:a,effectiveHeight:null}))}f=n;for(b=this.intervalStartPosition;b<=e;b=parseFloat(1E-12>this.interval?this.logarithmic&&this.equidistantInterval?b*Math.pow(this.logarithmBase,this.interval):b+this.interval:(this.logarithmic&&this.equidistantInterval? b*Math.pow(this.logarithmBase,this.interval):b+this.interval).toFixed(12))){for(;fq[f].endValue;f++);a=f=q[f].startValue&&b<=q[f].endValue;p=b;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:p,label:this.labels[p]?this.labels[p]:null}):"axisX"===this.type&&this.labels[p]?this.labels[p]:ba(p,this.valueFormatString,this.chart._cultureInfo),a=new ka(this.ctx,{x:0,y:0,maxWidth:g,maxHeight:m,angle:this.labelAngle,text:this.prefix+a+this.suffix, horizontalAlign:"left",backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:p,textBlock:a,effectiveHeight:null}))}}else for(this.intervalStartPosition=this.getLabelStartPoint(new Date(this.viewportMinimum), this.intervalType,this.interval),e=Ya(new Date(this.viewportMaximum),this.interval,this.intervalType),f=n,b=this.intervalStartPosition;bq[f].endValue;f++);p=a;a=f=q[f].startValue&&a<=q[f].endValue;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:new Date(p),label:this.labels[p]?this.labels[p]:null}):"axisX"===this.type&&this.labels[p]?this.labels[p]:Ca(p,this.valueFormatString,this.chart._cultureInfo), a=new ka(this.ctx,{x:0,y:0,maxWidth:g,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxHeight:m,angle:this.labelAngle,text:this.prefix+a+this.suffix,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:p,textBlock:a,effectiveHeight:null, breaksLabelType:void 0}))}if("bottom"===this._position||"top"===this._position)l=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.width*Math.log(Math.min(this._labels[this._labels.length-1].position/this._labels[this._labels.length-2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.width/(this.logarithmic&&this.equidistantInterval?Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*S[this.intervalType+ "Duration"]*this.interval,g="undefined"===typeof this.options.labelMaxWidth?0.5*this.chart.width>>0:this.options.labelMaxWidth,this.chart.panEnabled||(m="undefined"===typeof this.options.labelWrap||this.labelWrap?0.8*this.chart.height>>0:1.5*this.labelFontSize);else if("left"===this._position||"right"===this._position)l=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.height*Math.log(Math.min(this._labels[this._labels.length-1].position/this._labels[this._labels.length- 2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.height/(this.logarithmic&&this.equidistantInterval?Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*S[this.intervalType+"Duration"]*this.interval,this.chart.panEnabled||(g="undefined"===typeof this.options.labelMaxWidth?0.3*this.chart.width>>0:this.options.labelMaxWidth),m="undefined"===typeof this.options.labelWrap||this.labelWrap?0.3*this.chart.height>>0:1.5*this.labelFontSize; for(c=0;cthis.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360)),"bottom"===this._position||"top"===this._position)if(g=0.9*l>>0,n=0,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize= this.labelFontSize;this.sessionVariables.labelMaxWidth=g;this.sessionVariables.labelMaxHeight=m;this.sessionVariables.labelAngle=this.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(b=0;bn&&(v=b,n=p.width)}b=0;for(b=this.intervalStartPosition< this.viewportMinimum?1:0;b>0>2*g&&(this.sessionVariables.labelAngle=-25)):(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>g?-25:this.sessionVariables.labelAngle):u(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=m,this.sessionVariables.labelMaxWidth= g,B.width+d.width>>0>2*g&&(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=p)):(this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>g?-25:this.sessionVariables.labelAngle,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=m,this.sessionVariables.labelWrap=this.labelWrap);else{if(u(this.options.labelWrap))if(!u(this.options.labelMaxWidth))this.options.labelMaxWidth>0,f=this.labelFontSize,nq&&(q=c-2*g,c>=2*g&&c<2.2*g?(this.sessionVariables.labelMaxWidth=g,u(this.options.labelFontSize)&&12=2.2*g&&c<2.8*g?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=p,this.sessionVariables.labelFontSize=f):c>=2.8*g&&c<3.2*g?(this.sessionVariables.labelMaxWidth=Math.max(g,n),this.sessionVariables.labelWrap=!0,u(this.options.labelFontSize)&&12=3.2*g&&c<3.6*g?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=p,this.sessionVariables.labelFontSize=this.labelFontSize):c>3.6*g&&c<5*g?(u(this.options.labelFontSize)&&125*g&&(this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=g,this.sessionVariables.labelFontSize=f,this.sessionVariables.labelMaxHeight=m,this.sessionVariables.labelAngle=this.labelAngle));else if(v===b&&(0===v&&n+this._labels[v+1].textBlock.measureText().width-2*g>q||v===this._labels.length-1&&n+this._labels[v-1].textBlock.measureText().width-2*g>q||0q&&n+this._labels[v-1].textBlock.measureText().width- 2*g>q))q=0===v?n+this._labels[v+1].textBlock.measureText().width-2*g:n+this._labels[v-1].textBlock.measureText().width-2*g,this.sessionVariables.labelFontSize=u(this.options.labelFontSize)?f:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=p;else if(0===q)for(this.sessionVariables.labelFontSize=u(this.options.labelFontSize)?f:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,c=0;c>0>2*g&&(this.sessionVariables.labelAngle=-25))}else(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxHeight=0===this.labelAngle?m:Math.min((c-g*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/ Math.sin(Math.PI/180*Math.abs(this.labelAngle)),c),p=0!=this.labelAngle?(h-(k+a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)):g,this.sessionVariables.labelMaxHeight=m=this.labelWrap?(h-p*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/Math.cos(Math.PI/180*Math.abs(this.labelAngle)):1.5*this.labelFontSize,u(this.options.labelWrap))?u(this.options.labelWrap)&&(this.labelWrap&&!u(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap= this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:p,this.sessionVariables.labelMaxHeight=m):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=p,this.sessionVariables.labelMaxHeight=c<0.9*l?0.9*l:c,this.sessionVariables.labelWrap=this.labelWrap)):(this.options.labelWrap?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:p): (u(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:p,this.sessionVariables.labelWrap=this.labelWrap),this.sessionVariables.labelMaxHeight=m)}for(c=0;c>0:this.options.labelMaxWidth,m="undefined"===typeof this.options.labelWrap||this.labelWrap?0.3*this.chart.height>>0:1.5*this.labelFontSize,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth= g;this.sessionVariables.labelMaxHeight=m;this.sessionVariables.labelAngle=u(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(b=0;b>0,l-2*m>n&&(n=l-2*m,l>=2*m&&l<2.4*m?(u(this.options.labelFontSize)&&12=2.4*m&&l<2.8*m?(this.sessionVariables.labelMaxHeight=c,this.sessionVariables.labelFontSize=this.labelFontSize,this.sessionVariables.labelWrap=!0):l>=2.8*m&&l<3.2*m?(this.sessionVariables.labelMaxHeight=m,this.sessionVariables.labelWrap=!0,u(this.options.labelFontSize)&&12< this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=u(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelAngle=u(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):l>=3.2*m&&l<3.6*m?(this.sessionVariables.labelMaxHeight=c,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelFontSize=this.labelFontSize):l>3.6*m&&l<10*m?(u(this.options.labelFontSize)&& 1210*m&&l<50*m&&(u(this.options.labelFontSize)&&12this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=c):(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:g,this.sessionVariables.labelMaxHeight=0===this.labelAngle?m:c,u(this.options.labelMaxWidth)&& (this.sessionVariables.labelAngle=this.labelAngle))):this.options.labelWrap?(this.sessionVariables.labelMaxHeight=0===this.labelAngle?m:c,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=g):(this.sessionVariables.labelMaxHeight=m,u(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap)}for(c=0;c>0:1.5*this.labelFontSize;if("left"===this._position||"right"===this._position)z=u(g.options.labelWrap)?this.sessionVariables.labelMaxHeight:g.labelWrap?0.8*this.chart.width>>0:1.5*this.labelFontSize;u(g.labelBackgroundColor)&&(g.labelBackgroundColor="#EEEEEE")}else m="bottom"===this._position||"top"===this._position?0.9*this.chart.width>>0:0.9*this.chart.height>> 0,z=u(g.options.labelWrap)||g.labelWrap?"bottom"===this._position||"top"===this._position?0.8*this.chart.width>>0:0.8*this.chart.height>>0:1.5*this.labelFontSize,u(g.labelBackgroundColor)&&(u(g.startValue)&&0!==g.startValue?g.labelBackgroundColor=r?"transparent":null:g.labelBackgroundColor="#EEEEEE");a=new ka(this.ctx,{x:0,y:0,backgroundColor:g.labelBackgroundColor,borderColor:g.labelBorderColor,borderThickness:g.labelBorderThickness,cornerRadius:g.labelCornerRadius,maxWidth:g.options.labelMaxWidth? g.options.labelMaxWidth:m,maxHeight:z,angle:this.labelAngle,text:g.labelFormatter?g.labelFormatter({chart:this.chart,axis:this,stripLine:g}):g.label,horizontalAlign:"left",fontSize:"outside"===g.labelPlacement?g.options.labelFontSize?g.labelFontSize:this.labelFontSize:g.labelFontSize,fontFamily:"outside"===g.labelPlacement?g.options.labelFontFamily?g.labelFontFamily:this.labelFontFamily:g.labelFontFamily,fontWeight:"outside"===g.labelPlacement?g.options.labelFontWeight?g.labelFontWeight:this.labelFontWeight: g.labelFontWeight,fontColor:g.labelFontColor||g.color,fontStyle:"outside"===g.labelPlacement?g.options.labelFontStyle?g.labelFontStyle:this.fontWeight:g.labelFontStyle,textBaseline:"middle"});this._stripLineLabels.push({position:g.value,textBlock:a,effectiveHeight:null,stripLine:g})}};z.prototype.createLabelsAndCalculateWidth=function(){var a=0,d=0;this._labels=[];this._stripLineLabels=[];var b=this.chart.isNavigator?0:5;if("left"===this._position||"right"===this._position){this.createLabels();for(d= 0;d=this.viewportMinimum&&this._stripLineLabels[d].stripLine.value<=this.viewportMaximum)&& (c=this._stripLineLabels[d].textBlock,e=c.measureText(),g=0===this.labelAngle?e.width:e.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+(e.height-c.fontSize/2)*Math.sin(Math.PI/180*Math.abs(this.labelAngle)),a=this.viewportMinimum&&this._stripLineLabels[b].stripLine.value<=this.viewportMaximum)&&(d=this._stripLineLabels[b].textBlock,e=d.measureText(),g=0===this.labelAngle?e.height:e.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(e.height-d.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),an[f].viewportMaximum);v++)r[v].endValue=n[f].viewPortMinimum&&(n[f].scaleBreaks.lastBreakIndex=v));for(var z=v=0,t=0,C=0,x=0,D=0,y=0,A,E,F=l=0,H,I,L,r=H=I=L=!1,f=0;fv;){var G=0,R=0,S=0,U=0,W=e=0,K=0,$=0,V=0,X=0,P=0,ba=0;if(b&& 0p.width- q?p.width-q:g.x2-ba-$);if(a&&0p.width-q?p.width-q:g.x2-ba-$),a[f]._labels&&1k&&(l+=0a[f].labelAngle?A-zk&&(l=E+t/2-k-ba),A-za[f].labelAngle&&0p.width-q?p.width-q:g.x2-ba-$),d[f].lineCoordinates.width=Math.abs(k-m),d[f]._labels&&1v;){V=U=R=S=$=K=W=e=Q=O=G=X=0;if(a&&0p.width-10?p.width-10:g.x2-V-W),b[f].labelAutoFit&&!u(C)&&(0<!a.length&&(m=0>b[f].labelAngle?Math.max(m,C):0===b[f].labelAngle? Math.max(m,C/2):m),0<!d.length&&(k=0c[f].chart.width-10?c[f].chart.width-10:g.x2-V-W),c[f]&& c[f].labelAutoFit&&!u(D)&&(0<!a.length&&(m=0b[f].chart.height-10?b[f].chart.height-10:g.y2),b[f].lineCoordinates.y1=l-(q[f]+b[f].margin+ X),b[f].lineCoordinates.y2=l-(q[f]+b[f].margin+X),b[f].bounds={x1:m,y1:l-(q[f]+X+b[f].margin),x2:k,y2:h-(X+b[f].margin),width:k-m,height:q[f]},b[f].title&&(b[f]._titleTextBlock.maxWidth=0p.height-Math.max(K,10)?p.height-Math.max(K,10):g.y2-S):g.y2>p.height-Math.max(K,10)?p.height-Math.max(K,10):g.y2;if(b&&0b[K].labelAngle?Math.max(k,C):0===b[K].labelAngle?Math.max(k,C/2):k,m=0>b[K].labelAngle||0===b[K].labelAngle?k-U:m);if(c&&0p.height-Math.max(K,10)?p.height-Math.max(K,10):g.y2-S):g.y2>p.height-Math.max(K,10)?p.height-Math.max(K,10):g.y2;if(b&&0b[K].labelAngle?Math.max(k,C):0===b[K].labelAngle?Math.max(k,C/2):k,m=0>b[K].labelAngle||0=== b[K].labelAngle?k-V:m);if(c&&0d[g].spacing?0:Math.abs(d[g].spacing/b),this.logarithmic&&(d[g].size=Math.pow(this.logarithmBase,d[g].size))};z.prototype.calculateBreaksInPixels=function(){if(!(this.scaleBreaks&&0>=this.scaleBreaks._appliedBreaks.length)){var a=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];a.length&&(this.scaleBreaks.firstBreakIndex=this.scaleBreaks.lastBreakIndex=null);for(var d=0;dthis.conversionParameters.maximum);d++)a[d].endValue< this.conversionParameters.minimum||(u(this.scaleBreaks.firstBreakIndex)&&(this.scaleBreaks.firstBreakIndex=d),a[d].startValue>=this.conversionParameters.minimum&&(a[d].startPixel=this.convertValueToPixel(a[d].startValue),this.scaleBreaks.lastBreakIndex=d),a[d].endValue<=this.conversionParameters.maximum&&(a[d].endPixel=this.convertValueToPixel(a[d].endValue)))}};z.prototype.renderLabelsTicksAndTitle=function(){var a=this,d=!1,b=0,c=0,e=1,g=0;0!==this.labelAngle&&360!==this.labelAngle&&(e=1.2);if("undefined"=== typeof this.options.interval){if("bottom"===this._position||"top"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var b=[],e=0!==this.labelAngle&&360!==this.labelAngle?1:1.2,m,l=this.viewportMaximum,k=this.lineCoordinates.width/Math.log(this.range),h=this._labels.length-1;0<=h;h--){q=this._labels[h];if(q.positionthis.viewportMaximum||!(h===this._labels.length-1||mthis.lineCoordinates.width*e&&this.labelAutoFit&&(d=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&& !this.equidistantInterval&&this.labelAutoFit){for(var b=[],p,l=this.viewportMaximum,k=this.lineCoordinates.height/Math.log(this.range),h=this._labels.length-1;0<=h;h--){q=this._labels[h];if(q.positionthis.viewportMaximum||!(h===this._labels.length-1||pthis.lineCoordinates.height*e&&this.labelAutoFit&&(d=!0)}}this.logarithmic&&(!this.equidistantInterval&&this.labelAutoFit)&&this._labels.sort(function(a,b){return a.position-b.position});var h=0,q,n;if("bottom"===this._position){for(h=0;hthis.viewportMaximum||d&&0!==g++%2&&this.labelAutoFit)||(n=this.getPixelCoordinatesOnAxis(q.position),this.tickThickness&&"inside"!=this.labelPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,c=1===this.ctx.lineWidth%2?(n.x<<0)+0.5:n.x<<0,this.ctx.beginPath(),this.ctx.moveTo(c,n.y<<0),this.ctx.lineTo(c,n.y+this.tickLength<<0),this.ctx.stroke()),0===q.textBlock.angle?(n.x-=q.textBlock.width/2,n.y="inside"===this.labelPlacement? n.y-(this.tickLength+q.textBlock.fontSize/2):n.y+this.tickLength+q.textBlock.fontSize/2):(n.x="inside"===this.labelPlacement?0>this.labelAngle?n.x:n.x-q.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):n.x-(0>this.labelAngle?q.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0),n.y="inside"===this.labelPlacement?0>this.labelAngle?n.y-this.tickLength-5:n.y-this.tickLength-Math.abs(q.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+5):n.y+this.tickLength+Math.abs(0>this.labelAngle?q.textBlock.width* Math.sin(Math.PI/180*this.labelAngle)-5:5)),q.textBlock.x=n.x,q.textBlock.y=n.y);"inside"===this.labelPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(h=0;ha.viewportMaximum||d&&0!==g++%2&&a.labelAutoFit)&&(n=a.getPixelCoordinatesOnAxis(q.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(n.x<<0)+0.5:n.x<<0;a.ctx.save(); a.ctx.beginPath();a.ctx.moveTo(b,n.y<<0);a.ctx.lineTo(b,n.y-a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height-3,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("top"===this._position){for(h=0;hthis.viewportMaximum||d&&0!==g++%2&&this.labelAutoFit)||(n=this.getPixelCoordinatesOnAxis(q.position),this.tickThickness&&"inside"!=this.labelPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,c=1===this.ctx.lineWidth%2?(n.x<<0)+0.5:n.x<<0,this.ctx.beginPath(),this.ctx.moveTo(c,n.y<<0),this.ctx.lineTo(c,n.y-this.tickLength<<0),this.ctx.stroke()),0===q.textBlock.angle?(n.x-=q.textBlock.width/2,n.y="inside"===this.labelPlacement? n.y+this.labelFontSize/2+this.tickLength+5:n.y-(this.tickLength+q.textBlock.height-q.textBlock.fontSize/2)):(n.x="inside"===this.labelPlacement?0a.viewportMaximum||d&&0!==g++%2&&a.labelAutoFit)&& (n=a.getPixelCoordinatesOnAxis(q.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===this.ctx.lineWidth%2?(n.x<<0)+0.5:n.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,n.y<<0);a.ctx.lineTo(b,n.y+a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+1,this.titleMaxWidth= this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===this._position){for(h=0;hthis.viewportMaximum||d&&0!==g++%2&&this.labelAutoFit)||(n=this.getPixelCoordinatesOnAxis(q.position),this.tickThickness&&"inside"!=this.labelPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,c=1===this.ctx.lineWidth%2?(n.y<<0)+0.5:n.y<<0,this.ctx.beginPath(),this.ctx.moveTo(n.x<< 0,c),this.ctx.lineTo(n.x-this.tickLength<<0,c),this.ctx.stroke()),0===this.labelAngle?(q.textBlock.y=n.y,q.textBlock.x="inside"===this.labelPlacement?n.x+this.tickLength+5:n.x-q.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5):(q.textBlock.y="inside"===this.labelPlacement?n.y:n.y-q.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),q.textBlock.x="inside"===this.labelPlacement?n.x+this.tickLength+5:0a.viewportMaximum||d&&0!==g++%2&&a.labelAutoFit)&&(n=a.getPixelCoordinatesOnAxis(q.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness; a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(n.y<<0)+0.5:n.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(n.x<<0,b);a.ctx.lineTo(n.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+1,this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"=== this._position){for(h=0;hthis.viewportMaximum||d&&0!==g++%2&&this.labelAutoFit)||(n=this.getPixelCoordinatesOnAxis(q.position),this.tickThickness&&"inside"!=this.labelPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,c=1===this.ctx.lineWidth%2?(n.y<<0)+0.5:n.y<<0,this.ctx.beginPath(),this.ctx.moveTo(n.x<<0,c),this.ctx.lineTo(n.x+this.tickLength<<0,c),this.ctx.stroke()),0===this.labelAngle? (q.textBlock.y=n.y,q.textBlock.x="inside"===this.labelPlacement?n.x-q.textBlock.width-this.tickLength-5:n.x+this.tickLength+5):(q.textBlock.y="inside"===this.labelPlacement?n.y-q.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0>this.labelAngle?n.y:n.y-(q.textBlock.height-q.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),q.textBlock.x="inside"===this.labelPlacement?n.x-q.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:0a.viewportMaximum||d&&0!==g++%2&&a.labelAutoFit)&&(n=a.getPixelCoordinatesOnAxis(q.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(n.y<< 0)+0.5:n.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(n.x<<0,b);a.ctx.lineTo(n.x-a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-1,this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}g=0;if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationIterationEnd", function(){for(h=0;ha.viewportMaximum||d&&0!==g++%2&&a.labelAutoFit)||(a.ctx.save(),a.ctx.beginPath(),q.textBlock.render(!0),a.ctx.restore())},this);else for(h=0;hthis.viewportMaximum||d&&0!==g++%2&&this.labelAutoFit)||q.textBlock.render(!0)};z.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx,d,b,c=this.chart.plotArea, e=0;d=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;ethis._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(Math.min(b.x,d.x),c.y1,Math.abs(b.x-d.x),Math.abs(c.y1-c.y2)),d=!1):d=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle= this.interlacedColor,e=0;ethis._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(c.x1,Math.min(b.y,d.y),Math.abs(c.x1-c.x2),Math.abs(d.y-b.y)),d=!1):d=!0;a.beginPath()};z.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&0this.viewportMaximum||u(h.value)||isNaN(this.range))||l.push(h))}for(c=0;cthis.viewportMaximum||isNaN(this.range))){a=this.getPixelCoordinatesOnAxis(b.position);if("outside"===b.stripLine.labelPlacement)if(h&&(this.ctx.strokeStyle= h.color,"pixel"===h._thicknessType&&(this.ctx.lineWidth=h.thickness)),"bottom"===this._position){var p=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0;this.ctx.beginPath();this.ctx.moveTo(p,a.y<<0);this.ctx.lineTo(p,a.y+this.tickLength<<0);this.ctx.stroke();0===this.labelAngle?(a.x-=b.textBlock.width/2,a.y+=this.tickLength+b.textBlock.fontSize/2):(a.x-=0>this.labelAngle?b.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,a.y+=this.tickLength+Math.abs(0>this.labelAngle?b.textBlock.width*Math.sin(Math.PI/ 180*this.labelAngle)-5:5))}else"top"===this._position?(p=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0,this.ctx.beginPath(),this.ctx.moveTo(p,a.y<<0),this.ctx.lineTo(p,a.y-this.tickLength<<0),this.ctx.stroke(),0===this.labelAngle?(a.x-=b.textBlock.width/2,a.y-=this.tickLength+b.textBlock.height):(a.x+=(b.textBlock.height-this.tickLength-this.labelFontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-(0this.labelAngle?a.y:a.y-(b.textBlock.height-b.textBlock.fontSize/ 2-5)*Math.cos(Math.PI/180*this.labelAngle),a.x=0this.chart.plotArea.x1?u(h.startValue)?a.x-=b.textBlock.height-b.textBlock.fontSize/ 2:a.x-=b.textBlock.height/2-b.textBlock.fontSize/2+3:(b.textBlock.angle=90,u(h.startValue)?a.x+=b.textBlock.height-b.textBlock.fontSize/2:a.x+=b.textBlock.height/2-b.textBlock.fontSize/2+3),a.y=-90===b.textBlock.angle?"near"===b.stripLine.labelAlign?this.chart.plotArea.y2-3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+b.textBlock.width)/2:this.chart.plotArea.y1+b.textBlock.width+3:"near"===b.stripLine.labelAlign?this.chart.plotArea.y2-b.textBlock.width-3:"center"=== b.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-b.textBlock.width)/2:this.chart.plotArea.y1+3):"top"===this._position?(b.textBlock.maxWidth=this.options.stripLines[c].labelMaxWidth?this.options.stripLines[c].labelMaxWidth:this.chart.plotArea.height-3,b.textBlock.measureText(),a.x-b.textBlock.height>this.chart.plotArea.x1?u(h.startValue)?a.x-=b.textBlock.height-b.textBlock.fontSize/2:a.x-=b.textBlock.height/2-b.textBlock.fontSize/2+3:(b.textBlock.angle=90,u(h.startValue)?a.x+= b.textBlock.height-b.textBlock.fontSize/2:a.x+=b.textBlock.height/2-b.textBlock.fontSize/2+3),a.y=-90===b.textBlock.angle?"near"===b.stripLine.labelAlign?this.chart.plotArea.y1+b.textBlock.width+3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+b.textBlock.width)/2:this.chart.plotArea.y2-3:"near"===b.stripLine.labelAlign?this.chart.plotArea.y1+3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-b.textBlock.width)/2:this.chart.plotArea.y2- b.textBlock.width-3):"left"===this._position?(b.textBlock.maxWidth=this.options.stripLines[c].labelMaxWidth?this.options.stripLines[c].labelMaxWidth:this.chart.plotArea.width-3,b.textBlock.angle=0,b.textBlock.measureText(),a.y-b.textBlock.height>this.chart.plotArea.y1?u(h.startValue)?a.y-=b.textBlock.height-b.textBlock.fontSize/2:a.y-=b.textBlock.height/2-b.textBlock.fontSize+3:a.y-b.textBlock.heightthis.chart.plotArea.y1? u(h.startValue)?a.y-=b.textBlock.height-b.textBlock.fontSize/2:a.y-=b.textBlock.height/2-b.textBlock.fontSize/2-3:a.y-b.textBlock.heightthis.viewportMaximum|| isNaN(this.range))||a[d].render(this.maskCtx);this.maskCtx.restore()}};z.prototype.renderCrosshair=function(a,d){this.crosshair.render(a,d)};z.prototype.renderGrid=function(){if(this.gridThickness&&0this.viewportMaximum||this._labels[c].breaksLabelType)||(a.beginPath(),d=this.getPixelCoordinatesOnAxis(this._labels[c].position),d=1===a.lineWidth%2?(d.x<<0)+0.5:d.x<<0,a.moveTo(d,b.y1<<0),a.lineTo(d,b.y2<<0),a.stroke());else if("left"===this._position||"right"===this._position)for(var c=0;cthis.viewportMaximum||this._labels[c].breaksLabelType)||(a.beginPath(), d=this.getPixelCoordinatesOnAxis(this._labels[c].position),d=1===a.lineWidth%2?(d.y<<0)+0.5:d.y<<0,a.moveTo(b.x1<<0,d),a.lineTo(b.x2<<0,d),a.stroke());a.restore()}};z.prototype.renderAxisLine=function(){var a=this.chart.ctx,d=r?this.chart._preRenderCtx:a,b=Math.ceil(this.tickThickness/(this.reversed?-2:2)),c=Math.ceil(this.tickThickness/(this.reversed?2:-2)),e,g;d.save();if("bottom"===this._position||"top"===this._position){if(this.lineThickness){this.reversed?(e=this.lineCoordinates.x2,g=this.lineCoordinates.x1): (e=this.lineCoordinates.x1,g=this.lineCoordinates.x2);d.lineWidth=this.lineThickness;d.strokeStyle=this.lineColor?this.lineColor:"black";d.setLineDash&&d.setLineDash(R(this.lineDashType,this.lineThickness));var m=1===this.lineThickness%2?(this.lineCoordinates.y1<<0)+0.5:this.lineCoordinates.y1<<0;d.beginPath();if(this.scaleBreaks&&!u(this.scaleBreaks.firstBreakIndex))if(u(this.scaleBreaks.lastBreakIndex))e=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+c;else for(var l= this.scaleBreaks.firstBreakIndex;l<=this.scaleBreaks.lastBreakIndex;l++)d.moveTo(e,m),d.lineTo(this.scaleBreaks._appliedBreaks[l].startPixel+b,m),e=this.scaleBreaks._appliedBreaks[l].endPixel+c;e&&(d.moveTo(e,m),d.lineTo(g,m));d.stroke()}}else if(("left"===this._position||"right"===this._position)&&this.lineThickness){this.reversed?(e=this.lineCoordinates.y1,g=this.lineCoordinates.y2):(e=this.lineCoordinates.y2,g=this.lineCoordinates.y1);d.lineWidth=this.lineThickness;d.strokeStyle=this.lineColor; d.setLineDash&&d.setLineDash(R(this.lineDashType,this.lineThickness));m=1===this.lineThickness%2?(this.lineCoordinates.x1<<0)+0.5:this.lineCoordinates.x1<<0;d.beginPath();if(this.scaleBreaks&&!u(this.scaleBreaks.firstBreakIndex))if(u(this.scaleBreaks.lastBreakIndex))e=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+b;else for(l=this.scaleBreaks.firstBreakIndex;l<=this.scaleBreaks.lastBreakIndex;l++)d.moveTo(m,e),d.lineTo(m,this.scaleBreaks._appliedBreaks[l].startPixel+c), e=this.scaleBreaks._appliedBreaks[l].endPixel+b;e&&(d.moveTo(m,e),d.lineTo(m,g));d.stroke()}r&&(a.drawImage(this.chart._preRenderCanvas,0,0,this.chart.width,this.chart.height),this.chart._breaksCanvasCtx&&this.chart._breaksCanvasCtx.drawImage(this.chart._preRenderCanvas,0,0,this.chart.width,this.chart.height),d.clearRect(0,0,this.chart.width,this.chart.height));d.restore()};z.prototype.getPixelCoordinatesOnAxis=function(a){var d={};if("bottom"===this._position||"top"===this._position)d.x=this.convertValueToPixel(a), d.y=this.lineCoordinates.y1;if("left"===this._position||"right"===this._position)d.y=this.convertValueToPixel(a),d.x=this.lineCoordinates.x2;return d};z.prototype.convertPixelToValue=function(a){if("undefined"===typeof a)return null;var d=0,b=0,c,d=!0,e=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],b="number"===typeof a?a:"left"===this._position||"right"===this._position?a.y:a.x;if(this.logarithmic){a=c=Math.pow(this.logarithmBase,(b-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit); if(b<=this.conversionParameters.reference===("left"===this._position||"right"===this._position)!==this.reversed)for(b=0;be[b].startValue/this.conversionParameters.minimum){c/=e[b].startValue/this.conversionParameters.minimum;if(ce[b].startValue/e[b-1].endValue){c/=e[b].startValue/e[b-1].endValue;if(cthis.conversionParameters.minimum))if(d)if(e[b].endValue>this.conversionParameters.minimum){if(1e[b].startValue){a=Math.pow(e[b].endValue/e[b].startValue,Math.log(c)/Math.log(e[b].size));break}else a*=e[b].startValue/this.conversionParameters.minimum*Math.pow(e[b].size,Math.log(e[b].startValue/this.conversionParameters.minimum)/Math.log(e[b].endValue/e[b].startValue))*c,c*=Math.pow(e[b].size,Math.log(this.conversionParameters.minimum/e[b].startValue)/Math.log(e[b].endValue/e[b].startValue));d=!1}else if(c1/e[b].size){a*=Math.pow(e[b].endValue/e[b].startValue,1>=e[b].size?1:Math.log(c)/Math.log(e[b].size))*c;break}else a/=e[b].endValue/e[b].startValue/e[b].size;c*=e[b].size;d=!1}else break;else if(c1/e[b].size){a*=Math.pow(e[b].endValue/e[b].startValue,1>=e[b].size?1:Math.log(c)/Math.log(e[b].size))*c;break}else a/=e[b].endValue/e[b].startValue/e[b].size;c*=e[b].size}else break; d=a*this.viewportMinimum}else{a=c=(b-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit;if(b<=this.conversionParameters.reference===("left"===this._position||"right"===this._position)!==this.reversed)for(b=0;b=e[b].size?0:c*(e[b].endValue- e[b].startValue)/e[b].size;break}else a+=e[b].endValue-this.conversionParameters.minimum-e[b].size*(e[b].endValue-this.conversionParameters.minimum)/(e[b].endValue-e[b].startValue),c-=e[b].size*(e[b].endValue-this.conversionParameters.minimum)/(e[b].endValue-e[b].startValue);d=!1}else if(c>e[b].startValue-this.conversionParameters.minimum){c-=e[b].startValue-this.conversionParameters.minimum;if(ce[b].startValue-e[b-1].endValue){c-=e[b].startValue-e[b-1].endValue;if(cthis.conversionParameters.minimum))if(d)if(e[b].endValue>this.conversionParameters.minimum)if(e[b].size&&this.conversionParameters.minimum+c*(e[b].endValue- e[b].startValue)/e[b].size>e[b].startValue){a=0>=e[b].size?0:c*(e[b].endValue-e[b].startValue)/e[b].size;break}else a+=e[b].startValue-this.conversionParameters.minimum+e[b].size*(this.conversionParameters.minimum-e[b].startValue)/(e[b].endValue-e[b].startValue),c+=e[b].size*(this.conversionParameters.minimum-e[b].startValue)/(e[b].endValue-e[b].startValue),d=!1;else if(c-1*e[b].size){a+=(e[b].endValue- e[b].startValue)*(0===e[b].size?1:c/e[b].size)+c;break}else a-=e[b].endValue-e[b].startValue-e[b].size;c+=e[b].size;d=!1}else break;else if(c-1*e[b].size){a+=(e[b].endValue-e[b].startValue)*(0===e[b].size?1:c/e[b].size)+c;break}else a-=e[b].endValue-e[b].startValue-e[b].size;c+=e[b].size}else break;d=this.conversionParameters.minimum+a}return d};z.prototype.convertValueToPixel=function(a){a=this.getApparentDifference(this.conversionParameters.minimum, a,a);return this.logarithmic?this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*Math.log(a/this.conversionParameters.minimum)/this.conversionParameters.lnLogarithmBase+0.5<<0:"axisX"===this.type?this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5<<0:this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5};z.prototype.getApparentDifference=function(a, d,b,c){var e=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];if(this.logarithmic){b=u(b)?d/a:b;for(var g=0;ge[g].endValue||(a<=e[g].startValue&&d>=e[g].endValue?b=b/e[g].endValue*e[g].startValue*e[g].size:a>=e[g].startValue&&d>=e[g].endValue?b=b/e[g].endValue*a*Math.pow(e[g].size,Math.log(e[g].endValue/a)/Math.log(e[g].endValue/e[g].startValue)):a<=e[g].startValue&&d<=e[g].endValue?b=b/d*e[g].startValue*Math.pow(e[g].size,Math.log(d/e[g].startValue)/Math.log(e[g].endValue/ e[g].startValue)):!c&&(a>e[g].startValue&&de[g].endValue||(a<=e[g].startValue&&d>=e[g].endValue?b=b-e[g].endValue+e[g].startValue+e[g].size:a>e[g].startValue&&d>=e[g].endValue?b=b-e[g].endValue+a+e[g].size*(e[g].endValue-a)/(e[g].endValue-e[g].startValue):a<=e[g].startValue&&de[g].startValue&&da[e].endValue||(this.viewportMinimum>=a[e].startValue&&this.viewportMaximum<= a[e].endValue?b=0:this.viewportMinimum<=a[e].startValue&&this.viewportMaximum>=a[e].endValue?(c=c/a[e].endValue*a[e].startValue,b=0a[e].startValue&&this.viewportMaximum>=a[e].endValue?(c=c/a[e].endValue*this.viewportMinimum,b=0a[e].endValue||(this.viewportMinimum>=a[e].startValue&&this.viewportMaximum<=a[e].endValue?b=0:this.viewportMinimum<=a[e].startValue&&this.viewportMaximum>=a[e].endValue?(c=c-a[e].endValue+a[e].startValue,b=0a[e].startValue&&this.viewportMaximum>=a[e].endValue?(c=c-a[e].endValue+this.viewportMinimum, b=0this.maxWidth?8:6);var a=Math.max(c,Math.floor(this.maxWidth/a)),e,g,m,c=0;!u(this.options.viewportMinimum)&&(!u(this.options.viewportMaximum)&&this.options.viewportMinimum>=this.options.viewportMaximum)&& (this.viewportMinimum=this.viewportMaximum=null);if(u(this.options.viewportMinimum)&&!u(this.sessionVariables.newViewportMinimum)&&!isNaN(this.sessionVariables.newViewportMinimum))this.viewportMinimum=this.sessionVariables.newViewportMinimum;else if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=this.minimum;if(u(this.options.viewportMaximum)&&!u(this.sessionVariables.newViewportMaximum)&&!isNaN(this.sessionVariables.newViewportMaximum))this.viewportMaximum=this.sessionVariables.newViewportMaximum; else if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;if(this.scaleBreaks)for(c=0;c=this.scaleBreaks._appliedBreaks[c].startValue||!u(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[c].startValue||!u(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[c].startValue)&& (!u(this.sessionVariables.newViewportMaximum)&&this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[c].endValue||!u(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[c].endValue||!u(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[c].endValue)){this.scaleBreaks._appliedBreaks.splice(c,1);break}if("axisX"===this.type){if(this.dataSeries&&0g?(c=Math.min(0.01*Math.abs(this.getApparentDifference(g,e,null,!0)),5),0<=g?e=g-c:g=isFinite(e)?e+c:0):(c=Math.min(0.01*Math.abs(this.getApparentDifference(e,g, null,!0)),0.05),0!==g&&(g+=c),0!==e&&(e-=c)),m=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1g&&(g=0));c=this.getApparentDifference(isNaN(this.viewportMinimum)||null===this.viewportMinimum?e:this.viewportMinimum,isNaN(this.viewportMaximum)||null===this.viewportMaximum?g:this.viewportMaximum,null, !0);if("axisX"===this.type&&b){this.intervalType||(c/1<=a?(this.interval=1,this.intervalType="millisecond"):c/2<=a?(this.interval=2,this.intervalType="millisecond"):c/5<=a?(this.interval=5,this.intervalType="millisecond"):c/10<=a?(this.interval=10,this.intervalType="millisecond"):c/20<=a?(this.interval=20,this.intervalType="millisecond"):c/50<=a?(this.interval=50,this.intervalType="millisecond"):c/100<=a?(this.interval=100,this.intervalType="millisecond"):c/200<=a?(this.interval=200,this.intervalType= "millisecond"):c/250<=a?(this.interval=250,this.intervalType="millisecond"):c/300<=a?(this.interval=300,this.intervalType="millisecond"):c/400<=a?(this.interval=400,this.intervalType="millisecond"):c/500<=a?(this.interval=500,this.intervalType="millisecond"):c/(1*S.secondDuration)<=a?(this.interval=1,this.intervalType="second"):c/(2*S.secondDuration)<=a?(this.interval=2,this.intervalType="second"):c/(5*S.secondDuration)<=a?(this.interval=5,this.intervalType="second"):c/(10*S.secondDuration)<=a?(this.interval= 10,this.intervalType="second"):c/(15*S.secondDuration)<=a?(this.interval=15,this.intervalType="second"):c/(20*S.secondDuration)<=a?(this.interval=20,this.intervalType="second"):c/(30*S.secondDuration)<=a?(this.interval=30,this.intervalType="second"):c/(1*S.minuteDuration)<=a?(this.interval=1,this.intervalType="minute"):c/(2*S.minuteDuration)<=a?(this.interval=2,this.intervalType="minute"):c/(5*S.minuteDuration)<=a?(this.interval=5,this.intervalType="minute"):c/(10*S.minuteDuration)<=a?(this.interval= 10,this.intervalType="minute"):c/(15*S.minuteDuration)<=a?(this.interval=15,this.intervalType="minute"):c/(20*S.minuteDuration)<=a?(this.interval=20,this.intervalType="minute"):c/(30*S.minuteDuration)<=a?(this.interval=30,this.intervalType="minute"):c/(1*S.hourDuration)<=a?(this.interval=1,this.intervalType="hour"):c/(2*S.hourDuration)<=a?(this.interval=2,this.intervalType="hour"):c/(3*S.hourDuration)<=a?(this.interval=3,this.intervalType="hour"):c/(6*S.hourDuration)<=a?(this.interval=6,this.intervalType= "hour"):c/(1*S.dayDuration)<=a?(this.interval=1,this.intervalType="day"):c/(2*S.dayDuration)<=a?(this.interval=2,this.intervalType="day"):c/(4*S.dayDuration)<=a?(this.interval=4,this.intervalType="day"):c/(1*S.weekDuration)<=a?(this.interval=1,this.intervalType="week"):c/(2*S.weekDuration)<=a?(this.interval=2,this.intervalType="week"):c/(3*S.weekDuration)<=a?(this.interval=3,this.intervalType="week"):c/(1*S.monthDuration)<=a?(this.interval=1,this.intervalType="month"):c/(2*S.monthDuration)<=a?(this.interval= 2,this.intervalType="month"):c/(3*S.monthDuration)<=a?(this.interval=3,this.intervalType="month"):c/(6*S.monthDuration)<=a?(this.interval=6,this.intervalType="month"):(this.interval=c/(1*S.yearDuration)<=a?1:c/(2*S.yearDuration)<=a?2:c/(4*S.yearDuration)<=a?4:Math.floor(z.getNiceNumber(c/(a-1),!0)/S.yearDuration),this.intervalType="year"));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=e-m/2;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum= g+m/2;d?this.autoValueFormatString="MMM DD YYYY HH:mm":"year"===this.intervalType?this.autoValueFormatString="YYYY":"month"===this.intervalType?this.autoValueFormatString="MMM YYYY":"week"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"day"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"hour"===this.intervalType?this.autoValueFormatString="hh:mm TT":"minute"===this.intervalType?this.autoValueFormatString="hh:mm TT":"second"===this.intervalType?this.autoValueFormatString= "hh:mm:ss TT":"millisecond"===this.intervalType&&(this.autoValueFormatString="fff'ms'");this.valueFormatString||(this.valueFormatString=this.autoValueFormatString)}else{this.intervalType="number";c=z.getNiceNumber(c,!1);this.interval=this.options&&0g?(c=Math.min(0.01*Math.abs(this.getApparentDifference(g,e,null,!0)),5),0<=g?e=g-c:g=isFinite(e)?e+c:0):(c=Math.min(0.01*Math.abs(this.getApparentDifference(e,g,null,!0)),0.05),0!==g&&(g+=c),0!==e&&(e-=c)):(g="undefined"===typeof this.options.interval?-Infinity:this.options.interval,e="undefined"!==typeof this.options.interval||isFinite(this.dataInfo.minDiff)?0:Infinity),m=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1g&&(g=0)),Math.abs(this.getApparentDifference(e,g,null,!0)),"axisX"===this.type&&b){this.valueType="dateTime";if(null===this.minimum||isNaN(this.minimum))this.minimum=e-m/2;if(null===this.maximum||isNaN(this.maximum))this.maximum=g+m/2}else this.intervalType=this.valueType="number",null===this.minimum&&(this.minimum="axisX"===this.type?e-m/2:Math.floor(e/this.interval)*this.interval,this.minimum=Math.min(this.minimum, null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?Infinity:this.sessionVariables.viewportMinimum)),null===this.maximum&&(this.maximum="axisX"===this.type?g+m/2:Math.ceil(g/this.interval)*this.interval,this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?-Infinity:this.sessionVariables.viewportMaximum)),0===this.maximum&&0===this.minimum&&(0===this.options.minimum?this.maximum+=10:0=== this.options.maximum&&(this.minimum-=10));u(this.sessionVariables.newViewportMinimum)&&(this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum));u(this.sessionVariables.newViewportMaximum)&&(this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum));this.range=this.viewportMaximum-this.viewportMinimum;this.intervalStartPosition="axisX"===this.type&&b?this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval):Math.floor((this.viewportMinimum+0.2*this.interval)/ this.interval)*this.interval;this.valueFormatString||(this.valueFormatString=z.generateValueFormatString(this.range,2))}};z.prototype.calculateLogarithmicAxisParameters=function(){var a=this.chart.layoutManager.getFreeSpace(),d=Math.log(this.logarithmBase),b;"bottom"===this._position||"top"===this._position?(this.maxWidth=a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?500>this.maxWidth?7:Math.max(7,Math.floor(this.maxWidth/100)):Math.max(Math.floor(this.maxWidth/ 50),3),c,e,g,m;m=1;if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=this.minimum;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;if(this.scaleBreaks)for(m=0;m=this.scaleBreaks._appliedBreaks[m].startValue||!u(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[m].startValue|| !u(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[m].startValue)&&(!u(this.sessionVariables.newViewportMaximum)&&this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[m].endValue||!u(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[m].endValue||!u(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[m].endValue)){this.scaleBreaks._appliedBreaks.splice(m,1);break}"axisX"===this.type? (c=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,e=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,1===e/c&&(m=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?0.4:this.options.interval),e*=m,c/=m),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:e/c>this.logarithmBase?e/c*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(c=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin, e=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,0>=c&&!isFinite(e)?(e="undefined"===typeof this.options.interval?0:this.options.interval,c=1):0>=c?c=e:isFinite(e)||(e=c),1===c&&1===e?(e*=this.logarithmBase-1/this.logarithmBase,c=1):1===e/c?(m=Math.min(e*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),e*=m,c/=m):c>e?(m=Math.min(c/e*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),1<=e?c=e/m:e=c*m):(m=Math.min(e/c*Math.pow(this.logarithmBase, 0.01),Math.pow(this.logarithmBase,0.04)),1!==e&&(e*=m),1!==c&&(c/=m)),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:e/c>this.logarithmBase?e/c*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&1e&&(e=1));m=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?e:this.viewportMaximum)/(isNaN(this.viewportMinimum)||null=== this.viewportMinimum?c:this.viewportMinimum);var l=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?e:this.viewportMaximum)-(isNaN(this.viewportMinimum)||null===this.viewportMinimum?c:this.viewportMinimum);this.intervalType="number";m=Math.pow(this.logarithmBase,z.getNiceNumber(Math.abs(Math.log(m)/d),!1));this.options&&0this.logarithmBase?e/c*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(c=null!==this.minimum?this.minimum:this.dataInfo.min,e=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(c)||isFinite(e)?1===c&&1===e?(e*=this.logarithmBase,c/=this.logarithmBase):1===e/c?(m=Math.pow(this.logarithmBase,this.interval),e*=m,c/=m):c>e?(m= Math.min(0.01*(c/e),5),1<=e?c=e/m:e=c*m):(m=Math.min(e/c*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==e&&(e*=m),1!==c&&(c/=m)):(e="undefined"===typeof this.options.interval?0:this.options.interval,c=1),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:e/c>this.logarithmBase?e/c*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&1e&&(e=1)),this.intervalType="number",null===this.minimum&&(this.minimum="axisX"===this.type?c/Math.sqrt(g):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(c)/d/this.interval)),this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?"undefined"===typeof this.sessionVariables.newViewportMinimum?Infinity:this.sessionVariables.newViewportMinimum:this.sessionVariables.viewportMinimum)),null===this.maximum&&(this.maximum= "axisX"===this.type?e*Math.sqrt(g):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(e)/d/this.interval)),this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?"undefined"===typeof this.sessionVariables.newViewportMaximum?0:this.sessionVariables.newViewportMaximum:this.sessionVariables.viewportMaximum)),1===this.maximum&&1===this.minimum&&(1===this.options.minimum?this.maximum*=this.logarithmBase-1/this.logarithmBase: 1===this.options.maximum&&(this.minimum/=this.logarithmBase-1/this.logarithmBase));this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum);this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum);this.viewportMinimum>this.viewportMaximum&&(!this.options.viewportMinimum&&!this.options.minimum||this.options.viewportMaximum||this.options.maximum?this.options.viewportMinimum||this.options.minimum||!this.options.viewportMaximum&&!this.options.maximum||(this.viewportMinimum=this.minimum= (this.options.viewportMaximum||this.options.maximum)/Math.pow(this.logarithmBase,2*Math.ceil(this.interval))):this.viewportMaximum=this.maximum=this.options.viewportMinimum||this.options.minimum);c=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(d*this.interval)+0.2)*this.interval);this.range=this.viewportMaximum/this.viewportMinimum;this.noTicks=a;if(!this.options.interval&&this.rangethis.viewportMaximum||3>a?2:3)){for(d=Math.floor(this.viewportMinimum/ b+0.5)*b;dthis.interval&&(this.interval=b,c=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(d*this.interval)+0.2)*this.interval))),this.equidistantInterval=!0,this.intervalStartPosition=c;if(!this.valueFormatString&&(this.valueFormatString="#,##0.##",1>this.viewportMinimum)){d=Math.floor(Math.abs(Math.log(this.viewportMinimum)/ Math.LN10))+2;if(isNaN(d)||!isFinite(d))d=2;if(2a&&(c+=Math.floor(Math.abs(Math.log(a)/Math.LN10)),isNaN(c)||!isFinite(c))&&(c=d);for(var e=0;eb?1>=c?1:5>=c?5:10:Math.max(Math.floor(c),1);return-20>b?Number(c*Math.pow(10,b)):Number((c*Math.pow(10,b)).toFixed(20))};z.getNiceNumber= function(a,d){var b=Math.floor(Math.log(a)/Math.LN10),c=a/Math.pow(10,b),c=d?1.5>c?1:3>c?2:7>c?5:10:1>=c?1:2>=c?2:5>=c?5:10;return-20>b?Number(c*Math.pow(10,b)):Number((c*Math.pow(10,b)).toFixed(20))};z.prototype.getLabelStartPoint=function(){var a=S[this.intervalType+"Duration"]*this.interval,a=new Date(Math.floor(this.viewportMinimum/a)*a);if("millisecond"!==this.intervalType)if("second"===this.intervalType)0=a||"bottom"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(c,l),this.ctx.lineTo(m,l),this.ctx.lineTo(m,e);else if("wavy"===this.type){k=c;h=e;g=0.5;p=(l-h)/a/3;for(var n=0;n

=a||"right"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(m,e),this.ctx.lineTo(m,l), this.ctx.lineTo(c,l);else if("wavy"===this.type){k=c;h=e;g=0.5;p=(m-k)/a/3;for(n=0;n

this.parent.range?2:Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range? 1:0):50this.parent.range?2:10>this.parent.range?1:0);this.valueFormatString=z.generateValueFormatString(this.parent.range,h)}var l=null===this.opacity?1:this.opacity,h=Math.abs("pixel"===this._thicknessType?this.thickness:this.parent.conversionParameters.pixelPerUnit*this.thickness),p=this.chart.overlaidCanvasCtx,q=p.globalAlpha;p.globalAlpha=l;p.beginPath();p.strokeStyle=this.color;p.lineWidth=h;p.save();this.labelFontSize= u(this.options.labelFontSize)?this.parent.labelFontSize:this.labelFontSize;if("left"===this.parent._position||"right"===this.parent._position)this.labelMaxWidth=u(this.options.labelMaxWidth)?this.parent.bounds.x2-this.parent.bounds.x1:this.labelMaxWidth,this.labelMaxHeight=u(this.options.labelWrap)||this.labelWrap?3*this.chart.height:2*this.labelFontSize;else if("top"===this.parent._position||"bottom"===this.parent._position)this.labelMaxWidth=u(this.options.labelMaxWidth)?3*this.chart.width:this.labelMaxWidth, this.labelMaxHeight=u(this.options.labelWrap)||this.labelWrap?this.parent.bounds.height:2*this.labelFontSize;0this.chart.bounds.x2?l.x=this.chart.bounds.x2-l.width:l.xthis.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2);"left"===this.parent._position?l.x=this.parent.lineCoordinates.x2-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2)}}else if("bottom"===this.parent._position||"top"===this.parent._position){n=this.parent.convertPixelToValue({x:a});for(r=0;rthis.chart.bounds.x2&&(l.x=this.chart.bounds.x2-l.width);l.xthis.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2);"left"===this.parent._position?l.x=this.parent.lineCoordinates.x2-l.measureText().width:"right"=== this.parent._position&&(l.x=this.parent.lineCoordinates.x2)}m=null;("bottom"===this.parent._position||"top"===this.parent._position)&&(b>=this.parent.convertValueToPixel(this.parent.viewportMinimum)&&c<=this.parent.convertValueToPixel(this.parent.viewportMaximum))&&(0=this.parent.convertValueToPixel(this.parent.viewportMaximum)&& e<=this.parent.convertValueToPixel(this.parent.viewportMinimum))&&(0this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2);"left"===this.parent._position?l.x=this.parent.lineCoordinates.x1-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2)}else{if("bottom"===this.parent._position||"top"===this.parent._position)l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:this.parent.convertPixelToValue(a)}):u(this.options.label)? ba(this.parent.convertPixelToValue(a),this.valueFormatString,this.chart._cultureInfo):this.label,l.x=b-l.measureText().width/2,l.x+l.width>this.chart.bounds.x2&&(l.x=this.chart.bounds.x2-l.width),l.xthis.chart.bounds.x2&&(l.x=this.chart.bounds.x2-l.width);l.xthis.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2),"left"===this.parent._position?l.x=this.parent.lineCoordinates.x2-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2);0 Sample Tooltip';this.container.innerHTML=a;this.contentDiv=this.container.firstChild;this.container.style.borderRadius=this.contentDiv.style.borderRadius;this.chart._canvasJSContainer.appendChild(this.container)}};$.prototype.mouseMoveHandler=function(a,d){this._lastUpdated&&4>(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(), this.chart.resetOverlayedCanvas(),this._updateToolTip(a,d))};$.prototype._updateToolTip=function(a,d,b){b="undefined"===typeof b?!0:b;this.container||this._initialize();this.enabled||this.hide();if(!this.chart.disableToolTip){if("undefined"===typeof a||"undefined"===typeof d){if(isNaN(this._prevX)||isNaN(this._prevY))return;a=this._prevX;d=this._prevY}else this._prevX=a,this._prevY=d;var c=null,e=null,g=[],k=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){if("xySwapped"=== this.chart.plotInfo.axisPlacement){var l=[];if(this.chart.axisX)for(var p=0;ph.dataSeries.axisY.viewportMaximum&&b++;b-h.dataPoint.y.length&&g.push(h)}else"column"===e.type||"bar"===e.type?0>h.dataPoint.y?0>h.dataSeries.axisY.viewportMinimum&&h.dataSeries.axisY.viewportMaximum>=h.dataPoint.y&&g.push(h):h.dataSeries.axisY.viewportMinimum<=h.dataPoint.y&&0<=h.dataSeries.axisY.viewportMaximum&&g.push(h):"bubble"===e.type?(b=this.chart._eventManager.objectMap[e.dataPointIds[h.index]].size/2,h.dataPoint.y>= h.dataSeries.axisY.viewportMinimum-b&&h.dataPoint.y<=h.dataSeries.axisY.viewportMaximum+b&&g.push(h)):"waterfall"===e.type?(b=0,h.cumulativeSumYStartValueh.dataSeries.axisY.viewportMaximum&&b++,h.cumulativeSumh.dataSeries.axisY.viewportMaximum&&b++,2>b&&-2=h.dataSeries.axisY.viewportMinimum&& h.dataPoint.y<=h.dataSeries.axisY.viewportMaximum)&&g.push(h);else g.push(h)}}if(0a&&(a+=this.container.clientWidth+20);a+this.container.clientWidth> Math.max(this.chart.container.clientWidth,this.chart.width)&&(a=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));d=1!==g.length||this.shared||"line"!==g[0].dataSeries.type&&"stepLine"!==g[0].dataSeries.type&&"spline"!==g[0].dataSeries.type&&"area"!==g[0].dataSeries.type&&"stepArea"!==g[0].dataSeries.type&&"splineArea"!==g[0].dataSeries.type?"bar"===g[0].dataSeries.type||"rangeBar"===g[0].dataSeries.type||"stackedBar"===g[0].dataSeries.type||"stackedBar100"=== g[0].dataSeries.type?g[0].dataSeries.axisX.convertValueToPixel(g[0].dataPoint.x):d:g[0].dataSeries.axisY.convertValueToPixel(g[0].dataPoint.y);d=-d+10;0",h=this.chart.replaceKeywordsWithValue(h,c,b,e)),null===c.toolTipContent||"undefined"===typeof c.toolTipContent&&null===b.options.toolTipContent||("line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"=== b.type||"splineArea"===b.type||"column"===b.type||"bar"===b.type||"scatter"===b.type||"stackedColumn"===b.type||"stackedColumn100"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"waterfall"===b.type?(this.chart.axisX&&1":"X:{axisXIndex}
":""),g+=c.toolTipContent?c.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content? this.content:"{name}:  {y}",p=b.axisXIndex):"bubble"===b.type?(this.chart.axisX&&1":"X:{axisXIndex}
":""),g+=c.toolTipContent?c.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:  {y},   {z}"): "rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"error"===b.type?(this.chart.axisX&&1":"X:{axisXIndex}
":""),g+=c.toolTipContent?c.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:  {y[0]}, {y[1]}"):"candlestick"=== b.type||"ohlc"===b.type?(this.chart.axisX&&1":"X:{axisXIndex}
":""),g+=c.toolTipContent?c.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:
Open:   {y[0]}
High:    {y[1]}
Low:   {y[2]}
Close:   {y[3]}"):"boxAndWhisker"=== b.type&&(this.chart.axisX&&1":"X:{axisXIndex}
":""),g+=c.toolTipContent?c.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:
Minimum:   {y[0]}
Q1:               {y[1]}
Q2:               {y[4]}
Q3:               {y[2]}
Maximum:  {y[3]}"), null===d&&(d=""),!0===this.reversed?(d=this.chart.replaceKeywordsWithValue(g,c,b,e)+d,l"+d)):(d+=this.chart.replaceKeywordsWithValue(g,c,b,e),l")));null!==d&&(d=h+d)}else{b=a[0].dataSeries;c=a[0].dataPoint;e=a[0].index;if(null===c.toolTipContent||"undefined"===typeof c.toolTipContent&&null===b.options.toolTipContent)return null;"line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"column"=== b.type||"bar"===b.type||"scatter"===b.type||"stackedColumn"===b.type||"stackedColumn100"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"waterfall"===b.type?g=c.toolTipContent?c.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(c.label?"{label}":"{x}")+":  {y}":"bubble"===b.type?g=c.toolTipContent? c.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(c.label?"{label}":"{x}")+":  {y},   {z}":"pie"===b.type||"doughnut"===b.type||"funnel"===b.type||"pyramid"===b.type?g=c.toolTipContent?c.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(c.name?"{name}:  ":c.label?"{label}:  ":"")+"{y}":"rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"error"===b.type?g=c.toolTipContent?c.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(c.label?"{label}":"{x}")+" :  {y[0]},  {y[1]}": "candlestick"===b.type||"ohlc"===b.type?g=c.toolTipContent?c.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(c.label?"{label}":"{x}")+"
Open:   {y[0]}
High:    {y[1]}
Low:     {y[2]}
Close:   {y[3]}":"boxAndWhisker"===b.type&&(g=c.toolTipContent?c.toolTipContent:b.toolTipContent?b.toolTipContent: this.content&&"function"!==typeof this.content?this.content:""+(c.label?"{label}":"{x}")+"
Minimum:   {y[0]}
Q1:               {y[1]}
Q2:               {y[4]}
Q3:               {y[2]}
Maximum:  {y[3]}"); null===d&&(d="");d+=this.chart.replaceKeywordsWithValue(g,c,b,e)}return d};$.prototype.enableAnimation=function(){if(!this.container.style.WebkitTransition){var a=this.getContainerTransition(this.containerTransitionDuration);this.container.style.WebkitTransition=a;this.container.style.MsTransition=a;this.container.style.transition=a;this.container.style.MozTransition=this.mozContainerTransition}};$.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition= "",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")};$.prototype.hide=function(a){this.container&&(this.container.style.display="none",this.currentSeriesIndex=-1,this._prevY=this._prevX=NaN,("undefined"===typeof a||a)&&this.chart.resetOverlayedCanvas())};$.prototype.show=function(a,d,b){this._updateToolTip(a,d,"undefined"===typeof b?!1:b)};$.prototype.fixMozTransitionDelay=function(a,d){if(20c&&a.push(d),d.animationCallback(c),1<=c&&d.onComplete)d.onComplete();this.animations=a;0g;g++)for(var e=0;3>e;e++){for(var f=0,d=0;3>d;d++)f+=a[g][d]*b[d][e];c[g][e]=f}return c}function P(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX= a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha;b.font=a.font;b.textAlign=a.textAlign;b.textBaseline=a.textBaseline;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function Q(a){var b=a.indexOf("(",3),c=a.indexOf(")",b+1),b=a.substring(b+1,c).split(",");if(4!=b.length||"a"!=a.charAt(3))b[3]=1;return b}function E(a,b,c){return Math.min(c,Math.max(b,a))}function F(a,b,c){0>c&&c++;16*c?a+6*(b-a)*c: 1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}function G(a){if(a in H)return H[a];var b,c=1;a=String(a);if("#"==a.charAt(0))b=a;else if(/^rgb/.test(a)){c=Q(a);b="#";for(var g,e=0;3>e;e++)g=-1!=c[e].indexOf("%")?Math.floor(255*(parseFloat(c[e])/100)):+c[e],b+=v[E(g,0,255)];c=+c[3]}else if(/^hsl/.test(a)){e=c=Q(a);b=parseFloat(e[0])/360%360;0>b&&b++;g=E(parseFloat(e[1])/100,0,1);e=E(parseFloat(e[2])/100,0,1);if(0==g)g=e=b=e;else{var f=0.5>e?e*(1+g):e+g-e*g,d=2*e-f;g=F(d,f,b+1/3);e=F(d,f,b);b=F(d,f,b-1/3)}b="#"+ v[Math.floor(255*g)]+v[Math.floor(255*e)]+v[Math.floor(255*b)];c=c[3]}else b=Z[a]||a;return H[a]={color:b,alpha:c}}function C(a){this.m_=D();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=1*q;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=a;var b="width:"+a.clientWidth+"px;height:"+a.clientHeight+"px;overflow:hidden;position:absolute", c=a.ownerDocument.createElement("div");c.style.cssText=b;a.appendChild(c);b=c.cloneNode(!1);b.style.backgroundColor="red";b.style.filter="alpha(opacity=0)";a.appendChild(b);this.element_=c;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function R(a,b,c,g){a.currentPath_.push({type:"bezierCurveTo",cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:g.x,y:g.y});a.currentX_=g.x;a.currentY_=g.y}function S(a,b){var c=G(a.strokeStyle),g=c.color,c=c.alpha*a.globalAlpha,e=a.lineScale_*a.lineWidth;1>e&&(c*=e);b.push("')}function T(a,b,c,g){var e=a.fillStyle,f=a.arcScaleX_,d=a.arcScaleY_,k=g.x-c.x,n=g.y-c.y;if(e instanceof w){var h=0,l=g=0,u=0,m=1;if("gradient"==e.type_){h=e.x1_/f;c=e.y1_/d;var p=s(a,e.x0_/f,e.y0_/d),h=s(a,h,c),h=180*Math.atan2(h.x-p.x,h.y-p.y)/Math.PI;0>h&&(h+=360);1E-6>h&&(h=0)}else p=s(a,e.x0_,e.y0_),g=(p.x-c.x)/k,l=(p.y-c.y)/n,k/=f*q, n/=d*q,m=x.max(k,n),u=2*e.r0_/m,m=2*e.r1_/m-u;f=e.colors_;f.sort(function(a,b){return a.offset-b.offset});d=f.length;p=f[0].color;c=f[d-1].color;k=f[0].alpha*a.globalAlpha;a=f[d-1].alpha*a.globalAlpha;for(var n=[],r=0;r')}else e instanceof I?k&&n&&b.push("'):(e=G(a.fillStyle),b.push(''))}function s(a,b,c){a=a.m_;return{x:q*(b*a[0][0]+c*a[1][0]+a[2][0])-r,y:q*(b*a[0][1]+c*a[1][1]+a[2][1])-r}}function z(a,b,c){isFinite(b[0][0])&&(isFinite(b[0][1])&&isFinite(b[1][0])&&isFinite(b[1][1])&&isFinite(b[2][0])&&isFinite(b[2][1]))&&(a.m_=b,c&&(a.lineScale_=aa(ba(b[0][0]*b[1][1]-b[0][1]* b[1][0]))))}function w(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}function I(a,b){if(!a||1!=a.nodeType||"IMG"!=a.tagName)throw new A("TYPE_MISMATCH_ERR");if("complete"!=a.readyState)throw new A("INVALID_STATE_ERR");switch(b){case "repeat":case null:case "":this.repetition_="repeat";break;case "repeat-x":case "repeat-y":case "no-repeat":this.repetition_=b;break;default:throw new A("SYNTAX_ERR");}this.src_=a.src;this.width_=a.width;this.height_=a.height} function A(a){this.code=this[a];this.message=a+": DOM Exception "+this.code}var x=Math,k=x.round,J=x.sin,K=x.cos,ba=x.abs,aa=x.sqrt,q=10,r=q/2;navigator.userAgent.match(/MSIE ([\d.]+)?/);var M=Array.prototype.slice;O(document);var U={init:function(a){a=a||document;a.createElement("canvas");a.attachEvent("onreadystatechange",W(this.init_,this,a))},init_:function(a){a=a.getElementsByTagName("canvas");for(var b=0;bd;d++)for(var B=0;16>B;B++)v[16*d+B]=d.toString(16)+B.toString(16);var Z={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC", bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000", darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082", ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA", mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5", peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"}, H={},L={},$={butt:"flat",round:"round"},d=C.prototype;d.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null);this.element_.innerHTML=""};d.beginPath=function(){this.currentPath_=[]};d.moveTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.lineTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.bezierCurveTo= function(a,b,c,g,e,f){e=s(this,e,f);a=s(this,a,b);c=s(this,c,g);R(this,a,c,e)};d.quadraticCurveTo=function(a,b,c,g){a=s(this,a,b);c=s(this,c,g);g={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)};R(this,g,{x:g.x+(c.x-this.currentX_)/3,y:g.y+(c.y-this.currentY_)/3},c)};d.arc=function(a,b,c,g,e,f){c*=q;var d=f?"at":"wa",k=a+K(g)*c-r,n=b+J(g)*c-r;g=a+K(e)*c-r;e=b+J(e)*c-r;k!=g||f||(k+=0.125);a=s(this,a,b);k=s(this,k,n);g=s(this,g,e);this.currentPath_.push({type:d, x:a.x,y:a.y,radius:c,xStart:k.x,yStart:k.y,xEnd:g.x,yEnd:g.y})};d.rect=function(a,b,c,g){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath()};d.strokeRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath();this.stroke();this.currentPath_=e};d.fillRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+ c,b+g);this.lineTo(a,b+g);this.closePath();this.fill();this.currentPath_=e};d.createLinearGradient=function(a,b,c,g){var e=new w("gradient");e.x0_=a;e.y0_=b;e.x1_=c;e.y1_=g;return e};d.createRadialGradient=function(a,b,c,g,e,f){var d=new w("gradientradial");d.x0_=a;d.y0_=b;d.r0_=c;d.x1_=g;d.y1_=e;d.r1_=f;return d};d.drawImage=function(a,b){var c,g,e,d,r,y,n,h;e=a.runtimeStyle.width;d=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var l=a.width,u=a.height;a.runtimeStyle.width= e;a.runtimeStyle.height=d;if(3==arguments.length)c=arguments[1],g=arguments[2],r=y=0,n=e=l,h=d=u;else if(5==arguments.length)c=arguments[1],g=arguments[2],e=arguments[3],d=arguments[4],r=y=0,n=l,h=u;else if(9==arguments.length)r=arguments[1],y=arguments[2],n=arguments[3],h=arguments[4],c=arguments[5],g=arguments[6],e=arguments[7],d=arguments[8];else throw Error("Invalid number of arguments");var m=s(this,c,g),p=[];p.push(" ','","");this.element_.insertAdjacentHTML("BeforeEnd",p.join(""))};d.stroke=function(a){var b=[];b.push("d.x)d.x=f.x;if(null==c.y||f.yd.y)d.y=f.y}}b.push(' ">');a?T(this,b,c,d):S(this,b);b.push("");this.element_.insertAdjacentHTML("beforeEnd",b.join(""))};d.fill=function(){this.stroke(!0)};d.closePath=function(){this.currentPath_.push({type:"close"})};d.save=function(){var a= {};P(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=t(D(),this.m_)};d.restore=function(){this.aStack_.length&&(P(this.aStack_.pop(),this),this.m_=this.mStack_.pop())};d.translate=function(a,b){z(this,t([[1,0,0],[0,1,0],[a,b,1]],this.m_),!1)};d.rotate=function(a){var b=K(a);a=J(a);z(this,t([[b,a,0],[-a,b,0],[0,0,1]],this.m_),!1)};d.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;z(this,t([[a,0,0],[0,b,0],[0,0,1]],this.m_),!0)};d.transform=function(a,b,c,d,e,f){z(this,t([[a, b,0],[c,d,0],[e,f,1]],this.m_),!0)};d.setTransform=function(a,b,c,d,e,f){z(this,[[a,b,0],[c,d,0],[e,f,1]],!0)};d.drawText_=function(a,b,c,d,e){var f=this.m_;d=0;var r=1E3,t=0,n=[],h;h=this.font;if(L[h])h=L[h];else{var l=document.createElement("div").style;try{l.font=h}catch(u){}h=L[h]={style:l.fontStyle||"normal",variant:l.fontVariant||"normal",weight:l.fontWeight||"normal",size:l.fontSize||10,family:l.fontFamily||"sans-serif"}}var l=h,m=this.element_;h={};for(var p in l)h[p]=l[p];p=parseFloat(m.currentStyle.fontSize); m=parseFloat(l.size);"number"==typeof l.size?h.size=l.size:-1!=l.size.indexOf("px")?h.size=m:-1!=l.size.indexOf("em")?h.size=p*m:-1!=l.size.indexOf("%")?h.size=p/100*m:-1!=l.size.indexOf("pt")?h.size=m/0.75:h.size=p;h.size*=0.981;p=h.style+" "+h.variant+" "+h.weight+" "+h.size+"px "+h.family;m=this.element_.currentStyle;l=this.textAlign.toLowerCase();switch(l){case "left":case "center":case "right":break;case "end":l="ltr"==m.direction?"right":"left";break;case "start":l="rtl"==m.direction?"right": "left";break;default:l="left"}switch(this.textBaseline){case "hanging":case "top":t=h.size/1.75;break;case "middle":break;default:case null:case "alphabetic":case "ideographic":case "bottom":t=-h.size/2.25}switch(l){case "right":d=1E3;r=0.05;break;case "center":d=r=500}b=s(this,b+0,c+t);n.push('');e?S(this,n):T(this,n,{x:-d,y:0}, {x:r,y:h.size});e=f[0][0].toFixed(3)+","+f[1][0].toFixed(3)+","+f[0][1].toFixed(3)+","+f[1][1].toFixed(3)+",0,0";b=k(b.x/q)+","+k(b.y/q);n.push('','','');this.element_.insertAdjacentHTML("beforeEnd",n.join(""))};d.fillText=function(a,b,c,d){this.drawText_(a,b,c,d,!1)};d.strokeText=function(a, b,c,d){this.drawText_(a,b,c,d,!0)};d.measureText=function(a){this.textMeasureEl_||(this.element_.insertAdjacentHTML("beforeEnd",''),this.textMeasureEl_=this.element_.lastChild);var b=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(b.createTextNode(a));return{width:this.textMeasureEl_.offsetWidth}};d.clip=function(){}; d.arcTo=function(){};d.createPattern=function(a,b){return new I(a,b)};w.prototype.addColorStop=function(a,b){b=G(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};d=A.prototype=Error();d.INDEX_SIZE_ERR=1;d.DOMSTRING_SIZE_ERR=2;d.HIERARCHY_REQUEST_ERR=3;d.WRONG_DOCUMENT_ERR=4;d.INVALID_CHARACTER_ERR=5;d.NO_DATA_ALLOWED_ERR=6;d.NO_MODIFICATION_ALLOWED_ERR=7;d.NOT_FOUND_ERR=8;d.NOT_SUPPORTED_ERR=9;d.INUSE_ATTRIBUTE_ERR=10;d.INVALID_STATE_ERR=11;d.SYNTAX_ERR=12;d.INVALID_MODIFICATION_ERR= 13;d.NAMESPACE_ERR=14;d.INVALID_ACCESS_ERR=15;d.VALIDATION_ERR=16;d.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=U;CanvasRenderingContext2D=C;CanvasGradient=w;CanvasPattern=I;DOMException=A}(); /*eslint-enable*/ /*jshint ignore:end*/